diff --git a/.github/workflows/chain_pre_release.yml b/.github/workflows/chain_pre_release.yml index b925b3831..838174fca 100644 --- a/.github/workflows/chain_pre_release.yml +++ b/.github/workflows/chain_pre_release.yml @@ -23,7 +23,7 @@ jobs: working-directory: ./chain - run: | - zip -q empowerd-${{ github.ref_name }}-linux-amd64.zip empowerd-${{ github.ref_name }}-linux-amd64 && rm empowerd-${{ github.ref_name }}-linux-amd64 + mv empowerd-${{ github.ref_name }}-linux-amd64 empowerd && zip -q empowerd-${{ github.ref_name }}-linux-amd64.zip empowerd && rm empowerd working-directory: ./chain/build - uses: "marvinpinto/action-automatic-releases@latest" diff --git a/.github/workflows/chain_release.yml b/.github/workflows/chain_release.yml index c61ac322a..c2ccd2133 100644 --- a/.github/workflows/chain_release.yml +++ b/.github/workflows/chain_release.yml @@ -20,7 +20,7 @@ jobs: working-directory: ./chain - run: | - zip -q empowerd-${{ github.ref_name }}-linux-amd64.zip empowerd-${{ github.ref_name }}-linux-amd64 && rm empowerd-${{ github.ref_name }}-linux-amd64 + mv empowerd-${{ github.ref_name }}-linux-amd64 empowerd && zip -q empowerd-${{ github.ref_name }}-linux-amd64.zip empowerd && rm empowerd working-directory: ./chain/build - uses: "marvinpinto/action-automatic-releases@latest" diff --git a/.github/workflows/frontend-marketplace-deploy.yml b/.github/workflows/frontend-marketplace-deploy.yml index d3cd41167..b0b5a3e42 100644 --- a/.github/workflows/frontend-marketplace-deploy.yml +++ b/.github/workflows/frontend-marketplace-deploy.yml @@ -17,6 +17,20 @@ jobs: - run: npm ci && npm run build working-directory: ./frontend/marketplace + env: + VITE_API_ENDPOINT: "https://testnet.empowerchain.io:3000/" + VITE_HTTPS_FILE_URL: "https://testnet.empowerchain.io:8080/ipfs/" + VITE_MARKETPLACE_CONTRACT: "empower14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sfg4umu" + VITE_CHAIN_ID: "circulus-1" + VITE_CHAIN_NAME: "Empowerchain Testnet" + VITE_RPC_ENDPOINT: "https://testnet.empowerchain.io:26659" + VITE_REST_ENDPOINT: "https://testnet.empowerchain.io:1319" + VITE_DEFAULT_CREDIT_TYPE: "PCRD" + VITE_GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }} + VITE_REVISION_ID: ${{ github.sha }} + VITE_ENVIRONMENT: testnet + VITE_ROLLBAR_ACCESS_TOKEN: ${{ secrets.MARKETPLACE_ROLLBAR_ACCESS_TOKEN }} + - uses: amondnet/vercel-action@v25 with: diff --git a/.github/workflows/frontend-poe-deploy.yml b/.github/workflows/frontend-poe-deploy.yml index 23fc60ccb..c47fedbc2 100644 --- a/.github/workflows/frontend-poe-deploy.yml +++ b/.github/workflows/frontend-poe-deploy.yml @@ -17,6 +17,13 @@ jobs: - run: npm ci && npm run build working-directory: ./frontend/proof-of-existence/ + env: + VITE_CHAIN_ID: circulus-1 + VITE_RPC_URL: https://empower-testnet-rpc.polkachu.com/ + VITE_REST_URL: https://empower-testnet-api.polkachu.com/ + VITE_REVISION_ID: ${{ github.sha }} + VITE_ENVIRONMENT: testnet + VITE_ROLLBAR_ACCESS_TOKEN: ${{ secrets.POE_ROLLBAR_ACCESS_TOKEN }} - uses: amondnet/vercel-action@v25 with: diff --git a/.github/workflows/circulus-gentx-check.yml b/.github/workflows/mainnet-gentx-check.yml similarity index 62% rename from .github/workflows/circulus-gentx-check.yml rename to .github/workflows/mainnet-gentx-check.yml index f18e2e37c..e03ece557 100644 --- a/.github/workflows/circulus-gentx-check.yml +++ b/.github/workflows/mainnet-gentx-check.yml @@ -1,17 +1,16 @@ -name: "Check circulus-1 gentxs" +name: "Check empowerchain-1 gentxs" on: workflow_dispatch: pull_request: branches: - - circulus-1 - main paths: - - 'testnets/circulus-1/gentx/**' + - 'mainnet/empowerchain-1/gentx/**' jobs: build: - name: Check circulus-1 gentxs + name: Check empowerchain-1 gentxs runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -21,4 +20,4 @@ jobs: version: 0.6.30 - run: earthly --ci +test-collect-gentx - working-directory: ./testnets/circulus-1 + working-directory: ./mainnet/empowerchain-1 diff --git a/chain/Earthfile b/chain/Earthfile index 3d087904e..d8c2418b5 100644 --- a/chain/Earthfile +++ b/chain/Earthfile @@ -48,7 +48,7 @@ build-static: wget -O /lib/libwasmvm_muslc.a https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/libwasmvm_muslc.${ARCH}.a; \ fi; RUN go mod download - RUN LEDGER_ENABLED=true BUILD_TAGS=muslc LINK_STATICALLY=true make build + RUN LEDGER_ENABLED=true BUILD_TAGS=muslc LINK_STATICALLY=true make VERSION=$VERSION COMMIT=$EARTHLY_GIT_HASH build SAVE ARTIFACT build/empowerd AS LOCAL build/empowerd-"$VERSION"-linux-amd64 test-prep: diff --git a/chain/app/genesis-tools/genesis-mainnet.go b/chain/app/genesis-tools/genesis-mainnet.go index 19845552d..6a8f63566 100644 --- a/chain/app/genesis-tools/genesis-mainnet.go +++ b/chain/app/genesis-tools/genesis-mainnet.go @@ -90,13 +90,13 @@ var genesisAccountConfigs = map[string]*genesisAccountConfig{ "A-1": { amount: 0, accountType: groupPolicyAccount, - metadata: `{"name": "Tech deployment"}`, + metadata: `{"name": "Empower tech deployment"}`, groupRef: "G-1", }, "A-2": { amount: 0, accountType: groupPolicyAccount, - metadata: `{"name": "Tech funding"}`, + metadata: `{"name": "EmpowerChain tech funding"}`, groupRef: "G-2", }, "A-3": { @@ -177,6 +177,12 @@ var genesisAccountConfigs = map[string]*genesisAccountConfig{ metadata: `{"name": "Bug and security bounties"}`, groupRef: "G-3", }, + "A-16": { + amount: 0, + accountType: groupPolicyAccount, + metadata: `{"name": "Infrastructure & Interchain funding"}`, + groupRef: "G-2", + }, "B-1": { amount: 1_500_000, accountType: vestingAccount1plus1, @@ -203,7 +209,7 @@ var genesisAccountConfigs = map[string]*genesisAccountConfig{ address: "empower15rph43lzyqe2gem93nxxxalxqvqe7gg4dwfhz5", // FINAL ADDRESS }, "B-6": { - amount: 20_000, + amount: 12_000, accountType: vestingAccount4plus1, address: "empower1umjhxpz5m70v04jh7c5swlymvg9qtj3qf7a24f", // FINAL ADDRESS }, @@ -252,6 +258,11 @@ var genesisAccountConfigs = map[string]*genesisAccountConfig{ accountType: vestingAccount4plus1, address: "empower198r36k3ze8q6nlyn5laudzjtens8xvar76cr28", // TODO: REPLACE WITH REAL ADDRESS WHEN WE HAVE IT }, + "B-16": { + amount: 8_000, + accountType: vestingAccount4plus1, + address: "empower1rahlzcsjurllg6dcd73shmsvj2elx604d88ksp", // FINAL ADDRESS + }, } // Make sure only setting P addresses as admin diff --git a/chain/go.mod b/chain/go.mod index 233822581..48cca9785 100644 --- a/chain/go.mod +++ b/chain/go.mod @@ -7,8 +7,8 @@ require ( cosmossdk.io/errors v1.0.0-beta.7 cosmossdk.io/math v1.0.1 cosmossdk.io/tools/rosetta v0.2.1 - github.com/CosmWasm/wasmd v0.40.0 - github.com/cometbft/cometbft v0.37.1 + github.com/CosmWasm/wasmd v0.40.1 + github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.7.0 github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/cosmos/cosmos-sdk v0.47.3 @@ -48,7 +48,7 @@ require ( github.com/Antonboom/nilnil v0.1.1 // indirect github.com/BurntSushi/toml v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/CosmWasm/wasmvm v1.2.3 // indirect + github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect @@ -83,7 +83,7 @@ require ( github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect @@ -112,7 +112,7 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect + github.com/go-playground/locales v0.14.0 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.0.3 // indirect github.com/go-toolsmith/astequal v1.1.0 // indirect @@ -188,7 +188,6 @@ require ( github.com/kyoh86/exportloopref v0.1.11 // indirect github.com/ldez/gomoddirectives v0.2.3 // indirect github.com/ldez/tagliatelle v0.4.0 // indirect - github.com/leodido/go-urn v1.2.1 // indirect github.com/leonklingele/grouper v1.1.1 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect @@ -266,7 +265,6 @@ require ( github.com/timonwong/loggercheck v0.9.3 // indirect github.com/tomarrell/wrapcheck/v2 v2.8.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/ugorji/go/codec v1.2.7 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/ultraware/funlen v0.0.3 // indirect github.com/ultraware/whitespace v0.0.5 // indirect @@ -281,7 +279,7 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.23.0 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/crypto v0.8.0 // indirect golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9 // indirect golang.org/x/mod v0.8.0 // indirect golang.org/x/net v0.9.0 // indirect diff --git a/chain/go.sum b/chain/go.sum index aceee0be2..e2339e69d 100644 --- a/chain/go.sum +++ b/chain/go.sum @@ -226,10 +226,10 @@ github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.40.0 h1:3Vvq1m8dPQdvZR+QJc86VIx6QoWAEVnuHxqBPshJvyo= -github.com/CosmWasm/wasmd v0.40.0/go.mod h1:SuxskRBB7+bpwXGhUXaEfdpjg5WKpdxBy7Tm36VRMUU= -github.com/CosmWasm/wasmvm v1.2.3 h1:OKYlobwmVGbl0eSn0mXoAAjE5hIuXnQCLPjbNd91sVY= -github.com/CosmWasm/wasmvm v1.2.3/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= +github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= +github.com/CosmWasm/wasmd v0.40.1/go.mod h1:6EOwnv7MpuFaEqxcUOdFV9i4yvrdOciaY6VQ1o7A3yg= +github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= +github.com/CosmWasm/wasmvm v1.2.4/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= @@ -355,8 +355,8 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.1 h1:KLxkQTK2hICXYq21U2hn1W5hOVYUdQgDQ1uB+90xPIg= -github.com/cometbft/cometbft v0.37.1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= +github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -386,8 +386,8 @@ github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/ibc-go/v7 v7.0.1 h1:NIBNRWjlOoFvFQu1ZlgwkaSeHO5avf4C1YQiWegt8jw= github.com/cosmos/ibc-go/v7 v7.0.1/go.mod h1:vEaapV6nuLPQlS+g8IKmxMo6auPi0i7HMv1PhViht/E= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= @@ -505,9 +505,8 @@ github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvSc github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -860,9 +859,8 @@ github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUc github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/tagliatelle v0.4.0 h1:sylp7d9kh6AdXN2DpVGHBRb5guTVAgOxqNGhbqc4b1c= github.com/ldez/tagliatelle v0.4.0/go.mod h1:mNtTfrHy2haaBAw+VT7IBV6VXBThS7TCreYWbBcJ87I= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= @@ -1207,12 +1205,11 @@ github.com/tomarrell/wrapcheck/v2 v2.8.0/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0 github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1290,8 +1287,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= diff --git a/chain/scripts/docgen/generate_cli_docs.go b/chain/scripts/docgen/generate_cli_docs.go index c5e1887e7..2be0ee8bf 100644 --- a/chain/scripts/docgen/generate_cli_docs.go +++ b/chain/scripts/docgen/generate_cli_docs.go @@ -56,7 +56,7 @@ func generateCLIDocs() { filename := d.Name() commandSplit := strings.Split(strings.TrimSuffix(filename, filepath.Ext(filename)), "_") - sidebarItems = buildCLIDocsSidebarTree(sidebarItems, commandSplit, "/cli-docs/"+filename) + sidebarItems = buildCLIDocsSidebarTree(sidebarItems, commandSplit, "/references/cli-docs/"+filename) return nil }); err != nil { diff --git a/chain/scripts/docgen/generate_module_docs.go b/chain/scripts/docgen/generate_module_docs.go index 1dc16ce90..791ffdfd2 100644 --- a/chain/scripts/docgen/generate_module_docs.go +++ b/chain/scripts/docgen/generate_module_docs.go @@ -34,7 +34,7 @@ func generateModuleDocs() { // Create sidebar item for this module moduleSidebarItems = append(moduleSidebarItems, VitepressSidebarItem{ Text: module, - Link: "/module-docs/" + module + ".md", + Link: "/references/module-docs/" + module + ".md", }) } fmt.Println("✅ Generated module docs") diff --git a/chain/scripts/docgen/go.mod b/chain/scripts/docgen/go.mod index 5a8029f64..acc4e9616 100644 --- a/chain/scripts/docgen/go.mod +++ b/chain/scripts/docgen/go.mod @@ -17,14 +17,15 @@ require ( cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.3 // indirect cosmossdk.io/errors v1.0.0-beta.7 // indirect + cosmossdk.io/log v1.1.0 // indirect cosmossdk.io/math v1.0.1 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/CosmWasm/wasmd v0.40.0 // indirect - github.com/CosmWasm/wasmvm v1.2.3 // indirect + github.com/CosmWasm/wasmd v0.40.1 // indirect + github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -37,18 +38,18 @@ require ( github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect - github.com/cometbft/cometbft v0.37.1 // indirect + github.com/cometbft/cometbft v0.37.2 // indirect github.com/cometbft/cometbft-db v0.7.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect - github.com/cosmos/cosmos-sdk v0.47.2 // indirect + github.com/cosmos/cosmos-sdk v0.47.3 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogoproto v1.4.10 // indirect github.com/cosmos/iavl v0.20.0 // indirect github.com/cosmos/ibc-go/v7 v7.0.1 // indirect - github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect @@ -109,7 +110,8 @@ require ( github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.18 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect @@ -118,8 +120,8 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect - github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect + github.com/pelletier/go-toml/v2 v2.0.7 // indirect + github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.15.1 // indirect @@ -129,6 +131,7 @@ require ( github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.29.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spf13/afero v1.9.3 // indirect @@ -147,8 +150,8 @@ require ( github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect + golang.org/x/crypto v0.8.0 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect golang.org/x/net v0.9.0 // indirect golang.org/x/oauth2 v0.6.0 // indirect golang.org/x/sys v0.7.0 // indirect diff --git a/chain/scripts/docgen/go.sum b/chain/scripts/docgen/go.sum index 2e7db8f31..9bb829bf5 100644 --- a/chain/scripts/docgen/go.sum +++ b/chain/scripts/docgen/go.sum @@ -196,6 +196,8 @@ cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= +cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= +cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= @@ -212,10 +214,10 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.40.0 h1:3Vvq1m8dPQdvZR+QJc86VIx6QoWAEVnuHxqBPshJvyo= -github.com/CosmWasm/wasmd v0.40.0/go.mod h1:SuxskRBB7+bpwXGhUXaEfdpjg5WKpdxBy7Tm36VRMUU= -github.com/CosmWasm/wasmvm v1.2.3 h1:OKYlobwmVGbl0eSn0mXoAAjE5hIuXnQCLPjbNd91sVY= -github.com/CosmWasm/wasmvm v1.2.3/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= +github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= +github.com/CosmWasm/wasmd v0.40.1/go.mod h1:6EOwnv7MpuFaEqxcUOdFV9i4yvrdOciaY6VQ1o7A3yg= +github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= +github.com/CosmWasm/wasmvm v1.2.4/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= @@ -263,6 +265,7 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -305,8 +308,8 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.1 h1:KLxkQTK2hICXYq21U2hn1W5hOVYUdQgDQ1uB+90xPIg= -github.com/cometbft/cometbft v0.37.1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= +github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -316,13 +319,14 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.2 h1:9rSriCoiJD+4F+tEDobyM8V7HF5BtY5Ef4VYNig96s0= -github.com/cosmos/cosmos-sdk v0.47.2/go.mod h1:zYzgI8w8hhotXTSoGbbSOAKfpJTx4wOy4XgbaKhtRtc= +github.com/cosmos/cosmos-sdk v0.47.3 h1:r0hGmZoAzP2D+MaPaFGHwAaTdFQq3pNpHaUp1BsffbM= +github.com/cosmos/cosmos-sdk v0.47.3/go.mod h1:c4OfLdAykA9zsj1CqrxBRqXzVz48I++JSvIMPSPcEmk= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -335,8 +339,8 @@ github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/ibc-go/v7 v7.0.1 h1:NIBNRWjlOoFvFQu1ZlgwkaSeHO5avf4C1YQiWegt8jw= github.com/cosmos/ibc-go/v7 v7.0.1/go.mod h1:vEaapV6nuLPQlS+g8IKmxMo6auPi0i7HMv1PhViht/E= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= @@ -431,10 +435,10 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -449,6 +453,7 @@ github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/E github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -654,7 +659,7 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -694,8 +699,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= @@ -709,11 +714,16 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -797,12 +807,12 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= +github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d h1:htwtWgtQo8YS6JFWWi2DNgY0RwSGJ1ruMoxY6CUUclk= -github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -859,6 +869,9 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= +github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -936,8 +949,8 @@ github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqri github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -993,8 +1006,8 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1006,8 +1019,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1211,6 +1224,7 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1233,6 +1247,7 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/chain/tests/e2e/e2e_utils.go b/chain/tests/e2e/e2e_utils.go index a2752946c..bf92bc436 100644 --- a/chain/tests/e2e/e2e_utils.go +++ b/chain/tests/e2e/e2e_utils.go @@ -36,7 +36,7 @@ func (s *TestSuite) GetCreditBalance(address, denom string) plasticcredit.Credit val := s.Network.Validators[0] cmdQueryBalance := cli.CmdQueryCreditBalance() - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmdQueryBalance, []string{address, denom}) + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmdQueryBalance, []string{address, denom, fmt.Sprintf("--%s=json", flags.FlagOutput)}) if err != nil && strings.Contains(err.Error(), "credit balance not found") { return plasticcredit.CreditAmount{} } diff --git a/chain/tests/e2e/plasticcredit/issuer_query_test.go b/chain/tests/e2e/plasticcredit/issuer_query_test.go index b5b550737..6f584c64b 100644 --- a/chain/tests/e2e/plasticcredit/issuer_query_test.go +++ b/chain/tests/e2e/plasticcredit/issuer_query_test.go @@ -1,6 +1,9 @@ package e2e_test import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/gogoproto/proto" @@ -23,7 +26,7 @@ func (s *E2ETestSuite) TestCmdQueryParams() { s.Run(name, func() { cmd := cli.CmdQueryParams() clientCtx := val.ClientCtx - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, append(tc.args, fmt.Sprintf("--%s=json", flags.FlagOutput))) s.Require().NoError(err) var result plasticcredit.QueryParamsResponse s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) @@ -68,7 +71,7 @@ func (s *E2ETestSuite) TestCmdQueryIssuer() { for name, tc := range testCases { s.Run(name, func() { cmd := cli.CmdQueryIssuer() - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, tc.args) + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, fmt.Sprintf("--%s=json", flags.FlagOutput))) if tc.expectedErr { s.Require().Contains(out.String(), tc.expectedErrMsg) @@ -115,7 +118,7 @@ func (s *E2ETestSuite) TestCmdQueryProject() { for name, tc := range testCases { s.Run(name, func() { cmd := cli.CmdQueryProject() - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, tc.args) + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, fmt.Sprintf("--%s=json", flags.FlagOutput))) if tc.expectedErr { s.Require().Contains(out.String(), tc.expectedErrMsg) @@ -161,7 +164,7 @@ func (s *E2ETestSuite) TestCmdQueryApplicant() { for name, tc := range testCases { s.Run(name, func() { cmd := cli.CmdQueryApplicant() - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, tc.args) + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, fmt.Sprintf("--%s=json", flags.FlagOutput))) if tc.expectedErr { s.Require().Contains(out.String(), tc.expectedErrMsg) diff --git a/chain/tests/e2e/plasticcredit/issuer_tx_test.go b/chain/tests/e2e/plasticcredit/issuer_tx_test.go index 51afea90b..3945769da 100644 --- a/chain/tests/e2e/plasticcredit/issuer_tx_test.go +++ b/chain/tests/e2e/plasticcredit/issuer_tx_test.go @@ -94,7 +94,7 @@ func (s *E2ETestSuite) TestCmdCreateIssuer() { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &propResponse)) s.Require().Equal(govtypesv1.ProposalStatus_PROPOSAL_STATUS_PASSED, propResponse.Status) queryCmd = cli.CmdQueryIssuers() - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, queryCmd, []string{}) + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, queryCmd, []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}) s.Require().NoError(err) var resp plasticcredit.QueryIssuersResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp)) @@ -181,7 +181,7 @@ func (s *E2ETestSuite) TestCmdUpdateIssuerCreator() { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &propResponse)) s.Require().Equal(govtypesv1.ProposalStatus_PROPOSAL_STATUS_PASSED, propResponse.Status) cmd = cli.CmdQueryParams() - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, []string{}) + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, []string{fmt.Sprintf("--%s=%s", "output", "json")}) s.Require().NoError(err) var resp plasticcredit.QueryParamsResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &resp)) diff --git a/chain/utils/validation.go b/chain/utils/validation.go index f124271de..4e96c17c0 100644 --- a/chain/utils/validation.go +++ b/chain/utils/validation.go @@ -2,7 +2,10 @@ package utils import ( "regexp" + "strings" "unicode/utf8" + + "cosmossdk.io/errors" ) var ( @@ -16,15 +19,35 @@ var ( descriptionValidation = regexp.MustCompile(`^.{1,256}$`) ) -// IsBasicValidName checks the basicNameValidation -func IsBasicValidName(name string) bool { - return basicNameValidation.MatchString(name) && utf8.ValidString(name) +// ValidBasicName checks the basicNameValidation +func ValidBasicName(name string) error { + var messages []string + if !utf8.ValidString(name) { + messages = append(messages, "name is not valid utf-8") + } + if !basicNameValidation.MatchString(name) { + messages = append(messages, "name cannot start or end with a space and must be between 2 and 64 characters") + } + if len(messages) > 0 { + return errors.Wrapf(ErrInvalidValue, "invalid name: %s", strings.Join(messages, "\n")) + } + return nil } -// IsValidDescription checks descriptionValidation. -func IsValidDescription(description string) bool { +// ValidDescription checks descriptionValidation. +func ValidDescription(description string) error { if description == "" { - return true // empty desc is valid + return nil + } + var messages []string + if !utf8.ValidString(description) { + messages = append(messages, "description is not valid utf-8") + } + if !descriptionValidation.MatchString(description) { + messages = append(messages, "description must be between 1 and 256 characters") + } + if len(messages) > 0 { + return errors.Wrapf(ErrInvalidValue, "invalid description: %s", strings.Join(messages, "\n")) } - return descriptionValidation.MatchString(description) && utf8.ValidString(description) + return nil } diff --git a/chain/utils/validation_test.go b/chain/utils/validation_test.go index c61e248b1..dcc447556 100644 --- a/chain/utils/validation_test.go +++ b/chain/utils/validation_test.go @@ -10,90 +10,111 @@ import ( func TestIsBasicValidName(t *testing.T) { testCases := map[string]struct { - name string - expectedResult bool + name string + expectedError bool + errorMessage string }{ "Happy path 1": { - name: "Perfectly valid name", - expectedResult: true, + name: "Perfectly valid name", + expectedError: false, }, "Happy path 2:": { - name: "also OK_78%$", - expectedResult: true, + name: "also OK_78%$", + expectedError: false, }, "Happy path 3": { - name: "fx", - expectedResult: true, + name: "fx", + expectedError: false, }, "Happy path full length:": { - name: "This name is 64 characters long, which is the limit we have set!", - expectedResult: true, + name: "This name is 64 characters long, which is the limit we have set!", + expectedError: false, }, "Too short name should fail": { - name: "f", - expectedResult: false, + name: "f", + expectedError: true, + errorMessage: "invalid name: name cannot start or end with a space and must be between 2 and 64 characters: invalid value", }, "Too long name should fail": { - name: "This name is 65 characters long, which is above the limit we set!", - expectedResult: false, + name: "This name is 65 characters long, which is above the limit we set!", + expectedError: true, + errorMessage: "invalid name: name cannot start or end with a space and must be between 2 and 64 characters: invalid value", }, "Starting with space should fail": { - name: " Starting with space should fail", - expectedResult: false, + name: " Starting with space should fail", + expectedError: true, + errorMessage: "invalid name: name cannot start or end with a space and must be between 2 and 64 characters: invalid value", }, "Ending with space should fail": { - name: "Ending with space should fail ", - expectedResult: false, + name: "Ending with space should fail ", + expectedError: true, + errorMessage: "invalid name: name cannot start or end with a space and must be between 2 and 64 characters: invalid value", }, "Non-utf8 characters should fail": { - name: "This name has a non-utf8 character: \x80 and it should fail", - expectedResult: false, + name: "This name has a non-utf8 character: \x80 and it should fail", + expectedError: true, + errorMessage: "invalid name: name is not valid utf-8: invalid value", }, } for name, tc := range testCases { t.Run(name, func(t *testing.T) { - result := IsBasicValidName(tc.name) - require.Equal(t, tc.expectedResult, result) + if tc.expectedError { + err := ValidBasicName(tc.name) + require.Error(t, err) + require.Equal(t, tc.errorMessage, err.Error()) + return + } + err := ValidBasicName(tc.name) + require.NoError(t, err) }) } } func TestIsValidDescription(t *testing.T) { testCases := map[string]struct { - description string - expectedResult bool + description string + expectedError bool + errorMessage string }{ "Happy path 1": { - description: "Perfectly valid description", - expectedResult: true, + description: "Perfectly valid description", + expectedError: false, }, "Happy path 2:": { - description: "also OK_78%$", - expectedResult: true, + description: "also OK_78%$", + expectedError: false, }, "Happy path empty string:": { - description: "", - expectedResult: true, + description: "", + expectedError: false, }, "Happy path full length:": { - description: sample.String(256), - expectedResult: true, + description: sample.String(256), + expectedError: false, }, "Too long name should fail": { - description: sample.String(257), - expectedResult: false, + description: sample.String(257), + expectedError: true, + errorMessage: "invalid description: description must be between 1 and 256 characters: invalid value", }, "Non-utf8 characters should fail": { - description: "This name has a non-utf8 character: \x80 and it should fail", - expectedResult: false, + description: "This name has a non-utf8 character: \x80 and it should fail", + expectedError: true, + errorMessage: "invalid description: description is not valid utf-8: invalid value", }, } for name, tc := range testCases { t.Run(name, func(t *testing.T) { - result := IsValidDescription(tc.description) - require.Equal(t, tc.expectedResult, result) + if tc.expectedError { + err := ValidDescription(tc.description) + require.Error(t, err) + require.Equal(t, tc.errorMessage, err.Error()) + return + } + err := ValidDescription(tc.description) + require.NoError(t, err) }) } } diff --git a/chain/x/certificates/client/cli/query.go b/chain/x/certificates/client/cli/query.go index a23b12a48..7c3c6a9a7 100644 --- a/chain/x/certificates/client/cli/query.go +++ b/chain/x/certificates/client/cli/query.go @@ -37,7 +37,10 @@ func CmdQueryParams() *cobra.Command { Short: "shows the parameters of the module", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := certificates.NewQueryClient(clientCtx) @@ -61,7 +64,10 @@ func CmdQueryCertificate() *cobra.Command { Short: "query for an certificate by its [owner-address] and [certificate-id]", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := certificates.NewQueryClient(clientCtx) certificateID, err := cast.ToUint64E(args[1]) @@ -92,7 +98,10 @@ func CmdQueryCertificates() *cobra.Command { Use: "certificates", Short: "query for all certificates", RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := certificates.NewQueryClient(clientCtx) res, err := queryClient.Certificates( context.Background(), @@ -114,7 +123,10 @@ func CmdQueryCertificatesByOwner() *cobra.Command { Short: "query for all certificates of an owner by its [owner-address]", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := certificates.NewQueryClient(clientCtx) res, err := queryClient.AllCertificatesByUser( diff --git a/chain/x/plasticcredit/client/cli/query.go b/chain/x/plasticcredit/client/cli/query.go index bd237c2af..90c44142f 100644 --- a/chain/x/plasticcredit/client/cli/query.go +++ b/chain/x/plasticcredit/client/cli/query.go @@ -42,8 +42,10 @@ func CmdQueryParams() *cobra.Command { Short: "shows the parameters of the module", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) res, err := queryClient.Params(context.Background(), &plasticcredit.QueryParamsRequest{}) @@ -66,7 +68,10 @@ func CmdQueryIssuer() *cobra.Command { Short: "query for an issuer by its [issuer-id]", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) issuerID, err := cast.ToUint64E(args[0]) @@ -96,7 +101,10 @@ func CmdQueryIssuers() *cobra.Command { Short: "query all issuers", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { @@ -125,7 +133,10 @@ func CmdQueryApplicant() *cobra.Command { Short: "query for an applicant by its [applicant-id]", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) applicantID, err := cast.ToUint64E(args[0]) @@ -155,7 +166,10 @@ func CmdQueryCreditType() *cobra.Command { Short: "query for a credit type by its [abbreviation]", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) abbreviation := args[0] @@ -182,7 +196,10 @@ func CmdQueryCreditTypes() *cobra.Command { Short: "query all credit types", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { @@ -211,7 +228,10 @@ func CmdQueryCreditCollection() *cobra.Command { Short: "Query credit collection by it's denom", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) denom := args[0] @@ -238,7 +258,10 @@ func CmdQueryCreditBalance() *cobra.Command { Short: "Query credit balance by address and denom", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) owner := args[0] @@ -267,7 +290,10 @@ func CmdQueryProject() *cobra.Command { Short: "Query project by project-id", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := plasticcredit.NewQueryClient(clientCtx) projectID, err := cast.ToUint64E(args[0]) diff --git a/chain/x/plasticcredit/types.go b/chain/x/plasticcredit/types.go index 8b07e2964..f6f2661cf 100644 --- a/chain/x/plasticcredit/types.go +++ b/chain/x/plasticcredit/types.go @@ -75,12 +75,14 @@ func (is Issuer) Validate() error { return errors.Wrap(utils.ErrInvalidValue, "issuer id is zero") } - if !utils.IsBasicValidName(is.Name) { - return errors.Wrapf(utils.ErrInvalidValue, "issuer name is invalid (%s)", is.Name) + err := utils.ValidBasicName(is.Name) + if err != nil { + return err } - if !utils.IsValidDescription(is.Description) { - return errors.Wrap(utils.ErrInvalidValue, "description is invalid") + err = utils.ValidDescription(is.Description) + if err != nil { + return err } if is.Admin == "" { @@ -103,12 +105,14 @@ func (a Applicant) Validate() error { return errors.Wrap(utils.ErrInvalidValue, "applicant id is zero") } - if !utils.IsBasicValidName(a.Name) { - return errors.Wrapf(utils.ErrInvalidValue, "applicant name is invalid (%s)", a.Name) + err := utils.ValidBasicName(a.Name) + if err != nil { + return err } - if !utils.IsValidDescription(a.Description) { - return errors.Wrap(utils.ErrInvalidValue, "description is invalid") + err = utils.ValidDescription(a.Description) + if err != nil { + return err } if a.Admin == "" { @@ -137,8 +141,9 @@ func (cc CreditType) Validate() error { return errors.Wrap(utils.ErrInvalidValue, "credit type issuer_id is zero") } - if !utils.IsBasicValidName(cc.Name) { - return errors.Wrapf(utils.ErrInvalidValue, "credit type name is invalid (%s)", cc.Name) + err := utils.ValidBasicName(cc.Name) + if err != nil { + return err } return nil @@ -157,8 +162,9 @@ func (proj Project) Validate() error { return errors.Wrap(utils.ErrInvalidValue, "project credit_type_abbreviation is empty") } - if !utils.IsBasicValidName(proj.Name) { - return errors.Wrapf(utils.ErrInvalidValue, "project name is invalid (%s)", proj.Name) + err := utils.ValidBasicName(proj.Name) + if err != nil { + return err } if _, ok := ProjectStatus_name[int32(proj.Status)]; !ok { diff --git a/chain/x/proofofexistence/client/cli/query.go b/chain/x/proofofexistence/client/cli/query.go index d8c84ffb5..3896f3f6e 100644 --- a/chain/x/proofofexistence/client/cli/query.go +++ b/chain/x/proofofexistence/client/cli/query.go @@ -34,7 +34,10 @@ func QueryProofCmd() *cobra.Command { Short: "get proof metadata", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := proofofexistence.NewQueryClient(clientCtx) diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 36ce1f381..4004a68b4 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -46,10 +46,6 @@ export default withMermaid( text: 'Applications', link: '/introduction/applications' }, - { - text: 'Tokenomics', - link: '/introduction/tokenomics' - }, { text: 'Roadmap', link: '/introduction/roadmap' @@ -75,6 +71,10 @@ export default withMermaid( { text: 'Build challenges', link: '/testnet/build-challenges' + }, + { + text: 'Resources', + link: '/testnet/resources' } ], }, @@ -85,9 +85,27 @@ export default withMermaid( { text: 'Overview', link: '/governance/overview' + }, + { + text: 'Constitution', + link: '/governance/constitution' + }, + { + text: 'Structure', + link: '/governance/structure' } ] }, + { + text: 'Tokenomics', + collapsed: true, + items: [ + { + text: 'Overview', + link: '/tokenomics/overview' + } + ], + }, { text: 'Core modules', collapsed: true, @@ -98,7 +116,7 @@ export default withMermaid( items: [ { text: 'High level overview', - link: '/proof-of-existence/high-level-overview' + link: '/core-modules/proof-of-existence/high-level-overview' } ] }, @@ -108,7 +126,7 @@ export default withMermaid( items: [ { text: 'High level overview', - link: '/plastic-credits/high-level-overview' + link: '/core-modules/plastic-credits/high-level-overview' } ], }, @@ -118,7 +136,7 @@ export default withMermaid( items: [ { text: 'High level overview', - link: '/deposit-schemes/high-level-overview' + link: '/core-modules/deposit-schemes/high-level-overview' } ] }, @@ -188,7 +206,7 @@ export default withMermaid( ].concat(cliDocs.concat([ { text: 'API docs', - link: '/api-docs/swagger' + link: '/references/api-docs/swagger' }, ])) }, diff --git a/docs/.vitepress/sidebar-cli-docs.js b/docs/.vitepress/sidebar-cli-docs.js index caeb7d944..7cb39a63b 100644 --- a/docs/.vitepress/sidebar-cli-docs.js +++ b/docs/.vitepress/sidebar-cli-docs.js @@ -1,612 +1,612 @@ export default [ { "text": "CLI docs", - "link": "/cli-docs/empowerd.md", + "link": "/references/cli-docs/empowerd.md", "collapsed": true, "items": [ { "text": "config", - "link": "/cli-docs/empowerd_config.md" + "link": "/references/cli-docs/empowerd_config.md" }, { "text": "debug", - "link": "/cli-docs/empowerd_debug.md", + "link": "/references/cli-docs/empowerd_debug.md", "collapsed": true, "items": [ { "text": "addr", - "link": "/cli-docs/empowerd_debug_addr.md" + "link": "/references/cli-docs/empowerd_debug_addr.md" }, { "text": "prefixes", - "link": "/cli-docs/empowerd_debug_prefixes.md" + "link": "/references/cli-docs/empowerd_debug_prefixes.md" }, { "text": "pubkey-raw", - "link": "/cli-docs/empowerd_debug_pubkey-raw.md" + "link": "/references/cli-docs/empowerd_debug_pubkey-raw.md" }, { "text": "pubkey", - "link": "/cli-docs/empowerd_debug_pubkey.md" + "link": "/references/cli-docs/empowerd_debug_pubkey.md" }, { "text": "raw-bytes", - "link": "/cli-docs/empowerd_debug_raw-bytes.md" + "link": "/references/cli-docs/empowerd_debug_raw-bytes.md" } ] }, { "text": "export", - "link": "/cli-docs/empowerd_export.md" + "link": "/references/cli-docs/empowerd_export.md" }, { "text": "genesis", - "link": "/cli-docs/empowerd_genesis.md", + "link": "/references/cli-docs/empowerd_genesis.md", "collapsed": true, "items": [ { "text": "add-genesis-account", - "link": "/cli-docs/empowerd_genesis_add-genesis-account.md" + "link": "/references/cli-docs/empowerd_genesis_add-genesis-account.md" }, { "text": "collect-gentxs", - "link": "/cli-docs/empowerd_genesis_collect-gentxs.md" + "link": "/references/cli-docs/empowerd_genesis_collect-gentxs.md" }, { "text": "gentx", - "link": "/cli-docs/empowerd_genesis_gentx.md" + "link": "/references/cli-docs/empowerd_genesis_gentx.md" }, { "text": "mainnet", - "link": "/cli-docs/empowerd_genesis_mainnet.md" + "link": "/references/cli-docs/empowerd_genesis_mainnet.md" }, { "text": "migrate", - "link": "/cli-docs/empowerd_genesis_migrate.md" + "link": "/references/cli-docs/empowerd_genesis_migrate.md" }, { "text": "single-validator", - "link": "/cli-docs/empowerd_genesis_single-validator.md" + "link": "/references/cli-docs/empowerd_genesis_single-validator.md" }, { "text": "validate-genesis", - "link": "/cli-docs/empowerd_genesis_validate-genesis.md" + "link": "/references/cli-docs/empowerd_genesis_validate-genesis.md" } ] }, { "text": "init", - "link": "/cli-docs/empowerd_init.md" + "link": "/references/cli-docs/empowerd_init.md" }, { "text": "keys", - "link": "/cli-docs/empowerd_keys.md", + "link": "/references/cli-docs/empowerd_keys.md", "collapsed": true, "items": [ { "text": "add", - "link": "/cli-docs/empowerd_keys_add.md" + "link": "/references/cli-docs/empowerd_keys_add.md" }, { "text": "delete", - "link": "/cli-docs/empowerd_keys_delete.md" + "link": "/references/cli-docs/empowerd_keys_delete.md" }, { "text": "export", - "link": "/cli-docs/empowerd_keys_export.md" + "link": "/references/cli-docs/empowerd_keys_export.md" }, { "text": "import", - "link": "/cli-docs/empowerd_keys_import.md" + "link": "/references/cli-docs/empowerd_keys_import.md" }, { "text": "list-key-types", - "link": "/cli-docs/empowerd_keys_list-key-types.md" + "link": "/references/cli-docs/empowerd_keys_list-key-types.md" }, { "text": "list", - "link": "/cli-docs/empowerd_keys_list.md" + "link": "/references/cli-docs/empowerd_keys_list.md" }, { "text": "migrate", - "link": "/cli-docs/empowerd_keys_migrate.md" + "link": "/references/cli-docs/empowerd_keys_migrate.md" }, { "text": "mnemonic", - "link": "/cli-docs/empowerd_keys_mnemonic.md" + "link": "/references/cli-docs/empowerd_keys_mnemonic.md" }, { "text": "parse", - "link": "/cli-docs/empowerd_keys_parse.md" + "link": "/references/cli-docs/empowerd_keys_parse.md" }, { "text": "rename", - "link": "/cli-docs/empowerd_keys_rename.md" + "link": "/references/cli-docs/empowerd_keys_rename.md" }, { "text": "show", - "link": "/cli-docs/empowerd_keys_show.md" + "link": "/references/cli-docs/empowerd_keys_show.md" } ] }, { "text": "prune", - "link": "/cli-docs/empowerd_prune.md" + "link": "/references/cli-docs/empowerd_prune.md" }, { "text": "query", - "link": "/cli-docs/empowerd_query.md", + "link": "/references/cli-docs/empowerd_query.md", "collapsed": true, "items": [ { "text": "account", - "link": "/cli-docs/empowerd_query_account.md" + "link": "/references/cli-docs/empowerd_query_account.md" }, { "text": "auth", - "link": "/cli-docs/empowerd_query_auth.md", + "link": "/references/cli-docs/empowerd_query_auth.md", "collapsed": true, "items": [ { "text": "account", - "link": "/cli-docs/empowerd_query_auth_account.md" + "link": "/references/cli-docs/empowerd_query_auth_account.md" }, { "text": "accounts", - "link": "/cli-docs/empowerd_query_auth_accounts.md" + "link": "/references/cli-docs/empowerd_query_auth_accounts.md" }, { "text": "address-by-acc-num", - "link": "/cli-docs/empowerd_query_auth_address-by-acc-num.md" + "link": "/references/cli-docs/empowerd_query_auth_address-by-acc-num.md" }, { "text": "module-account", - "link": "/cli-docs/empowerd_query_auth_module-account.md" + "link": "/references/cli-docs/empowerd_query_auth_module-account.md" }, { "text": "module-accounts", - "link": "/cli-docs/empowerd_query_auth_module-accounts.md" + "link": "/references/cli-docs/empowerd_query_auth_module-accounts.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_auth_params.md" + "link": "/references/cli-docs/empowerd_query_auth_params.md" } ] }, { "text": "authz", - "link": "/cli-docs/empowerd_query_authz.md", + "link": "/references/cli-docs/empowerd_query_authz.md", "collapsed": true, "items": [ { "text": "grants-by-grantee", - "link": "/cli-docs/empowerd_query_authz_grants-by-grantee.md" + "link": "/references/cli-docs/empowerd_query_authz_grants-by-grantee.md" }, { "text": "grants-by-granter", - "link": "/cli-docs/empowerd_query_authz_grants-by-granter.md" + "link": "/references/cli-docs/empowerd_query_authz_grants-by-granter.md" }, { "text": "grants", - "link": "/cli-docs/empowerd_query_authz_grants.md" + "link": "/references/cli-docs/empowerd_query_authz_grants.md" } ] }, { "text": "bank", - "link": "/cli-docs/empowerd_query_bank.md", + "link": "/references/cli-docs/empowerd_query_bank.md", "collapsed": true, "items": [ { "text": "balances", - "link": "/cli-docs/empowerd_query_bank_balances.md" + "link": "/references/cli-docs/empowerd_query_bank_balances.md" }, { "text": "denom-metadata", - "link": "/cli-docs/empowerd_query_bank_denom-metadata.md" + "link": "/references/cli-docs/empowerd_query_bank_denom-metadata.md" }, { "text": "send-enabled", - "link": "/cli-docs/empowerd_query_bank_send-enabled.md" + "link": "/references/cli-docs/empowerd_query_bank_send-enabled.md" }, { "text": "spendable-balances", - "link": "/cli-docs/empowerd_query_bank_spendable-balances.md" + "link": "/references/cli-docs/empowerd_query_bank_spendable-balances.md" }, { "text": "total", - "link": "/cli-docs/empowerd_query_bank_total.md" + "link": "/references/cli-docs/empowerd_query_bank_total.md" } ] }, { "text": "block", - "link": "/cli-docs/empowerd_query_block.md" + "link": "/references/cli-docs/empowerd_query_block.md" }, { "text": "certificates", - "link": "/cli-docs/empowerd_query_certificates.md", + "link": "/references/cli-docs/empowerd_query_certificates.md", "collapsed": true, "items": [ { "text": "certificate", - "link": "/cli-docs/empowerd_query_certificates_certificate.md" + "link": "/references/cli-docs/empowerd_query_certificates_certificate.md" }, { "text": "certificates-by-owner", - "link": "/cli-docs/empowerd_query_certificates_certificates-by-owner.md" + "link": "/references/cli-docs/empowerd_query_certificates_certificates-by-owner.md" }, { "text": "certificates", - "link": "/cli-docs/empowerd_query_certificates_certificates.md" + "link": "/references/cli-docs/empowerd_query_certificates_certificates.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_certificates_params.md" + "link": "/references/cli-docs/empowerd_query_certificates_params.md" } ] }, { "text": "distribution", - "link": "/cli-docs/empowerd_query_distribution.md", + "link": "/references/cli-docs/empowerd_query_distribution.md", "collapsed": true, "items": [ { "text": "commission", - "link": "/cli-docs/empowerd_query_distribution_commission.md" + "link": "/references/cli-docs/empowerd_query_distribution_commission.md" }, { "text": "community-pool", - "link": "/cli-docs/empowerd_query_distribution_community-pool.md" + "link": "/references/cli-docs/empowerd_query_distribution_community-pool.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_distribution_params.md" + "link": "/references/cli-docs/empowerd_query_distribution_params.md" }, { "text": "rewards", - "link": "/cli-docs/empowerd_query_distribution_rewards.md" + "link": "/references/cli-docs/empowerd_query_distribution_rewards.md" }, { "text": "slashes", - "link": "/cli-docs/empowerd_query_distribution_slashes.md" + "link": "/references/cli-docs/empowerd_query_distribution_slashes.md" }, { "text": "validator-distribution-info", - "link": "/cli-docs/empowerd_query_distribution_validator-distribution-info.md" + "link": "/references/cli-docs/empowerd_query_distribution_validator-distribution-info.md" }, { "text": "validator-outstanding-rewards", - "link": "/cli-docs/empowerd_query_distribution_validator-outstanding-rewards.md" + "link": "/references/cli-docs/empowerd_query_distribution_validator-outstanding-rewards.md" } ] }, { "text": "evidence", - "link": "/cli-docs/empowerd_query_evidence.md" + "link": "/references/cli-docs/empowerd_query_evidence.md" }, { "text": "feegrant", - "link": "/cli-docs/empowerd_query_feegrant.md", + "link": "/references/cli-docs/empowerd_query_feegrant.md", "collapsed": true, "items": [ { "text": "grant", - "link": "/cli-docs/empowerd_query_feegrant_grant.md" + "link": "/references/cli-docs/empowerd_query_feegrant_grant.md" }, { "text": "grants-by-grantee", - "link": "/cli-docs/empowerd_query_feegrant_grants-by-grantee.md" + "link": "/references/cli-docs/empowerd_query_feegrant_grants-by-grantee.md" }, { "text": "grants-by-granter", - "link": "/cli-docs/empowerd_query_feegrant_grants-by-granter.md" + "link": "/references/cli-docs/empowerd_query_feegrant_grants-by-granter.md" } ] }, { "text": "gov", - "link": "/cli-docs/empowerd_query_gov.md", + "link": "/references/cli-docs/empowerd_query_gov.md", "collapsed": true, "items": [ { "text": "deposit", - "link": "/cli-docs/empowerd_query_gov_deposit.md" + "link": "/references/cli-docs/empowerd_query_gov_deposit.md" }, { "text": "deposits", - "link": "/cli-docs/empowerd_query_gov_deposits.md" + "link": "/references/cli-docs/empowerd_query_gov_deposits.md" }, { "text": "param", - "link": "/cli-docs/empowerd_query_gov_param.md" + "link": "/references/cli-docs/empowerd_query_gov_param.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_gov_params.md" + "link": "/references/cli-docs/empowerd_query_gov_params.md" }, { "text": "proposal", - "link": "/cli-docs/empowerd_query_gov_proposal.md" + "link": "/references/cli-docs/empowerd_query_gov_proposal.md" }, { "text": "proposals", - "link": "/cli-docs/empowerd_query_gov_proposals.md" + "link": "/references/cli-docs/empowerd_query_gov_proposals.md" }, { "text": "proposer", - "link": "/cli-docs/empowerd_query_gov_proposer.md" + "link": "/references/cli-docs/empowerd_query_gov_proposer.md" }, { "text": "tally", - "link": "/cli-docs/empowerd_query_gov_tally.md" + "link": "/references/cli-docs/empowerd_query_gov_tally.md" }, { "text": "vote", - "link": "/cli-docs/empowerd_query_gov_vote.md" + "link": "/references/cli-docs/empowerd_query_gov_vote.md" }, { "text": "votes", - "link": "/cli-docs/empowerd_query_gov_votes.md" + "link": "/references/cli-docs/empowerd_query_gov_votes.md" } ] }, { "text": "group", - "link": "/cli-docs/empowerd_query_group.md", + "link": "/references/cli-docs/empowerd_query_group.md", "collapsed": true, "items": [ { "text": "group-info", - "link": "/cli-docs/empowerd_query_group_group-info.md" + "link": "/references/cli-docs/empowerd_query_group_group-info.md" }, { "text": "group-members", - "link": "/cli-docs/empowerd_query_group_group-members.md" + "link": "/references/cli-docs/empowerd_query_group_group-members.md" }, { "text": "group-policies-by-admin", - "link": "/cli-docs/empowerd_query_group_group-policies-by-admin.md" + "link": "/references/cli-docs/empowerd_query_group_group-policies-by-admin.md" }, { "text": "group-policies-by-group", - "link": "/cli-docs/empowerd_query_group_group-policies-by-group.md" + "link": "/references/cli-docs/empowerd_query_group_group-policies-by-group.md" }, { "text": "group-policy-info", - "link": "/cli-docs/empowerd_query_group_group-policy-info.md" + "link": "/references/cli-docs/empowerd_query_group_group-policy-info.md" }, { "text": "groups-by-admin", - "link": "/cli-docs/empowerd_query_group_groups-by-admin.md" + "link": "/references/cli-docs/empowerd_query_group_groups-by-admin.md" }, { "text": "groups-by-member", - "link": "/cli-docs/empowerd_query_group_groups-by-member.md" + "link": "/references/cli-docs/empowerd_query_group_groups-by-member.md" }, { "text": "groups", - "link": "/cli-docs/empowerd_query_group_groups.md" + "link": "/references/cli-docs/empowerd_query_group_groups.md" }, { "text": "proposal", - "link": "/cli-docs/empowerd_query_group_proposal.md" + "link": "/references/cli-docs/empowerd_query_group_proposal.md" }, { "text": "proposals-by-group-policy", - "link": "/cli-docs/empowerd_query_group_proposals-by-group-policy.md" + "link": "/references/cli-docs/empowerd_query_group_proposals-by-group-policy.md" }, { "text": "tally-result", - "link": "/cli-docs/empowerd_query_group_tally-result.md" + "link": "/references/cli-docs/empowerd_query_group_tally-result.md" }, { "text": "vote", - "link": "/cli-docs/empowerd_query_group_vote.md" + "link": "/references/cli-docs/empowerd_query_group_vote.md" }, { "text": "votes-by-proposal", - "link": "/cli-docs/empowerd_query_group_votes-by-proposal.md" + "link": "/references/cli-docs/empowerd_query_group_votes-by-proposal.md" }, { "text": "votes-by-voter", - "link": "/cli-docs/empowerd_query_group_votes-by-voter.md" + "link": "/references/cli-docs/empowerd_query_group_votes-by-voter.md" } ] }, { "text": "ibc-fee", - "link": "/cli-docs/empowerd_query_ibc-fee.md", + "link": "/references/cli-docs/empowerd_query_ibc-fee.md", "collapsed": true, "items": [ { "text": "channel", - "link": "/cli-docs/empowerd_query_ibc-fee_channel.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_channel.md" }, { "text": "channels", - "link": "/cli-docs/empowerd_query_ibc-fee_channels.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_channels.md" }, { "text": "counterparty-payee", - "link": "/cli-docs/empowerd_query_ibc-fee_counterparty-payee.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_counterparty-payee.md" }, { "text": "packet", - "link": "/cli-docs/empowerd_query_ibc-fee_packet.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_packet.md" }, { "text": "packets-for-channel", - "link": "/cli-docs/empowerd_query_ibc-fee_packets-for-channel.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_packets-for-channel.md" }, { "text": "packets", - "link": "/cli-docs/empowerd_query_ibc-fee_packets.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_packets.md" }, { "text": "payee", - "link": "/cli-docs/empowerd_query_ibc-fee_payee.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_payee.md" }, { "text": "total-ack-fees", - "link": "/cli-docs/empowerd_query_ibc-fee_total-ack-fees.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_total-ack-fees.md" }, { "text": "total-recv-fees", - "link": "/cli-docs/empowerd_query_ibc-fee_total-recv-fees.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_total-recv-fees.md" }, { "text": "total-timeout-fees", - "link": "/cli-docs/empowerd_query_ibc-fee_total-timeout-fees.md" + "link": "/references/cli-docs/empowerd_query_ibc-fee_total-timeout-fees.md" } ] }, { "text": "ibc-transfer", - "link": "/cli-docs/empowerd_query_ibc-transfer.md", + "link": "/references/cli-docs/empowerd_query_ibc-transfer.md", "collapsed": true, "items": [ { "text": "denom-hash", - "link": "/cli-docs/empowerd_query_ibc-transfer_denom-hash.md" + "link": "/references/cli-docs/empowerd_query_ibc-transfer_denom-hash.md" }, { "text": "denom-trace", - "link": "/cli-docs/empowerd_query_ibc-transfer_denom-trace.md" + "link": "/references/cli-docs/empowerd_query_ibc-transfer_denom-trace.md" }, { "text": "denom-traces", - "link": "/cli-docs/empowerd_query_ibc-transfer_denom-traces.md" + "link": "/references/cli-docs/empowerd_query_ibc-transfer_denom-traces.md" }, { "text": "escrow-address", - "link": "/cli-docs/empowerd_query_ibc-transfer_escrow-address.md" + "link": "/references/cli-docs/empowerd_query_ibc-transfer_escrow-address.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_ibc-transfer_params.md" + "link": "/references/cli-docs/empowerd_query_ibc-transfer_params.md" } ] }, { "text": "ibc", - "link": "/cli-docs/empowerd_query_ibc.md", + "link": "/references/cli-docs/empowerd_query_ibc.md", "collapsed": true, "items": [ { "text": "channel", - "link": "/cli-docs/empowerd_query_ibc_channel.md", + "link": "/references/cli-docs/empowerd_query_ibc_channel.md", "collapsed": true, "items": [ { "text": "channels", - "link": "/cli-docs/empowerd_query_ibc_channel_channels.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_channels.md" }, { "text": "client-state", - "link": "/cli-docs/empowerd_query_ibc_channel_client-state.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_client-state.md" }, { "text": "connections", - "link": "/cli-docs/empowerd_query_ibc_channel_connections.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_connections.md" }, { "text": "end", - "link": "/cli-docs/empowerd_query_ibc_channel_end.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_end.md" }, { "text": "next-sequence-receive", - "link": "/cli-docs/empowerd_query_ibc_channel_next-sequence-receive.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_next-sequence-receive.md" }, { "text": "packet-ack", - "link": "/cli-docs/empowerd_query_ibc_channel_packet-ack.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_packet-ack.md" }, { "text": "packet-commitment", - "link": "/cli-docs/empowerd_query_ibc_channel_packet-commitment.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_packet-commitment.md" }, { "text": "packet-commitments", - "link": "/cli-docs/empowerd_query_ibc_channel_packet-commitments.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_packet-commitments.md" }, { "text": "packet-receipt", - "link": "/cli-docs/empowerd_query_ibc_channel_packet-receipt.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_packet-receipt.md" }, { "text": "unreceived-acks", - "link": "/cli-docs/empowerd_query_ibc_channel_unreceived-acks.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_unreceived-acks.md" }, { "text": "unreceived-packets", - "link": "/cli-docs/empowerd_query_ibc_channel_unreceived-packets.md" + "link": "/references/cli-docs/empowerd_query_ibc_channel_unreceived-packets.md" } ] }, { "text": "client", - "link": "/cli-docs/empowerd_query_ibc_client.md", + "link": "/references/cli-docs/empowerd_query_ibc_client.md", "collapsed": true, "items": [ { "text": "consensus-state-heights", - "link": "/cli-docs/empowerd_query_ibc_client_consensus-state-heights.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_consensus-state-heights.md" }, { "text": "consensus-state", - "link": "/cli-docs/empowerd_query_ibc_client_consensus-state.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_consensus-state.md" }, { "text": "consensus-states", - "link": "/cli-docs/empowerd_query_ibc_client_consensus-states.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_consensus-states.md" }, { "text": "header", - "link": "/cli-docs/empowerd_query_ibc_client_header.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_header.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_ibc_client_params.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_params.md" }, { "text": "self-consensus-state", - "link": "/cli-docs/empowerd_query_ibc_client_self-consensus-state.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_self-consensus-state.md" }, { "text": "state", - "link": "/cli-docs/empowerd_query_ibc_client_state.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_state.md" }, { "text": "states", - "link": "/cli-docs/empowerd_query_ibc_client_states.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_states.md" }, { "text": "status", - "link": "/cli-docs/empowerd_query_ibc_client_status.md" + "link": "/references/cli-docs/empowerd_query_ibc_client_status.md" } ] }, { "text": "connection", - "link": "/cli-docs/empowerd_query_ibc_connection.md", + "link": "/references/cli-docs/empowerd_query_ibc_connection.md", "collapsed": true, "items": [ { "text": "connections", - "link": "/cli-docs/empowerd_query_ibc_connection_connections.md" + "link": "/references/cli-docs/empowerd_query_ibc_connection_connections.md" }, { "text": "end", - "link": "/cli-docs/empowerd_query_ibc_connection_end.md" + "link": "/references/cli-docs/empowerd_query_ibc_connection_end.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_ibc_connection_params.md" + "link": "/references/cli-docs/empowerd_query_ibc_connection_params.md" }, { "text": "path", - "link": "/cli-docs/empowerd_query_ibc_connection_path.md" + "link": "/references/cli-docs/empowerd_query_ibc_connection_path.md" } ] } @@ -614,36 +614,36 @@ export default [ }, { "text": "interchain-accounts", - "link": "/cli-docs/empowerd_query_interchain-accounts.md", + "link": "/references/cli-docs/empowerd_query_interchain-accounts.md", "collapsed": true, "items": [ { "text": "controller", - "link": "/cli-docs/empowerd_query_interchain-accounts_controller.md", + "link": "/references/cli-docs/empowerd_query_interchain-accounts_controller.md", "collapsed": true, "items": [ { "text": "interchain-account", - "link": "/cli-docs/empowerd_query_interchain-accounts_controller_interchain-account.md" + "link": "/references/cli-docs/empowerd_query_interchain-accounts_controller_interchain-account.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_interchain-accounts_controller_params.md" + "link": "/references/cli-docs/empowerd_query_interchain-accounts_controller_params.md" } ] }, { "text": "host", - "link": "/cli-docs/empowerd_query_interchain-accounts_host.md", + "link": "/references/cli-docs/empowerd_query_interchain-accounts_host.md", "collapsed": true, "items": [ { "text": "packet-events", - "link": "/cli-docs/empowerd_query_interchain-accounts_host_packet-events.md" + "link": "/references/cli-docs/empowerd_query_interchain-accounts_host_packet-events.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_interchain-accounts_host_params.md" + "link": "/references/cli-docs/empowerd_query_interchain-accounts_host_params.md" } ] } @@ -651,190 +651,190 @@ export default [ }, { "text": "mint", - "link": "/cli-docs/empowerd_query_mint.md", + "link": "/references/cli-docs/empowerd_query_mint.md", "collapsed": true, "items": [ { "text": "annual-provisions", - "link": "/cli-docs/empowerd_query_mint_annual-provisions.md" + "link": "/references/cli-docs/empowerd_query_mint_annual-provisions.md" }, { "text": "inflation", - "link": "/cli-docs/empowerd_query_mint_inflation.md" + "link": "/references/cli-docs/empowerd_query_mint_inflation.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_mint_params.md" + "link": "/references/cli-docs/empowerd_query_mint_params.md" } ] }, { "text": "params", - "link": "/cli-docs/empowerd_query_params.md", + "link": "/references/cli-docs/empowerd_query_params.md", "collapsed": true, "items": [ { "text": "subspace", - "link": "/cli-docs/empowerd_query_params_subspace.md" + "link": "/references/cli-docs/empowerd_query_params_subspace.md" } ] }, { "text": "plasticcredit", - "link": "/cli-docs/empowerd_query_plasticcredit.md", + "link": "/references/cli-docs/empowerd_query_plasticcredit.md", "collapsed": true, "items": [ { "text": "applicant", - "link": "/cli-docs/empowerd_query_plasticcredit_applicant.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_applicant.md" }, { "text": "credit-balance", - "link": "/cli-docs/empowerd_query_plasticcredit_credit-balance.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_credit-balance.md" }, { "text": "credit-collection", - "link": "/cli-docs/empowerd_query_plasticcredit_credit-collection.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_credit-collection.md" }, { "text": "credit-type", - "link": "/cli-docs/empowerd_query_plasticcredit_credit-type.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_credit-type.md" }, { "text": "credit-types", - "link": "/cli-docs/empowerd_query_plasticcredit_credit-types.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_credit-types.md" }, { "text": "issuer", - "link": "/cli-docs/empowerd_query_plasticcredit_issuer.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_issuer.md" }, { "text": "issuers", - "link": "/cli-docs/empowerd_query_plasticcredit_issuers.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_issuers.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_plasticcredit_params.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_params.md" }, { "text": "project", - "link": "/cli-docs/empowerd_query_plasticcredit_project.md" + "link": "/references/cli-docs/empowerd_query_plasticcredit_project.md" } ] }, { "text": "proofofexistence", - "link": "/cli-docs/empowerd_query_proofofexistence.md", + "link": "/references/cli-docs/empowerd_query_proofofexistence.md", "collapsed": true, "items": [ { "text": "proof", - "link": "/cli-docs/empowerd_query_proofofexistence_proof.md" + "link": "/references/cli-docs/empowerd_query_proofofexistence_proof.md" } ] }, { "text": "slashing", - "link": "/cli-docs/empowerd_query_slashing.md", + "link": "/references/cli-docs/empowerd_query_slashing.md", "collapsed": true, "items": [ { "text": "params", - "link": "/cli-docs/empowerd_query_slashing_params.md" + "link": "/references/cli-docs/empowerd_query_slashing_params.md" }, { "text": "signing-info", - "link": "/cli-docs/empowerd_query_slashing_signing-info.md" + "link": "/references/cli-docs/empowerd_query_slashing_signing-info.md" }, { "text": "signing-infos", - "link": "/cli-docs/empowerd_query_slashing_signing-infos.md" + "link": "/references/cli-docs/empowerd_query_slashing_signing-infos.md" } ] }, { "text": "staking", - "link": "/cli-docs/empowerd_query_staking.md", + "link": "/references/cli-docs/empowerd_query_staking.md", "collapsed": true, "items": [ { "text": "delegation", - "link": "/cli-docs/empowerd_query_staking_delegation.md" + "link": "/references/cli-docs/empowerd_query_staking_delegation.md" }, { "text": "delegations-to", - "link": "/cli-docs/empowerd_query_staking_delegations-to.md" + "link": "/references/cli-docs/empowerd_query_staking_delegations-to.md" }, { "text": "delegations", - "link": "/cli-docs/empowerd_query_staking_delegations.md" + "link": "/references/cli-docs/empowerd_query_staking_delegations.md" }, { "text": "historical-info", - "link": "/cli-docs/empowerd_query_staking_historical-info.md" + "link": "/references/cli-docs/empowerd_query_staking_historical-info.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_staking_params.md" + "link": "/references/cli-docs/empowerd_query_staking_params.md" }, { "text": "pool", - "link": "/cli-docs/empowerd_query_staking_pool.md" + "link": "/references/cli-docs/empowerd_query_staking_pool.md" }, { "text": "redelegation", - "link": "/cli-docs/empowerd_query_staking_redelegation.md" + "link": "/references/cli-docs/empowerd_query_staking_redelegation.md" }, { "text": "redelegations-from", - "link": "/cli-docs/empowerd_query_staking_redelegations-from.md" + "link": "/references/cli-docs/empowerd_query_staking_redelegations-from.md" }, { "text": "redelegations", - "link": "/cli-docs/empowerd_query_staking_redelegations.md" + "link": "/references/cli-docs/empowerd_query_staking_redelegations.md" }, { "text": "unbonding-delegation", - "link": "/cli-docs/empowerd_query_staking_unbonding-delegation.md" + "link": "/references/cli-docs/empowerd_query_staking_unbonding-delegation.md" }, { "text": "unbonding-delegations-from", - "link": "/cli-docs/empowerd_query_staking_unbonding-delegations-from.md" + "link": "/references/cli-docs/empowerd_query_staking_unbonding-delegations-from.md" }, { "text": "unbonding-delegations", - "link": "/cli-docs/empowerd_query_staking_unbonding-delegations.md" + "link": "/references/cli-docs/empowerd_query_staking_unbonding-delegations.md" }, { "text": "validator", - "link": "/cli-docs/empowerd_query_staking_validator.md" + "link": "/references/cli-docs/empowerd_query_staking_validator.md" }, { "text": "validators", - "link": "/cli-docs/empowerd_query_staking_validators.md" + "link": "/references/cli-docs/empowerd_query_staking_validators.md" } ] }, { "text": "tendermint-validator-set", - "link": "/cli-docs/empowerd_query_tendermint-validator-set.md" + "link": "/references/cli-docs/empowerd_query_tendermint-validator-set.md" }, { "text": "tx", - "link": "/cli-docs/empowerd_query_tx.md" + "link": "/references/cli-docs/empowerd_query_tx.md" }, { "text": "txs", - "link": "/cli-docs/empowerd_query_txs.md" + "link": "/references/cli-docs/empowerd_query_txs.md" }, { "text": "upgrade", - "link": "/cli-docs/empowerd_query_upgrade.md", + "link": "/references/cli-docs/empowerd_query_upgrade.md", "collapsed": true, "items": [ { "text": "applied", - "link": "/cli-docs/empowerd_query_upgrade_applied.md" + "link": "/references/cli-docs/empowerd_query_upgrade_applied.md" }, { "text": "module", @@ -842,83 +842,83 @@ export default [ "items": [ { "text": "versions", - "link": "/cli-docs/empowerd_query_upgrade_module_versions.md" + "link": "/references/cli-docs/empowerd_query_upgrade_module_versions.md" } ] }, { "text": "plan", - "link": "/cli-docs/empowerd_query_upgrade_plan.md" + "link": "/references/cli-docs/empowerd_query_upgrade_plan.md" } ] }, { "text": "wasm", - "link": "/cli-docs/empowerd_query_wasm.md", + "link": "/references/cli-docs/empowerd_query_wasm.md", "collapsed": true, "items": [ { "text": "build-address", - "link": "/cli-docs/empowerd_query_wasm_build-address.md" + "link": "/references/cli-docs/empowerd_query_wasm_build-address.md" }, { "text": "code-info", - "link": "/cli-docs/empowerd_query_wasm_code-info.md" + "link": "/references/cli-docs/empowerd_query_wasm_code-info.md" }, { "text": "code", - "link": "/cli-docs/empowerd_query_wasm_code.md" + "link": "/references/cli-docs/empowerd_query_wasm_code.md" }, { "text": "contract-history", - "link": "/cli-docs/empowerd_query_wasm_contract-history.md" + "link": "/references/cli-docs/empowerd_query_wasm_contract-history.md" }, { "text": "contract-state", - "link": "/cli-docs/empowerd_query_wasm_contract-state.md", + "link": "/references/cli-docs/empowerd_query_wasm_contract-state.md", "collapsed": true, "items": [ { "text": "all", - "link": "/cli-docs/empowerd_query_wasm_contract-state_all.md" + "link": "/references/cli-docs/empowerd_query_wasm_contract-state_all.md" }, { "text": "raw", - "link": "/cli-docs/empowerd_query_wasm_contract-state_raw.md" + "link": "/references/cli-docs/empowerd_query_wasm_contract-state_raw.md" }, { "text": "smart", - "link": "/cli-docs/empowerd_query_wasm_contract-state_smart.md" + "link": "/references/cli-docs/empowerd_query_wasm_contract-state_smart.md" } ] }, { "text": "contract", - "link": "/cli-docs/empowerd_query_wasm_contract.md" + "link": "/references/cli-docs/empowerd_query_wasm_contract.md" }, { "text": "libwasmvm-version", - "link": "/cli-docs/empowerd_query_wasm_libwasmvm-version.md" + "link": "/references/cli-docs/empowerd_query_wasm_libwasmvm-version.md" }, { "text": "list-code", - "link": "/cli-docs/empowerd_query_wasm_list-code.md" + "link": "/references/cli-docs/empowerd_query_wasm_list-code.md" }, { "text": "list-contract-by-code", - "link": "/cli-docs/empowerd_query_wasm_list-contract-by-code.md" + "link": "/references/cli-docs/empowerd_query_wasm_list-contract-by-code.md" }, { "text": "list-contracts-by-creator", - "link": "/cli-docs/empowerd_query_wasm_list-contracts-by-creator.md" + "link": "/references/cli-docs/empowerd_query_wasm_list-contracts-by-creator.md" }, { "text": "params", - "link": "/cli-docs/empowerd_query_wasm_params.md" + "link": "/references/cli-docs/empowerd_query_wasm_params.md" }, { "text": "pinned", - "link": "/cli-docs/empowerd_query_wasm_pinned.md" + "link": "/references/cli-docs/empowerd_query_wasm_pinned.md" } ] } @@ -926,350 +926,354 @@ export default [ }, { "text": "rollback", - "link": "/cli-docs/empowerd_rollback.md" + "link": "/references/cli-docs/empowerd_rollback.md" }, { "text": "rosetta", - "link": "/cli-docs/empowerd_rosetta.md" + "link": "/references/cli-docs/empowerd_rosetta.md" }, { "text": "start", - "link": "/cli-docs/empowerd_start.md" + "link": "/references/cli-docs/empowerd_start.md" }, { "text": "status", - "link": "/cli-docs/empowerd_status.md" + "link": "/references/cli-docs/empowerd_status.md" }, { "text": "tendermint", - "link": "/cli-docs/empowerd_tendermint.md", + "link": "/references/cli-docs/empowerd_tendermint.md", "collapsed": true, "items": [ + { + "text": "bootstrap-state", + "link": "/references/cli-docs/empowerd_tendermint_bootstrap-state.md" + }, { "text": "reset-state", - "link": "/cli-docs/empowerd_tendermint_reset-state.md" + "link": "/references/cli-docs/empowerd_tendermint_reset-state.md" }, { "text": "show-address", - "link": "/cli-docs/empowerd_tendermint_show-address.md" + "link": "/references/cli-docs/empowerd_tendermint_show-address.md" }, { "text": "show-node-id", - "link": "/cli-docs/empowerd_tendermint_show-node-id.md" + "link": "/references/cli-docs/empowerd_tendermint_show-node-id.md" }, { "text": "show-validator", - "link": "/cli-docs/empowerd_tendermint_show-validator.md" + "link": "/references/cli-docs/empowerd_tendermint_show-validator.md" }, { "text": "unsafe-reset-all", - "link": "/cli-docs/empowerd_tendermint_unsafe-reset-all.md" + "link": "/references/cli-docs/empowerd_tendermint_unsafe-reset-all.md" }, { "text": "version", - "link": "/cli-docs/empowerd_tendermint_version.md" + "link": "/references/cli-docs/empowerd_tendermint_version.md" } ] }, { "text": "tx", - "link": "/cli-docs/empowerd_tx.md", + "link": "/references/cli-docs/empowerd_tx.md", "collapsed": true, "items": [ { "text": "authz", - "link": "/cli-docs/empowerd_tx_authz.md", + "link": "/references/cli-docs/empowerd_tx_authz.md", "collapsed": true, "items": [ { "text": "exec", - "link": "/cli-docs/empowerd_tx_authz_exec.md" + "link": "/references/cli-docs/empowerd_tx_authz_exec.md" }, { "text": "grant", - "link": "/cli-docs/empowerd_tx_authz_grant.md" + "link": "/references/cli-docs/empowerd_tx_authz_grant.md" }, { "text": "revoke", - "link": "/cli-docs/empowerd_tx_authz_revoke.md" + "link": "/references/cli-docs/empowerd_tx_authz_revoke.md" } ] }, { "text": "aux-to-fee", - "link": "/cli-docs/empowerd_tx_aux-to-fee.md" + "link": "/references/cli-docs/empowerd_tx_aux-to-fee.md" }, { "text": "bank", - "link": "/cli-docs/empowerd_tx_bank.md", + "link": "/references/cli-docs/empowerd_tx_bank.md", "collapsed": true, "items": [ { "text": "multi-send", - "link": "/cli-docs/empowerd_tx_bank_multi-send.md" + "link": "/references/cli-docs/empowerd_tx_bank_multi-send.md" }, { "text": "send", - "link": "/cli-docs/empowerd_tx_bank_send.md" + "link": "/references/cli-docs/empowerd_tx_bank_send.md" } ] }, { "text": "broadcast", - "link": "/cli-docs/empowerd_tx_broadcast.md" + "link": "/references/cli-docs/empowerd_tx_broadcast.md" }, { "text": "certificates", - "link": "/cli-docs/empowerd_tx_certificates.md", + "link": "/references/cli-docs/empowerd_tx_certificates.md", "collapsed": true, "items": [ { "text": "create-certificate", - "link": "/cli-docs/empowerd_tx_certificates_create-certificate.md" + "link": "/references/cli-docs/empowerd_tx_certificates_create-certificate.md" } ] }, { "text": "crisis", - "link": "/cli-docs/empowerd_tx_crisis.md", + "link": "/references/cli-docs/empowerd_tx_crisis.md", "collapsed": true, "items": [ { "text": "invariant-broken", - "link": "/cli-docs/empowerd_tx_crisis_invariant-broken.md" + "link": "/references/cli-docs/empowerd_tx_crisis_invariant-broken.md" } ] }, { "text": "decode", - "link": "/cli-docs/empowerd_tx_decode.md" + "link": "/references/cli-docs/empowerd_tx_decode.md" }, { "text": "distribution", - "link": "/cli-docs/empowerd_tx_distribution.md", + "link": "/references/cli-docs/empowerd_tx_distribution.md", "collapsed": true, "items": [ { "text": "fund-community-pool", - "link": "/cli-docs/empowerd_tx_distribution_fund-community-pool.md" + "link": "/references/cli-docs/empowerd_tx_distribution_fund-community-pool.md" }, { "text": "set-withdraw-addr", - "link": "/cli-docs/empowerd_tx_distribution_set-withdraw-addr.md" + "link": "/references/cli-docs/empowerd_tx_distribution_set-withdraw-addr.md" }, { "text": "withdraw-all-rewards", - "link": "/cli-docs/empowerd_tx_distribution_withdraw-all-rewards.md" + "link": "/references/cli-docs/empowerd_tx_distribution_withdraw-all-rewards.md" }, { "text": "withdraw-rewards", - "link": "/cli-docs/empowerd_tx_distribution_withdraw-rewards.md" + "link": "/references/cli-docs/empowerd_tx_distribution_withdraw-rewards.md" } ] }, { "text": "encode", - "link": "/cli-docs/empowerd_tx_encode.md" + "link": "/references/cli-docs/empowerd_tx_encode.md" }, { "text": "evidence", - "link": "/cli-docs/empowerd_tx_evidence.md" + "link": "/references/cli-docs/empowerd_tx_evidence.md" }, { "text": "feegrant", - "link": "/cli-docs/empowerd_tx_feegrant.md", + "link": "/references/cli-docs/empowerd_tx_feegrant.md", "collapsed": true, "items": [ { "text": "grant", - "link": "/cli-docs/empowerd_tx_feegrant_grant.md" + "link": "/references/cli-docs/empowerd_tx_feegrant_grant.md" }, { "text": "revoke", - "link": "/cli-docs/empowerd_tx_feegrant_revoke.md" + "link": "/references/cli-docs/empowerd_tx_feegrant_revoke.md" } ] }, { "text": "gov", - "link": "/cli-docs/empowerd_tx_gov.md", + "link": "/references/cli-docs/empowerd_tx_gov.md", "collapsed": true, "items": [ { "text": "deposit", - "link": "/cli-docs/empowerd_tx_gov_deposit.md" + "link": "/references/cli-docs/empowerd_tx_gov_deposit.md" }, { "text": "draft-proposal", - "link": "/cli-docs/empowerd_tx_gov_draft-proposal.md" + "link": "/references/cli-docs/empowerd_tx_gov_draft-proposal.md" }, { "text": "submit-legacy-proposal", - "link": "/cli-docs/empowerd_tx_gov_submit-legacy-proposal.md", + "link": "/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal.md", "collapsed": true, "items": [ { "text": "cancel-software-upgrade", - "link": "/cli-docs/empowerd_tx_gov_submit-legacy-proposal_cancel-software-upgrade.md" + "link": "/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_cancel-software-upgrade.md" }, { "text": "ibc-upgrade", - "link": "/cli-docs/empowerd_tx_gov_submit-legacy-proposal_ibc-upgrade.md" + "link": "/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_ibc-upgrade.md" }, { "text": "param-change", - "link": "/cli-docs/empowerd_tx_gov_submit-legacy-proposal_param-change.md" + "link": "/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_param-change.md" }, { "text": "software-upgrade", - "link": "/cli-docs/empowerd_tx_gov_submit-legacy-proposal_software-upgrade.md" + "link": "/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_software-upgrade.md" }, { "text": "update-client", - "link": "/cli-docs/empowerd_tx_gov_submit-legacy-proposal_update-client.md" + "link": "/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_update-client.md" } ] }, { "text": "submit-proposal", - "link": "/cli-docs/empowerd_tx_gov_submit-proposal.md" + "link": "/references/cli-docs/empowerd_tx_gov_submit-proposal.md" }, { "text": "vote", - "link": "/cli-docs/empowerd_tx_gov_vote.md" + "link": "/references/cli-docs/empowerd_tx_gov_vote.md" }, { "text": "weighted-vote", - "link": "/cli-docs/empowerd_tx_gov_weighted-vote.md" + "link": "/references/cli-docs/empowerd_tx_gov_weighted-vote.md" } ] }, { "text": "group", - "link": "/cli-docs/empowerd_tx_group.md", + "link": "/references/cli-docs/empowerd_tx_group.md", "collapsed": true, "items": [ { "text": "create-group-policy", - "link": "/cli-docs/empowerd_tx_group_create-group-policy.md" + "link": "/references/cli-docs/empowerd_tx_group_create-group-policy.md" }, { "text": "create-group-with-policy", - "link": "/cli-docs/empowerd_tx_group_create-group-with-policy.md" + "link": "/references/cli-docs/empowerd_tx_group_create-group-with-policy.md" }, { "text": "create-group", - "link": "/cli-docs/empowerd_tx_group_create-group.md" + "link": "/references/cli-docs/empowerd_tx_group_create-group.md" }, { "text": "draft-proposal", - "link": "/cli-docs/empowerd_tx_group_draft-proposal.md" + "link": "/references/cli-docs/empowerd_tx_group_draft-proposal.md" }, { "text": "exec", - "link": "/cli-docs/empowerd_tx_group_exec.md" + "link": "/references/cli-docs/empowerd_tx_group_exec.md" }, { "text": "leave-group", - "link": "/cli-docs/empowerd_tx_group_leave-group.md" + "link": "/references/cli-docs/empowerd_tx_group_leave-group.md" }, { "text": "submit-proposal", - "link": "/cli-docs/empowerd_tx_group_submit-proposal.md" + "link": "/references/cli-docs/empowerd_tx_group_submit-proposal.md" }, { "text": "update-group-admin", - "link": "/cli-docs/empowerd_tx_group_update-group-admin.md" + "link": "/references/cli-docs/empowerd_tx_group_update-group-admin.md" }, { "text": "update-group-members", - "link": "/cli-docs/empowerd_tx_group_update-group-members.md" + "link": "/references/cli-docs/empowerd_tx_group_update-group-members.md" }, { "text": "update-group-metadata", - "link": "/cli-docs/empowerd_tx_group_update-group-metadata.md" + "link": "/references/cli-docs/empowerd_tx_group_update-group-metadata.md" }, { "text": "update-group-policy-admin", - "link": "/cli-docs/empowerd_tx_group_update-group-policy-admin.md" + "link": "/references/cli-docs/empowerd_tx_group_update-group-policy-admin.md" }, { "text": "update-group-policy-decision-policy", - "link": "/cli-docs/empowerd_tx_group_update-group-policy-decision-policy.md" + "link": "/references/cli-docs/empowerd_tx_group_update-group-policy-decision-policy.md" }, { "text": "update-group-policy-metadata", - "link": "/cli-docs/empowerd_tx_group_update-group-policy-metadata.md" + "link": "/references/cli-docs/empowerd_tx_group_update-group-policy-metadata.md" }, { "text": "vote", - "link": "/cli-docs/empowerd_tx_group_vote.md" + "link": "/references/cli-docs/empowerd_tx_group_vote.md" }, { "text": "withdraw-proposal", - "link": "/cli-docs/empowerd_tx_group_withdraw-proposal.md" + "link": "/references/cli-docs/empowerd_tx_group_withdraw-proposal.md" } ] }, { "text": "ibc-fee", - "link": "/cli-docs/empowerd_tx_ibc-fee.md", + "link": "/references/cli-docs/empowerd_tx_ibc-fee.md", "collapsed": true, "items": [ { "text": "pay-packet-fee", - "link": "/cli-docs/empowerd_tx_ibc-fee_pay-packet-fee.md" + "link": "/references/cli-docs/empowerd_tx_ibc-fee_pay-packet-fee.md" }, { "text": "register-counterparty-payee", - "link": "/cli-docs/empowerd_tx_ibc-fee_register-counterparty-payee.md" + "link": "/references/cli-docs/empowerd_tx_ibc-fee_register-counterparty-payee.md" }, { "text": "register-payee", - "link": "/cli-docs/empowerd_tx_ibc-fee_register-payee.md" + "link": "/references/cli-docs/empowerd_tx_ibc-fee_register-payee.md" } ] }, { "text": "ibc-transfer", - "link": "/cli-docs/empowerd_tx_ibc-transfer.md", + "link": "/references/cli-docs/empowerd_tx_ibc-transfer.md", "collapsed": true, "items": [ { "text": "transfer", - "link": "/cli-docs/empowerd_tx_ibc-transfer_transfer.md" + "link": "/references/cli-docs/empowerd_tx_ibc-transfer_transfer.md" } ] }, { "text": "ibc", - "link": "/cli-docs/empowerd_tx_ibc.md", + "link": "/references/cli-docs/empowerd_tx_ibc.md", "collapsed": true, "items": [ { "text": "channel", - "link": "/cli-docs/empowerd_tx_ibc_channel.md" + "link": "/references/cli-docs/empowerd_tx_ibc_channel.md" }, { "text": "client", - "link": "/cli-docs/empowerd_tx_ibc_client.md", + "link": "/references/cli-docs/empowerd_tx_ibc_client.md", "collapsed": true, "items": [ { "text": "create", - "link": "/cli-docs/empowerd_tx_ibc_client_create.md" + "link": "/references/cli-docs/empowerd_tx_ibc_client_create.md" }, { "text": "misbehaviour", - "link": "/cli-docs/empowerd_tx_ibc_client_misbehaviour.md" + "link": "/references/cli-docs/empowerd_tx_ibc_client_misbehaviour.md" }, { "text": "update", - "link": "/cli-docs/empowerd_tx_ibc_client_update.md" + "link": "/references/cli-docs/empowerd_tx_ibc_client_update.md" }, { "text": "upgrade", - "link": "/cli-docs/empowerd_tx_ibc_client_upgrade.md" + "link": "/references/cli-docs/empowerd_tx_ibc_client_upgrade.md" } ] } @@ -1277,32 +1281,32 @@ export default [ }, { "text": "interchain-accounts", - "link": "/cli-docs/empowerd_tx_interchain-accounts.md", + "link": "/references/cli-docs/empowerd_tx_interchain-accounts.md", "collapsed": true, "items": [ { "text": "controller", - "link": "/cli-docs/empowerd_tx_interchain-accounts_controller.md", + "link": "/references/cli-docs/empowerd_tx_interchain-accounts_controller.md", "collapsed": true, "items": [ { "text": "register", - "link": "/cli-docs/empowerd_tx_interchain-accounts_controller_register.md" + "link": "/references/cli-docs/empowerd_tx_interchain-accounts_controller_register.md" }, { "text": "send-tx", - "link": "/cli-docs/empowerd_tx_interchain-accounts_controller_send-tx.md" + "link": "/references/cli-docs/empowerd_tx_interchain-accounts_controller_send-tx.md" } ] }, { "text": "host", - "link": "/cli-docs/empowerd_tx_interchain-accounts_host.md", + "link": "/references/cli-docs/empowerd_tx_interchain-accounts_host.md", "collapsed": true, "items": [ { "text": "generate-packet-data", - "link": "/cli-docs/empowerd_tx_interchain-accounts_host_generate-packet-data.md" + "link": "/references/cli-docs/empowerd_tx_interchain-accounts_host_generate-packet-data.md" } ] } @@ -1310,254 +1314,254 @@ export default [ }, { "text": "multi-sign", - "link": "/cli-docs/empowerd_tx_multi-sign.md" + "link": "/references/cli-docs/empowerd_tx_multi-sign.md" }, { "text": "multisign-batch", - "link": "/cli-docs/empowerd_tx_multisign-batch.md" + "link": "/references/cli-docs/empowerd_tx_multisign-batch.md" }, { "text": "plasticcredit", - "link": "/cli-docs/empowerd_tx_plasticcredit.md", + "link": "/references/cli-docs/empowerd_tx_plasticcredit.md", "collapsed": true, "items": [ { "text": "approve-project", - "link": "/cli-docs/empowerd_tx_plasticcredit_approve-project.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_approve-project.md" }, { "text": "create-applicant", - "link": "/cli-docs/empowerd_tx_plasticcredit_create-applicant.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_create-applicant.md" }, { "text": "create-credit-type", - "link": "/cli-docs/empowerd_tx_plasticcredit_create-credit-type.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_create-credit-type.md" }, { "text": "create-project", - "link": "/cli-docs/empowerd_tx_plasticcredit_create-project.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_create-project.md" }, { "text": "grant-transfer-authz", - "link": "/cli-docs/empowerd_tx_plasticcredit_grant-transfer-authz.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_grant-transfer-authz.md" }, { "text": "issue-credits", - "link": "/cli-docs/empowerd_tx_plasticcredit_issue-credits.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_issue-credits.md" }, { "text": "reject-project", - "link": "/cli-docs/empowerd_tx_plasticcredit_reject-project.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_reject-project.md" }, { "text": "retire", - "link": "/cli-docs/empowerd_tx_plasticcredit_retire.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_retire.md" }, { "text": "suspend-project", - "link": "/cli-docs/empowerd_tx_plasticcredit_suspend-project.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_suspend-project.md" }, { "text": "transfer", - "link": "/cli-docs/empowerd_tx_plasticcredit_transfer.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_transfer.md" }, { "text": "update-applicant", - "link": "/cli-docs/empowerd_tx_plasticcredit_update-applicant.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_update-applicant.md" }, { "text": "update-credit-type", - "link": "/cli-docs/empowerd_tx_plasticcredit_update-credit-type.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_update-credit-type.md" }, { "text": "update-issuer", - "link": "/cli-docs/empowerd_tx_plasticcredit_update-issuer.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_update-issuer.md" }, { "text": "update-project", - "link": "/cli-docs/empowerd_tx_plasticcredit_update-project.md" + "link": "/references/cli-docs/empowerd_tx_plasticcredit_update-project.md" } ] }, { "text": "proofofexistence", - "link": "/cli-docs/empowerd_tx_proofofexistence.md", + "link": "/references/cli-docs/empowerd_tx_proofofexistence.md", "collapsed": true, "items": [ { "text": "create-proof", - "link": "/cli-docs/empowerd_tx_proofofexistence_create-proof.md" + "link": "/references/cli-docs/empowerd_tx_proofofexistence_create-proof.md" } ] }, { "text": "sign-batch", - "link": "/cli-docs/empowerd_tx_sign-batch.md" + "link": "/references/cli-docs/empowerd_tx_sign-batch.md" }, { "text": "sign", - "link": "/cli-docs/empowerd_tx_sign.md" + "link": "/references/cli-docs/empowerd_tx_sign.md" }, { "text": "slashing", - "link": "/cli-docs/empowerd_tx_slashing.md", + "link": "/references/cli-docs/empowerd_tx_slashing.md", "collapsed": true, "items": [ { "text": "unjail", - "link": "/cli-docs/empowerd_tx_slashing_unjail.md" + "link": "/references/cli-docs/empowerd_tx_slashing_unjail.md" } ] }, { "text": "staking", - "link": "/cli-docs/empowerd_tx_staking.md", + "link": "/references/cli-docs/empowerd_tx_staking.md", "collapsed": true, "items": [ { "text": "cancel-unbond", - "link": "/cli-docs/empowerd_tx_staking_cancel-unbond.md" + "link": "/references/cli-docs/empowerd_tx_staking_cancel-unbond.md" }, { "text": "create-validator", - "link": "/cli-docs/empowerd_tx_staking_create-validator.md" + "link": "/references/cli-docs/empowerd_tx_staking_create-validator.md" }, { "text": "delegate", - "link": "/cli-docs/empowerd_tx_staking_delegate.md" + "link": "/references/cli-docs/empowerd_tx_staking_delegate.md" }, { "text": "edit-validator", - "link": "/cli-docs/empowerd_tx_staking_edit-validator.md" + "link": "/references/cli-docs/empowerd_tx_staking_edit-validator.md" }, { "text": "redelegate", - "link": "/cli-docs/empowerd_tx_staking_redelegate.md" + "link": "/references/cli-docs/empowerd_tx_staking_redelegate.md" }, { "text": "unbond", - "link": "/cli-docs/empowerd_tx_staking_unbond.md" + "link": "/references/cli-docs/empowerd_tx_staking_unbond.md" } ] }, { "text": "validate-signatures", - "link": "/cli-docs/empowerd_tx_validate-signatures.md" + "link": "/references/cli-docs/empowerd_tx_validate-signatures.md" }, { "text": "vesting", - "link": "/cli-docs/empowerd_tx_vesting.md", + "link": "/references/cli-docs/empowerd_tx_vesting.md", "collapsed": true, "items": [ { "text": "create-periodic-vesting-account", - "link": "/cli-docs/empowerd_tx_vesting_create-periodic-vesting-account.md" + "link": "/references/cli-docs/empowerd_tx_vesting_create-periodic-vesting-account.md" }, { "text": "create-permanent-locked-account", - "link": "/cli-docs/empowerd_tx_vesting_create-permanent-locked-account.md" + "link": "/references/cli-docs/empowerd_tx_vesting_create-permanent-locked-account.md" }, { "text": "create-vesting-account", - "link": "/cli-docs/empowerd_tx_vesting_create-vesting-account.md" + "link": "/references/cli-docs/empowerd_tx_vesting_create-vesting-account.md" } ] }, { "text": "wasm", - "link": "/cli-docs/empowerd_tx_wasm.md", + "link": "/references/cli-docs/empowerd_tx_wasm.md", "collapsed": true, "items": [ { "text": "clear-contract-admin", - "link": "/cli-docs/empowerd_tx_wasm_clear-contract-admin.md" + "link": "/references/cli-docs/empowerd_tx_wasm_clear-contract-admin.md" }, { "text": "execute", - "link": "/cli-docs/empowerd_tx_wasm_execute.md" + "link": "/references/cli-docs/empowerd_tx_wasm_execute.md" }, { "text": "grant", - "link": "/cli-docs/empowerd_tx_wasm_grant.md" + "link": "/references/cli-docs/empowerd_tx_wasm_grant.md" }, { "text": "instantiate", - "link": "/cli-docs/empowerd_tx_wasm_instantiate.md" + "link": "/references/cli-docs/empowerd_tx_wasm_instantiate.md" }, { "text": "instantiate2", - "link": "/cli-docs/empowerd_tx_wasm_instantiate2.md" + "link": "/references/cli-docs/empowerd_tx_wasm_instantiate2.md" }, { "text": "migrate", - "link": "/cli-docs/empowerd_tx_wasm_migrate.md" + "link": "/references/cli-docs/empowerd_tx_wasm_migrate.md" }, { "text": "set-contract-admin", - "link": "/cli-docs/empowerd_tx_wasm_set-contract-admin.md" + "link": "/references/cli-docs/empowerd_tx_wasm_set-contract-admin.md" }, { "text": "store", - "link": "/cli-docs/empowerd_tx_wasm_store.md" + "link": "/references/cli-docs/empowerd_tx_wasm_store.md" }, { "text": "submit-proposal", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal.md", + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal.md", "collapsed": true, "items": [ { "text": "clear-contract-admin", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_clear-contract-admin.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_clear-contract-admin.md" }, { "text": "execute-contract", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_execute-contract.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_execute-contract.md" }, { "text": "instantiate-contract-2", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract-2.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract-2.md" }, { "text": "instantiate-contract", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract.md" }, { "text": "migrate-contract", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_migrate-contract.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_migrate-contract.md" }, { "text": "pin-codes", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_pin-codes.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_pin-codes.md" }, { "text": "set-contract-admin", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_set-contract-admin.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_set-contract-admin.md" }, { "text": "store-instantiate", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_store-instantiate.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_store-instantiate.md" }, { "text": "sudo-contract", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_sudo-contract.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_sudo-contract.md" }, { "text": "unpin-codes", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_unpin-codes.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_unpin-codes.md" }, { "text": "update-instantiate-config", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_update-instantiate-config.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_update-instantiate-config.md" }, { "text": "wasm-store", - "link": "/cli-docs/empowerd_tx_wasm_submit-proposal_wasm-store.md" + "link": "/references/cli-docs/empowerd_tx_wasm_submit-proposal_wasm-store.md" } ] }, { "text": "update-instantiate-config", - "link": "/cli-docs/empowerd_tx_wasm_update-instantiate-config.md" + "link": "/references/cli-docs/empowerd_tx_wasm_update-instantiate-config.md" } ] } @@ -1565,7 +1569,7 @@ export default [ }, { "text": "version", - "link": "/cli-docs/empowerd_version.md" + "link": "/references/cli-docs/empowerd_version.md" } ] } diff --git a/docs/.vitepress/sidebar-module-docs.js b/docs/.vitepress/sidebar-module-docs.js index c2b5dff61..cfa4a70ed 100644 --- a/docs/.vitepress/sidebar-module-docs.js +++ b/docs/.vitepress/sidebar-module-docs.js @@ -1,10 +1,10 @@ export default [ { "text": "proofofexistence", - "link": "/module-docs/proofofexistence.md" + "link": "/references/module-docs/proofofexistence.md" }, { "text": "plasticcredit", - "link": "/module-docs/plasticcredit.md" + "link": "/references/module-docs/plasticcredit.md" } ] \ No newline at end of file diff --git a/docs/Earthfile b/docs/Earthfile index 7699ff872..9441bf7ba 100644 --- a/docs/Earthfile +++ b/docs/Earthfile @@ -4,10 +4,18 @@ WORKDIR /empowerchain/docs build: # New section directory should be added here manually - COPY api-docs . + COPY core-modules . + COPY developers . + COPY governance . COPY introduction . + COPY misc . + COPY testnet . + COPY validators . + COPY references . # =================================================== + COPY public . COPY static . + COPY .vitepress . COPY index.md . COPY package.json . RUN npm install @@ -17,12 +25,12 @@ build: docgen: COPY ../chain/+docgen/* ./ SAVE ARTIFACT .vitepress/* AS LOCAL .vitepress/ - SAVE ARTIFACT cli-docs AS LOCAL cli-docs - SAVE ARTIFACT module-docs AS LOCAL module-docs + SAVE ARTIFACT cli-docs AS LOCAL references/cli-docs + SAVE ARTIFACT module-docs AS LOCAL references/module-docs swagger-docs: COPY ../chain/+swagger-gen/markdown.md ./api-docs/swagger.md - SAVE ARTIFACT api-docs AS LOCAL api-docs + SAVE ARTIFACT api-docs AS LOCAL references/api-docs docs-gen-all: BUILD +swagger-docs diff --git a/docs/deposit-schemes/deposit-scheme.png b/docs/core-modules/deposit-schemes/deposit-scheme.png similarity index 100% rename from docs/deposit-schemes/deposit-scheme.png rename to docs/core-modules/deposit-schemes/deposit-scheme.png diff --git a/docs/deposit-schemes/high-level-overview.md b/docs/core-modules/deposit-schemes/high-level-overview.md similarity index 94% rename from docs/deposit-schemes/high-level-overview.md rename to docs/core-modules/deposit-schemes/high-level-overview.md index aaac09a1b..fc3300892 100644 --- a/docs/deposit-schemes/high-level-overview.md +++ b/docs/core-modules/deposit-schemes/high-level-overview.md @@ -7,7 +7,7 @@ The general concept is fairly simple: someone who wants to incentivize collectio They provide some form of incentive, or reward, which is deployed to a smart contract on EmpowerChain. The smart contract contains the rules for the deposit scheme, and the reward is distributed according to these rules. -![Deposit scheme](./deposit-scheme.png 'Deposit scheme') +![Deposit scheme](deposit-scheme.png 'Deposit scheme') More concrete information and examples will be added to this section as the module is developed. diff --git a/docs/plastic-credits/high-level-overview.md b/docs/core-modules/plastic-credits/high-level-overview.md similarity index 94% rename from docs/plastic-credits/high-level-overview.md rename to docs/core-modules/plastic-credits/high-level-overview.md index 3bd45340b..9687e59e2 100644 --- a/docs/plastic-credits/high-level-overview.md +++ b/docs/core-modules/plastic-credits/high-level-overview.md @@ -50,7 +50,7 @@ This means that there can be multiple types of plastic credits on the market, ea Applicants apply to an issuer and a credit type with a specific project. The issuer can then approve the project and later issue plastic credits to the applicant. -![Plastic credit type illustration](./plastic-credit-type.png 'Plastic credit type, issuer, applicant and project') +![Plastic credit type illustration](plastic-credit-type.png 'Plastic credit type, issuer, applicant and project') ## Issuers An issuer is an entity that owns and creates plastic credit types, as well as issues plastic credits to applicants. @@ -80,7 +80,7 @@ It is up to the issuer and the standard of the credit type to decide what consti It could for instance be a time-bound serial number (e.g. a new serial number every month), a serial number that is incremented for every x credits issued, or something else entirely. -![Plastic credit collection illustration](./plastic-credit-collection.png 'Plastic credit collection and its unique combinations of credit type, project and serial number') +![Plastic credit collection illustration](plastic-credit-collection.png 'Plastic credit collection and its unique combinations of credit type, project and serial number') ## Plastic Credits A plastic credit is a digital unit that represents an activity related to removing plastic from the environment. A single credit can represent a kg or ton of plastic removed/recycled/handled, or some other unit of measurement. @@ -90,4 +90,4 @@ Each credit collection (which is unique per credit type, project and serial numb Another way to think of each collection is as it having its own type of token (ERC20 or similar) that can only be traded within that collection. ## Read more -You can find more in-depth technical details on the implementation of the plastic credits in the [plastic credits module docs](../module-docs/plasticcredit.md) \ No newline at end of file +You can find more in-depth technical details on the implementation of the plastic credits in the [plastic credits module docs](../../references/module-docs/plasticcredit.md) \ No newline at end of file diff --git a/docs/plastic-credits/marketplace.md b/docs/core-modules/plastic-credits/marketplace.md similarity index 100% rename from docs/plastic-credits/marketplace.md rename to docs/core-modules/plastic-credits/marketplace.md diff --git a/docs/plastic-credits/plastic-credit-collection.png b/docs/core-modules/plastic-credits/plastic-credit-collection.png similarity index 100% rename from docs/plastic-credits/plastic-credit-collection.png rename to docs/core-modules/plastic-credits/plastic-credit-collection.png diff --git a/docs/plastic-credits/plastic-credit-type.png b/docs/core-modules/plastic-credits/plastic-credit-type.png similarity index 100% rename from docs/plastic-credits/plastic-credit-type.png rename to docs/core-modules/plastic-credits/plastic-credit-type.png diff --git a/docs/proof-of-existence/hashing.png b/docs/core-modules/proof-of-existence/hashing.png similarity index 100% rename from docs/proof-of-existence/hashing.png rename to docs/core-modules/proof-of-existence/hashing.png diff --git a/docs/proof-of-existence/high-level-overview.md b/docs/core-modules/proof-of-existence/high-level-overview.md similarity index 95% rename from docs/proof-of-existence/high-level-overview.md rename to docs/core-modules/proof-of-existence/high-level-overview.md index db1cc7eb1..c92d16969 100644 --- a/docs/proof-of-existence/high-level-overview.md +++ b/docs/core-modules/proof-of-existence/high-level-overview.md @@ -26,7 +26,7 @@ In practice, it means that you can take any piece of data, no matter how large, Hash functions are non-deterministic in that similar data doesn't yield similar hashes; a minor change to the data will produce a completely different hash. Hash functions are also deterministic, in that the same input will always produce the same output. These two things combined makes for an effective tool for verifying data integrity. -![Hash illustration](./hashing.png 'Hash function') +![Hash illustration](hashing.png 'Hash function') To prove data integrity, you simply need to run the data through the hash function and compare the output with the original hash. If the hashes match, the data is intact. If they don't match, the data has been changed in some way. @@ -40,7 +40,7 @@ To do that, we need to add a timestamp and a commitment to the data. Turns out that blockchain is pretty good at this. By storing the hash on the blockchain, we can prove that the data existed at least at the time it was added to the blockchain. -![Store hash illustration](./store-hash.png 'Store hash on blockchain') +![Store hash illustration](store-hash.png 'Store hash on blockchain') The Proof of Existence module on EmpowerChain is a simple, yet effective protocol for storing and timestamping a hash on the blockchain. The protocol does not allow for changing the hash or the timestamp, so you can be sure that the data existed at least at the time it was added to the blockchain. @@ -50,7 +50,7 @@ The protocol does not allow for changing the hash or the timestamp, so you can b To prove that a piece of data existed at a specific point in time, we need to combine the hash and the timestamp. You simply follow the same procedure as mentioned already, but you also fetch the hash from the blockchain and compare it to the hash of the data you want to prove. -![Proof of existence illustration](./proof-of-existence.png 'Proof of existence') +![Proof of existence illustration](proof-of-existence.png 'Proof of existence') If the hashes match, you can be sure that the data existed at least at the time it was added to the blockchain. If they don't match, the data has been changed in some way. @@ -67,4 +67,4 @@ permutations under SHA-256 then becomes 32^256. That is such an absurdly large n times larger than the number of atoms in the universe) that any practical chances of a collision is just about inconceivable. ## Read more -You can find more in-depth technical details on the implementation of proof of existence in the [proof of existence module docs](../module-docs/proofofexistence.md) \ No newline at end of file +You can find more in-depth technical details on the implementation of proof of existence in the [proof of existence module docs](../../references/module-docs/proofofexistence.md) \ No newline at end of file diff --git a/docs/proof-of-existence/proof-of-existence.png b/docs/core-modules/proof-of-existence/proof-of-existence.png similarity index 100% rename from docs/proof-of-existence/proof-of-existence.png rename to docs/core-modules/proof-of-existence/proof-of-existence.png diff --git a/docs/proof-of-existence/store-hash.png b/docs/core-modules/proof-of-existence/store-hash.png similarity index 100% rename from docs/proof-of-existence/store-hash.png rename to docs/core-modules/proof-of-existence/store-hash.png diff --git a/docs/governance/constitution.md b/docs/governance/constitution.md new file mode 100644 index 000000000..5ae06d278 --- /dev/null +++ b/docs/governance/constitution.md @@ -0,0 +1,3 @@ +# EmpowerChain constitution + +Draft/proposal coming soon! Stay tuned! \ No newline at end of file diff --git a/docs/governance/governance-initial-structure.png b/docs/governance/governance-initial-structure.png new file mode 100644 index 000000000..1e1d38661 Binary files /dev/null and b/docs/governance/governance-initial-structure.png differ diff --git a/docs/governance/governance-overview.png b/docs/governance/governance-overview.png new file mode 100644 index 000000000..078bd1b85 Binary files /dev/null and b/docs/governance/governance-overview.png differ diff --git a/docs/governance/group-detail.png b/docs/governance/group-detail.png new file mode 100644 index 000000000..40629b33d Binary files /dev/null and b/docs/governance/group-detail.png differ diff --git a/docs/governance/overview.md b/docs/governance/overview.md index 5aabe615f..199b7e335 100644 --- a/docs/governance/overview.md +++ b/docs/governance/overview.md @@ -1,3 +1,53 @@ # Governance overview -The text for this is being finalized, stay tuned! \ No newline at end of file +In Proof-of-Stake blockchains such as EmpowerChain, there is a concept of blockchain-based ecosystem governance. +You can also propose and vote on on-chain governance proposals when you own and stake tokens. +These proposals can be almost anything, from text-based signaling proposals for off-chain discussions to +code changes and parameter adjustments (e.g., distribution rates, rewards, etc.). + +The MPWR token is EmpowerChain's network token and, as such, will be used for governance as well. +This is one of the critical ways EmpowerChain will be a public good, owned and controlled by the community and users. + +## EmpowerChain governance + +EmpowerChain governance is a multi-layered on-chain governance system with a constitution at its core. + +The Empowerchain should be a stable and solid public good, reliable and predictable infrastructure. +To ensure this, we aim to have slow, considerate, and purposeful governance. To do this, +we will propose a constitution that will be the core of the governance. The constitution will be a +document that can only be changed by a supermajority of the governance. + +![EmpowerChain governance overview](governance-overview.png) + +As you can see in the image above, the EmpowerChain governance is a multi-layered governance system. +The constitution is the core of the governance, and execution is done by the different entities we call SubGroups. +This way, we can have a slow and considerate governance while still being able to execute fast and efficiently from SubGroups. + +To read the current proposal for the constitution, see the [constitution](constitution.md) page. + +To see the entities and the layers of governance, see the [governance structure](structure.md) page. + +## A note on on-chain governance and our vision from the team +While the initial applications on the EmpowerChain are our main focus, +we also have ideas and a vision for the future regarding on-chain governance. + +Governance is key to any Proof of Stake chain. Lately, there have been several examples of +community-splitting governance and we also aim to improve this part of decentralized solutions. + +The surprising thing with many existing chains is that they combine the newest technologies and software with +out-of-date codes of law. The earliest known code of law dates back to 2400 BC, and since then, +there have been thousands of years of trying and failing, developing best practices and best solutions +for governance and voting. Even after all this time, it is still not perfect, but combining +the best practices of the code of law with the best-decentralized technologies can bring us a new and +significant step forward. We are part of bringing society and humankind forward. + +Today we see many chains applying a code of law that was outdated thousands of years ago. +It is like choosing to store your keys as rock carvings and looking away from thousands of years of +technology development. If we want to move forward, we need to combine the best of technology with the best of governance. +EmpowerChain aims to bring in the best practices we have from democracies, organizations, +and enterprises worldwide and combine that with the decentralized and immutable nature of the blockchain. +Code of law on the blockchain can disrupt the world by enforcing transparency and accountability, +just as it has already proven to be the next generation of currency and financial infrastructure. + +EmpowerChain aims to combine these strengths to elevate their utility, bring decentralization, +equal opportunities, trust, and transparency, to make the world better. \ No newline at end of file diff --git a/docs/governance/structure.md b/docs/governance/structure.md new file mode 100644 index 000000000..bba4d74bb --- /dev/null +++ b/docs/governance/structure.md @@ -0,0 +1,83 @@ +# EmpowerChain governance structure + +The EmpowerChain governance is a multi-layered governance system with a constitution at its core. +As seen in the picture below, on-chain governance owns the constitution and the ownership of SubGroups. +The SubGroups are the entities that will hold and execute on funds and proposals coming from governance. + +![EmpowerChain governance overview](governance-overview.png 'EmpowerChain governance structure') + +## SubGroups + +A SubGroup is an on-chain group consisting of a set of members and decision policies. +Each decision policy is an address that can hold its own funds and have separate rules on voting. + +![Group structure details](group-detail.png 'Group structure') + +In addition, a SubGroup can have its own SubGroup(s) and be part of another SubGroup. +Initially, we will only use one layer of SubGroups until we see the need for more layers. + +For more technical details on how SubGroups work, see the [Group documentation in the Cosmos SDK docs](https://docs.cosmos.network/main/modules/group/). + +## Initial structure + +At Genesis, EmpowerChain Governance will have the following structure: + +![governance-initial-structure.png](governance-initial-structure.png) + +- Community governance and a constitution at the core of the governance structure +- Usage incentives SubGroup + - Deposit app usage incentives policy + - Plastic credit usage incentives policy + - Future airdrops policy + - Waste ecosystem incentives policy + - Global waste lottery policy + - Future testnet policy + - Bugs and security bounties +- Tech funding SubGroup + - Tech funding policy + - Infrastructure & Interchain funding policy +- Impact SubGroup + - Permalock impact staking policy + - Community growth policy + - Physical grants policy + +Each group and its responsibilities are described in more detail below. + +In addition, there will be 2 SubGroups that are not directly under the governance structure: +- Empower Group + - The team's group for funds and decision-making +- Deployment Group + - Given deployment rights to CosmWasm contracts on the chain (more can be added or removed by governance) + - Administrated by the Empower Group + +## Usage incentives SubGroup + +The usage incentives SubGroup is responsible for incentivizing usage of the network all the way +from the dApps to the waste sector - connecting it all together. + +It has policies (accounts with funds and rules) for: +- Incentivizing different applications +- Incentivizing the waste sector +- Incentivizing the community through airdrops, testnets and more +- Incentivizing developers to submit bugs and security vulnerabilities + +## Tech funding SubGroup + +The objective of the tech funding SubGroup is to ensure that the network has long-term sustainability and +stable development of the core infrastructure needed both for developers and users on EmpowerChain. + +In addition, the SubGroup is responsible for funding infrastructure and Interchain public goods development. + +## Impact SubGroup +The impact SubGroup is responsible for ensuring that the network grows and has a positive impact on the world. + +It has policies for: +- Bootstrapping Plastic Credits and Incentive token markets through the permalocked impact staking policy +- Community growth through incentivizing token liquidity, building strategic partnerships and more +- Physical grants and support for physical network of waste collectors and recyclers + +## Transparency +Each group will be responsible for publishing their activities and decisions on a regular basis. +To the extent it is possible, they should do this on-chain and document it there for all to see. + +In addition, the groups will be subject to audits and reviews by the community and neutral third parties. \ No newline at end of file diff --git a/docs/introduction/applications.md b/docs/introduction/applications.md index 1e9a09f58..34b9fa017 100644 --- a/docs/introduction/applications.md +++ b/docs/introduction/applications.md @@ -14,7 +14,7 @@ Later, there are planned comprehensive tracking solutions that build on proof of ## Plastic Credits The Plastic Credits module enables the creation, issuance, transfer, and retirement of plastic credits, representing the collection and proper management of plastic waste. Empower Platform will integrate with the plastic credits module to issue plastic credits, which can then be sold by collection organizations to individuals or businesses interested in offsetting their plastic footprint. -To read more in-depth about plastic credits on EmpowerChain, please refer to the [Plastic Credits](../plastic-credits/high-level-overview.md) section. +To read more in-depth about plastic credits on EmpowerChain, please refer to the [Plastic Credits](../core-modules/plastic-credits/high-level-overview.md) section. ## Plastic Credit Marketplace In addition to the Plastic Credits module, there will, at launch, be a standalone marketplace where anyone can buy Plastic credits permissionless directly on-chain. In addition, the Empower Platform will integrate with the smart contract used to facilitate listings for collectors on the platform to list and manage their plastic credits on the marketplace easily. diff --git a/docs/introduction/how-it-works.md b/docs/introduction/how-it-works.md index f43764129..4c4522be7 100644 --- a/docs/introduction/how-it-works.md +++ b/docs/introduction/how-it-works.md @@ -10,19 +10,19 @@ As outlined in [What is EmpowerChain](./what-is-empowerchain.md#how-does-empower EmpowerChain also facilitates the issuance of Plastic Credits (PCRDs), which incentivize collection organizations, sorting facilities, and recyclers to handle waste materials responsibly. PCRDs can be traded, used as proof of offset, or applied in gamification strategies to promote better waste management practices and drive circular economy efforts. -To read more about plastic credits, please refer to the [Plastic Credits](../plastic-credits/high-level-overview.md) section. +To read more about plastic credits, please refer to the [Plastic Credits](../core-modules/plastic-credits/high-level-overview.md) section. ## Ensuring Traceability and Transparency EmpowerChain uses blockchain technology to create a secure and reliable foundation for traceability. By employing cryptographic hashing and the immutability of blockchain, EmpowerChain ensures that tracking data points, such as material flows or product lifecycles, remain tamper-proof and transparent. -The initial application to support this on EmpowerChain is the Proof of Existence (PoE) module, which you can read more about [here](../proof-of-existence/high-level-overview.md). +The initial application to support this on EmpowerChain is the Proof of Existence (PoE) module, which you can read more about [here](../core-modules/proof-of-existence/high-level-overview.md). ## Creating Deposit Schemes EmpowerChain supports the development of customizable incentive schemes designed to encourage material and product collection and recycling. These deposit systems can be tailored to the unique requirements of various actors, including Extended Producer Responsibility organizations, recyclers, or volunteer cleanup initiatives. Incentive schemes can take the form of monetary rewards or gamification strategies and are adaptable to a global audience. -To read more about incentive schemes, please refer to the [Deposit Schemes](../deposit-schemes/high-level-overview.md) section. +To read more about incentive schemes, please refer to the [Deposit Schemes](../core-modules/deposit-schemes/high-level-overview.md) section. ## Encouraging Collaboration and Innovation diff --git a/docs/introduction/roadmap.md b/docs/introduction/roadmap.md new file mode 100644 index 000000000..0e2fbc418 --- /dev/null +++ b/docs/introduction/roadmap.md @@ -0,0 +1,43 @@ +# Roadmap + +The current roadmap is currently split in three phases: +1. launch with plastic credits (summer 2023) +2. deposit schemes & deposit app (second half of 2023) +3. traceability with privacy (2024) + +## 1. Launch with plastic credits +The mainnet launch phase lasts until the mainnet has been launched and a little into the summer (to fine-tune features and fix bugs). + +We plan to launch EmpowerChain, with the first modules being Proof of Existence, the Plastic Credit NFTs (PCRDs), +Plastic Credit Registry and the Plastic Credit Marketplace. +There will also be a DEX and other value adding 3rd party applications that enhance the utility of the chain. + +We are starting with the Plastic Credits, even though "chronologically" they are the second step in a supply chain, +because, without them, there is a lack of incentives for collection schemes to work at scale and a functional waste +collection systems need trusted and transparent collection points and materials flows. + +In this phase we are focused on the following: +- Plastic credits core protocol +- Plastic credits marketplace +- Governance setup +- Proof of existence initial use cases + +## 2. Deposit schemes & deposit app +After the mainnet launch, the work starts to get the collection incentive schemes developed and tested, together with the deposit app. +During phase 4, we will begin rolling out the collection incentive schemes with different levels of +functionality to get it out and battle-tested as quickly as possible. +Empower is working with organizations worldwide and with tens of millions of potential users in the already established networks. +The aim is to bring incentives and a portal to decentralized finance to at least 100 million people by 2025. + +In this phase we are focused on the following: +- Deposit schemes +- Deposit app +- Set up further infrastructure for cross-chain collaboration + +## 3. Traceability with privacy +After the release of the initial modules, the current plan is to focus on traceability and adding value to +collection incentives and plastic credits through access to products, services, and liquidity. + +This phase is right now the most uncertain one. It's contents might change, depending on market and user feedback. +It is also dependent on technological (privacy in particular) developments in the space. + diff --git a/docs/misc/brand-assets.md b/docs/misc/brand-assets.md index e7cdd14db..c570a2e65 100644 --- a/docs/misc/brand-assets.md +++ b/docs/misc/brand-assets.md @@ -4,6 +4,11 @@ Below are some brand assets you can use for social media posts or other promotio If possible, we typically prefer the green versions of the logos. +## Colors and fonts +Our main brand color is: #00E33A + +The font we typically use is OpenSans. + ## EmpowerChain logo wide green ![EmpowerChain Logo wide](./empowerchain-logo-wide-green.png) diff --git a/docs/package-lock.json b/docs/package-lock.json index fb48c2c6f..844a88c8c 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -1778,12 +1778,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "node_modules/graphlib": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", @@ -1793,18 +1787,6 @@ "lodash": "^4.17.15" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/heap": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", @@ -1832,18 +1814,6 @@ "node": ">=12" } }, - "node_modules/is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", @@ -1943,10 +1913,16 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -1960,12 +1936,6 @@ "integrity": "sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==", "dev": true }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -1973,9 +1943,9 @@ "dev": true }, "node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", + "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", "dev": true, "funding": [ { @@ -1985,10 +1955,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -2006,23 +1980,6 @@ "url": "https://opencollective.com/preact" } }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/robust-predicates": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.1.tgz", @@ -2030,9 +1987,9 @@ "dev": true }, "node_modules/rollup": { - "version": "3.20.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz", - "integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==", + "version": "3.23.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.23.1.tgz", + "integrity": "sha512-ybRdFVHOoljGEFILHLd2g/qateqUdjE6YS41WXq4p3C/WwD3xtWxV4FYWETA1u9TeXQc5K8L8zHE5d/scOvrOQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -2100,18 +2057,6 @@ "integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==", "dev": true }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/uc.micro": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", @@ -2119,15 +2064,14 @@ "peer": true }, "node_modules/vite": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.2.1.tgz", - "integrity": "sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", + "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", "dev": true, "dependencies": { "esbuild": "^0.17.5", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.18.0" + "postcss": "^8.4.23", + "rollup": "^3.21.0" }, "bin": { "vite": "bin/vite.js" @@ -3558,12 +3502,6 @@ "dev": true, "optional": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "graphlib": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", @@ -3573,15 +3511,6 @@ "lodash": "^4.17.15" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, "heap": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", @@ -3603,15 +3532,6 @@ "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", "dev": true }, - "is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, "jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", @@ -3703,9 +3623,9 @@ "dev": true }, "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "dev": true }, "non-layered-tidy-tree-layout": { @@ -3714,12 +3634,6 @@ "integrity": "sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==", "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -3727,12 +3641,12 @@ "dev": true }, "postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", + "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", "dev": true, "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } @@ -3743,17 +3657,6 @@ "integrity": "sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==", "dev": true }, - "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "requires": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, "robust-predicates": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.1.tgz", @@ -3761,9 +3664,9 @@ "dev": true }, "rollup": { - "version": "3.20.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz", - "integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==", + "version": "3.23.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.23.1.tgz", + "integrity": "sha512-ybRdFVHOoljGEFILHLd2g/qateqUdjE6YS41WXq4p3C/WwD3xtWxV4FYWETA1u9TeXQc5K8L8zHE5d/scOvrOQ==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -3817,12 +3720,6 @@ "integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==", "dev": true }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, "uc.micro": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", @@ -3830,16 +3727,15 @@ "peer": true }, "vite": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.2.1.tgz", - "integrity": "sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", + "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", "dev": true, "requires": { "esbuild": "^0.17.5", "fsevents": "~2.3.2", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.18.0" + "postcss": "^8.4.23", + "rollup": "^3.21.0" } }, "vitepress": { diff --git a/docs/api-docs/swagger.md b/docs/references/api-docs/swagger.md similarity index 100% rename from docs/api-docs/swagger.md rename to docs/references/api-docs/swagger.md diff --git a/docs/cli-docs/empowerd.md b/docs/references/cli-docs/empowerd.md similarity index 100% rename from docs/cli-docs/empowerd.md rename to docs/references/cli-docs/empowerd.md diff --git a/docs/cli-docs/empowerd_config.md b/docs/references/cli-docs/empowerd_config.md similarity index 100% rename from docs/cli-docs/empowerd_config.md rename to docs/references/cli-docs/empowerd_config.md diff --git a/docs/cli-docs/empowerd_debug.md b/docs/references/cli-docs/empowerd_debug.md similarity index 100% rename from docs/cli-docs/empowerd_debug.md rename to docs/references/cli-docs/empowerd_debug.md diff --git a/docs/cli-docs/empowerd_debug_addr.md b/docs/references/cli-docs/empowerd_debug_addr.md similarity index 100% rename from docs/cli-docs/empowerd_debug_addr.md rename to docs/references/cli-docs/empowerd_debug_addr.md diff --git a/docs/cli-docs/empowerd_debug_prefixes.md b/docs/references/cli-docs/empowerd_debug_prefixes.md similarity index 100% rename from docs/cli-docs/empowerd_debug_prefixes.md rename to docs/references/cli-docs/empowerd_debug_prefixes.md diff --git a/docs/cli-docs/empowerd_debug_pubkey-raw.md b/docs/references/cli-docs/empowerd_debug_pubkey-raw.md similarity index 100% rename from docs/cli-docs/empowerd_debug_pubkey-raw.md rename to docs/references/cli-docs/empowerd_debug_pubkey-raw.md diff --git a/docs/cli-docs/empowerd_debug_pubkey.md b/docs/references/cli-docs/empowerd_debug_pubkey.md similarity index 100% rename from docs/cli-docs/empowerd_debug_pubkey.md rename to docs/references/cli-docs/empowerd_debug_pubkey.md diff --git a/docs/cli-docs/empowerd_debug_raw-bytes.md b/docs/references/cli-docs/empowerd_debug_raw-bytes.md similarity index 100% rename from docs/cli-docs/empowerd_debug_raw-bytes.md rename to docs/references/cli-docs/empowerd_debug_raw-bytes.md diff --git a/docs/cli-docs/empowerd_export.md b/docs/references/cli-docs/empowerd_export.md similarity index 100% rename from docs/cli-docs/empowerd_export.md rename to docs/references/cli-docs/empowerd_export.md diff --git a/docs/cli-docs/empowerd_genesis.md b/docs/references/cli-docs/empowerd_genesis.md similarity index 100% rename from docs/cli-docs/empowerd_genesis.md rename to docs/references/cli-docs/empowerd_genesis.md diff --git a/docs/cli-docs/empowerd_genesis_add-genesis-account.md b/docs/references/cli-docs/empowerd_genesis_add-genesis-account.md similarity index 100% rename from docs/cli-docs/empowerd_genesis_add-genesis-account.md rename to docs/references/cli-docs/empowerd_genesis_add-genesis-account.md diff --git a/docs/cli-docs/empowerd_genesis_collect-gentxs.md b/docs/references/cli-docs/empowerd_genesis_collect-gentxs.md similarity index 100% rename from docs/cli-docs/empowerd_genesis_collect-gentxs.md rename to docs/references/cli-docs/empowerd_genesis_collect-gentxs.md diff --git a/docs/cli-docs/empowerd_genesis_gentx.md b/docs/references/cli-docs/empowerd_genesis_gentx.md similarity index 100% rename from docs/cli-docs/empowerd_genesis_gentx.md rename to docs/references/cli-docs/empowerd_genesis_gentx.md diff --git a/docs/cli-docs/empowerd_genesis_mainnet.md b/docs/references/cli-docs/empowerd_genesis_mainnet.md similarity index 100% rename from docs/cli-docs/empowerd_genesis_mainnet.md rename to docs/references/cli-docs/empowerd_genesis_mainnet.md diff --git a/docs/cli-docs/empowerd_genesis_migrate.md b/docs/references/cli-docs/empowerd_genesis_migrate.md similarity index 100% rename from docs/cli-docs/empowerd_genesis_migrate.md rename to docs/references/cli-docs/empowerd_genesis_migrate.md diff --git a/docs/cli-docs/empowerd_genesis_single-validator.md b/docs/references/cli-docs/empowerd_genesis_single-validator.md similarity index 100% rename from docs/cli-docs/empowerd_genesis_single-validator.md rename to docs/references/cli-docs/empowerd_genesis_single-validator.md diff --git a/docs/cli-docs/empowerd_genesis_validate-genesis.md b/docs/references/cli-docs/empowerd_genesis_validate-genesis.md similarity index 100% rename from docs/cli-docs/empowerd_genesis_validate-genesis.md rename to docs/references/cli-docs/empowerd_genesis_validate-genesis.md diff --git a/docs/cli-docs/empowerd_init.md b/docs/references/cli-docs/empowerd_init.md similarity index 100% rename from docs/cli-docs/empowerd_init.md rename to docs/references/cli-docs/empowerd_init.md diff --git a/docs/cli-docs/empowerd_keys.md b/docs/references/cli-docs/empowerd_keys.md similarity index 100% rename from docs/cli-docs/empowerd_keys.md rename to docs/references/cli-docs/empowerd_keys.md diff --git a/docs/cli-docs/empowerd_keys_add.md b/docs/references/cli-docs/empowerd_keys_add.md similarity index 100% rename from docs/cli-docs/empowerd_keys_add.md rename to docs/references/cli-docs/empowerd_keys_add.md diff --git a/docs/cli-docs/empowerd_keys_delete.md b/docs/references/cli-docs/empowerd_keys_delete.md similarity index 100% rename from docs/cli-docs/empowerd_keys_delete.md rename to docs/references/cli-docs/empowerd_keys_delete.md diff --git a/docs/cli-docs/empowerd_keys_export.md b/docs/references/cli-docs/empowerd_keys_export.md similarity index 100% rename from docs/cli-docs/empowerd_keys_export.md rename to docs/references/cli-docs/empowerd_keys_export.md diff --git a/docs/cli-docs/empowerd_keys_import.md b/docs/references/cli-docs/empowerd_keys_import.md similarity index 100% rename from docs/cli-docs/empowerd_keys_import.md rename to docs/references/cli-docs/empowerd_keys_import.md diff --git a/docs/cli-docs/empowerd_keys_list-key-types.md b/docs/references/cli-docs/empowerd_keys_list-key-types.md similarity index 100% rename from docs/cli-docs/empowerd_keys_list-key-types.md rename to docs/references/cli-docs/empowerd_keys_list-key-types.md diff --git a/docs/cli-docs/empowerd_keys_list.md b/docs/references/cli-docs/empowerd_keys_list.md similarity index 100% rename from docs/cli-docs/empowerd_keys_list.md rename to docs/references/cli-docs/empowerd_keys_list.md diff --git a/docs/cli-docs/empowerd_keys_migrate.md b/docs/references/cli-docs/empowerd_keys_migrate.md similarity index 100% rename from docs/cli-docs/empowerd_keys_migrate.md rename to docs/references/cli-docs/empowerd_keys_migrate.md diff --git a/docs/cli-docs/empowerd_keys_mnemonic.md b/docs/references/cli-docs/empowerd_keys_mnemonic.md similarity index 100% rename from docs/cli-docs/empowerd_keys_mnemonic.md rename to docs/references/cli-docs/empowerd_keys_mnemonic.md diff --git a/docs/cli-docs/empowerd_keys_parse.md b/docs/references/cli-docs/empowerd_keys_parse.md similarity index 100% rename from docs/cli-docs/empowerd_keys_parse.md rename to docs/references/cli-docs/empowerd_keys_parse.md diff --git a/docs/cli-docs/empowerd_keys_rename.md b/docs/references/cli-docs/empowerd_keys_rename.md similarity index 100% rename from docs/cli-docs/empowerd_keys_rename.md rename to docs/references/cli-docs/empowerd_keys_rename.md diff --git a/docs/cli-docs/empowerd_keys_show.md b/docs/references/cli-docs/empowerd_keys_show.md similarity index 100% rename from docs/cli-docs/empowerd_keys_show.md rename to docs/references/cli-docs/empowerd_keys_show.md diff --git a/docs/cli-docs/empowerd_prune.md b/docs/references/cli-docs/empowerd_prune.md similarity index 100% rename from docs/cli-docs/empowerd_prune.md rename to docs/references/cli-docs/empowerd_prune.md diff --git a/docs/cli-docs/empowerd_query.md b/docs/references/cli-docs/empowerd_query.md similarity index 100% rename from docs/cli-docs/empowerd_query.md rename to docs/references/cli-docs/empowerd_query.md diff --git a/docs/cli-docs/empowerd_query_account.md b/docs/references/cli-docs/empowerd_query_account.md similarity index 100% rename from docs/cli-docs/empowerd_query_account.md rename to docs/references/cli-docs/empowerd_query_account.md diff --git a/docs/cli-docs/empowerd_query_auth.md b/docs/references/cli-docs/empowerd_query_auth.md similarity index 100% rename from docs/cli-docs/empowerd_query_auth.md rename to docs/references/cli-docs/empowerd_query_auth.md diff --git a/docs/cli-docs/empowerd_query_auth_account.md b/docs/references/cli-docs/empowerd_query_auth_account.md similarity index 100% rename from docs/cli-docs/empowerd_query_auth_account.md rename to docs/references/cli-docs/empowerd_query_auth_account.md diff --git a/docs/cli-docs/empowerd_query_auth_accounts.md b/docs/references/cli-docs/empowerd_query_auth_accounts.md similarity index 100% rename from docs/cli-docs/empowerd_query_auth_accounts.md rename to docs/references/cli-docs/empowerd_query_auth_accounts.md diff --git a/docs/cli-docs/empowerd_query_auth_address-by-acc-num.md b/docs/references/cli-docs/empowerd_query_auth_address-by-acc-num.md similarity index 100% rename from docs/cli-docs/empowerd_query_auth_address-by-acc-num.md rename to docs/references/cli-docs/empowerd_query_auth_address-by-acc-num.md diff --git a/docs/cli-docs/empowerd_query_auth_module-account.md b/docs/references/cli-docs/empowerd_query_auth_module-account.md similarity index 100% rename from docs/cli-docs/empowerd_query_auth_module-account.md rename to docs/references/cli-docs/empowerd_query_auth_module-account.md diff --git a/docs/cli-docs/empowerd_query_auth_module-accounts.md b/docs/references/cli-docs/empowerd_query_auth_module-accounts.md similarity index 100% rename from docs/cli-docs/empowerd_query_auth_module-accounts.md rename to docs/references/cli-docs/empowerd_query_auth_module-accounts.md diff --git a/docs/cli-docs/empowerd_query_auth_params.md b/docs/references/cli-docs/empowerd_query_auth_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_auth_params.md rename to docs/references/cli-docs/empowerd_query_auth_params.md diff --git a/docs/cli-docs/empowerd_query_authz.md b/docs/references/cli-docs/empowerd_query_authz.md similarity index 100% rename from docs/cli-docs/empowerd_query_authz.md rename to docs/references/cli-docs/empowerd_query_authz.md diff --git a/docs/cli-docs/empowerd_query_authz_grants-by-grantee.md b/docs/references/cli-docs/empowerd_query_authz_grants-by-grantee.md similarity index 100% rename from docs/cli-docs/empowerd_query_authz_grants-by-grantee.md rename to docs/references/cli-docs/empowerd_query_authz_grants-by-grantee.md diff --git a/docs/cli-docs/empowerd_query_authz_grants-by-granter.md b/docs/references/cli-docs/empowerd_query_authz_grants-by-granter.md similarity index 100% rename from docs/cli-docs/empowerd_query_authz_grants-by-granter.md rename to docs/references/cli-docs/empowerd_query_authz_grants-by-granter.md diff --git a/docs/cli-docs/empowerd_query_authz_grants.md b/docs/references/cli-docs/empowerd_query_authz_grants.md similarity index 100% rename from docs/cli-docs/empowerd_query_authz_grants.md rename to docs/references/cli-docs/empowerd_query_authz_grants.md diff --git a/docs/cli-docs/empowerd_query_bank.md b/docs/references/cli-docs/empowerd_query_bank.md similarity index 100% rename from docs/cli-docs/empowerd_query_bank.md rename to docs/references/cli-docs/empowerd_query_bank.md diff --git a/docs/cli-docs/empowerd_query_bank_balances.md b/docs/references/cli-docs/empowerd_query_bank_balances.md similarity index 100% rename from docs/cli-docs/empowerd_query_bank_balances.md rename to docs/references/cli-docs/empowerd_query_bank_balances.md diff --git a/docs/cli-docs/empowerd_query_bank_denom-metadata.md b/docs/references/cli-docs/empowerd_query_bank_denom-metadata.md similarity index 100% rename from docs/cli-docs/empowerd_query_bank_denom-metadata.md rename to docs/references/cli-docs/empowerd_query_bank_denom-metadata.md diff --git a/docs/cli-docs/empowerd_query_bank_send-enabled.md b/docs/references/cli-docs/empowerd_query_bank_send-enabled.md similarity index 100% rename from docs/cli-docs/empowerd_query_bank_send-enabled.md rename to docs/references/cli-docs/empowerd_query_bank_send-enabled.md diff --git a/docs/cli-docs/empowerd_query_bank_spendable-balances.md b/docs/references/cli-docs/empowerd_query_bank_spendable-balances.md similarity index 100% rename from docs/cli-docs/empowerd_query_bank_spendable-balances.md rename to docs/references/cli-docs/empowerd_query_bank_spendable-balances.md diff --git a/docs/cli-docs/empowerd_query_bank_total.md b/docs/references/cli-docs/empowerd_query_bank_total.md similarity index 100% rename from docs/cli-docs/empowerd_query_bank_total.md rename to docs/references/cli-docs/empowerd_query_bank_total.md diff --git a/docs/cli-docs/empowerd_query_block.md b/docs/references/cli-docs/empowerd_query_block.md similarity index 100% rename from docs/cli-docs/empowerd_query_block.md rename to docs/references/cli-docs/empowerd_query_block.md diff --git a/docs/cli-docs/empowerd_query_certificates.md b/docs/references/cli-docs/empowerd_query_certificates.md similarity index 100% rename from docs/cli-docs/empowerd_query_certificates.md rename to docs/references/cli-docs/empowerd_query_certificates.md diff --git a/docs/cli-docs/empowerd_query_certificates_certificate.md b/docs/references/cli-docs/empowerd_query_certificates_certificate.md similarity index 100% rename from docs/cli-docs/empowerd_query_certificates_certificate.md rename to docs/references/cli-docs/empowerd_query_certificates_certificate.md diff --git a/docs/cli-docs/empowerd_query_certificates_certificates-by-owner.md b/docs/references/cli-docs/empowerd_query_certificates_certificates-by-owner.md similarity index 100% rename from docs/cli-docs/empowerd_query_certificates_certificates-by-owner.md rename to docs/references/cli-docs/empowerd_query_certificates_certificates-by-owner.md diff --git a/docs/cli-docs/empowerd_query_certificates_certificates.md b/docs/references/cli-docs/empowerd_query_certificates_certificates.md similarity index 100% rename from docs/cli-docs/empowerd_query_certificates_certificates.md rename to docs/references/cli-docs/empowerd_query_certificates_certificates.md diff --git a/docs/cli-docs/empowerd_query_certificates_params.md b/docs/references/cli-docs/empowerd_query_certificates_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_certificates_params.md rename to docs/references/cli-docs/empowerd_query_certificates_params.md diff --git a/docs/cli-docs/empowerd_query_distribution.md b/docs/references/cli-docs/empowerd_query_distribution.md similarity index 100% rename from docs/cli-docs/empowerd_query_distribution.md rename to docs/references/cli-docs/empowerd_query_distribution.md diff --git a/docs/cli-docs/empowerd_query_distribution_commission.md b/docs/references/cli-docs/empowerd_query_distribution_commission.md similarity index 100% rename from docs/cli-docs/empowerd_query_distribution_commission.md rename to docs/references/cli-docs/empowerd_query_distribution_commission.md diff --git a/docs/cli-docs/empowerd_query_distribution_community-pool.md b/docs/references/cli-docs/empowerd_query_distribution_community-pool.md similarity index 100% rename from docs/cli-docs/empowerd_query_distribution_community-pool.md rename to docs/references/cli-docs/empowerd_query_distribution_community-pool.md diff --git a/docs/cli-docs/empowerd_query_distribution_params.md b/docs/references/cli-docs/empowerd_query_distribution_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_distribution_params.md rename to docs/references/cli-docs/empowerd_query_distribution_params.md diff --git a/docs/cli-docs/empowerd_query_distribution_rewards.md b/docs/references/cli-docs/empowerd_query_distribution_rewards.md similarity index 100% rename from docs/cli-docs/empowerd_query_distribution_rewards.md rename to docs/references/cli-docs/empowerd_query_distribution_rewards.md diff --git a/docs/cli-docs/empowerd_query_distribution_slashes.md b/docs/references/cli-docs/empowerd_query_distribution_slashes.md similarity index 100% rename from docs/cli-docs/empowerd_query_distribution_slashes.md rename to docs/references/cli-docs/empowerd_query_distribution_slashes.md diff --git a/docs/cli-docs/empowerd_query_distribution_validator-distribution-info.md b/docs/references/cli-docs/empowerd_query_distribution_validator-distribution-info.md similarity index 100% rename from docs/cli-docs/empowerd_query_distribution_validator-distribution-info.md rename to docs/references/cli-docs/empowerd_query_distribution_validator-distribution-info.md diff --git a/docs/cli-docs/empowerd_query_distribution_validator-outstanding-rewards.md b/docs/references/cli-docs/empowerd_query_distribution_validator-outstanding-rewards.md similarity index 100% rename from docs/cli-docs/empowerd_query_distribution_validator-outstanding-rewards.md rename to docs/references/cli-docs/empowerd_query_distribution_validator-outstanding-rewards.md diff --git a/docs/cli-docs/empowerd_query_evidence.md b/docs/references/cli-docs/empowerd_query_evidence.md similarity index 100% rename from docs/cli-docs/empowerd_query_evidence.md rename to docs/references/cli-docs/empowerd_query_evidence.md diff --git a/docs/cli-docs/empowerd_query_feegrant.md b/docs/references/cli-docs/empowerd_query_feegrant.md similarity index 100% rename from docs/cli-docs/empowerd_query_feegrant.md rename to docs/references/cli-docs/empowerd_query_feegrant.md diff --git a/docs/cli-docs/empowerd_query_feegrant_grant.md b/docs/references/cli-docs/empowerd_query_feegrant_grant.md similarity index 100% rename from docs/cli-docs/empowerd_query_feegrant_grant.md rename to docs/references/cli-docs/empowerd_query_feegrant_grant.md diff --git a/docs/cli-docs/empowerd_query_feegrant_grants-by-grantee.md b/docs/references/cli-docs/empowerd_query_feegrant_grants-by-grantee.md similarity index 100% rename from docs/cli-docs/empowerd_query_feegrant_grants-by-grantee.md rename to docs/references/cli-docs/empowerd_query_feegrant_grants-by-grantee.md diff --git a/docs/cli-docs/empowerd_query_feegrant_grants-by-granter.md b/docs/references/cli-docs/empowerd_query_feegrant_grants-by-granter.md similarity index 100% rename from docs/cli-docs/empowerd_query_feegrant_grants-by-granter.md rename to docs/references/cli-docs/empowerd_query_feegrant_grants-by-granter.md diff --git a/docs/cli-docs/empowerd_query_gov.md b/docs/references/cli-docs/empowerd_query_gov.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov.md rename to docs/references/cli-docs/empowerd_query_gov.md diff --git a/docs/cli-docs/empowerd_query_gov_deposit.md b/docs/references/cli-docs/empowerd_query_gov_deposit.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_deposit.md rename to docs/references/cli-docs/empowerd_query_gov_deposit.md diff --git a/docs/cli-docs/empowerd_query_gov_deposits.md b/docs/references/cli-docs/empowerd_query_gov_deposits.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_deposits.md rename to docs/references/cli-docs/empowerd_query_gov_deposits.md diff --git a/docs/cli-docs/empowerd_query_gov_param.md b/docs/references/cli-docs/empowerd_query_gov_param.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_param.md rename to docs/references/cli-docs/empowerd_query_gov_param.md diff --git a/docs/cli-docs/empowerd_query_gov_params.md b/docs/references/cli-docs/empowerd_query_gov_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_params.md rename to docs/references/cli-docs/empowerd_query_gov_params.md diff --git a/docs/cli-docs/empowerd_query_gov_proposal.md b/docs/references/cli-docs/empowerd_query_gov_proposal.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_proposal.md rename to docs/references/cli-docs/empowerd_query_gov_proposal.md diff --git a/docs/cli-docs/empowerd_query_gov_proposals.md b/docs/references/cli-docs/empowerd_query_gov_proposals.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_proposals.md rename to docs/references/cli-docs/empowerd_query_gov_proposals.md diff --git a/docs/cli-docs/empowerd_query_gov_proposer.md b/docs/references/cli-docs/empowerd_query_gov_proposer.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_proposer.md rename to docs/references/cli-docs/empowerd_query_gov_proposer.md diff --git a/docs/cli-docs/empowerd_query_gov_tally.md b/docs/references/cli-docs/empowerd_query_gov_tally.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_tally.md rename to docs/references/cli-docs/empowerd_query_gov_tally.md diff --git a/docs/cli-docs/empowerd_query_gov_vote.md b/docs/references/cli-docs/empowerd_query_gov_vote.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_vote.md rename to docs/references/cli-docs/empowerd_query_gov_vote.md diff --git a/docs/cli-docs/empowerd_query_gov_votes.md b/docs/references/cli-docs/empowerd_query_gov_votes.md similarity index 100% rename from docs/cli-docs/empowerd_query_gov_votes.md rename to docs/references/cli-docs/empowerd_query_gov_votes.md diff --git a/docs/cli-docs/empowerd_query_group.md b/docs/references/cli-docs/empowerd_query_group.md similarity index 100% rename from docs/cli-docs/empowerd_query_group.md rename to docs/references/cli-docs/empowerd_query_group.md diff --git a/docs/cli-docs/empowerd_query_group_group-info.md b/docs/references/cli-docs/empowerd_query_group_group-info.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_group-info.md rename to docs/references/cli-docs/empowerd_query_group_group-info.md diff --git a/docs/cli-docs/empowerd_query_group_group-members.md b/docs/references/cli-docs/empowerd_query_group_group-members.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_group-members.md rename to docs/references/cli-docs/empowerd_query_group_group-members.md diff --git a/docs/cli-docs/empowerd_query_group_group-policies-by-admin.md b/docs/references/cli-docs/empowerd_query_group_group-policies-by-admin.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_group-policies-by-admin.md rename to docs/references/cli-docs/empowerd_query_group_group-policies-by-admin.md diff --git a/docs/cli-docs/empowerd_query_group_group-policies-by-group.md b/docs/references/cli-docs/empowerd_query_group_group-policies-by-group.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_group-policies-by-group.md rename to docs/references/cli-docs/empowerd_query_group_group-policies-by-group.md diff --git a/docs/cli-docs/empowerd_query_group_group-policy-info.md b/docs/references/cli-docs/empowerd_query_group_group-policy-info.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_group-policy-info.md rename to docs/references/cli-docs/empowerd_query_group_group-policy-info.md diff --git a/docs/cli-docs/empowerd_query_group_groups-by-admin.md b/docs/references/cli-docs/empowerd_query_group_groups-by-admin.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_groups-by-admin.md rename to docs/references/cli-docs/empowerd_query_group_groups-by-admin.md diff --git a/docs/cli-docs/empowerd_query_group_groups-by-member.md b/docs/references/cli-docs/empowerd_query_group_groups-by-member.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_groups-by-member.md rename to docs/references/cli-docs/empowerd_query_group_groups-by-member.md diff --git a/docs/cli-docs/empowerd_query_group_groups.md b/docs/references/cli-docs/empowerd_query_group_groups.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_groups.md rename to docs/references/cli-docs/empowerd_query_group_groups.md diff --git a/docs/cli-docs/empowerd_query_group_proposal.md b/docs/references/cli-docs/empowerd_query_group_proposal.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_proposal.md rename to docs/references/cli-docs/empowerd_query_group_proposal.md diff --git a/docs/cli-docs/empowerd_query_group_proposals-by-group-policy.md b/docs/references/cli-docs/empowerd_query_group_proposals-by-group-policy.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_proposals-by-group-policy.md rename to docs/references/cli-docs/empowerd_query_group_proposals-by-group-policy.md diff --git a/docs/cli-docs/empowerd_query_group_tally-result.md b/docs/references/cli-docs/empowerd_query_group_tally-result.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_tally-result.md rename to docs/references/cli-docs/empowerd_query_group_tally-result.md diff --git a/docs/cli-docs/empowerd_query_group_vote.md b/docs/references/cli-docs/empowerd_query_group_vote.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_vote.md rename to docs/references/cli-docs/empowerd_query_group_vote.md diff --git a/docs/cli-docs/empowerd_query_group_votes-by-proposal.md b/docs/references/cli-docs/empowerd_query_group_votes-by-proposal.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_votes-by-proposal.md rename to docs/references/cli-docs/empowerd_query_group_votes-by-proposal.md diff --git a/docs/cli-docs/empowerd_query_group_votes-by-voter.md b/docs/references/cli-docs/empowerd_query_group_votes-by-voter.md similarity index 100% rename from docs/cli-docs/empowerd_query_group_votes-by-voter.md rename to docs/references/cli-docs/empowerd_query_group_votes-by-voter.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee.md b/docs/references/cli-docs/empowerd_query_ibc-fee.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee.md rename to docs/references/cli-docs/empowerd_query_ibc-fee.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_channel.md b/docs/references/cli-docs/empowerd_query_ibc-fee_channel.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_channel.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_channel.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_channels.md b/docs/references/cli-docs/empowerd_query_ibc-fee_channels.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_channels.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_channels.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_counterparty-payee.md b/docs/references/cli-docs/empowerd_query_ibc-fee_counterparty-payee.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_counterparty-payee.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_counterparty-payee.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_packet.md b/docs/references/cli-docs/empowerd_query_ibc-fee_packet.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_packet.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_packet.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_packets-for-channel.md b/docs/references/cli-docs/empowerd_query_ibc-fee_packets-for-channel.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_packets-for-channel.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_packets-for-channel.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_packets.md b/docs/references/cli-docs/empowerd_query_ibc-fee_packets.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_packets.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_packets.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_payee.md b/docs/references/cli-docs/empowerd_query_ibc-fee_payee.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_payee.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_payee.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_total-ack-fees.md b/docs/references/cli-docs/empowerd_query_ibc-fee_total-ack-fees.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_total-ack-fees.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_total-ack-fees.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_total-recv-fees.md b/docs/references/cli-docs/empowerd_query_ibc-fee_total-recv-fees.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_total-recv-fees.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_total-recv-fees.md diff --git a/docs/cli-docs/empowerd_query_ibc-fee_total-timeout-fees.md b/docs/references/cli-docs/empowerd_query_ibc-fee_total-timeout-fees.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-fee_total-timeout-fees.md rename to docs/references/cli-docs/empowerd_query_ibc-fee_total-timeout-fees.md diff --git a/docs/cli-docs/empowerd_query_ibc-transfer.md b/docs/references/cli-docs/empowerd_query_ibc-transfer.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-transfer.md rename to docs/references/cli-docs/empowerd_query_ibc-transfer.md diff --git a/docs/cli-docs/empowerd_query_ibc-transfer_denom-hash.md b/docs/references/cli-docs/empowerd_query_ibc-transfer_denom-hash.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-transfer_denom-hash.md rename to docs/references/cli-docs/empowerd_query_ibc-transfer_denom-hash.md diff --git a/docs/cli-docs/empowerd_query_ibc-transfer_denom-trace.md b/docs/references/cli-docs/empowerd_query_ibc-transfer_denom-trace.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-transfer_denom-trace.md rename to docs/references/cli-docs/empowerd_query_ibc-transfer_denom-trace.md diff --git a/docs/cli-docs/empowerd_query_ibc-transfer_denom-traces.md b/docs/references/cli-docs/empowerd_query_ibc-transfer_denom-traces.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-transfer_denom-traces.md rename to docs/references/cli-docs/empowerd_query_ibc-transfer_denom-traces.md diff --git a/docs/cli-docs/empowerd_query_ibc-transfer_escrow-address.md b/docs/references/cli-docs/empowerd_query_ibc-transfer_escrow-address.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-transfer_escrow-address.md rename to docs/references/cli-docs/empowerd_query_ibc-transfer_escrow-address.md diff --git a/docs/cli-docs/empowerd_query_ibc-transfer_params.md b/docs/references/cli-docs/empowerd_query_ibc-transfer_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc-transfer_params.md rename to docs/references/cli-docs/empowerd_query_ibc-transfer_params.md diff --git a/docs/cli-docs/empowerd_query_ibc.md b/docs/references/cli-docs/empowerd_query_ibc.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc.md rename to docs/references/cli-docs/empowerd_query_ibc.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel.md b/docs/references/cli-docs/empowerd_query_ibc_channel.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel.md rename to docs/references/cli-docs/empowerd_query_ibc_channel.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_channels.md b/docs/references/cli-docs/empowerd_query_ibc_channel_channels.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_channels.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_channels.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_client-state.md b/docs/references/cli-docs/empowerd_query_ibc_channel_client-state.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_client-state.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_client-state.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_connections.md b/docs/references/cli-docs/empowerd_query_ibc_channel_connections.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_connections.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_connections.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_end.md b/docs/references/cli-docs/empowerd_query_ibc_channel_end.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_end.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_end.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_next-sequence-receive.md b/docs/references/cli-docs/empowerd_query_ibc_channel_next-sequence-receive.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_next-sequence-receive.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_next-sequence-receive.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_packet-ack.md b/docs/references/cli-docs/empowerd_query_ibc_channel_packet-ack.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_packet-ack.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_packet-ack.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_packet-commitment.md b/docs/references/cli-docs/empowerd_query_ibc_channel_packet-commitment.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_packet-commitment.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_packet-commitment.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_packet-commitments.md b/docs/references/cli-docs/empowerd_query_ibc_channel_packet-commitments.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_packet-commitments.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_packet-commitments.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_packet-receipt.md b/docs/references/cli-docs/empowerd_query_ibc_channel_packet-receipt.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_packet-receipt.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_packet-receipt.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_unreceived-acks.md b/docs/references/cli-docs/empowerd_query_ibc_channel_unreceived-acks.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_unreceived-acks.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_unreceived-acks.md diff --git a/docs/cli-docs/empowerd_query_ibc_channel_unreceived-packets.md b/docs/references/cli-docs/empowerd_query_ibc_channel_unreceived-packets.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_channel_unreceived-packets.md rename to docs/references/cli-docs/empowerd_query_ibc_channel_unreceived-packets.md diff --git a/docs/cli-docs/empowerd_query_ibc_client.md b/docs/references/cli-docs/empowerd_query_ibc_client.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client.md rename to docs/references/cli-docs/empowerd_query_ibc_client.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_consensus-state-heights.md b/docs/references/cli-docs/empowerd_query_ibc_client_consensus-state-heights.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_consensus-state-heights.md rename to docs/references/cli-docs/empowerd_query_ibc_client_consensus-state-heights.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_consensus-state.md b/docs/references/cli-docs/empowerd_query_ibc_client_consensus-state.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_consensus-state.md rename to docs/references/cli-docs/empowerd_query_ibc_client_consensus-state.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_consensus-states.md b/docs/references/cli-docs/empowerd_query_ibc_client_consensus-states.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_consensus-states.md rename to docs/references/cli-docs/empowerd_query_ibc_client_consensus-states.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_header.md b/docs/references/cli-docs/empowerd_query_ibc_client_header.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_header.md rename to docs/references/cli-docs/empowerd_query_ibc_client_header.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_params.md b/docs/references/cli-docs/empowerd_query_ibc_client_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_params.md rename to docs/references/cli-docs/empowerd_query_ibc_client_params.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_self-consensus-state.md b/docs/references/cli-docs/empowerd_query_ibc_client_self-consensus-state.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_self-consensus-state.md rename to docs/references/cli-docs/empowerd_query_ibc_client_self-consensus-state.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_state.md b/docs/references/cli-docs/empowerd_query_ibc_client_state.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_state.md rename to docs/references/cli-docs/empowerd_query_ibc_client_state.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_states.md b/docs/references/cli-docs/empowerd_query_ibc_client_states.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_states.md rename to docs/references/cli-docs/empowerd_query_ibc_client_states.md diff --git a/docs/cli-docs/empowerd_query_ibc_client_status.md b/docs/references/cli-docs/empowerd_query_ibc_client_status.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_client_status.md rename to docs/references/cli-docs/empowerd_query_ibc_client_status.md diff --git a/docs/cli-docs/empowerd_query_ibc_connection.md b/docs/references/cli-docs/empowerd_query_ibc_connection.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_connection.md rename to docs/references/cli-docs/empowerd_query_ibc_connection.md diff --git a/docs/cli-docs/empowerd_query_ibc_connection_connections.md b/docs/references/cli-docs/empowerd_query_ibc_connection_connections.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_connection_connections.md rename to docs/references/cli-docs/empowerd_query_ibc_connection_connections.md diff --git a/docs/cli-docs/empowerd_query_ibc_connection_end.md b/docs/references/cli-docs/empowerd_query_ibc_connection_end.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_connection_end.md rename to docs/references/cli-docs/empowerd_query_ibc_connection_end.md diff --git a/docs/cli-docs/empowerd_query_ibc_connection_params.md b/docs/references/cli-docs/empowerd_query_ibc_connection_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_connection_params.md rename to docs/references/cli-docs/empowerd_query_ibc_connection_params.md diff --git a/docs/cli-docs/empowerd_query_ibc_connection_path.md b/docs/references/cli-docs/empowerd_query_ibc_connection_path.md similarity index 100% rename from docs/cli-docs/empowerd_query_ibc_connection_path.md rename to docs/references/cli-docs/empowerd_query_ibc_connection_path.md diff --git a/docs/cli-docs/empowerd_query_interchain-accounts.md b/docs/references/cli-docs/empowerd_query_interchain-accounts.md similarity index 100% rename from docs/cli-docs/empowerd_query_interchain-accounts.md rename to docs/references/cli-docs/empowerd_query_interchain-accounts.md diff --git a/docs/cli-docs/empowerd_query_interchain-accounts_controller.md b/docs/references/cli-docs/empowerd_query_interchain-accounts_controller.md similarity index 100% rename from docs/cli-docs/empowerd_query_interchain-accounts_controller.md rename to docs/references/cli-docs/empowerd_query_interchain-accounts_controller.md diff --git a/docs/cli-docs/empowerd_query_interchain-accounts_controller_interchain-account.md b/docs/references/cli-docs/empowerd_query_interchain-accounts_controller_interchain-account.md similarity index 100% rename from docs/cli-docs/empowerd_query_interchain-accounts_controller_interchain-account.md rename to docs/references/cli-docs/empowerd_query_interchain-accounts_controller_interchain-account.md diff --git a/docs/cli-docs/empowerd_query_interchain-accounts_controller_params.md b/docs/references/cli-docs/empowerd_query_interchain-accounts_controller_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_interchain-accounts_controller_params.md rename to docs/references/cli-docs/empowerd_query_interchain-accounts_controller_params.md diff --git a/docs/cli-docs/empowerd_query_interchain-accounts_host.md b/docs/references/cli-docs/empowerd_query_interchain-accounts_host.md similarity index 100% rename from docs/cli-docs/empowerd_query_interchain-accounts_host.md rename to docs/references/cli-docs/empowerd_query_interchain-accounts_host.md diff --git a/docs/cli-docs/empowerd_query_interchain-accounts_host_packet-events.md b/docs/references/cli-docs/empowerd_query_interchain-accounts_host_packet-events.md similarity index 100% rename from docs/cli-docs/empowerd_query_interchain-accounts_host_packet-events.md rename to docs/references/cli-docs/empowerd_query_interchain-accounts_host_packet-events.md diff --git a/docs/cli-docs/empowerd_query_interchain-accounts_host_params.md b/docs/references/cli-docs/empowerd_query_interchain-accounts_host_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_interchain-accounts_host_params.md rename to docs/references/cli-docs/empowerd_query_interchain-accounts_host_params.md diff --git a/docs/cli-docs/empowerd_query_mint.md b/docs/references/cli-docs/empowerd_query_mint.md similarity index 100% rename from docs/cli-docs/empowerd_query_mint.md rename to docs/references/cli-docs/empowerd_query_mint.md diff --git a/docs/cli-docs/empowerd_query_mint_annual-provisions.md b/docs/references/cli-docs/empowerd_query_mint_annual-provisions.md similarity index 100% rename from docs/cli-docs/empowerd_query_mint_annual-provisions.md rename to docs/references/cli-docs/empowerd_query_mint_annual-provisions.md diff --git a/docs/cli-docs/empowerd_query_mint_inflation.md b/docs/references/cli-docs/empowerd_query_mint_inflation.md similarity index 100% rename from docs/cli-docs/empowerd_query_mint_inflation.md rename to docs/references/cli-docs/empowerd_query_mint_inflation.md diff --git a/docs/cli-docs/empowerd_query_mint_params.md b/docs/references/cli-docs/empowerd_query_mint_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_mint_params.md rename to docs/references/cli-docs/empowerd_query_mint_params.md diff --git a/docs/cli-docs/empowerd_query_params.md b/docs/references/cli-docs/empowerd_query_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_params.md rename to docs/references/cli-docs/empowerd_query_params.md diff --git a/docs/cli-docs/empowerd_query_params_subspace.md b/docs/references/cli-docs/empowerd_query_params_subspace.md similarity index 100% rename from docs/cli-docs/empowerd_query_params_subspace.md rename to docs/references/cli-docs/empowerd_query_params_subspace.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit.md b/docs/references/cli-docs/empowerd_query_plasticcredit.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit.md rename to docs/references/cli-docs/empowerd_query_plasticcredit.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_applicant.md b/docs/references/cli-docs/empowerd_query_plasticcredit_applicant.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_applicant.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_applicant.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_credit-balance.md b/docs/references/cli-docs/empowerd_query_plasticcredit_credit-balance.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_credit-balance.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_credit-balance.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_credit-collection.md b/docs/references/cli-docs/empowerd_query_plasticcredit_credit-collection.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_credit-collection.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_credit-collection.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_credit-type.md b/docs/references/cli-docs/empowerd_query_plasticcredit_credit-type.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_credit-type.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_credit-type.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_credit-types.md b/docs/references/cli-docs/empowerd_query_plasticcredit_credit-types.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_credit-types.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_credit-types.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_issuer.md b/docs/references/cli-docs/empowerd_query_plasticcredit_issuer.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_issuer.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_issuer.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_issuers.md b/docs/references/cli-docs/empowerd_query_plasticcredit_issuers.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_issuers.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_issuers.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_params.md b/docs/references/cli-docs/empowerd_query_plasticcredit_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_params.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_params.md diff --git a/docs/cli-docs/empowerd_query_plasticcredit_project.md b/docs/references/cli-docs/empowerd_query_plasticcredit_project.md similarity index 100% rename from docs/cli-docs/empowerd_query_plasticcredit_project.md rename to docs/references/cli-docs/empowerd_query_plasticcredit_project.md diff --git a/docs/cli-docs/empowerd_query_proofofexistence.md b/docs/references/cli-docs/empowerd_query_proofofexistence.md similarity index 100% rename from docs/cli-docs/empowerd_query_proofofexistence.md rename to docs/references/cli-docs/empowerd_query_proofofexistence.md diff --git a/docs/cli-docs/empowerd_query_proofofexistence_proof.md b/docs/references/cli-docs/empowerd_query_proofofexistence_proof.md similarity index 100% rename from docs/cli-docs/empowerd_query_proofofexistence_proof.md rename to docs/references/cli-docs/empowerd_query_proofofexistence_proof.md diff --git a/docs/cli-docs/empowerd_query_slashing.md b/docs/references/cli-docs/empowerd_query_slashing.md similarity index 100% rename from docs/cli-docs/empowerd_query_slashing.md rename to docs/references/cli-docs/empowerd_query_slashing.md diff --git a/docs/cli-docs/empowerd_query_slashing_params.md b/docs/references/cli-docs/empowerd_query_slashing_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_slashing_params.md rename to docs/references/cli-docs/empowerd_query_slashing_params.md diff --git a/docs/cli-docs/empowerd_query_slashing_signing-info.md b/docs/references/cli-docs/empowerd_query_slashing_signing-info.md similarity index 100% rename from docs/cli-docs/empowerd_query_slashing_signing-info.md rename to docs/references/cli-docs/empowerd_query_slashing_signing-info.md diff --git a/docs/cli-docs/empowerd_query_slashing_signing-infos.md b/docs/references/cli-docs/empowerd_query_slashing_signing-infos.md similarity index 100% rename from docs/cli-docs/empowerd_query_slashing_signing-infos.md rename to docs/references/cli-docs/empowerd_query_slashing_signing-infos.md diff --git a/docs/cli-docs/empowerd_query_staking.md b/docs/references/cli-docs/empowerd_query_staking.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking.md rename to docs/references/cli-docs/empowerd_query_staking.md diff --git a/docs/cli-docs/empowerd_query_staking_delegation.md b/docs/references/cli-docs/empowerd_query_staking_delegation.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_delegation.md rename to docs/references/cli-docs/empowerd_query_staking_delegation.md diff --git a/docs/cli-docs/empowerd_query_staking_delegations-to.md b/docs/references/cli-docs/empowerd_query_staking_delegations-to.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_delegations-to.md rename to docs/references/cli-docs/empowerd_query_staking_delegations-to.md diff --git a/docs/cli-docs/empowerd_query_staking_delegations.md b/docs/references/cli-docs/empowerd_query_staking_delegations.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_delegations.md rename to docs/references/cli-docs/empowerd_query_staking_delegations.md diff --git a/docs/cli-docs/empowerd_query_staking_historical-info.md b/docs/references/cli-docs/empowerd_query_staking_historical-info.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_historical-info.md rename to docs/references/cli-docs/empowerd_query_staking_historical-info.md diff --git a/docs/cli-docs/empowerd_query_staking_params.md b/docs/references/cli-docs/empowerd_query_staking_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_params.md rename to docs/references/cli-docs/empowerd_query_staking_params.md diff --git a/docs/cli-docs/empowerd_query_staking_pool.md b/docs/references/cli-docs/empowerd_query_staking_pool.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_pool.md rename to docs/references/cli-docs/empowerd_query_staking_pool.md diff --git a/docs/cli-docs/empowerd_query_staking_redelegation.md b/docs/references/cli-docs/empowerd_query_staking_redelegation.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_redelegation.md rename to docs/references/cli-docs/empowerd_query_staking_redelegation.md diff --git a/docs/cli-docs/empowerd_query_staking_redelegations-from.md b/docs/references/cli-docs/empowerd_query_staking_redelegations-from.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_redelegations-from.md rename to docs/references/cli-docs/empowerd_query_staking_redelegations-from.md diff --git a/docs/cli-docs/empowerd_query_staking_redelegations.md b/docs/references/cli-docs/empowerd_query_staking_redelegations.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_redelegations.md rename to docs/references/cli-docs/empowerd_query_staking_redelegations.md diff --git a/docs/cli-docs/empowerd_query_staking_unbonding-delegation.md b/docs/references/cli-docs/empowerd_query_staking_unbonding-delegation.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_unbonding-delegation.md rename to docs/references/cli-docs/empowerd_query_staking_unbonding-delegation.md diff --git a/docs/cli-docs/empowerd_query_staking_unbonding-delegations-from.md b/docs/references/cli-docs/empowerd_query_staking_unbonding-delegations-from.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_unbonding-delegations-from.md rename to docs/references/cli-docs/empowerd_query_staking_unbonding-delegations-from.md diff --git a/docs/cli-docs/empowerd_query_staking_unbonding-delegations.md b/docs/references/cli-docs/empowerd_query_staking_unbonding-delegations.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_unbonding-delegations.md rename to docs/references/cli-docs/empowerd_query_staking_unbonding-delegations.md diff --git a/docs/cli-docs/empowerd_query_staking_validator.md b/docs/references/cli-docs/empowerd_query_staking_validator.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_validator.md rename to docs/references/cli-docs/empowerd_query_staking_validator.md diff --git a/docs/cli-docs/empowerd_query_staking_validators.md b/docs/references/cli-docs/empowerd_query_staking_validators.md similarity index 100% rename from docs/cli-docs/empowerd_query_staking_validators.md rename to docs/references/cli-docs/empowerd_query_staking_validators.md diff --git a/docs/cli-docs/empowerd_query_tendermint-validator-set.md b/docs/references/cli-docs/empowerd_query_tendermint-validator-set.md similarity index 100% rename from docs/cli-docs/empowerd_query_tendermint-validator-set.md rename to docs/references/cli-docs/empowerd_query_tendermint-validator-set.md diff --git a/docs/cli-docs/empowerd_query_tx.md b/docs/references/cli-docs/empowerd_query_tx.md similarity index 100% rename from docs/cli-docs/empowerd_query_tx.md rename to docs/references/cli-docs/empowerd_query_tx.md diff --git a/docs/cli-docs/empowerd_query_txs.md b/docs/references/cli-docs/empowerd_query_txs.md similarity index 100% rename from docs/cli-docs/empowerd_query_txs.md rename to docs/references/cli-docs/empowerd_query_txs.md diff --git a/docs/cli-docs/empowerd_query_upgrade.md b/docs/references/cli-docs/empowerd_query_upgrade.md similarity index 100% rename from docs/cli-docs/empowerd_query_upgrade.md rename to docs/references/cli-docs/empowerd_query_upgrade.md diff --git a/docs/cli-docs/empowerd_query_upgrade_applied.md b/docs/references/cli-docs/empowerd_query_upgrade_applied.md similarity index 100% rename from docs/cli-docs/empowerd_query_upgrade_applied.md rename to docs/references/cli-docs/empowerd_query_upgrade_applied.md diff --git a/docs/cli-docs/empowerd_query_upgrade_module_versions.md b/docs/references/cli-docs/empowerd_query_upgrade_module_versions.md similarity index 100% rename from docs/cli-docs/empowerd_query_upgrade_module_versions.md rename to docs/references/cli-docs/empowerd_query_upgrade_module_versions.md diff --git a/docs/cli-docs/empowerd_query_upgrade_plan.md b/docs/references/cli-docs/empowerd_query_upgrade_plan.md similarity index 100% rename from docs/cli-docs/empowerd_query_upgrade_plan.md rename to docs/references/cli-docs/empowerd_query_upgrade_plan.md diff --git a/docs/cli-docs/empowerd_query_wasm.md b/docs/references/cli-docs/empowerd_query_wasm.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm.md rename to docs/references/cli-docs/empowerd_query_wasm.md diff --git a/docs/cli-docs/empowerd_query_wasm_build-address.md b/docs/references/cli-docs/empowerd_query_wasm_build-address.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_build-address.md rename to docs/references/cli-docs/empowerd_query_wasm_build-address.md diff --git a/docs/cli-docs/empowerd_query_wasm_code-info.md b/docs/references/cli-docs/empowerd_query_wasm_code-info.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_code-info.md rename to docs/references/cli-docs/empowerd_query_wasm_code-info.md diff --git a/docs/cli-docs/empowerd_query_wasm_code.md b/docs/references/cli-docs/empowerd_query_wasm_code.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_code.md rename to docs/references/cli-docs/empowerd_query_wasm_code.md diff --git a/docs/cli-docs/empowerd_query_wasm_contract-history.md b/docs/references/cli-docs/empowerd_query_wasm_contract-history.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_contract-history.md rename to docs/references/cli-docs/empowerd_query_wasm_contract-history.md diff --git a/docs/cli-docs/empowerd_query_wasm_contract-state.md b/docs/references/cli-docs/empowerd_query_wasm_contract-state.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_contract-state.md rename to docs/references/cli-docs/empowerd_query_wasm_contract-state.md diff --git a/docs/cli-docs/empowerd_query_wasm_contract-state_all.md b/docs/references/cli-docs/empowerd_query_wasm_contract-state_all.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_contract-state_all.md rename to docs/references/cli-docs/empowerd_query_wasm_contract-state_all.md diff --git a/docs/cli-docs/empowerd_query_wasm_contract-state_raw.md b/docs/references/cli-docs/empowerd_query_wasm_contract-state_raw.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_contract-state_raw.md rename to docs/references/cli-docs/empowerd_query_wasm_contract-state_raw.md diff --git a/docs/cli-docs/empowerd_query_wasm_contract-state_smart.md b/docs/references/cli-docs/empowerd_query_wasm_contract-state_smart.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_contract-state_smart.md rename to docs/references/cli-docs/empowerd_query_wasm_contract-state_smart.md diff --git a/docs/cli-docs/empowerd_query_wasm_contract.md b/docs/references/cli-docs/empowerd_query_wasm_contract.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_contract.md rename to docs/references/cli-docs/empowerd_query_wasm_contract.md diff --git a/docs/cli-docs/empowerd_query_wasm_libwasmvm-version.md b/docs/references/cli-docs/empowerd_query_wasm_libwasmvm-version.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_libwasmvm-version.md rename to docs/references/cli-docs/empowerd_query_wasm_libwasmvm-version.md diff --git a/docs/cli-docs/empowerd_query_wasm_list-code.md b/docs/references/cli-docs/empowerd_query_wasm_list-code.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_list-code.md rename to docs/references/cli-docs/empowerd_query_wasm_list-code.md diff --git a/docs/cli-docs/empowerd_query_wasm_list-contract-by-code.md b/docs/references/cli-docs/empowerd_query_wasm_list-contract-by-code.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_list-contract-by-code.md rename to docs/references/cli-docs/empowerd_query_wasm_list-contract-by-code.md diff --git a/docs/cli-docs/empowerd_query_wasm_list-contracts-by-creator.md b/docs/references/cli-docs/empowerd_query_wasm_list-contracts-by-creator.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_list-contracts-by-creator.md rename to docs/references/cli-docs/empowerd_query_wasm_list-contracts-by-creator.md diff --git a/docs/cli-docs/empowerd_query_wasm_params.md b/docs/references/cli-docs/empowerd_query_wasm_params.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_params.md rename to docs/references/cli-docs/empowerd_query_wasm_params.md diff --git a/docs/cli-docs/empowerd_query_wasm_pinned.md b/docs/references/cli-docs/empowerd_query_wasm_pinned.md similarity index 100% rename from docs/cli-docs/empowerd_query_wasm_pinned.md rename to docs/references/cli-docs/empowerd_query_wasm_pinned.md diff --git a/docs/cli-docs/empowerd_rollback.md b/docs/references/cli-docs/empowerd_rollback.md similarity index 100% rename from docs/cli-docs/empowerd_rollback.md rename to docs/references/cli-docs/empowerd_rollback.md diff --git a/docs/cli-docs/empowerd_rosetta.md b/docs/references/cli-docs/empowerd_rosetta.md similarity index 100% rename from docs/cli-docs/empowerd_rosetta.md rename to docs/references/cli-docs/empowerd_rosetta.md diff --git a/docs/cli-docs/empowerd_start.md b/docs/references/cli-docs/empowerd_start.md similarity index 100% rename from docs/cli-docs/empowerd_start.md rename to docs/references/cli-docs/empowerd_start.md diff --git a/docs/cli-docs/empowerd_status.md b/docs/references/cli-docs/empowerd_status.md similarity index 100% rename from docs/cli-docs/empowerd_status.md rename to docs/references/cli-docs/empowerd_status.md diff --git a/docs/cli-docs/empowerd_tendermint.md b/docs/references/cli-docs/empowerd_tendermint.md similarity index 84% rename from docs/cli-docs/empowerd_tendermint.md rename to docs/references/cli-docs/empowerd_tendermint.md index ccb2b6568..2c23248ee 100644 --- a/docs/cli-docs/empowerd_tendermint.md +++ b/docs/references/cli-docs/empowerd_tendermint.md @@ -11,6 +11,7 @@ Tendermint subcommands ### SEE ALSO * [empowerd](empowerd.md) - EmpowerChain CLI +* [empowerd tendermint bootstrap-state](empowerd_tendermint_bootstrap-state.md) - Bootstrap CometBFT state at an arbitrary block height using a light client * [empowerd tendermint reset-state](empowerd_tendermint_reset-state.md) - Remove all the data and WAL * [empowerd tendermint show-address](empowerd_tendermint_show-address.md) - Shows this node's tendermint validator consensus address * [empowerd tendermint show-node-id](empowerd_tendermint_show-node-id.md) - Show this node's ID diff --git a/docs/references/cli-docs/empowerd_tendermint_bootstrap-state.md b/docs/references/cli-docs/empowerd_tendermint_bootstrap-state.md new file mode 100644 index 000000000..a02a4fb37 --- /dev/null +++ b/docs/references/cli-docs/empowerd_tendermint_bootstrap-state.md @@ -0,0 +1,19 @@ +## empowerd tendermint bootstrap-state + +Bootstrap CometBFT state at an arbitrary block height using a light client + +``` +empowerd tendermint bootstrap-state [flags] +``` + +### Options + +``` + --height int Block height to bootstrap state at, if not provided it uses the latest block height in app state + -h, --help help for bootstrap-state +``` + +### SEE ALSO + +* [empowerd tendermint](empowerd_tendermint.md) - Tendermint subcommands + diff --git a/docs/cli-docs/empowerd_tendermint_reset-state.md b/docs/references/cli-docs/empowerd_tendermint_reset-state.md similarity index 100% rename from docs/cli-docs/empowerd_tendermint_reset-state.md rename to docs/references/cli-docs/empowerd_tendermint_reset-state.md diff --git a/docs/cli-docs/empowerd_tendermint_show-address.md b/docs/references/cli-docs/empowerd_tendermint_show-address.md similarity index 100% rename from docs/cli-docs/empowerd_tendermint_show-address.md rename to docs/references/cli-docs/empowerd_tendermint_show-address.md diff --git a/docs/cli-docs/empowerd_tendermint_show-node-id.md b/docs/references/cli-docs/empowerd_tendermint_show-node-id.md similarity index 100% rename from docs/cli-docs/empowerd_tendermint_show-node-id.md rename to docs/references/cli-docs/empowerd_tendermint_show-node-id.md diff --git a/docs/cli-docs/empowerd_tendermint_show-validator.md b/docs/references/cli-docs/empowerd_tendermint_show-validator.md similarity index 100% rename from docs/cli-docs/empowerd_tendermint_show-validator.md rename to docs/references/cli-docs/empowerd_tendermint_show-validator.md diff --git a/docs/cli-docs/empowerd_tendermint_unsafe-reset-all.md b/docs/references/cli-docs/empowerd_tendermint_unsafe-reset-all.md similarity index 100% rename from docs/cli-docs/empowerd_tendermint_unsafe-reset-all.md rename to docs/references/cli-docs/empowerd_tendermint_unsafe-reset-all.md diff --git a/docs/cli-docs/empowerd_tendermint_version.md b/docs/references/cli-docs/empowerd_tendermint_version.md similarity index 100% rename from docs/cli-docs/empowerd_tendermint_version.md rename to docs/references/cli-docs/empowerd_tendermint_version.md diff --git a/docs/cli-docs/empowerd_tx.md b/docs/references/cli-docs/empowerd_tx.md similarity index 100% rename from docs/cli-docs/empowerd_tx.md rename to docs/references/cli-docs/empowerd_tx.md diff --git a/docs/cli-docs/empowerd_tx_authz.md b/docs/references/cli-docs/empowerd_tx_authz.md similarity index 100% rename from docs/cli-docs/empowerd_tx_authz.md rename to docs/references/cli-docs/empowerd_tx_authz.md diff --git a/docs/cli-docs/empowerd_tx_authz_exec.md b/docs/references/cli-docs/empowerd_tx_authz_exec.md similarity index 100% rename from docs/cli-docs/empowerd_tx_authz_exec.md rename to docs/references/cli-docs/empowerd_tx_authz_exec.md diff --git a/docs/cli-docs/empowerd_tx_authz_grant.md b/docs/references/cli-docs/empowerd_tx_authz_grant.md similarity index 100% rename from docs/cli-docs/empowerd_tx_authz_grant.md rename to docs/references/cli-docs/empowerd_tx_authz_grant.md diff --git a/docs/cli-docs/empowerd_tx_authz_revoke.md b/docs/references/cli-docs/empowerd_tx_authz_revoke.md similarity index 100% rename from docs/cli-docs/empowerd_tx_authz_revoke.md rename to docs/references/cli-docs/empowerd_tx_authz_revoke.md diff --git a/docs/cli-docs/empowerd_tx_aux-to-fee.md b/docs/references/cli-docs/empowerd_tx_aux-to-fee.md similarity index 100% rename from docs/cli-docs/empowerd_tx_aux-to-fee.md rename to docs/references/cli-docs/empowerd_tx_aux-to-fee.md diff --git a/docs/cli-docs/empowerd_tx_bank.md b/docs/references/cli-docs/empowerd_tx_bank.md similarity index 100% rename from docs/cli-docs/empowerd_tx_bank.md rename to docs/references/cli-docs/empowerd_tx_bank.md diff --git a/docs/cli-docs/empowerd_tx_bank_multi-send.md b/docs/references/cli-docs/empowerd_tx_bank_multi-send.md similarity index 100% rename from docs/cli-docs/empowerd_tx_bank_multi-send.md rename to docs/references/cli-docs/empowerd_tx_bank_multi-send.md diff --git a/docs/cli-docs/empowerd_tx_bank_send.md b/docs/references/cli-docs/empowerd_tx_bank_send.md similarity index 100% rename from docs/cli-docs/empowerd_tx_bank_send.md rename to docs/references/cli-docs/empowerd_tx_bank_send.md diff --git a/docs/cli-docs/empowerd_tx_broadcast.md b/docs/references/cli-docs/empowerd_tx_broadcast.md similarity index 100% rename from docs/cli-docs/empowerd_tx_broadcast.md rename to docs/references/cli-docs/empowerd_tx_broadcast.md diff --git a/docs/cli-docs/empowerd_tx_certificates.md b/docs/references/cli-docs/empowerd_tx_certificates.md similarity index 100% rename from docs/cli-docs/empowerd_tx_certificates.md rename to docs/references/cli-docs/empowerd_tx_certificates.md diff --git a/docs/cli-docs/empowerd_tx_certificates_create-certificate.md b/docs/references/cli-docs/empowerd_tx_certificates_create-certificate.md similarity index 100% rename from docs/cli-docs/empowerd_tx_certificates_create-certificate.md rename to docs/references/cli-docs/empowerd_tx_certificates_create-certificate.md diff --git a/docs/cli-docs/empowerd_tx_crisis.md b/docs/references/cli-docs/empowerd_tx_crisis.md similarity index 100% rename from docs/cli-docs/empowerd_tx_crisis.md rename to docs/references/cli-docs/empowerd_tx_crisis.md diff --git a/docs/cli-docs/empowerd_tx_crisis_invariant-broken.md b/docs/references/cli-docs/empowerd_tx_crisis_invariant-broken.md similarity index 100% rename from docs/cli-docs/empowerd_tx_crisis_invariant-broken.md rename to docs/references/cli-docs/empowerd_tx_crisis_invariant-broken.md diff --git a/docs/cli-docs/empowerd_tx_decode.md b/docs/references/cli-docs/empowerd_tx_decode.md similarity index 100% rename from docs/cli-docs/empowerd_tx_decode.md rename to docs/references/cli-docs/empowerd_tx_decode.md diff --git a/docs/cli-docs/empowerd_tx_distribution.md b/docs/references/cli-docs/empowerd_tx_distribution.md similarity index 100% rename from docs/cli-docs/empowerd_tx_distribution.md rename to docs/references/cli-docs/empowerd_tx_distribution.md diff --git a/docs/cli-docs/empowerd_tx_distribution_fund-community-pool.md b/docs/references/cli-docs/empowerd_tx_distribution_fund-community-pool.md similarity index 100% rename from docs/cli-docs/empowerd_tx_distribution_fund-community-pool.md rename to docs/references/cli-docs/empowerd_tx_distribution_fund-community-pool.md diff --git a/docs/cli-docs/empowerd_tx_distribution_set-withdraw-addr.md b/docs/references/cli-docs/empowerd_tx_distribution_set-withdraw-addr.md similarity index 100% rename from docs/cli-docs/empowerd_tx_distribution_set-withdraw-addr.md rename to docs/references/cli-docs/empowerd_tx_distribution_set-withdraw-addr.md diff --git a/docs/cli-docs/empowerd_tx_distribution_withdraw-all-rewards.md b/docs/references/cli-docs/empowerd_tx_distribution_withdraw-all-rewards.md similarity index 100% rename from docs/cli-docs/empowerd_tx_distribution_withdraw-all-rewards.md rename to docs/references/cli-docs/empowerd_tx_distribution_withdraw-all-rewards.md diff --git a/docs/cli-docs/empowerd_tx_distribution_withdraw-rewards.md b/docs/references/cli-docs/empowerd_tx_distribution_withdraw-rewards.md similarity index 100% rename from docs/cli-docs/empowerd_tx_distribution_withdraw-rewards.md rename to docs/references/cli-docs/empowerd_tx_distribution_withdraw-rewards.md diff --git a/docs/cli-docs/empowerd_tx_encode.md b/docs/references/cli-docs/empowerd_tx_encode.md similarity index 100% rename from docs/cli-docs/empowerd_tx_encode.md rename to docs/references/cli-docs/empowerd_tx_encode.md diff --git a/docs/cli-docs/empowerd_tx_evidence.md b/docs/references/cli-docs/empowerd_tx_evidence.md similarity index 100% rename from docs/cli-docs/empowerd_tx_evidence.md rename to docs/references/cli-docs/empowerd_tx_evidence.md diff --git a/docs/cli-docs/empowerd_tx_feegrant.md b/docs/references/cli-docs/empowerd_tx_feegrant.md similarity index 100% rename from docs/cli-docs/empowerd_tx_feegrant.md rename to docs/references/cli-docs/empowerd_tx_feegrant.md diff --git a/docs/cli-docs/empowerd_tx_feegrant_grant.md b/docs/references/cli-docs/empowerd_tx_feegrant_grant.md similarity index 100% rename from docs/cli-docs/empowerd_tx_feegrant_grant.md rename to docs/references/cli-docs/empowerd_tx_feegrant_grant.md diff --git a/docs/cli-docs/empowerd_tx_feegrant_revoke.md b/docs/references/cli-docs/empowerd_tx_feegrant_revoke.md similarity index 100% rename from docs/cli-docs/empowerd_tx_feegrant_revoke.md rename to docs/references/cli-docs/empowerd_tx_feegrant_revoke.md diff --git a/docs/cli-docs/empowerd_tx_gov.md b/docs/references/cli-docs/empowerd_tx_gov.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov.md rename to docs/references/cli-docs/empowerd_tx_gov.md diff --git a/docs/cli-docs/empowerd_tx_gov_deposit.md b/docs/references/cli-docs/empowerd_tx_gov_deposit.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_deposit.md rename to docs/references/cli-docs/empowerd_tx_gov_deposit.md diff --git a/docs/cli-docs/empowerd_tx_gov_draft-proposal.md b/docs/references/cli-docs/empowerd_tx_gov_draft-proposal.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_draft-proposal.md rename to docs/references/cli-docs/empowerd_tx_gov_draft-proposal.md diff --git a/docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal.md b/docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal.md rename to docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal.md diff --git a/docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_cancel-software-upgrade.md b/docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_cancel-software-upgrade.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_cancel-software-upgrade.md rename to docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_cancel-software-upgrade.md diff --git a/docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_ibc-upgrade.md b/docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_ibc-upgrade.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_ibc-upgrade.md rename to docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_ibc-upgrade.md diff --git a/docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_param-change.md b/docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_param-change.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_param-change.md rename to docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_param-change.md diff --git a/docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_software-upgrade.md b/docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_software-upgrade.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_software-upgrade.md rename to docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_software-upgrade.md diff --git a/docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_update-client.md b/docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_update-client.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_submit-legacy-proposal_update-client.md rename to docs/references/cli-docs/empowerd_tx_gov_submit-legacy-proposal_update-client.md diff --git a/docs/cli-docs/empowerd_tx_gov_submit-proposal.md b/docs/references/cli-docs/empowerd_tx_gov_submit-proposal.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_submit-proposal.md rename to docs/references/cli-docs/empowerd_tx_gov_submit-proposal.md diff --git a/docs/cli-docs/empowerd_tx_gov_vote.md b/docs/references/cli-docs/empowerd_tx_gov_vote.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_vote.md rename to docs/references/cli-docs/empowerd_tx_gov_vote.md diff --git a/docs/cli-docs/empowerd_tx_gov_weighted-vote.md b/docs/references/cli-docs/empowerd_tx_gov_weighted-vote.md similarity index 100% rename from docs/cli-docs/empowerd_tx_gov_weighted-vote.md rename to docs/references/cli-docs/empowerd_tx_gov_weighted-vote.md diff --git a/docs/cli-docs/empowerd_tx_group.md b/docs/references/cli-docs/empowerd_tx_group.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group.md rename to docs/references/cli-docs/empowerd_tx_group.md diff --git a/docs/cli-docs/empowerd_tx_group_create-group-policy.md b/docs/references/cli-docs/empowerd_tx_group_create-group-policy.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_create-group-policy.md rename to docs/references/cli-docs/empowerd_tx_group_create-group-policy.md diff --git a/docs/cli-docs/empowerd_tx_group_create-group-with-policy.md b/docs/references/cli-docs/empowerd_tx_group_create-group-with-policy.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_create-group-with-policy.md rename to docs/references/cli-docs/empowerd_tx_group_create-group-with-policy.md diff --git a/docs/cli-docs/empowerd_tx_group_create-group.md b/docs/references/cli-docs/empowerd_tx_group_create-group.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_create-group.md rename to docs/references/cli-docs/empowerd_tx_group_create-group.md diff --git a/docs/cli-docs/empowerd_tx_group_draft-proposal.md b/docs/references/cli-docs/empowerd_tx_group_draft-proposal.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_draft-proposal.md rename to docs/references/cli-docs/empowerd_tx_group_draft-proposal.md diff --git a/docs/cli-docs/empowerd_tx_group_exec.md b/docs/references/cli-docs/empowerd_tx_group_exec.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_exec.md rename to docs/references/cli-docs/empowerd_tx_group_exec.md diff --git a/docs/cli-docs/empowerd_tx_group_leave-group.md b/docs/references/cli-docs/empowerd_tx_group_leave-group.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_leave-group.md rename to docs/references/cli-docs/empowerd_tx_group_leave-group.md diff --git a/docs/cli-docs/empowerd_tx_group_submit-proposal.md b/docs/references/cli-docs/empowerd_tx_group_submit-proposal.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_submit-proposal.md rename to docs/references/cli-docs/empowerd_tx_group_submit-proposal.md diff --git a/docs/cli-docs/empowerd_tx_group_update-group-admin.md b/docs/references/cli-docs/empowerd_tx_group_update-group-admin.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_update-group-admin.md rename to docs/references/cli-docs/empowerd_tx_group_update-group-admin.md diff --git a/docs/cli-docs/empowerd_tx_group_update-group-members.md b/docs/references/cli-docs/empowerd_tx_group_update-group-members.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_update-group-members.md rename to docs/references/cli-docs/empowerd_tx_group_update-group-members.md diff --git a/docs/cli-docs/empowerd_tx_group_update-group-metadata.md b/docs/references/cli-docs/empowerd_tx_group_update-group-metadata.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_update-group-metadata.md rename to docs/references/cli-docs/empowerd_tx_group_update-group-metadata.md diff --git a/docs/cli-docs/empowerd_tx_group_update-group-policy-admin.md b/docs/references/cli-docs/empowerd_tx_group_update-group-policy-admin.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_update-group-policy-admin.md rename to docs/references/cli-docs/empowerd_tx_group_update-group-policy-admin.md diff --git a/docs/cli-docs/empowerd_tx_group_update-group-policy-decision-policy.md b/docs/references/cli-docs/empowerd_tx_group_update-group-policy-decision-policy.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_update-group-policy-decision-policy.md rename to docs/references/cli-docs/empowerd_tx_group_update-group-policy-decision-policy.md diff --git a/docs/cli-docs/empowerd_tx_group_update-group-policy-metadata.md b/docs/references/cli-docs/empowerd_tx_group_update-group-policy-metadata.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_update-group-policy-metadata.md rename to docs/references/cli-docs/empowerd_tx_group_update-group-policy-metadata.md diff --git a/docs/cli-docs/empowerd_tx_group_vote.md b/docs/references/cli-docs/empowerd_tx_group_vote.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_vote.md rename to docs/references/cli-docs/empowerd_tx_group_vote.md diff --git a/docs/cli-docs/empowerd_tx_group_withdraw-proposal.md b/docs/references/cli-docs/empowerd_tx_group_withdraw-proposal.md similarity index 100% rename from docs/cli-docs/empowerd_tx_group_withdraw-proposal.md rename to docs/references/cli-docs/empowerd_tx_group_withdraw-proposal.md diff --git a/docs/cli-docs/empowerd_tx_ibc-fee.md b/docs/references/cli-docs/empowerd_tx_ibc-fee.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc-fee.md rename to docs/references/cli-docs/empowerd_tx_ibc-fee.md diff --git a/docs/cli-docs/empowerd_tx_ibc-fee_pay-packet-fee.md b/docs/references/cli-docs/empowerd_tx_ibc-fee_pay-packet-fee.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc-fee_pay-packet-fee.md rename to docs/references/cli-docs/empowerd_tx_ibc-fee_pay-packet-fee.md diff --git a/docs/cli-docs/empowerd_tx_ibc-fee_register-counterparty-payee.md b/docs/references/cli-docs/empowerd_tx_ibc-fee_register-counterparty-payee.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc-fee_register-counterparty-payee.md rename to docs/references/cli-docs/empowerd_tx_ibc-fee_register-counterparty-payee.md diff --git a/docs/cli-docs/empowerd_tx_ibc-fee_register-payee.md b/docs/references/cli-docs/empowerd_tx_ibc-fee_register-payee.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc-fee_register-payee.md rename to docs/references/cli-docs/empowerd_tx_ibc-fee_register-payee.md diff --git a/docs/cli-docs/empowerd_tx_ibc-transfer.md b/docs/references/cli-docs/empowerd_tx_ibc-transfer.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc-transfer.md rename to docs/references/cli-docs/empowerd_tx_ibc-transfer.md diff --git a/docs/cli-docs/empowerd_tx_ibc-transfer_transfer.md b/docs/references/cli-docs/empowerd_tx_ibc-transfer_transfer.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc-transfer_transfer.md rename to docs/references/cli-docs/empowerd_tx_ibc-transfer_transfer.md diff --git a/docs/cli-docs/empowerd_tx_ibc.md b/docs/references/cli-docs/empowerd_tx_ibc.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc.md rename to docs/references/cli-docs/empowerd_tx_ibc.md diff --git a/docs/cli-docs/empowerd_tx_ibc_channel.md b/docs/references/cli-docs/empowerd_tx_ibc_channel.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc_channel.md rename to docs/references/cli-docs/empowerd_tx_ibc_channel.md diff --git a/docs/cli-docs/empowerd_tx_ibc_client.md b/docs/references/cli-docs/empowerd_tx_ibc_client.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc_client.md rename to docs/references/cli-docs/empowerd_tx_ibc_client.md diff --git a/docs/cli-docs/empowerd_tx_ibc_client_create.md b/docs/references/cli-docs/empowerd_tx_ibc_client_create.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc_client_create.md rename to docs/references/cli-docs/empowerd_tx_ibc_client_create.md diff --git a/docs/cli-docs/empowerd_tx_ibc_client_misbehaviour.md b/docs/references/cli-docs/empowerd_tx_ibc_client_misbehaviour.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc_client_misbehaviour.md rename to docs/references/cli-docs/empowerd_tx_ibc_client_misbehaviour.md diff --git a/docs/cli-docs/empowerd_tx_ibc_client_update.md b/docs/references/cli-docs/empowerd_tx_ibc_client_update.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc_client_update.md rename to docs/references/cli-docs/empowerd_tx_ibc_client_update.md diff --git a/docs/cli-docs/empowerd_tx_ibc_client_upgrade.md b/docs/references/cli-docs/empowerd_tx_ibc_client_upgrade.md similarity index 100% rename from docs/cli-docs/empowerd_tx_ibc_client_upgrade.md rename to docs/references/cli-docs/empowerd_tx_ibc_client_upgrade.md diff --git a/docs/cli-docs/empowerd_tx_interchain-accounts.md b/docs/references/cli-docs/empowerd_tx_interchain-accounts.md similarity index 100% rename from docs/cli-docs/empowerd_tx_interchain-accounts.md rename to docs/references/cli-docs/empowerd_tx_interchain-accounts.md diff --git a/docs/cli-docs/empowerd_tx_interchain-accounts_controller.md b/docs/references/cli-docs/empowerd_tx_interchain-accounts_controller.md similarity index 100% rename from docs/cli-docs/empowerd_tx_interchain-accounts_controller.md rename to docs/references/cli-docs/empowerd_tx_interchain-accounts_controller.md diff --git a/docs/cli-docs/empowerd_tx_interchain-accounts_controller_register.md b/docs/references/cli-docs/empowerd_tx_interchain-accounts_controller_register.md similarity index 100% rename from docs/cli-docs/empowerd_tx_interchain-accounts_controller_register.md rename to docs/references/cli-docs/empowerd_tx_interchain-accounts_controller_register.md diff --git a/docs/cli-docs/empowerd_tx_interchain-accounts_controller_send-tx.md b/docs/references/cli-docs/empowerd_tx_interchain-accounts_controller_send-tx.md similarity index 100% rename from docs/cli-docs/empowerd_tx_interchain-accounts_controller_send-tx.md rename to docs/references/cli-docs/empowerd_tx_interchain-accounts_controller_send-tx.md diff --git a/docs/cli-docs/empowerd_tx_interchain-accounts_host.md b/docs/references/cli-docs/empowerd_tx_interchain-accounts_host.md similarity index 100% rename from docs/cli-docs/empowerd_tx_interchain-accounts_host.md rename to docs/references/cli-docs/empowerd_tx_interchain-accounts_host.md diff --git a/docs/cli-docs/empowerd_tx_interchain-accounts_host_generate-packet-data.md b/docs/references/cli-docs/empowerd_tx_interchain-accounts_host_generate-packet-data.md similarity index 100% rename from docs/cli-docs/empowerd_tx_interchain-accounts_host_generate-packet-data.md rename to docs/references/cli-docs/empowerd_tx_interchain-accounts_host_generate-packet-data.md diff --git a/docs/cli-docs/empowerd_tx_multi-sign.md b/docs/references/cli-docs/empowerd_tx_multi-sign.md similarity index 100% rename from docs/cli-docs/empowerd_tx_multi-sign.md rename to docs/references/cli-docs/empowerd_tx_multi-sign.md diff --git a/docs/cli-docs/empowerd_tx_multisign-batch.md b/docs/references/cli-docs/empowerd_tx_multisign-batch.md similarity index 100% rename from docs/cli-docs/empowerd_tx_multisign-batch.md rename to docs/references/cli-docs/empowerd_tx_multisign-batch.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit.md b/docs/references/cli-docs/empowerd_tx_plasticcredit.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_approve-project.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_approve-project.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_approve-project.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_approve-project.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_create-applicant.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_create-applicant.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_create-applicant.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_create-applicant.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_create-credit-type.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_create-credit-type.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_create-credit-type.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_create-credit-type.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_create-project.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_create-project.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_create-project.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_create-project.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_grant-transfer-authz.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_grant-transfer-authz.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_grant-transfer-authz.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_grant-transfer-authz.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_issue-credits.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_issue-credits.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_issue-credits.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_issue-credits.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_reject-project.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_reject-project.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_reject-project.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_reject-project.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_retire.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_retire.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_retire.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_retire.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_suspend-project.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_suspend-project.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_suspend-project.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_suspend-project.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_transfer.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_transfer.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_transfer.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_transfer.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_update-applicant.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_update-applicant.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_update-applicant.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_update-applicant.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_update-credit-type.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_update-credit-type.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_update-credit-type.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_update-credit-type.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_update-issuer.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_update-issuer.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_update-issuer.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_update-issuer.md diff --git a/docs/cli-docs/empowerd_tx_plasticcredit_update-project.md b/docs/references/cli-docs/empowerd_tx_plasticcredit_update-project.md similarity index 100% rename from docs/cli-docs/empowerd_tx_plasticcredit_update-project.md rename to docs/references/cli-docs/empowerd_tx_plasticcredit_update-project.md diff --git a/docs/cli-docs/empowerd_tx_proofofexistence.md b/docs/references/cli-docs/empowerd_tx_proofofexistence.md similarity index 100% rename from docs/cli-docs/empowerd_tx_proofofexistence.md rename to docs/references/cli-docs/empowerd_tx_proofofexistence.md diff --git a/docs/cli-docs/empowerd_tx_proofofexistence_create-proof.md b/docs/references/cli-docs/empowerd_tx_proofofexistence_create-proof.md similarity index 100% rename from docs/cli-docs/empowerd_tx_proofofexistence_create-proof.md rename to docs/references/cli-docs/empowerd_tx_proofofexistence_create-proof.md diff --git a/docs/cli-docs/empowerd_tx_sign-batch.md b/docs/references/cli-docs/empowerd_tx_sign-batch.md similarity index 100% rename from docs/cli-docs/empowerd_tx_sign-batch.md rename to docs/references/cli-docs/empowerd_tx_sign-batch.md diff --git a/docs/cli-docs/empowerd_tx_sign.md b/docs/references/cli-docs/empowerd_tx_sign.md similarity index 100% rename from docs/cli-docs/empowerd_tx_sign.md rename to docs/references/cli-docs/empowerd_tx_sign.md diff --git a/docs/cli-docs/empowerd_tx_slashing.md b/docs/references/cli-docs/empowerd_tx_slashing.md similarity index 100% rename from docs/cli-docs/empowerd_tx_slashing.md rename to docs/references/cli-docs/empowerd_tx_slashing.md diff --git a/docs/cli-docs/empowerd_tx_slashing_unjail.md b/docs/references/cli-docs/empowerd_tx_slashing_unjail.md similarity index 100% rename from docs/cli-docs/empowerd_tx_slashing_unjail.md rename to docs/references/cli-docs/empowerd_tx_slashing_unjail.md diff --git a/docs/cli-docs/empowerd_tx_staking.md b/docs/references/cli-docs/empowerd_tx_staking.md similarity index 100% rename from docs/cli-docs/empowerd_tx_staking.md rename to docs/references/cli-docs/empowerd_tx_staking.md diff --git a/docs/cli-docs/empowerd_tx_staking_cancel-unbond.md b/docs/references/cli-docs/empowerd_tx_staking_cancel-unbond.md similarity index 100% rename from docs/cli-docs/empowerd_tx_staking_cancel-unbond.md rename to docs/references/cli-docs/empowerd_tx_staking_cancel-unbond.md diff --git a/docs/cli-docs/empowerd_tx_staking_create-validator.md b/docs/references/cli-docs/empowerd_tx_staking_create-validator.md similarity index 100% rename from docs/cli-docs/empowerd_tx_staking_create-validator.md rename to docs/references/cli-docs/empowerd_tx_staking_create-validator.md diff --git a/docs/cli-docs/empowerd_tx_staking_delegate.md b/docs/references/cli-docs/empowerd_tx_staking_delegate.md similarity index 100% rename from docs/cli-docs/empowerd_tx_staking_delegate.md rename to docs/references/cli-docs/empowerd_tx_staking_delegate.md diff --git a/docs/cli-docs/empowerd_tx_staking_edit-validator.md b/docs/references/cli-docs/empowerd_tx_staking_edit-validator.md similarity index 100% rename from docs/cli-docs/empowerd_tx_staking_edit-validator.md rename to docs/references/cli-docs/empowerd_tx_staking_edit-validator.md diff --git a/docs/cli-docs/empowerd_tx_staking_redelegate.md b/docs/references/cli-docs/empowerd_tx_staking_redelegate.md similarity index 100% rename from docs/cli-docs/empowerd_tx_staking_redelegate.md rename to docs/references/cli-docs/empowerd_tx_staking_redelegate.md diff --git a/docs/cli-docs/empowerd_tx_staking_unbond.md b/docs/references/cli-docs/empowerd_tx_staking_unbond.md similarity index 100% rename from docs/cli-docs/empowerd_tx_staking_unbond.md rename to docs/references/cli-docs/empowerd_tx_staking_unbond.md diff --git a/docs/cli-docs/empowerd_tx_validate-signatures.md b/docs/references/cli-docs/empowerd_tx_validate-signatures.md similarity index 100% rename from docs/cli-docs/empowerd_tx_validate-signatures.md rename to docs/references/cli-docs/empowerd_tx_validate-signatures.md diff --git a/docs/cli-docs/empowerd_tx_vesting.md b/docs/references/cli-docs/empowerd_tx_vesting.md similarity index 100% rename from docs/cli-docs/empowerd_tx_vesting.md rename to docs/references/cli-docs/empowerd_tx_vesting.md diff --git a/docs/cli-docs/empowerd_tx_vesting_create-periodic-vesting-account.md b/docs/references/cli-docs/empowerd_tx_vesting_create-periodic-vesting-account.md similarity index 99% rename from docs/cli-docs/empowerd_tx_vesting_create-periodic-vesting-account.md rename to docs/references/cli-docs/empowerd_tx_vesting_create-periodic-vesting-account.md index b019d4a5d..13c91aef9 100644 --- a/docs/cli-docs/empowerd_tx_vesting_create-periodic-vesting-account.md +++ b/docs/references/cli-docs/empowerd_tx_vesting_create-periodic-vesting-account.md @@ -9,7 +9,7 @@ A sequence of coins and period length in seconds. Periods are sequential, in tha An array of coin strings and unix epoch times for coins to vest { "start_time": 1625204910, -"period":[ +"periods":[ { "coins": "10test", "length_seconds":2592000 //30 days diff --git a/docs/cli-docs/empowerd_tx_vesting_create-permanent-locked-account.md b/docs/references/cli-docs/empowerd_tx_vesting_create-permanent-locked-account.md similarity index 100% rename from docs/cli-docs/empowerd_tx_vesting_create-permanent-locked-account.md rename to docs/references/cli-docs/empowerd_tx_vesting_create-permanent-locked-account.md diff --git a/docs/cli-docs/empowerd_tx_vesting_create-vesting-account.md b/docs/references/cli-docs/empowerd_tx_vesting_create-vesting-account.md similarity index 100% rename from docs/cli-docs/empowerd_tx_vesting_create-vesting-account.md rename to docs/references/cli-docs/empowerd_tx_vesting_create-vesting-account.md diff --git a/docs/cli-docs/empowerd_tx_wasm.md b/docs/references/cli-docs/empowerd_tx_wasm.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm.md rename to docs/references/cli-docs/empowerd_tx_wasm.md diff --git a/docs/cli-docs/empowerd_tx_wasm_clear-contract-admin.md b/docs/references/cli-docs/empowerd_tx_wasm_clear-contract-admin.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_clear-contract-admin.md rename to docs/references/cli-docs/empowerd_tx_wasm_clear-contract-admin.md diff --git a/docs/cli-docs/empowerd_tx_wasm_execute.md b/docs/references/cli-docs/empowerd_tx_wasm_execute.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_execute.md rename to docs/references/cli-docs/empowerd_tx_wasm_execute.md diff --git a/docs/cli-docs/empowerd_tx_wasm_grant.md b/docs/references/cli-docs/empowerd_tx_wasm_grant.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_grant.md rename to docs/references/cli-docs/empowerd_tx_wasm_grant.md diff --git a/docs/cli-docs/empowerd_tx_wasm_instantiate.md b/docs/references/cli-docs/empowerd_tx_wasm_instantiate.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_instantiate.md rename to docs/references/cli-docs/empowerd_tx_wasm_instantiate.md diff --git a/docs/cli-docs/empowerd_tx_wasm_instantiate2.md b/docs/references/cli-docs/empowerd_tx_wasm_instantiate2.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_instantiate2.md rename to docs/references/cli-docs/empowerd_tx_wasm_instantiate2.md diff --git a/docs/cli-docs/empowerd_tx_wasm_migrate.md b/docs/references/cli-docs/empowerd_tx_wasm_migrate.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_migrate.md rename to docs/references/cli-docs/empowerd_tx_wasm_migrate.md diff --git a/docs/cli-docs/empowerd_tx_wasm_set-contract-admin.md b/docs/references/cli-docs/empowerd_tx_wasm_set-contract-admin.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_set-contract-admin.md rename to docs/references/cli-docs/empowerd_tx_wasm_set-contract-admin.md diff --git a/docs/cli-docs/empowerd_tx_wasm_store.md b/docs/references/cli-docs/empowerd_tx_wasm_store.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_store.md rename to docs/references/cli-docs/empowerd_tx_wasm_store.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_clear-contract-admin.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_clear-contract-admin.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_clear-contract-admin.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_clear-contract-admin.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_execute-contract.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_execute-contract.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_execute-contract.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_execute-contract.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract-2.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract-2.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract-2.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract-2.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_instantiate-contract.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_migrate-contract.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_migrate-contract.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_migrate-contract.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_migrate-contract.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_pin-codes.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_pin-codes.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_pin-codes.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_pin-codes.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_set-contract-admin.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_set-contract-admin.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_set-contract-admin.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_set-contract-admin.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_store-instantiate.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_store-instantiate.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_store-instantiate.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_store-instantiate.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_sudo-contract.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_sudo-contract.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_sudo-contract.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_sudo-contract.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_unpin-codes.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_unpin-codes.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_unpin-codes.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_unpin-codes.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_update-instantiate-config.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_update-instantiate-config.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_update-instantiate-config.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_update-instantiate-config.md diff --git a/docs/cli-docs/empowerd_tx_wasm_submit-proposal_wasm-store.md b/docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_wasm-store.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_submit-proposal_wasm-store.md rename to docs/references/cli-docs/empowerd_tx_wasm_submit-proposal_wasm-store.md diff --git a/docs/cli-docs/empowerd_tx_wasm_update-instantiate-config.md b/docs/references/cli-docs/empowerd_tx_wasm_update-instantiate-config.md similarity index 100% rename from docs/cli-docs/empowerd_tx_wasm_update-instantiate-config.md rename to docs/references/cli-docs/empowerd_tx_wasm_update-instantiate-config.md diff --git a/docs/cli-docs/empowerd_version.md b/docs/references/cli-docs/empowerd_version.md similarity index 100% rename from docs/cli-docs/empowerd_version.md rename to docs/references/cli-docs/empowerd_version.md diff --git a/docs/module-docs/plasticcredit.md b/docs/references/module-docs/plasticcredit.md similarity index 100% rename from docs/module-docs/plasticcredit.md rename to docs/references/module-docs/plasticcredit.md diff --git a/docs/module-docs/proofofexistence.md b/docs/references/module-docs/proofofexistence.md similarity index 100% rename from docs/module-docs/proofofexistence.md rename to docs/references/module-docs/proofofexistence.md diff --git a/docs/testnet/build-challenges.md b/docs/testnet/build-challenges.md index 215240bd4..8953e5b48 100644 --- a/docs/testnet/build-challenges.md +++ b/docs/testnet/build-challenges.md @@ -15,7 +15,7 @@ There are also grants available for bigger ideas and/or further development. Rea We need a generic interface for issuing plastic credits. Our main use case for this short-term is to let anyone test plastic credit issuance on testnet (Empower Platform has this integrated in a SaaS platform, but perhaps it can serve as a user interface for many other plastic credits on mainnet in the future as well!). -A high level description of how Plastic Credits works can be found here: [Plastic Credits: High level overview](../plastic-credits/high-level-overview.md) +A high level description of how Plastic Credits works can be found here: [Plastic Credits: High level overview](../core-modules/plastic-credits/high-level-overview.md) The main objective is to make an interface that does two things: interacts with the empowerchain (via EmpowerJS) to issue credits, and constructs and uploads the Plastic Credit Index File. @@ -38,7 +38,7 @@ Build a dashboard to show interesting data like: - All of the above in graphs, time-bound, today, etc - And anything else that might be fun, even chain related data would be nice to have in a dashboard -A high level description of how Plastic Credits works can be found here: [Plastic Credits: High level overview](../plastic-credits/high-level-overview.md) +A high level description of how Plastic Credits works can be found here: [Plastic Credits: High level overview](../core-modules/plastic-credits/high-level-overview.md) ## Plastic credit non-crypto marketplace/shop The plastic credit marketplace only support buying plastic credits using crypto. For this to truly scale we need other solutions for non-crypto use cases. @@ -50,12 +50,12 @@ We have two ideas, but feel free to ignore them and come up with something much This could be a real game changer for us, so if you want to be the rules of plastic credits, we will support you in any way we can (grants are also on the table for long-term projects). -A high level description of how Plastic Credits works can be found here: [Plastic Credits: High level overview](../plastic-credits/high-level-overview.md) +A high level description of how Plastic Credits works can be found here: [Plastic Credits: High level overview](../core-modules/plastic-credits/high-level-overview.md) ## Plastic credit DeFi concept How can we combine plastic credits in a DeFi concept? Find a way to make plastic credit use cases even more interesting by combining them with traditional DeFi ideas. -A high level description of how Plastic Credits works can be found here: [Plastic Credits: High level overview](../plastic-credits/high-level-overview.md) +A high level description of how Plastic Credits works can be found here: [Plastic Credits: High level overview](../core-modules/plastic-credits/high-level-overview.md) ## Plastic credit NFT concepts Wrapping plastic credits in NFTs could take plastic credits to the Interchain with IBC. What would a useful concept for this be? @@ -67,7 +67,7 @@ When creating a proof of existence of a document for instance, it would be usefu A simple graphic design would be helpful here, but if you can also figure out a nice UX for the whole journey of creating proofs, where to use stamps, etc it would be even better :) -A high level description of how Proof of Existence works can be found here: [Proof of Existence: High level overview](../proof-of-existence/high-level-overview.md) +A high level description of how Proof of Existence works can be found here: [Proof of Existence: High level overview](../core-modules/proof-of-existence/high-level-overview.md) ## Proof of Existence wildcard use cases How can an immutable piece of data be used? What can it prove? How can you enforce it? @@ -76,7 +76,7 @@ Use PoE as the basis for bets, predictions, certifications, proof of ownership, Build a brand-new application, or build it into our existing proof of existence interface. -A high level description of how Proof of Existence works can be found here: [Proof of Existence: High level overview](../proof-of-existence/high-level-overview.md) +A high level description of how Proof of Existence works can be found here: [Proof of Existence: High level overview](../core-modules/proof-of-existence/high-level-overview.md) ## Proof of existence signatures To make proof of existence even more useful, we want to the capability of multiple parties to sign the proof (for whatever purpose they might like). @@ -85,7 +85,16 @@ The idea here is to extend proof of existence with a CosmWasm smart contract whi Figure out a way to build this UI into our existing Proof of Existence UI, or build a new one if you think it would make more sense. -A high level description of how Proof of Existence works can be found here: [Proof of Existence: High level overview](../proof-of-existence/high-level-overview.md) +A high level description of how Proof of Existence works can be found here: [Proof of Existence: High level overview](../core-modules/proof-of-existence/high-level-overview.md) + +## Automate reference docs for Marketplace contract +Get full reference documentation for the marketplace into the docs using some kind of automation that will generate the docs from the contract code. + +It should be possible to do this for all contracts, but we start with the marketplace contract. + +It should show all messages, variables, etc. and extract comments from the code to show as documentation. + +If brand-new developer tooling needs to be built for the extraction/generation, we might be inclined to give a separate grant as well. ## EmpowerChain-specific Governance UI Create an EmpowerChain branded governance UI/app that shows EmpowerChain's group-based governance structure in an easy-to-understand and transparent way. @@ -95,6 +104,17 @@ TODO: Explain a bit about the governance structure TODO: List capabilities TODO: EmpowerChain docs on governance +## Add full support for EmpowerChain to Groups UI + +There isn't a _ton_ of work to make this happen and would require only frontend work in the [Groups UI repo](https://github.com/regen-network/groups-ui). + +The current issues are the main hurdles to get this done: +- https://github.com/regen-network/groups-ui/issues/72 +- https://github.com/regen-network/groups-ui/issues/73 (some work exists here already, not a big deal to implement) +- https://github.com/regen-network/groups-ui/issues/74 (also not a big deal to implement) + +Reach out to discuss details if you're interested in this one. Can also connect with the Regen team to coordinate further. + ## Wildcard challenge To signal that we don't think we have all the answers: a wildcard challenge! Come up with an innovative way to use EmpowerChain. diff --git a/docs/testnet/resources.md b/docs/testnet/resources.md new file mode 100644 index 000000000..7e4a9968e --- /dev/null +++ b/docs/testnet/resources.md @@ -0,0 +1,59 @@ +# Circulus-1 resources + +This page contains links to resources for the Circulus-1 testnet, such as explorers, RPC nodes, etc. + +If you want to add your resource to this page, please create a PR with the changes: https://github.com/EmpowerPlastic/empowerchain/blob/main/docs/testnet/resources.md + +## Collections of resources + +| Provider | Description | Link | +|------------|----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| +| Cumulo | Meta resource (similar to this page) | https://medium.com/cumulo-pro/empower-community-of-validators-resources-f0fdbc5a5609 | +| AviaOne | Node resources (instructions, state sync, peers, seeds, genesis, etc) | https://aviaone.com/blockchains-service/circulus-1-empower.html | +| Polkachu | Node resources (instructions, state sync, peers, seeds, genesis, etc) | https://polkachu.com/testnets/empower | +| ITRocket | Node resources (instructions, state sync, peers, seeds, genesis, etc) | https://itrocket.net/services/testnet/empower | +| NODEJUMPER | Node resources + decentralization map (instructions, state sync, peers, seeds, genesis, etc) | https://app.nodejumper.io/empower-testnet | +| Nodeist | Node resources (instructions, state sync, peers, seeds, genesis, etc) | https://nodeist.net/Empower/ | +| NodeStake | Node resources (instructions, state sync, peers, seeds, genesis, etc) | https://nodestake.top/empower | +| KonsorTech | Node resources (instructions, state sync, peers, seeds, genesis, etc) | https://konsortech.xyz/testnet/empower | +| AutoStake | Node resources ( snapshots, state sync, peers, seeds, etc) | https://autostake.com/networks/testnets/empower/#services | +| AM Solutions | Node resources (instructions, state sync, peers, seeds, genesis, etc) | https://www.theamsolutions.info/empowerchain | +| 🔥STAVR🔥 | Node resources ( manuals, snapshots, statesync, peers, seeds, genesis, etc) | https://github.com/obajay/StateSync-snapshots/tree/main/Projects/Empower | +| [NODERS]TEAM | Node resources ( manuals, statesync, peers, seeds, genesis, etc) | https://nodeservice.nodersteam.com/title/testnets/empower | +| Stake Village | Node resources ( manuals, snapshots, statesync, peers, seeds, genesis, etc) | https://stakevillage.net/en/empowerchain-testnet | +| Palamar | Node resources ( manuals, statesync, peers, seeds, genesis, etc) | https://github.com/Pa1amar/testnets/tree/main/empower +| Sr20de | Node resources ( manuals, statesync, peers, seeds, genesis, etc) | https://sr20de.xyz/services/empower-testnet/ | + +## Explorers + +| Provider | Type | Link | +|-----------|-----------|------------------------------------------------| +| STAKEME | EXPLOREME | https://empowerchain.exploreme.pro/ | +| Nodeist | Ping | https://exp.nodeist.net/Empower | +| NodeStake | Ping | https://explorer.nodestake.top/empower-testnet | +| ITRocket | Ping | https://testnet.itrocket.net/empower/staking | +| 🔥STAVR🔥 | Ping | https://explorer.stavr.tech/empower | +| KonsorTech | Ping | https://testnet-explorer.konsortech.xyz/empower | +| AM Solutions | Ping | https://explorer.theamsolutions.info/empower-test | +| Stake Village | Ping | https://exp.stakevillage.net/empower-testnet | +| Palamar | Ping | https://testnet.explorer.palamar.io/circulus-1 | +| Sr20de | Ping | https://explorer.sr20de.xyz/Empower-testnet | + +## Endpoints + +| Provider | RPC | API | gRPC | +|------------|------------------------------------------------|----------------------------------------------|-----------------------------------------| +| Polkachu | https://empower-testnet-rpc.polkachu.com:443 | https://empower-testnet-api.polkachu.com/ | empower-testnet-grpc.polkachu.com:17490 | +| Cumulo | https://empower.rpc.cumulo.com.es:443 | https://empower.api.cumulo.com.es:443 | empower.grpc.cumulo.com.es:443 | +| NodeStake | https://rpc-t.empower.nodestake.top:443 | https://api-t.empower.nodestake.top | grpc-t.empower.nodestake.top:9090 | +| Nodeist | https://rpc-empower.nodeist.net:443 | https://api-empower.nodeist.net | N/A | +| NODEJUMPER | https://empower-testnet.nodejumper.io:443 | https://empower-testnet.nodejumper.io:1317 | empower-testnet.nodejumper.io:9090 | +| ITRocket | https://empower-testnet-rpc.itrocket.net:443 | https://empower-testnet-api.itrocket.net:443 | empower-testnet-grpc.itrocket.net:16090 | +| AviaOne | https://rpc.circulus-1.empower.aviaone.com:443 | https://api.circulus-1.empower.aviaone.com | grpc.circulus-1.empower.aviaone.com:443 | +| KonsorTech | https://testnet-empower-rpc.konsortech.xyz:443 | https://testnet-empower-api.konsortech.xyz | testnet-empower.konsortech.xyz:25090 | +| AM Solutions | https://rpc-empower.test.theamsolutions.info:443 | https://rest-empower.test.theamsolutions.info:443 | grpc-empower.test.theamsolutions.info:443 | +| 🔥STAVR🔥 | http://empw.rpc.t.stavr.tech:22057 | https://empw.api.t.stavr.tech | empw.grpc.t.stavr.tech:9141 | +| [NODERS]TEAM | http://empower.rpc.nodersteam.com:10657 | http://empower.api.nodersteam.com:2003 | empower.grpc.nodersteam.com:9791 | +| Stake Village | https://empower-testnet.rpc.stakevillage.net | https://empower-testnet.api.stakevillage.net | empower-testnet.grpc.stakevillage.net:16590 | +| Palamar | https://empower-rpc.palamar.io:443 | https://empower-api.palamar.io:443 | empower-grpc.palamar.io:10891 | +| Sr20de | https://rpc-empower-testnet.sr20de.xyz:443 | https://api-empower-testnet.sr20de.xyz | grpc-empower-testnet.sr20de.xyz | diff --git a/docs/testnet/rules.md b/docs/testnet/rules.md index b7328c5bd..6bd1d6d6d 100644 --- a/docs/testnet/rules.md +++ b/docs/testnet/rules.md @@ -19,7 +19,7 @@ The criteria for each task and how to submit them will be detailed in a separate ## Eligibility requirements -- All users need to have registered for the incentivized testnet before the start date of the main phase. +- All users need to be registered for the incentivized testnet. - Users must be at least the age of majority in the jurisdiction where they live when joining the EmpowerChain incentivized testnet. - Users must be legally capable to participate under the regulations of their homeland. KYC might be required when claiming rewards. - Users must be legally capable of receiving rewards and crypto transactions (if they win), and are responsible for settling any tax liabilities on the reward winnings. @@ -29,7 +29,7 @@ The criteria for each task and how to submit them will be detailed in a separate ## Participation rules -- All users need to have joined the EmpowerChain Discord before the start date +- All users need to have joined the EmpowerChain Discord - Only submit work you have actually done. Copying others work, or obviously scripting or circumventing the challenges in any way is reason for immediate disqualification (and obviously any rewards are forfeited) - Don’t abuse the testnet faucet. No points are given out for having a bunch of tokens. If we see that you are scripting or otherwise abusing the testnet faucet to get into the active set, you will be disqualified. diff --git a/docs/testnet/tasks-and-rewards.md b/docs/testnet/tasks-and-rewards.md index 221c1fcf8..5542e6b1c 100644 --- a/docs/testnet/tasks-and-rewards.md +++ b/docs/testnet/tasks-and-rewards.md @@ -1,3 +1,443 @@ # Tasks and rewards -Tasks and rewards are being finalized, and will be published here soon. Please check back later. \ No newline at end of file +To make sure you are eligible for the rewards, please read the [rules](./rules) carefully first. + +**Disclaimer:** The tasks and rewards might be adjusted at any time, but will be announced in Discord if so. + +Before you start on a task, please open the submission form to make sure that: + +1. The task has opened (if the form is not accepting submissions, the task is not open) +2. You understand the task and the instructions which you will find in the submission form itself + +To find resources such as RPC, API, block explorers and validation guides, please visit the [resources](./resources) +page. + +## For validators + +As you will see below, most of the tasks are not particularly geared towards validators. This is because we want to +make sure that everyone can participate, not just validators. + +More importantly, we want to align and incentivize validators long-term, which is why the delegation program +will be the most important way for validators to earn rewards. Please see +the [delegation program](../validators/delegation-program.md) for more information. + +**Being in the active set during the testnet is not really relevant to the delegation program (so please don't worry +about that)** + +## How to participate + +To participate, you first need to do three things: + +1. Join our Discord +2. Sign up on our Google Form +3. Grab the Circulus-1 Tester role in the # 🤝︱tester-role channel in Discord + +Ensure you create a new wallet (instructions below) and **use the same address for all tasks during the testnet**. +We will ask everyone to provide the address at the end of the testnet to match it against the Discord username you +provided in the signup form. + +## A note on wallets: + +Make sure you use the same wallet address for all tasks. We will collect and link all addresses to +the information you signed up with. Make sure you use a new wallet, so we can't connect it to any +mainnet addresses. + +Take a look at this video to learn how to set up a Keplr wallet: https://www.youtube.com/watch?v=cmxx_hIulz8 + +## Tokens for gas and stuff + +For most of the tasks you will need some tokens to pay for gas and other stuff. + +You can request tokens in the `# 🔧︱faucet` channel in Discord. + +Please do not abuse the faucet. It will only give a small amount of tokens and there will be +a cool-down before you can request more tokens. If we detect abuse you will be disqualified. + +## Rewards + +For the circulus-1 testnet there are set aside 0.5%, or 1,000,000 $MPWR, from the initial supply. + +**All prices will be rewarded as $MPWR tokens to be vested for 1 year.** (unless stated clearly otherwise) + +These rewards are split among the different categories below: + +| Category | Max tokens | Notes | +|-------------------|---------------|-----------------------------------------------------| +| Zealy | 120,000 $MPWR | | +| UI testing | 30,000 $MPWR | | +| CLI testing | 30,000 $MPWR | | +| IBC testing | 10,000 $MPWR | | +| Docs, guides, etc | 50,000 $MPWR | | +| Build challenges | 250,000 $MPWR | | +| Bugs | 230,000 $MPWR | Critical bugs are not subject to vesting | +| Security issues | 250,000 $MPWR | Critical security issues are not subject to vesting | +| Stress testing | 30,000 $MPWR | Not until phase 3 | +| Community helper | 5,000 $MPWR | | + +Max tokens per category are split among the participants in that category according to the rules of each category (see +below). + +In addition, most categories have different ways to win rewards and might require you +to be early to win the maximum amount of tokens. + +## First and last serve submissions + +Many of the categories' tasks rewards are split among the first X submissions and the final Y submissions, with +each group earning different amount of tokens. Any submissions beyond the last serve batch +will not earn any tokens. There will be some lag between us confirming the maximum number +of submissions, but we will try to close the submissions as soon as possible to communicate +that the submissions are finalized (which means that even if you managed to submit, you +might not get rewarded - if you are too late). + +As an example: if a task has 15 $MPWR for first 200 and 6 $MPWR for last 500, it means +that the first 200 approved submissions earn $15 MPWR each and the next 500 earn 6 $MPWR each. +Anyone submitting beyond those two batches are not rewarded. + +We've chosen this mechanism to get as early feedback as possible, as well +as gamifying the process a little. We might change the exact numbers +during the testnet itself, but will communicate this in Discord if so. + +## Zealy + +Zealy tasks are different social media, marketing, and community tasks. +Examples of tasks might be: + +- Retweeting a tweet +- Making content +- Participating in community events +- Doing plastic waste cleanup +- More tasks likely to be added, so keep an eye out! + +The exact tasks are available on Zealy: https://zealy.io/c/circulus1-empowerchain/questboard + +120,000 $MPWR are set aside for Zealy tasks and will be awarded relative to the number of points/xp earned by +the top 500 (subject to change!) participants. + +## UI Testing + +See [First and last serve submissions](#first-and-last-serve-submissions) for details on reward mechanism. + +| Task | First serve submissions | Last serve submissions | +|---------------------------|----------------------------|---------------------------| +| Create proof of existence | 15 $MPWR for first 200 | 6 $MPWR for last 500 | +| Buy plastic credits | 30 $MPWR for first 200 | 12 $MPWR for last 500 | +| Retire plastic credits | 30 $MPWR for the first 200 | 12 $MPWR for the last 500 | +| Transfer plastic credits | 30 $MPWR for the first 200 | 12 $MPWR for the last 500 | + +### Instructions + +Instruction for each task can be found in the Google submission form for each task. + +Create proof of existence: https://forms.gle/i2TSGvN2AL983WS16 + +Buy plastic credits: https://forms.gle/MDfBbZZSv3rDh11W7 + +Retire plastic credits: https://forms.gle/UQiyWdwatPZTJqhz9 + +Transfer plastic credits: https://forms.gle/mBGXAkgruZ4sGCyn9 + +## CLI Testing + +See [First and last serve submissions](#first-and-last-serve-submissions) for details on reward mechanism. + +| Task | First serve submissions | Last serve submissions | +|------------------------------------|-------------------------------|-----------------------------| +| SDK transactions | 37.5 $MPWR for first 200 | 15 $MPWR for last 500 | +| Proof of existence transaction | 9.375 $MPWR for the first 200 | 3.75 $MPWR for the last 500 | +| Plastic credit issuance CLI tasks* | 450 $MPWR for first 25* | N/A | + +> \* Performing the plastic credit issuance CLI tasks requires deep knowledge about the plastic credits module +> as well as being given special permissions on-chain. +> +> As such, we will conduct a quiz to determine who gets to do this line of operations +> Hint: it will require intimate knowledge +> about [Plastic Credits](../core-modules/plastic-credits/high-level-overview.md) + +### Instructions + +Instruction for each task can be found in the Google submission form for each task. + +SDK transactions: https://forms.gle/mfuLHV9vBshJY2by6 + +Proof of existence transaction: https://forms.gle/QajitMU2D1Mo7cRU7 + +Plastic credit issuance CLI tasks: Will be provided later to the participants who pass the quiz (which will also be +provided later). +In the meantime, you can read up on the [Plastic Credits](../core-modules/plastic-credits/high-level-overview.md) +module. + +## IBC Testing + +See [First and last serve submissions](#first-and-last-serve-submissions) for details on reward mechanism. + +| Task | First serve submissions | Last serve submissions | +|--------------------------------------------------------|--------------------------|-------------------------| +| Send $MPWR to Cosmos Hub, and half back | 7.14 $MPWR for first 100 | 1.42 $MPWR for last 500 | +| Send $ATOM to EmpowerChain | 7.14 $MPWR for first 100 | 1.42 $MPWR for last 500 | +| Send $MPWR to Stargaze, and half back again | 7.14 $MPWR for first 100 | 1.42 $MPWR for last 500 | +| Send $STARS to EmpowerChain | 7.14 $MPWR for first 100 | 1.42 $MPWR for last 500 | +| Send $MPWR to Osmosis, and half back again | 7.14 $MPWR for first 100 | 1.42 $MPWR for last 500 | +| Send $USDC to EmpowerChain (from Osmosis for instance) | 7.14 $MPWR for first 100 | 1.42 $MPWR for last 500 | +| Send $OSMO to EmpowerChain | 7.14 $MPWR for first 100 | 1.42 $MPWR for last 500 | + +### Instructions + +Instruction for each task can be found in the Google submission form. + +All the tasks are in the following Google Form: https://forms.gle/JJDeX5AVaZnznvqv8 + +## Docs, guides, etc + +For docs and guide related tasks there are is a different reward mechanism. For each task there will be +maximum 1 winner and 3 runner-ups. So even if you don't win, you might still get rewarded well. + +| Task | Winner | Runner-ups | +|----------------------------------------------------------|------------------------------------------------|---------------| +| Proof of existence user guide | 4687.5 $MPWR | 1562.5 $MPWR | +| Marketplace user guide | 4687.5 $MPWR | 1562.5 $MPWR | +| Plastic credit CLI guide (from both sides) | 4687.5 $MPWR | 1562.5 $MPWR | +| Automate CODING_GUIDELINES and other .md files into docs | 4687.5 $MPWR | 1562.5 $MPWR | +| Make our automated API docs look better | 4687.5 $MPWR | 1562.5 $MPWR | +| From zero to hero validator guide | 9375 $MPWR | 3125 $MPWR | +| Wildcard / TBA | 4687.5 $MPWR | 1562.5 $MPWR | +| Testnet task instructions | 500-1000 $MPWR per accepted (multiple winners) | 100-500 $MPWR | + +All of the above tasks needs to be submitted as Pull Requests to EmpowerChain's GitHub +repo: https://github.com/EmpowerPlastic/empowerchain and to a Google Form (see below) + +The docs are written in Markdown under the `docs` folder: https://github.com/EmpowerPlastic/empowerchain/tree/main/docs + +It is recommended to reach out to someone from the team to figure out what is expected for each task, but we've added +some clarifications in the instructions below. + +### Instructions + +General guidelines: + +- All written material needs to be in English +- All written material needs to be in Markdown +- All written material needs to be fairly grammatically correct + +Some more specifics on each task: + +| Task | Description | +|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Proof of existence user guide | An end-user guide on how to create on our [PoE web app](https://testnet.proof-of-existence.com/) | +| Marketplace user guide | An end-user guide on how to use the [Plastic Credit Marketplace web app](https://testnet.empower.market//) | +| Plastic credit CLI guide (from both sides) | A guide on how to use the Plastic Credit CLI for both issuers and applicants (mostly issuers) | +| Automate CODING_GUIDELINES and other .md files into docs | We have a bunch of .md files that are not included in the docs, but should be. This task is to automate that process. Talk to us! | +| Make our automated API docs look better | We have automated API docs, but they don't look that good. This task is to make them look better. Talk to us! | +| From zero to hero validator guide | A guide on how to become a validator. What it is, how to set it up, how to secure it. _Everything_ you need to know from zero (knowing nothing) to actually running a good validator setup that is secure and performant. Please reach out to talk if you have questions. | +| Wildcard / TBA | If you have an idea for a task that you think would be valuable, please reach out to us and we can discuss it. | +| Testnet task instructions | Many of the testnet tasks have unclear/incomplete instructions. IBC is a good example. If you think a task might need a guide, it probably does. Talk to us! | + +To submit a task, you will need to do two things: + +1. Create a Pull Request to the EmpowerChain repo with your changes: https://github.com/EmpowerPlastic/empowerchain +2. Submit a Google Form with a link to your Pull + Request: https://docs.google.com/forms/d/e/1FAIpQLScd5GEfcry1Mu5NMTD4B5W21kZW97tzg-xtsWxhMoDge6uViQ/viewform?usp=sf_link + +And again, it is recommended to reach out to someone from the team to figure out what and how to write if you are +unsure. + +## Build challenges + +Most challenges have potential 2 parts: UX/UI designs & Code. +You can aim to do both in a challenge, or just focus on one of them. +This allows designers that don't have coders available to make an amazing concept and get rewarded for that, +while coders that aren't that comfortable creating beautiful UIs can get rewarded for creating functional prototypes. + +If any of these challenges seem interesting, please read through the information and documentation we have provided, and +then feel very free to reach out to discuss ideas and get feedback from our team. + +There are also grants available for bigger ideas and/or further development. Reach out to discuss more! + +For build challenges there are is a different reward mechanism. For each task there will be +maximum 1 winner and 3 runner-ups. So even if you don't win, you might still get rewarded well. + +| Challenge | Winner | Runner-ups | +|--------------------------------------------------|--------------|--------------| +| Plastic credit issuer interface | 15,000 $MPWR | 5,000 $MPWR | +| Plastic credit dashboard | 15,000 $MPWR | 5,000 $MPWR | +| Plastic credit non-crypto | 15,000 $MPWR | 5,000 $MPWR | +| Plastic credit DeFi concept | 15,000 $MPWR | 5,000 $MPWR | +| Plastic credit NFT concepts | 15,000 $MPWR | 5,000 $MPWR | +| Proof of Existence stamp | 15,000 $MPWR | 5,000 $MPWR | +| Proof of Existence wildcard use cases | 15,000 $MPWR | 5,000 $MPWR | +| Proof of existence signatures | 15,000 $MPWR | 5,000 $MPWR | +| EmpowerChain-specific Governance UI | 30,000 $MPWR | 10,000 $MPWR | +| Automate reference docs for Marketplace contract | 7,500 $MPWR | 2,500 $MPWR | +| Add full support for EmpowerChain to Groups UI | 15,000 $MPWR | 5,000 $MPWR | +| Wildcard challenge | 15,000 $MPWR | 5,000 $MPWR | + +### Instructions + +All the challenges are detailed in the [Build challenges page](./build-challenges.md). + +Submitting can be done in the following Google Form: https://forms.gle/tkmAULdirqQLV6EJ6 + +## Bugs + +Critical bugs and genesis bugs are not subject to vesting. + +See [First and last serve submissions](#first-and-last-serve-submissions) for details on reward mechanism. + +| Task | First serve submissions | Last serve submissions | +|-----------------------------------------|----------------------------|---------------------------| +| Minor bugs | 36.5 $MPWR for first 100 | 7.3 $MPWR for last 500 | +| Non-show-stopper bugs (medium severity) | 182.5 $MPWR for first 100 | 36.5 $MPWR for last 500 | +| Critical bugs | 3650.79 $MPWR for first 25 | 912.69 $MPWR for last 100 | +| Genesis bugs | 365 $MPWR for first 5 | 91.26 $MPWR for last 20 | + +All bugs are rewarded only if you are the first to report them. +If they are reported elsewhere, or by someone else first, you will not be rewarded +(depending on the situation, we'll look at this on a case-by-case basis). + +Make sure to check and report first at: https://github.com/EmpowerPlastic/empowerchain/issues + +### Instructions + +Submit bugs in our GitHub repo: https://github.com/EmpowerPlastic/empowerchain + +And submit it in this Google form as well: https://forms.gle/FXopNQoFeoZjZqPs6 + +> **Make sure to search and sure nobody has submitted the bug before you.** + +## Security issues + +Critical security issues are not subject to vesting. + +See [First and last serve submissions](#first-and-last-serve-submissions) for details on reward mechanism. + +| Task | First serve submissions | Last serve submissions | +|-------------------------------------------------------|-----------------------------|-------------------------------| +| Upstream security issue, SDK, etc* | 416.66 $MPWR for first 25 | 208.3 $MPWR for last 50 | +| Non-critical security issue | 416.66 $MPWR for first 25 | 104.16 $MPWR for last 100 | +| Critical security issue (stolen funds, stalled chain) | 10416.66 $MPWR for first 10 | 4166.66 $MPWR for the last 25 | + +### Instructions + +Please read everything in this section carefully. + +Submit issues related to EmpowerChain in our GitHub repo: https://github.com/EmpowerPlastic/empowerchain + +And submit it in this Google form as well: https://forms.gle/FXopNQoFeoZjZqPs6 + +- Upstream security issues should: + - Be reported to the upstream project + - Be reported to us + - Be reported in private +- Upstream security issues will: + - Be rewarded by us + - Most likely be rewarded by the upstream project as well + - If not, we will reward you (amount depending on severity) + +All security issues are rewarded only if you are the first to report them. +If they are reported elsewhere, or by someone else first, you will not be rewarded +(depending on the situation, we'll look at this on a case-by-case basis). + +Make sure to check and report first (unless critical, see note below) +at: https://github.com/EmpowerPlastic/empowerchain/issues + +**IMPORTANT!** If you discover a security issue in an upstream library that is used by EmpowerChain, please report it in +private. +Disclosing security issues in public can be harmful to all users of that software in live systems. + +## Stress testing + +**Make sure you are following all the instructions laid out here. Especially the windows for stress testing, the scope +for each window, and only using a single wallet is very important!** + +Always check back here before each window as we might change the exact scope if we find it necessary. + +For stress testing we will reward evenly across all submissions that meet the requirements. +The total number of tokens to be distributed is 30,000 $MPWR. + +25,000 $MPWR will be distributed evenly across transactions that meet the requirements, +and 5,000 $MPWR will be distributed to the top 3 participants who can prove they have +stress tested the frontend in a meaningful way (a scripted headless browser for instance?). + +The stress test phase will last from 21st of June to EOD (or early next day) 25th of June. + +The plan is not to stress test the whole network all the time, but to focus stress testing on specific parts of the +network at specific times (windows). + +The plan is as follows: + +On 21st of June, we will start with a stress test of the network at a single window of 1 hour. +The next days we will have 3 windows where we will only ask to stress test our custom modules, not the whole network. +If we find anyone is stress testing the whole network, they will be disqualified from the stress testing rewards. + +The windows are as follows: + +| What to test | Date | Time | +|----------------------------------------------|--------------|-------------------| +| Everything, transactions of any kind | 21st of June | 16:00 - 17:00 UTC | +| Everything, transactions of any kind | 22nd of June | 10:00 - 11:00 UTC | +| Plastic credit purchase, transfer and retire | 22nd of June | 16:00 - 17:00 UTC | +| Plastic credit purchase, transfer and retire | 22nd of June | 23:00 - 00:00 UTC | +| Plastic credit purchase, transfer and retire | 23rd of June | 10:00 - 11:00 UTC | +| Plastic credit purchase, transfer and retire | 23rd of June | 16:00 - 17:00 UTC | +| Plastic credit purchase, transfer and retire | 23rd of June | 23:00 - 00:00 UTC | +| Plastic credit purchase, transfer and retire | 24th of June | 10:00 - 11:00 UTC | +| Plastic credit purchase, transfer and retire | 24th of June | 16:00 - 17:00 UTC | +| Plastic credit purchase, transfer and retire | 24th of June | 23:00 - 00:00 UTC | +| Plastic credit purchase, transfer and retire | 25th of June | 10:00 - 11:00 UTC | +| Plastic credit purchase, transfer and retire | 25th of June | 16:00 - 17:00 UTC | +| Plastic credit purchase, transfer and retire | 25th of June | 23:00 - 00:00 UTC | + +It is important that you don't keep spamming the network outside of these windows, if we find anyone doing this, they +will be disqualified from the stress testing rewards (and potentially previous rewards if they are causing harm). + +### Instructions + +Each participant is only allowed to stress test with a single account, the same account they have been using for the +previous tasks. Using multiple wallets will not help you in any way. So be smart with your transactions and tokens (* +*remember: you +can bundle many messages in a single transaction if you know what you are doing**). + +We are not going to give detailed instructions on _how_ to stress test the network, but we will give some important +notes. + +We are increasing the number of tokens given out by the faucet, so you can have enough tokens a lot of transactions. +(**Keep in mind: there is 0 point in spending those tokens on delegating to your validator, it doesn't help your case in +any way**). + +For "Everything, throw transactions of any kind at the network", you can use any transaction type you want. +Just throw transactions at the network within the assigned window. + +For "Plastic credit purchase, transfer and retire transactions", do any of the following (ideally all of them): + +- Purchase plastic credits + - Either on the marketplace website or using cosmwasm execute + directly ([Rust msg.rs for reference](https://github.com/EmpowerPlastic/empowerchain/blob/main/cosmwasm/contracts/plastic-credit-marketplace/src/msg.rs)) + - **Please:** only buy 1 or a few at a time so others can also buy some +- Transfer plastic credits + - Either on the marketplace website or using the cli/gprc/api + directly ([cli reference](../references/cli-docs/empowerd_tx_plasticcredit_transfer)) +- Retire plastic credits (makes them non-transferable) + - Either on the marketplace website or using the cli/grpc/api + directly ([cli reference](../references/cli-docs/empowerd_tx_plasticcredit_retire)) + +At any point during the stress test phase, but before the end of the stress test phase, you can submit your +participation +with the account you have been using here: https://forms.gle/XPt6hPwx8amy7DmDA + +For the frontend stress testing mentioned earlier, we are not going to give any instructions, but leave it +open to you to figure out how to stress test the frontend in a meaningful way. If you can prove you have done this, +fill in the form here: https://forms.gle/EAWS38XGvJCArkKw8 + +## Community helper + +For the community helper reward there will be maximum 1 winner and 3 runner-ups. So even if you don't win, you might +still get rewarded well. + +| Task | Winner | Runner-ups | +|------------------|-------------|------------| +| Community helper | 3,500 $MPWR | 500 $MPWR | + +To be eligible for this reward you need to be active in the community and help others. This can be in the form of +answering questions, helping people with issues, helping people with their submissions, etc. If you can prove +that you have been active in the community and helped others, you can win this! + +Submit your proof here: https://forms.gle/UMgJWK6m7M1in5Hq9 diff --git a/docs/tokenomics/block-rewards.md b/docs/tokenomics/block-rewards.md new file mode 100644 index 000000000..0a9740db2 --- /dev/null +++ b/docs/tokenomics/block-rewards.md @@ -0,0 +1,61 @@ +# Block rewards + +At launch, the block rewards are very simply made up of 75% to stakers and 25% to the community pool in the form of the community pool tax. +The 25% of block rewards going to the community pool is not intended to be there for too long and there will be a governance proposal to split +the funds into the same buckets as the planned block rewards. + +![Initial block rewards](./initial-block-rewards.png) + +When we implement the final block rewards, at a later date, they will be as follows: + +![final-block-rewards.png](./final-block-rewards.png) + +- 75% to stakers +- 5% to tech & infrastructure +- 15% to usage incentives +- 3% to impact and physical waste infrastructure grants +- 2% as a Basic Active Validator Income (BAVI) + +## 75% to stakers +75% of the block rewards will go to stakers, and will be distributed proportionally to the amount of $MPWR staked. +This is standard Cosmos staking, nothing fancy going on here. + +## 5% to tech & infrastructure +5% of the block rewards will go to tech & infrastructure, with the objective Ensure the longevity and +continuous stable development of the core infrastructure needed both for dev teams and users on the EmpowerChain as well as for IBC/Cosmos in general. + +The tokens will be split into two parts: +- 75% for maintenance and development of the EmpowerChain +- 25% for Interchain public goods funding + +The recipients of the tokens will be the Tech funding group which will be without members at launch, but its members will be decided by governance over time. + +The usage of these tokens will be subject to annual audits and reports to the community by neutral third parties. +Any spending will also be required to be done and documented on-chain as far as possible. + +## 15% to usage incentives + +Similar to the 25% from initial genesis distribution, 15% of the block rewards will go to usage incentives for waste +collectors and recycler infrastructure as basis for both the physical and digital network- and infrastructure effects of the Empowerchain. + +1% of the total block rewards (take from these 15%) will be set aside for the Global Waste Lottery staking. Details TBA. + +The exact details of how this distribution will happen, and under which conditions, will be documented and announced later (before it start, naturally). + +## 3% to impact and physical waste infrastructure grants +3% of the block rewards will go to grants and support for physical network of waste collectors and recyclers. +This can be done through various measures as funding to collection and recycling organisations +(direct grants, beneficial loans, subsidised services etc), hackathons, educational content and marketing. + +These block rewards can also be put into other initiatives - within the scope of the Impact group - in lack of better investments or to strengthen that part of the ecosystem. + +## 2% as a Basic Active Validator Income (BAVI) +2% of the block rewards will be distributed to all active validators as a flat reward, regardless of their delegation amount. +This is to help increase decentralization and security of the network, and to help smaller validators. + +The exact mechanism for this will be decided by governance, but the validators participating in this will likely need to be +known to avoid sybil attacks. This might require some sort of identity solution, but it would have to be privacy-preserving. +Governance will decide in the end how this shall be done. + +It has not been decided how the BAVI tokens accumulating in the community pool will be distributed/used. +This will be decided by governance in any case. \ No newline at end of file diff --git a/docs/tokenomics/emission.png b/docs/tokenomics/emission.png new file mode 100644 index 000000000..68fd08d78 Binary files /dev/null and b/docs/tokenomics/emission.png differ diff --git a/docs/tokenomics/final-block-rewards.png b/docs/tokenomics/final-block-rewards.png new file mode 100644 index 000000000..29324f515 Binary files /dev/null and b/docs/tokenomics/final-block-rewards.png differ diff --git a/docs/tokenomics/initial-block-rewards.png b/docs/tokenomics/initial-block-rewards.png new file mode 100644 index 000000000..b78894b10 Binary files /dev/null and b/docs/tokenomics/initial-block-rewards.png differ diff --git a/docs/tokenomics/initial-token-distribution.md b/docs/tokenomics/initial-token-distribution.md new file mode 100644 index 000000000..7366c9f0f --- /dev/null +++ b/docs/tokenomics/initial-token-distribution.md @@ -0,0 +1,90 @@ +# Initial token distribution + +At launch, the EmpowerChain will have a total supply of 200,000,000 $MPWR tokens, +with a maximum supply of 1,000,000,000 $MPWR tokens, distributed at a fixed rate as staking rewards over 12 years. + +The initial token distribution will be as follows: + +![token-distribution.png](./token-distribution.png) + +- 25% for waste collectors and recyclers (to be distributed over time) +- 25% for usage incentives and airdrops (to be distributed over time) +- Up to 10% for private presale (exact numbers TBA - leftovers will go to the community growth group) +- 5% permalocked for an on-chain staking impact +- 20% for community growth, partnerships, liquidity, etc +- 7.5% for team members (see lockup and vesting details below) +- 7.5% for an Empower long-term lockup (see lockup and vesting details below) + +Any tokens not owned by the team will be locked in on-chain groups (similar to a multisig) which is owned by the chain itself (through governance), +but will be preset with members of the team, and potentially other community members. The makeup of these groups will be decided by governance of time. +Read more about this under [Governance overview](../governance/overview.md) and [Governance structure](../governance/structure.md). + +Each section is explained in more detail below. + +> A short note on usage incentives: most of the usage incentives in both the +> initial distribution and the block rewards are not fully documents here yet. +> It is important to note that these usage incentives are subject to audits and transparency requirements, +> as they are owned by the chain itself. Documentation and details will be added and announced as they are finalized. + +## 25% for Waste Collectors and Recyclers +25% will be set aside for waste collectors and recyclers, to be distributed over time. +The main goal is to incentivise and include global network of waste collection and recycling infrastructure as +basis for both the physical and digital network- and infrastructure effects of the Empowerchain. + +The exact details of how this distribution will happen, and under which conditions, will be documented and announced later (before it start, naturally). + +These usage incentives tokens are held by the Usage Incentives group (controlled by members of the team at launch). + +## 25% for Usage Incentives and Airdrops +The 50,000,000 $MPWR tokens set aside for usage incentives and airdrops will be split into three parts: +- 22,500,000 $MPWR for deposit app usage incentives (launch happening later this year/early next year) + - These tokens are likely to be vested and distributed over a long time after Deposit App launch +- 6,000,000 $MPWR for plastic credit usage incentives + - These tokens are likely to be vested and distributed over a long period of time +- 10,000,000 for airdrops + - Some of which will be distributed at genesis, most of which will be distributed over time (TBA) + +The current airdrop distribution at launch looks like this: +- Holders of Empower Cyber Plastic Heros NFTs (1000 $MPWR each) +- Holders of Empower Earth Day Plastic Heroes NFTs (20 $MPWR each) +- Delegators on Empower Validator on Stargaze, Regen, IXO, Cheqd and Jackal (Amount TBA) +- Potentially some other groups (TBA) + +All unspent tokens at genesis will be held by the Usage incentive group (controlled by members of the team at launch). + +## 10% for Private Presale +Up to 10% of the total supply will be sold in a private presale, with the exact amount to be announced closer to mainnet launch. + +All tokens are subject to at least 1 year lock-up _plus_ 1 year vesting - with multiple ones having longer lockups (up to 4 years). + +The exact details of the private presale (including how long they will be locked and vested) will be announced closer to mainnet launch. + +## 5% Permalocked for an On-Chain Staking Impact +5% of the total supply will be permalocked on-chain and used for impact staking, the rewards from which will be used to buying of plastic credits and deposit incentives in the market. + +The permalocked tokens (and its rewards) will be controlled by the Impact group (controlled by members of the team at launch). + +## 20% for Community Growth, Partnerships, Liquidity, etc +Incentivise token liquidity on DEX/CEXes and to build strategic partnerships across Cosmos and IBC through token swaps or other incentives and alignments + +Within these 20% there are also sub-initiatives for: +- Testnet rewards (a total of 1% of the total supply, 0.5% of which for the first testnet and the rest for future testnets) +- Bug and security bounty program (1% of the total supply) + +These two initatives are held by the Usage incentives group. The other 18% are held by the Impact group. + +## 7.5% for Team Members +7.5% of the total supply will be allocated to team members, with a minimum of 1 year lockup and 5 year vesting. + +To ensure members of the team are not being incentivized after they stop working on the project, we have placed all +the tokens in the Empower group. From there they tokens will be distributed to team members as they vest. +This also allows us to move any incentives over to new team members in the scenario of exchange of personnel. + +Our biggest priority is to ensure the long-term success of the EmpowerChain, and we believe this will help us achieve that. +Especially, we don't end up in a situation where team members are paid too much up-front, and then leave the project and keep dumping tokens for years - as we have seen in many other projects. + +## 7.5% for an Empower Long-Term Lock-up +7.5% of the total supply will be allocated to Empower for long-term lock-up, with a 5-year lockup + 5 year vesting period. +Meaning that these tokens will only be fully vested after 10 years. + +The goal of these tokens is long-term alignment for Empower to keep building and supporting the chain and its ecosystem. diff --git a/docs/tokenomics/overview.md b/docs/tokenomics/overview.md new file mode 100644 index 000000000..dfcf9fba5 --- /dev/null +++ b/docs/tokenomics/overview.md @@ -0,0 +1,75 @@ +# Tokenomics Overview + +The EmpowerChain tokenomics are designed to make the native network utility token, $MPWR, a useful and valuable asset +for all participants in the EmpowerChain ecosystem. This is important for long-term development and maintenance, but +more importantly, to ensure that the token is a viable incentive for actors in the waste sector to participate. + +**Disclaimer**: The tokenomics are subject to change and might get updated before launch. The tokenomics are also subject +to governance, and can be changed by governance at any time after launch. + +## Token overview + +EmpowerChain uses a native network utility token called $MPWR (pronounced "empower"). + +The $MPWR token is used for: +- Network security (validation and staking) +- Governance +- Paying for transaction fees +- Paying for services and usage fees on different applications + +Supply at genesis is 200,000,000 $MPWR tokens, with a maximum supply of 1,000,000,000 $MPWR tokens to be reached over 12 years. + +## Initial distribution + +The initial distribution of $MPWR tokens is designed to ensure that the network has long-term sustainability and +firepower to incentivize users and actors in both the web3 and waste sector world. + +![token-distribution.png](./token-distribution.png) + +More details on the initial distribution will be published before launch. + + + +## Emission schedule + +The emission schedule is simply: linear emission over 12 years, starting at 200,000,000 $MPWR tokens and ending at 1,000,000,000 $MPWR tokens. +This means that the number of tokens emitted per year is 66,666,666. + +![Total supply over 12 years](./total-supply.png) + +The emission curve, or supply increase percentage, looks like this: + +![Supply increase per year](./emission.png) + +## Emission distribution (or: block rewards) + +At launch, the block rewards will simply be 75% to stakers and 25% to the community pool - with the community pool being +a placeholder for the tokens to be distributed (if governance decides to do so) to the different purposes outlaid in the +final block reward plan: + +![final-block-rewards.png](./final-block-rewards.png) + +Once we have implemented the final block rewards, they will focus on the following areas: +- Incentivizing stakers +- Incentivizing usage of the network +- Incentivizing development of the network +- Support physical infrastructure development in the waste sector + +Together, they are designed to ensure that the network has long-term sustainability and incentives for all stakeholders in the network. + +More details on the final block rewards will be published before launch. + + + +## Sustainable economics +The big question for any blockchain is how it will operate sustainably in the long term. The EmpowerChain network token +is a utility token and is needed to use the network. It is needed not only for gas fees, but also for: +- Usage fees for dApps +- Plastic Credit issuance fees +- Marketplace fees +- And other fees from using the network in different ways +- Staking +- Participating/voting in governance + +The utility of the MPWR token, and its demand, will be driven by the usage of the network. +With the network owning and using the tokens for various purposes, there will be a constant demand for the token. \ No newline at end of file diff --git a/docs/tokenomics/token-distribution.png b/docs/tokenomics/token-distribution.png new file mode 100644 index 000000000..587be5bd4 Binary files /dev/null and b/docs/tokenomics/token-distribution.png differ diff --git a/docs/tokenomics/total-supply.png b/docs/tokenomics/total-supply.png new file mode 100644 index 000000000..38bc23fff Binary files /dev/null and b/docs/tokenomics/total-supply.png differ diff --git a/docs/validators/cosmovisor-setup.md b/docs/validators/cosmovisor-setup.md index 48c3fb7bc..d35ed3ceb 100644 --- a/docs/validators/cosmovisor-setup.md +++ b/docs/validators/cosmovisor-setup.md @@ -21,24 +21,26 @@ cosmovisor version Once cosmovisor is installed, the initial directory structure for it needs to be created. ```bash -mkdir -p $HOME/.empowerd/cosmovisor/genesis/bin -mkdir -p $HOME/.empowerd/cosmovisor/upgrades +mkdir -p $HOME/.empowerchain/cosmovisor/genesis/bin +mkdir -p $HOME/.empowerchain/cosmovisor/upgrades ``` -Copy the initial `empowerd` binary into `$HOME/.empowerd/cosmovisor/genesis/bin`. This should be the very first version used on the chain if syncing from genesis. If syncing from a snapshot or state sync, use the latest version of the `empowerd` binary. +Copy the initial `empowerd` binary into `$HOME/.empowerchain/cosmovisor/genesis/bin`. This should be the very first version used on the chain if syncing from genesis. If syncing from a snapshot or state sync, use the latest version of the `empowerd` binary. ```bash -cp $(which empowerd) $HOME/.empowerd/cosmovisor/genesis/bin/empowerd +cp $(which empowerd) $HOME/.empowerchain/cosmovisor/genesis/bin/empowerd ``` Once the initial binary has been copied, the `current` file must be created to point to the active binary. ```bash -ln -s $HOME/.empowerd/cosmovisor/genesis/bin/empowerd $HOME/.empowerd/cosmovisor/current +ln -s $HOME/.empowerchain/cosmovisor/genesis/bin/empowerd $HOME/.empowerchain/cosmovisor/current ``` It is recommended to setup a systemd service to manage Cosmovisor. A full list of environment variables that may be used can be found in the [Cosmovisor docs](https://docs.cosmos.network/main/tooling/cosmovisor). +> Note: If using `gvm` instead of a standard go installation, the path in the following ExecStart line may be different. To get cosmovisor's path while using `gvm`, ensure the `gvm` go profile that was used to build cosmovsior is active and run `$(which cosmovisor)`. This path should be using in place of `/home//go/bin/cosmovisor`. + ```bash sudo tee /etc/systemd/system/empowerd.service > /dev/null < -ExecStart=/home//go/bin/cosmovisor run start +ExecStart=/home//go/bin/cosmovisor run start Restart=always RestartSec=3 LimitNOFILE=4096 Environment="DAEMON_NAME=empowerd" -Environment="DAEMON_HOME=/home//.nolus" +Environment="DAEMON_HOME=/home//.empowerchain" Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false" Environment="DAEMON_RESTART_AFTER_UPGRADE=true" Environment="UNSAFE_SKIP_BACKUP=true" @@ -79,9 +81,9 @@ sudo journalctl -fu empowerd.service -o cat When it comes time for empowerd to be upgraded, cosmovisor looks for the next binaries according to a specific directory structure. -All upgrades must be in the `$HOME/.empowerd/cosmovisor/upgrades` directory. The name of the upgrade must be a subdirectory in this location. For example, if an upgrade named `v2` was released, the upgrade directory for this would be `$HOME/.empowerd/cosmovisor/uprgades/v2`. Within this directory should be another directory called `bin`. Finally, within this `bin` directory, the new empowerd binary should be present. Once the upgrade height is reached, cosmovisor stops the running `empowerd` binary and switches to the new one assuming that there is a properly created cosmovisor upgrade directory. +All upgrades must be in the `$HOME/.empowerchain/cosmovisor/upgrades` directory. The name of the upgrade must be a subdirectory in this location. For example, if an upgrade named `v2` was released, the upgrade directory for this would be `$HOME/.empowerchain/cosmovisor/uprgades/v2`. Within this directory should be another directory called `bin`. Finally, within this `bin` directory, the new empowerd binary should be present. Once the upgrade height is reached, cosmovisor stops the running `empowerd` binary and switches to the new one assuming that there is a properly created cosmovisor upgrade directory. -The following is a visual representation of cosmovisor's expected directory structure, starting at `$HOME/empowerd/cosmovisor/`: +The following is a visual representation of cosmovisor's expected directory structure, starting at `$HOME/.empowerchain/cosmovisor/`: ``` . @@ -95,4 +97,4 @@ The following is a visual representation of cosmovisor's expected directory stru └── empowerd ``` -It should not be necessary to change the `current` symlink unless Cosmovisor fails to handle the upgrade once the upgrade height is reached. \ No newline at end of file +It should not be necessary to change the `current` symlink unless Cosmovisor fails to handle the upgrade once the upgrade height is reached. diff --git a/docs/validators/delegation-program.md b/docs/validators/delegation-program.md index 789d0845b..56d13e0d4 100644 --- a/docs/validators/delegation-program.md +++ b/docs/validators/delegation-program.md @@ -1,3 +1,61 @@ # Delegation program -This is not finalized yet, stay tuned. It will be released shortly! \ No newline at end of file +The delegation program is a program by Empower aimed to incentivize validators to provide value to EmpowerChain. + +Empower will be delegating tokens from different parts of the genesis distribution to validators that provide value to +the network. + +The exact amount of tokens to be delegated is still being discussed, but it will be a significant amount. + +**Disclaimer:** The program in its entirety can be changed at any time by the Empower team, including the amount of +tokens to be delegated, the validators to be delegated to, and the criteria for delegation. +This is simply so that we can quickly adapt to the needs of the network. We don't expect our initial criteria to be +perfect, +and we need to be able to adapt quickly so the network is benefiting from the delegation program as much as possible. + +Empower might also delegate separately from the delegation program to strategic partners, but this will be done on a +case-by-case basis. + +## Eligibility + +Any validator that might want to apply for the delegation program need to meet the following criteria: + +- Max commission of 10% +- Not a centralized exchange or custodial platform of any sort. +- Keep secure infrastructure and decent up-time (minimum 95%) +- Must vote on all proposals + +If a validator at any time fail to meet any of these criteria, they will be removed from the delegation program with +immediate effect. + +## Delegation distribution + +The weight are very preliminary, and will be adjusted before mainnet launch. + +| Activity | Notes | Weight | +|--------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|--------| +| Deploying someone else's block explorer | E.g. Ping | 0.5 | +| Deploying your own block explorer | This will weigh heavier than an off-the-shelf explorer (because diversity) | 2 | +| Provide node RPC | | 0.5 | +| Provide node API | | 0.5 | +| Provide relaying service | | 2 | +| Provide snapshots | | 2 | +| Provide bots and/or other tooling | Talk to us to find out if we need something or not. Also, depending on the tooling, might go under wildcard. | 2 | +| Provide an archive node | | 2 | +| Make small code contributions | Bigger contributions will go under wildcard and be well rewarded | 2 | +| Make small documentation contributions | Bigger contributions will go under wildcard and be well rewarded | 1 | +| Social media promotion | Minimum 1 time per month | 1 | +| Responsiveness | Hard to quantify, but we will try to clarify decisions here | 2 | +| Wildcard | We will set the weight on a case-by-case basis and based on our own discretion (but documented and explained why) | X | +| Willingness to run testnet node after incentivized testnet is over | | 1 | + +Each criterion will be weighted differently, and the weights will be adjusted over time to ensure that the +delegation program is providing the most value to the network. + +The exact weights will be decided by the Empower team, and will be announced at a later point. + +## How to apply + +A form will be provided to validators later in the testnet phase. + +**Being in the active set during the testnet is not really relevant to the delegation program (so please don't worry about that)** diff --git a/docs/validators/full-node-setup.md b/docs/validators/full-node-setup.md index 7be7b2e94..2243d379c 100644 --- a/docs/validators/full-node-setup.md +++ b/docs/validators/full-node-setup.md @@ -51,19 +51,19 @@ chmod +x gvm-installer ./gvm-installer ``` -Since Empowerchain requires a modern version of `go`, version 1.4 is needed to compile later versions of `go` through `gvm`. Install `go1.4` and set the `GOROOT_BOOTSTRAP` value to the `$GOROOT` to configure this. +Since Empowerchain requires a modern version of `go`, version 1.4 is needed to compile later versions of `go` through `gvm`. Starting at `go1.20` and above, `gvm` has issues compiling when using `go1.4`, so it is recommended to use the binary download of `go1.19` and compile `go1.20`+ with that. Install `go1.19` and set the `GOROOT_BOOTSTRAP` value to the `$GOROOT` to configure this. ```bash -gvm install go1.4 -B -gvm use go1.4 +gvm install go1.19 -B +gvm use go1.19 export GOROOT_BOOTSTRAP=$GOROOT ``` -Once `go1.4` is installed, `go1.20.3` can be installed through `gvm`. +Once `go1.19` is installed, other version of go can be compiled. `go1.20.3` can be installed through `gvm`. ```bash gvm install go1.20.3 -gvm use go1.20.3 +gvm use go1.20.3 --default ``` Check to ensure that version `1.20.3` is being used as the system's default `go` version. @@ -129,7 +129,7 @@ cd empowerchain Checkout the desired version to build. The latest release tag can be found on the [EmpowerChain Release Page](https://github.com/EmpowerPlastic/empowerchain/releases/) ```bash -git checkout v0.0.3 +git checkout v1.0.0-rc2 ``` Compile the empowerd binary @@ -154,10 +154,10 @@ Replace the `` field with the chain-id of the desired network. empowerd init "custom_moniker" --chain-id ``` -Example for the `altruistic-1` testnet: +Example for the `circulus-1` testnet: ```bash -empowerd init "custom_moniker" --chain-id altruistic-1 +empowerd init "custom_moniker" --chain-id circulus-1 ``` ### Retrieve the Genesis File @@ -168,9 +168,9 @@ Retrieve a copy of the genesis file for the desired chain. The genesis file defi wget -O $HOME/empowerchain/config/genesis.json ``` -Example for the `altruistic-1` testnet: +Example for the `circulus-1` testnet: ```bash -wget -O $HOME/empowerchain/config/genesis.json https://github.com/EmpowerPlastic/empowerchain/blob/main/testnets/altruistic-1/genesis.json +wget -O $HOME/.empowerchain/config/genesis.json https://raw.githubusercontent.com/EmpowerPlastic/empowerchain/main/testnets/circulus-1/genesis.json ``` ### Set Persistent Peers and Seeds @@ -179,12 +179,11 @@ Retrieve the persistent peers and seeds from the Empowerchain official repo. All ```bash # Obtain the peers and seeds from the Empowerchain repository -PEERS="$(curl -s https://raw.githubusercontent.com/EmpowerPlastic/empowerchain/main/testnets/circulus-1/persistent_peers.txt)" -SEEDS="$(curl -s https://raw.githubusercontent.com/EmpowerPlastic/empowerchain/main/testnets/circulus-1/seeds.txt)" +seeds="d6a7cd9fa2bafc0087cb606de1d6d71216695c25@51.159.161.174:26656" +peers="e8b3fa38a15c426e046dd42a41b8df65047e03d5@95.217.144.107:26656,89ea54a37cd5a641e44e0cee8426b8cc2c8e5dfb@51.159.141.221:26656,0747860035271d8f088106814a4d0781eb7b2bc7@142.132.203.60:27656,3c758d8e37748dc692621a0d59b454bacb69b501@65.108.224.156:26656,41b97fced48681273001692d3601cd4024ceba59@5.9.147.185:26656" # Set the peers and seeds in the empowerd configuration file -sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.empowerchain/config/config.toml -sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" ~/.empowerchain/config/config.toml +sed -i -e 's|^seeds *=.*|seeds = "'$seeds'"|; s|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.empowerchain/config/config.toml ``` ### Set the minimum gas price @@ -248,4 +247,4 @@ WantedBy=multi-user.target EOF ``` -To use Cosmovisor to handle automatic upgrades, refer to the [Cosmovisor Setup](/validators/cosmovisor-setup) page. \ No newline at end of file +To use Cosmovisor to handle automatic upgrades, refer to the [Cosmovisor Setup](/validators/cosmovisor-setup) page. diff --git a/docs/validators/validator-setup.md b/docs/validators/validator-setup.md index b4ff95f40..6b3005738 100644 --- a/docs/validators/validator-setup.md +++ b/docs/validators/validator-setup.md @@ -37,7 +37,7 @@ empowerd gentx 100000000umpwr \ --commission-max-change-rate 0.1 \ --commission-max-rate 0.2 \ --commission-rate 0.05 \ - --min-self-delegation "1umpwr" \ + --min-self-delegation "1" \ --moniker "" \ --details= "" \ --website "" \ @@ -63,17 +63,17 @@ Once the node is synced and the wallet has funds in it, the node can be upgraded ```bash empowerd tx staking create-validator \ - --amount 1umpwr \ + --amount 1000000umpwr \ --chain-id circulus-1 \ --commission-max-change-rate 0.1 \ --commission-max-rate 0.2 \ --commission-rate 0.05 \ - --min-self-delegation "1umpwr" \ + --min-self-delegation "1" \ --moniker "" \ --details="" \ --security-contact="" \ --identity="" \ --pubkey=$(empowerd tendermint show-validator) \ - --gas-prices 0.025umpwr - --from \ No newline at end of file + --gas-prices 0.025umpwr \ + --from diff --git a/frontend/empowerjs-demo-application/package-lock.json b/frontend/empowerjs-demo-application/package-lock.json index 81f27843f..73f1ac775 100644 --- a/frontend/empowerjs-demo-application/package-lock.json +++ b/frontend/empowerjs-demo-application/package-lock.json @@ -19,7 +19,7 @@ "@vue/tsconfig": "^0.1.3", "npm-run-all": "^4.1.5", "typescript": "~4.8.4", - "vite": "^4.1.4", + "vite": "^4.3.9", "vue-tsc": "^1.2.0" } }, @@ -2597,9 +2597,9 @@ } }, "node_modules/vite": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.5.tgz", - "integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", + "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", "dev": true, "dependencies": { "esbuild": "^0.17.5", @@ -4719,9 +4719,9 @@ } }, "vite": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.5.tgz", - "integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", + "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", "dev": true, "requires": { "esbuild": "^0.17.5", diff --git a/frontend/empowerjs-demo-application/package.json b/frontend/empowerjs-demo-application/package.json index 3ba091fa4..70a208a9a 100644 --- a/frontend/empowerjs-demo-application/package.json +++ b/frontend/empowerjs-demo-application/package.json @@ -21,7 +21,7 @@ "@vue/tsconfig": "^0.1.3", "npm-run-all": "^4.1.5", "typescript": "~4.8.4", - "vite": "^4.1.4", + "vite": "^4.3.9", "vue-tsc": "^1.2.0" } } diff --git a/frontend/empowerjs/package-lock.json b/frontend/empowerjs/package-lock.json index 70cdc8d44..8063c2248 100644 --- a/frontend/empowerjs/package-lock.json +++ b/frontend/empowerjs/package-lock.json @@ -1,16 +1,17 @@ { "name": "@empower-plastic/empowerjs", - "version": "0.0.9", + "version": "0.0.15", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@empower-plastic/empowerjs", - "version": "0.0.9", + "version": "0.0.15", "license": "MIT", "dependencies": { "@babel/runtime": "^7.19.4", "@cosmjs/amino": "0.30.0", + "@cosmjs/cosmwasm-stargate": "0.30.0", "@cosmjs/proto-signing": "0.30.0", "@cosmjs/stargate": "0.30.0", "@cosmjs/tendermint-rpc": "0.30.0", @@ -1930,6 +1931,29 @@ "@cosmjs/utils": "^0.30.0" } }, + "node_modules/@cosmjs/cosmwasm-stargate": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.30.0.tgz", + "integrity": "sha512-nPJWpwSGpc15K88/9uxZmolEbixkeGzmxpTv6IbMAH23LXeJs7P+tXtgPe41ZjUw8Lt9Zc7ZOaOAqVveqqRktQ==", + "dependencies": { + "@cosmjs/amino": "^0.30.0", + "@cosmjs/crypto": "^0.30.0", + "@cosmjs/encoding": "^0.30.0", + "@cosmjs/math": "^0.30.0", + "@cosmjs/proto-signing": "^0.30.0", + "@cosmjs/stargate": "^0.30.0", + "@cosmjs/tendermint-rpc": "^0.30.0", + "@cosmjs/utils": "^0.30.0", + "cosmjs-types": "^0.7.1", + "long": "^4.0.0", + "pako": "^2.0.2" + } + }, + "node_modules/@cosmjs/cosmwasm-stargate/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "node_modules/@cosmjs/crypto": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.30.1.tgz", @@ -11147,6 +11171,11 @@ "node": ">=6" } }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -14569,6 +14598,31 @@ "@cosmjs/utils": "^0.30.0" } }, + "@cosmjs/cosmwasm-stargate": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.30.0.tgz", + "integrity": "sha512-nPJWpwSGpc15K88/9uxZmolEbixkeGzmxpTv6IbMAH23LXeJs7P+tXtgPe41ZjUw8Lt9Zc7ZOaOAqVveqqRktQ==", + "requires": { + "@cosmjs/amino": "^0.30.0", + "@cosmjs/crypto": "^0.30.0", + "@cosmjs/encoding": "^0.30.0", + "@cosmjs/math": "^0.30.0", + "@cosmjs/proto-signing": "^0.30.0", + "@cosmjs/stargate": "^0.30.0", + "@cosmjs/tendermint-rpc": "^0.30.0", + "@cosmjs/utils": "^0.30.0", + "cosmjs-types": "^0.7.1", + "long": "^4.0.0", + "pako": "^2.0.2" + }, + "dependencies": { + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + } + } + }, "@cosmjs/crypto": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.30.1.tgz", @@ -21656,6 +21710,11 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", diff --git a/frontend/empowerjs/package.json b/frontend/empowerjs/package.json index 472255b5f..ca67f6143 100644 --- a/frontend/empowerjs/package.json +++ b/frontend/empowerjs/package.json @@ -1,6 +1,6 @@ { "name": "@empower-plastic/empowerjs", - "version": "0.0.13", + "version": "0.0.18", "description": "Typescript types for EmpowerChain", "author": "empower ", "homepage": "https://github.com/EmpowerPlastic/empowerchain/tree/main/frontend/empowerjs#readme", @@ -82,6 +82,7 @@ "dependencies": { "@babel/runtime": "^7.19.4", "@cosmjs/amino": "0.30.0", + "@cosmjs/cosmwasm-stargate": "0.30.0", "@cosmjs/proto-signing": "0.30.0", "@cosmjs/stargate": "0.30.0", "@cosmjs/tendermint-rpc": "0.30.0", diff --git a/frontend/empowerjs/proto/cosmos/ics23/v1/proofs.proto b/frontend/empowerjs/proto/cosmos/ics23/v1/proofs.proto new file mode 100644 index 000000000..9c8b3d485 --- /dev/null +++ b/frontend/empowerjs/proto/cosmos/ics23/v1/proofs.proto @@ -0,0 +1,238 @@ +syntax = "proto3"; + +package cosmos.ics23.v1; + +option go_package = "github.com/cosmos/ics23/go;ics23"; + +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)) + SHA512_256 = 6; +} + +/** +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; + // prehash_key_before_comparison is a flag that indicates whether to use the + // prehash_key specified by LeafOp to compare lexical ordering of keys for + // non-existence proofs. + bool prehash_key_before_comparison = 5; +} + +/* +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; +} \ No newline at end of file diff --git a/frontend/empowerjs/proto/cosmwasm/wasm/v1/authz.proto b/frontend/empowerjs/proto/cosmwasm/wasm/v1/authz.proto new file mode 100644 index 000000000..cca4f033d --- /dev/null +++ b/frontend/empowerjs/proto/cosmwasm/wasm/v1/authz.proto @@ -0,0 +1,131 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "google/protobuf/any.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; +option (gogoproto.goproto_getters_all) = false; + +// ContractExecutionAuthorization defines authorization for wasm execute. +// Since: wasmd 0.30 +message ContractExecutionAuthorization { + option (amino.name) = "wasm/ContractExecutionAuthorization"; + option (cosmos_proto.implements_interface) = + "cosmos.authz.v1beta1.Authorization"; + + // Grants for contract executions + repeated ContractGrant grants = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// ContractMigrationAuthorization defines authorization for wasm contract +// migration. Since: wasmd 0.30 +message ContractMigrationAuthorization { + option (amino.name) = "wasm/ContractMigrationAuthorization"; + option (cosmos_proto.implements_interface) = + "cosmos.authz.v1beta1.Authorization"; + + // Grants for contract migrations + repeated ContractGrant grants = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// ContractGrant a granted permission for a single contract +// Since: wasmd 0.30 +message ContractGrant { + // Contract is the bech32 address of the smart contract + string contract = 1; + + // Limit defines execution limits that are enforced and updated when the grant + // is applied. When the limit lapsed the grant is removed. + google.protobuf.Any limit = 2 [ (cosmos_proto.accepts_interface) = + "cosmwasm.wasm.v1.ContractAuthzLimitX" ]; + + // Filter define more fine-grained control on the message payload passed + // to the contract in the operation. When no filter applies on execution, the + // operation is prohibited. + google.protobuf.Any filter = 3 + [ (cosmos_proto.accepts_interface) = + "cosmwasm.wasm.v1.ContractAuthzFilterX" ]; +} + +// MaxCallsLimit limited number of calls to the contract. No funds transferable. +// Since: wasmd 0.30 +message MaxCallsLimit { + option (amino.name) = "wasm/MaxCallsLimit"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzLimitX"; + + // Remaining number that is decremented on each execution + uint64 remaining = 1; +} + +// MaxFundsLimit defines the maximal amounts that can be sent to the contract. +// Since: wasmd 0.30 +message MaxFundsLimit { + option (amino.name) = "wasm/MaxFundsLimit"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzLimitX"; + + // Amounts is the maximal amount of tokens transferable to the contract. + repeated cosmos.base.v1beta1.Coin amounts = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// CombinedLimit defines the maximal amounts that can be sent to a contract and +// the maximal number of calls executable. Both need to remain >0 to be valid. +// Since: wasmd 0.30 +message CombinedLimit { + option (amino.name) = "wasm/CombinedLimit"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzLimitX"; + + // Remaining number that is decremented on each execution + uint64 calls_remaining = 1; + // Amounts is the maximal amount of tokens transferable to the contract. + repeated cosmos.base.v1beta1.Coin amounts = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// AllowAllMessagesFilter is a wildcard to allow any type of contract payload +// message. +// Since: wasmd 0.30 +message AllowAllMessagesFilter { + option (amino.name) = "wasm/AllowAllMessagesFilter"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzFilterX"; +} + +// AcceptedMessageKeysFilter accept only the specific contract message keys in +// the json object to be executed. +// Since: wasmd 0.30 +message AcceptedMessageKeysFilter { + option (amino.name) = "wasm/AcceptedMessageKeysFilter"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzFilterX"; + + // Messages is the list of unique keys + repeated string keys = 1; +} + +// AcceptedMessagesFilter accept only the specific raw contract messages to be +// executed. +// Since: wasmd 0.30 +message AcceptedMessagesFilter { + option (amino.name) = "wasm/AcceptedMessagesFilter"; + option (cosmos_proto.implements_interface) = + "cosmwasm.wasm.v1.ContractAuthzFilterX"; + + // Messages is the list of raw contract messages + repeated bytes messages = 1 [ (gogoproto.casttype) = "RawContractMessage" ]; +} diff --git a/frontend/empowerjs/proto/cosmwasm/wasm/v1/genesis.proto b/frontend/empowerjs/proto/cosmwasm/wasm/v1/genesis.proto new file mode 100644 index 000000000..68e8b18e6 --- /dev/null +++ b/frontend/empowerjs/proto/cosmwasm/wasm/v1/genesis.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1; + +import "gogoproto/gogo.proto"; +import "cosmwasm/wasm/v1/types.proto"; +import "amino/amino.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, (amino.dont_omitempty) = true ]; + repeated Code codes = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "codes,omitempty" + ]; + repeated Contract contracts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "contracts,omitempty" + ]; + repeated Sequence sequences = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.jsontag) = "sequences,omitempty" + ]; +} + +// Code struct encompasses CodeInfo and CodeBytes +message Code { + uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; + CodeInfo code_info = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + 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, (amino.dont_omitempty) = true ]; + repeated Model contract_state = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + repeated ContractCodeHistoryEntry contract_code_history = 4 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// 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/frontend/empowerjs/proto/cosmwasm/wasm/v1/ibc.proto b/frontend/empowerjs/proto/cosmwasm/wasm/v1/ibc.proto new file mode 100644 index 000000000..feaad2936 --- /dev/null +++ b/frontend/empowerjs/proto/cosmwasm/wasm/v1/ibc.proto @@ -0,0 +1,37 @@ +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; +} + +// MsgIBCSendResponse +message MsgIBCSendResponse { + // Sequence number of the IBC packet sent + uint64 sequence = 1; +} + +// MsgIBCCloseChannel port and channel need to be owned by the contract +message MsgIBCCloseChannel { + string channel = 2 [ (gogoproto.moretags) = "yaml:\"source_channel\"" ]; +} diff --git a/frontend/empowerjs/proto/cosmwasm/wasm/v1/proposal.proto b/frontend/empowerjs/proto/cosmwasm/wasm/v1/proposal.proto new file mode 100644 index 000000000..eedbb9b39 --- /dev/null +++ b/frontend/empowerjs/proto/cosmwasm/wasm/v1/proposal.proto @@ -0,0 +1,330 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmwasm/wasm/v1/types.proto"; +import "amino/amino.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; + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit StoreCodeProposal. To submit WASM code to the system, +// a simple MsgStoreCode can be invoked from the x/gov module via +// a v1 governance proposal. +message StoreCodeProposal { + option deprecated = true; + option (amino.name) = "wasm/StoreCodeProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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; + // UnpinCode code on upload, optional + bool unpin_code = 8; + // Source is the URL where the code is hosted + string source = 9; + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + string builder = 10; + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + bytes code_hash = 11; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit InstantiateContractProposal. To instantiate a contract, +// a simple MsgInstantiateContract can be invoked from the x/gov module via +// a v1 governance proposal. +message InstantiateContractProposal { + option deprecated = true; + option (amino.name) = "wasm/InstantiateContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit InstantiateContract2Proposal. To instantiate contract 2, +// a simple MsgInstantiateContract2 can be invoked from the x/gov module via +// a v1 governance proposal. +message InstantiateContract2Proposal { + option deprecated = true; + option (amino.name) = "wasm/InstantiateContract2Proposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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 enviroment 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 encode 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, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + bytes salt = 9; + // FixMsg include the msg value into the hash for the predictable address. + // Default is false + bool fix_msg = 10; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit MigrateContractProposal. To migrate a contract, +// a simple MsgMigrateContract can be invoked from the x/gov module via +// a v1 governance proposal. +message MigrateContractProposal { + option deprecated = true; + option (amino.name) = "wasm/MigrateContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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 code + 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" ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit SudoContractProposal. To call sudo on a contract, +// a simple MsgSudoContract can be invoked from the x/gov module via +// a v1 governance proposal. +message SudoContractProposal { + option deprecated = true; + option (amino.name) = "wasm/SudoContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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" ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit ExecuteContractProposal. To call execute on a contract, +// a simple MsgExecuteContract can be invoked from the x/gov module via +// a v1 governance proposal. +message ExecuteContractProposal { + option deprecated = true; + option (amino.name) = "wasm/ExecuteContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UpdateAdminProposal. To set an admin for a contract, +// a simple MsgUpdateAdmin can be invoked from the x/gov module via +// a v1 governance proposal. +message UpdateAdminProposal { + option deprecated = true; + option (amino.name) = "wasm/UpdateAdminProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit ClearAdminProposal. To clear the admin of a contract, +// a simple MsgClearAdmin can be invoked from the x/gov module via +// a v1 governance proposal. +message ClearAdminProposal { + option deprecated = true; + option (amino.name) = "wasm/ClearAdminProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit PinCodesProposal. To pin a set of code ids in the wasmvm +// cache, a simple MsgPinCodes can be invoked from the x/gov module via +// a v1 governance proposal. +message PinCodesProposal { + option deprecated = true; + option (amino.name) = "wasm/PinCodesProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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\"" + ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm +// cache, a simple MsgUnpinCodes can be invoked from the x/gov module via +// a v1 governance proposal. +message UnpinCodesProposal { + option deprecated = true; + option (amino.name) = "wasm/UnpinCodesProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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\"" + ]; +} + +// AccessConfigUpdate contains the code id and the access config to be +// applied. +message AccessConfigUpdate { + // CodeID is the reference to the stored WASM code to be updated + uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; + // InstantiatePermission to apply to the set of code ids + AccessConfig instantiate_permission = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UpdateInstantiateConfigProposal. To update instantiate config +// to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from +// the x/gov module via a v1 governance proposal. +message UpdateInstantiateConfigProposal { + option deprecated = true; + option (amino.name) = "wasm/UpdateInstantiateConfigProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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\"" ]; + // AccessConfigUpdate contains the list of code ids and the access config + // to be applied. + repeated AccessConfigUpdate access_config_updates = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit StoreAndInstantiateContractProposal. To store and instantiate +// the contract, a simple MsgStoreAndInstantiateContract can be invoked from +// the x/gov module via a v1 governance proposal. +message StoreAndInstantiateContractProposal { + option deprecated = true; + option (amino.name) = "wasm/StoreAndInstantiateContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // 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" ]; + // InstantiatePermission to apply on contract creation, optional + AccessConfig instantiate_permission = 5; + // UnpinCode code on upload, optional + bool unpin_code = 6; + // Admin is an optional address that can execute migrations + string admin = 7; + // Label is optional metadata to be stored with a constract instance. + string label = 8; + // Msg json encoded message to be passed to the contract on instantiation + bytes msg = 9 [ (gogoproto.casttype) = "RawContractMessage" ]; + // Funds coins that are transferred to the contract on instantiation + repeated cosmos.base.v1beta1.Coin funds = 10 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // Source is the URL where the code is hosted + string source = 11; + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + string builder = 12; + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + bytes code_hash = 13; +} diff --git a/frontend/empowerjs/proto/cosmwasm/wasm/v1/query.proto b/frontend/empowerjs/proto/cosmwasm/wasm/v1/query.proto new file mode 100644 index 000000000..d14f31592 --- /dev/null +++ b/frontend/empowerjs/proto/cosmwasm/wasm/v1/query.proto @@ -0,0 +1,268 @@ +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"; +import "amino/amino.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 = + "/cosmwasm/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 = + "/cosmwasm/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"; + } + + // Params gets the module params + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmwasm/wasm/v1/codes/params"; + } + + // ContractsByCreator gets the contracts by creator + rpc ContractsByCreator(QueryContractsByCreatorRequest) + returns (QueryContractsByCreatorResponse) { + option (google.api.http).get = + "/cosmwasm/wasm/v1/contracts/creator/{creator_address}"; + } +} + +// 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, + (amino.dont_omitempty) = true, + (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, (amino.dont_omitempty) = true ]; + // 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, (amino.dont_omitempty) = true ]; + // 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/cometbft/cometbft/libs/bytes.HexBytes" ]; + // Used in v1beta1 + reserved 4, 5; + AccessConfig instantiate_permission = 6 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// 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, (amino.dont_omitempty) = true ]; + // 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.customname) = "CodeIDs" ]; + // 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 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// QueryContractsByCreatorRequest is the request type for the +// Query/ContractsByCreator RPC method. +message QueryContractsByCreatorRequest { + // CreatorAddress is the address of contract creator + string creator_address = 1; + // Pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryContractsByCreatorResponse is the response type for the +// Query/ContractsByCreator RPC method. +message QueryContractsByCreatorResponse { + // ContractAddresses result set + repeated string contract_addresses = 1; + // Pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} \ No newline at end of file diff --git a/frontend/empowerjs/proto/cosmwasm/wasm/v1/tx.proto b/frontend/empowerjs/proto/cosmwasm/wasm/v1/tx.proto new file mode 100644 index 000000000..90905f5e7 --- /dev/null +++ b/frontend/empowerjs/proto/cosmwasm/wasm/v1/tx.proto @@ -0,0 +1,391 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; +import "cosmwasm/wasm/v1/types.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.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); + // InstantiateContract creates a new smart contract instance for the given + // code id. + rpc InstantiateContract(MsgInstantiateContract) + returns (MsgInstantiateContractResponse); + // InstantiateContract2 creates a new smart contract instance for the given + // code id with a predictable address + rpc InstantiateContract2(MsgInstantiateContract2) + returns (MsgInstantiateContract2Response); + // 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); + // UpdateInstantiateConfig updates instantiate config for a smart contract + rpc UpdateInstantiateConfig(MsgUpdateInstantiateConfig) + returns (MsgUpdateInstantiateConfigResponse); + // UpdateParams defines a governance operation for updating the x/wasm + // module parameters. The authority is defined in the keeper. + // + // Since: 0.40 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + // SudoContract defines a governance operation for calling sudo + // on a contract. The authority is defined in the keeper. + // + // Since: 0.40 + rpc SudoContract(MsgSudoContract) returns (MsgSudoContractResponse); + // PinCodes defines a governance operation for pinning a set of + // code ids in the wasmvm cache. The authority is defined in the keeper. + // + // Since: 0.40 + rpc PinCodes(MsgPinCodes) returns (MsgPinCodesResponse); + // UnpinCodes defines a governance operation for unpinning a set of + // code ids in the wasmvm cache. The authority is defined in the keeper. + // + // Since: 0.40 + rpc UnpinCodes(MsgUnpinCodes) returns (MsgUnpinCodesResponse); + // StoreAndInstantiateContract defines a governance operation for storing + // and instantiating the contract. The authority is defined in the keeper. + // + // Since: 0.40 + rpc StoreAndInstantiateContract(MsgStoreAndInstantiateContract) + returns (MsgStoreAndInstantiateContractResponse); +} + +// MsgStoreCode submit Wasm code to the system +message MsgStoreCode { + option (amino.name) = "wasm/MsgStoreCode"; + option (cosmos.msg.v1.signer) = "sender"; + + // Sender is the 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" ]; + // Checksum is the sha256 hash of the stored code + bytes checksum = 2; +} + +// MsgInstantiateContract create a new smart contract instance for the given +// code id. +message MsgInstantiateContract { + option (amino.name) = "wasm/MsgInstantiateContract"; + option (cosmos.msg.v1.signer) = "sender"; + + // 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, + (amino.dont_omitempty) = true, + (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 bytes to returned from the contract + bytes data = 2; +} + +// MsgInstantiateContract2 create a new smart contract instance for the given +// code id with a predicable address. +message MsgInstantiateContract2 { + option (amino.name) = "wasm/MsgInstantiateContract2"; + option (cosmos.msg.v1.signer) = "sender"; + + // 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, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + bytes salt = 7; + // FixMsg include the msg value into the hash for the predictable address. + // Default is false + bool fix_msg = 8; +} + +// MsgInstantiateContract2Response return instantiation result data +message MsgInstantiateContract2Response { + // Address is the bech32 address of the new contract instance. + string address = 1; + // Data contains bytes to returned from the contract + bytes data = 2; +} + +// MsgExecuteContract submits the given message data to a smart contract +message MsgExecuteContract { + option (amino.name) = "wasm/MsgExecuteContract"; + option (cosmos.msg.v1.signer) = "sender"; + + // 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, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgExecuteContractResponse returns execution result data. +message MsgExecuteContractResponse { + // Data contains bytes to returned from the contract + bytes data = 1; +} + +// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract +message MsgMigrateContract { + option (amino.name) = "wasm/MsgMigrateContract"; + option (cosmos.msg.v1.signer) = "sender"; + + // 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 { + option (amino.name) = "wasm/MsgUpdateAdmin"; + option (cosmos.msg.v1.signer) = "sender"; + + // 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 { + option (amino.name) = "wasm/MsgClearAdmin"; + option (cosmos.msg.v1.signer) = "sender"; + + // Sender is the 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 {} + +// MsgUpdateInstantiateConfig updates instantiate config for a smart contract +message MsgUpdateInstantiateConfig { + option (amino.name) = "wasm/MsgUpdateInstantiateConfig"; + option (cosmos.msg.v1.signer) = "sender"; + + // Sender is the that actor that signed the messages + string sender = 1; + // CodeID references the stored WASM code + uint64 code_id = 2 [ (gogoproto.customname) = "CodeID" ]; + // NewInstantiatePermission is the new access control + AccessConfig new_instantiate_permission = 3; +} + +// MsgUpdateInstantiateConfigResponse returns empty data +message MsgUpdateInstantiateConfigResponse {} + +// MsgUpdateParams is the MsgUpdateParams request type. +// +// Since: 0.40 +message MsgUpdateParams { + option (amino.name) = "wasm/MsgUpdateParams"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // params defines the x/wasm parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: 0.40 +message MsgUpdateParamsResponse {} + +// MsgSudoContract is the MsgSudoContract request type. +// +// Since: 0.40 +message MsgSudoContract { + option (amino.name) = "wasm/MsgSudoContract"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // Contract is the address of the smart contract + string contract = 2; + // Msg json encoded message to be passed to the contract as sudo + bytes msg = 3 [ (gogoproto.casttype) = "RawContractMessage" ]; +} + +// MsgSudoContractResponse defines the response structure for executing a +// MsgSudoContract message. +// +// Since: 0.40 +message MsgSudoContractResponse { + // Data contains bytes to returned from the contract + bytes data = 1; +} + +// MsgPinCodes is the MsgPinCodes request type. +// +// Since: 0.40 +message MsgPinCodes { + option (amino.name) = "wasm/MsgPinCodes"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // CodeIDs references the new WASM codes + repeated uint64 code_ids = 2 [ + (gogoproto.customname) = "CodeIDs", + (gogoproto.moretags) = "yaml:\"code_ids\"" + ]; +} + +// MsgPinCodesResponse defines the response structure for executing a +// MsgPinCodes message. +// +// Since: 0.40 +message MsgPinCodesResponse {} + +// MsgUnpinCodes is the MsgUnpinCodes request type. +// +// Since: 0.40 +message MsgUnpinCodes { + option (amino.name) = "wasm/MsgUnpinCodes"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // CodeIDs references the WASM codes + repeated uint64 code_ids = 2 [ + (gogoproto.customname) = "CodeIDs", + (gogoproto.moretags) = "yaml:\"code_ids\"" + ]; +} + +// MsgUnpinCodesResponse defines the response structure for executing a +// MsgUnpinCodes message. +// +// Since: 0.40 +message MsgUnpinCodesResponse {} + +// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract +// request type. +// +// Since: 0.40 +message MsgStoreAndInstantiateContract { + option (amino.name) = "wasm/MsgStoreAndInstantiateContract"; + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the address of the governance account. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // WASMByteCode can be raw or gzip compressed + bytes wasm_byte_code = 3 [ (gogoproto.customname) = "WASMByteCode" ]; + // InstantiatePermission to apply on contract creation, optional + AccessConfig instantiate_permission = 4; + // UnpinCode code on upload, optional. As default the uploaded contract is + // pinned to cache. + bool unpin_code = 5; + // Admin is an optional address that can execute migrations + string admin = 6; + // Label is optional metadata to be stored with a constract instance. + string label = 7; + // Msg json encoded message to be passed to the contract on instantiation + bytes msg = 8 [ (gogoproto.casttype) = "RawContractMessage" ]; + // Funds coins that are transferred from the authority account to the contract + // on instantiation + repeated cosmos.base.v1beta1.Coin funds = 9 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // Source is the URL where the code is hosted + string source = 10; + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + string builder = 11; + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + bytes code_hash = 12; +} + +// MsgStoreAndInstantiateContractResponse defines the response structure +// for executing a MsgStoreAndInstantiateContract message. +// +// Since: 0.40 +message MsgStoreAndInstantiateContractResponse { + // Address is the bech32 address of the new contract instance. + string address = 1; + // Data contains bytes to returned from the contract + bytes data = 2; +} \ No newline at end of file diff --git a/frontend/empowerjs/proto/cosmwasm/wasm/v1/types.proto b/frontend/empowerjs/proto/cosmwasm/wasm/v1/types.proto new file mode 100644 index 000000000..6d8db3add --- /dev/null +++ b/frontend/empowerjs/proto/cosmwasm/wasm/v1/types.proto @@ -0,0 +1,148 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "amino/amino.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 a single address + // Deprecated: use AccessTypeAnyOfAddresses instead + ACCESS_TYPE_ONLY_ADDRESS = 2 + [ (gogoproto.enumvalue_customname) = "AccessTypeOnlyAddress" ]; + // AccessTypeEverybody unrestricted + ACCESS_TYPE_EVERYBODY = 3 + [ (gogoproto.enumvalue_customname) = "AccessTypeEverybody" ]; + // AccessTypeAnyOfAddresses allow any of the addresses + ACCESS_TYPE_ANY_OF_ADDRESSES = 4 + [ (gogoproto.enumvalue_customname) = "AccessTypeAnyOfAddresses" ]; +} + +// 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\"" ]; + + // Address + // Deprecated: replaced by addresses + string address = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ]; + repeated string addresses = 3 [ (gogoproto.moretags) = "yaml:\"addresses\"" ]; +} + +// Params defines the set of wasm parameters. +message Params { + option (gogoproto.goproto_stringer) = false; + AccessConfig code_upload_access = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.moretags) = "yaml:\"code_upload_access\"" + ]; + AccessType instantiate_default_permission = 2 + [ (gogoproto.moretags) = "yaml:\"instantiate_default_permission\"" ]; +} + +// 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, (amino.dont_omitempty) = true ]; +} + +// 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. + 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) = + "cosmwasm.wasm.v1.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/cometbft/cometbft/libs/bytes.HexBytes" ]; + // base64-encode raw value + bytes value = 2; +} diff --git a/frontend/empowerjs/proto/ibc/applications/fee/v1/ack.proto b/frontend/empowerjs/proto/ibc/applications/fee/v1/ack.proto new file mode 100644 index 000000000..ec1342bbf --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/fee/v1/ack.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; + +// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware +message IncentivizedAcknowledgement { + // the underlying app acknowledgement bytes + bytes app_acknowledgement = 1 [(gogoproto.moretags) = "yaml:\"app_acknowledgement\""]; + // the relayer address which submits the recv packet message + string forward_relayer_address = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer_address\""]; + // success flag of the base application callback + bool underlying_app_success = 3 [(gogoproto.moretags) = "yaml:\"underlying_app_successl\""]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/fee/v1/fee.proto b/frontend/empowerjs/proto/ibc/applications/fee/v1/fee.proto new file mode 100644 index 000000000..1a025ddca --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/fee/v1/fee.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// Fee defines the ICS29 receive, acknowledgement and timeout fees +message Fee { + // the packet receive fee + repeated cosmos.base.v1beta1.Coin recv_fee = 1 [ + (gogoproto.moretags) = "yaml:\"recv_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // the packet acknowledgement fee + repeated cosmos.base.v1beta1.Coin ack_fee = 2 [ + (gogoproto.moretags) = "yaml:\"ack_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // the packet timeout fee + repeated cosmos.base.v1beta1.Coin timeout_fee = 3 [ + (gogoproto.moretags) = "yaml:\"timeout_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers +message PacketFee { + // fee encapsulates the recv, ack and timeout fees associated with an IBC packet + Fee fee = 1 [(gogoproto.nullable) = false]; + // the refund address for unspent fees + string refund_address = 2 [(gogoproto.moretags) = "yaml:\"refund_address\""]; + // optional list of relayers permitted to receive fees + repeated string relayers = 3; +} + +// PacketFees contains a list of type PacketFee +message PacketFees { + // list of packet fees + repeated PacketFee packet_fees = 1 [(gogoproto.moretags) = "yaml:\"packet_fees\"", (gogoproto.nullable) = false]; +} + +// IdentifiedPacketFees contains a list of type PacketFee and associated PacketId +message IdentifiedPacketFees { + // unique packet identifier comprised of the channel ID, port ID and sequence + ibc.core.channel.v1.PacketId packet_id = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"packet_id\""]; + // list of packet fees + repeated PacketFee packet_fees = 2 [(gogoproto.moretags) = "yaml:\"packet_fees\"", (gogoproto.nullable) = false]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/fee/v1/genesis.proto b/frontend/empowerjs/proto/ibc/applications/fee/v1/genesis.proto new file mode 100644 index 000000000..6bba6cff6 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/fee/v1/genesis.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/fee/v1/fee.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// GenesisState defines the ICS29 fee middleware genesis state +message GenesisState { + // list of identified packet fees + repeated IdentifiedPacketFees identified_fees = 1 + [(gogoproto.moretags) = "yaml:\"identified_fees\"", (gogoproto.nullable) = false]; + // list of fee enabled channels + repeated FeeEnabledChannel fee_enabled_channels = 2 + [(gogoproto.moretags) = "yaml:\"fee_enabled_channels\"", (gogoproto.nullable) = false]; + // list of registered payees + repeated RegisteredPayee registered_payees = 3 + [(gogoproto.moretags) = "yaml:\"registered_payees\"", (gogoproto.nullable) = false]; + // list of registered counterparty payees + repeated RegisteredCounterpartyPayee registered_counterparty_payees = 4 + [(gogoproto.moretags) = "yaml:\"registered_counterparty_payees\"", (gogoproto.nullable) = false]; + // list of forward relayer addresses + repeated ForwardRelayerAddress forward_relayers = 5 + [(gogoproto.moretags) = "yaml:\"forward_relayers\"", (gogoproto.nullable) = false]; +} + +// FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel +message FeeEnabledChannel { + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// RegisteredPayee contains the relayer address and payee address for a specific channel +message RegisteredPayee { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 2; + // the payee address + string payee = 3; +} + +// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used +// for recv fee distribution) +message RegisteredCounterpartyPayee { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 2; + // the counterparty payee address + string counterparty_payee = 3 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; +} + +// ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements +message ForwardRelayerAddress { + // the forward relayer address + string address = 1; + // unique packet identifer comprised of the channel ID, port ID and sequence + ibc.core.channel.v1.PacketId packet_id = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"packet_id\""]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/fee/v1/metadata.proto b/frontend/empowerjs/proto/ibc/applications/fee/v1/metadata.proto new file mode 100644 index 000000000..0c0a72c9c --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/fee/v1/metadata.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; + +// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring +// See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning +message Metadata { + // fee_version defines the ICS29 fee version + string fee_version = 1 [(gogoproto.moretags) = "yaml:\"fee_version\""]; + // app_version defines the underlying application version, which may or may not be a JSON encoded bytestring + string app_version = 2 [(gogoproto.moretags) = "yaml:\"app_version\""]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/fee/v1/query.proto b/frontend/empowerjs/proto/ibc/applications/fee/v1/query.proto new file mode 100644 index 000000000..871cfdac7 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/fee/v1/query.proto @@ -0,0 +1,222 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/applications/fee/v1/fee.proto"; +import "ibc/applications/fee/v1/genesis.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// Query defines the ICS29 gRPC querier service. +service Query { + // IncentivizedPackets returns all incentivized packets and their associated fees + rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets"; + } + + // IncentivizedPacket returns all packet fees for a packet given its identifier + rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) { + option (google.api.http).get = + "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/" + "{packet_id.sequence}/incentivized_packet"; + } + + // Gets all incentivized packets for a specific channel + rpc IncentivizedPacketsForChannel(QueryIncentivizedPacketsForChannelRequest) + returns (QueryIncentivizedPacketsForChannelResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets"; + } + + // TotalRecvFees returns the total receive fees for a packet given its identifier + rpc TotalRecvFees(QueryTotalRecvFeesRequest) returns (QueryTotalRecvFeesResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_recv_fees"; + } + + // TotalAckFees returns the total acknowledgement fees for a packet given its identifier + rpc TotalAckFees(QueryTotalAckFeesRequest) returns (QueryTotalAckFeesResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_ack_fees"; + } + + // TotalTimeoutFees returns the total timeout fees for a packet given its identifier + rpc TotalTimeoutFees(QueryTotalTimeoutFeesRequest) returns (QueryTotalTimeoutFeesResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_timeout_fees"; + } + + // Payee returns the registered payee address for a specific channel given the relayer address + rpc Payee(QueryPayeeRequest) returns (QueryPayeeResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee"; + } + + // CounterpartyPayee returns the registered counterparty payee for forward relaying + rpc CounterpartyPayee(QueryCounterpartyPayeeRequest) returns (QueryCounterpartyPayeeResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee"; + } + + // FeeEnabledChannels returns a list of all fee enabled channels + rpc FeeEnabledChannels(QueryFeeEnabledChannelsRequest) returns (QueryFeeEnabledChannelsResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/fee_enabled"; + } + + // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel + rpc FeeEnabledChannel(QueryFeeEnabledChannelRequest) returns (QueryFeeEnabledChannelResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled"; + } +} + +// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc +message QueryIncentivizedPacketsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; + // block height at which to query + uint64 query_height = 2; +} + +// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc +message QueryIncentivizedPacketsResponse { + // list of identified fees for incentivized packets + repeated ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packets = 1 [(gogoproto.nullable) = false]; +} + +// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc +message QueryIncentivizedPacketRequest { + // unique packet identifier comprised of channel ID, port ID and sequence + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; + // block height at which to query + uint64 query_height = 2; +} + +// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc +message QueryIncentivizedPacketResponse { + // the identified fees for the incentivized packet + ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packet = 1 [(gogoproto.nullable) = false]; +} + +// QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets +// for a specific channel +message QueryIncentivizedPacketsForChannelRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; + string port_id = 2; + string channel_id = 3; + // Height to query at + uint64 query_height = 4; +} + +// QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC +message QueryIncentivizedPacketsForChannelResponse { + // Map of all incentivized_packets + repeated ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packets = 1; +} + +// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc +message QueryTotalRecvFeesRequest { + // the packet identifier for the associated fees + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; +} + +// QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc +message QueryTotalRecvFeesResponse { + // the total packet receive fees + repeated cosmos.base.v1beta1.Coin recv_fees = 1 [ + (gogoproto.moretags) = "yaml:\"recv_fees\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc +message QueryTotalAckFeesRequest { + // the packet identifier for the associated fees + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; +} + +// QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc +message QueryTotalAckFeesResponse { + // the total packet acknowledgement fees + repeated cosmos.base.v1beta1.Coin ack_fees = 1 [ + (gogoproto.moretags) = "yaml:\"ack_fees\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc +message QueryTotalTimeoutFeesRequest { + // the packet identifier for the associated fees + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; +} + +// QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc +message QueryTotalTimeoutFeesResponse { + // the total packet timeout fees + repeated cosmos.base.v1beta1.Coin timeout_fees = 1 [ + (gogoproto.moretags) = "yaml:\"timeout_fees\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// QueryPayeeRequest defines the request type for the Payee rpc +message QueryPayeeRequest { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address to which the distribution address is registered + string relayer = 2; +} + +// QueryPayeeResponse defines the response type for the Payee rpc +message QueryPayeeResponse { + // the payee address to which packet fees are paid out + string payee_address = 1 [(gogoproto.moretags) = "yaml:\"payee_address\""]; +} + +// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc +message QueryCounterpartyPayeeRequest { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address to which the counterparty is registered + string relayer = 2; +} + +// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc +message QueryCounterpartyPayeeResponse { + // the counterparty payee address used to compensate forward relaying + string counterparty_payee = 1 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; +} + +// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc +message QueryFeeEnabledChannelsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; + // block height at which to query + uint64 query_height = 2; +} + +// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc +message QueryFeeEnabledChannelsResponse { + // list of fee enabled channels + repeated ibc.applications.fee.v1.FeeEnabledChannel fee_enabled_channels = 1 + [(gogoproto.moretags) = "yaml:\"fee_enabled_channels\"", (gogoproto.nullable) = false]; +} + +// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc +message QueryFeeEnabledChannelRequest { + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc +message QueryFeeEnabledChannelResponse { + // boolean flag representing the fee enabled channel status + bool fee_enabled = 1 [(gogoproto.moretags) = "yaml:\"fee_enabled\""]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/fee/v1/tx.proto b/frontend/empowerjs/proto/ibc/applications/fee/v1/tx.proto new file mode 100644 index 000000000..3a46de74e --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/fee/v1/tx.proto @@ -0,0 +1,112 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/fee/v1/fee.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// Msg defines the ICS29 Msg service. +service Msg { + // RegisterPayee defines a rpc handler method for MsgRegisterPayee + // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + // payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on + // the source chain from which packets originate as this is where fee distribution takes place. This function may be + // called more than once by a relayer, in which case, the latest payee is always used. + rpc RegisterPayee(MsgRegisterPayee) returns (MsgRegisterPayeeResponse); + + // RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee + // RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty + // payee address before relaying. This ensures they will be properly compensated for forward relaying since + // the destination chain must include the registered counterparty payee address in the acknowledgement. This function + // may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. + rpc RegisterCounterpartyPayee(MsgRegisterCounterpartyPayee) returns (MsgRegisterCounterpartyPayeeResponse); + + // PayPacketFee defines a rpc handler method for MsgPayPacketFee + // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the packet at the next sequence + // NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows + // initiates the lifecycle of the incentivized packet + rpc PayPacketFee(MsgPayPacketFee) returns (MsgPayPacketFeeResponse); + + // PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync + // PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of a known packet (i.e. at a particular sequence) + rpc PayPacketFeeAsync(MsgPayPacketFeeAsync) returns (MsgPayPacketFeeAsyncResponse); +} + +// MsgRegisterPayee defines the request type for the RegisterPayee rpc +message MsgRegisterPayee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 3; + // the payee address + string payee = 4; +} + +// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +message MsgRegisterPayeeResponse {} + +// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc +message MsgRegisterCounterpartyPayee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 3; + // the counterparty payee address + string counterparty_payee = 4 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; +} + +// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc +message MsgRegisterCounterpartyPayeeResponse {} + +// MsgPayPacketFee defines the request type for the PayPacketFee rpc +// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be +// paid for +message MsgPayPacketFee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // fee encapsulates the recv, ack and timeout fees associated with an IBC packet + ibc.applications.fee.v1.Fee fee = 1 [(gogoproto.nullable) = false]; + // the source port unique identifier + string source_port_id = 2 [(gogoproto.moretags) = "yaml:\"source_port_id\""]; + // the source channel unique identifer + string source_channel_id = 3 [(gogoproto.moretags) = "yaml:\"source_channel_id\""]; + // account address to refund fee if necessary + string signer = 4; + // optional list of relayers permitted to the receive packet fees + repeated string relayers = 5; +} + +// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc +message MsgPayPacketFeeResponse {} + +// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc +// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) +message MsgPayPacketFeeAsync { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // unique packet identifier comprised of the channel ID, port ID and sequence + ibc.core.channel.v1.PacketId packet_id = 1 + [(gogoproto.moretags) = "yaml:\"packet_id\"", (gogoproto.nullable) = false]; + // the packet fee associated with a particular IBC packet + PacketFee packet_fee = 2 [(gogoproto.moretags) = "yaml:\"packet_fee\"", (gogoproto.nullable) = false]; +} + +// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc +message MsgPayPacketFeeAsyncResponse {} diff --git a/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto new file mode 100644 index 000000000..a505b4637 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.controller.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types"; + +import "gogoproto/gogo.proto"; + +// Params defines the set of on-chain interchain accounts parameters. +// The following parameters may be used to disable the controller submodule. +message Params { + // controller_enabled enables or disables the controller submodule. + bool controller_enabled = 1 [(gogoproto.moretags) = "yaml:\"controller_enabled\""]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/query.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/query.proto new file mode 100644 index 000000000..8c237a152 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/query.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.controller.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types"; + +import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +// Query provides defines the gRPC querier service. +service Query { + // InterchainAccount returns the interchain account address for a given owner address on a given connection + rpc InterchainAccount(QueryInterchainAccountRequest) returns (QueryInterchainAccountResponse) { + option (google.api.http).get = + "/ibc/apps/interchain_accounts/controller/v1/owners/{owner}/connections/{connection_id}"; + } + + // Params queries all parameters of the ICA controller submodule. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/ibc/apps/interchain_accounts/controller/v1/params"; + } +} + +// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. +message QueryInterchainAccountRequest { + string owner = 1; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; +} + +// QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. +message QueryInterchainAccountResponse { + string address = 1; +} + +// 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/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto new file mode 100644 index 000000000..ab97914fe --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.controller.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/interchain_accounts/v1/packet.proto"; + +// Msg defines the 27-interchain-accounts/controller Msg service. +service Msg { + // RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. + rpc RegisterInterchainAccount(MsgRegisterInterchainAccount) returns (MsgRegisterInterchainAccountResponse); + // SendTx defines a rpc handler for MsgSendTx. + rpc SendTx(MsgSendTx) returns (MsgSendTxResponse); +} + +// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount +message MsgRegisterInterchainAccount { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner = 1; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string version = 3; +} + +// MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount +message MsgRegisterInterchainAccountResponse { + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// MsgSendTx defines the payload for Msg/SendTx +message MsgSendTx { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner = 1; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + ibc.applications.interchain_accounts.v1.InterchainAccountPacketData packet_data = 3 + [(gogoproto.moretags) = "yaml:\"packet_data\"", (gogoproto.nullable) = false]; + // Relative timeout timestamp provided will be added to the current block time during transaction execution. + // The timeout timestamp must be non-zero. + uint64 relative_timeout = 4 [(gogoproto.moretags) = "yaml:\"relative_timeout\""]; +} + +// MsgSendTxResponse defines the response for MsgSendTx +message MsgSendTxResponse { + uint64 sequence = 1; +} diff --git a/frontend/empowerjs/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto new file mode 100644 index 000000000..2fed3763f --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.genesis.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/genesis/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; +import "ibc/applications/interchain_accounts/host/v1/host.proto"; + +// GenesisState defines the interchain accounts genesis state +message GenesisState { + ControllerGenesisState controller_genesis_state = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"controller_genesis_state\""]; + HostGenesisState host_genesis_state = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"host_genesis_state\""]; +} + +// ControllerGenesisState defines the interchain accounts controller genesis state +message ControllerGenesisState { + repeated ActiveChannel active_channels = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"active_channels\""]; + repeated RegisteredInterchainAccount interchain_accounts = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"interchain_accounts\""]; + repeated string ports = 3; + ibc.applications.interchain_accounts.controller.v1.Params params = 4 [(gogoproto.nullable) = false]; +} + +// HostGenesisState defines the interchain accounts host genesis state +message HostGenesisState { + repeated ActiveChannel active_channels = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"active_channels\""]; + repeated RegisteredInterchainAccount interchain_accounts = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"interchain_accounts\""]; + string port = 3; + ibc.applications.interchain_accounts.host.v1.Params params = 4 [(gogoproto.nullable) = false]; +} + +// ActiveChannel contains a connection ID, port ID and associated active channel ID, as well as a boolean flag to +// indicate if the channel is middleware enabled +message ActiveChannel { + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string port_id = 2 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 3 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + bool is_middleware_enabled = 4 [(gogoproto.moretags) = "yaml:\"is_middleware_enabled\""]; +} + +// RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address +message RegisteredInterchainAccount { + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string port_id = 2 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string account_address = 3 [(gogoproto.moretags) = "yaml:\"account_address\""]; +} \ No newline at end of file diff --git a/frontend/empowerjs/proto/ibc/applications/interchain_accounts/host/v1/host.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/host/v1/host.proto new file mode 100644 index 000000000..18cc1d13d --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/host/v1/host.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.host.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"; + +import "gogoproto/gogo.proto"; + +// Params defines the set of on-chain interchain accounts parameters. +// The following parameters may be used to disable the host submodule. +message Params { + // host_enabled enables or disables the host submodule. + bool host_enabled = 1 [(gogoproto.moretags) = "yaml:\"host_enabled\""]; + // allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. + repeated string allow_messages = 2 [(gogoproto.moretags) = "yaml:\"allow_messages\""]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/interchain_accounts/host/v1/query.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/host/v1/query.proto new file mode 100644 index 000000000..b89ed8ed8 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/host/v1/query.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.host.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"; + +import "google/api/annotations.proto"; +import "ibc/applications/interchain_accounts/host/v1/host.proto"; + +// Query provides defines the gRPC querier service. +service Query { + // Params queries all parameters of the ICA host submodule. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/ibc/apps/interchain_accounts/host/v1/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; +} diff --git a/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/account.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/account.proto new file mode 100644 index 000000000..d60c27a9c --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/account.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/auth/v1beta1/auth.proto"; + +// An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain +message InterchainAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "ibc.applications.interchain_accounts.v1.InterchainAccountI"; + + cosmos.auth.v1beta1.BaseAccount base_account = 1 + [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + string account_owner = 2 [(gogoproto.moretags) = "yaml:\"account_owner\""]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/metadata.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/metadata.proto new file mode 100644 index 000000000..9ea7eeca3 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/metadata.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"; + +import "gogoproto/gogo.proto"; + +// Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring +// See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning +message Metadata { + // version defines the ICS27 protocol version + string version = 1; + // controller_connection_id is the connection identifier associated with the controller chain + string controller_connection_id = 2 [(gogoproto.moretags) = "yaml:\"controller_connection_id\""]; + // host_connection_id is the connection identifier associated with the host chain + string host_connection_id = 3 [(gogoproto.moretags) = "yaml:\"host_connection_id\""]; + // address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step + // NOTE: the address field is empty on the OnChanOpenInit handshake step + string address = 4; + // encoding defines the supported codec format + string encoding = 5; + // tx_type defines the type of transactions the interchain account can execute + string tx_type = 6; +} diff --git a/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/packet.proto b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/packet.proto new file mode 100644 index 000000000..d2dcf518e --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/interchain_accounts/v1/packet.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"; + +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; + +// Type defines a classification of message issued from a controller chain to its associated interchain accounts +// host +enum Type { + option (gogoproto.goproto_enum_prefix) = false; + + // Default zero value enumeration + TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; + // Execute a transaction on an interchain accounts host chain + TYPE_EXECUTE_TX = 1 [(gogoproto.enumvalue_customname) = "EXECUTE_TX"]; +} + +// InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. +message InterchainAccountPacketData { + Type type = 1; + bytes data = 2; + string memo = 3; +} + +// CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain. +message CosmosTx { + repeated google.protobuf.Any messages = 1; +} diff --git a/frontend/empowerjs/proto/ibc/applications/transfer/v1/authz.proto b/frontend/empowerjs/proto/ibc/applications/transfer/v1/authz.proto new file mode 100644 index 000000000..8b27ac9cf --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/transfer/v1/authz.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package ibc.applications.transfer.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +// Allocation defines the spend limit for a particular port and channel +message Allocation { + // 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\""]; + // spend limitation on the channel + repeated cosmos.base.v1beta1.Coin spend_limit = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // allow list of receivers, an empty allow list permits any receiver address + repeated string allow_list = 4; +} + +// TransferAuthorization allows the grantee to spend up to spend_limit coins from +// the granter's account for ibc transfer on a specific channel +message TransferAuthorization { + option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization"; + + // port and channel amounts + repeated Allocation allocations = 1 [(gogoproto.nullable) = false]; +} diff --git a/frontend/empowerjs/proto/ibc/applications/transfer/v1/genesis.proto b/frontend/empowerjs/proto/ibc/applications/transfer/v1/genesis.proto new file mode 100644 index 000000000..5e09a34ab --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/transfer/v1/genesis.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package ibc.applications.transfer.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/applications/transfer/v1/query.proto b/frontend/empowerjs/proto/ibc/applications/transfer/v1/query.proto new file mode 100644 index 000000000..89b70309f --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/transfer/v1/query.proto @@ -0,0 +1,105 @@ +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/v7/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"; + } + + // DenomHash queries a denomination hash information. + rpc DenomHash(QueryDenomHashRequest) returns (QueryDenomHashResponse) { + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace=**}"; + } + + // EscrowAddress returns the escrow address for a particular port and channel id. + rpc EscrowAddress(QueryEscrowAddressRequest) returns (QueryEscrowAddressResponse) { + option (google.api.http).get = "/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address"; + } +} + +// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC +// method +message QueryDenomTraceRequest { + // hash (in hex format) or denom (full denom with ibc prefix) 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; +} + +// QueryDenomHashRequest is the request type for the Query/DenomHash RPC +// method +message QueryDenomHashRequest { + // The denomination trace ([port_id]/[channel_id])+/[denom] + string trace = 1; +} + +// QueryDenomHashResponse is the response type for the Query/DenomHash RPC +// method. +message QueryDenomHashResponse { + // hash (in hex format) of the denomination trace information. + string hash = 1; +} + +// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. +message QueryEscrowAddressRequest { + // unique port identifier + string port_id = 1; + // unique channel identifier + string channel_id = 2; +} + +// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. +message QueryEscrowAddressResponse { + // the escrow account address + string escrow_address = 1; +} \ No newline at end of file diff --git a/frontend/empowerjs/proto/ibc/applications/transfer/v1/transfer.proto b/frontend/empowerjs/proto/ibc/applications/transfer/v1/transfer.proto new file mode 100644 index 000000000..217107479 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/transfer/v1/transfer.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +package ibc.applications.transfer.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/applications/transfer/v1/tx.proto b/frontend/empowerjs/proto/ibc/applications/transfer/v1/tx.proto new file mode 100644 index 000000000..1c67aafb9 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/transfer/v1/tx.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package ibc.applications.transfer.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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 absolute nanoseconds since unix epoch. + // The timeout is disabled when set to 0. + uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; + // optional memo + string memo = 8; +} + +// MsgTransferResponse defines the Msg/Transfer response type. +message MsgTransferResponse { + // sequence number of the transfer packet sent + uint64 sequence = 1; +} diff --git a/frontend/empowerjs/proto/ibc/applications/transfer/v2/packet.proto b/frontend/empowerjs/proto/ibc/applications/transfer/v2/packet.proto new file mode 100644 index 000000000..7dc31347a --- /dev/null +++ b/frontend/empowerjs/proto/ibc/applications/transfer/v2/packet.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package ibc.applications.transfer.v2; + +option go_package = "github.com/cosmos/ibc-go/v7/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; + // optional memo + string memo = 5; +} diff --git a/frontend/empowerjs/proto/ibc/core/channel/v1/channel.proto b/frontend/empowerjs/proto/ibc/core/channel/v1/channel.proto new file mode 100644 index 000000000..5fbb0d423 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/channel/v1/channel.proto @@ -0,0 +1,162 @@ +syntax = "proto3"; + +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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; +} + +// PacketId is an identifer for a unique Packet +// Source chains refer to packets by source port/channel +// Destination chains refer to packets by destination port/channel +message PacketId { + 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; +} + +// 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/frontend/empowerjs/proto/ibc/core/channel/v1/genesis.proto b/frontend/empowerjs/proto/ibc/core/channel/v1/genesis.proto new file mode 100644 index 000000000..65cc928aa --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/channel/v1/genesis.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/core/channel/v1/query.proto b/frontend/empowerjs/proto/ibc/core/channel/v1/query.proto new file mode 100644 index 000000000..2d5bdb2fc --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/channel/v1/query.proto @@ -0,0 +1,376 @@ +syntax = "proto3"; + +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/core/channel/v1/tx.proto b/frontend/empowerjs/proto/ibc/core/channel/v1/tx.proto new file mode 100644 index 000000000..0cc55fbaa --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/channel/v1/tx.proto @@ -0,0 +1,245 @@ +syntax = "proto3"; + +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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); +} + +// ResponseResultType defines the possible outcomes of the execution of a message +enum ResponseResultType { + option (gogoproto.goproto_enum_prefix) = false; + + // Default zero value enumeration + RESPONSE_RESULT_TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; + // The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + RESPONSE_RESULT_TYPE_NOOP = 1 [(gogoproto.enumvalue_customname) = "NOOP"]; + // The message was executed successfully + RESPONSE_RESULT_TYPE_SUCCESS = 2 [(gogoproto.enumvalue_customname) = "SUCCESS"]; +} + +// 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 { + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + string version = 2; +} + +// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel +// on Chain B. The version field within the Channel field has been deprecated. Its +// value will be ignored by core IBC. +message MsgChannelOpenTry { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. + string previous_channel_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_channel_id\""]; + // NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. + 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 { + string version = 1; +} + +// 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 { + option (gogoproto.goproto_getters) = false; + + ResponseResultType result = 1; +} + +// 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 { + option (gogoproto.goproto_getters) = false; + + ResponseResultType result = 1; +} + +// 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 { + option (gogoproto.goproto_getters) = false; + + ResponseResultType result = 1; +} + +// 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 { + option (gogoproto.goproto_getters) = false; + + ResponseResultType result = 1; +} diff --git a/frontend/empowerjs/proto/ibc/core/client/v1/client.proto b/frontend/empowerjs/proto/ibc/core/client/v1/client.proto new file mode 100644 index 000000000..266649ba0 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/client/v1/client.proto @@ -0,0 +1,103 @@ +syntax = "proto3"; + +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/core/client/v1/genesis.proto b/frontend/empowerjs/proto/ibc/core/client/v1/genesis.proto new file mode 100644 index 000000000..788212441 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/client/v1/genesis.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; + +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/core/client/v1/query.proto b/frontend/empowerjs/proto/ibc/core/client/v1/query.proto new file mode 100644 index 000000000..0d26cf62e --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/client/v1/query.proto @@ -0,0 +1,207 @@ +syntax = "proto3"; + +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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}"; + } + + // ConsensusStateHeights queries the height of every consensus states associated with a given client. + rpc ConsensusStateHeights(QueryConsensusStateHeightsRequest) returns (QueryConsensusStateHeightsResponse) { + option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}/heights"; + } + + // 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 submodule. + rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { + option (google.api.http).get = "/ibc/core/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; +} + +// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights +// RPC method. +message QueryConsensusStateHeightsRequest { + // client identifier + string client_id = 1; + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryConsensusStateHeightsResponse is the response type for the +// Query/ConsensusStateHeights RPC method +message QueryConsensusStateHeightsResponse { + // consensus state heights + repeated Height consensus_state_heights = 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/frontend/empowerjs/proto/ibc/core/client/v1/tx.proto b/frontend/empowerjs/proto/ibc/core/client/v1/tx.proto new file mode 100644 index 000000000..23302d5e3 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/client/v1/tx.proto @@ -0,0 +1,100 @@ +syntax = "proto3"; + +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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 client message. +message MsgUpdateClient { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // client message to update the light client + google.protobuf.Any client_message = 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. +// Warning: DEPRECATED +message MsgSubmitMisbehaviour { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\"", deprecated = true]; + // misbehaviour used for freezing the light client + google.protobuf.Any misbehaviour = 2 [deprecated = true]; + // signer address + string signer = 3 [deprecated = true]; +} + +// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response +// type. +message MsgSubmitMisbehaviourResponse {} diff --git a/frontend/empowerjs/proto/ibc/core/commitment/v1/commitment.proto b/frontend/empowerjs/proto/ibc/core/commitment/v1/commitment.proto new file mode 100644 index 000000000..4840ff3e0 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/commitment/v1/commitment.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package ibc.core.commitment.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/ics23/v1/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 cosmos.ics23.v1.CommitmentProof proofs = 1; +} diff --git a/frontend/empowerjs/proto/ibc/core/connection/v1/connection.proto b/frontend/empowerjs/proto/ibc/core/connection/v1/connection.proto new file mode 100644 index 000000000..ba367c14d --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/connection/v1/connection.proto @@ -0,0 +1,114 @@ +syntax = "proto3"; + +package ibc.core.connection.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/core/connection/v1/genesis.proto b/frontend/empowerjs/proto/ibc/core/connection/v1/genesis.proto new file mode 100644 index 000000000..122c5a465 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/connection/v1/genesis.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package ibc.core.connection.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/core/connection/v1/query.proto b/frontend/empowerjs/proto/ibc/core/connection/v1/query.proto new file mode 100644 index 000000000..3c76b2389 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/connection/v1/query.proto @@ -0,0 +1,152 @@ +syntax = "proto3"; + +package ibc.core.connection.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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}"; + } + + // ConnectionParams queries all parameters of the ibc connection submodule. + rpc ConnectionParams(QueryConnectionParamsRequest) returns (QueryConnectionParamsResponse) { + option (google.api.http).get = "/ibc/core/connection/v1/params"; + } +} + +// 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]; +} + +// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. +message QueryConnectionParamsRequest {} + +// QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. +message QueryConnectionParamsResponse { + // params defines the parameters of the module. + Params params = 1; +} \ No newline at end of file diff --git a/frontend/empowerjs/proto/ibc/core/connection/v1/tx.proto b/frontend/empowerjs/proto/ibc/core/connection/v1/tx.proto new file mode 100644 index 000000000..af8f505c4 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/connection/v1/tx.proto @@ -0,0 +1,122 @@ +syntax = "proto3"; + +package ibc.core.connection.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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\""]; + // Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. + string previous_connection_id = 2 [deprecated = true, (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; + // optional proof data for host state machines that are unable to introspect their own consensus state + bytes host_consensus_state_proof = 13; +} + +// 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; + // optional proof data for host state machines that are unable to introspect their own consensus state + bytes host_consensus_state_proof = 11; +} + +// 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/frontend/empowerjs/proto/ibc/core/types/v1/genesis.proto b/frontend/empowerjs/proto/ibc/core/types/v1/genesis.proto new file mode 100644 index 000000000..4e07551f8 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/core/types/v1/genesis.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package ibc.core.types.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/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/frontend/empowerjs/proto/ibc/lightclients/solomachine/v2/solomachine.proto b/frontend/empowerjs/proto/ibc/lightclients/solomachine/v2/solomachine.proto new file mode 100644 index 000000000..250313319 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/lightclients/solomachine/v2/solomachine.proto @@ -0,0 +1,189 @@ +syntax = "proto3"; + +package ibc.lightclients.solomachine.v2; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/core/02-client/migrations/v7"; + +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/frontend/empowerjs/proto/ibc/lightclients/solomachine/v3/solomachine.proto b/frontend/empowerjs/proto/ibc/lightclients/solomachine/v3/solomachine.proto new file mode 100644 index 000000000..40e76b722 --- /dev/null +++ b/frontend/empowerjs/proto/ibc/lightclients/solomachine/v3/solomachine.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; + +package ibc.lightclients.solomachine.v3; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/light-clients/06-solomachine;solomachine"; + +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\""]; +} + +// 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; + + uint64 timestamp = 1; + bytes signature = 2; + google.protobuf.Any new_public_key = 3 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; + string new_diversifier = 4 [(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; + + uint64 sequence = 1; + SignatureAndData signature_one = 2 [(gogoproto.moretags) = "yaml:\"signature_one\""]; + SignatureAndData signature_two = 3 [(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; + bytes path = 2; + 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; + + // the sequence number + uint64 sequence = 1; + // the proof timestamp + uint64 timestamp = 2; + // the public key diversifier + string diversifier = 3; + // the standardised path bytes + bytes path = 4; + // the marshaled data bytes + bytes data = 5; +} + +// 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\""]; +} diff --git a/frontend/empowerjs/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/frontend/empowerjs/proto/ibc/lightclients/tendermint/v1/tendermint.proto new file mode 100644 index 000000000..83fa59c9f --- /dev/null +++ b/frontend/empowerjs/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -0,0 +1,115 @@ +syntax = "proto3"; + +package ibc.lightclients.tendermint.v1; + +option go_package = "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint;tendermint"; + +import "tendermint/types/validator.proto"; +import "tendermint/types/types.proto"; +import "cosmos/ics23/v1/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 cosmos.ics23.v1.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\""]; + + // allow_update_after_expiry is deprecated + bool allow_update_after_expiry = 10 [deprecated = true, (gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; + // allow_update_after_misbehaviour is deprecated + bool allow_update_after_misbehaviour = 11 + [deprecated = true, (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/cometbft/cometbft/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; + + // ClientID is deprecated + string client_id = 1 [deprecated = true, (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/frontend/empowerjs/src/codegen/cosmos/bundle.ts b/frontend/empowerjs/src/codegen/cosmos/bundle.ts index bde104da8..ef66028b3 100644 --- a/frontend/empowerjs/src/codegen/cosmos/bundle.ts +++ b/frontend/empowerjs/src/codegen/cosmos/bundle.ts @@ -80,124 +80,125 @@ import * as _80 from "./group/v1/genesis"; import * as _81 from "./group/v1/query"; import * as _82 from "./group/v1/tx"; import * as _83 from "./group/v1/types"; -import * as _84 from "./mint/module/v1/module"; -import * as _85 from "./mint/v1beta1/genesis"; -import * as _86 from "./mint/v1beta1/mint"; -import * as _87 from "./mint/v1beta1/query"; -import * as _88 from "./mint/v1beta1/tx"; -import * as _89 from "./msg/v1/msg"; -import * as _90 from "./nft/module/v1/module"; -import * as _91 from "./nft/v1beta1/event"; -import * as _92 from "./nft/v1beta1/genesis"; -import * as _93 from "./nft/v1beta1/nft"; -import * as _94 from "./nft/v1beta1/query"; -import * as _95 from "./nft/v1beta1/tx"; -import * as _96 from "./orm/module/v1alpha1/module"; -import * as _97 from "./orm/query/v1alpha1/query"; -import * as _98 from "./orm/v1/orm"; -import * as _99 from "./orm/v1alpha1/schema"; -import * as _100 from "./params/module/v1/module"; -import * as _101 from "./params/v1beta1/params"; -import * as _102 from "./params/v1beta1/query"; -import * as _103 from "./query/v1/query"; -import * as _104 from "./reflection/v1/reflection"; -import * as _105 from "./slashing/module/v1/module"; -import * as _106 from "./slashing/v1beta1/genesis"; -import * as _107 from "./slashing/v1beta1/query"; -import * as _108 from "./slashing/v1beta1/slashing"; -import * as _109 from "./slashing/v1beta1/tx"; -import * as _110 from "./staking/module/v1/module"; -import * as _111 from "./staking/v1beta1/authz"; -import * as _112 from "./staking/v1beta1/genesis"; -import * as _113 from "./staking/v1beta1/query"; -import * as _114 from "./staking/v1beta1/staking"; -import * as _115 from "./staking/v1beta1/tx"; -import * as _116 from "./tx/config/v1/config"; -import * as _117 from "./tx/signing/v1beta1/signing"; -import * as _118 from "./tx/v1beta1/service"; -import * as _119 from "./tx/v1beta1/tx"; -import * as _120 from "./upgrade/module/v1/module"; -import * as _121 from "./upgrade/v1beta1/query"; -import * as _122 from "./upgrade/v1beta1/tx"; -import * as _123 from "./upgrade/v1beta1/upgrade"; -import * as _124 from "./vesting/module/v1/module"; -import * as _125 from "./vesting/v1beta1/tx"; -import * as _126 from "./vesting/v1beta1/vesting"; -import * as _162 from "./auth/v1beta1/tx.amino"; -import * as _163 from "./authz/v1beta1/tx.amino"; -import * as _164 from "./bank/v1beta1/tx.amino"; -import * as _165 from "./consensus/v1/tx.amino"; -import * as _166 from "./crisis/v1beta1/tx.amino"; -import * as _167 from "./distribution/v1beta1/tx.amino"; -import * as _168 from "./evidence/v1beta1/tx.amino"; -import * as _169 from "./feegrant/v1beta1/tx.amino"; -import * as _170 from "./gov/v1/tx.amino"; -import * as _171 from "./gov/v1beta1/tx.amino"; -import * as _172 from "./group/v1/tx.amino"; -import * as _173 from "./mint/v1beta1/tx.amino"; -import * as _174 from "./nft/v1beta1/tx.amino"; -import * as _175 from "./slashing/v1beta1/tx.amino"; -import * as _176 from "./staking/v1beta1/tx.amino"; -import * as _177 from "./upgrade/v1beta1/tx.amino"; -import * as _178 from "./vesting/v1beta1/tx.amino"; -import * as _179 from "./auth/v1beta1/tx.registry"; -import * as _180 from "./authz/v1beta1/tx.registry"; -import * as _181 from "./bank/v1beta1/tx.registry"; -import * as _182 from "./consensus/v1/tx.registry"; -import * as _183 from "./crisis/v1beta1/tx.registry"; -import * as _184 from "./distribution/v1beta1/tx.registry"; -import * as _185 from "./evidence/v1beta1/tx.registry"; -import * as _186 from "./feegrant/v1beta1/tx.registry"; -import * as _187 from "./gov/v1/tx.registry"; -import * as _188 from "./gov/v1beta1/tx.registry"; -import * as _189 from "./group/v1/tx.registry"; -import * as _190 from "./mint/v1beta1/tx.registry"; -import * as _191 from "./nft/v1beta1/tx.registry"; -import * as _192 from "./slashing/v1beta1/tx.registry"; -import * as _193 from "./staking/v1beta1/tx.registry"; -import * as _194 from "./upgrade/v1beta1/tx.registry"; -import * as _195 from "./vesting/v1beta1/tx.registry"; -import * as _196 from "./app/v1alpha1/query.rpc.Query"; -import * as _197 from "./auth/v1beta1/query.rpc.Query"; -import * as _198 from "./authz/v1beta1/query.rpc.Query"; -import * as _199 from "./autocli/v1/query.rpc.Query"; -import * as _200 from "./bank/v1beta1/query.rpc.Query"; -import * as _201 from "./base/node/v1beta1/query.rpc.Service"; -import * as _202 from "./base/tendermint/v1beta1/query.rpc.Service"; -import * as _203 from "./consensus/v1/query.rpc.Query"; -import * as _204 from "./distribution/v1beta1/query.rpc.Query"; -import * as _205 from "./evidence/v1beta1/query.rpc.Query"; -import * as _206 from "./feegrant/v1beta1/query.rpc.Query"; -import * as _207 from "./gov/v1/query.rpc.Query"; -import * as _208 from "./gov/v1beta1/query.rpc.Query"; -import * as _209 from "./group/v1/query.rpc.Query"; -import * as _210 from "./mint/v1beta1/query.rpc.Query"; -import * as _211 from "./nft/v1beta1/query.rpc.Query"; -import * as _212 from "./orm/query/v1alpha1/query.rpc.Query"; -import * as _213 from "./params/v1beta1/query.rpc.Query"; -import * as _214 from "./slashing/v1beta1/query.rpc.Query"; -import * as _215 from "./staking/v1beta1/query.rpc.Query"; -import * as _216 from "./tx/v1beta1/service.rpc.Service"; -import * as _217 from "./upgrade/v1beta1/query.rpc.Query"; -import * as _218 from "./auth/v1beta1/tx.rpc.msg"; -import * as _219 from "./authz/v1beta1/tx.rpc.msg"; -import * as _220 from "./bank/v1beta1/tx.rpc.msg"; -import * as _221 from "./consensus/v1/tx.rpc.msg"; -import * as _222 from "./crisis/v1beta1/tx.rpc.msg"; -import * as _223 from "./distribution/v1beta1/tx.rpc.msg"; -import * as _224 from "./evidence/v1beta1/tx.rpc.msg"; -import * as _225 from "./feegrant/v1beta1/tx.rpc.msg"; -import * as _226 from "./gov/v1/tx.rpc.msg"; -import * as _227 from "./gov/v1beta1/tx.rpc.msg"; -import * as _228 from "./group/v1/tx.rpc.msg"; -import * as _229 from "./mint/v1beta1/tx.rpc.msg"; -import * as _230 from "./nft/v1beta1/tx.rpc.msg"; -import * as _231 from "./slashing/v1beta1/tx.rpc.msg"; -import * as _232 from "./staking/v1beta1/tx.rpc.msg"; -import * as _233 from "./upgrade/v1beta1/tx.rpc.msg"; -import * as _234 from "./vesting/v1beta1/tx.rpc.msg"; -import * as _247 from "./rpc.query"; -import * as _248 from "./rpc.tx"; +import * as _84 from "./ics23/v1/proofs"; +import * as _85 from "./mint/module/v1/module"; +import * as _86 from "./mint/v1beta1/genesis"; +import * as _87 from "./mint/v1beta1/mint"; +import * as _88 from "./mint/v1beta1/query"; +import * as _89 from "./mint/v1beta1/tx"; +import * as _90 from "./msg/v1/msg"; +import * as _91 from "./nft/module/v1/module"; +import * as _92 from "./nft/v1beta1/event"; +import * as _93 from "./nft/v1beta1/genesis"; +import * as _94 from "./nft/v1beta1/nft"; +import * as _95 from "./nft/v1beta1/query"; +import * as _96 from "./nft/v1beta1/tx"; +import * as _97 from "./orm/module/v1alpha1/module"; +import * as _98 from "./orm/query/v1alpha1/query"; +import * as _99 from "./orm/v1/orm"; +import * as _100 from "./orm/v1alpha1/schema"; +import * as _101 from "./params/module/v1/module"; +import * as _102 from "./params/v1beta1/params"; +import * as _103 from "./params/v1beta1/query"; +import * as _104 from "./query/v1/query"; +import * as _105 from "./reflection/v1/reflection"; +import * as _106 from "./slashing/module/v1/module"; +import * as _107 from "./slashing/v1beta1/genesis"; +import * as _108 from "./slashing/v1beta1/query"; +import * as _109 from "./slashing/v1beta1/slashing"; +import * as _110 from "./slashing/v1beta1/tx"; +import * as _111 from "./staking/module/v1/module"; +import * as _112 from "./staking/v1beta1/authz"; +import * as _113 from "./staking/v1beta1/genesis"; +import * as _114 from "./staking/v1beta1/query"; +import * as _115 from "./staking/v1beta1/staking"; +import * as _116 from "./staking/v1beta1/tx"; +import * as _117 from "./tx/config/v1/config"; +import * as _118 from "./tx/signing/v1beta1/signing"; +import * as _119 from "./tx/v1beta1/service"; +import * as _120 from "./tx/v1beta1/tx"; +import * as _121 from "./upgrade/module/v1/module"; +import * as _122 from "./upgrade/v1beta1/query"; +import * as _123 from "./upgrade/v1beta1/tx"; +import * as _124 from "./upgrade/v1beta1/upgrade"; +import * as _125 from "./vesting/module/v1/module"; +import * as _126 from "./vesting/v1beta1/tx"; +import * as _127 from "./vesting/v1beta1/vesting"; +import * as _208 from "./auth/v1beta1/tx.amino"; +import * as _209 from "./authz/v1beta1/tx.amino"; +import * as _210 from "./bank/v1beta1/tx.amino"; +import * as _211 from "./consensus/v1/tx.amino"; +import * as _212 from "./crisis/v1beta1/tx.amino"; +import * as _213 from "./distribution/v1beta1/tx.amino"; +import * as _214 from "./evidence/v1beta1/tx.amino"; +import * as _215 from "./feegrant/v1beta1/tx.amino"; +import * as _216 from "./gov/v1/tx.amino"; +import * as _217 from "./gov/v1beta1/tx.amino"; +import * as _218 from "./group/v1/tx.amino"; +import * as _219 from "./mint/v1beta1/tx.amino"; +import * as _220 from "./nft/v1beta1/tx.amino"; +import * as _221 from "./slashing/v1beta1/tx.amino"; +import * as _222 from "./staking/v1beta1/tx.amino"; +import * as _223 from "./upgrade/v1beta1/tx.amino"; +import * as _224 from "./vesting/v1beta1/tx.amino"; +import * as _225 from "./auth/v1beta1/tx.registry"; +import * as _226 from "./authz/v1beta1/tx.registry"; +import * as _227 from "./bank/v1beta1/tx.registry"; +import * as _228 from "./consensus/v1/tx.registry"; +import * as _229 from "./crisis/v1beta1/tx.registry"; +import * as _230 from "./distribution/v1beta1/tx.registry"; +import * as _231 from "./evidence/v1beta1/tx.registry"; +import * as _232 from "./feegrant/v1beta1/tx.registry"; +import * as _233 from "./gov/v1/tx.registry"; +import * as _234 from "./gov/v1beta1/tx.registry"; +import * as _235 from "./group/v1/tx.registry"; +import * as _236 from "./mint/v1beta1/tx.registry"; +import * as _237 from "./nft/v1beta1/tx.registry"; +import * as _238 from "./slashing/v1beta1/tx.registry"; +import * as _239 from "./staking/v1beta1/tx.registry"; +import * as _240 from "./upgrade/v1beta1/tx.registry"; +import * as _241 from "./vesting/v1beta1/tx.registry"; +import * as _242 from "./app/v1alpha1/query.rpc.Query"; +import * as _243 from "./auth/v1beta1/query.rpc.Query"; +import * as _244 from "./authz/v1beta1/query.rpc.Query"; +import * as _245 from "./autocli/v1/query.rpc.Query"; +import * as _246 from "./bank/v1beta1/query.rpc.Query"; +import * as _247 from "./base/node/v1beta1/query.rpc.Service"; +import * as _248 from "./base/tendermint/v1beta1/query.rpc.Service"; +import * as _249 from "./consensus/v1/query.rpc.Query"; +import * as _250 from "./distribution/v1beta1/query.rpc.Query"; +import * as _251 from "./evidence/v1beta1/query.rpc.Query"; +import * as _252 from "./feegrant/v1beta1/query.rpc.Query"; +import * as _253 from "./gov/v1/query.rpc.Query"; +import * as _254 from "./gov/v1beta1/query.rpc.Query"; +import * as _255 from "./group/v1/query.rpc.Query"; +import * as _256 from "./mint/v1beta1/query.rpc.Query"; +import * as _257 from "./nft/v1beta1/query.rpc.Query"; +import * as _258 from "./orm/query/v1alpha1/query.rpc.Query"; +import * as _259 from "./params/v1beta1/query.rpc.Query"; +import * as _260 from "./slashing/v1beta1/query.rpc.Query"; +import * as _261 from "./staking/v1beta1/query.rpc.Query"; +import * as _262 from "./tx/v1beta1/service.rpc.Service"; +import * as _263 from "./upgrade/v1beta1/query.rpc.Query"; +import * as _264 from "./auth/v1beta1/tx.rpc.msg"; +import * as _265 from "./authz/v1beta1/tx.rpc.msg"; +import * as _266 from "./bank/v1beta1/tx.rpc.msg"; +import * as _267 from "./consensus/v1/tx.rpc.msg"; +import * as _268 from "./crisis/v1beta1/tx.rpc.msg"; +import * as _269 from "./distribution/v1beta1/tx.rpc.msg"; +import * as _270 from "./evidence/v1beta1/tx.rpc.msg"; +import * as _271 from "./feegrant/v1beta1/tx.rpc.msg"; +import * as _272 from "./gov/v1/tx.rpc.msg"; +import * as _273 from "./gov/v1beta1/tx.rpc.msg"; +import * as _274 from "./group/v1/tx.rpc.msg"; +import * as _275 from "./mint/v1beta1/tx.rpc.msg"; +import * as _276 from "./nft/v1beta1/tx.rpc.msg"; +import * as _277 from "./slashing/v1beta1/tx.rpc.msg"; +import * as _278 from "./staking/v1beta1/tx.rpc.msg"; +import * as _279 from "./upgrade/v1beta1/tx.rpc.msg"; +import * as _280 from "./vesting/v1beta1/tx.rpc.msg"; +import * as _322 from "./rpc.query"; +import * as _323 from "./rpc.tx"; export namespace cosmos { export namespace app { export namespace runtime { @@ -209,7 +210,7 @@ export namespace cosmos { ..._3, ..._4, ..._5, - ..._196 + ..._242 }; } export namespace auth { @@ -223,10 +224,10 @@ export namespace cosmos { ..._8, ..._9, ..._10, - ..._162, - ..._179, - ..._197, - ..._218 + ..._208, + ..._225, + ..._243, + ..._264 }; } export namespace authz { @@ -241,17 +242,17 @@ export namespace cosmos { ..._14, ..._15, ..._16, - ..._163, - ..._180, - ..._198, - ..._219 + ..._209, + ..._226, + ..._244, + ..._265 }; } export namespace autocli { export const v1 = { ..._17, ..._18, - ..._199 + ..._245 }; } export namespace bank { @@ -266,10 +267,10 @@ export namespace cosmos { ..._22, ..._23, ..._24, - ..._164, - ..._181, - ..._200, - ..._220 + ..._210, + ..._227, + ..._246, + ..._266 }; } export namespace base { @@ -286,7 +287,7 @@ export namespace cosmos { export namespace node { export const v1beta1 = { ..._27, - ..._201 + ..._247 }; } export namespace query { @@ -317,7 +318,7 @@ export namespace cosmos { export const v1beta1 = { ..._34, ..._35, - ..._202 + ..._248 }; } export const v1beta1 = { @@ -344,10 +345,10 @@ export namespace cosmos { export const v1 = { ..._41, ..._42, - ..._165, - ..._182, - ..._203, - ..._221 + ..._211, + ..._228, + ..._249, + ..._267 }; } export namespace crisis { @@ -359,9 +360,9 @@ export namespace cosmos { export const v1beta1 = { ..._44, ..._45, - ..._166, - ..._183, - ..._222 + ..._212, + ..._229, + ..._268 }; } export namespace crypto { @@ -399,10 +400,10 @@ export namespace cosmos { ..._54, ..._55, ..._56, - ..._167, - ..._184, - ..._204, - ..._223 + ..._213, + ..._230, + ..._250, + ..._269 }; } export namespace evidence { @@ -416,10 +417,10 @@ export namespace cosmos { ..._59, ..._60, ..._61, - ..._168, - ..._185, - ..._205, - ..._224 + ..._214, + ..._231, + ..._251, + ..._270 }; } export namespace feegrant { @@ -433,10 +434,10 @@ export namespace cosmos { ..._64, ..._65, ..._66, - ..._169, - ..._186, - ..._206, - ..._225 + ..._215, + ..._232, + ..._252, + ..._271 }; } export namespace genutil { @@ -460,20 +461,20 @@ export namespace cosmos { ..._71, ..._72, ..._73, - ..._170, - ..._187, - ..._207, - ..._226 + ..._216, + ..._233, + ..._253, + ..._272 }; export const v1beta1 = { ..._74, ..._75, ..._76, ..._77, - ..._171, - ..._188, - ..._208, - ..._227 + ..._217, + ..._234, + ..._254, + ..._273 }; } export namespace group { @@ -488,177 +489,182 @@ export namespace cosmos { ..._81, ..._82, ..._83, - ..._172, - ..._189, - ..._209, - ..._228 + ..._218, + ..._235, + ..._255, + ..._274 + }; + } + export namespace ics23 { + export const v1 = { + ..._84 }; } export namespace mint { export namespace module { export const v1 = { - ..._84 + ..._85 }; } export const v1beta1 = { - ..._85, ..._86, ..._87, ..._88, - ..._173, - ..._190, - ..._210, - ..._229 + ..._89, + ..._219, + ..._236, + ..._256, + ..._275 }; } export namespace msg { export const v1 = { - ..._89 + ..._90 }; } export namespace nft { export namespace module { export const v1 = { - ..._90 + ..._91 }; } export const v1beta1 = { - ..._91, ..._92, ..._93, ..._94, ..._95, - ..._174, - ..._191, - ..._211, - ..._230 + ..._96, + ..._220, + ..._237, + ..._257, + ..._276 }; } export namespace orm { export namespace module { export const v1alpha1 = { - ..._96 + ..._97 }; } export namespace query { export const v1alpha1 = { - ..._97, - ..._212 + ..._98, + ..._258 }; } export const v1 = { - ..._98 + ..._99 }; export const v1alpha1 = { - ..._99 + ..._100 }; } export namespace params { export namespace module { export const v1 = { - ..._100 + ..._101 }; } export const v1beta1 = { - ..._101, ..._102, - ..._213 + ..._103, + ..._259 }; } export namespace query { export const v1 = { - ..._103 + ..._104 }; } export namespace reflection { export const v1 = { - ..._104 + ..._105 }; } export namespace slashing { export namespace module { export const v1 = { - ..._105 + ..._106 }; } export const v1beta1 = { - ..._106, ..._107, ..._108, ..._109, - ..._175, - ..._192, - ..._214, - ..._231 + ..._110, + ..._221, + ..._238, + ..._260, + ..._277 }; } export namespace staking { export namespace module { export const v1 = { - ..._110 + ..._111 }; } export const v1beta1 = { - ..._111, ..._112, ..._113, ..._114, ..._115, - ..._176, - ..._193, - ..._215, - ..._232 + ..._116, + ..._222, + ..._239, + ..._261, + ..._278 }; } export namespace tx { export namespace config { export const v1 = { - ..._116 + ..._117 }; } export namespace signing { export const v1beta1 = { - ..._117 + ..._118 }; } export const v1beta1 = { - ..._118, ..._119, - ..._216 + ..._120, + ..._262 }; } export namespace upgrade { export namespace module { export const v1 = { - ..._120 + ..._121 }; } export const v1beta1 = { - ..._121, ..._122, ..._123, - ..._177, - ..._194, - ..._217, - ..._233 + ..._124, + ..._223, + ..._240, + ..._263, + ..._279 }; } export namespace vesting { export namespace module { export const v1 = { - ..._124 + ..._125 }; } export const v1beta1 = { - ..._125, ..._126, - ..._178, - ..._195, - ..._234 + ..._127, + ..._224, + ..._241, + ..._280 }; } export const ClientFactory = { - ..._247, - ..._248 + ..._322, + ..._323 }; } \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmos/ics23/v1/proofs.ts b/frontend/empowerjs/src/codegen/cosmos/ics23/v1/proofs.ts new file mode 100644 index 000000000..5bb00ebcb --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmos/ics23/v1/proofs.ts @@ -0,0 +1,1425 @@ +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes } 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, + SHA512_256 = 6, + UNRECOGNIZED = -1, +} +export const HashOpSDKType = 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 6: + case "SHA512_256": + return HashOp.SHA512_256; + 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.SHA512_256: + return "SHA512_256"; + 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 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; + path: InnerOp[]; +} +/** + * 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; + 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; + right?: ExistenceProof; +} +/** + * 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; + right?: ExistenceProofSDKType; +} +/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ +export interface CommitmentProof { + exist?: ExistenceProof; + nonexist?: NonExistenceProof; + batch?: BatchProof; + compressed?: CompressedBatchProof; +} +/** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ +export interface CommitmentProofSDKType { + exist?: ExistenceProofSDKType; + nonexist?: NonExistenceProofSDKType; + batch?: BatchProofSDKType; + compressed?: CompressedBatchProofSDKType; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; + innerSpec?: InnerSpec; + /** 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; + /** + * prehash_key_before_comparison is a flag that indicates whether to use the + * prehash_key specified by LeafOp to compare lexical ordering of keys for + * non-existence proofs. + */ + prehashKeyBeforeComparison: boolean; +} +/** + * 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; + inner_spec?: InnerSpecSDKType; + max_depth: number; + min_depth: number; + prehash_key_before_comparison: boolean; +} +/** + * 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; +} +/** + * 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[]; +} +/** 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; + nonexist?: NonExistenceProof; +} +/** Use BatchEntry not CommitmentProof, to avoid recursion */ +export interface BatchEntrySDKType { + exist?: ExistenceProofSDKType; + nonexist?: NonExistenceProofSDKType; +} +export interface CompressedBatchProof { + entries: CompressedBatchEntry[]; + lookupInners: InnerOp[]; +} +export interface CompressedBatchProofSDKType { + entries: CompressedBatchEntrySDKType[]; + lookup_inners: InnerOpSDKType[]; +} +/** Use BatchEntry not CommitmentProof, to avoid recursion */ +export interface CompressedBatchEntry { + exist?: CompressedExistenceProof; + nonexist?: CompressedNonExistenceProof; +} +/** Use BatchEntry not CommitmentProof, to avoid recursion */ +export interface CompressedBatchEntrySDKType { + exist?: CompressedExistenceProofSDKType; + nonexist?: CompressedNonExistenceProofSDKType; +} +export interface CompressedExistenceProof { + key: Uint8Array; + value: Uint8Array; + leaf?: LeafOp; + /** these are indexes into the lookup_inners table in CompressedBatchProof */ + path: number[]; +} +export interface CompressedExistenceProofSDKType { + key: Uint8Array; + value: Uint8Array; + leaf?: LeafOpSDKType; + path: number[]; +} +export interface CompressedNonExistenceProof { + /** TODO: remove this as unnecessary??? we prove a range */ + key: Uint8Array; + left?: CompressedExistenceProof; + right?: CompressedExistenceProof; +} +export interface CompressedNonExistenceProofSDKType { + key: Uint8Array; + left?: CompressedExistenceProofSDKType; + right?: CompressedExistenceProofSDKType; +} +function createBaseExistenceProof(): ExistenceProof { + return { + key: new Uint8Array(), + value: new Uint8Array(), + leaf: undefined, + path: [] + }; +} +export const ExistenceProof = { + encode(message: ExistenceProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ExistenceProof { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseNonExistenceProof(): NonExistenceProof { + return { + key: new Uint8Array(), + left: undefined, + right: undefined + }; +} +export const NonExistenceProof = { + encode(message: NonExistenceProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): NonExistenceProof { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseCommitmentProof(): CommitmentProof { + return { + exist: undefined, + nonexist: undefined, + batch: undefined, + compressed: undefined + }; +} +export const CommitmentProof = { + encode(message: CommitmentProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): CommitmentProof { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseLeafOp(): LeafOp { + return { + hash: 0, + prehashKey: 0, + prehashValue: 0, + length: 0, + prefix: new Uint8Array() + }; +} +export const LeafOp = { + encode(message: LeafOp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): LeafOp { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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) : 0, + prehashKey: isSet(object.prehashKey) ? hashOpFromJSON(object.prehashKey) : 0, + prehashValue: isSet(object.prehashValue) ? hashOpFromJSON(object.prehashValue) : 0, + length: isSet(object.length) ? lengthOpFromJSON(object.length) : 0, + 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: Partial): 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; + } +}; +function createBaseInnerOp(): InnerOp { + return { + hash: 0, + prefix: new Uint8Array(), + suffix: new Uint8Array() + }; +} +export const InnerOp = { + encode(message: InnerOp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): InnerOp { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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) : 0, + 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: Partial): InnerOp { + const message = createBaseInnerOp(); + message.hash = object.hash ?? 0; + message.prefix = object.prefix ?? new Uint8Array(); + message.suffix = object.suffix ?? new Uint8Array(); + return message; + } +}; +function createBaseProofSpec(): ProofSpec { + return { + leafSpec: undefined, + innerSpec: undefined, + maxDepth: 0, + minDepth: 0, + prehashKeyBeforeComparison: false + }; +} +export const ProofSpec = { + encode(message: ProofSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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); + } + if (message.prehashKeyBeforeComparison === true) { + writer.uint32(40).bool(message.prehashKeyBeforeComparison); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ProofSpec { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; + case 5: + message.prehashKeyBeforeComparison = reader.bool(); + 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, + prehashKeyBeforeComparison: isSet(object.prehashKeyBeforeComparison) ? Boolean(object.prehashKeyBeforeComparison) : false + }; + }, + 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)); + message.prehashKeyBeforeComparison !== undefined && (obj.prehashKeyBeforeComparison = message.prehashKeyBeforeComparison); + return obj; + }, + fromPartial(object: Partial): 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; + message.prehashKeyBeforeComparison = object.prehashKeyBeforeComparison ?? false; + return message; + } +}; +function createBaseInnerSpec(): InnerSpec { + return { + childOrder: [], + childSize: 0, + minPrefixLength: 0, + maxPrefixLength: 0, + emptyChild: new Uint8Array(), + hash: 0 + }; +} +export const InnerSpec = { + encode(message: InnerSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): InnerSpec { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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) : 0 + }; + }, + 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: Partial): 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; + } +}; +function createBaseBatchProof(): BatchProof { + return { + entries: [] + }; +} +export const BatchProof = { + encode(message: BatchProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.entries) { + BatchEntry.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): BatchProof { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): BatchProof { + const message = createBaseBatchProof(); + message.entries = object.entries?.map(e => BatchEntry.fromPartial(e)) || []; + return message; + } +}; +function createBaseBatchEntry(): BatchEntry { + return { + exist: undefined, + nonexist: undefined + }; +} +export const BatchEntry = { + encode(message: BatchEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): BatchEntry { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseCompressedBatchProof(): CompressedBatchProof { + return { + entries: [], + lookupInners: [] + }; +} +export const CompressedBatchProof = { + encode(message: CompressedBatchProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): CompressedBatchProof { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): CompressedBatchProof { + const message = createBaseCompressedBatchProof(); + message.entries = object.entries?.map(e => CompressedBatchEntry.fromPartial(e)) || []; + message.lookupInners = object.lookupInners?.map(e => InnerOp.fromPartial(e)) || []; + return message; + } +}; +function createBaseCompressedBatchEntry(): CompressedBatchEntry { + return { + exist: undefined, + nonexist: undefined + }; +} +export const CompressedBatchEntry = { + encode(message: CompressedBatchEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): CompressedBatchEntry { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseCompressedExistenceProof(): CompressedExistenceProof { + return { + key: new Uint8Array(), + value: new Uint8Array(), + leaf: undefined, + path: [] + }; +} +export const CompressedExistenceProof = { + encode(message: CompressedExistenceProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): CompressedExistenceProof { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof { + return { + key: new Uint8Array(), + left: undefined, + right: undefined + }; +} +export const CompressedNonExistenceProof = { + encode(message: CompressedNonExistenceProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): CompressedNonExistenceProof { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/bundle.ts b/frontend/empowerjs/src/codegen/cosmwasm/bundle.ts new file mode 100644 index 000000000..5103b0da7 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/bundle.ts @@ -0,0 +1,34 @@ +import * as _128 from "./wasm/v1/authz"; +import * as _129 from "./wasm/v1/genesis"; +import * as _130 from "./wasm/v1/ibc"; +import * as _131 from "./wasm/v1/proposal"; +import * as _132 from "./wasm/v1/query"; +import * as _133 from "./wasm/v1/tx"; +import * as _134 from "./wasm/v1/types"; +import * as _281 from "./wasm/v1/tx.amino"; +import * as _282 from "./wasm/v1/tx.registry"; +import * as _283 from "./wasm/v1/query.rpc.Query"; +import * as _284 from "./wasm/v1/tx.rpc.msg"; +import * as _324 from "./rpc.query"; +import * as _325 from "./rpc.tx"; +export namespace cosmwasm { + export namespace wasm { + export const v1 = { + ..._128, + ..._129, + ..._130, + ..._131, + ..._132, + ..._133, + ..._134, + ..._281, + ..._282, + ..._283, + ..._284 + }; + } + export const ClientFactory = { + ..._324, + ..._325 + }; +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/client.ts b/frontend/empowerjs/src/codegen/cosmwasm/client.ts new file mode 100644 index 000000000..324653566 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/client.ts @@ -0,0 +1,47 @@ +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, + aminoTypes + }); + return client; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/rpc.query.ts b/frontend/empowerjs/src/codegen/cosmwasm/rpc.query.ts new file mode 100644 index 000000000..180cc04c5 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/rpc.query.ts @@ -0,0 +1,87 @@ +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) + }, + autocli: { + v1: (await import("../cosmos/autocli/v1/query.rpc.Query")).createRpcQueryExtension(client) + }, + bank: { + v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) + }, + base: { + node: { + v1beta1: (await import("../cosmos/base/node/v1beta1/query.rpc.Service")).createRpcQueryExtension(client) + }, + tendermint: { + v1beta1: (await import("../cosmos/base/tendermint/v1beta1/query.rpc.Service")).createRpcQueryExtension(client) + } + }, + consensus: { + v1: (await import("../cosmos/consensus/v1/query.rpc.Query")).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) + }, + orm: { + query: { + v1alpha1: (await import("../cosmos/orm/query/v1alpha1/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/frontend/empowerjs/src/codegen/cosmwasm/rpc.tx.ts b/frontend/empowerjs/src/codegen/cosmwasm/rpc.tx.ts new file mode 100644 index 000000000..e8467260c --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/rpc.tx.ts @@ -0,0 +1,63 @@ +import { Rpc } from "../helpers"; +export const createRPCMsgClient = async ({ + rpc +}: { + rpc: Rpc; +}) => ({ + cosmos: { + auth: { + v1beta1: new (await import("../cosmos/auth/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + }, + 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) + }, + consensus: { + v1: new (await import("../cosmos/consensus/v1/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) + }, + mint: { + v1beta1: new (await import("../cosmos/mint/v1beta1/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/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/authz.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/authz.ts new file mode 100644 index 000000000..f7c7e3e27 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/authz.ts @@ -0,0 +1,605 @@ +import { Any, AnySDKType } from "../../../google/protobuf/any"; +import { Coin, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; +/** + * ContractExecutionAuthorization defines authorization for wasm execute. + * Since: wasmd 0.30 + */ +export interface ContractExecutionAuthorization { + /** Grants for contract executions */ + grants: ContractGrant[]; +} +/** + * ContractExecutionAuthorization defines authorization for wasm execute. + * Since: wasmd 0.30 + */ +export interface ContractExecutionAuthorizationSDKType { + grants: ContractGrantSDKType[]; +} +/** + * ContractMigrationAuthorization defines authorization for wasm contract + * migration. Since: wasmd 0.30 + */ +export interface ContractMigrationAuthorization { + /** Grants for contract migrations */ + grants: ContractGrant[]; +} +/** + * ContractMigrationAuthorization defines authorization for wasm contract + * migration. Since: wasmd 0.30 + */ +export interface ContractMigrationAuthorizationSDKType { + grants: ContractGrantSDKType[]; +} +/** + * ContractGrant a granted permission for a single contract + * Since: wasmd 0.30 + */ +export interface ContractGrant { + /** Contract is the bech32 address of the smart contract */ + contract: string; + /** + * Limit defines execution limits that are enforced and updated when the grant + * is applied. When the limit lapsed the grant is removed. + */ + limit?: Any; + /** + * Filter define more fine-grained control on the message payload passed + * to the contract in the operation. When no filter applies on execution, the + * operation is prohibited. + */ + filter?: Any; +} +/** + * ContractGrant a granted permission for a single contract + * Since: wasmd 0.30 + */ +export interface ContractGrantSDKType { + contract: string; + limit?: AnySDKType; + filter?: AnySDKType; +} +/** + * MaxCallsLimit limited number of calls to the contract. No funds transferable. + * Since: wasmd 0.30 + */ +export interface MaxCallsLimit { + /** Remaining number that is decremented on each execution */ + remaining: bigint; +} +/** + * MaxCallsLimit limited number of calls to the contract. No funds transferable. + * Since: wasmd 0.30 + */ +export interface MaxCallsLimitSDKType { + remaining: bigint; +} +/** + * MaxFundsLimit defines the maximal amounts that can be sent to the contract. + * Since: wasmd 0.30 + */ +export interface MaxFundsLimit { + /** Amounts is the maximal amount of tokens transferable to the contract. */ + amounts: Coin[]; +} +/** + * MaxFundsLimit defines the maximal amounts that can be sent to the contract. + * Since: wasmd 0.30 + */ +export interface MaxFundsLimitSDKType { + amounts: CoinSDKType[]; +} +/** + * CombinedLimit defines the maximal amounts that can be sent to a contract and + * the maximal number of calls executable. Both need to remain >0 to be valid. + * Since: wasmd 0.30 + */ +export interface CombinedLimit { + /** Remaining number that is decremented on each execution */ + callsRemaining: bigint; + /** Amounts is the maximal amount of tokens transferable to the contract. */ + amounts: Coin[]; +} +/** + * CombinedLimit defines the maximal amounts that can be sent to a contract and + * the maximal number of calls executable. Both need to remain >0 to be valid. + * Since: wasmd 0.30 + */ +export interface CombinedLimitSDKType { + calls_remaining: bigint; + amounts: CoinSDKType[]; +} +/** + * AllowAllMessagesFilter is a wildcard to allow any type of contract payload + * message. + * Since: wasmd 0.30 + */ +export interface AllowAllMessagesFilter {} +/** + * AllowAllMessagesFilter is a wildcard to allow any type of contract payload + * message. + * Since: wasmd 0.30 + */ +export interface AllowAllMessagesFilterSDKType {} +/** + * AcceptedMessageKeysFilter accept only the specific contract message keys in + * the json object to be executed. + * Since: wasmd 0.30 + */ +export interface AcceptedMessageKeysFilter { + /** Messages is the list of unique keys */ + keys: string[]; +} +/** + * AcceptedMessageKeysFilter accept only the specific contract message keys in + * the json object to be executed. + * Since: wasmd 0.30 + */ +export interface AcceptedMessageKeysFilterSDKType { + keys: string[]; +} +/** + * AcceptedMessagesFilter accept only the specific raw contract messages to be + * executed. + * Since: wasmd 0.30 + */ +export interface AcceptedMessagesFilter { + /** Messages is the list of raw contract messages */ + messages: Uint8Array[]; +} +/** + * AcceptedMessagesFilter accept only the specific raw contract messages to be + * executed. + * Since: wasmd 0.30 + */ +export interface AcceptedMessagesFilterSDKType { + messages: Uint8Array[]; +} +function createBaseContractExecutionAuthorization(): ContractExecutionAuthorization { + return { + grants: [] + }; +} +export const ContractExecutionAuthorization = { + encode(message: ContractExecutionAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.grants) { + ContractGrant.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ContractExecutionAuthorization { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseContractExecutionAuthorization(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.grants.push(ContractGrant.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): ContractExecutionAuthorization { + return { + grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => ContractGrant.fromJSON(e)) : [] + }; + }, + toJSON(message: ContractExecutionAuthorization): unknown { + const obj: any = {}; + if (message.grants) { + obj.grants = message.grants.map(e => e ? ContractGrant.toJSON(e) : undefined); + } else { + obj.grants = []; + } + return obj; + }, + fromPartial(object: Partial): ContractExecutionAuthorization { + const message = createBaseContractExecutionAuthorization(); + message.grants = object.grants?.map(e => ContractGrant.fromPartial(e)) || []; + return message; + } +}; +function createBaseContractMigrationAuthorization(): ContractMigrationAuthorization { + return { + grants: [] + }; +} +export const ContractMigrationAuthorization = { + encode(message: ContractMigrationAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.grants) { + ContractGrant.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ContractMigrationAuthorization { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseContractMigrationAuthorization(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.grants.push(ContractGrant.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): ContractMigrationAuthorization { + return { + grants: Array.isArray(object?.grants) ? object.grants.map((e: any) => ContractGrant.fromJSON(e)) : [] + }; + }, + toJSON(message: ContractMigrationAuthorization): unknown { + const obj: any = {}; + if (message.grants) { + obj.grants = message.grants.map(e => e ? ContractGrant.toJSON(e) : undefined); + } else { + obj.grants = []; + } + return obj; + }, + fromPartial(object: Partial): ContractMigrationAuthorization { + const message = createBaseContractMigrationAuthorization(); + message.grants = object.grants?.map(e => ContractGrant.fromPartial(e)) || []; + return message; + } +}; +function createBaseContractGrant(): ContractGrant { + return { + contract: "", + limit: undefined, + filter: undefined + }; +} +export const ContractGrant = { + encode(message: ContractGrant, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.contract !== "") { + writer.uint32(10).string(message.contract); + } + if (message.limit !== undefined) { + Any.encode(message.limit, writer.uint32(18).fork()).ldelim(); + } + if (message.filter !== undefined) { + Any.encode(message.filter, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ContractGrant { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseContractGrant(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contract = reader.string(); + break; + case 2: + message.limit = Any.decode(reader, reader.uint32()); + break; + case 3: + message.filter = Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): ContractGrant { + return { + contract: isSet(object.contract) ? String(object.contract) : "", + limit: isSet(object.limit) ? Any.fromJSON(object.limit) : undefined, + filter: isSet(object.filter) ? Any.fromJSON(object.filter) : undefined + }; + }, + toJSON(message: ContractGrant): unknown { + const obj: any = {}; + message.contract !== undefined && (obj.contract = message.contract); + message.limit !== undefined && (obj.limit = message.limit ? Any.toJSON(message.limit) : undefined); + message.filter !== undefined && (obj.filter = message.filter ? Any.toJSON(message.filter) : undefined); + return obj; + }, + fromPartial(object: Partial): ContractGrant { + const message = createBaseContractGrant(); + message.contract = object.contract ?? ""; + message.limit = object.limit !== undefined && object.limit !== null ? Any.fromPartial(object.limit) : undefined; + message.filter = object.filter !== undefined && object.filter !== null ? Any.fromPartial(object.filter) : undefined; + return message; + } +}; +function createBaseMaxCallsLimit(): MaxCallsLimit { + return { + remaining: BigInt("0") + }; +} +export const MaxCallsLimit = { + encode(message: MaxCallsLimit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.remaining !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.remaining.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MaxCallsLimit { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMaxCallsLimit(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.remaining = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MaxCallsLimit { + return { + remaining: isSet(object.remaining) ? BigInt(object.remaining.toString()) : BigInt("0") + }; + }, + toJSON(message: MaxCallsLimit): unknown { + const obj: any = {}; + message.remaining !== undefined && (obj.remaining = (message.remaining || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): MaxCallsLimit { + const message = createBaseMaxCallsLimit(); + message.remaining = object.remaining !== undefined && object.remaining !== null ? BigInt(object.remaining.toString()) : BigInt("0"); + return message; + } +}; +function createBaseMaxFundsLimit(): MaxFundsLimit { + return { + amounts: [] + }; +} +export const MaxFundsLimit = { + encode(message: MaxFundsLimit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MaxFundsLimit { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMaxFundsLimit(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amounts.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MaxFundsLimit { + return { + amounts: Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [] + }; + }, + toJSON(message: MaxFundsLimit): unknown { + const obj: any = {}; + if (message.amounts) { + obj.amounts = message.amounts.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.amounts = []; + } + return obj; + }, + fromPartial(object: Partial): MaxFundsLimit { + const message = createBaseMaxFundsLimit(); + message.amounts = object.amounts?.map(e => Coin.fromPartial(e)) || []; + return message; + } +}; +function createBaseCombinedLimit(): CombinedLimit { + return { + callsRemaining: BigInt("0"), + amounts: [] + }; +} +export const CombinedLimit = { + encode(message: CombinedLimit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.callsRemaining !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.callsRemaining.toString())); + } + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): CombinedLimit { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCombinedLimit(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.callsRemaining = BigInt(reader.uint64().toString()); + break; + case 2: + message.amounts.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): CombinedLimit { + return { + callsRemaining: isSet(object.callsRemaining) ? BigInt(object.callsRemaining.toString()) : BigInt("0"), + amounts: Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [] + }; + }, + toJSON(message: CombinedLimit): unknown { + const obj: any = {}; + message.callsRemaining !== undefined && (obj.callsRemaining = (message.callsRemaining || BigInt("0")).toString()); + if (message.amounts) { + obj.amounts = message.amounts.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.amounts = []; + } + return obj; + }, + fromPartial(object: Partial): CombinedLimit { + const message = createBaseCombinedLimit(); + message.callsRemaining = object.callsRemaining !== undefined && object.callsRemaining !== null ? BigInt(object.callsRemaining.toString()) : BigInt("0"); + message.amounts = object.amounts?.map(e => Coin.fromPartial(e)) || []; + return message; + } +}; +function createBaseAllowAllMessagesFilter(): AllowAllMessagesFilter { + return {}; +} +export const AllowAllMessagesFilter = { + encode(_: AllowAllMessagesFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): AllowAllMessagesFilter { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAllowAllMessagesFilter(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): AllowAllMessagesFilter { + return {}; + }, + toJSON(_: AllowAllMessagesFilter): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): AllowAllMessagesFilter { + const message = createBaseAllowAllMessagesFilter(); + return message; + } +}; +function createBaseAcceptedMessageKeysFilter(): AcceptedMessageKeysFilter { + return { + keys: [] + }; +} +export const AcceptedMessageKeysFilter = { + encode(message: AcceptedMessageKeysFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.keys) { + writer.uint32(10).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): AcceptedMessageKeysFilter { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAcceptedMessageKeysFilter(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keys.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): AcceptedMessageKeysFilter { + return { + keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => String(e)) : [] + }; + }, + toJSON(message: AcceptedMessageKeysFilter): unknown { + const obj: any = {}; + if (message.keys) { + obj.keys = message.keys.map(e => e); + } else { + obj.keys = []; + } + return obj; + }, + fromPartial(object: Partial): AcceptedMessageKeysFilter { + const message = createBaseAcceptedMessageKeysFilter(); + message.keys = object.keys?.map(e => e) || []; + return message; + } +}; +function createBaseAcceptedMessagesFilter(): AcceptedMessagesFilter { + return { + messages: [] + }; +} +export const AcceptedMessagesFilter = { + encode(message: AcceptedMessagesFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.messages) { + writer.uint32(10).bytes(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): AcceptedMessagesFilter { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAcceptedMessagesFilter(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messages.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): AcceptedMessagesFilter { + return { + messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => bytesFromBase64(e)) : [] + }; + }, + toJSON(message: AcceptedMessagesFilter): unknown { + const obj: any = {}; + if (message.messages) { + obj.messages = message.messages.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array())); + } else { + obj.messages = []; + } + return obj; + }, + fromPartial(object: Partial): AcceptedMessagesFilter { + const message = createBaseAcceptedMessagesFilter(); + message.messages = object.messages?.map(e => e) || []; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/genesis.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/genesis.ts new file mode 100644 index 000000000..339b8a253 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/genesis.ts @@ -0,0 +1,356 @@ +import { Params, ParamsSDKType, CodeInfo, CodeInfoSDKType, ContractInfo, ContractInfoSDKType, Model, ModelSDKType, ContractCodeHistoryEntry, ContractCodeHistoryEntrySDKType } from "./types"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; +/** GenesisState - genesis state of x/wasm */ +export interface GenesisState { + params?: Params; + codes: Code[]; + contracts: Contract[]; + sequences: Sequence[]; +} +/** GenesisState - genesis state of x/wasm */ +export interface GenesisStateSDKType { + params?: ParamsSDKType; + codes: CodeSDKType[]; + contracts: ContractSDKType[]; + sequences: SequenceSDKType[]; +} +/** Code struct encompasses CodeInfo and CodeBytes */ +export interface Code { + codeId: bigint; + codeInfo?: CodeInfo; + codeBytes: Uint8Array; + /** Pinned to wasmvm cache */ + pinned: boolean; +} +/** Code struct encompasses CodeInfo and CodeBytes */ +export interface CodeSDKType { + code_id: bigint; + code_info?: CodeInfoSDKType; + code_bytes: Uint8Array; + pinned: boolean; +} +/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ +export interface Contract { + contractAddress: string; + contractInfo?: ContractInfo; + contractState: Model[]; + contractCodeHistory: ContractCodeHistoryEntry[]; +} +/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ +export interface ContractSDKType { + contract_address: string; + contract_info?: ContractInfoSDKType; + contract_state: ModelSDKType[]; + contract_code_history: ContractCodeHistoryEntrySDKType[]; +} +/** Sequence key and value of an id generation counter */ +export interface Sequence { + idKey: Uint8Array; + value: bigint; +} +/** Sequence key and value of an id generation counter */ +export interface SequenceSDKType { + id_key: Uint8Array; + value: bigint; +} +function createBaseGenesisState(): GenesisState { + return { + params: undefined, + codes: [], + contracts: [], + sequences: [] + }; +} +export const GenesisState = { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; + 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)) : [] + }; + }, + 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 = []; + } + return obj; + }, + fromPartial(object: Partial): 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)) || []; + return message; + } +}; +function createBaseCode(): Code { + return { + codeId: BigInt("0"), + codeInfo: undefined, + codeBytes: new Uint8Array(), + pinned: false + }; +} +export const Code = { + encode(message: Code, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.codeId.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): Code { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseContract(): Contract { + return { + contractAddress: "", + contractInfo: undefined, + contractState: [], + contractCodeHistory: [] + }; +} +export const Contract = { + encode(message: Contract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(); + } + for (const v of message.contractCodeHistory) { + ContractCodeHistoryEntry.encode(v!, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Contract { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; + case 4: + message.contractCodeHistory.push(ContractCodeHistoryEntry.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)) : [], + contractCodeHistory: Array.isArray(object?.contractCodeHistory) ? object.contractCodeHistory.map((e: any) => ContractCodeHistoryEntry.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 = []; + } + if (message.contractCodeHistory) { + obj.contractCodeHistory = message.contractCodeHistory.map(e => e ? ContractCodeHistoryEntry.toJSON(e) : undefined); + } else { + obj.contractCodeHistory = []; + } + return obj; + }, + fromPartial(object: Partial): 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)) || []; + message.contractCodeHistory = object.contractCodeHistory?.map(e => ContractCodeHistoryEntry.fromPartial(e)) || []; + return message; + } +}; +function createBaseSequence(): Sequence { + return { + idKey: new Uint8Array(), + value: BigInt("0") + }; +} +export const Sequence = { + encode(message: Sequence, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.idKey.length !== 0) { + writer.uint32(10).bytes(message.idKey); + } + if (message.value !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.value.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Sequence { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/ibc.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/ibc.ts new file mode 100644 index 000000000..b10d75e84 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/ibc.ts @@ -0,0 +1,211 @@ +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, bytesFromBase64, base64FromBytes } 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; +} +/** MsgIBCSend */ +export interface MsgIBCSendSDKType { + channel: string; + timeout_height: bigint; + timeout_timestamp: bigint; + data: Uint8Array; +} +/** MsgIBCSendResponse */ +export interface MsgIBCSendResponse { + /** Sequence number of the IBC packet sent */ + sequence: bigint; +} +/** MsgIBCSendResponse */ +export interface MsgIBCSendResponseSDKType { + sequence: bigint; +} +/** MsgIBCCloseChannel port and channel need to be owned by the contract */ +export interface MsgIBCCloseChannel { + channel: string; +} +/** 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 = { + encode(message: MsgIBCSend, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channel !== "") { + writer.uint32(18).string(message.channel); + } + if (message.timeoutHeight !== BigInt(0)) { + writer.uint32(32).uint64(Long.fromString(message.timeoutHeight.toString())); + } + if (message.timeoutTimestamp !== BigInt(0)) { + writer.uint32(40).uint64(Long.fromString(message.timeoutTimestamp.toString())); + } + if (message.data.length !== 0) { + writer.uint32(50).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgIBCSend { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 5: + message.timeoutTimestamp = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseMsgIBCSendResponse(): MsgIBCSendResponse { + return { + sequence: BigInt("0") + }; +} +export const MsgIBCSendResponse = { + encode(message: MsgIBCSendResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgIBCSendResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgIBCSendResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sequence = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgIBCSendResponse { + return { + sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt("0") + }; + }, + toJSON(message: MsgIBCSendResponse): unknown { + const obj: any = {}; + message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): MsgIBCSendResponse { + const message = createBaseMsgIBCSendResponse(); + message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt("0"); + return message; + } +}; +function createBaseMsgIBCCloseChannel(): MsgIBCCloseChannel { + return { + channel: "" + }; +} +export const MsgIBCCloseChannel = { + encode(message: MsgIBCCloseChannel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channel !== "") { + writer.uint32(18).string(message.channel); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgIBCCloseChannel { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MsgIBCCloseChannel { + const message = createBaseMsgIBCCloseChannel(); + message.channel = object.channel ?? ""; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/proposal.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/proposal.ts new file mode 100644 index 000000000..531966759 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/proposal.ts @@ -0,0 +1,1700 @@ +import { AccessConfig, AccessConfigSDKType } from "./types"; +import { Coin, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit StoreCodeProposal. To submit WASM code to the system, + * a simple MsgStoreCode can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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; + /** UnpinCode code on upload, optional */ + unpinCode: boolean; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + codeHash: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit StoreCodeProposal. To submit WASM code to the system, + * a simple MsgStoreCode can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface StoreCodeProposalSDKType { + title: string; + description: string; + run_as: string; + wasm_byte_code: Uint8Array; + instantiate_permission?: AccessConfigSDKType; + unpin_code: boolean; + source: string; + builder: string; + code_hash: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit InstantiateContractProposal. To instantiate a contract, + * a simple MsgInstantiateContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit InstantiateContractProposal. To instantiate a contract, + * a simple MsgInstantiateContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface InstantiateContractProposalSDKType { + title: string; + description: string; + run_as: string; + admin: string; + code_id: bigint; + label: string; + msg: Uint8Array; + funds: CoinSDKType[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit InstantiateContract2Proposal. To instantiate contract 2, + * a simple MsgInstantiateContract2 can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface InstantiateContract2Proposal { + /** 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 enviroment 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 encode message to be passed to the contract on instantiation */ + msg: Uint8Array; + /** Funds coins that are transferred to the contract on instantiation */ + funds: Coin[]; + /** Salt is an arbitrary value provided by the sender. Size can be 1 to 64. */ + salt: Uint8Array; + /** + * FixMsg include the msg value into the hash for the predictable address. + * Default is false + */ + fixMsg: boolean; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit InstantiateContract2Proposal. To instantiate contract 2, + * a simple MsgInstantiateContract2 can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface InstantiateContract2ProposalSDKType { + title: string; + description: string; + run_as: string; + admin: string; + code_id: bigint; + label: string; + msg: Uint8Array; + funds: CoinSDKType[]; + salt: Uint8Array; + fix_msg: boolean; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit MigrateContractProposal. To migrate a contract, + * a simple MsgMigrateContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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 code */ + codeId: bigint; + /** Msg json encoded message to be passed to the contract on migration */ + msg: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit MigrateContractProposal. To migrate a contract, + * a simple MsgMigrateContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface MigrateContractProposalSDKType { + title: string; + description: string; + contract: string; + code_id: bigint; + msg: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit SudoContractProposal. To call sudo on a contract, + * a simple MsgSudoContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit SudoContractProposal. To call sudo on a contract, + * a simple MsgSudoContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface SudoContractProposalSDKType { + title: string; + description: string; + contract: string; + msg: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit ExecuteContractProposal. To call execute on a contract, + * a simple MsgExecuteContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit ExecuteContractProposal. To call execute on a contract, + * a simple MsgExecuteContract can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface ExecuteContractProposalSDKType { + title: string; + description: string; + run_as: string; + contract: string; + msg: Uint8Array; + funds: CoinSDKType[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UpdateAdminProposal. To set an admin for a contract, + * a simple MsgUpdateAdmin can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UpdateAdminProposal. To set an admin for a contract, + * a simple MsgUpdateAdmin can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface UpdateAdminProposalSDKType { + title: string; + description: string; + new_admin: string; + contract: string; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit ClearAdminProposal. To clear the admin of a contract, + * a simple MsgClearAdmin can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit ClearAdminProposal. To clear the admin of a contract, + * a simple MsgClearAdmin can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface ClearAdminProposalSDKType { + title: string; + description: string; + contract: string; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit PinCodesProposal. To pin a set of code ids in the wasmvm + * cache, a simple MsgPinCodes can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit PinCodesProposal. To pin a set of code ids in the wasmvm + * cache, a simple MsgPinCodes can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface PinCodesProposalSDKType { + title: string; + description: string; + code_ids: bigint[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm + * cache, a simple MsgUnpinCodes can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +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[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm + * cache, a simple MsgUnpinCodes can be invoked from the x/gov module via + * a v1 governance proposal. + */ +/** @deprecated */ +export interface UnpinCodesProposalSDKType { + title: string; + description: string; + code_ids: bigint[]; +} +/** + * AccessConfigUpdate contains the code id and the access config to be + * applied. + */ +export interface AccessConfigUpdate { + /** CodeID is the reference to the stored WASM code to be updated */ + codeId: bigint; + /** InstantiatePermission to apply to the set of code ids */ + instantiatePermission?: AccessConfig; +} +/** + * AccessConfigUpdate contains the code id and the access config to be + * applied. + */ +export interface AccessConfigUpdateSDKType { + code_id: bigint; + instantiate_permission?: AccessConfigSDKType; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UpdateInstantiateConfigProposal. To update instantiate config + * to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from + * the x/gov module via a v1 governance proposal. + */ +/** @deprecated */ +export interface UpdateInstantiateConfigProposal { + /** Title is a short summary */ + title: string; + /** Description is a human readable text */ + description: string; + /** + * AccessConfigUpdate contains the list of code ids and the access config + * to be applied. + */ + accessConfigUpdates: AccessConfigUpdate[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit UpdateInstantiateConfigProposal. To update instantiate config + * to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from + * the x/gov module via a v1 governance proposal. + */ +/** @deprecated */ +export interface UpdateInstantiateConfigProposalSDKType { + title: string; + description: string; + access_config_updates: AccessConfigUpdateSDKType[]; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit StoreAndInstantiateContractProposal. To store and instantiate + * the contract, a simple MsgStoreAndInstantiateContract can be invoked from + * the x/gov module via a v1 governance proposal. + */ +/** @deprecated */ +export interface StoreAndInstantiateContractProposal { + /** 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; + /** UnpinCode code on upload, optional */ + unpinCode: boolean; + /** Admin is an optional address that can execute migrations */ + admin: 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: Coin[]; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + codeHash: Uint8Array; +} +/** + * Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for + * an explicit StoreAndInstantiateContractProposal. To store and instantiate + * the contract, a simple MsgStoreAndInstantiateContract can be invoked from + * the x/gov module via a v1 governance proposal. + */ +/** @deprecated */ +export interface StoreAndInstantiateContractProposalSDKType { + title: string; + description: string; + run_as: string; + wasm_byte_code: Uint8Array; + instantiate_permission?: AccessConfigSDKType; + unpin_code: boolean; + admin: string; + label: string; + msg: Uint8Array; + funds: CoinSDKType[]; + source: string; + builder: string; + code_hash: Uint8Array; +} +function createBaseStoreCodeProposal(): StoreCodeProposal { + return { + title: "", + description: "", + runAs: "", + wasmByteCode: new Uint8Array(), + instantiatePermission: undefined, + unpinCode: false, + source: "", + builder: "", + codeHash: new Uint8Array() + }; +} +export const StoreCodeProposal = { + encode(message: StoreCodeProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(); + } + if (message.unpinCode === true) { + writer.uint32(64).bool(message.unpinCode); + } + if (message.source !== "") { + writer.uint32(74).string(message.source); + } + if (message.builder !== "") { + writer.uint32(82).string(message.builder); + } + if (message.codeHash.length !== 0) { + writer.uint32(90).bytes(message.codeHash); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): StoreCodeProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; + case 8: + message.unpinCode = reader.bool(); + break; + case 9: + message.source = reader.string(); + break; + case 10: + message.builder = reader.string(); + break; + case 11: + message.codeHash = reader.bytes(); + 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, + unpinCode: isSet(object.unpinCode) ? Boolean(object.unpinCode) : false, + source: isSet(object.source) ? String(object.source) : "", + builder: isSet(object.builder) ? String(object.builder) : "", + codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array() + }; + }, + 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); + message.unpinCode !== undefined && (obj.unpinCode = message.unpinCode); + message.source !== undefined && (obj.source = message.source); + message.builder !== undefined && (obj.builder = message.builder); + message.codeHash !== undefined && (obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): 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; + message.unpinCode = object.unpinCode ?? false; + message.source = object.source ?? ""; + message.builder = object.builder ?? ""; + message.codeHash = object.codeHash ?? new Uint8Array(); + return message; + } +}; +function createBaseInstantiateContractProposal(): InstantiateContractProposal { + return { + title: "", + description: "", + runAs: "", + admin: "", + codeId: BigInt("0"), + label: "", + msg: new Uint8Array(), + funds: [] + }; +} +export const InstantiateContractProposal = { + encode(message: InstantiateContractProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.codeId.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): InstantiateContractProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseInstantiateContract2Proposal(): InstantiateContract2Proposal { + return { + title: "", + description: "", + runAs: "", + admin: "", + codeId: BigInt("0"), + label: "", + msg: new Uint8Array(), + funds: [], + salt: new Uint8Array(), + fixMsg: false + }; +} +export const InstantiateContract2Proposal = { + encode(message: InstantiateContract2Proposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.codeId.toString())); + } + 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(); + } + if (message.salt.length !== 0) { + writer.uint32(74).bytes(message.salt); + } + if (message.fixMsg === true) { + writer.uint32(80).bool(message.fixMsg); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): InstantiateContract2Proposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInstantiateContract2Proposal(); + 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 = BigInt(reader.uint64().toString()); + 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; + case 9: + message.salt = reader.bytes(); + break; + case 10: + message.fixMsg = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): InstantiateContract2Proposal { + 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)) : [], + salt: isSet(object.salt) ? bytesFromBase64(object.salt) : new Uint8Array(), + fixMsg: isSet(object.fixMsg) ? Boolean(object.fixMsg) : false + }; + }, + toJSON(message: InstantiateContract2Proposal): 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 = []; + } + message.salt !== undefined && (obj.salt = base64FromBytes(message.salt !== undefined ? message.salt : new Uint8Array())); + message.fixMsg !== undefined && (obj.fixMsg = message.fixMsg); + return obj; + }, + fromPartial(object: Partial): InstantiateContract2Proposal { + const message = createBaseInstantiateContract2Proposal(); + 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)) || []; + message.salt = object.salt ?? new Uint8Array(); + message.fixMsg = object.fixMsg ?? false; + return message; + } +}; +function createBaseMigrateContractProposal(): MigrateContractProposal { + return { + title: "", + description: "", + contract: "", + codeId: BigInt("0"), + msg: new Uint8Array() + }; +} +export const MigrateContractProposal = { + encode(message: MigrateContractProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.codeId.toString())); + } + if (message.msg.length !== 0) { + writer.uint32(50).bytes(message.msg); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MigrateContractProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseSudoContractProposal(): SudoContractProposal { + return { + title: "", + description: "", + contract: "", + msg: new Uint8Array() + }; +} +export const SudoContractProposal = { + encode(message: SudoContractProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): SudoContractProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): SudoContractProposal { + const message = createBaseSudoContractProposal(); + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.contract = object.contract ?? ""; + message.msg = object.msg ?? new Uint8Array(); + return message; + } +}; +function createBaseExecuteContractProposal(): ExecuteContractProposal { + return { + title: "", + description: "", + runAs: "", + contract: "", + msg: new Uint8Array(), + funds: [] + }; +} +export const ExecuteContractProposal = { + encode(message: ExecuteContractProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ExecuteContractProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseUpdateAdminProposal(): UpdateAdminProposal { + return { + title: "", + description: "", + newAdmin: "", + contract: "" + }; +} +export const UpdateAdminProposal = { + encode(message: UpdateAdminProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): UpdateAdminProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): UpdateAdminProposal { + const message = createBaseUpdateAdminProposal(); + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.newAdmin = object.newAdmin ?? ""; + message.contract = object.contract ?? ""; + return message; + } +}; +function createBaseClearAdminProposal(): ClearAdminProposal { + return { + title: "", + description: "", + contract: "" + }; +} +export const ClearAdminProposal = { + encode(message: ClearAdminProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ClearAdminProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): ClearAdminProposal { + const message = createBaseClearAdminProposal(); + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.contract = object.contract ?? ""; + return message; + } +}; +function createBasePinCodesProposal(): PinCodesProposal { + return { + title: "", + description: "", + codeIds: [] + }; +} +export const PinCodesProposal = { + encode(message: PinCodesProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(v.toString())); + } + writer.ldelim(); + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): PinCodesProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(BigInt(reader.uint64().toString())); + } + } else { + message.codeIds.push(BigInt(reader.uint64().toString())); + } + 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: Partial): PinCodesProposal { + const message = createBasePinCodesProposal(); + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; + return message; + } +}; +function createBaseUnpinCodesProposal(): UnpinCodesProposal { + return { + title: "", + description: "", + codeIds: [] + }; +} +export const UnpinCodesProposal = { + encode(message: UnpinCodesProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(v.toString())); + } + writer.ldelim(); + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): UnpinCodesProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(BigInt(reader.uint64().toString())); + } + } else { + message.codeIds.push(BigInt(reader.uint64().toString())); + } + 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: Partial): UnpinCodesProposal { + const message = createBaseUnpinCodesProposal(); + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; + return message; + } +}; +function createBaseAccessConfigUpdate(): AccessConfigUpdate { + return { + codeId: BigInt("0"), + instantiatePermission: undefined + }; +} +export const AccessConfigUpdate = { + encode(message: AccessConfigUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.codeId.toString())); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): AccessConfigUpdate { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAccessConfigUpdate(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codeId = BigInt(reader.uint64().toString()); + break; + case 2: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): AccessConfigUpdate { + return { + codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt("0"), + instantiatePermission: isSet(object.instantiatePermission) ? AccessConfig.fromJSON(object.instantiatePermission) : undefined + }; + }, + toJSON(message: AccessConfigUpdate): unknown { + const obj: any = {}; + message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt("0")).toString()); + message.instantiatePermission !== undefined && (obj.instantiatePermission = message.instantiatePermission ? AccessConfig.toJSON(message.instantiatePermission) : undefined); + return obj; + }, + fromPartial(object: Partial): AccessConfigUpdate { + const message = createBaseAccessConfigUpdate(); + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt("0"); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + return message; + } +}; +function createBaseUpdateInstantiateConfigProposal(): UpdateInstantiateConfigProposal { + return { + title: "", + description: "", + accessConfigUpdates: [] + }; +} +export const UpdateInstantiateConfigProposal = { + encode(message: UpdateInstantiateConfigProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.title !== "") { + writer.uint32(10).string(message.title); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + for (const v of message.accessConfigUpdates) { + AccessConfigUpdate.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateInstantiateConfigProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateInstantiateConfigProposal(); + 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.accessConfigUpdates.push(AccessConfigUpdate.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): UpdateInstantiateConfigProposal { + return { + title: isSet(object.title) ? String(object.title) : "", + description: isSet(object.description) ? String(object.description) : "", + accessConfigUpdates: Array.isArray(object?.accessConfigUpdates) ? object.accessConfigUpdates.map((e: any) => AccessConfigUpdate.fromJSON(e)) : [] + }; + }, + toJSON(message: UpdateInstantiateConfigProposal): unknown { + const obj: any = {}; + message.title !== undefined && (obj.title = message.title); + message.description !== undefined && (obj.description = message.description); + if (message.accessConfigUpdates) { + obj.accessConfigUpdates = message.accessConfigUpdates.map(e => e ? AccessConfigUpdate.toJSON(e) : undefined); + } else { + obj.accessConfigUpdates = []; + } + return obj; + }, + fromPartial(object: Partial): UpdateInstantiateConfigProposal { + const message = createBaseUpdateInstantiateConfigProposal(); + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.accessConfigUpdates = object.accessConfigUpdates?.map(e => AccessConfigUpdate.fromPartial(e)) || []; + return message; + } +}; +function createBaseStoreAndInstantiateContractProposal(): StoreAndInstantiateContractProposal { + return { + title: "", + description: "", + runAs: "", + wasmByteCode: new Uint8Array(), + instantiatePermission: undefined, + unpinCode: false, + admin: "", + label: "", + msg: new Uint8Array(), + funds: [], + source: "", + builder: "", + codeHash: new Uint8Array() + }; +} +export const StoreAndInstantiateContractProposal = { + encode(message: StoreAndInstantiateContractProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(42).fork()).ldelim(); + } + if (message.unpinCode === true) { + writer.uint32(48).bool(message.unpinCode); + } + if (message.admin !== "") { + writer.uint32(58).string(message.admin); + } + if (message.label !== "") { + writer.uint32(66).string(message.label); + } + if (message.msg.length !== 0) { + writer.uint32(74).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(82).fork()).ldelim(); + } + if (message.source !== "") { + writer.uint32(90).string(message.source); + } + if (message.builder !== "") { + writer.uint32(98).string(message.builder); + } + if (message.codeHash.length !== 0) { + writer.uint32(106).bytes(message.codeHash); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): StoreAndInstantiateContractProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStoreAndInstantiateContractProposal(); + 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 5: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + case 6: + message.unpinCode = reader.bool(); + break; + case 7: + message.admin = reader.string(); + break; + case 8: + message.label = reader.string(); + break; + case 9: + message.msg = reader.bytes(); + break; + case 10: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + case 11: + message.source = reader.string(); + break; + case 12: + message.builder = reader.string(); + break; + case 13: + message.codeHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): StoreAndInstantiateContractProposal { + 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, + unpinCode: isSet(object.unpinCode) ? Boolean(object.unpinCode) : false, + admin: isSet(object.admin) ? String(object.admin) : "", + 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)) : [], + source: isSet(object.source) ? String(object.source) : "", + builder: isSet(object.builder) ? String(object.builder) : "", + codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array() + }; + }, + toJSON(message: StoreAndInstantiateContractProposal): 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); + message.unpinCode !== undefined && (obj.unpinCode = message.unpinCode); + message.admin !== undefined && (obj.admin = message.admin); + 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 = []; + } + message.source !== undefined && (obj.source = message.source); + message.builder !== undefined && (obj.builder = message.builder); + message.codeHash !== undefined && (obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): StoreAndInstantiateContractProposal { + const message = createBaseStoreAndInstantiateContractProposal(); + 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; + message.unpinCode = object.unpinCode ?? false; + message.admin = object.admin ?? ""; + message.label = object.label ?? ""; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + message.source = object.source ?? ""; + message.builder = object.builder ?? ""; + message.codeHash = object.codeHash ?? new Uint8Array(); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/query.rpc.Query.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/query.rpc.Query.ts new file mode 100644 index 000000000..16f6737df --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/query.rpc.Query.ts @@ -0,0 +1,144 @@ +import { Rpc } from "../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +import { QueryContractInfoRequest, QueryContractInfoResponse, QueryContractHistoryRequest, QueryContractHistoryResponse, QueryContractsByCodeRequest, QueryContractsByCodeResponse, QueryAllContractStateRequest, QueryAllContractStateResponse, QueryRawContractStateRequest, QueryRawContractStateResponse, QuerySmartContractStateRequest, QuerySmartContractStateResponse, QueryCodeRequest, QueryCodeResponse, QueryCodesRequest, QueryCodesResponse, QueryPinnedCodesRequest, QueryPinnedCodesResponse, QueryParamsRequest, QueryParamsResponse, QueryContractsByCreatorRequest, QueryContractsByCreatorResponse } 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; + /** Params gets the module params */ + params(request?: QueryParamsRequest): Promise; + /** ContractsByCreator gets the contracts by creator */ + contractsByCreator(request: QueryContractsByCreatorRequest): 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); + this.params = this.params.bind(this); + this.contractsByCreator = this.contractsByCreator.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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(data))); + } + params(request: QueryParamsRequest = {}): Promise { + const data = QueryParamsRequest.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Params", data); + return promise.then(data => QueryParamsResponse.decode(new _m0.Reader(data))); + } + contractsByCreator(request: QueryContractsByCreatorRequest): Promise { + const data = QueryContractsByCreatorRequest.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractsByCreator", data); + return promise.then(data => QueryContractsByCreatorResponse.decode(new _m0.Reader(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); + }, + params(request?: QueryParamsRequest): Promise { + return queryService.params(request); + }, + contractsByCreator(request: QueryContractsByCreatorRequest): Promise { + return queryService.contractsByCreator(request); + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/query.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/query.ts new file mode 100644 index 000000000..10dbd1700 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/query.ts @@ -0,0 +1,1569 @@ +import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../cosmos/base/query/v1beta1/pagination"; +import { ContractInfo, ContractInfoSDKType, ContractCodeHistoryEntry, ContractCodeHistoryEntrySDKType, Model, ModelSDKType, AccessConfig, AccessConfigSDKType, Params, ParamsSDKType } from "./types"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; +/** + * 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; +} +/** + * 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; +} +/** + * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC + * method + */ +export interface QueryContractInfoResponseSDKType { + address: string; + contract_info?: ContractInfoSDKType; +} +/** + * 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; +} +/** + * QueryContractHistoryRequest is the request type for the Query/ContractHistory + * RPC method + */ +export interface QueryContractHistoryRequestSDKType { + address: string; + pagination?: PageRequestSDKType; +} +/** + * 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; +} +/** + * QueryContractHistoryResponse is the response type for the + * Query/ContractHistory RPC method + */ +export interface QueryContractHistoryResponseSDKType { + entries: ContractCodeHistoryEntrySDKType[]; + pagination?: PageResponseSDKType; +} +/** + * 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; +} +/** + * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode + * RPC method + */ +export interface QueryContractsByCodeRequestSDKType { + code_id: bigint; + pagination?: PageRequestSDKType; +} +/** + * 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; +} +/** + * QueryContractsByCodeResponse is the response type for the + * Query/ContractsByCode RPC method + */ +export interface QueryContractsByCodeResponseSDKType { + contracts: string[]; + pagination?: PageResponseSDKType; +} +/** + * 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; +} +/** + * QueryAllContractStateRequest is the request type for the + * Query/AllContractState RPC method + */ +export interface QueryAllContractStateRequestSDKType { + address: string; + pagination?: PageRequestSDKType; +} +/** + * 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; +} +/** + * QueryAllContractStateResponse is the response type for the + * Query/AllContractState RPC method + */ +export interface QueryAllContractStateResponseSDKType { + models: ModelSDKType[]; + pagination?: PageResponseSDKType; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** 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; + instantiatePermission?: AccessConfig; +} +/** CodeInfoResponse contains code meta data from CodeInfo */ +export interface CodeInfoResponseSDKType { + code_id: bigint; + creator: string; + data_hash: Uint8Array; + instantiate_permission?: AccessConfigSDKType; +} +/** QueryCodeResponse is the response type for the Query/Code RPC method */ +export interface QueryCodeResponse { + codeInfo?: CodeInfoResponse; + data: Uint8Array; +} +/** QueryCodeResponse is the response type for the Query/Code RPC method */ +export interface QueryCodeResponseSDKType { + code_info?: CodeInfoResponseSDKType; + 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; +} +/** QueryCodesRequest is the request type for the Query/Codes RPC method */ +export interface QueryCodesRequestSDKType { + pagination?: PageRequestSDKType; +} +/** 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; +} +/** QueryCodesResponse is the response type for the Query/Codes RPC method */ +export interface QueryCodesResponseSDKType { + code_infos: CodeInfoResponseSDKType[]; + pagination?: PageResponseSDKType; +} +/** + * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes + * RPC method + */ +export interface QueryPinnedCodesRequest { + /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; +} +/** + * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes + * RPC method + */ +export interface QueryPinnedCodesRequestSDKType { + pagination?: PageRequestSDKType; +} +/** + * 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; +} +/** + * QueryPinnedCodesResponse is the response type for the + * Query/PinnedCodes RPC method + */ +export interface QueryPinnedCodesResponseSDKType { + code_ids: bigint[]; + pagination?: PageResponseSDKType; +} +/** QueryParamsRequest is the request type for the Query/Params RPC method. */ +export interface QueryParamsRequest {} +/** 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; +} +/** QueryParamsResponse is the response type for the Query/Params RPC method. */ +export interface QueryParamsResponseSDKType { + params?: ParamsSDKType; +} +/** + * QueryContractsByCreatorRequest is the request type for the + * Query/ContractsByCreator RPC method. + */ +export interface QueryContractsByCreatorRequest { + /** CreatorAddress is the address of contract creator */ + creatorAddress: string; + /** Pagination defines an optional pagination for the request. */ + pagination?: PageRequest; +} +/** + * QueryContractsByCreatorRequest is the request type for the + * Query/ContractsByCreator RPC method. + */ +export interface QueryContractsByCreatorRequestSDKType { + creator_address: string; + pagination?: PageRequestSDKType; +} +/** + * QueryContractsByCreatorResponse is the response type for the + * Query/ContractsByCreator RPC method. + */ +export interface QueryContractsByCreatorResponse { + /** ContractAddresses result set */ + contractAddresses: string[]; + /** Pagination defines the pagination in the response. */ + pagination?: PageResponse; +} +/** + * QueryContractsByCreatorResponse is the response type for the + * Query/ContractsByCreator RPC method. + */ +export interface QueryContractsByCreatorResponseSDKType { + contract_addresses: string[]; + pagination?: PageResponseSDKType; +} +function createBaseQueryContractInfoRequest(): QueryContractInfoRequest { + return { + address: "" + }; +} +export const QueryContractInfoRequest = { + encode(message: QueryContractInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractInfoRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryContractInfoRequest { + const message = createBaseQueryContractInfoRequest(); + message.address = object.address ?? ""; + return message; + } +}; +function createBaseQueryContractInfoResponse(): QueryContractInfoResponse { + return { + address: "", + contractInfo: undefined + }; +} +export const QueryContractInfoResponse = { + encode(message: QueryContractInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryContractInfoResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryContractInfoResponse { + const message = createBaseQueryContractInfoResponse(); + message.address = object.address ?? ""; + message.contractInfo = object.contractInfo !== undefined && object.contractInfo !== null ? ContractInfo.fromPartial(object.contractInfo) : undefined; + return message; + } +}; +function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest { + return { + address: "", + pagination: undefined + }; +} +export const QueryContractHistoryRequest = { + encode(message: QueryContractHistoryRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryContractHistoryRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryContractHistoryRequest { + const message = createBaseQueryContractHistoryRequest(); + message.address = object.address ?? ""; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse { + return { + entries: [], + pagination: undefined + }; +} +export const QueryContractHistoryResponse = { + encode(message: QueryContractHistoryResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryContractHistoryResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest { + return { + codeId: BigInt("0"), + pagination: undefined + }; +} +export const QueryContractsByCodeRequest = { + encode(message: QueryContractsByCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.codeId.toString())); + } + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCodeRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse { + return { + contracts: [], + pagination: undefined + }; +} +export const QueryContractsByCodeResponse = { + encode(message: QueryContractsByCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryContractsByCodeResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest { + return { + address: "", + pagination: undefined + }; +} +export const QueryAllContractStateRequest = { + encode(message: QueryAllContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryAllContractStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryAllContractStateRequest { + const message = createBaseQueryAllContractStateRequest(); + message.address = object.address ?? ""; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse { + return { + models: [], + pagination: undefined + }; +} +export const QueryAllContractStateResponse = { + encode(message: QueryAllContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryAllContractStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest { + return { + address: "", + queryData: new Uint8Array() + }; +} +export const QueryRawContractStateRequest = { + encode(message: QueryRawContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + if (message.queryData.length !== 0) { + writer.uint32(18).bytes(message.queryData); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryRawContractStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryRawContractStateRequest { + const message = createBaseQueryRawContractStateRequest(); + message.address = object.address ?? ""; + message.queryData = object.queryData ?? new Uint8Array(); + return message; + } +}; +function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse { + return { + data: new Uint8Array() + }; +} +export const QueryRawContractStateResponse = { + encode(message: QueryRawContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryRawContractStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryRawContractStateResponse { + const message = createBaseQueryRawContractStateResponse(); + message.data = object.data ?? new Uint8Array(); + return message; + } +}; +function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest { + return { + address: "", + queryData: new Uint8Array() + }; +} +export const QuerySmartContractStateRequest = { + encode(message: QuerySmartContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + if (message.queryData.length !== 0) { + writer.uint32(18).bytes(message.queryData); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QuerySmartContractStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QuerySmartContractStateRequest { + const message = createBaseQuerySmartContractStateRequest(); + message.address = object.address ?? ""; + message.queryData = object.queryData ?? new Uint8Array(); + return message; + } +}; +function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateResponse { + return { + data: new Uint8Array() + }; +} +export const QuerySmartContractStateResponse = { + encode(message: QuerySmartContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QuerySmartContractStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QuerySmartContractStateResponse { + const message = createBaseQuerySmartContractStateResponse(); + message.data = object.data ?? new Uint8Array(); + return message; + } +}; +function createBaseQueryCodeRequest(): QueryCodeRequest { + return { + codeId: BigInt("0") + }; +} +export const QueryCodeRequest = { + encode(message: QueryCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.codeId.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): QueryCodeRequest { + const message = createBaseQueryCodeRequest(); + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt("0"); + return message; + } +}; +function createBaseCodeInfoResponse(): CodeInfoResponse { + return { + codeId: BigInt("0"), + creator: "", + dataHash: new Uint8Array(), + instantiatePermission: undefined + }; +} +export const CodeInfoResponse = { + encode(message: CodeInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.codeId.toString())); + } + if (message.creator !== "") { + writer.uint32(18).string(message.creator); + } + if (message.dataHash.length !== 0) { + writer.uint32(26).bytes(message.dataHash); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): CodeInfoResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.creator = reader.string(); + break; + case 3: + message.dataHash = reader.bytes(); + break; + case 6: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + 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(), + instantiatePermission: isSet(object.instantiatePermission) ? AccessConfig.fromJSON(object.instantiatePermission) : undefined + }; + }, + 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())); + message.instantiatePermission !== undefined && (obj.instantiatePermission = message.instantiatePermission ? AccessConfig.toJSON(message.instantiatePermission) : undefined); + return obj; + }, + fromPartial(object: Partial): 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(); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + return message; + } +}; +function createBaseQueryCodeResponse(): QueryCodeResponse { + return { + codeInfo: undefined, + data: new Uint8Array() + }; +} +export const QueryCodeResponse = { + encode(message: QueryCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryCodeResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryCodesRequest(): QueryCodesRequest { + return { + pagination: undefined + }; +} +export const QueryCodesRequest = { + encode(message: QueryCodesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryCodesRequest { + const message = createBaseQueryCodesRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryCodesResponse(): QueryCodesResponse { + return { + codeInfos: [], + pagination: undefined + }; +} +export const QueryCodesResponse = { + encode(message: QueryCodesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryCodesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest { + return { + pagination: undefined + }; +} +export const QueryPinnedCodesRequest = { + encode(message: QueryPinnedCodesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPinnedCodesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryPinnedCodesRequest { + const message = createBaseQueryPinnedCodesRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse { + return { + codeIds: [], + pagination: undefined + }; +} +export const QueryPinnedCodesResponse = { + encode(message: QueryPinnedCodesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + writer.uint32(10).fork(); + for (const v of message.codeIds) { + writer.uint64(Long.fromString(v.toString())); + } + writer.ldelim(); + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPinnedCodesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(BigInt(reader.uint64().toString())); + } + } else { + message.codeIds.push(BigInt(reader.uint64().toString())); + } + 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: Partial): 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; + } +}; +function createBaseQueryParamsRequest(): QueryParamsRequest { + return {}; +} +export const QueryParamsRequest = { + encode(_: QueryParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): QueryParamsRequest { + const message = createBaseQueryParamsRequest(); + return message; + } +}; +function createBaseQueryParamsResponse(): QueryParamsResponse { + return { + params: undefined + }; +} +export const QueryParamsResponse = { + encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryParamsResponse { + const message = createBaseQueryParamsResponse(); + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + return message; + } +}; +function createBaseQueryContractsByCreatorRequest(): QueryContractsByCreatorRequest { + return { + creatorAddress: "", + pagination: undefined + }; +} +export const QueryContractsByCreatorRequest = { + encode(message: QueryContractsByCreatorRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.creatorAddress !== "") { + writer.uint32(10).string(message.creatorAddress); + } + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCreatorRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryContractsByCreatorRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creatorAddress = reader.string(); + break; + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryContractsByCreatorRequest { + return { + creatorAddress: isSet(object.creatorAddress) ? String(object.creatorAddress) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined + }; + }, + toJSON(message: QueryContractsByCreatorRequest): unknown { + const obj: any = {}; + message.creatorAddress !== undefined && (obj.creatorAddress = message.creatorAddress); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + return obj; + }, + fromPartial(object: Partial): QueryContractsByCreatorRequest { + const message = createBaseQueryContractsByCreatorRequest(); + message.creatorAddress = object.creatorAddress ?? ""; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryContractsByCreatorResponse(): QueryContractsByCreatorResponse { + return { + contractAddresses: [], + pagination: undefined + }; +} +export const QueryContractsByCreatorResponse = { + encode(message: QueryContractsByCreatorResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.contractAddresses) { + writer.uint32(10).string(v!); + } + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryContractsByCreatorResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryContractsByCreatorResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contractAddresses.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): QueryContractsByCreatorResponse { + return { + contractAddresses: Array.isArray(object?.contractAddresses) ? object.contractAddresses.map((e: any) => String(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined + }; + }, + toJSON(message: QueryContractsByCreatorResponse): unknown { + const obj: any = {}; + if (message.contractAddresses) { + obj.contractAddresses = message.contractAddresses.map(e => e); + } else { + obj.contractAddresses = []; + } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); + return obj; + }, + fromPartial(object: Partial): QueryContractsByCreatorResponse { + const message = createBaseQueryContractsByCreatorResponse(); + message.contractAddresses = object.contractAddresses?.map(e => e) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.amino.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.amino.ts new file mode 100644 index 000000000..4abf099ba --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.amino.ts @@ -0,0 +1,598 @@ +import { accessTypeFromJSON } from "./types"; +import { AminoMsg } from "@cosmjs/amino"; +import { toBase64, fromBase64, fromUtf8, toUtf8 } from "@cosmjs/encoding"; +import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract } from "./tx"; +export interface MsgStoreCodeAminoType extends AminoMsg { + type: "wasm/MsgStoreCode"; + value: { + sender: string; + wasm_byte_code: string; + instantiate_permission: { + permission: number; + address: string; + addresses: string[]; + }; + }; +} +export interface MsgInstantiateContractAminoType extends AminoMsg { + type: "wasm/MsgInstantiateContract"; + value: { + sender: string; + admin: string; + code_id: string; + label: string; + msg: Uint8Array; + funds: { + denom: string; + amount: string; + }[]; + }; +} +export interface MsgInstantiateContract2AminoType extends AminoMsg { + type: "wasm/MsgInstantiateContract2"; + value: { + sender: string; + admin: string; + code_id: string; + label: string; + msg: Uint8Array; + funds: { + denom: string; + amount: string; + }[]; + salt: Uint8Array; + fix_msg: boolean; + }; +} +export interface MsgExecuteContractAminoType extends AminoMsg { + type: "wasm/MsgExecuteContract"; + value: { + sender: string; + contract: string; + msg: Uint8Array; + funds: { + denom: string; + amount: string; + }[]; + }; +} +export interface MsgMigrateContractAminoType extends AminoMsg { + type: "wasm/MsgMigrateContract"; + value: { + sender: string; + contract: string; + code_id: string; + msg: Uint8Array; + }; +} +export interface MsgUpdateAdminAminoType extends AminoMsg { + type: "wasm/MsgUpdateAdmin"; + value: { + sender: string; + new_admin: string; + contract: string; + }; +} +export interface MsgClearAdminAminoType extends AminoMsg { + type: "wasm/MsgClearAdmin"; + value: { + sender: string; + contract: string; + }; +} +export interface MsgUpdateInstantiateConfigAminoType extends AminoMsg { + type: "wasm/MsgUpdateInstantiateConfig"; + value: { + sender: string; + code_id: string; + new_instantiate_permission: { + permission: number; + address: string; + addresses: string[]; + }; + }; +} +export interface MsgUpdateParamsAminoType extends AminoMsg { + type: "wasm/MsgUpdateParams"; + value: { + authority: string; + params: { + code_upload_access: { + permission: number; + address: string; + addresses: string[]; + }; + instantiate_default_permission: number; + }; + }; +} +export interface MsgSudoContractAminoType extends AminoMsg { + type: "wasm/MsgSudoContract"; + value: { + authority: string; + contract: string; + msg: Uint8Array; + }; +} +export interface MsgPinCodesAminoType extends AminoMsg { + type: "wasm/MsgPinCodes"; + value: { + authority: string; + code_ids: string[]; + }; +} +export interface MsgUnpinCodesAminoType extends AminoMsg { + type: "wasm/MsgUnpinCodes"; + value: { + authority: string; + code_ids: string[]; + }; +} +export interface MsgStoreAndInstantiateContractAminoType extends AminoMsg { + type: "wasm/MsgStoreAndInstantiateContract"; + value: { + authority: string; + wasm_byte_code: string; + instantiate_permission: { + permission: number; + address: string; + addresses: string[]; + }; + unpin_code: boolean; + admin: string; + label: string; + msg: Uint8Array; + funds: { + denom: string; + amount: string; + }[]; + source: string; + builder: string; + code_hash: Uint8Array; + }; +} +export const AminoConverter = { + "/cosmwasm.wasm.v1.MsgStoreCode": { + aminoType: "wasm/MsgStoreCode", + toAmino: ({ + sender, + wasmByteCode, + instantiatePermission + }: MsgStoreCode): MsgStoreCodeAminoType["value"] => { + return { + sender, + wasm_byte_code: toBase64(wasmByteCode), + instantiate_permission: { + permission: instantiatePermission.permission, + address: instantiatePermission.address, + addresses: instantiatePermission.addresses + } + }; + }, + fromAmino: ({ + sender, + wasm_byte_code, + instantiate_permission + }: MsgStoreCodeAminoType["value"]): MsgStoreCode => { + return { + sender, + wasmByteCode: fromBase64(wasm_byte_code), + instantiatePermission: { + permission: accessTypeFromJSON(instantiate_permission.permission), + address: instantiate_permission.address, + addresses: instantiate_permission.addresses + } + }; + } + }, + "/cosmwasm.wasm.v1.MsgInstantiateContract": { + aminoType: "wasm/MsgInstantiateContract", + toAmino: ({ + sender, + admin, + codeId, + label, + msg, + funds + }: MsgInstantiateContract): MsgInstantiateContractAminoType["value"] => { + return { + sender, + admin, + code_id: codeId.toString(), + label, + msg: JSON.parse(fromUtf8(msg)), + funds: funds.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })) + }; + }, + fromAmino: ({ + sender, + admin, + code_id, + label, + msg, + funds + }: MsgInstantiateContractAminoType["value"]): MsgInstantiateContract => { + return { + sender, + admin, + codeId: BigInt(code_id), + label, + msg: toUtf8(JSON.stringify(msg)), + funds: funds.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })) + }; + } + }, + "/cosmwasm.wasm.v1.MsgInstantiateContract2": { + aminoType: "wasm/MsgInstantiateContract2", + toAmino: ({ + sender, + admin, + codeId, + label, + msg, + funds, + salt, + fixMsg + }: MsgInstantiateContract2): MsgInstantiateContract2AminoType["value"] => { + return { + sender, + admin, + code_id: codeId.toString(), + label, + msg: JSON.parse(fromUtf8(msg)), + funds: funds.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })), + salt, + fix_msg: fixMsg + }; + }, + fromAmino: ({ + sender, + admin, + code_id, + label, + msg, + funds, + salt, + fix_msg + }: MsgInstantiateContract2AminoType["value"]): MsgInstantiateContract2 => { + return { + sender, + admin, + codeId: BigInt(code_id), + label, + msg: toUtf8(JSON.stringify(msg)), + funds: funds.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })), + salt, + fixMsg: fix_msg + }; + } + }, + "/cosmwasm.wasm.v1.MsgExecuteContract": { + aminoType: "wasm/MsgExecuteContract", + toAmino: ({ + sender, + contract, + msg, + funds + }: MsgExecuteContract): MsgExecuteContractAminoType["value"] => { + return { + sender, + contract, + msg: JSON.parse(fromUtf8(msg)), + funds: funds.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })) + }; + }, + fromAmino: ({ + sender, + contract, + msg, + funds + }: MsgExecuteContractAminoType["value"]): MsgExecuteContract => { + return { + sender, + contract, + msg: toUtf8(JSON.stringify(msg)), + funds: funds.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })) + }; + } + }, + "/cosmwasm.wasm.v1.MsgMigrateContract": { + aminoType: "wasm/MsgMigrateContract", + toAmino: ({ + sender, + contract, + codeId, + msg + }: MsgMigrateContract): MsgMigrateContractAminoType["value"] => { + return { + sender, + contract, + code_id: codeId.toString(), + msg: JSON.parse(fromUtf8(msg)) + }; + }, + fromAmino: ({ + sender, + contract, + code_id, + msg + }: MsgMigrateContractAminoType["value"]): MsgMigrateContract => { + return { + sender, + contract, + codeId: BigInt(code_id), + msg: toUtf8(JSON.stringify(msg)) + }; + } + }, + "/cosmwasm.wasm.v1.MsgUpdateAdmin": { + aminoType: "wasm/MsgUpdateAdmin", + toAmino: ({ + sender, + newAdmin, + contract + }: MsgUpdateAdmin): MsgUpdateAdminAminoType["value"] => { + return { + sender, + new_admin: newAdmin, + contract + }; + }, + fromAmino: ({ + sender, + new_admin, + contract + }: MsgUpdateAdminAminoType["value"]): MsgUpdateAdmin => { + return { + sender, + newAdmin: new_admin, + contract + }; + } + }, + "/cosmwasm.wasm.v1.MsgClearAdmin": { + aminoType: "wasm/MsgClearAdmin", + toAmino: ({ + sender, + contract + }: MsgClearAdmin): MsgClearAdminAminoType["value"] => { + return { + sender, + contract + }; + }, + fromAmino: ({ + sender, + contract + }: MsgClearAdminAminoType["value"]): MsgClearAdmin => { + return { + sender, + contract + }; + } + }, + "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig": { + aminoType: "wasm/MsgUpdateInstantiateConfig", + toAmino: ({ + sender, + codeId, + newInstantiatePermission + }: MsgUpdateInstantiateConfig): MsgUpdateInstantiateConfigAminoType["value"] => { + return { + sender, + code_id: codeId.toString(), + new_instantiate_permission: { + permission: newInstantiatePermission.permission, + address: newInstantiatePermission.address, + addresses: newInstantiatePermission.addresses + } + }; + }, + fromAmino: ({ + sender, + code_id, + new_instantiate_permission + }: MsgUpdateInstantiateConfigAminoType["value"]): MsgUpdateInstantiateConfig => { + return { + sender, + codeId: BigInt(code_id), + newInstantiatePermission: { + permission: accessTypeFromJSON(new_instantiate_permission.permission), + address: new_instantiate_permission.address, + addresses: new_instantiate_permission.addresses + } + }; + } + }, + "/cosmwasm.wasm.v1.MsgUpdateParams": { + aminoType: "wasm/MsgUpdateParams", + toAmino: ({ + authority, + params + }: MsgUpdateParams): MsgUpdateParamsAminoType["value"] => { + return { + authority, + params: { + code_upload_access: { + permission: params.codeUploadAccess.permission, + address: params.codeUploadAccess.address, + addresses: params.codeUploadAccess.addresses + }, + instantiate_default_permission: params.instantiateDefaultPermission + } + }; + }, + fromAmino: ({ + authority, + params + }: MsgUpdateParamsAminoType["value"]): MsgUpdateParams => { + return { + authority, + params: { + codeUploadAccess: { + permission: accessTypeFromJSON(params.code_upload_access.permission), + address: params.code_upload_access.address, + addresses: params.code_upload_access.addresses + }, + instantiateDefaultPermission: accessTypeFromJSON(params.instantiate_default_permission) + } + }; + } + }, + "/cosmwasm.wasm.v1.MsgSudoContract": { + aminoType: "wasm/MsgSudoContract", + toAmino: ({ + authority, + contract, + msg + }: MsgSudoContract): MsgSudoContractAminoType["value"] => { + return { + authority, + contract, + msg: JSON.parse(fromUtf8(msg)) + }; + }, + fromAmino: ({ + authority, + contract, + msg + }: MsgSudoContractAminoType["value"]): MsgSudoContract => { + return { + authority, + contract, + msg: toUtf8(JSON.stringify(msg)) + }; + } + }, + "/cosmwasm.wasm.v1.MsgPinCodes": { + aminoType: "wasm/MsgPinCodes", + toAmino: ({ + authority, + codeIds + }: MsgPinCodes): MsgPinCodesAminoType["value"] => { + return { + authority, + code_ids: codeIds.map(el0 => el0.toString()) + }; + }, + fromAmino: ({ + authority, + code_ids + }: MsgPinCodesAminoType["value"]): MsgPinCodes => { + return { + authority, + codeIds: code_ids.map(el0 => BigInt(el0)) + }; + } + }, + "/cosmwasm.wasm.v1.MsgUnpinCodes": { + aminoType: "wasm/MsgUnpinCodes", + toAmino: ({ + authority, + codeIds + }: MsgUnpinCodes): MsgUnpinCodesAminoType["value"] => { + return { + authority, + code_ids: codeIds.map(el0 => el0.toString()) + }; + }, + fromAmino: ({ + authority, + code_ids + }: MsgUnpinCodesAminoType["value"]): MsgUnpinCodes => { + return { + authority, + codeIds: code_ids.map(el0 => BigInt(el0)) + }; + } + }, + "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract": { + aminoType: "wasm/MsgStoreAndInstantiateContract", + toAmino: ({ + authority, + wasmByteCode, + instantiatePermission, + unpinCode, + admin, + label, + msg, + funds, + source, + builder, + codeHash + }: MsgStoreAndInstantiateContract): MsgStoreAndInstantiateContractAminoType["value"] => { + return { + authority, + wasm_byte_code: toBase64(wasmByteCode), + instantiate_permission: { + permission: instantiatePermission.permission, + address: instantiatePermission.address, + addresses: instantiatePermission.addresses + }, + unpin_code: unpinCode, + admin, + label, + msg: JSON.parse(fromUtf8(msg)), + funds: funds.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })), + source, + builder, + code_hash: codeHash + }; + }, + fromAmino: ({ + authority, + wasm_byte_code, + instantiate_permission, + unpin_code, + admin, + label, + msg, + funds, + source, + builder, + code_hash + }: MsgStoreAndInstantiateContractAminoType["value"]): MsgStoreAndInstantiateContract => { + return { + authority, + wasmByteCode: fromBase64(wasm_byte_code), + instantiatePermission: { + permission: accessTypeFromJSON(instantiate_permission.permission), + address: instantiate_permission.address, + addresses: instantiate_permission.addresses + }, + unpinCode: unpin_code, + admin, + label, + msg: toUtf8(JSON.stringify(msg)), + funds: funds.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })), + source, + builder, + codeHash: code_hash + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.registry.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.registry.ts new file mode 100644 index 000000000..898b3ccef --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.registry.ts @@ -0,0 +1,410 @@ +import { GeneratedType, Registry } from "@cosmjs/proto-signing"; +import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgMigrateContract, MsgUpdateAdmin, MsgClearAdmin, MsgUpdateInstantiateConfig, MsgUpdateParams, MsgSudoContract, MsgPinCodes, MsgUnpinCodes, MsgStoreAndInstantiateContract } from "./tx"; +export const registry: ReadonlyArray<[string, GeneratedType]> = [["/cosmwasm.wasm.v1.MsgStoreCode", MsgStoreCode], ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], ["/cosmwasm.wasm.v1.MsgInstantiateContract2", MsgInstantiateContract2], ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], ["/cosmwasm.wasm.v1.MsgUpdateAdmin", MsgUpdateAdmin], ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin], ["/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", MsgUpdateInstantiateConfig], ["/cosmwasm.wasm.v1.MsgUpdateParams", MsgUpdateParams], ["/cosmwasm.wasm.v1.MsgSudoContract", MsgSudoContract], ["/cosmwasm.wasm.v1.MsgPinCodes", MsgPinCodes], ["/cosmwasm.wasm.v1.MsgUnpinCodes", MsgUnpinCodes], ["/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", MsgStoreAndInstantiateContract]]; +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() + }; + }, + instantiateContract2(value: MsgInstantiateContract2) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + value: MsgInstantiateContract2.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() + }; + }, + updateInstantiateConfig(value: MsgUpdateInstantiateConfig) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value: MsgUpdateInstantiateConfig.encode(value).finish() + }; + }, + updateParams(value: MsgUpdateParams) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value: MsgUpdateParams.encode(value).finish() + }; + }, + sudoContract(value: MsgSudoContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value: MsgSudoContract.encode(value).finish() + }; + }, + pinCodes(value: MsgPinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value: MsgPinCodes.encode(value).finish() + }; + }, + unpinCodes(value: MsgUnpinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value: MsgUnpinCodes.encode(value).finish() + }; + }, + storeAndInstantiateContract(value: MsgStoreAndInstantiateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + value: MsgStoreAndInstantiateContract.encode(value).finish() + }; + } + }, + withTypeUrl: { + storeCode(value: MsgStoreCode) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", + value + }; + }, + instantiateContract(value: MsgInstantiateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", + value + }; + }, + instantiateContract2(value: MsgInstantiateContract2) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + 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 + }; + }, + updateInstantiateConfig(value: MsgUpdateInstantiateConfig) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value + }; + }, + updateParams(value: MsgUpdateParams) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value + }; + }, + sudoContract(value: MsgSudoContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value + }; + }, + pinCodes(value: MsgPinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value + }; + }, + unpinCodes(value: MsgUnpinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value + }; + }, + storeAndInstantiateContract(value: MsgStoreAndInstantiateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + 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) + }; + }, + instantiateContract2(value: MsgInstantiateContract2) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + value: MsgInstantiateContract2.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) + }; + }, + updateInstantiateConfig(value: MsgUpdateInstantiateConfig) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value: MsgUpdateInstantiateConfig.toJSON(value) + }; + }, + updateParams(value: MsgUpdateParams) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value: MsgUpdateParams.toJSON(value) + }; + }, + sudoContract(value: MsgSudoContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value: MsgSudoContract.toJSON(value) + }; + }, + pinCodes(value: MsgPinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value: MsgPinCodes.toJSON(value) + }; + }, + unpinCodes(value: MsgUnpinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value: MsgUnpinCodes.toJSON(value) + }; + }, + storeAndInstantiateContract(value: MsgStoreAndInstantiateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + value: MsgStoreAndInstantiateContract.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) + }; + }, + instantiateContract2(value: any) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + value: MsgInstantiateContract2.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) + }; + }, + updateInstantiateConfig(value: any) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value: MsgUpdateInstantiateConfig.fromJSON(value) + }; + }, + updateParams(value: any) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value: MsgUpdateParams.fromJSON(value) + }; + }, + sudoContract(value: any) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value: MsgSudoContract.fromJSON(value) + }; + }, + pinCodes(value: any) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value: MsgPinCodes.fromJSON(value) + }; + }, + unpinCodes(value: any) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value: MsgUnpinCodes.fromJSON(value) + }; + }, + storeAndInstantiateContract(value: any) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + value: MsgStoreAndInstantiateContract.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) + }; + }, + instantiateContract2(value: MsgInstantiateContract2) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + value: MsgInstantiateContract2.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) + }; + }, + updateInstantiateConfig(value: MsgUpdateInstantiateConfig) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", + value: MsgUpdateInstantiateConfig.fromPartial(value) + }; + }, + updateParams(value: MsgUpdateParams) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", + value: MsgUpdateParams.fromPartial(value) + }; + }, + sudoContract(value: MsgSudoContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", + value: MsgSudoContract.fromPartial(value) + }; + }, + pinCodes(value: MsgPinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgPinCodes", + value: MsgPinCodes.fromPartial(value) + }; + }, + unpinCodes(value: MsgUnpinCodes) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", + value: MsgUnpinCodes.fromPartial(value) + }; + }, + storeAndInstantiateContract(value: MsgStoreAndInstantiateContract) { + return { + typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", + value: MsgStoreAndInstantiateContract.fromPartial(value) + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts new file mode 100644 index 000000000..4d0208641 --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.rpc.msg.ts @@ -0,0 +1,147 @@ +import { Rpc } from "../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { MsgStoreCode, MsgStoreCodeResponse, MsgInstantiateContract, MsgInstantiateContractResponse, MsgInstantiateContract2, MsgInstantiateContract2Response, MsgExecuteContract, MsgExecuteContractResponse, MsgMigrateContract, MsgMigrateContractResponse, MsgUpdateAdmin, MsgUpdateAdminResponse, MsgClearAdmin, MsgClearAdminResponse, MsgUpdateInstantiateConfig, MsgUpdateInstantiateConfigResponse, MsgUpdateParams, MsgUpdateParamsResponse, MsgSudoContract, MsgSudoContractResponse, MsgPinCodes, MsgPinCodesResponse, MsgUnpinCodes, MsgUnpinCodesResponse, MsgStoreAndInstantiateContract, MsgStoreAndInstantiateContractResponse } from "./tx"; +/** Msg defines the wasm Msg service. */ +export interface Msg { + /** StoreCode to submit Wasm code to the system */ + storeCode(request: MsgStoreCode): Promise; + /** + * InstantiateContract creates a new smart contract instance for the given + * code id. + */ + instantiateContract(request: MsgInstantiateContract): Promise; + /** + * InstantiateContract2 creates a new smart contract instance for the given + * code id with a predictable address + */ + instantiateContract2(request: MsgInstantiateContract2): 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; + /** UpdateInstantiateConfig updates instantiate config for a smart contract */ + updateInstantiateConfig(request: MsgUpdateInstantiateConfig): Promise; + /** + * UpdateParams defines a governance operation for updating the x/wasm + * module parameters. The authority is defined in the keeper. + * + * Since: 0.40 + */ + updateParams(request: MsgUpdateParams): Promise; + /** + * SudoContract defines a governance operation for calling sudo + * on a contract. The authority is defined in the keeper. + * + * Since: 0.40 + */ + sudoContract(request: MsgSudoContract): Promise; + /** + * PinCodes defines a governance operation for pinning a set of + * code ids in the wasmvm cache. The authority is defined in the keeper. + * + * Since: 0.40 + */ + pinCodes(request: MsgPinCodes): Promise; + /** + * UnpinCodes defines a governance operation for unpinning a set of + * code ids in the wasmvm cache. The authority is defined in the keeper. + * + * Since: 0.40 + */ + unpinCodes(request: MsgUnpinCodes): Promise; + /** + * StoreAndInstantiateContract defines a governance operation for storing + * and instantiating the contract. The authority is defined in the keeper. + * + * Since: 0.40 + */ + storeAndInstantiateContract(request: MsgStoreAndInstantiateContract): 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.instantiateContract2 = this.instantiateContract2.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); + this.updateInstantiateConfig = this.updateInstantiateConfig.bind(this); + this.updateParams = this.updateParams.bind(this); + this.sudoContract = this.sudoContract.bind(this); + this.pinCodes = this.pinCodes.bind(this); + this.unpinCodes = this.unpinCodes.bind(this); + this.storeAndInstantiateContract = this.storeAndInstantiateContract.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 _m0.Reader(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 _m0.Reader(data))); + } + instantiateContract2(request: MsgInstantiateContract2): Promise { + const data = MsgInstantiateContract2.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "InstantiateContract2", data); + return promise.then(data => MsgInstantiateContract2Response.decode(new _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(data))); + } + updateInstantiateConfig(request: MsgUpdateInstantiateConfig): Promise { + const data = MsgUpdateInstantiateConfig.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UpdateInstantiateConfig", data); + return promise.then(data => MsgUpdateInstantiateConfigResponse.decode(new _m0.Reader(data))); + } + updateParams(request: MsgUpdateParams): Promise { + const data = MsgUpdateParams.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UpdateParams", data); + return promise.then(data => MsgUpdateParamsResponse.decode(new _m0.Reader(data))); + } + sudoContract(request: MsgSudoContract): Promise { + const data = MsgSudoContract.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "SudoContract", data); + return promise.then(data => MsgSudoContractResponse.decode(new _m0.Reader(data))); + } + pinCodes(request: MsgPinCodes): Promise { + const data = MsgPinCodes.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "PinCodes", data); + return promise.then(data => MsgPinCodesResponse.decode(new _m0.Reader(data))); + } + unpinCodes(request: MsgUnpinCodes): Promise { + const data = MsgUnpinCodes.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "UnpinCodes", data); + return promise.then(data => MsgUnpinCodesResponse.decode(new _m0.Reader(data))); + } + storeAndInstantiateContract(request: MsgStoreAndInstantiateContract): Promise { + const data = MsgStoreAndInstantiateContract.encode(request).finish(); + const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "StoreAndInstantiateContract", data); + return promise.then(data => MsgStoreAndInstantiateContractResponse.decode(new _m0.Reader(data))); + } +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.ts new file mode 100644 index 000000000..339b2b16a --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/tx.ts @@ -0,0 +1,2049 @@ +import { AccessConfig, AccessConfigSDKType, Params, ParamsSDKType } from "./types"; +import { Coin, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; +/** MsgStoreCode submit Wasm code to the system */ +export interface MsgStoreCode { + /** Sender is the 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; +} +/** MsgStoreCode submit Wasm code to the system */ +export interface MsgStoreCodeSDKType { + sender: string; + wasm_byte_code: Uint8Array; + instantiate_permission?: AccessConfigSDKType; +} +/** MsgStoreCodeResponse returns store result data. */ +export interface MsgStoreCodeResponse { + /** CodeID is the reference to the stored WASM code */ + codeId: bigint; + /** Checksum is the sha256 hash of the stored code */ + checksum: Uint8Array; +} +/** MsgStoreCodeResponse returns store result data. */ +export interface MsgStoreCodeResponseSDKType { + code_id: bigint; + checksum: Uint8Array; +} +/** + * 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[]; +} +/** + * 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 bytes to returned from the contract */ + data: Uint8Array; +} +/** MsgInstantiateContractResponse return instantiation result data */ +export interface MsgInstantiateContractResponseSDKType { + address: string; + data: Uint8Array; +} +/** + * MsgInstantiateContract2 create a new smart contract instance for the given + * code id with a predicable address. + */ +export interface MsgInstantiateContract2 { + /** 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[]; + /** Salt is an arbitrary value provided by the sender. Size can be 1 to 64. */ + salt: Uint8Array; + /** + * FixMsg include the msg value into the hash for the predictable address. + * Default is false + */ + fixMsg: boolean; +} +/** + * MsgInstantiateContract2 create a new smart contract instance for the given + * code id with a predicable address. + */ +export interface MsgInstantiateContract2SDKType { + sender: string; + admin: string; + code_id: bigint; + label: string; + msg: Uint8Array; + funds: CoinSDKType[]; + salt: Uint8Array; + fix_msg: boolean; +} +/** MsgInstantiateContract2Response return instantiation result data */ +export interface MsgInstantiateContract2Response { + /** Address is the bech32 address of the new contract instance. */ + address: string; + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +/** MsgInstantiateContract2Response return instantiation result data */ +export interface MsgInstantiateContract2ResponseSDKType { + 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[]; +} +/** 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 bytes to returned from the contract */ + data: Uint8Array; +} +/** 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; +} +/** 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; +} +/** 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; +} +/** 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 {} +/** MsgUpdateAdminResponse returns empty data */ +export interface MsgUpdateAdminResponseSDKType {} +/** MsgClearAdmin removes any admin stored for a smart contract */ +export interface MsgClearAdmin { + /** Sender is the actor that signed the messages */ + sender: string; + /** Contract is the address of the smart contract */ + contract: string; +} +/** MsgClearAdmin removes any admin stored for a smart contract */ +export interface MsgClearAdminSDKType { + sender: string; + contract: string; +} +/** MsgClearAdminResponse returns empty data */ +export interface MsgClearAdminResponse {} +/** MsgClearAdminResponse returns empty data */ +export interface MsgClearAdminResponseSDKType {} +/** MsgUpdateInstantiateConfig updates instantiate config for a smart contract */ +export interface MsgUpdateInstantiateConfig { + /** Sender is the that actor that signed the messages */ + sender: string; + /** CodeID references the stored WASM code */ + codeId: bigint; + /** NewInstantiatePermission is the new access control */ + newInstantiatePermission?: AccessConfig; +} +/** MsgUpdateInstantiateConfig updates instantiate config for a smart contract */ +export interface MsgUpdateInstantiateConfigSDKType { + sender: string; + code_id: bigint; + new_instantiate_permission?: AccessConfigSDKType; +} +/** MsgUpdateInstantiateConfigResponse returns empty data */ +export interface MsgUpdateInstantiateConfigResponse {} +/** MsgUpdateInstantiateConfigResponse returns empty data */ +export interface MsgUpdateInstantiateConfigResponseSDKType {} +/** + * MsgUpdateParams is the MsgUpdateParams request type. + * + * Since: 0.40 + */ +export interface MsgUpdateParams { + /** Authority is the address of the governance account. */ + authority: string; + /** + * params defines the x/wasm parameters to update. + * + * NOTE: All parameters must be supplied. + */ + params?: Params; +} +/** + * MsgUpdateParams is the MsgUpdateParams request type. + * + * Since: 0.40 + */ +export interface MsgUpdateParamsSDKType { + authority: string; + params?: ParamsSDKType; +} +/** + * MsgUpdateParamsResponse defines the response structure for executing a + * MsgUpdateParams message. + * + * Since: 0.40 + */ +export interface MsgUpdateParamsResponse {} +/** + * MsgUpdateParamsResponse defines the response structure for executing a + * MsgUpdateParams message. + * + * Since: 0.40 + */ +export interface MsgUpdateParamsResponseSDKType {} +/** + * MsgSudoContract is the MsgSudoContract request type. + * + * Since: 0.40 + */ +export interface MsgSudoContract { + /** Authority is the address of the governance account. */ + authority: 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; +} +/** + * MsgSudoContract is the MsgSudoContract request type. + * + * Since: 0.40 + */ +export interface MsgSudoContractSDKType { + authority: string; + contract: string; + msg: Uint8Array; +} +/** + * MsgSudoContractResponse defines the response structure for executing a + * MsgSudoContract message. + * + * Since: 0.40 + */ +export interface MsgSudoContractResponse { + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +/** + * MsgSudoContractResponse defines the response structure for executing a + * MsgSudoContract message. + * + * Since: 0.40 + */ +export interface MsgSudoContractResponseSDKType { + data: Uint8Array; +} +/** + * MsgPinCodes is the MsgPinCodes request type. + * + * Since: 0.40 + */ +export interface MsgPinCodes { + /** Authority is the address of the governance account. */ + authority: string; + /** CodeIDs references the new WASM codes */ + codeIds: bigint[]; +} +/** + * MsgPinCodes is the MsgPinCodes request type. + * + * Since: 0.40 + */ +export interface MsgPinCodesSDKType { + authority: string; + code_ids: bigint[]; +} +/** + * MsgPinCodesResponse defines the response structure for executing a + * MsgPinCodes message. + * + * Since: 0.40 + */ +export interface MsgPinCodesResponse {} +/** + * MsgPinCodesResponse defines the response structure for executing a + * MsgPinCodes message. + * + * Since: 0.40 + */ +export interface MsgPinCodesResponseSDKType {} +/** + * MsgUnpinCodes is the MsgUnpinCodes request type. + * + * Since: 0.40 + */ +export interface MsgUnpinCodes { + /** Authority is the address of the governance account. */ + authority: string; + /** CodeIDs references the WASM codes */ + codeIds: bigint[]; +} +/** + * MsgUnpinCodes is the MsgUnpinCodes request type. + * + * Since: 0.40 + */ +export interface MsgUnpinCodesSDKType { + authority: string; + code_ids: bigint[]; +} +/** + * MsgUnpinCodesResponse defines the response structure for executing a + * MsgUnpinCodes message. + * + * Since: 0.40 + */ +export interface MsgUnpinCodesResponse {} +/** + * MsgUnpinCodesResponse defines the response structure for executing a + * MsgUnpinCodes message. + * + * Since: 0.40 + */ +export interface MsgUnpinCodesResponseSDKType {} +/** + * MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract + * request type. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContract { + /** Authority is the address of the governance account. */ + authority: string; + /** WASMByteCode can be raw or gzip compressed */ + wasmByteCode: Uint8Array; + /** InstantiatePermission to apply on contract creation, optional */ + instantiatePermission?: AccessConfig; + /** + * UnpinCode code on upload, optional. As default the uploaded contract is + * pinned to cache. + */ + unpinCode: boolean; + /** Admin is an optional address that can execute migrations */ + admin: 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 from the authority account to the contract + * on instantiation + */ + funds: Coin[]; + /** Source is the URL where the code is hosted */ + source: string; + /** + * Builder is the docker image used to build the code deterministically, used + * for smart contract verification + */ + builder: string; + /** + * CodeHash is the SHA256 sum of the code outputted by builder, used for smart + * contract verification + */ + codeHash: Uint8Array; +} +/** + * MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract + * request type. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContractSDKType { + authority: string; + wasm_byte_code: Uint8Array; + instantiate_permission?: AccessConfigSDKType; + unpin_code: boolean; + admin: string; + label: string; + msg: Uint8Array; + funds: CoinSDKType[]; + source: string; + builder: string; + code_hash: Uint8Array; +} +/** + * MsgStoreAndInstantiateContractResponse defines the response structure + * for executing a MsgStoreAndInstantiateContract message. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContractResponse { + /** Address is the bech32 address of the new contract instance. */ + address: string; + /** Data contains bytes to returned from the contract */ + data: Uint8Array; +} +/** + * MsgStoreAndInstantiateContractResponse defines the response structure + * for executing a MsgStoreAndInstantiateContract message. + * + * Since: 0.40 + */ +export interface MsgStoreAndInstantiateContractResponseSDKType { + address: string; + data: Uint8Array; +} +function createBaseMsgStoreCode(): MsgStoreCode { + return { + sender: "", + wasmByteCode: new Uint8Array(), + instantiatePermission: undefined + }; +} +export const MsgStoreCode = { + encode(message: MsgStoreCode, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgStoreCode { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { + return { + codeId: BigInt("0"), + checksum: new Uint8Array() + }; +} +export const MsgStoreCodeResponse = { + encode(message: MsgStoreCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.codeId.toString())); + } + if (message.checksum.length !== 0) { + writer.uint32(18).bytes(message.checksum); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStoreCodeResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.checksum = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgStoreCodeResponse { + return { + codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt("0"), + checksum: isSet(object.checksum) ? bytesFromBase64(object.checksum) : new Uint8Array() + }; + }, + toJSON(message: MsgStoreCodeResponse): unknown { + const obj: any = {}; + message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt("0")).toString()); + message.checksum !== undefined && (obj.checksum = base64FromBytes(message.checksum !== undefined ? message.checksum : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): MsgStoreCodeResponse { + const message = createBaseMsgStoreCodeResponse(); + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt("0"); + message.checksum = object.checksum ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgInstantiateContract(): MsgInstantiateContract { + return { + sender: "", + admin: "", + codeId: BigInt("0"), + label: "", + msg: new Uint8Array(), + funds: [] + }; +} +export const MsgInstantiateContract = { + encode(message: MsgInstantiateContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.codeId.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): MsgInstantiateContract { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { + return { + address: "", + data: new Uint8Array() + }; +} +export const MsgInstantiateContractResponse = { + encode(message: MsgInstantiateContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + if (message.data.length !== 0) { + writer.uint32(18).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgInstantiateContractResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MsgInstantiateContractResponse { + const message = createBaseMsgInstantiateContractResponse(); + message.address = object.address ?? ""; + message.data = object.data ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgInstantiateContract2(): MsgInstantiateContract2 { + return { + sender: "", + admin: "", + codeId: BigInt("0"), + label: "", + msg: new Uint8Array(), + funds: [], + salt: new Uint8Array(), + fixMsg: false + }; +} +export const MsgInstantiateContract2 = { + encode(message: MsgInstantiateContract2, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.codeId.toString())); + } + 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(); + } + if (message.salt.length !== 0) { + writer.uint32(58).bytes(message.salt); + } + if (message.fixMsg === true) { + writer.uint32(64).bool(message.fixMsg); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgInstantiateContract2 { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgInstantiateContract2(); + 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 = BigInt(reader.uint64().toString()); + 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; + case 7: + message.salt = reader.bytes(); + break; + case 8: + message.fixMsg = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgInstantiateContract2 { + 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)) : [], + salt: isSet(object.salt) ? bytesFromBase64(object.salt) : new Uint8Array(), + fixMsg: isSet(object.fixMsg) ? Boolean(object.fixMsg) : false + }; + }, + toJSON(message: MsgInstantiateContract2): 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 = []; + } + message.salt !== undefined && (obj.salt = base64FromBytes(message.salt !== undefined ? message.salt : new Uint8Array())); + message.fixMsg !== undefined && (obj.fixMsg = message.fixMsg); + return obj; + }, + fromPartial(object: Partial): MsgInstantiateContract2 { + const message = createBaseMsgInstantiateContract2(); + 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)) || []; + message.salt = object.salt ?? new Uint8Array(); + message.fixMsg = object.fixMsg ?? false; + return message; + } +}; +function createBaseMsgInstantiateContract2Response(): MsgInstantiateContract2Response { + return { + address: "", + data: new Uint8Array() + }; +} +export const MsgInstantiateContract2Response = { + encode(message: MsgInstantiateContract2Response, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + if (message.data.length !== 0) { + writer.uint32(18).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgInstantiateContract2Response { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgInstantiateContract2Response(); + 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): MsgInstantiateContract2Response { + return { + address: isSet(object.address) ? String(object.address) : "", + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() + }; + }, + toJSON(message: MsgInstantiateContract2Response): 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: Partial): MsgInstantiateContract2Response { + const message = createBaseMsgInstantiateContract2Response(); + message.address = object.address ?? ""; + message.data = object.data ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgExecuteContract(): MsgExecuteContract { + return { + sender: "", + contract: "", + msg: new Uint8Array(), + funds: [] + }; +} +export const MsgExecuteContract = { + encode(message: MsgExecuteContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgExecuteContract { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { + return { + data: new Uint8Array() + }; +} +export const MsgExecuteContractResponse = { + encode(message: MsgExecuteContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecuteContractResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MsgExecuteContractResponse { + const message = createBaseMsgExecuteContractResponse(); + message.data = object.data ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgMigrateContract(): MsgMigrateContract { + return { + sender: "", + contract: "", + codeId: BigInt("0"), + msg: new Uint8Array() + }; +} +export const MsgMigrateContract = { + encode(message: MsgMigrateContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.codeId.toString())); + } + if (message.msg.length !== 0) { + writer.uint32(34).bytes(message.msg); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgMigrateContract { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { + return { + data: new Uint8Array() + }; +} +export const MsgMigrateContractResponse = { + encode(message: MsgMigrateContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgMigrateContractResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MsgMigrateContractResponse { + const message = createBaseMsgMigrateContractResponse(); + message.data = object.data ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { + return { + sender: "", + newAdmin: "", + contract: "" + }; +} +export const MsgUpdateAdmin = { + encode(message: MsgUpdateAdmin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgUpdateAdmin { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MsgUpdateAdmin { + const message = createBaseMsgUpdateAdmin(); + message.sender = object.sender ?? ""; + message.newAdmin = object.newAdmin ?? ""; + message.contract = object.contract ?? ""; + return message; + } +}; +function createBaseMsgUpdateAdminResponse(): MsgUpdateAdminResponse { + return {}; +} +export const MsgUpdateAdminResponse = { + encode(_: MsgUpdateAdminResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateAdminResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgUpdateAdminResponse { + const message = createBaseMsgUpdateAdminResponse(); + return message; + } +}; +function createBaseMsgClearAdmin(): MsgClearAdmin { + return { + sender: "", + contract: "" + }; +} +export const MsgClearAdmin = { + encode(message: MsgClearAdmin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.contract !== "") { + writer.uint32(26).string(message.contract); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgClearAdmin { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MsgClearAdmin { + const message = createBaseMsgClearAdmin(); + message.sender = object.sender ?? ""; + message.contract = object.contract ?? ""; + return message; + } +}; +function createBaseMsgClearAdminResponse(): MsgClearAdminResponse { + return {}; +} +export const MsgClearAdminResponse = { + encode(_: MsgClearAdminResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgClearAdminResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgClearAdminResponse { + const message = createBaseMsgClearAdminResponse(); + return message; + } +}; +function createBaseMsgUpdateInstantiateConfig(): MsgUpdateInstantiateConfig { + return { + sender: "", + codeId: BigInt("0"), + newInstantiatePermission: undefined + }; +} +export const MsgUpdateInstantiateConfig = { + encode(message: MsgUpdateInstantiateConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.codeId.toString())); + } + if (message.newInstantiatePermission !== undefined) { + AccessConfig.encode(message.newInstantiatePermission, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateInstantiateConfig { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateInstantiateConfig(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.codeId = BigInt(reader.uint64().toString()); + break; + case 3: + message.newInstantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgUpdateInstantiateConfig { + return { + sender: isSet(object.sender) ? String(object.sender) : "", + codeId: isSet(object.codeId) ? BigInt(object.codeId.toString()) : BigInt("0"), + newInstantiatePermission: isSet(object.newInstantiatePermission) ? AccessConfig.fromJSON(object.newInstantiatePermission) : undefined + }; + }, + toJSON(message: MsgUpdateInstantiateConfig): unknown { + const obj: any = {}; + message.sender !== undefined && (obj.sender = message.sender); + message.codeId !== undefined && (obj.codeId = (message.codeId || BigInt("0")).toString()); + message.newInstantiatePermission !== undefined && (obj.newInstantiatePermission = message.newInstantiatePermission ? AccessConfig.toJSON(message.newInstantiatePermission) : undefined); + return obj; + }, + fromPartial(object: Partial): MsgUpdateInstantiateConfig { + const message = createBaseMsgUpdateInstantiateConfig(); + message.sender = object.sender ?? ""; + message.codeId = object.codeId !== undefined && object.codeId !== null ? BigInt(object.codeId.toString()) : BigInt("0"); + message.newInstantiatePermission = object.newInstantiatePermission !== undefined && object.newInstantiatePermission !== null ? AccessConfig.fromPartial(object.newInstantiatePermission) : undefined; + return message; + } +}; +function createBaseMsgUpdateInstantiateConfigResponse(): MsgUpdateInstantiateConfigResponse { + return {}; +} +export const MsgUpdateInstantiateConfigResponse = { + encode(_: MsgUpdateInstantiateConfigResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateInstantiateConfigResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateInstantiateConfigResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): MsgUpdateInstantiateConfigResponse { + return {}; + }, + toJSON(_: MsgUpdateInstantiateConfigResponse): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): MsgUpdateInstantiateConfigResponse { + const message = createBaseMsgUpdateInstantiateConfigResponse(); + return message; + } +}; +function createBaseMsgUpdateParams(): MsgUpdateParams { + return { + authority: "", + params: undefined + }; +} +export const MsgUpdateParams = { + encode(message: MsgUpdateParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParams { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateParams(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + case 2: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgUpdateParams { + return { + authority: isSet(object.authority) ? String(object.authority) : "", + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined + }; + }, + toJSON(message: MsgUpdateParams): unknown { + const obj: any = {}; + message.authority !== undefined && (obj.authority = message.authority); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); + return obj; + }, + fromPartial(object: Partial): MsgUpdateParams { + const message = createBaseMsgUpdateParams(); + message.authority = object.authority ?? ""; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + return message; + } +}; +function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { + return {}; +} +export const MsgUpdateParamsResponse = { + encode(_: MsgUpdateParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateParamsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): MsgUpdateParamsResponse { + return {}; + }, + toJSON(_: MsgUpdateParamsResponse): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): MsgUpdateParamsResponse { + const message = createBaseMsgUpdateParamsResponse(); + return message; + } +}; +function createBaseMsgSudoContract(): MsgSudoContract { + return { + authority: "", + contract: "", + msg: new Uint8Array() + }; +} +export const MsgSudoContract = { + encode(message: MsgSudoContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + if (message.contract !== "") { + writer.uint32(18).string(message.contract); + } + if (message.msg.length !== 0) { + writer.uint32(26).bytes(message.msg); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSudoContract { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgSudoContract(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + case 2: + message.contract = reader.string(); + break; + case 3: + message.msg = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgSudoContract { + return { + authority: isSet(object.authority) ? String(object.authority) : "", + contract: isSet(object.contract) ? String(object.contract) : "", + msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array() + }; + }, + toJSON(message: MsgSudoContract): unknown { + const obj: any = {}; + message.authority !== undefined && (obj.authority = message.authority); + message.contract !== undefined && (obj.contract = message.contract); + message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): MsgSudoContract { + const message = createBaseMsgSudoContract(); + message.authority = object.authority ?? ""; + message.contract = object.contract ?? ""; + message.msg = object.msg ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgSudoContractResponse(): MsgSudoContractResponse { + return { + data: new Uint8Array() + }; +} +export const MsgSudoContractResponse = { + encode(message: MsgSudoContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSudoContractResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgSudoContractResponse(); + 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): MsgSudoContractResponse { + return { + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() + }; + }, + toJSON(message: MsgSudoContractResponse): unknown { + const obj: any = {}; + message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): MsgSudoContractResponse { + const message = createBaseMsgSudoContractResponse(); + message.data = object.data ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgPinCodes(): MsgPinCodes { + return { + authority: "", + codeIds: [] + }; +} +export const MsgPinCodes = { + encode(message: MsgPinCodes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + writer.uint32(18).fork(); + for (const v of message.codeIds) { + writer.uint64(Long.fromString(v.toString())); + } + writer.ldelim(); + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPinCodes { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgPinCodes(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.codeIds.push(BigInt(reader.uint64().toString())); + } + } else { + message.codeIds.push(BigInt(reader.uint64().toString())); + } + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgPinCodes { + return { + authority: isSet(object.authority) ? String(object.authority) : "", + codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => BigInt(e.toString())) : [] + }; + }, + toJSON(message: MsgPinCodes): unknown { + const obj: any = {}; + message.authority !== undefined && (obj.authority = message.authority); + if (message.codeIds) { + obj.codeIds = message.codeIds.map(e => (e || BigInt("0")).toString()); + } else { + obj.codeIds = []; + } + return obj; + }, + fromPartial(object: Partial): MsgPinCodes { + const message = createBaseMsgPinCodes(); + message.authority = object.authority ?? ""; + message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; + return message; + } +}; +function createBaseMsgPinCodesResponse(): MsgPinCodesResponse { + return {}; +} +export const MsgPinCodesResponse = { + encode(_: MsgPinCodesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPinCodesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgPinCodesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): MsgPinCodesResponse { + return {}; + }, + toJSON(_: MsgPinCodesResponse): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): MsgPinCodesResponse { + const message = createBaseMsgPinCodesResponse(); + return message; + } +}; +function createBaseMsgUnpinCodes(): MsgUnpinCodes { + return { + authority: "", + codeIds: [] + }; +} +export const MsgUnpinCodes = { + encode(message: MsgUnpinCodes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + writer.uint32(18).fork(); + for (const v of message.codeIds) { + writer.uint64(Long.fromString(v.toString())); + } + writer.ldelim(); + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUnpinCodes { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUnpinCodes(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.codeIds.push(BigInt(reader.uint64().toString())); + } + } else { + message.codeIds.push(BigInt(reader.uint64().toString())); + } + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgUnpinCodes { + return { + authority: isSet(object.authority) ? String(object.authority) : "", + codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => BigInt(e.toString())) : [] + }; + }, + toJSON(message: MsgUnpinCodes): unknown { + const obj: any = {}; + message.authority !== undefined && (obj.authority = message.authority); + if (message.codeIds) { + obj.codeIds = message.codeIds.map(e => (e || BigInt("0")).toString()); + } else { + obj.codeIds = []; + } + return obj; + }, + fromPartial(object: Partial): MsgUnpinCodes { + const message = createBaseMsgUnpinCodes(); + message.authority = object.authority ?? ""; + message.codeIds = object.codeIds?.map(e => BigInt(e.toString())) || []; + return message; + } +}; +function createBaseMsgUnpinCodesResponse(): MsgUnpinCodesResponse { + return {}; +} +export const MsgUnpinCodesResponse = { + encode(_: MsgUnpinCodesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUnpinCodesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUnpinCodesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): MsgUnpinCodesResponse { + return {}; + }, + toJSON(_: MsgUnpinCodesResponse): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): MsgUnpinCodesResponse { + const message = createBaseMsgUnpinCodesResponse(); + return message; + } +}; +function createBaseMsgStoreAndInstantiateContract(): MsgStoreAndInstantiateContract { + return { + authority: "", + wasmByteCode: new Uint8Array(), + instantiatePermission: undefined, + unpinCode: false, + admin: "", + label: "", + msg: new Uint8Array(), + funds: [], + source: "", + builder: "", + codeHash: new Uint8Array() + }; +} +export const MsgStoreAndInstantiateContract = { + encode(message: MsgStoreAndInstantiateContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + if (message.wasmByteCode.length !== 0) { + writer.uint32(26).bytes(message.wasmByteCode); + } + if (message.instantiatePermission !== undefined) { + AccessConfig.encode(message.instantiatePermission, writer.uint32(34).fork()).ldelim(); + } + if (message.unpinCode === true) { + writer.uint32(40).bool(message.unpinCode); + } + if (message.admin !== "") { + writer.uint32(50).string(message.admin); + } + if (message.label !== "") { + writer.uint32(58).string(message.label); + } + if (message.msg.length !== 0) { + writer.uint32(66).bytes(message.msg); + } + for (const v of message.funds) { + Coin.encode(v!, writer.uint32(74).fork()).ldelim(); + } + if (message.source !== "") { + writer.uint32(82).string(message.source); + } + if (message.builder !== "") { + writer.uint32(90).string(message.builder); + } + if (message.codeHash.length !== 0) { + writer.uint32(98).bytes(message.codeHash); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStoreAndInstantiateContract { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgStoreAndInstantiateContract(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + case 3: + message.wasmByteCode = reader.bytes(); + break; + case 4: + message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); + break; + case 5: + message.unpinCode = reader.bool(); + break; + case 6: + message.admin = reader.string(); + break; + case 7: + message.label = reader.string(); + break; + case 8: + message.msg = reader.bytes(); + break; + case 9: + message.funds.push(Coin.decode(reader, reader.uint32())); + break; + case 10: + message.source = reader.string(); + break; + case 11: + message.builder = reader.string(); + break; + case 12: + message.codeHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgStoreAndInstantiateContract { + return { + authority: isSet(object.authority) ? String(object.authority) : "", + wasmByteCode: isSet(object.wasmByteCode) ? bytesFromBase64(object.wasmByteCode) : new Uint8Array(), + instantiatePermission: isSet(object.instantiatePermission) ? AccessConfig.fromJSON(object.instantiatePermission) : undefined, + unpinCode: isSet(object.unpinCode) ? Boolean(object.unpinCode) : false, + admin: isSet(object.admin) ? String(object.admin) : "", + 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)) : [], + source: isSet(object.source) ? String(object.source) : "", + builder: isSet(object.builder) ? String(object.builder) : "", + codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array() + }; + }, + toJSON(message: MsgStoreAndInstantiateContract): unknown { + const obj: any = {}; + message.authority !== undefined && (obj.authority = message.authority); + 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); + message.unpinCode !== undefined && (obj.unpinCode = message.unpinCode); + message.admin !== undefined && (obj.admin = message.admin); + 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 = []; + } + message.source !== undefined && (obj.source = message.source); + message.builder !== undefined && (obj.builder = message.builder); + message.codeHash !== undefined && (obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): MsgStoreAndInstantiateContract { + const message = createBaseMsgStoreAndInstantiateContract(); + message.authority = object.authority ?? ""; + message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); + message.instantiatePermission = object.instantiatePermission !== undefined && object.instantiatePermission !== null ? AccessConfig.fromPartial(object.instantiatePermission) : undefined; + message.unpinCode = object.unpinCode ?? false; + message.admin = object.admin ?? ""; + message.label = object.label ?? ""; + message.msg = object.msg ?? new Uint8Array(); + message.funds = object.funds?.map(e => Coin.fromPartial(e)) || []; + message.source = object.source ?? ""; + message.builder = object.builder ?? ""; + message.codeHash = object.codeHash ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgStoreAndInstantiateContractResponse(): MsgStoreAndInstantiateContractResponse { + return { + address: "", + data: new Uint8Array() + }; +} +export const MsgStoreAndInstantiateContractResponse = { + encode(message: MsgStoreAndInstantiateContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + if (message.data.length !== 0) { + writer.uint32(18).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStoreAndInstantiateContractResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgStoreAndInstantiateContractResponse(); + 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): MsgStoreAndInstantiateContractResponse { + return { + address: isSet(object.address) ? String(object.address) : "", + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() + }; + }, + toJSON(message: MsgStoreAndInstantiateContractResponse): 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: Partial): MsgStoreAndInstantiateContractResponse { + const message = createBaseMsgStoreAndInstantiateContractResponse(); + message.address = object.address ?? ""; + message.data = object.data ?? new Uint8Array(); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/types.ts b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/types.ts new file mode 100644 index 000000000..36c314c1a --- /dev/null +++ b/frontend/empowerjs/src/codegen/cosmwasm/wasm/v1/types.ts @@ -0,0 +1,760 @@ +import { Any, AnySDKType } from "../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; +/** 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 a single address + * Deprecated: use AccessTypeAnyOfAddresses instead + */ + ACCESS_TYPE_ONLY_ADDRESS = 2, + /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ + ACCESS_TYPE_EVERYBODY = 3, + /** ACCESS_TYPE_ANY_OF_ADDRESSES - AccessTypeAnyOfAddresses allow any of the addresses */ + ACCESS_TYPE_ANY_OF_ADDRESSES = 4, + UNRECOGNIZED = -1, +} +export const AccessTypeSDKType = 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 4: + case "ACCESS_TYPE_ANY_OF_ADDRESSES": + return AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES; + 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.ACCESS_TYPE_ANY_OF_ADDRESSES: + return "ACCESS_TYPE_ANY_OF_ADDRESSES"; + 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 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; +} +/** AccessTypeParam */ +export interface AccessTypeParamSDKType { + value: AccessType; +} +/** AccessConfig access control type. */ +export interface AccessConfig { + permission: AccessType; + /** + * Address + * Deprecated: replaced by addresses + */ + address: string; + addresses: string[]; +} +/** AccessConfig access control type. */ +export interface AccessConfigSDKType { + permission: AccessType; + address: string; + addresses: string[]; +} +/** Params defines the set of wasm parameters. */ +export interface Params { + codeUploadAccess?: AccessConfig; + instantiateDefaultPermission: AccessType; +} +/** Params defines the set of wasm parameters. */ +export interface ParamsSDKType { + code_upload_access?: AccessConfigSDKType; + instantiate_default_permission: AccessType; +} +/** 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; +} +/** CodeInfo is data for the uploaded contract WASM code */ +export interface CodeInfoSDKType { + code_hash: Uint8Array; + creator: string; + instantiate_config?: AccessConfigSDKType; +} +/** 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. */ + created?: AbsoluteTxPosition; + ibcPortId: string; + /** + * Extension is an extension point to store custom metadata within the + * persistence model. + */ + extension?: Any; +} +/** ContractInfo stores a WASM contract instance */ +export interface ContractInfoSDKType { + code_id: bigint; + creator: string; + admin: string; + label: string; + created?: AbsoluteTxPositionSDKType; + ibc_port_id: string; + extension?: AnySDKType; +} +/** 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; + msg: Uint8Array; +} +/** ContractCodeHistoryEntry metadata to a contract. */ +export interface ContractCodeHistoryEntrySDKType { + operation: ContractCodeHistoryOperationType; + code_id: bigint; + updated?: AbsoluteTxPositionSDKType; + 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; +} +/** + * 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; +} +/** 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 = { + encode(message: AccessTypeParam, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value !== 0) { + writer.uint32(8).int32(message.value); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): AccessTypeParam { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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) : 0 + }; + }, + toJSON(message: AccessTypeParam): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = accessTypeToJSON(message.value)); + return obj; + }, + fromPartial(object: Partial): AccessTypeParam { + const message = createBaseAccessTypeParam(); + message.value = object.value ?? 0; + return message; + } +}; +function createBaseAccessConfig(): AccessConfig { + return { + permission: 0, + address: "", + addresses: [] + }; +} +export const AccessConfig = { + encode(message: AccessConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.permission !== 0) { + writer.uint32(8).int32(message.permission); + } + if (message.address !== "") { + writer.uint32(18).string(message.address); + } + for (const v of message.addresses) { + writer.uint32(26).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): AccessConfig { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; + case 3: + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): AccessConfig { + return { + permission: isSet(object.permission) ? accessTypeFromJSON(object.permission) : 0, + address: isSet(object.address) ? String(object.address) : "", + addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => String(e)) : [] + }; + }, + toJSON(message: AccessConfig): unknown { + const obj: any = {}; + message.permission !== undefined && (obj.permission = accessTypeToJSON(message.permission)); + message.address !== undefined && (obj.address = message.address); + if (message.addresses) { + obj.addresses = message.addresses.map(e => e); + } else { + obj.addresses = []; + } + return obj; + }, + fromPartial(object: Partial): AccessConfig { + const message = createBaseAccessConfig(); + message.permission = object.permission ?? 0; + message.address = object.address ?? ""; + message.addresses = object.addresses?.map(e => e) || []; + return message; + } +}; +function createBaseParams(): Params { + return { + codeUploadAccess: undefined, + instantiateDefaultPermission: 0 + }; +} +export const Params = { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.codeUploadAccess !== undefined) { + AccessConfig.encode(message.codeUploadAccess, writer.uint32(10).fork()).ldelim(); + } + if (message.instantiateDefaultPermission !== 0) { + writer.uint32(16).int32(message.instantiateDefaultPermission); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Params { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; + 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) : 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)); + return obj; + }, + fromPartial(object: Partial): Params { + const message = createBaseParams(); + message.codeUploadAccess = object.codeUploadAccess !== undefined && object.codeUploadAccess !== null ? AccessConfig.fromPartial(object.codeUploadAccess) : undefined; + message.instantiateDefaultPermission = object.instantiateDefaultPermission ?? 0; + return message; + } +}; +function createBaseCodeInfo(): CodeInfo { + return { + codeHash: new Uint8Array(), + creator: "", + instantiateConfig: undefined + }; +} +export const CodeInfo = { + encode(message: CodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): CodeInfo { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseContractInfo(): ContractInfo { + return { + codeId: BigInt("0"), + creator: "", + admin: "", + label: "", + created: undefined, + ibcPortId: "", + extension: undefined + }; +} +export const ContractInfo = { + encode(message: ContractInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.codeId !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.codeId.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): ContractInfo { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry { + return { + operation: 0, + codeId: BigInt("0"), + updated: undefined, + msg: new Uint8Array() + }; +} +export const ContractCodeHistoryEntry = { + encode(message: ContractCodeHistoryEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.operation !== 0) { + writer.uint32(8).int32(message.operation); + } + if (message.codeId !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.codeId.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): ContractCodeHistoryEntry { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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) : 0, + 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: Partial): 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; + } +}; +function createBaseAbsoluteTxPosition(): AbsoluteTxPosition { + return { + blockHeight: BigInt("0"), + txIndex: BigInt("0") + }; +} +export const AbsoluteTxPosition = { + encode(message: AbsoluteTxPosition, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.blockHeight !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.blockHeight.toString())); + } + if (message.txIndex !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.txIndex.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): AbsoluteTxPosition { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.txIndex = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseModel(): Model { + return { + key: new Uint8Array(), + value: new Uint8Array() + }; +} +export const Model = { + encode(message: Model, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): Model { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): Model { + const message = createBaseModel(); + message.key = object.key ?? new Uint8Array(); + message.value = object.value ?? new Uint8Array(); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/empowerchain/bundle.ts b/frontend/empowerjs/src/codegen/empowerchain/bundle.ts index 81ddd3a55..7b40c9a20 100644 --- a/frontend/empowerjs/src/codegen/empowerchain/bundle.ts +++ b/frontend/empowerjs/src/codegen/empowerchain/bundle.ts @@ -1,70 +1,70 @@ -import * as _127 from "./certificates/events"; -import * as _128 from "./certificates/genesis"; -import * as _129 from "./certificates/query"; -import * as _130 from "./certificates/tx"; -import * as _131 from "./certificates/types"; -import * as _132 from "./plasticcredit/authz"; -import * as _133 from "./plasticcredit/events"; -import * as _134 from "./plasticcredit/genesis"; -import * as _135 from "./plasticcredit/query"; -import * as _136 from "./plasticcredit/tx"; -import * as _137 from "./plasticcredit/types"; -import * as _138 from "./proofofexistence/events"; -import * as _139 from "./proofofexistence/genesis"; -import * as _140 from "./proofofexistence/query"; -import * as _141 from "./proofofexistence/tx"; -import * as _142 from "./proofofexistence/types"; -import * as _235 from "./certificates/tx.amino"; -import * as _236 from "./plasticcredit/tx.amino"; -import * as _237 from "./proofofexistence/tx.amino"; -import * as _238 from "./certificates/tx.registry"; -import * as _239 from "./plasticcredit/tx.registry"; -import * as _240 from "./proofofexistence/tx.registry"; -import * as _241 from "./certificates/query.rpc.Query"; -import * as _242 from "./plasticcredit/query.rpc.Query"; -import * as _243 from "./proofofexistence/query.rpc.Query"; -import * as _244 from "./certificates/tx.rpc.msg"; -import * as _245 from "./plasticcredit/tx.rpc.msg"; -import * as _246 from "./proofofexistence/tx.rpc.msg"; -import * as _249 from "./rpc.query"; -import * as _250 from "./rpc.tx"; +import * as _135 from "./certificates/events"; +import * as _136 from "./certificates/genesis"; +import * as _137 from "./certificates/query"; +import * as _138 from "./certificates/tx"; +import * as _139 from "./certificates/types"; +import * as _140 from "./plasticcredit/authz"; +import * as _141 from "./plasticcredit/events"; +import * as _142 from "./plasticcredit/genesis"; +import * as _143 from "./plasticcredit/query"; +import * as _144 from "./plasticcredit/tx"; +import * as _145 from "./plasticcredit/types"; +import * as _146 from "./proofofexistence/events"; +import * as _147 from "./proofofexistence/genesis"; +import * as _148 from "./proofofexistence/query"; +import * as _149 from "./proofofexistence/tx"; +import * as _150 from "./proofofexistence/types"; +import * as _285 from "./certificates/tx.amino"; +import * as _286 from "./plasticcredit/tx.amino"; +import * as _287 from "./proofofexistence/tx.amino"; +import * as _288 from "./certificates/tx.registry"; +import * as _289 from "./plasticcredit/tx.registry"; +import * as _290 from "./proofofexistence/tx.registry"; +import * as _291 from "./certificates/query.rpc.Query"; +import * as _292 from "./plasticcredit/query.rpc.Query"; +import * as _293 from "./proofofexistence/query.rpc.Query"; +import * as _294 from "./certificates/tx.rpc.msg"; +import * as _295 from "./plasticcredit/tx.rpc.msg"; +import * as _296 from "./proofofexistence/tx.rpc.msg"; +import * as _326 from "./rpc.query"; +import * as _327 from "./rpc.tx"; export namespace empowerchain { export const certificates = { - ..._127, - ..._128, - ..._129, - ..._130, - ..._131, - ..._235, - ..._238, - ..._241, - ..._244 - }; - export const plasticcredit = { - ..._132, - ..._133, - ..._134, ..._135, ..._136, ..._137, - ..._236, - ..._239, - ..._242, - ..._245 - }; - export const proofofexistence = { ..._138, ..._139, + ..._285, + ..._288, + ..._291, + ..._294 + }; + export const plasticcredit = { ..._140, ..._141, ..._142, - ..._237, - ..._240, - ..._243, - ..._246 + ..._143, + ..._144, + ..._145, + ..._286, + ..._289, + ..._292, + ..._295 + }; + export const proofofexistence = { + ..._146, + ..._147, + ..._148, + ..._149, + ..._150, + ..._287, + ..._290, + ..._293, + ..._296 }; export const ClientFactory = { - ..._249, - ..._250 + ..._326, + ..._327 }; } \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/gogoproto/bundle.ts b/frontend/empowerjs/src/codegen/gogoproto/bundle.ts index 87441f836..46f8287a0 100644 --- a/frontend/empowerjs/src/codegen/gogoproto/bundle.ts +++ b/frontend/empowerjs/src/codegen/gogoproto/bundle.ts @@ -1,4 +1,4 @@ -import * as _143 from "./gogo"; +import * as _151 from "./gogo"; export const gogoproto = { - ..._143 + ..._151 }; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/google/bundle.ts b/frontend/empowerjs/src/codegen/google/bundle.ts index 1e6acfc3d..cb4ffe307 100644 --- a/frontend/empowerjs/src/codegen/google/bundle.ts +++ b/frontend/empowerjs/src/codegen/google/bundle.ts @@ -1,20 +1,20 @@ -import * as _144 from "./api/annotations"; -import * as _145 from "./api/http"; -import * as _146 from "./protobuf/any"; -import * as _147 from "./protobuf/descriptor"; -import * as _148 from "./protobuf/duration"; -import * as _149 from "./protobuf/empty"; -import * as _150 from "./protobuf/timestamp"; +import * as _152 from "./api/annotations"; +import * as _153 from "./api/http"; +import * as _154 from "./protobuf/any"; +import * as _155 from "./protobuf/descriptor"; +import * as _156 from "./protobuf/duration"; +import * as _157 from "./protobuf/empty"; +import * as _158 from "./protobuf/timestamp"; export namespace google { export const api = { - ..._144, - ..._145 + ..._152, + ..._153 }; export const protobuf = { - ..._146, - ..._147, - ..._148, - ..._149, - ..._150 + ..._154, + ..._155, + ..._156, + ..._157, + ..._158 }; } \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/ack.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/ack.ts new file mode 100644 index 000000000..499ba42fd --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/ack.ts @@ -0,0 +1,82 @@ +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +/** IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware */ +export interface IncentivizedAcknowledgement { + /** the underlying app acknowledgement bytes */ + appAcknowledgement: Uint8Array; + /** the relayer address which submits the recv packet message */ + forwardRelayerAddress: string; + /** success flag of the base application callback */ + underlyingAppSuccess: boolean; +} +/** IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware */ +export interface IncentivizedAcknowledgementSDKType { + app_acknowledgement: Uint8Array; + forward_relayer_address: string; + underlying_app_success: boolean; +} +function createBaseIncentivizedAcknowledgement(): IncentivizedAcknowledgement { + return { + appAcknowledgement: new Uint8Array(), + forwardRelayerAddress: "", + underlyingAppSuccess: false + }; +} +export const IncentivizedAcknowledgement = { + encode(message: IncentivizedAcknowledgement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.appAcknowledgement.length !== 0) { + writer.uint32(10).bytes(message.appAcknowledgement); + } + if (message.forwardRelayerAddress !== "") { + writer.uint32(18).string(message.forwardRelayerAddress); + } + if (message.underlyingAppSuccess === true) { + writer.uint32(24).bool(message.underlyingAppSuccess); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): IncentivizedAcknowledgement { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIncentivizedAcknowledgement(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.appAcknowledgement = reader.bytes(); + break; + case 2: + message.forwardRelayerAddress = reader.string(); + break; + case 3: + message.underlyingAppSuccess = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): IncentivizedAcknowledgement { + return { + appAcknowledgement: isSet(object.appAcknowledgement) ? bytesFromBase64(object.appAcknowledgement) : new Uint8Array(), + forwardRelayerAddress: isSet(object.forwardRelayerAddress) ? String(object.forwardRelayerAddress) : "", + underlyingAppSuccess: isSet(object.underlyingAppSuccess) ? Boolean(object.underlyingAppSuccess) : false + }; + }, + toJSON(message: IncentivizedAcknowledgement): unknown { + const obj: any = {}; + message.appAcknowledgement !== undefined && (obj.appAcknowledgement = base64FromBytes(message.appAcknowledgement !== undefined ? message.appAcknowledgement : new Uint8Array())); + message.forwardRelayerAddress !== undefined && (obj.forwardRelayerAddress = message.forwardRelayerAddress); + message.underlyingAppSuccess !== undefined && (obj.underlyingAppSuccess = message.underlyingAppSuccess); + return obj; + }, + fromPartial(object: Partial): IncentivizedAcknowledgement { + const message = createBaseIncentivizedAcknowledgement(); + message.appAcknowledgement = object.appAcknowledgement ?? new Uint8Array(); + message.forwardRelayerAddress = object.forwardRelayerAddress ?? ""; + message.underlyingAppSuccess = object.underlyingAppSuccess ?? false; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/fee.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/fee.ts new file mode 100644 index 000000000..148321cb5 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/fee.ts @@ -0,0 +1,309 @@ +import { Coin, CoinSDKType } from "../../../../cosmos/base/v1beta1/coin"; +import { PacketId, PacketIdSDKType } from "../../../core/channel/v1/channel"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** Fee defines the ICS29 receive, acknowledgement and timeout fees */ +export interface Fee { + /** the packet receive fee */ + recvFee: Coin[]; + /** the packet acknowledgement fee */ + ackFee: Coin[]; + /** the packet timeout fee */ + timeoutFee: Coin[]; +} +/** Fee defines the ICS29 receive, acknowledgement and timeout fees */ +export interface FeeSDKType { + recv_fee: CoinSDKType[]; + ack_fee: CoinSDKType[]; + timeout_fee: CoinSDKType[]; +} +/** PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers */ +export interface PacketFee { + /** fee encapsulates the recv, ack and timeout fees associated with an IBC packet */ + fee?: Fee; + /** the refund address for unspent fees */ + refundAddress: string; + /** optional list of relayers permitted to receive fees */ + relayers: string[]; +} +/** PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers */ +export interface PacketFeeSDKType { + fee?: FeeSDKType; + refund_address: string; + relayers: string[]; +} +/** PacketFees contains a list of type PacketFee */ +export interface PacketFees { + /** list of packet fees */ + packetFees: PacketFee[]; +} +/** PacketFees contains a list of type PacketFee */ +export interface PacketFeesSDKType { + packet_fees: PacketFeeSDKType[]; +} +/** IdentifiedPacketFees contains a list of type PacketFee and associated PacketId */ +export interface IdentifiedPacketFees { + /** unique packet identifier comprised of the channel ID, port ID and sequence */ + packetId?: PacketId; + /** list of packet fees */ + packetFees: PacketFee[]; +} +/** IdentifiedPacketFees contains a list of type PacketFee and associated PacketId */ +export interface IdentifiedPacketFeesSDKType { + packet_id?: PacketIdSDKType; + packet_fees: PacketFeeSDKType[]; +} +function createBaseFee(): Fee { + return { + recvFee: [], + ackFee: [], + timeoutFee: [] + }; +} +export const Fee = { + encode(message: Fee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.recvFee) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.ackFee) { + Coin.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.timeoutFee) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Fee { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.recvFee.push(Coin.decode(reader, reader.uint32())); + break; + case 2: + message.ackFee.push(Coin.decode(reader, reader.uint32())); + break; + case 3: + message.timeoutFee.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): Fee { + return { + recvFee: Array.isArray(object?.recvFee) ? object.recvFee.map((e: any) => Coin.fromJSON(e)) : [], + ackFee: Array.isArray(object?.ackFee) ? object.ackFee.map((e: any) => Coin.fromJSON(e)) : [], + timeoutFee: Array.isArray(object?.timeoutFee) ? object.timeoutFee.map((e: any) => Coin.fromJSON(e)) : [] + }; + }, + toJSON(message: Fee): unknown { + const obj: any = {}; + if (message.recvFee) { + obj.recvFee = message.recvFee.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.recvFee = []; + } + if (message.ackFee) { + obj.ackFee = message.ackFee.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.ackFee = []; + } + if (message.timeoutFee) { + obj.timeoutFee = message.timeoutFee.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.timeoutFee = []; + } + return obj; + }, + fromPartial(object: Partial): Fee { + const message = createBaseFee(); + message.recvFee = object.recvFee?.map(e => Coin.fromPartial(e)) || []; + message.ackFee = object.ackFee?.map(e => Coin.fromPartial(e)) || []; + message.timeoutFee = object.timeoutFee?.map(e => Coin.fromPartial(e)) || []; + return message; + } +}; +function createBasePacketFee(): PacketFee { + return { + fee: undefined, + refundAddress: "", + relayers: [] + }; +} +export const PacketFee = { + encode(message: PacketFee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.fee !== undefined) { + Fee.encode(message.fee, writer.uint32(10).fork()).ldelim(); + } + if (message.refundAddress !== "") { + writer.uint32(18).string(message.refundAddress); + } + for (const v of message.relayers) { + writer.uint32(26).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): PacketFee { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePacketFee(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fee = Fee.decode(reader, reader.uint32()); + break; + case 2: + message.refundAddress = reader.string(); + break; + case 3: + message.relayers.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): PacketFee { + return { + fee: isSet(object.fee) ? Fee.fromJSON(object.fee) : undefined, + refundAddress: isSet(object.refundAddress) ? String(object.refundAddress) : "", + relayers: Array.isArray(object?.relayers) ? object.relayers.map((e: any) => String(e)) : [] + }; + }, + toJSON(message: PacketFee): unknown { + const obj: any = {}; + message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined); + message.refundAddress !== undefined && (obj.refundAddress = message.refundAddress); + if (message.relayers) { + obj.relayers = message.relayers.map(e => e); + } else { + obj.relayers = []; + } + return obj; + }, + fromPartial(object: Partial): PacketFee { + const message = createBasePacketFee(); + message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined; + message.refundAddress = object.refundAddress ?? ""; + message.relayers = object.relayers?.map(e => e) || []; + return message; + } +}; +function createBasePacketFees(): PacketFees { + return { + packetFees: [] + }; +} +export const PacketFees = { + encode(message: PacketFees, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.packetFees) { + PacketFee.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): PacketFees { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePacketFees(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packetFees.push(PacketFee.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): PacketFees { + return { + packetFees: Array.isArray(object?.packetFees) ? object.packetFees.map((e: any) => PacketFee.fromJSON(e)) : [] + }; + }, + toJSON(message: PacketFees): unknown { + const obj: any = {}; + if (message.packetFees) { + obj.packetFees = message.packetFees.map(e => e ? PacketFee.toJSON(e) : undefined); + } else { + obj.packetFees = []; + } + return obj; + }, + fromPartial(object: Partial): PacketFees { + const message = createBasePacketFees(); + message.packetFees = object.packetFees?.map(e => PacketFee.fromPartial(e)) || []; + return message; + } +}; +function createBaseIdentifiedPacketFees(): IdentifiedPacketFees { + return { + packetId: undefined, + packetFees: [] + }; +} +export const IdentifiedPacketFees = { + encode(message: IdentifiedPacketFees, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.packetId !== undefined) { + PacketId.encode(message.packetId, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.packetFees) { + PacketFee.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): IdentifiedPacketFees { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIdentifiedPacketFees(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packetId = PacketId.decode(reader, reader.uint32()); + break; + case 2: + message.packetFees.push(PacketFee.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): IdentifiedPacketFees { + return { + packetId: isSet(object.packetId) ? PacketId.fromJSON(object.packetId) : undefined, + packetFees: Array.isArray(object?.packetFees) ? object.packetFees.map((e: any) => PacketFee.fromJSON(e)) : [] + }; + }, + toJSON(message: IdentifiedPacketFees): unknown { + const obj: any = {}; + message.packetId !== undefined && (obj.packetId = message.packetId ? PacketId.toJSON(message.packetId) : undefined); + if (message.packetFees) { + obj.packetFees = message.packetFees.map(e => e ? PacketFee.toJSON(e) : undefined); + } else { + obj.packetFees = []; + } + return obj; + }, + fromPartial(object: Partial): IdentifiedPacketFees { + const message = createBaseIdentifiedPacketFees(); + message.packetId = object.packetId !== undefined && object.packetId !== null ? PacketId.fromPartial(object.packetId) : undefined; + message.packetFees = object.packetFees?.map(e => PacketFee.fromPartial(e)) || []; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/genesis.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/genesis.ts new file mode 100644 index 000000000..50dc3168b --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/genesis.ts @@ -0,0 +1,430 @@ +import { IdentifiedPacketFees, IdentifiedPacketFeesSDKType } from "./fee"; +import { PacketId, PacketIdSDKType } from "../../../core/channel/v1/channel"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** GenesisState defines the ICS29 fee middleware genesis state */ +export interface GenesisState { + /** list of identified packet fees */ + identifiedFees: IdentifiedPacketFees[]; + /** list of fee enabled channels */ + feeEnabledChannels: FeeEnabledChannel[]; + /** list of registered payees */ + registeredPayees: RegisteredPayee[]; + /** list of registered counterparty payees */ + registeredCounterpartyPayees: RegisteredCounterpartyPayee[]; + /** list of forward relayer addresses */ + forwardRelayers: ForwardRelayerAddress[]; +} +/** GenesisState defines the ICS29 fee middleware genesis state */ +export interface GenesisStateSDKType { + identified_fees: IdentifiedPacketFeesSDKType[]; + fee_enabled_channels: FeeEnabledChannelSDKType[]; + registered_payees: RegisteredPayeeSDKType[]; + registered_counterparty_payees: RegisteredCounterpartyPayeeSDKType[]; + forward_relayers: ForwardRelayerAddressSDKType[]; +} +/** FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel */ +export interface FeeEnabledChannel { + /** unique port identifier */ + portId: string; + /** unique channel identifier */ + channelId: string; +} +/** FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel */ +export interface FeeEnabledChannelSDKType { + port_id: string; + channel_id: string; +} +/** RegisteredPayee contains the relayer address and payee address for a specific channel */ +export interface RegisteredPayee { + /** unique channel identifier */ + channelId: string; + /** the relayer address */ + relayer: string; + /** the payee address */ + payee: string; +} +/** RegisteredPayee contains the relayer address and payee address for a specific channel */ +export interface RegisteredPayeeSDKType { + channel_id: string; + relayer: string; + payee: string; +} +/** + * RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used + * for recv fee distribution) + */ +export interface RegisteredCounterpartyPayee { + /** unique channel identifier */ + channelId: string; + /** the relayer address */ + relayer: string; + /** the counterparty payee address */ + counterpartyPayee: string; +} +/** + * RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used + * for recv fee distribution) + */ +export interface RegisteredCounterpartyPayeeSDKType { + channel_id: string; + relayer: string; + counterparty_payee: string; +} +/** ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements */ +export interface ForwardRelayerAddress { + /** the forward relayer address */ + address: string; + /** unique packet identifer comprised of the channel ID, port ID and sequence */ + packetId?: PacketId; +} +/** ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements */ +export interface ForwardRelayerAddressSDKType { + address: string; + packet_id?: PacketIdSDKType; +} +function createBaseGenesisState(): GenesisState { + return { + identifiedFees: [], + feeEnabledChannels: [], + registeredPayees: [], + registeredCounterpartyPayees: [], + forwardRelayers: [] + }; +} +export const GenesisState = { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.identifiedFees) { + IdentifiedPacketFees.encode(v!, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.feeEnabledChannels) { + FeeEnabledChannel.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.registeredPayees) { + RegisteredPayee.encode(v!, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.registeredCounterpartyPayees) { + RegisteredCounterpartyPayee.encode(v!, writer.uint32(34).fork()).ldelim(); + } + for (const v of message.forwardRelayers) { + ForwardRelayerAddress.encode(v!, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.identifiedFees.push(IdentifiedPacketFees.decode(reader, reader.uint32())); + break; + case 2: + message.feeEnabledChannels.push(FeeEnabledChannel.decode(reader, reader.uint32())); + break; + case 3: + message.registeredPayees.push(RegisteredPayee.decode(reader, reader.uint32())); + break; + case 4: + message.registeredCounterpartyPayees.push(RegisteredCounterpartyPayee.decode(reader, reader.uint32())); + break; + case 5: + message.forwardRelayers.push(ForwardRelayerAddress.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): GenesisState { + return { + identifiedFees: Array.isArray(object?.identifiedFees) ? object.identifiedFees.map((e: any) => IdentifiedPacketFees.fromJSON(e)) : [], + feeEnabledChannels: Array.isArray(object?.feeEnabledChannels) ? object.feeEnabledChannels.map((e: any) => FeeEnabledChannel.fromJSON(e)) : [], + registeredPayees: Array.isArray(object?.registeredPayees) ? object.registeredPayees.map((e: any) => RegisteredPayee.fromJSON(e)) : [], + registeredCounterpartyPayees: Array.isArray(object?.registeredCounterpartyPayees) ? object.registeredCounterpartyPayees.map((e: any) => RegisteredCounterpartyPayee.fromJSON(e)) : [], + forwardRelayers: Array.isArray(object?.forwardRelayers) ? object.forwardRelayers.map((e: any) => ForwardRelayerAddress.fromJSON(e)) : [] + }; + }, + toJSON(message: GenesisState): unknown { + const obj: any = {}; + if (message.identifiedFees) { + obj.identifiedFees = message.identifiedFees.map(e => e ? IdentifiedPacketFees.toJSON(e) : undefined); + } else { + obj.identifiedFees = []; + } + if (message.feeEnabledChannels) { + obj.feeEnabledChannels = message.feeEnabledChannels.map(e => e ? FeeEnabledChannel.toJSON(e) : undefined); + } else { + obj.feeEnabledChannels = []; + } + if (message.registeredPayees) { + obj.registeredPayees = message.registeredPayees.map(e => e ? RegisteredPayee.toJSON(e) : undefined); + } else { + obj.registeredPayees = []; + } + if (message.registeredCounterpartyPayees) { + obj.registeredCounterpartyPayees = message.registeredCounterpartyPayees.map(e => e ? RegisteredCounterpartyPayee.toJSON(e) : undefined); + } else { + obj.registeredCounterpartyPayees = []; + } + if (message.forwardRelayers) { + obj.forwardRelayers = message.forwardRelayers.map(e => e ? ForwardRelayerAddress.toJSON(e) : undefined); + } else { + obj.forwardRelayers = []; + } + return obj; + }, + fromPartial(object: Partial): GenesisState { + const message = createBaseGenesisState(); + message.identifiedFees = object.identifiedFees?.map(e => IdentifiedPacketFees.fromPartial(e)) || []; + message.feeEnabledChannels = object.feeEnabledChannels?.map(e => FeeEnabledChannel.fromPartial(e)) || []; + message.registeredPayees = object.registeredPayees?.map(e => RegisteredPayee.fromPartial(e)) || []; + message.registeredCounterpartyPayees = object.registeredCounterpartyPayees?.map(e => RegisteredCounterpartyPayee.fromPartial(e)) || []; + message.forwardRelayers = object.forwardRelayers?.map(e => ForwardRelayerAddress.fromPartial(e)) || []; + return message; + } +}; +function createBaseFeeEnabledChannel(): FeeEnabledChannel { + return { + portId: "", + channelId: "" + }; +} +export const FeeEnabledChannel = { + encode(message: FeeEnabledChannel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): FeeEnabledChannel { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFeeEnabledChannel(); + 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): FeeEnabledChannel { + return { + portId: isSet(object.portId) ? String(object.portId) : "", + channelId: isSet(object.channelId) ? String(object.channelId) : "" + }; + }, + toJSON(message: FeeEnabledChannel): unknown { + const obj: any = {}; + message.portId !== undefined && (obj.portId = message.portId); + message.channelId !== undefined && (obj.channelId = message.channelId); + return obj; + }, + fromPartial(object: Partial): FeeEnabledChannel { + const message = createBaseFeeEnabledChannel(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + return message; + } +}; +function createBaseRegisteredPayee(): RegisteredPayee { + return { + channelId: "", + relayer: "", + payee: "" + }; +} +export const RegisteredPayee = { + encode(message: RegisteredPayee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channelId !== "") { + writer.uint32(10).string(message.channelId); + } + if (message.relayer !== "") { + writer.uint32(18).string(message.relayer); + } + if (message.payee !== "") { + writer.uint32(26).string(message.payee); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): RegisteredPayee { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegisteredPayee(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.channelId = reader.string(); + break; + case 2: + message.relayer = reader.string(); + break; + case 3: + message.payee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): RegisteredPayee { + return { + channelId: isSet(object.channelId) ? String(object.channelId) : "", + relayer: isSet(object.relayer) ? String(object.relayer) : "", + payee: isSet(object.payee) ? String(object.payee) : "" + }; + }, + toJSON(message: RegisteredPayee): unknown { + const obj: any = {}; + message.channelId !== undefined && (obj.channelId = message.channelId); + message.relayer !== undefined && (obj.relayer = message.relayer); + message.payee !== undefined && (obj.payee = message.payee); + return obj; + }, + fromPartial(object: Partial): RegisteredPayee { + const message = createBaseRegisteredPayee(); + message.channelId = object.channelId ?? ""; + message.relayer = object.relayer ?? ""; + message.payee = object.payee ?? ""; + return message; + } +}; +function createBaseRegisteredCounterpartyPayee(): RegisteredCounterpartyPayee { + return { + channelId: "", + relayer: "", + counterpartyPayee: "" + }; +} +export const RegisteredCounterpartyPayee = { + encode(message: RegisteredCounterpartyPayee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channelId !== "") { + writer.uint32(10).string(message.channelId); + } + if (message.relayer !== "") { + writer.uint32(18).string(message.relayer); + } + if (message.counterpartyPayee !== "") { + writer.uint32(26).string(message.counterpartyPayee); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): RegisteredCounterpartyPayee { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegisteredCounterpartyPayee(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.channelId = reader.string(); + break; + case 2: + message.relayer = reader.string(); + break; + case 3: + message.counterpartyPayee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): RegisteredCounterpartyPayee { + return { + channelId: isSet(object.channelId) ? String(object.channelId) : "", + relayer: isSet(object.relayer) ? String(object.relayer) : "", + counterpartyPayee: isSet(object.counterpartyPayee) ? String(object.counterpartyPayee) : "" + }; + }, + toJSON(message: RegisteredCounterpartyPayee): unknown { + const obj: any = {}; + message.channelId !== undefined && (obj.channelId = message.channelId); + message.relayer !== undefined && (obj.relayer = message.relayer); + message.counterpartyPayee !== undefined && (obj.counterpartyPayee = message.counterpartyPayee); + return obj; + }, + fromPartial(object: Partial): RegisteredCounterpartyPayee { + const message = createBaseRegisteredCounterpartyPayee(); + message.channelId = object.channelId ?? ""; + message.relayer = object.relayer ?? ""; + message.counterpartyPayee = object.counterpartyPayee ?? ""; + return message; + } +}; +function createBaseForwardRelayerAddress(): ForwardRelayerAddress { + return { + address: "", + packetId: undefined + }; +} +export const ForwardRelayerAddress = { + encode(message: ForwardRelayerAddress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + if (message.packetId !== undefined) { + PacketId.encode(message.packetId, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ForwardRelayerAddress { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseForwardRelayerAddress(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.packetId = PacketId.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): ForwardRelayerAddress { + return { + address: isSet(object.address) ? String(object.address) : "", + packetId: isSet(object.packetId) ? PacketId.fromJSON(object.packetId) : undefined + }; + }, + toJSON(message: ForwardRelayerAddress): unknown { + const obj: any = {}; + message.address !== undefined && (obj.address = message.address); + message.packetId !== undefined && (obj.packetId = message.packetId ? PacketId.toJSON(message.packetId) : undefined); + return obj; + }, + fromPartial(object: Partial): ForwardRelayerAddress { + const message = createBaseForwardRelayerAddress(); + message.address = object.address ?? ""; + message.packetId = object.packetId !== undefined && object.packetId !== null ? PacketId.fromPartial(object.packetId) : undefined; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/metadata.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/metadata.ts new file mode 100644 index 000000000..72cc35592 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/metadata.ts @@ -0,0 +1,75 @@ +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** + * Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring + * See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning + */ +export interface Metadata { + /** fee_version defines the ICS29 fee version */ + feeVersion: string; + /** app_version defines the underlying application version, which may or may not be a JSON encoded bytestring */ + appVersion: string; +} +/** + * Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring + * See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning + */ +export interface MetadataSDKType { + fee_version: string; + app_version: string; +} +function createBaseMetadata(): Metadata { + return { + feeVersion: "", + appVersion: "" + }; +} +export const Metadata = { + encode(message: Metadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.feeVersion !== "") { + writer.uint32(10).string(message.feeVersion); + } + if (message.appVersion !== "") { + writer.uint32(18).string(message.appVersion); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Metadata { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.feeVersion = reader.string(); + break; + case 2: + message.appVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): Metadata { + return { + feeVersion: isSet(object.feeVersion) ? String(object.feeVersion) : "", + appVersion: isSet(object.appVersion) ? String(object.appVersion) : "" + }; + }, + toJSON(message: Metadata): unknown { + const obj: any = {}; + message.feeVersion !== undefined && (obj.feeVersion = message.feeVersion); + message.appVersion !== undefined && (obj.appVersion = message.appVersion); + return obj; + }, + fromPartial(object: Partial): Metadata { + const message = createBaseMetadata(); + message.feeVersion = object.feeVersion ?? ""; + message.appVersion = object.appVersion ?? ""; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/query.rpc.Query.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/query.rpc.Query.ts new file mode 100644 index 000000000..495d22b59 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/query.rpc.Query.ts @@ -0,0 +1,129 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +import { QueryIncentivizedPacketsRequest, QueryIncentivizedPacketsResponse, QueryIncentivizedPacketRequest, QueryIncentivizedPacketResponse, QueryIncentivizedPacketsForChannelRequest, QueryIncentivizedPacketsForChannelResponse, QueryTotalRecvFeesRequest, QueryTotalRecvFeesResponse, QueryTotalAckFeesRequest, QueryTotalAckFeesResponse, QueryTotalTimeoutFeesRequest, QueryTotalTimeoutFeesResponse, QueryPayeeRequest, QueryPayeeResponse, QueryCounterpartyPayeeRequest, QueryCounterpartyPayeeResponse, QueryFeeEnabledChannelsRequest, QueryFeeEnabledChannelsResponse, QueryFeeEnabledChannelRequest, QueryFeeEnabledChannelResponse } from "./query"; +/** Query defines the ICS29 gRPC querier service. */ +export interface Query { + /** IncentivizedPackets returns all incentivized packets and their associated fees */ + incentivizedPackets(request: QueryIncentivizedPacketsRequest): Promise; + /** IncentivizedPacket returns all packet fees for a packet given its identifier */ + incentivizedPacket(request: QueryIncentivizedPacketRequest): Promise; + /** Gets all incentivized packets for a specific channel */ + incentivizedPacketsForChannel(request: QueryIncentivizedPacketsForChannelRequest): Promise; + /** TotalRecvFees returns the total receive fees for a packet given its identifier */ + totalRecvFees(request: QueryTotalRecvFeesRequest): Promise; + /** TotalAckFees returns the total acknowledgement fees for a packet given its identifier */ + totalAckFees(request: QueryTotalAckFeesRequest): Promise; + /** TotalTimeoutFees returns the total timeout fees for a packet given its identifier */ + totalTimeoutFees(request: QueryTotalTimeoutFeesRequest): Promise; + /** Payee returns the registered payee address for a specific channel given the relayer address */ + payee(request: QueryPayeeRequest): Promise; + /** CounterpartyPayee returns the registered counterparty payee for forward relaying */ + counterpartyPayee(request: QueryCounterpartyPayeeRequest): Promise; + /** FeeEnabledChannels returns a list of all fee enabled channels */ + feeEnabledChannels(request: QueryFeeEnabledChannelsRequest): Promise; + /** FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel */ + feeEnabledChannel(request: QueryFeeEnabledChannelRequest): Promise; +} +export class QueryClientImpl implements Query { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + this.incentivizedPackets = this.incentivizedPackets.bind(this); + this.incentivizedPacket = this.incentivizedPacket.bind(this); + this.incentivizedPacketsForChannel = this.incentivizedPacketsForChannel.bind(this); + this.totalRecvFees = this.totalRecvFees.bind(this); + this.totalAckFees = this.totalAckFees.bind(this); + this.totalTimeoutFees = this.totalTimeoutFees.bind(this); + this.payee = this.payee.bind(this); + this.counterpartyPayee = this.counterpartyPayee.bind(this); + this.feeEnabledChannels = this.feeEnabledChannels.bind(this); + this.feeEnabledChannel = this.feeEnabledChannel.bind(this); + } + incentivizedPackets(request: QueryIncentivizedPacketsRequest): Promise { + const data = QueryIncentivizedPacketsRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "IncentivizedPackets", data); + return promise.then(data => QueryIncentivizedPacketsResponse.decode(new _m0.Reader(data))); + } + incentivizedPacket(request: QueryIncentivizedPacketRequest): Promise { + const data = QueryIncentivizedPacketRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "IncentivizedPacket", data); + return promise.then(data => QueryIncentivizedPacketResponse.decode(new _m0.Reader(data))); + } + incentivizedPacketsForChannel(request: QueryIncentivizedPacketsForChannelRequest): Promise { + const data = QueryIncentivizedPacketsForChannelRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "IncentivizedPacketsForChannel", data); + return promise.then(data => QueryIncentivizedPacketsForChannelResponse.decode(new _m0.Reader(data))); + } + totalRecvFees(request: QueryTotalRecvFeesRequest): Promise { + const data = QueryTotalRecvFeesRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "TotalRecvFees", data); + return promise.then(data => QueryTotalRecvFeesResponse.decode(new _m0.Reader(data))); + } + totalAckFees(request: QueryTotalAckFeesRequest): Promise { + const data = QueryTotalAckFeesRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "TotalAckFees", data); + return promise.then(data => QueryTotalAckFeesResponse.decode(new _m0.Reader(data))); + } + totalTimeoutFees(request: QueryTotalTimeoutFeesRequest): Promise { + const data = QueryTotalTimeoutFeesRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "TotalTimeoutFees", data); + return promise.then(data => QueryTotalTimeoutFeesResponse.decode(new _m0.Reader(data))); + } + payee(request: QueryPayeeRequest): Promise { + const data = QueryPayeeRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "Payee", data); + return promise.then(data => QueryPayeeResponse.decode(new _m0.Reader(data))); + } + counterpartyPayee(request: QueryCounterpartyPayeeRequest): Promise { + const data = QueryCounterpartyPayeeRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "CounterpartyPayee", data); + return promise.then(data => QueryCounterpartyPayeeResponse.decode(new _m0.Reader(data))); + } + feeEnabledChannels(request: QueryFeeEnabledChannelsRequest): Promise { + const data = QueryFeeEnabledChannelsRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "FeeEnabledChannels", data); + return promise.then(data => QueryFeeEnabledChannelsResponse.decode(new _m0.Reader(data))); + } + feeEnabledChannel(request: QueryFeeEnabledChannelRequest): Promise { + const data = QueryFeeEnabledChannelRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Query", "FeeEnabledChannel", data); + return promise.then(data => QueryFeeEnabledChannelResponse.decode(new _m0.Reader(data))); + } +} +export const createRpcQueryExtension = (base: QueryClient) => { + const rpc = createProtobufRpcClient(base); + const queryService = new QueryClientImpl(rpc); + return { + incentivizedPackets(request: QueryIncentivizedPacketsRequest): Promise { + return queryService.incentivizedPackets(request); + }, + incentivizedPacket(request: QueryIncentivizedPacketRequest): Promise { + return queryService.incentivizedPacket(request); + }, + incentivizedPacketsForChannel(request: QueryIncentivizedPacketsForChannelRequest): Promise { + return queryService.incentivizedPacketsForChannel(request); + }, + totalRecvFees(request: QueryTotalRecvFeesRequest): Promise { + return queryService.totalRecvFees(request); + }, + totalAckFees(request: QueryTotalAckFeesRequest): Promise { + return queryService.totalAckFees(request); + }, + totalTimeoutFees(request: QueryTotalTimeoutFeesRequest): Promise { + return queryService.totalTimeoutFees(request); + }, + payee(request: QueryPayeeRequest): Promise { + return queryService.payee(request); + }, + counterpartyPayee(request: QueryCounterpartyPayeeRequest): Promise { + return queryService.counterpartyPayee(request); + }, + feeEnabledChannels(request: QueryFeeEnabledChannelsRequest): Promise { + return queryService.feeEnabledChannels(request); + }, + feeEnabledChannel(request: QueryFeeEnabledChannelRequest): Promise { + return queryService.feeEnabledChannel(request); + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/query.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/query.ts new file mode 100644 index 000000000..4bfbafbbb --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/query.ts @@ -0,0 +1,1232 @@ +import { PageRequest, PageRequestSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; +import { PacketId, PacketIdSDKType } from "../../../core/channel/v1/channel"; +import { IdentifiedPacketFees, IdentifiedPacketFeesSDKType } from "./fee"; +import { Coin, CoinSDKType } from "../../../../cosmos/base/v1beta1/coin"; +import { FeeEnabledChannel, FeeEnabledChannelSDKType } from "./genesis"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet } from "../../../../helpers"; +/** QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc */ +export interface QueryIncentivizedPacketsRequest { + /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; + /** block height at which to query */ + queryHeight: bigint; +} +/** QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc */ +export interface QueryIncentivizedPacketsRequestSDKType { + pagination?: PageRequestSDKType; + query_height: bigint; +} +/** QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc */ +export interface QueryIncentivizedPacketsResponse { + /** list of identified fees for incentivized packets */ + incentivizedPackets: IdentifiedPacketFees[]; +} +/** QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc */ +export interface QueryIncentivizedPacketsResponseSDKType { + incentivized_packets: IdentifiedPacketFeesSDKType[]; +} +/** QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc */ +export interface QueryIncentivizedPacketRequest { + /** unique packet identifier comprised of channel ID, port ID and sequence */ + packetId?: PacketId; + /** block height at which to query */ + queryHeight: bigint; +} +/** QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc */ +export interface QueryIncentivizedPacketRequestSDKType { + packet_id?: PacketIdSDKType; + query_height: bigint; +} +/** QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc */ +export interface QueryIncentivizedPacketResponse { + /** the identified fees for the incentivized packet */ + incentivizedPacket?: IdentifiedPacketFees; +} +/** QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc */ +export interface QueryIncentivizedPacketResponseSDKType { + incentivized_packet?: IdentifiedPacketFeesSDKType; +} +/** + * QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets + * for a specific channel + */ +export interface QueryIncentivizedPacketsForChannelRequest { + /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; + portId: string; + channelId: string; + /** Height to query at */ + queryHeight: bigint; +} +/** + * QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets + * for a specific channel + */ +export interface QueryIncentivizedPacketsForChannelRequestSDKType { + pagination?: PageRequestSDKType; + port_id: string; + channel_id: string; + query_height: bigint; +} +/** QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC */ +export interface QueryIncentivizedPacketsForChannelResponse { + /** Map of all incentivized_packets */ + incentivizedPackets: IdentifiedPacketFees[]; +} +/** QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC */ +export interface QueryIncentivizedPacketsForChannelResponseSDKType { + incentivized_packets: IdentifiedPacketFeesSDKType[]; +} +/** QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc */ +export interface QueryTotalRecvFeesRequest { + /** the packet identifier for the associated fees */ + packetId?: PacketId; +} +/** QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc */ +export interface QueryTotalRecvFeesRequestSDKType { + packet_id?: PacketIdSDKType; +} +/** QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc */ +export interface QueryTotalRecvFeesResponse { + /** the total packet receive fees */ + recvFees: Coin[]; +} +/** QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc */ +export interface QueryTotalRecvFeesResponseSDKType { + recv_fees: CoinSDKType[]; +} +/** QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc */ +export interface QueryTotalAckFeesRequest { + /** the packet identifier for the associated fees */ + packetId?: PacketId; +} +/** QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc */ +export interface QueryTotalAckFeesRequestSDKType { + packet_id?: PacketIdSDKType; +} +/** QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc */ +export interface QueryTotalAckFeesResponse { + /** the total packet acknowledgement fees */ + ackFees: Coin[]; +} +/** QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc */ +export interface QueryTotalAckFeesResponseSDKType { + ack_fees: CoinSDKType[]; +} +/** QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc */ +export interface QueryTotalTimeoutFeesRequest { + /** the packet identifier for the associated fees */ + packetId?: PacketId; +} +/** QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc */ +export interface QueryTotalTimeoutFeesRequestSDKType { + packet_id?: PacketIdSDKType; +} +/** QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc */ +export interface QueryTotalTimeoutFeesResponse { + /** the total packet timeout fees */ + timeoutFees: Coin[]; +} +/** QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc */ +export interface QueryTotalTimeoutFeesResponseSDKType { + timeout_fees: CoinSDKType[]; +} +/** QueryPayeeRequest defines the request type for the Payee rpc */ +export interface QueryPayeeRequest { + /** unique channel identifier */ + channelId: string; + /** the relayer address to which the distribution address is registered */ + relayer: string; +} +/** QueryPayeeRequest defines the request type for the Payee rpc */ +export interface QueryPayeeRequestSDKType { + channel_id: string; + relayer: string; +} +/** QueryPayeeResponse defines the response type for the Payee rpc */ +export interface QueryPayeeResponse { + /** the payee address to which packet fees are paid out */ + payeeAddress: string; +} +/** QueryPayeeResponse defines the response type for the Payee rpc */ +export interface QueryPayeeResponseSDKType { + payee_address: string; +} +/** QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc */ +export interface QueryCounterpartyPayeeRequest { + /** unique channel identifier */ + channelId: string; + /** the relayer address to which the counterparty is registered */ + relayer: string; +} +/** QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc */ +export interface QueryCounterpartyPayeeRequestSDKType { + channel_id: string; + relayer: string; +} +/** QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc */ +export interface QueryCounterpartyPayeeResponse { + /** the counterparty payee address used to compensate forward relaying */ + counterpartyPayee: string; +} +/** QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc */ +export interface QueryCounterpartyPayeeResponseSDKType { + counterparty_payee: string; +} +/** QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc */ +export interface QueryFeeEnabledChannelsRequest { + /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; + /** block height at which to query */ + queryHeight: bigint; +} +/** QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc */ +export interface QueryFeeEnabledChannelsRequestSDKType { + pagination?: PageRequestSDKType; + query_height: bigint; +} +/** QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc */ +export interface QueryFeeEnabledChannelsResponse { + /** list of fee enabled channels */ + feeEnabledChannels: FeeEnabledChannel[]; +} +/** QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc */ +export interface QueryFeeEnabledChannelsResponseSDKType { + fee_enabled_channels: FeeEnabledChannelSDKType[]; +} +/** QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc */ +export interface QueryFeeEnabledChannelRequest { + /** unique port identifier */ + portId: string; + /** unique channel identifier */ + channelId: string; +} +/** QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc */ +export interface QueryFeeEnabledChannelRequestSDKType { + port_id: string; + channel_id: string; +} +/** QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc */ +export interface QueryFeeEnabledChannelResponse { + /** boolean flag representing the fee enabled channel status */ + feeEnabled: boolean; +} +/** QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc */ +export interface QueryFeeEnabledChannelResponseSDKType { + fee_enabled: boolean; +} +function createBaseQueryIncentivizedPacketsRequest(): QueryIncentivizedPacketsRequest { + return { + pagination: undefined, + queryHeight: BigInt("0") + }; +} +export const QueryIncentivizedPacketsRequest = { + encode(message: QueryIncentivizedPacketsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + if (message.queryHeight !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.queryHeight.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryIncentivizedPacketsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryIncentivizedPacketsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + case 2: + message.queryHeight = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryIncentivizedPacketsRequest { + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + queryHeight: isSet(object.queryHeight) ? BigInt(object.queryHeight.toString()) : BigInt("0") + }; + }, + toJSON(message: QueryIncentivizedPacketsRequest): unknown { + const obj: any = {}; + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + message.queryHeight !== undefined && (obj.queryHeight = (message.queryHeight || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): QueryIncentivizedPacketsRequest { + const message = createBaseQueryIncentivizedPacketsRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + message.queryHeight = object.queryHeight !== undefined && object.queryHeight !== null ? BigInt(object.queryHeight.toString()) : BigInt("0"); + return message; + } +}; +function createBaseQueryIncentivizedPacketsResponse(): QueryIncentivizedPacketsResponse { + return { + incentivizedPackets: [] + }; +} +export const QueryIncentivizedPacketsResponse = { + encode(message: QueryIncentivizedPacketsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.incentivizedPackets) { + IdentifiedPacketFees.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryIncentivizedPacketsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryIncentivizedPacketsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.incentivizedPackets.push(IdentifiedPacketFees.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryIncentivizedPacketsResponse { + return { + incentivizedPackets: Array.isArray(object?.incentivizedPackets) ? object.incentivizedPackets.map((e: any) => IdentifiedPacketFees.fromJSON(e)) : [] + }; + }, + toJSON(message: QueryIncentivizedPacketsResponse): unknown { + const obj: any = {}; + if (message.incentivizedPackets) { + obj.incentivizedPackets = message.incentivizedPackets.map(e => e ? IdentifiedPacketFees.toJSON(e) : undefined); + } else { + obj.incentivizedPackets = []; + } + return obj; + }, + fromPartial(object: Partial): QueryIncentivizedPacketsResponse { + const message = createBaseQueryIncentivizedPacketsResponse(); + message.incentivizedPackets = object.incentivizedPackets?.map(e => IdentifiedPacketFees.fromPartial(e)) || []; + return message; + } +}; +function createBaseQueryIncentivizedPacketRequest(): QueryIncentivizedPacketRequest { + return { + packetId: undefined, + queryHeight: BigInt("0") + }; +} +export const QueryIncentivizedPacketRequest = { + encode(message: QueryIncentivizedPacketRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.packetId !== undefined) { + PacketId.encode(message.packetId, writer.uint32(10).fork()).ldelim(); + } + if (message.queryHeight !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.queryHeight.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryIncentivizedPacketRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryIncentivizedPacketRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packetId = PacketId.decode(reader, reader.uint32()); + break; + case 2: + message.queryHeight = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryIncentivizedPacketRequest { + return { + packetId: isSet(object.packetId) ? PacketId.fromJSON(object.packetId) : undefined, + queryHeight: isSet(object.queryHeight) ? BigInt(object.queryHeight.toString()) : BigInt("0") + }; + }, + toJSON(message: QueryIncentivizedPacketRequest): unknown { + const obj: any = {}; + message.packetId !== undefined && (obj.packetId = message.packetId ? PacketId.toJSON(message.packetId) : undefined); + message.queryHeight !== undefined && (obj.queryHeight = (message.queryHeight || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): QueryIncentivizedPacketRequest { + const message = createBaseQueryIncentivizedPacketRequest(); + message.packetId = object.packetId !== undefined && object.packetId !== null ? PacketId.fromPartial(object.packetId) : undefined; + message.queryHeight = object.queryHeight !== undefined && object.queryHeight !== null ? BigInt(object.queryHeight.toString()) : BigInt("0"); + return message; + } +}; +function createBaseQueryIncentivizedPacketResponse(): QueryIncentivizedPacketResponse { + return { + incentivizedPacket: undefined + }; +} +export const QueryIncentivizedPacketResponse = { + encode(message: QueryIncentivizedPacketResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.incentivizedPacket !== undefined) { + IdentifiedPacketFees.encode(message.incentivizedPacket, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryIncentivizedPacketResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryIncentivizedPacketResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.incentivizedPacket = IdentifiedPacketFees.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryIncentivizedPacketResponse { + return { + incentivizedPacket: isSet(object.incentivizedPacket) ? IdentifiedPacketFees.fromJSON(object.incentivizedPacket) : undefined + }; + }, + toJSON(message: QueryIncentivizedPacketResponse): unknown { + const obj: any = {}; + message.incentivizedPacket !== undefined && (obj.incentivizedPacket = message.incentivizedPacket ? IdentifiedPacketFees.toJSON(message.incentivizedPacket) : undefined); + return obj; + }, + fromPartial(object: Partial): QueryIncentivizedPacketResponse { + const message = createBaseQueryIncentivizedPacketResponse(); + message.incentivizedPacket = object.incentivizedPacket !== undefined && object.incentivizedPacket !== null ? IdentifiedPacketFees.fromPartial(object.incentivizedPacket) : undefined; + return message; + } +}; +function createBaseQueryIncentivizedPacketsForChannelRequest(): QueryIncentivizedPacketsForChannelRequest { + return { + pagination: undefined, + portId: "", + channelId: "", + queryHeight: BigInt("0") + }; +} +export const QueryIncentivizedPacketsForChannelRequest = { + encode(message: QueryIncentivizedPacketsForChannelRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + if (message.portId !== "") { + writer.uint32(18).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(26).string(message.channelId); + } + if (message.queryHeight !== BigInt(0)) { + writer.uint32(32).uint64(Long.fromString(message.queryHeight.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryIncentivizedPacketsForChannelRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryIncentivizedPacketsForChannelRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + case 2: + message.portId = reader.string(); + break; + case 3: + message.channelId = reader.string(); + break; + case 4: + message.queryHeight = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryIncentivizedPacketsForChannelRequest { + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + portId: isSet(object.portId) ? String(object.portId) : "", + channelId: isSet(object.channelId) ? String(object.channelId) : "", + queryHeight: isSet(object.queryHeight) ? BigInt(object.queryHeight.toString()) : BigInt("0") + }; + }, + toJSON(message: QueryIncentivizedPacketsForChannelRequest): unknown { + const obj: any = {}; + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + message.portId !== undefined && (obj.portId = message.portId); + message.channelId !== undefined && (obj.channelId = message.channelId); + message.queryHeight !== undefined && (obj.queryHeight = (message.queryHeight || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): QueryIncentivizedPacketsForChannelRequest { + const message = createBaseQueryIncentivizedPacketsForChannelRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + message.queryHeight = object.queryHeight !== undefined && object.queryHeight !== null ? BigInt(object.queryHeight.toString()) : BigInt("0"); + return message; + } +}; +function createBaseQueryIncentivizedPacketsForChannelResponse(): QueryIncentivizedPacketsForChannelResponse { + return { + incentivizedPackets: [] + }; +} +export const QueryIncentivizedPacketsForChannelResponse = { + encode(message: QueryIncentivizedPacketsForChannelResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.incentivizedPackets) { + IdentifiedPacketFees.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryIncentivizedPacketsForChannelResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryIncentivizedPacketsForChannelResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.incentivizedPackets.push(IdentifiedPacketFees.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryIncentivizedPacketsForChannelResponse { + return { + incentivizedPackets: Array.isArray(object?.incentivizedPackets) ? object.incentivizedPackets.map((e: any) => IdentifiedPacketFees.fromJSON(e)) : [] + }; + }, + toJSON(message: QueryIncentivizedPacketsForChannelResponse): unknown { + const obj: any = {}; + if (message.incentivizedPackets) { + obj.incentivizedPackets = message.incentivizedPackets.map(e => e ? IdentifiedPacketFees.toJSON(e) : undefined); + } else { + obj.incentivizedPackets = []; + } + return obj; + }, + fromPartial(object: Partial): QueryIncentivizedPacketsForChannelResponse { + const message = createBaseQueryIncentivizedPacketsForChannelResponse(); + message.incentivizedPackets = object.incentivizedPackets?.map(e => IdentifiedPacketFees.fromPartial(e)) || []; + return message; + } +}; +function createBaseQueryTotalRecvFeesRequest(): QueryTotalRecvFeesRequest { + return { + packetId: undefined + }; +} +export const QueryTotalRecvFeesRequest = { + encode(message: QueryTotalRecvFeesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.packetId !== undefined) { + PacketId.encode(message.packetId, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTotalRecvFeesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryTotalRecvFeesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packetId = PacketId.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryTotalRecvFeesRequest { + return { + packetId: isSet(object.packetId) ? PacketId.fromJSON(object.packetId) : undefined + }; + }, + toJSON(message: QueryTotalRecvFeesRequest): unknown { + const obj: any = {}; + message.packetId !== undefined && (obj.packetId = message.packetId ? PacketId.toJSON(message.packetId) : undefined); + return obj; + }, + fromPartial(object: Partial): QueryTotalRecvFeesRequest { + const message = createBaseQueryTotalRecvFeesRequest(); + message.packetId = object.packetId !== undefined && object.packetId !== null ? PacketId.fromPartial(object.packetId) : undefined; + return message; + } +}; +function createBaseQueryTotalRecvFeesResponse(): QueryTotalRecvFeesResponse { + return { + recvFees: [] + }; +} +export const QueryTotalRecvFeesResponse = { + encode(message: QueryTotalRecvFeesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.recvFees) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTotalRecvFeesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryTotalRecvFeesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.recvFees.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryTotalRecvFeesResponse { + return { + recvFees: Array.isArray(object?.recvFees) ? object.recvFees.map((e: any) => Coin.fromJSON(e)) : [] + }; + }, + toJSON(message: QueryTotalRecvFeesResponse): unknown { + const obj: any = {}; + if (message.recvFees) { + obj.recvFees = message.recvFees.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.recvFees = []; + } + return obj; + }, + fromPartial(object: Partial): QueryTotalRecvFeesResponse { + const message = createBaseQueryTotalRecvFeesResponse(); + message.recvFees = object.recvFees?.map(e => Coin.fromPartial(e)) || []; + return message; + } +}; +function createBaseQueryTotalAckFeesRequest(): QueryTotalAckFeesRequest { + return { + packetId: undefined + }; +} +export const QueryTotalAckFeesRequest = { + encode(message: QueryTotalAckFeesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.packetId !== undefined) { + PacketId.encode(message.packetId, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTotalAckFeesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryTotalAckFeesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packetId = PacketId.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryTotalAckFeesRequest { + return { + packetId: isSet(object.packetId) ? PacketId.fromJSON(object.packetId) : undefined + }; + }, + toJSON(message: QueryTotalAckFeesRequest): unknown { + const obj: any = {}; + message.packetId !== undefined && (obj.packetId = message.packetId ? PacketId.toJSON(message.packetId) : undefined); + return obj; + }, + fromPartial(object: Partial): QueryTotalAckFeesRequest { + const message = createBaseQueryTotalAckFeesRequest(); + message.packetId = object.packetId !== undefined && object.packetId !== null ? PacketId.fromPartial(object.packetId) : undefined; + return message; + } +}; +function createBaseQueryTotalAckFeesResponse(): QueryTotalAckFeesResponse { + return { + ackFees: [] + }; +} +export const QueryTotalAckFeesResponse = { + encode(message: QueryTotalAckFeesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.ackFees) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTotalAckFeesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryTotalAckFeesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ackFees.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryTotalAckFeesResponse { + return { + ackFees: Array.isArray(object?.ackFees) ? object.ackFees.map((e: any) => Coin.fromJSON(e)) : [] + }; + }, + toJSON(message: QueryTotalAckFeesResponse): unknown { + const obj: any = {}; + if (message.ackFees) { + obj.ackFees = message.ackFees.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.ackFees = []; + } + return obj; + }, + fromPartial(object: Partial): QueryTotalAckFeesResponse { + const message = createBaseQueryTotalAckFeesResponse(); + message.ackFees = object.ackFees?.map(e => Coin.fromPartial(e)) || []; + return message; + } +}; +function createBaseQueryTotalTimeoutFeesRequest(): QueryTotalTimeoutFeesRequest { + return { + packetId: undefined + }; +} +export const QueryTotalTimeoutFeesRequest = { + encode(message: QueryTotalTimeoutFeesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.packetId !== undefined) { + PacketId.encode(message.packetId, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTotalTimeoutFeesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryTotalTimeoutFeesRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packetId = PacketId.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryTotalTimeoutFeesRequest { + return { + packetId: isSet(object.packetId) ? PacketId.fromJSON(object.packetId) : undefined + }; + }, + toJSON(message: QueryTotalTimeoutFeesRequest): unknown { + const obj: any = {}; + message.packetId !== undefined && (obj.packetId = message.packetId ? PacketId.toJSON(message.packetId) : undefined); + return obj; + }, + fromPartial(object: Partial): QueryTotalTimeoutFeesRequest { + const message = createBaseQueryTotalTimeoutFeesRequest(); + message.packetId = object.packetId !== undefined && object.packetId !== null ? PacketId.fromPartial(object.packetId) : undefined; + return message; + } +}; +function createBaseQueryTotalTimeoutFeesResponse(): QueryTotalTimeoutFeesResponse { + return { + timeoutFees: [] + }; +} +export const QueryTotalTimeoutFeesResponse = { + encode(message: QueryTotalTimeoutFeesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.timeoutFees) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTotalTimeoutFeesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryTotalTimeoutFeesResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeoutFees.push(Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryTotalTimeoutFeesResponse { + return { + timeoutFees: Array.isArray(object?.timeoutFees) ? object.timeoutFees.map((e: any) => Coin.fromJSON(e)) : [] + }; + }, + toJSON(message: QueryTotalTimeoutFeesResponse): unknown { + const obj: any = {}; + if (message.timeoutFees) { + obj.timeoutFees = message.timeoutFees.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.timeoutFees = []; + } + return obj; + }, + fromPartial(object: Partial): QueryTotalTimeoutFeesResponse { + const message = createBaseQueryTotalTimeoutFeesResponse(); + message.timeoutFees = object.timeoutFees?.map(e => Coin.fromPartial(e)) || []; + return message; + } +}; +function createBaseQueryPayeeRequest(): QueryPayeeRequest { + return { + channelId: "", + relayer: "" + }; +} +export const QueryPayeeRequest = { + encode(message: QueryPayeeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channelId !== "") { + writer.uint32(10).string(message.channelId); + } + if (message.relayer !== "") { + writer.uint32(18).string(message.relayer); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPayeeRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryPayeeRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.channelId = reader.string(); + break; + case 2: + message.relayer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryPayeeRequest { + return { + channelId: isSet(object.channelId) ? String(object.channelId) : "", + relayer: isSet(object.relayer) ? String(object.relayer) : "" + }; + }, + toJSON(message: QueryPayeeRequest): unknown { + const obj: any = {}; + message.channelId !== undefined && (obj.channelId = message.channelId); + message.relayer !== undefined && (obj.relayer = message.relayer); + return obj; + }, + fromPartial(object: Partial): QueryPayeeRequest { + const message = createBaseQueryPayeeRequest(); + message.channelId = object.channelId ?? ""; + message.relayer = object.relayer ?? ""; + return message; + } +}; +function createBaseQueryPayeeResponse(): QueryPayeeResponse { + return { + payeeAddress: "" + }; +} +export const QueryPayeeResponse = { + encode(message: QueryPayeeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.payeeAddress !== "") { + writer.uint32(10).string(message.payeeAddress); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPayeeResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryPayeeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.payeeAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryPayeeResponse { + return { + payeeAddress: isSet(object.payeeAddress) ? String(object.payeeAddress) : "" + }; + }, + toJSON(message: QueryPayeeResponse): unknown { + const obj: any = {}; + message.payeeAddress !== undefined && (obj.payeeAddress = message.payeeAddress); + return obj; + }, + fromPartial(object: Partial): QueryPayeeResponse { + const message = createBaseQueryPayeeResponse(); + message.payeeAddress = object.payeeAddress ?? ""; + return message; + } +}; +function createBaseQueryCounterpartyPayeeRequest(): QueryCounterpartyPayeeRequest { + return { + channelId: "", + relayer: "" + }; +} +export const QueryCounterpartyPayeeRequest = { + encode(message: QueryCounterpartyPayeeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channelId !== "") { + writer.uint32(10).string(message.channelId); + } + if (message.relayer !== "") { + writer.uint32(18).string(message.relayer); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCounterpartyPayeeRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryCounterpartyPayeeRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.channelId = reader.string(); + break; + case 2: + message.relayer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryCounterpartyPayeeRequest { + return { + channelId: isSet(object.channelId) ? String(object.channelId) : "", + relayer: isSet(object.relayer) ? String(object.relayer) : "" + }; + }, + toJSON(message: QueryCounterpartyPayeeRequest): unknown { + const obj: any = {}; + message.channelId !== undefined && (obj.channelId = message.channelId); + message.relayer !== undefined && (obj.relayer = message.relayer); + return obj; + }, + fromPartial(object: Partial): QueryCounterpartyPayeeRequest { + const message = createBaseQueryCounterpartyPayeeRequest(); + message.channelId = object.channelId ?? ""; + message.relayer = object.relayer ?? ""; + return message; + } +}; +function createBaseQueryCounterpartyPayeeResponse(): QueryCounterpartyPayeeResponse { + return { + counterpartyPayee: "" + }; +} +export const QueryCounterpartyPayeeResponse = { + encode(message: QueryCounterpartyPayeeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.counterpartyPayee !== "") { + writer.uint32(10).string(message.counterpartyPayee); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCounterpartyPayeeResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryCounterpartyPayeeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.counterpartyPayee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryCounterpartyPayeeResponse { + return { + counterpartyPayee: isSet(object.counterpartyPayee) ? String(object.counterpartyPayee) : "" + }; + }, + toJSON(message: QueryCounterpartyPayeeResponse): unknown { + const obj: any = {}; + message.counterpartyPayee !== undefined && (obj.counterpartyPayee = message.counterpartyPayee); + return obj; + }, + fromPartial(object: Partial): QueryCounterpartyPayeeResponse { + const message = createBaseQueryCounterpartyPayeeResponse(); + message.counterpartyPayee = object.counterpartyPayee ?? ""; + return message; + } +}; +function createBaseQueryFeeEnabledChannelsRequest(): QueryFeeEnabledChannelsRequest { + return { + pagination: undefined, + queryHeight: BigInt("0") + }; +} +export const QueryFeeEnabledChannelsRequest = { + encode(message: QueryFeeEnabledChannelsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + if (message.queryHeight !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.queryHeight.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryFeeEnabledChannelsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryFeeEnabledChannelsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + case 2: + message.queryHeight = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryFeeEnabledChannelsRequest { + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + queryHeight: isSet(object.queryHeight) ? BigInt(object.queryHeight.toString()) : BigInt("0") + }; + }, + toJSON(message: QueryFeeEnabledChannelsRequest): unknown { + const obj: any = {}; + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + message.queryHeight !== undefined && (obj.queryHeight = (message.queryHeight || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): QueryFeeEnabledChannelsRequest { + const message = createBaseQueryFeeEnabledChannelsRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + message.queryHeight = object.queryHeight !== undefined && object.queryHeight !== null ? BigInt(object.queryHeight.toString()) : BigInt("0"); + return message; + } +}; +function createBaseQueryFeeEnabledChannelsResponse(): QueryFeeEnabledChannelsResponse { + return { + feeEnabledChannels: [] + }; +} +export const QueryFeeEnabledChannelsResponse = { + encode(message: QueryFeeEnabledChannelsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.feeEnabledChannels) { + FeeEnabledChannel.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryFeeEnabledChannelsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryFeeEnabledChannelsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.feeEnabledChannels.push(FeeEnabledChannel.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryFeeEnabledChannelsResponse { + return { + feeEnabledChannels: Array.isArray(object?.feeEnabledChannels) ? object.feeEnabledChannels.map((e: any) => FeeEnabledChannel.fromJSON(e)) : [] + }; + }, + toJSON(message: QueryFeeEnabledChannelsResponse): unknown { + const obj: any = {}; + if (message.feeEnabledChannels) { + obj.feeEnabledChannels = message.feeEnabledChannels.map(e => e ? FeeEnabledChannel.toJSON(e) : undefined); + } else { + obj.feeEnabledChannels = []; + } + return obj; + }, + fromPartial(object: Partial): QueryFeeEnabledChannelsResponse { + const message = createBaseQueryFeeEnabledChannelsResponse(); + message.feeEnabledChannels = object.feeEnabledChannels?.map(e => FeeEnabledChannel.fromPartial(e)) || []; + return message; + } +}; +function createBaseQueryFeeEnabledChannelRequest(): QueryFeeEnabledChannelRequest { + return { + portId: "", + channelId: "" + }; +} +export const QueryFeeEnabledChannelRequest = { + encode(message: QueryFeeEnabledChannelRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryFeeEnabledChannelRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryFeeEnabledChannelRequest(); + 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): QueryFeeEnabledChannelRequest { + return { + portId: isSet(object.portId) ? String(object.portId) : "", + channelId: isSet(object.channelId) ? String(object.channelId) : "" + }; + }, + toJSON(message: QueryFeeEnabledChannelRequest): unknown { + const obj: any = {}; + message.portId !== undefined && (obj.portId = message.portId); + message.channelId !== undefined && (obj.channelId = message.channelId); + return obj; + }, + fromPartial(object: Partial): QueryFeeEnabledChannelRequest { + const message = createBaseQueryFeeEnabledChannelRequest(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + return message; + } +}; +function createBaseQueryFeeEnabledChannelResponse(): QueryFeeEnabledChannelResponse { + return { + feeEnabled: false + }; +} +export const QueryFeeEnabledChannelResponse = { + encode(message: QueryFeeEnabledChannelResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.feeEnabled === true) { + writer.uint32(8).bool(message.feeEnabled); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryFeeEnabledChannelResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryFeeEnabledChannelResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.feeEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryFeeEnabledChannelResponse { + return { + feeEnabled: isSet(object.feeEnabled) ? Boolean(object.feeEnabled) : false + }; + }, + toJSON(message: QueryFeeEnabledChannelResponse): unknown { + const obj: any = {}; + message.feeEnabled !== undefined && (obj.feeEnabled = message.feeEnabled); + return obj; + }, + fromPartial(object: Partial): QueryFeeEnabledChannelResponse { + const message = createBaseQueryFeeEnabledChannelResponse(); + message.feeEnabled = object.feeEnabled ?? false; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.amino.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.amino.ts new file mode 100644 index 000000000..11f4ba2d7 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.amino.ts @@ -0,0 +1,253 @@ +import { AminoMsg } from "@cosmjs/amino"; +import { MsgRegisterPayee, MsgRegisterCounterpartyPayee, MsgPayPacketFee, MsgPayPacketFeeAsync } from "./tx"; +export interface MsgRegisterPayeeAminoType extends AminoMsg { + type: "cosmos-sdk/MsgRegisterPayee"; + value: { + port_id: string; + channel_id: string; + relayer: string; + payee: string; + }; +} +export interface MsgRegisterCounterpartyPayeeAminoType extends AminoMsg { + type: "cosmos-sdk/MsgRegisterCounterpartyPayee"; + value: { + port_id: string; + channel_id: string; + relayer: string; + counterparty_payee: string; + }; +} +export interface MsgPayPacketFeeAminoType extends AminoMsg { + type: "cosmos-sdk/MsgPayPacketFee"; + value: { + fee: { + recv_fee: { + denom: string; + amount: string; + }[]; + ack_fee: { + denom: string; + amount: string; + }[]; + timeout_fee: { + denom: string; + amount: string; + }[]; + }; + source_port_id: string; + source_channel_id: string; + signer: string; + relayers: string[]; + }; +} +export interface MsgPayPacketFeeAsyncAminoType extends AminoMsg { + type: "cosmos-sdk/MsgPayPacketFeeAsync"; + value: { + packet_id: { + port_id: string; + channel_id: string; + sequence: string; + }; + packet_fee: { + fee: { + recv_fee: { + denom: string; + amount: string; + }[]; + ack_fee: { + denom: string; + amount: string; + }[]; + timeout_fee: { + denom: string; + amount: string; + }[]; + }; + refund_address: string; + relayers: string[]; + }; + }; +} +export const AminoConverter = { + "/ibc.applications.fee.v1.MsgRegisterPayee": { + aminoType: "cosmos-sdk/MsgRegisterPayee", + toAmino: ({ + portId, + channelId, + relayer, + payee + }: MsgRegisterPayee): MsgRegisterPayeeAminoType["value"] => { + return { + port_id: portId, + channel_id: channelId, + relayer, + payee + }; + }, + fromAmino: ({ + port_id, + channel_id, + relayer, + payee + }: MsgRegisterPayeeAminoType["value"]): MsgRegisterPayee => { + return { + portId: port_id, + channelId: channel_id, + relayer, + payee + }; + } + }, + "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee": { + aminoType: "cosmos-sdk/MsgRegisterCounterpartyPayee", + toAmino: ({ + portId, + channelId, + relayer, + counterpartyPayee + }: MsgRegisterCounterpartyPayee): MsgRegisterCounterpartyPayeeAminoType["value"] => { + return { + port_id: portId, + channel_id: channelId, + relayer, + counterparty_payee: counterpartyPayee + }; + }, + fromAmino: ({ + port_id, + channel_id, + relayer, + counterparty_payee + }: MsgRegisterCounterpartyPayeeAminoType["value"]): MsgRegisterCounterpartyPayee => { + return { + portId: port_id, + channelId: channel_id, + relayer, + counterpartyPayee: counterparty_payee + }; + } + }, + "/ibc.applications.fee.v1.MsgPayPacketFee": { + aminoType: "cosmos-sdk/MsgPayPacketFee", + toAmino: ({ + fee, + sourcePortId, + sourceChannelId, + signer, + relayers + }: MsgPayPacketFee): MsgPayPacketFeeAminoType["value"] => { + return { + fee: { + recv_fee: fee.recvFee.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })), + ack_fee: fee.ackFee.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })), + timeout_fee: fee.timeoutFee.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })) + }, + source_port_id: sourcePortId, + source_channel_id: sourceChannelId, + signer, + relayers + }; + }, + fromAmino: ({ + fee, + source_port_id, + source_channel_id, + signer, + relayers + }: MsgPayPacketFeeAminoType["value"]): MsgPayPacketFee => { + return { + fee: { + recvFee: fee.recv_fee.map(el1 => ({ + denom: el1.denom, + amount: el1.amount + })), + ackFee: fee.ack_fee.map(el1 => ({ + denom: el1.denom, + amount: el1.amount + })), + timeoutFee: fee.timeout_fee.map(el1 => ({ + denom: el1.denom, + amount: el1.amount + })) + }, + sourcePortId: source_port_id, + sourceChannelId: source_channel_id, + signer, + relayers + }; + } + }, + "/ibc.applications.fee.v1.MsgPayPacketFeeAsync": { + aminoType: "cosmos-sdk/MsgPayPacketFeeAsync", + toAmino: ({ + packetId, + packetFee + }: MsgPayPacketFeeAsync): MsgPayPacketFeeAsyncAminoType["value"] => { + return { + packet_id: { + port_id: packetId.portId, + channel_id: packetId.channelId, + sequence: packetId.sequence.toString() + }, + packet_fee: { + fee: { + recv_fee: packetFee.fee.recvFee.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })), + ack_fee: packetFee.fee.ackFee.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })), + timeout_fee: packetFee.fee.timeoutFee.map(el0 => ({ + denom: el0.denom, + amount: el0.amount + })) + }, + refund_address: packetFee.refundAddress, + relayers: packetFee.relayers + } + }; + }, + fromAmino: ({ + packet_id, + packet_fee + }: MsgPayPacketFeeAsyncAminoType["value"]): MsgPayPacketFeeAsync => { + return { + packetId: { + portId: packet_id.port_id, + channelId: packet_id.channel_id, + sequence: BigInt(packet_id.sequence) + }, + packetFee: { + fee: { + recvFee: packet_fee.fee.recv_fee.map(el2 => ({ + denom: el2.denom, + amount: el2.amount + })), + ackFee: packet_fee.fee.ack_fee.map(el2 => ({ + denom: el2.denom, + amount: el2.amount + })), + timeoutFee: packet_fee.fee.timeout_fee.map(el2 => ({ + denom: el2.denom, + amount: el2.amount + })) + }, + refundAddress: packet_fee.refund_address, + relayers: packet_fee.relayers + } + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.registry.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.registry.ts new file mode 100644 index 000000000..6a8555b21 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.registry.ts @@ -0,0 +1,140 @@ +import { GeneratedType, Registry } from "@cosmjs/proto-signing"; +import { MsgRegisterPayee, MsgRegisterCounterpartyPayee, MsgPayPacketFee, MsgPayPacketFeeAsync } from "./tx"; +export const registry: ReadonlyArray<[string, GeneratedType]> = [["/ibc.applications.fee.v1.MsgRegisterPayee", MsgRegisterPayee], ["/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee", MsgRegisterCounterpartyPayee], ["/ibc.applications.fee.v1.MsgPayPacketFee", MsgPayPacketFee], ["/ibc.applications.fee.v1.MsgPayPacketFeeAsync", MsgPayPacketFeeAsync]]; +export const load = (protoRegistry: Registry) => { + registry.forEach(([typeUrl, mod]) => { + protoRegistry.register(typeUrl, mod); + }); +}; +export const MessageComposer = { + encoded: { + registerPayee(value: MsgRegisterPayee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee", + value: MsgRegisterPayee.encode(value).finish() + }; + }, + registerCounterpartyPayee(value: MsgRegisterCounterpartyPayee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee", + value: MsgRegisterCounterpartyPayee.encode(value).finish() + }; + }, + payPacketFee(value: MsgPayPacketFee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee", + value: MsgPayPacketFee.encode(value).finish() + }; + }, + payPacketFeeAsync(value: MsgPayPacketFeeAsync) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync", + value: MsgPayPacketFeeAsync.encode(value).finish() + }; + } + }, + withTypeUrl: { + registerPayee(value: MsgRegisterPayee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee", + value + }; + }, + registerCounterpartyPayee(value: MsgRegisterCounterpartyPayee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee", + value + }; + }, + payPacketFee(value: MsgPayPacketFee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee", + value + }; + }, + payPacketFeeAsync(value: MsgPayPacketFeeAsync) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync", + value + }; + } + }, + toJSON: { + registerPayee(value: MsgRegisterPayee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee", + value: MsgRegisterPayee.toJSON(value) + }; + }, + registerCounterpartyPayee(value: MsgRegisterCounterpartyPayee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee", + value: MsgRegisterCounterpartyPayee.toJSON(value) + }; + }, + payPacketFee(value: MsgPayPacketFee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee", + value: MsgPayPacketFee.toJSON(value) + }; + }, + payPacketFeeAsync(value: MsgPayPacketFeeAsync) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync", + value: MsgPayPacketFeeAsync.toJSON(value) + }; + } + }, + fromJSON: { + registerPayee(value: any) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee", + value: MsgRegisterPayee.fromJSON(value) + }; + }, + registerCounterpartyPayee(value: any) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee", + value: MsgRegisterCounterpartyPayee.fromJSON(value) + }; + }, + payPacketFee(value: any) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee", + value: MsgPayPacketFee.fromJSON(value) + }; + }, + payPacketFeeAsync(value: any) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync", + value: MsgPayPacketFeeAsync.fromJSON(value) + }; + } + }, + fromPartial: { + registerPayee(value: MsgRegisterPayee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee", + value: MsgRegisterPayee.fromPartial(value) + }; + }, + registerCounterpartyPayee(value: MsgRegisterCounterpartyPayee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee", + value: MsgRegisterCounterpartyPayee.fromPartial(value) + }; + }, + payPacketFee(value: MsgPayPacketFee) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee", + value: MsgPayPacketFee.fromPartial(value) + }; + }, + payPacketFeeAsync(value: MsgPayPacketFeeAsync) { + return { + typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync", + value: MsgPayPacketFeeAsync.fromPartial(value) + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.rpc.msg.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.rpc.msg.ts new file mode 100644 index 000000000..97e8d3b4c --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.rpc.msg.ts @@ -0,0 +1,66 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { MsgRegisterPayee, MsgRegisterPayeeResponse, MsgRegisterCounterpartyPayee, MsgRegisterCounterpartyPayeeResponse, MsgPayPacketFee, MsgPayPacketFeeResponse, MsgPayPacketFeeAsync, MsgPayPacketFeeAsyncResponse } from "./tx"; +/** Msg defines the ICS29 Msg service. */ +export interface Msg { + /** + * RegisterPayee defines a rpc handler method for MsgRegisterPayee + * RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + * payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on + * the source chain from which packets originate as this is where fee distribution takes place. This function may be + * called more than once by a relayer, in which case, the latest payee is always used. + */ + registerPayee(request: MsgRegisterPayee): Promise; + /** + * RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee + * RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty + * payee address before relaying. This ensures they will be properly compensated for forward relaying since + * the destination chain must include the registered counterparty payee address in the acknowledgement. This function + * may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. + */ + registerCounterpartyPayee(request: MsgRegisterCounterpartyPayee): Promise; + /** + * PayPacketFee defines a rpc handler method for MsgPayPacketFee + * PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + * incentivize the relaying of the packet at the next sequence + * NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows + * initiates the lifecycle of the incentivized packet + */ + payPacketFee(request: MsgPayPacketFee): Promise; + /** + * PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync + * PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to + * incentivize the relaying of a known packet (i.e. at a particular sequence) + */ + payPacketFeeAsync(request: MsgPayPacketFeeAsync): Promise; +} +export class MsgClientImpl implements Msg { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + this.registerPayee = this.registerPayee.bind(this); + this.registerCounterpartyPayee = this.registerCounterpartyPayee.bind(this); + this.payPacketFee = this.payPacketFee.bind(this); + this.payPacketFeeAsync = this.payPacketFeeAsync.bind(this); + } + registerPayee(request: MsgRegisterPayee): Promise { + const data = MsgRegisterPayee.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Msg", "RegisterPayee", data); + return promise.then(data => MsgRegisterPayeeResponse.decode(new _m0.Reader(data))); + } + registerCounterpartyPayee(request: MsgRegisterCounterpartyPayee): Promise { + const data = MsgRegisterCounterpartyPayee.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Msg", "RegisterCounterpartyPayee", data); + return promise.then(data => MsgRegisterCounterpartyPayeeResponse.decode(new _m0.Reader(data))); + } + payPacketFee(request: MsgPayPacketFee): Promise { + const data = MsgPayPacketFee.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Msg", "PayPacketFee", data); + return promise.then(data => MsgPayPacketFeeResponse.decode(new _m0.Reader(data))); + } + payPacketFeeAsync(request: MsgPayPacketFeeAsync): Promise { + const data = MsgPayPacketFeeAsync.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.fee.v1.Msg", "PayPacketFeeAsync", data); + return promise.then(data => MsgPayPacketFeeAsyncResponse.decode(new _m0.Reader(data))); + } +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.ts b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.ts new file mode 100644 index 000000000..0f16746dc --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/fee/v1/tx.ts @@ -0,0 +1,529 @@ +import { Fee, FeeSDKType, PacketFee, PacketFeeSDKType } from "./fee"; +import { PacketId, PacketIdSDKType } from "../../../core/channel/v1/channel"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** MsgRegisterPayee defines the request type for the RegisterPayee rpc */ +export interface MsgRegisterPayee { + /** unique port identifier */ + portId: string; + /** unique channel identifier */ + channelId: string; + /** the relayer address */ + relayer: string; + /** the payee address */ + payee: string; +} +/** MsgRegisterPayee defines the request type for the RegisterPayee rpc */ +export interface MsgRegisterPayeeSDKType { + port_id: string; + channel_id: string; + relayer: string; + payee: string; +} +/** MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc */ +export interface MsgRegisterPayeeResponse {} +/** MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc */ +export interface MsgRegisterPayeeResponseSDKType {} +/** MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc */ +export interface MsgRegisterCounterpartyPayee { + /** unique port identifier */ + portId: string; + /** unique channel identifier */ + channelId: string; + /** the relayer address */ + relayer: string; + /** the counterparty payee address */ + counterpartyPayee: string; +} +/** MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc */ +export interface MsgRegisterCounterpartyPayeeSDKType { + port_id: string; + channel_id: string; + relayer: string; + counterparty_payee: string; +} +/** MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc */ +export interface MsgRegisterCounterpartyPayeeResponse {} +/** MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc */ +export interface MsgRegisterCounterpartyPayeeResponseSDKType {} +/** + * MsgPayPacketFee defines the request type for the PayPacketFee rpc + * This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be + * paid for + */ +export interface MsgPayPacketFee { + /** fee encapsulates the recv, ack and timeout fees associated with an IBC packet */ + fee?: Fee; + /** the source port unique identifier */ + sourcePortId: string; + /** the source channel unique identifer */ + sourceChannelId: string; + /** account address to refund fee if necessary */ + signer: string; + /** optional list of relayers permitted to the receive packet fees */ + relayers: string[]; +} +/** + * MsgPayPacketFee defines the request type for the PayPacketFee rpc + * This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be + * paid for + */ +export interface MsgPayPacketFeeSDKType { + fee?: FeeSDKType; + source_port_id: string; + source_channel_id: string; + signer: string; + relayers: string[]; +} +/** MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc */ +export interface MsgPayPacketFeeResponse {} +/** MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc */ +export interface MsgPayPacketFeeResponseSDKType {} +/** + * MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc + * This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) + */ +export interface MsgPayPacketFeeAsync { + /** unique packet identifier comprised of the channel ID, port ID and sequence */ + packetId?: PacketId; + /** the packet fee associated with a particular IBC packet */ + packetFee?: PacketFee; +} +/** + * MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc + * This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) + */ +export interface MsgPayPacketFeeAsyncSDKType { + packet_id?: PacketIdSDKType; + packet_fee?: PacketFeeSDKType; +} +/** MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc */ +export interface MsgPayPacketFeeAsyncResponse {} +/** MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc */ +export interface MsgPayPacketFeeAsyncResponseSDKType {} +function createBaseMsgRegisterPayee(): MsgRegisterPayee { + return { + portId: "", + channelId: "", + relayer: "", + payee: "" + }; +} +export const MsgRegisterPayee = { + encode(message: MsgRegisterPayee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + if (message.relayer !== "") { + writer.uint32(26).string(message.relayer); + } + if (message.payee !== "") { + writer.uint32(34).string(message.payee); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterPayee { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRegisterPayee(); + 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.relayer = reader.string(); + break; + case 4: + message.payee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgRegisterPayee { + return { + portId: isSet(object.portId) ? String(object.portId) : "", + channelId: isSet(object.channelId) ? String(object.channelId) : "", + relayer: isSet(object.relayer) ? String(object.relayer) : "", + payee: isSet(object.payee) ? String(object.payee) : "" + }; + }, + toJSON(message: MsgRegisterPayee): unknown { + const obj: any = {}; + message.portId !== undefined && (obj.portId = message.portId); + message.channelId !== undefined && (obj.channelId = message.channelId); + message.relayer !== undefined && (obj.relayer = message.relayer); + message.payee !== undefined && (obj.payee = message.payee); + return obj; + }, + fromPartial(object: Partial): MsgRegisterPayee { + const message = createBaseMsgRegisterPayee(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + message.relayer = object.relayer ?? ""; + message.payee = object.payee ?? ""; + return message; + } +}; +function createBaseMsgRegisterPayeeResponse(): MsgRegisterPayeeResponse { + return {}; +} +export const MsgRegisterPayeeResponse = { + encode(_: MsgRegisterPayeeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterPayeeResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRegisterPayeeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): MsgRegisterPayeeResponse { + return {}; + }, + toJSON(_: MsgRegisterPayeeResponse): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): MsgRegisterPayeeResponse { + const message = createBaseMsgRegisterPayeeResponse(); + return message; + } +}; +function createBaseMsgRegisterCounterpartyPayee(): MsgRegisterCounterpartyPayee { + return { + portId: "", + channelId: "", + relayer: "", + counterpartyPayee: "" + }; +} +export const MsgRegisterCounterpartyPayee = { + encode(message: MsgRegisterCounterpartyPayee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + if (message.relayer !== "") { + writer.uint32(26).string(message.relayer); + } + if (message.counterpartyPayee !== "") { + writer.uint32(34).string(message.counterpartyPayee); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterCounterpartyPayee { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRegisterCounterpartyPayee(); + 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.relayer = reader.string(); + break; + case 4: + message.counterpartyPayee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgRegisterCounterpartyPayee { + return { + portId: isSet(object.portId) ? String(object.portId) : "", + channelId: isSet(object.channelId) ? String(object.channelId) : "", + relayer: isSet(object.relayer) ? String(object.relayer) : "", + counterpartyPayee: isSet(object.counterpartyPayee) ? String(object.counterpartyPayee) : "" + }; + }, + toJSON(message: MsgRegisterCounterpartyPayee): unknown { + const obj: any = {}; + message.portId !== undefined && (obj.portId = message.portId); + message.channelId !== undefined && (obj.channelId = message.channelId); + message.relayer !== undefined && (obj.relayer = message.relayer); + message.counterpartyPayee !== undefined && (obj.counterpartyPayee = message.counterpartyPayee); + return obj; + }, + fromPartial(object: Partial): MsgRegisterCounterpartyPayee { + const message = createBaseMsgRegisterCounterpartyPayee(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + message.relayer = object.relayer ?? ""; + message.counterpartyPayee = object.counterpartyPayee ?? ""; + return message; + } +}; +function createBaseMsgRegisterCounterpartyPayeeResponse(): MsgRegisterCounterpartyPayeeResponse { + return {}; +} +export const MsgRegisterCounterpartyPayeeResponse = { + encode(_: MsgRegisterCounterpartyPayeeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterCounterpartyPayeeResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRegisterCounterpartyPayeeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): MsgRegisterCounterpartyPayeeResponse { + return {}; + }, + toJSON(_: MsgRegisterCounterpartyPayeeResponse): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): MsgRegisterCounterpartyPayeeResponse { + const message = createBaseMsgRegisterCounterpartyPayeeResponse(); + return message; + } +}; +function createBaseMsgPayPacketFee(): MsgPayPacketFee { + return { + fee: undefined, + sourcePortId: "", + sourceChannelId: "", + signer: "", + relayers: [] + }; +} +export const MsgPayPacketFee = { + encode(message: MsgPayPacketFee, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.fee !== undefined) { + Fee.encode(message.fee, writer.uint32(10).fork()).ldelim(); + } + if (message.sourcePortId !== "") { + writer.uint32(18).string(message.sourcePortId); + } + if (message.sourceChannelId !== "") { + writer.uint32(26).string(message.sourceChannelId); + } + if (message.signer !== "") { + writer.uint32(34).string(message.signer); + } + for (const v of message.relayers) { + writer.uint32(42).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPayPacketFee { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgPayPacketFee(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fee = Fee.decode(reader, reader.uint32()); + break; + case 2: + message.sourcePortId = reader.string(); + break; + case 3: + message.sourceChannelId = reader.string(); + break; + case 4: + message.signer = reader.string(); + break; + case 5: + message.relayers.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgPayPacketFee { + return { + fee: isSet(object.fee) ? Fee.fromJSON(object.fee) : undefined, + sourcePortId: isSet(object.sourcePortId) ? String(object.sourcePortId) : "", + sourceChannelId: isSet(object.sourceChannelId) ? String(object.sourceChannelId) : "", + signer: isSet(object.signer) ? String(object.signer) : "", + relayers: Array.isArray(object?.relayers) ? object.relayers.map((e: any) => String(e)) : [] + }; + }, + toJSON(message: MsgPayPacketFee): unknown { + const obj: any = {}; + message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined); + message.sourcePortId !== undefined && (obj.sourcePortId = message.sourcePortId); + message.sourceChannelId !== undefined && (obj.sourceChannelId = message.sourceChannelId); + message.signer !== undefined && (obj.signer = message.signer); + if (message.relayers) { + obj.relayers = message.relayers.map(e => e); + } else { + obj.relayers = []; + } + return obj; + }, + fromPartial(object: Partial): MsgPayPacketFee { + const message = createBaseMsgPayPacketFee(); + message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined; + message.sourcePortId = object.sourcePortId ?? ""; + message.sourceChannelId = object.sourceChannelId ?? ""; + message.signer = object.signer ?? ""; + message.relayers = object.relayers?.map(e => e) || []; + return message; + } +}; +function createBaseMsgPayPacketFeeResponse(): MsgPayPacketFeeResponse { + return {}; +} +export const MsgPayPacketFeeResponse = { + encode(_: MsgPayPacketFeeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPayPacketFeeResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgPayPacketFeeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): MsgPayPacketFeeResponse { + return {}; + }, + toJSON(_: MsgPayPacketFeeResponse): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): MsgPayPacketFeeResponse { + const message = createBaseMsgPayPacketFeeResponse(); + return message; + } +}; +function createBaseMsgPayPacketFeeAsync(): MsgPayPacketFeeAsync { + return { + packetId: undefined, + packetFee: undefined + }; +} +export const MsgPayPacketFeeAsync = { + encode(message: MsgPayPacketFeeAsync, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.packetId !== undefined) { + PacketId.encode(message.packetId, writer.uint32(10).fork()).ldelim(); + } + if (message.packetFee !== undefined) { + PacketFee.encode(message.packetFee, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPayPacketFeeAsync { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgPayPacketFeeAsync(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packetId = PacketId.decode(reader, reader.uint32()); + break; + case 2: + message.packetFee = PacketFee.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgPayPacketFeeAsync { + return { + packetId: isSet(object.packetId) ? PacketId.fromJSON(object.packetId) : undefined, + packetFee: isSet(object.packetFee) ? PacketFee.fromJSON(object.packetFee) : undefined + }; + }, + toJSON(message: MsgPayPacketFeeAsync): unknown { + const obj: any = {}; + message.packetId !== undefined && (obj.packetId = message.packetId ? PacketId.toJSON(message.packetId) : undefined); + message.packetFee !== undefined && (obj.packetFee = message.packetFee ? PacketFee.toJSON(message.packetFee) : undefined); + return obj; + }, + fromPartial(object: Partial): MsgPayPacketFeeAsync { + const message = createBaseMsgPayPacketFeeAsync(); + message.packetId = object.packetId !== undefined && object.packetId !== null ? PacketId.fromPartial(object.packetId) : undefined; + message.packetFee = object.packetFee !== undefined && object.packetFee !== null ? PacketFee.fromPartial(object.packetFee) : undefined; + return message; + } +}; +function createBaseMsgPayPacketFeeAsyncResponse(): MsgPayPacketFeeAsyncResponse { + return {}; +} +export const MsgPayPacketFeeAsyncResponse = { + encode(_: MsgPayPacketFeeAsyncResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPayPacketFeeAsyncResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgPayPacketFeeAsyncResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): MsgPayPacketFeeAsyncResponse { + return {}; + }, + toJSON(_: MsgPayPacketFeeAsyncResponse): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): MsgPayPacketFeeAsyncResponse { + const message = createBaseMsgPayPacketFeeAsyncResponse(); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts new file mode 100644 index 000000000..e3251367a --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -0,0 +1,62 @@ +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../../helpers"; +/** + * Params defines the set of on-chain interchain accounts parameters. + * The following parameters may be used to disable the controller submodule. + */ +export interface Params { + /** controller_enabled enables or disables the controller submodule. */ + controllerEnabled: boolean; +} +/** + * Params defines the set of on-chain interchain accounts parameters. + * The following parameters may be used to disable the controller submodule. + */ +export interface ParamsSDKType { + controller_enabled: boolean; +} +function createBaseParams(): Params { + return { + controllerEnabled: false + }; +} +export const Params = { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.controllerEnabled === true) { + writer.uint32(8).bool(message.controllerEnabled); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Params { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.controllerEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): Params { + return { + controllerEnabled: isSet(object.controllerEnabled) ? Boolean(object.controllerEnabled) : false + }; + }, + toJSON(message: Params): unknown { + const obj: any = {}; + message.controllerEnabled !== undefined && (obj.controllerEnabled = message.controllerEnabled); + return obj; + }, + fromPartial(object: Partial): Params { + const message = createBaseParams(); + message.controllerEnabled = object.controllerEnabled ?? false; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/query.rpc.Query.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/query.rpc.Query.ts new file mode 100644 index 000000000..58df8aa67 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/query.rpc.Query.ts @@ -0,0 +1,41 @@ +import { Rpc } from "../../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +import { QueryInterchainAccountRequest, QueryInterchainAccountResponse, QueryParamsRequest, QueryParamsResponse } from "./query"; +/** Query provides defines the gRPC querier service. */ +export interface Query { + /** InterchainAccount returns the interchain account address for a given owner address on a given connection */ + interchainAccount(request: QueryInterchainAccountRequest): Promise; + /** Params queries all parameters of the ICA controller submodule. */ + params(request?: QueryParamsRequest): Promise; +} +export class QueryClientImpl implements Query { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + this.interchainAccount = this.interchainAccount.bind(this); + this.params = this.params.bind(this); + } + interchainAccount(request: QueryInterchainAccountRequest): Promise { + const data = QueryInterchainAccountRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.interchain_accounts.controller.v1.Query", "InterchainAccount", data); + return promise.then(data => QueryInterchainAccountResponse.decode(new _m0.Reader(data))); + } + params(request: QueryParamsRequest = {}): Promise { + const data = QueryParamsRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.interchain_accounts.controller.v1.Query", "Params", data); + return promise.then(data => QueryParamsResponse.decode(new _m0.Reader(data))); + } +} +export const createRpcQueryExtension = (base: QueryClient) => { + const rpc = createProtobufRpcClient(base); + const queryService = new QueryClientImpl(rpc); + return { + interchainAccount(request: QueryInterchainAccountRequest): Promise { + return queryService.interchainAccount(request); + }, + params(request?: QueryParamsRequest): Promise { + return queryService.params(request); + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts new file mode 100644 index 000000000..2e5202d84 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -0,0 +1,212 @@ +import { Params, ParamsSDKType } from "./controller"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../../helpers"; +/** QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. */ +export interface QueryInterchainAccountRequest { + owner: string; + connectionId: string; +} +/** QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. */ +export interface QueryInterchainAccountRequestSDKType { + owner: string; + connection_id: string; +} +/** QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. */ +export interface QueryInterchainAccountResponse { + address: string; +} +/** QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. */ +export interface QueryInterchainAccountResponseSDKType { + address: string; +} +/** QueryParamsRequest is the request type for the Query/Params RPC method. */ +export interface QueryParamsRequest {} +/** 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; +} +/** QueryParamsResponse is the response type for the Query/Params RPC method. */ +export interface QueryParamsResponseSDKType { + params?: ParamsSDKType; +} +function createBaseQueryInterchainAccountRequest(): QueryInterchainAccountRequest { + return { + owner: "", + connectionId: "" + }; +} +export const QueryInterchainAccountRequest = { + encode(message: QueryInterchainAccountRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { + writer.uint32(10).string(message.owner); + } + if (message.connectionId !== "") { + writer.uint32(18).string(message.connectionId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryInterchainAccountRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryInterchainAccountRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.owner = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryInterchainAccountRequest { + return { + owner: isSet(object.owner) ? String(object.owner) : "", + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "" + }; + }, + toJSON(message: QueryInterchainAccountRequest): unknown { + const obj: any = {}; + message.owner !== undefined && (obj.owner = message.owner); + message.connectionId !== undefined && (obj.connectionId = message.connectionId); + return obj; + }, + fromPartial(object: Partial): QueryInterchainAccountRequest { + const message = createBaseQueryInterchainAccountRequest(); + message.owner = object.owner ?? ""; + message.connectionId = object.connectionId ?? ""; + return message; + } +}; +function createBaseQueryInterchainAccountResponse(): QueryInterchainAccountResponse { + return { + address: "" + }; +} +export const QueryInterchainAccountResponse = { + encode(message: QueryInterchainAccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryInterchainAccountResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryInterchainAccountResponse(); + 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): QueryInterchainAccountResponse { + return { + address: isSet(object.address) ? String(object.address) : "" + }; + }, + toJSON(message: QueryInterchainAccountResponse): unknown { + const obj: any = {}; + message.address !== undefined && (obj.address = message.address); + return obj; + }, + fromPartial(object: Partial): QueryInterchainAccountResponse { + const message = createBaseQueryInterchainAccountResponse(); + message.address = object.address ?? ""; + return message; + } +}; +function createBaseQueryParamsRequest(): QueryParamsRequest { + return {}; +} +export const QueryParamsRequest = { + encode(_: QueryParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): QueryParamsRequest { + const message = createBaseQueryParamsRequest(); + return message; + } +}; +function createBaseQueryParamsResponse(): QueryParamsResponse { + return { + params: undefined + }; +} +export const QueryParamsResponse = { + encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryParamsResponse { + const message = createBaseQueryParamsResponse(); + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.amino.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.amino.ts new file mode 100644 index 000000000..6cfcc9045 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.amino.ts @@ -0,0 +1,88 @@ +import { typeFromJSON } from "../../v1/packet"; +import { AminoMsg } from "@cosmjs/amino"; +import { MsgRegisterInterchainAccount, MsgSendTx } from "./tx"; +export interface MsgRegisterInterchainAccountAminoType extends AminoMsg { + type: "cosmos-sdk/MsgRegisterInterchainAccount"; + value: { + owner: string; + connection_id: string; + version: string; + }; +} +export interface MsgSendTxAminoType extends AminoMsg { + type: "cosmos-sdk/MsgSendTx"; + value: { + owner: string; + connection_id: string; + packet_data: { + type: number; + data: Uint8Array; + memo: string; + }; + relative_timeout: string; + }; +} +export const AminoConverter = { + "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount": { + aminoType: "cosmos-sdk/MsgRegisterInterchainAccount", + toAmino: ({ + owner, + connectionId, + version + }: MsgRegisterInterchainAccount): MsgRegisterInterchainAccountAminoType["value"] => { + return { + owner, + connection_id: connectionId, + version + }; + }, + fromAmino: ({ + owner, + connection_id, + version + }: MsgRegisterInterchainAccountAminoType["value"]): MsgRegisterInterchainAccount => { + return { + owner, + connectionId: connection_id, + version + }; + } + }, + "/ibc.applications.interchain_accounts.controller.v1.MsgSendTx": { + aminoType: "cosmos-sdk/MsgSendTx", + toAmino: ({ + owner, + connectionId, + packetData, + relativeTimeout + }: MsgSendTx): MsgSendTxAminoType["value"] => { + return { + owner, + connection_id: connectionId, + packet_data: { + type: packetData.type, + data: packetData.data, + memo: packetData.memo + }, + relative_timeout: relativeTimeout.toString() + }; + }, + fromAmino: ({ + owner, + connection_id, + packet_data, + relative_timeout + }: MsgSendTxAminoType["value"]): MsgSendTx => { + return { + owner, + connectionId: connection_id, + packetData: { + type: typeFromJSON(packet_data.type), + data: packet_data.data, + memo: packet_data.memo + }, + relativeTimeout: BigInt(relative_timeout) + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts new file mode 100644 index 000000000..dfee2c79e --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts @@ -0,0 +1,80 @@ +import { GeneratedType, Registry } from "@cosmjs/proto-signing"; +import { MsgRegisterInterchainAccount, MsgSendTx } from "./tx"; +export const registry: ReadonlyArray<[string, GeneratedType]> = [["/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount", MsgRegisterInterchainAccount], ["/ibc.applications.interchain_accounts.controller.v1.MsgSendTx", MsgSendTx]]; +export const load = (protoRegistry: Registry) => { + registry.forEach(([typeUrl, mod]) => { + protoRegistry.register(typeUrl, mod); + }); +}; +export const MessageComposer = { + encoded: { + registerInterchainAccount(value: MsgRegisterInterchainAccount) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount", + value: MsgRegisterInterchainAccount.encode(value).finish() + }; + }, + sendTx(value: MsgSendTx) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgSendTx", + value: MsgSendTx.encode(value).finish() + }; + } + }, + withTypeUrl: { + registerInterchainAccount(value: MsgRegisterInterchainAccount) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount", + value + }; + }, + sendTx(value: MsgSendTx) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgSendTx", + value + }; + } + }, + toJSON: { + registerInterchainAccount(value: MsgRegisterInterchainAccount) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount", + value: MsgRegisterInterchainAccount.toJSON(value) + }; + }, + sendTx(value: MsgSendTx) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgSendTx", + value: MsgSendTx.toJSON(value) + }; + } + }, + fromJSON: { + registerInterchainAccount(value: any) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount", + value: MsgRegisterInterchainAccount.fromJSON(value) + }; + }, + sendTx(value: any) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgSendTx", + value: MsgSendTx.fromJSON(value) + }; + } + }, + fromPartial: { + registerInterchainAccount(value: MsgRegisterInterchainAccount) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount", + value: MsgRegisterInterchainAccount.fromPartial(value) + }; + }, + sendTx(value: MsgSendTx) { + return { + typeUrl: "/ibc.applications.interchain_accounts.controller.v1.MsgSendTx", + value: MsgSendTx.fromPartial(value) + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.rpc.msg.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.rpc.msg.ts new file mode 100644 index 000000000..4bfb225a8 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.rpc.msg.ts @@ -0,0 +1,28 @@ +import { Rpc } from "../../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { MsgRegisterInterchainAccount, MsgRegisterInterchainAccountResponse, MsgSendTx, MsgSendTxResponse } from "./tx"; +/** Msg defines the 27-interchain-accounts/controller Msg service. */ +export interface Msg { + /** RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. */ + registerInterchainAccount(request: MsgRegisterInterchainAccount): Promise; + /** SendTx defines a rpc handler for MsgSendTx. */ + sendTx(request: MsgSendTx): Promise; +} +export class MsgClientImpl implements Msg { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + this.registerInterchainAccount = this.registerInterchainAccount.bind(this); + this.sendTx = this.sendTx.bind(this); + } + registerInterchainAccount(request: MsgRegisterInterchainAccount): Promise { + const data = MsgRegisterInterchainAccount.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.interchain_accounts.controller.v1.Msg", "RegisterInterchainAccount", data); + return promise.then(data => MsgRegisterInterchainAccountResponse.decode(new _m0.Reader(data))); + } + sendTx(request: MsgSendTx): Promise { + const data = MsgSendTx.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.interchain_accounts.controller.v1.Msg", "SendTx", data); + return promise.then(data => MsgSendTxResponse.decode(new _m0.Reader(data))); + } +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts new file mode 100644 index 000000000..87835cd56 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/controller/v1/tx.ts @@ -0,0 +1,279 @@ +import { InterchainAccountPacketData, InterchainAccountPacketDataSDKType } from "../../v1/packet"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, Long } from "../../../../../helpers"; +/** MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount */ +export interface MsgRegisterInterchainAccount { + owner: string; + connectionId: string; + version: string; +} +/** MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount */ +export interface MsgRegisterInterchainAccountSDKType { + owner: string; + connection_id: string; + version: string; +} +/** MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount */ +export interface MsgRegisterInterchainAccountResponse { + channelId: string; +} +/** MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount */ +export interface MsgRegisterInterchainAccountResponseSDKType { + channel_id: string; +} +/** MsgSendTx defines the payload for Msg/SendTx */ +export interface MsgSendTx { + owner: string; + connectionId: string; + packetData?: InterchainAccountPacketData; + /** + * Relative timeout timestamp provided will be added to the current block time during transaction execution. + * The timeout timestamp must be non-zero. + */ + relativeTimeout: bigint; +} +/** MsgSendTx defines the payload for Msg/SendTx */ +export interface MsgSendTxSDKType { + owner: string; + connection_id: string; + packet_data?: InterchainAccountPacketDataSDKType; + relative_timeout: bigint; +} +/** MsgSendTxResponse defines the response for MsgSendTx */ +export interface MsgSendTxResponse { + sequence: bigint; +} +/** MsgSendTxResponse defines the response for MsgSendTx */ +export interface MsgSendTxResponseSDKType { + sequence: bigint; +} +function createBaseMsgRegisterInterchainAccount(): MsgRegisterInterchainAccount { + return { + owner: "", + connectionId: "", + version: "" + }; +} +export const MsgRegisterInterchainAccount = { + encode(message: MsgRegisterInterchainAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { + writer.uint32(10).string(message.owner); + } + if (message.connectionId !== "") { + writer.uint32(18).string(message.connectionId); + } + if (message.version !== "") { + writer.uint32(26).string(message.version); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterInterchainAccount { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRegisterInterchainAccount(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.owner = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + case 3: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgRegisterInterchainAccount { + return { + owner: isSet(object.owner) ? String(object.owner) : "", + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", + version: isSet(object.version) ? String(object.version) : "" + }; + }, + toJSON(message: MsgRegisterInterchainAccount): unknown { + const obj: any = {}; + message.owner !== undefined && (obj.owner = message.owner); + message.connectionId !== undefined && (obj.connectionId = message.connectionId); + message.version !== undefined && (obj.version = message.version); + return obj; + }, + fromPartial(object: Partial): MsgRegisterInterchainAccount { + const message = createBaseMsgRegisterInterchainAccount(); + message.owner = object.owner ?? ""; + message.connectionId = object.connectionId ?? ""; + message.version = object.version ?? ""; + return message; + } +}; +function createBaseMsgRegisterInterchainAccountResponse(): MsgRegisterInterchainAccountResponse { + return { + channelId: "" + }; +} +export const MsgRegisterInterchainAccountResponse = { + encode(message: MsgRegisterInterchainAccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channelId !== "") { + writer.uint32(10).string(message.channelId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterInterchainAccountResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRegisterInterchainAccountResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgRegisterInterchainAccountResponse { + return { + channelId: isSet(object.channelId) ? String(object.channelId) : "" + }; + }, + toJSON(message: MsgRegisterInterchainAccountResponse): unknown { + const obj: any = {}; + message.channelId !== undefined && (obj.channelId = message.channelId); + return obj; + }, + fromPartial(object: Partial): MsgRegisterInterchainAccountResponse { + const message = createBaseMsgRegisterInterchainAccountResponse(); + message.channelId = object.channelId ?? ""; + return message; + } +}; +function createBaseMsgSendTx(): MsgSendTx { + return { + owner: "", + connectionId: "", + packetData: undefined, + relativeTimeout: BigInt("0") + }; +} +export const MsgSendTx = { + encode(message: MsgSendTx, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { + writer.uint32(10).string(message.owner); + } + if (message.connectionId !== "") { + writer.uint32(18).string(message.connectionId); + } + if (message.packetData !== undefined) { + InterchainAccountPacketData.encode(message.packetData, writer.uint32(26).fork()).ldelim(); + } + if (message.relativeTimeout !== BigInt(0)) { + writer.uint32(32).uint64(Long.fromString(message.relativeTimeout.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSendTx { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgSendTx(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.owner = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + case 3: + message.packetData = InterchainAccountPacketData.decode(reader, reader.uint32()); + break; + case 4: + message.relativeTimeout = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgSendTx { + return { + owner: isSet(object.owner) ? String(object.owner) : "", + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", + packetData: isSet(object.packetData) ? InterchainAccountPacketData.fromJSON(object.packetData) : undefined, + relativeTimeout: isSet(object.relativeTimeout) ? BigInt(object.relativeTimeout.toString()) : BigInt("0") + }; + }, + toJSON(message: MsgSendTx): unknown { + const obj: any = {}; + message.owner !== undefined && (obj.owner = message.owner); + message.connectionId !== undefined && (obj.connectionId = message.connectionId); + message.packetData !== undefined && (obj.packetData = message.packetData ? InterchainAccountPacketData.toJSON(message.packetData) : undefined); + message.relativeTimeout !== undefined && (obj.relativeTimeout = (message.relativeTimeout || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): MsgSendTx { + const message = createBaseMsgSendTx(); + message.owner = object.owner ?? ""; + message.connectionId = object.connectionId ?? ""; + message.packetData = object.packetData !== undefined && object.packetData !== null ? InterchainAccountPacketData.fromPartial(object.packetData) : undefined; + message.relativeTimeout = object.relativeTimeout !== undefined && object.relativeTimeout !== null ? BigInt(object.relativeTimeout.toString()) : BigInt("0"); + return message; + } +}; +function createBaseMsgSendTxResponse(): MsgSendTxResponse { + return { + sequence: BigInt("0") + }; +} +export const MsgSendTxResponse = { + encode(message: MsgSendTxResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSendTxResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgSendTxResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sequence = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgSendTxResponse { + return { + sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt("0") + }; + }, + toJSON(message: MsgSendTxResponse): unknown { + const obj: any = {}; + message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): MsgSendTxResponse { + const message = createBaseMsgSendTxResponse(); + message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt("0"); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.ts new file mode 100644 index 000000000..1dc3b669c --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.ts @@ -0,0 +1,441 @@ +import { Params as Params1 } from "../../controller/v1/controller"; +import { ParamsSDKType as Params1SDKType } from "../../controller/v1/controller"; +import { Params as Params2 } from "../../host/v1/host"; +import { ParamsSDKType as Params2SDKType } from "../../host/v1/host"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../../helpers"; +/** GenesisState defines the interchain accounts genesis state */ +export interface GenesisState { + controllerGenesisState?: ControllerGenesisState; + hostGenesisState?: HostGenesisState; +} +/** GenesisState defines the interchain accounts genesis state */ +export interface GenesisStateSDKType { + controller_genesis_state?: ControllerGenesisStateSDKType; + host_genesis_state?: HostGenesisStateSDKType; +} +/** ControllerGenesisState defines the interchain accounts controller genesis state */ +export interface ControllerGenesisState { + activeChannels: ActiveChannel[]; + interchainAccounts: RegisteredInterchainAccount[]; + ports: string[]; + params?: Params1; +} +/** ControllerGenesisState defines the interchain accounts controller genesis state */ +export interface ControllerGenesisStateSDKType { + active_channels: ActiveChannelSDKType[]; + interchain_accounts: RegisteredInterchainAccountSDKType[]; + ports: string[]; + params?: Params1SDKType; +} +/** HostGenesisState defines the interchain accounts host genesis state */ +export interface HostGenesisState { + activeChannels: ActiveChannel[]; + interchainAccounts: RegisteredInterchainAccount[]; + port: string; + params?: Params2; +} +/** HostGenesisState defines the interchain accounts host genesis state */ +export interface HostGenesisStateSDKType { + active_channels: ActiveChannelSDKType[]; + interchain_accounts: RegisteredInterchainAccountSDKType[]; + port: string; + params?: Params2SDKType; +} +/** + * ActiveChannel contains a connection ID, port ID and associated active channel ID, as well as a boolean flag to + * indicate if the channel is middleware enabled + */ +export interface ActiveChannel { + connectionId: string; + portId: string; + channelId: string; + isMiddlewareEnabled: boolean; +} +/** + * ActiveChannel contains a connection ID, port ID and associated active channel ID, as well as a boolean flag to + * indicate if the channel is middleware enabled + */ +export interface ActiveChannelSDKType { + connection_id: string; + port_id: string; + channel_id: string; + is_middleware_enabled: boolean; +} +/** RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address */ +export interface RegisteredInterchainAccount { + connectionId: string; + portId: string; + accountAddress: string; +} +/** RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address */ +export interface RegisteredInterchainAccountSDKType { + connection_id: string; + port_id: string; + account_address: string; +} +function createBaseGenesisState(): GenesisState { + return { + controllerGenesisState: undefined, + hostGenesisState: undefined + }; +} +export const GenesisState = { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.controllerGenesisState !== undefined) { + ControllerGenesisState.encode(message.controllerGenesisState, writer.uint32(10).fork()).ldelim(); + } + if (message.hostGenesisState !== undefined) { + HostGenesisState.encode(message.hostGenesisState, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.controllerGenesisState = ControllerGenesisState.decode(reader, reader.uint32()); + break; + case 2: + message.hostGenesisState = HostGenesisState.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): GenesisState { + return { + controllerGenesisState: isSet(object.controllerGenesisState) ? ControllerGenesisState.fromJSON(object.controllerGenesisState) : undefined, + hostGenesisState: isSet(object.hostGenesisState) ? HostGenesisState.fromJSON(object.hostGenesisState) : undefined + }; + }, + toJSON(message: GenesisState): unknown { + const obj: any = {}; + message.controllerGenesisState !== undefined && (obj.controllerGenesisState = message.controllerGenesisState ? ControllerGenesisState.toJSON(message.controllerGenesisState) : undefined); + message.hostGenesisState !== undefined && (obj.hostGenesisState = message.hostGenesisState ? HostGenesisState.toJSON(message.hostGenesisState) : undefined); + return obj; + }, + fromPartial(object: Partial): GenesisState { + const message = createBaseGenesisState(); + message.controllerGenesisState = object.controllerGenesisState !== undefined && object.controllerGenesisState !== null ? ControllerGenesisState.fromPartial(object.controllerGenesisState) : undefined; + message.hostGenesisState = object.hostGenesisState !== undefined && object.hostGenesisState !== null ? HostGenesisState.fromPartial(object.hostGenesisState) : undefined; + return message; + } +}; +function createBaseControllerGenesisState(): ControllerGenesisState { + return { + activeChannels: [], + interchainAccounts: [], + ports: [], + params: undefined + }; +} +export const ControllerGenesisState = { + encode(message: ControllerGenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.activeChannels) { + ActiveChannel.encode(v!, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.interchainAccounts) { + RegisteredInterchainAccount.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.ports) { + writer.uint32(26).string(v!); + } + if (message.params !== undefined) { + Params1.encode(message.params, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ControllerGenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseControllerGenesisState(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.activeChannels.push(ActiveChannel.decode(reader, reader.uint32())); + break; + case 2: + message.interchainAccounts.push(RegisteredInterchainAccount.decode(reader, reader.uint32())); + break; + case 3: + message.ports.push(reader.string()); + break; + case 4: + message.params = Params1.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): ControllerGenesisState { + return { + activeChannels: Array.isArray(object?.activeChannels) ? object.activeChannels.map((e: any) => ActiveChannel.fromJSON(e)) : [], + interchainAccounts: Array.isArray(object?.interchainAccounts) ? object.interchainAccounts.map((e: any) => RegisteredInterchainAccount.fromJSON(e)) : [], + ports: Array.isArray(object?.ports) ? object.ports.map((e: any) => String(e)) : [], + params: isSet(object.params) ? Params1.fromJSON(object.params) : undefined + }; + }, + toJSON(message: ControllerGenesisState): unknown { + const obj: any = {}; + if (message.activeChannels) { + obj.activeChannels = message.activeChannels.map(e => e ? ActiveChannel.toJSON(e) : undefined); + } else { + obj.activeChannels = []; + } + if (message.interchainAccounts) { + obj.interchainAccounts = message.interchainAccounts.map(e => e ? RegisteredInterchainAccount.toJSON(e) : undefined); + } else { + obj.interchainAccounts = []; + } + if (message.ports) { + obj.ports = message.ports.map(e => e); + } else { + obj.ports = []; + } + message.params !== undefined && (obj.params = message.params ? Params1.toJSON(message.params) : undefined); + return obj; + }, + fromPartial(object: Partial): ControllerGenesisState { + const message = createBaseControllerGenesisState(); + message.activeChannels = object.activeChannels?.map(e => ActiveChannel.fromPartial(e)) || []; + message.interchainAccounts = object.interchainAccounts?.map(e => RegisteredInterchainAccount.fromPartial(e)) || []; + message.ports = object.ports?.map(e => e) || []; + message.params = object.params !== undefined && object.params !== null ? Params1.fromPartial(object.params) : undefined; + return message; + } +}; +function createBaseHostGenesisState(): HostGenesisState { + return { + activeChannels: [], + interchainAccounts: [], + port: "", + params: undefined + }; +} +export const HostGenesisState = { + encode(message: HostGenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.activeChannels) { + ActiveChannel.encode(v!, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.interchainAccounts) { + RegisteredInterchainAccount.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.port !== "") { + writer.uint32(26).string(message.port); + } + if (message.params !== undefined) { + Params2.encode(message.params, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): HostGenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseHostGenesisState(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.activeChannels.push(ActiveChannel.decode(reader, reader.uint32())); + break; + case 2: + message.interchainAccounts.push(RegisteredInterchainAccount.decode(reader, reader.uint32())); + break; + case 3: + message.port = reader.string(); + break; + case 4: + message.params = Params2.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): HostGenesisState { + return { + activeChannels: Array.isArray(object?.activeChannels) ? object.activeChannels.map((e: any) => ActiveChannel.fromJSON(e)) : [], + interchainAccounts: Array.isArray(object?.interchainAccounts) ? object.interchainAccounts.map((e: any) => RegisteredInterchainAccount.fromJSON(e)) : [], + port: isSet(object.port) ? String(object.port) : "", + params: isSet(object.params) ? Params2.fromJSON(object.params) : undefined + }; + }, + toJSON(message: HostGenesisState): unknown { + const obj: any = {}; + if (message.activeChannels) { + obj.activeChannels = message.activeChannels.map(e => e ? ActiveChannel.toJSON(e) : undefined); + } else { + obj.activeChannels = []; + } + if (message.interchainAccounts) { + obj.interchainAccounts = message.interchainAccounts.map(e => e ? RegisteredInterchainAccount.toJSON(e) : undefined); + } else { + obj.interchainAccounts = []; + } + message.port !== undefined && (obj.port = message.port); + message.params !== undefined && (obj.params = message.params ? Params2.toJSON(message.params) : undefined); + return obj; + }, + fromPartial(object: Partial): HostGenesisState { + const message = createBaseHostGenesisState(); + message.activeChannels = object.activeChannels?.map(e => ActiveChannel.fromPartial(e)) || []; + message.interchainAccounts = object.interchainAccounts?.map(e => RegisteredInterchainAccount.fromPartial(e)) || []; + message.port = object.port ?? ""; + message.params = object.params !== undefined && object.params !== null ? Params2.fromPartial(object.params) : undefined; + return message; + } +}; +function createBaseActiveChannel(): ActiveChannel { + return { + connectionId: "", + portId: "", + channelId: "", + isMiddlewareEnabled: false + }; +} +export const ActiveChannel = { + encode(message: ActiveChannel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.connectionId !== "") { + writer.uint32(10).string(message.connectionId); + } + if (message.portId !== "") { + writer.uint32(18).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(26).string(message.channelId); + } + if (message.isMiddlewareEnabled === true) { + writer.uint32(32).bool(message.isMiddlewareEnabled); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ActiveChannel { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseActiveChannel(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.portId = reader.string(); + break; + case 3: + message.channelId = reader.string(); + break; + case 4: + message.isMiddlewareEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): ActiveChannel { + return { + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", + portId: isSet(object.portId) ? String(object.portId) : "", + channelId: isSet(object.channelId) ? String(object.channelId) : "", + isMiddlewareEnabled: isSet(object.isMiddlewareEnabled) ? Boolean(object.isMiddlewareEnabled) : false + }; + }, + toJSON(message: ActiveChannel): unknown { + const obj: any = {}; + message.connectionId !== undefined && (obj.connectionId = message.connectionId); + message.portId !== undefined && (obj.portId = message.portId); + message.channelId !== undefined && (obj.channelId = message.channelId); + message.isMiddlewareEnabled !== undefined && (obj.isMiddlewareEnabled = message.isMiddlewareEnabled); + return obj; + }, + fromPartial(object: Partial): ActiveChannel { + const message = createBaseActiveChannel(); + message.connectionId = object.connectionId ?? ""; + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + message.isMiddlewareEnabled = object.isMiddlewareEnabled ?? false; + return message; + } +}; +function createBaseRegisteredInterchainAccount(): RegisteredInterchainAccount { + return { + connectionId: "", + portId: "", + accountAddress: "" + }; +} +export const RegisteredInterchainAccount = { + encode(message: RegisteredInterchainAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.connectionId !== "") { + writer.uint32(10).string(message.connectionId); + } + if (message.portId !== "") { + writer.uint32(18).string(message.portId); + } + if (message.accountAddress !== "") { + writer.uint32(26).string(message.accountAddress); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): RegisteredInterchainAccount { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegisteredInterchainAccount(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.portId = reader.string(); + break; + case 3: + message.accountAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): RegisteredInterchainAccount { + return { + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", + portId: isSet(object.portId) ? String(object.portId) : "", + accountAddress: isSet(object.accountAddress) ? String(object.accountAddress) : "" + }; + }, + toJSON(message: RegisteredInterchainAccount): unknown { + const obj: any = {}; + message.connectionId !== undefined && (obj.connectionId = message.connectionId); + message.portId !== undefined && (obj.portId = message.portId); + message.accountAddress !== undefined && (obj.accountAddress = message.accountAddress); + return obj; + }, + fromPartial(object: Partial): RegisteredInterchainAccount { + const message = createBaseRegisteredInterchainAccount(); + message.connectionId = object.connectionId ?? ""; + message.portId = object.portId ?? ""; + message.accountAddress = object.accountAddress ?? ""; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/host.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/host.ts new file mode 100644 index 000000000..e9755a7e9 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/host.ts @@ -0,0 +1,79 @@ +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../../helpers"; +/** + * Params defines the set of on-chain interchain accounts parameters. + * The following parameters may be used to disable the host submodule. + */ +export interface Params { + /** host_enabled enables or disables the host submodule. */ + hostEnabled: boolean; + /** allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. */ + allowMessages: string[]; +} +/** + * Params defines the set of on-chain interchain accounts parameters. + * The following parameters may be used to disable the host submodule. + */ +export interface ParamsSDKType { + host_enabled: boolean; + allow_messages: string[]; +} +function createBaseParams(): Params { + return { + hostEnabled: false, + allowMessages: [] + }; +} +export const Params = { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.hostEnabled === true) { + writer.uint32(8).bool(message.hostEnabled); + } + for (const v of message.allowMessages) { + writer.uint32(18).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Params { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.hostEnabled = reader.bool(); + break; + case 2: + message.allowMessages.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): Params { + return { + hostEnabled: isSet(object.hostEnabled) ? Boolean(object.hostEnabled) : false, + allowMessages: Array.isArray(object?.allowMessages) ? object.allowMessages.map((e: any) => String(e)) : [] + }; + }, + toJSON(message: Params): unknown { + const obj: any = {}; + message.hostEnabled !== undefined && (obj.hostEnabled = message.hostEnabled); + if (message.allowMessages) { + obj.allowMessages = message.allowMessages.map(e => e); + } else { + obj.allowMessages = []; + } + return obj; + }, + fromPartial(object: Partial): Params { + const message = createBaseParams(); + message.hostEnabled = object.hostEnabled ?? false; + message.allowMessages = object.allowMessages?.map(e => e) || []; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/query.rpc.Query.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/query.rpc.Query.ts new file mode 100644 index 000000000..548ef0e59 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/query.rpc.Query.ts @@ -0,0 +1,30 @@ +import { Rpc } from "../../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +import { QueryParamsRequest, QueryParamsResponse } from "./query"; +/** Query provides defines the gRPC querier service. */ +export interface Query { + /** Params queries all parameters of the ICA host submodule. */ + 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("ibc.applications.interchain_accounts.host.v1.Query", "Params", data); + return promise.then(data => QueryParamsResponse.decode(new _m0.Reader(data))); + } +} +export const createRpcQueryExtension = (base: QueryClient) => { + const rpc = createProtobufRpcClient(base); + const queryService = new QueryClientImpl(rpc); + return { + params(request?: QueryParamsRequest): Promise { + return queryService.params(request); + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/query.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/query.ts new file mode 100644 index 000000000..b41d899e1 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/host/v1/query.ts @@ -0,0 +1,94 @@ +import { Params, ParamsSDKType } from "./host"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../../helpers"; +/** QueryParamsRequest is the request type for the Query/Params RPC method. */ +export interface QueryParamsRequest {} +/** 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; +} +/** QueryParamsResponse is the response type for the Query/Params RPC method. */ +export interface QueryParamsResponseSDKType { + params?: ParamsSDKType; +} +function createBaseQueryParamsRequest(): QueryParamsRequest { + return {}; +} +export const QueryParamsRequest = { + encode(_: QueryParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): QueryParamsRequest { + const message = createBaseQueryParamsRequest(); + return message; + } +}; +function createBaseQueryParamsResponse(): QueryParamsResponse { + return { + params: undefined + }; +} +export const QueryParamsResponse = { + encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryParamsResponse { + const message = createBaseQueryParamsResponse(); + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/account.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/account.ts new file mode 100644 index 000000000..2cf783503 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/account.ts @@ -0,0 +1,68 @@ +import { BaseAccount, BaseAccountSDKType } from "../../../../cosmos/auth/v1beta1/auth"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain */ +export interface InterchainAccount { + baseAccount?: BaseAccount; + accountOwner: string; +} +/** An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain */ +export interface InterchainAccountSDKType { + base_account?: BaseAccountSDKType; + account_owner: string; +} +function createBaseInterchainAccount(): InterchainAccount { + return { + baseAccount: undefined, + accountOwner: "" + }; +} +export const InterchainAccount = { + encode(message: InterchainAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.baseAccount !== undefined) { + BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); + } + if (message.accountOwner !== "") { + writer.uint32(18).string(message.accountOwner); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): InterchainAccount { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInterchainAccount(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseAccount = BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + message.accountOwner = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): InterchainAccount { + return { + baseAccount: isSet(object.baseAccount) ? BaseAccount.fromJSON(object.baseAccount) : undefined, + accountOwner: isSet(object.accountOwner) ? String(object.accountOwner) : "" + }; + }, + toJSON(message: InterchainAccount): unknown { + const obj: any = {}; + message.baseAccount !== undefined && (obj.baseAccount = message.baseAccount ? BaseAccount.toJSON(message.baseAccount) : undefined); + message.accountOwner !== undefined && (obj.accountOwner = message.accountOwner); + return obj; + }, + fromPartial(object: Partial): InterchainAccount { + const message = createBaseInterchainAccount(); + message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null ? BaseAccount.fromPartial(object.baseAccount) : undefined; + message.accountOwner = object.accountOwner ?? ""; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/metadata.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/metadata.ts new file mode 100644 index 000000000..93835e686 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/metadata.ts @@ -0,0 +1,130 @@ +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** + * Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring + * See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning + */ +export interface Metadata { + /** version defines the ICS27 protocol version */ + version: string; + /** controller_connection_id is the connection identifier associated with the controller chain */ + controllerConnectionId: string; + /** host_connection_id is the connection identifier associated with the host chain */ + hostConnectionId: string; + /** + * address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step + * NOTE: the address field is empty on the OnChanOpenInit handshake step + */ + address: string; + /** encoding defines the supported codec format */ + encoding: string; + /** tx_type defines the type of transactions the interchain account can execute */ + txType: string; +} +/** + * Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring + * See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning + */ +export interface MetadataSDKType { + version: string; + controller_connection_id: string; + host_connection_id: string; + address: string; + encoding: string; + tx_type: string; +} +function createBaseMetadata(): Metadata { + return { + version: "", + controllerConnectionId: "", + hostConnectionId: "", + address: "", + encoding: "", + txType: "" + }; +} +export const Metadata = { + encode(message: Metadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.version !== "") { + writer.uint32(10).string(message.version); + } + if (message.controllerConnectionId !== "") { + writer.uint32(18).string(message.controllerConnectionId); + } + if (message.hostConnectionId !== "") { + writer.uint32(26).string(message.hostConnectionId); + } + if (message.address !== "") { + writer.uint32(34).string(message.address); + } + if (message.encoding !== "") { + writer.uint32(42).string(message.encoding); + } + if (message.txType !== "") { + writer.uint32(50).string(message.txType); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Metadata { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.version = reader.string(); + break; + case 2: + message.controllerConnectionId = reader.string(); + break; + case 3: + message.hostConnectionId = reader.string(); + break; + case 4: + message.address = reader.string(); + break; + case 5: + message.encoding = reader.string(); + break; + case 6: + message.txType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): Metadata { + return { + version: isSet(object.version) ? String(object.version) : "", + controllerConnectionId: isSet(object.controllerConnectionId) ? String(object.controllerConnectionId) : "", + hostConnectionId: isSet(object.hostConnectionId) ? String(object.hostConnectionId) : "", + address: isSet(object.address) ? String(object.address) : "", + encoding: isSet(object.encoding) ? String(object.encoding) : "", + txType: isSet(object.txType) ? String(object.txType) : "" + }; + }, + toJSON(message: Metadata): unknown { + const obj: any = {}; + message.version !== undefined && (obj.version = message.version); + message.controllerConnectionId !== undefined && (obj.controllerConnectionId = message.controllerConnectionId); + message.hostConnectionId !== undefined && (obj.hostConnectionId = message.hostConnectionId); + message.address !== undefined && (obj.address = message.address); + message.encoding !== undefined && (obj.encoding = message.encoding); + message.txType !== undefined && (obj.txType = message.txType); + return obj; + }, + fromPartial(object: Partial): Metadata { + const message = createBaseMetadata(); + message.version = object.version ?? ""; + message.controllerConnectionId = object.controllerConnectionId ?? ""; + message.hostConnectionId = object.hostConnectionId ?? ""; + message.address = object.address ?? ""; + message.encoding = object.encoding ?? ""; + message.txType = object.txType ?? ""; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/packet.ts b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/packet.ts new file mode 100644 index 000000000..49e122854 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/interchain_accounts/v1/packet.ts @@ -0,0 +1,174 @@ +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +/** + * Type defines a classification of message issued from a controller chain to its associated interchain accounts + * host + */ +export enum Type { + /** TYPE_UNSPECIFIED - Default zero value enumeration */ + TYPE_UNSPECIFIED = 0, + /** TYPE_EXECUTE_TX - Execute a transaction on an interchain accounts host chain */ + TYPE_EXECUTE_TX = 1, + UNRECOGNIZED = -1, +} +export const TypeSDKType = Type; +export function typeFromJSON(object: any): Type { + switch (object) { + case 0: + case "TYPE_UNSPECIFIED": + return Type.TYPE_UNSPECIFIED; + case 1: + case "TYPE_EXECUTE_TX": + return Type.TYPE_EXECUTE_TX; + case -1: + case "UNRECOGNIZED": + default: + return Type.UNRECOGNIZED; + } +} +export function typeToJSON(object: Type): string { + switch (object) { + case Type.TYPE_UNSPECIFIED: + return "TYPE_UNSPECIFIED"; + case Type.TYPE_EXECUTE_TX: + return "TYPE_EXECUTE_TX"; + case Type.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +/** InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. */ +export interface InterchainAccountPacketData { + type: Type; + data: Uint8Array; + memo: string; +} +/** InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. */ +export interface InterchainAccountPacketDataSDKType { + type: Type; + data: Uint8Array; + memo: string; +} +/** CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain. */ +export interface CosmosTx { + messages: Any[]; +} +/** CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain. */ +export interface CosmosTxSDKType { + messages: AnySDKType[]; +} +function createBaseInterchainAccountPacketData(): InterchainAccountPacketData { + return { + type: 0, + data: new Uint8Array(), + memo: "" + }; +} +export const InterchainAccountPacketData = { + encode(message: InterchainAccountPacketData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.type !== 0) { + writer.uint32(8).int32(message.type); + } + if (message.data.length !== 0) { + writer.uint32(18).bytes(message.data); + } + if (message.memo !== "") { + writer.uint32(26).string(message.memo); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): InterchainAccountPacketData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInterchainAccountPacketData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = (reader.int32() as any); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.memo = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): InterchainAccountPacketData { + return { + type: isSet(object.type) ? typeFromJSON(object.type) : 0, + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), + memo: isSet(object.memo) ? String(object.memo) : "" + }; + }, + toJSON(message: InterchainAccountPacketData): unknown { + const obj: any = {}; + message.type !== undefined && (obj.type = typeToJSON(message.type)); + message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); + message.memo !== undefined && (obj.memo = message.memo); + return obj; + }, + fromPartial(object: Partial): InterchainAccountPacketData { + const message = createBaseInterchainAccountPacketData(); + message.type = object.type ?? 0; + message.data = object.data ?? new Uint8Array(); + message.memo = object.memo ?? ""; + return message; + } +}; +function createBaseCosmosTx(): CosmosTx { + return { + messages: [] + }; +} +export const CosmosTx = { + encode(message: CosmosTx, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.messages) { + Any.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): CosmosTx { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCosmosTx(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messages.push(Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): CosmosTx { + return { + messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [] + }; + }, + toJSON(message: CosmosTx): unknown { + const obj: any = {}; + if (message.messages) { + obj.messages = message.messages.map(e => e ? Any.toJSON(e) : undefined); + } else { + obj.messages = []; + } + return obj; + }, + fromPartial(object: Partial): CosmosTx { + const message = createBaseCosmosTx(); + message.messages = object.messages?.map(e => Any.fromPartial(e)) || []; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/authz.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/authz.ts new file mode 100644 index 000000000..e907a8495 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/authz.ts @@ -0,0 +1,168 @@ +import { Coin, CoinSDKType } from "../../../../cosmos/base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** Allocation defines the spend limit for a particular port and channel */ +export interface Allocation { + /** the port on which the packet will be sent */ + sourcePort: string; + /** the channel by which the packet will be sent */ + sourceChannel: string; + /** spend limitation on the channel */ + spendLimit: Coin[]; + /** allow list of receivers, an empty allow list permits any receiver address */ + allowList: string[]; +} +/** Allocation defines the spend limit for a particular port and channel */ +export interface AllocationSDKType { + source_port: string; + source_channel: string; + spend_limit: CoinSDKType[]; + allow_list: string[]; +} +/** + * TransferAuthorization allows the grantee to spend up to spend_limit coins from + * the granter's account for ibc transfer on a specific channel + */ +export interface TransferAuthorization { + /** port and channel amounts */ + allocations: Allocation[]; +} +/** + * TransferAuthorization allows the grantee to spend up to spend_limit coins from + * the granter's account for ibc transfer on a specific channel + */ +export interface TransferAuthorizationSDKType { + allocations: AllocationSDKType[]; +} +function createBaseAllocation(): Allocation { + return { + sourcePort: "", + sourceChannel: "", + spendLimit: [], + allowList: [] + }; +} +export const Allocation = { + encode(message: Allocation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sourcePort !== "") { + writer.uint32(10).string(message.sourcePort); + } + if (message.sourceChannel !== "") { + writer.uint32(18).string(message.sourceChannel); + } + for (const v of message.spendLimit) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.allowList) { + writer.uint32(34).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Allocation { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAllocation(); + 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.spendLimit.push(Coin.decode(reader, reader.uint32())); + break; + case 4: + message.allowList.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): Allocation { + return { + sourcePort: isSet(object.sourcePort) ? String(object.sourcePort) : "", + sourceChannel: isSet(object.sourceChannel) ? String(object.sourceChannel) : "", + spendLimit: Array.isArray(object?.spendLimit) ? object.spendLimit.map((e: any) => Coin.fromJSON(e)) : [], + allowList: Array.isArray(object?.allowList) ? object.allowList.map((e: any) => String(e)) : [] + }; + }, + toJSON(message: Allocation): unknown { + const obj: any = {}; + message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort); + message.sourceChannel !== undefined && (obj.sourceChannel = message.sourceChannel); + if (message.spendLimit) { + obj.spendLimit = message.spendLimit.map(e => e ? Coin.toJSON(e) : undefined); + } else { + obj.spendLimit = []; + } + if (message.allowList) { + obj.allowList = message.allowList.map(e => e); + } else { + obj.allowList = []; + } + return obj; + }, + fromPartial(object: Partial): Allocation { + const message = createBaseAllocation(); + message.sourcePort = object.sourcePort ?? ""; + message.sourceChannel = object.sourceChannel ?? ""; + message.spendLimit = object.spendLimit?.map(e => Coin.fromPartial(e)) || []; + message.allowList = object.allowList?.map(e => e) || []; + return message; + } +}; +function createBaseTransferAuthorization(): TransferAuthorization { + return { + allocations: [] + }; +} +export const TransferAuthorization = { + encode(message: TransferAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.allocations) { + Allocation.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): TransferAuthorization { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTransferAuthorization(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.allocations.push(Allocation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): TransferAuthorization { + return { + allocations: Array.isArray(object?.allocations) ? object.allocations.map((e: any) => Allocation.fromJSON(e)) : [] + }; + }, + toJSON(message: TransferAuthorization): unknown { + const obj: any = {}; + if (message.allocations) { + obj.allocations = message.allocations.map(e => e ? Allocation.toJSON(e) : undefined); + } else { + obj.allocations = []; + } + return obj; + }, + fromPartial(object: Partial): TransferAuthorization { + const message = createBaseTransferAuthorization(); + message.allocations = object.allocations?.map(e => Allocation.fromPartial(e)) || []; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/genesis.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/genesis.ts new file mode 100644 index 000000000..6d6dd8582 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/genesis.ts @@ -0,0 +1,84 @@ +import { DenomTrace, DenomTraceSDKType, Params, ParamsSDKType } from "./transfer"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** GenesisState defines the ibc-transfer genesis state */ +export interface GenesisState { + portId: string; + denomTraces: DenomTrace[]; + params?: Params; +} +/** GenesisState defines the ibc-transfer genesis state */ +export interface GenesisStateSDKType { + port_id: string; + denom_traces: DenomTraceSDKType[]; + params?: ParamsSDKType; +} +function createBaseGenesisState(): GenesisState { + return { + portId: "", + denomTraces: [], + params: undefined + }; +} +export const GenesisState = { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/query.rpc.Query.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/query.rpc.Query.ts new file mode 100644 index 000000000..a78c6d2ce --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/query.rpc.Query.ts @@ -0,0 +1,76 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +import { QueryDenomTraceRequest, QueryDenomTraceResponse, QueryDenomTracesRequest, QueryDenomTracesResponse, QueryParamsRequest, QueryParamsResponse, QueryDenomHashRequest, QueryDenomHashResponse, QueryEscrowAddressRequest, QueryEscrowAddressResponse } 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; + /** DenomHash queries a denomination hash information. */ + denomHash(request: QueryDenomHashRequest): Promise; + /** EscrowAddress returns the escrow address for a particular port and channel id. */ + escrowAddress(request: QueryEscrowAddressRequest): 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); + this.denomHash = this.denomHash.bind(this); + this.escrowAddress = this.escrowAddress.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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(data))); + } + denomHash(request: QueryDenomHashRequest): Promise { + const data = QueryDenomHashRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "DenomHash", data); + return promise.then(data => QueryDenomHashResponse.decode(new _m0.Reader(data))); + } + escrowAddress(request: QueryEscrowAddressRequest): Promise { + const data = QueryEscrowAddressRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "EscrowAddress", data); + return promise.then(data => QueryEscrowAddressResponse.decode(new _m0.Reader(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); + }, + denomHash(request: QueryDenomHashRequest): Promise { + return queryService.denomHash(request); + }, + escrowAddress(request: QueryEscrowAddressRequest): Promise { + return queryService.escrowAddress(request); + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/query.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/query.ts new file mode 100644 index 000000000..484081e61 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/query.ts @@ -0,0 +1,593 @@ +import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; +import { DenomTrace, DenomTraceSDKType, Params, ParamsSDKType } from "./transfer"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** + * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC + * method + */ +export interface QueryDenomTraceRequest { + /** hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. */ + hash: string; +} +/** + * 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; +} +/** + * QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC + * method. + */ +export interface QueryDenomTraceResponseSDKType { + denom_trace?: DenomTraceSDKType; +} +/** + * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC + * method + */ +export interface QueryDenomTracesRequest { + /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; +} +/** + * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC + * method + */ +export interface QueryDenomTracesRequestSDKType { + pagination?: PageRequestSDKType; +} +/** + * 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; +} +/** + * QueryConnectionsResponse is the response type for the Query/DenomTraces RPC + * method. + */ +export interface QueryDenomTracesResponseSDKType { + denom_traces: DenomTraceSDKType[]; + pagination?: PageResponseSDKType; +} +/** QueryParamsRequest is the request type for the Query/Params RPC method. */ +export interface QueryParamsRequest {} +/** 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; +} +/** QueryParamsResponse is the response type for the Query/Params RPC method. */ +export interface QueryParamsResponseSDKType { + params?: ParamsSDKType; +} +/** + * QueryDenomHashRequest is the request type for the Query/DenomHash RPC + * method + */ +export interface QueryDenomHashRequest { + /** The denomination trace ([port_id]/[channel_id])+/[denom] */ + trace: string; +} +/** + * QueryDenomHashRequest is the request type for the Query/DenomHash RPC + * method + */ +export interface QueryDenomHashRequestSDKType { + trace: string; +} +/** + * QueryDenomHashResponse is the response type for the Query/DenomHash RPC + * method. + */ +export interface QueryDenomHashResponse { + /** hash (in hex format) of the denomination trace information. */ + hash: string; +} +/** + * QueryDenomHashResponse is the response type for the Query/DenomHash RPC + * method. + */ +export interface QueryDenomHashResponseSDKType { + hash: string; +} +/** QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. */ +export interface QueryEscrowAddressRequest { + /** unique port identifier */ + portId: string; + /** unique channel identifier */ + channelId: string; +} +/** QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. */ +export interface QueryEscrowAddressRequestSDKType { + port_id: string; + channel_id: string; +} +/** QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. */ +export interface QueryEscrowAddressResponse { + /** the escrow account address */ + escrowAddress: string; +} +/** QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. */ +export interface QueryEscrowAddressResponseSDKType { + escrow_address: string; +} +function createBaseQueryDenomTraceRequest(): QueryDenomTraceRequest { + return { + hash: "" + }; +} +export const QueryDenomTraceRequest = { + encode(message: QueryDenomTraceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.hash !== "") { + writer.uint32(10).string(message.hash); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomTraceRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryDenomTraceRequest { + const message = createBaseQueryDenomTraceRequest(); + message.hash = object.hash ?? ""; + return message; + } +}; +function createBaseQueryDenomTraceResponse(): QueryDenomTraceResponse { + return { + denomTrace: undefined + }; +} +export const QueryDenomTraceResponse = { + encode(message: QueryDenomTraceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.denomTrace !== undefined) { + DenomTrace.encode(message.denomTrace, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomTraceResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryDenomTraceResponse { + const message = createBaseQueryDenomTraceResponse(); + message.denomTrace = object.denomTrace !== undefined && object.denomTrace !== null ? DenomTrace.fromPartial(object.denomTrace) : undefined; + return message; + } +}; +function createBaseQueryDenomTracesRequest(): QueryDenomTracesRequest { + return { + pagination: undefined + }; +} +export const QueryDenomTracesRequest = { + encode(message: QueryDenomTracesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomTracesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryDenomTracesRequest { + const message = createBaseQueryDenomTracesRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryDenomTracesResponse(): QueryDenomTracesResponse { + return { + denomTraces: [], + pagination: undefined + }; +} +export const QueryDenomTracesResponse = { + encode(message: QueryDenomTracesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryDenomTracesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryParamsRequest(): QueryParamsRequest { + return {}; +} +export const QueryParamsRequest = { + encode(_: QueryParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): QueryParamsRequest { + const message = createBaseQueryParamsRequest(); + return message; + } +}; +function createBaseQueryParamsResponse(): QueryParamsResponse { + return { + params: undefined + }; +} +export const QueryParamsResponse = { + encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryParamsResponse { + const message = createBaseQueryParamsResponse(); + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + return message; + } +}; +function createBaseQueryDenomHashRequest(): QueryDenomHashRequest { + return { + trace: "" + }; +} +export const QueryDenomHashRequest = { + encode(message: QueryDenomHashRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.trace !== "") { + writer.uint32(10).string(message.trace); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomHashRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryDenomHashRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.trace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryDenomHashRequest { + return { + trace: isSet(object.trace) ? String(object.trace) : "" + }; + }, + toJSON(message: QueryDenomHashRequest): unknown { + const obj: any = {}; + message.trace !== undefined && (obj.trace = message.trace); + return obj; + }, + fromPartial(object: Partial): QueryDenomHashRequest { + const message = createBaseQueryDenomHashRequest(); + message.trace = object.trace ?? ""; + return message; + } +}; +function createBaseQueryDenomHashResponse(): QueryDenomHashResponse { + return { + hash: "" + }; +} +export const QueryDenomHashResponse = { + encode(message: QueryDenomHashResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.hash !== "") { + writer.uint32(10).string(message.hash); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomHashResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryDenomHashResponse(); + 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): QueryDenomHashResponse { + return { + hash: isSet(object.hash) ? String(object.hash) : "" + }; + }, + toJSON(message: QueryDenomHashResponse): unknown { + const obj: any = {}; + message.hash !== undefined && (obj.hash = message.hash); + return obj; + }, + fromPartial(object: Partial): QueryDenomHashResponse { + const message = createBaseQueryDenomHashResponse(); + message.hash = object.hash ?? ""; + return message; + } +}; +function createBaseQueryEscrowAddressRequest(): QueryEscrowAddressRequest { + return { + portId: "", + channelId: "" + }; +} +export const QueryEscrowAddressRequest = { + encode(message: QueryEscrowAddressRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryEscrowAddressRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryEscrowAddressRequest(); + 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): QueryEscrowAddressRequest { + return { + portId: isSet(object.portId) ? String(object.portId) : "", + channelId: isSet(object.channelId) ? String(object.channelId) : "" + }; + }, + toJSON(message: QueryEscrowAddressRequest): unknown { + const obj: any = {}; + message.portId !== undefined && (obj.portId = message.portId); + message.channelId !== undefined && (obj.channelId = message.channelId); + return obj; + }, + fromPartial(object: Partial): QueryEscrowAddressRequest { + const message = createBaseQueryEscrowAddressRequest(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + return message; + } +}; +function createBaseQueryEscrowAddressResponse(): QueryEscrowAddressResponse { + return { + escrowAddress: "" + }; +} +export const QueryEscrowAddressResponse = { + encode(message: QueryEscrowAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.escrowAddress !== "") { + writer.uint32(10).string(message.escrowAddress); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryEscrowAddressResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryEscrowAddressResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.escrowAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): QueryEscrowAddressResponse { + return { + escrowAddress: isSet(object.escrowAddress) ? String(object.escrowAddress) : "" + }; + }, + toJSON(message: QueryEscrowAddressResponse): unknown { + const obj: any = {}; + message.escrowAddress !== undefined && (obj.escrowAddress = message.escrowAddress); + return obj; + }, + fromPartial(object: Partial): QueryEscrowAddressResponse { + const message = createBaseQueryEscrowAddressResponse(); + message.escrowAddress = object.escrowAddress ?? ""; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/transfer.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/transfer.ts new file mode 100644 index 000000000..1a14766cf --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/transfer.ts @@ -0,0 +1,161 @@ +import * as _m0 from "protobufjs/minimal"; +import { isSet } 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; +} +/** + * 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; +} +/** + * 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 = { + encode(message: DenomTrace, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.path !== "") { + writer.uint32(10).string(message.path); + } + if (message.baseDenom !== "") { + writer.uint32(18).string(message.baseDenom); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): DenomTrace { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): DenomTrace { + const message = createBaseDenomTrace(); + message.path = object.path ?? ""; + message.baseDenom = object.baseDenom ?? ""; + return message; + } +}; +function createBaseParams(): Params { + return { + sendEnabled: false, + receiveEnabled: false + }; +} +export const Params = { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sendEnabled === true) { + writer.uint32(8).bool(message.sendEnabled); + } + if (message.receiveEnabled === true) { + writer.uint32(16).bool(message.receiveEnabled); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Params { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): Params { + const message = createBaseParams(); + message.sendEnabled = object.sendEnabled ?? false; + message.receiveEnabled = object.receiveEnabled ?? false; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.amino.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.amino.ts new file mode 100644 index 000000000..426b98777 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.amino.ts @@ -0,0 +1,78 @@ +import { AminoMsg } from "@cosmjs/amino"; +import { AminoHeight, omitDefault } from "../../../../helpers"; +import { MsgTransfer } from "./tx"; +export interface MsgTransferAminoType extends AminoMsg { + type: "cosmos-sdk/MsgTransfer"; + value: { + source_port: string; + source_channel: string; + token: { + denom: string; + amount: string; + }; + sender: string; + receiver: string; + timeout_height: AminoHeight; + timeout_timestamp: string; + memo: string; + }; +} +export const AminoConverter = { + "/ibc.applications.transfer.v1.MsgTransfer": { + aminoType: "cosmos-sdk/MsgTransfer", + toAmino: ({ + sourcePort, + sourceChannel, + token, + sender, + receiver, + timeoutHeight, + timeoutTimestamp, + memo + }: MsgTransfer): MsgTransferAminoType["value"] => { + return { + source_port: sourcePort, + source_channel: sourceChannel, + token: { + denom: token.denom, + amount: token.amount + }, + sender, + receiver, + timeout_height: timeoutHeight ? { + revision_height: omitDefault(timeoutHeight.revisionHeight)?.toString(), + revision_number: omitDefault(timeoutHeight.revisionNumber)?.toString() + } : {}, + timeout_timestamp: timeoutTimestamp.toString(), + memo + }; + }, + fromAmino: ({ + source_port, + source_channel, + token, + sender, + receiver, + timeout_height, + timeout_timestamp, + memo + }: MsgTransferAminoType["value"]): MsgTransfer => { + return { + sourcePort: source_port, + sourceChannel: source_channel, + token: { + denom: token.denom, + amount: token.amount + }, + sender, + receiver, + timeoutHeight: timeout_height ? { + revisionHeight: BigInt(timeout_height.revision_height || "0", true), + revisionNumber: BigInt(timeout_height.revision_number || "0", true) + } : undefined, + timeoutTimestamp: BigInt(timeout_timestamp), + memo + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.registry.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.registry.ts new file mode 100644 index 000000000..64de27348 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.registry.ts @@ -0,0 +1,50 @@ +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/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.rpc.msg.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.rpc.msg.ts new file mode 100644 index 000000000..4a3f7c4c5 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.rpc.msg.ts @@ -0,0 +1,20 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +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 _m0.Reader(data))); + } +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.ts new file mode 100644 index 000000000..556e06519 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v1/tx.ts @@ -0,0 +1,217 @@ +import { Coin, CoinSDKType } from "../../../../cosmos/base/v1beta1/coin"; +import { Height, HeightSDKType } from "../../../core/client/v1/client"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet } 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; + /** 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; + /** + * Timeout timestamp in absolute nanoseconds since unix epoch. + * The timeout is disabled when set to 0. + */ + timeoutTimestamp: bigint; + /** optional memo */ + memo: string; +} +/** + * 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; + sender: string; + receiver: string; + timeout_height?: HeightSDKType; + timeout_timestamp: bigint; + memo: string; +} +/** MsgTransferResponse defines the Msg/Transfer response type. */ +export interface MsgTransferResponse { + /** sequence number of the transfer packet sent */ + sequence: bigint; +} +/** MsgTransferResponse defines the Msg/Transfer response type. */ +export interface MsgTransferResponseSDKType { + sequence: bigint; +} +function createBaseMsgTransfer(): MsgTransfer { + return { + sourcePort: "", + sourceChannel: "", + token: undefined, + sender: "", + receiver: "", + timeoutHeight: undefined, + timeoutTimestamp: BigInt("0"), + memo: "" + }; +} +export const MsgTransfer = { + encode(message: MsgTransfer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.timeoutTimestamp.toString())); + } + if (message.memo !== "") { + writer.uint32(66).string(message.memo); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgTransfer { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 8: + message.memo = reader.string(); + 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"), + memo: isSet(object.memo) ? String(object.memo) : "" + }; + }, + 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()); + message.memo !== undefined && (obj.memo = message.memo); + return obj; + }, + fromPartial(object: Partial): 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"); + message.memo = object.memo ?? ""; + return message; + } +}; +function createBaseMsgTransferResponse(): MsgTransferResponse { + return { + sequence: BigInt("0") + }; +} +export const MsgTransferResponse = { + encode(message: MsgTransferResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgTransferResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgTransferResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sequence = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgTransferResponse { + return { + sequence: isSet(object.sequence) ? BigInt(object.sequence.toString()) : BigInt("0") + }; + }, + toJSON(message: MsgTransferResponse): unknown { + const obj: any = {}; + message.sequence !== undefined && (obj.sequence = (message.sequence || BigInt("0")).toString()); + return obj; + }, + fromPartial(object: Partial): MsgTransferResponse { + const message = createBaseMsgTransferResponse(); + message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt("0"); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/applications/transfer/v2/packet.ts b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v2/packet.ts new file mode 100644 index 000000000..8ecd71d00 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/applications/transfer/v2/packet.ts @@ -0,0 +1,116 @@ +import * as _m0 from "protobufjs/minimal"; +import { isSet } 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; + /** optional memo */ + memo: string; +} +/** + * 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; + memo: string; +} +function createBaseFungibleTokenPacketData(): FungibleTokenPacketData { + return { + denom: "", + amount: "", + sender: "", + receiver: "", + memo: "" + }; +} +export const FungibleTokenPacketData = { + encode(message: FungibleTokenPacketData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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); + } + if (message.memo !== "") { + writer.uint32(42).string(message.memo); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): FungibleTokenPacketData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; + case 5: + message.memo = 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) : "", + memo: isSet(object.memo) ? String(object.memo) : "" + }; + }, + 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); + message.memo !== undefined && (obj.memo = message.memo); + return obj; + }, + fromPartial(object: Partial): FungibleTokenPacketData { + const message = createBaseFungibleTokenPacketData(); + message.denom = object.denom ?? ""; + message.amount = object.amount ?? ""; + message.sender = object.sender ?? ""; + message.receiver = object.receiver ?? ""; + message.memo = object.memo ?? ""; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/bundle.ts b/frontend/empowerjs/src/codegen/ibc/bundle.ts new file mode 100644 index 000000000..c108686c0 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/bundle.ts @@ -0,0 +1,196 @@ +import * as _159 from "./applications/fee/v1/ack"; +import * as _160 from "./applications/fee/v1/fee"; +import * as _161 from "./applications/fee/v1/genesis"; +import * as _162 from "./applications/fee/v1/metadata"; +import * as _163 from "./applications/fee/v1/query"; +import * as _164 from "./applications/fee/v1/tx"; +import * as _165 from "./applications/interchain_accounts/controller/v1/controller"; +import * as _166 from "./applications/interchain_accounts/controller/v1/query"; +import * as _167 from "./applications/interchain_accounts/controller/v1/tx"; +import * as _168 from "./applications/interchain_accounts/genesis/v1/genesis"; +import * as _169 from "./applications/interchain_accounts/host/v1/host"; +import * as _170 from "./applications/interchain_accounts/host/v1/query"; +import * as _171 from "./applications/interchain_accounts/v1/account"; +import * as _172 from "./applications/interchain_accounts/v1/metadata"; +import * as _173 from "./applications/interchain_accounts/v1/packet"; +import * as _174 from "./applications/transfer/v1/authz"; +import * as _175 from "./applications/transfer/v1/genesis"; +import * as _176 from "./applications/transfer/v1/query"; +import * as _177 from "./applications/transfer/v1/transfer"; +import * as _178 from "./applications/transfer/v1/tx"; +import * as _179 from "./applications/transfer/v2/packet"; +import * as _180 from "./core/channel/v1/channel"; +import * as _181 from "./core/channel/v1/genesis"; +import * as _182 from "./core/channel/v1/query"; +import * as _183 from "./core/channel/v1/tx"; +import * as _184 from "./core/client/v1/client"; +import * as _185 from "./core/client/v1/genesis"; +import * as _186 from "./core/client/v1/query"; +import * as _187 from "./core/client/v1/tx"; +import * as _188 from "./core/commitment/v1/commitment"; +import * as _189 from "./core/connection/v1/connection"; +import * as _190 from "./core/connection/v1/genesis"; +import * as _191 from "./core/connection/v1/query"; +import * as _192 from "./core/connection/v1/tx"; +import * as _193 from "./core/types/v1/genesis"; +import * as _194 from "./lightclients/solomachine/v2/solomachine"; +import * as _195 from "./lightclients/solomachine/v3/solomachine"; +import * as _196 from "./lightclients/tendermint/v1/tendermint"; +import * as _297 from "./applications/fee/v1/tx.amino"; +import * as _298 from "./applications/interchain_accounts/controller/v1/tx.amino"; +import * as _299 from "./applications/transfer/v1/tx.amino"; +import * as _300 from "./core/channel/v1/tx.amino"; +import * as _301 from "./core/client/v1/tx.amino"; +import * as _302 from "./core/connection/v1/tx.amino"; +import * as _303 from "./applications/fee/v1/tx.registry"; +import * as _304 from "./applications/interchain_accounts/controller/v1/tx.registry"; +import * as _305 from "./applications/transfer/v1/tx.registry"; +import * as _306 from "./core/channel/v1/tx.registry"; +import * as _307 from "./core/client/v1/tx.registry"; +import * as _308 from "./core/connection/v1/tx.registry"; +import * as _309 from "./applications/fee/v1/query.rpc.Query"; +import * as _310 from "./applications/interchain_accounts/controller/v1/query.rpc.Query"; +import * as _311 from "./applications/interchain_accounts/host/v1/query.rpc.Query"; +import * as _312 from "./applications/transfer/v1/query.rpc.Query"; +import * as _313 from "./core/channel/v1/query.rpc.Query"; +import * as _314 from "./core/client/v1/query.rpc.Query"; +import * as _315 from "./core/connection/v1/query.rpc.Query"; +import * as _316 from "./applications/fee/v1/tx.rpc.msg"; +import * as _317 from "./applications/interchain_accounts/controller/v1/tx.rpc.msg"; +import * as _318 from "./applications/transfer/v1/tx.rpc.msg"; +import * as _319 from "./core/channel/v1/tx.rpc.msg"; +import * as _320 from "./core/client/v1/tx.rpc.msg"; +import * as _321 from "./core/connection/v1/tx.rpc.msg"; +import * as _328 from "./rpc.query"; +import * as _329 from "./rpc.tx"; +export namespace ibc { + export namespace applications { + export namespace fee { + export const v1 = { + ..._159, + ..._160, + ..._161, + ..._162, + ..._163, + ..._164, + ..._297, + ..._303, + ..._309, + ..._316 + }; + } + export namespace interchain_accounts { + export namespace controller { + export const v1 = { + ..._165, + ..._166, + ..._167, + ..._298, + ..._304, + ..._310, + ..._317 + }; + } + export namespace genesis { + export const v1 = { + ..._168 + }; + } + export namespace host { + export const v1 = { + ..._169, + ..._170, + ..._311 + }; + } + export const v1 = { + ..._171, + ..._172, + ..._173 + }; + } + export namespace transfer { + export const v1 = { + ..._174, + ..._175, + ..._176, + ..._177, + ..._178, + ..._299, + ..._305, + ..._312, + ..._318 + }; + export const v2 = { + ..._179 + }; + } + } + export namespace core { + export namespace channel { + export const v1 = { + ..._180, + ..._181, + ..._182, + ..._183, + ..._300, + ..._306, + ..._313, + ..._319 + }; + } + export namespace client { + export const v1 = { + ..._184, + ..._185, + ..._186, + ..._187, + ..._301, + ..._307, + ..._314, + ..._320 + }; + } + export namespace commitment { + export const v1 = { + ..._188 + }; + } + export namespace connection { + export const v1 = { + ..._189, + ..._190, + ..._191, + ..._192, + ..._302, + ..._308, + ..._315, + ..._321 + }; + } + export namespace types { + export const v1 = { + ..._193 + }; + } + } + export namespace lightclients { + export namespace solomachine { + export const v2 = { + ..._194 + }; + export const v3 = { + ..._195 + }; + } + export namespace tendermint { + export const v1 = { + ..._196 + }; + } + } + export const ClientFactory = { + ..._328, + ..._329 + }; +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/client.ts b/frontend/empowerjs/src/codegen/ibc/client.ts new file mode 100644 index 000000000..7c8d923ac --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/client.ts @@ -0,0 +1,62 @@ +import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; +import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; +import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; +import * as ibcApplicationsFeeV1TxRegistry from "./applications/fee/v1/tx.registry"; +import * as ibcApplicationsInterchainAccountsControllerV1TxRegistry from "./applications/interchain_accounts/controller/v1/tx.registry"; +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 ibcApplicationsFeeV1TxAmino from "./applications/fee/v1/tx.amino"; +import * as ibcApplicationsInterchainAccountsControllerV1TxAmino from "./applications/interchain_accounts/controller/v1/tx.amino"; +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 = { + ...ibcApplicationsFeeV1TxAmino.AminoConverter, + ...ibcApplicationsInterchainAccountsControllerV1TxAmino.AminoConverter, + ...ibcApplicationsTransferV1TxAmino.AminoConverter, + ...ibcCoreChannelV1TxAmino.AminoConverter, + ...ibcCoreClientV1TxAmino.AminoConverter, + ...ibcCoreConnectionV1TxAmino.AminoConverter +}; +export const ibcProtoRegistry: ReadonlyArray<[string, GeneratedType]> = [...ibcApplicationsFeeV1TxRegistry.registry, ...ibcApplicationsInterchainAccountsControllerV1TxRegistry.registry, ...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, + aminoTypes + }); + return client; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/channel/v1/channel.ts b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/channel.ts new file mode 100644 index 000000000..582fe21f4 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/channel.ts @@ -0,0 +1,865 @@ +import { Height, HeightSDKType } from "../../client/v1/client"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, Long, 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 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 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; + /** + * 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; +} +/** + * 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; + 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; + /** + * 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; +} +/** + * IdentifiedChannel defines a channel with additional port and channel + * identifier fields. + */ +export interface IdentifiedChannelSDKType { + state: State; + ordering: Order; + counterparty?: CounterpartySDKType; + 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; +} +/** 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; + /** block timestamp (in nanoseconds) after which the packet times out */ + timeoutTimestamp: bigint; +} +/** 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; + 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; +} +/** + * 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; +} +/** + * PacketId is an identifer for a unique Packet + * Source chains refer to packets by source port/channel + * Destination chains refer to packets by destination port/channel + */ +export interface PacketId { + /** channel port identifier */ + portId: string; + /** channel unique identifier */ + channelId: string; + /** packet sequence */ + sequence: bigint; +} +/** + * PacketId is an identifer for a unique Packet + * Source chains refer to packets by source port/channel + * Destination chains refer to packets by destination port/channel + */ +export interface PacketIdSDKType { + port_id: string; + channel_id: string; + sequence: bigint; +} +/** + * 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; +} +/** + * 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: undefined, + connectionHops: [], + version: "" + }; +} +export const Channel = { + encode(message: Channel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): Channel { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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) : 0, + ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : 0, + 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: Partial): 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; + } +}; +function createBaseIdentifiedChannel(): IdentifiedChannel { + return { + state: 0, + ordering: 0, + counterparty: undefined, + connectionHops: [], + version: "", + portId: "", + channelId: "" + }; +} +export const IdentifiedChannel = { + encode(message: IdentifiedChannel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): IdentifiedChannel { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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) : 0, + ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : 0, + 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: Partial): 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; + } +}; +function createBaseCounterparty(): Counterparty { + return { + portId: "", + channelId: "" + }; +} +export const Counterparty = { + encode(message: Counterparty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Counterparty { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): Counterparty { + const message = createBaseCounterparty(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + return message; + } +}; +function createBasePacket(): Packet { + return { + sequence: BigInt("0"), + sourcePort: "", + sourceChannel: "", + destinationPort: "", + destinationChannel: "", + data: new Uint8Array(), + timeoutHeight: undefined, + timeoutTimestamp: BigInt("0") + }; +} +export const Packet = { + encode(message: Packet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + 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(Long.fromString(message.timeoutTimestamp.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Packet { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBasePacketState(): PacketState { + return { + portId: "", + channelId: "", + sequence: BigInt("0"), + data: new Uint8Array() + }; +} +export const PacketState = { + encode(message: PacketState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.sequence.toString())); + } + if (message.data.length !== 0) { + writer.uint32(34).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): PacketState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBasePacketId(): PacketId { + return { + portId: "", + channelId: "", + sequence: BigInt("0") + }; +} +export const PacketId = { + encode(message: PacketId, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.sequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): PacketId { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePacketId(); + 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 = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): PacketId { + 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: PacketId): 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: Partial): PacketId { + const message = createBasePacketId(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt("0"); + return message; + } +}; +function createBaseAcknowledgement(): Acknowledgement { + return { + result: undefined, + error: undefined + }; +} +export const Acknowledgement = { + encode(message: Acknowledgement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== undefined) { + writer.uint32(170).bytes(message.result); + } + if (message.error !== undefined) { + writer.uint32(178).string(message.error); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Acknowledgement { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): Acknowledgement { + const message = createBaseAcknowledgement(); + message.result = object.result ?? undefined; + message.error = object.error ?? undefined; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/channel/v1/genesis.ts b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/genesis.ts new file mode 100644 index 000000000..7a3a6b579 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/genesis.ts @@ -0,0 +1,252 @@ +import { IdentifiedChannel, IdentifiedChannelSDKType, PacketState, PacketStateSDKType } from "./channel"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet } 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; +} +/** 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; +} +/** + * 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 = { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.nextChannelSequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBasePacketSequence(): PacketSequence { + return { + portId: "", + channelId: "", + sequence: BigInt("0") + }; +} +export const PacketSequence = { + encode(message: PacketSequence, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.sequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): PacketSequence { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/channel/v1/query.rpc.Query.ts b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/query.rpc.Query.ts new file mode 100644 index 000000000..8373554b4 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/query.rpc.Query.ts @@ -0,0 +1,188 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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); + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/channel/v1/query.ts b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/query.ts new file mode 100644 index 000000000..0dbd8ad90 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/query.ts @@ -0,0 +1,2246 @@ +import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; +import { Channel, ChannelSDKType, IdentifiedChannel, IdentifiedChannelSDKType, PacketState, PacketStateSDKType } from "./channel"; +import { Height, HeightSDKType, IdentifiedClientState, IdentifiedClientStateSDKType } from "../../client/v1/client"; +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, Long } 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; +} +/** 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; + /** merkle proof of existence */ + proof: Uint8Array; + /** height at which the proof was retrieved */ + proofHeight?: Height; +} +/** + * 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; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** QueryChannelsRequest is the request type for the Query/Channels RPC method */ +export interface QueryChannelsRequest { + /** pagination request */ + pagination?: PageRequest; +} +/** QueryChannelsRequest is the request type for the Query/Channels RPC method */ +export interface QueryChannelsRequestSDKType { + pagination?: PageRequestSDKType; +} +/** 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; + /** query block height */ + height?: Height; +} +/** QueryChannelsResponse is the response type for the Query/Channels RPC method. */ +export interface QueryChannelsResponseSDKType { + channels: IdentifiedChannelSDKType[]; + pagination?: PageResponseSDKType; + height?: HeightSDKType; +} +/** + * QueryConnectionChannelsRequest is the request type for the + * Query/QueryConnectionChannels RPC method + */ +export interface QueryConnectionChannelsRequest { + /** connection unique identifier */ + connection: string; + /** pagination request */ + pagination?: PageRequest; +} +/** + * QueryConnectionChannelsRequest is the request type for the + * Query/QueryConnectionChannels RPC method + */ +export interface QueryConnectionChannelsRequestSDKType { + connection: string; + pagination?: PageRequestSDKType; +} +/** + * 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; + /** query block height */ + height?: Height; +} +/** + * QueryConnectionChannelsResponse is the Response type for the + * Query/QueryConnectionChannels RPC method + */ +export interface QueryConnectionChannelsResponseSDKType { + channels: IdentifiedChannelSDKType[]; + pagination?: PageResponseSDKType; + height?: HeightSDKType; +} +/** + * QueryChannelClientStateRequest is the request type for the Query/ClientState + * RPC method + */ +export interface QueryChannelClientStateRequest { + /** port unique identifier */ + portId: string; + /** channel unique identifier */ + channelId: string; +} +/** + * 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; + /** merkle proof of existence */ + proof: Uint8Array; + /** height at which the proof was retrieved */ + proofHeight?: Height; +} +/** + * QueryChannelClientStateResponse is the Response type for the + * Query/QueryChannelClientState RPC method + */ +export interface QueryChannelClientStateResponseSDKType { + identified_client_state?: IdentifiedClientStateSDKType; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** + * 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; +} +/** + * 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; + /** client ID associated with the consensus state */ + clientId: string; + /** merkle proof of existence */ + proof: Uint8Array; + /** height at which the proof was retrieved */ + proofHeight?: Height; +} +/** + * QueryChannelClientStateResponse is the Response type for the + * Query/QueryChannelClientState RPC method + */ +export interface QueryChannelConsensusStateResponseSDKType { + consensus_state?: AnySDKType; + client_id: string; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * QueryPacketCommitmentsRequest is the request type for the + * Query/QueryPacketCommitments RPC method + */ +export interface QueryPacketCommitmentsRequestSDKType { + port_id: string; + channel_id: string; + pagination?: PageRequestSDKType; +} +/** + * QueryPacketCommitmentsResponse is the request type for the + * Query/QueryPacketCommitments RPC method + */ +export interface QueryPacketCommitmentsResponse { + commitments: PacketState[]; + /** pagination response */ + pagination?: PageResponse; + /** query block height */ + height?: Height; +} +/** + * QueryPacketCommitmentsResponse is the request type for the + * Query/QueryPacketCommitments RPC method + */ +export interface QueryPacketCommitmentsResponseSDKType { + commitments: PacketStateSDKType[]; + pagination?: PageResponseSDKType; + height?: HeightSDKType; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; + /** list of packet sequences */ + packetCommitmentSequences: bigint[]; +} +/** + * QueryPacketAcknowledgementsRequest is the request type for the + * Query/QueryPacketCommitments RPC method + */ +export interface QueryPacketAcknowledgementsRequestSDKType { + port_id: string; + channel_id: string; + pagination?: PageRequestSDKType; + packet_commitment_sequences: bigint[]; +} +/** + * QueryPacketAcknowledgemetsResponse is the request type for the + * Query/QueryPacketAcknowledgements RPC method + */ +export interface QueryPacketAcknowledgementsResponse { + acknowledgements: PacketState[]; + /** pagination response */ + pagination?: PageResponse; + /** query block height */ + height?: Height; +} +/** + * QueryPacketAcknowledgemetsResponse is the request type for the + * Query/QueryPacketAcknowledgements RPC method + */ +export interface QueryPacketAcknowledgementsResponseSDKType { + acknowledgements: PacketStateSDKType[]; + pagination?: PageResponseSDKType; + height?: HeightSDKType; +} +/** + * 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[]; +} +/** + * 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; +} +/** + * QueryUnreceivedPacketsResponse is the response type for the + * Query/UnreceivedPacketCommitments RPC method + */ +export interface QueryUnreceivedPacketsResponseSDKType { + sequences: bigint[]; + height?: HeightSDKType; +} +/** + * 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[]; +} +/** + * 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; +} +/** + * QueryUnreceivedAcksResponse is the response type for the + * Query/UnreceivedAcks RPC method + */ +export interface QueryUnreceivedAcksResponseSDKType { + sequences: bigint[]; + height?: HeightSDKType; +} +/** + * QueryNextSequenceReceiveRequest is the request type for the + * Query/QueryNextSequenceReceiveRequest RPC method + */ +export interface QueryNextSequenceReceiveRequest { + /** port unique identifier */ + portId: string; + /** channel unique identifier */ + channelId: string; +} +/** + * 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; +} +/** + * QuerySequenceResponse is the request type for the + * Query/QueryNextSequenceReceiveResponse RPC method + */ +export interface QueryNextSequenceReceiveResponseSDKType { + next_sequence_receive: bigint; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +function createBaseQueryChannelRequest(): QueryChannelRequest { + return { + portId: "", + channelId: "" + }; +} +export const QueryChannelRequest = { + encode(message: QueryChannelRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryChannelRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryChannelRequest { + const message = createBaseQueryChannelRequest(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + return message; + } +}; +function createBaseQueryChannelResponse(): QueryChannelResponse { + return { + channel: undefined, + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryChannelResponse = { + encode(message: QueryChannelResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryChannelResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryChannelsRequest(): QueryChannelsRequest { + return { + pagination: undefined + }; +} +export const QueryChannelsRequest = { + encode(message: QueryChannelsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryChannelsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryChannelsRequest { + const message = createBaseQueryChannelsRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryChannelsResponse(): QueryChannelsResponse { + return { + channels: [], + pagination: undefined, + height: undefined + }; +} +export const QueryChannelsResponse = { + encode(message: QueryChannelsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryChannelsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryConnectionChannelsRequest(): QueryConnectionChannelsRequest { + return { + connection: "", + pagination: undefined + }; +} +export const QueryConnectionChannelsRequest = { + encode(message: QueryConnectionChannelsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConnectionChannelsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryConnectionChannelsRequest { + const message = createBaseQueryConnectionChannelsRequest(); + message.connection = object.connection ?? ""; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryConnectionChannelsResponse(): QueryConnectionChannelsResponse { + return { + channels: [], + pagination: undefined, + height: undefined + }; +} +export const QueryConnectionChannelsResponse = { + encode(message: QueryConnectionChannelsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConnectionChannelsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryChannelClientStateRequest(): QueryChannelClientStateRequest { + return { + portId: "", + channelId: "" + }; +} +export const QueryChannelClientStateRequest = { + encode(message: QueryChannelClientStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryChannelClientStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryChannelClientStateRequest { + const message = createBaseQueryChannelClientStateRequest(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + return message; + } +}; +function createBaseQueryChannelClientStateResponse(): QueryChannelClientStateResponse { + return { + identifiedClientState: undefined, + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryChannelClientStateResponse = { + encode(message: QueryChannelClientStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryChannelClientStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryChannelConsensusStateRequest(): QueryChannelConsensusStateRequest { + return { + portId: "", + channelId: "", + revisionNumber: BigInt("0"), + revisionHeight: BigInt("0") + }; +} +export const QueryChannelConsensusStateRequest = { + encode(message: QueryChannelConsensusStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.revisionNumber.toString())); + } + if (message.revisionHeight !== BigInt(0)) { + writer.uint32(32).uint64(Long.fromString(message.revisionHeight.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryChannelConsensusStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 4: + message.revisionHeight = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseQueryChannelConsensusStateResponse(): QueryChannelConsensusStateResponse { + return { + consensusState: undefined, + clientId: "", + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryChannelConsensusStateResponse = { + encode(message: QueryChannelConsensusStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryChannelConsensusStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryPacketCommitmentRequest(): QueryPacketCommitmentRequest { + return { + portId: "", + channelId: "", + sequence: BigInt("0") + }; +} +export const QueryPacketCommitmentRequest = { + encode(message: QueryPacketCommitmentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.sequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPacketCommitmentRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseQueryPacketCommitmentResponse(): QueryPacketCommitmentResponse { + return { + commitment: new Uint8Array(), + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryPacketCommitmentResponse = { + encode(message: QueryPacketCommitmentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryPacketCommitmentResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryPacketCommitmentsRequest(): QueryPacketCommitmentsRequest { + return { + portId: "", + channelId: "", + pagination: undefined + }; +} +export const QueryPacketCommitmentsRequest = { + encode(message: QueryPacketCommitmentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryPacketCommitmentsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryPacketCommitmentsResponse(): QueryPacketCommitmentsResponse { + return { + commitments: [], + pagination: undefined, + height: undefined + }; +} +export const QueryPacketCommitmentsResponse = { + encode(message: QueryPacketCommitmentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryPacketCommitmentsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryPacketReceiptRequest(): QueryPacketReceiptRequest { + return { + portId: "", + channelId: "", + sequence: BigInt("0") + }; +} +export const QueryPacketReceiptRequest = { + encode(message: QueryPacketReceiptRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.sequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPacketReceiptRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseQueryPacketReceiptResponse(): QueryPacketReceiptResponse { + return { + received: false, + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryPacketReceiptResponse = { + encode(message: QueryPacketReceiptResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryPacketReceiptResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryPacketAcknowledgementRequest(): QueryPacketAcknowledgementRequest { + return { + portId: "", + channelId: "", + sequence: BigInt("0") + }; +} +export const QueryPacketAcknowledgementRequest = { + encode(message: QueryPacketAcknowledgementRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.sequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPacketAcknowledgementRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseQueryPacketAcknowledgementResponse(): QueryPacketAcknowledgementResponse { + return { + acknowledgement: new Uint8Array(), + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryPacketAcknowledgementResponse = { + encode(message: QueryPacketAcknowledgementResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryPacketAcknowledgementResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryPacketAcknowledgementsRequest(): QueryPacketAcknowledgementsRequest { + return { + portId: "", + channelId: "", + pagination: undefined, + packetCommitmentSequences: [] + }; +} +export const QueryPacketAcknowledgementsRequest = { + encode(message: QueryPacketAcknowledgementsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(v.toString())); + } + writer.ldelim(); + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPacketAcknowledgementsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(BigInt(reader.uint64().toString())); + } + } else { + message.packetCommitmentSequences.push(BigInt(reader.uint64().toString())); + } + 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: Partial): 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; + } +}; +function createBaseQueryPacketAcknowledgementsResponse(): QueryPacketAcknowledgementsResponse { + return { + acknowledgements: [], + pagination: undefined, + height: undefined + }; +} +export const QueryPacketAcknowledgementsResponse = { + encode(message: QueryPacketAcknowledgementsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryPacketAcknowledgementsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryUnreceivedPacketsRequest(): QueryUnreceivedPacketsRequest { + return { + portId: "", + channelId: "", + packetCommitmentSequences: [] + }; +} +export const QueryUnreceivedPacketsRequest = { + encode(message: QueryUnreceivedPacketsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(v.toString())); + } + writer.ldelim(); + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryUnreceivedPacketsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(BigInt(reader.uint64().toString())); + } + } else { + message.packetCommitmentSequences.push(BigInt(reader.uint64().toString())); + } + 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: Partial): QueryUnreceivedPacketsRequest { + const message = createBaseQueryUnreceivedPacketsRequest(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + message.packetCommitmentSequences = object.packetCommitmentSequences?.map(e => BigInt(e.toString())) || []; + return message; + } +}; +function createBaseQueryUnreceivedPacketsResponse(): QueryUnreceivedPacketsResponse { + return { + sequences: [], + height: undefined + }; +} +export const QueryUnreceivedPacketsResponse = { + encode(message: QueryUnreceivedPacketsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + writer.uint32(10).fork(); + for (const v of message.sequences) { + writer.uint64(Long.fromString(v.toString())); + } + writer.ldelim(); + if (message.height !== undefined) { + Height.encode(message.height, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryUnreceivedPacketsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(BigInt(reader.uint64().toString())); + } + } else { + message.sequences.push(BigInt(reader.uint64().toString())); + } + 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: Partial): 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; + } +}; +function createBaseQueryUnreceivedAcksRequest(): QueryUnreceivedAcksRequest { + return { + portId: "", + channelId: "", + packetAckSequences: [] + }; +} +export const QueryUnreceivedAcksRequest = { + encode(message: QueryUnreceivedAcksRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(v.toString())); + } + writer.ldelim(); + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryUnreceivedAcksRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(BigInt(reader.uint64().toString())); + } + } else { + message.packetAckSequences.push(BigInt(reader.uint64().toString())); + } + 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: Partial): QueryUnreceivedAcksRequest { + const message = createBaseQueryUnreceivedAcksRequest(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + message.packetAckSequences = object.packetAckSequences?.map(e => BigInt(e.toString())) || []; + return message; + } +}; +function createBaseQueryUnreceivedAcksResponse(): QueryUnreceivedAcksResponse { + return { + sequences: [], + height: undefined + }; +} +export const QueryUnreceivedAcksResponse = { + encode(message: QueryUnreceivedAcksResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + writer.uint32(10).fork(); + for (const v of message.sequences) { + writer.uint64(Long.fromString(v.toString())); + } + writer.ldelim(); + if (message.height !== undefined) { + Height.encode(message.height, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryUnreceivedAcksResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(BigInt(reader.uint64().toString())); + } + } else { + message.sequences.push(BigInt(reader.uint64().toString())); + } + 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: Partial): 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; + } +}; +function createBaseQueryNextSequenceReceiveRequest(): QueryNextSequenceReceiveRequest { + return { + portId: "", + channelId: "" + }; +} +export const QueryNextSequenceReceiveRequest = { + encode(message: QueryNextSequenceReceiveRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.portId !== "") { + writer.uint32(10).string(message.portId); + } + if (message.channelId !== "") { + writer.uint32(18).string(message.channelId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryNextSequenceReceiveRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryNextSequenceReceiveRequest { + const message = createBaseQueryNextSequenceReceiveRequest(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + return message; + } +}; +function createBaseQueryNextSequenceReceiveResponse(): QueryNextSequenceReceiveResponse { + return { + nextSequenceReceive: BigInt("0"), + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryNextSequenceReceiveResponse = { + encode(message: QueryNextSequenceReceiveResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.nextSequenceReceive !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.nextSequenceReceive.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): QueryNextSequenceReceiveResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.amino.ts b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.amino.ts new file mode 100644 index 000000000..79782ea32 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.amino.ts @@ -0,0 +1,670 @@ +import { stateFromJSON, orderFromJSON } from "./channel"; +import { AminoMsg } from "@cosmjs/amino"; +import { AminoHeight, omitDefault } from "../../../../helpers"; +import { MsgChannelOpenInit, MsgChannelOpenTry, MsgChannelOpenAck, MsgChannelOpenConfirm, MsgChannelCloseInit, MsgChannelCloseConfirm, MsgRecvPacket, MsgTimeout, MsgTimeoutOnClose, MsgAcknowledgement } from "./tx"; +export interface MsgChannelOpenInitAminoType extends AminoMsg { + type: "cosmos-sdk/MsgChannelOpenInit"; + value: { + port_id: string; + channel: { + state: number; + ordering: number; + counterparty: { + port_id: string; + channel_id: string; + }; + connection_hops: string[]; + version: string; + }; + signer: string; + }; +} +export interface MsgChannelOpenTryAminoType extends AminoMsg { + type: "cosmos-sdk/MsgChannelOpenTry"; + value: { + port_id: string; + previous_channel_id: string; + channel: { + state: number; + ordering: number; + counterparty: { + port_id: string; + channel_id: string; + }; + connection_hops: string[]; + version: string; + }; + counterparty_version: string; + proof_init: Uint8Array; + proof_height: AminoHeight; + signer: string; + }; +} +export interface MsgChannelOpenAckAminoType extends AminoMsg { + type: "cosmos-sdk/MsgChannelOpenAck"; + value: { + port_id: string; + channel_id: string; + counterparty_channel_id: string; + counterparty_version: string; + proof_try: Uint8Array; + proof_height: AminoHeight; + signer: string; + }; +} +export interface MsgChannelOpenConfirmAminoType extends AminoMsg { + type: "cosmos-sdk/MsgChannelOpenConfirm"; + value: { + port_id: string; + channel_id: string; + proof_ack: Uint8Array; + proof_height: AminoHeight; + signer: string; + }; +} +export interface MsgChannelCloseInitAminoType extends AminoMsg { + type: "cosmos-sdk/MsgChannelCloseInit"; + value: { + port_id: string; + channel_id: string; + signer: string; + }; +} +export interface MsgChannelCloseConfirmAminoType extends AminoMsg { + type: "cosmos-sdk/MsgChannelCloseConfirm"; + value: { + port_id: string; + channel_id: string; + proof_init: Uint8Array; + proof_height: AminoHeight; + signer: string; + }; +} +export interface MsgRecvPacketAminoType extends AminoMsg { + type: "cosmos-sdk/MsgRecvPacket"; + value: { + packet: { + sequence: string; + source_port: string; + source_channel: string; + destination_port: string; + destination_channel: string; + data: Uint8Array; + timeout_height: AminoHeight; + timeout_timestamp: string; + }; + proof_commitment: Uint8Array; + proof_height: AminoHeight; + signer: string; + }; +} +export interface MsgTimeoutAminoType extends AminoMsg { + type: "cosmos-sdk/MsgTimeout"; + value: { + packet: { + sequence: string; + source_port: string; + source_channel: string; + destination_port: string; + destination_channel: string; + data: Uint8Array; + timeout_height: AminoHeight; + timeout_timestamp: string; + }; + proof_unreceived: Uint8Array; + proof_height: AminoHeight; + next_sequence_recv: string; + signer: string; + }; +} +export interface MsgTimeoutOnCloseAminoType extends AminoMsg { + type: "cosmos-sdk/MsgTimeoutOnClose"; + value: { + packet: { + sequence: string; + source_port: string; + source_channel: string; + destination_port: string; + destination_channel: string; + data: Uint8Array; + timeout_height: AminoHeight; + timeout_timestamp: string; + }; + proof_unreceived: Uint8Array; + proof_close: Uint8Array; + proof_height: AminoHeight; + next_sequence_recv: string; + signer: string; + }; +} +export interface MsgAcknowledgementAminoType extends AminoMsg { + type: "cosmos-sdk/MsgAcknowledgement"; + value: { + packet: { + sequence: string; + source_port: string; + source_channel: string; + destination_port: string; + destination_channel: string; + data: Uint8Array; + timeout_height: AminoHeight; + timeout_timestamp: string; + }; + acknowledgement: Uint8Array; + proof_acked: Uint8Array; + proof_height: AminoHeight; + signer: string; + }; +} +export const AminoConverter = { + "/ibc.core.channel.v1.MsgChannelOpenInit": { + aminoType: "cosmos-sdk/MsgChannelOpenInit", + toAmino: ({ + portId, + channel, + signer + }: MsgChannelOpenInit): MsgChannelOpenInitAminoType["value"] => { + return { + port_id: portId, + channel: { + state: channel.state, + ordering: channel.ordering, + counterparty: { + port_id: channel.counterparty.portId, + channel_id: channel.counterparty.channelId + }, + connection_hops: channel.connectionHops, + version: channel.version + }, + signer + }; + }, + fromAmino: ({ + port_id, + channel, + signer + }: MsgChannelOpenInitAminoType["value"]): MsgChannelOpenInit => { + return { + portId: port_id, + channel: { + state: stateFromJSON(channel.state), + ordering: orderFromJSON(channel.ordering), + counterparty: { + portId: channel.counterparty.port_id, + channelId: channel.counterparty.channel_id + }, + connectionHops: channel.connection_hops, + version: channel.version + }, + signer + }; + } + }, + "/ibc.core.channel.v1.MsgChannelOpenTry": { + aminoType: "cosmos-sdk/MsgChannelOpenTry", + toAmino: ({ + portId, + previousChannelId, + channel, + counterpartyVersion, + proofInit, + proofHeight, + signer + }: MsgChannelOpenTry): MsgChannelOpenTryAminoType["value"] => { + return { + port_id: portId, + previous_channel_id: previousChannelId, + channel: { + state: channel.state, + ordering: channel.ordering, + counterparty: { + port_id: channel.counterparty.portId, + channel_id: channel.counterparty.channelId + }, + connection_hops: channel.connectionHops, + version: channel.version + }, + counterparty_version: counterpartyVersion, + proof_init: proofInit, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + signer + }; + }, + fromAmino: ({ + port_id, + previous_channel_id, + channel, + counterparty_version, + proof_init, + proof_height, + signer + }: MsgChannelOpenTryAminoType["value"]): MsgChannelOpenTry => { + return { + portId: port_id, + previousChannelId: previous_channel_id, + channel: { + state: stateFromJSON(channel.state), + ordering: orderFromJSON(channel.ordering), + counterparty: { + portId: channel.counterparty.port_id, + channelId: channel.counterparty.channel_id + }, + connectionHops: channel.connection_hops, + version: channel.version + }, + counterpartyVersion: counterparty_version, + proofInit: proof_init, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + signer + }; + } + }, + "/ibc.core.channel.v1.MsgChannelOpenAck": { + aminoType: "cosmos-sdk/MsgChannelOpenAck", + toAmino: ({ + portId, + channelId, + counterpartyChannelId, + counterpartyVersion, + proofTry, + proofHeight, + signer + }: MsgChannelOpenAck): MsgChannelOpenAckAminoType["value"] => { + return { + port_id: portId, + channel_id: channelId, + counterparty_channel_id: counterpartyChannelId, + counterparty_version: counterpartyVersion, + proof_try: proofTry, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + signer + }; + }, + fromAmino: ({ + port_id, + channel_id, + counterparty_channel_id, + counterparty_version, + proof_try, + proof_height, + signer + }: MsgChannelOpenAckAminoType["value"]): MsgChannelOpenAck => { + return { + portId: port_id, + channelId: channel_id, + counterpartyChannelId: counterparty_channel_id, + counterpartyVersion: counterparty_version, + proofTry: proof_try, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + signer + }; + } + }, + "/ibc.core.channel.v1.MsgChannelOpenConfirm": { + aminoType: "cosmos-sdk/MsgChannelOpenConfirm", + toAmino: ({ + portId, + channelId, + proofAck, + proofHeight, + signer + }: MsgChannelOpenConfirm): MsgChannelOpenConfirmAminoType["value"] => { + return { + port_id: portId, + channel_id: channelId, + proof_ack: proofAck, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + signer + }; + }, + fromAmino: ({ + port_id, + channel_id, + proof_ack, + proof_height, + signer + }: MsgChannelOpenConfirmAminoType["value"]): MsgChannelOpenConfirm => { + return { + portId: port_id, + channelId: channel_id, + proofAck: proof_ack, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + signer + }; + } + }, + "/ibc.core.channel.v1.MsgChannelCloseInit": { + aminoType: "cosmos-sdk/MsgChannelCloseInit", + toAmino: ({ + portId, + channelId, + signer + }: MsgChannelCloseInit): MsgChannelCloseInitAminoType["value"] => { + return { + port_id: portId, + channel_id: channelId, + signer + }; + }, + fromAmino: ({ + port_id, + channel_id, + signer + }: MsgChannelCloseInitAminoType["value"]): MsgChannelCloseInit => { + return { + portId: port_id, + channelId: channel_id, + signer + }; + } + }, + "/ibc.core.channel.v1.MsgChannelCloseConfirm": { + aminoType: "cosmos-sdk/MsgChannelCloseConfirm", + toAmino: ({ + portId, + channelId, + proofInit, + proofHeight, + signer + }: MsgChannelCloseConfirm): MsgChannelCloseConfirmAminoType["value"] => { + return { + port_id: portId, + channel_id: channelId, + proof_init: proofInit, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + signer + }; + }, + fromAmino: ({ + port_id, + channel_id, + proof_init, + proof_height, + signer + }: MsgChannelCloseConfirmAminoType["value"]): MsgChannelCloseConfirm => { + return { + portId: port_id, + channelId: channel_id, + proofInit: proof_init, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + signer + }; + } + }, + "/ibc.core.channel.v1.MsgRecvPacket": { + aminoType: "cosmos-sdk/MsgRecvPacket", + toAmino: ({ + packet, + proofCommitment, + proofHeight, + signer + }: MsgRecvPacket): MsgRecvPacketAminoType["value"] => { + return { + packet: { + sequence: packet.sequence.toString(), + source_port: packet.sourcePort, + source_channel: packet.sourceChannel, + destination_port: packet.destinationPort, + destination_channel: packet.destinationChannel, + data: packet.data, + timeout_height: packet.timeoutHeight ? { + revision_height: omitDefault(packet.timeoutHeight.revisionHeight)?.toString(), + revision_number: omitDefault(packet.timeoutHeight.revisionNumber)?.toString() + } : {}, + timeout_timestamp: packet.timeoutTimestamp.toString() + }, + proof_commitment: proofCommitment, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + signer + }; + }, + fromAmino: ({ + packet, + proof_commitment, + proof_height, + signer + }: MsgRecvPacketAminoType["value"]): MsgRecvPacket => { + return { + packet: { + sequence: BigInt(packet.sequence), + sourcePort: packet.source_port, + sourceChannel: packet.source_channel, + destinationPort: packet.destination_port, + destinationChannel: packet.destination_channel, + data: packet.data, + timeoutHeight: packet.timeout_height ? { + revisionHeight: BigInt(packet.timeout_height.revision_height || "0", true), + revisionNumber: BigInt(packet.timeout_height.revision_number || "0", true) + } : undefined, + timeoutTimestamp: BigInt(packet.timeout_timestamp) + }, + proofCommitment: proof_commitment, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + signer + }; + } + }, + "/ibc.core.channel.v1.MsgTimeout": { + aminoType: "cosmos-sdk/MsgTimeout", + toAmino: ({ + packet, + proofUnreceived, + proofHeight, + nextSequenceRecv, + signer + }: MsgTimeout): MsgTimeoutAminoType["value"] => { + return { + packet: { + sequence: packet.sequence.toString(), + source_port: packet.sourcePort, + source_channel: packet.sourceChannel, + destination_port: packet.destinationPort, + destination_channel: packet.destinationChannel, + data: packet.data, + timeout_height: packet.timeoutHeight ? { + revision_height: omitDefault(packet.timeoutHeight.revisionHeight)?.toString(), + revision_number: omitDefault(packet.timeoutHeight.revisionNumber)?.toString() + } : {}, + timeout_timestamp: packet.timeoutTimestamp.toString() + }, + proof_unreceived: proofUnreceived, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + next_sequence_recv: nextSequenceRecv.toString(), + signer + }; + }, + fromAmino: ({ + packet, + proof_unreceived, + proof_height, + next_sequence_recv, + signer + }: MsgTimeoutAminoType["value"]): MsgTimeout => { + return { + packet: { + sequence: BigInt(packet.sequence), + sourcePort: packet.source_port, + sourceChannel: packet.source_channel, + destinationPort: packet.destination_port, + destinationChannel: packet.destination_channel, + data: packet.data, + timeoutHeight: packet.timeout_height ? { + revisionHeight: BigInt(packet.timeout_height.revision_height || "0", true), + revisionNumber: BigInt(packet.timeout_height.revision_number || "0", true) + } : undefined, + timeoutTimestamp: BigInt(packet.timeout_timestamp) + }, + proofUnreceived: proof_unreceived, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + nextSequenceRecv: BigInt(next_sequence_recv), + signer + }; + } + }, + "/ibc.core.channel.v1.MsgTimeoutOnClose": { + aminoType: "cosmos-sdk/MsgTimeoutOnClose", + toAmino: ({ + packet, + proofUnreceived, + proofClose, + proofHeight, + nextSequenceRecv, + signer + }: MsgTimeoutOnClose): MsgTimeoutOnCloseAminoType["value"] => { + return { + packet: { + sequence: packet.sequence.toString(), + source_port: packet.sourcePort, + source_channel: packet.sourceChannel, + destination_port: packet.destinationPort, + destination_channel: packet.destinationChannel, + data: packet.data, + timeout_height: packet.timeoutHeight ? { + revision_height: omitDefault(packet.timeoutHeight.revisionHeight)?.toString(), + revision_number: omitDefault(packet.timeoutHeight.revisionNumber)?.toString() + } : {}, + timeout_timestamp: packet.timeoutTimestamp.toString() + }, + proof_unreceived: proofUnreceived, + proof_close: proofClose, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + next_sequence_recv: nextSequenceRecv.toString(), + signer + }; + }, + fromAmino: ({ + packet, + proof_unreceived, + proof_close, + proof_height, + next_sequence_recv, + signer + }: MsgTimeoutOnCloseAminoType["value"]): MsgTimeoutOnClose => { + return { + packet: { + sequence: BigInt(packet.sequence), + sourcePort: packet.source_port, + sourceChannel: packet.source_channel, + destinationPort: packet.destination_port, + destinationChannel: packet.destination_channel, + data: packet.data, + timeoutHeight: packet.timeout_height ? { + revisionHeight: BigInt(packet.timeout_height.revision_height || "0", true), + revisionNumber: BigInt(packet.timeout_height.revision_number || "0", true) + } : undefined, + timeoutTimestamp: BigInt(packet.timeout_timestamp) + }, + proofUnreceived: proof_unreceived, + proofClose: proof_close, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + nextSequenceRecv: BigInt(next_sequence_recv), + signer + }; + } + }, + "/ibc.core.channel.v1.MsgAcknowledgement": { + aminoType: "cosmos-sdk/MsgAcknowledgement", + toAmino: ({ + packet, + acknowledgement, + proofAcked, + proofHeight, + signer + }: MsgAcknowledgement): MsgAcknowledgementAminoType["value"] => { + return { + packet: { + sequence: packet.sequence.toString(), + source_port: packet.sourcePort, + source_channel: packet.sourceChannel, + destination_port: packet.destinationPort, + destination_channel: packet.destinationChannel, + data: packet.data, + timeout_height: packet.timeoutHeight ? { + revision_height: omitDefault(packet.timeoutHeight.revisionHeight)?.toString(), + revision_number: omitDefault(packet.timeoutHeight.revisionNumber)?.toString() + } : {}, + timeout_timestamp: packet.timeoutTimestamp.toString() + }, + acknowledgement, + proof_acked: proofAcked, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + signer + }; + }, + fromAmino: ({ + packet, + acknowledgement, + proof_acked, + proof_height, + signer + }: MsgAcknowledgementAminoType["value"]): MsgAcknowledgement => { + return { + packet: { + sequence: BigInt(packet.sequence), + sourcePort: packet.source_port, + sourceChannel: packet.source_channel, + destinationPort: packet.destination_port, + destinationChannel: packet.destination_channel, + data: packet.data, + timeoutHeight: packet.timeout_height ? { + revisionHeight: BigInt(packet.timeout_height.revision_height || "0", true), + revisionNumber: BigInt(packet.timeout_height.revision_number || "0", true) + } : undefined, + timeoutTimestamp: BigInt(packet.timeout_timestamp) + }, + acknowledgement, + proofAcked: proof_acked, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + signer + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.registry.ts b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.registry.ts new file mode 100644 index 000000000..a637c775f --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.registry.ts @@ -0,0 +1,320 @@ +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/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.rpc.msg.ts b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.rpc.msg.ts new file mode 100644 index 000000000..e70543272 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.rpc.msg.ts @@ -0,0 +1,95 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(data))); + } +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.ts b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.ts new file mode 100644 index 000000000..6a29a0a47 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/channel/v1/tx.ts @@ -0,0 +1,1587 @@ +import { Channel, ChannelSDKType, Packet, PacketSDKType } from "./channel"; +import { Height, HeightSDKType } from "../../client/v1/client"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../../helpers"; +/** ResponseResultType defines the possible outcomes of the execution of a message */ +export enum ResponseResultType { + /** RESPONSE_RESULT_TYPE_UNSPECIFIED - Default zero value enumeration */ + RESPONSE_RESULT_TYPE_UNSPECIFIED = 0, + /** RESPONSE_RESULT_TYPE_NOOP - The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) */ + RESPONSE_RESULT_TYPE_NOOP = 1, + /** RESPONSE_RESULT_TYPE_SUCCESS - The message was executed successfully */ + RESPONSE_RESULT_TYPE_SUCCESS = 2, + UNRECOGNIZED = -1, +} +export const ResponseResultTypeSDKType = ResponseResultType; +export function responseResultTypeFromJSON(object: any): ResponseResultType { + switch (object) { + case 0: + case "RESPONSE_RESULT_TYPE_UNSPECIFIED": + return ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED; + case 1: + case "RESPONSE_RESULT_TYPE_NOOP": + return ResponseResultType.RESPONSE_RESULT_TYPE_NOOP; + case 2: + case "RESPONSE_RESULT_TYPE_SUCCESS": + return ResponseResultType.RESPONSE_RESULT_TYPE_SUCCESS; + case -1: + case "UNRECOGNIZED": + default: + return ResponseResultType.UNRECOGNIZED; + } +} +export function responseResultTypeToJSON(object: ResponseResultType): string { + switch (object) { + case ResponseResultType.RESPONSE_RESULT_TYPE_UNSPECIFIED: + return "RESPONSE_RESULT_TYPE_UNSPECIFIED"; + case ResponseResultType.RESPONSE_RESULT_TYPE_NOOP: + return "RESPONSE_RESULT_TYPE_NOOP"; + case ResponseResultType.RESPONSE_RESULT_TYPE_SUCCESS: + return "RESPONSE_RESULT_TYPE_SUCCESS"; + case ResponseResultType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +/** + * 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; + signer: string; +} +/** + * 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; + signer: string; +} +/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ +export interface MsgChannelOpenInitResponse { + channelId: string; + version: string; +} +/** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ +export interface MsgChannelOpenInitResponseSDKType { + channel_id: string; + version: string; +} +/** + * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel + * on Chain B. The version field within the Channel field has been deprecated. Its + * value will be ignored by core IBC. + */ +export interface MsgChannelOpenTry { + portId: string; + /** Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. */ + /** @deprecated */ + previousChannelId: string; + /** NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. */ + channel?: Channel; + counterpartyVersion: string; + proofInit: Uint8Array; + proofHeight?: Height; + signer: string; +} +/** + * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel + * on Chain B. The version field within the Channel field has been deprecated. Its + * value will be ignored by core IBC. + */ +export interface MsgChannelOpenTrySDKType { + port_id: string; + /** @deprecated */ + previous_channel_id: string; + channel?: ChannelSDKType; + counterparty_version: string; + proof_init: Uint8Array; + proof_height?: HeightSDKType; + signer: string; +} +/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ +export interface MsgChannelOpenTryResponse { + version: string; +} +/** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ +export interface MsgChannelOpenTryResponseSDKType { + version: string; +} +/** + * 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; + signer: string; +} +/** + * 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; + signer: string; +} +/** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ +export interface MsgChannelOpenAckResponse {} +/** 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; + signer: string; +} +/** + * 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; + signer: string; +} +/** + * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response + * type. + */ +export interface MsgChannelOpenConfirmResponse {} +/** + * 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; +} +/** + * 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 {} +/** 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; + signer: string; +} +/** + * 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; + signer: string; +} +/** + * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response + * type. + */ +export interface MsgChannelCloseConfirmResponse {} +/** + * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response + * type. + */ +export interface MsgChannelCloseConfirmResponseSDKType {} +/** MsgRecvPacket receives incoming IBC packet */ +export interface MsgRecvPacket { + packet?: Packet; + proofCommitment: Uint8Array; + proofHeight?: Height; + signer: string; +} +/** MsgRecvPacket receives incoming IBC packet */ +export interface MsgRecvPacketSDKType { + packet?: PacketSDKType; + proof_commitment: Uint8Array; + proof_height?: HeightSDKType; + signer: string; +} +/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ +export interface MsgRecvPacketResponse { + result: ResponseResultType; +} +/** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ +export interface MsgRecvPacketResponseSDKType { + result: ResponseResultType; +} +/** MsgTimeout receives timed-out packet */ +export interface MsgTimeout { + packet?: Packet; + proofUnreceived: Uint8Array; + proofHeight?: Height; + nextSequenceRecv: bigint; + signer: string; +} +/** MsgTimeout receives timed-out packet */ +export interface MsgTimeoutSDKType { + packet?: PacketSDKType; + proof_unreceived: Uint8Array; + proof_height?: HeightSDKType; + next_sequence_recv: bigint; + signer: string; +} +/** MsgTimeoutResponse defines the Msg/Timeout response type. */ +export interface MsgTimeoutResponse { + result: ResponseResultType; +} +/** MsgTimeoutResponse defines the Msg/Timeout response type. */ +export interface MsgTimeoutResponseSDKType { + result: ResponseResultType; +} +/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ +export interface MsgTimeoutOnClose { + packet?: Packet; + proofUnreceived: Uint8Array; + proofClose: Uint8Array; + proofHeight?: Height; + nextSequenceRecv: bigint; + signer: string; +} +/** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ +export interface MsgTimeoutOnCloseSDKType { + packet?: PacketSDKType; + proof_unreceived: Uint8Array; + proof_close: Uint8Array; + proof_height?: HeightSDKType; + next_sequence_recv: bigint; + signer: string; +} +/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ +export interface MsgTimeoutOnCloseResponse { + result: ResponseResultType; +} +/** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ +export interface MsgTimeoutOnCloseResponseSDKType { + result: ResponseResultType; +} +/** MsgAcknowledgement receives incoming IBC acknowledgement */ +export interface MsgAcknowledgement { + packet?: Packet; + acknowledgement: Uint8Array; + proofAcked: Uint8Array; + proofHeight?: Height; + signer: string; +} +/** MsgAcknowledgement receives incoming IBC acknowledgement */ +export interface MsgAcknowledgementSDKType { + packet?: PacketSDKType; + acknowledgement: Uint8Array; + proof_acked: Uint8Array; + proof_height?: HeightSDKType; + signer: string; +} +/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ +export interface MsgAcknowledgementResponse { + result: ResponseResultType; +} +/** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ +export interface MsgAcknowledgementResponseSDKType { + result: ResponseResultType; +} +function createBaseMsgChannelOpenInit(): MsgChannelOpenInit { + return { + portId: "", + channel: undefined, + signer: "" + }; +} +export const MsgChannelOpenInit = { + encode(message: MsgChannelOpenInit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenInit { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { + return { + channelId: "", + version: "" + }; +} +export const MsgChannelOpenInitResponse = { + encode(message: MsgChannelOpenInitResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.channelId !== "") { + writer.uint32(10).string(message.channelId); + } + if (message.version !== "") { + writer.uint32(18).string(message.version); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenInitResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgChannelOpenInitResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.channelId = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgChannelOpenInitResponse { + return { + channelId: isSet(object.channelId) ? String(object.channelId) : "", + version: isSet(object.version) ? String(object.version) : "" + }; + }, + toJSON(message: MsgChannelOpenInitResponse): unknown { + const obj: any = {}; + message.channelId !== undefined && (obj.channelId = message.channelId); + message.version !== undefined && (obj.version = message.version); + return obj; + }, + fromPartial(object: Partial): MsgChannelOpenInitResponse { + const message = createBaseMsgChannelOpenInitResponse(); + message.channelId = object.channelId ?? ""; + message.version = object.version ?? ""; + return message; + } +}; +function createBaseMsgChannelOpenTry(): MsgChannelOpenTry { + return { + portId: "", + previousChannelId: "", + channel: undefined, + counterpartyVersion: "", + proofInit: new Uint8Array(), + proofHeight: undefined, + signer: "" + }; +} +export const MsgChannelOpenTry = { + encode(message: MsgChannelOpenTry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenTry { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse { + return { + version: "" + }; +} +export const MsgChannelOpenTryResponse = { + encode(message: MsgChannelOpenTryResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.version !== "") { + writer.uint32(10).string(message.version); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenTryResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgChannelOpenTryResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): MsgChannelOpenTryResponse { + return { + version: isSet(object.version) ? String(object.version) : "" + }; + }, + toJSON(message: MsgChannelOpenTryResponse): unknown { + const obj: any = {}; + message.version !== undefined && (obj.version = message.version); + return obj; + }, + fromPartial(object: Partial): MsgChannelOpenTryResponse { + const message = createBaseMsgChannelOpenTryResponse(); + message.version = object.version ?? ""; + return message; + } +}; +function createBaseMsgChannelOpenAck(): MsgChannelOpenAck { + return { + portId: "", + channelId: "", + counterpartyChannelId: "", + counterpartyVersion: "", + proofTry: new Uint8Array(), + proofHeight: undefined, + signer: "" + }; +} +export const MsgChannelOpenAck = { + encode(message: MsgChannelOpenAck, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenAck { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse { + return {}; +} +export const MsgChannelOpenAckResponse = { + encode(_: MsgChannelOpenAckResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenAckResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgChannelOpenAckResponse { + const message = createBaseMsgChannelOpenAckResponse(); + return message; + } +}; +function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { + return { + portId: "", + channelId: "", + proofAck: new Uint8Array(), + proofHeight: undefined, + signer: "" + }; +} +export const MsgChannelOpenConfirm = { + encode(message: MsgChannelOpenConfirm, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenConfirm { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmResponse { + return {}; +} +export const MsgChannelOpenConfirmResponse = { + encode(_: MsgChannelOpenConfirmResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelOpenConfirmResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgChannelOpenConfirmResponse { + const message = createBaseMsgChannelOpenConfirmResponse(); + return message; + } +}; +function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { + return { + portId: "", + channelId: "", + signer: "" + }; +} +export const MsgChannelCloseInit = { + encode(message: MsgChannelCloseInit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgChannelCloseInit { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MsgChannelCloseInit { + const message = createBaseMsgChannelCloseInit(); + message.portId = object.portId ?? ""; + message.channelId = object.channelId ?? ""; + message.signer = object.signer ?? ""; + return message; + } +}; +function createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse { + return {}; +} +export const MsgChannelCloseInitResponse = { + encode(_: MsgChannelCloseInitResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelCloseInitResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgChannelCloseInitResponse { + const message = createBaseMsgChannelCloseInitResponse(); + return message; + } +}; +function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { + return { + portId: "", + channelId: "", + proofInit: new Uint8Array(), + proofHeight: undefined, + signer: "" + }; +} +export const MsgChannelCloseConfirm = { + encode(message: MsgChannelCloseConfirm, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgChannelCloseConfirm { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmResponse { + return {}; +} +export const MsgChannelCloseConfirmResponse = { + encode(_: MsgChannelCloseConfirmResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgChannelCloseConfirmResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgChannelCloseConfirmResponse { + const message = createBaseMsgChannelCloseConfirmResponse(); + return message; + } +}; +function createBaseMsgRecvPacket(): MsgRecvPacket { + return { + packet: undefined, + proofCommitment: new Uint8Array(), + proofHeight: undefined, + signer: "" + }; +} +export const MsgRecvPacket = { + encode(message: MsgRecvPacket, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgRecvPacket { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { + return { + result: 0 + }; +} +export const MsgRecvPacketResponse = { + encode(message: MsgRecvPacketResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== 0) { + writer.uint32(8).int32(message.result); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRecvPacketResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRecvPacketResponse(); + 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): MsgRecvPacketResponse { + return { + result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0 + }; + }, + toJSON(message: MsgRecvPacketResponse): unknown { + const obj: any = {}; + message.result !== undefined && (obj.result = responseResultTypeToJSON(message.result)); + return obj; + }, + fromPartial(object: Partial): MsgRecvPacketResponse { + const message = createBaseMsgRecvPacketResponse(); + message.result = object.result ?? 0; + return message; + } +}; +function createBaseMsgTimeout(): MsgTimeout { + return { + packet: undefined, + proofUnreceived: new Uint8Array(), + proofHeight: undefined, + nextSequenceRecv: BigInt("0"), + signer: "" + }; +} +export const MsgTimeout = { + encode(message: MsgTimeout, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.nextSequenceRecv.toString())); + } + if (message.signer !== "") { + writer.uint32(42).string(message.signer); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgTimeout { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { + return { + result: 0 + }; +} +export const MsgTimeoutResponse = { + encode(message: MsgTimeoutResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== 0) { + writer.uint32(8).int32(message.result); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgTimeoutResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgTimeoutResponse(); + 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): MsgTimeoutResponse { + return { + result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0 + }; + }, + toJSON(message: MsgTimeoutResponse): unknown { + const obj: any = {}; + message.result !== undefined && (obj.result = responseResultTypeToJSON(message.result)); + return obj; + }, + fromPartial(object: Partial): MsgTimeoutResponse { + const message = createBaseMsgTimeoutResponse(); + message.result = object.result ?? 0; + return message; + } +}; +function createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose { + return { + packet: undefined, + proofUnreceived: new Uint8Array(), + proofClose: new Uint8Array(), + proofHeight: undefined, + nextSequenceRecv: BigInt("0"), + signer: "" + }; +} +export const MsgTimeoutOnClose = { + encode(message: MsgTimeoutOnClose, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.nextSequenceRecv.toString())); + } + if (message.signer !== "") { + writer.uint32(50).string(message.signer); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgTimeoutOnClose { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { + return { + result: 0 + }; +} +export const MsgTimeoutOnCloseResponse = { + encode(message: MsgTimeoutOnCloseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== 0) { + writer.uint32(8).int32(message.result); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgTimeoutOnCloseResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgTimeoutOnCloseResponse(); + 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): MsgTimeoutOnCloseResponse { + return { + result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0 + }; + }, + toJSON(message: MsgTimeoutOnCloseResponse): unknown { + const obj: any = {}; + message.result !== undefined && (obj.result = responseResultTypeToJSON(message.result)); + return obj; + }, + fromPartial(object: Partial): MsgTimeoutOnCloseResponse { + const message = createBaseMsgTimeoutOnCloseResponse(); + message.result = object.result ?? 0; + return message; + } +}; +function createBaseMsgAcknowledgement(): MsgAcknowledgement { + return { + packet: undefined, + acknowledgement: new Uint8Array(), + proofAcked: new Uint8Array(), + proofHeight: undefined, + signer: "" + }; +} +export const MsgAcknowledgement = { + encode(message: MsgAcknowledgement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgAcknowledgement { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { + return { + result: 0 + }; +} +export const MsgAcknowledgementResponse = { + encode(message: MsgAcknowledgementResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.result !== 0) { + writer.uint32(8).int32(message.result); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgAcknowledgementResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgAcknowledgementResponse(); + 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): MsgAcknowledgementResponse { + return { + result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0 + }; + }, + toJSON(message: MsgAcknowledgementResponse): unknown { + const obj: any = {}; + message.result !== undefined && (obj.result = responseResultTypeToJSON(message.result)); + return obj; + }, + fromPartial(object: Partial): MsgAcknowledgementResponse { + const message = createBaseMsgAcknowledgementResponse(); + message.result = object.result ?? 0; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/client/v1/client.ts b/frontend/empowerjs/src/codegen/ibc/core/client/v1/client.ts new file mode 100644 index 000000000..ef2f5368b --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/client/v1/client.ts @@ -0,0 +1,583 @@ +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import { Plan, PlanSDKType } from "../../../../cosmos/upgrade/v1beta1/upgrade"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, Long } from "../../../../helpers"; +/** + * IdentifiedClientState defines a client state with an additional client + * identifier field. + */ +export interface IdentifiedClientState { + /** client identifier */ + clientId: string; + /** client state */ + clientState?: Any; +} +/** + * IdentifiedClientState defines a client state with an additional client + * identifier field. + */ +export interface IdentifiedClientStateSDKType { + client_id: string; + client_state?: AnySDKType; +} +/** + * ConsensusStateWithHeight defines a consensus state with an additional height + * field. + */ +export interface ConsensusStateWithHeight { + /** consensus state height */ + height?: Height; + /** consensus state */ + consensusState?: Any; +} +/** + * ConsensusStateWithHeight defines a consensus state with an additional height + * field. + */ +export interface ConsensusStateWithHeightSDKType { + height?: HeightSDKType; + consensus_state?: AnySDKType; +} +/** + * 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[]; +} +/** + * 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; +} +/** + * 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; + /** + * 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; +} +/** + * UpgradeProposal is a gov Content type for initiating an IBC breaking + * upgrade. + */ +export interface UpgradeProposalSDKType { + title: string; + description: string; + plan?: PlanSDKType; + upgraded_client_state?: AnySDKType; +} +/** + * 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; +} +/** + * 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[]; +} +/** Params defines the set of IBC light client parameters. */ +export interface ParamsSDKType { + allowed_clients: string[]; +} +function createBaseIdentifiedClientState(): IdentifiedClientState { + return { + clientId: "", + clientState: undefined + }; +} +export const IdentifiedClientState = { + encode(message: IdentifiedClientState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): IdentifiedClientState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): IdentifiedClientState { + const message = createBaseIdentifiedClientState(); + message.clientId = object.clientId ?? ""; + message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined; + return message; + } +}; +function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight { + return { + height: undefined, + consensusState: undefined + }; +} +export const ConsensusStateWithHeight = { + encode(message: ConsensusStateWithHeight, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ConsensusStateWithHeight { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseClientConsensusStates(): ClientConsensusStates { + return { + clientId: "", + consensusStates: [] + }; +} +export const ClientConsensusStates = { + encode(message: ClientConsensusStates, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ClientConsensusStates { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): ClientConsensusStates { + const message = createBaseClientConsensusStates(); + message.clientId = object.clientId ?? ""; + message.consensusStates = object.consensusStates?.map(e => ConsensusStateWithHeight.fromPartial(e)) || []; + return message; + } +}; +function createBaseClientUpdateProposal(): ClientUpdateProposal { + return { + title: "", + description: "", + subjectClientId: "", + substituteClientId: "" + }; +} +export const ClientUpdateProposal = { + encode(message: ClientUpdateProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ClientUpdateProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): ClientUpdateProposal { + const message = createBaseClientUpdateProposal(); + message.title = object.title ?? ""; + message.description = object.description ?? ""; + message.subjectClientId = object.subjectClientId ?? ""; + message.substituteClientId = object.substituteClientId ?? ""; + return message; + } +}; +function createBaseUpgradeProposal(): UpgradeProposal { + return { + title: "", + description: "", + plan: undefined, + upgradedClientState: undefined + }; +} +export const UpgradeProposal = { + encode(message: UpgradeProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): UpgradeProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseHeight(): Height { + return { + revisionNumber: BigInt("0"), + revisionHeight: BigInt("0") + }; +} +export const Height = { + encode(message: Height, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.revisionNumber !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.revisionNumber.toString())); + } + if (message.revisionHeight !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.revisionHeight.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Height { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.revisionHeight = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseParams(): Params { + return { + allowedClients: [] + }; +} +export const Params = { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.allowedClients) { + writer.uint32(10).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Params { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): Params { + const message = createBaseParams(); + message.allowedClients = object.allowedClients?.map(e => e) || []; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/client/v1/genesis.ts b/frontend/empowerjs/src/codegen/ibc/core/client/v1/genesis.ts new file mode 100644 index 000000000..4c573cf0a --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/client/v1/genesis.ts @@ -0,0 +1,281 @@ +import { IdentifiedClientState, IdentifiedClientStateSDKType, ClientConsensusStates, ClientConsensusStatesSDKType, Params, ParamsSDKType } from "./client"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, 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; + /** create localhost on initialization */ + createLocalhost: boolean; + /** the sequence for the next generated client identifier */ + nextClientSequence: bigint; +} +/** GenesisState defines the ibc client submodule's genesis state. */ +export interface GenesisStateSDKType { + clients: IdentifiedClientStateSDKType[]; + clients_consensus: ClientConsensusStatesSDKType[]; + clients_metadata: IdentifiedGenesisMetadataSDKType[]; + params?: ParamsSDKType; + 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; +} +/** + * 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[]; +} +/** + * 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: undefined, + createLocalhost: false, + nextClientSequence: BigInt("0") + }; +} +export const GenesisState = { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.nextClientSequence.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseGenesisMetadata(): GenesisMetadata { + return { + key: new Uint8Array(), + value: new Uint8Array() + }; +} +export const GenesisMetadata = { + encode(message: GenesisMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): GenesisMetadata { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): GenesisMetadata { + const message = createBaseGenesisMetadata(); + message.key = object.key ?? new Uint8Array(); + message.value = object.value ?? new Uint8Array(); + return message; + } +}; +function createBaseIdentifiedGenesisMetadata(): IdentifiedGenesisMetadata { + return { + clientId: "", + clientMetadata: [] + }; +} +export const IdentifiedGenesisMetadata = { + encode(message: IdentifiedGenesisMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): IdentifiedGenesisMetadata { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): IdentifiedGenesisMetadata { + const message = createBaseIdentifiedGenesisMetadata(); + message.clientId = object.clientId ?? ""; + message.clientMetadata = object.clientMetadata?.map(e => GenesisMetadata.fromPartial(e)) || []; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/client/v1/query.rpc.Query.ts b/frontend/empowerjs/src/codegen/ibc/core/client/v1/query.rpc.Query.ts new file mode 100644 index 000000000..611d51f5c --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/client/v1/query.rpc.Query.ts @@ -0,0 +1,126 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +import { QueryClientStateRequest, QueryClientStateResponse, QueryClientStatesRequest, QueryClientStatesResponse, QueryConsensusStateRequest, QueryConsensusStateResponse, QueryConsensusStatesRequest, QueryConsensusStatesResponse, QueryConsensusStateHeightsRequest, QueryConsensusStateHeightsResponse, 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; + /** ConsensusStateHeights queries the height of every consensus states associated with a given client. */ + consensusStateHeights(request: QueryConsensusStateHeightsRequest): Promise; + /** Status queries the status of an IBC client. */ + clientStatus(request: QueryClientStatusRequest): Promise; + /** ClientParams queries all parameters of the ibc client submodule. */ + 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.consensusStateHeights = this.consensusStateHeights.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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(data))); + } + consensusStateHeights(request: QueryConsensusStateHeightsRequest): Promise { + const data = QueryConsensusStateHeightsRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.core.client.v1.Query", "ConsensusStateHeights", data); + return promise.then(data => QueryConsensusStateHeightsResponse.decode(new _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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); + }, + consensusStateHeights(request: QueryConsensusStateHeightsRequest): Promise { + return queryService.consensusStateHeights(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); + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/client/v1/query.ts b/frontend/empowerjs/src/codegen/ibc/core/client/v1/query.ts new file mode 100644 index 000000000..b29b54f7e --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/client/v1/query.ts @@ -0,0 +1,1208 @@ +import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import { Height, HeightSDKType, IdentifiedClientState, IdentifiedClientStateSDKType, ConsensusStateWithHeight, ConsensusStateWithHeightSDKType, Params, ParamsSDKType } from "./client"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../../helpers"; +/** + * QueryClientStateRequest is the request type for the Query/ClientState RPC + * method + */ +export interface QueryClientStateRequest { + /** client state unique identifier */ + clientId: string; +} +/** + * 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; + /** merkle proof of existence */ + proof: Uint8Array; + /** height at which the proof was retrieved */ + proofHeight?: Height; +} +/** + * 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; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** + * QueryClientStatesRequest is the request type for the Query/ClientStates RPC + * method + */ +export interface QueryClientStatesRequest { + /** pagination request */ + pagination?: PageRequest; +} +/** + * QueryClientStatesRequest is the request type for the Query/ClientStates RPC + * method + */ +export interface QueryClientStatesRequestSDKType { + pagination?: PageRequestSDKType; +} +/** + * 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; +} +/** + * QueryClientStatesResponse is the response type for the Query/ClientStates RPC + * method. + */ +export interface QueryClientStatesResponseSDKType { + client_states: IdentifiedClientStateSDKType[]; + pagination?: PageResponseSDKType; +} +/** + * 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; +} +/** + * 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; + /** merkle proof of existence */ + proof: Uint8Array; + /** height at which the proof was retrieved */ + proofHeight?: Height; +} +/** + * QueryConsensusStateResponse is the response type for the Query/ConsensusState + * RPC method + */ +export interface QueryConsensusStateResponseSDKType { + consensus_state?: AnySDKType; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** + * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates + * RPC method. + */ +export interface QueryConsensusStatesRequest { + /** client identifier */ + clientId: string; + /** pagination request */ + pagination?: PageRequest; +} +/** + * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates + * RPC method. + */ +export interface QueryConsensusStatesRequestSDKType { + client_id: string; + pagination?: PageRequestSDKType; +} +/** + * 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; +} +/** + * QueryConsensusStatesResponse is the response type for the + * Query/ConsensusStates RPC method + */ +export interface QueryConsensusStatesResponseSDKType { + consensus_states: ConsensusStateWithHeightSDKType[]; + pagination?: PageResponseSDKType; +} +/** + * QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights + * RPC method. + */ +export interface QueryConsensusStateHeightsRequest { + /** client identifier */ + clientId: string; + /** pagination request */ + pagination?: PageRequest; +} +/** + * QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights + * RPC method. + */ +export interface QueryConsensusStateHeightsRequestSDKType { + client_id: string; + pagination?: PageRequestSDKType; +} +/** + * QueryConsensusStateHeightsResponse is the response type for the + * Query/ConsensusStateHeights RPC method + */ +export interface QueryConsensusStateHeightsResponse { + /** consensus state heights */ + consensusStateHeights: Height[]; + /** pagination response */ + pagination?: PageResponse; +} +/** + * QueryConsensusStateHeightsResponse is the response type for the + * Query/ConsensusStateHeights RPC method + */ +export interface QueryConsensusStateHeightsResponseSDKType { + consensus_state_heights: HeightSDKType[]; + pagination?: PageResponseSDKType; +} +/** + * QueryClientStatusRequest is the request type for the Query/ClientStatus RPC + * method + */ +export interface QueryClientStatusRequest { + /** client unique identifier */ + clientId: string; +} +/** + * 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; +} +/** + * 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 {} +/** + * 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; +} +/** + * QueryClientParamsResponse is the response type for the Query/ClientParams RPC + * method. + */ +export interface QueryClientParamsResponseSDKType { + params?: ParamsSDKType; +} +/** + * QueryUpgradedClientStateRequest is the request type for the + * Query/UpgradedClientState RPC method + */ +export interface QueryUpgradedClientStateRequest {} +/** + * 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; +} +/** + * QueryUpgradedClientStateResponse is the response type for the + * Query/UpgradedClientState RPC method. + */ +export interface QueryUpgradedClientStateResponseSDKType { + upgraded_client_state?: AnySDKType; +} +/** + * QueryUpgradedConsensusStateRequest is the request type for the + * Query/UpgradedConsensusState RPC method + */ +export interface QueryUpgradedConsensusStateRequest {} +/** + * 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; +} +/** + * QueryUpgradedConsensusStateResponse is the response type for the + * Query/UpgradedConsensusState RPC method. + */ +export interface QueryUpgradedConsensusStateResponseSDKType { + upgraded_consensus_state?: AnySDKType; +} +function createBaseQueryClientStateRequest(): QueryClientStateRequest { + return { + clientId: "" + }; +} +export const QueryClientStateRequest = { + encode(message: QueryClientStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.clientId !== "") { + writer.uint32(10).string(message.clientId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryClientStateRequest { + const message = createBaseQueryClientStateRequest(); + message.clientId = object.clientId ?? ""; + return message; + } +}; +function createBaseQueryClientStateResponse(): QueryClientStateResponse { + return { + clientState: undefined, + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryClientStateResponse = { + encode(message: QueryClientStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryClientStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryClientStatesRequest(): QueryClientStatesRequest { + return { + pagination: undefined + }; +} +export const QueryClientStatesRequest = { + encode(message: QueryClientStatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStatesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryClientStatesRequest { + const message = createBaseQueryClientStatesRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryClientStatesResponse(): QueryClientStatesResponse { + return { + clientStates: [], + pagination: undefined + }; +} +export const QueryClientStatesResponse = { + encode(message: QueryClientStatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryClientStatesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryConsensusStateRequest(): QueryConsensusStateRequest { + return { + clientId: "", + revisionNumber: BigInt("0"), + revisionHeight: BigInt("0"), + latestHeight: false + }; +} +export const QueryConsensusStateRequest = { + encode(message: QueryConsensusStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.clientId !== "") { + writer.uint32(10).string(message.clientId); + } + if (message.revisionNumber !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.revisionNumber.toString())); + } + if (message.revisionHeight !== BigInt(0)) { + writer.uint32(24).uint64(Long.fromString(message.revisionHeight.toString())); + } + if (message.latestHeight === true) { + writer.uint32(32).bool(message.latestHeight); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryConsensusStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 3: + message.revisionHeight = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseQueryConsensusStateResponse(): QueryConsensusStateResponse { + return { + consensusState: undefined, + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryConsensusStateResponse = { + encode(message: QueryConsensusStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConsensusStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryConsensusStatesRequest(): QueryConsensusStatesRequest { + return { + clientId: "", + pagination: undefined + }; +} +export const QueryConsensusStatesRequest = { + encode(message: QueryConsensusStatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConsensusStatesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryConsensusStatesRequest { + const message = createBaseQueryConsensusStatesRequest(); + message.clientId = object.clientId ?? ""; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryConsensusStatesResponse(): QueryConsensusStatesResponse { + return { + consensusStates: [], + pagination: undefined + }; +} +export const QueryConsensusStatesResponse = { + encode(message: QueryConsensusStatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConsensusStatesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryConsensusStateHeightsRequest(): QueryConsensusStateHeightsRequest { + return { + clientId: "", + pagination: undefined + }; +} +export const QueryConsensusStateHeightsRequest = { + encode(message: QueryConsensusStateHeightsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConsensusStateHeightsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryConsensusStateHeightsRequest(); + 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): QueryConsensusStateHeightsRequest { + return { + clientId: isSet(object.clientId) ? String(object.clientId) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined + }; + }, + toJSON(message: QueryConsensusStateHeightsRequest): 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: Partial): QueryConsensusStateHeightsRequest { + const message = createBaseQueryConsensusStateHeightsRequest(); + message.clientId = object.clientId ?? ""; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryConsensusStateHeightsResponse(): QueryConsensusStateHeightsResponse { + return { + consensusStateHeights: [], + pagination: undefined + }; +} +export const QueryConsensusStateHeightsResponse = { + encode(message: QueryConsensusStateHeightsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.consensusStateHeights) { + Height.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryConsensusStateHeightsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryConsensusStateHeightsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusStateHeights.push(Height.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): QueryConsensusStateHeightsResponse { + return { + consensusStateHeights: Array.isArray(object?.consensusStateHeights) ? object.consensusStateHeights.map((e: any) => Height.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined + }; + }, + toJSON(message: QueryConsensusStateHeightsResponse): unknown { + const obj: any = {}; + if (message.consensusStateHeights) { + obj.consensusStateHeights = message.consensusStateHeights.map(e => e ? Height.toJSON(e) : undefined); + } else { + obj.consensusStateHeights = []; + } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); + return obj; + }, + fromPartial(object: Partial): QueryConsensusStateHeightsResponse { + const message = createBaseQueryConsensusStateHeightsResponse(); + message.consensusStateHeights = object.consensusStateHeights?.map(e => Height.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryClientStatusRequest(): QueryClientStatusRequest { + return { + clientId: "" + }; +} +export const QueryClientStatusRequest = { + encode(message: QueryClientStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.clientId !== "") { + writer.uint32(10).string(message.clientId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStatusRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryClientStatusRequest { + const message = createBaseQueryClientStatusRequest(); + message.clientId = object.clientId ?? ""; + return message; + } +}; +function createBaseQueryClientStatusResponse(): QueryClientStatusResponse { + return { + status: "" + }; +} +export const QueryClientStatusResponse = { + encode(message: QueryClientStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== "") { + writer.uint32(10).string(message.status); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientStatusResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryClientStatusResponse { + const message = createBaseQueryClientStatusResponse(); + message.status = object.status ?? ""; + return message; + } +}; +function createBaseQueryClientParamsRequest(): QueryClientParamsRequest { + return {}; +} +export const QueryClientParamsRequest = { + encode(_: QueryClientParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientParamsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): QueryClientParamsRequest { + const message = createBaseQueryClientParamsRequest(); + return message; + } +}; +function createBaseQueryClientParamsResponse(): QueryClientParamsResponse { + return { + params: undefined + }; +} +export const QueryClientParamsResponse = { + encode(message: QueryClientParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryClientParamsResponse { + const message = createBaseQueryClientParamsResponse(); + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + return message; + } +}; +function createBaseQueryUpgradedClientStateRequest(): QueryUpgradedClientStateRequest { + return {}; +} +export const QueryUpgradedClientStateRequest = { + encode(_: QueryUpgradedClientStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryUpgradedClientStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): QueryUpgradedClientStateRequest { + const message = createBaseQueryUpgradedClientStateRequest(); + return message; + } +}; +function createBaseQueryUpgradedClientStateResponse(): QueryUpgradedClientStateResponse { + return { + upgradedClientState: undefined + }; +} +export const QueryUpgradedClientStateResponse = { + encode(message: QueryUpgradedClientStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.upgradedClientState !== undefined) { + Any.encode(message.upgradedClientState, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryUpgradedClientStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryUpgradedClientStateResponse { + const message = createBaseQueryUpgradedClientStateResponse(); + message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null ? Any.fromPartial(object.upgradedClientState) : undefined; + return message; + } +}; +function createBaseQueryUpgradedConsensusStateRequest(): QueryUpgradedConsensusStateRequest { + return {}; +} +export const QueryUpgradedConsensusStateRequest = { + encode(_: QueryUpgradedConsensusStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryUpgradedConsensusStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): QueryUpgradedConsensusStateRequest { + const message = createBaseQueryUpgradedConsensusStateRequest(); + return message; + } +}; +function createBaseQueryUpgradedConsensusStateResponse(): QueryUpgradedConsensusStateResponse { + return { + upgradedConsensusState: undefined + }; +} +export const QueryUpgradedConsensusStateResponse = { + encode(message: QueryUpgradedConsensusStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.upgradedConsensusState !== undefined) { + Any.encode(message.upgradedConsensusState, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryUpgradedConsensusStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryUpgradedConsensusStateResponse { + const message = createBaseQueryUpgradedConsensusStateResponse(); + message.upgradedConsensusState = object.upgradedConsensusState !== undefined && object.upgradedConsensusState !== null ? Any.fromPartial(object.upgradedConsensusState) : undefined; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.amino.ts b/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.amino.ts new file mode 100644 index 000000000..df1edc9d1 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.amino.ts @@ -0,0 +1,205 @@ +import { AminoMsg } from "@cosmjs/amino"; +import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour } from "./tx"; +export interface MsgCreateClientAminoType extends AminoMsg { + type: "cosmos-sdk/MsgCreateClient"; + value: { + client_state: { + type_url: string; + value: Uint8Array; + }; + consensus_state: { + type_url: string; + value: Uint8Array; + }; + signer: string; + }; +} +export interface MsgUpdateClientAminoType extends AminoMsg { + type: "cosmos-sdk/MsgUpdateClient"; + value: { + client_id: string; + client_message: { + type_url: string; + value: Uint8Array; + }; + signer: string; + }; +} +export interface MsgUpgradeClientAminoType extends AminoMsg { + type: "cosmos-sdk/MsgUpgradeClient"; + value: { + client_id: string; + client_state: { + type_url: string; + value: Uint8Array; + }; + consensus_state: { + type_url: string; + value: Uint8Array; + }; + proof_upgrade_client: Uint8Array; + proof_upgrade_consensus_state: Uint8Array; + signer: string; + }; +} +export interface MsgSubmitMisbehaviourAminoType extends AminoMsg { + type: "cosmos-sdk/MsgSubmitMisbehaviour"; + value: { + client_id: string; + misbehaviour: { + type_url: string; + value: Uint8Array; + }; + signer: string; + }; +} +export const AminoConverter = { + "/ibc.core.client.v1.MsgCreateClient": { + aminoType: "cosmos-sdk/MsgCreateClient", + toAmino: ({ + clientState, + consensusState, + signer + }: MsgCreateClient): MsgCreateClientAminoType["value"] => { + return { + client_state: { + type_url: clientState.typeUrl, + value: clientState.value + }, + consensus_state: { + type_url: consensusState.typeUrl, + value: consensusState.value + }, + signer + }; + }, + fromAmino: ({ + client_state, + consensus_state, + signer + }: MsgCreateClientAminoType["value"]): MsgCreateClient => { + return { + clientState: { + typeUrl: client_state.type_url, + value: client_state.value + }, + consensusState: { + typeUrl: consensus_state.type_url, + value: consensus_state.value + }, + signer + }; + } + }, + "/ibc.core.client.v1.MsgUpdateClient": { + aminoType: "cosmos-sdk/MsgUpdateClient", + toAmino: ({ + clientId, + clientMessage, + signer + }: MsgUpdateClient): MsgUpdateClientAminoType["value"] => { + return { + client_id: clientId, + client_message: { + type_url: clientMessage.typeUrl, + value: clientMessage.value + }, + signer + }; + }, + fromAmino: ({ + client_id, + client_message, + signer + }: MsgUpdateClientAminoType["value"]): MsgUpdateClient => { + return { + clientId: client_id, + clientMessage: { + typeUrl: client_message.type_url, + value: client_message.value + }, + signer + }; + } + }, + "/ibc.core.client.v1.MsgUpgradeClient": { + aminoType: "cosmos-sdk/MsgUpgradeClient", + toAmino: ({ + clientId, + clientState, + consensusState, + proofUpgradeClient, + proofUpgradeConsensusState, + signer + }: MsgUpgradeClient): MsgUpgradeClientAminoType["value"] => { + return { + client_id: clientId, + client_state: { + type_url: clientState.typeUrl, + value: clientState.value + }, + consensus_state: { + type_url: consensusState.typeUrl, + value: consensusState.value + }, + proof_upgrade_client: proofUpgradeClient, + proof_upgrade_consensus_state: proofUpgradeConsensusState, + signer + }; + }, + fromAmino: ({ + client_id, + client_state, + consensus_state, + proof_upgrade_client, + proof_upgrade_consensus_state, + signer + }: MsgUpgradeClientAminoType["value"]): MsgUpgradeClient => { + return { + clientId: client_id, + clientState: { + typeUrl: client_state.type_url, + value: client_state.value + }, + consensusState: { + typeUrl: consensus_state.type_url, + value: consensus_state.value + }, + proofUpgradeClient: proof_upgrade_client, + proofUpgradeConsensusState: proof_upgrade_consensus_state, + signer + }; + } + }, + "/ibc.core.client.v1.MsgSubmitMisbehaviour": { + aminoType: "cosmos-sdk/MsgSubmitMisbehaviour", + toAmino: ({ + clientId, + misbehaviour, + signer + }: MsgSubmitMisbehaviour): MsgSubmitMisbehaviourAminoType["value"] => { + return { + client_id: clientId, + misbehaviour: { + type_url: misbehaviour.typeUrl, + value: misbehaviour.value + }, + signer + }; + }, + fromAmino: ({ + client_id, + misbehaviour, + signer + }: MsgSubmitMisbehaviourAminoType["value"]): MsgSubmitMisbehaviour => { + return { + clientId: client_id, + misbehaviour: { + typeUrl: misbehaviour.type_url, + value: misbehaviour.value + }, + signer + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.registry.ts b/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.registry.ts new file mode 100644 index 000000000..ade3b5b08 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.registry.ts @@ -0,0 +1,140 @@ +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/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.rpc.msg.ts b/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.rpc.msg.ts new file mode 100644 index 000000000..26c3f9128 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.rpc.msg.ts @@ -0,0 +1,44 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(data))); + } +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.ts b/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.ts new file mode 100644 index 000000000..ee198a17a --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/client/v1/tx.ts @@ -0,0 +1,548 @@ +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +/** MsgCreateClient defines a message to create an IBC client */ +export interface MsgCreateClient { + /** light client state */ + clientState?: Any; + /** + * consensus state associated with the client that corresponds to a given + * height. + */ + consensusState?: Any; + /** signer address */ + signer: string; +} +/** MsgCreateClient defines a message to create an IBC client */ +export interface MsgCreateClientSDKType { + client_state?: AnySDKType; + consensus_state?: AnySDKType; + signer: string; +} +/** MsgCreateClientResponse defines the Msg/CreateClient response type. */ +export interface MsgCreateClientResponse {} +/** MsgCreateClientResponse defines the Msg/CreateClient response type. */ +export interface MsgCreateClientResponseSDKType {} +/** + * MsgUpdateClient defines an sdk.Msg to update a IBC client state using + * the given client message. + */ +export interface MsgUpdateClient { + /** client unique identifier */ + clientId: string; + /** client message to update the light client */ + clientMessage?: Any; + /** signer address */ + signer: string; +} +/** + * MsgUpdateClient defines an sdk.Msg to update a IBC client state using + * the given client message. + */ +export interface MsgUpdateClientSDKType { + client_id: string; + client_message?: AnySDKType; + signer: string; +} +/** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ +export interface MsgUpdateClientResponse {} +/** 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; + /** + * upgraded consensus state, only contains enough information to serve as a + * basis of trust in update logic + */ + consensusState?: Any; + /** 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; +} +/** + * MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client + * state + */ +export interface MsgUpgradeClientSDKType { + client_id: string; + client_state?: AnySDKType; + consensus_state?: AnySDKType; + proof_upgrade_client: Uint8Array; + proof_upgrade_consensus_state: Uint8Array; + signer: string; +} +/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ +export interface MsgUpgradeClientResponse {} +/** MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. */ +export interface MsgUpgradeClientResponseSDKType {} +/** + * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for + * light client misbehaviour. + * Warning: DEPRECATED + */ +export interface MsgSubmitMisbehaviour { + /** client unique identifier */ + /** @deprecated */ + clientId: string; + /** misbehaviour used for freezing the light client */ + /** @deprecated */ + misbehaviour?: Any; + /** signer address */ + /** @deprecated */ + signer: string; +} +/** + * MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for + * light client misbehaviour. + * Warning: DEPRECATED + */ +export interface MsgSubmitMisbehaviourSDKType { + /** @deprecated */ + client_id: string; + /** @deprecated */ + misbehaviour?: AnySDKType; + /** @deprecated */ + signer: string; +} +/** + * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response + * type. + */ +export interface MsgSubmitMisbehaviourResponse {} +/** + * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response + * type. + */ +export interface MsgSubmitMisbehaviourResponseSDKType {} +function createBaseMsgCreateClient(): MsgCreateClient { + return { + clientState: undefined, + consensusState: undefined, + signer: "" + }; +} +export const MsgCreateClient = { + encode(message: MsgCreateClient, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgCreateClient { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgCreateClientResponse(): MsgCreateClientResponse { + return {}; +} +export const MsgCreateClientResponse = { + encode(_: MsgCreateClientResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateClientResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgCreateClientResponse { + const message = createBaseMsgCreateClientResponse(); + return message; + } +}; +function createBaseMsgUpdateClient(): MsgUpdateClient { + return { + clientId: "", + clientMessage: undefined, + signer: "" + }; +} +export const MsgUpdateClient = { + encode(message: MsgUpdateClient, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.clientId !== "") { + writer.uint32(10).string(message.clientId); + } + if (message.clientMessage !== undefined) { + Any.encode(message.clientMessage, writer.uint32(18).fork()).ldelim(); + } + if (message.signer !== "") { + writer.uint32(26).string(message.signer); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateClient { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.clientMessage = 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) : "", + clientMessage: isSet(object.clientMessage) ? Any.fromJSON(object.clientMessage) : undefined, + signer: isSet(object.signer) ? String(object.signer) : "" + }; + }, + toJSON(message: MsgUpdateClient): unknown { + const obj: any = {}; + message.clientId !== undefined && (obj.clientId = message.clientId); + message.clientMessage !== undefined && (obj.clientMessage = message.clientMessage ? Any.toJSON(message.clientMessage) : undefined); + message.signer !== undefined && (obj.signer = message.signer); + return obj; + }, + fromPartial(object: Partial): MsgUpdateClient { + const message = createBaseMsgUpdateClient(); + message.clientId = object.clientId ?? ""; + message.clientMessage = object.clientMessage !== undefined && object.clientMessage !== null ? Any.fromPartial(object.clientMessage) : undefined; + message.signer = object.signer ?? ""; + return message; + } +}; +function createBaseMsgUpdateClientResponse(): MsgUpdateClientResponse { + return {}; +} +export const MsgUpdateClientResponse = { + encode(_: MsgUpdateClientResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateClientResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgUpdateClientResponse { + const message = createBaseMsgUpdateClientResponse(); + return message; + } +}; +function createBaseMsgUpgradeClient(): MsgUpgradeClient { + return { + clientId: "", + clientState: undefined, + consensusState: undefined, + proofUpgradeClient: new Uint8Array(), + proofUpgradeConsensusState: new Uint8Array(), + signer: "" + }; +} +export const MsgUpgradeClient = { + encode(message: MsgUpgradeClient, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgUpgradeClient { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgUpgradeClientResponse(): MsgUpgradeClientResponse { + return {}; +} +export const MsgUpgradeClientResponse = { + encode(_: MsgUpgradeClientResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpgradeClientResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgUpgradeClientResponse { + const message = createBaseMsgUpgradeClientResponse(); + return message; + } +}; +function createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour { + return { + clientId: "", + misbehaviour: undefined, + signer: "" + }; +} +export const MsgSubmitMisbehaviour = { + encode(message: MsgSubmitMisbehaviour, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgSubmitMisbehaviour { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgSubmitMisbehaviourResponse(): MsgSubmitMisbehaviourResponse { + return {}; +} +export const MsgSubmitMisbehaviourResponse = { + encode(_: MsgSubmitMisbehaviourResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSubmitMisbehaviourResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgSubmitMisbehaviourResponse { + const message = createBaseMsgSubmitMisbehaviourResponse(); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/commitment/v1/commitment.ts b/frontend/empowerjs/src/codegen/ibc/core/commitment/v1/commitment.ts new file mode 100644 index 000000000..88d66876a --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/commitment/v1/commitment.ts @@ -0,0 +1,257 @@ +import { CommitmentProof, CommitmentProofSDKType } from "../../../../cosmos/ics23/v1/proofs"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes } 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; +} +/** + * 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; +} +/** + * 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[]; +} +/** + * 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[]; +} +/** + * 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 = { + encode(message: MerkleRoot, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.hash.length !== 0) { + writer.uint32(10).bytes(message.hash); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MerkleRoot { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MerkleRoot { + const message = createBaseMerkleRoot(); + message.hash = object.hash ?? new Uint8Array(); + return message; + } +}; +function createBaseMerklePrefix(): MerklePrefix { + return { + keyPrefix: new Uint8Array() + }; +} +export const MerklePrefix = { + encode(message: MerklePrefix, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.keyPrefix.length !== 0) { + writer.uint32(10).bytes(message.keyPrefix); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MerklePrefix { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MerklePrefix { + const message = createBaseMerklePrefix(); + message.keyPrefix = object.keyPrefix ?? new Uint8Array(); + return message; + } +}; +function createBaseMerklePath(): MerklePath { + return { + keyPath: [] + }; +} +export const MerklePath = { + encode(message: MerklePath, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.keyPath) { + writer.uint32(10).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MerklePath { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MerklePath { + const message = createBaseMerklePath(); + message.keyPath = object.keyPath?.map(e => e) || []; + return message; + } +}; +function createBaseMerkleProof(): MerkleProof { + return { + proofs: [] + }; +} +export const MerkleProof = { + encode(message: MerkleProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.proofs) { + CommitmentProof.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MerkleProof { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): MerkleProof { + const message = createBaseMerkleProof(); + message.proofs = object.proofs?.map(e => CommitmentProof.fromPartial(e)) || []; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/connection/v1/connection.ts b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/connection.ts new file mode 100644 index 000000000..df0676814 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/connection.ts @@ -0,0 +1,666 @@ +import { MerklePrefix, MerklePrefixSDKType } from "../../commitment/v1/commitment"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet } 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 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; + /** + * 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; +} +/** + * 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; + 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; + /** delay period associated with this connection. */ + delayPeriod: bigint; +} +/** + * IdentifiedConnection defines a connection with additional connection + * identifier field. + */ +export interface IdentifiedConnectionSDKType { + id: string; + client_id: string; + versions: VersionSDKType[]; + state: State; + counterparty?: CounterpartySDKType; + 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; +} +/** Counterparty defines the counterparty chain associated with a connection end. */ +export interface CounterpartySDKType { + client_id: string; + connection_id: string; + prefix?: MerklePrefixSDKType; +} +/** ClientPaths define all the connection paths for a client state. */ +export interface ClientPaths { + /** list of connection paths */ + paths: string[]; +} +/** 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[]; +} +/** 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[]; +} +/** + * 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; +} +/** 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: undefined, + delayPeriod: BigInt("0") + }; +} +export const ConnectionEnd = { + encode(message: ConnectionEnd, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.delayPeriod.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ConnectionEnd { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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) : 0, + 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: Partial): 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; + } +}; +function createBaseIdentifiedConnection(): IdentifiedConnection { + return { + id: "", + clientId: "", + versions: [], + state: 0, + counterparty: undefined, + delayPeriod: BigInt("0") + }; +} +export const IdentifiedConnection = { + encode(message: IdentifiedConnection, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.delayPeriod.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): IdentifiedConnection { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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) : 0, + 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: Partial): 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; + } +}; +function createBaseCounterparty(): Counterparty { + return { + clientId: "", + connectionId: "", + prefix: undefined + }; +} +export const Counterparty = { + encode(message: Counterparty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): Counterparty { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseClientPaths(): ClientPaths { + return { + paths: [] + }; +} +export const ClientPaths = { + encode(message: ClientPaths, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.paths) { + writer.uint32(10).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ClientPaths { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): ClientPaths { + const message = createBaseClientPaths(); + message.paths = object.paths?.map(e => e) || []; + return message; + } +}; +function createBaseConnectionPaths(): ConnectionPaths { + return { + clientId: "", + paths: [] + }; +} +export const ConnectionPaths = { + encode(message: ConnectionPaths, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.clientId !== "") { + writer.uint32(10).string(message.clientId); + } + for (const v of message.paths) { + writer.uint32(18).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ConnectionPaths { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): ConnectionPaths { + const message = createBaseConnectionPaths(); + message.clientId = object.clientId ?? ""; + message.paths = object.paths?.map(e => e) || []; + return message; + } +}; +function createBaseVersion(): Version { + return { + identifier: "", + features: [] + }; +} +export const Version = { + encode(message: Version, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.identifier !== "") { + writer.uint32(10).string(message.identifier); + } + for (const v of message.features) { + writer.uint32(18).string(v!); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Version { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): Version { + const message = createBaseVersion(); + message.identifier = object.identifier ?? ""; + message.features = object.features?.map(e => e) || []; + return message; + } +}; +function createBaseParams(): Params { + return { + maxExpectedTimePerBlock: BigInt("0") + }; +} +export const Params = { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.maxExpectedTimePerBlock !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.maxExpectedTimePerBlock.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Params { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): Params { + const message = createBaseParams(); + message.maxExpectedTimePerBlock = object.maxExpectedTimePerBlock !== undefined && object.maxExpectedTimePerBlock !== null ? BigInt(object.maxExpectedTimePerBlock.toString()) : BigInt("0"); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/connection/v1/genesis.ts b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/genesis.ts new file mode 100644 index 000000000..a3fd30d8f --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/genesis.ts @@ -0,0 +1,101 @@ +import { IdentifiedConnection, IdentifiedConnectionSDKType, ConnectionPaths, ConnectionPathsSDKType, Params, ParamsSDKType } from "./connection"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet } 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; +} +/** GenesisState defines the ibc connection submodule's genesis state. */ +export interface GenesisStateSDKType { + connections: IdentifiedConnectionSDKType[]; + client_connection_paths: ConnectionPathsSDKType[]; + next_connection_sequence: bigint; + params?: ParamsSDKType; +} +function createBaseGenesisState(): GenesisState { + return { + connections: [], + clientConnectionPaths: [], + nextConnectionSequence: BigInt("0"), + params: undefined + }; +} +export const GenesisState = { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.nextConnectionSequence.toString())); + } + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/connection/v1/query.rpc.Query.ts b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/query.rpc.Query.ts new file mode 100644 index 000000000..7e0c62b44 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/query.rpc.Query.ts @@ -0,0 +1,96 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +import { QueryConnectionRequest, QueryConnectionResponse, QueryConnectionsRequest, QueryConnectionsResponse, QueryClientConnectionsRequest, QueryClientConnectionsResponse, QueryConnectionClientStateRequest, QueryConnectionClientStateResponse, QueryConnectionConsensusStateRequest, QueryConnectionConsensusStateResponse, QueryConnectionParamsRequest, QueryConnectionParamsResponse } 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; + /** ConnectionParams queries all parameters of the ibc connection submodule. */ + connectionParams(request?: QueryConnectionParamsRequest): 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); + this.connectionParams = this.connectionParams.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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(data))); + } + connectionParams(request: QueryConnectionParamsRequest = {}): Promise { + const data = QueryConnectionParamsRequest.encode(request).finish(); + const promise = this.rpc.request("ibc.core.connection.v1.Query", "ConnectionParams", data); + return promise.then(data => QueryConnectionParamsResponse.decode(new _m0.Reader(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); + }, + connectionParams(request?: QueryConnectionParamsRequest): Promise { + return queryService.connectionParams(request); + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/connection/v1/query.ts b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/query.ts new file mode 100644 index 000000000..2b588181e --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/query.ts @@ -0,0 +1,873 @@ +import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../../../cosmos/base/query/v1beta1/pagination"; +import { ConnectionEnd, ConnectionEndSDKType, IdentifiedConnection, IdentifiedConnectionSDKType } from "./connection"; +import { Height, HeightSDKType, IdentifiedClientState, IdentifiedClientStateSDKType, Params, ParamsSDKType } from "../../client/v1/client"; +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../../helpers"; +/** + * QueryConnectionRequest is the request type for the Query/Connection RPC + * method + */ +export interface QueryConnectionRequest { + /** connection unique identifier */ + connectionId: string; +} +/** + * 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; + /** merkle proof of existence */ + proof: Uint8Array; + /** height at which the proof was retrieved */ + proofHeight?: Height; +} +/** + * 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; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** + * QueryConnectionsRequest is the request type for the Query/Connections RPC + * method + */ +export interface QueryConnectionsRequest { + pagination?: PageRequest; +} +/** + * QueryConnectionsRequest is the request type for the Query/Connections RPC + * method + */ +export interface QueryConnectionsRequestSDKType { + pagination?: PageRequestSDKType; +} +/** + * 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; + /** query block height */ + height?: Height; +} +/** + * QueryConnectionsResponse is the response type for the Query/Connections RPC + * method. + */ +export interface QueryConnectionsResponseSDKType { + connections: IdentifiedConnectionSDKType[]; + pagination?: PageResponseSDKType; + height?: HeightSDKType; +} +/** + * QueryClientConnectionsRequest is the request type for the + * Query/ClientConnections RPC method + */ +export interface QueryClientConnectionsRequest { + /** client identifier associated with a connection */ + clientId: string; +} +/** + * 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; +} +/** + * QueryClientConnectionsResponse is the response type for the + * Query/ClientConnections RPC method + */ +export interface QueryClientConnectionsResponseSDKType { + connection_paths: string[]; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** + * QueryConnectionClientStateRequest is the request type for the + * Query/ConnectionClientState RPC method + */ +export interface QueryConnectionClientStateRequest { + /** connection identifier */ + connectionId: string; +} +/** + * 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; + /** merkle proof of existence */ + proof: Uint8Array; + /** height at which the proof was retrieved */ + proofHeight?: Height; +} +/** + * QueryConnectionClientStateResponse is the response type for the + * Query/ConnectionClientState RPC method + */ +export interface QueryConnectionClientStateResponseSDKType { + identified_client_state?: IdentifiedClientStateSDKType; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** + * QueryConnectionConsensusStateRequest is the request type for the + * Query/ConnectionConsensusState RPC method + */ +export interface QueryConnectionConsensusStateRequest { + /** connection identifier */ + connectionId: string; + revisionNumber: bigint; + revisionHeight: bigint; +} +/** + * 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; + /** client ID associated with the consensus state */ + clientId: string; + /** merkle proof of existence */ + proof: Uint8Array; + /** height at which the proof was retrieved */ + proofHeight?: Height; +} +/** + * QueryConnectionConsensusStateResponse is the response type for the + * Query/ConnectionConsensusState RPC method + */ +export interface QueryConnectionConsensusStateResponseSDKType { + consensus_state?: AnySDKType; + client_id: string; + proof: Uint8Array; + proof_height?: HeightSDKType; +} +/** QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. */ +export interface QueryConnectionParamsRequest {} +/** QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. */ +export interface QueryConnectionParamsRequestSDKType {} +/** QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. */ +export interface QueryConnectionParamsResponse { + /** params defines the parameters of the module. */ + params?: Params; +} +/** QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. */ +export interface QueryConnectionParamsResponseSDKType { + params?: ParamsSDKType; +} +function createBaseQueryConnectionRequest(): QueryConnectionRequest { + return { + connectionId: "" + }; +} +export const QueryConnectionRequest = { + encode(message: QueryConnectionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.connectionId !== "") { + writer.uint32(10).string(message.connectionId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryConnectionRequest { + const message = createBaseQueryConnectionRequest(); + message.connectionId = object.connectionId ?? ""; + return message; + } +}; +function createBaseQueryConnectionResponse(): QueryConnectionResponse { + return { + connection: undefined, + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryConnectionResponse = { + encode(message: QueryConnectionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConnectionResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryConnectionsRequest(): QueryConnectionsRequest { + return { + pagination: undefined + }; +} +export const QueryConnectionsRequest = { + encode(message: QueryConnectionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryConnectionsRequest { + const message = createBaseQueryConnectionsRequest(); + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; + return message; + } +}; +function createBaseQueryConnectionsResponse(): QueryConnectionsResponse { + return { + connections: [], + pagination: undefined, + height: undefined + }; +} +export const QueryConnectionsResponse = { + encode(message: QueryConnectionsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConnectionsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryClientConnectionsRequest(): QueryClientConnectionsRequest { + return { + clientId: "" + }; +} +export const QueryClientConnectionsRequest = { + encode(message: QueryClientConnectionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.clientId !== "") { + writer.uint32(10).string(message.clientId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryClientConnectionsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryClientConnectionsRequest { + const message = createBaseQueryClientConnectionsRequest(); + message.clientId = object.clientId ?? ""; + return message; + } +}; +function createBaseQueryClientConnectionsResponse(): QueryClientConnectionsResponse { + return { + connectionPaths: [], + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryClientConnectionsResponse = { + encode(message: QueryClientConnectionsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryClientConnectionsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryConnectionClientStateRequest(): QueryConnectionClientStateRequest { + return { + connectionId: "" + }; +} +export const QueryConnectionClientStateRequest = { + encode(message: QueryConnectionClientStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.connectionId !== "") { + writer.uint32(10).string(message.connectionId); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionClientStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): QueryConnectionClientStateRequest { + const message = createBaseQueryConnectionClientStateRequest(); + message.connectionId = object.connectionId ?? ""; + return message; + } +}; +function createBaseQueryConnectionClientStateResponse(): QueryConnectionClientStateResponse { + return { + identifiedClientState: undefined, + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryConnectionClientStateResponse = { + encode(message: QueryConnectionClientStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConnectionClientStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryConnectionConsensusStateRequest(): QueryConnectionConsensusStateRequest { + return { + connectionId: "", + revisionNumber: BigInt("0"), + revisionHeight: BigInt("0") + }; +} +export const QueryConnectionConsensusStateRequest = { + encode(message: QueryConnectionConsensusStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.connectionId !== "") { + writer.uint32(10).string(message.connectionId); + } + if (message.revisionNumber !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.revisionNumber.toString())); + } + if (message.revisionHeight !== BigInt(0)) { + writer.uint32(24).uint64(Long.fromString(message.revisionHeight.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionConsensusStateRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 3: + message.revisionHeight = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseQueryConnectionConsensusStateResponse(): QueryConnectionConsensusStateResponse { + return { + consensusState: undefined, + clientId: "", + proof: new Uint8Array(), + proofHeight: undefined + }; +} +export const QueryConnectionConsensusStateResponse = { + encode(message: QueryConnectionConsensusStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): QueryConnectionConsensusStateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseQueryConnectionParamsRequest(): QueryConnectionParamsRequest { + return {}; +} +export const QueryConnectionParamsRequest = { + encode(_: QueryConnectionParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionParamsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryConnectionParamsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(_: any): QueryConnectionParamsRequest { + return {}; + }, + toJSON(_: QueryConnectionParamsRequest): unknown { + const obj: any = {}; + return obj; + }, + fromPartial(_: Partial): QueryConnectionParamsRequest { + const message = createBaseQueryConnectionParamsRequest(); + return message; + } +}; +function createBaseQueryConnectionParamsResponse(): QueryConnectionParamsResponse { + return { + params: undefined + }; +} +export const QueryConnectionParamsResponse = { + encode(message: QueryConnectionParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): QueryConnectionParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryConnectionParamsResponse(); + 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): QueryConnectionParamsResponse { + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined + }; + }, + toJSON(message: QueryConnectionParamsResponse): unknown { + const obj: any = {}; + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); + return obj; + }, + fromPartial(object: Partial): QueryConnectionParamsResponse { + const message = createBaseQueryConnectionParamsResponse(); + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.amino.ts b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.amino.ts new file mode 100644 index 000000000..9c7507e8d --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.amino.ts @@ -0,0 +1,353 @@ +import { AminoMsg } from "@cosmjs/amino"; +import { AminoHeight, omitDefault } from "../../../../helpers"; +import { MsgConnectionOpenInit, MsgConnectionOpenTry, MsgConnectionOpenAck, MsgConnectionOpenConfirm } from "./tx"; +export interface MsgConnectionOpenInitAminoType extends AminoMsg { + type: "cosmos-sdk/MsgConnectionOpenInit"; + value: { + client_id: string; + counterparty: { + client_id: string; + connection_id: string; + prefix: { + key_prefix: Uint8Array; + }; + }; + version: { + identifier: string; + features: string[]; + }; + delay_period: string; + signer: string; + }; +} +export interface MsgConnectionOpenTryAminoType extends AminoMsg { + type: "cosmos-sdk/MsgConnectionOpenTry"; + value: { + client_id: string; + previous_connection_id: string; + client_state: { + type_url: string; + value: Uint8Array; + }; + counterparty: { + client_id: string; + connection_id: string; + prefix: { + key_prefix: Uint8Array; + }; + }; + delay_period: string; + counterparty_versions: { + identifier: string; + features: string[]; + }[]; + proof_height: AminoHeight; + proof_init: Uint8Array; + proof_client: Uint8Array; + proof_consensus: Uint8Array; + consensus_height: AminoHeight; + signer: string; + host_consensus_state_proof: Uint8Array; + }; +} +export interface MsgConnectionOpenAckAminoType extends AminoMsg { + type: "cosmos-sdk/MsgConnectionOpenAck"; + value: { + connection_id: string; + counterparty_connection_id: string; + version: { + identifier: string; + features: string[]; + }; + client_state: { + type_url: string; + value: Uint8Array; + }; + proof_height: AminoHeight; + proof_try: Uint8Array; + proof_client: Uint8Array; + proof_consensus: Uint8Array; + consensus_height: AminoHeight; + signer: string; + host_consensus_state_proof: Uint8Array; + }; +} +export interface MsgConnectionOpenConfirmAminoType extends AminoMsg { + type: "cosmos-sdk/MsgConnectionOpenConfirm"; + value: { + connection_id: string; + proof_ack: Uint8Array; + proof_height: AminoHeight; + signer: string; + }; +} +export const AminoConverter = { + "/ibc.core.connection.v1.MsgConnectionOpenInit": { + aminoType: "cosmos-sdk/MsgConnectionOpenInit", + toAmino: ({ + clientId, + counterparty, + version, + delayPeriod, + signer + }: MsgConnectionOpenInit): MsgConnectionOpenInitAminoType["value"] => { + return { + client_id: clientId, + counterparty: { + client_id: counterparty.clientId, + connection_id: counterparty.connectionId, + prefix: { + key_prefix: counterparty.prefix.keyPrefix + } + }, + version: { + identifier: version.identifier, + features: version.features + }, + delay_period: delayPeriod.toString(), + signer + }; + }, + fromAmino: ({ + client_id, + counterparty, + version, + delay_period, + signer + }: MsgConnectionOpenInitAminoType["value"]): MsgConnectionOpenInit => { + return { + clientId: client_id, + counterparty: { + clientId: counterparty.client_id, + connectionId: counterparty.connection_id, + prefix: { + keyPrefix: counterparty.prefix.key_prefix + } + }, + version: { + identifier: version.identifier, + features: version.features + }, + delayPeriod: BigInt(delay_period), + signer + }; + } + }, + "/ibc.core.connection.v1.MsgConnectionOpenTry": { + aminoType: "cosmos-sdk/MsgConnectionOpenTry", + toAmino: ({ + clientId, + previousConnectionId, + clientState, + counterparty, + delayPeriod, + counterpartyVersions, + proofHeight, + proofInit, + proofClient, + proofConsensus, + consensusHeight, + signer, + hostConsensusStateProof + }: MsgConnectionOpenTry): MsgConnectionOpenTryAminoType["value"] => { + return { + client_id: clientId, + previous_connection_id: previousConnectionId, + client_state: { + type_url: clientState.typeUrl, + value: clientState.value + }, + counterparty: { + client_id: counterparty.clientId, + connection_id: counterparty.connectionId, + prefix: { + key_prefix: counterparty.prefix.keyPrefix + } + }, + delay_period: delayPeriod.toString(), + counterparty_versions: counterpartyVersions.map(el0 => ({ + identifier: el0.identifier, + features: el0.features + })), + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + proof_init: proofInit, + proof_client: proofClient, + proof_consensus: proofConsensus, + consensus_height: consensusHeight ? { + revision_height: omitDefault(consensusHeight.revisionHeight)?.toString(), + revision_number: omitDefault(consensusHeight.revisionNumber)?.toString() + } : {}, + signer, + host_consensus_state_proof: hostConsensusStateProof + }; + }, + fromAmino: ({ + client_id, + previous_connection_id, + client_state, + counterparty, + delay_period, + counterparty_versions, + proof_height, + proof_init, + proof_client, + proof_consensus, + consensus_height, + signer, + host_consensus_state_proof + }: MsgConnectionOpenTryAminoType["value"]): MsgConnectionOpenTry => { + return { + clientId: client_id, + previousConnectionId: previous_connection_id, + clientState: { + typeUrl: client_state.type_url, + value: client_state.value + }, + counterparty: { + clientId: counterparty.client_id, + connectionId: counterparty.connection_id, + prefix: { + keyPrefix: counterparty.prefix.key_prefix + } + }, + delayPeriod: BigInt(delay_period), + counterpartyVersions: counterparty_versions.map(el0 => ({ + identifier: el0.identifier, + features: el0.features + })), + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + proofInit: proof_init, + proofClient: proof_client, + proofConsensus: proof_consensus, + consensusHeight: consensus_height ? { + revisionHeight: BigInt(consensus_height.revision_height || "0", true), + revisionNumber: BigInt(consensus_height.revision_number || "0", true) + } : undefined, + signer, + hostConsensusStateProof: host_consensus_state_proof + }; + } + }, + "/ibc.core.connection.v1.MsgConnectionOpenAck": { + aminoType: "cosmos-sdk/MsgConnectionOpenAck", + toAmino: ({ + connectionId, + counterpartyConnectionId, + version, + clientState, + proofHeight, + proofTry, + proofClient, + proofConsensus, + consensusHeight, + signer, + hostConsensusStateProof + }: MsgConnectionOpenAck): MsgConnectionOpenAckAminoType["value"] => { + return { + connection_id: connectionId, + counterparty_connection_id: counterpartyConnectionId, + version: { + identifier: version.identifier, + features: version.features + }, + client_state: { + type_url: clientState.typeUrl, + value: clientState.value + }, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + proof_try: proofTry, + proof_client: proofClient, + proof_consensus: proofConsensus, + consensus_height: consensusHeight ? { + revision_height: omitDefault(consensusHeight.revisionHeight)?.toString(), + revision_number: omitDefault(consensusHeight.revisionNumber)?.toString() + } : {}, + signer, + host_consensus_state_proof: hostConsensusStateProof + }; + }, + fromAmino: ({ + connection_id, + counterparty_connection_id, + version, + client_state, + proof_height, + proof_try, + proof_client, + proof_consensus, + consensus_height, + signer, + host_consensus_state_proof + }: MsgConnectionOpenAckAminoType["value"]): MsgConnectionOpenAck => { + return { + connectionId: connection_id, + counterpartyConnectionId: counterparty_connection_id, + version: { + identifier: version.identifier, + features: version.features + }, + clientState: { + typeUrl: client_state.type_url, + value: client_state.value + }, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + proofTry: proof_try, + proofClient: proof_client, + proofConsensus: proof_consensus, + consensusHeight: consensus_height ? { + revisionHeight: BigInt(consensus_height.revision_height || "0", true), + revisionNumber: BigInt(consensus_height.revision_number || "0", true) + } : undefined, + signer, + hostConsensusStateProof: host_consensus_state_proof + }; + } + }, + "/ibc.core.connection.v1.MsgConnectionOpenConfirm": { + aminoType: "cosmos-sdk/MsgConnectionOpenConfirm", + toAmino: ({ + connectionId, + proofAck, + proofHeight, + signer + }: MsgConnectionOpenConfirm): MsgConnectionOpenConfirmAminoType["value"] => { + return { + connection_id: connectionId, + proof_ack: proofAck, + proof_height: proofHeight ? { + revision_height: omitDefault(proofHeight.revisionHeight)?.toString(), + revision_number: omitDefault(proofHeight.revisionNumber)?.toString() + } : {}, + signer + }; + }, + fromAmino: ({ + connection_id, + proof_ack, + proof_height, + signer + }: MsgConnectionOpenConfirmAminoType["value"]): MsgConnectionOpenConfirm => { + return { + connectionId: connection_id, + proofAck: proof_ack, + proofHeight: proof_height ? { + revisionHeight: BigInt(proof_height.revision_height || "0", true), + revisionNumber: BigInt(proof_height.revision_number || "0", true) + } : undefined, + signer + }; + } + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.registry.ts b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.registry.ts new file mode 100644 index 000000000..0348ea847 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.registry.ts @@ -0,0 +1,140 @@ +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/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.rpc.msg.ts b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.rpc.msg.ts new file mode 100644 index 000000000..4ae74e662 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.rpc.msg.ts @@ -0,0 +1,47 @@ +import { Rpc } from "../../../../helpers"; +import * as _m0 from "protobufjs/minimal"; +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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(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 _m0.Reader(data))); + } +} \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.ts b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.ts new file mode 100644 index 000000000..60e0461f1 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/connection/v1/tx.ts @@ -0,0 +1,771 @@ +import { Counterparty, CounterpartySDKType, Version, VersionSDKType } from "./connection"; +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import { Height, HeightSDKType } from "../../client/v1/client"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, 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; + version?: Version; + delayPeriod: bigint; + signer: string; +} +/** + * 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; + version?: VersionSDKType; + delay_period: bigint; + signer: string; +} +/** + * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response + * type. + */ +export interface MsgConnectionOpenInitResponse {} +/** + * 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; + /** Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. */ + /** @deprecated */ + previousConnectionId: string; + clientState?: Any; + counterparty?: Counterparty; + delayPeriod: bigint; + counterpartyVersions: Version[]; + proofHeight?: Height; + /** + * 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; + signer: string; + /** optional proof data for host state machines that are unable to introspect their own consensus state */ + hostConsensusStateProof: Uint8Array; +} +/** + * MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a + * connection on Chain B. + */ +export interface MsgConnectionOpenTrySDKType { + client_id: string; + /** @deprecated */ + previous_connection_id: string; + client_state?: AnySDKType; + counterparty?: CounterpartySDKType; + delay_period: bigint; + counterparty_versions: VersionSDKType[]; + proof_height?: HeightSDKType; + proof_init: Uint8Array; + proof_client: Uint8Array; + proof_consensus: Uint8Array; + consensus_height?: HeightSDKType; + signer: string; + host_consensus_state_proof: Uint8Array; +} +/** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ +export interface MsgConnectionOpenTryResponse {} +/** 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; + clientState?: Any; + proofHeight?: Height; + /** + * 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; + signer: string; + /** optional proof data for host state machines that are unable to introspect their own consensus state */ + hostConsensusStateProof: 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 MsgConnectionOpenAckSDKType { + connection_id: string; + counterparty_connection_id: string; + version?: VersionSDKType; + client_state?: AnySDKType; + proof_height?: HeightSDKType; + proof_try: Uint8Array; + proof_client: Uint8Array; + proof_consensus: Uint8Array; + consensus_height?: HeightSDKType; + signer: string; + host_consensus_state_proof: Uint8Array; +} +/** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ +export interface MsgConnectionOpenAckResponse {} +/** 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; + signer: string; +} +/** + * 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; + signer: string; +} +/** + * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm + * response type. + */ +export interface MsgConnectionOpenConfirmResponse {} +/** + * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm + * response type. + */ +export interface MsgConnectionOpenConfirmResponseSDKType {} +function createBaseMsgConnectionOpenInit(): MsgConnectionOpenInit { + return { + clientId: "", + counterparty: undefined, + version: undefined, + delayPeriod: BigInt("0"), + signer: "" + }; +} +export const MsgConnectionOpenInit = { + encode(message: MsgConnectionOpenInit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.delayPeriod.toString())); + } + if (message.signer !== "") { + writer.uint32(42).string(message.signer); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgConnectionOpenInit { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseMsgConnectionOpenInitResponse(): MsgConnectionOpenInitResponse { + return {}; +} +export const MsgConnectionOpenInitResponse = { + encode(_: MsgConnectionOpenInitResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgConnectionOpenInitResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgConnectionOpenInitResponse { + const message = createBaseMsgConnectionOpenInitResponse(); + return message; + } +}; +function createBaseMsgConnectionOpenTry(): MsgConnectionOpenTry { + return { + clientId: "", + previousConnectionId: "", + clientState: undefined, + counterparty: undefined, + delayPeriod: BigInt("0"), + counterpartyVersions: [], + proofHeight: undefined, + proofInit: new Uint8Array(), + proofClient: new Uint8Array(), + proofConsensus: new Uint8Array(), + consensusHeight: undefined, + signer: "", + hostConsensusStateProof: new Uint8Array() + }; +} +export const MsgConnectionOpenTry = { + encode(message: MsgConnectionOpenTry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.delayPeriod.toString())); + } + 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); + } + if (message.hostConsensusStateProof.length !== 0) { + writer.uint32(106).bytes(message.hostConsensusStateProof); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgConnectionOpenTry { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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; + case 13: + message.hostConsensusStateProof = reader.bytes(); + 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) : "", + hostConsensusStateProof: isSet(object.hostConsensusStateProof) ? bytesFromBase64(object.hostConsensusStateProof) : new Uint8Array() + }; + }, + 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); + message.hostConsensusStateProof !== undefined && (obj.hostConsensusStateProof = base64FromBytes(message.hostConsensusStateProof !== undefined ? message.hostConsensusStateProof : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): 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 ?? ""; + message.hostConsensusStateProof = object.hostConsensusStateProof ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgConnectionOpenTryResponse(): MsgConnectionOpenTryResponse { + return {}; +} +export const MsgConnectionOpenTryResponse = { + encode(_: MsgConnectionOpenTryResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgConnectionOpenTryResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgConnectionOpenTryResponse { + const message = createBaseMsgConnectionOpenTryResponse(); + return message; + } +}; +function createBaseMsgConnectionOpenAck(): MsgConnectionOpenAck { + return { + connectionId: "", + counterpartyConnectionId: "", + version: undefined, + clientState: undefined, + proofHeight: undefined, + proofTry: new Uint8Array(), + proofClient: new Uint8Array(), + proofConsensus: new Uint8Array(), + consensusHeight: undefined, + signer: "", + hostConsensusStateProof: new Uint8Array() + }; +} +export const MsgConnectionOpenAck = { + encode(message: MsgConnectionOpenAck, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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); + } + if (message.hostConsensusStateProof.length !== 0) { + writer.uint32(90).bytes(message.hostConsensusStateProof); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgConnectionOpenAck { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; + case 11: + message.hostConsensusStateProof = reader.bytes(); + 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) : "", + hostConsensusStateProof: isSet(object.hostConsensusStateProof) ? bytesFromBase64(object.hostConsensusStateProof) : new Uint8Array() + }; + }, + 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); + message.hostConsensusStateProof !== undefined && (obj.hostConsensusStateProof = base64FromBytes(message.hostConsensusStateProof !== undefined ? message.hostConsensusStateProof : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): 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 ?? ""; + message.hostConsensusStateProof = object.hostConsensusStateProof ?? new Uint8Array(); + return message; + } +}; +function createBaseMsgConnectionOpenAckResponse(): MsgConnectionOpenAckResponse { + return {}; +} +export const MsgConnectionOpenAckResponse = { + encode(_: MsgConnectionOpenAckResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgConnectionOpenAckResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgConnectionOpenAckResponse { + const message = createBaseMsgConnectionOpenAckResponse(); + return message; + } +}; +function createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm { + return { + connectionId: "", + proofAck: new Uint8Array(), + proofHeight: undefined, + signer: "" + }; +} +export const MsgConnectionOpenConfirm = { + encode(message: MsgConnectionOpenConfirm, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): MsgConnectionOpenConfirm { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseMsgConnectionOpenConfirmResponse(): MsgConnectionOpenConfirmResponse { + return {}; +} +export const MsgConnectionOpenConfirmResponse = { + encode(_: MsgConnectionOpenConfirmResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): MsgConnectionOpenConfirmResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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(_: Partial): MsgConnectionOpenConfirmResponse { + const message = createBaseMsgConnectionOpenConfirmResponse(); + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/core/types/v1/genesis.ts b/frontend/empowerjs/src/codegen/ibc/core/types/v1/genesis.ts new file mode 100644 index 000000000..2a31dc906 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/core/types/v1/genesis.ts @@ -0,0 +1,88 @@ +import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; +import { GenesisStateSDKType as GenesisState1SDKType } from "../../client/v1/genesis"; +import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; +import { GenesisStateSDKType as GenesisState2SDKType } from "../../connection/v1/genesis"; +import { GenesisState as GenesisState3 } from "../../channel/v1/genesis"; +import { GenesisStateSDKType as GenesisState3SDKType } from "../../channel/v1/genesis"; +import * as _m0 from "protobufjs/minimal"; +import { isSet } from "../../../../helpers"; +/** GenesisState defines the ibc module's genesis state. */ +export interface GenesisState { + /** ICS002 - Clients genesis state */ + clientGenesis?: GenesisState1; + /** ICS003 - Connections genesis state */ + connectionGenesis?: GenesisState2; + /** ICS004 - Channel genesis state */ + channelGenesis?: GenesisState3; +} +/** GenesisState defines the ibc module's genesis state. */ +export interface GenesisStateSDKType { + client_genesis?: GenesisState1SDKType; + connection_genesis?: GenesisState2SDKType; + channel_genesis?: GenesisState3SDKType; +} +function createBaseGenesisState(): GenesisState { + return { + clientGenesis: undefined, + connectionGenesis: undefined, + channelGenesis: undefined + }; +} +export const GenesisState = { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/lightclients/solomachine/v2/solomachine.ts b/frontend/empowerjs/src/codegen/ibc/lightclients/solomachine/v2/solomachine.ts new file mode 100644 index 000000000..fb3cacb8d --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/lightclients/solomachine/v2/solomachine.ts @@ -0,0 +1,1373 @@ +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import { ConnectionEnd, ConnectionEndSDKType } from "../../../core/connection/v1/connection"; +import { Channel, ChannelSDKType } from "../../../core/channel/v1/channel"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, 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 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; + /** + * when set to true, will allow governance to update a solo machine client. + * The client will be unfrozen if it is frozen. + */ + allowUpdateAfterProposal: boolean; +} +/** + * 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; + 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; + /** + * 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; +} +/** + * 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; + 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; + newDiversifier: string; +} +/** Header defines a solo machine consensus header */ +export interface HeaderSDKType { + sequence: bigint; + timestamp: bigint; + signature: Uint8Array; + new_public_key?: AnySDKType; + 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; + signatureTwo?: SignatureAndData; +} +/** + * 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; + signature_two?: SignatureAndDataSDKType; +} +/** + * SignatureAndData contains a signature and the data signed over to create that + * signature. + */ +export interface SignatureAndData { + signature: Uint8Array; + dataType: DataType; + data: Uint8Array; + timestamp: bigint; +} +/** + * 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; +} +/** + * 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; +} +/** 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; + /** header diversifier */ + newDiversifier: string; +} +/** HeaderData returns the SignBytes data for update verification. */ +export interface HeaderDataSDKType { + new_pub_key?: AnySDKType; + new_diversifier: string; +} +/** ClientStateData returns the SignBytes data for client state verification. */ +export interface ClientStateData { + path: Uint8Array; + clientState?: Any; +} +/** ClientStateData returns the SignBytes data for client state verification. */ +export interface ClientStateDataSDKType { + path: Uint8Array; + client_state?: AnySDKType; +} +/** + * ConsensusStateData returns the SignBytes data for consensus state + * verification. + */ +export interface ConsensusStateData { + path: Uint8Array; + consensusState?: Any; +} +/** + * ConsensusStateData returns the SignBytes data for consensus state + * verification. + */ +export interface ConsensusStateDataSDKType { + path: Uint8Array; + consensus_state?: AnySDKType; +} +/** + * ConnectionStateData returns the SignBytes data for connection state + * verification. + */ +export interface ConnectionStateData { + path: Uint8Array; + connection?: ConnectionEnd; +} +/** + * ConnectionStateData returns the SignBytes data for connection state + * verification. + */ +export interface ConnectionStateDataSDKType { + path: Uint8Array; + connection?: ConnectionEndSDKType; +} +/** + * ChannelStateData returns the SignBytes data for channel state + * verification. + */ +export interface ChannelStateData { + path: Uint8Array; + channel?: Channel; +} +/** + * ChannelStateData returns the SignBytes data for channel state + * verification. + */ +export interface ChannelStateDataSDKType { + path: Uint8Array; + channel?: ChannelSDKType; +} +/** + * PacketCommitmentData returns the SignBytes data for packet commitment + * verification. + */ +export interface PacketCommitmentData { + path: Uint8Array; + commitment: Uint8Array; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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; +} +/** + * 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: undefined, + allowUpdateAfterProposal: false + }; +} +export const ClientState = { + encode(message: ClientState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): ClientState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseConsensusState(): ConsensusState { + return { + publicKey: undefined, + diversifier: "", + timestamp: BigInt("0") + }; +} +export const ConsensusState = { + encode(message: ConsensusState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.timestamp.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ConsensusState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseHeader(): Header { + return { + sequence: BigInt("0"), + timestamp: BigInt("0"), + signature: new Uint8Array(), + newPublicKey: undefined, + newDiversifier: "" + }; +} +export const Header = { + encode(message: Header, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + if (message.timestamp !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.timestamp.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): Header { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.timestamp = BigInt(reader.uint64().toString()); + 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: Partial
): 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; + } +}; +function createBaseMisbehaviour(): Misbehaviour { + return { + clientId: "", + sequence: BigInt("0"), + signatureOne: undefined, + signatureTwo: undefined + }; +} +export const Misbehaviour = { + encode(message: Misbehaviour, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.clientId !== "") { + writer.uint32(10).string(message.clientId); + } + if (message.sequence !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.sequence.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): Misbehaviour { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseSignatureAndData(): SignatureAndData { + return { + signature: new Uint8Array(), + dataType: 0, + data: new Uint8Array(), + timestamp: BigInt("0") + }; +} +export const SignatureAndData = { + encode(message: SignatureAndData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.timestamp.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): SignatureAndData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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) : 0, + 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: Partial): 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; + } +}; +function createBaseTimestampedSignatureData(): TimestampedSignatureData { + return { + signatureData: new Uint8Array(), + timestamp: BigInt("0") + }; +} +export const TimestampedSignatureData = { + encode(message: TimestampedSignatureData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.signatureData.length !== 0) { + writer.uint32(10).bytes(message.signatureData); + } + if (message.timestamp !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.timestamp.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): TimestampedSignatureData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseSignBytes(): SignBytes { + return { + sequence: BigInt("0"), + timestamp: BigInt("0"), + diversifier: "", + dataType: 0, + data: new Uint8Array() + }; +} +export const SignBytes = { + encode(message: SignBytes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + if (message.timestamp !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.timestamp.toString())); + } + 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: _m0.Reader | Uint8Array, length?: number): SignBytes { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.timestamp = BigInt(reader.uint64().toString()); + 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) : 0, + 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: Partial): 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; + } +}; +function createBaseHeaderData(): HeaderData { + return { + newPubKey: undefined, + newDiversifier: "" + }; +} +export const HeaderData = { + encode(message: HeaderData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): HeaderData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): HeaderData { + const message = createBaseHeaderData(); + message.newPubKey = object.newPubKey !== undefined && object.newPubKey !== null ? Any.fromPartial(object.newPubKey) : undefined; + message.newDiversifier = object.newDiversifier ?? ""; + return message; + } +}; +function createBaseClientStateData(): ClientStateData { + return { + path: new Uint8Array(), + clientState: undefined + }; +} +export const ClientStateData = { + encode(message: ClientStateData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ClientStateData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseConsensusStateData(): ConsensusStateData { + return { + path: new Uint8Array(), + consensusState: undefined + }; +} +export const ConsensusStateData = { + encode(message: ConsensusStateData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ConsensusStateData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseConnectionStateData(): ConnectionStateData { + return { + path: new Uint8Array(), + connection: undefined + }; +} +export const ConnectionStateData = { + encode(message: ConnectionStateData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ConnectionStateData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseChannelStateData(): ChannelStateData { + return { + path: new Uint8Array(), + channel: undefined + }; +} +export const ChannelStateData = { + encode(message: ChannelStateData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ChannelStateData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBasePacketCommitmentData(): PacketCommitmentData { + return { + path: new Uint8Array(), + commitment: new Uint8Array() + }; +} +export const PacketCommitmentData = { + encode(message: PacketCommitmentData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): PacketCommitmentData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): PacketCommitmentData { + const message = createBasePacketCommitmentData(); + message.path = object.path ?? new Uint8Array(); + message.commitment = object.commitment ?? new Uint8Array(); + return message; + } +}; +function createBasePacketAcknowledgementData(): PacketAcknowledgementData { + return { + path: new Uint8Array(), + acknowledgement: new Uint8Array() + }; +} +export const PacketAcknowledgementData = { + encode(message: PacketAcknowledgementData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): PacketAcknowledgementData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): PacketAcknowledgementData { + const message = createBasePacketAcknowledgementData(); + message.path = object.path ?? new Uint8Array(); + message.acknowledgement = object.acknowledgement ?? new Uint8Array(); + return message; + } +}; +function createBasePacketReceiptAbsenceData(): PacketReceiptAbsenceData { + return { + path: new Uint8Array() + }; +} +export const PacketReceiptAbsenceData = { + encode(message: PacketReceiptAbsenceData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.path.length !== 0) { + writer.uint32(10).bytes(message.path); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): PacketReceiptAbsenceData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): PacketReceiptAbsenceData { + const message = createBasePacketReceiptAbsenceData(); + message.path = object.path ?? new Uint8Array(); + return message; + } +}; +function createBaseNextSequenceRecvData(): NextSequenceRecvData { + return { + path: new Uint8Array(), + nextSeqRecv: BigInt("0") + }; +} +export const NextSequenceRecvData = { + encode(message: NextSequenceRecvData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.path.length !== 0) { + writer.uint32(10).bytes(message.path); + } + if (message.nextSeqRecv !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.nextSeqRecv.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): NextSequenceRecvData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/lightclients/solomachine/v3/solomachine.ts b/frontend/empowerjs/src/codegen/ibc/lightclients/solomachine/v3/solomachine.ts new file mode 100644 index 000000000..39d9c7f62 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/lightclients/solomachine/v3/solomachine.ts @@ -0,0 +1,690 @@ +import { Any, AnySDKType } from "../../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +/** + * 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; +} +/** + * 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; +} +/** + * 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; + /** + * 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; +} +/** + * 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; + diversifier: string; + timestamp: bigint; +} +/** Header defines a solo machine consensus header */ +export interface Header { + timestamp: bigint; + signature: Uint8Array; + newPublicKey?: Any; + newDiversifier: string; +} +/** Header defines a solo machine consensus header */ +export interface HeaderSDKType { + timestamp: bigint; + signature: Uint8Array; + new_public_key?: AnySDKType; + 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 { + sequence: bigint; + signatureOne?: SignatureAndData; + signatureTwo?: SignatureAndData; +} +/** + * Misbehaviour defines misbehaviour for a solo machine which consists + * of a sequence and two signatures over different messages at that sequence. + */ +export interface MisbehaviourSDKType { + sequence: bigint; + signature_one?: SignatureAndDataSDKType; + signature_two?: SignatureAndDataSDKType; +} +/** + * SignatureAndData contains a signature and the data signed over to create that + * signature. + */ +export interface SignatureAndData { + signature: Uint8Array; + path: Uint8Array; + data: Uint8Array; + timestamp: bigint; +} +/** + * SignatureAndData contains a signature and the data signed over to create that + * signature. + */ +export interface SignatureAndDataSDKType { + signature: Uint8Array; + path: Uint8Array; + data: Uint8Array; + timestamp: bigint; +} +/** + * TimestampedSignatureData contains the signature data and the timestamp of the + * signature. + */ +export interface TimestampedSignatureData { + signatureData: Uint8Array; + timestamp: bigint; +} +/** + * 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 { + /** the sequence number */ + sequence: bigint; + /** the proof timestamp */ + timestamp: bigint; + /** the public key diversifier */ + diversifier: string; + /** the standardised path bytes */ + path: Uint8Array; + /** the marshaled data bytes */ + data: Uint8Array; +} +/** SignBytes defines the signed bytes used for signature verification. */ +export interface SignBytesSDKType { + sequence: bigint; + timestamp: bigint; + diversifier: string; + path: Uint8Array; + data: Uint8Array; +} +/** HeaderData returns the SignBytes data for update verification. */ +export interface HeaderData { + /** header public key */ + newPubKey?: Any; + /** header diversifier */ + newDiversifier: string; +} +/** HeaderData returns the SignBytes data for update verification. */ +export interface HeaderDataSDKType { + new_pub_key?: AnySDKType; + new_diversifier: string; +} +function createBaseClientState(): ClientState { + return { + sequence: BigInt("0"), + isFrozen: false, + consensusState: undefined + }; +} +export const ClientState = { + encode(message: ClientState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + if (message.isFrozen === true) { + writer.uint32(16).bool(message.isFrozen); + } + if (message.consensusState !== undefined) { + ConsensusState.encode(message.consensusState, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ClientState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.isFrozen = reader.bool(); + break; + case 3: + message.consensusState = ConsensusState.decode(reader, reader.uint32()); + 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 + }; + }, + 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); + return obj; + }, + fromPartial(object: Partial): 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; + return message; + } +}; +function createBaseConsensusState(): ConsensusState { + return { + publicKey: undefined, + diversifier: "", + timestamp: BigInt("0") + }; +} +export const ConsensusState = { + encode(message: ConsensusState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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(Long.fromString(message.timestamp.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): ConsensusState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseHeader(): Header { + return { + timestamp: BigInt("0"), + signature: new Uint8Array(), + newPublicKey: undefined, + newDiversifier: "" + }; +} +export const Header = { + encode(message: Header, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.timestamp !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.timestamp.toString())); + } + if (message.signature.length !== 0) { + writer.uint32(18).bytes(message.signature); + } + if (message.newPublicKey !== undefined) { + Any.encode(message.newPublicKey, writer.uint32(26).fork()).ldelim(); + } + if (message.newDiversifier !== "") { + writer.uint32(34).string(message.newDiversifier); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Header { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.timestamp = BigInt(reader.uint64().toString()); + break; + case 2: + message.signature = reader.bytes(); + break; + case 3: + message.newPublicKey = Any.decode(reader, reader.uint32()); + break; + case 4: + message.newDiversifier = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): Header { + return { + 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.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: Partial
): Header { + const message = createBaseHeader(); + 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; + } +}; +function createBaseMisbehaviour(): Misbehaviour { + return { + sequence: BigInt("0"), + signatureOne: undefined, + signatureTwo: undefined + }; +} +export const Misbehaviour = { + encode(message: Misbehaviour, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + if (message.signatureOne !== undefined) { + SignatureAndData.encode(message.signatureOne, writer.uint32(18).fork()).ldelim(); + } + if (message.signatureTwo !== undefined) { + SignatureAndData.encode(message.signatureTwo, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Misbehaviour { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.sequence = BigInt(reader.uint64().toString()); + break; + case 2: + message.signatureOne = SignatureAndData.decode(reader, reader.uint32()); + break; + case 3: + message.signatureTwo = SignatureAndData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): Misbehaviour { + return { + 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.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: Partial): Misbehaviour { + const message = createBaseMisbehaviour(); + 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; + } +}; +function createBaseSignatureAndData(): SignatureAndData { + return { + signature: new Uint8Array(), + path: new Uint8Array(), + data: new Uint8Array(), + timestamp: BigInt("0") + }; +} +export const SignatureAndData = { + encode(message: SignatureAndData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.signature.length !== 0) { + writer.uint32(10).bytes(message.signature); + } + if (message.path.length !== 0) { + writer.uint32(18).bytes(message.path); + } + if (message.data.length !== 0) { + writer.uint32(26).bytes(message.data); + } + if (message.timestamp !== BigInt(0)) { + writer.uint32(32).uint64(Long.fromString(message.timestamp.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): SignatureAndData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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.path = reader.bytes(); + break; + case 3: + message.data = reader.bytes(); + break; + case 4: + message.timestamp = BigInt(reader.uint64().toString()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): SignatureAndData { + return { + signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), + path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), + 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.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); + 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: Partial): SignatureAndData { + const message = createBaseSignatureAndData(); + message.signature = object.signature ?? new Uint8Array(); + message.path = object.path ?? new Uint8Array(); + message.data = object.data ?? new Uint8Array(); + message.timestamp = object.timestamp !== undefined && object.timestamp !== null ? BigInt(object.timestamp.toString()) : BigInt("0"); + return message; + } +}; +function createBaseTimestampedSignatureData(): TimestampedSignatureData { + return { + signatureData: new Uint8Array(), + timestamp: BigInt("0") + }; +} +export const TimestampedSignatureData = { + encode(message: TimestampedSignatureData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.signatureData.length !== 0) { + writer.uint32(10).bytes(message.signatureData); + } + if (message.timestamp !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.timestamp.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): TimestampedSignatureData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; +function createBaseSignBytes(): SignBytes { + return { + sequence: BigInt("0"), + timestamp: BigInt("0"), + diversifier: "", + path: new Uint8Array(), + data: new Uint8Array() + }; +} +export const SignBytes = { + encode(message: SignBytes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.sequence !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.sequence.toString())); + } + if (message.timestamp !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.timestamp.toString())); + } + if (message.diversifier !== "") { + writer.uint32(26).string(message.diversifier); + } + if (message.path.length !== 0) { + writer.uint32(34).bytes(message.path); + } + if (message.data.length !== 0) { + writer.uint32(42).bytes(message.data); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): SignBytes { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.timestamp = BigInt(reader.uint64().toString()); + break; + case 3: + message.diversifier = reader.string(); + break; + case 4: + message.path = reader.bytes(); + 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) : "", + path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), + 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.path !== undefined && (obj.path = base64FromBytes(message.path !== undefined ? message.path : new Uint8Array())); + message.data !== undefined && (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); + return obj; + }, + fromPartial(object: Partial): 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.path = object.path ?? new Uint8Array(); + message.data = object.data ?? new Uint8Array(); + return message; + } +}; +function createBaseHeaderData(): HeaderData { + return { + newPubKey: undefined, + newDiversifier: "" + }; +} +export const HeaderData = { + encode(message: HeaderData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): HeaderData { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): HeaderData { + const message = createBaseHeaderData(); + message.newPubKey = object.newPubKey !== undefined && object.newPubKey !== null ? Any.fromPartial(object.newPubKey) : undefined; + message.newDiversifier = object.newDiversifier ?? ""; + return message; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/lightclients/tendermint/v1/tendermint.ts b/frontend/empowerjs/src/codegen/ibc/lightclients/tendermint/v1/tendermint.ts new file mode 100644 index 000000000..c933f93a1 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/lightclients/tendermint/v1/tendermint.ts @@ -0,0 +1,574 @@ +import { Duration, DurationSDKType } from "../../../../google/protobuf/duration"; +import { Height, HeightSDKType } from "../../../core/client/v1/client"; +import { ProofSpec, ProofSpecSDKType } from "../../../../cosmos/ics23/v1/proofs"; +import { Timestamp } from "../../../../google/protobuf/timestamp"; +import { MerkleRoot, MerkleRootSDKType } from "../../../core/commitment/v1/commitment"; +import { SignedHeader, SignedHeaderSDKType } from "../../../../tendermint/types/types"; +import { ValidatorSet, ValidatorSetSDKType } from "../../../../tendermint/types/validator"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, toTimestamp, fromTimestamp, fromJsonTimestamp, bytesFromBase64, base64FromBytes, Long } from "../../../../helpers"; +/** + * ClientState from Tendermint tracks the current validator set, latest height, + * and a possible frozen height. + */ +export interface ClientState { + chainId: string; + trustLevel?: Fraction; + /** + * duration of the period since the LastestTimestamp during which the + * submitted headers are valid for upgrade + */ + trustingPeriod?: Duration; + /** duration of the staking unbonding period */ + unbondingPeriod?: Duration; + /** defines how much new (untrusted) header's Time can drift into the future. */ + maxClockDrift?: Duration; + /** Block height when the client was frozen due to a misbehaviour */ + frozenHeight?: Height; + /** Latest height the client was updated to */ + latestHeight?: Height; + /** 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[]; + /** allow_update_after_expiry is deprecated */ + /** @deprecated */ + allowUpdateAfterExpiry: boolean; + /** allow_update_after_misbehaviour is deprecated */ + /** @deprecated */ + allowUpdateAfterMisbehaviour: boolean; +} +/** + * ClientState from Tendermint tracks the current validator set, latest height, + * and a possible frozen height. + */ +export interface ClientStateSDKType { + chain_id: string; + trust_level?: FractionSDKType; + trusting_period?: DurationSDKType; + unbonding_period?: DurationSDKType; + max_clock_drift?: DurationSDKType; + frozen_height?: HeightSDKType; + latest_height?: HeightSDKType; + proof_specs: ProofSpecSDKType[]; + upgrade_path: string[]; + /** @deprecated */ + allow_update_after_expiry: boolean; + /** @deprecated */ + 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; + /** commitment root (i.e app hash) */ + root?: MerkleRoot; + nextValidatorsHash: Uint8Array; +} +/** ConsensusState defines the consensus state from Tendermint. */ +export interface ConsensusStateSDKType { + timestamp?: Date; + root?: MerkleRootSDKType; + next_validators_hash: Uint8Array; +} +/** + * Misbehaviour is a wrapper over two conflicting Headers + * that implements Misbehaviour interface expected by ICS-02 + */ +export interface Misbehaviour { + /** ClientID is deprecated */ + /** @deprecated */ + clientId: string; + header1?: Header; + header2?: Header; +} +/** + * Misbehaviour is a wrapper over two conflicting Headers + * that implements Misbehaviour interface expected by ICS-02 + */ +export interface MisbehaviourSDKType { + /** @deprecated */ + client_id: string; + header_1?: HeaderSDKType; + header_2?: HeaderSDKType; +} +/** + * 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; + validatorSet?: ValidatorSet; + trustedHeight?: Height; + trustedValidators?: ValidatorSet; +} +/** + * 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; + validator_set?: ValidatorSetSDKType; + trusted_height?: HeightSDKType; + trusted_validators?: ValidatorSetSDKType; +} +/** + * Fraction defines the protobuf message type for tmmath.Fraction that only + * supports positive values. + */ +export interface Fraction { + numerator: bigint; + denominator: bigint; +} +/** + * 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: undefined, + trustingPeriod: undefined, + unbondingPeriod: undefined, + maxClockDrift: undefined, + frozenHeight: undefined, + latestHeight: undefined, + proofSpecs: [], + upgradePath: [], + allowUpdateAfterExpiry: false, + allowUpdateAfterMisbehaviour: false + }; +} +export const ClientState = { + encode(message: ClientState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ClientState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseConsensusState(): ConsensusState { + return { + timestamp: undefined, + root: undefined, + nextValidatorsHash: new Uint8Array() + }; +} +export const ConsensusState = { + encode(message: ConsensusState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): ConsensusState { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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) ? fromJsonTimestamp(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: Partial): 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; + } +}; +function createBaseMisbehaviour(): Misbehaviour { + return { + clientId: "", + header1: undefined, + header2: undefined + }; +} +export const Misbehaviour = { + encode(message: Misbehaviour, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): Misbehaviour { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial): 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; + } +}; +function createBaseHeader(): Header { + return { + signedHeader: undefined, + validatorSet: undefined, + trustedHeight: undefined, + trustedValidators: undefined + }; +} +export const Header = { + encode(message: Header, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + 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: _m0.Reader | Uint8Array, length?: number): Header { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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: Partial
): 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; + } +}; +function createBaseFraction(): Fraction { + return { + numerator: BigInt("0"), + denominator: BigInt("0") + }; +} +export const Fraction = { + encode(message: Fraction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.numerator !== BigInt(0)) { + writer.uint32(8).uint64(Long.fromString(message.numerator.toString())); + } + if (message.denominator !== BigInt(0)) { + writer.uint32(16).uint64(Long.fromString(message.denominator.toString())); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): Fraction { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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 = BigInt(reader.uint64().toString()); + break; + case 2: + message.denominator = BigInt(reader.uint64().toString()); + 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: Partial): 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; + } +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/rpc.query.ts b/frontend/empowerjs/src/codegen/ibc/rpc.query.ts new file mode 100644 index 000000000..862f5819e --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/rpc.query.ts @@ -0,0 +1,111 @@ +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) + }, + autocli: { + v1: (await import("../cosmos/autocli/v1/query.rpc.Query")).createRpcQueryExtension(client) + }, + bank: { + v1beta1: (await import("../cosmos/bank/v1beta1/query.rpc.Query")).createRpcQueryExtension(client) + }, + base: { + node: { + v1beta1: (await import("../cosmos/base/node/v1beta1/query.rpc.Service")).createRpcQueryExtension(client) + }, + tendermint: { + v1beta1: (await import("../cosmos/base/tendermint/v1beta1/query.rpc.Service")).createRpcQueryExtension(client) + } + }, + consensus: { + v1: (await import("../cosmos/consensus/v1/query.rpc.Query")).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) + }, + orm: { + query: { + v1alpha1: (await import("../cosmos/orm/query/v1alpha1/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: { + fee: { + v1: (await import("./applications/fee/v1/query.rpc.Query")).createRpcQueryExtension(client) + }, + interchain_accounts: { + controller: { + v1: (await import("./applications/interchain_accounts/controller/v1/query.rpc.Query")).createRpcQueryExtension(client) + }, + host: { + v1: (await import("./applications/interchain_accounts/host/v1/query.rpc.Query")).createRpcQueryExtension(client) + } + }, + 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) + } + } + } + }; +}; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/ibc/rpc.tx.ts b/frontend/empowerjs/src/codegen/ibc/rpc.tx.ts new file mode 100644 index 000000000..d8aa604c3 --- /dev/null +++ b/frontend/empowerjs/src/codegen/ibc/rpc.tx.ts @@ -0,0 +1,84 @@ +import { Rpc } from "../helpers"; +export const createRPCMsgClient = async ({ + rpc +}: { + rpc: Rpc; +}) => ({ + cosmos: { + auth: { + v1beta1: new (await import("../cosmos/auth/v1beta1/tx.rpc.msg")).MsgClientImpl(rpc) + }, + 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) + }, + consensus: { + v1: new (await import("../cosmos/consensus/v1/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) + }, + mint: { + v1beta1: new (await import("../cosmos/mint/v1beta1/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: { + fee: { + v1: new (await import("./applications/fee/v1/tx.rpc.msg")).MsgClientImpl(rpc) + }, + interchain_accounts: { + controller: { + v1: new (await import("./applications/interchain_accounts/controller/v1/tx.rpc.msg")).MsgClientImpl(rpc) + } + }, + 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/frontend/empowerjs/src/codegen/index.ts b/frontend/empowerjs/src/codegen/index.ts index 5d020196c..57ccf9485 100644 --- a/frontend/empowerjs/src/codegen/index.ts +++ b/frontend/empowerjs/src/codegen/index.ts @@ -8,8 +8,12 @@ export * from "./amino/bundle"; export * from "./cosmos_proto/bundle"; export * from "./cosmos/bundle"; export * from "./cosmos/client"; +export * from "./cosmwasm/bundle"; +export * from "./cosmwasm/client"; export * from "./empowerchain/bundle"; export * from "./empowerchain/client"; export * from "./gogoproto/bundle"; export * from "./google/bundle"; +export * from "./ibc/bundle"; +export * from "./ibc/client"; export * from "./tendermint/bundle"; \ No newline at end of file diff --git a/frontend/empowerjs/src/codegen/tendermint/bundle.ts b/frontend/empowerjs/src/codegen/tendermint/bundle.ts index 2eac623f1..5d575a6e6 100644 --- a/frontend/empowerjs/src/codegen/tendermint/bundle.ts +++ b/frontend/empowerjs/src/codegen/tendermint/bundle.ts @@ -1,38 +1,38 @@ -import * as _151 from "./abci/types"; -import * as _152 from "./crypto/keys"; -import * as _153 from "./crypto/proof"; -import * as _154 from "./libs/bits/types"; -import * as _155 from "./p2p/types"; -import * as _156 from "./types/block"; -import * as _157 from "./types/evidence"; -import * as _158 from "./types/params"; -import * as _159 from "./types/types"; -import * as _160 from "./types/validator"; -import * as _161 from "./version/types"; +import * as _197 from "./abci/types"; +import * as _198 from "./crypto/keys"; +import * as _199 from "./crypto/proof"; +import * as _200 from "./libs/bits/types"; +import * as _201 from "./p2p/types"; +import * as _202 from "./types/block"; +import * as _203 from "./types/evidence"; +import * as _204 from "./types/params"; +import * as _205 from "./types/types"; +import * as _206 from "./types/validator"; +import * as _207 from "./version/types"; export namespace tendermint { export const abci = { - ..._151 + ..._197 }; export const crypto = { - ..._152, - ..._153 + ..._198, + ..._199 }; export namespace libs { export const bits = { - ..._154 + ..._200 }; } export const p2p = { - ..._155 + ..._201 }; export const types = { - ..._156, - ..._157, - ..._158, - ..._159, - ..._160 + ..._202, + ..._203, + ..._204, + ..._205, + ..._206 }; export const version = { - ..._161 + ..._207 }; } \ No newline at end of file diff --git a/frontend/empowerjs/src/utils/signing-client.ts b/frontend/empowerjs/src/utils/signing-client.ts index 5a9fdd057..64ff14497 100644 --- a/frontend/empowerjs/src/utils/signing-client.ts +++ b/frontend/empowerjs/src/utils/signing-client.ts @@ -1,18 +1,25 @@ import type { GeneratedType, OfflineSigner } from '@cosmjs/proto-signing'; -import { SigningStargateClient, defaultRegistryTypes } from '@cosmjs/stargate'; +import { GasPrice, SigningStargateClient, defaultRegistryTypes } from '@cosmjs/stargate'; +import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate"; import { Tendermint37Client } from '@cosmjs/tendermint-rpc'; import type { HttpEndpoint } from '@cosmjs/tendermint-rpc'; +import { Decimal } from "@cosmjs/math"; import { getSigningEmpowerchainClientOptions } from '../codegen'; // Until the generated version of this file is fixed, we need to manually use tm37 here export const getSigningTM37EmpowerchainClient = async ({ rpcEndpoint, signer, - defaultTypes = defaultRegistryTypes + defaultTypes = defaultRegistryTypes, + gasPrice = { + amount: Decimal.fromAtomics("25", 6), + denom: 'umpwr' + } }: { rpcEndpoint: string | HttpEndpoint; signer: OfflineSigner; defaultTypes?: ReadonlyArray<[string, GeneratedType]>; + gasPrice?: GasPrice; }) => { const { registry, aminoTypes } = getSigningEmpowerchainClientOptions({ defaultTypes @@ -22,8 +29,39 @@ export const getSigningTM37EmpowerchainClient = async ({ tm37Client, signer, { - registry, - aminoTypes + registry: registry, + aminoTypes: aminoTypes, + gasPrice: gasPrice + } + ); + return client; +}; + +export const getSigningCosmWasmTM37EmpowerchainClient = async ({ + rpcEndpoint, + signer, + defaultTypes = defaultRegistryTypes, + gasPrice = { + amount: Decimal.fromAtomics("25", 6), + denom: 'umpwr' + } +}: { + rpcEndpoint: string | HttpEndpoint; + signer: OfflineSigner; + defaultTypes?: ReadonlyArray<[string, GeneratedType]>; + gasPrice?: GasPrice; +}) => { + const { registry, aminoTypes } = getSigningEmpowerchainClientOptions({ + defaultTypes + }); + const tm37Client = await Tendermint37Client.connect(rpcEndpoint); + const client = await SigningCosmWasmClient.createWithSigner( + tm37Client, + signer, + { + registry: registry, + aminoTypes: aminoTypes, + gasPrice: gasPrice } ); return client; diff --git a/frontend/marketplace/.env.dev b/frontend/marketplace/.env.dev new file mode 100644 index 000000000..89b8a215b --- /dev/null +++ b/frontend/marketplace/.env.dev @@ -0,0 +1,12 @@ +VITE_API_ENDPOINT="https://testnet.empowerchain.io:3000/" +VITE_HTTPS_FILE_URL="https://testnet.empowerchain.io:8080/ipfs/" +VITE_MARKETPLACE_CONTRACT="empower14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sfg4umu" +VITE_CHAIN_ID="circulus-1" +VITE_CHAIN_NAME="Empowerchain Testnet" +VITE_RPC_ENDPOINT="https://testnet.empowerchain.io:26659" +VITE_REST_ENDPOINT="https://testnet.empowerchain.io:1319" +VITE_DEFAULT_CREDIT_TYPE="PCRD" +VITE_GOOGLE_MAPS_API_KEY="" +VITE_REVISION_ID="local" +VITE_ENVIRONMENT="local" +VITE_ROLLBAR_ACCESS_TOKEN="" \ No newline at end of file diff --git a/frontend/marketplace/.eslintrc.cjs b/frontend/marketplace/.eslintrc.cjs index ad9fac2a2..0b2a030f7 100644 --- a/frontend/marketplace/.eslintrc.cjs +++ b/frontend/marketplace/.eslintrc.cjs @@ -1,18 +1,18 @@ /* eslint-env node */ -require('@rushstack/eslint-patch/modern-module-resolution') +require("@rushstack/eslint-patch/modern-module-resolution"); module.exports = { root: true, env: { node: true, }, - 'extends': [ - 'plugin:vue/vue3-essential', - 'eslint:recommended', - '@vue/eslint-config-typescript', - '@vue/eslint-config-prettier/skip-formatting' + extends: [ + "plugin:vue/vue3-essential", + "eslint:recommended", + "@vue/eslint-config-typescript", + "@vue/eslint-config-prettier", ], parserOptions: { - ecmaVersion: 'latest' - } -} + ecmaVersion: "latest", + }, +}; diff --git a/frontend/marketplace/.gitignore b/frontend/marketplace/.gitignore index 38adffa64..0fee972cd 100644 --- a/frontend/marketplace/.gitignore +++ b/frontend/marketplace/.gitignore @@ -26,3 +26,4 @@ coverage *.njsproj *.sln *.sw? +.env \ No newline at end of file diff --git a/frontend/marketplace/.prettierrc.json b/frontend/marketplace/.prettierrc.json index 66e23359c..9e26dfeeb 100644 --- a/frontend/marketplace/.prettierrc.json +++ b/frontend/marketplace/.prettierrc.json @@ -1,8 +1 @@ -{ - "$schema": "https://json.schemastore.org/prettierrc", - "semi": false, - "tabWidth": 2, - "singleQuote": true, - "printWidth": 100, - "trailingComma": "none" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/frontend/marketplace/index.html b/frontend/marketplace/index.html index a88854489..960393438 100644 --- a/frontend/marketplace/index.html +++ b/frontend/marketplace/index.html @@ -4,7 +4,7 @@ - Vite App + Empower Market
diff --git a/frontend/marketplace/package-lock.json b/frontend/marketplace/package-lock.json index 83a735afe..c8dacd388 100644 --- a/frontend/marketplace/package-lock.json +++ b/frontend/marketplace/package-lock.json @@ -1,21 +1,31 @@ { "name": "empower-marketplace", "version": "0.0.1", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "empower-marketplace", "version": "0.0.1", "dependencies": { + "@apollo/client": "^3.7.14", + "@empower-plastic/empowerjs": "0.0.18", + "@keplr-wallet/types": "^0.11.51", + "@vue/apollo-composable": "^4.0.0-beta.5", + "@vue/apollo-option": "^4.0.0-beta.5", "@vuepic/vue-datepicker": "^5.1.0", "daisyui": "^2.51.6", + "graphql": "^16.6.0", + "graphql-tag": "^2.12.6", "pinia": "^2.0.32", - "vue": "^3.2.47", + "rollbar": "^2.26.1", + "vue": "^3.3.2", "vue-awesome-paginate": "^1.1.46", + "vue-multiselect": "^3.0.0-beta.2", "vue-router": "^4.1.6", "vue3-carousel": "^0.3.1", - "vue3-google-map": "^0.15.0" + "vue3-google-map": "^0.15.0", + "vue3-toastify": "^0.1.11" }, "devDependencies": { "@rushstack/eslint-patch": "^1.2.0", @@ -52,6 +62,52 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@apollo/client": { + "version": "3.7.14", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.7.14.tgz", + "integrity": "sha512-BRvdkwq5PAXBkjXjboO12uksDm3nrZEqDi4xF97Fk3Mnaa0zDOEfJa7hoKTY9b9KA1EkeWv9BL3i7hSd4SfGBg==", + "dependencies": { + "@graphql-typed-document-node/core": "^3.1.1", + "@wry/context": "^0.7.0", + "@wry/equality": "^0.5.0", + "@wry/trie": "^0.3.0", + "graphql-tag": "^2.12.6", + "hoist-non-react-statics": "^3.3.2", + "optimism": "^0.16.2", + "prop-types": "^15.7.2", + "response-iterator": "^0.2.6", + "symbol-observable": "^4.0.0", + "ts-invariant": "^0.10.3", + "tslib": "^2.3.0", + "zen-observable-ts": "^1.2.5" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0", + "graphql-ws": "^5.5.5", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "subscriptions-transport-ws": "^0.9.0 || ^0.11.0" + }, + "peerDependenciesMeta": { + "graphql-ws": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "subscriptions-transport-ws": { + "optional": true + } + } + }, + "node_modules/@apollo/client/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, "node_modules/@babel/parser": { "version": "7.21.8", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", @@ -74,6 +130,203 @@ "node": ">=6.9.0" } }, + "node_modules/@confio/ics23": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz", + "integrity": "sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w==", + "dependencies": { + "@noble/hashes": "^1.0.0", + "protobufjs": "^6.8.8" + } + }, + "node_modules/@cosmjs/amino": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.30.0.tgz", + "integrity": "sha512-DFPu0dALghQj7A9b8SHnrpNiMsGi4lEs2ZM7XvO/baYgktn8iS5P9LQXmDch5UhKkjJy+uz5aAMD9iFlK6opCQ==", + "dependencies": { + "@cosmjs/crypto": "^0.30.0", + "@cosmjs/encoding": "^0.30.0", + "@cosmjs/math": "^0.30.0", + "@cosmjs/utils": "^0.30.0" + } + }, + "node_modules/@cosmjs/cosmwasm-stargate": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.30.0.tgz", + "integrity": "sha512-nPJWpwSGpc15K88/9uxZmolEbixkeGzmxpTv6IbMAH23LXeJs7P+tXtgPe41ZjUw8Lt9Zc7ZOaOAqVveqqRktQ==", + "dependencies": { + "@cosmjs/amino": "^0.30.0", + "@cosmjs/crypto": "^0.30.0", + "@cosmjs/encoding": "^0.30.0", + "@cosmjs/math": "^0.30.0", + "@cosmjs/proto-signing": "^0.30.0", + "@cosmjs/stargate": "^0.30.0", + "@cosmjs/tendermint-rpc": "^0.30.0", + "@cosmjs/utils": "^0.30.0", + "cosmjs-types": "^0.7.1", + "long": "^4.0.0", + "pako": "^2.0.2" + } + }, + "node_modules/@cosmjs/crypto": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.30.1.tgz", + "integrity": "sha512-rAljUlake3MSXs9xAm87mu34GfBLN0h/1uPPV6jEwClWjNkAMotzjC0ab9MARy5FFAvYHL3lWb57bhkbt2GtzQ==", + "dependencies": { + "@cosmjs/encoding": "^0.30.1", + "@cosmjs/math": "^0.30.1", + "@cosmjs/utils": "^0.30.1", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.4", + "libsodium-wrappers": "^0.7.6" + } + }, + "node_modules/@cosmjs/encoding": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.30.1.tgz", + "integrity": "sha512-rXmrTbgqwihORwJ3xYhIgQFfMSrwLu1s43RIK9I8EBudPx3KmnmyAKzMOVsRDo9edLFNuZ9GIvysUCwQfq3WlQ==", + "dependencies": { + "base64-js": "^1.3.0", + "bech32": "^1.1.4", + "readonly-date": "^1.0.0" + } + }, + "node_modules/@cosmjs/json-rpc": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.30.1.tgz", + "integrity": "sha512-pitfC/2YN9t+kXZCbNuyrZ6M8abnCC2n62m+JtU9vQUfaEtVsgy+1Fk4TRQ175+pIWSdBMFi2wT8FWVEE4RhxQ==", + "dependencies": { + "@cosmjs/stream": "^0.30.1", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/math": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.30.1.tgz", + "integrity": "sha512-yaoeI23pin9ZiPHIisa6qqLngfnBR/25tSaWpkTm8Cy10MX70UF5oN4+/t1heLaM6SSmRrhk3psRkV4+7mH51Q==", + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cosmjs/proto-signing": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.30.0.tgz", + "integrity": "sha512-+AKJa8xomn/qt73mu98yRQdiqb8wfrmwZGOCsUNRMSs5GIj8ltGNwTwElKY2VjK+O9buG7NSyVQBEGycC5Nj0A==", + "dependencies": { + "@cosmjs/amino": "^0.30.0", + "@cosmjs/crypto": "^0.30.0", + "@cosmjs/encoding": "^0.30.0", + "@cosmjs/math": "^0.30.0", + "@cosmjs/utils": "^0.30.0", + "cosmjs-types": "^0.7.1", + "long": "^4.0.0" + } + }, + "node_modules/@cosmjs/socket": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.30.1.tgz", + "integrity": "sha512-r6MpDL+9N+qOS/D5VaxnPaMJ3flwQ36G+vPvYJsXArj93BjgyFB7BwWwXCQDzZ+23cfChPUfhbINOenr8N2Kow==", + "dependencies": { + "@cosmjs/stream": "^0.30.1", + "isomorphic-ws": "^4.0.1", + "ws": "^7", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/socket/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@cosmjs/stargate": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.30.0.tgz", + "integrity": "sha512-BrE1iV7M0/oBSTM5doDS+qX4Na1sVtSYMQsGUV3wde49gVttVsoHTNufk4KESQ7lfGemSwgOMsgoKBs/M8TnlA==", + "dependencies": { + "@confio/ics23": "^0.6.8", + "@cosmjs/amino": "^0.30.0", + "@cosmjs/encoding": "^0.30.0", + "@cosmjs/math": "^0.30.0", + "@cosmjs/proto-signing": "^0.30.0", + "@cosmjs/stream": "^0.30.0", + "@cosmjs/tendermint-rpc": "^0.30.0", + "@cosmjs/utils": "^0.30.0", + "cosmjs-types": "^0.7.1", + "long": "^4.0.0", + "protobufjs": "~6.11.3", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/stream": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.30.1.tgz", + "integrity": "sha512-Fg0pWz1zXQdoxQZpdHRMGvUH5RqS6tPv+j9Eh7Q953UjMlrwZVo0YFLC8OTf/HKVf10E4i0u6aM8D69Q6cNkgQ==", + "dependencies": { + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/tendermint-rpc": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.30.0.tgz", + "integrity": "sha512-QpNXwxfCPTHXrfq/LzXvwRxDjTV0R16kPISJ00zu3zSTtANCnBMZiNNFszrCdZKw81fNKo8/Rf2T0gCNvWfGog==", + "dependencies": { + "@cosmjs/crypto": "^0.30.0", + "@cosmjs/encoding": "^0.30.0", + "@cosmjs/json-rpc": "^0.30.0", + "@cosmjs/math": "^0.30.0", + "@cosmjs/socket": "^0.30.0", + "@cosmjs/stream": "^0.30.0", + "@cosmjs/utils": "^0.30.0", + "axios": "^0.21.2", + "readonly-date": "^1.0.0", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/tendermint-rpc/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/@cosmjs/utils": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.30.1.tgz", + "integrity": "sha512-KvvX58MGMWh7xA+N+deCfunkA/ZNDvFLw4YbOmX3f/XBIkqrVY7qlotfy2aNb1kgp6h4B6Yc8YawJPDTfvWX7g==" + }, + "node_modules/@empower-plastic/empowerjs": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@empower-plastic/empowerjs/-/empowerjs-0.0.18.tgz", + "integrity": "sha512-fIUuEjT8U6oOWu5SBbUyoKlrFyUxaLgIfFfGmjckz7N5+EffAgcEDCGgyl5krnw6FTUdmHUay7X3xq/ME9TZLQ==", + "dependencies": { + "@babel/runtime": "^7.19.4", + "@cosmjs/amino": "0.30.0", + "@cosmjs/cosmwasm-stargate": "0.30.0", + "@cosmjs/proto-signing": "0.30.0", + "@cosmjs/stargate": "0.30.0", + "@cosmjs/tendermint-rpc": "0.30.0", + "@osmonauts/lcd": "^0.10.0", + "jsonschema": "^1.4.1", + "protobufjs": "^6.11.2" + } + }, "node_modules/@esbuild/android-arm": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", @@ -314,22 +567,6 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", - "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@esbuild/netbsd-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", @@ -498,6 +735,14 @@ "supercluster": "^8.0.1" } }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -579,6 +824,26 @@ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, + "node_modules/@keplr-wallet/types": { + "version": "0.11.64", + "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.11.64.tgz", + "integrity": "sha512-GgzeLDHHfZFyne3O7UIfFHj/uYqVbxAZI31RbBwt460OBbvwQzjrlZwvJW3vieWRAgxKSITjzEDBl2WneFTQdQ==", + "dependencies": { + "axios": "^0.27.2", + "long": "^4.0.0" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -611,6 +876,69 @@ "node": ">= 8" } }, + "node_modules/@osmonauts/lcd": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@osmonauts/lcd/-/lcd-0.10.0.tgz", + "integrity": "sha512-PzmXk9x9MHyLn2fUztpAqWqvDmMiEJaQv/JcAoAOE8VdHrD9Hf/KWnE1RZtamuS2ngQRqvQPD0xotCGXW7eTxA==", + "dependencies": { + "@babel/runtime": "^7.19.0", + "axios": "0.27.2" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "node_modules/@rushstack/eslint-patch": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz", @@ -658,11 +986,15 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, "node_modules/@types/node": { "version": "18.16.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.7.tgz", - "integrity": "sha512-MFg7ua/bRtnA1hYE3pVyWxGd/r7aMqjNOdHvlSsXV3n8iaeGKkOaPzpJh6/ovf4bEXWcojkeMJpTsq3mzXW4IQ==", - "dev": true + "integrity": "sha512-MFg7ua/bRtnA1hYE3pVyWxGd/r7aMqjNOdHvlSsXV3n8iaeGKkOaPzpJh6/ovf4bEXWcojkeMJpTsq3mzXW4IQ==" }, "node_modules/@types/semver": { "version": "7.5.0", @@ -1038,56 +1370,6 @@ "@vue/shared": "3.3.0-beta.5" } }, - "node_modules/@volar/vue-language-core/node_modules/@vue/compiler-sfc": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.0-beta.5.tgz", - "integrity": "sha512-CbiY2dkzU5IG652ygLUSufLGvXPKI12TQp1PeHs9acjgFjhvSJCSKmAOaCWnXgFsAgpbipPHgAMfWJ8B0h6Sjw==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.15", - "@vue/compiler-core": "3.3.0-beta.5", - "@vue/compiler-dom": "3.3.0-beta.5", - "@vue/compiler-ssr": "3.3.0-beta.5", - "@vue/reactivity-transform": "3.3.0-beta.5", - "@vue/shared": "3.3.0-beta.5", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.0", - "postcss": "^8.1.10", - "source-map-js": "^1.0.2" - } - }, - "node_modules/@volar/vue-language-core/node_modules/@vue/compiler-ssr": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.0-beta.5.tgz", - "integrity": "sha512-16njciFrQ8ejVdH5tsaPbJwpkpBB2z2VWCxfC69UOylCgPxiW01syE9S/mozRvv5Ken9Sr9bd2MjebG/SEpPNg==", - "dev": true, - "dependencies": { - "@vue/compiler-dom": "3.3.0-beta.5", - "@vue/shared": "3.3.0-beta.5" - } - }, - "node_modules/@volar/vue-language-core/node_modules/@vue/reactivity": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.0-beta.5.tgz", - "integrity": "sha512-YrikWho94hX4lYoTKr1TtMtzzC8hSXVFw9sXlw2Fl6dyXDztu/djI2vNT4FbbcH1Hbm1+yKM09zrJYvkN/tlYA==", - "dev": true, - "dependencies": { - "@vue/shared": "3.3.0-beta.5" - } - }, - "node_modules/@volar/vue-language-core/node_modules/@vue/reactivity-transform": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.0-beta.5.tgz", - "integrity": "sha512-v/PCri6+vL8WwwgowHlIopwiqonCj9wV60ZYDdX8AMDxk9Q01h2cWh61JF4XOX7qDs7NdJ7zSVyKSz4B98OXBw==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.15", - "@vue/compiler-core": "3.3.0-beta.5", - "@vue/shared": "3.3.0-beta.5", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.0" - } - }, "node_modules/@volar/vue-language-core/node_modules/@vue/shared": { "version": "3.3.0-beta.5", "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.0-beta.5.tgz", @@ -1103,18 +1385,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@volar/vue-language-core/node_modules/magic-string": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", - "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", - "dev": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.13" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@volar/vue-language-core/node_modules/minimatch": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", @@ -1143,46 +1413,108 @@ "typescript": "*" } }, + "node_modules/@vue/apollo-composable": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vue/apollo-composable/-/apollo-composable-4.0.0-beta.5.tgz", + "integrity": "sha512-PDi/LpCJrY0m1YSRIv38n1q5WGUu8T0BzbFFNjUJ3nHdElyqvDJCnazRtasyvXB16i0+4rMQhpmf/xgkRgFePA==", + "dependencies": { + "throttle-debounce": "^3.0.1", + "ts-essentials": "^9.1.2", + "vue-demi": "^0.13.1" + }, + "peerDependencies": { + "@apollo/client": "^3.4.13", + "@vue/composition-api": "^1.0.0", + "graphql": ">=15", + "vue": "^2.6.0 || ^3.1.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vue/apollo-composable/node_modules/vue-demi": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", + "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vue/apollo-option": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vue/apollo-option/-/apollo-option-4.0.0-beta.5.tgz", + "integrity": "sha512-1bDkF8yzhQ2Hm0CQLve20L4ynIrsxlUilqg1ufcr17IQLlIsjY+fbBfzAljD8dH2iuyRrul/FtTHOeg3tC05PQ==", + "dependencies": { + "throttle-debounce": "^3.0.1" + }, + "peerDependencies": { + "@apollo/client": "^3.2.1", + "vue": "^3.1.0" + } + }, "node_modules/@vue/compiler-core": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.2.tgz", + "integrity": "sha512-CKZWo1dzsQYTNTft7whzjL0HsrEpMfiK7pjZ2WFE3bC1NA7caUjWioHSK+49y/LK7Bsm4poJZzAMnvZMQ7OTeg==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", + "@babel/parser": "^7.21.3", + "@vue/shared": "3.3.2", "estree-walker": "^2.0.2", - "source-map": "^0.6.1" + "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-dom": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.2.tgz", + "integrity": "sha512-6gS3auANuKXLw0XH6QxkWqyPYPunziS2xb6VRenM3JY7gVfZcJvkCBHkb5RuNY1FCbBO3lkIi0CdXUCW1c7SXw==", "dependencies": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" + "@vue/compiler-core": "3.3.2", + "@vue/shared": "3.3.2" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.2.tgz", + "integrity": "sha512-jG4jQy28H4BqzEKsQqqW65BZgmo3vzdLHTBjF+35RwtDdlFE+Fk1VWJYUnDMMqkFBo6Ye1ltSKVOMPgkzYj7SQ==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", + "@babel/parser": "^7.20.15", + "@vue/compiler-core": "3.3.2", + "@vue/compiler-dom": "3.3.2", + "@vue/compiler-ssr": "3.3.2", + "@vue/reactivity-transform": "3.3.2", + "@vue/shared": "3.3.2", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", + "magic-string": "^0.30.0", "postcss": "^8.1.10", - "source-map": "^0.6.1" + "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.2.tgz", + "integrity": "sha512-K8OfY5FQtZaSOJHHe8xhEfIfLrefL/Y9frv4k4NsyQL3+0lRKxr9QuJhfdBDjkl7Fhz8CzKh63mULvmOfx3l2w==", "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" + "@vue/compiler-dom": "3.3.2", + "@vue/shared": "3.3.2" } }, "node_modules/@vue/devtools-api": { @@ -1229,54 +1561,60 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.2.tgz", + "integrity": "sha512-yX8C4uTgg2Tdj+512EEMnMKbLveoITl7YdQX35AYgx8vBvQGszKiiCN46g4RY6/deeo/5DLbeUUGxCq1qWMf5g==", "dependencies": { - "@vue/shared": "3.2.47" + "@vue/shared": "3.3.2" } }, "node_modules/@vue/reactivity-transform": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.2.tgz", + "integrity": "sha512-iu2WaQvlJHdnONrsyv4ibIEnSsuKF+aHFngGj/y1lwpHQtalpVhKg9wsKMoiKXS9zPNjG9mNKzJS9vudvjzvyg==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", + "@babel/parser": "^7.20.15", + "@vue/compiler-core": "3.3.2", + "@vue/shared": "3.3.2", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" + "magic-string": "^0.30.0" } }, "node_modules/@vue/runtime-core": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.2.tgz", + "integrity": "sha512-qSl95qj0BvKfcsO+hICqFEoLhJn6++HtsPxmTkkadFbuhe3uQfJ8HmQwvEr7xbxBd2rcJB6XOJg7nWAn/ymC5A==", "dependencies": { - "@vue/reactivity": "3.2.47", - "@vue/shared": "3.2.47" + "@vue/reactivity": "3.3.2", + "@vue/shared": "3.3.2" } }, "node_modules/@vue/runtime-dom": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.2.tgz", + "integrity": "sha512-+drStsJT+0mtgHdarT7cXZReCcTFfm6ptxMrz0kAW5hms6UNBd8Q1pi4JKlncAhu+Ld/TevsSp7pqAZxBBoGng==", "dependencies": { - "@vue/runtime-core": "3.2.47", - "@vue/shared": "3.2.47", - "csstype": "^2.6.8" + "@vue/runtime-core": "3.3.2", + "@vue/shared": "3.3.2", + "csstype": "^3.1.1" } }, "node_modules/@vue/server-renderer": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.2.tgz", + "integrity": "sha512-QCwh6OGwJg6GDLE0fbQhRTR6tnU+XDJ1iCsTYHXBiezCXAhqMygFRij7BiLF4ytvvHcg5kX9joX5R5vP85++wg==", "dependencies": { - "@vue/compiler-ssr": "3.2.47", - "@vue/shared": "3.2.47" + "@vue/compiler-ssr": "3.3.2", + "@vue/shared": "3.3.2" }, "peerDependencies": { - "vue": "3.2.47" + "vue": "3.3.2" } }, "node_modules/@vue/shared": { - "version": "3.2.47", - "license": "MIT" + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.2.tgz", + "integrity": "sha512-0rFu3h8JbclbnvvKrs7Fe5FNGV9/5X2rPD7KmOzhLSUAiQH5//Hq437Gv0fR5Mev3u/nbtvmLl8XgwCU20/ZfQ==" }, "node_modules/@vue/test-utils": { "version": "2.3.2", @@ -1325,28 +1663,76 @@ "vue": ">=3.2.0" } }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" + "node_modules/@wry/context": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.3.tgz", + "integrity": "sha512-Nl8WTesHp89RF803Se9X3IiHjdmLBrIvPMaJkl+rKVJAYyPsz1TEUbu89943HpvujtSJgDUx9W4vZw3K1Mr3sA==", + "dependencies": { + "tslib": "^2.3.0" }, "engines": { - "node": ">=0.4.0" + "node": ">=8" + } + }, + "node_modules/@wry/context/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "node_modules/@wry/equality": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.5.6.tgz", + "integrity": "sha512-D46sfMTngaYlrH+OspKf8mIJETntFnf6Hsjb0V41jAXJ7Bx2kB8Rv8RCUujuVWYttFtHkUNp7g+FwxNQAr6mXA==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/equality/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "node_modules/@wry/trie": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.3.2.tgz", + "integrity": "sha512-yRTyhWSls2OY/pYLfwff867r8ekooZ4UI+/gxot5Wj8EFwSf2rG+n+Mo/6LoLQm1TKA4GRj2+LCpbfS937dClQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/trie/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "node_modules/abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" } }, "node_modules/acorn-globals": { @@ -1488,11 +1874,15 @@ "node": "*" } }, + "node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/autoprefixer": { "version": "10.4.14", @@ -1538,11 +1928,44 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1551,6 +1974,11 @@ "node": ">=8" } }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -1577,6 +2005,11 @@ "node": ">=8" } }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, "node_modules/browserslist": { "version": "4.21.5", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", @@ -1799,7 +2232,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1828,6 +2260,20 @@ "proto-list": "~1.2.1" } }, + "node_modules/console-polyfill": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/console-polyfill/-/console-polyfill-0.3.0.tgz", + "integrity": "sha512-w+JSDZS7XML43Xnwo2x5O5vxB0ID7T5BdqDtyqT6uiCAX2kZAgcWxNaGqT97tZfSHzfOcvrfsDAodKcJ3UvnXQ==" + }, + "node_modules/cosmjs-types": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.7.2.tgz", + "integrity": "sha512-vf2uLyktjr/XVAgEq0DjMxeAWh1yYREe7AMHDKd7EiHVqxBPCaBS+qEEQUkXbR9ndnckqr1sUG8BQhazh4X5lA==", + "dependencies": { + "long": "^4.0.0", + "protobufjs": "~6.11.2" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1875,9 +2321,9 @@ } }, "node_modules/csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "node_modules/daisyui": { "version": "2.51.6", @@ -1958,6 +2404,15 @@ } } }, + "node_modules/decache": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/decache/-/decache-3.1.0.tgz", + "integrity": "sha512-p7D6wJ5EJFFq1CcF2lu1XeqKFLBob8jRQGNAvFLTsV3CbSKBl3VtliAVlUIGz2i9H6kEFnI2Amaft5ZopIG2Fw==", + "optional": true, + "dependencies": { + "find": "^0.2.4" + } + }, "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", @@ -1986,7 +2441,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, "dependencies": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -2002,7 +2456,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -2097,6 +2550,25 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.388.tgz", "integrity": "sha512-xZ0y4zjWZgp65okzwwt00f2rYibkFPHUv9qBz+Vzn8cB9UXIo9Zc6Dw81LJYhhNt0G/vR1OJEfStZ49NKl0YxQ==" }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -2124,6 +2596,14 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/error-stack-parser": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", + "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", + "dependencies": { + "stackframe": "^1.3.4" + } + }, "node_modules/es-abstract": { "version": "1.21.2", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", @@ -2240,6 +2720,22 @@ "@esbuild/win32-x64": "0.17.18" } }, + "node_modules/esbuild/node_modules/@esbuild/linux-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", + "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2631,6 +3127,15 @@ "node": ">=8" } }, + "node_modules/find": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/find/-/find-0.2.9.tgz", + "integrity": "sha512-7a4/LCiInB9xYMnAUEjLilL9FKclwbwK7VlXw+h5jMvT2TDFeYFCHM24O1XdnC/on/hx8mxVO3FTQkyHZnOghQ==", + "optional": true, + "dependencies": { + "traverse-chain": "~0.1.0" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -2666,6 +3171,25 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -2679,7 +3203,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -2764,7 +3287,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", - "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -2859,7 +3381,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, "dependencies": { "define-properties": "^1.1.3" }, @@ -2914,6 +3435,33 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, + "node_modules/graphql": { + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.6.0.tgz", + "integrity": "sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw==", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/graphql-tag": { + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", + "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, + "node_modules/graphql-tag/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2947,7 +3495,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.1" }, @@ -2971,7 +3518,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2994,6 +3540,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -3003,6 +3558,29 @@ "he": "bin/he" } }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -3143,6 +3721,11 @@ "node": ">= 0.4" } }, + "node_modules/is_js": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", + "integrity": "sha512-8Y5EHSH+TonfUHX2g3pMJljdbGavg55q4jmHzghJCdqYDbdNROC8uw/YFQwIRCRqRJT1EY3pJefz+kglw+o7sg==" + }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -3416,6 +3999,14 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, "node_modules/jiti": { "version": "1.18.2", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", @@ -3454,6 +4045,11 @@ "url": "https://opencollective.com/js-sdsl" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3529,12 +4125,25 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, "node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, + "node_modules/jsonschema": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", + "engines": { + "node": "*" + } + }, "node_modules/kdbush": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", @@ -3553,6 +4162,19 @@ "node": ">= 0.8.0" } }, + "node_modules/libsodium": { + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.11.tgz", + "integrity": "sha512-WPfJ7sS53I2s4iM58QxY3Inb83/6mjlYgcmZs7DJsvDlnmVUwNinBCi5vBT43P6bHRy01O4zsMU2CoVR6xJ40A==" + }, + "node_modules/libsodium-wrappers": { + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.11.tgz", + "integrity": "sha512-SrcLtXj7BM19vUKtQuyQKiQCRJPgbpauzl3s0rSwD+60wtHqSUuqcoawlMDheCJga85nKOQwxNYQxf/CKAvs6Q==", + "dependencies": { + "libsodium": "^0.7.11" + } + }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -3620,6 +4242,22 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/loupe": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", @@ -3640,11 +4278,14 @@ } }, "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", + "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" } }, "node_modules/memorystream": { @@ -3680,7 +4321,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -3689,7 +4329,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -3697,6 +4336,16 @@ "node": ">= 0.6" } }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4044,7 +4693,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -4075,6 +4723,15 @@ "wrappy": "1" } }, + "node_modules/optimism": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.16.2.tgz", + "integrity": "sha512-zWNbgWj+3vLEjZNIh/okkY2EUfX+vB9TJopzIZwT1xxaMqC5hRLLraePod4c5n4He08xuXNH+zhKFFCu390wiQ==", + "dependencies": { + "@wry/context": "^0.7.0", + "@wry/trie": "^0.3.0" + } + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -4122,6 +4779,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4504,12 +5166,52 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", "dev": true }, + "node_modules/protobufjs": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", + "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -4615,6 +5317,11 @@ "node": ">=8.10.0" } }, + "node_modules/readonly-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readonly-date/-/readonly-date-1.0.0.tgz", + "integrity": "sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==" + }, "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", @@ -4637,6 +5344,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/request-ip": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/request-ip/-/request-ip-2.0.2.tgz", + "integrity": "sha512-Y6LxqTmxLKKDk2I5tU2sxoCSKAnWJ42jmGqixNrH+oYoAyncpal7fFF5gqJ2bbgkRmb9qYNxdD6KFHfLS4dKBA==", + "dependencies": { + "is_js": "^0.9.0" + } + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -4668,6 +5383,14 @@ "node": ">=4" } }, + "node_modules/response-iterator": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/response-iterator/-/response-iterator-0.2.6.tgz", + "integrity": "sha512-pVzEEzrsg23Sh053rmDUvLSkGXluZio0qu8VT6ukrYuvtjVfCbDZH9d6PGXb8HZfzdNZt8feXv/jvUzlhRgLnw==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4712,6 +5435,36 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollbar": { + "version": "2.26.1", + "resolved": "https://registry.npmjs.org/rollbar/-/rollbar-2.26.1.tgz", + "integrity": "sha512-zphIb11bYUXP+9LJGfehukizyxINK8llwYxAeGjZTDdblyqT1Wmh1Fka3ucHjHSqeR/vZyIjTFGLj/PajUK5Gg==", + "dependencies": { + "async": "~3.2.3", + "console-polyfill": "0.3.0", + "error-stack-parser": "^2.0.4", + "json-stringify-safe": "~5.0.0", + "lru-cache": "~2.2.1", + "request-ip": "~2.0.1", + "source-map": "^0.5.7" + }, + "optionalDependencies": { + "decache": "^3.0.5" + } + }, + "node_modules/rollbar/node_modules/lru-cache": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", + "integrity": "sha512-Q5pAgXs+WEAfoEdw2qKQhNFFhMoFMTYqRVKKUMnzuiR7oKFHS7fWo848cPcTKw+4j/IdN17NyzdhVKgabFV0EA==" + }, + "node_modules/rollbar/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/rollup": { "version": "3.21.6", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.6.tgz", @@ -4931,6 +5684,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -4943,12 +5697,6 @@ "node": ">=0.10.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead" - }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -4987,6 +5735,11 @@ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true }, + "node_modules/stackframe": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", + "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==" + }, "node_modules/std-env": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.3.tgz", @@ -5223,6 +5976,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -5291,6 +6052,14 @@ "node": ">=0.8" } }, + "node_modules/throttle-debounce": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz", + "integrity": "sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==", + "engines": { + "node": ">=10" + } + }, "node_modules/tinybench": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.0.tgz", @@ -5353,11 +6122,41 @@ "node": ">=14" } }, + "node_modules/traverse-chain": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz", + "integrity": "sha512-up6Yvai4PYKhpNp5PkYtx50m3KbwQrqDwbuZP/ItyL64YEWHAvH6Md83LFLV/GRSk/BoUVwwgUzX6SOQSbsfAg==", + "optional": true + }, + "node_modules/ts-essentials": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-9.3.2.tgz", + "integrity": "sha512-JxKJzuWqH1MmH4ZFHtJzGEhkfN3QvVR3C3w+4BIoWeoY68UVVoA2Np/Bca9z0IPSErVCWhv439aT0We4Dks8kQ==", + "peerDependencies": { + "typescript": ">=4.1.0" + } + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" }, + "node_modules/ts-invariant": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.10.3.tgz", + "integrity": "sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ==", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-invariant/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -5428,7 +6227,6 @@ }, "node_modules/typescript": { "version": "4.8.4", - "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -5680,14 +6478,15 @@ } }, "node_modules/vue": { - "version": "3.2.47", - "license": "MIT", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.2.tgz", + "integrity": "sha512-98hJcAhyDwZoOo2flAQBSPVYG/o0HA9ivIy2ktHshjE+6/q8IMQ+kvDKQzOZTFPxvnNMcGM+zS2A00xeZMA7tA==", "dependencies": { - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-sfc": "3.2.47", - "@vue/runtime-dom": "3.2.47", - "@vue/server-renderer": "3.2.47", - "@vue/shared": "3.2.47" + "@vue/compiler-dom": "3.3.2", + "@vue/compiler-sfc": "3.3.2", + "@vue/runtime-dom": "3.3.2", + "@vue/server-renderer": "3.3.2", + "@vue/shared": "3.3.2" } }, "node_modules/vue-awesome-paginate": { @@ -5722,6 +6521,15 @@ "eslint": ">=6.0.0" } }, + "node_modules/vue-multiselect": { + "version": "3.0.0-beta.2", + "resolved": "https://registry.npmjs.org/vue-multiselect/-/vue-multiselect-3.0.0-beta.2.tgz", + "integrity": "sha512-TFVHtI/KdWoD3Opzbkso8OIqkZlZEqFF7f2jlYx1ttgC4Jv/48IGlU5zn6cBR4p2bFDFGCHF5SkLCaadLhnBPQ==", + "engines": { + "node": ">= 4.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/vue-router": { "version": "4.1.6", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.1.6.tgz", @@ -5787,6 +6595,23 @@ "vue": "3" } }, + "node_modules/vue3-toastify": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/vue3-toastify/-/vue3-toastify-0.1.11.tgz", + "integrity": "sha512-xOghHidGEuzLaDp9yiCdEt53c02x16m3ai/G3vq9d7XST77YAaPk1p1D0DiTbbpYUvGQGC1SYA7e3Z9+IP3r6w==", + "engines": { + "node": ">=16", + "npm": ">=7" + }, + "peerDependencies": { + "vue": ">=3.2.0" + }, + "peerDependenciesMeta": { + "vue": { + "optional": true + } + } + }, "node_modules/w3c-xmlserializer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", @@ -5927,7 +6752,6 @@ "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, "engines": { "node": ">=10.0.0" }, @@ -5959,6 +6783,23 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, + "node_modules/xstream": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", + "integrity": "sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==", + "dependencies": { + "globalthis": "^1.0.1", + "symbol-observable": "^2.0.3" + } + }, + "node_modules/xstream/node_modules/symbol-observable": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-2.0.3.tgz", + "integrity": "sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", @@ -5984,4137 +6825,19 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - } - }, - "dependencies": { - "@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==" - }, - "@babel/parser": { - "version": "7.21.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", - "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==" - }, - "@babel/runtime": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.5.tgz", - "integrity": "sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==", - "requires": { - "regenerator-runtime": "^0.13.11" - } - }, - "@esbuild/android-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", - "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", - "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", - "dev": true, - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", - "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", - "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", - "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", - "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", - "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", - "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", - "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", - "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", - "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", - "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", - "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", - "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", - "dev": true, - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", - "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", - "dev": true, - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", - "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", - "dev": true, - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", - "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", - "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", - "dev": true, - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", - "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", - "dev": true, - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", - "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", - "dev": true, - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", - "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", - "dev": true, - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", - "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", - "dev": true, - "optional": true - }, - "@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^3.3.0" - } - }, - "@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "2.0.2", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.5.1", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@eslint/js": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", - "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", - "dev": true - }, - "@googlemaps/js-api-loader": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@googlemaps/js-api-loader/-/js-api-loader-1.15.2.tgz", - "integrity": "sha512-8FJwvd1F5Zxs/kDuH/ESFwSjOY0ZyGVkPDyv2VmC9cg8n1vPUKmvZJh/EzoikC/Z5itGMTRfcxmvSapXAi0+zQ==", - "requires": { - "fast-deep-equal": "^3.1.3" - } - }, - "@googlemaps/markerclusterer": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@googlemaps/markerclusterer/-/markerclusterer-2.1.3.tgz", - "integrity": "sha512-zQdrczm3Q6rqogJ5wUimSkAGobfRsMFdy4Jr+Qda3JZQk9/VyYZuqJjgiJQB5X4/lByhGJj59d64WnynMP2g7Q==", - "requires": { - "fast-deep-equal": "^3.1.3", - "supercluster": "^8.0.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "node_modules/zen-observable": { + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", + "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==" }, - "@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - }, + "node_modules/zen-observable-ts": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz", + "integrity": "sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg==", "dependencies": { - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - } + "zen-observable": "0.8.15" } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@rushstack/eslint-patch": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz", - "integrity": "sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==", - "dev": true - }, - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true - }, - "@types/chai": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz", - "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==", - "dev": true - }, - "@types/chai-subset": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", - "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", - "dev": true, - "requires": { - "@types/chai": "*" - } - }, - "@types/jsdom": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.1.tgz", - "integrity": "sha512-cZFuoVLtzKP3gmq9eNosUL1R50U+USkbLtUQ1bYVgl/lKp0FZM7Cq4aIHAL8oIvQ17uSHi7jXPtfDOdjPwBE7A==", - "dev": true, - "requires": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "@types/node": { - "version": "18.16.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.7.tgz", - "integrity": "sha512-MFg7ua/bRtnA1hYE3pVyWxGd/r7aMqjNOdHvlSsXV3n8iaeGKkOaPzpJh6/ovf4bEXWcojkeMJpTsq3mzXW4IQ==", - "dev": true - }, - "@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true - }, - "@types/tough-cookie": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", - "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz", - "integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/type-utils": "5.59.5", - "@typescript-eslint/utils": "5.59.5", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/parser": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz", - "integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/typescript-estree": "5.59.5", - "debug": "^4.3.4" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz", - "integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/visitor-keys": "5.59.5" - } - }, - "@typescript-eslint/type-utils": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz", - "integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "5.59.5", - "@typescript-eslint/utils": "5.59.5", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/types": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz", - "integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz", - "integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/visitor-keys": "5.59.5", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/utils": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz", - "integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/typescript-estree": "5.59.5", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "dependencies": { - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz", - "integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.59.5", - "eslint-visitor-keys": "^3.3.0" - } - }, - "@vitejs/plugin-vue": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.2.1.tgz", - "integrity": "sha512-ZTZjzo7bmxTRTkb8GSTwkPOYDIP7pwuyV+RV53c9PYUouwcbkIZIvWvNWlX2b1dYZqtOv7D6iUAnJLVNGcLrSw==", - "dev": true, - "requires": {} - }, - "@vitest/expect": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.29.8.tgz", - "integrity": "sha512-xlcVXn5I5oTq6NiZSY3ykyWixBxr5mG8HYtjvpgg6KaqHm0mvhX18xuwl5YGxIRNt/A5jidd7CWcNHrSvgaQqQ==", - "dev": true, - "requires": { - "@vitest/spy": "0.29.8", - "@vitest/utils": "0.29.8", - "chai": "^4.3.7" - } - }, - "@vitest/runner": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.29.8.tgz", - "integrity": "sha512-FzdhnRDwEr/A3Oo1jtIk/B952BBvP32n1ObMEb23oEJNO+qO5cBet6M2XWIDQmA7BDKGKvmhUf2naXyp/2JEwQ==", - "dev": true, - "requires": { - "@vitest/utils": "0.29.8", - "p-limit": "^4.0.0", - "pathe": "^1.1.0" - }, - "dependencies": { - "p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "requires": { - "yocto-queue": "^1.0.0" - } - }, - "yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", - "dev": true - } - } - }, - "@vitest/spy": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.29.8.tgz", - "integrity": "sha512-VdjBe9w34vOMl5I5mYEzNX8inTxrZ+tYUVk9jxaZJmHFwmDFC/GV3KBFTA/JKswr3XHvZL+FE/yq5EVhb6pSAw==", - "dev": true, - "requires": { - "tinyspy": "^1.0.2" - } - }, - "@vitest/utils": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.29.8.tgz", - "integrity": "sha512-qGzuf3vrTbnoY+RjjVVIBYfuWMjn3UMUqyQtdGNZ6ZIIyte7B37exj6LaVkrZiUTvzSadVvO/tJm8AEgbGCBPg==", - "dev": true, - "requires": { - "cli-truncate": "^3.1.0", - "diff": "^5.1.0", - "loupe": "^2.3.6", - "pretty-format": "^27.5.1" - } - }, - "@volar/language-core": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.4.1.tgz", - "integrity": "sha512-EIY+Swv+TjsWpxOxujjMf1ZXqOjg9MT2VMXZ+1dKva0wD8W0L6EtptFFcCJdBbcKmGMFkr57Qzz9VNMWhs3jXQ==", - "dev": true, - "requires": { - "@volar/source-map": "1.4.1" - } - }, - "@volar/source-map": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.4.1.tgz", - "integrity": "sha512-bZ46ad72dsbzuOWPUtJjBXkzSQzzSejuR3CT81+GvTEI2E994D8JPXzM3tl98zyCNnjgs4OkRyliImL1dvJ5BA==", - "dev": true, - "requires": { - "muggle-string": "^0.2.2" - } - }, - "@volar/typescript": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.4.1.tgz", - "integrity": "sha512-phTy6p9yG6bgMIKQWEeDOi/aeT0njZsb1a/G1mrEuDsLmAn24Le4gDwSsGNhea6Uhu+3gdpUZn2PmZXa+WG2iQ==", - "dev": true, - "requires": { - "@volar/language-core": "1.4.1" - } - }, - "@volar/vue-language-core": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@volar/vue-language-core/-/vue-language-core-1.6.4.tgz", - "integrity": "sha512-1o+cAtN2DIDNAX/HS8rkjZc8wTMTK+zCab/qtYbvEVlmokhZiDrQeoD9/l0Ug7YCNg+mVuMNHKNBY7pX8U2/Jw==", - "dev": true, - "requires": { - "@volar/language-core": "1.4.1", - "@volar/source-map": "1.4.1", - "@vue/compiler-dom": "^3.3.0-beta.3", - "@vue/compiler-sfc": "^3.3.0-beta.3", - "@vue/reactivity": "^3.3.0-beta.3", - "@vue/shared": "^3.3.0-beta.3", - "minimatch": "^9.0.0", - "muggle-string": "^0.2.2", - "vue-template-compiler": "^2.7.14" - }, - "dependencies": { - "@vue/compiler-core": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.0-beta.5.tgz", - "integrity": "sha512-rwKXIMPDKBzKypcZ7Zc+i4e7ItnhlMEu9QZveek2yLxzMG0QimvZnVKB7eD21cQ9MCwEYW4bb8zjisPMJNNaqQ==", - "dev": true, - "requires": { - "@babel/parser": "^7.21.3", - "@vue/shared": "3.3.0-beta.5", - "estree-walker": "^2.0.2", - "source-map-js": "^1.0.2" - } - }, - "@vue/compiler-dom": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.0-beta.5.tgz", - "integrity": "sha512-OsYuAzl8zHRym5TfDhCLrcTSBt71BFJXnTC9uWO+SfgqadadWZxv1piPebjtwJcODkks5OAGfdhxzKdNzzddXw==", - "dev": true, - "requires": { - "@vue/compiler-core": "3.3.0-beta.5", - "@vue/shared": "3.3.0-beta.5" - } - }, - "@vue/compiler-sfc": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.0-beta.5.tgz", - "integrity": "sha512-CbiY2dkzU5IG652ygLUSufLGvXPKI12TQp1PeHs9acjgFjhvSJCSKmAOaCWnXgFsAgpbipPHgAMfWJ8B0h6Sjw==", - "dev": true, - "requires": { - "@babel/parser": "^7.20.15", - "@vue/compiler-core": "3.3.0-beta.5", - "@vue/compiler-dom": "3.3.0-beta.5", - "@vue/compiler-ssr": "3.3.0-beta.5", - "@vue/reactivity-transform": "3.3.0-beta.5", - "@vue/shared": "3.3.0-beta.5", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.0", - "postcss": "^8.1.10", - "source-map-js": "^1.0.2" - } - }, - "@vue/compiler-ssr": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.0-beta.5.tgz", - "integrity": "sha512-16njciFrQ8ejVdH5tsaPbJwpkpBB2z2VWCxfC69UOylCgPxiW01syE9S/mozRvv5Ken9Sr9bd2MjebG/SEpPNg==", - "dev": true, - "requires": { - "@vue/compiler-dom": "3.3.0-beta.5", - "@vue/shared": "3.3.0-beta.5" - } - }, - "@vue/reactivity": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.0-beta.5.tgz", - "integrity": "sha512-YrikWho94hX4lYoTKr1TtMtzzC8hSXVFw9sXlw2Fl6dyXDztu/djI2vNT4FbbcH1Hbm1+yKM09zrJYvkN/tlYA==", - "dev": true, - "requires": { - "@vue/shared": "3.3.0-beta.5" - } - }, - "@vue/reactivity-transform": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.0-beta.5.tgz", - "integrity": "sha512-v/PCri6+vL8WwwgowHlIopwiqonCj9wV60ZYDdX8AMDxk9Q01h2cWh61JF4XOX7qDs7NdJ7zSVyKSz4B98OXBw==", - "dev": true, - "requires": { - "@babel/parser": "^7.20.15", - "@vue/compiler-core": "3.3.0-beta.5", - "@vue/shared": "3.3.0-beta.5", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.0" - } - }, - "@vue/shared": { - "version": "3.3.0-beta.5", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.0-beta.5.tgz", - "integrity": "sha512-ImwhHfOzuQrfA05Kx4s7J9g7QJt0sZqSlPvPdd6xj5tTEnPNNJYZOHaIP973mtuEuv4Zfh9v+CLiER6E6gtSqg==", - "dev": true - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "magic-string": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", - "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", - "dev": true, - "requires": { - "@jridgewell/sourcemap-codec": "^1.4.13" - } - }, - "minimatch": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", - "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "@volar/vue-typescript": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@volar/vue-typescript/-/vue-typescript-1.6.4.tgz", - "integrity": "sha512-qKwgP0KVQR/aaH/SN3AP7RB8NnXPWDn3tjyXP6IT6etxkDeZLBLsXWUD9KMak/RvV1DgbXDuz4F9yuZlbt29rA==", - "dev": true, - "requires": { - "@volar/typescript": "1.4.1", - "@volar/vue-language-core": "1.6.4" - } - }, - "@vue/compiler-core": { - "version": "3.2.47", - "requires": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "@vue/compiler-dom": { - "version": "3.2.47", - "requires": { - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "@vue/compiler-sfc": { - "version": "3.2.47", - "requires": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-ssr": "3.2.47", - "@vue/reactivity-transform": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "@vue/compiler-ssr": { - "version": "3.2.47", - "requires": { - "@vue/compiler-dom": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "@vue/devtools-api": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz", - "integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==" - }, - "@vue/eslint-config-prettier": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@vue/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz", - "integrity": "sha512-Pv/lVr0bAzSIHLd9iz0KnvAr4GKyCEl+h52bc4e5yWuDVtLgFwycF7nrbWTAQAS+FU6q1geVd07lc6EWfJiWKQ==", - "dev": true, - "requires": { - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-prettier": "^4.0.0" - } - }, - "@vue/eslint-config-typescript": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@vue/eslint-config-typescript/-/eslint-config-typescript-11.0.3.tgz", - "integrity": "sha512-dkt6W0PX6H/4Xuxg/BlFj5xHvksjpSlVjtkQCpaYJBIEuKj2hOVU7r+TIe+ysCwRYFz/lGqvklntRkCAibsbPw==", - "dev": true, - "requires": { - "@typescript-eslint/eslint-plugin": "^5.59.1", - "@typescript-eslint/parser": "^5.59.1", - "vue-eslint-parser": "^9.1.1" - } - }, - "@vue/reactivity": { - "version": "3.2.47", - "requires": { - "@vue/shared": "3.2.47" - } - }, - "@vue/reactivity-transform": { - "version": "3.2.47", - "requires": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.47", - "@vue/shared": "3.2.47", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "@vue/runtime-core": { - "version": "3.2.47", - "requires": { - "@vue/reactivity": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "@vue/runtime-dom": { - "version": "3.2.47", - "requires": { - "@vue/runtime-core": "3.2.47", - "@vue/shared": "3.2.47", - "csstype": "^2.6.8" - } - }, - "@vue/server-renderer": { - "version": "3.2.47", - "requires": { - "@vue/compiler-ssr": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "@vue/shared": { - "version": "3.2.47" - }, - "@vue/test-utils": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-2.3.2.tgz", - "integrity": "sha512-hJnVaYhbrIm0yBS0+e1Y0Sj85cMyAi+PAbK4JHqMRUZ6S622Goa+G7QzkRSyvCteG8wop7tipuEbHoZo26wsSA==", - "dev": true, - "requires": { - "@vue/compiler-dom": "^3.0.1", - "@vue/server-renderer": "^3.0.1", - "js-beautify": "1.14.6" - } - }, - "@vue/tsconfig": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.1.3.tgz", - "integrity": "sha512-kQVsh8yyWPvHpb8gIc9l/HIDiiVUy1amynLNpCy8p+FoCiZXCo6fQos5/097MmnNZc9AtseDsCrfkhqCrJ8Olg==", - "dev": true, - "requires": {} - }, - "@vuepic/vue-datepicker": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@vuepic/vue-datepicker/-/vue-datepicker-5.1.0.tgz", - "integrity": "sha512-AHmWKho/je0QyU9/XUIv6UV/J8GTzJIHciAAyHJ7UmZvELjDuNUEZ4z7bsFGfvxj/QLI7Nb7qE+yd7yIsDx2Qw==", - "requires": { - "date-fns": "^2.30.0", - "date-fns-tz": "^1.3.7" - } - }, - "abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "acorn-globals": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", - "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", - "dev": true, - "requires": { - "acorn": "^8.1.0", - "acorn-walk": "^8.0.2" - } - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" - }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "autoprefixer": { - "version": "10.4.14", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", - "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", - "requires": { - "browserslist": "^4.21.5", - "caniuse-lite": "^1.0.30001464", - "fraction.js": "^4.2.0", - "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", - "postcss-value-parser": "^4.2.0" - } - }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", - "requires": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - } - }, - "cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==" - }, - "caniuse-lite": { - "version": "1.0.30001486", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz", - "integrity": "sha512-uv7/gXuHi10Whlj0pp5q/tsK/32J2QSqVRKQhs2j8VsDCjgyruAh/eEXHF822VqO9yT6iZKw3nRwZRSPBE9OQg==" - }, - "chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "requires": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - } - }, - "color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "requires": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "css-selector-tokenizer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz", - "integrity": "sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg==", - "requires": { - "cssesc": "^3.0.0", - "fastparse": "^1.1.2" - } - }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" - }, - "cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", - "dev": true, - "requires": { - "rrweb-cssom": "^0.6.0" - } - }, - "csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" - }, - "daisyui": { - "version": "2.51.6", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.51.6.tgz", - "integrity": "sha512-JRqOKayuFCmWe4X4k6Qvx1y7V/VNao8U5eTSOhusOKIzCsYqf56+TCSe4d7zmqGE0V6JiLDYAT8JeoWUeRKFCw==", - "requires": { - "color": "^4.2", - "css-selector-tokenizer": "^0.8.0", - "postcss-js": "^4.0.0", - "tailwindcss": "^3" - } - }, - "data-urls": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", - "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", - "dev": true, - "requires": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.0" - } - }, - "date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "requires": { - "@babel/runtime": "^7.21.0" - } - }, - "date-fns-tz": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-1.3.8.tgz", - "integrity": "sha512-qwNXUFtMHTTU6CFSFjoJ80W8Fzzp24LntbjFFBgL/faqds4e5mo9mftoRLgr3Vi1trISsg4awSpYVsOQCRnapQ==", - "requires": {} - }, - "de-indent": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", - "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true - }, - "deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true - }, - "didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" - }, - "diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "dev": true, - "requires": { - "webidl-conversions": "^7.0.0" - } - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "editorconfig": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", - "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", - "dev": true, - "requires": { - "commander": "^2.19.0", - "lru-cache": "^4.1.5", - "semver": "^5.6.0", - "sigmund": "^1.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "electron-to-chromium": { - "version": "1.4.388", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.388.tgz", - "integrity": "sha512-xZ0y4zjWZgp65okzwwt00f2rYibkFPHUv9qBz+Vzn8cB9UXIo9Zc6Dw81LJYhhNt0G/vR1OJEfStZ49NKl0YxQ==" - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.0", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" - } - }, - "es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "esbuild": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", - "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.17.18", - "@esbuild/android-arm64": "0.17.18", - "@esbuild/android-x64": "0.17.18", - "@esbuild/darwin-arm64": "0.17.18", - "@esbuild/darwin-x64": "0.17.18", - "@esbuild/freebsd-arm64": "0.17.18", - "@esbuild/freebsd-x64": "0.17.18", - "@esbuild/linux-arm": "0.17.18", - "@esbuild/linux-arm64": "0.17.18", - "@esbuild/linux-ia32": "0.17.18", - "@esbuild/linux-loong64": "0.17.18", - "@esbuild/linux-mips64el": "0.17.18", - "@esbuild/linux-ppc64": "0.17.18", - "@esbuild/linux-riscv64": "0.17.18", - "@esbuild/linux-s390x": "0.17.18", - "@esbuild/linux-x64": "0.17.18", - "@esbuild/netbsd-x64": "0.17.18", - "@esbuild/openbsd-x64": "0.17.18", - "@esbuild/sunos-x64": "0.17.18", - "@esbuild/win32-arm64": "0.17.18", - "@esbuild/win32-ia32": "0.17.18", - "@esbuild/win32-x64": "0.17.18" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "escodegen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", - "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", - "dev": true, - "requires": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "eslint": { - "version": "8.39.0", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.39.0", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - } - }, - "eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", - "dev": true, - "requires": {} - }, - "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "eslint-plugin-vue": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.11.1.tgz", - "integrity": "sha512-SNtBGDrRkPUFsREswPceqdvZ7YVdWY+iCYiDC+RoxwVieeQ7GJU1FLDlkcaYTOD2os/YuVgI1Fdu8YGM7fmoow==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.3.0", - "natural-compare": "^1.4.0", - "nth-check": "^2.0.1", - "postcss-selector-parser": "^6.0.9", - "semver": "^7.3.5", - "vue-eslint-parser": "^9.0.1", - "xml-name-validator": "^4.0.0" - } - }, - "eslint-scope": { - "version": "7.2.0", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", - "dev": true - }, - "espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "dev": true - }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", - "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==" - }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "requires": { - "reusify": "^1.0.4" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - } - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true - }, - "get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "glob-parent": { - "version": "6.0.2", - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.3" - } - }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "dev": true, - "requires": { - "whatwg-encoding": "^2.0.0" - } - }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", - "dev": true - }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true - }, - "is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "requires": { - "has": "^1.0.3" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" - }, - "is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, - "is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - } - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "jiti": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", - "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==" - }, - "js-beautify": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.6.tgz", - "integrity": "sha512-GfofQY5zDp+cuHc+gsEXKPpNw2KbPddreEo35O6jT6i0RVK6LhsoYBhq5TvK4/n74wnA0QbK8gGd+jUZwTMKJw==", - "dev": true, - "requires": { - "config-chain": "^1.1.13", - "editorconfig": "^0.15.3", - "glob": "^8.0.3", - "nopt": "^6.0.0" - } - }, - "js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "jsdom": { - "version": "21.1.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-21.1.2.tgz", - "integrity": "sha512-sCpFmK2jv+1sjff4u7fzft+pUh2KSUbUrEHYHyfSIbGTIcmnjyp83qg6qLwdJ/I3LpTXx33ACxeRL7Lsyc6lGQ==", - "dev": true, - "requires": { - "abab": "^2.0.6", - "acorn": "^8.8.2", - "acorn-globals": "^7.0.0", - "cssstyle": "^3.0.0", - "data-urls": "^4.0.0", - "decimal.js": "^10.4.3", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.4", - "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.1", - "ws": "^8.13.0", - "xml-name-validator": "^4.0.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true - }, - "kdbush": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", - "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==" - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==" - }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "local-pkg": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", - "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", - "dev": true - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "requires": { - "get-func-name": "^2.0.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "requires": { - "sourcemap-codec": "^1.4.8" - } - }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mlly": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.2.0.tgz", - "integrity": "sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==", - "dev": true, - "requires": { - "acorn": "^8.8.2", - "pathe": "^1.1.0", - "pkg-types": "^1.0.2", - "ufo": "^1.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "muggle-string": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.2.2.tgz", - "integrity": "sha512-YVE1mIJ4VpUMqZObFndk9CJu6DBJR/GB13p3tXuNbwD4XExaI5EOuRl6BHeIDxIqXZVxSfAC+y6U1Z/IxCfKUg==", - "dev": true - }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" - }, - "nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "dev": true, - "requires": { - "abbrev": "^1.0.0" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==" - }, - "npm-run-all": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", - "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "memorystream": "^0.3.1", - "minimatch": "^3.0.4", - "pidtree": "^0.3.0", - "read-pkg": "^3.0.0", - "shell-quote": "^1.6.1", - "string.prototype.padend": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "requires": { - "boolbase": "^1.0.0" - } - }, - "nwsapi": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.4.tgz", - "integrity": "sha512-NHj4rzRo0tQdijE9ZqAx6kYDcoRwYwSYzCA8MY3JzfxlrvEU0jhnhJT9BhqhJs7I/dKcrDm6TyulaRqZPIhN5g==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" - }, - "object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" - }, - "object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "requires": { - "entities": "^4.4.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "pathe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.0.tgz", - "integrity": "sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==", - "dev": true - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" - }, - "pidtree": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", - "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - }, - "pinia": { - "version": "2.0.35", - "requires": { - "@vue/devtools-api": "^6.5.0", - "vue-demi": "*" - }, - "dependencies": { - "vue-demi": { - "version": "0.14.0", - "requires": {} - } - } - }, - "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==" - }, - "pkg-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", - "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", - "dev": true, - "requires": { - "jsonc-parser": "^3.2.0", - "mlly": "^1.2.0", - "pathe": "^1.1.0" - } - }, - "postcss": { - "version": "8.4.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", - "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", - "requires": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - } - }, - "postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "requires": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - } - }, - "postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "requires": { - "camelcase-css": "^2.0.1" - } - }, - "postcss-load-config": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", - "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", - "requires": { - "lilconfig": "^2.0.5", - "yaml": "^2.1.1" - } - }, - "postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "requires": { - "postcss-selector-parser": "^6.0.11" - } - }, - "postcss-selector-parser": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.12.tgz", - "integrity": "sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==", - "requires": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - } - }, - "postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true - }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" - }, - "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "requires": { - "pify": "^2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" - } - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - } - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, - "regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" - }, - "regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" - } - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "requires": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "rollup": { - "version": "3.21.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.6.tgz", - "integrity": "sha512-SXIICxvxQxR3D4dp/3LDHZIJPC8a4anKMHd4E3Jiz2/JnY+2bEjqrOokAauc5ShGVNFHlEFjBXAXlaxkJqIqSg==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "rrweb-cssom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", - "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", - "dev": true - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "saxes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "dev": true, - "requires": { - "xmlchars": "^2.2.0" - } - }, - "semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", - "dev": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", - "dev": true - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - } - } - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "requires": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true - } - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" - }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" - }, - "spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", - "dev": true - }, - "stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true - }, - "std-env": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.3.tgz", - "integrity": "sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "string.prototype.padend": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz", - "integrity": "sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, - "string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, - "string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, - "string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "strip-literal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.0.1.tgz", - "integrity": "sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==", - "dev": true, - "requires": { - "acorn": "^8.8.2" - } - }, - "sucrase": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.32.0.tgz", - "integrity": "sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==", - "requires": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "7.1.6", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "dependencies": { - "commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "supercluster": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", - "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", - "requires": { - "kdbush": "^4.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" - }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "tailwindcss": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz", - "integrity": "sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==", - "requires": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.5.3", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.2.12", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.18.2", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "requires": { - "any-promise": "^1.0.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "requires": { - "thenify": ">= 3.1.0 < 4" - } - }, - "tinybench": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.0.tgz", - "integrity": "sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==", - "dev": true - }, - "tinypool": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.4.0.tgz", - "integrity": "sha512-2ksntHOKf893wSAH4z/+JbPpi92esw8Gn9N2deXX+B0EO92hexAVI9GIZZPx7P5aYo5KULfeOSt3kMOmSOy6uA==", - "dev": true - }, - "tinyspy": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.1.1.tgz", - "integrity": "sha512-UVq5AXt/gQlti7oxoIg5oi/9r0WpF7DGEVwXgqWSMmyN16+e3tl5lIvTaOpJ3TAtu5xFzWccFRM4R5NaWHF+4g==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", - "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", - "dev": true, - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - } - }, - "tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", - "dev": true, - "requires": { - "punycode": "^2.3.0" - } - }, - "ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - } - }, - "typescript": { - "version": "4.8.4", - "devOptional": true - }, - "ufo": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.2.tgz", - "integrity": "sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==", - "dev": true - }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - } - }, - "universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true - }, - "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vite": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.5.tgz", - "integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==", - "dev": true, - "requires": { - "esbuild": "^0.17.5", - "fsevents": "~2.3.2", - "postcss": "^8.4.23", - "rollup": "^3.21.0" - } - }, - "vite-node": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.29.8.tgz", - "integrity": "sha512-b6OtCXfk65L6SElVM20q5G546yu10/kNrhg08afEoWlFRJXFq9/6glsvSVY+aI6YeC1tu2TtAqI2jHEQmOmsFw==", - "dev": true, - "requires": { - "cac": "^6.7.14", - "debug": "^4.3.4", - "mlly": "^1.1.0", - "pathe": "^1.1.0", - "picocolors": "^1.0.0", - "vite": "^3.0.0 || ^4.0.0" - } - }, - "vitest": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.29.8.tgz", - "integrity": "sha512-JIAVi2GK5cvA6awGpH0HvH/gEG9PZ0a/WoxdiV3PmqK+3CjQMf8c+J/Vhv4mdZ2nRyXFw66sAg6qz7VNkaHfDQ==", - "dev": true, - "requires": { - "@types/chai": "^4.3.4", - "@types/chai-subset": "^1.3.3", - "@types/node": "*", - "@vitest/expect": "0.29.8", - "@vitest/runner": "0.29.8", - "@vitest/spy": "0.29.8", - "@vitest/utils": "0.29.8", - "acorn": "^8.8.1", - "acorn-walk": "^8.2.0", - "cac": "^6.7.14", - "chai": "^4.3.7", - "debug": "^4.3.4", - "local-pkg": "^0.4.2", - "pathe": "^1.1.0", - "picocolors": "^1.0.0", - "source-map": "^0.6.1", - "std-env": "^3.3.1", - "strip-literal": "^1.0.0", - "tinybench": "^2.3.1", - "tinypool": "^0.4.0", - "tinyspy": "^1.0.2", - "vite": "^3.0.0 || ^4.0.0", - "vite-node": "0.29.8", - "why-is-node-running": "^2.2.2" - } - }, - "vue": { - "version": "3.2.47", - "requires": { - "@vue/compiler-dom": "3.2.47", - "@vue/compiler-sfc": "3.2.47", - "@vue/runtime-dom": "3.2.47", - "@vue/server-renderer": "3.2.47", - "@vue/shared": "3.2.47" - } - }, - "vue-awesome-paginate": { - "version": "1.1.46", - "resolved": "https://registry.npmjs.org/vue-awesome-paginate/-/vue-awesome-paginate-1.1.46.tgz", - "integrity": "sha512-hjwAJLd2N54j0uuGgqmlTdhZw8NBFQpFiShjGrvxsA0DnvmOQjM18GEor+Ieigz6nE8VA4hQerIDBQjf4lsacg==", - "requires": { - "vue": "^3.2.25" - } - }, - "vue-eslint-parser": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.2.1.tgz", - "integrity": "sha512-tPOex4n6jit4E7h68auOEbDMwE58XiP4dylfaVTCOVCouR45g+QFDBjgIdEU52EXJxKyjgh91dLfN2rxUcV0bQ==", - "dev": true, - "requires": { - "debug": "^4.3.4", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", - "esquery": "^1.4.0", - "lodash": "^4.17.21", - "semver": "^7.3.6" - } - }, - "vue-router": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.1.6.tgz", - "integrity": "sha512-DYWYwsG6xNPmLq/FmZn8Ip+qrhFEzA14EI12MsMgVxvHFDYvlr4NXpVF5hrRH1wVcDP8fGi5F4rxuJSl8/r+EQ==", - "requires": { - "@vue/devtools-api": "^6.4.5" - } - }, - "vue-template-compiler": { - "version": "2.7.14", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz", - "integrity": "sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==", - "dev": true, - "requires": { - "de-indent": "^1.0.2", - "he": "^1.2.0" - } - }, - "vue-tsc": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-1.6.4.tgz", - "integrity": "sha512-8rg8S1AhRJ6/WriENQEhyqH5wsxSxuD5iaD+QnkZn2ArZ6evlhqfBAIcVN8mfSyCV9DeLkQXkOSv/MaeJiJPAQ==", - "dev": true, - "requires": { - "@volar/vue-language-core": "1.6.4", - "@volar/vue-typescript": "1.6.4", - "semver": "^7.3.8" - } - }, - "vue3-carousel": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/vue3-carousel/-/vue3-carousel-0.3.1.tgz", - "integrity": "sha512-86vUkNPBzL2PVuR9w6hUsI90ccFjLp+K8cSFpRTISf+SjUQY3fMHc5CFF5MUL62v1xYYm27zEBmQupO9VQx9Kw==", - "requires": {} - }, - "vue3-google-map": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/vue3-google-map/-/vue3-google-map-0.15.0.tgz", - "integrity": "sha512-Y0fyBa9feS3mFIsYnCdqGr2TQWtRAhs0Q2vTmrhD/kzyY9z7lqd5p8ZM+Axw7xsaUXP+NvvIdIP4TianIOubkQ==", - "requires": { - "@googlemaps/js-api-loader": "^1.12.11", - "@googlemaps/markerclusterer": "^2.0.6", - "fast-deep-equal": "^3.1.3" - } - }, - "w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", - "dev": true, - "requires": { - "xml-name-validator": "^4.0.0" - } - }, - "webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true - }, - "whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "dev": true, - "requires": { - "iconv-lite": "0.6.3" - } - }, - "whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "dev": true - }, - "whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", - "dev": true, - "requires": { - "tr46": "^4.1.1", - "webidl-conversions": "^7.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" - } - }, - "why-is-node-running": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", - "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", - "dev": true, - "requires": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, - "requires": {} - }, - "xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "dev": true - }, - "xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - }, - "yaml": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", - "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==" - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true } } } diff --git a/frontend/marketplace/package.json b/frontend/marketplace/package.json index fa3025ab4..e5ad4eaa5 100644 --- a/frontend/marketplace/package.json +++ b/frontend/marketplace/package.json @@ -14,14 +14,24 @@ "format": "prettier --write src/" }, "dependencies": { + "@apollo/client": "^3.7.14", + "@empower-plastic/empowerjs": "0.0.18", + "@keplr-wallet/types": "^0.11.51", + "@vue/apollo-composable": "^4.0.0-beta.5", + "@vue/apollo-option": "^4.0.0-beta.5", "@vuepic/vue-datepicker": "^5.1.0", "daisyui": "^2.51.6", + "graphql": "^16.6.0", + "graphql-tag": "^2.12.6", "pinia": "^2.0.32", - "vue": "^3.2.47", + "rollbar": "^2.26.1", + "vue": "^3.3.2", "vue-awesome-paginate": "^1.1.46", + "vue-multiselect": "^3.0.0-beta.2", "vue-router": "^4.1.6", + "vue3-carousel": "^0.3.1", "vue3-google-map": "^0.15.0", - "vue3-carousel": "^0.3.1" + "vue3-toastify": "^0.1.11" }, "devDependencies": { "@rushstack/eslint-patch": "^1.2.0", diff --git a/frontend/marketplace/postcss.config.js b/frontend/marketplace/postcss.config.js index 33ad091d2..12a703d90 100644 --- a/frontend/marketplace/postcss.config.js +++ b/frontend/marketplace/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/frontend/marketplace/public/favicon.ico b/frontend/marketplace/public/favicon.ico index df36fcfb7..6e6e92a83 100644 Binary files a/frontend/marketplace/public/favicon.ico and b/frontend/marketplace/public/favicon.ico differ diff --git a/frontend/marketplace/src/App.vue b/frontend/marketplace/src/App.vue index 95641f0a5..528785109 100644 --- a/frontend/marketplace/src/App.vue +++ b/frontend/marketplace/src/App.vue @@ -4,8 +4,7 @@ import Footer from "@/components/MainFooter.vue"; - diff --git a/frontend/marketplace/src/assets/walletAvatar.png b/frontend/marketplace/src/assets/walletAvatar.png new file mode 100644 index 000000000..fe813ae1e Binary files /dev/null and b/frontend/marketplace/src/assets/walletAvatar.png differ diff --git a/frontend/marketplace/src/assets/walletCosmostation.png b/frontend/marketplace/src/assets/walletCosmostation.png new file mode 100644 index 000000000..8cb14f607 Binary files /dev/null and b/frontend/marketplace/src/assets/walletCosmostation.png differ diff --git a/frontend/marketplace/src/assets/walletKeplr.png b/frontend/marketplace/src/assets/walletKeplr.png new file mode 100644 index 000000000..e6d304f37 Binary files /dev/null and b/frontend/marketplace/src/assets/walletKeplr.png differ diff --git a/frontend/marketplace/src/assets/walletLeap.png b/frontend/marketplace/src/assets/walletLeap.png new file mode 100644 index 000000000..53ec662ab Binary files /dev/null and b/frontend/marketplace/src/assets/walletLeap.png differ diff --git a/frontend/marketplace/src/components/AuctionCard.vue b/frontend/marketplace/src/components/AuctionCard.vue index 424d73f65..41fa6488c 100644 --- a/frontend/marketplace/src/components/AuctionCard.vue +++ b/frontend/marketplace/src/components/AuctionCard.vue @@ -1,13 +1,37 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/AuctionResultsCard.vue b/frontend/marketplace/src/components/AuctionResultsCard.vue index ca35a5a15..472651031 100644 --- a/frontend/marketplace/src/components/AuctionResultsCard.vue +++ b/frontend/marketplace/src/components/AuctionResultsCard.vue @@ -1,90 +1,135 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/AuctionSection.vue b/frontend/marketplace/src/components/AuctionSection.vue index d622e4751..11fffd256 100644 --- a/frontend/marketplace/src/components/AuctionSection.vue +++ b/frontend/marketplace/src/components/AuctionSection.vue @@ -1,5 +1,30 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/BuyCredits.vue b/frontend/marketplace/src/components/BuyCredits.vue index c66a94447..08d6af904 100644 --- a/frontend/marketplace/src/components/BuyCredits.vue +++ b/frontend/marketplace/src/components/BuyCredits.vue @@ -1,60 +1,195 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/CertificateCard.vue b/frontend/marketplace/src/components/CertificateCard.vue index 9feaf71d5..e705fcbec 100644 --- a/frontend/marketplace/src/components/CertificateCard.vue +++ b/frontend/marketplace/src/components/CertificateCard.vue @@ -1,32 +1,40 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/CertificateTabContent.vue b/frontend/marketplace/src/components/CertificateTabContent.vue index 1a613df02..92a9c21ad 100644 --- a/frontend/marketplace/src/components/CertificateTabContent.vue +++ b/frontend/marketplace/src/components/CertificateTabContent.vue @@ -1,52 +1,107 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/CreditCard.vue b/frontend/marketplace/src/components/CreditCard.vue index 6ec322724..41226bed3 100644 --- a/frontend/marketplace/src/components/CreditCard.vue +++ b/frontend/marketplace/src/components/CreditCard.vue @@ -1,45 +1,82 @@ diff --git a/frontend/marketplace/src/components/CustomAlert.vue b/frontend/marketplace/src/components/CustomAlert.vue index e39f55bf9..f8910ab15 100644 --- a/frontend/marketplace/src/components/CustomAlert.vue +++ b/frontend/marketplace/src/components/CustomAlert.vue @@ -1,12 +1,15 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/CustomGoogleMap.vue b/frontend/marketplace/src/components/CustomGoogleMap.vue index 8d82f8f6d..db4880305 100644 --- a/frontend/marketplace/src/components/CustomGoogleMap.vue +++ b/frontend/marketplace/src/components/CustomGoogleMap.vue @@ -1,23 +1,70 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/CustomPagination.vue b/frontend/marketplace/src/components/CustomPagination.vue index 8f35e0c3b..9f5d50b69 100644 --- a/frontend/marketplace/src/components/CustomPagination.vue +++ b/frontend/marketplace/src/components/CustomPagination.vue @@ -1,30 +1,30 @@ diff --git a/frontend/marketplace/src/components/CustomSearchBar.vue b/frontend/marketplace/src/components/CustomSearchBar.vue index f66f4475c..8422cf9cc 100644 --- a/frontend/marketplace/src/components/CustomSearchBar.vue +++ b/frontend/marketplace/src/components/CustomSearchBar.vue @@ -1,18 +1,18 @@ diff --git a/frontend/marketplace/src/components/FAQCollapse.vue b/frontend/marketplace/src/components/FAQCollapse.vue index eb7886683..ce4040389 100644 --- a/frontend/marketplace/src/components/FAQCollapse.vue +++ b/frontend/marketplace/src/components/FAQCollapse.vue @@ -1,18 +1,20 @@ \ No newline at end of file + diff --git a/frontend/marketplace/src/components/HomePageHeroBanner.vue b/frontend/marketplace/src/components/HomePageHeroBanner.vue index 9917252b6..f66a53d65 100644 --- a/frontend/marketplace/src/components/HomePageHeroBanner.vue +++ b/frontend/marketplace/src/components/HomePageHeroBanner.vue @@ -1,30 +1,36 @@ - + \ No newline at end of file + diff --git a/frontend/marketplace/src/components/ImageCarousel.vue b/frontend/marketplace/src/components/ImageCarousel.vue index 940dadbb8..aabe6209b 100644 --- a/frontend/marketplace/src/components/ImageCarousel.vue +++ b/frontend/marketplace/src/components/ImageCarousel.vue @@ -1,23 +1,22 @@ diff --git a/frontend/marketplace/src/components/ImageGallery.vue b/frontend/marketplace/src/components/ImageGallery.vue index 1c6062962..c7b6ab379 100644 --- a/frontend/marketplace/src/components/ImageGallery.vue +++ b/frontend/marketplace/src/components/ImageGallery.vue @@ -1,37 +1,49 @@ diff --git a/frontend/marketplace/src/components/NavBar.vue b/frontend/marketplace/src/components/NavBar.vue index a0fd40c6a..c81d57eb0 100644 --- a/frontend/marketplace/src/components/NavBar.vue +++ b/frontend/marketplace/src/components/NavBar.vue @@ -1,111 +1,269 @@ - - diff --git a/frontend/marketplace/src/components/ProjectDetailContent.vue b/frontend/marketplace/src/components/ProjectDetailContent.vue index 012a9cdc5..ed5c73930 100644 --- a/frontend/marketplace/src/components/ProjectDetailContent.vue +++ b/frontend/marketplace/src/components/ProjectDetailContent.vue @@ -1,13 +1,20 @@ diff --git a/frontend/marketplace/src/components/RetireCreditTextArea.vue b/frontend/marketplace/src/components/RetireCreditTextArea.vue index e87d53109..16d5eccbe 100644 --- a/frontend/marketplace/src/components/RetireCreditTextArea.vue +++ b/frontend/marketplace/src/components/RetireCreditTextArea.vue @@ -1,17 +1,17 @@