@initia/initia.js 0.2.31 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/rest/RESTClient.d.ts +1 -0
- package/dist/index.cjs +2 -0
- package/dist/{index.es.js → index.js} +9301 -10826
- package/dist/key/MnemonicKey.d.ts +1 -1
- package/package.json +11 -8
- package/dist/TransportWebHID-BJGOHoD4.js +0 -1
- package/dist/TransportWebHID-BpNQALzF.mjs +0 -154
- package/dist/TransportWebUSB-Bog8kAV9.js +0 -1
- package/dist/TransportWebUSB-Bs9AHNsu.mjs +0 -196
- package/dist/index-BNBWMUWc.mjs +0 -456
- package/dist/index-BY4R60_E.js +0 -2
- package/dist/index.cjs.js +0 -2
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var Dc=Object.create;var Ka=Object.defineProperty;var kc=Object.getOwnPropertyDescriptor;var Mc=Object.getOwnPropertyNames;var xc=Object.getPrototypeOf,Ic=Object.prototype.hasOwnProperty;var Sc=(c,t,e)=>t in c?Ka(c,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[t]=e;var Cc=(c,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Mc(t))!Ic.call(c,r)&&r!==e&&Ka(c,r,{get:()=>t[r],enumerable:!(o=kc(t,r))||o.enumerable});return c};var vi=(c,t,e)=>(e=c!=null?Dc(xc(c)):{},Cc(t||!c||!c.__esModule?Ka(e,"default",{value:c,enumerable:!0}):e,c));var p=(c,t,e)=>Sc(c,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pi=require("axios"),Uc=require("@initia/initia.proto/cosmos/tx/v1beta1/service"),tt=require("bignumber.js"),Bc=require("@initia/initia.proto/cosmos/base/v1beta1/coin"),l=require("@initia/initia.proto/google/protobuf/any"),$n=require("@initia/initia.proto/sdk/auction/v1/tx"),Ec=require("@initia/initia.proto/sdk/auction/v1/genesis"),Nc=require("@initia/initia.proto/google/protobuf/duration"),Zs=require("@initia/initia.proto/cosmos/auth/v1beta1/auth"),Va=require("@initia/initia.proto/cosmos/auth/v1beta1/tx"),Ii=require("secp256k1"),Si=require("jscrypto/SHA256"),Oc=require("jscrypto/RIPEMD160"),Fc=require("jscrypto/Base64"),Ta=require("jscrypto"),Ci=require("keccak256"),Wa=require("@initia/initia.proto/cosmos/crypto/multisig/keys"),Ha=require("@initia/initia.proto/cosmos/crypto/secp256k1/keys"),ja=require("@initia/initia.proto/cosmos/crypto/ed25519/keys"),Qa=require("@initia/initia.proto/initia/crypto/v1beta1/ethsecp256k1/keys"),q=require("bech32"),le=require("@initia/initia.proto/initia/mstaking/v1/authz"),Ya=require("@initia/initia.proto/cosmos/bank/v1beta1/authz"),Ua=require("@initia/initia.proto/cosmos/authz/v1beta1/authz"),Ln=require("@initia/initia.proto/initia/move/v1/authz"),wt=require("@initia/initia.proto/initia/move/v1/types"),$=require("@initia/initia.proto/cosmwasm/wasm/v1/authz"),Pt=require("@initia/initia.proto/cosmwasm/wasm/v1/types"),D=require("@initia/initia.proto/cosmwasm/wasm/v1/tx"),Ba=require("@initia/initia.proto/ibc/applications/transfer/v1/authz"),zn=require("@initia/initia.proto/ibc/applications/transfer/v1/tx"),Sa=require("@initia/initia.proto/ibc/core/client/v1/client"),Ui=require("@initia/initia.proto/ibc/applications/transfer/v1/transfer"),Tc=require("@initia/initia.proto/ibc/applications/transfer/v2/packet"),as=require("@initia/initia.proto/cosmos/authz/v1beta1/tx"),It=require("@initia/initia.proto/cosmos/bank/v1beta1/tx"),ma=require("@initia/initia.proto/cosmos/bank/v1beta1/bank"),Xa=require("@initia/initia.proto/initia/bank/v1/tx"),Za=require("@initia/initia.proto/celestia/blob/v1/tx"),ai=require("@initia/initia.proto/celestia/blob/v1/blob"),lt=require("@initia/initia.proto/cosmos/tx/signing/v1beta1/signing"),at=require("@initia/initia.proto/cosmos/tx/v1beta1/tx"),ii=require("@initia/initia.proto/cosmos/crypto/multisig/v1beta1/multisig"),La=require("@initia/initia.proto/tendermint/types/params"),ti=require("@initia/initia.proto/cosmos/consensus/v1/tx"),ya=require("@initia/initia.proto/cosmos/crisis/v1beta1/tx"),ct=require("@initia/initia.proto/cosmos/distribution/v1beta1/tx"),Bi=require("@initia/initia.proto/initia/distribution/v1/distribution"),Gn=require("@initia/initia.proto/initia/distribution/v1/tx"),ei=require("@initia/initia.proto/cosmos/evidence/v1beta1/tx"),oi=require("@initia/initia.proto/cosmos/evidence/v1beta1/evidence"),Ei=require("@initia/initia.proto/minievm/evm/v1/types"),St=require("@initia/initia.proto/minievm/evm/v1/tx"),is=require("@initia/initia.proto/cosmos/feegrant/v1beta1/feegrant"),Jn=require("@initia/initia.proto/cosmos/feegrant/v1beta1/tx"),Kn=require("@initia/initia.proto/noble/forwarding/v1/tx"),mt=require("@initia/initia.proto/cosmos/gov/v1/tx"),Ct=require("@initia/initia.proto/cosmos/gov/v1beta1/tx"),Ea=require("@initia/initia.proto/cosmos/params/v1beta1/params"),Na=require("@initia/initia.proto/cosmos/gov/v1beta1/gov"),Rt=require("@initia/initia.proto/cosmos/gov/v1/gov"),za=require("@initia/initia.proto/initia/gov/v1/gov"),ri=require("@initia/initia.proto/initia/gov/v1/tx"),N=require("@initia/initia.proto/cosmos/group/v1/types"),M=require("@initia/initia.proto/cosmos/group/v1/tx"),Ut=require("@initia/initia.proto/ibc/applications/fee/v1/tx"),Ni=require("@initia/initia.proto/ibc/applications/fee/v1/fee"),pa=require("@initia/initia.proto/ibc/core/channel/v1/channel"),Rc=require("@initia/initia.proto/ibc/applications/fee/v1/metadata"),Vn=require("@initia/initia.proto/initia/ibchooks/v1/tx"),Oi=require("@initia/initia.proto/initia/ibchooks/v1/types"),Wn=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/tx"),Fi=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/types"),qc=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/packet"),Hn=require("@initia/initia.proto/ibc/applications/perm/v1/tx"),O=require("@initia/initia.proto/ibc/core/channel/v1/tx"),Q=require("@initia/initia.proto/ibc/core/client/v1/tx"),$c=require("@initia/initia.proto/cosmos/upgrade/v1beta1/upgrade"),jn=require("@initia/initia.proto/cosmos/upgrade/v1beta1/tx"),Ti=require("@initia/initia.proto/ibc/core/commitment/v1/commitment"),Tt=require("@initia/initia.proto/ibc/core/connection/v1/connection"),ut=require("@initia/initia.proto/ibc/core/connection/v1/tx"),Qn=require("@initia/initia.proto/initia/intertx/v1/tx"),rt=require("@initia/initia.proto/connect/marketmap/v2/tx"),Yn=require("@initia/initia.proto/connect/oracle/v2/tx"),Lc=require("@initia/initia.proto/connect/types/v2/currency_pair"),zc=require("@initia/initia.proto/connect/oracle/v2/genesis"),li=require("@initia/initia.proto/connect/marketmap/v2/market"),Gc=require("@initia/initia.proto/connect/marketmap/v2/params"),U=require("@initia/initia.proto/initia/move/v1/tx"),Y=require("@initia/initia.proto/initia/mstaking/v1/tx"),pt=require("@initia/initia.proto/initia/mstaking/v1/staking"),z=require("@initia/opinit.proto/opinit/opchild/v1/tx"),pi=require("@initia/opinit.proto/opinit/opchild/v1/types"),B=require("@initia/opinit.proto/opinit/ophost/v1/tx"),pe=require("@initia/opinit.proto/opinit/ophost/v1/types"),Jc=require("@initia/initia.proto/initia/reward/v1/types"),si=require("@initia/initia.proto/initia/reward/v1/tx"),Xn=require("@initia/initia.proto/cosmos/slashing/v1beta1/tx"),Ri=require("@initia/initia.proto/cosmos/slashing/v1beta1/slashing"),X=require("@initia/initia.proto/miniwasm/tokenfactory/v1/tx"),Kc=require("@initia/initia.proto/miniwasm/tokenfactory/v1/params"),Vc=require("@initia/initia.proto/cosmos/base/abci/v1beta1/abci"),oe=require("@mysten/bcs"),Wc=require("ws"),Hc=require("ripemd160"),jc=require("semver"),Qc=require("@bitcoinerlab/secp256k1"),Yc=require("bip32"),Ai=require("bip39");function qi(c){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const e in c)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(c,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>c[e]})}}return t.default=c,Object.freeze(t)}const _a=qi(Ii),Xc=qi(jc),Zc=Uc.OrderBy;class $i{constructor(t,e){p(this,"axios");p(this,"baseURL");this.baseURL=t;const o={headers:{Accept:"application/json"},timeout:3e4};this.axios=Pi.create({...o,...e,headers:{...o.headers,...e==null?void 0:e.headers}})}validateEndpoint(t){if(["../","..\\","%2E%2E%2F","%2E%2E%5C"].some(o=>t.includes(o)))throw new Error("Relative path not allowed");if(t.includes("?"))throw new Error("Query param should be passed via the params argument")}computeEndpoint(t){const e=t.replace(/^\/+/,""),o=new URL(this.baseURL);return o.pathname.endsWith("/")||(o.pathname+="/"),o.pathname+=e,o.toString()}async getRaw(t,e={}){this.validateEndpoint(t);const o=this.computeEndpoint(t);return this.axios.get(o,{params:e}).then(r=>r.data)}async get(t,e={},o=new Pi.AxiosHeaders){this.validateEndpoint(t);const r=this.computeEndpoint(t);return this.axios.get(r,{params:e,headers:o}).then(s=>s.data)}async post(t,e){this.validateEndpoint(t);const o=this.computeEndpoint(t);return this.axios.post(o,e).then(r=>r.data)}}function xa(c){if(Array.isArray(c))return c.map(xa);if(typeof c!="object"||c===null)return c;const t={};return Object.keys(c).sort().forEach(e=>{c[e]===void 0||c[e]===null||(t[e]=xa(c[e]))}),t}class m{toJSON(){return JSON.stringify(xa(this.toData()))}toAminoJSON(){return JSON.stringify(xa(this.toAmino()))}}function Li(c){return c!==null&&typeof c=="object"?Object.entries(c).filter(([,t])=>t!=null).reduce((t,[e,o])=>({...t,[e]:o===Object(o)&&!Array.isArray(o)?Li(o):o}),{}):c}function k(c){return new tt.BigNumber(c)}function Ys(c){return typeof c=="string"?c.includes("."):!k(c).isInteger()}class P extends m{constructor(e,o){super();p(this,"amount");p(this,"isDecimal");this.denom=e,this.amount=k(o).toFixed(),this.isDecimal=Ys(o)}toIntCoin(){return new P(this.denom,k(this.amount).toFixed(0))}toIntCeilCoin(){return new P(this.denom,k(this.amount).toFixed(0,tt.BigNumber.ROUND_CEIL))}toDecCoin(){return new P(this.denom,this.amount.includes(".")?this.amount:k(this.amount).toFixed(1))}toString(){return`${this.isDecimal&&!this.amount.includes(".")?k(this.amount).toFixed(1):k(this.amount).toFixed()}${this.denom}`}static fromString(e){const o=e.match(/^(-?[0-9]+(\.[0-9]+)?)([0-9a-zA-Z/]+)$/);if(o===null)throw new Error(`failed to parse to Coin: ${e}`);const r=o[1],s=o[3];return new P(s,r)}add(e){let o,r=this.isDecimal;if(e instanceof P){if(e.denom!==this.denom)throw new P.ArithmeticError(`cannot add two Coins of different denoms: ${this.denom} and ${e.denom}`);o=e.amount,r=r||e.isDecimal}else o=e,r=r||Ys(e);const s=k(this.amount).plus(o);return new P(this.denom,r&&s.isInteger()?s.toFixed(1):s.toFixed())}sub(e){let o,r=this.isDecimal;if(e instanceof P){if(e.denom!==this.denom)throw new P.ArithmeticError(`cannot subtract two Coins of different denoms: ${this.denom} and ${e.denom}`);o=e.amount,r=r||e.isDecimal}else o=e,r=r||Ys(e);const s=k(this.amount).minus(o);return new P(this.denom,r&&s.isInteger()?s.toFixed(1):s.toFixed())}mul(e){const o=this.isDecimal||Ys(e),r=k(this.amount).multipliedBy(e);return new P(this.denom,o&&r.isInteger()?r.toFixed(1):r.toFixed())}div(e){const o=this.isDecimal||Ys(e),r=k(this.amount).dividedBy(e);return new P(this.denom,o&&r.isInteger()?r.toFixed(1):r.toFixed())}mod(e){const o=this.isDecimal||Ys(e),r=k(this.amount).mod(e);return new P(this.denom,o&&r.isInteger()?r.toFixed(1):r.toFixed())}static fromAmino(e){const{denom:o,amount:r}=e;return new P(o,r)}toAmino(){const{denom:e,amount:o}=this;return{denom:e,amount:this.isDecimal?k(o).toFixed(18):o}}static fromData(e){const{denom:o,amount:r}=e;return new P(o,r)}toData(){const{denom:e,amount:o}=this;return{denom:e,amount:this.isDecimal?k(o).toFixed(18):o}}static fromProto(e){return new P(e.denom,e.amount)}toProto(){return Bc.Coin.fromPartial({denom:this.denom,amount:this.isDecimal?k(this.amount).toFixed(18):this.amount})}}(c=>{class t{constructor(o){this.message=o}}c.ArithmeticError=t})(P||(P={}));class he extends m{constructor(t,e,o){super(),this.bidder=t,this.bid=e,this.transactions=o}static fromAmino(t){const{value:{bidder:e,bid:o,transactions:r}}=t;return new he(e,P.fromAmino(o),r)}toAmino(){const{bidder:t,bid:e,transactions:o}=this;return{type:"block-sdk/x/auction/MsgAuctionBid",value:{bidder:t,bid:e.toAmino(),transactions:o}}}static fromData(t){const{bidder:e,bid:o,transactions:r}=t;return new he(e,P.fromData(o),r)}toData(){const{bidder:t,bid:e,transactions:o}=this;return{"@type":"/sdk.auction.v1.MsgAuctionBid",bidder:t,bid:e.toData(),transactions:o}}static fromProto(t){return new he(t.bidder,P.fromProto(t.bid),t.transactions.map(e=>Buffer.from(e).toString("base64")))}toProto(){const{bidder:t,bid:e,transactions:o}=this;return $n.MsgAuctionBid.fromPartial({bidder:t,bid:e.toProto(),transactions:o.map(r=>Buffer.from(r,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgAuctionBid",value:$n.MsgAuctionBid.encode(this.toProto()).finish()})}static unpackAny(t){return he.fromProto($n.MsgAuctionBid.decode(t.value))}}class cs extends m{constructor(t,e,o,r,s,n){super(),this.max_bundle_size=t,this.escrow_account_address=e,this.reserve_fee=o,this.min_bid_increment=r,this.front_running_protection=s,this.proposer_fee=n}static fromAmino(t){const{value:{max_bundle_size:e,escrow_account_address:o,reserve_fee:r,min_bid_increment:s,front_running_protection:n,proposer_fee:a}}=t;return new cs(parseInt(e),o,P.fromAmino(r),P.fromAmino(s),n,a)}toAmino(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:o,min_bid_increment:r,front_running_protection:s,proposer_fee:n}=this;return{type:"block-sdk/x/auction/Params",value:{max_bundle_size:t.toFixed(),escrow_account_address:e,reserve_fee:o.toAmino(),min_bid_increment:r.toAmino(),front_running_protection:s,proposer_fee:n}}}static fromData(t){const{max_bundle_size:e,escrow_account_address:o,reserve_fee:r,min_bid_increment:s,front_running_protection:n,proposer_fee:a}=t;return new cs(parseInt(e),o,P.fromData(r),P.fromData(s),n,a)}toData(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:o,min_bid_increment:r,front_running_protection:s,proposer_fee:n}=this;return{"@type":"/sdk.auction.v1.Params",max_bundle_size:t.toFixed(),escrow_account_address:e,reserve_fee:o.toData(),min_bid_increment:r.toData(),front_running_protection:s,proposer_fee:n}}static fromProto(t){return new cs(t.maxBundleSize,Buffer.from(t.escrowAccountAddress).toString("base64"),P.fromProto(t.reserveFee),P.fromProto(t.minBidIncrement),t.frontRunningProtection,t.proposerFee)}toProto(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:o,min_bid_increment:r,front_running_protection:s,proposer_fee:n}=this;return Ec.Params.fromPartial({maxBundleSize:t,escrowAccountAddress:Buffer.from(e,"base64"),reserveFee:o.toProto(),minBidIncrement:r.toProto(),frontRunningProtection:s,proposerFee:n})}}class fe extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new fe(e,cs.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"block-sdk/x/auction/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new fe(e,cs.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/sdk.auction.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new fe(t.authority,cs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return $n.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgUpdateParams",value:$n.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return fe.fromProto($n.MsgUpdateParams.decode(t.value))}}class T{constructor(t){this.c=t}}class zi extends T{async parameters(t={}){return this.c.get("/block-sdk/auction/v1/params",t).then(e=>cs.fromData(e.params))}}class u extends m{constructor(e={}){super();p(this,"_coins");if(e instanceof u)this._coins={...e._coins};else if(typeof e=="string")this._coins=u.fromString(e)._coins;else{this._coins={};let o;Array.isArray(e)?o=e:(o=[],Object.keys(e).forEach(r=>o.push(new P(r,e[r]))));for(const r of o){const{denom:s}=r,n=this._coins[s];n!==void 0?this._coins[s]=n.add(r):this._coins[s]=r}if(this.toArray().some(r=>r.isDecimal))for(const r of Object.keys(this._coins))this._coins[r]=this._coins[r].toDecCoin()}}[Symbol.iterator](){let e=-1;const o=this.toArray();return{next:()=>({value:o[++e],done:e===o.length})}}toString(){return this.toArray().map(e=>e.toString()).join(",")}static fromString(e){const r=e.split(/,\s*/).map(s=>P.fromString(s));return new u(r)}denoms(){return this.map(e=>e.denom)}toDecCoins(){return new u(this.map(e=>e.toDecCoin()))}toIntCoins(){return new u(this.map(e=>e.toIntCoin()))}toIntCeilCoins(){return new u(this.map(e=>e.toIntCeilCoin()))}get(e){return this._coins[e]}set(e,o){let r;if(o instanceof P){if(o.denom!=e)throw new Error(`Denoms must match when setting: ${e}, ${o.denom}`);r=o}else r=new P(e,o);this._coins[e]=r}toArray(){return Object.values(this._coins).sort((e,o)=>e.denom.localeCompare(o.denom))}add(e){return e instanceof P?new u([e,...Object.values(this._coins)]):new u([...Object.values(e._coins),...Object.values(this._coins)])}sub(e){return this.add(e.mul(-1))}mul(e){return new u(this.map(o=>o.mul(e)))}div(e){return new u(this.map(o=>o.div(e)))}mod(e){return new u(this.map(o=>o.mod(e)))}map(e){return this.toArray().map(e)}filter(e){return new u(this.toArray().filter(e))}static fromAmino(e){return new u((e??[]).map(P.fromAmino))}toAmino(){return this.toArray().map(e=>e.toAmino())}static fromData(e){return new u((e??[]).map(P.fromData))}toData(){return this.toArray().map(e=>e.toData())}static fromProto(e){return new u((e??[]).map(P.fromProto))}toProto(){return this.toArray().map(e=>e.toProto())}}class x{constructor(t,e=0){p(this,"seconds");p(this,"nanos");const[o,r]=(e/Math.pow(10,9)+t).toFixed(9).split(".");this.seconds=parseInt(o),this.nanos=parseInt(r)}static fromString(t){const[e,o]=parseFloat(t.replace("s","")).toFixed(9).split(".");return new x(parseInt(e),parseInt(o))}toString(){return`${this.nanos/Math.pow(10,9)+this.seconds}s`}static fromAmino(t){return x.fromString(t)}toAmino(){return this.toString()}static fromData(t){return x.fromString(t)}toData(){return this.toString()}static fromProto(t){return new x(Number(t.seconds),t.nanos)}toProto(){return Nc.Duration.fromPartial({seconds:BigInt(this.seconds),nanos:this.nanos})}}class ms extends m{constructor(t,e,o,r,s){super(),this.max_memo_characters=t,this.tx_sig_limit=e,this.tx_size_cost_per_byte=o,this.sig_verify_cost_ed25519=r,this.sig_verify_cost_secp256k1=s}static fromAmino(t){const{value:{max_memo_characters:e,tx_sig_limit:o,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:s,sig_verify_cost_secp256k1:n}}=t;return new ms(parseInt(e),parseInt(o),parseInt(r),parseInt(s),parseInt(n))}toAmino(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:r,sig_verify_cost_secp256k1:s}=this;return{type:"cosmos-sdk/x/auth/Params",value:{max_memo_characters:t.toFixed(),tx_sig_limit:e.toFixed(),tx_size_cost_per_byte:o.toFixed(),sig_verify_cost_ed25519:r.toFixed(),sig_verify_cost_secp256k1:s.toFixed()}}}static fromData(t){const{max_memo_characters:e,tx_sig_limit:o,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:s,sig_verify_cost_secp256k1:n}=t;return new ms(parseInt(e),parseInt(o),parseInt(r),parseInt(s),parseInt(n))}toData(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:r,sig_verify_cost_secp256k1:s}=this;return{"@type":"/cosmos.auth.v1beta1.Params",max_memo_characters:t.toFixed(),tx_sig_limit:e.toFixed(),tx_size_cost_per_byte:o.toFixed(),sig_verify_cost_ed25519:r.toFixed(),sig_verify_cost_secp256k1:s.toFixed()}}static fromProto(t){return new ms(Number(t.maxMemoCharacters),Number(t.txSigLimit),Number(t.txSizeCostPerByte),Number(t.sigVerifyCostEd25519),Number(t.sigVerifyCostSecp256k1))}toProto(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:r,sig_verify_cost_secp256k1:s}=this;return Zs.Params.fromPartial({maxMemoCharacters:BigInt(t),txSigLimit:BigInt(e),txSizeCostPerByte:BigInt(o),sigVerifyCostEd25519:BigInt(r),sigVerifyCostSecp256k1:BigInt(s)})}}class ge extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new ge(e,ms.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"cosmos-sdk/x/auth/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new ge(e,ms.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.auth.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new ge(t.authority,ms.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Va.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.MsgUpdateParams",value:Va.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ge.fromProto(Va.MsgUpdateParams.decode(t.value))}}function Ra(c){return Si.SHA256.hash(Fc.Base64.parse(c)).toString().toUpperCase()}function Ga(c){return Si.SHA256.hash(new Ta.Word32Array(c)).toUint8Array()}function Gi(c){return Ci(Buffer.from(c))}function Ji(c){return Oc.RIPEMD160.hash(new Ta.Word32Array(c)).toUint8Array()}const tm=Buffer.from("eb5ae98721","hex"),em=Buffer.from("22c1f7e2","hex"),wi=c=>{const t=parseInt(c.toString());if(t>127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]};exports.PublicKey=void 0;(c=>{function t(r){switch(r.type){case"tendermint/PubKeySecp256k1":return ot.fromAmino(r);case"tendermint/PubKeyMultisigThreshold":return re.fromAmino(r);case"tendermint/PubKeyEd25519":return Z.fromAmino(r);case"initia/PubKeyEthSecp256k1":return se.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmos.crypto.secp256k1.PubKey":return ot.fromData(r);case"/cosmos.crypto.multisig.LegacyAminoPubKey":return re.fromData(r);case"/cosmos.crypto.ed25519.PubKey":return Z.fromData(r);case"/initia.crypto.v1beta1.ethsecp256k1.PubKey":return se.fromData(r)}}c.fromData=e;function o(r){const s=r.typeUrl;if(s==="/cosmos.crypto.secp256k1.PubKey")return ot.unpackAny(r);if(s==="/cosmos.crypto.multisig.LegacyAminoPubKey")return re.unpackAny(r);if(s==="/cosmos.crypto.ed25519.PubKey")return Z.unpackAny(r);if(s==="/initia.crypto.v1beta1.ethsecp256k1.PubKey")return se.unpackAny(r);throw new Error(`Pubkey type ${s} not recognized`)}c.fromProto=o})(exports.PublicKey||(exports.PublicKey={}));class ot extends m{constructor(t){super(),this.key=t}static fromAmino(t){return new ot(t.value)}toAmino(){return{type:"tendermint/PubKeySecp256k1",value:this.key}}static fromData(t){return new ot(t.key)}toData(){return{"@type":"/cosmos.crypto.secp256k1.PubKey",key:this.key}}static fromProto(t){return new ot(Buffer.from(t.key).toString("base64"))}toProto(){return Ha.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:Ha.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return ot.fromProto(Ha.PubKey.decode(t.value))}encodeAminoPubkey(){return Buffer.concat([tm,Buffer.from(this.key,"base64")])}rawAddress(){const t=Buffer.from(this.key,"base64");return Ji(Ga(t))}address(){return q.bech32.encode("init",q.bech32.toWords(this.rawAddress()))}}class re extends m{constructor(t,e){super(),this.threshold=t,this.pubkeys=e}encodeAminoPubkey(){const t=Array.from(em);t.push(8),t.push(...wi(this.threshold));for(const e of this.pubkeys.map(o=>o.encodeAminoPubkey()))t.push(18),t.push(...wi(e.length)),t.push(...Array.from(e));return new Uint8Array(t)}rawAddress(){const t=this.encodeAminoPubkey();return Ga(t).slice(0,20)}address(){return q.bech32.encode("init",q.bech32.toWords(this.rawAddress()))}static fromAmino(t){return new re(parseInt(t.value.threshold),t.value.pubkeys.map(e=>ot.fromAmino(e)))}toAmino(){return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:this.threshold.toFixed(),pubkeys:this.pubkeys.map(t=>t.toAmino())}}}static fromData(t){return new re(parseInt(t.threshold),t.public_keys.map(e=>ot.fromData(e)))}toData(){return{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey",threshold:this.threshold.toFixed(),public_keys:this.pubkeys.map(t=>t.toData())}}static fromProto(t){return new re(t.threshold,t.publicKeys.map(e=>ot.unpackAny(e)))}toProto(){return Wa.LegacyAminoPubKey.fromPartial({threshold:this.threshold,publicKeys:this.pubkeys.map(t=>t.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:Wa.LegacyAminoPubKey.encode(this.toProto()).finish()})}static unpackAny(t){return re.fromProto(Wa.LegacyAminoPubKey.decode(t.value))}}class Z extends m{constructor(t){super(),this.key=t}static fromAmino(t){return new Z(t.value)}toAmino(){return{type:"tendermint/PubKeyEd25519",value:this.key}}static fromData(t){return new Z(t.key)}toData(){return{"@type":"/cosmos.crypto.ed25519.PubKey",key:this.key}}static fromProto(t){return new Z(Buffer.from(t.key).toString("base64"))}toProto(){return ja.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:ja.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Z.fromProto(ja.PubKey.decode(t.value))}rawAddress(){const t=Buffer.from(this.key,"base64");return Ga(t).slice(0,20)}address(){return q.bech32.encode("initvalcons",q.bech32.toWords(this.rawAddress()))}}class se extends m{constructor(t){super(),this.key=t}static fromAmino(t){return new se(t.value)}toAmino(){return{type:"initia/PubKeyEthSecp256k1",value:this.key}}static fromData(t){return new se(t.key)}toData(){return{"@type":"/initia.crypto.v1beta1.ethsecp256k1.PubKey",key:this.key}}static fromProto(t){return new se(Buffer.from(t.key).toString("base64"))}toProto(){return Qa.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.crypto.v1beta1.ethsecp256k1.PubKey",value:Qa.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return se.fromProto(Qa.PubKey.decode(t.value))}rawAddress(){if(!_a.publicKeyVerify(Buffer.from(this.key,"base64")))throw new Error("Invalid public key");const e=_a.publicKeyConvert(Buffer.from(this.key,"base64"),!1);return Gi(e.slice(1)).slice(12)}address(){return q.bech32.encode("init",q.bech32.toWords(this.rawAddress()))}}class bt extends m{constructor(t,e,o,r){super(),this.address=t,this.public_key=e,this.account_number=o,this.sequence=r}getAccountNumber(){return this.account_number}getSequenceNumber(){return this.sequence}getPublicKey(){return this.public_key}static fromAmino(t){const{value:{address:e,public_key:o,account_number:r,sequence:s}}=t;return new bt(e??"",o?exports.PublicKey.fromAmino(o):void 0,parseInt(r)??0,parseInt(s)??0)}toAmino(){const{address:t,public_key:e,account_number:o,sequence:r}=this;return{type:"cosmos-sdk/BaseAccount",value:{address:t,public_key:e==null?void 0:e.toAmino(),account_number:o.toFixed(),sequence:r.toFixed()}}}static fromData(t){const{address:e,pub_key:o,account_number:r,sequence:s}=t;return new bt(e??"",o?exports.PublicKey.fromData(o):void 0,parseInt(r)??0,parseInt(s)??0)}toData(){const{address:t,public_key:e,account_number:o,sequence:r}=this;return{"@type":"/cosmos.auth.v1beta1.BaseAccount",address:t,pub_key:e==null?void 0:e.toData(),account_number:o.toFixed(),sequence:r.toFixed()}}static fromProto(t){const e=t.pubKey;return new bt(t.address,e?exports.PublicKey.fromProto(e):void 0,Number(t.accountNumber),Number(t.sequence))}toProto(){const{address:t,public_key:e,account_number:o,sequence:r}=this;return Zs.BaseAccount.fromPartial({address:t,pubKey:e==null?void 0:e.packAny(),accountNumber:BigInt(o),sequence:BigInt(r)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.BaseAccount",value:Zs.BaseAccount.encode(this.toProto()).finish()})}static unpackAny(t){return bt.fromProto(Zs.BaseAccount.decode(t.value))}}class ne extends m{constructor(t,e,o){super(),this.base_account=t,this.name=e,this.permissions=o}getAccountNumber(){return this.base_account.account_number}getSequenceNumber(){return this.base_account.sequence}getPublicKey(){return this.base_account.public_key}static fromAmino(t){const{value:{base_account:e,name:o,permissions:r}}=t;return new ne(bt.fromAmino({type:"cosmos-sdk/BaseAccount",value:e}),o,r)}toAmino(){const{base_account:t,name:e,permissions:o}=this;return{type:"cosmos-sdk/ModuleAccount",value:{base_account:t.toAmino().value,name:e,permissions:o}}}static fromData(t){const{base_account:e,name:o,permissions:r}=t;return new ne(bt.fromData({"@type":"/cosmos.auth.v1beta1.BaseAccount",...e}),o,r)}toData(){const{base_account:t,name:e,permissions:o}=this;return{"@type":"/cosmos.auth.v1beta1.ModuleAccount",base_account:t.toData(),name:e,permissions:o}}static fromProto(t){return new ne(bt.fromProto(t.baseAccount),t.name,t.permissions)}toProto(){const{base_account:t,name:e,permissions:o}=this;return Zs.ModuleAccount.fromPartial({baseAccount:t.toProto(),name:e,permissions:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",value:Zs.ModuleAccount.encode(this.toProto()).finish()})}static unpackAny(t){return ne.fromProto(Zs.ModuleAccount.decode(t.value))}}exports.Account=void 0;(c=>{function t(r){switch(r.type){case"cosmos-sdk/BaseAccount":return bt.fromAmino(r);case"cosmos-sdk/ModuleAccount":return ne.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmos.auth.v1beta1.BaseAccount":return bt.fromData(r);case"/cosmos.auth.v1beta1.ModuleAccount":return ne.fromData(r)}}c.fromData=e;function o(r){const s=r.typeUrl;if(s==="/cosmos.auth.v1beta1.BaseAccount")return bt.unpackAny(r);if(s==="/cosmos.auth.v1beta1.ModuleAccount")return ne.unpackAny(r);throw new Error(`Account type ${s} not recognized`)}c.fromProto=o})(exports.Account||(exports.Account={}));class qt extends m{constructor(e,o,r,s){super();p(this,"max_tokens");this.allow_list=o,this.deny_list=r,this.authorization_type=s,this.max_tokens=new u(e)}static fromAmino(e){const{value:{max_tokens:o,allow_list:r,deny_list:s,authorization_type:n}}=e;return new qt(u.fromAmino(o),Ot.fromAmino(r),Ot.fromAmino(s),le.authorizationTypeFromJSON(n))}toAmino(){const{max_tokens:e,allow_list:o,deny_list:r,authorization_type:s}=this;return{type:"mstaking/StakeAuthorization",value:{max_tokens:e.toAmino(),allow_list:o.toAmino(),deny_list:r.toAmino(),authorization_type:le.authorizationTypeToJSON(s)}}}static fromData(e){const{max_tokens:o,allow_list:r,deny_list:s,authorization_type:n}=e;return new qt(u.fromData(o),Ot.fromData(r),Ot.fromData(s),le.authorizationTypeFromJSON(n))}toData(){const{max_tokens:e,allow_list:o,deny_list:r,authorization_type:s}=this;return{"@type":"/initia.mstaking.v1.StakeAuthorization",max_tokens:e.toData(),allow_list:o.toData(),deny_list:r.toData(),authorization_type:le.authorizationTypeToJSON(s)}}static fromProto(e){return new qt(u.fromProto(e.maxTokens),Ot.fromProto(e.allowList),Ot.fromProto(e.denyList),e.authorizationType)}toProto(){const{max_tokens:e,allow_list:o,deny_list:r,authorization_type:s}=this;return le.StakeAuthorization.fromPartial({maxTokens:e.toProto(),allowList:o.toProto(),denyList:r.toProto(),authorizationType:s})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.StakeAuthorization",value:le.StakeAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return qt.fromProto(le.StakeAuthorization.decode(e.value))}}class Ot extends m{constructor(t){super(),this.address=t}static fromAmino(t){return new Ot(t.address)}toAmino(){return{address:this.address}}static fromData(t){return new Ot(t.address)}toData(){return{address:this.address}}static fromProto(t){return new Ot(t.address)}toProto(){return le.StakeAuthorization_Validators.fromPartial({address:this.address})}}(c=>{c.Type=le.AuthorizationType})(qt||(qt={}));class ye extends m{constructor(e,o){super();p(this,"spend_limit");this.allow_list=o,this.spend_limit=new u(e)}static fromAmino(e){return new ye(u.fromAmino(e.value.spend_limit),e.value.allow_list)}toAmino(){const{spend_limit:e,allow_list:o}=this;return{type:"cosmos-sdk/SendAuthorization",value:{spend_limit:e.toAmino(),allow_list:o}}}static fromData(e){return new ye(u.fromData(e.spend_limit),e.allow_list)}toData(){const{spend_limit:e,allow_list:o}=this;return{"@type":"/cosmos.bank.v1beta1.SendAuthorization",spend_limit:e.toAmino(),allow_list:o}}static fromProto(e){return new ye(u.fromProto(e.spendLimit),e.allowList)}toProto(){return Ya.SendAuthorization.fromPartial({spendLimit:this.spend_limit.toProto(),allowList:this.allow_list})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.SendAuthorization",value:Ya.SendAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return ye.fromProto(Ya.SendAuthorization.decode(e.value))}}class _e extends m{constructor(t){super(),this.msg=t}static fromAmino(t){return new _e(t.value.msg)}toAmino(){const{msg:t}=this;return{type:"cosmos-sdk/GenericAuthorization",value:{msg:t}}}static fromData(t){return new _e(t.msg)}toData(){const{msg:t}=this;return{"@type":"/cosmos.authz.v1beta1.GenericAuthorization",msg:t}}static fromProto(t){return new _e(t.msg)}toProto(){return Ua.GenericAuthorization.fromPartial({msg:this.msg})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",value:Ua.GenericAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return _e.fromProto(Ua.GenericAuthorization.decode(t.value))}}class ve extends m{constructor(t){super(),this.module_names=t}static fromAmino(t){return new ve(t.value.module_names)}toAmino(){return{type:"move/PublishAuthorization",value:{module_names:this.module_names}}}static fromData(t){return new ve(t.module_names)}toData(){return{"@type":"/initia.move.v1.PublishAuthorization",module_names:this.module_names}}static fromProto(t){return new ve(t.moduleNames)}toProto(){return Ln.PublishAuthorization.fromPartial({moduleNames:this.module_names})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.PublishAuthorization",value:Ln.PublishAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return ve.fromProto(Ln.PublishAuthorization.decode(t.value))}}class Pe extends m{constructor(t){super(),this.items=t}static fromAmino(t){return new Pe(t.value.items.map(Ss.fromAmino))}toAmino(){return{type:"move/ExecuteAuthorization",value:{items:this.items.map(t=>t.toAmino())}}}static fromData(t){return new Pe(t.items.map(Ss.fromData))}toData(){return{"@type":"/initia.move.v1.ExecuteAuthorization",items:this.items.map(t=>t.toData())}}static fromProto(t){return new Pe(t.items.map(Ss.fromProto))}toProto(){return Ln.ExecuteAuthorization.fromPartial({items:this.items.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.ExecuteAuthorization",value:Ln.ExecuteAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Pe.fromProto(Ln.ExecuteAuthorization.decode(t.value))}}class Ss extends m{constructor(t,e,o){super(),this.module_address=t,this.module_name=e,this.function_names=o}static fromAmino(t){const{module_address:e,module_name:o,function_names:r}=t;return new Ss(e,o,r)}toAmino(){const{module_address:t,module_name:e,function_names:o}=this;return{module_address:t,module_name:e,function_names:o}}static fromData(t){const{module_address:e,module_name:o,function_names:r}=t;return new Ss(e,o,r)}toData(){const{module_address:t,module_name:e,function_names:o}=this;return{module_address:t,module_name:e,function_names:o}}static fromProto(t){return new Ss(t.moduleAddress,t.moduleName,t.functionNames)}toProto(){return wt.ExecuteAuthorizationItem.fromPartial({moduleAddress:this.module_address,moduleName:this.module_name,functionNames:this.function_names})}}class G extends m{constructor(t,e){super(),this.permission=t,this.addresses=e}static fromAmino(t){const{permission:e,addresses:o}=t;return new G(Pt.accessTypeFromJSON(e),o)}toAmino(){const{permission:t,addresses:e}=this;return{permission:Pt.accessTypeToJSON(t),addresses:e}}static fromData(t){const{permission:e,addresses:o}=t;return new G(Pt.accessTypeFromJSON(e),o)}toData(){const{permission:t,addresses:e}=this;return{permission:Pt.accessTypeToJSON(t),addresses:e}}static fromProto(t){return new G(t.permission,t.addresses)}toProto(){const{permission:t,addresses:e}=this;return Pt.AccessConfig.fromPartial({permission:t,addresses:e})}}(c=>{c.Type=Pt.AccessType})(G||(G={}));class Cs extends m{constructor(t,e){super(),this.code_hash=t,this.instantiate_permission=e}static fromAmino(t){const{code_hash:e,instantiate_permission:o}=t;return new Cs(e,o?G.fromAmino(o):void 0)}toAmino(){const{code_hash:t,instantiate_permission:e}=this;return{code_hash:t,instantiate_permission:e==null?void 0:e.toAmino()}}static fromData(t){const{code_hash:e,instantiate_permission:o}=t;return new Cs(e,o?G.fromData(o):void 0)}toData(){const{code_hash:t,instantiate_permission:e}=this;return{code_hash:t,instantiate_permission:e==null?void 0:e.toData()}}static fromProto(t){return new Cs(Buffer.from(t.codeHash).toString("base64"),t.instantiatePermission?G.fromProto(t.instantiatePermission):void 0)}toProto(){const{code_hash:t,instantiate_permission:e}=this;return $.CodeGrant.fromPartial({codeHash:Buffer.from(t,"base64"),instantiatePermission:e==null?void 0:e.toProto()})}}class Ae extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new Ae(t.value.grants.map(Cs.fromAmino))}toAmino(){return{type:"wasm/StoreCodeAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new Ae(t.grants.map(Cs.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.StoreCodeAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new Ae(t.grants.map(Cs.fromProto))}toProto(){return $.StoreCodeAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.StoreCodeAuthorization",value:$.StoreCodeAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Ae.fromProto($.StoreCodeAuthorization.decode(t.value))}}class we extends m{constructor(t){super(),this.remaining=t}static fromAmino(t){return new we(parseInt(t.value.remaining))}toAmino(){return{type:"wasm/MaxCallsLimit",value:{remaining:this.remaining.toFixed()}}}static fromData(t){return new we(parseInt(t.remaining))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxCallsLimit",remaining:this.remaining.toFixed()}}static fromProto(t){return new we(Number(t.remaining))}toProto(){return $.MaxCallsLimit.fromPartial({remaining:BigInt(this.remaining)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxCallsLimit",value:$.MaxCallsLimit.encode(this.toProto()).finish()})}static unpackAny(t){return we.fromProto($.MaxCallsLimit.decode(t.value))}}class be extends m{constructor(e){super();p(this,"amounts");this.amounts=new u(e)}static fromAmino(e){return new be(u.fromAmino(e.value.amounts))}toAmino(){return{type:"wasm/MaxFundsLimit",value:{amounts:this.amounts.toAmino()}}}static fromData(e){return new be(u.fromData(e.amounts))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxFundsLimit",amounts:this.amounts.toData()}}static fromProto(e){return new be(u.fromProto(e.amounts))}toProto(){return $.MaxFundsLimit.fromPartial({amounts:this.amounts.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxFundsLimit",value:$.MaxFundsLimit.encode(this.toProto()).finish()})}static unpackAny(e){return be.fromProto($.MaxFundsLimit.decode(e.value))}}class De extends m{constructor(e,o){super();p(this,"amounts");this.calls_remaining=e,this.amounts=new u(o)}static fromAmino(e){const{value:{calls_remaining:o,amounts:r}}=e;return new De(parseInt(o),u.fromAmino(r))}toAmino(){const{calls_remaining:e,amounts:o}=this;return{type:"wasm/CombinedLimit",value:{calls_remaining:e.toFixed(),amounts:o.toAmino()}}}static fromData(e){const{calls_remaining:o,amounts:r}=e;return new De(parseInt(o),u.fromData(r))}toData(){const{calls_remaining:e,amounts:o}=this;return{"@type":"/cosmwasm.wasm.v1.CombinedLimit",calls_remaining:e.toFixed(),amounts:o.toData()}}static fromProto(e){return new De(Number(e.callsRemaining),u.fromProto(e.amounts))}toProto(){const{calls_remaining:e,amounts:o}=this;return $.CombinedLimit.fromPartial({callsRemaining:BigInt(e),amounts:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.CombinedLimit",value:$.CombinedLimit.encode(this.toProto()).finish()})}static unpackAny(e){return De.fromProto($.CombinedLimit.decode(e.value))}}var va;(c=>{function t(r){switch(r.type){case"wasm/MaxCallsLimit":return we.fromAmino(r);case"wasm/MaxFundsLimit":return be.fromAmino(r);case"wasm/CombinedLimit":return De.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmwasm.wasm.v1.MaxCallsLimit":return we.fromData(r);case"/cosmwasm.wasm.v1.MaxFundsLimit":return be.fromData(r);case"/cosmwasm.wasm.v1.CombinedLimit":return De.fromData(r)}}c.fromData=e;function o(r){const s=r.typeUrl;switch(s){case"/cosmwasm.wasm.v1.MaxCallsLimit":return we.unpackAny(r);case"/cosmwasm.wasm.v1.MaxFundsLimit":return be.unpackAny(r);case"/cosmwasm.wasm.v1.CombinedLimit":return De.unpackAny(r)}throw new Error(`ContractLimit type ${s} not recognized`)}c.fromProto=o})(va||(va={}));class ke extends m{constructor(){super()}static fromAmino(t){return new ke}toAmino(){return{type:"wasm/AllowAllMessagesFilter",value:{}}}static fromData(t){return new ke}toData(){return{"@type":"/cosmwasm.wasm.v1.AllowAllMessagesFilter"}}static fromProto(t){return new ke}toProto(){return $.AllowAllMessagesFilter.fromPartial({})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AllowAllMessagesFilter",value:$.AllowAllMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return ke.fromProto($.AllowAllMessagesFilter.decode(t.value))}}class Me extends m{constructor(t){super(),this.keys=t}static fromAmino(t){return new Me(t.value.keys)}toAmino(){return{type:"wasm/AcceptedMessageKeysFilter",value:{keys:this.keys}}}static fromData(t){return new Me(t.keys)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",keys:this.keys}}static fromProto(t){return new Me(t.keys)}toProto(){return $.AcceptedMessageKeysFilter.fromPartial({keys:this.keys})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",value:$.AcceptedMessageKeysFilter.encode(this.toProto()).finish()})}static unpackAny(t){return Me.fromProto($.AcceptedMessageKeysFilter.decode(t.value))}}class xe extends m{constructor(t){super(),this.messages=t}static fromAmino(t){return new xe(t.value.messages)}toAmino(){return{type:"wasm/AcceptedMessagesFilter",value:{messages:this.messages}}}static fromData(t){return new xe(t.messages)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessagesFilter",messages:this.messages}}static fromProto(t){return new xe(t.messages.map(e=>Buffer.from(e).toString("base64")))}toProto(){return $.AcceptedMessagesFilter.fromPartial({messages:this.messages.map(t=>Buffer.from(t,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessagesFilter",value:$.AcceptedMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return xe.fromProto($.AcceptedMessagesFilter.decode(t.value))}}var Pa;(c=>{function t(r){switch(r.type){case"wasm/AllowAllMessagesFilter":return ke.fromAmino(r);case"wasm/AcceptedMessageKeysFilter":return Me.fromAmino(r);case"wasm/AcceptedMessagesFilter":return xe.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return ke.fromData(r);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return Me.fromData(r);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return xe.fromData(r)}}c.fromData=e;function o(r){const s=r.typeUrl;switch(s){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return ke.unpackAny(r);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return Me.unpackAny(r);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return xe.unpackAny(r)}throw new Error(`ContractFilter type ${s} not recognized`)}c.fromProto=o})(Pa||(Pa={}));class Wt extends m{constructor(t,e,o){super(),this.contract=t,this.limit=e,this.filter=o}static fromAmino(t){const{contract:e,limit:o,filter:r}=t;return new Wt(e,va.fromAmino(o),Pa.fromAmino(r))}toAmino(){const{contract:t,limit:e,filter:o}=this;return{contract:t,limit:e.toAmino(),filter:o.toAmino()}}static fromData(t){const{contract:e,limit:o,filter:r}=t;return new Wt(e,va.fromData(o),Pa.fromData(r))}toData(){const{contract:t,limit:e,filter:o}=this;return{contract:t,limit:e.toData(),filter:o.toData()}}static fromProto(t){return new Wt(t.contract,va.fromProto(t.limit),Pa.fromProto(t.filter))}toProto(){const{contract:t,limit:e,filter:o}=this;return $.ContractGrant.fromPartial({contract:t,limit:e.packAny(),filter:o.packAny()})}}class Ie extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new Ie(t.value.grants.map(Wt.fromAmino))}toAmino(){return{type:"wasm/ContractExecutionAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new Ie(t.grants.map(Wt.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractExecutionAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new Ie(t.grants.map(Wt.fromProto))}toProto(){return $.ContractExecutionAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractExecutionAuthorization",value:$.ContractExecutionAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Ie.fromProto($.ContractExecutionAuthorization.decode(t.value))}}class Se extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new Se(t.value.grants.map(Wt.fromAmino))}toAmino(){return{type:"wasm/ContractMigrationAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new Se(t.grants.map(Wt.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractMigrationAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new Se(t.grants.map(Wt.fromProto))}toProto(){return $.ContractMigrationAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractMigrationAuthorization",value:$.ContractMigrationAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Se.fromProto($.ContractMigrationAuthorization.decode(t.value))}}class Ce extends m{constructor(t,e,o){super(),this.sender=t,this.wasm_byte_code=e,this.instantiate_permission=o}static fromAmino(t){const{value:{sender:e,wasm_byte_code:o,instantiate_permission:r}}=t;return new Ce(e,o,r?G.fromAmino(r):void 0)}toAmino(){const{sender:t,wasm_byte_code:e,instantiate_permission:o}=this;return{type:"wasm/MsgStoreCode",value:{sender:t,wasm_byte_code:e,instantiate_permission:o==null?void 0:o.toAmino()}}}static fromData(t){const{sender:e,wasm_byte_code:o,instantiate_permission:r}=t;return new Ce(e,o,r?G.fromData(r):void 0)}toData(){const{sender:t,wasm_byte_code:e,instantiate_permission:o}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreCode",sender:t,wasm_byte_code:e,instantiate_permission:o==null?void 0:o.toData()}}static fromProto(t){return new Ce(t.sender,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?G.fromProto(t.instantiatePermission):void 0)}toProto(){const{sender:t,wasm_byte_code:e,instantiate_permission:o}=this;return D.MsgStoreCode.fromPartial({sender:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:o==null?void 0:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:D.MsgStoreCode.encode(this.toProto()).finish()})}static unpackAny(t){return Ce.fromProto(D.MsgStoreCode.decode(t.value))}}class Ue extends m{constructor(e,o,r,s,n,a){super();p(this,"funds");this.sender=e,this.admin=o,this.code_id=r,this.label=s,this.msg=n,this.funds=new u(a)}static fromAmino(e){const{value:{sender:o,admin:r,code_id:s,label:n,msg:a,funds:i}}=e;return new Ue(o,r,parseInt(s),n,Buffer.from(JSON.stringify(a)).toString("base64"),u.fromAmino(i))}toAmino(){const{sender:e,admin:o,code_id:r,label:s,msg:n,funds:a}=this;return{type:"wasm/MsgInstantiateContract",value:{sender:e,admin:o,code_id:r.toFixed(),label:s,msg:JSON.parse(Buffer.from(n,"base64").toString()),funds:a.toAmino()}}}static fromData(e){const{sender:o,admin:r,code_id:s,label:n,msg:a,funds:i}=e;return new Ue(o,r,parseInt(s),n,Buffer.from(JSON.stringify(a)).toString("base64"),u.fromData(i))}toData(){const{sender:e,admin:o,code_id:r,label:s,msg:n,funds:a}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:e,admin:o,code_id:r.toFixed(),label:s,msg:JSON.parse(Buffer.from(n,"base64").toString()),funds:a.toData()}}static fromProto(e){return new Ue(e.sender,e.admin,Number(e.codeId),e.label,Buffer.from(e.msg).toString("base64"),u.fromProto(e.funds))}toProto(){const{sender:e,admin:o,code_id:r,label:s,msg:n,funds:a}=this;return D.MsgInstantiateContract.fromPartial({sender:e,admin:o,codeId:BigInt(r),label:s,msg:Buffer.from(n,"base64"),funds:a.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:D.MsgInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return Ue.fromProto(D.MsgInstantiateContract.decode(e.value))}}class Be extends m{constructor(e,o,r,s,n,a,i,d){super();p(this,"funds");this.sender=e,this.admin=o,this.code_id=r,this.label=s,this.msg=n,this.salt=i,this.fix_msg=d,this.funds=new u(a)}static fromAmino(e){const{value:{sender:o,admin:r,code_id:s,label:n,msg:a,funds:i,salt:d,fix_msg:h}}=e;return new Be(o,r,parseInt(s),n,Buffer.from(JSON.stringify(a)).toString("base64"),u.fromAmino(i),d,h)}toAmino(){const{sender:e,admin:o,code_id:r,label:s,msg:n,funds:a,salt:i,fix_msg:d}=this;return{type:"wasm/MsgInstantiateContract2",value:{sender:e,admin:o,code_id:r.toFixed(),label:s,msg:JSON.parse(Buffer.from(n,"base64").toString()),funds:a.toAmino(),salt:i,fix_msg:d}}}static fromData(e){const{sender:o,admin:r,code_id:s,label:n,msg:a,funds:i,salt:d,fix_msg:h}=e;return new Be(o,r,parseInt(s),n,Buffer.from(JSON.stringify(a)).toString("base64"),u.fromData(i),d,h)}toData(){const{sender:e,admin:o,code_id:r,label:s,msg:n,funds:a,salt:i,fix_msg:d}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract2",sender:e,admin:o,code_id:r.toFixed(),label:s,msg:JSON.parse(Buffer.from(n,"base64").toString()),funds:a.toData(),salt:i,fix_msg:d}}static fromProto(e){return new Be(e.sender,e.admin,Number(e.codeId),e.label,Buffer.from(e.msg).toString("base64"),u.fromProto(e.funds),Buffer.from(e.salt).toString("base64"),e.fixMsg)}toProto(){const{sender:e,admin:o,code_id:r,label:s,msg:n,funds:a,salt:i,fix_msg:d}=this;return D.MsgInstantiateContract2.fromPartial({sender:e,admin:o,codeId:BigInt(r),label:s,msg:Buffer.from(n,"base64"),funds:a.toProto(),salt:Buffer.from(i,"base64"),fixMsg:d})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:D.MsgInstantiateContract2.encode(this.toProto()).finish()})}static unpackAny(e){return Be.fromProto(D.MsgInstantiateContract2.decode(e.value))}}class Ee extends m{constructor(e,o,r,s){super();p(this,"funds");this.sender=e,this.contract=o,this.msg=r,this.funds=new u(s)}static fromAmino(e){const{value:{sender:o,contract:r,msg:s,funds:n}}=e;return new Ee(o,r,Buffer.from(JSON.stringify(s)).toString("base64"),u.fromAmino(n))}toAmino(){const{sender:e,contract:o,msg:r,funds:s}=this;return{type:"wasm/MsgExecuteContract",value:{sender:e,contract:o,msg:JSON.parse(Buffer.from(r,"base64").toString()),funds:s.toAmino()}}}static fromData(e){const{sender:o,contract:r,msg:s,funds:n}=e;return new Ee(o,r,Buffer.from(JSON.stringify(s)).toString("base64"),u.fromData(n))}toData(){const{sender:e,contract:o,msg:r,funds:s}=this;return{"@type":"/cosmwasm.wasm.v1.MsgExecuteContract",sender:e,contract:o,msg:JSON.parse(Buffer.from(r,"base64").toString()),funds:s.toData()}}static fromProto(e){return new Ee(e.sender,e.contract,Buffer.from(e.msg).toString("base64"),u.fromProto(e.funds))}toProto(){const{sender:e,contract:o,msg:r,funds:s}=this;return D.MsgExecuteContract.fromPartial({sender:e,contract:o,msg:Buffer.from(r,"base64"),funds:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:D.MsgExecuteContract.encode(this.toProto()).finish()})}static unpackAny(e){return Ee.fromProto(D.MsgExecuteContract.decode(e.value))}}class Ne extends m{constructor(t,e,o,r){super(),this.sender=t,this.contract=e,this.code_id=o,this.msg=r}static fromAmino(t){const{value:{sender:e,contract:o,code_id:r,msg:s}}=t;return new Ne(e,o,parseInt(r),Buffer.from(JSON.stringify(s)).toString("base64"))}toAmino(){const{sender:t,contract:e,code_id:o,msg:r}=this;return{type:"wasm/MsgMigrateContract",value:{sender:t,contract:e,code_id:o.toFixed(),msg:JSON.parse(Buffer.from(r,"base64").toString())}}}static fromData(t){const{sender:e,contract:o,code_id:r,msg:s}=t;return new Ne(e,o,parseInt(r),Buffer.from(JSON.stringify(s)).toString("base64"))}toData(){const{sender:t,contract:e,code_id:o,msg:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgMigrateContract",sender:t,contract:e,code_id:o.toFixed(),msg:JSON.parse(Buffer.from(r,"base64").toString())}}static fromProto(t){return new Ne(t.sender,t.contract,Number(t.codeId),Buffer.from(t.msg).toString("base64"))}toProto(){const{sender:t,contract:e,code_id:o,msg:r}=this;return D.MsgMigrateContract.fromPartial({sender:t,contract:e,codeId:BigInt(o),msg:Buffer.from(r,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:D.MsgMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return Ne.fromProto(D.MsgMigrateContract.decode(t.value))}}class Oe extends m{constructor(t,e,o){super(),this.sender=t,this.new_admin=e,this.contract=o}static fromAmino(t){const{value:{sender:e,new_admin:o,contract:r}}=t;return new Oe(e,o,r)}toAmino(){const{sender:t,new_admin:e,contract:o}=this;return{type:"wasm/MsgUpdateAdmin",value:{sender:t,new_admin:e,contract:o}}}static fromData(t){const{sender:e,new_admin:o,contract:r}=t;return new Oe(e,o,r)}toData(){const{sender:t,new_admin:e,contract:o}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateAdmin",sender:t,new_admin:e,contract:o}}static fromProto(t){return new Oe(t.sender,t.newAdmin,t.contract)}toProto(){const{sender:t,new_admin:e,contract:o}=this;return D.MsgUpdateAdmin.fromPartial({sender:t,newAdmin:e,contract:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:D.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Oe.fromProto(D.MsgUpdateAdmin.decode(t.value))}}class Fe extends m{constructor(t,e){super(),this.sender=t,this.contract=e}static fromAmino(t){const{value:{sender:e,contract:o}}=t;return new Fe(e,o)}toAmino(){const{sender:t,contract:e}=this;return{type:"wasm/MsgClearAdmin",value:{sender:t,contract:e}}}static fromData(t){const{sender:e,contract:o}=t;return new Fe(e,o)}toData(){const{sender:t,contract:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:t,contract:e}}static fromProto(t){return new Fe(t.sender,t.contract)}toProto(){const{sender:t,contract:e}=this;return D.MsgClearAdmin.fromPartial({sender:t,contract:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:D.MsgClearAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Fe.fromProto(D.MsgClearAdmin.decode(t.value))}}class Te extends m{constructor(t,e,o){super(),this.sender=t,this.code_id=e,this.new_instantiate_permission=o}static fromAmino(t){const{value:{sender:e,code_id:o,new_instantiate_permission:r}}=t;return new Te(e,parseInt(o),G.fromAmino(r))}toAmino(){const{sender:t,code_id:e,new_instantiate_permission:o}=this;return{type:"wasm/MsgUpdateInstantiateConfig",value:{sender:t,code_id:e.toFixed(),new_instantiate_permission:o.toAmino()}}}static fromData(t){const{sender:e,code_id:o,new_instantiate_permission:r}=t;return new Te(e,parseInt(o),G.fromData(r))}toData(){const{sender:t,code_id:e,new_instantiate_permission:o}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",sender:t,code_id:e.toFixed(),new_instantiate_permission:o.toData()}}static fromProto(t){return new Te(t.sender,Number(t.codeId),G.fromProto(t.newInstantiatePermission))}toProto(){const{sender:t,code_id:e,new_instantiate_permission:o}=this;return D.MsgUpdateInstantiateConfig.fromPartial({sender:t,codeId:BigInt(e),newInstantiatePermission:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",value:D.MsgUpdateInstantiateConfig.encode(this.toProto()).finish()})}static unpackAny(t){return Te.fromProto(D.MsgUpdateInstantiateConfig.decode(t.value))}}class us extends m{constructor(t,e){super(),this.code_upload_access=t,this.instantiate_default_permission=e}static fromAmino(t){const{value:{code_upload_access:e,instantiate_default_permission:o}}=t;return new us(G.fromAmino(e),Pt.accessTypeFromJSON(o))}toAmino(){const{code_upload_access:t,instantiate_default_permission:e}=this;return{type:"wasm/Params",value:{code_upload_access:t.toAmino(),instantiate_default_permission:Pt.accessTypeToJSON(e)}}}static fromData(t){const{code_upload_access:e,instantiate_default_permission:o}=t;return new us(G.fromData(e),Pt.accessTypeFromJSON(o))}toData(){const{code_upload_access:t,instantiate_default_permission:e}=this;return{"@type":"/cosmwasm.wasm.v1.Params",code_upload_access:t.toData(),instantiate_default_permission:Pt.accessTypeToJSON(e)}}static fromProto(t){return new us(G.fromProto(t.codeUploadAccess),t.instantiateDefaultPermission)}toProto(){const{code_upload_access:t,instantiate_default_permission:e}=this;return Pt.Params.fromPartial({codeUploadAccess:t.toProto(),instantiateDefaultPermission:e})}}class Re extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new Re(e,us.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"wasm/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new Re(e,us.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Re(t.authority,us.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return D.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",value:D.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Re.fromProto(D.MsgUpdateParams.decode(t.value))}}class qe extends m{constructor(t,e,o){super(),this.authority=t,this.contract=e,this.msg=o}static fromAmino(t){const{value:{authority:e,contract:o,msg:r}}=t;return new qe(e,o,Buffer.from(JSON.stringify(r)).toString("base64"))}toAmino(){const{authority:t,contract:e,msg:o}=this;return{type:"wasm/MsgSudoContract",value:{authority:t,contract:e,msg:JSON.parse(Buffer.from(o,"base64").toString())}}}static fromData(t){const{authority:e,contract:o,msg:r}=t;return new qe(e,o,Buffer.from(JSON.stringify(r)).toString("base64"))}toData(){const{authority:t,contract:e,msg:o}=this;return{"@type":"/cosmwasm.wasm.v1.MsgSudoContract",authority:t,contract:e,msg:JSON.parse(Buffer.from(o,"base64").toString())}}static fromProto(t){return new qe(t.authority,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,contract:e,msg:o}=this;return D.MsgSudoContract.fromPartial({authority:t,contract:e,msg:Buffer.from(o,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",value:D.MsgSudoContract.encode(this.toProto()).finish()})}static unpackAny(t){return qe.fromProto(D.MsgSudoContract.decode(t.value))}}class $e extends m{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:o}}=t;return new $e(e,o.map(parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgPinCodes",value:{authority:t,code_ids:e.map(o=>o.toFixed())}}}static fromData(t){const{authority:e,code_ids:o}=t;return new $e(e,o.map(parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgPinCodes",authority:t,code_ids:e.map(o=>o.toFixed())}}static fromProto(t){return new $e(t.authority,t.codeIds.map(e=>Number(e)))}toProto(){const{authority:t,code_ids:e}=this;return D.MsgPinCodes.fromPartial({authority:t,codeIds:e.map(o=>BigInt(o))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",value:D.MsgPinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return $e.fromProto(D.MsgPinCodes.decode(t.value))}}class Le extends m{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:o}}=t;return new Le(e,o.map(parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgUnpinCodes",value:{authority:t,code_ids:e.map(o=>o.toFixed())}}}static fromData(t){const{authority:e,code_ids:o}=t;return new Le(e,o.map(parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUnpinCodes",authority:t,code_ids:e.map(o=>o.toFixed())}}static fromProto(t){return new Le(t.authority,t.codeIds.map(e=>Number(e)))}toProto(){const{authority:t,code_ids:e}=this;return D.MsgUnpinCodes.fromPartial({authority:t,codeIds:e.map(o=>BigInt(o))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",value:D.MsgUnpinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return Le.fromProto(D.MsgUnpinCodes.decode(t.value))}}class ze extends m{constructor(e,o,r,s,n,a,i,d,h,y,_){super();p(this,"funds");this.authority=e,this.wasm_byte_code=o,this.instantiate_permission=r,this.unpin_code=s,this.admin=n,this.label=a,this.msg=i,this.source=h,this.builder=y,this.code_hash=_,this.funds=new u(d)}static fromAmino(e){const{value:{authority:o,wasm_byte_code:r,instantiate_permission:s,unpin_code:n,admin:a,label:i,msg:d,funds:h,source:y,builder:_,code_hash:A}}=e;return new ze(o,r,s?G.fromAmino(s):void 0,n,a,i,Buffer.from(JSON.stringify(d)).toString("base64"),u.fromAmino(h),y,_,A)}toAmino(){const{authority:e,wasm_byte_code:o,instantiate_permission:r,unpin_code:s,admin:n,label:a,msg:i,funds:d,source:h,builder:y,code_hash:_}=this;return{type:"wasm/MsgStoreAndInstantiateContract",value:{authority:e,wasm_byte_code:o,instantiate_permission:r==null?void 0:r.toAmino(),unpin_code:s,admin:n,label:a,msg:JSON.parse(Buffer.from(i,"base64").toString()),funds:d.toAmino(),source:h,builder:y,code_hash:_}}}static fromData(e){const{authority:o,wasm_byte_code:r,instantiate_permission:s,unpin_code:n,admin:a,label:i,msg:d,funds:h,source:y,builder:_,code_hash:A}=e;return new ze(o,r,s?G.fromData(s):void 0,n,a,i,Buffer.from(JSON.stringify(d)).toString("base64"),u.fromData(h),y,_,A)}toData(){const{authority:e,wasm_byte_code:o,instantiate_permission:r,unpin_code:s,admin:n,label:a,msg:i,funds:d,source:h,builder:y,code_hash:_}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",authority:e,wasm_byte_code:o,instantiate_permission:r==null?void 0:r.toData(),unpin_code:s,admin:n,label:a,msg:JSON.parse(Buffer.from(i,"base64").toString()),funds:d.toData(),source:h,builder:y,code_hash:_}}static fromProto(e){return new ze(e.authority,Buffer.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?G.fromProto(e.instantiatePermission):void 0,e.unpinCode,e.admin,e.label,Buffer.from(e.msg).toString("base64"),u.fromProto(e.funds),e.source,e.builder,Buffer.from(e.codeHash).toString("base64"))}toProto(){const{authority:e,wasm_byte_code:o,instantiate_permission:r,unpin_code:s,admin:n,label:a,msg:i,funds:d,source:h,builder:y,code_hash:_}=this;return D.MsgStoreAndInstantiateContract.fromPartial({authority:e,wasmByteCode:Buffer.from(o,"base64"),instantiatePermission:r==null?void 0:r.toProto(),unpinCode:s,admin:n,label:a,msg:Buffer.from(i,"base64"),funds:d.toProto(),source:h,builder:y,codeHash:Buffer.from(_,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",value:D.MsgStoreAndInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return ze.fromProto(D.MsgStoreAndInstantiateContract.decode(e.value))}}class Ge extends m{constructor(t,e,o,r,s){super(),this.authority=t,this.wasm_byte_code=e,this.instantiate_permission=o,this.contract=r,this.msg=s}static fromAmino(t){const{value:{authority:e,wasm_byte_code:o,instantiate_permission:r,contract:s,msg:n}}=t;return new Ge(e,o,r?G.fromAmino(r):void 0,s,Buffer.from(JSON.stringify(n)).toString("base64"))}toAmino(){const{authority:t,wasm_byte_code:e,instantiate_permission:o,contract:r,msg:s}=this;return{type:"wasm/MsgStoreAndMigrateContract",value:{authority:t,wasm_byte_code:e,instantiate_permission:o==null?void 0:o.toAmino(),contract:r,msg:JSON.parse(Buffer.from(s,"base64").toString())}}}static fromData(t){const{authority:e,wasm_byte_code:o,instantiate_permission:r,contract:s,msg:n}=t;return new Ge(e,o,r?G.fromData(r):void 0,s,Buffer.from(JSON.stringify(n)).toString("base64"))}toData(){const{authority:t,wasm_byte_code:e,instantiate_permission:o,contract:r,msg:s}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",authority:t,wasm_byte_code:e,instantiate_permission:o==null?void 0:o.toData(),contract:r,msg:JSON.parse(Buffer.from(s,"base64").toString())}}static fromProto(t){return new Ge(t.authority,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?G.fromProto(t.instantiatePermission):void 0,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,wasm_byte_code:e,instantiate_permission:o,contract:r,msg:s}=this;return D.MsgStoreAndMigrateContract.fromPartial({authority:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:o==null?void 0:o.toProto(),contract:r,msg:Buffer.from(s,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",value:D.MsgStoreAndMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return Ge.fromProto(D.MsgStoreAndMigrateContract.decode(t.value))}}class Je extends m{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:o}}=t;return new Je(e,o)}toAmino(){const{authority:t,addresses:e}=this;return{type:"wasm/MsgAddCodeUploadParamsAddresses",value:{authority:t,addresses:e}}}static fromData(t){const{authority:e,addresses:o}=t;return new Je(e,o)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new Je(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return D.MsgAddCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",value:D.MsgAddCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return Je.fromProto(D.MsgAddCodeUploadParamsAddresses.decode(t.value))}}class Ke extends m{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:o}}=t;return new Ke(e,o)}toAmino(){const{authority:t,addresses:e}=this;return{type:"wasm/MsgRemoveCodeUploadParamsAddresses",value:{authority:t,addresses:e}}}static fromData(t){const{authority:e,addresses:o}=t;return new Ke(e,o)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new Ke(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return D.MsgRemoveCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",value:D.MsgRemoveCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return Ke.fromProto(D.MsgRemoveCodeUploadParamsAddresses.decode(t.value))}}class Ve extends m{constructor(t,e,o){super(),this.sender=t,this.new_label=e,this.contract=o}static fromAmino(t){const{value:{sender:e,new_label:o,contract:r}}=t;return new Ve(e,o,r)}toAmino(){const{sender:t,new_label:e,contract:o}=this;return{type:"wasm/MsgUpdateContractLabel",value:{sender:t,new_label:e,contract:o}}}static fromData(t){const{sender:e,new_label:o,contract:r}=t;return new Ve(e,o,r)}toData(){const{sender:t,new_label:e,contract:o}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateContractLabel",sender:t,new_label:e,contract:o}}static fromProto(t){return new Ve(t.sender,t.newLabel,t.contract)}toProto(){const{sender:t,new_label:e,contract:o}=this;return D.MsgUpdateContractLabel.fromPartial({sender:t,newLabel:e,contract:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",value:D.MsgUpdateContractLabel.encode(this.toProto()).finish()})}static unpackAny(t){return Ve.fromProto(D.MsgUpdateContractLabel.decode(t.value))}}class tn extends m{constructor(t,e){super(),this.block_height=t,this.tx_index=e}static fromAmino(t){const{block_height:e,tx_index:o}=t;return new tn(parseInt(e),parseInt(o))}toAmino(){const{block_height:t,tx_index:e}=this;return{block_height:t.toFixed(),tx_index:e.toFixed()}}static fromData(t){const{block_height:e,tx_index:o}=t;return new tn(parseInt(e),parseInt(o))}toData(){const{block_height:t,tx_index:e}=this;return{block_height:t.toFixed(),tx_index:e.toFixed()}}static fromProto(t){return new tn(Number(t.blockHeight),Number(t.txIndex))}toProto(){const{block_height:t,tx_index:e}=this;return Pt.AbsoluteTxPosition.fromPartial({blockHeight:BigInt(t),txIndex:BigInt(e)})}}class en extends m{constructor(e,o,r,s,n){super();p(this,"spend_limit");this.source_port=e,this.source_channel=o,this.allow_list=s,this.allowed_packet_data=n,this.spend_limit=new u(r)}static fromAmino(e){const{source_port:o,source_channel:r,spend_limit:s,allow_list:n,allowed_packet_data:a}=e;return new en(o,r,u.fromAmino(s),n,a)}toAmino(){const{source_port:e,source_channel:o,spend_limit:r,allow_list:s,allowed_packet_data:n}=this;return{source_port:e,source_channel:o,spend_limit:r.toAmino(),allow_list:s,allowed_packet_data:n}}static fromData(e){const{source_port:o,source_channel:r,spend_limit:s,allow_list:n,allowed_packet_data:a}=e;return new en(o,r,u.fromData(s),n,a)}toData(){const{source_port:e,source_channel:o,spend_limit:r,allow_list:s,allowed_packet_data:n}=this;return{source_port:e,source_channel:o,spend_limit:r.toData(),allow_list:s,allowed_packet_data:n}}static fromProto(e){return new en(e.sourcePort,e.sourceChannel,u.fromProto(e.spendLimit),e.allowList,e.allowedPacketData)}toProto(){const{source_port:e,source_channel:o,spend_limit:r,allow_list:s,allowed_packet_data:n}=this;return Ba.Allocation.fromPartial({sourcePort:e,sourceChannel:o,spendLimit:r.toProto(),allowList:s,allowedPacketData:n})}}class on extends m{constructor(t){super(),this.allocations=t}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){return new on(t.allocations.map(en.fromData))}toData(){return{"@type":"/ibc.applications.transfer.v1.TransferAuthorization",allocations:this.allocations.map(t=>t.toData())}}static fromProto(t){return new on(t.allocations.map(en.fromProto))}toProto(){return Ba.TransferAuthorization.fromPartial({allocations:this.allocations.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.TransferAuthorization",value:Ba.TransferAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return on.fromProto(Ba.TransferAuthorization.decode(t.value))}}class w extends m{constructor(t,e){super(),this.revision_number=t,this.revision_height=e}static fromAmino(t){const{revision_number:e,revision_height:o}=t;return new w(parseInt(e??"0"),parseInt(o??"0"))}toAmino(){const{revision_number:t,revision_height:e}=this;return{revision_number:t>0?t.toFixed():void 0,revision_height:e>0?e.toFixed():void 0}}static fromData(t){const{revision_number:e,revision_height:o}=t;return new w(parseInt(e),parseInt(o))}toData(){const{revision_number:t,revision_height:e}=this;return{revision_number:t.toFixed(),revision_height:e.toFixed()}}static fromProto(t){return new w(Number(t.revisionNumber),Number(t.revisionHeight))}toProto(){const{revision_number:t,revision_height:e}=this;return Sa.Height.fromPartial({revisionNumber:BigInt(t),revisionHeight:BigInt(e)})}}class We extends m{constructor(e,o,r,s,n,a,i,d){super();p(this,"source_port");p(this,"source_channel");p(this,"token");p(this,"sender");p(this,"receiver");p(this,"timeout_height");p(this,"timeout_timestamp");p(this,"memo");if(!a&&!i)throw new Error("both of timeout_height and timeout_timestamp are undefined");this.source_port=e,this.source_channel=o,this.token=r,this.sender=s,this.receiver=n,this.timeout_height=a,this.timeout_timestamp=i,this.memo=d}static fromAmino(e){const{value:{source_port:o,source_channel:r,token:s,sender:n,receiver:a,timeout_height:i,timeout_timestamp:d,memo:h}}=e;if(!i&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new We(o,r,s?P.fromAmino(s):void 0,n,a,w.fromAmino(i),d,h)}toAmino(){const{source_port:e,source_channel:o,token:r,sender:s,receiver:n,timeout_height:a,timeout_timestamp:i,memo:d}=this;return{type:"cosmos-sdk/MsgTransfer",value:{source_port:e,source_channel:o,token:r==null?void 0:r.toAmino(),sender:s,receiver:n,timeout_height:(a==null?void 0:a.toAmino())??{},timeout_timestamp:i,memo:d===""?void 0:d}}}static fromData(e){const{source_port:o,source_channel:r,token:s,sender:n,receiver:a,timeout_timestamp:i,timeout_height:d,memo:h}=e;if(!d&&!i)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new We(o,r,s?P.fromData(s):void 0,n,a,d?w.fromData(d):void 0,i==="0"?void 0:i,h)}toData(){const{source_port:e,source_channel:o,token:r,sender:s,receiver:n,timeout_height:a,timeout_timestamp:i,memo:d}=this;return{"@type":"/ibc.applications.transfer.v1.MsgTransfer",source_port:e,source_channel:o,token:r==null?void 0:r.toData(),sender:s,receiver:n,timeout_height:a?a.toData():new w(0,0).toData(),timeout_timestamp:i??"0",memo:d}}static fromProto(e){if(!e.timeoutHeight&&Number(e.timeoutTimestamp)==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new We(e.sourcePort,e.sourceChannel,e.token?P.fromProto(e.token):void 0,e.sender,e.receiver,e.timeoutHeight?w.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:o,token:r,sender:s,receiver:n,timeout_height:a,timeout_timestamp:i,memo:d}=this;return zn.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:o,token:r==null?void 0:r.toProto(),sender:s,receiver:n,timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:i?BigInt(i):void 0,memo:d})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:zn.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return We.fromProto(zn.MsgTransfer.decode(e.value))}}class Us extends m{constructor(t,e){super(),this.send_enabled=t,this.receive_enabled=e}static fromAmino(t){const{send_enabled:e,receive_enabled:o}=t;return new Us(e,o)}toAmino(){const{send_enabled:t,receive_enabled:e}=this;return{send_enabled:t,receive_enabled:e}}static fromData(t){const{send_enabled:e,receive_enabled:o}=t;return new Us(e,o)}toData(){const{send_enabled:t,receive_enabled:e}=this;return{send_enabled:t,receive_enabled:e}}static fromProto(t){return new Us(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Ui.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class rn extends m{constructor(t,e){super(),this.signer=t,this.params=e}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{signer:e,params:o}=t;return new rn(e,Us.fromData(o))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.applications.transfer.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new rn(t.signer,Us.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return zn.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgUpdateParams",value:zn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return rn.fromProto(zn.MsgUpdateParams.decode(t.value))}}class sn extends m{constructor(t,e){super(),this.path=t,this.base_denom=e}static fromAmino(t){const{path:e,base_denom:o}=t;return new sn(e,o)}toAmino(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromData(t){const{path:e,base_denom:o}=t;return new sn(e,o)}toData(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromProto(t){return new sn(t.path,t.baseDenom)}toProto(){const{path:t,base_denom:e}=this;return Ui.DenomTrace.fromPartial({path:t,baseDenom:e})}}class Aa extends m{constructor(t,e,o,r,s){super(),this.denom=t,this.amount=e,this.sender=o,this.receiver=r,this.memo=s}static fromAmino(t){const{denom:e,amount:o,sender:r,receiver:s,memo:n}=t;return new Aa(e,o,r,s,n)}toAmino(){const{denom:t,amount:e,sender:o,receiver:r,memo:s}=this;return{denom:t,amount:e,sender:o,receiver:r,memo:s}}static fromData(t){const{denom:e,amount:o,sender:r,receiver:s,memo:n}=t;return new Aa(e,o,r,s,n)}toData(){const{denom:t,amount:e,sender:o,receiver:r,memo:s}=this;return{denom:t,amount:e,sender:o,receiver:r,memo:s}}static fromProto(t){return new Aa(t.denom,t.amount,t.sender,t.receiver,t.memo)}toProto(){const{denom:t,amount:e,sender:o,receiver:r,memo:s}=this;return Tc.FungibleTokenPacketData.fromPartial({denom:t,amount:e,sender:o,receiver:r,memo:s})}}class Ht extends m{constructor(t,e){super(),this.authorization=t,this.expiration=e}static fromAmino(t){const{authorization:e,expiration:o}=t;return new Ht(exports.Authorization.fromAmino(e),o?new Date(o):void 0)}toAmino(){const{authorization:t,expiration:e}=this;return{authorization:t.toAmino(),expiration:e==null?void 0:e.toISOString()}}static fromData(t){const{authorization:e,expiration:o}=t;return new Ht(exports.Authorization.fromData(e),o?new Date(o):void 0)}toData(){const{authorization:t,expiration:e}=this;return{authorization:t.toData(),expiration:e==null?void 0:e.toISOString()}}static fromProto(t){return new Ht(exports.Authorization.fromProto(t.authorization),t.expiration)}toProto(){const{authorization:t,expiration:e}=this;return Ua.Grant.fromPartial({authorization:t.packAny(),expiration:e})}}exports.Authorization=void 0;(c=>{function t(r){switch(r.type){case"cosmos-sdk/SendAuthorization":return ye.fromAmino(r);case"cosmos-sdk/GenericAuthorization":return _e.fromAmino(r);case"mstaking/StakeAuthorization":return qt.fromAmino(r);case"move/ExecuteAuthorization":return Pe.fromAmino(r);case"move/PublishAuthorization":return ve.fromAmino(r);case"wasm/StoreCodeAuthorization":return Ae.fromAmino(r);case"wasm/ContractExecutionAuthorization":return Ie.fromAmino(r);case"wasm/ContractMigrationAuthorization":return Se.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmos.authz.v1beta1.GenericAuthorization":return _e.fromData(r);case"/cosmos.bank.v1beta1.SendAuthorization":return ye.fromData(r);case"/initia.mstaking.v1.StakeAuthorization":return qt.fromData(r);case"/initia.move.v1.PublishAuthorization":return ve.fromData(r);case"/initia.move.v1.ExecuteAuthorization":return Pe.fromData(r);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Ae.fromData(r);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return Ie.fromData(r);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return Se.fromData(r);case"/ibc.applications.transfer.v1.TransferAuthorization":return on.fromData(r)}}c.fromData=e;function o(r){const s=r.typeUrl;switch(s){case"/cosmos.authz.v1beta1.GenericAuthorization":return _e.unpackAny(r);case"/cosmos.bank.v1beta1.SendAuthorization":return ye.unpackAny(r);case"/initia.mstaking.v1.StakeAuthorization":return qt.unpackAny(r);case"/initia.move.v1.PublishAuthorization":return ve.unpackAny(r);case"/initia.move.v1.ExecuteAuthorization":return Pe.unpackAny(r);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Ae.unpackAny(r);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return Ie.unpackAny(r);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return Se.unpackAny(r);case"/ibc.applications.transfer.v1.TransferAuthorization":return on.unpackAny(r)}throw new Error(`Authorization type ${s} not recognized`)}c.fromProto=o})(exports.Authorization||(exports.Authorization={}));class He extends m{constructor(t,e,o){super(),this.granter=t,this.grantee=e,this.grant=o}static fromAmino(t){const{value:{granter:e,grantee:o,grant:r}}=t;return new He(e,o,Ht.fromAmino(r))}toAmino(){const{granter:t,grantee:e,grant:o}=this;return{type:"cosmos-sdk/MsgGrant",value:{granter:t,grantee:e,grant:o.toAmino()}}}static fromData(t){const{granter:e,grantee:o,grant:r}=t;return new He(e,o,Ht.fromData(r))}toData(){const{granter:t,grantee:e,grant:o}=this;return{"@type":"/cosmos.authz.v1beta1.MsgGrant",granter:t,grantee:e,grant:o.toData()}}static fromProto(t){return new He(t.granter,t.grantee,Ht.fromProto(t.grant))}toProto(){const{grant:t,granter:e,grantee:o}=this;return as.MsgGrant.fromPartial({grant:t.toProto(),grantee:o,granter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgGrant",value:as.MsgGrant.encode(this.toProto()).finish()})}static unpackAny(t){return He.fromProto(as.MsgGrant.decode(t.value))}}class je extends m{constructor(t,e,o){super(),this.granter=t,this.grantee=e,this.msg_type_url=o}static fromAmino(t){const{value:{granter:e,grantee:o,msg_type_url:r}}=t;return new je(e,o,r)}toAmino(){const{granter:t,grantee:e,msg_type_url:o}=this;return{type:"cosmos-sdk/MsgRevoke",value:{granter:t,grantee:e,msg_type_url:o}}}static fromData(t){const{granter:e,grantee:o,msg_type_url:r}=t;return new je(e,o,r)}toData(){const{granter:t,grantee:e,msg_type_url:o}=this;return{"@type":"/cosmos.authz.v1beta1.MsgRevoke",granter:t,grantee:e,msg_type_url:o}}static fromProto(t){return new je(t.granter,t.grantee,t.msgTypeUrl)}toProto(){const{granter:t,grantee:e,msg_type_url:o}=this;return as.MsgRevoke.fromPartial({grantee:e,granter:t,msgTypeUrl:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",value:as.MsgRevoke.encode(this.toProto()).finish()})}static unpackAny(t){return je.fromProto(as.MsgRevoke.decode(t.value))}}class Qe extends m{constructor(t,e){super(),this.grantee=t,this.msgs=e}static fromAmino(t){const{value:{grantee:e,msgs:o}}=t;return new Qe(e,o.map(r=>exports.Msg.fromAmino(r)))}toAmino(){const{grantee:t,msgs:e}=this;return{type:"cosmos-sdk/MsgExec",value:{grantee:t,msgs:e.map(o=>o.toAmino())}}}static fromData(t){const{grantee:e,msgs:o}=t;return new Qe(e,o.map(r=>exports.Msg.fromData(r)))}toData(){const{grantee:t,msgs:e}=this;return{"@type":"/cosmos.authz.v1beta1.MsgExec",grantee:t,msgs:e.map(o=>o.toData())}}static fromProto(t){return new Qe(t.grantee,t.msgs.map(e=>exports.Msg.fromProto(e)))}toProto(){const{grantee:t,msgs:e}=this;return as.MsgExec.fromPartial({grantee:t,msgs:e.map(o=>o.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:as.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return Qe.fromProto(as.MsgExec.decode(t.value))}}class Ye extends m{constructor(e,o,r){super();p(this,"amount");this.from_address=e,this.to_address=o,this.amount=new u(r)}static fromAmino(e){const{value:{from_address:o,to_address:r,amount:s}}=e;return new Ye(o,r,u.fromAmino(s))}toAmino(){const{from_address:e,to_address:o,amount:r}=this;return{type:"cosmos-sdk/MsgSend",value:{from_address:e,to_address:o,amount:r.toAmino()}}}static fromData(e){const{from_address:o,to_address:r,amount:s}=e;return new Ye(o,r,u.fromData(s))}toData(){const{from_address:e,to_address:o,amount:r}=this;return{"@type":"/cosmos.bank.v1beta1.MsgSend",from_address:e,to_address:o,amount:r.toData()}}static fromProto(e){return new Ye(e.fromAddress,e.toAddress,u.fromProto(e.amount))}toProto(){const{from_address:e,to_address:o,amount:r}=this;return It.MsgSend.fromPartial({fromAddress:e,toAddress:o,amount:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:It.MsgSend.encode(this.toProto()).finish()})}static unpackAny(e){return Ye.fromProto(It.MsgSend.decode(e.value))}}class st extends m{constructor(t,e){super(),this.inputs=t,this.outputs=e}static fromAmino(t){const{value:{inputs:e,outputs:o}}=t;return new st(e.map(r=>st.Input.fromAmino(r)),o.map(r=>st.Output.fromAmino(r)))}toAmino(){const{inputs:t,outputs:e}=this;return{type:"cosmos-sdk/MsgMultiSend",value:{inputs:t.map(o=>o.toAmino()),outputs:e.map(o=>o.toAmino())}}}static fromData(t){const{inputs:e,outputs:o}=t;return new st(e.map(r=>st.Input.fromData(r)),o.map(r=>st.Output.fromData(r)))}toData(){const{inputs:t,outputs:e}=this;return{"@type":"/cosmos.bank.v1beta1.MsgMultiSend",inputs:t.map(o=>o.toData()),outputs:e.map(o=>o.toData())}}static fromProto(t){return new st(t.inputs.map(e=>st.Input.fromProto(e)),t.outputs.map(e=>st.Output.fromProto(e)))}toProto(){const{inputs:t,outputs:e}=this;return It.MsgMultiSend.fromPartial({inputs:t.map(o=>o.toProto()),outputs:e.map(o=>o.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgMultiSend",value:It.MsgMultiSend.encode(this.toProto()).finish()})}static unpackAny(t){return st.fromProto(It.MsgMultiSend.decode(t.value))}}(c=>{class t extends m{constructor(s,n){super();p(this,"coins");this.address=s,this.coins=new u(n)}static fromAmino(s){const{address:n,coins:a}=s;return new t(n,u.fromAmino(a))}toAmino(){const{address:s,coins:n}=this;return{address:s,coins:n.toAmino()}}static fromData(s){const{address:n,coins:a}=s;return new t(n,u.fromData(a))}toData(){const{address:s,coins:n}=this;return{address:s,coins:n.toData()}}static fromProto(s){return new t(s.address,u.fromProto(s.coins))}toProto(){const{address:s,coins:n}=this;return ma.Input.fromPartial({address:s,coins:n.toProto()})}}c.Input=t;class e extends m{constructor(s,n){super();p(this,"coins");this.address=s,this.coins=new u(n)}static fromAmino(s){const{address:n,coins:a}=s;return new e(n,u.fromAmino(a))}toAmino(){const{address:s,coins:n}=this;return{address:s,coins:n.toAmino()}}static fromData(s){const{address:n,coins:a}=s;return new e(n,u.fromData(a))}toData(){const{address:s,coins:n}=this;return{address:s,coins:n.toData()}}static fromProto(s){return new e(s.address,u.fromProto(s.coins))}toProto(){const{address:s,coins:n}=this;return ma.Output.fromPartial({address:s,coins:n.toProto()})}}c.Output=e})(st||(st={}));class jt extends m{constructor(t,e){super(),this.denom=t,this.enabled=e}static fromAmino(t){const{denom:e,enabled:o}=t;return new jt(e,o)}toAmino(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromData(t){const{denom:e,enabled:o}=t;return new jt(e,o)}toData(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromProto(t){return new jt(t.denom,t.enabled)}toProto(){const{denom:t,enabled:e}=this;return ma.SendEnabled.fromPartial({denom:t,enabled:e})}}class ds extends m{constructor(t,e){super(),this.send_enabled=t,this.default_send_enabled=e}static fromAmino(t){const{value:{send_enabled:e,default_send_enabled:o}}=t;return new ds(e.map(jt.fromAmino),o)}toAmino(){const{send_enabled:t,default_send_enabled:e}=this;return{type:"cosmos-sdk/x/bank/Params",value:{send_enabled:t.map(o=>o.toAmino()),default_send_enabled:e}}}static fromData(t){const{send_enabled:e,default_send_enabled:o}=t;return new ds(e.map(jt.fromData),o)}toData(){const{send_enabled:t,default_send_enabled:e}=this;return{"@type":"/cosmos.bank.v1beta1.Params",send_enabled:t.map(o=>o.toData()),default_send_enabled:e}}static fromProto(t){return new ds(t.sendEnabled.map(jt.fromProto),t.defaultSendEnabled)}toProto(){const{send_enabled:t,default_send_enabled:e}=this;return ma.Params.fromPartial({sendEnabled:t.map(o=>o.toProto()),defaultSendEnabled:e})}}class Xe extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new Xe(e,ds.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"cosmos-sdk/x/bank/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new Xe(e,ds.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.bank.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Xe(t.authority,ds.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return It.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",value:It.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Xe.fromProto(It.MsgUpdateParams.decode(t.value))}}class Ze extends m{constructor(t,e,o){super(),this.authority=t,this.send_enabled=e,this.use_default_for=o}static fromAmino(t){const{value:{authority:e,send_enabled:o,use_default_for:r}}=t;return new Ze(e,o.map(jt.fromAmino),r)}toAmino(){const{authority:t,send_enabled:e,use_default_for:o}=this;return{type:"cosmos-sdk/MsgSetSendEnabled",value:{authority:t,send_enabled:e.map(r=>r.toAmino()),use_default_for:o}}}static fromData(t){const{authority:e,send_enabled:o,use_default_for:r}=t;return new Ze(e,o.map(jt.fromData),r)}toData(){const{authority:t,send_enabled:e,use_default_for:o}=this;return{"@type":"/cosmos.bank.v1beta1.MsgSetSendEnabled",authority:t,send_enabled:e.map(r=>r.toData()),use_default_for:o}}static fromProto(t){return new Ze(t.authority,t.sendEnabled.map(jt.fromProto),t.useDefaultFor)}toProto(){const{authority:t,send_enabled:e,use_default_for:o}=this;return It.MsgSetSendEnabled.fromPartial({authority:t,sendEnabled:e.map(r=>r.toProto()),useDefaultFor:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",value:It.MsgSetSendEnabled.encode(this.toProto()).finish()})}static unpackAny(t){return Ze.fromProto(It.MsgSetSendEnabled.decode(t.value))}}class Bs extends m{constructor(t,e,o){super(),this.denom=t,this.exponent=e,this.aliases=o}static fromAmino(t){const{denom:e,exponent:o,aliases:r}=t;return new Bs(e,parseInt(o),r)}toAmino(){const{denom:t,exponent:e,aliases:o}=this;return{denom:t,exponent:e.toFixed(),aliases:o}}static fromData(t){const{denom:e,exponent:o,aliases:r}=t;return new Bs(e,parseInt(o),r)}toData(){const{denom:t,exponent:e,aliases:o}=this;return{denom:t,exponent:e.toFixed(),aliases:o}}static fromProto(t){return new Bs(t.denom,t.exponent,t.aliases)}toProto(){const{denom:t,exponent:e,aliases:o}=this;return ma.DenomUnit.fromPartial({denom:t,exponent:e,aliases:o})}}class Qt extends m{constructor(t,e,o,r,s,n,a,i){super(),this.description=t,this.denom_units=e,this.base=o,this.display=r,this.name=s,this.symbol=n,this.uri=a,this.uri_hash=i}static fromAmino(t){const{description:e,denom_units:o,base:r,display:s,name:n,symbol:a,uri:i,uri_hash:d}=t;return new Qt(e,o.map(Bs.fromAmino),r,s,n,a,i,d)}toAmino(){const{description:t,denom_units:e,base:o,display:r,name:s,symbol:n,uri:a,uri_hash:i}=this;return{description:t,denom_units:e.map(d=>d.toAmino()),base:o,display:r,name:s,symbol:n,uri:a,uri_hash:i}}static fromData(t){const{description:e,denom_units:o,base:r,display:s,name:n,symbol:a,uri:i,uri_hash:d}=t;return new Qt(e,o.map(Bs.fromData),r,s,n,a,i,d)}toData(){const{description:t,denom_units:e,base:o,display:r,name:s,symbol:n,uri:a,uri_hash:i}=this;return{description:t,denom_units:e.map(d=>d.toData()),base:o,display:r,name:s,symbol:n,uri:a,uri_hash:i}}static fromProto(t){return new Qt(t.description,t.denomUnits.map(Bs.fromProto),t.base,t.display,t.name,t.symbol,t.uri,t.uriHash)}toProto(){const{description:t,denom_units:e,base:o,display:r,name:s,symbol:n,uri:a,uri_hash:i}=this;return ma.Metadata.fromPartial({description:t,denomUnits:e.map(d=>d.toProto()),base:o,display:r,name:s,symbol:n,uri:a,uriHash:i})}}class to extends m{constructor(t,e){super(),this.authority=t,this.metadata=e}static fromAmino(t){const{value:{authority:e,metadata:o}}=t;return new to(e,Qt.fromAmino(o))}toAmino(){const{authority:t,metadata:e}=this;return{type:"bank/MsgSetDenomMetadata",value:{authority:t,metadata:e.toAmino()}}}static fromData(t){const{authority:e,metadata:o}=t;return new to(e,Qt.fromData(o))}toData(){const{authority:t,metadata:e}=this;return{"@type":"/initia.bank.v1.MsgSetDenomMetadata",authority:t,metadata:e.toData()}}static fromProto(t){return new to(t.authority,Qt.fromProto(t.metadata))}toProto(){const{authority:t,metadata:e}=this;return Xa.MsgSetDenomMetadata.fromPartial({authority:t,metadata:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.bank.v1.MsgSetDenomMetadata",value:Xa.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return to.fromProto(Xa.MsgSetDenomMetadata.decode(t.value))}}class nn extends m{constructor(t,e,o,r,s){super(),this.signer=t,this.namespaces=e,this.blob_sizes=o,this.share_commitments=r,this.share_versions=s}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{signer:e,namespaces:o,blob_sizes:r,share_commitments:s,share_versions:n}=t;return new nn(e,o,r.map(parseInt),s,n.map(parseInt))}toData(){const{signer:t,namespaces:e,blob_sizes:o,share_commitments:r,share_versions:s}=this;return{"@type":"/celestia.blob.v1.MsgPayForBlobs",signer:t,namespaces:e,blob_sizes:o.map(n=>n.toFixed()),share_commitments:r,share_versions:s.map(n=>n.toFixed())}}static fromProto(t){return new nn(t.signer,t.namespaces.map(e=>Buffer.from(e).toString("base64")),t.blobSizes,t.shareCommitments.map(e=>Buffer.from(e).toString("base64")),t.shareVersions)}toProto(){const{signer:t,namespaces:e,blob_sizes:o,share_commitments:r,share_versions:s}=this;return Za.MsgPayForBlobs.fromPartial({signer:t,namespaces:e.map(n=>Buffer.from(n,"base64")),blobSizes:o,shareCommitments:r.map(n=>Buffer.from(n,"base64")),shareVersions:s})}packAny(){return l.Any.fromPartial({typeUrl:"/celestia.blob.v1.MsgPayForBlobs",value:Za.MsgPayForBlobs.encode(this.toProto()).finish()})}static unpackAny(t){return nn.fromProto(Za.MsgPayForBlobs.decode(t.value))}}class ua extends m{constructor(t,e,o,r){super(),this.namespace_id=t,this.data=e,this.share_version=o,this.namespace_version=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){return new ua(t.namespace_id,t.data,parseInt(t.share_version),parseInt(t.namespace_version))}toData(){const{namespace_id:t,data:e,share_version:o,namespace_version:r}=this;return{namespace_id:t,data:e,share_version:o.toFixed(),namespace_version:r.toFixed()}}static fromProto(t){return new ua(Buffer.from(t.namespaceId).toString("base64"),Buffer.from(t.data).toString("base64"),t.shareVersion,t.namespaceVersion)}toProto(){const{namespace_id:t,data:e,share_version:o,namespace_version:r}=this;return ai.Blob.fromPartial({namespaceId:Buffer.from(t,"base64"),data:Buffer.from(e,"base64"),shareVersion:o,namespaceVersion:r})}}class ls{constructor(t,e){this.extra_bits_stored=t,this.elems=e}static fromBits(t){if(t<=0)throw new Error("CompactBitArray bits must be bigger than 0");const e=(t+7)/8;if(e<=0||e>Math.pow(2,32)-1)throw new Error("CompactBitArray overflow");return new ls(t%8,Buffer.alloc(e))}count(){return this.extra_bits_stored==0?this.elems.length*8:(this.elems.length-1)*8+this.extra_bits_stored}getIndex(t){return t<0||t>=this.count()?!1:(this.elems.readUInt8(t>>3)&1<<7-t%8)>0}setIndex(t,e){return t<0||t>=this.count()?!1:(e?this.elems[t>>3]|=1<<7-t%8:this.elems[t>>3]&=~(1<<7-t%8),!0)}numTrueBitsBefore(t){const e=s=>s.toString(2).split("0").join("").length;let o=0;const r=this.count();t>r&&(t=r);for(let s=0;;s++){if(s*8+7>=t)return o+=e(this.elems[s]>>7-t%8+1),o;o+=e(this.elems[s])}}static fromData(t){return new ls(t.extra_bits_stored,Buffer.from(t.elems,"base64"))}toData(){return{elems:this.elems.toString("base64"),extra_bits_stored:this.extra_bits_stored}}static fromProto(t){return new ls(t.extraBitsStored,Buffer.from(t.elems))}toProto(){return ii.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})}}class Dt extends m{constructor(e,o,r,s){super();p(this,"amount");this.gas_limit=e,this.payer=r,this.granter=s,this.amount=new u(o)}static fromAmino(e){const{gas:o,amount:r}=e;return new Dt(parseInt(o),u.fromAmino(r),"","")}toAmino(){return{gas:k(this.gas_limit).toFixed(),amount:this.amount.toAmino()}}static fromData(e){return new Dt(parseInt(e.gas_limit),u.fromData(e.amount),e.payer,e.granter)}toData(){const{amount:e,gas_limit:o,payer:r,granter:s}=this;return{amount:e.toData(),gas_limit:o.toFixed(),granter:s??"",payer:r??""}}static fromProto(e){return new Dt(Number(e.gasLimit),u.fromProto(e.amount),e.payer,e.granter)}toProto(){const{amount:e,gas_limit:o,payer:r,granter:s}=this;return at.Fee.fromPartial({amount:e.toProto(),gasLimit:BigInt(o),granter:s,payer:r})}gasPrices(){return this.amount.toDecCoins().div(this.gas_limit)}}class H{constructor(t,e,o){this.public_key=t,this.data=e,this.sequence=o}static fromAmino(t){return new H(exports.PublicKey.fromAmino(t.pub_key),new H.Descriptor(new H.Descriptor.Single(H.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,t.signature)),0)}static fromData(t){return new H(exports.PublicKey.fromData(t.public_key),H.Descriptor.fromData(t.data),parseInt(t.sequence))}toData(){return{public_key:this.public_key.toData(),data:this.data.toData(),sequence:this.sequence.toFixed()}}}(c=>{c.SignMode=lt.SignMode;class t{constructor(o){p(this,"single");p(this,"multi");o instanceof t.Single?this.single=o:this.multi=o}static fromData(o){if(o.single)return new t(t.Single.fromData(o.single));if(o.multi)return new t(t.Multi.fromData(o.multi));throw new Error("must be one of single or multi")}toData(){if(this.single)return{single:this.single.toData()};if(this.multi)return{multi:this.multi.toData()};throw new Error("must be one of single or multi")}toModeInfoAndSignature(){if(this.single){const o=this.single;return[new F(new F.Single(o.mode)),Buffer.from(o.signature,"base64")]}if(this.multi){const o=this.multi,r=[],s=[];for(const a of o.signatures){const[i,d]=a.toModeInfoAndSignature();r.push(i),s.push(d)}const n=ii.MultiSignature.encode(ii.MultiSignature.fromPartial({signatures:s})).finish();return[new F(new F.Multi(o.bitarray,r)),n]}throw new Error("invalid signature descriptor")}}c.Descriptor=t,(e=>{class o{constructor(n,a){this.mode=n,this.signature=a}static fromData(n){return new o(lt.signModeFromJSON(n.mode),n.signature)}toData(){const{mode:n,signature:a}=this;return{mode:lt.signModeToJSON(n),signature:a}}}e.Single=o;class r{constructor(n,a){this.bitarray=n,this.signatures=a}static fromData(n){return new r(ls.fromData(n.bitarray),n.signatures.map(a=>e.fromData(a)))}toData(){return{bitarray:this.bitarray.toData(),signatures:this.signatures.map(n=>n.toData())}}}e.Multi=r})(t=c.Descriptor||(c.Descriptor={}))})(H||(H={}));class et{constructor(t,e,o){this.body=t,this.auth_info=e,this.signatures=o}static fromAmino(t){const e=t.value.signatures.map(o=>H.fromAmino(o));return new et(new ae(t.value.msg.map(o=>exports.Msg.fromAmino(o)),t.value.memo,parseInt(t.value.timeout_height)),new kt([],Dt.fromAmino(t.value.fee)),e.map(o=>{var r;return((r=o.data.single)==null?void 0:r.signature)??""}))}static fromData(t){return new et(ae.fromData(t.body),kt.fromData(t.auth_info),t.signatures)}toData(){return{body:this.body.toData(),auth_info:this.auth_info.toData(),signatures:this.signatures}}static unpackAny(t){return this.fromProto(at.Tx.decode(t.value))}static fromProto(t){return new et(ae.fromProto(t.body),kt.fromProto(t.authInfo),t.signatures.map(e=>Buffer.from(e).toString("base64")))}toProto(){return at.Tx.fromPartial({body:this.body.toProto(),authInfo:this.auth_info.toProto(),signatures:this.signatures.map(t=>Buffer.from(t,"base64"))})}toBytes(){return at.Tx.encode(this.toProto()).finish()}static fromBuffer(t){return et.fromProto(at.Tx.decode(t))}appendEmptySignatures(t){t.forEach(e=>{let o;e.publicKey?e.publicKey instanceof re?o=new Mt(e.publicKey,e.sequenceNumber,new F(new F.Multi(ls.fromBits(e.publicKey.pubkeys.length),[]))):o=new Mt(e.publicKey,e.sequenceNumber,new F(new F.Single(F.SignMode.SIGN_MODE_DIRECT))):o=new Mt(new ot(""),e.sequenceNumber,new F(new F.Single(F.SignMode.SIGN_MODE_DIRECT))),this.auth_info.signer_infos.push(o),this.signatures.push("")})}clearSignatures(){this.auth_info.signer_infos=[],this.signatures=[]}appendSignatures(t){for(const e of t){const[o,r]=e.data.toModeInfoAndSignature();this.signatures.push(Buffer.from(r).toString("base64")),this.auth_info.signer_infos.push(new Mt(e.public_key,e.sequence,o))}}}class ae{constructor(t,e,o){this.messages=t,this.memo=e,this.timeout_height=o}static fromData(t){return new ae(t.messages.map(e=>exports.Msg.fromData(e)),t.memo,parseInt(t.timeout_height))}toData(){return{memo:this.memo??"",messages:this.messages.map(t=>t.toData()),timeout_height:(this.timeout_height??0).toFixed()}}static fromProto(t){return new ae(t.messages.map(e=>exports.Msg.fromProto(e)),t.memo,Number(t.timeoutHeight))}toProto(){return at.TxBody.fromPartial({memo:this.memo,messages:this.messages.map(t=>t.packAny()),timeoutHeight:this.timeout_height?BigInt(this.timeout_height):void 0})}toBytes(){return at.TxBody.encode(this.toProto()).finish()}}class kt{constructor(t,e){this.signer_infos=t,this.fee=e}static fromData(t){return new kt(t.signer_infos.map(e=>Mt.fromData(e)),Dt.fromData(t.fee))}toData(){return{fee:this.fee.toData(),signer_infos:this.signer_infos.map(t=>t.toData())}}static fromProto(t){return new kt(t.signerInfos.map(e=>Mt.fromProto(e)),Dt.fromProto(t.fee))}toProto(){return at.AuthInfo.fromPartial({fee:this.fee.toProto(),signerInfos:this.signer_infos.map(t=>t.toProto())})}toBytes(){return at.AuthInfo.encode(this.toProto()).finish()}}class Mt{constructor(t,e,o){this.public_key=t,this.sequence=e,this.mode_info=o}static fromData(t){return new Mt(exports.PublicKey.fromData(t.public_key??new ot("").toData()),parseInt(t.sequence),F.fromData(t.mode_info))}toData(){const{public_key:t,sequence:e,mode_info:o}=this;return{mode_info:o.toData(),public_key:t==null?void 0:t.toData(),sequence:e.toFixed()}}static fromProto(t){return new Mt(exports.PublicKey.fromProto(t.publicKey??new ot("").packAny()),Number(t.sequence),F.fromProto(t.modeInfo))}toProto(){const{public_key:t,sequence:e,mode_info:o}=this;return at.SignerInfo.fromPartial({modeInfo:o.toProto(),publicKey:t==null?void 0:t.packAny(),sequence:BigInt(e)})}}class F{constructor(t){p(this,"single");p(this,"multi");t instanceof F.Single?this.single=t:this.multi=t}static fromData(t){if(t.single)return new F(F.Single.fromData(t.single));if(t.multi)return new F(F.Multi.fromData(t.multi));throw new Error("must be one of single or multi")}toData(){var t,e;return{single:(t=this.single)==null?void 0:t.toData(),multi:(e=this.multi)==null?void 0:e.toData()}}static fromProto(t){const e=t.single,o=t.multi;return new F(e?F.Single.fromProto(e):F.Multi.fromProto(o))}toProto(){var t,e;return at.ModeInfo.fromPartial({multi:(t=this.multi)==null?void 0:t.toProto(),single:(e=this.single)==null?void 0:e.toProto()})}}(c=>{c.SignMode=lt.SignMode;class t{constructor(r){this.mode=r}static fromData(r){return new t(lt.signModeFromJSON(r.mode))}toData(){return{mode:lt.signModeToJSON(this.mode)}}static fromProto(r){return new t(r.mode)}toProto(){return at.ModeInfo_Single.fromPartial({mode:this.mode})}}c.Single=t;class e{constructor(r,s){this.bitarray=r,this.modeInfos=s}static fromData(r){return new e(ls.fromData(r.bitarray),r.mode_infos.map(s=>c.fromData(s)))}toData(){return{bitarray:this.bitarray.toData(),mode_infos:this.modeInfos.map(r=>r.toData())}}static fromProto(r){return new e(ls.fromProto(r.bitarray),r.modeInfos.map(s=>c.fromProto(s)))}toProto(){return at.ModeInfo_Multi.fromPartial({bitarray:this.bitarray.toProto(),modeInfos:this.modeInfos.map(r=>r.toProto())})}}c.Multi=e})(F||(F={}));class qa extends m{constructor(t,e,o){super(),this.tx=t,this.blobs=e,this.type_id=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{tx:e,blobs:o,type_id:r}=t;return new qa(et.fromData(e),o.map(ua.fromData),r)}toData(){const{tx:t,blobs:e,type_id:o}=this;return{tx:t.toData(),blobs:e.map(r=>r.toData()),type_id:o}}static fromProto(t){return new qa(et.fromBuffer(Buffer.from(t.tx)),t.blobs.map(ua.fromProto),t.typeId)}toProto(){const{tx:t,blobs:e,type_id:o}=this;return ai.BlobTx.fromPartial({tx:t.toBytes(),blobs:e.map(r=>r.toProto()),typeId:o})}toBytes(){return ai.BlobTx.encode(this.toProto()).finish()}}class Es extends m{constructor(t,e){super(),this.max_bytes=t,this.max_gas=e}static fromAmino(t){const{max_bytes:e,max_gas:o}=t;return new Es(parseInt(e),parseInt(o))}toAmino(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toFixed(),max_gas:e.toFixed()}}static fromData(t){const{max_bytes:e,max_gas:o}=t;return new Es(parseInt(e),parseInt(o))}toData(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toFixed(),max_gas:e.toFixed()}}static fromProto(t){return new Es(Number(t.maxBytes),Number(t.maxGas))}toProto(){const{max_bytes:t,max_gas:e}=this;return La.BlockParams.fromPartial({maxBytes:BigInt(t),maxGas:BigInt(e)})}}class Ns extends m{constructor(t,e,o){super(),this.max_age_num_blocks=t,this.max_age_duration=e,this.max_bytes=o}static fromAmino(t){const{max_age_num_blocks:e,max_age_duration:o,max_bytes:r}=t;return new Ns(parseInt(e),x.fromAmino(o),parseInt(r))}toAmino(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:o}=this;return{max_age_num_blocks:t.toFixed(),max_age_duration:e.toAmino(),max_bytes:o.toFixed()}}static fromData(t){const{max_age_num_blocks:e,max_age_duration:o,max_bytes:r}=t;return new Ns(parseInt(e),x.fromData(o),parseInt(r))}toData(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:o}=this;return{max_age_num_blocks:t.toFixed(),max_age_duration:e.toData(),max_bytes:o.toFixed()}}static fromProto(t){return new Ns(Number(t.maxAgeNumBlocks),x.fromProto(t.maxAgeDuration),Number(t.maxBytes))}toProto(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:o}=this;return La.EvidenceParams.fromPartial({maxAgeNumBlocks:BigInt(t),maxAgeDuration:e.toProto(),maxBytes:BigInt(o)})}}class Os extends m{constructor(t){super(),this.pub_key_types=t}static fromAmino(t){return new Os(t.pub_key_types)}toAmino(){return{pub_key_types:this.pub_key_types}}static fromData(t){return new Os(t.pub_key_types)}toData(){return{pub_key_types:this.pub_key_types}}static fromProto(t){return new Os(t.pubKeyTypes)}toProto(){return La.ValidatorParams.fromPartial({pubKeyTypes:this.pub_key_types})}}class Fs extends m{constructor(t){super(),this.vote_extensions_enable_height=t}static fromAmino(t){return new Fs(parseInt(t.vote_extensions_enable_height))}toAmino(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromData(t){return new Fs(parseInt(t.vote_extensions_enable_height))}toData(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromProto(t){return new Fs(Number(t.voteExtensionsEnableHeight))}toProto(){return La.ABCIParams.fromPartial({voteExtensionsEnableHeight:BigInt(this.vote_extensions_enable_height)})}}class eo extends m{constructor(t,e,o,r,s){super(),this.authority=t,this.block=e,this.evidence=o,this.validator=r,this.abci=s}static fromAmino(t){const{value:{authority:e,block:o,evidence:r,validator:s,abci:n}}=t;return new eo(e,o?Es.fromAmino(o):void 0,r?Ns.fromAmino(r):void 0,s?Os.fromAmino(s):void 0,n?Fs.fromAmino(n):void 0)}toAmino(){const{authority:t,block:e,evidence:o,validator:r,abci:s}=this;return{type:"cosmos-sdk/x/consensus/MsgUpdateParams",value:{authority:t,block:e==null?void 0:e.toAmino(),evidence:o==null?void 0:o.toAmino(),validator:r==null?void 0:r.toAmino(),abci:s==null?void 0:s.toAmino()}}}static fromData(t){const{authority:e,block:o,evidence:r,validator:s,abci:n}=t;return new eo(e,o?Es.fromData(o):void 0,r?Ns.fromData(r):void 0,s?Os.fromData(s):void 0,n?Fs.fromData(n):void 0)}toData(){const{authority:t,block:e,evidence:o,validator:r,abci:s}=this;return{"@type":"/cosmos.consensus.v1.MsgUpdateParams",authority:t,block:e==null?void 0:e.toData(),evidence:o==null?void 0:o.toData(),validator:r==null?void 0:r.toData(),abci:s==null?void 0:s.toData()}}static fromProto(t){return new eo(t.authority,Es.fromProto(t.block),Ns.fromProto(t.evidence),Os.fromProto(t.validator),Fs.fromProto(t.abci))}toProto(){const{authority:t,block:e,evidence:o,validator:r,abci:s}=this;return ti.MsgUpdateParams.fromPartial({authority:t,block:e==null?void 0:e.toProto(),evidence:o==null?void 0:o.toProto(),validator:r==null?void 0:r.toProto(),abci:s==null?void 0:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.consensus.v1.MsgUpdateParams",value:ti.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return eo.fromProto(ti.MsgUpdateParams.decode(t.value))}}class oo extends m{constructor(t,e,o){super(),this.sender=t,this.invariant_module_name=e,this.invariant_route=o}static fromAmino(t){const{value:{sender:e,invariant_module_name:o,invariant_route:r}}=t;return new oo(e,o,r)}toAmino(){throw new Error("MsgVerifyInvarant is not allowed to send")}static fromData(t){const{sender:e,invariant_module_name:o,invariant_route:r}=t;return new oo(e,o,r)}toData(){const{sender:t,invariant_module_name:e,invariant_route:o}=this;return{"@type":"/cosmos.crisis.v1beta1.MsgVerifyInvariant",sender:t,invariant_module_name:e,invariant_route:o}}static fromProto(t){return new oo(t.sender,t.invariantModuleName,t.invariantRoute)}toProto(){throw new Error("MsgVerifyInvarant is not allowed to send")}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgVerifyInvariant",value:ya.MsgVerifyInvariant.encode(this.toProto()).finish()})}static unpackAny(t){return oo.fromProto(ya.MsgVerifyInvariant.decode(t.value))}}class ro extends m{constructor(t,e){super(),this.authority=t,this.constant_fee=e}static fromAmino(t){const{value:{authority:e,constant_fee:o}}=t;return new ro(e,P.fromAmino(o))}toAmino(){const{authority:t,constant_fee:e}=this;return{type:"cosmos-sdk/x/crisis/MsgUpdateParams",value:{authority:t,constant_fee:e.toAmino()}}}static fromData(t){const{authority:e,constant_fee:o}=t;return new ro(e,P.fromData(o))}toData(){const{authority:t,constant_fee:e}=this;return{"@type":"/cosmos.crisis.v1beta1.MsgUpdateParams",authority:t,constant_fee:e.toData()}}static fromProto(t){return new ro(t.authority,P.fromProto(t.constantFee))}toProto(){const{authority:t,constant_fee:e}=this;return ya.MsgUpdateParams.fromPartial({authority:t,constantFee:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgUpdateParams",value:ya.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ro.fromProto(ya.MsgUpdateParams.decode(t.value))}}class so extends m{constructor(t,e){super(),this.delegator_address=t,this.withdraw_address=e}static fromAmino(t){const{value:{delegator_address:e,withdraw_address:o}}=t;return new so(e,o)}toAmino(){const{delegator_address:t,withdraw_address:e}=this;return{type:"cosmos-sdk/MsgModifyWithdrawAddress",value:{delegator_address:t,withdraw_address:e}}}static fromData(t){const{delegator_address:e,withdraw_address:o}=t;return new so(e,o)}toData(){const{delegator_address:t,withdraw_address:e}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",delegator_address:t,withdraw_address:e}}static fromProto(t){return new so(t.delegatorAddress,t.withdrawAddress)}toProto(){const{delegator_address:t,withdraw_address:e}=this;return ct.MsgSetWithdrawAddress.fromPartial({delegatorAddress:t,withdrawAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",value:ct.MsgSetWithdrawAddress.encode(this.toProto()).finish()})}static unpackAny(t){return so.fromProto(ct.MsgSetWithdrawAddress.decode(t.value))}}class no extends m{constructor(t,e){super(),this.delegator_address=t,this.validator_address=e}static fromAmino(t){const{value:{delegator_address:e,validator_address:o}}=t;return new no(e,o)}toAmino(){const{delegator_address:t,validator_address:e}=this;return{type:"cosmos-sdk/MsgWithdrawDelegationReward",value:{delegator_address:t,validator_address:e}}}static fromData(t){const{delegator_address:e,validator_address:o}=t;return new no(e,o)}toData(){const{delegator_address:t,validator_address:e}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",delegator_address:t,validator_address:e}}static fromProto(t){return new no(t.delegatorAddress,t.validatorAddress)}toProto(){const{delegator_address:t,validator_address:e}=this;return ct.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t,validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:ct.MsgWithdrawDelegatorReward.encode(this.toProto()).finish()})}static unpackAny(t){return no.fromProto(ct.MsgWithdrawDelegatorReward.decode(t.value))}}class ao extends m{constructor(t){super(),this.validator_address=t}static fromAmino(t){const{value:{validator_address:e}}=t;return new ao(e)}toAmino(){const{validator_address:t}=this;return{type:"cosmos-sdk/MsgWithdrawValidatorCommission",value:{validator_address:t}}}static fromData(t){const{validator_address:e}=t;return new ao(e)}toData(){const{validator_address:t}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",validator_address:t}}static fromProto(t){return new ao(t.validatorAddress)}toProto(){const{validator_address:t}=this;return ct.MsgWithdrawValidatorCommission.fromPartial({validatorAddress:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",value:ct.MsgWithdrawValidatorCommission.encode(this.toProto()).finish()})}static unpackAny(t){return ao.fromProto(ct.MsgWithdrawValidatorCommission.decode(t.value))}}class io extends m{constructor(e,o){super();p(this,"amount");this.depositor=e,this.amount=new u(o)}static fromAmino(e){const{value:{depositor:o,amount:r}}=e;return new io(o,u.fromAmino(r))}toAmino(){const{depositor:e,amount:o}=this;return{type:"cosmos-sdk/MsgFundCommunityPool",value:{depositor:e,amount:o.toAmino()}}}static fromData(e){const{depositor:o,amount:r}=e;return new io(o,u.fromData(r))}toData(){const{depositor:e,amount:o}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgFundCommunityPool",depositor:e,amount:o.toData()}}static fromProto(e){return new io(e.depositor,u.fromProto(e.amount))}toProto(){const{depositor:e,amount:o}=this;return ct.MsgFundCommunityPool.fromPartial({amount:o.toProto(),depositor:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",value:ct.MsgFundCommunityPool.encode(this.toProto()).finish()})}static unpackAny(e){return io.fromProto(ct.MsgFundCommunityPool.decode(e.value))}}class Ts extends m{constructor(t,e){super(),this.denom=t,this.weight=e}static fromAmino(t){const{denom:e,weight:o}=t;return new Ts(e,o)}toAmino(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromData(t){const{denom:e,weight:o}=t;return new Ts(e,o)}toData(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromProto(t){return new Ts(t.denom,t.weight)}toProto(){const{denom:t,weight:e}=this;return Bi.RewardWeight.fromPartial({denom:t,weight:e})}}class ps extends m{constructor(t,e,o){super(),this.community_tax=t,this.withdraw_addr_enabled=e,this.reward_weights=o}static fromAmino(t){const{value:{community_tax:e,withdraw_addr_enabled:o,reward_weights:r}}=t;return new ps(e,o,r.map(Ts.fromAmino))}toAmino(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:o}=this;return{type:"distribution/Params",value:{community_tax:t,withdraw_addr_enabled:e,reward_weights:o.map(r=>r.toAmino())}}}static fromData(t){const{community_tax:e,withdraw_addr_enabled:o,reward_weights:r}=t;return new ps(e,o,r.map(Ts.fromData))}toData(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:o}=this;return{"@type":"/initia.distribution.v1.Params",community_tax:t,withdraw_addr_enabled:e,reward_weights:o.map(r=>r.toData())}}static fromProto(t){return new ps(t.communityTax,t.withdrawAddrEnabled,t.rewardWeights.map(Ts.fromProto))}toProto(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:o}=this;return Bi.Params.fromPartial({communityTax:t,withdrawAddrEnabled:e,rewardWeights:o.map(r=>r.toProto())})}}class co extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new co(e,ps.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"distribution/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new co(e,ps.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.distribution.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new co(t.authority,ps.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Gn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgUpdateParams",value:Gn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return co.fromProto(Gn.MsgUpdateParams.decode(t.value))}}class mo extends m{constructor(e,o,r){super();p(this,"amount");this.authority=e,this.recipient=o,this.amount=new u(r)}static fromAmino(e){const{value:{authority:o,recipient:r,amount:s}}=e;return new mo(o,r,u.fromAmino(s))}toAmino(){const{authority:e,recipient:o,amount:r}=this;return{type:"cosmos-sdk/distr/MsgCommunityPoolSpend",value:{authority:e,recipient:o,amount:r.toAmino()}}}static fromData(e){const{authority:o,recipient:r,amount:s}=e;return new mo(o,r,u.fromData(s))}toData(){const{authority:e,recipient:o,amount:r}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",authority:e,recipient:o,amount:r.toData()}}static fromProto(e){return new mo(e.authority,e.recipient,u.fromProto(e.amount))}toProto(){const{authority:e,recipient:o,amount:r}=this;return ct.MsgCommunityPoolSpend.fromPartial({authority:e,recipient:o,amount:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",value:ct.MsgCommunityPoolSpend.encode(this.toProto()).finish()})}static unpackAny(e){return mo.fromProto(ct.MsgCommunityPoolSpend.decode(e.value))}}class uo extends m{constructor(e,o,r,s){super();p(this,"amount");this.depositor=e,this.validator_address=o,this.denom=r,this.amount=new u(s)}static fromAmino(e){const{value:{depositor:o,validator_address:r,denom:s,amount:n}}=e;return new uo(o,r,s,u.fromAmino(n))}toAmino(){const{depositor:e,validator_address:o,denom:r,amount:s}=this;return{type:"distr/MsgDepositValidatorRewardsPool",value:{depositor:e,validator_address:o,denom:r,amount:s.toAmino()}}}static fromData(e){const{depositor:o,validator_address:r,denom:s,amount:n}=e;return new uo(o,r,s,u.fromData(n))}toData(){const{depositor:e,validator_address:o,denom:r,amount:s}=this;return{"@type":"/initia.distribution.v1.MsgDepositValidatorRewardsPool",depositor:e,validator_address:o,denom:r,amount:s.toData()}}static fromProto(e){return new uo(e.depositor,e.validatorAddress,e.denom,u.fromProto(e.amount))}toProto(){const{depositor:e,validator_address:o,denom:r,amount:s}=this;return Gn.MsgDepositValidatorRewardsPool.fromPartial({depositor:e,validatorAddress:o,denom:r,amount:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgDepositValidatorRewardsPool",value:Gn.MsgDepositValidatorRewardsPool.encode(this.toProto()).finish()})}static unpackAny(e){return uo.fromProto(Gn.MsgDepositValidatorRewardsPool.decode(e.value))}}class lo extends m{constructor(t,e,o,r){super(),this.height=t,this.time=e,this.power=o,this.consensus_address=r}static fromAmino(t){const{value:{height:e,time:o,power:r,consensus_address:s}}=t;return new lo(parseInt(e),new Date(o),parseInt(r),s)}toAmino(){const{height:t,time:e,power:o,consensus_address:r}=this;return{type:"cosmos-sdk/Equivocation",value:{height:t.toFixed(),time:e.toISOString(),power:o.toFixed(),consensus_address:r}}}static fromData(t){const{height:e,time:o,power:r,consensus_address:s}=t;return new lo(parseInt(e),new Date(o),parseInt(r),s)}toData(){const{height:t,time:e,power:o,consensus_address:r}=this;return{"@type":"/cosmos.evidence.v1beta1.Equivocation",height:t.toFixed(),time:e.toISOString(),power:o.toFixed(),consensus_address:r}}static fromProto(t){return new lo(Number(t.height),t.time,Number(t.power),t.consensusAddress)}toProto(){const{height:t,time:e,power:o,consensus_address:r}=this;return oi.Equivocation.fromPartial({height:BigInt(t),time:e,power:BigInt(o),consensusAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.Equivocation",value:oi.Equivocation.encode(this.toProto()).finish()})}static unpackAny(t){return lo.fromProto(oi.Equivocation.decode(t.value))}}exports.Evidence=void 0;(c=>{function t(r){switch(r.type){case"cosmos-sdk/Equivocation":return lo.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmos.evidence.v1beta1.Equivocation":return lo.fromData(r)}}c.fromData=e;function o(r){const s=r.typeUrl;switch(s){case"/cosmos.evidence.v1beta1.Equivocation":return lo.unpackAny(r)}throw new Error(`Evidence type ${s} not recognized`)}c.fromProto=o})(exports.Evidence||(exports.Evidence={}));class po extends m{constructor(t,e){super(),this.submitter=t,this.evidence=e}static fromAmino(t){const{value:{submitter:e,evidence:o}}=t;return new po(e,exports.Evidence.fromAmino(o))}toAmino(){const{submitter:t,evidence:e}=this;return{type:"cosmos-sdk/MsgSubmitEvidence",value:{submitter:t,evidence:e.toAmino()}}}static fromData(t){const{submitter:e,evidence:o}=t;return new po(e,exports.Evidence.fromData(o))}toData(){const{submitter:t,evidence:e}=this;return{"@type":"/cosmos.evidence.v1beta1.MsgSubmitEvidence",submitter:t,evidence:e.toData()}}static fromProto(t){return new po(t.submitter,exports.Evidence.fromProto(t.evidence))}toProto(){const{submitter:t,evidence:e}=this;return ei.MsgSubmitEvidence.fromPartial({submitter:t,evidence:e.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.MsgSubmitEvidence",value:ei.MsgSubmitEvidence.encode(this.toProto()).finish()})}static unpackAny(t){return po.fromProto(ei.MsgSubmitEvidence.decode(t.value))}}class ht extends m{constructor(t,e){super(),this.address=t,this.storage_keys=e}static fromAmino(t){const{address:e,storage_keys:o}=t;return new ht(e,o)}toAmino(){const{address:t,storage_keys:e}=this;return{address:t,storage_keys:e}}static fromData(t){const{address:e,storage_keys:o}=t;return new ht(e,o)}toData(){const{address:t,storage_keys:e}=this;return{address:t,storage_keys:e}}static fromProto(t){return new ht(t.address,t.storageKeys)}toProto(){const{address:t,storage_keys:e}=this;return Ei.AccessTuple.fromPartial({address:t,storageKeys:e})}}class ho extends m{constructor(t,e,o,r){super(),this.sender=t,this.code=e,this.value=o,this.access_list=r}static fromAmino(t){const{value:{sender:e,code:o,value:r,access_list:s}}=t;return new ho(e,o,r,s.map(ht.fromAmino))}toAmino(){const{sender:t,code:e,value:o,access_list:r}=this;return{type:"evm/MsgCreate",value:{sender:t,code:e,value:o,access_list:r.map(s=>s.toAmino())}}}static fromData(t){const{sender:e,code:o,value:r,access_list:s}=t;return new ho(e,o,r,s.map(ht.fromData))}toData(){const{sender:t,code:e,value:o,access_list:r}=this;return{"@type":"/minievm.evm.v1.MsgCreate",sender:t,code:e,value:o,access_list:r.map(s=>s.toData())}}static fromProto(t){return new ho(t.sender,t.code,t.value,t.accessList.map(ht.fromProto))}toProto(){const{sender:t,code:e,value:o,access_list:r}=this;return St.MsgCreate.fromPartial({sender:t,code:e,value:o,accessList:r.map(s=>s.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate",value:St.MsgCreate.encode(this.toProto()).finish()})}static unpackAny(t){return ho.fromProto(St.MsgCreate.decode(t.value))}}class fo extends m{constructor(t,e,o,r,s){super(),this.sender=t,this.code=e,this.salt=o,this.value=r,this.access_list=s}static fromAmino(t){const{value:{sender:e,code:o,salt:r,value:s,access_list:n}}=t;return new fo(e,o,parseInt(r),s,n.map(ht.fromAmino))}toAmino(){const{sender:t,code:e,salt:o,value:r,access_list:s}=this;return{type:"evm/MsgCreate2",value:{sender:t,code:e,salt:o.toFixed(),value:r,access_list:s.map(n=>n.toAmino())}}}static fromData(t){const{sender:e,code:o,salt:r,value:s,access_list:n}=t;return new fo(e,o,parseInt(r),s,n.map(ht.fromData))}toData(){const{sender:t,code:e,salt:o,value:r,access_list:s}=this;return{"@type":"/minievm.evm.v1.MsgCreate2",sender:t,code:e,salt:o.toFixed(),value:r,access_list:s.map(n=>n.toData())}}static fromProto(t){return new fo(t.sender,t.code,Number(t.salt),t.value,t.accessList.map(ht.fromProto))}toProto(){const{sender:t,code:e,salt:o,value:r,access_list:s}=this;return St.MsgCreate2.fromPartial({sender:t,code:e,salt:BigInt(o),value:r,accessList:s.map(n=>n.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate2",value:St.MsgCreate2.encode(this.toProto()).finish()})}static unpackAny(t){return fo.fromProto(St.MsgCreate2.decode(t.value))}}class go extends m{constructor(t,e,o,r,s){super(),this.sender=t,this.contract_addr=e,this.input=o,this.value=r,this.access_list=s}static fromAmino(t){const{value:{sender:e,contract_addr:o,input:r,value:s,access_list:n}}=t;return new go(e,o,r,s,n.map(ht.fromAmino))}toAmino(){const{sender:t,contract_addr:e,input:o,value:r,access_list:s}=this;return{type:"evm/MsgCall",value:{sender:t,contract_addr:e,input:o,value:r,access_list:s.map(n=>n.toAmino())}}}static fromData(t){const{sender:e,contract_addr:o,input:r,value:s,access_list:n}=t;return new go(e,o,r,s,n.map(ht.fromData))}toData(){const{sender:t,contract_addr:e,input:o,value:r,access_list:s}=this;return{"@type":"/minievm.evm.v1.MsgCall",sender:t,contract_addr:e,input:o,value:r,access_list:s.map(n=>n.toData())}}static fromProto(t){return new go(t.sender,t.contractAddr,t.input,t.value,t.accessList.map(ht.fromProto))}toProto(){const{sender:t,contract_addr:e,input:o,value:r,access_list:s}=this;return St.MsgCall.fromPartial({sender:t,contractAddr:e,input:o,value:r,accessList:s.map(n=>n.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCall",value:St.MsgCall.encode(this.toProto()).finish()})}static unpackAny(t){return go.fromProto(St.MsgCall.decode(t.value))}}class hs extends m{constructor(t,e,o,r,s,n,a){super(),this.extra_eips=t,this.allowed_publishers=e,this.allow_custom_erc20=o,this.allowed_custom_erc20s=r,this.fee_denom=s,this.gas_refund_ratio=n,this.num_retain_block_hashes=a}static fromAmino(t){const{extra_eips:e,allowed_publishers:o,allow_custom_erc20:r,allowed_custom_erc20s:s,fee_denom:n,gas_refund_ratio:a,num_retain_block_hashes:i}=t;return new hs(e.map(parseInt),o,r,s,n,a,parseInt(i))}toAmino(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:o,allowed_custom_erc20s:r,fee_denom:s,gas_refund_ratio:n,num_retain_block_hashes:a}=this;return{extra_eips:t.map(i=>i.toFixed()),allowed_publishers:e,allow_custom_erc20:o,allowed_custom_erc20s:r,fee_denom:s,gas_refund_ratio:n,num_retain_block_hashes:a.toFixed()}}static fromData(t){const{extra_eips:e,allowed_publishers:o,allow_custom_erc20:r,allowed_custom_erc20s:s,fee_denom:n,gas_refund_ratio:a,num_retain_block_hashes:i}=t;return new hs(e.map(parseInt),o,r,s,n,a,parseInt(i))}toData(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:o,allowed_custom_erc20s:r,fee_denom:s,gas_refund_ratio:n,num_retain_block_hashes:a}=this;return{extra_eips:t.map(i=>i.toFixed()),allowed_publishers:e,allow_custom_erc20:o,allowed_custom_erc20s:r,fee_denom:s,gas_refund_ratio:n,num_retain_block_hashes:a.toFixed()}}static fromProto(t){return new hs(t.extraEips.map(e=>Number(e)),t.allowedPublishers,t.allowCustomErc20,t.allowedCustomErc20s,t.feeDenom,t.gasRefundRatio,Number(t.numRetainBlockHashes))}toProto(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:o,allowed_custom_erc20s:r,fee_denom:s,gas_refund_ratio:n,num_retain_block_hashes:a}=this;return Ei.Params.fromPartial({extraEips:t.map(i=>BigInt(i)),allowedPublishers:e,allowCustomErc20:o,allowedCustomErc20s:r,feeDenom:s,gasRefundRatio:n,numRetainBlockHashes:BigInt(a)})}}class yo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new yo(e,hs.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"evm/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new yo(e,hs.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/minievm.evm.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new yo(t.authority,hs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return St.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgUpdateParams",value:St.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return yo.fromProto(St.MsgUpdateParams.decode(t.value))}}class it extends m{constructor(e,o){super();p(this,"spend_limit");this.expiration=o;let r=!1;if(e&&(this.spend_limit=new u(e),this.spend_limit.map(s=>{k(s.amount).isLessThanOrEqualTo(0)&&(r=!0)})),e&&r)throw new Error("spend_limit must be positive")}static fromAmino(e){const{value:{spend_limit:o,expiration:r}}=e;return new it(o?u.fromAmino(o):void 0,r?new Date(r):void 0)}toAmino(){const{spend_limit:e,expiration:o}=this;return{type:"cosmos-sdk/BasicAllowance",value:{spend_limit:e==null?void 0:e.toAmino(),expiration:o==null?void 0:o.toISOString()}}}static fromData(e){const{spend_limit:o,expiration:r}=e;return new it(o?u.fromData(o):void 0,r?new Date(r):void 0)}toData(){const{spend_limit:e,expiration:o}=this;return{"@type":"/cosmos.feegrant.v1beta1.BasicAllowance",spend_limit:e==null?void 0:e.toData(),expiration:o==null?void 0:o.toISOString()}}static fromProto(e){return new it(u.fromProto(e.spendLimit),e.expiration)}toProto(){const{spend_limit:e,expiration:o}=this;return is.BasicAllowance.fromPartial({expiration:o,spendLimit:e==null?void 0:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",value:is.BasicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return it.fromProto(is.BasicAllowance.decode(e.value))}}class xt extends m{constructor(e,o,r,s,n){super();p(this,"period_spend_limit");p(this,"period_can_spend");this.basic=e,this.period=o,this.period_reset=n,this.period_spend_limit=new u(r),this.period_can_spend=new u(s)}static fromAmino(e){const{value:{basic:o,period:r,period_spend_limit:s,period_can_spend:n,period_reset:a}}=e;return new xt(it.fromAmino(o),x.fromAmino(r),u.fromAmino(s),u.fromAmino(n),new Date(a))}toAmino(){const{basic:e,period:o,period_spend_limit:r,period_can_spend:s,period_reset:n}=this;return{type:"cosmos-sdk/PeriodicAllowance",value:{basic:e.toAmino(),period:o.toAmino(),period_spend_limit:r.toAmino(),period_can_spend:s.toAmino(),period_reset:n.toISOString()}}}static fromData(e){const{basic:o,period:r,period_spend_limit:s,period_can_spend:n,period_reset:a}=e;return new xt(it.fromData(o),x.fromData(r),u.fromData(s),u.fromData(n),new Date(a))}toData(){const{basic:e,period:o,period_spend_limit:r,period_can_spend:s,period_reset:n}=this;return{"@type":"/cosmos.feegrant.v1beta1.PeriodicAllowance",basic:e.toData(),period:o.toData(),period_spend_limit:r.toData(),period_can_spend:s.toData(),period_reset:n.toISOString()}}static fromProto(e){return new xt(it.fromProto(e.basic),x.fromProto(e.period),u.fromProto(e.periodSpendLimit),u.fromProto(e.periodCanSpend),e.periodReset)}toProto(){const{basic:e,period:o,period_spend_limit:r,period_can_spend:s,period_reset:n}=this;return is.PeriodicAllowance.fromPartial({basic:e.toProto(),period:o.toProto(),periodCanSpend:s.toProto(),periodReset:n,periodSpendLimit:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.PeriodicAllowance",value:is.PeriodicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return xt.fromProto(is.PeriodicAllowance.decode(e.value))}}class _o extends m{constructor(t,e){super(),this.allowance=t,this.allowed_messages=e}static fromAmino(t){const{value:{allowance:e,allowed_messages:o}}=t;return new _o(e.type==="cosmos-sdk/BasicAllowance"?it.fromAmino(e):xt.fromAmino(e),o)}toAmino(){const{allowance:t,allowed_messages:e}=this;return{type:"cosmos-sdk/AllowedMsgAllowance",value:{allowance:t.toAmino(),allowed_messages:e}}}static fromData(t){const{allowance:e,allowed_messages:o}=t;return new _o(e["@type"]==="/cosmos.feegrant.v1beta1.BasicAllowance"?it.fromData(e):xt.fromData(e),o)}toData(){const{allowance:t,allowed_messages:e}=this;return{"@type":"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",allowance:t.toData(),allowed_messages:e}}static fromProto(t){const e=t.allowance;return new _o((e==null?void 0:e.typeUrl)==="/cosmos.feegrant.v1beta1.BasicAllowance"?it.unpackAny(e):xt.unpackAny(e),t.allowedMessages)}toProto(){const{allowance:t,allowed_messages:e}=this;return is.AllowedMsgAllowance.fromPartial({allowance:t.packAny(),allowedMessages:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",value:is.AllowedMsgAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return _o.fromProto(is.AllowedMsgAllowance.decode(t.value))}}exports.Allowance=void 0;(c=>{function t(r){switch(r.type){case"cosmos-sdk/BasicAllowance":return it.fromAmino(r);case"cosmos-sdk/PeriodicAllowance":return xt.fromAmino(r);case"cosmos-sdk/AllowedMsgAllowance":return _o.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return xt.fromData(r);case"/cosmos.feegrant.v1beta1.BasicAllowance":return it.fromData(r);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return _o.fromData(r)}}c.fromData=e;function o(r){switch(r.typeUrl){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return xt.unpackAny(r);case"/cosmos.feegrant.v1beta1.BasicAllowance":return it.unpackAny(r);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return _o.unpackAny(r)}throw new Error(`not supported allowance ${r.typeUrl}`)}c.fromProto=o})(exports.Allowance||(exports.Allowance={}));class vo extends m{constructor(t,e,o){super(),this.granter=t,this.grantee=e,this.allowance=o}static fromAmino(t){const{value:{granter:e,grantee:o,allowance:r}}=t;return new vo(e,o,exports.Allowance.fromAmino(r))}toAmino(){const{granter:t,grantee:e,allowance:o}=this;return{type:"cosmos-sdk/MsgGrantAllowance",value:{granter:t,grantee:e,allowance:o.toAmino()}}}static fromData(t){const{granter:e,grantee:o,allowance:r}=t;return new vo(e,o,exports.Allowance.fromData(r))}toData(){const{granter:t,grantee:e,allowance:o}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgGrantAllowance",granter:t,grantee:e,allowance:o.toData()}}static fromProto(t){return new vo(t.granter,t.grantee,exports.Allowance.fromProto(t.allowance))}toProto(){const{granter:t,grantee:e,allowance:o}=this;return Jn.MsgGrantAllowance.fromPartial({allowance:o.packAny(),grantee:e,granter:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",value:Jn.MsgGrantAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return vo.fromProto(Jn.MsgGrantAllowance.decode(t.value))}}class Po extends m{constructor(t,e){super(),this.granter=t,this.grantee=e}static fromAmino(t){const{value:{granter:e,grantee:o}}=t;return new Po(e,o)}toAmino(){const{granter:t,grantee:e}=this;return{type:"cosmos-sdk/MsgRevokeAllowance",value:{granter:t,grantee:e}}}static fromData(t){const{granter:e,grantee:o}=t;return new Po(e,o)}toData(){const{granter:t,grantee:e}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",granter:t,grantee:e}}static fromProto(t){return new Po(t.granter,t.grantee)}toProto(){const{granter:t,grantee:e}=this;return Jn.MsgRevokeAllowance.fromPartial({grantee:e,granter:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",value:Jn.MsgRevokeAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Po.fromProto(Jn.MsgRevokeAllowance.decode(t.value))}}class Ao extends m{constructor(t,e,o){super(),this.signer=t,this.recipient=e,this.channel=o}static fromAmino(t){const{value:{signer:e,recipient:o,channel:r}}=t;return new Ao(e,o,r)}toAmino(){const{signer:t,recipient:e,channel:o}=this;return{type:"noble/forwarding/RegisterAccount",value:{signer:t,recipient:e,channel:o}}}static fromData(t){const{signer:e,recipient:o,channel:r}=t;return new Ao(e,o,r)}toData(){const{signer:t,recipient:e,channel:o}=this;return{"@type":"/noble.forwarding.v1.MsgRegisterAccount",signer:t,recipient:e,channel:o}}static fromProto(t){return new Ao(t.signer,t.recipient,t.channel)}toProto(){const{signer:t,recipient:e,channel:o}=this;return Kn.MsgRegisterAccount.fromPartial({signer:t,recipient:e,channel:o})}packAny(){return l.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgRegisterAccount",value:Kn.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Ao.fromProto(Kn.MsgRegisterAccount.decode(t.value))}}class wo extends m{constructor(t,e){super(),this.signer=t,this.address=e}static fromAmino(t){const{value:{signer:e,address:o}}=t;return new wo(e,o)}toAmino(){const{signer:t,address:e}=this;return{type:"noble/forwarding/ClearAccount",value:{signer:t,address:e}}}static fromData(t){const{signer:e,address:o}=t;return new wo(e,o)}toData(){const{signer:t,address:e}=this;return{"@type":"/noble.forwarding.v1.MsgClearAccount",signer:t,address:e}}static fromProto(t){return new wo(t.signer,t.address)}toProto(){const{signer:t,address:e}=this;return Kn.MsgClearAccount.fromPartial({signer:t,address:e})}packAny(){return l.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgClearAccount",value:Kn.MsgClearAccount.encode(this.toProto()).finish()})}static unpackAny(t){return wo.fromProto(Kn.MsgClearAccount.decode(t.value))}}class bo extends m{constructor(t,e){super(),this.proposal_id=t,this.proposer=e}static fromAmino(t){const{value:{proposal_id:e,proposer:o}}=t;return new bo(parseInt(e),o)}toAmino(){const{proposal_id:t,proposer:e}=this;return{type:"cosmos-sdk/v1/MsgCancelProposal",value:{proposal_id:t.toFixed(),proposer:e}}}static fromData(t){const{proposal_id:e,proposer:o}=t;return new bo(parseInt(e),o)}toData(){const{proposal_id:t,proposer:e}=this;return{"@type":"/cosmos.gov.v1.MsgCancelProposal",proposal_id:t.toFixed(),proposer:e}}static fromProto(t){return new bo(Number(t.proposalId),t.proposer)}toProto(){const{proposal_id:t,proposer:e}=this;return mt.MsgCancelProposal.fromPartial({proposalId:BigInt(t),proposer:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgCancelProposal",value:mt.MsgCancelProposal.encode(this.toProto()).finish()})}static unpackAny(t){return bo.fromProto(mt.MsgCancelProposal.decode(t.value))}}class Do extends m{constructor(e,o,r){super();p(this,"amount");this.proposal_id=e,this.depositor=o,this.amount=new u(r)}static fromAmino(e){const{value:{proposal_id:o,depositor:r,amount:s}}=e;return new Do(parseInt(o),r,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:o,amount:r}=this;return{type:"cosmos-sdk/MsgDeposit",value:{proposal_id:e.toFixed(),depositor:o,amount:r.toAmino()}}}static fromData(e){const{proposal_id:o,depositor:r,amount:s}=e;return new Do(parseInt(o),r,u.fromData(s))}toData(){const{proposal_id:e,depositor:o,amount:r}=this;return{"@type":"/cosmos.gov.v1beta1.MsgDeposit",proposal_id:e.toFixed(),depositor:o,amount:r.toData()}}static fromProto(e){return new Do(Number(e.proposalId),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:o,amount:r}=this;return Ct.MsgDeposit.fromPartial({amount:r.toProto(),depositor:o,proposalId:BigInt(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",value:Ct.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Do.fromProto(Ct.MsgDeposit.decode(e.value))}}class ko extends m{constructor(e,o,r){super();p(this,"amount");this.proposal_id=e,this.depositor=o,this.amount=new u(r)}static fromAmino(e){const{value:{proposal_id:o,depositor:r,amount:s}}=e;return new ko(parseInt(o),r,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:o,amount:r}=this;return{type:"cosmos-sdk/v1/MsgDeposit",value:{proposal_id:e.toFixed(),depositor:o,amount:r.toAmino()}}}static fromData(e){const{proposal_id:o,depositor:r,amount:s}=e;return new ko(parseInt(o),r,u.fromData(s))}toData(){const{proposal_id:e,depositor:o,amount:r}=this;return{"@type":"/cosmos.gov.v1.MsgDeposit",proposal_id:e.toFixed(),depositor:o,amount:r.toData()}}static fromProto(e){return new ko(Number(e.proposalId),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:o,amount:r}=this;return mt.MsgDeposit.fromPartial({amount:r.toProto(),depositor:o,proposalId:BigInt(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgDeposit",value:mt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return ko.fromProto(mt.MsgDeposit.decode(e.value))}}class Mo extends m{constructor(t){super(),this.paramChanges=t}static fromAmino(t){return new Mo((t??[]).map(Rs.fromAmino))}toAmino(){return this.paramChanges.map(t=>t.toAmino())}static fromData(t){return new Mo((t??[]).map(Rs.fromData))}toData(){return this.paramChanges.map(t=>t.toData())}static fromProto(t){return new Mo((t??[]).map(Rs.fromProto))}toProto(){return this.paramChanges.map(t=>t.toProto())}}class Rs extends m{constructor(t,e,o){super(),this.subspace=t,this.key=e,this.value=o}static fromAmino(t){const{subspace:e,key:o,value:r}=t;return new Rs(e,o,r)}toAmino(){const{subspace:t,key:e,value:o}=this;return{subspace:t,key:e,value:o}}static fromData(t){const{subspace:e,key:o,value:r}=t;return new Rs(e,o,r)}toData(){const{subspace:t,key:e,value:o}=this;return{subspace:t,key:e,value:o}}static fromProto(t){return new Rs(t.subspace,t.key,t.value)}toProto(){const{subspace:t,key:e,value:o}=this;return Ea.ParamChange.fromPartial({key:e,subspace:t,value:o})}}class xo extends m{constructor(e,o,r){super();p(this,"changes");this.title=e,this.description=o,Array.isArray(r)?this.changes=Mo.fromData(r):this.changes=r}static fromAmino(e){const{value:{title:o,description:r,changes:s}}=e;return new xo(o,r,Mo.fromAmino(s))}toAmino(){const{title:e,description:o,changes:r}=this;return{type:"cosmos-sdk/ParameterChangeProposal",value:{title:e,description:o,changes:r.toAmino()}}}static fromData(e){const{title:o,description:r,changes:s}=e;return new xo(o,r,Mo.fromData(s))}toData(){const{title:e,description:o,changes:r}=this;return{"@type":"/cosmos.params.v1beta1.ParameterChangeProposal",title:e,description:o,changes:r.toData()}}static fromProto(e){return new xo(e.title,e.description,Mo.fromProto(e.changes))}toProto(){const{title:e,description:o,changes:r}=this;return Ea.ParameterChangeProposal.fromPartial({changes:r.toProto(),description:o,title:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:Ea.ParameterChangeProposal.encode(this.toProto()).finish()})}static unpackAny(e){return xo.fromProto(Ea.ParameterChangeProposal.decode(e.value))}}class Io extends m{constructor(t,e){super(),this.title=t,this.description=e}static fromAmino(t){const{value:{title:e,description:o}}=t;return new Io(e,o)}toAmino(){const{title:t,description:e}=this;return{type:"cosmos-sdk/TextProposal",value:{title:t,description:e}}}static fromData(t){const{title:e,description:o}=t;return new Io(e,o)}toData(){const{title:t,description:e}=this;return{"@type":"/cosmos.gov.v1beta1.TextProposal",title:t,description:e}}static fromProto(t){return new Io(t.title,t.description)}toProto(){const{title:t,description:e}=this;return Na.TextProposal.fromPartial({description:e,title:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:Na.TextProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Io.fromProto(Na.TextProposal.decode(t.value))}}exports.Content=void 0;(c=>{function t(r){switch(r.type){case"cosmos-sdk/TextProposal":return Io.fromAmino(r);case"cosmos-sdk/ParameterChangeProposal":return xo.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmos.gov.v1beta1.TextProposal":return Io.fromData(r);case"/cosmos.params.v1beta1.ParameterChangeProposal":return xo.fromData(r)}}c.fromData=e;function o(r){const s=r.typeUrl;switch(s){case"/cosmos.gov.v1beta1.TextProposal":return Io.unpackAny(r);case"/cosmos.params.v1beta1.ParameterChangeProposal":return xo.unpackAny(r)}throw new Error(`Proposal content ${s} not recognized`)}c.fromProto=o})(exports.Content||(exports.Content={}));class fs extends m{constructor(t,e,o,r){super(),this.tally_height=t,this.total_staking_power=e,this.total_vesting_power=o,this.v1_tally_result=r}static fromAmino(t){const{tally_height:e,total_staking_power:o,total_vesting_power:r,v1_tally_result:s}=t;return new fs(parseInt(e),o,r,s)}toAmino(){const{tally_height:t,total_staking_power:e,total_vesting_power:o,v1_tally_result:r}=this;return{tally_height:t.toFixed(),total_staking_power:e,total_vesting_power:o,v1_tally_result:r}}static fromData(t){const{tally_height:e,total_staking_power:o,total_vesting_power:r,v1_tally_result:s}=t;return new fs(parseInt(e),o,r,s)}toData(){const{tally_height:t,total_staking_power:e,total_vesting_power:o,v1_tally_result:r}=this;return{tally_height:t.toFixed(),total_staking_power:e,total_vesting_power:o,v1_tally_result:r}}static fromProto(t){var e,o,r,s;return new fs(Number(t.tallyHeight),t.totalStakingPower,t.totalVestingPower,{yes_count:((e=t.v1TallyResult)==null?void 0:e.yesCount)??"0",abstain_count:((o=t.v1TallyResult)==null?void 0:o.abstainCount)??"0",no_count:((r=t.v1TallyResult)==null?void 0:r.noCount)??"0",no_with_veto_count:((s=t.v1TallyResult)==null?void 0:s.noWithVetoCount)??"0"})}toProto(){const{tally_height:t,total_staking_power:e,total_vesting_power:o,v1_tally_result:r}=this;return za.TallyResult.fromPartial({tallyHeight:BigInt(t),totalStakingPower:e,totalVestingPower:o,v1TallyResult:Rt.TallyResult.fromPartial({yesCount:r.yes_count,abstainCount:r.abstain_count,noCount:r.no_count,noWithVetoCount:r.no_with_veto_count})})}}class ie extends m{constructor(e,o,r,s,n,a,i,d,h,y,_,A,I,C,R,L,V,J){super();p(this,"total_deposit");this.id=e,this.messages=o,this.status=r,this.final_tally_result=s,this.submit_time=n,this.deposit_end_time=a,this.voting_start_time=d,this.voting_end_time=h,this.emergency_start_time=y,this.emergency_next_tally_time=_,this.metadata=A,this.title=I,this.summary=C,this.proposer=R,this.expedited=L,this.emergency=V,this.failed_reason=J,this.total_deposit=new u(i)}static fromAmino(e){const{id:o,messages:r,status:s,final_tally_result:n,submit_time:a,deposit_end_time:i,total_deposit:d,voting_start_time:h,voting_end_time:y,emergency_start_time:_,emergency_next_tally_time:A,metadata:I,title:C,summary:R,proposer:L,expedited:V,emergency:J,failed_reason:g}=e;return new ie(parseInt(o),r.map(exports.Msg.fromAmino),Rt.proposalStatusFromJSON(s),fs.fromAmino(n),new Date(a),new Date(i),u.fromAmino(d),new Date(h),new Date(y),new Date(_),new Date(A),I,C,R,L,V,J,g)}toAmino(){const{id:e,messages:o,status:r,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:i,voting_start_time:d,voting_end_time:h,emergency_start_time:y,emergency_next_tally_time:_,metadata:A,title:I,summary:C,proposer:R,expedited:L,emergency:V,failed_reason:J}=this;return{id:e.toFixed(),messages:o.map(g=>g.toAmino()),status:Rt.proposalStatusToJSON(r),final_tally_result:s.toAmino(),submit_time:n.toISOString(),deposit_end_time:a.toISOString(),total_deposit:i.toAmino(),voting_start_time:d.toISOString(),voting_end_time:h.toISOString(),emergency_start_time:y.toISOString(),emergency_next_tally_time:_.toISOString(),metadata:A,title:I,summary:C,proposer:R,expedited:L,emergency:V,failed_reason:J}}static fromData(e){const{id:o,messages:r,status:s,final_tally_result:n,submit_time:a,deposit_end_time:i,total_deposit:d,voting_start_time:h,voting_end_time:y,emergency_start_time:_,emergency_next_tally_time:A,metadata:I,title:C,summary:R,proposer:L,expedited:V,emergency:J,failed_reason:g}=e;return new ie(parseInt(o),r.map(exports.Msg.fromData),Rt.proposalStatusFromJSON(s),fs.fromData(n),new Date(a),new Date(i),u.fromData(d),new Date(h),new Date(y),new Date(_),new Date(A),I,C,R,L,V,J,g)}toData(){const{id:e,messages:o,status:r,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:i,voting_start_time:d,voting_end_time:h,emergency_start_time:y,emergency_next_tally_time:_,metadata:A,title:I,summary:C,proposer:R,expedited:L,emergency:V,failed_reason:J}=this;return{id:e.toFixed(),messages:o.map(g=>g.toData()),status:Rt.proposalStatusToJSON(r),final_tally_result:s.toData(),submit_time:n.toISOString(),deposit_end_time:a.toISOString(),total_deposit:i.toData(),voting_start_time:d.toISOString(),voting_end_time:h.toISOString(),emergency_start_time:y.toISOString(),emergency_next_tally_time:_.toISOString(),metadata:A,title:I,summary:C,proposer:R,expedited:L,emergency:V,failed_reason:J}}static fromProto(e){return new ie(Number(e.id),e.messages.map(exports.Msg.fromProto),e.status,fs.fromProto(e.finalTallyResult),e.submitTime,e.depositEndTime,u.fromProto(e.totalDeposit),e.votingStartTime,e.votingEndTime,e.emergencyStartTime,e.emergencyNextTallyTime,e.metadata,e.title,e.summary,e.proposer,e.expedited,e.emergency,e.failedReason)}toProto(){const{id:e,messages:o,status:r,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:i,voting_start_time:d,voting_end_time:h,emergency_start_time:y,emergency_next_tally_time:_,metadata:A,title:I,summary:C,proposer:R,expedited:L,emergency:V,failed_reason:J}=this;return za.Proposal.fromPartial({id:BigInt(e),messages:o.map(g=>g.packAny()),status:r,finalTallyResult:s.toProto(),submitTime:n,depositEndTime:a,totalDeposit:i.toProto(),votingStartTime:d,votingEndTime:h,emergencyStartTime:y,emergencyNextTallyTime:_,metadata:A,title:I,summary:C,proposer:R,expedited:L,emergency:V,failedReason:J})}}(c=>{c.Status=Rt.ProposalStatus})(ie||(ie={}));class So extends m{constructor(e,o,r){super();p(this,"initial_deposit");this.content=e,this.proposer=r,this.initial_deposit=new u(o)}static fromAmino(e){const{value:{content:o,initial_deposit:r,proposer:s}}=e;return new So(o?exports.Content.fromAmino(o):void 0,u.fromAmino(r),s)}toAmino(){const{content:e,initial_deposit:o,proposer:r}=this;return{type:"cosmos-sdk/MsgSubmitProposal",value:{content:e==null?void 0:e.toAmino(),initial_deposit:o.toAmino(),proposer:r}}}static fromData(e){const{content:o,initial_deposit:r,proposer:s}=e;return new So(o?exports.Content.fromData(o):void 0,u.fromData(r),s)}toData(){const{content:e,initial_deposit:o,proposer:r}=this;return{"@type":"/cosmos.gov.v1beta1.MsgSubmitProposal",content:e==null?void 0:e.toData(),initial_deposit:o.toData(),proposer:r}}static fromProto(e){return new So(e.content?exports.Content.fromProto(e.content):void 0,u.fromProto(e.initialDeposit),e.proposer)}toProto(){const{content:e,initial_deposit:o,proposer:r}=this;return Ct.MsgSubmitProposal.fromPartial({content:e==null?void 0:e.packAny(),initialDeposit:o.toProto(),proposer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposal",value:Ct.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return So.fromProto(Ct.MsgSubmitProposal.decode(e.value))}}class Co extends m{constructor(e,o,r,s,n,a,i){super();p(this,"initial_deposit");this.messages=e,this.proposer=r,this.metadata=s,this.title=n,this.summary=a,this.expedited=i,this.initial_deposit=new u(o)}static fromAmino(e){const{value:{messages:o,initial_deposit:r,proposer:s,metadata:n,title:a,summary:i,expedited:d}}=e;return new Co(o.map(exports.Msg.fromAmino),u.fromAmino(r),s,n??"",a,i,d)}toAmino(){const{messages:e,initial_deposit:o,proposer:r,metadata:s,title:n,summary:a,expedited:i}=this;return{type:"cosmos-sdk/v1/MsgSubmitProposal",value:{messages:e.map(d=>d.toAmino()),initial_deposit:o.toAmino(),proposer:r,metadata:s&&s!==""?s:void 0,title:n,summary:a,expedited:i}}}static fromData(e){const{messages:o,initial_deposit:r,proposer:s,metadata:n,title:a,summary:i,expedited:d}=e;return new Co(o.map(exports.Msg.fromData),u.fromData(r),s,n,a,i,d)}toData(){const{messages:e,initial_deposit:o,proposer:r,metadata:s,title:n,summary:a,expedited:i}=this;return{"@type":"/cosmos.gov.v1.MsgSubmitProposal",messages:e.map(d=>d.toData()),initial_deposit:o.toData(),proposer:r,metadata:s,title:n,summary:a,expedited:i}}static fromProto(e){return new Co(e.messages.map(exports.Msg.fromProto),u.fromProto(e.initialDeposit),e.proposer,e.metadata,e.title,e.summary,e.expedited)}toProto(){const{messages:e,initial_deposit:o,proposer:r,metadata:s,title:n,summary:a,expedited:i}=this;return mt.MsgSubmitProposal.fromPartial({messages:e.map(d=>d.packAny()),initialDeposit:o.toProto(),proposer:r,metadata:s,title:n,summary:a,expedited:i})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",value:mt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return Co.fromProto(mt.MsgSubmitProposal.decode(e.value))}}class $t extends m{constructor(t,e,o){super(),this.proposal_id=t,this.voter=e,this.option=o}static fromAmino(t){const{value:{proposal_id:e,voter:o,option:r}}=t;return new $t(parseInt(e),o,r)}toAmino(){const{proposal_id:t,voter:e,option:o}=this;return{type:"cosmos-sdk/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:o}}}static fromData(t){const{proposal_id:e,voter:o,option:r}=t;return new $t(parseInt(e),o,r)}toData(){const{proposal_id:t,voter:e,option:o}=this;return{"@type":"/cosmos.gov.v1beta1.MsgVote",proposal_id:t.toFixed(),voter:e,option:o}}static fromProto(t){return new $t(Number(t.proposalId),t.voter,t.option)}toProto(){const{proposal_id:t,voter:e,option:o}=this;return Ct.MsgVote.fromPartial({option:o,proposalId:BigInt(t),voter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVote",value:Ct.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return $t.fromProto(Ct.MsgVote.decode(t.value))}}(c=>{c.Option=Na.VoteOption})($t||($t={}));class Lt extends m{constructor(t,e,o,r){super(),this.proposal_id=t,this.voter=e,this.option=o,this.metadata=r}static fromAmino(t){const{value:{proposal_id:e,voter:o,option:r,metadata:s}}=t;return new Lt(parseInt(e),o,r,s??"")}toAmino(){const{proposal_id:t,voter:e,option:o,metadata:r}=this;return{type:"cosmos-sdk/v1/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:o,metadata:r&&r!==""?r:void 0}}}static fromData(t){const{proposal_id:e,voter:o,option:r,metadata:s}=t;return new Lt(parseInt(e),o,r,s)}toData(){const{proposal_id:t,voter:e,option:o,metadata:r}=this;return{"@type":"/cosmos.gov.v1.MsgVote",proposal_id:t.toFixed(),voter:e,option:o,metadata:r}}static fromProto(t){return new Lt(Number(t.proposalId),t.voter,t.option,t.metadata)}toProto(){const{proposal_id:t,voter:e,option:o,metadata:r}=this;return mt.MsgVote.fromPartial({proposalId:BigInt(t),voter:e,option:o,metadata:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVote",value:mt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return Lt.fromProto(mt.MsgVote.decode(t.value))}}(c=>{c.Option=Rt.VoteOption})(Lt||(Lt={}));class qs extends m{constructor(t,e,o,r){super(),this.proposal_id=t,this.voter=e,this.options=o,this.metadata=r}static fromAmino(t){const{proposal_id:e,voter:o,options:r,metadata:s}=t;return new qs(parseInt(e),o,r.map(n=>ft.fromAmino(n)),s)}toAmino(){const{proposal_id:t,voter:e,options:o,metadata:r}=this;return{proposal_id:t.toFixed(),voter:e,options:o.map(s=>s.toAmino()),metadata:r}}static fromData(t){const{proposal_id:e,voter:o,options:r,metadata:s}=t;return new qs(parseInt(e),o,r.map(n=>ft.fromData(n)),s)}toData(){const{proposal_id:t,voter:e,options:o,metadata:r}=this;return{proposal_id:t.toFixed(),voter:e,options:o.map(s=>s.toData()),metadata:r}}static fromProto(t){return new qs(Number(t.proposalId),t.voter,t.options.map(e=>ft.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:o,metadata:r}=this;return Rt.Vote.fromPartial({options:o.map(s=>s.toProto()),proposalId:BigInt(t),voter:e,metadata:r})}}(c=>{c.Option=Rt.VoteOption})(qs||(qs={}));class ft extends m{constructor(t,e){super(),this.option=t,this.weight=e}static fromAmino(t){const{option:e,weight:o}=t;return new ft(e,parseFloat(o))}toAmino(){const{option:t,weight:e}=this;return{option:t,weight:e.toString()}}static fromData(t){const{option:e,weight:o}=t;return new ft(e,parseFloat(o))}toData(){const{option:t,weight:e}=this;return{option:t,weight:e.toString()}}static fromProto(t){return new ft(t.option,parseFloat(t.weight))}toProto(){const{option:t,weight:e}=this;return Rt.WeightedVoteOption.fromPartial({option:t,weight:e.toString()})}}class Uo extends m{constructor(t,e,o){super(),this.proposal_id=t,this.voter=e,this.options=o}static fromAmino(t){const{value:{proposal_id:e,voter:o,options:r}}=t;return new Uo(parseInt(e),o,r.map(s=>ft.fromAmino(s)))}toAmino(){const{proposal_id:t,voter:e,options:o}=this;return{type:"cosmos-sdk/MsgVoteWeighted",value:{proposal_id:t.toFixed(),voter:e,options:o.map(r=>r.toAmino())}}}static fromData(t){const{proposal_id:e,voter:o,options:r}=t;return new Uo(parseInt(e),o,r.map(s=>ft.fromData(s)))}toData(){const{proposal_id:t,voter:e,options:o}=this;return{"@type":"/cosmos.gov.v1beta1.MsgVoteWeighted",proposal_id:t.toFixed(),voter:e,options:o.map(r=>r.toData())}}static fromProto(t){return new Uo(Number(t.proposalId),t.voter,t.options.map(e=>ft.fromProto(e)))}toProto(){const{proposal_id:t,voter:e,options:o}=this;return Ct.MsgVoteWeighted.fromPartial({options:o.map(r=>r.toProto()),proposalId:BigInt(t),voter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",value:Ct.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return Uo.fromProto(Ct.MsgVoteWeighted.decode(t.value))}}class Bo extends m{constructor(t,e,o,r){super(),this.proposal_id=t,this.voter=e,this.options=o,this.metadata=r}static fromAmino(t){const{value:{proposal_id:e,voter:o,options:r,metadata:s}}=t;return new Bo(parseInt(e),o,r.map(n=>ft.fromAmino(n)),s??"")}toAmino(){const{proposal_id:t,voter:e,options:o,metadata:r}=this;return{type:"cosmos-sdk/v1/MsgVoteWeighted",value:{proposal_id:t.toFixed(),voter:e,options:o.map(s=>s.toAmino()),metadata:r&&r!==""?r:void 0}}}static fromData(t){const{proposal_id:e,voter:o,options:r,metadata:s}=t;return new Bo(parseInt(e),o,r.map(n=>ft.fromData(n)),s)}toData(){const{proposal_id:t,voter:e,options:o,metadata:r}=this;return{"@type":"/cosmos.gov.v1.MsgVoteWeighted",proposal_id:t.toFixed(),voter:e,options:o.map(s=>s.toData()),metadata:r}}static fromProto(t){return new Bo(Number(t.proposalId),t.voter,t.options.map(e=>ft.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:o,metadata:r}=this;return mt.MsgVoteWeighted.fromPartial({options:o.map(s=>s.toProto()),proposalId:BigInt(t),voter:e,metadata:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVoteWeighted",value:mt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return Bo.fromProto(mt.MsgVoteWeighted.decode(t.value))}}class an extends m{constructor(t,e,o){super(),this.module_addr=t,this.module_name=e,this.creator_addr=o}static fromAmino(t){const{module_addr:e,module_name:o,creator_addr:r}=t;return new an(e,o,r)}toAmino(){const{module_addr:t,module_name:e,creator_addr:o}=this;return{module_addr:t,module_name:e,creator_addr:o}}static fromData(t){const{module_addr:e,module_name:o,creator_addr:r}=t;return new an(e,o,r)}toData(){const{module_addr:t,module_name:e,creator_addr:o}=this;return{module_addr:t,module_name:e,creator_addr:o}}static fromProto(t){return new an(t.moduleAddr,t.moduleName,t.creatorAddr)}toProto(){const{module_addr:t,module_name:e,creator_addr:o}=this;return za.Vesting.fromPartial({moduleAddr:t,moduleName:e,creatorAddr:o})}}class gs extends m{constructor(e,o,r,s,n,a,i,d,h,y,_,A,I,C,R,L,V,J,g,f){super();p(this,"min_deposit");p(this,"expedited_min_deposit");p(this,"emergency_min_deposit");this.max_deposit_period=o,this.voting_period=r,this.quorum=s,this.threshold=n,this.veto_threshold=a,this.min_initial_deposit_ratio=i,this.proposal_cancel_ratio=d,this.proposal_cancel_dest=h,this.expedited_voting_period=y,this.expedited_threshold=_,this.burn_vote_quorum=I,this.burn_proposal_deposit_prevote=C,this.burn_vote_veto=R,this.min_deposit_ratio=L,this.emergency_tally_interval=J,this.low_threshold_functions=g,this.vesting=f,this.min_deposit=new u(e),this.expedited_min_deposit=new u(A),this.emergency_min_deposit=new u(V)}static fromAmino(e){const{min_deposit:o,max_deposit_period:r,voting_period:s,quorum:n,threshold:a,veto_threshold:i,min_initial_deposit_ratio:d,proposal_cancel_ratio:h,proposal_cancel_dest:y,expedited_voting_period:_,expedited_threshold:A,expedited_min_deposit:I,burn_vote_quorum:C,burn_proposal_deposit_prevote:R,burn_vote_veto:L,min_deposit_ratio:V,emergency_min_deposit:J,emergency_tally_interval:g,low_threshold_functions:f,vesting:v}=e;return new gs(u.fromAmino(o),x.fromAmino(r),x.fromAmino(s),n,a,i,d,h,y,x.fromAmino(_),A,u.fromAmino(I),C,R,L,V,u.fromAmino(J),x.fromAmino(g),f,v?an.fromAmino(v):void 0)}toAmino(){const{min_deposit:e,max_deposit_period:o,voting_period:r,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:i,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:y,expedited_threshold:_,expedited_min_deposit:A,burn_vote_quorum:I,burn_proposal_deposit_prevote:C,burn_vote_veto:R,min_deposit_ratio:L,emergency_min_deposit:V,emergency_tally_interval:J,low_threshold_functions:g,vesting:f}=this;return{min_deposit:e.toAmino(),max_deposit_period:o.toAmino(),voting_period:r.toAmino(),quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:i,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:y.toAmino(),expedited_threshold:_,expedited_min_deposit:A.toAmino(),burn_vote_quorum:I,burn_proposal_deposit_prevote:C,burn_vote_veto:R,min_deposit_ratio:L,emergency_min_deposit:V.toAmino(),emergency_tally_interval:J.toAmino(),low_threshold_functions:g,vesting:f==null?void 0:f.toAmino()}}static fromData(e){const{min_deposit:o,max_deposit_period:r,voting_period:s,quorum:n,threshold:a,veto_threshold:i,min_initial_deposit_ratio:d,proposal_cancel_ratio:h,proposal_cancel_dest:y,expedited_voting_period:_,expedited_threshold:A,expedited_min_deposit:I,burn_vote_quorum:C,burn_proposal_deposit_prevote:R,burn_vote_veto:L,min_deposit_ratio:V,emergency_min_deposit:J,emergency_tally_interval:g,low_threshold_functions:f,vesting:v}=e;return new gs(u.fromData(o),x.fromData(r),x.fromData(s),n,a,i,d,h,y,x.fromData(_),A,u.fromData(I),C,R,L,V,u.fromData(J),x.fromData(g),f,v?an.fromData(v):void 0)}toData(){const{min_deposit:e,max_deposit_period:o,voting_period:r,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:i,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:y,expedited_threshold:_,expedited_min_deposit:A,burn_vote_quorum:I,burn_proposal_deposit_prevote:C,burn_vote_veto:R,min_deposit_ratio:L,emergency_min_deposit:V,emergency_tally_interval:J,low_threshold_functions:g,vesting:f}=this;return{min_deposit:e.toData(),max_deposit_period:o.toData(),voting_period:r.toData(),quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:i,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:y.toData(),expedited_threshold:_,expedited_min_deposit:A.toData(),burn_vote_quorum:I,burn_proposal_deposit_prevote:C,burn_vote_veto:R,min_deposit_ratio:L,emergency_min_deposit:V.toData(),emergency_tally_interval:J.toData(),low_threshold_functions:g,vesting:f==null?void 0:f.toData()}}static fromProto(e){return new gs(u.fromProto(e.minDeposit),x.fromProto(e.maxDepositPeriod),x.fromProto(e.votingPeriod),e.quorum,e.threshold,e.vetoThreshold,e.minInitialDepositRatio,e.proposalCancelRatio,e.proposalCancelDest,x.fromProto(e.expeditedVotingPeriod),e.expeditedThreshold,u.fromProto(e.expeditedMinDeposit),e.burnVoteQuorum,e.burnProposalDepositPrevote,e.burnVoteVeto,e.minDepositRatio,u.fromProto(e.emergencyMinDeposit),x.fromProto(e.emergencyTallyInterval),e.lowThresholdFunctions,e.vesting?an.fromProto(e.vesting):void 0)}toProto(){const{min_deposit:e,max_deposit_period:o,voting_period:r,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:i,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:y,expedited_threshold:_,expedited_min_deposit:A,burn_vote_quorum:I,burn_proposal_deposit_prevote:C,burn_vote_veto:R,min_deposit_ratio:L,emergency_min_deposit:V,emergency_tally_interval:J,low_threshold_functions:g,vesting:f}=this;return za.Params.fromPartial({minDeposit:e.toProto(),maxDepositPeriod:o.toProto(),votingPeriod:r.toProto(),quorum:s,threshold:n,vetoThreshold:a,minInitialDepositRatio:i,proposalCancelRatio:d,proposalCancelDest:h,expeditedVotingPeriod:y.toProto(),expeditedThreshold:_,expeditedMinDeposit:A.toProto(),burnVoteQuorum:I,burnProposalDepositPrevote:C,burnVoteVeto:R,minDepositRatio:L,emergencyMinDeposit:V.toProto(),emergencyTallyInterval:J.toProto(),lowThresholdFunctions:g,vesting:f==null?void 0:f.toProto()})}}class Eo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new Eo(e,gs.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"gov/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new Eo(e,gs.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.gov.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Eo(t.authority,gs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return ri.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.gov.v1.MsgUpdateParams",value:ri.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Eo.fromProto(ri.MsgUpdateParams.decode(t.value))}}class Zn extends m{constructor(e,o,r){super();p(this,"amount");this.proposal_id=e,this.depositor=o,this.amount=new u(r)}static fromAmino(e){const{proposal_id:o,depositor:r,amount:s}=e;return new Zn(parseInt(o),r,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:o,amount:r}=this;return{proposal_id:e.toFixed(),depositor:o,amount:r.toAmino()}}static fromData(e){const{proposal_id:o,depositor:r,amount:s}=e;return new Zn(parseInt(o),r,u.fromData(s))}toData(){const{proposal_id:e,depositor:o,amount:r}=this;return{proposal_id:e.toFixed(),depositor:o,amount:r.toData()}}static fromProto(e){return new Zn(Number(e.proposalId),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:o,amount:r}=this;return Rt.Deposit.fromPartial({proposalId:BigInt(e),depositor:o,amount:r.toProto()})}}class ta extends m{constructor(t,e){super(),this.group_id=t,this.member=e}static fromAmino(t){const{group_id:e,member:o}=t;return new ta(parseInt(e),$s.fromAmino(o))}toAmino(){const{group_id:t,member:e}=this;return{group_id:t.toFixed(),member:e.toAmino()}}static fromData(t){const{group_id:e,member:o}=t;return new ta(parseInt(e),$s.fromData(o))}toData(){const{group_id:t,member:e}=this;return{group_id:t.toFixed(),member:e.toData()}}static fromProto(t){return new ta(Number(t.groupId),$s.fromProto(t.member))}toProto(){const{group_id:t,member:e}=this;return N.GroupMember.fromPartial({groupId:BigInt(t),member:e.toProto()})}}class $s extends m{constructor(t,e,o,r){super(),this.address=t,this.weight=e,this.metadata=o,this.added_at=r}static fromAmino(t){const{address:e,weight:o,metadata:r,added_at:s}=t;return new $s(e,o,r,new Date(s))}toAmino(){const{address:t,weight:e,metadata:o,added_at:r}=this;return{address:t,weight:e,metadata:o,added_at:r.toISOString()}}static fromData(t){const{address:e,weight:o,metadata:r,added_at:s}=t;return new $s(e,o,r,new Date(s))}toData(){const{address:t,weight:e,metadata:o,added_at:r}=this;return{address:t,weight:e,metadata:o,added_at:r.toISOString()}}static fromProto(t){return new $s(t.address,t.weight,t.metadata,t.addedAt)}toProto(){const{address:t,weight:e,metadata:o,added_at:r}=this;return N.Member.fromPartial({address:t,weight:e,metadata:o,addedAt:r})}}class gt extends m{constructor(t,e,o){super(),this.address=t,this.weight=e,this.metadata=o}static fromAmino(t){const{address:e,weight:o,metadata:r}=t;return new gt(e,o,r)}toAmino(){const{address:t,weight:e,metadata:o}=this;return{address:t,weight:e,metadata:o}}static fromData(t){const{address:e,weight:o,metadata:r}=t;return new gt(e,o,r)}toData(){const{address:t,weight:e,metadata:o}=this;return{address:t,weight:e,metadata:o}}static fromProto(t){return new gt(t.address,t.weight,t.metadata)}toProto(){const{address:t,weight:e,metadata:o}=this;return N.MemberRequest.fromPartial({address:t,weight:e,metadata:o})}}class No extends m{constructor(t,e,o){super(),this.admin=t,this.members=e,this.metadata=o}static fromAmino(t){const{value:{admin:e,members:o,metadata:r}}=t;return new No(e,o.map(gt.fromAmino),r)}toAmino(){const{admin:t,members:e,metadata:o}=this;return{type:"cosmos-sdk/MsgCreateGroup",value:{admin:t,members:e.map(r=>r.toAmino()),metadata:o}}}static fromData(t){const{admin:e,members:o,metadata:r}=t;return new No(e,o.map(gt.fromData),r)}toData(){const{admin:t,members:e,metadata:o}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroup",admin:t,members:e.map(r=>r.toData()),metadata:o}}static fromProto(t){return new No(t.admin,t.members.map(gt.fromProto),t.metadata)}toProto(){const{admin:t,members:e,metadata:o}=this;return M.MsgCreateGroup.fromPartial({admin:t,members:e.map(r=>r.toProto()),metadata:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroup",value:M.MsgCreateGroup.encode(this.toProto()).finish()})}static unpackAny(t){return No.fromProto(M.MsgCreateGroup.decode(t.value))}}class Yt extends m{constructor(t,e){super(),this.voting_period=t,this.min_execution_period=e}static fromAmino(t){const{voting_period:e,min_execution_period:o}=t;return new Yt(x.fromAmino(e),x.fromAmino(o))}toAmino(){const{voting_period:t,min_execution_period:e}=this;return{voting_period:t.toAmino(),min_execution_period:e.toAmino()}}static fromData(t){const{voting_period:e,min_execution_period:o}=t;return new Yt(x.fromData(e),x.fromData(o))}toData(){const{voting_period:t,min_execution_period:e}=this;return{voting_period:t.toData(),min_execution_period:e.toData()}}static fromProto(t){return new Yt(x.fromProto(t.votingPeriod),x.fromProto(t.minExecutionPeriod))}toProto(){const{voting_period:t,min_execution_period:e}=this;return N.DecisionPolicyWindows.fromPartial({votingPeriod:t.toProto(),minExecutionPeriod:e.toProto()})}}class Oo extends m{constructor(t,e){super(),this.threshold=t,this.windows=e}static fromAmino(t){const{value:{threshold:e,windows:o}}=t;return new Oo(e,Yt.fromAmino(o))}toAmino(){const{threshold:t,windows:e}=this;return{type:"cosmos-sdk/ThresholdDecisionPolicy",value:{threshold:t,windows:e.toAmino()}}}static fromData(t){const{threshold:e,windows:o}=t;return new Oo(e,Yt.fromData(o))}toData(){const{threshold:t,windows:e}=this;return{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy",threshold:t,windows:e.toData()}}static fromProto(t){return new Oo(t.threshold,Yt.fromProto(t.windows))}toProto(){const{threshold:t,windows:e}=this;return N.ThresholdDecisionPolicy.fromPartial({threshold:t,windows:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.ThresholdDecisionPolicy",value:N.ThresholdDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Oo.fromProto(N.ThresholdDecisionPolicy.decode(t.value))}}class Fo extends m{constructor(t,e){super(),this.percentage=t,this.windows=e}static fromAmino(t){const{value:{percentage:e,windows:o}}=t;return new Fo(e,Yt.fromAmino(o))}toAmino(){const{percentage:t,windows:e}=this;return{type:"cosmos-sdk/PercentageDecisionPolicy",value:{percentage:t,windows:e.toAmino()}}}static fromData(t){const{percentage:e,windows:o}=t;return new Fo(e,Yt.fromData(o))}toData(){const{percentage:t,windows:e}=this;return{"@type":"/cosmos.group.v1.PercentageDecisionPolicy",percentage:t,windows:e.toData()}}static fromProto(t){return new Fo(t.percentage,Yt.fromProto(t.windows))}toProto(){const{percentage:t,windows:e}=this;return N.PercentageDecisionPolicy.fromPartial({percentage:t,windows:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.PercentageDecisionPolicy",value:N.PercentageDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Fo.fromProto(N.PercentageDecisionPolicy.decode(t.value))}}exports.DecisionPolicy=void 0;(c=>{function t(r){switch(r.type){case"cosmos-sdk/ThresholdDecisionPolicy":return Oo.fromAmino(r);case"cosmos-sdk/PercentageDecisionPolicy":return Fo.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/cosmos.group.v1.ThresholdDecisionPolicy":return Oo.fromData(r);case"/cosmos.group.v1.PercentageDecisionPolicy":return Fo.fromData(r)}}c.fromData=e;function o(r){const s=r.typeUrl;switch(s){case"/cosmos.group.v1.ThresholdDecisionPolicy":return Oo.unpackAny(r);case"/cosmos.group.v1.PercentageDecisionPolicy":return Fo.unpackAny(r)}throw new Error(`DecisionPolicy type ${s} not recognized`)}c.fromProto=o})(exports.DecisionPolicy||(exports.DecisionPolicy={}));class To extends m{constructor(t,e,o,r){super(),this.admin=t,this.group_id=e,this.metadata=o,this.decision_policy=r}static fromAmino(t){const{value:{admin:e,group_id:o,metadata:r,decision_policy:s}}=t;return new To(e,parseInt(o),r,exports.DecisionPolicy.fromAmino(s))}toAmino(){const{admin:t,group_id:e,metadata:o,decision_policy:r}=this;return{type:"cosmos-sdk/MsgCreateGroupPolicy",value:{admin:t,group_id:e.toFixed(),metadata:o,decision_policy:r.toAmino()}}}static fromData(t){const{admin:e,group_id:o,metadata:r,decision_policy:s}=t;return new To(e,parseInt(o),r,exports.DecisionPolicy.fromData(s))}toData(){const{admin:t,group_id:e,metadata:o,decision_policy:r}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroupPolicy",admin:t,group_id:e.toFixed(),metadata:o,decision_policy:r.toData()}}static fromProto(t){return new To(t.admin,Number(t.groupId),t.metadata,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_id:e,metadata:o,decision_policy:r}=this;return M.MsgCreateGroupPolicy.fromPartial({admin:t,groupId:BigInt(e),metadata:o,decisionPolicy:r.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicy",value:M.MsgCreateGroupPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return To.fromProto(M.MsgCreateGroupPolicy.decode(t.value))}}class Ro extends m{constructor(t,e,o,r,s,n){super(),this.admin=t,this.members=e,this.group_metadata=o,this.group_policy_metadata=r,this.group_policy_as_admin=s,this.decision_policy=n}static fromAmino(t){const{value:{admin:e,members:o,group_metadata:r,group_policy_metadata:s,group_policy_as_admin:n,decision_policy:a}}=t;return new Ro(e,o.map(gt.fromAmino),r,s,n,exports.DecisionPolicy.fromAmino(a))}toAmino(){const{admin:t,members:e,group_metadata:o,group_policy_metadata:r,group_policy_as_admin:s,decision_policy:n}=this;return{type:"cosmos-sdk/MsgCreateGroupWithPolicy",value:{admin:t,members:e.map(a=>a.toAmino()),group_metadata:o,group_policy_metadata:r,group_policy_as_admin:s,decision_policy:n.toAmino()}}}static fromData(t){const{admin:e,members:o,group_metadata:r,group_policy_metadata:s,group_policy_as_admin:n,decision_policy:a}=t;return new Ro(e,o.map(gt.fromData),r,s,n,exports.DecisionPolicy.fromData(a))}toData(){const{admin:t,members:e,group_metadata:o,group_policy_metadata:r,group_policy_as_admin:s,decision_policy:n}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroupWithPolicy",admin:t,members:e.map(a=>a.toData()),group_metadata:o,group_policy_metadata:r,group_policy_as_admin:s,decision_policy:n.toData()}}static fromProto(t){return new Ro(t.admin,t.members.map(gt.fromProto),t.groupMetadata,t.groupPolicyMetadata,t.groupPolicyAsAdmin,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,members:e,group_metadata:o,group_policy_metadata:r,group_policy_as_admin:s,decision_policy:n}=this;return M.MsgCreateGroupWithPolicy.fromPartial({admin:t,members:e.map(a=>a.toProto()),groupMetadata:o,groupPolicyMetadata:r,groupPolicyAsAdmin:s,decisionPolicy:n.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicy",value:M.MsgCreateGroupWithPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Ro.fromProto(M.MsgCreateGroupWithPolicy.decode(t.value))}}class qo extends m{constructor(t,e){super(),this.proposal_id=t,this.executor=e}static fromAmino(t){const{value:{proposal_id:e,executor:o}}=t;return new qo(parseInt(e),o)}toAmino(){const{proposal_id:t,executor:e}=this;return{type:"cosmos-sdk/group/MsgExec",value:{proposal_id:t.toFixed(),executor:e}}}static fromData(t){const{proposal_id:e,executor:o}=t;return new qo(parseInt(e),o)}toData(){const{proposal_id:t,executor:e}=this;return{"@type":"/cosmos.group.v1.MsgExec",proposal_id:t.toFixed(),executor:e}}static fromProto(t){return new qo(Number(t.proposalId),t.executor)}toProto(){const{proposal_id:t,executor:e}=this;return M.MsgExec.fromPartial({proposalId:BigInt(t),executor:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgExec",value:M.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return qo.fromProto(M.MsgExec.decode(t.value))}}class zt extends m{constructor(t,e,o,r,s){super(),this.proposal_id=t,this.voter=e,this.option=o,this.metadata=r,this.exec=s}static fromAmino(t){const{value:{proposal_id:e,voter:o,option:r,metadata:s,exec:n}}=t;return new zt(parseInt(e),o,N.voteOptionFromJSON(r),s,M.execFromJSON(n))}toAmino(){const{proposal_id:t,voter:e,option:o,metadata:r,exec:s}=this;return{type:"cosmos-sdk/group/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:N.voteOptionToJSON(o),metadata:r,exec:M.execToJSON(s)}}}static fromData(t){const{proposal_id:e,voter:o,option:r,metadata:s,exec:n}=t;return new zt(parseInt(e),o,N.voteOptionFromJSON(r),s,M.execFromJSON(n))}toData(){const{proposal_id:t,voter:e,option:o,metadata:r,exec:s}=this;return{"@type":"/cosmos.group.v1.MsgVote",proposal_id:t.toFixed(),voter:e,option:N.voteOptionToJSON(o),metadata:r,exec:M.execToJSON(s)}}static fromProto(t){return new zt(Number(t.proposalId),t.voter,t.option,t.metadata,t.exec)}toProto(){const{proposal_id:t,voter:e,option:o,metadata:r,exec:s}=this;return M.MsgVote.fromPartial({proposalId:BigInt(t),voter:e,option:o,metadata:r,exec:s})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgVote",value:M.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return zt.fromProto(M.MsgVote.decode(t.value))}}(c=>{c.Option=N.VoteOption,c.Exec=M.Exec})(zt||(zt={}));class $o extends m{constructor(t,e){super(),this.address=t,this.group_id=e}static fromAmino(t){const{value:{address:e,group_id:o}}=t;return new $o(e,parseInt(o))}toAmino(){const{address:t,group_id:e}=this;return{type:"cosmos-sdk/group/MsgLeaveGroup",value:{address:t,group_id:e.toFixed()}}}static fromData(t){const{address:e,group_id:o}=t;return new $o(e,parseInt(o))}toData(){const{address:t,group_id:e}=this;return{"@type":"/cosmos.group.v1.MsgLeaveGroup",address:t,group_id:e.toFixed()}}static fromProto(t){return new $o(t.address,Number(t.groupId))}toProto(){const{address:t,group_id:e}=this;return M.MsgLeaveGroup.fromPartial({address:t,groupId:BigInt(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgLeaveGroup",value:M.MsgLeaveGroup.encode(this.toProto()).finish()})}static unpackAny(t){return $o.fromProto(M.MsgLeaveGroup.decode(t.value))}}class Gt extends m{constructor(t,e,o,r,s,n,a){super(),this.group_policy_address=t,this.proposers=e,this.metadata=o,this.messages=r,this.exec=s,this.title=n,this.summary=a}static fromAmino(t){const{value:{group_policy_address:e,proposers:o,metadata:r,messages:s,exec:n,title:a,summary:i}}=t;return new Gt(e,o,r,s.map(exports.Msg.fromAmino),M.execFromJSON(n),a,i)}toAmino(){const{group_policy_address:t,proposers:e,metadata:o,messages:r,exec:s,title:n,summary:a}=this;return{type:"cosmos-sdk/group/MsgSubmitProposal",value:{group_policy_address:t,proposers:e,metadata:o,messages:r.map(i=>i.toAmino()),exec:M.execToJSON(s),title:n,summary:a}}}static fromData(t){const{group_policy_address:e,proposers:o,metadata:r,messages:s,exec:n,title:a,summary:i}=t;return new Gt(e,o,r,s.map(exports.Msg.fromData),M.execFromJSON(n),a,i)}toData(){const{group_policy_address:t,proposers:e,metadata:o,messages:r,exec:s,title:n,summary:a}=this;return{"@type":"/cosmos.group.v1.MsgSubmitProposal",group_policy_address:t,proposers:e,metadata:o,messages:r.map(i=>i.toData()),exec:M.execToJSON(s),title:n,summary:a}}static fromProto(t){return new Gt(t.groupPolicyAddress,t.proposers,t.metadata,t.messages.map(exports.Msg.fromProto),t.exec,t.title,t.summary)}toProto(){const{group_policy_address:t,proposers:e,metadata:o,messages:r,exec:s,title:n,summary:a}=this;return M.MsgSubmitProposal.fromPartial({groupPolicyAddress:t,proposers:e,metadata:o,messages:r.map(i=>i.packAny()),exec:s,title:n,summary:a})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgSubmitProposal",value:M.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Gt.fromProto(M.MsgSubmitProposal.decode(t.value))}}(c=>{c.Exec=M.Exec})(Gt||(Gt={}));class Lo extends m{constructor(t,e,o){super(),this.admin=t,this.group_id=e,this.new_admin=o}static fromAmino(t){const{value:{admin:e,group_id:o,new_admin:r}}=t;return new Lo(e,parseInt(o),r)}toAmino(){const{admin:t,group_id:e,new_admin:o}=this;return{type:"cosmos-sdk/MsgUpdateGroupAdmin",value:{admin:t,group_id:e.toFixed(),new_admin:o}}}static fromData(t){const{admin:e,group_id:o,new_admin:r}=t;return new Lo(e,parseInt(o),r)}toData(){const{admin:t,group_id:e,new_admin:o}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupAdmin",admin:t,group_id:e.toFixed(),new_admin:o}}static fromProto(t){return new Lo(t.admin,Number(t.groupId),t.newAdmin)}toProto(){const{admin:t,group_id:e,new_admin:o}=this;return M.MsgUpdateGroupAdmin.fromPartial({admin:t,groupId:BigInt(e),newAdmin:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdmin",value:M.MsgUpdateGroupAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Lo.fromProto(M.MsgUpdateGroupAdmin.decode(t.value))}}class zo extends m{constructor(t,e,o){super(),this.admin=t,this.group_policy_address=e,this.decision_policy=o}static fromAmino(t){const{value:{admin:e,group_policy_address:o,decision_policy:r}}=t;return new zo(e,o,exports.DecisionPolicy.fromAmino(r))}toAmino(){const{admin:t,group_policy_address:e,decision_policy:o}=this;return{type:"cosmos-sdk/MsgUpdateGroupDecisionPolicy",value:{admin:t,group_policy_address:e,decision_policy:o.toAmino()}}}static fromData(t){const{admin:e,group_policy_address:o,decision_policy:r}=t;return new zo(e,o,exports.DecisionPolicy.fromData(r))}toData(){const{admin:t,group_policy_address:e,decision_policy:o}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",admin:t,group_policy_address:e,decision_policy:o.toData()}}static fromProto(t){return new zo(t.admin,t.groupPolicyAddress,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_policy_address:e,decision_policy:o}=this;return M.MsgUpdateGroupPolicyDecisionPolicy.fromPartial({admin:t,groupPolicyAddress:e,decisionPolicy:o.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",value:M.MsgUpdateGroupPolicyDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return zo.fromProto(M.MsgUpdateGroupPolicyDecisionPolicy.decode(t.value))}}class Go extends m{constructor(t,e,o){super(),this.admin=t,this.group_id=e,this.member_updates=o}static fromAmino(t){const{value:{admin:e,group_id:o,member_updates:r}}=t;return new Go(e,parseInt(o),r.map(gt.fromAmino))}toAmino(){const{admin:t,group_id:e,member_updates:o}=this;return{type:"cosmos-sdk/MsgUpdateGroupMembers",value:{admin:t,group_id:e.toFixed(),member_updates:o.map(r=>r.toAmino())}}}static fromData(t){const{admin:e,group_id:o,member_updates:r}=t;return new Go(e,parseInt(o),r.map(gt.fromData))}toData(){const{admin:t,group_id:e,member_updates:o}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMembers",admin:t,group_id:e.toFixed(),member_updates:o.map(r=>r.toData())}}static fromProto(t){return new Go(t.admin,Number(t.groupId),t.memberUpdates.map(gt.fromProto))}toProto(){const{admin:t,group_id:e,member_updates:o}=this;return M.MsgUpdateGroupMembers.fromPartial({admin:t,groupId:BigInt(e),memberUpdates:o.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembers",value:M.MsgUpdateGroupMembers.encode(this.toProto()).finish()})}static unpackAny(t){return Go.fromProto(M.MsgUpdateGroupMembers.decode(t.value))}}class Jo extends m{constructor(t,e,o){super(),this.admin=t,this.group_id=e,this.metadata=o}static fromAmino(t){const{value:{admin:e,group_id:o,metadata:r}}=t;return new Jo(e,parseInt(o),r)}toAmino(){const{admin:t,group_id:e,metadata:o}=this;return{type:"cosmos-sdk/MsgUpdateGroupMetadata",value:{admin:t,group_id:e.toFixed(),metadata:o}}}static fromData(t){const{admin:e,group_id:o,metadata:r}=t;return new Jo(e,parseInt(o),r)}toData(){const{admin:t,group_id:e,metadata:o}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMetadata",admin:t,group_id:e.toFixed(),metadata:o}}static fromProto(t){return new Jo(t.admin,Number(t.groupId),t.metadata)}toProto(){const{admin:t,group_id:e,metadata:o}=this;return M.MsgUpdateGroupMetadata.fromPartial({admin:t,groupId:BigInt(e),metadata:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadata",value:M.MsgUpdateGroupMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Jo.fromProto(M.MsgUpdateGroupMetadata.decode(t.value))}}class Ko extends m{constructor(t,e,o){super(),this.admin=t,this.group_policy_address=e,this.new_admin=o}static fromAmino(t){const{value:{admin:e,group_policy_address:o,new_admin:r}}=t;return new Ko(e,o,r)}toAmino(){const{admin:t,group_policy_address:e,new_admin:o}=this;return{type:"cosmos-sdk/MsgUpdateGroupPolicyAdmin",value:{admin:t,group_policy_address:e,new_admin:o}}}static fromData(t){const{admin:e,group_policy_address:o,new_admin:r}=t;return new Ko(e,o,r)}toData(){const{admin:t,group_policy_address:e,new_admin:o}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",admin:t,group_policy_address:e,new_admin:o}}static fromProto(t){return new Ko(t.admin,t.groupPolicyAddress,t.newAdmin)}toProto(){const{admin:t,group_policy_address:e,new_admin:o}=this;return M.MsgUpdateGroupPolicyAdmin.fromPartial({admin:t,groupPolicyAddress:e,newAdmin:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",value:M.MsgUpdateGroupPolicyAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Ko.fromProto(M.MsgUpdateGroupPolicyAdmin.decode(t.value))}}class Vo extends m{constructor(t,e,o){super(),this.admin=t,this.group_policy_address=e,this.metadata=o}static fromAmino(t){const{value:{admin:e,group_policy_address:o,metadata:r}}=t;return new Vo(e,o,r)}toAmino(){const{admin:t,group_policy_address:e,metadata:o}=this;return{type:"cosmos-sdk/MsgUpdateGroupPolicyMetadata",value:{admin:t,group_policy_address:e,metadata:o}}}static fromData(t){const{admin:e,group_policy_address:o,metadata:r}=t;return new Vo(e,o,r)}toData(){const{admin:t,group_policy_address:e,metadata:o}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",admin:t,group_policy_address:e,metadata:o}}static fromProto(t){return new Vo(t.admin,t.groupPolicyAddress,t.metadata)}toProto(){const{admin:t,group_policy_address:e,metadata:o}=this;return M.MsgUpdateGroupPolicyMetadata.fromPartial({admin:t,groupPolicyAddress:e,metadata:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",value:M.MsgUpdateGroupPolicyMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Vo.fromProto(M.MsgUpdateGroupPolicyMetadata.decode(t.value))}}class Wo extends m{constructor(t,e,o,r,s,n){super(),this.id=t,this.admin=e,this.metadata=o,this.version=r,this.total_weight=s,this.created_at=n}static fromAmino(t){const{id:e,admin:o,metadata:r,version:s,total_weight:n,created_at:a}=t;return new Wo(parseInt(e),o,r,parseInt(s),n,new Date(a))}toAmino(){const{id:t,admin:e,metadata:o,version:r,total_weight:s,created_at:n}=this;return{id:t.toFixed(),admin:e,metadata:o,version:r.toFixed(),total_weight:s,created_at:n.toISOString()}}static fromData(t){const{id:e,admin:o,metadata:r,version:s,total_weight:n,created_at:a}=t;return new Wo(parseInt(e),o,r,parseInt(s),n,new Date(a))}toData(){const{id:t,admin:e,metadata:o,version:r,total_weight:s,created_at:n}=this;return{id:t.toFixed(),admin:e,metadata:o,version:r.toFixed(),total_weight:s,created_at:n.toISOString()}}static fromProto(t){return new Wo(Number(t.id),t.admin,t.metadata,Number(t.version),t.totalWeight,t.createdAt)}toProto(){const{id:t,admin:e,metadata:o,version:r,total_weight:s,created_at:n}=this;return N.GroupInfo.fromPartial({id:BigInt(t),admin:e,metadata:o,version:BigInt(r),totalWeight:s,createdAt:n})}}class Ls extends m{constructor(t,e,o,r,s,n,a){super(),this.address=t,this.group_id=e,this.admin=o,this.metadata=r,this.version=s,this.decision_policy=n,this.created_at=a}static fromAmino(t){const{address:e,group_id:o,admin:r,metadata:s,version:n,decision_policy:a,created_at:i}=t;return new Ls(e,parseInt(o),r,s,parseInt(n),exports.DecisionPolicy.fromAmino(a),new Date(i))}toAmino(){const{address:t,group_id:e,admin:o,metadata:r,version:s,decision_policy:n,created_at:a}=this;return{address:t,group_id:e.toFixed(),admin:o,metadata:r,version:s.toFixed(),decision_policy:n.toAmino(),created_at:a.toISOString()}}static fromData(t){const{address:e,group_id:o,admin:r,metadata:s,version:n,decision_policy:a,created_at:i}=t;return new Ls(e,parseInt(o),r,s,parseInt(n),exports.DecisionPolicy.fromData(a),new Date(i))}toData(){const{address:t,group_id:e,admin:o,metadata:r,version:s,decision_policy:n,created_at:a}=this;return{address:t,group_id:e.toFixed(),admin:o,metadata:r,version:s.toFixed(),decision_policy:n.toData(),created_at:a.toISOString()}}static fromProto(t){return new Ls(t.address,Number(t.groupId),t.admin,t.metadata,Number(t.version),exports.DecisionPolicy.fromProto(t.decisionPolicy),t.createdAt)}toProto(){const{address:t,group_id:e,admin:o,metadata:r,version:s,decision_policy:n,created_at:a}=this;return N.GroupPolicyInfo.fromPartial({address:t,groupId:BigInt(e),admin:o,metadata:r,version:BigInt(s),decisionPolicy:n.packAny(),createdAt:a})}}class ys extends m{constructor(t,e,o,r,s,n,a,i,d,h,y,_,A,I){super(),this.id=t,this.group_policy_address=e,this.metadata=o,this.proposers=r,this.submit_time=s,this.group_version=n,this.group_policy_version=a,this.status=i,this.final_tally_result=d,this.voting_period_end=h,this.executor_result=y,this.messages=_,this.title=A,this.summary=I}static fromAmino(t){const{id:e,group_policy_address:o,metadata:r,proposers:s,submit_time:n,group_version:a,group_policy_version:i,status:d,final_tally_result:h,voting_period_end:y,executor_result:_,messages:A,title:I,summary:C}=t;return new ys(parseInt(e),o,r,s,new Date(n),parseInt(a),parseInt(i),N.proposalStatusFromJSON(d),{yes_count:k(h.yes_count??0).toFixed(),no_count:k(h.no_count??0).toFixed(),abstain_count:k(h.abstain_count??0).toFixed(),no_with_veto_count:k(h.no_with_veto_count??0).toFixed()},new Date(y),N.proposalExecutorResultFromJSON(_),A.map(exports.Msg.fromAmino),I,C)}toAmino(){const{id:t,group_policy_address:e,metadata:o,proposers:r,submit_time:s,group_version:n,group_policy_version:a,status:i,final_tally_result:d,voting_period_end:h,executor_result:y,messages:_,title:A,summary:I}=this;return{id:t.toFixed(),group_policy_address:e,metadata:o,proposers:r,submit_time:s.toISOString(),group_version:n.toFixed(),group_policy_version:a.toFixed(),status:N.proposalStatusToJSON(i),final_tally_result:{yes_count:k(d.yes_count).toFixed(),no_count:k(d.no_count).toFixed(),abstain_count:k(d.abstain_count).toFixed(),no_with_veto_count:k(d.no_with_veto_count).toFixed()},voting_period_end:h.toISOString(),executor_result:N.proposalExecutorResultToJSON(y),messages:_.map(C=>C.toAmino()),title:A,summary:I}}static fromData(t){const{id:e,group_policy_address:o,metadata:r,proposers:s,submit_time:n,group_version:a,group_policy_version:i,status:d,final_tally_result:h,voting_period_end:y,executor_result:_,messages:A,title:I,summary:C}=t;return new ys(parseInt(e),o,r,s,new Date(n),parseInt(a),parseInt(i),N.proposalStatusFromJSON(d),{yes_count:k(h.yes_count??0).toFixed(),no_count:k(h.no_count??0).toFixed(),abstain_count:k(h.abstain_count??0).toFixed(),no_with_veto_count:k(h.no_with_veto_count??0).toFixed()},new Date(y),N.proposalExecutorResultFromJSON(_),A.map(exports.Msg.fromData),I,C)}toData(){const{id:t,group_policy_address:e,metadata:o,proposers:r,submit_time:s,group_version:n,group_policy_version:a,status:i,final_tally_result:d,voting_period_end:h,executor_result:y,messages:_,title:A,summary:I}=this;return{id:t.toFixed(),group_policy_address:e,metadata:o,proposers:r,submit_time:s.toISOString(),group_version:n.toFixed(),group_policy_version:a.toFixed(),status:N.proposalStatusToJSON(i),final_tally_result:{yes_count:k(d.yes_count).toFixed(),no_count:k(d.no_count).toFixed(),abstain_count:k(d.abstain_count).toFixed(),no_with_veto_count:k(d.no_with_veto_count).toFixed()},voting_period_end:h.toISOString(),executor_result:N.proposalExecutorResultToJSON(y),messages:_.map(C=>C.toData()),title:A,summary:I}}static fromProto(t){var e,o,r,s;return new ys(Number(t.id),t.groupPolicyAddress,t.metadata,t.proposers,t.submitTime,Number(t.groupVersion),Number(t.groupPolicyVersion),t.status,{yes_count:k(((e=t.finalTallyResult)==null?void 0:e.yesCount)??0).toFixed(),no_count:k(((o=t.finalTallyResult)==null?void 0:o.noCount)??0).toFixed(),abstain_count:k(((r=t.finalTallyResult)==null?void 0:r.abstainCount)??0).toFixed(),no_with_veto_count:k(((s=t.finalTallyResult)==null?void 0:s.noWithVetoCount)??0).toFixed()},t.votingPeriodEnd,t.executorResult,t.messages.map(exports.Msg.fromProto),t.title,t.summary)}toProto(){const{id:t,group_policy_address:e,metadata:o,proposers:r,submit_time:s,group_version:n,group_policy_version:a,status:i,final_tally_result:d,voting_period_end:h,executor_result:y,messages:_,title:A,summary:I}=this;let C;return d&&(C=N.TallyResult.fromPartial({yesCount:d.yes_count,noCount:d.no_count,abstainCount:d.abstain_count,noWithVetoCount:d.no_with_veto_count})),N.Proposal.fromPartial({id:BigInt(t),groupPolicyAddress:e,metadata:o,proposers:r,submitTime:s,groupVersion:BigInt(n),groupPolicyVersion:BigInt(a),status:i,finalTallyResult:C,votingPeriodEnd:h,executorResult:y,messages:_.map(R=>R.packAny()),title:A,summary:I})}}(c=>{c.Status=N.ProposalStatus,c.ExecutorResult=N.ProposalExecutorResult})(ys||(ys={}));class ce extends m{constructor(t,e,o,r,s){super(),this.proposal_id=t,this.voter=e,this.option=o,this.metadata=r,this.submit_time=s}static fromAmino(t){const{proposal_id:e,voter:o,option:r,metadata:s,submit_time:n}=t;return new ce(parseInt(e),o,N.voteOptionFromJSON(r),s,new Date(n))}toAmino(){const{proposal_id:t,voter:e,option:o,metadata:r,submit_time:s}=this;return{proposal_id:t.toFixed(),voter:e,option:N.voteOptionToJSON(o),metadata:r,submit_time:s.toISOString()}}static fromData(t){const{proposal_id:e,voter:o,option:r,metadata:s,submit_time:n}=t;return new ce(parseInt(e),o,N.voteOptionFromJSON(r),s,new Date(n))}toData(){const{proposal_id:t,voter:e,option:o,metadata:r,submit_time:s}=this;return{proposal_id:t.toFixed(),voter:e,option:N.voteOptionToJSON(o),metadata:r,submit_time:s.toISOString()}}static fromProto(t){return new ce(Number(t.proposalId),t.voter,t.option,t.metadata,t.submitTime)}toProto(){const{proposal_id:t,voter:e,option:o,metadata:r,submit_time:s}=this;return N.Vote.fromPartial({proposalId:BigInt(t),voter:e,option:o,metadata:r,submitTime:s})}}(c=>{c.Option=N.VoteOption})(ce||(ce={}));class me extends m{constructor(e,o,r){super();p(this,"recv_fee");p(this,"ack_fee");p(this,"timeout_fee");this.recv_fee=new u(e),this.ack_fee=new u(o),this.timeout_fee=new u(r)}static fromAmino(e){const{recv_fee:o,ack_fee:r,timeout_fee:s}=e;return new me(u.fromAmino(o),u.fromAmino(r),u.fromAmino(s))}toAmino(){const{recv_fee:e,ack_fee:o,timeout_fee:r}=this;return{recv_fee:e.toAmino(),ack_fee:o.toAmino(),timeout_fee:r.toAmino()}}static fromData(e){const{recv_fee:o,ack_fee:r,timeout_fee:s}=e;return new me(u.fromData(o),u.fromData(r),u.fromData(s))}toData(){const{recv_fee:e,ack_fee:o,timeout_fee:r}=this;return{recv_fee:e.toData(),ack_fee:o.toData(),timeout_fee:r.toData()}}static fromProto(e){return new me(u.fromProto(e.recvFee),u.fromProto(e.ackFee),u.fromProto(e.timeoutFee))}toProto(){const{recv_fee:e,ack_fee:o,timeout_fee:r}=this;return Ni.Fee.fromPartial({recvFee:e.toProto(),ackFee:o.toProto(),timeoutFee:r.toProto()})}}class cn extends m{constructor(t,e,o,r,s){super(),this.fee=t,this.source_port_id=e,this.source_channel_id=o,this.signer=r,this.relayers=s}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{fee:e,source_port_id:o,source_channel_id:r,signer:s,relayers:n}=t;return new cn(e?me.fromData(e):void 0,o,r,s,n)}toData(){const{fee:t,source_port_id:e,source_channel_id:o,signer:r,relayers:s}=this;return{"@type":"/ibc.applications.fee.v1.MsgPayPacketFee",fee:t==null?void 0:t.toData(),source_port_id:e,source_channel_id:o,signer:r,relayers:s}}static fromProto(t){return new cn(t.fee?me.fromProto(t.fee):void 0,t.sourcePortId,t.sourceChannelId,t.signer,t.relayers)}toProto(){const{fee:t,source_port_id:e,source_channel_id:o,signer:r,relayers:s}=this;return Ut.MsgPayPacketFee.fromPartial({fee:t==null?void 0:t.toProto(),sourcePortId:e,sourceChannelId:o,signer:r,relayers:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgPayPacketFee",value:Ut.MsgPayPacketFee.encode(this.toProto()).finish()})}static unpackAny(t){return cn.fromProto(Ut.MsgPayPacketFee.decode(t.value))}}class ue extends m{constructor(t,e,o){super(),this.port_id=t,this.channel_id=e,this.sequence=o}static fromAmino(t){const{port_id:e,channel_id:o,sequence:r}=t;return new ue(e,o,parseInt(r))}toAmino(){const{port_id:t,channel_id:e,sequence:o}=this;return{port_id:t,channel_id:e,sequence:o.toFixed()}}static fromData(t){const{port_id:e,channel_id:o,sequence:r}=t;return new ue(e,o,parseInt(r))}toData(){const{port_id:t,channel_id:e,sequence:o}=this;return{port_id:t,channel_id:e,sequence:o.toFixed()}}static fromProto(t){return new ue(t.portId,t.channelId,Number(t.sequence))}toProto(){const{port_id:t,channel_id:e,sequence:o}=this;return pa.PacketId.fromPartial({portId:t,channelId:e,sequence:BigInt(o)})}}class de extends m{constructor(t,e,o=[]){super(),this.fee=t,this.refund_address=e,this.relayers=o}static fromAmino(t){const{fee:e,refund_address:o,relayers:r}=t;return new de(e?me.fromAmino(e):void 0,o,r)}toAmino(){const{fee:t,refund_address:e,relayers:o}=this;return{fee:t==null?void 0:t.toAmino(),refund_address:e,relayers:o}}static fromData(t){const{fee:e,refund_address:o,relayers:r}=t;return new de(e?me.fromData(e):void 0,o,r)}toData(){const{fee:t,refund_address:e,relayers:o}=this;return{fee:t==null?void 0:t.toData(),refund_address:e,relayers:o}}static fromProto(t){return new de(t.fee?me.fromProto(t.fee):void 0,t.refundAddress,t.relayers)}toProto(){const{fee:t,refund_address:e,relayers:o}=this;return Ni.PacketFee.fromPartial({fee:t==null?void 0:t.toProto(),refundAddress:e,relayers:o})}}class mn extends m{constructor(t,e){super(),this.packet_id=t,this.packet_fee=e}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{packet_id:e,packet_fee:o}=t;return new mn(e?ue.fromData(e):void 0,o?de.fromData(o):void 0)}toData(){const{packet_id:t,packet_fee:e}=this;return{"@type":"/ibc.applications.fee.v1.MsgPayPacketFeeAsync",packet_id:t==null?void 0:t.toData(),packet_fee:e==null?void 0:e.toData()}}static fromProto(t){return new mn(t.packetId?ue.fromProto(t.packetId):void 0,t.packetFee?de.fromProto(t.packetFee):void 0)}toProto(){const{packet_id:t,packet_fee:e}=this;return Ut.MsgPayPacketFeeAsync.fromPartial({packetId:t==null?void 0:t.toProto(),packetFee:e==null?void 0:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgPayPacketFeeAsync",value:Ut.MsgPayPacketFeeAsync.encode(this.toProto()).finish()})}static unpackAny(t){return mn.fromProto(Ut.MsgPayPacketFeeAsync.decode(t.value))}}class un extends m{constructor(t,e,o,r){super(),this.port_id=t,this.channel_id=e,this.relayer=o,this.payee=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel_id:o,relayer:r,payee:s}=t;return new un(e,o,r,s)}toData(){const{port_id:t,channel_id:e,relayer:o,payee:r}=this;return{"@type":"/ibc.applications.fee.v1.MsgRegisterPayee",port_id:t,channel_id:e,relayer:o,payee:r}}static fromProto(t){return new un(t.portId,t.channelId,t.relayer,t.payee)}toProto(){const{port_id:t,channel_id:e,relayer:o,payee:r}=this;return Ut.MsgRegisterPayee.fromPartial({portId:t,channelId:e,relayer:o,payee:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterPayee",value:Ut.MsgRegisterPayee.encode(this.toProto()).finish()})}static unpackAny(t){return un.fromProto(Ut.MsgRegisterPayee.decode(t.value))}}class dn extends m{constructor(t,e,o,r){super(),this.port_id=t,this.channel_id=e,this.relayer=o,this.counterparty_payee=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel_id:o,relayer:r,counterparty_payee:s}=t;return new dn(e,o,r,s)}toData(){const{port_id:t,channel_id:e,relayer:o,counterparty_payee:r}=this;return{"@type":"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",port_id:t,channel_id:e,relayer:o,counterparty_payee:r}}static fromProto(t){return new dn(t.portId,t.channelId,t.relayer,t.counterpartyPayee)}toProto(){const{port_id:t,channel_id:e,relayer:o,counterparty_payee:r}=this;return Ut.MsgRegisterCounterpartyPayee.fromPartial({portId:t,channelId:e,relayer:o,counterpartyPayee:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",value:Ut.MsgRegisterCounterpartyPayee.encode(this.toProto()).finish()})}static unpackAny(t){return dn.fromProto(Ut.MsgRegisterCounterpartyPayee.decode(t.value))}}class wa extends m{constructor(t,e){super(),this.fee_version=t,this.app_version=e}static fromAmino(t){const{fee_version:e,app_version:o}=t;return new wa(e,o)}toAmino(){const{fee_version:t,app_version:e}=this;return{fee_version:t,app_version:e}}static fromData(t){const{fee_version:e,app_version:o}=t;return new wa(e,o)}toData(){const{fee_version:t,app_version:e}=this;return{fee_version:t,app_version:e}}static fromProto(t){return new wa(t.feeVersion,t.appVersion)}toProto(){const{fee_version:t,app_version:e}=this;return Rc.Metadata.fromPartial({feeVersion:t,appVersion:e})}}class ba extends m{constructor(t,e=[]){super(),this.packet_id=t,this.packet_fees=e}static fromAmino(t){const{packet_id:e,packet_fees:o}=t;return new ba(e?ue.fromAmino(e):void 0,o.map(r=>de.fromAmino(r)))}toAmino(){const{packet_id:t,packet_fees:e}=this;return{packet_id:t==null?void 0:t.toAmino(),packet_fees:e.map(o=>o.toAmino())}}static fromData(t){const{packet_id:e,packet_fees:o}=t;return new ba(e?ue.fromData(e):void 0,o.map(r=>de.fromData(r)))}toData(){const{packet_id:t,packet_fees:e}=this;return{packet_id:t==null?void 0:t.toData(),packet_fees:e.map(o=>o.toData())}}static fromProto(t){return new ba(t.packetId?ue.fromProto(t.packetId):void 0,t.packetFees.map(e=>de.fromProto(e)))}toProto(){const{packet_id:t,packet_fees:e}=this;return{packetId:t==null?void 0:t.toProto(),packetFees:e.map(o=>o.toProto())}}}class Ho extends m{constructor(t,e,o){super(),this.authority=t,this.address=e,this.allowed=o}static fromAmino(t){const{value:{authority:e,address:o,allowed:r}}=t;return new Ho(e,o,r)}toAmino(){const{authority:t,address:e,allowed:o}=this;return{type:"ibchooks/MsgUpdateACL",value:{authority:t,address:e,allowed:o}}}static fromData(t){const{authority:e,address:o,allowed:r}=t;return new Ho(e,o,r)}toData(){const{authority:t,address:e,allowed:o}=this;return{"@type":"/initia.ibchooks.v1.MsgUpdateACL",authority:t,address:e,allowed:o}}static fromProto(t){return new Ho(t.authority,t.address,t.allowed)}toProto(){const{authority:t,address:e,allowed:o}=this;return Vn.MsgUpdateACL.fromPartial({authority:t,address:e,allowed:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateACL",value:Vn.MsgUpdateACL.encode(this.toProto()).finish()})}static unpackAny(t){return Ho.fromProto(Vn.MsgUpdateACL.decode(t.value))}}class _s extends m{constructor(t){super(),this.default_allowed=t}static fromAmino(t){return new _s(t.value.default_allowed)}toAmino(){return{type:"ibchooks/Params",value:{default_allowed:this.default_allowed}}}static fromData(t){return new _s(t.default_allowed)}toData(){return{"@type":"/initia.ibchooks.v1.Params",default_allowed:this.default_allowed}}static fromProto(t){return new _s(t.defaultAllowed)}toProto(){return Oi.Params.fromPartial({defaultAllowed:this.default_allowed})}}class jo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new jo(e,_s.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"ibchooks/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new jo(e,_s.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.ibchooks.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new jo(t.authority,_s.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Vn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateParams",value:Vn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return jo.fromProto(Vn.MsgUpdateParams.decode(t.value))}}class ln extends m{constructor(t,e){super(),this.address=t,this.allowed=e}static fromAmino(t){const{address:e,allowed:o}=t;return new ln(e,o)}toAmino(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromData(t){const{address:e,allowed:o}=t;return new ln(e,o)}toData(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromProto(t){return new ln(t.address,t.allowed)}toProto(){const{address:t,allowed:e}=this;return Oi.ACL.fromPartial({address:t,allowed:e})}}class Qo extends m{constructor(e,o,r,s,n,a,i,d,h){super();p(this,"source_port");p(this,"source_channel");p(this,"class_id");p(this,"token_ids");p(this,"sender");p(this,"receiver");p(this,"timeout_height");p(this,"timeout_timestamp");p(this,"memo");if(!i&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");this.source_port=e,this.source_channel=o,this.class_id=r,this.token_ids=s,this.sender=n,this.receiver=a,this.timeout_height=i,this.timeout_timestamp=d,this.memo=h}static fromAmino(e){const{value:{source_port:o,source_channel:r,class_id:s,token_ids:n,sender:a,receiver:i,timeout_height:d,timeout_timestamp:h,memo:y}}=e;if(!d&&!h)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Qo(o,r,s,n,a,i,w.fromAmino(d),h,y)}toAmino(){const{source_port:e,source_channel:o,class_id:r,token_ids:s,sender:n,receiver:a,timeout_height:i,timeout_timestamp:d,memo:h}=this;return{type:"nft-transfer/MsgTransfer",value:{source_port:e,source_channel:o,class_id:r,token_ids:s,sender:n,receiver:a,timeout_height:(i==null?void 0:i.toAmino())??{},timeout_timestamp:d,memo:h===""?void 0:h}}}static fromData(e){const{source_port:o,source_channel:r,class_id:s,token_ids:n,sender:a,receiver:i,timeout_timestamp:d,timeout_height:h,memo:y}=e;if(!h&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Qo(o,r,s,n,a,i,h?w.fromData(h):void 0,d==="0"?void 0:d,y)}toData(){const{source_port:e,source_channel:o,class_id:r,token_ids:s,sender:n,receiver:a,timeout_height:i,timeout_timestamp:d,memo:h}=this;return{"@type":"/ibc.applications.nft_transfer.v1.MsgTransfer",source_port:e,source_channel:o,class_id:r,token_ids:s,sender:n,receiver:a,timeout_height:i?i.toData():new w(0,0).toData(),timeout_timestamp:d??"0",memo:h}}static fromProto(e){if(!e.timeoutHeight&&Number(e.timeoutTimestamp)==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new Qo(e.sourcePort,e.sourceChannel,e.classId,e.tokenIds,e.sender,e.receiver,e.timeoutHeight?w.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:o,class_id:r,token_ids:s,sender:n,receiver:a,timeout_height:i,timeout_timestamp:d,memo:h}=this;return Wn.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:o,classId:r,tokenIds:s,sender:n,receiver:a,timeoutHeight:i==null?void 0:i.toProto(),timeoutTimestamp:d?BigInt(d):void 0,memo:h})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgTransfer",value:Wn.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Qo.fromProto(Wn.MsgTransfer.decode(e.value))}}class vs extends m{constructor(t,e){super(),this.send_enabled=t,this.receive_enabled=e}static fromAmino(t){const{value:{send_enabled:e,receive_enabled:o}}=t;return new vs(e,o)}toAmino(){const{send_enabled:t,receive_enabled:e}=this;return{type:"nft-transfer/Params",value:{send_enabled:t,receive_enabled:e}}}static fromData(t){const{send_enabled:e,receive_enabled:o}=t;return new vs(e,o)}toData(){const{send_enabled:t,receive_enabled:e}=this;return{"@type":"/ibc.applications.nft_transfer.v1.Params",send_enabled:t,receive_enabled:e}}static fromProto(t){return new vs(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Fi.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class Yo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new Yo(e,vs.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"nft-transfer/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new Yo(e,vs.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/ibc.applications.nft_transfer.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Yo(t.authority,vs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Wn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgUpdateParams",value:Wn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Yo.fromProto(Wn.MsgUpdateParams.decode(t.value))}}class Da extends m{constructor(t,e,o,r,s,n,a,i,d){super(),this.class_id=t,this.class_uri=e,this.class_data=o,this.token_ids=r,this.token_uris=s,this.token_data=n,this.sender=a,this.receiver=i,this.memo=d}static fromAmino(t){const{class_id:e,class_uri:o,class_data:r,token_ids:s,token_uris:n,token_data:a,sender:i,receiver:d,memo:h}=t;return new Da(e,o,r,s,n,a,i,d,h)}toAmino(){const{class_id:t,class_uri:e,class_data:o,token_ids:r,token_uris:s,token_data:n,sender:a,receiver:i,memo:d}=this;return{class_id:t,class_uri:e,class_data:o,token_ids:r,token_uris:s,token_data:n,sender:a,receiver:i,memo:d}}static fromData(t){const{class_id:e,class_uri:o,class_data:r,token_ids:s,token_uris:n,token_data:a,sender:i,receiver:d,memo:h}=t;return new Da(e,o,r,s,n,a,i,d,h)}toData(){const{class_id:t,class_uri:e,class_data:o,token_ids:r,token_uris:s,token_data:n,sender:a,receiver:i,memo:d}=this;return{class_id:t,class_uri:e,class_data:o,token_ids:r,token_uris:s,token_data:n,sender:a,receiver:i,memo:d}}static fromProto(t){return new Da(t.classId,t.classUri,t.classData,t.tokenIds,t.tokenUris,t.tokenData,t.sender,t.receiver,t.memo)}toProto(){const{class_id:t,class_uri:e,class_data:o,token_ids:r,token_uris:s,token_data:n,sender:a,receiver:i,memo:d}=this;return qc.NonFungibleTokenPacketData.fromPartial({classId:t,classUri:e,classData:o,tokenIds:r,tokenUris:s,tokenData:n,sender:a,receiver:i,memo:d})}}class pn extends m{constructor(t,e){super(),this.path=t,this.base_class_id=e}static fromAmino(t){const{path:e,base_class_id:o}=t;return new pn(e,o)}toAmino(){const{path:t,base_class_id:e}=this;return{path:t,base_class_id:e}}static fromData(t){const{path:e,base_class_id:o}=t;return new pn(e,o)}toData(){const{path:t,base_class_id:e}=this;return{path:t,base_class_id:e}}static fromProto(t){return new pn(t.path,t.baseClassId)}toProto(){const{path:t,base_class_id:e}=this;return Fi.ClassTrace.fromPartial({path:t,baseClassId:e})}}class Xo extends m{constructor(t,e,o,r){super(),this.authority=t,this.channel_id=e,this.port_id=o,this.admin=r}static fromAmino(t){const{value:{authority:e,channel_id:o,port_id:r,admin:s}}=t;return new Xo(e,o,r,s)}toAmino(){const{authority:t,channel_id:e,port_id:o,admin:r}=this;return{type:"ibc-perm/MsgUpdateAdmin",value:{authority:t,channel_id:e,port_id:o,admin:r}}}static fromData(t){const{authority:e,channel_id:o,port_id:r,admin:s}=t;return new Xo(e,o,r,s)}toData(){const{authority:t,channel_id:e,port_id:o,admin:r}=this;return{"@type":"/ibc.applications.perm.v1.MsgUpdateAdmin",authority:t,channel_id:e,port_id:o,admin:r}}static fromProto(t){return new Xo(t.authority,t.channelId,t.portId,t.admin)}toProto(){const{authority:t,channel_id:e,port_id:o,admin:r}=this;return Hn.MsgUpdateAdmin.fromPartial({authority:t,channelId:e,portId:o,admin:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdateAdmin",value:Hn.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Xo.fromProto(Hn.MsgUpdateAdmin.decode(t.value))}}class Zo extends m{constructor(t,e,o,r){super(),this.authority=t,this.channel_id=e,this.port_id=o,this.relayers=r}static fromAmino(t){const{value:{authority:e,channel_id:o,port_id:r,relayers:s}}=t;return new Zo(e,o,r,s)}toAmino(){const{authority:t,channel_id:e,port_id:o,relayers:r}=this;return{type:"ibc-perm/MsgUpdatePermissionedRelayers",value:{authority:t,channel_id:e,port_id:o,relayers:r}}}static fromData(t){const{authority:e,channel_id:o,port_id:r,relayers:s}=t;return new Zo(e,o,r,s)}toData(){const{authority:t,channel_id:e,port_id:o,relayers:r}=this;return{"@type":"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers",authority:t,channel_id:e,port_id:o,relayers:r}}static fromProto(t){return new Zo(t.authority,t.channelId,t.portId,t.relayers)}toProto(){const{authority:t,channel_id:e,port_id:o,relayers:r}=this;return Hn.MsgUpdatePermissionedRelayers.fromPartial({authority:t,channelId:e,portId:o,relayers:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers",value:Hn.MsgUpdatePermissionedRelayers.encode(this.toProto()).finish()})}static unpackAny(t){return Zo.fromProto(Hn.MsgUpdatePermissionedRelayers.decode(t.value))}}class zs extends m{constructor(t,e){super(),this.port_id=t,this.channel_id=e}static fromAmino(t){const{port_id:e,channel_id:o}=t;return new zs(e,o)}toAmino(){const{port_id:t,channel_id:e}=this;return{port_id:t,channel_id:e}}static fromData(t){const{port_id:e,channel_id:o}=t;return new zs(e,o)}toData(){const{port_id:t,channel_id:e}=this;return{port_id:t,channel_id:e}}static fromProto(t){return new zs(t.portId,t.channelId)}toProto(){const{port_id:t,channel_id:e}=this;return pa.Counterparty.fromPartial({portId:t,channelId:e})}}class Bt extends m{constructor(t,e,o,r,s){super(),this.state=t,this.ordering=e,this.counterparty=o,this.connection_hops=r,this.version=s}static fromAmino(t){const{state:e,ordering:o,counterparty:r,connection_hops:s,version:n}=t;return new Bt(e,o,r?zs.fromAmino(r):void 0,s,n)}toAmino(){const{state:t,ordering:e,counterparty:o,connection_hops:r,version:s}=this;return{state:t,ordering:e,counterparty:o==null?void 0:o.toAmino(),connection_hops:r,version:s}}static fromData(t){const{state:e,ordering:o,counterparty:r,connection_hops:s,version:n}=t;return new Bt(e,o,r?zs.fromData(r):void 0,s,n)}toData(){const{state:t,ordering:e,counterparty:o,connection_hops:r,version:s}=this;return{state:t,ordering:e,counterparty:o==null?void 0:o.toData(),connection_hops:r,version:s}}static fromProto(t){return new Bt(t.state,t.ordering,t.counterparty?zs.fromProto(t.counterparty):void 0,t.connectionHops,t.version)}toProto(){const{state:t,ordering:e,counterparty:o,connection_hops:r,version:s}=this;return pa.Channel.fromPartial({state:t,ordering:e,counterparty:o==null?void 0:o.toProto(),connectionHops:r,version:s})}}class hn extends m{constructor(t,e,o){super(),this.port_id=t,this.channel=e,this.signer=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel:o,signer:r}=t;return new hn(e,o?Bt.fromData(o):void 0,r)}toData(){const{port_id:t,channel:e,signer:o}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenInit",port_id:t,channel:e==null?void 0:e.toData(),signer:o}}static fromProto(t){return new hn(t.portId,t.channel?Bt.fromProto(t.channel):void 0,t.signer)}toProto(){const{port_id:t,channel:e,signer:o}=this;return O.MsgChannelOpenInit.fromPartial({portId:t,channel:e==null?void 0:e.toProto(),signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",value:O.MsgChannelOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return hn.fromProto(O.MsgChannelOpenInit.decode(t.value))}}class fn extends m{constructor(e,o,r){super();p(this,"client_state");p(this,"consensus_state");p(this,"signer");this.client_state=e,this.consensus_state=o,this.signer=r}static fromAmino(e){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(e){const{client_state:o,consensus_state:r,signer:s}=e;return new fn(o,r,s)}toData(){const{client_state:e,consensus_state:o,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgCreateClient",client_state:e,consensus_state:o,signer:r}}static fromProto(e){return new fn(e.clientState,e.consensusState,e.signer)}toProto(){const{client_state:e,consensus_state:o,signer:r}=this;return Q.MsgCreateClient.fromPartial({clientState:e,consensusState:o,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgCreateClient",value:Q.MsgCreateClient.encode(this.toProto()).finish()})}static unpackAny(e){return fn.fromProto(Q.MsgCreateClient.decode(e.value))}}class gn extends m{constructor(t,e,o){super(),this.client_id=t,this.client_message=e,this.signer=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{client_id:e,client_message:o,signer:r}=t;return new gn(e,o,r)}toData(){const{client_id:t,client_message:e,signer:o}=this;return{"@type":"/ibc.core.client.v1.MsgUpdateClient",client_id:t,client_message:e,signer:o}}static fromProto(t){return new gn(t.clientId,t.clientMessage,t.signer)}toProto(){const{client_id:t,client_message:e,signer:o}=this;return Q.MsgUpdateClient.fromPartial({clientId:t,clientMessage:e,signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateClient",value:Q.MsgUpdateClient.encode(this.toProto()).finish()})}static unpackAny(t){return gn.fromProto(Q.MsgUpdateClient.decode(t.value))}}class yn extends m{constructor(t,e,o,r,s,n){super(),this.client_id=t,this.client_state=e,this.consensus_state=o,this.proof_upgrade_client=r,this.proof_upgrade_consensus_state=s,this.signer=n}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{client_id:e,client_state:o,consensus_state:r,proof_upgrade_client:s,proof_upgrade_consensus_state:n,signer:a}=t;return new yn(e,o,r,s,n,a)}toData(){const{client_id:t,client_state:e,consensus_state:o,proof_upgrade_client:r,proof_upgrade_consensus_state:s,signer:n}=this;return{"@type":"/ibc.core.client.v1.MsgUpgradeClient",client_id:t,client_state:e,consensus_state:o,proof_upgrade_client:r,proof_upgrade_consensus_state:s,signer:n}}static fromProto(t){return new yn(t.clientId,t.clientState,t.consensusState,Buffer.from(t.proofUpgradeClient).toString("base64"),Buffer.from(t.proofUpgradeConsensusState).toString("base64"),t.signer)}toProto(){const{client_id:t,client_state:e,consensus_state:o,proof_upgrade_client:r,proof_upgrade_consensus_state:s,signer:n}=this;return Q.MsgUpgradeClient.fromPartial({clientId:t,clientState:e,consensusState:o,proofUpgradeClient:Buffer.from(r,"base64"),proofUpgradeConsensusState:Buffer.from(s,"base64"),signer:n})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",value:Q.MsgUpgradeClient.encode(this.toProto()).finish()})}static unpackAny(t){return yn.fromProto(Q.MsgUpgradeClient.decode(t.value))}}class _n extends m{constructor(t,e,o){super(),this.client_id=t,this.misbehaviour=e,this.signer=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{client_id:e,misbehaviour:o,signer:r}=t;return new _n(e,o,r)}toData(){const{client_id:t,misbehaviour:e,signer:o}=this;return{"@type":"/ibc.core.client.v1.MsgSubmitMisbehaviour",client_id:t,misbehaviour:e,signer:o}}static fromProto(t){return new _n(t.clientId,t.misbehaviour,t.signer)}toProto(){const{client_id:t,misbehaviour:e,signer:o}=this;return Q.MsgSubmitMisbehaviour.fromPartial({clientId:t,misbehaviour:e,signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",value:Q.MsgSubmitMisbehaviour.encode(this.toProto()).finish()})}static unpackAny(t){return _n.fromProto(Q.MsgSubmitMisbehaviour.decode(t.value))}}class vn extends m{constructor(t,e,o){super(),this.subject_client_id=t,this.substitute_client_id=e,this.signer=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{subject_client_id:e,substitute_client_id:o,signer:r}=t;return new vn(e,o,r)}toData(){const{subject_client_id:t,substitute_client_id:e,signer:o}=this;return{"@type":"/ibc.core.client.v1.MsgRecoverClient",subject_client_id:t,substitute_client_id:e,signer:o}}static fromProto(t){return new vn(t.subjectClientId,t.substituteClientId,t.signer)}toProto(){const{subject_client_id:t,substitute_client_id:e,signer:o}=this;return Q.MsgRecoverClient.fromPartial({subjectClientId:t,substituteClientId:e,signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgRecoverClient",value:Q.MsgRecoverClient.encode(this.toProto()).finish()})}static unpackAny(t){return vn.fromProto(Q.MsgRecoverClient.decode(t.value))}}class Xt extends m{constructor(t,e,o){super(),this.name=t,this.height=e,this.info=o}static fromAmino(t){const{name:e,height:o,info:r}=t;return new Xt(e,parseInt(o),r)}toAmino(){const{name:t,height:e,info:o}=this;return{name:t,height:e.toFixed(),info:o}}static fromData(t){const{name:e,height:o,info:r}=t;return new Xt(e,parseInt(o),r)}toData(){const{name:t,height:e,info:o}=this;return{name:t,height:e.toFixed(),info:o}}static fromProto(t){return new Xt(t.name,Number(t.height),t.info)}toProto(){const{name:t,height:e,info:o}=this;return $c.Plan.fromPartial({name:t,height:BigInt(e),info:o})}}class tr extends m{constructor(t,e){super(),this.authority=t,this.plan=e}static fromAmino(t){const{value:{authority:e,plan:o}}=t;return new tr(e,Xt.fromAmino(o))}toAmino(){const{authority:t,plan:e}=this;return{type:"cosmos-sdk/MsgSoftwareUpgrade",value:{authority:t,plan:e.toAmino()}}}static fromData(t){const{authority:e,plan:o}=t;return new tr(e,Xt.fromData(o))}toData(){const{authority:t,plan:e}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",authority:t,plan:e.toData()}}static fromProto(t){return new tr(t.authority,Xt.fromProto(t.plan))}toProto(){const{authority:t,plan:e}=this;return jn.MsgSoftwareUpgrade.fromPartial({authority:t,plan:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",value:jn.MsgSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return tr.fromProto(jn.MsgSoftwareUpgrade.decode(t.value))}}class er extends m{constructor(t){super(),this.authority=t}static fromAmino(t){const{value:{authority:e}}=t;return new er(e)}toAmino(){const{authority:t}=this;return{type:"cosmos-sdk/MsgCancelUpgrade",value:{authority:t}}}static fromData(t){const{authority:e}=t;return new er(e)}toData(){const{authority:t}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",authority:t}}static fromProto(t){return new er(t.authority)}toProto(){const{authority:t}=this;return jn.MsgCancelUpgrade.fromPartial({authority:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",value:jn.MsgCancelUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return er.fromProto(jn.MsgCancelUpgrade.decode(t.value))}}class Pn extends m{constructor(t,e,o){super(),this.plan=t,this.upgraded_client_state=e,this.signer=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{plan:e,upgraded_client_state:o,signer:r}=t;return new Pn(Xt.fromData(e),o,r)}toData(){const{plan:t,upgraded_client_state:e,signer:o}=this;return{"@type":"/ibc.core.client.v1.MsgIBCSoftwareUpgrade",plan:t.toData(),upgraded_client_state:e,signer:o}}static fromProto(t){return new Pn(Xt.fromProto(t.plan),t.upgradedClientState,t.signer)}toProto(){const{plan:t,upgraded_client_state:e,signer:o}=this;return Q.MsgIBCSoftwareUpgrade.fromPartial({plan:t.toProto(),upgradedClientState:e,signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgIBCSoftwareUpgrade",value:Q.MsgIBCSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Pn.fromProto(Q.MsgIBCSoftwareUpgrade.decode(t.value))}}class Gs extends m{constructor(t){super(),this.allowed_clients=t}static fromAmino(t){const{allowed_clients:e}=t;return new Gs(e)}toAmino(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromData(t){const{allowed_clients:e}=t;return new Gs(e)}toData(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromProto(t){return new Gs(t.allowedClients)}toProto(){const{allowed_clients:t}=this;return Sa.Params.fromPartial({allowedClients:t})}}class An extends m{constructor(t,e){super(),this.signer=t,this.params=e}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{signer:e,params:o}=t;return new An(e,Gs.fromData(o))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.core.client.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new An(t.signer,Gs.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Q.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateParams",value:Q.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return An.fromProto(Q.MsgUpdateParams.decode(t.value))}}class Js extends m{constructor(e,o){super();p(this,"height");p(this,"consensus_state");this.height=e,this.consensus_state=o}static fromAmino(e){const{height:o,consensus_state:r}=e;return new Js(o?w.fromAmino(o):void 0,r)}toAmino(){const{height:e,consensus_state:o}=this;return{height:e==null?void 0:e.toAmino(),consensus_state:o}}static fromData(e){const{height:o,consensus_state:r}=e;return new Js(o?w.fromData(o):void 0,r)}toData(){const{height:e,consensus_state:o}=this;return{height:e==null?void 0:e.toData(),consensus_state:o}}static fromProto(e){return new Js(e.height?w.fromProto(e.height):void 0,e.consensusState)}toProto(){const{height:e,consensus_state:o}=this;return Sa.ConsensusStateWithHeight.fromPartial({height:e==null?void 0:e.toProto(),consensusState:o})}}class ka extends m{constructor(t,e){super(),this.client_id=t,this.consensus_states=e}static fromAmino(t){const{client_id:e,consensus_states:o}=t;return new ka(e,o.map(r=>Js.fromAmino(r)))}toAmino(){const{client_id:t,consensus_states:e}=this;return{client_id:t,consensus_states:e.map(o=>o.toAmino())}}static fromData(t){const{client_id:e,consensus_states:o}=t;return new ka(e,o.map(r=>Js.fromData(r)))}toData(){const{client_id:t,consensus_states:e}=this;return{client_id:t,consensus_states:e.map(o=>o.toData())}}static fromProto(t){return new ka(t.clientId,t.consensusStates.map(e=>Js.fromProto(e)))}toProto(){const{client_id:t,consensus_states:e}=this;return Sa.ClientConsensusStates.fromPartial({clientId:t,consensusStates:e.map(o=>o.toProto())})}}class ea extends m{constructor(t,e){super(),this.client_id=t,this.client_state=e}static fromAmino(t){const{client_id:e,client_state:o}=t;return new ea(e,o)}toAmino(){const{client_id:t,client_state:e}=this;return{client_id:t,client_state:e}}static fromData(t){const{client_id:e,client_state:o}=t;return new ea(e,o)}toData(){const{client_id:t,client_state:e}=this;return{client_id:t,client_state:e}}static fromProto(t){return new ea(t.clientId,t.clientState)}toProto(){const{client_id:t,client_state:e}=this;return Sa.IdentifiedClientState.fromPartial({clientId:t,clientState:e})}}class Ks extends m{constructor(t,e){super(),this.height=t,this.timestamp=e}static fromAmino(t){const{height:e,timestamp:o}=t;return new Ks(w.fromAmino(e),parseInt(o))}toAmino(){const{height:t,timestamp:e}=this;return{height:t.toAmino(),timestamp:e.toFixed()}}static fromData(t){const{height:e,timestamp:o}=t;return new Ks(w.fromData(e),parseInt(o))}toData(){const{height:t,timestamp:e}=this;return{height:t.toData(),timestamp:e.toFixed()}}static fromProto(t){return new Ks(w.fromProto(t.height),Number(t.timestamp))}toProto(){const{height:t,timestamp:e}=this;return pa.Timeout.fromPartial({height:t.toProto(),timestamp:BigInt(e)})}}class wn extends m{constructor(t){super(),this.upgrade_timeout=t}static fromAmino(t){return new wn(Ks.fromAmino(t.upgrade_timeout))}toAmino(){return{upgrade_timeout:this.upgrade_timeout.toAmino()}}static fromData(t){return new wn(Ks.fromData(t.upgrade_timeout))}toData(){return{upgrade_timeout:this.upgrade_timeout.toData()}}static fromProto(t){return new wn(Ks.fromProto(t.upgradeTimeout))}toProto(){return pa.Params.fromPartial({upgradeTimeout:this.upgrade_timeout.toProto()})}}class At extends m{constructor(t,e,o,r,s,n,a,i){super(),this.sequence=t,this.source_port=e,this.source_channel=o,this.destination_port=r,this.destination_channel=s,this.data=n,this.timeout_height=a,this.timeout_timestamp=i}static fromAmino(t){const{sequence:e,source_port:o,source_channel:r,destination_port:s,destination_channel:n,data:a,timeout_height:i,timeout_timestamp:d}=t;return new At(e,o,r,s,n,a,i?w.fromAmino(i):void 0,d)}toAmino(){const{sequence:t,source_port:e,source_channel:o,destination_port:r,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:i}=this;return{sequence:t,source_port:e,source_channel:o,destination_port:r,destination_channel:s,data:n,timeout_height:a==null?void 0:a.toAmino(),timeout_timestamp:i}}static fromData(t){const{sequence:e,source_port:o,source_channel:r,destination_port:s,destination_channel:n,data:a,timeout_height:i,timeout_timestamp:d}=t;return new At(e,o,r,s,n,a,i?w.fromData(i):void 0,d)}toData(){const{sequence:t,source_port:e,source_channel:o,destination_port:r,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:i}=this;return{sequence:t,source_port:e,source_channel:o,destination_port:r,destination_channel:s,data:n,timeout_height:a==null?void 0:a.toData(),timeout_timestamp:i}}static fromProto(t){return new At(Number(t.sequence),t.sourcePort,t.sourceChannel,t.destinationPort,t.destinationChannel,Buffer.from(t.data).toString("base64"),t.timeoutHeight?w.fromProto(t.timeoutHeight):void 0,t.timeoutTimestamp.toString())}toProto(){const{sequence:t,source_port:e,source_channel:o,destination_port:r,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:i}=this;return pa.Packet.fromPartial({sequence:BigInt(t),sourcePort:e,sourceChannel:o,destinationPort:r,destinationChannel:s,data:Buffer.from(n,"base64"),timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:BigInt(i)})}}class Vs extends m{constructor(t){super(),this.key_prefix=t}static fromAmino(t){const{key_prefix:e}=t;return new Vs(e)}toAmino(){const{key_prefix:t}=this;return{key_prefix:t}}static fromData(t){const{key_prefix:e}=t;return new Vs(e)}toData(){const{key_prefix:t}=this;return{key_prefix:t}}static fromProto(t){return new Vs(Buffer.from(t.keyPrefix).toString("base64"))}toProto(){const{key_prefix:t}=this;return Ti.MerklePrefix.fromPartial({keyPrefix:Buffer.from(t,"base64")})}}class $a extends m{constructor(t){super(),this.hash=t}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){return new $a(t.hash)}toData(){return{hash:this.hash}}static fromProto(t){return new $a(Buffer.from(t.hash).toString("base64"))}toProto(){return Ti.MerkleRoot.fromPartial({hash:Buffer.from(this.hash,"base64")})}}class Et extends m{constructor(t,e,o){super(),this.client_id=t,this.connection_id=e,this.prefix=o}static fromAmino(t){const{client_id:e,connection_id:o,prefix:r}=t;return new Et(e,o,r?Vs.fromAmino(r):void 0)}toAmino(){const{client_id:t,connection_id:e,prefix:o}=this;return{client_id:t,connection_id:e,prefix:o}}static fromData(t){const{client_id:e,connection_id:o,prefix:r}=t;return new Et(e,o,r?Vs.fromData(r):void 0)}toData(){const{client_id:t,connection_id:e,prefix:o}=this;return{client_id:t,connection_id:e,prefix:o==null?void 0:o.toData()}}static fromProto(t){return new Et(t.clientId,t.connectionId,t.prefix?Vs.fromProto(t.prefix):void 0)}toProto(){const{client_id:t,connection_id:e,prefix:o}=this;return Tt.Counterparty.fromPartial({clientId:t,connectionId:e,prefix:o==null?void 0:o.toProto()})}}class yt extends m{constructor(t,e){super(),this.identifier=t,this.features=e}static fromAmino(t){const{identifier:e,features:o}=t;return new yt(e,o)}toAmino(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromData(t){const{identifier:e,features:o}=t;return new yt(e,o)}toData(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromProto(t){return new yt(t.identifier,t.features)}toProto(){const{identifier:t,features:e}=this;return Tt.Version.fromPartial({identifier:t,features:e})}}class bn extends m{constructor(t,e,o,r,s,n){super(),this.id=t,this.client_id=e,this.versions=o,this.state=r,this.counterparty=s,this.delay_period=n}static fromAmino(t){const{id:e,client_id:o,versions:r,state:s,counterparty:n,delay_period:a}=t;return new bn(e,o,r.map(yt.fromAmino),Tt.stateFromJSON(s),n?Et.fromAmino(n):void 0,parseInt(a))}toAmino(){const{id:t,client_id:e,versions:o,state:r,counterparty:s,delay_period:n}=this;return{id:t,client_id:e,versions:o.map(a=>a.toAmino()),state:Tt.stateToJSON(r),counterparty:s==null?void 0:s.toAmino(),delay_period:n.toFixed()}}static fromData(t){const{id:e,client_id:o,versions:r,state:s,counterparty:n,delay_period:a}=t;return new bn(e,o,r.map(yt.fromData),Tt.stateFromJSON(s),n?Et.fromData(n):void 0,parseInt(a))}toData(){const{id:t,client_id:e,versions:o,state:r,counterparty:s,delay_period:n}=this;return{id:t,client_id:e,versions:o.map(a=>a.toData()),state:Tt.stateToJSON(r),counterparty:s==null?void 0:s.toData(),delay_period:n.toFixed()}}static fromProto(t){return new bn(t.id,t.clientId,t.versions.map(yt.fromProto),t.state,t.counterparty?Et.fromProto(t.counterparty):void 0,Number(t.delayPeriod))}toProto(){const{id:t,client_id:e,versions:o,state:r,counterparty:s,delay_period:n}=this;return Tt.IdentifiedConnection.fromPartial({id:t,clientId:e,versions:o.map(a=>a.toProto()),state:r,counterparty:s==null?void 0:s.toProto(),delayPeriod:BigInt(n)})}}class Dn extends m{constructor(t){super(),this.max_expected_time_per_block=t}static fromAmino(t){const{max_expected_time_per_block:e}=t;return new Dn(parseInt(e))}toAmino(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toFixed()}}static fromData(t){const{max_expected_time_per_block:e}=t;return new Dn(parseInt(e))}toData(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toFixed()}}static fromProto(t){return new Dn(Number(t.maxExpectedTimePerBlock))}toProto(){const{max_expected_time_per_block:t}=this;return Tt.Params.fromPartial({maxExpectedTimePerBlock:BigInt(t)})}}class kn extends m{constructor(t,e,o,r,s,n,a){super(),this.port_id=t,this.previous_channel_id=e,this.channel=o,this.counterparty_version=r,this.proof_init=s,this.proof_height=n,this.signer=a}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,previous_channel_id:o,channel:r,counterparty_version:s,proof_init:n,proof_height:a,signer:i}=t;return new kn(e,o,r?Bt.fromData(r):void 0,s,n,a?w.fromData(a):void 0,i)}toData(){const{port_id:t,previous_channel_id:e,channel:o,counterparty_version:r,proof_init:s,proof_height:n,signer:a}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenTry",port_id:t,previous_channel_id:e,channel:o==null?void 0:o.toData(),counterparty_version:r,proof_init:s,proof_height:n==null?void 0:n.toData(),signer:a}}static fromProto(t){return new kn(t.portId,t.previousChannelId,t.channel?Bt.fromProto(t.channel):void 0,t.counterpartyVersion,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,previous_channel_id:e,channel:o,counterparty_version:r,proof_init:s,proof_height:n,signer:a}=this;return O.MsgChannelOpenTry.fromPartial({portId:t,previousChannelId:e,channel:o==null?void 0:o.toProto(),counterpartyVersion:r,proofInit:Buffer.from(s,"base64"),proofHeight:n==null?void 0:n.toProto(),signer:a})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",value:O.MsgChannelOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return kn.fromProto(O.MsgChannelOpenTry.decode(t.value))}}class Mn extends m{constructor(t,e,o,r,s){super(),this.port_id=t,this.channel_id=e,this.proof_ack=o,this.proof_height=r,this.signer=s}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel_id:o,proof_ack:r,proof_height:s,signer:n}=t;return new Mn(e,o,r,s?w.fromData(s):void 0,n)}toData(){const{port_id:t,channel_id:e,proof_ack:o,proof_height:r,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenConfirm",port_id:t,channel_id:e,proof_ack:o,proof_height:r==null?void 0:r.toData(),signer:s}}static fromProto(t){return new Mn(t.portId,t.channelId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_ack:o,proof_height:r,signer:s}=this;return O.MsgChannelOpenConfirm.fromPartial({portId:t,channelId:e,proofAck:Buffer.from(o,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",value:O.MsgChannelOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return Mn.fromProto(O.MsgChannelOpenConfirm.decode(t.value))}}class xn extends m{constructor(t,e,o,r,s,n,a){super(),this.port_id=t,this.channel_id=e,this.counterparty_channel_id=o,this.counterparty_version=r,this.proof_try=s,this.proof_height=n,this.signer=a}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel_id:o,counterparty_channel_id:r,counterparty_version:s,proof_try:n,proof_height:a,signer:i}=t;return new xn(e,o,r,s,n,a?w.fromData(a):void 0,i)}toData(){const{port_id:t,channel_id:e,counterparty_channel_id:o,counterparty_version:r,proof_try:s,proof_height:n,signer:a}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenAck",port_id:t,channel_id:e,counterparty_channel_id:o,counterparty_version:r,proof_try:s,proof_height:n==null?void 0:n.toData(),signer:a}}static fromProto(t){return new xn(t.portId,t.channelId,t.counterpartyChannelId,t.counterpartyVersion,Buffer.from(t.proofTry).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,counterparty_channel_id:o,counterparty_version:r,proof_try:s,proof_height:n,signer:a}=this;return O.MsgChannelOpenAck.fromPartial({portId:t,channelId:e,counterpartyChannelId:o,counterpartyVersion:r,proofTry:Buffer.from(s,"base64"),proofHeight:n==null?void 0:n.toProto(),signer:a})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",value:O.MsgChannelOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return xn.fromProto(O.MsgChannelOpenAck.decode(t.value))}}class In extends m{constructor(t,e,o){super(),this.port_id=t,this.channel_id=e,this.signer=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel_id:o,signer:r}=t;return new In(e,o,r)}toData(){const{port_id:t,channel_id:e,signer:o}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseInit",port_id:t,channel_id:e,signer:o}}static fromProto(t){return new In(t.portId,t.channelId,t.signer)}toProto(){const{port_id:t,channel_id:e,signer:o}=this;return O.MsgChannelCloseInit.fromPartial({portId:t,channelId:e,signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",value:O.MsgChannelCloseInit.encode(this.toProto()).finish()})}static unpackAny(t){return In.fromProto(O.MsgChannelCloseInit.decode(t.value))}}class Sn extends m{constructor(t,e,o,r,s){super(),this.port_id=t,this.channel_id=e,this.proof_init=o,this.proof_height=r,this.signer=s}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel_id:o,proof_init:r,proof_height:s,signer:n}=t;return new Sn(e,o,r,s?w.fromData(s):void 0,n)}toData(){const{port_id:t,channel_id:e,proof_init:o,proof_height:r,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseConfirm",port_id:t,channel_id:e,proof_init:o,proof_height:r==null?void 0:r.toData(),signer:s}}static fromProto(t){return new Sn(t.portId,t.channelId,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_init:o,proof_height:r,signer:s}=this;return O.MsgChannelCloseConfirm.fromPartial({portId:t,channelId:e,proofInit:Buffer.from(o,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",value:O.MsgChannelCloseConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return Sn.fromProto(O.MsgChannelCloseConfirm.decode(t.value))}}class Cn extends m{constructor(t,e,o,r){super(),this.packet=t,this.proof_commitment=e,this.proof_height=o,this.signer=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{packet:e,proof_commitment:o,proof_height:r,signer:s}=t;return new Cn(e?At.fromData(e):void 0,o,r?w.fromData(r):void 0,s)}toData(){const{packet:t,proof_commitment:e,proof_height:o,signer:r}=this;return{"@type":"/ibc.core.channel.v1.MsgRecvPacket",packet:t==null?void 0:t.toData(),proof_commitment:e,proof_height:o==null?void 0:o.toData(),signer:r}}static fromProto(t){return new Cn(t.packet?At.fromProto(t.packet):void 0,Buffer.from(t.proofCommitment).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,proof_commitment:e,proof_height:o,signer:r}=this;return O.MsgRecvPacket.fromPartial({packet:t==null?void 0:t.toProto(),proofCommitment:Buffer.from(e,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",value:O.MsgRecvPacket.encode(this.toProto()).finish()})}static unpackAny(t){return Cn.fromProto(O.MsgRecvPacket.decode(t.value))}}class Un extends m{constructor(t,e,o,r,s){super(),this.packet=t,this.acknowledgement=e,this.proof_acked=o,this.proof_height=r,this.signer=s}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{packet:e,acknowledgement:o,proof_acked:r,proof_height:s,signer:n}=t;return new Un(e?At.fromData(e):void 0,r,o,s?w.fromData(s):void 0,n)}toData(){const{packet:t,acknowledgement:e,proof_acked:o,proof_height:r,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgAcknowledgement",packet:t==null?void 0:t.toData(),acknowledgement:e,proof_acked:o,proof_height:r==null?void 0:r.toData(),signer:s}}static fromProto(t){return new Un(t.packet?At.fromProto(t.packet):void 0,Buffer.from(t.acknowledgement).toString("base64"),Buffer.from(t.proofAcked).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,acknowledgement:e,proof_acked:o,proof_height:r,signer:s}=this;return O.MsgAcknowledgement.fromPartial({packet:t==null?void 0:t.toProto(),acknowledgement:Buffer.from(e,"base64"),proofAcked:Buffer.from(o,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",value:O.MsgAcknowledgement.encode(this.toProto()).finish()})}static unpackAny(t){return Un.fromProto(O.MsgAcknowledgement.decode(t.value))}}class Bn extends m{constructor(t,e,o,r,s){super(),this.packet=t,this.proof_unreceived=e,this.proof_height=o,this.next_sequence_recv=r,this.signer=s}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{packet:e,proof_unreceived:o,proof_height:r,next_sequence_recv:s,signer:n}=t;return new Bn(e?At.fromData(e):void 0,o,r?w.fromData(r):void 0,parseInt(s),n)}toData(){const{packet:t,proof_unreceived:e,proof_height:o,next_sequence_recv:r,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgTimeout",packet:t==null?void 0:t.toData(),proof_unreceived:e,proof_height:o==null?void 0:o.toData(),next_sequence_recv:r.toFixed(),signer:s}}static fromProto(t){return new Bn(t.packet?At.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,Number(t.nextSequenceRecv),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_height:o,next_sequence_recv:r,signer:s}=this;return O.MsgTimeout.fromPartial({packet:t==null?void 0:t.toProto(),proofUnreceived:Buffer.from(e,"base64"),proofHeight:o==null?void 0:o.toProto(),nextSequenceRecv:BigInt(r),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeout",value:O.MsgTimeout.encode(this.toProto()).finish()})}static unpackAny(t){return Bn.fromProto(O.MsgTimeout.decode(t.value))}}class En extends m{constructor(t,e,o,r,s,n){super(),this.packet=t,this.proof_unreceived=e,this.proof_close=o,this.proof_height=r,this.next_sequence_recv=s,this.signer=n}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{packet:e,proof_unreceived:o,proof_close:r,proof_height:s,next_sequence_recv:n,signer:a}=t;return new En(e?At.fromData(e):void 0,r,o,s?w.fromData(s):void 0,parseInt(n),a)}toData(){const{packet:t,proof_unreceived:e,proof_close:o,proof_height:r,next_sequence_recv:s,signer:n}=this;return{"@type":"/ibc.core.channel.v1.MsgTimeoutOnClose",packet:t==null?void 0:t.toData(),proof_unreceived:e,proof_close:o,proof_height:r==null?void 0:r.toData(),next_sequence_recv:s.toFixed(),signer:n}}static fromProto(t){return new En(t.packet?At.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),Buffer.from(t.proofClose).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,Number(t.nextSequenceRecv),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_close:o,proof_height:r,next_sequence_recv:s,signer:n}=this;return O.MsgTimeoutOnClose.fromPartial({packet:t==null?void 0:t.toProto(),proofUnreceived:Buffer.from(e,"base64"),proofClose:Buffer.from(o,"base64"),proofHeight:r==null?void 0:r.toProto(),nextSequenceRecv:BigInt(s),signer:n})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",value:O.MsgTimeoutOnClose.encode(this.toProto()).finish()})}static unpackAny(t){return En.fromProto(O.MsgTimeoutOnClose.decode(t.value))}}class Nn extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{authority:e,params:o}=t;return new Nn(e,wn.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/ibc.core.channel.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Nn(t.authority,wn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return O.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgUpdateParams",value:O.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Nn.fromProto(O.MsgUpdateParams.decode(t.value))}}class oa extends m{constructor(t,e,o,r,s){super(),this.client_id=t,this.counterparty=e,this.version=o,this.delay_period=r,this.signer=s}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{client_id:e,counterparty:o,version:r,delay_period:s,signer:n}=t;return new oa(e,Et.fromData(o),r?yt.fromData(r):void 0,parseInt(s),n)}toData(){const{client_id:t,counterparty:e,version:o,delay_period:r,signer:s}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenInit",client_id:t,counterparty:e.toData(),version:o==null?void 0:o.toData(),delay_period:r.toFixed(),signer:s}}static fromProto(t){return new oa(t.clientId,Et.fromProto(t.counterparty),t.version?yt.fromProto(t.version):void 0,Number(t.delayPeriod),t.signer)}toProto(){const{client_id:t,counterparty:e,version:o,delay_period:r,signer:s}=this;return ut.MsgConnectionOpenInit.fromPartial({clientId:t,counterparty:e.toProto(),version:o==null?void 0:o.toProto(),delayPeriod:BigInt(r),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",value:ut.MsgConnectionOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return oa.fromProto(ut.MsgConnectionOpenInit.decode(t.value))}}class ra extends m{constructor(t,e,o,r,s,n,a,i,d,h,y){super(),this.client_id=t,this.client_state=e,this.counterparty=o,this.delay_period=r,this.counterparty_versions=s,this.proof_height=n,this.proof_init=a,this.proof_client=i,this.proof_consensus=d,this.consensus_height=h,this.signer=y}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{client_id:e,client_state:o,counterparty:r,delay_period:s,counterparty_versions:n,proof_height:a,proof_init:i,proof_client:d,proof_consensus:h,consensus_height:y,signer:_}=t;return new ra(e,o,r?Et.fromData(r):void 0,parseInt(s),n.map(A=>yt.fromData(A)),a?w.fromData(a):void 0,Buffer.from(i).toString("base64"),Buffer.from(d).toString("base64"),Buffer.from(h).toString("base64"),y?w.fromData(y):void 0,_)}toData(){const{client_id:t,client_state:e,counterparty:o,delay_period:r,counterparty_versions:s,proof_height:n,proof_init:a,proof_client:i,proof_consensus:d,consensus_height:h,signer:y}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenTry",client_id:t,client_state:e,counterparty:o==null?void 0:o.toData(),delay_period:r.toFixed(),counterparty_versions:s.map(_=>_.toData()),proof_height:n==null?void 0:n.toData(),proof_init:a,proof_client:i,proof_consensus:d,consensus_height:h==null?void 0:h.toData(),signer:y}}static fromProto(t){return new ra(t.clientId,t.clientState,t.counterparty?Et.fromProto(t.counterparty):void 0,Number(t.delayPeriod),t.counterpartyVersions.map(e=>yt.fromProto(e)),t.proofHeight?w.fromProto(t.proofHeight):void 0,Buffer.from(t.proofInit).toString("base64"),Buffer.from(t.proofClient).toString("base64"),Buffer.from(t.proofConsensus).toString("base64"),t.consensusHeight?w.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{client_id:t,client_state:e,counterparty:o,delay_period:r,counterparty_versions:s,proof_height:n,proof_init:a,proof_client:i,proof_consensus:d,consensus_height:h,signer:y}=this;return ut.MsgConnectionOpenTry.fromPartial({clientId:t,clientState:e,counterparty:o==null?void 0:o.toProto(),delayPeriod:BigInt(r),counterpartyVersions:s.map(_=>_.toProto()),proofHeight:n==null?void 0:n.toProto(),proofInit:Buffer.from(a,"base64"),proofClient:Buffer.from(i,"base64"),proofConsensus:Buffer.from(d,"base64"),consensusHeight:h==null?void 0:h.toProto(),signer:y})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",value:ut.MsgConnectionOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return ra.fromProto(ut.MsgConnectionOpenTry.decode(t.value))}}class sa extends m{constructor(t,e,o,r){super(),this.connection_id=t,this.proof_ack=e,this.proof_height=o,this.signer=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{connection_id:e,proof_ack:o,proof_height:r,signer:s}=t;return new sa(e,o,r?w.fromData(r):void 0,s)}toData(){const{connection_id:t,proof_ack:e,proof_height:o,signer:r}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenConfirm",connection_id:t,proof_ack:e,proof_height:o==null?void 0:o.toData(),signer:r}}static fromProto(t){return new sa(t.connectionId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?w.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{connection_id:t,proof_ack:e,proof_height:o,signer:r}=this;return ut.MsgConnectionOpenConfirm.fromPartial({connectionId:t,proofAck:Buffer.from(e,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",value:ut.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return sa.fromProto(ut.MsgConnectionOpenConfirm.decode(t.value))}}class na extends m{constructor(t,e,o,r,s,n,a,i,d,h){super(),this.connection_id=t,this.counterparty_connection_id=e,this.version=o,this.client_state=r,this.proof_height=s,this.proof_try=n,this.proof_client=a,this.proof_consensus=i,this.consensus_height=d,this.signer=h}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{connection_id:e,counterparty_connection_id:o,version:r,client_state:s,proof_height:n,proof_try:a,proof_client:i,proof_consensus:d,consensus_height:h,signer:y}=t;return new na(e,o,r?yt.fromData(r):void 0,s,n?w.fromData(n):void 0,a,i,d,h?w.fromData(h):void 0,y)}toData(){const{connection_id:t,counterparty_connection_id:e,version:o,client_state:r,proof_height:s,proof_try:n,proof_client:a,proof_consensus:i,consensus_height:d,signer:h}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenAck",connection_id:t,counterparty_connection_id:e,version:o==null?void 0:o.toData(),client_state:r,proof_height:s==null?void 0:s.toData(),proof_try:n,proof_client:a,proof_consensus:i,consensus_height:d==null?void 0:d.toData(),signer:h}}static fromProto(t){return new na(t.connectionId,t.counterpartyConnectionId,t.version?yt.fromProto(t.version):void 0,t.clientState,t.proofHeight?w.fromProto(t.proofHeight):void 0,Buffer.from(t.proofTry).toString("base64"),Buffer.from(t.proofClient).toString("base64"),Buffer.from(t.proofConsensus).toString("base64"),t.consensusHeight?w.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{connection_id:t,counterparty_connection_id:e,version:o,client_state:r,proof_height:s,proof_try:n,proof_client:a,proof_consensus:i,consensus_height:d,signer:h}=this;return ut.MsgConnectionOpenAck.fromPartial({connectionId:t,counterpartyConnectionId:e,version:o==null?void 0:o.toProto(),clientState:r,proofHeight:s==null?void 0:s.toProto(),proofTry:Buffer.from(n,"base64"),proofClient:Buffer.from(a,"base64"),proofConsensus:Buffer.from(i,"base64"),consensusHeight:d==null?void 0:d.toProto(),signer:h})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",value:ut.MsgConnectionOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return na.fromProto(ut.MsgConnectionOpenAck.decode(t.value))}}class aa extends m{constructor(t,e){super(),this.signer=t,this.params=e}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{signer:e,params:o}=t;return new aa(e,Dn.fromData(o))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.core.connection.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new aa(t.signer,Dn.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return ut.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgUpdateParams",value:ut.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return aa.fromProto(ut.MsgUpdateParams.decode(t.value))}}class or extends m{constructor(t,e,o,r){super(),this.owner=t,this.connection_id=e,this.version=o,this.ordering=r}static fromAmino(t){const{value:{owner:e,connection_id:o,version:r,ordering:s}}=t;return new or(e,o,r,s)}toAmino(){const{owner:t,connection_id:e,version:o,ordering:r}=this;return{type:"intertx/MsgRegisterAccount",value:{owner:t,connection_id:e,version:o,ordering:r}}}static fromData(t){const{owner:e,connection_id:o,version:r,ordering:s}=t;return new or(e,o,r,s)}toData(){const{owner:t,connection_id:e,version:o,ordering:r}=this;return{"@type":"/initia.intertx.v1.MsgRegisterAccount",owner:t,connection_id:e,version:o,ordering:r}}static fromProto(t){return new or(t.owner,t.connectionId,t.version,t.ordering)}toProto(){const{owner:t,connection_id:e,version:o,ordering:r}=this;return Qn.MsgRegisterAccount.fromPartial({owner:t,connectionId:e,version:o,ordering:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgRegisterAccount",value:Qn.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return or.fromProto(Qn.MsgRegisterAccount.decode(t.value))}}class rr extends m{constructor(t,e,o){super(),this.owner=t,this.connection_id=e,this.msg=o}static fromAmino(t){const{value:{owner:e,connection_id:o,msg:r}}=t;return new rr(e,o,r?exports.Msg.fromAmino(r):void 0)}toAmino(){const{owner:t,connection_id:e,msg:o}=this;return{type:"intertx/MsgSubmitTx",value:{owner:t,connection_id:e,msg:o==null?void 0:o.toAmino()}}}static fromData(t){const{owner:e,connection_id:o,msg:r}=t;return new rr(e,o,r?exports.Msg.fromData(r):void 0)}toData(){const{owner:t,connection_id:e,msg:o}=this;return{"@type":"/initia.intertx.v1.MsgSubmitTx",owner:t,connection_id:e,msg:o==null?void 0:o.toData()}}static fromProto(t){return new rr(t.owner,t.connectionId,t.msg?exports.Msg.fromProto(t.msg):void 0)}toProto(){const{owner:t,connection_id:e,msg:o}=this;return Qn.MsgSubmitTx.fromPartial({owner:t,connectionId:e,msg:o==null?void 0:o.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgSubmitTx",value:Qn.MsgSubmitTx.encode(this.toProto()).finish()})}static unpackAny(t){return rr.fromProto(Qn.MsgSubmitTx.decode(t.value))}}class dt extends m{constructor(t,e){super(),this.Base=t,this.Quote=e}toString(){return`${this.Base}/${this.Quote}`}static fromAmino(t){return new dt(t.Base,t.Quote)}toAmino(){return{Base:this.Base,Quote:this.Quote}}static fromData(t){return new dt(t.Base,t.Quote)}toData(){return{Base:this.Base,Quote:this.Quote}}static fromProto(t){return new dt(t.Base,t.Quote)}toProto(){return Lc.CurrencyPair.fromPartial({Base:this.Base,Quote:this.Quote})}}class sr extends m{constructor(t,e){super(),this.authority=t,this.currency_pairs=e}static fromAmino(t){const{value:{authority:e,currency_pairs:o}}=t;return new sr(e,o.map(dt.fromAmino))}toAmino(){const{authority:t,currency_pairs:e}=this;return{type:"connect/x/oracle/MsgAddCurrencyPairs",value:{authority:t,currency_pairs:e.map(o=>o.toAmino())}}}static fromData(t){const{authority:e,currency_pairs:o}=t;return new sr(e,o.map(dt.fromData))}toData(){const{authority:t,currency_pairs:e}=this;return{"@type":"/connect.oracle.v2.MsgAddCurrencyPairs",authority:t,currency_pairs:e.map(o=>o.toData())}}static fromProto(t){return new sr(t.authority,t.currencyPairs.map(dt.fromProto))}toProto(){const{authority:t,currency_pairs:e}=this;return Yn.MsgAddCurrencyPairs.fromPartial({authority:t,currencyPairs:e.map(o=>o.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgAddCurrencyPairs",value:Yn.MsgAddCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return sr.fromProto(Yn.MsgAddCurrencyPairs.decode(t.value))}}class nr extends m{constructor(t,e){super(),this.authority=t,this.currency_pair_ids=e}static fromAmino(t){const{value:{authority:e,currency_pair_ids:o}}=t;return new nr(e,o)}toAmino(){const{authority:t,currency_pair_ids:e}=this;return{type:"connect/x/oracle/MsgRemoveCurrencyPairs",value:{authority:t,currency_pair_ids:e}}}static fromData(t){const{authority:e,currency_pair_ids:o}=t;return new nr(e,o)}toData(){const{authority:t,currency_pair_ids:e}=this;return{"@type":"/connect.oracle.v2.MsgRemoveCurrencyPairs",authority:t,currency_pair_ids:e}}static fromProto(t){return new nr(t.authority,t.currencyPairIds)}toProto(){const{authority:t,currency_pair_ids:e}=this;return Yn.MsgRemoveCurrencyPairs.fromPartial({authority:t,currencyPairIds:e})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgRemoveCurrencyPairs",value:Yn.MsgRemoveCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return nr.fromProto(Yn.MsgRemoveCurrencyPairs.decode(t.value))}}class ia extends m{constructor(t,e,o){super(),this.price=t,this.block_timestamp=e,this.block_height=o}static fromAmino(t){const{price:e,block_timestamp:o,block_height:r}=t;return new ia(e,new Date(o),parseInt(r))}toAmino(){const{price:t,block_timestamp:e,block_height:o}=this;return{price:t,block_timestamp:e.toISOString(),block_height:o.toFixed()}}static fromData(t){const{price:e,block_timestamp:o,block_height:r}=t;return new ia(e,new Date(o),parseInt(r))}toData(){const{price:t,block_timestamp:e,block_height:o}=this;return{price:t,block_timestamp:e.toISOString(),block_height:o.toFixed()}}static fromProto(t){return new ia(t.price,t.blockTimestamp,Number(t.blockHeight))}toProto(){const{price:t,block_timestamp:e,block_height:o}=this;return zc.QuotePrice.fromPartial({price:t,blockTimestamp:e,blockHeight:BigInt(o)})}}class Ws extends m{constructor(t,e,o,r,s){super(),this.name=t,this.off_chain_ticker=e,this.normalize_by_pair=o,this.invert=r,this.metadata_JSON=s}static fromAmino(t){const{name:e,off_chain_ticker:o,normalize_by_pair:r,invert:s,metadata_JSON:n}=t;return new Ws(e,o,r?dt.fromAmino(r):void 0,s,n)}toAmino(){const{name:t,off_chain_ticker:e,normalize_by_pair:o,invert:r,metadata_JSON:s}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:o==null?void 0:o.toAmino(),invert:r,metadata_JSON:s}}static fromData(t){const{name:e,off_chain_ticker:o,normalize_by_pair:r,invert:s,metadata_JSON:n}=t;return new Ws(e,o,r?dt.fromData(r):void 0,s,n)}toData(){const{name:t,off_chain_ticker:e,normalize_by_pair:o,invert:r,metadata_JSON:s}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:o==null?void 0:o.toData(),invert:r,metadata_JSON:s}}static fromProto(t){return new Ws(t.name,t.offChainTicker,t.normalizeByPair?dt.fromProto(t.normalizeByPair):void 0,t.invert,t.metadataJSON)}toProto(){const{name:t,off_chain_ticker:e,normalize_by_pair:o,invert:r,metadata_JSON:s}=this;return li.ProviderConfig.fromPartial({name:t,offChainTicker:e,normalizeByPair:o==null?void 0:o.toProto(),invert:r,metadataJSON:s})}}class Hs extends m{constructor(t,e,o,r,s){super(),this.currency_pair=t,this.decimals=e,this.min_provider_count=o,this.enabled=r,this.metadata_JSON=s}static fromAmino(t){const{currency_pair:e,decimals:o,min_provider_count:r,enabled:s,metadata_JSON:n}=t;return new Hs(dt.fromAmino(e),parseInt(o),parseInt(r),s,n)}toAmino(){const{currency_pair:t,decimals:e,min_provider_count:o,enabled:r,metadata_JSON:s}=this;return{currency_pair:t.toAmino(),decimals:e.toFixed(),min_provider_count:o.toFixed(),enabled:r,metadata_JSON:s}}static fromData(t){const{currency_pair:e,decimals:o,min_provider_count:r,enabled:s,metadata_JSON:n}=t;return new Hs(dt.fromData(e),parseInt(o),parseInt(r),s,n)}toData(){const{currency_pair:t,decimals:e,min_provider_count:o,enabled:r,metadata_JSON:s}=this;return{currency_pair:t.toData(),decimals:e.toFixed(),min_provider_count:o.toFixed(),enabled:r,metadata_JSON:s}}static fromProto(t){return new Hs(dt.fromProto(t.currencyPair),Number(t.decimals),Number(t.minProviderCount),t.enabled,t.metadataJSON)}toProto(){const{currency_pair:t,decimals:e,min_provider_count:o,enabled:r,metadata_JSON:s}=this;return li.Ticker.fromPartial({currencyPair:t,decimals:BigInt(e),minProviderCount:BigInt(o),enabled:r,metadataJSON:s})}}class nt extends m{constructor(t,e){super(),this.ticker=t,this.provider_configs=e}static fromAmino(t){const{ticker:e,provider_configs:o}=t;return new nt(Hs.fromAmino(e),o.map(Ws.fromAmino))}toAmino(){const{ticker:t,provider_configs:e}=this;return{ticker:t.toAmino(),provider_configs:e.map(o=>o.toAmino())}}static fromData(t){const{ticker:e,provider_configs:o}=t;return new nt(Hs.fromData(e),o.map(Ws.fromData))}toData(){const{ticker:t,provider_configs:e}=this;return{ticker:t.toData(),provider_configs:e.map(o=>o.toData())}}static fromProto(t){return new nt(Hs.fromProto(t.ticker),t.providerConfigs.map(Ws.fromProto))}toProto(){const{ticker:t,provider_configs:e}=this;return li.Market.fromPartial({ticker:t.toProto(),providerConfigs:e.map(o=>o.toProto())})}}class ar extends m{constructor(t,e){super(),this.authority=t,this.create_markets=e}static fromAmino(t){const{value:{authority:e,create_markets:o}}=t;return new ar(e,o.map(nt.fromAmino))}toAmino(){const{authority:t,create_markets:e}=this;return{type:"connect/x/marketmap/MsgCreateMarkets",value:{authority:t,create_markets:e.map(o=>o.toAmino())}}}static fromData(t){const{authority:e,create_markets:o}=t;return new ar(e,o.map(nt.fromData))}toData(){const{authority:t,create_markets:e}=this;return{"@type":"/connect.marketmap.v2.MsgCreateMarkets",authority:t,create_markets:e.map(o=>o.toData())}}static fromProto(t){return new ar(t.authority,t.createMarkets.map(nt.fromProto))}toProto(){const{authority:t,create_markets:e}=this;return rt.MsgCreateMarkets.fromPartial({authority:t,createMarkets:e.map(o=>o.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgCreateMarkets",value:rt.MsgCreateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return ar.fromProto(rt.MsgCreateMarkets.decode(t.value))}}class ir extends m{constructor(t,e){super(),this.authority=t,this.update_markets=e}static fromAmino(t){const{value:{authority:e,update_markets:o}}=t;return new ir(e,o.map(nt.fromAmino))}toAmino(){const{authority:t,update_markets:e}=this;return{type:"connect/x/marketmap/MsgUpdateMarkets",value:{authority:t,update_markets:e.map(o=>o.toAmino())}}}static fromData(t){const{authority:e,update_markets:o}=t;return new ir(e,o.map(nt.fromData))}toData(){const{authority:t,update_markets:e}=this;return{"@type":"/connect.marketmap.v2.MsgUpdateMarkets",authority:t,update_markets:e.map(o=>o.toData())}}static fromProto(t){return new ir(t.authority,t.updateMarkets.map(nt.fromProto))}toProto(){const{authority:t,update_markets:e}=this;return rt.MsgUpdateMarkets.fromPartial({authority:t,updateMarkets:e.map(o=>o.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpdateMarkets",value:rt.MsgUpdateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return ir.fromProto(rt.MsgUpdateMarkets.decode(t.value))}}class cr extends m{constructor(t,e){super(),this.authority=t,this.markets=e}static fromAmino(t){const{value:{authority:e,markets:o}}=t;return new cr(e,o.map(nt.fromAmino))}toAmino(){const{authority:t,markets:e}=this;return{type:"connect/x/marketmap/MsgUpsertMarkets",value:{authority:t,markets:e.map(o=>o.toAmino())}}}static fromData(t){const{authority:e,markets:o}=t;return new cr(e,o.map(nt.fromData))}toData(){const{authority:t,markets:e}=this;return{"@type":"/connect.marketmap.v2.MsgUpsertMarkets",authority:t,markets:e.map(o=>o.toData())}}static fromProto(t){return new cr(t.authority,t.markets.map(nt.fromProto))}toProto(){const{authority:t,markets:e}=this;return rt.MsgUpsertMarkets.fromPartial({authority:t,markets:e.map(o=>o.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpsertMarkets",value:rt.MsgUpsertMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return cr.fromProto(rt.MsgUpsertMarkets.decode(t.value))}}class mr extends m{constructor(t,e){super(),this.authority=t,this.markets=e}static fromAmino(t){const{value:{authority:e,markets:o}}=t;return new mr(e,o)}toAmino(){const{authority:t,markets:e}=this;return{type:"connect/x/marketmap/MsgRemoveMarkets",value:{authority:t,markets:e}}}static fromData(t){const{authority:e,markets:o}=t;return new mr(e,o)}toData(){const{authority:t,markets:e}=this;return{"@type":"/connect.marketmap.v2.MsgRemoveMarkets",authority:t,markets:e}}static fromProto(t){return new mr(t.authority,t.markets)}toProto(){const{authority:t,markets:e}=this;return rt.MsgRemoveMarkets.fromPartial({authority:t,markets:e})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgRemoveMarkets",value:rt.MsgRemoveMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return mr.fromProto(rt.MsgRemoveMarkets.decode(t.value))}}class ur extends m{constructor(t,e){super(),this.remove_addresses=t,this.admin=e}static fromAmino(t){const{value:{remove_addresses:e,admin:o}}=t;return new ur(e,o)}toAmino(){const{remove_addresses:t,admin:e}=this;return{type:"connect/x/marketmap/MsgRemoveMarketAuthorities",value:{remove_addresses:t,admin:e}}}static fromData(t){const{remove_addresses:e,admin:o}=t;return new ur(e,o)}toData(){const{remove_addresses:t,admin:e}=this;return{"@type":"/connect.marketmap.v2.MsgRemoveMarketAuthorities",remove_addresses:t,admin:e}}static fromProto(t){return new ur(t.removeAddresses,t.admin)}toProto(){const{remove_addresses:t,admin:e}=this;return rt.MsgRemoveMarketAuthorities.fromPartial({removeAddresses:t,admin:e})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgRemoveMarketAuthorities",value:rt.MsgRemoveMarketAuthorities.encode(this.toProto()).finish()})}static unpackAny(t){return ur.fromProto(rt.MsgRemoveMarketAuthorities.decode(t.value))}}class Ps extends m{constructor(t,e){super(),this.market_authorities=t,this.admin=e}static fromAmino(t){return new Ps(t.market_authorities,t.admin)}toAmino(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromData(t){return new Ps(t.market_authorities,t.admin)}toData(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromProto(t){return new Ps(t.marketAuthorities,t.admin)}toProto(){const{market_authorities:t,admin:e}=this;return Gc.Params.fromPartial({marketAuthorities:t,admin:e})}}class dr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new dr(e,Ps.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"connect/x/marketmap/MsgParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new dr(e,Ps.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/connect.marketmap.v2.MsgParams",authority:t,params:e.toData()}}static fromProto(t){return new dr(t.authority,Ps.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return rt.MsgParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgParams",value:rt.MsgParams.encode(this.toProto()).finish()})}static unpackAny(t){return dr.fromProto(rt.MsgParams.decode(t.value))}}class Jt extends m{constructor(t,e,o){super(),this.sender=t,this.code_bytes=e,this.upgrade_policy=o}static fromAmino(t){const{value:{sender:e,code_bytes:o,upgrade_policy:r}}=t;return new Jt(e,o,r||0)}toAmino(){const{sender:t,code_bytes:e,upgrade_policy:o}=this;return{type:"move/MsgPublish",value:{sender:t,code_bytes:e,upgrade_policy:o===wt.UpgradePolicy.UNSPECIFIED?void 0:o}}}static fromData(t){const{sender:e,code_bytes:o,upgrade_policy:r}=t;return new Jt(e,o,r)}toData(){const{sender:t,code_bytes:e,upgrade_policy:o}=this;return{"@type":"/initia.move.v1.MsgPublish",sender:t,code_bytes:e,upgrade_policy:o}}static fromProto(t){return new Jt(t.sender,t.codeBytes.map(e=>Buffer.from(e).toString("base64")),t.upgradePolicy)}toProto(){const{sender:t,code_bytes:e,upgrade_policy:o}=this;return U.MsgPublish.fromPartial({sender:t,codeBytes:e.map(r=>Buffer.from(r,"base64")),upgradePolicy:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgPublish",value:U.MsgPublish.encode(this.toProto()).finish()})}static unpackAny(t){return Jt.fromProto(U.MsgPublish.decode(t.value))}}(c=>{c.Policy=wt.UpgradePolicy})(Jt||(Jt={}));class lr extends m{constructor(e,o,r,s,n=[],a=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.module_address=o,this.module_name=r,this.function_name=s,this.type_args=n,this.args=a}static fromAmino(e){const{value:{sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}}=e;return new lr(o,r,s,n,a??[],i??[])}toAmino(){const{sender:e,module_address:o,module_name:r,function_name:s,type_args:n,args:a}=this;return{type:"move/MsgExecute",value:{sender:e,module_address:o,module_name:r,function_name:s,type_args:n.length===0?void 0:n,args:a.length===0?void 0:a}}}static fromData(e){const{sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}=e;return new lr(o,r,s,n,a,i)}toData(){const{sender:e,module_address:o,module_name:r,function_name:s,type_args:n,args:a}=this;return{"@type":"/initia.move.v1.MsgExecute",sender:e,module_address:o,module_name:r,function_name:s,type_args:n,args:a}}static fromProto(e){return new lr(e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args.map(o=>Buffer.from(o).toString("base64")))}toProto(){const{sender:e,module_address:o,module_name:r,function_name:s,type_args:n,args:a}=this;return U.MsgExecute.fromPartial({sender:e,moduleAddress:o,moduleName:r,functionName:s,typeArgs:n,args:a.map(i=>Buffer.from(i,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecute",value:U.MsgExecute.encode(this.toProto()).finish()})}static unpackAny(e){return lr.fromProto(U.MsgExecute.decode(e.value))}}class pr extends m{constructor(e,o,r,s,n=[],a=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.module_address=o,this.module_name=r,this.function_name=s,this.type_args=n,this.args=a}static fromAmino(e){const{value:{sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}}=e;return new pr(o,r,s,n,a??[],i??[])}toAmino(){const{sender:e,module_address:o,module_name:r,function_name:s,type_args:n,args:a}=this;return{type:"move/MsgExecuteJSON",value:{sender:e,module_address:o,module_name:r,function_name:s,type_args:n.length===0?void 0:n,args:a.length===0?void 0:a}}}static fromData(e){const{sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}=e;return new pr(o,r,s,n,a,i)}toData(){const{sender:e,module_address:o,module_name:r,function_name:s,type_args:n,args:a}=this;return{"@type":"/initia.move.v1.MsgExecuteJSON",sender:e,module_address:o,module_name:r,function_name:s,type_args:n,args:a}}static fromProto(e){return new pr(e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args)}toProto(){const{sender:e,module_address:o,module_name:r,function_name:s,type_args:n,args:a}=this;return U.MsgExecuteJSON.fromPartial({sender:e,moduleAddress:o,moduleName:r,functionName:s,typeArgs:n,args:a})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecuteJSON",value:U.MsgExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return pr.fromProto(U.MsgExecuteJSON.decode(e.value))}}class hr extends m{constructor(e,o,r=[],s=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.code_bytes=o,this.type_args=r,this.args=s}static fromAmino(e){const{value:{sender:o,code_bytes:r,type_args:s,args:n}}=e;return new hr(o,r,s??[],n??[])}toAmino(){const{sender:e,code_bytes:o,type_args:r,args:s}=this;return{type:"move/MsgScript",value:{sender:e,code_bytes:o,type_args:r.length===0?void 0:r,args:s.length===0?void 0:s}}}static fromData(e){const{sender:o,code_bytes:r,type_args:s,args:n}=e;return new hr(o,r,s,n)}toData(){const{sender:e,code_bytes:o,type_args:r,args:s}=this;return{"@type":"/initia.move.v1.MsgScript",sender:e,code_bytes:o,type_args:r,args:s}}static fromProto(e){return new hr(e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args.map(o=>Buffer.from(o).toString("base64")))}toProto(){const{sender:e,code_bytes:o,type_args:r,args:s}=this;return U.MsgScript.fromPartial({sender:e,codeBytes:Buffer.from(o,"base64"),typeArgs:r,args:s.map(n=>Buffer.from(n,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScript",value:U.MsgScript.encode(this.toProto()).finish()})}static unpackAny(e){return hr.fromProto(U.MsgScript.decode(e.value))}}class fr extends m{constructor(e,o,r=[],s=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.code_bytes=o,this.type_args=r,this.args=s}static fromAmino(e){const{value:{sender:o,code_bytes:r,type_args:s,args:n}}=e;return new fr(o,r,s??[],n??[])}toAmino(){const{sender:e,code_bytes:o,type_args:r,args:s}=this;return{type:"move/MsgScriptJSON",value:{sender:e,code_bytes:o,type_args:r.length===0?void 0:r,args:s.length===0?void 0:s}}}static fromData(e){const{sender:o,code_bytes:r,type_args:s,args:n}=e;return new fr(o,r,s,n)}toData(){const{sender:e,code_bytes:o,type_args:r,args:s}=this;return{"@type":"/initia.move.v1.MsgScriptJSON",sender:e,code_bytes:o,type_args:r,args:s}}static fromProto(e){return new fr(e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args)}toProto(){const{sender:e,code_bytes:o,type_args:r,args:s}=this;return U.MsgScriptJSON.fromPartial({sender:e,codeBytes:Buffer.from(o,"base64"),typeArgs:r,args:s})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScriptJSON",value:U.MsgScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return fr.fromProto(U.MsgScriptJSON.decode(e.value))}}class As extends m{constructor(t,e,o,r,s){super(),this.base_denom=t,this.base_min_gas_price=e,this.contract_shared_revenue_ratio=o,this.script_enabled=r,this.allowed_publishers=s}static fromAmino(t){const{value:{base_denom:e,base_min_gas_price:o,contract_shared_revenue_ratio:r,script_enabled:s,allowed_publishers:n}}=t;return new As(e,o,r,s,n)}toAmino(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:o,script_enabled:r,allowed_publishers:s}=this;return{type:"move/Params",value:{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:o,script_enabled:r,allowed_publishers:s}}}static fromData(t){const{base_denom:e,base_min_gas_price:o,contract_shared_revenue_ratio:r,script_enabled:s,allowed_publishers:n}=t;return new As(e,o,r,s,n)}toData(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:o,script_enabled:r,allowed_publishers:s}=this;return{"@type":"/initia.move.v1.Params",base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:o,script_enabled:r,allowed_publishers:s}}static fromProto(t){return new As(t.baseDenom,t.baseMinGasPrice,t.contractSharedRevenueRatio,t.scriptEnabled,t.allowedPublishers)}toProto(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:o,script_enabled:r,allowed_publishers:s}=this;return wt.Params.fromPartial({baseDenom:t,baseMinGasPrice:e,contractSharedRevenueRatio:o,scriptEnabled:r,allowedPublishers:s})}}class gr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new gr(e,As.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"move/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new gr(e,As.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.move.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new gr(t.authority,As.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return U.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgUpdateParams",value:U.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return gr.fromProto(U.MsgUpdateParams.decode(t.value))}}class yr extends m{constructor(t,e,o){super(),this.authority=t,this.metadata_lp=e,this.reward_weight=o}static fromAmino(t){const{value:{authority:e,metadata_lp:o,reward_weight:r}}=t;return new yr(e,o,r)}toAmino(){const{authority:t,metadata_lp:e,reward_weight:o}=this;return{type:"move/MsgWhitelist",value:{authority:t,metadata_lp:e,reward_weight:o}}}static fromData(t){const{authority:e,metadata_lp:o,reward_weight:r}=t;return new yr(e,o,r)}toData(){const{authority:t,metadata_lp:e,reward_weight:o}=this;return{"@type":"/initia.move.v1.MsgWhitelist",authority:t,metadata_lp:e,reward_weight:o}}static fromProto(t){return new yr(t.authority,t.metadataLp,t.rewardWeight)}toProto(){const{authority:t,metadata_lp:e,reward_weight:o}=this;return U.MsgWhitelist.fromPartial({authority:t,metadataLp:e,rewardWeight:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgWhitelist",value:U.MsgWhitelist.encode(this.toProto()).finish()})}static unpackAny(t){return yr.fromProto(U.MsgWhitelist.decode(t.value))}}class _r extends m{constructor(t,e){super(),this.authority=t,this.metadata_lp=e}static fromAmino(t){const{value:{authority:e,metadata_lp:o}}=t;return new _r(e,o)}toAmino(){const{authority:t,metadata_lp:e}=this;return{type:"move/MsgDelist",value:{authority:t,metadata_lp:e}}}static fromData(t){const{authority:e,metadata_lp:o}=t;return new _r(e,o)}toData(){const{authority:t,metadata_lp:e}=this;return{"@type":"/initia.move.v1.MsgDelist",authority:t,metadata_lp:e}}static fromProto(t){return new _r(t.authority,t.metadataLp)}toProto(){const{authority:t,metadata_lp:e}=this;return U.MsgDelist.fromPartial({authority:t,metadataLp:e})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgDelist",value:U.MsgDelist.encode(this.toProto()).finish()})}static unpackAny(t){return _r.fromProto(U.MsgDelist.decode(t.value))}}class vr extends m{constructor(e,o,r,s,n,a=[],i=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=o,this.module_address=r,this.module_name=s,this.function_name=n,this.type_args=a,this.args=i}static fromAmino(e){const{value:{authority:o,sender:r,module_address:s,module_name:n,function_name:a,type_args:i,args:d}}=e;return new vr(o,r,s,n,a,i??[],d??[])}toAmino(){const{authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}=this;return{type:"move/MsgGovExecute",value:{authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a.length===0?void 0:a,args:i.length===0?void 0:i}}}static fromData(e){const{authority:o,sender:r,module_address:s,module_name:n,function_name:a,type_args:i,args:d}=e;return new vr(o,r,s,n,a,i,d)}toData(){const{authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}=this;return{"@type":"/initia.move.v1.MsgGovExecute",authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}}static fromProto(e){return new vr(e.authority,e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args.map(o=>Buffer.from(o).toString("base64")))}toProto(){const{authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}=this;return U.MsgGovExecute.fromPartial({authority:e,sender:o,moduleAddress:r,moduleName:s,functionName:n,typeArgs:a,args:i.map(d=>Buffer.from(d,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecute",value:U.MsgGovExecute.encode(this.toProto()).finish()})}static unpackAny(e){return vr.fromProto(U.MsgGovExecute.decode(e.value))}}class Pr extends m{constructor(e,o,r,s,n,a=[],i=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=o,this.module_address=r,this.module_name=s,this.function_name=n,this.type_args=a,this.args=i}static fromAmino(e){const{value:{authority:o,sender:r,module_address:s,module_name:n,function_name:a,type_args:i,args:d}}=e;return new Pr(o,r,s,n,a,i??[],d??[])}toAmino(){const{authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}=this;return{type:"move/MsgGovExecuteJSON",value:{authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a.length===0?void 0:a,args:i.length===0?void 0:i}}}static fromData(e){const{authority:o,sender:r,module_address:s,module_name:n,function_name:a,type_args:i,args:d}=e;return new Pr(o,r,s,n,a,i,d)}toData(){const{authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}=this;return{"@type":"/initia.move.v1.MsgGovExecuteJSON",authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}}static fromProto(e){return new Pr(e.authority,e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args)}toProto(){const{authority:e,sender:o,module_address:r,module_name:s,function_name:n,type_args:a,args:i}=this;return U.MsgGovExecuteJSON.fromPartial({authority:e,sender:o,moduleAddress:r,moduleName:s,functionName:n,typeArgs:a,args:i})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecuteJSON",value:U.MsgGovExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return Pr.fromProto(U.MsgGovExecuteJSON.decode(e.value))}}class Kt extends m{constructor(t,e,o,r){super(),this.authority=t,this.sender=e,this.code_bytes=o,this.upgrade_policy=r}static fromAmino(t){const{value:{authority:e,sender:o,code_bytes:r,upgrade_policy:s}}=t;return new Kt(e,o,r,s||0)}toAmino(){const{authority:t,sender:e,code_bytes:o,upgrade_policy:r}=this;return{type:"move/MsgGovPublish",value:{authority:t,sender:e,code_bytes:o,upgrade_policy:r===wt.UpgradePolicy.UNSPECIFIED?void 0:r}}}static fromData(t){const{authority:e,sender:o,code_bytes:r,upgrade_policy:s}=t;return new Kt(e,o,r,s)}toData(){const{authority:t,sender:e,code_bytes:o,upgrade_policy:r}=this;return{"@type":"/initia.move.v1.MsgGovPublish",authority:t,sender:e,code_bytes:o,upgrade_policy:r}}static fromProto(t){return new Kt(t.authority,t.sender,t.codeBytes.map(e=>Buffer.from(e).toString("base64")),t.upgradePolicy)}toProto(){const{authority:t,sender:e,code_bytes:o,upgrade_policy:r}=this;return U.MsgGovPublish.fromPartial({authority:t,sender:e,codeBytes:o.map(s=>Buffer.from(s,"base64")),upgradePolicy:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovPublish",value:U.MsgGovPublish.encode(this.toProto()).finish()})}static unpackAny(t){return Kt.fromProto(U.MsgGovPublish.decode(t.value))}}(c=>{c.Policy=wt.UpgradePolicy})(Kt||(Kt={}));class Ar extends m{constructor(e,o,r,s=[],n=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=o,this.code_bytes=r,this.type_args=s,this.args=n}static fromAmino(e){const{value:{authority:o,sender:r,code_bytes:s,type_args:n,args:a}}=e;return new Ar(o,r,s,n??[],a??[])}toAmino(){const{authority:e,sender:o,code_bytes:r,type_args:s,args:n}=this;return{type:"move/MsgGovScript",value:{authority:e,sender:o,code_bytes:r,type_args:s.length===0?void 0:s,args:n.length===0?void 0:n}}}static fromData(e){const{authority:o,sender:r,code_bytes:s,type_args:n,args:a}=e;return new Ar(o,r,s,n,a)}toData(){const{authority:e,sender:o,code_bytes:r,type_args:s,args:n}=this;return{"@type":"/initia.move.v1.MsgGovScript",authority:e,sender:o,code_bytes:r,type_args:s,args:n}}static fromProto(e){return new Ar(e.authority,e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args.map(o=>Buffer.from(o).toString("base64")))}toProto(){const{authority:e,sender:o,code_bytes:r,type_args:s,args:n}=this;return U.MsgGovScript.fromPartial({authority:e,sender:o,codeBytes:Buffer.from(r,"base64"),typeArgs:s,args:n.map(a=>Buffer.from(a,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScript",value:U.MsgGovScript.encode(this.toProto()).finish()})}static unpackAny(e){return Ar.fromProto(U.MsgGovScript.decode(e.value))}}class wr extends m{constructor(e,o,r,s=[],n=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=o,this.code_bytes=r,this.type_args=s,this.args=n}static fromAmino(e){const{value:{authority:o,sender:r,code_bytes:s,type_args:n,args:a}}=e;return new wr(o,r,s,n??[],a??[])}toAmino(){const{authority:e,sender:o,code_bytes:r,type_args:s,args:n}=this;return{type:"move/MsgGovScriptJSON",value:{authority:e,sender:o,code_bytes:r,type_args:s.length===0?void 0:s,args:n.length===0?void 0:n}}}static fromData(e){const{authority:o,sender:r,code_bytes:s,type_args:n,args:a}=e;return new wr(o,r,s,n,a)}toData(){const{authority:e,sender:o,code_bytes:r,type_args:s,args:n}=this;return{"@type":"/initia.move.v1.MsgGovScriptJSON",authority:e,sender:o,code_bytes:r,type_args:s,args:n}}static fromProto(e){return new wr(e.authority,e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args)}toProto(){const{authority:e,sender:o,code_bytes:r,type_args:s,args:n}=this;return U.MsgGovScriptJSON.fromPartial({authority:e,sender:o,codeBytes:Buffer.from(r,"base64"),typeArgs:s,args:n})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScriptJSON",value:U.MsgGovScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return wr.fromProto(U.MsgGovScriptJSON.decode(e.value))}}class ws extends m{constructor(t,e,o,r,s){super(),this.address=t,this.module_name=e,this.abi=o,this.raw_bytes=r,this.upgrade_policy=s}static fromAmino(t){const{address:e,module_name:o,abi:r,raw_bytes:s,upgrade_policy:n}=t;return new ws(e,o,r,s,wt.upgradePolicyFromJSON(n))}toAmino(){const{address:t,module_name:e,abi:o,raw_bytes:r,upgrade_policy:s}=this;return{address:t,module_name:e,abi:o,raw_bytes:r,upgrade_policy:wt.upgradePolicyToJSON(s)}}static fromData(t){const{address:e,module_name:o,abi:r,raw_bytes:s,upgrade_policy:n}=t;return new ws(e,o,r,s,wt.upgradePolicyFromJSON(n))}toData(){const{address:t,module_name:e,abi:o,raw_bytes:r,upgrade_policy:s}=this;return{address:t,module_name:e,abi:o,raw_bytes:r,upgrade_policy:wt.upgradePolicyToJSON(s)}}static fromProto(t){return new ws(t.address,t.moduleName,t.abi,Buffer.from(t.rawBytes).toString("base64"),t.upgradePolicy)}toProto(){const{address:t,module_name:e,abi:o,raw_bytes:r,upgrade_policy:s}=this;return wt.Module.fromPartial({address:t,moduleName:e,abi:o,rawBytes:Buffer.from(r,"base64"),upgradePolicy:s})}}(c=>{c.Policy=wt.UpgradePolicy})(ws||(ws={}));class br extends m{constructor(e,o,r){super();p(this,"amount");this.delegator_address=e,this.validator_address=o,this.amount=new u(r)}static fromAmino(e){const{value:{delegator_address:o,validator_address:r,amount:s}}=e;return new br(o,r,u.fromAmino(s))}toAmino(){const{delegator_address:e,validator_address:o,amount:r}=this;return{type:"mstaking/MsgDelegate",value:{delegator_address:e,validator_address:o,amount:r.toAmino()}}}static fromData(e){const{delegator_address:o,validator_address:r,amount:s}=e;return new br(o,r,u.fromData(s))}toData(){const{delegator_address:e,validator_address:o,amount:r}=this;return{"@type":"/initia.mstaking.v1.MsgDelegate",delegator_address:e,validator_address:o,amount:r.toData()}}static fromProto(e){return new br(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:o,amount:r}=this;return Y.MsgDelegate.fromPartial({amount:r.toProto(),delegatorAddress:e,validatorAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgDelegate",value:Y.MsgDelegate.encode(this.toProto()).finish()})}static unpackAny(e){return br.fromProto(Y.MsgDelegate.decode(e.value))}}class Dr extends m{constructor(e,o,r){super();p(this,"amount");this.delegator_address=e,this.validator_address=o,this.amount=new u(r)}static fromAmino(e){const{value:{delegator_address:o,validator_address:r,amount:s}}=e;return new Dr(o,r,u.fromAmino(s))}toAmino(){const{delegator_address:e,validator_address:o,amount:r}=this;return{type:"mstaking/MsgUndelegate",value:{delegator_address:e,validator_address:o,amount:r.toAmino()}}}static fromData(e){const{delegator_address:o,validator_address:r,amount:s}=e;return new Dr(o,r,u.fromData(s))}toData(){const{delegator_address:e,validator_address:o,amount:r}=this;return{"@type":"/initia.mstaking.v1.MsgUndelegate",delegator_address:e,validator_address:o,amount:r.toData()}}static fromProto(e){return new Dr(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:o,amount:r}=this;return Y.MsgUndelegate.fromPartial({amount:r.toProto(),delegatorAddress:e,validatorAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUndelegate",value:Y.MsgUndelegate.encode(this.toProto()).finish()})}static unpackAny(e){return Dr.fromProto(Y.MsgUndelegate.decode(e.value))}}class kr extends m{constructor(e,o,r,s){super();p(this,"amount");this.delegator_address=e,this.validator_src_address=o,this.validator_dst_address=r,this.amount=new u(s)}static fromAmino(e){const{value:{delegator_address:o,validator_src_address:r,validator_dst_address:s,amount:n}}=e;return new kr(o,r,s,u.fromAmino(n))}toAmino(){const{delegator_address:e,validator_src_address:o,validator_dst_address:r,amount:s}=this;return{type:"mstaking/MsgBeginRedelegate",value:{delegator_address:e,validator_src_address:o,validator_dst_address:r,amount:s.toAmino()}}}static fromData(e){const{delegator_address:o,validator_src_address:r,validator_dst_address:s,amount:n}=e;return new kr(o,r,s,u.fromData(n))}toData(){const{delegator_address:e,validator_src_address:o,validator_dst_address:r,amount:s}=this;return{"@type":"/initia.mstaking.v1.MsgBeginRedelegate",delegator_address:e,validator_src_address:o,validator_dst_address:r,amount:s.toData()}}static fromProto(e){return new kr(e.delegatorAddress,e.validatorSrcAddress,e.validatorDstAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_src_address:o,validator_dst_address:r,amount:s}=this;return Y.MsgBeginRedelegate.fromPartial({amount:s.toProto(),delegatorAddress:e,validatorDstAddress:r,validatorSrcAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgBeginRedelegate",value:Y.MsgBeginRedelegate.encode(this.toProto()).finish()})}static unpackAny(e){return kr.fromProto(Y.MsgBeginRedelegate.decode(e.value))}}class W extends m{constructor(e,o,r,s,n,a,i,d,h,y,_,A){super();p(this,"tokens");p(this,"delegator_shares");p(this,"voting_powers");this.operator_address=e,this.consensus_pubkey=o,this.jailed=r,this.status=s,this.description=i,this.unbonding_height=d,this.unbonding_time=h,this.commission=y,this.voting_power=A,this.tokens=new u(n),this.delegator_shares=new u(a),this.voting_powers=new u(_)}static fromAmino(e){return new W(e.operator_address,Z.fromAmino(e.consensus_pubkey),e.jailed||!1,e.status||0,u.fromAmino(e.tokens),u.fromAmino(e.delegator_shares),W.Description.fromAmino(e.description),parseInt(e.unbonding_height),new Date(e.unbonding_time),W.Commission.fromAmino(e.commission),u.fromAmino(e.voting_powers),e.voting_power)}toAmino(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toAmino(),jailed:this.jailed,status:this.status,tokens:this.tokens.toAmino(),delegator_shares:this.delegator_shares.toAmino(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toAmino(),voting_powers:this.voting_powers.toAmino(),voting_power:this.voting_power}}static fromData(e){return new W(e.operator_address,Z.fromData(e.consensus_pubkey),e.jailed||!1,e.status||0,u.fromData(e.tokens),u.fromData(e.delegator_shares),W.Description.fromData(e.description),parseInt(e.unbonding_height),new Date(e.unbonding_time),W.Commission.fromData(e.commission),u.fromData(e.voting_powers),e.voting_power)}toData(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toData(),jailed:this.jailed,status:this.status,tokens:this.tokens.toData(),delegator_shares:this.delegator_shares.toData(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toData(),voting_powers:this.voting_powers.toData(),voting_power:this.voting_power}}static fromProto(e){return new W(e.operatorAddress,Z.unpackAny(e.consensusPubkey),e.jailed,e.status,u.fromProto(e.tokens),u.fromProto(e.delegatorShares),W.Description.fromProto(e.description),Number(e.unbondingHeight),e.unbondingTime,W.Commission.fromProto(e.commission),u.fromProto(e.votingPowers),e.votingPower)}toProto(){const{operator_address:e,consensus_pubkey:o,jailed:r,status:s,tokens:n,delegator_shares:a,description:i,unbonding_height:d,unbonding_time:h,commission:y,voting_powers:_,voting_power:A}=this;return pt.Validator.fromPartial({operatorAddress:e,consensusPubkey:o.packAny(),jailed:r,status:s,tokens:n.toProto(),delegatorShares:a.toProto(),description:i.toProto(),unbondingHeight:BigInt(d),unbondingTime:h,commission:y.toProto(),votingPowers:_.toProto(),votingPower:A})}}(c=>{c.Status=pt.BondStatus;class t extends m{constructor(s,n,a,i,d){super(),this.moniker=s,this.identity=n,this.website=a,this.details=i,this.security_contact=d}static fromAmino(s){return new t(s.moniker,s.identity??"",s.website??"",s.details??"",s.security_contact??"")}toAmino(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}}static fromData(s){return new t(s.moniker,s.identity??"",s.website??"",s.details??"",s.security_contact??"")}toData(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}}static fromProto(s){return new t(s.moniker,s.identity,s.website,s.details,s.securityContact)}toProto(){const{moniker:s,identity:n,website:a,details:i,security_contact:d}=this;return pt.Description.fromPartial({details:i,identity:n,moniker:s,securityContact:d,website:a})}}c.Description=t;class e extends m{constructor(s,n,a){super(),this.rate=s,this.max_rate=n,this.max_change_rate=a}static fromAmino(s){const{rate:n,max_rate:a,max_change_rate:i}=s;return new e(n,a,i)}toAmino(){const{rate:s,max_rate:n,max_change_rate:a}=this;return{rate:s,max_rate:n,max_change_rate:a}}static fromData(s){const{rate:n,max_rate:a,max_change_rate:i}=s;return new e(n,a,i)}toData(){const{rate:s,max_rate:n,max_change_rate:a}=this;return{rate:s,max_rate:n,max_change_rate:a}}static fromProto(s){return new e(s.rate,s.maxRate,s.maxChangeRate)}toProto(){const{rate:s,max_rate:n,max_change_rate:a}=this;return pt.CommissionRates.fromPartial({maxChangeRate:a,maxRate:n,rate:s})}}c.CommissionRates=e;class o extends m{constructor(s,n){super(),this.commission_rates=s,this.update_time=n}static fromAmino(s){return new o(e.fromAmino(s.commission_rates),new Date(s.update_time))}toAmino(){return{commission_rates:this.commission_rates.toAmino(),update_time:this.update_time.toISOString()}}static fromData(s){return new o(e.fromData(s.commission_rates),new Date(s.update_time))}toData(){return{commission_rates:this.commission_rates.toData(),update_time:this.update_time.toISOString()}}static fromProto(s){return new o(e.fromProto(s.commissionRates),s.updateTime)}toProto(){const{commission_rates:s,update_time:n}=this;return pt.Commission.fromPartial({commissionRates:s.toProto(),updateTime:n})}}c.Commission=o})(W||(W={}));class Mr extends m{constructor(e,o,r,s,n){super();p(this,"amount");this.description=e,this.commission=o,this.validator_address=r,this.pubkey=s,this.amount=new u(n)}static fromAmino(e){const{value:{description:o,commission:r,validator_address:s,pubkey:n,amount:a}}=e;return new Mr(o,W.CommissionRates.fromAmino(r),s,Z.fromAmino(n),u.fromAmino(a))}toAmino(){const{description:e,commission:o,validator_address:r,pubkey:s,amount:n}=this;return{type:"mstaking/MsgCreateValidator",value:{description:e,commission:o.toAmino(),validator_address:r,pubkey:s.toAmino(),amount:n.toAmino()}}}static fromData(e){const{description:o,commission:r,validator_address:s,pubkey:n,amount:a}=e;return new Mr(o,W.CommissionRates.fromData(r),s,Z.fromData(n),u.fromData(a))}toData(){const{description:e,commission:o,validator_address:r,pubkey:s,amount:n}=this;return{"@type":"/initia.mstaking.v1.MsgCreateValidator",description:e,commission:o.toData(),validator_address:r,pubkey:s.toData(),amount:n.toData()}}static fromProto(e){return new Mr(W.Description.fromProto(e.description),W.CommissionRates.fromProto(e.commission),e.validatorAddress,exports.PublicKey.fromProto(e.pubkey),u.fromProto(e.amount))}toProto(){const{description:e,commission:o,validator_address:r,pubkey:s,amount:n}=this;return Y.MsgCreateValidator.fromPartial({commission:o.toProto(),description:e.toProto(),pubkey:s.packAny(),validatorAddress:r,amount:n.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCreateValidator",value:Y.MsgCreateValidator.encode(this.toProto()).finish()})}static unpackAny(e){return Mr.fromProto(Y.MsgCreateValidator.decode(e.value))}}class Vt extends m{constructor(t,e,o){super(),this.description=t,this.validator_address=e,this.commission_rate=o}static fromAmino(t){const{value:{description:e,validator_address:o,commission_rate:r}}=t;return new Vt(W.Description.fromAmino(e),o,r)}toAmino(){const{description:t,validator_address:e,commission_rate:o}=this;return{type:"mstaking/MsgEditValidator",value:{description:t,validator_address:e,commission_rate:o}}}static fromData(t){const{description:e,validator_address:o,commission_rate:r}=t;return new Vt(W.Description.fromData(e),o,r)}toData(){const{description:t,validator_address:e,commission_rate:o}=this;return{"@type":"/initia.mstaking.v1.MsgEditValidator",description:t,validator_address:e,commission_rate:o}}static fromProto(t){return new Vt(W.Description.fromProto(t.description),t.validatorAddress,t.commissionRate!==""?t.commissionRate:void 0)}toProto(){const{description:t,validator_address:e,commission_rate:o}=this;return Y.MsgEditValidator.fromPartial({description:t.toProto(),commissionRate:o,validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgEditValidator",value:Y.MsgEditValidator.encode(this.toProto()).finish()})}static unpackAny(t){return Vt.fromProto(Y.MsgEditValidator.decode(t.value))}}(c=>{c.DESC_DO_NOT_MODIFY={moniker:"[do-not-modify]",website:"[do-not-modify]",identity:"[do-not-modify]",details:"[do-not-modify]",security_contact:"[do-not-modify]"}})(Vt||(Vt={}));class xr extends m{constructor(e,o,r,s){super();p(this,"amount");this.delegator_address=e,this.validator_address=o,this.creation_height=s,this.amount=new u(r)}static fromAmino(e){const{value:{delegator_address:o,validator_address:r,amount:s,creation_height:n}}=e;return new xr(o,r,u.fromAmino(s),parseInt(n))}toAmino(){const{delegator_address:e,validator_address:o,amount:r,creation_height:s}=this;return{type:"mstaking/MsgCancelUnbondingDelegation",value:{delegator_address:e,validator_address:o,amount:r.toAmino(),creation_height:s.toFixed()}}}static fromData(e){const{delegator_address:o,validator_address:r,amount:s,creation_height:n}=e;return new xr(o,r,u.fromData(s),parseInt(n))}toData(){const{delegator_address:e,validator_address:o,amount:r,creation_height:s}=this;return{"@type":"/initia.mstaking.v1.MsgCancelUnbondingDelegation",delegator_address:e,validator_address:o,amount:r.toData(),creation_height:s.toFixed()}}static fromProto(e){return new xr(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount),Number(e.creationHeight))}toProto(){const{delegator_address:e,validator_address:o,amount:r,creation_height:s}=this;return Y.MsgCancelUnbondingDelegation.fromPartial({amount:r.toProto(),delegatorAddress:e,validatorAddress:o,creationHeight:BigInt(s)})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCancelUnbondingDelegation",value:Y.MsgCancelUnbondingDelegation.encode(this.toProto()).finish()})}static unpackAny(e){return xr.fromProto(Y.MsgCancelUnbondingDelegation.decode(e.value))}}class bs extends m{constructor(t,e,o,r,s,n,a){super(),this.unbonding_time=t,this.max_validators=e,this.max_entries=o,this.historical_entries=r,this.bond_denoms=s,this.min_voting_power=n,this.min_commission_rate=a}static fromAmino(t){const{value:{unbonding_time:e,max_validators:o,max_entries:r,historical_entries:s,bond_denoms:n,min_voting_power:a,min_commission_rate:i}}=t;return new bs(x.fromAmino(e),o,r,s,n,parseInt(a),i)}toAmino(){const{unbonding_time:t,max_validators:e,max_entries:o,historical_entries:r,bond_denoms:s,min_voting_power:n,min_commission_rate:a}=this;return{type:"mstaking/Params",value:{unbonding_time:t.toAmino(),max_validators:e,max_entries:o,historical_entries:r,bond_denoms:s,min_voting_power:n.toFixed(),min_commission_rate:a}}}static fromData(t){const{unbonding_time:e,max_validators:o,max_entries:r,historical_entries:s,bond_denoms:n,min_voting_power:a,min_commission_rate:i}=t;return new bs(x.fromData(e),o,r,s,n,parseInt(a),i)}toData(){const{unbonding_time:t,max_validators:e,max_entries:o,historical_entries:r,bond_denoms:s,min_voting_power:n,min_commission_rate:a}=this;return{"@type":"/initia.mstaking.v1.Params",unbonding_time:t.toData(),max_validators:e,max_entries:o,historical_entries:r,bond_denoms:s,min_voting_power:n.toFixed(),min_commission_rate:a}}static fromProto(t){return new bs(x.fromProto(t.unbondingTime),t.maxValidators,t.maxEntries,t.historicalEntries,t.bondDenoms,Number(t.minVotingPower),t.minCommissionRate)}toProto(){const{unbonding_time:t,max_validators:e,max_entries:o,historical_entries:r,bond_denoms:s,min_voting_power:n,min_commission_rate:a}=this;return pt.Params.fromPartial({unbondingTime:t.toProto(),maxValidators:e,maxEntries:o,historicalEntries:r,bondDenoms:s,minVotingPower:BigInt(n),minCommissionRate:a})}}class Ir extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new Ir(e,bs.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"mstaking/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new Ir(e,bs.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.mstaking.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Ir(t.authority,bs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Y.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUpdateParams",value:Y.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ir.fromProto(Y.MsgUpdateParams.decode(t.value))}}class js extends m{constructor(e,o,r,s){super();p(this,"shares");p(this,"balance");this.delegator_address=e,this.validator_address=o,this.shares=new u(r),this.balance=new u(s)}static fromAmino(e){const{delegation:{delegator_address:o,validator_address:r,shares:s},balance:n}=e;return new js(o,r,u.fromAmino(s),u.fromAmino(n))}toAmino(){const{delegator_address:e,validator_address:o,shares:r,balance:s}=this;return{delegation:{delegator_address:e,validator_address:o,shares:r.toAmino()},balance:s.toAmino()}}static fromData(e){const{delegation:{delegator_address:o,validator_address:r,shares:s},balance:n}=e;return new js(o,r,u.fromData(s),u.fromData(n))}toData(){const{delegator_address:e,validator_address:o,shares:r,balance:s}=this;return{delegation:{delegator_address:e,validator_address:o,shares:r.toData()},balance:s.toData()}}static fromProto(e){const o=e.delegation;return new js(o.delegatorAddress,o.validatorAddress,u.fromProto(o.shares),u.fromProto(e.balance))}toProto(){const{delegator_address:e,validator_address:o,shares:r,balance:s}=this;return pt.DelegationResponse.fromPartial({delegation:pt.Delegation.fromPartial({delegatorAddress:e,validatorAddress:o,shares:r.toProto()}),balance:s.toProto()})}}class Ft extends m{constructor(t,e,o,r){super(),this.delegator_address=t,this.validator_src_address=e,this.validator_dst_address=o,this.entries=r}static fromAmino(t){const{redelegation:{delegator_address:e,validator_src_address:o,validator_dst_address:r},entries:s}=t;return new Ft(e,o,r,s.map(n=>Ft.Entry.fromAmino(n)))}toAmino(){const{delegator_address:t,validator_src_address:e,validator_dst_address:o,entries:r}=this;return{redelegation:{delegator_address:t,validator_src_address:e,validator_dst_address:o},entries:r.map(s=>s.toAmino())}}static fromData(t){const{redelegation:{delegator_address:e,validator_src_address:o,validator_dst_address:r},entries:s}=t;return new Ft(e,o,r,s.map(n=>Ft.Entry.fromData(n)))}toData(){const{delegator_address:t,validator_src_address:e,validator_dst_address:o,entries:r}=this;return{redelegation:{delegator_address:t,validator_src_address:e,validator_dst_address:o},entries:r.map(s=>s.toData())}}static fromProto(t){const e=t.redelegation;return new Ft(e.delegatorAddress,e.validatorDstAddress,e.validatorDstAddress,t.entries.map(o=>Ft.Entry.fromProto(o)))}toProto(){const{delegator_address:t,validator_src_address:e,validator_dst_address:o,entries:r}=this;return pt.RedelegationResponse.fromPartial({entries:r.map(s=>s.toProto()),redelegation:pt.Redelegation.fromPartial({delegatorAddress:t,entries:r.map(s=>s.toProto().redelegationEntry),validatorDstAddress:o,validatorSrcAddress:e})})}}(c=>{class t extends m{constructor(r,s,n,a,i){super();p(this,"initial_balance");p(this,"shares_dst");p(this,"balance");this.creation_height=a,this.completion_time=i,this.initial_balance=new u(r),this.balance=new u(s),this.shares_dst=new u(n)}static fromAmino(r){const{redelegation_entry:{initial_balance:s,shares_dst:n,creation_height:a,completion_time:i},balance:d}=r;return new t(u.fromAmino(s),u.fromAmino(d),u.fromAmino(n),a,new Date(i))}toAmino(){return{redelegation_entry:{initial_balance:this.initial_balance.toAmino(),shares_dst:this.shares_dst.toAmino(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toAmino()}}static fromData(r){const{redelegation_entry:{initial_balance:s,shares_dst:n,creation_height:a,completion_time:i},balance:d}=r;return new t(u.fromData(s),u.fromData(d),u.fromData(n),a,new Date(i))}toData(){return{redelegation_entry:{initial_balance:this.initial_balance.toData(),shares_dst:this.shares_dst.toData(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toData()}}static fromProto(r){const s=r.redelegationEntry;return new t(u.fromProto(s.initialBalance),u.fromProto(r.balance),u.fromProto(s.sharesDst),Number(s.creationHeight),s.completionTime)}toProto(){const{initial_balance:r,balance:s,shares_dst:n,creation_height:a,completion_time:i}=this;return pt.RedelegationEntryResponse.fromPartial({balance:s.toProto(),redelegationEntry:pt.RedelegationEntry.fromPartial({completionTime:i,creationHeight:BigInt(a),initialBalance:r.toProto(),sharesDst:n.toProto()})})}}c.Entry=t})(Ft||(Ft={}));class vt extends m{constructor(t,e,o){super(),this.delegator_address=t,this.validator_address=e,this.entries=o}static fromAmino(t){const{delegator_address:e,validator_address:o,entries:r}=t;return new vt(e,o,r.map(s=>vt.Entry.fromAmino(s)))}toAmino(){const{delegator_address:t,validator_address:e,entries:o}=this;return{delegator_address:t,validator_address:e,entries:o.map(r=>r.toAmino())}}static fromData(t){const{delegator_address:e,validator_address:o,entries:r}=t;return new vt(e,o,r.map(s=>vt.Entry.fromData(s)))}toData(){const{delegator_address:t,validator_address:e,entries:o}=this;return{delegator_address:t,validator_address:e,entries:o.map(r=>r.toData())}}toProto(){const{delegator_address:t,validator_address:e,entries:o}=this;return pt.UnbondingDelegation.fromPartial({delegatorAddress:t,entries:o.map(r=>r.toProto()),validatorAddress:e})}static fromProto(t){return new vt(t.delegatorAddress,t.validatorAddress,t.entries.map(e=>vt.Entry.fromProto(e)))}}(c=>{class t extends m{constructor(r,s,n,a){super();p(this,"initial_balance");p(this,"balance");this.creation_height=n,this.completion_time=a,this.initial_balance=new u(r),this.balance=new u(s)}static fromAmino(r){const{initial_balance:s,balance:n,creation_height:a,completion_time:i}=r;return new t(u.fromAmino(s),u.fromAmino(n),parseInt(a),new Date(i))}toAmino(){return{initial_balance:this.initial_balance.toAmino(),balance:this.balance.toAmino(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}}static fromData(r){const{initial_balance:s,balance:n,creation_height:a,completion_time:i}=r;return new t(u.fromData(s),u.fromData(n),parseInt(a),new Date(i))}toData(){return{initial_balance:this.initial_balance.toData(),balance:this.balance.toData(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}}static fromProto(r){return new t(u.fromProto(r.initialBalance),u.fromProto(r.balance),Number(r.creationHeight),r.completionTime)}toProto(){const{initial_balance:r,balance:s,creation_height:n,completion_time:a}=this;return pt.UnbondingDelegationEntry.fromPartial({balance:s.toProto(),completionTime:a,creationHeight:BigInt(n),initialBalance:r.toProto()})}}c.Entry=t})(vt||(vt={}));class Sr extends m{constructor(t,e,o,r){super(),this.authority=t,this.moniker=e,this.validator_address=o,this.pubkey=r}static fromAmino(t){const{value:{authority:e,moniker:o,validator_address:r,pubkey:s}}=t;return new Sr(e,o,r,Z.fromAmino(s))}toAmino(){const{authority:t,moniker:e,validator_address:o,pubkey:r}=this;return{type:"opchild/MsgAddValidator",value:{authority:t,moniker:e,validator_address:o,pubkey:r.toAmino()}}}static fromData(t){const{authority:e,moniker:o,validator_address:r,pubkey:s}=t;return new Sr(e,o,r,Z.fromData(s))}toData(){const{authority:t,moniker:e,validator_address:o,pubkey:r}=this;return{"@type":"/opinit.opchild.v1.MsgAddValidator",authority:t,moniker:e,validator_address:o,pubkey:r.toData()}}static fromProto(t){return new Sr(t.authority,t.moniker,t.validatorAddress,Z.unpackAny(t.pubkey))}toProto(){const{authority:t,moniker:e,validator_address:o,pubkey:r}=this;return z.MsgAddValidator.fromPartial({authority:t,moniker:e,validatorAddress:o,pubkey:r.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgAddValidator",value:z.MsgAddValidator.encode(this.toProto()).finish()})}static unpackAny(t){return Sr.fromProto(z.MsgAddValidator.decode(t.value))}}class Cr extends m{constructor(t,e){super(),this.authority=t,this.validator_address=e}static fromAmino(t){const{value:{authority:e,validator_address:o}}=t;return new Cr(e,o)}toAmino(){const{authority:t,validator_address:e}=this;return{type:"opchild/MsgRemoveValidator",value:{authority:t,validator_address:e}}}static fromData(t){const{authority:e,validator_address:o}=t;return new Cr(e,o)}toData(){const{authority:t,validator_address:e}=this;return{"@type":"/opinit.opchild.v1.MsgRemoveValidator",authority:t,validator_address:e}}static fromProto(t){return new Cr(t.authority,t.validatorAddress)}toProto(){const{authority:t,validator_address:e}=this;return z.MsgRemoveValidator.fromPartial({authority:t,validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgRemoveValidator",value:z.MsgRemoveValidator.encode(this.toProto()).finish()})}static unpackAny(t){return Cr.fromProto(z.MsgRemoveValidator.decode(t.value))}}class Ur extends m{constructor(t,e,o,r,s,n,a,i){super(),this.sender=t,this.from=e,this.to=o,this.amount=r,this.sequence=s,this.height=n,this.base_denom=a,this.data=i}static fromAmino(t){const{value:{sender:e,from:o,to:r,amount:s,sequence:n,height:a,base_denom:i,data:d}}=t;return new Ur(e,o,r,P.fromAmino(s),parseInt(n),parseInt(a),i,d)}toAmino(){const{sender:t,from:e,to:o,amount:r,sequence:s,height:n,base_denom:a,data:i}=this;return{type:"opchild/MsgFinalizeTokenDeposit",value:{sender:t,from:e,to:o,amount:r.toAmino(),sequence:s.toFixed(),height:n.toFixed(),base_denom:a,data:i}}}static fromData(t){const{sender:e,from:o,to:r,amount:s,sequence:n,height:a,base_denom:i,data:d}=t;return new Ur(e,o,r,P.fromData(s),parseInt(n),parseInt(a),i,d)}toData(){const{sender:t,from:e,to:o,amount:r,sequence:s,height:n,base_denom:a,data:i}=this;return{"@type":"/opinit.opchild.v1.MsgFinalizeTokenDeposit",sender:t,from:e,to:o,amount:r.toData(),sequence:s.toFixed(),height:n.toFixed(),base_denom:a,data:i}}static fromProto(t){return new Ur(t.sender,t.from,t.to,P.fromProto(t.amount),Number(t.sequence),Number(t.height),t.baseDenom,t.data.length?Buffer.from(t.data).toString("base64"):void 0)}toProto(){const{sender:t,from:e,to:o,amount:r,sequence:s,height:n,base_denom:a,data:i}=this;return z.MsgFinalizeTokenDeposit.fromPartial({sender:t,from:e,to:o,amount:r.toProto(),sequence:BigInt(s),height:BigInt(n),baseDenom:a,data:i?Buffer.from(i,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgFinalizeTokenDeposit",value:z.MsgFinalizeTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return Ur.fromProto(z.MsgFinalizeTokenDeposit.decode(t.value))}}class Br extends m{constructor(t,e,o){super(),this.sender=t,this.to=e,this.amount=o}static fromAmino(t){const{value:{sender:e,to:o,amount:r}}=t;return new Br(e,o,P.fromAmino(r))}toAmino(){const{sender:t,to:e,amount:o}=this;return{type:"opchild/MsgInitiateTokenWithdrawal",value:{sender:t,to:e,amount:o.toAmino()}}}static fromData(t){const{sender:e,to:o,amount:r}=t;return new Br(e,o,P.fromData(r))}toData(){const{sender:t,to:e,amount:o}=this;return{"@type":"/opinit.opchild.v1.MsgInitiateTokenWithdrawal",sender:t,to:e,amount:o.toData()}}static fromProto(t){return new Br(t.sender,t.to,P.fromProto(t.amount))}toProto(){const{sender:t,to:e,amount:o}=this;return z.MsgInitiateTokenWithdrawal.fromPartial({sender:t,to:e,amount:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgInitiateTokenWithdrawal",value:z.MsgInitiateTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return Br.fromProto(z.MsgInitiateTokenWithdrawal.decode(t.value))}}class Er extends m{constructor(t,e){super(),this.sender=t,this.messages=e}static fromAmino(t){const{value:{sender:e,messages:o}}=t;return new Er(e,o.map(exports.Msg.fromAmino))}toAmino(){const{sender:t,messages:e}=this;return{type:"opchild/MsgExecuteMessages",value:{sender:t,messages:e.map(o=>o.toAmino())}}}static fromData(t){const{sender:e,messages:o}=t;return new Er(e,o.map(exports.Msg.fromData))}toData(){const{sender:t,messages:e}=this;return{"@type":"/opinit.opchild.v1.MsgExecuteMessages",sender:t,messages:e.map(o=>o.toData())}}static fromProto(t){return new Er(t.sender,t.messages.map(exports.Msg.fromProto))}toProto(){const{sender:t,messages:e}=this;return z.MsgExecuteMessages.fromPartial({sender:t,messages:e.map(o=>o.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgExecuteMessages",value:z.MsgExecuteMessages.encode(this.toProto()).finish()})}static unpackAny(t){return Er.fromProto(z.MsgExecuteMessages.decode(t.value))}}class Nr extends m{constructor(e,o,r){super();p(this,"amount");this.authority=e,this.recipient=o,this.amount=new u(r)}static fromAmino(e){const{value:{authority:o,recipient:r,amount:s}}=e;return new Nr(o,r,u.fromAmino(s))}toAmino(){const{authority:e,recipient:o,amount:r}=this;return{type:"opchild/MsgSpendFeePool",value:{authority:e,recipient:o,amount:r.toAmino()}}}static fromData(e){const{authority:o,recipient:r,amount:s}=e;return new Nr(o,r,u.fromData(s))}toData(){const{authority:e,recipient:o,amount:r}=this;return{"@type":"/opinit.opchild.v1.MsgSpendFeePool",authority:e,recipient:o,amount:r.toData()}}static fromProto(e){return new Nr(e.authority,e.recipient,u.fromProto(e.amount))}toProto(){const{authority:e,recipient:o,amount:r}=this;return z.MsgSpendFeePool.fromPartial({authority:e,recipient:o,amount:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSpendFeePool",value:z.MsgSpendFeePool.encode(this.toProto()).finish()})}static unpackAny(e){return Nr.fromProto(z.MsgSpendFeePool.decode(e.value))}}class Or extends m{constructor(t,e,o){super(),this.submitter=t,this.bridge_id=e,this.batch_bytes=o}static fromAmino(t){const{value:{submitter:e,bridge_id:o,batch_bytes:r}}=t;return new Or(e,parseInt(o),r)}toAmino(){const{submitter:t,bridge_id:e,batch_bytes:o}=this;return{type:"ophost/MsgRecordBatch",value:{submitter:t,bridge_id:e.toFixed(),batch_bytes:o}}}static fromData(t){const{submitter:e,bridge_id:o,batch_bytes:r}=t;return new Or(e,parseInt(o),r)}toData(){const{submitter:t,bridge_id:e,batch_bytes:o}=this;return{"@type":"/opinit.ophost.v1.MsgRecordBatch",submitter:t,bridge_id:e.toFixed(),batch_bytes:o}}static fromProto(t){return new Or(t.submitter,Number(t.bridgeId),Buffer.from(t.batchBytes).toString("base64"))}toProto(){const{submitter:t,bridge_id:e,batch_bytes:o}=this;return B.MsgRecordBatch.fromPartial({submitter:t,bridgeId:BigInt(e),batchBytes:o?Buffer.from(o,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgRecordBatch",value:B.MsgRecordBatch.encode(this.toProto()).finish()})}static unpackAny(t){return Or.fromProto(B.MsgRecordBatch.decode(t.value))}}class _t extends m{constructor(t,e){super(),this.submitter=t,this.chain_type=e}static fromAmino(t){const{submitter:e,chain_type:o}=t;return new _t(e,pe.batchInfo_ChainTypeFromJSON(o))}toAmino(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:pe.batchInfo_ChainTypeToJSON(e)}}static fromData(t){const{submitter:e,chain_type:o}=t;return new _t(e,pe.batchInfo_ChainTypeFromJSON(o))}toData(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:pe.batchInfo_ChainTypeToJSON(e)}}static fromProto(t){return new _t(t.submitter,t.chainType)}toProto(){const{submitter:t,chain_type:e}=this;return pe.BatchInfo.fromPartial({submitter:t,chainType:e})}}class Zt extends m{constructor(t,e,o,r,s,n,a,i){super(),this.challenger=t,this.proposer=e,this.batch_info=o,this.submission_interval=r,this.finalization_period=s,this.submission_start_height=n,this.oracle_enabled=a,this.metadata=i}static fromAmino(t){const{challenger:e,proposer:o,batch_info:r,submission_interval:s,finalization_period:n,submission_start_height:a,oracle_enabled:i,metadata:d}=t;return new Zt(e,o,_t.fromAmino(r),x.fromAmino(s),x.fromAmino(n),parseInt(a),i,d)}toAmino(){const{challenger:t,proposer:e,batch_info:o,submission_interval:r,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:i}=this;return{challenger:t,proposer:e,batch_info:o.toAmino(),submission_interval:r.toAmino(),finalization_period:s.toAmino(),submission_start_height:n.toFixed(),oracle_enabled:a,metadata:i}}static fromData(t){const{challenger:e,proposer:o,batch_info:r,submission_interval:s,finalization_period:n,submission_start_height:a,oracle_enabled:i,metadata:d}=t;return new Zt(e,o,_t.fromData(r),x.fromData(s),x.fromData(n),parseInt(a),i,d)}toData(){const{challenger:t,proposer:e,batch_info:o,submission_interval:r,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:i}=this;return{challenger:t,proposer:e,batch_info:o.toData(),submission_interval:r.toData(),finalization_period:s.toData(),submission_start_height:n.toFixed(),oracle_enabled:a,metadata:i}}static fromProto(t){return new Zt(t.challenger,t.proposer,_t.fromProto(t.batchInfo),x.fromProto(t.submissionInterval),x.fromProto(t.finalizationPeriod),Number(t.submissionStartHeight),t.oracleEnabled,Buffer.from(t.metadata).toString("base64"))}toProto(){const{challenger:t,proposer:e,batch_info:o,submission_interval:r,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:i}=this;return pe.BridgeConfig.fromPartial({challenger:t,proposer:e,batchInfo:o.toProto(),submissionInterval:r.toProto(),finalizationPeriod:s.toProto(),submissionStartHeight:BigInt(n),oracleEnabled:a,metadata:i?Buffer.from(i,"base64"):void 0})}}class Fr extends m{constructor(t,e){super(),this.creator=t,this.config=e}static fromAmino(t){const{value:{creator:e,config:o}}=t;return new Fr(e,Zt.fromAmino(o))}toAmino(){const{creator:t,config:e}=this;return{type:"ophost/MsgCreateBridge",value:{creator:t,config:e.toAmino()}}}static fromData(t){const{creator:e,config:o}=t;return new Fr(e,Zt.fromData(o))}toData(){const{creator:t,config:e}=this;return{"@type":"/opinit.ophost.v1.MsgCreateBridge",creator:t,config:e.toData()}}static fromProto(t){return new Fr(t.creator,Zt.fromProto(t.config))}toProto(){const{creator:t,config:e}=this;return B.MsgCreateBridge.fromPartial({creator:t,config:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgCreateBridge",value:B.MsgCreateBridge.encode(this.toProto()).finish()})}static unpackAny(t){return Fr.fromProto(B.MsgCreateBridge.decode(t.value))}}class Tr extends m{constructor(t,e,o,r,s){super(),this.proposer=t,this.bridge_id=e,this.output_index=o,this.l2_block_number=r,this.output_root=s}static fromAmino(t){const{value:{proposer:e,bridge_id:o,output_index:r,l2_block_number:s,output_root:n}}=t;return new Tr(e,parseInt(o),parseInt(r),parseInt(s),n)}toAmino(){const{proposer:t,bridge_id:e,output_index:o,l2_block_number:r,output_root:s}=this;return{type:"ophost/MsgProposeOutput",value:{proposer:t,bridge_id:e.toFixed(),output_index:o.toFixed(),l2_block_number:r.toFixed(),output_root:s}}}static fromData(t){const{proposer:e,bridge_id:o,output_index:r,l2_block_number:s,output_root:n}=t;return new Tr(e,parseInt(o),parseInt(r),parseInt(s),n)}toData(){const{proposer:t,bridge_id:e,output_index:o,l2_block_number:r,output_root:s}=this;return{"@type":"/opinit.ophost.v1.MsgProposeOutput",proposer:t,bridge_id:e.toFixed(),output_index:o.toFixed(),l2_block_number:r.toFixed(),output_root:s}}static fromProto(t){return new Tr(t.proposer,Number(t.bridgeId),Number(t.outputIndex),Number(t.l2BlockNumber),Buffer.from(t.outputRoot).toString("base64"))}toProto(){const{proposer:t,bridge_id:e,output_index:o,l2_block_number:r,output_root:s}=this;return B.MsgProposeOutput.fromPartial({proposer:t,bridgeId:BigInt(e),outputIndex:BigInt(o),l2BlockNumber:BigInt(r),outputRoot:s?Buffer.from(s,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgProposeOutput",value:B.MsgProposeOutput.encode(this.toProto()).finish()})}static unpackAny(t){return Tr.fromProto(B.MsgProposeOutput.decode(t.value))}}class Rr extends m{constructor(t,e,o){super(),this.challenger=t,this.bridge_id=e,this.output_index=o}static fromAmino(t){const{value:{challenger:e,bridge_id:o,output_index:r}}=t;return new Rr(e,parseInt(o),parseInt(r))}toAmino(){const{challenger:t,bridge_id:e,output_index:o}=this;return{type:"ophost/MsgDeleteOutput",value:{challenger:t,bridge_id:e.toFixed(),output_index:o.toFixed()}}}static fromData(t){const{challenger:e,bridge_id:o,output_index:r}=t;return new Rr(e,parseInt(o),parseInt(r))}toData(){const{challenger:t,bridge_id:e,output_index:o}=this;return{"@type":"/opinit.ophost.v1.MsgDeleteOutput",challenger:t,bridge_id:e.toFixed(),output_index:o.toFixed()}}static fromProto(t){return new Rr(t.challenger,Number(t.bridgeId),Number(t.outputIndex))}toProto(){const{challenger:t,bridge_id:e,output_index:o}=this;return B.MsgDeleteOutput.fromPartial({challenger:t,bridgeId:BigInt(e),outputIndex:BigInt(o)})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgDeleteOutput",value:B.MsgDeleteOutput.encode(this.toProto()).finish()})}static unpackAny(t){return Rr.fromProto(B.MsgDeleteOutput.decode(t.value))}}class qr extends m{constructor(t,e,o,r,s){super(),this.sender=t,this.bridge_id=e,this.to=o,this.amount=r,this.data=s}static fromAmino(t){const{value:{sender:e,bridge_id:o,to:r,amount:s,data:n}}=t;return new qr(e,parseInt(o),r,P.fromAmino(s),n)}toAmino(){const{sender:t,bridge_id:e,to:o,amount:r,data:s}=this;return{type:"ophost/MsgInitiateTokenDeposit",value:{sender:t,bridge_id:e.toFixed(),to:o,amount:r.toAmino(),data:s}}}static fromData(t){const{sender:e,bridge_id:o,to:r,amount:s,data:n}=t;return new qr(e,parseInt(o),r,P.fromData(s),n)}toData(){const{sender:t,bridge_id:e,to:o,amount:r,data:s}=this;return{"@type":"/opinit.ophost.v1.MsgInitiateTokenDeposit",sender:t,bridge_id:e.toFixed(),to:o,amount:r.toData(),data:s}}static fromProto(t){return new qr(t.sender,Number(t.bridgeId),t.to,P.fromProto(t.amount),t.data.length?Buffer.from(t.data).toString("base64"):void 0)}toProto(){const{sender:t,bridge_id:e,to:o,amount:r,data:s}=this;return B.MsgInitiateTokenDeposit.fromPartial({sender:t,bridgeId:BigInt(e),to:o,amount:r.toProto(),data:s?Buffer.from(s,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgInitiateTokenDeposit",value:B.MsgInitiateTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return qr.fromProto(B.MsgInitiateTokenDeposit.decode(t.value))}}class $r extends m{constructor(t,e,o,r,s,n,a,i,d,h,y){super(),this.sender=t,this.bridge_id=e,this.output_index=o,this.withdrawal_proofs=r,this.from=s,this.to=n,this.sequence=a,this.amount=i,this.version=d,this.storage_root=h,this.last_block_hash=y}static fromAmino(t){const{value:{sender:e,bridge_id:o,output_index:r,withdrawal_proofs:s,from:n,to:a,sequence:i,amount:d,version:h,storage_root:y,last_block_hash:_}}=t;return new $r(e,parseInt(o),parseInt(r),s,n,a,parseInt(i),P.fromAmino(d),h,y,_)}toAmino(){const{sender:t,bridge_id:e,output_index:o,withdrawal_proofs:r,from:s,to:n,sequence:a,amount:i,version:d,storage_root:h,last_block_hash:y}=this;return{type:"ophost/MsgFinalizeTokenWithdrawal",value:{sender:t,bridge_id:e.toFixed(),output_index:o.toFixed(),withdrawal_proofs:r,from:s,to:n,sequence:a.toFixed(),amount:i.toAmino(),version:d,storage_root:h,last_block_hash:y}}}static fromData(t){const{sender:e,bridge_id:o,output_index:r,withdrawal_proofs:s,from:n,to:a,sequence:i,amount:d,version:h,storage_root:y,last_block_hash:_}=t;return new $r(e,parseInt(o),parseInt(r),s,n,a,parseInt(i),P.fromData(d),h,y,_)}toData(){const{sender:t,bridge_id:e,output_index:o,withdrawal_proofs:r,from:s,to:n,sequence:a,amount:i,version:d,storage_root:h,last_block_hash:y}=this;return{"@type":"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",sender:t,bridge_id:e.toFixed(),output_index:o.toFixed(),withdrawal_proofs:r,from:s,to:n,sequence:a.toFixed(),amount:i.toData(),version:d,storage_root:h,last_block_hash:y}}static fromProto(t){return new $r(t.sender,Number(t.bridgeId),Number(t.outputIndex),t.withdrawalProofs.map(e=>Buffer.from(e).toString("base64")),t.from,t.to,Number(t.sequence),P.fromProto(t.amount),Buffer.from(t.version).toString("base64"),Buffer.from(t.storageRoot).toString("base64"),Buffer.from(t.lastBlockHash).toString("base64"))}toProto(){const{sender:t,bridge_id:e,output_index:o,withdrawal_proofs:r,from:s,to:n,sequence:a,amount:i,version:d,storage_root:h,last_block_hash:y}=this;return B.MsgFinalizeTokenWithdrawal.fromPartial({sender:t,bridgeId:BigInt(e),outputIndex:BigInt(o),withdrawalProofs:r.map(_=>Buffer.from(_,"base64")),from:s,to:n,sequence:BigInt(a),amount:i.toProto(),version:Buffer.from(d,"base64"),storageRoot:Buffer.from(h,"base64"),lastBlockHash:Buffer.from(y,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",value:B.MsgFinalizeTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return $r.fromProto(B.MsgFinalizeTokenWithdrawal.decode(t.value))}}class Lr extends m{constructor(t,e,o){super(),this.authority=t,this.bridge_id=e,this.new_proposer=o}static fromAmino(t){const{value:{authority:e,bridge_id:o,new_proposer:r}}=t;return new Lr(e,parseInt(o),r)}toAmino(){const{authority:t,bridge_id:e,new_proposer:o}=this;return{type:"ophost/MsgUpdateProposer",value:{authority:t,bridge_id:e.toFixed(),new_proposer:o}}}static fromData(t){const{authority:e,bridge_id:o,new_proposer:r}=t;return new Lr(e,parseInt(o),r)}toData(){const{authority:t,bridge_id:e,new_proposer:o}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateProposer",authority:t,bridge_id:e.toFixed(),new_proposer:o}}static fromProto(t){return new Lr(t.authority,Number(t.bridgeId),t.newProposer)}toProto(){const{authority:t,bridge_id:e,new_proposer:o}=this;return B.MsgUpdateProposer.fromPartial({authority:t,bridgeId:BigInt(e),newProposer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateProposer",value:B.MsgUpdateProposer.encode(this.toProto()).finish()})}static unpackAny(t){return Lr.fromProto(B.MsgUpdateProposer.decode(t.value))}}class zr extends m{constructor(t,e,o){super(),this.authority=t,this.bridge_id=e,this.challenger=o}static fromAmino(t){const{value:{authority:e,bridge_id:o,challenger:r}}=t;return new zr(e,parseInt(o),r)}toAmino(){const{authority:t,bridge_id:e,challenger:o}=this;return{type:"ophost/MsgUpdateChallenger",value:{authority:t,bridge_id:e.toFixed(),challenger:o}}}static fromData(t){const{authority:e,bridge_id:o,challenger:r}=t;return new zr(e,parseInt(o),r)}toData(){const{authority:t,bridge_id:e,challenger:o}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateChallenger",authority:t,bridge_id:e.toFixed(),challenger:o}}static fromProto(t){return new zr(t.authority,Number(t.bridgeId),t.challenger)}toProto(){const{authority:t,bridge_id:e,challenger:o}=this;return B.MsgUpdateChallenger.fromPartial({authority:t,bridgeId:BigInt(e),challenger:o})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateChallenger",value:B.MsgUpdateChallenger.encode(this.toProto()).finish()})}static unpackAny(t){return zr.fromProto(B.MsgUpdateChallenger.decode(t.value))}}class Gr extends m{constructor(t,e,o){super(),this.authority=t,this.bridge_id=e,this.new_batch_info=o}static fromAmino(t){const{value:{authority:e,bridge_id:o,new_batch_info:r}}=t;return new Gr(e,parseInt(o),_t.fromAmino(r))}toAmino(){const{authority:t,bridge_id:e,new_batch_info:o}=this;return{type:"ophost/MsgUpdateBatchInfo",value:{authority:t,bridge_id:e.toFixed(),new_batch_info:o.toAmino()}}}static fromData(t){const{authority:e,bridge_id:o,new_batch_info:r}=t;return new Gr(e,parseInt(o),_t.fromData(r))}toData(){const{authority:t,bridge_id:e,new_batch_info:o}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateBatchInfo",authority:t,bridge_id:e.toFixed(),new_batch_info:o.toData()}}static fromProto(t){return new Gr(t.authority,Number(t.bridgeId),_t.fromProto(t.newBatchInfo))}toProto(){const{authority:t,bridge_id:e,new_batch_info:o}=this;return B.MsgUpdateBatchInfo.fromPartial({authority:t,bridgeId:BigInt(e),newBatchInfo:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateBatchInfo",value:B.MsgUpdateBatchInfo.encode(this.toProto()).finish()})}static unpackAny(t){return Gr.fromProto(B.MsgUpdateBatchInfo.decode(t.value))}}class Jr extends m{constructor(t,e,o){super(),this.authority=t,this.bridge_id=e,this.oracle_enabled=o}static fromAmino(t){const{value:{authority:e,bridge_id:o,oracle_enabled:r}}=t;return new Jr(e,parseInt(o),r)}toAmino(){const{authority:t,bridge_id:e,oracle_enabled:o}=this;return{type:"ophost/MsgUpdateOracleConfig",value:{authority:t,bridge_id:e.toFixed(),oracle_enabled:o}}}static fromData(t){const{authority:e,bridge_id:o,oracle_enabled:r}=t;return new Jr(e,parseInt(o),r)}toData(){const{authority:t,bridge_id:e,oracle_enabled:o}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateOracleConfig",authority:t,bridge_id:e.toFixed(),oracle_enabled:o}}static fromProto(t){return new Jr(t.authority,Number(t.bridgeId),t.oracleEnabled)}toProto(){const{authority:t,bridge_id:e,oracle_enabled:o}=this;return B.MsgUpdateOracleConfig.fromPartial({authority:t,bridgeId:BigInt(e),oracleEnabled:o})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateOracleConfig",value:B.MsgUpdateOracleConfig.encode(this.toProto()).finish()})}static unpackAny(t){return Jr.fromProto(B.MsgUpdateOracleConfig.decode(t.value))}}class Kr extends m{constructor(t,e,o){super(),this.authority=t,this.bridge_id=e,this.metadata=o}static fromAmino(t){const{value:{authority:e,bridge_id:o,metadata:r}}=t;return new Kr(e,parseInt(o),r)}toAmino(){const{authority:t,bridge_id:e,metadata:o}=this;return{type:"ophost/MsgUpdateMetadata",value:{authority:t,bridge_id:e.toFixed(),metadata:o}}}static fromData(t){const{authority:e,bridge_id:o,metadata:r}=t;return new Kr(e,parseInt(o),r)}toData(){const{authority:t,bridge_id:e,metadata:o}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateMetadata",authority:t,bridge_id:e.toFixed(),metadata:o}}static fromProto(t){return new Kr(t.authority,Number(t.bridgeId),Buffer.from(t.metadata).toString("base64"))}toProto(){const{authority:t,bridge_id:e,metadata:o}=this;return B.MsgUpdateMetadata.fromPartial({authority:t,bridgeId:BigInt(e),metadata:Buffer.from(o,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateMetadata",value:B.MsgUpdateMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Kr.fromProto(B.MsgUpdateMetadata.decode(t.value))}}class Ds extends m{constructor(e){super();p(this,"registration_fee");this.registration_fee=new u(e)}static fromAmino(e){return new Ds(u.fromAmino(e.value.registration_fee))}toAmino(){return{type:"ophost/Params",value:{registration_fee:this.registration_fee.toAmino()}}}static fromData(e){return new Ds(u.fromData(e.registration_fee))}toData(){return{"@type":"/opinit.ophost.v1.Params",registration_fee:this.registration_fee.toData()}}static fromProto(e){return new Ds(u.fromProto(e.registrationFee))}toProto(){return pe.Params.fromPartial({registrationFee:this.registration_fee.toProto()})}}class Vr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new Vr(e,Ds.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"ophost/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new Vr(e,Ds.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Vr(t.authority,Ds.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return B.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateParams",value:B.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vr.fromProto(B.MsgUpdateParams.decode(t.value))}}class te extends m{constructor(t,e,o,r){super(),this.output_root=t,this.l1_block_number=e,this.l1_block_time=o,this.l2_block_number=r}static fromAmino(t){const{output_root:e,l1_block_number:o,l1_block_time:r,l2_block_number:s}=t;return new te(e,parseInt(o),new Date(r),parseInt(s))}toAmino(){const{output_root:t,l1_block_number:e,l1_block_time:o,l2_block_number:r}=this;return{output_root:t,l1_block_number:e.toFixed(),l1_block_time:o.toISOString(),l2_block_number:r.toFixed()}}static fromData(t){const{output_root:e,l1_block_number:o,l1_block_time:r,l2_block_number:s}=t;return new te(e,parseInt(o),new Date(r),parseInt(s))}toData(){const{output_root:t,l1_block_number:e,l1_block_time:o,l2_block_number:r}=this;return{output_root:t,l1_block_number:e.toFixed(),l1_block_time:o.toISOString(),l2_block_number:r.toFixed()}}static fromProto(t){return new te(Buffer.from(t.outputRoot).toString("base64"),Number(t.l1BlockNumber),t.l1BlockTime,Number(t.l2BlockNumber))}toProto(){const{output_root:t,l1_block_number:e,l1_block_time:o,l2_block_number:r}=this;return pe.Output.fromPartial({outputRoot:Buffer.from(t,"base64"),l1BlockNumber:BigInt(e),l1BlockTime:o,l2BlockNumber:BigInt(r)})}}class ca extends m{constructor(t,e){super(),this.batch_info=t,this.output=e}static fromAmino(t){const{batch_info:e,output:o}=t;return new ca(_t.fromAmino(e),te.fromAmino(o))}toAmino(){const{batch_info:t,output:e}=this;return{batch_info:t.toAmino(),output:e.toAmino()}}static fromData(t){const{batch_info:e,output:o}=t;return new ca(_t.fromData(e),te.fromData(o))}toData(){const{batch_info:t,output:e}=this;return{batch_info:t.toData(),output:e.toData()}}static fromProto(t){return new ca(_t.fromProto(t.batchInfo),te.fromProto(t.output))}toProto(){const{batch_info:t,output:e}=this;return pe.BatchInfoWithOutput.fromPartial({batchInfo:t.toProto(),output:e.toProto()})}}class ee extends m{constructor(t,e,o,r,s){super(),this.bridge_id=t,this.bridge_addr=e,this.l1_chain_id=o,this.l1_client_id=r,this.bridge_config=s}static fromAmino(t){const{bridge_id:e,bridge_addr:o,l1_chain_id:r,l1_client_id:s,bridge_config:n}=t;return new ee(parseInt(e),o,r,s,Zt.fromAmino(n))}toAmino(){const{bridge_id:t,bridge_addr:e,l1_chain_id:o,l1_client_id:r,bridge_config:s}=this;return{bridge_id:t.toFixed(),bridge_addr:e,l1_chain_id:o,l1_client_id:r,bridge_config:s.toAmino()}}static fromData(t){const{bridge_id:e,bridge_addr:o,l1_chain_id:r,l1_client_id:s,bridge_config:n}=t;return new ee(parseInt(e),o,r,s,Zt.fromData(n))}toData(){const{bridge_id:t,bridge_addr:e,l1_chain_id:o,l1_client_id:r,bridge_config:s}=this;return{bridge_id:t.toFixed(),bridge_addr:e,l1_chain_id:o,l1_client_id:r,bridge_config:s.toData()}}static fromProto(t){return new ee(Number(t.bridgeId),t.bridgeAddr,t.l1ChainId,t.l1ClientId,Zt.fromProto(t.bridgeConfig))}toProto(){const{bridge_id:t,bridge_addr:e,l1_chain_id:o,l1_client_id:r,bridge_config:s}=this;return pi.BridgeInfo.fromPartial({bridgeId:BigInt(t),bridgeAddr:e,l1ChainId:o,l1ClientId:r,bridgeConfig:s.toProto()})}}class Wr extends m{constructor(t,e){super(),this.sender=t,this.bridge_info=e}static fromAmino(t){const{value:{sender:e,bridge_info:o}}=t;return new Wr(e,ee.fromAmino(o))}toAmino(){const{sender:t,bridge_info:e}=this;return{type:"opchild/MsgSetBridgeInfo",value:{sender:t,bridge_info:e.toAmino()}}}static fromData(t){const{sender:e,bridge_info:o}=t;return new Wr(e,ee.fromData(o))}toData(){const{sender:t,bridge_info:e}=this;return{"@type":"/opinit.opchild.v1.MsgSetBridgeInfo",sender:t,bridge_info:e.toData()}}static fromProto(t){return new Wr(t.sender,ee.fromProto(t.bridgeInfo))}toProto(){const{sender:t,bridge_info:e}=this;return z.MsgSetBridgeInfo.fromPartial({sender:t,bridgeInfo:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSetBridgeInfo",value:z.MsgSetBridgeInfo.encode(this.toProto()).finish()})}static unpackAny(t){return Wr.fromProto(z.MsgSetBridgeInfo.decode(t.value))}}class Hr extends m{constructor(t,e,o){super(),this.sender=t,this.height=e,this.data=o}static fromAmino(t){return new Hr(t.value.sender,parseInt(t.value.height),t.value.data)}toAmino(){const{sender:t,height:e,data:o}=this;return{type:"opchild/MsgUpdateOracle",value:{sender:t,height:e.toFixed(),data:o}}}static fromData(t){return new Hr(t.sender,parseInt(t.height),t.data)}toData(){const{sender:t,height:e,data:o}=this;return{"@type":"/opinit.opchild.v1.MsgUpdateOracle",sender:t,height:e.toFixed(),data:o}}static fromProto(t){return new Hr(t.sender,Number(t.height),Buffer.from(t.data).toString("base64"))}toProto(){const{sender:t,height:e,data:o}=this;return z.MsgUpdateOracle.fromPartial({sender:t,height:BigInt(e),data:Buffer.from(o,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateOracle",value:z.MsgUpdateOracle.encode(this.toProto()).finish()})}static unpackAny(t){return Hr.fromProto(z.MsgUpdateOracle.decode(t.value))}}class ks extends m{constructor(e,o,r,s,n,a,i){super();p(this,"min_gas_prices");this.max_validators=e,this.historical_entries=o,this.bridge_executors=s,this.admin=n,this.fee_whitelist=a,this.hook_max_gas=i,this.min_gas_prices=new u(r)}static fromAmino(e){const{value:{max_validators:o,historical_entries:r,min_gas_prices:s,bridge_executors:n,admin:a,fee_whitelist:i,hook_max_gas:d}}=e;return new ks(o,r,u.fromAmino(s),n,a,i,parseInt(d))}toAmino(){const{max_validators:e,historical_entries:o,min_gas_prices:r,bridge_executors:s,admin:n,fee_whitelist:a,hook_max_gas:i}=this;return{type:"opchild/Params",value:{max_validators:e,historical_entries:o,min_gas_prices:r.toAmino(),bridge_executors:s,admin:n,fee_whitelist:a,hook_max_gas:i.toFixed()}}}static fromData(e){const{max_validators:o,historical_entries:r,min_gas_prices:s,bridge_executors:n,admin:a,fee_whitelist:i,hook_max_gas:d}=e;return new ks(o,r,u.fromData(s),n,a,i,parseInt(d))}toData(){const{max_validators:e,historical_entries:o,min_gas_prices:r,bridge_executors:s,admin:n,fee_whitelist:a,hook_max_gas:i}=this;return{"@type":"/opinit.opchild.v1.Params",max_validators:e,historical_entries:o,min_gas_prices:r.toData(),bridge_executors:s,admin:n,fee_whitelist:a,hook_max_gas:i.toFixed()}}static fromProto(e){return new ks(e.maxValidators,e.historicalEntries,u.fromProto(e.minGasPrices),e.bridgeExecutors,e.admin,e.feeWhitelist,Number(e.hookMaxGas))}toProto(){const{max_validators:e,historical_entries:o,min_gas_prices:r,bridge_executors:s,admin:n,fee_whitelist:a,hook_max_gas:i}=this;return pi.Params.fromPartial({maxValidators:e,historicalEntries:o,minGasPrices:r.toProto(),bridgeExecutors:s,admin:n,feeWhitelist:a,hookMaxGas:BigInt(i)})}}class jr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new jr(e,ks.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"opchild/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new jr(e,ks.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/opinit.opchild.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new jr(t.authority,ks.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return z.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateParams",value:z.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return jr.fromProto(z.MsgUpdateParams.decode(t.value))}}class On extends m{constructor(t,e,o,r){super(),this.moniker=t,this.operator_address=e,this.consensus_pubkey=o,this.cons_power=r}static fromAmino(t){const{moniker:e,operator_address:o,consensus_pubkey:r,cons_power:s}=t;return new On(e,o,Z.fromAmino(r),parseInt(s))}toAmino(){const{moniker:t,operator_address:e,consensus_pubkey:o,cons_power:r}=this;return{moniker:t,operator_address:e,consensus_pubkey:o.toAmino(),cons_power:r.toFixed()}}static fromData(t){const{moniker:e,operator_address:o,consensus_pubkey:r,cons_power:s}=t;return new On(e,o,Z.fromData(r),parseInt(s))}toData(){const{moniker:t,operator_address:e,consensus_pubkey:o,cons_power:r}=this;return{moniker:t,operator_address:e,consensus_pubkey:o.toData(),cons_power:r.toFixed()}}static fromProto(t){return new On(t.moniker,t.operatorAddress,Z.unpackAny(t.consensusPubkey),Number(t.consPower))}toProto(){const{moniker:t,operator_address:e,consensus_pubkey:o,cons_power:r}=this;return pi.Validator.fromPartial({moniker:t,operatorAddress:e,consensusPubkey:o.packAny(),consPower:BigInt(r)})}}class Ms extends m{constructor(t,e,o,r,s){super(),this.reward_denom=t,this.dilution_period=e,this.release_rate=o,this.dilution_rate=r,this.release_enabled=s}static fromAmino(t){const{value:{reward_denom:e,dilution_period:o,release_rate:r,dilution_rate:s,release_enabled:n}}=t;return new Ms(e,x.fromAmino(o),r,s,n)}toAmino(){const{reward_denom:t,dilution_period:e,release_rate:o,dilution_rate:r,release_enabled:s}=this;return{type:"reward/Params",value:{reward_denom:t,dilution_period:e.toAmino(),release_rate:o,dilution_rate:r,release_enabled:s}}}static fromData(t){const{reward_denom:e,dilution_period:o,release_rate:r,dilution_rate:s,release_enabled:n}=t;return new Ms(e,x.fromData(o),r,s,n)}toData(){const{reward_denom:t,dilution_period:e,release_rate:o,dilution_rate:r,release_enabled:s}=this;return{"@type":"/initia.reward.v1.Params",reward_denom:t,dilution_period:e.toData(),release_rate:o,dilution_rate:r,release_enabled:s}}static fromProto(t){return new Ms(t.rewardDenom,x.fromProto(t.dilutionPeriod),t.releaseRate,t.dilutionRate,t.releaseEnabled)}toProto(){const{reward_denom:t,dilution_period:e,release_rate:o,dilution_rate:r,release_enabled:s}=this;return Jc.Params.fromPartial({rewardDenom:t,dilutionPeriod:e.toProto(),releaseRate:o,dilutionRate:r,releaseEnabled:s})}}class Qr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new Qr(e,Ms.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"reward/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new Qr(e,Ms.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.reward.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Qr(t.authority,Ms.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return si.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.reward.v1.MsgUpdateParams",value:si.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Qr.fromProto(si.MsgUpdateParams.decode(t.value))}}class Yr extends m{constructor(t){super(),this.address=t}static fromAmino(t){const{value:{address:e}}=t;return new Yr(e)}toAmino(){const{address:t}=this;return{type:"cosmos-sdk/MsgUnjail",value:{address:t}}}static fromData(t){const{address:e}=t;return new Yr(e)}toData(){const{address:t}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:t}}static fromProto(t){return new Yr(t.validatorAddr)}toProto(){const{address:t}=this;return Xn.MsgUnjail.fromPartial({validatorAddr:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:Xn.MsgUnjail.encode(this.toProto()).finish()})}static unpackAny(t){return Yr.fromProto(Xn.MsgUnjail.decode(t.value))}}class xs extends m{constructor(t,e,o,r,s){super(),this.signed_blocks_window=t,this.min_signed_per_window=e,this.downtime_jail_duration=o,this.slash_fraction_double_sign=r,this.slash_fraction_downtime=s}static fromAmino(t){const{value:{signed_blocks_window:e,min_signed_per_window:o,downtime_jail_duration:r,slash_fraction_double_sign:s,slash_fraction_downtime:n}}=t;return new xs(parseInt(e),o,x.fromAmino(r),s,n)}toAmino(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:o,slash_fraction_double_sign:r,slash_fraction_downtime:s}=this;return{type:"cosmos-sdk/x/slashing/Params",value:{signed_blocks_window:t.toFixed(),min_signed_per_window:e,downtime_jail_duration:o.toAmino(),slash_fraction_double_sign:r,slash_fraction_downtime:s}}}static fromData(t){const{signed_blocks_window:e,min_signed_per_window:o,downtime_jail_duration:r,slash_fraction_double_sign:s,slash_fraction_downtime:n}=t;return new xs(parseInt(e),o,x.fromData(r),s,n)}toData(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:o,slash_fraction_double_sign:r,slash_fraction_downtime:s}=this;return{"@type":"/cosmos.slashing.v1beta1.Params",signed_blocks_window:t.toFixed(),min_signed_per_window:e,downtime_jail_duration:o.toData(),slash_fraction_double_sign:r,slash_fraction_downtime:s}}static fromProto(t){return new xs(Number(t.signedBlocksWindow),t.minSignedPerWindow.toString(),x.fromProto(t.downtimeJailDuration),t.slashFractionDoubleSign.toString(),t.slashFractionDowntime.toString())}toProto(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:o,slash_fraction_double_sign:r,slash_fraction_downtime:s}=this;return Ri.Params.fromPartial({signedBlocksWindow:BigInt(t),minSignedPerWindow:Buffer.from(e),downtimeJailDuration:o.toProto(),slashFractionDoubleSign:Buffer.from(r),slashFractionDowntime:Buffer.from(s)})}}class Xr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new Xr(e,xs.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"cosmos-sdk/x/slashing/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new Xr(e,xs.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Xr(t.authority,xs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Xn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUpdateParams",value:Xn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Xr.fromProto(Xn.MsgUpdateParams.decode(t.value))}}class Fn extends m{constructor(t,e,o,r,s,n){super(),this.address=t,this.start_height=e,this.index_offset=o,this.jailed_until=r,this.tombstoned=s,this.missed_blocks_counter=n}static fromAmino(t){const{address:e,start_height:o,index_offset:r,jailed_until:s,tombstoned:n,missed_blocks_counter:a}=t;return new Fn(e,parseInt(o),parseInt(r),new Date(s),n,parseInt(a))}toAmino(){const{address:t,start_height:e,index_offset:o,jailed_until:r,tombstoned:s,missed_blocks_counter:n}=this;return{address:t,start_height:e.toFixed(),index_offset:o.toFixed(),jailed_until:r.toISOString(),tombstoned:s,missed_blocks_counter:n.toFixed()}}static fromData(t){const{address:e,start_height:o,index_offset:r,jailed_until:s,tombstoned:n,missed_blocks_counter:a}=t;return new Fn(e,parseInt(o),parseInt(r),new Date(s),n,parseInt(a))}toData(){const{address:t,start_height:e,index_offset:o,jailed_until:r,tombstoned:s,missed_blocks_counter:n}=this;return{address:t,start_height:e.toFixed(),index_offset:o.toFixed(),jailed_until:r.toISOString(),tombstoned:s,missed_blocks_counter:n.toFixed()}}static fromProto(t){return new Fn(t.address,Number(t.startHeight),Number(t.indexOffset),t.jailedUntil,t.tombstoned,Number(t.missedBlocksCounter))}toProto(){const{address:t,start_height:e,index_offset:o,jailed_until:r,tombstoned:s,missed_blocks_counter:n}=this;return Ri.ValidatorSigningInfo.fromPartial({address:t,startHeight:BigInt(e),indexOffset:BigInt(o),jailedUntil:r,tombstoned:s,missedBlocksCounter:BigInt(n)})}}class Zr extends m{constructor(t,e){super(),this.sender=t,this.subdenom=e}static fromAmino(t){const{value:{sender:e,subdenom:o}}=t;return new Zr(e,o)}toAmino(){const{sender:t,subdenom:e}=this;return{type:"tokenfactory/MsgCreateDenom",value:{sender:t,subdenom:e}}}static fromData(t){const{sender:e,subdenom:o}=t;return new Zr(e,o)}toData(){const{sender:t,subdenom:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgCreateDenom",sender:t,subdenom:e}}static fromProto(t){return new Zr(t.sender,t.subdenom)}toProto(){const{sender:t,subdenom:e}=this;return X.MsgCreateDenom.fromPartial({sender:t,subdenom:e})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgCreateDenom",value:X.MsgCreateDenom.encode(this.toProto()).finish()})}static unpackAny(t){return Zr.fromProto(X.MsgCreateDenom.decode(t.value))}}class ts extends m{constructor(t,e,o){super(),this.sender=t,this.amount=e,this.mint_to_address=o}static fromAmino(t){const{value:{sender:e,amount:o,mint_to_address:r}}=t;return new ts(e,P.fromAmino(o),r)}toAmino(){const{sender:t,amount:e,mint_to_address:o}=this;return{type:"tokenfactory/MsgMint",value:{sender:t,amount:e.toAmino(),mint_to_address:o}}}static fromData(t){const{sender:e,amount:o,mint_to_address:r}=t;return new ts(e,P.fromData(o),r)}toData(){const{sender:t,amount:e,mint_to_address:o}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgMint",sender:t,amount:e.toData(),mint_to_address:o}}static fromProto(t){return new ts(t.sender,P.fromProto(t.amount),t.mintToAddress)}toProto(){const{sender:t,amount:e,mint_to_address:o}=this;return X.MsgMint.fromPartial({sender:t,amount:e.toProto(),mintToAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgMint",value:X.MsgMint.encode(this.toProto()).finish()})}static unpackAny(t){return ts.fromProto(X.MsgMint.decode(t.value))}}class es extends m{constructor(t,e){super(),this.sender=t,this.amount=e}static fromAmino(t){const{value:{sender:e,amount:o}}=t;return new es(e,P.fromAmino(o))}toAmino(){const{sender:t,amount:e}=this;return{type:"tokenfactory/MsgBurn",value:{sender:t,amount:e.toAmino()}}}static fromData(t){const{sender:e,amount:o}=t;return new es(e,P.fromData(o))}toData(){const{sender:t,amount:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgBurn",sender:t,amount:e.toData()}}static fromProto(t){return new es(t.sender,P.fromProto(t.amount))}toProto(){const{sender:t,amount:e}=this;return X.MsgBurn.fromPartial({sender:t,amount:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgBurn",value:X.MsgBurn.encode(this.toProto()).finish()})}static unpackAny(t){return es.fromProto(X.MsgBurn.decode(t.value))}}class os extends m{constructor(t,e,o){super(),this.sender=t,this.denom=e,this.new_admin=o}static fromAmino(t){const{value:{sender:e,denom:o,new_admin:r}}=t;return new os(e,o,r)}toAmino(){const{sender:t,denom:e,new_admin:o}=this;return{type:"tokenfactory/MsgChangeAdmin",value:{sender:t,denom:e,new_admin:o}}}static fromData(t){const{sender:e,denom:o,new_admin:r}=t;return new os(e,o,r)}toData(){const{sender:t,denom:e,new_admin:o}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgChangeAdmin",sender:t,denom:e,new_admin:o}}static fromProto(t){return new os(t.sender,t.denom,t.newAdmin)}toProto(){const{sender:t,denom:e,new_admin:o}=this;return X.MsgChangeAdmin.fromPartial({sender:t,denom:e,newAdmin:o})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgChangeAdmin",value:X.MsgChangeAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return os.fromProto(X.MsgChangeAdmin.decode(t.value))}}class rs extends m{constructor(t,e){super(),this.sender=t,this.metadata=e}static fromAmino(t){const{value:{sender:e,metadata:o}}=t;return new rs(e,Qt.fromAmino(o))}toAmino(){const{sender:t,metadata:e}=this;return{type:"tokenfactory/MsgSetDenomMetadata",value:{sender:t,metadata:e.toAmino()}}}static fromData(t){const{sender:e,metadata:o}=t;return new rs(e,Qt.fromData(o))}toData(){const{sender:t,metadata:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata",sender:t,metadata:e.toData()}}static fromProto(t){return new rs(t.sender,Qt.fromProto(t.metadata))}toProto(){const{sender:t,metadata:e}=this;return X.MsgSetDenomMetadata.fromPartial({sender:t,metadata:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata",value:X.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return rs.fromProto(X.MsgSetDenomMetadata.decode(t.value))}}class ss extends m{constructor(t,e,o){super(),this.sender=t,this.denom=e,this.cosmwasm_address=o}static fromAmino(t){const{value:{sender:e,denom:o,cosmwasm_address:r}}=t;return new ss(e,o,r)}toAmino(){const{sender:t,denom:e,cosmwasm_address:o}=this;return{type:"tokenfactory/MsgSetBeforeSendHook",value:{sender:t,denom:e,cosmwasm_address:o}}}static fromData(t){const{sender:e,denom:o,cosmwasm_address:r}=t;return new ss(e,o,r)}toData(){const{sender:t,denom:e,cosmwasm_address:o}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook",sender:t,denom:e,cosmwasm_address:o}}static fromProto(t){return new ss(t.sender,t.denom,t.cosmwasmAddress)}toProto(){const{sender:t,denom:e,cosmwasm_address:o}=this;return X.MsgSetBeforeSendHook.fromPartial({sender:t,denom:e,cosmwasmAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook",value:X.MsgSetBeforeSendHook.encode(this.toProto()).finish()})}static unpackAny(t){return ss.fromProto(X.MsgSetBeforeSendHook.decode(t.value))}}class Is extends m{constructor(e,o){super();p(this,"denom_creation_fee");this.denom_creation_gas_consume=o,this.denom_creation_fee=new u(e)}static fromAmino(e){const{denom_creation_fee:o,denom_creation_gas_consume:r}=e;return new Is(u.fromAmino(o),parseInt(r))}toAmino(){const{denom_creation_fee:e,denom_creation_gas_consume:o}=this;return{denom_creation_fee:e.toAmino(),denom_creation_gas_consume:o.toFixed()}}static fromData(e){const{denom_creation_fee:o,denom_creation_gas_consume:r}=e;return new Is(u.fromData(o),parseInt(r))}toData(){const{denom_creation_fee:e,denom_creation_gas_consume:o}=this;return{denom_creation_fee:e.toData(),denom_creation_gas_consume:o.toFixed()}}static fromProto(e){return new Is(u.fromProto(e.denomCreationFee),Number(e.denomCreationGasConsume))}toProto(){const{denom_creation_fee:e,denom_creation_gas_consume:o}=this;return Kc.Params.fromPartial({denomCreationFee:e.toProto(),denomCreationGasConsume:BigInt(o)})}}class ns extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:o}}=t;return new ns(e,Is.fromAmino(o))}toAmino(){const{authority:t,params:e}=this;return{type:"tokenfactory/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:o}=t;return new ns(e,Is.fromData(o))}toData(){const{authority:t,params:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new ns(t.authority,Is.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return X.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgUpdateParams",value:X.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ns.fromProto(X.MsgUpdateParams.decode(t.value))}}exports.Msg=void 0;(c=>{function t(r){switch(r.type){case"block-sdk/x/auction/MsgAuctionBid":return he.fromAmino(r);case"block-sdk/x/auction/MsgUpdateParams":return fe.fromAmino(r);case"cosmos-sdk/x/auth/MsgUpdateParams":return ge.fromAmino(r);case"cosmos-sdk/MsgGrant":return He.fromAmino(r);case"cosmos-sdk/MsgRevoke":return je.fromAmino(r);case"cosmos-sdk/MsgExec":return Qe.fromAmino(r);case"cosmos-sdk/MsgSend":return Ye.fromAmino(r);case"cosmos-sdk/MsgMultiSend":return st.fromAmino(r);case"cosmos-sdk/x/bank/MsgUpdateParams":return Xe.fromAmino(r);case"cosmos-sdk/MsgSetSendEnabled":return Ze.fromAmino(r);case"bank/MsgSetDenomMetadata":return to.fromAmino(r);case"cosmos-sdk/MsgVerifyInvariant":return oo.fromAmino(r);case"cosmos-sdk/x/crisis/MsgUpdateParams":return ro.fromAmino(r);case"cosmos-sdk/x/consensus/MsgUpdateParams":return eo.fromAmino(r);case"cosmos-sdk/MsgModifyWithdrawAddress":return so.fromAmino(r);case"cosmos-sdk/MsgWithdrawDelegationReward":return no.fromAmino(r);case"cosmos-sdk/MsgWithdrawValidatorCommission":return ao.fromAmino(r);case"cosmos-sdk/MsgFundCommunityPool":return io.fromAmino(r);case"distribution/MsgUpdateParams":return co.fromAmino(r);case"cosmos-sdk/distr/MsgCommunityPoolSpend":return mo.fromAmino(r);case"distr/MsgDepositValidatorRewardsPool":return uo.fromAmino(r);case"cosmos-sdk/MsgSubmitEvidence":return po.fromAmino(r);case"evm/MsgCreate":return ho.fromAmino(r);case"evm/MsgCreate2":return fo.fromAmino(r);case"evm/MsgCall":return go.fromAmino(r);case"evm/MsgUpdateParams":return yo.fromAmino(r);case"cosmos-sdk/MsgGrantAllowance":return vo.fromAmino(r);case"cosmos-sdk/MsgRevokeAllowance":return Po.fromAmino(r);case"noble/forwarding/RegisterAccount":return Ao.fromAmino(r);case"noble/forwarding/ClearAccount":return wo.fromAmino(r);case"cosmos-sdk/v1/MsgCancelProposal":return bo.fromAmino(r);case"cosmos-sdk/MsgDeposit":return Do.fromAmino(r);case"cosmos-sdk/v1/MsgDeposit":return ko.fromAmino(r);case"cosmos-sdk/MsgSubmitProposal":return So.fromAmino(r);case"cosmos-sdk/v1/MsgSubmitProposal":return Co.fromAmino(r);case"cosmos-sdk/MsgVote":return $t.fromAmino(r);case"cosmos-sdk/v1/MsgVote":return Lt.fromAmino(r);case"cosmos-sdk/MsgVoteWeighted":return Uo.fromAmino(r);case"cosmos-sdk/v1/MsgVoteWeighted":return Bo.fromAmino(r);case"gov/MsgUpdateParams":return Eo.fromAmino(r);case"cosmos-sdk/MsgCreateGroup":return No.fromAmino(r);case"cosmos-sdk/MsgCreateGroupPolicy":return To.fromAmino(r);case"cosmos-sdk/MsgCreateGroupWithPolicy":return Ro.fromAmino(r);case"cosmos-sdk/MsgUpdateGroupAdmin":return Lo.fromAmino(r);case"cosmos-sdk/MsgUpdateGroupDecisionPolicy":return zo.fromAmino(r);case"cosmos-sdk/MsgUpdateGroupMembers":return Go.fromAmino(r);case"cosmos-sdk/MsgUpdateGroupMetadata":return Jo.fromAmino(r);case"cosmos-sdk/MsgUpdateGroupPolicyAdmin":return Ko.fromAmino(r);case"cosmos-sdk/MsgUpdateGroupPolicyMetadata":return Vo.fromAmino(r);case"cosmos-sdk/group/MsgExec":return qo.fromAmino(r);case"cosmos-sdk/group/MsgLeaveGroup":return $o.fromAmino(r);case"cosmos-sdk/group/MsgSubmitProposal":return Gt.fromAmino(r);case"cosmos-sdk/group/MsgVote":return zt.fromAmino(r);case"ibchooks/MsgUpdateACL":return Ho.fromAmino(r);case"ibchooks/MsgUpdateParams":return jo.fromAmino(r);case"nft-transfer/MsgTransfer":return Qo.fromAmino(r);case"nft-transfer/MsgUpdateParams":return Yo.fromAmino(r);case"ibc-perm/MsgUpdateAdmin":return Xo.fromAmino(r);case"ibc-perm/MsgUpdatePermissionedRelayers":return Zo.fromAmino(r);case"cosmos-sdk/MsgTransfer":return We.fromAmino(r);case"intertx/MsgRegisterAccount":return or.fromAmino(r);case"intertx/MsgSubmitTx":return rr.fromAmino(r);case"connect/x/marketmap/MsgCreateMarkets":return ar.fromAmino(r);case"connect/x/marketmap/MsgUpdateMarkets":return ir.fromAmino(r);case"connect/x/marketmap/MsgUpsertMarkets":return cr.fromAmino(r);case"connect/x/marketmap/MsgRemoveMarkets":return mr.fromAmino(r);case"connect/x/marketmap/MsgRemoveMarketAuthorities":return ur.fromAmino(r);case"connect/x/marketmap/MsgParams":return dr.fromAmino(r);case"move/MsgPublish":return Jt.fromAmino(r);case"move/MsgExecute":return lr.fromAmino(r);case"move/MsgExecuteJSON":return pr.fromAmino(r);case"move/MsgScript":return hr.fromAmino(r);case"move/MsgScriptJSON":return fr.fromAmino(r);case"move/MsgUpdateParams":return gr.fromAmino(r);case"move/MsgWhitelist":return yr.fromAmino(r);case"move/MsgDelist":return _r.fromAmino(r);case"move/MsgGovExecute":return vr.fromAmino(r);case"move/MsgGovExecuteJSON":return Pr.fromAmino(r);case"move/MsgGovPublish":return Kt.fromAmino(r);case"move/MsgGovScript":return Ar.fromAmino(r);case"move/MsgGovScriptJSON":return wr.fromAmino(r);case"mstaking/MsgDelegate":return br.fromAmino(r);case"mstaking/MsgUndelegate":return Dr.fromAmino(r);case"mstaking/MsgBeginRedelegate":return kr.fromAmino(r);case"mstaking/MsgCreateValidator":return Mr.fromAmino(r);case"mstaking/MsgEditValidator":return Vt.fromAmino(r);case"mstaking/MsgCancelUnbondingDelegation":return xr.fromAmino(r);case"mstaking/MsgUpdateParams":return Ir.fromAmino(r);case"opchild/MsgAddValidator":return Sr.fromAmino(r);case"opchild/MsgRemoveValidator":return Cr.fromAmino(r);case"opchild/MsgFinalizeTokenDeposit":return Ur.fromAmino(r);case"opchild/MsgInitiateTokenWithdrawal":return Br.fromAmino(r);case"opchild/MsgExecuteMessages":return Er.fromAmino(r);case"opchild/MsgSpendFeePool":return Nr.fromAmino(r);case"opchild/MsgSetBridgeInfo":return Wr.fromAmino(r);case"opchild/MsgUpdateOracle":return Hr.fromAmino(r);case"opchild/MsgUpdateParams":return jr.fromAmino(r);case"ophost/MsgRecordBatch":return Or.fromAmino(r);case"ophost/MsgCreateBridge":return Fr.fromAmino(r);case"ophost/MsgProposeOutput":return Tr.fromAmino(r);case"ophost/MsgDeleteOutput":return Rr.fromAmino(r);case"ophost/MsgInitiateTokenDeposit":return qr.fromAmino(r);case"ophost/MsgFinalizeTokenWithdrawal":return $r.fromAmino(r);case"ophost/MsgUpdateProposer":return Lr.fromAmino(r);case"ophost/MsgUpdateChallenger":return zr.fromAmino(r);case"ophost/MsgUpdateBatchInfo":return Gr.fromAmino(r);case"ophost/MsgUpdateOracleConfig":return Jr.fromAmino(r);case"ophost/MsgUpdateMetadata":return Kr.fromAmino(r);case"ophost/MsgUpdateParams":return Vr.fromAmino(r);case"connect/x/oracle/MsgAddCurrencyPairs":return sr.fromAmino(r);case"connect/x/oracle/MsgRemoveCurrencyPairs":return nr.fromAmino(r);case"reward/MsgUpdateParams":return Qr.fromAmino(r);case"cosmos-sdk/MsgUnjail":return Yr.fromAmino(r);case"cosmos-sdk/x/slashing/MsgUpdateParams":return Xr.fromAmino(r);case"tokenfactory/MsgCreateDenom":return Zr.fromAmino(r);case"tokenfactory/MsgMint":return ts.fromAmino(r);case"tokenfactory/MsgBurn":return es.fromAmino(r);case"tokenfactory/MsgChangeAdmin":return os.fromAmino(r);case"tokenfactory/MsgSetDenomMetadata":return rs.fromAmino(r);case"tokenfactory/MsgSetBeforeSendHook":return ss.fromAmino(r);case"tokenfactory/MsgUpdateParams":return ns.fromAmino(r);case"cosmos-sdk/MsgSoftwareUpgrade":return tr.fromAmino(r);case"cosmos-sdk/MsgCancelUpgrade":return er.fromAmino(r);case"wasm/MsgStoreCode":return Ce.fromAmino(r);case"wasm/MsgInstantiateContract":return Ue.fromAmino(r);case"wasm/MsgInstantiateContract2":return Be.fromAmino(r);case"wasm/MsgExecuteContract":return Ee.fromAmino(r);case"wasm/MsgMigrateContract":return Ne.fromAmino(r);case"wasm/MsgUpdateAdmin":return Oe.fromAmino(r);case"wasm/MsgClearAdmin":return Fe.fromAmino(r);case"wasm/MsgUpdateInstantiateConfig":return Te.fromAmino(r);case"wasm/MsgUpdateParams":return Re.fromAmino(r);case"wasm/MsgSudoContract":return qe.fromAmino(r);case"wasm/MsgPinCodes":return $e.fromAmino(r);case"wasm/MsgUnpinCodes":return Le.fromAmino(r);case"wasm/MsgStoreAndInstantiateContract":return ze.fromAmino(r);case"wasm/MsgStoreAndMigrateContract":return Ge.fromAmino(r);case"wasm/MsgAddCodeUploadParamsAddresses":return Je.fromAmino(r);case"wasm/MsgRemoveCodeUploadParamsAddresses":return Ke.fromAmino(r);case"wasm/MsgUpdateContractLabel":return Ve.fromAmino(r)}}c.fromAmino=t;function e(r){switch(r["@type"]){case"/sdk.auction.v1.MsgAuctionBid":return he.fromData(r);case"/sdk.auction.v1.MsgUpdateParams":return fe.fromData(r);case"/cosmos.auth.v1beta1.MsgUpdateParams":return ge.fromData(r);case"/cosmos.authz.v1beta1.MsgGrant":return He.fromData(r);case"/cosmos.authz.v1beta1.MsgRevoke":return je.fromData(r);case"/cosmos.authz.v1beta1.MsgExec":return Qe.fromData(r);case"/cosmos.bank.v1beta1.MsgSend":return Ye.fromData(r);case"/cosmos.bank.v1beta1.MsgMultiSend":return st.fromData(r);case"/cosmos.bank.v1beta1.MsgUpdateParams":return Xe.fromData(r);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Ze.fromData(r);case"/initia.bank.v1.MsgSetDenomMetadata":return to.fromData(r);case"/celestia.blob.v1.MsgPayForBlobs":return nn.fromData(r);case"/cosmos.consensus.v1.MsgUpdateParams":return eo.fromData(r);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return oo.fromData(r);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return ro.fromData(r);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return so.fromData(r);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return no.fromData(r);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return ao.fromData(r);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return io.fromData(r);case"/initia.distribution.v1.MsgUpdateParams":return co.fromData(r);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return mo.fromData(r);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return uo.fromData(r);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return po.fromData(r);case"/minievm.evm.v1.MsgCreate":return ho.fromData(r);case"/minievm.evm.v1.MsgCreate2":return fo.fromData(r);case"/minievm.evm.v1.MsgCall":return go.fromData(r);case"/minievm.evm.v1.MsgUpdateParams":return yo.fromData(r);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return vo.fromData(r);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return Po.fromData(r);case"/noble.forwarding.v1.MsgRegisterAccount":return Ao.fromData(r);case"/noble.forwarding.v1.MsgClearAccount":return wo.fromData(r);case"/cosmos.gov.v1.MsgCancelProposal":return bo.fromData(r);case"/cosmos.gov.v1beta1.MsgDeposit":return Do.fromData(r);case"/cosmos.gov.v1.MsgDeposit":return ko.fromData(r);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return So.fromData(r);case"/cosmos.gov.v1.MsgSubmitProposal":return Co.fromData(r);case"/cosmos.gov.v1beta1.MsgVote":return $t.fromData(r);case"/cosmos.gov.v1.MsgVote":return Lt.fromData(r);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return Uo.fromData(r);case"/cosmos.gov.v1.MsgVoteWeighted":return Bo.fromData(r);case"/initia.gov.v1.MsgUpdateParams":return Eo.fromData(r);case"/cosmos.group.v1.MsgCreateGroup":return No.fromData(r);case"/cosmos.group.v1.MsgCreateGroupPolicy":return To.fromData(r);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return Ro.fromData(r);case"/cosmos.group.v1.MsgExec":return qo.fromData(r);case"/cosmos.group.v1.MsgLeaveGroup":return $o.fromData(r);case"/cosmos.group.v1.MsgSubmitProposal":return Gt.fromData(r);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return Lo.fromData(r);case"/cosmos.group.v1.MsgUpdateGroupMembers":return Go.fromData(r);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return Jo.fromData(r);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return Ko.fromData(r);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return zo.fromData(r);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return Vo.fromData(r);case"/cosmos.group.v1.MsgVote":return zt.fromData(r);case"/ibc.applications.fee.v1.MsgPayPacketFee":return cn.fromData(r);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return mn.fromData(r);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return dn.fromData(r);case"/ibc.applications.fee.v1.MsgRegisterPayee":return un.fromData(r);case"/initia.ibchooks.v1.MsgUpdateACL":return Ho.fromData(r);case"/initia.ibchooks.v1.MsgUpdateParams":return jo.fromData(r);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Qo.fromData(r);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return Yo.fromData(r);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return Xo.fromData(r);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return Zo.fromData(r);case"/ibc.applications.transfer.v1.MsgTransfer":return We.fromData(r);case"/ibc.applications.transfer.v1.MsgUpdateParams":return rn.fromData(r);case"/ibc.core.channel.v1.MsgChannelOpenInit":return hn.fromData(r);case"/ibc.core.channel.v1.MsgChannelOpenTry":return kn.fromData(r);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return Mn.fromData(r);case"/ibc.core.channel.v1.MsgChannelOpenAck":return xn.fromData(r);case"/ibc.core.channel.v1.MsgChannelCloseInit":return In.fromData(r);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return Sn.fromData(r);case"/ibc.core.channel.v1.MsgRecvPacket":return Cn.fromData(r);case"/ibc.core.channel.v1.MsgAcknowledgement":return Un.fromData(r);case"/ibc.core.channel.v1.MsgTimeout":return Bn.fromData(r);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return En.fromData(r);case"/ibc.core.channel.v1.MsgUpdateParams":return Nn.fromData(r);case"/ibc.core.client.v1.MsgCreateClient":return fn.fromData(r);case"/ibc.core.client.v1.MsgUpdateClient":return gn.fromData(r);case"/ibc.core.client.v1.MsgUpgradeClient":return yn.fromData(r);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return _n.fromData(r);case"/ibc.core.client.v1.MsgRecoverClient":return vn.fromData(r);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return Pn.fromData(r);case"/ibc.core.client.v1.MsgUpdateParams":return An.fromData(r);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return oa.fromData(r);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return ra.fromData(r);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return sa.fromData(r);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return na.fromData(r);case"/ibc.core.connection.v1.MsgUpdateParams":return aa.fromData(r);case"/initia.intertx.v1.MsgRegisterAccount":return or.fromData(r);case"/initia.intertx.v1.MsgSubmitTx":return rr.fromData(r);case"/connect.marketmap.v2.MsgCreateMarkets":return ar.fromData(r);case"/connect.marketmap.v2.MsgUpdateMarkets":return ir.fromData(r);case"/connect.marketmap.v2.MsgUpsertMarkets":return cr.fromData(r);case"/connect.marketmap.v2.MsgRemoveMarkets":return mr.fromData(r);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return ur.fromData(r);case"/connect.marketmap.v2.MsgParams":return dr.fromData(r);case"/initia.move.v1.MsgPublish":return Jt.fromData(r);case"/initia.move.v1.MsgExecute":return lr.fromData(r);case"/initia.move.v1.MsgExecuteJSON":return pr.fromData(r);case"/initia.move.v1.MsgScript":return hr.fromData(r);case"/initia.move.v1.MsgScriptJSON":return fr.fromData(r);case"/initia.move.v1.MsgUpdateParams":return gr.fromData(r);case"/initia.move.v1.MsgWhitelist":return yr.fromData(r);case"/initia.move.v1.MsgDelist":return _r.fromData(r);case"/initia.move.v1.MsgGovExecute":return vr.fromData(r);case"/initia.move.v1.MsgGovExecuteJSON":return Pr.fromData(r);case"/initia.move.v1.MsgGovPublish":return Kt.fromData(r);case"/initia.move.v1.MsgGovScript":return Ar.fromData(r);case"/initia.move.v1.MsgGovScriptJSON":return wr.fromData(r);case"/initia.mstaking.v1.MsgDelegate":return br.fromData(r);case"/initia.mstaking.v1.MsgUndelegate":return Dr.fromData(r);case"/initia.mstaking.v1.MsgBeginRedelegate":return kr.fromData(r);case"/initia.mstaking.v1.MsgCreateValidator":return Mr.fromData(r);case"/initia.mstaking.v1.MsgEditValidator":return Vt.fromData(r);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return xr.fromData(r);case"/initia.mstaking.v1.MsgUpdateParams":return Ir.fromData(r);case"/opinit.opchild.v1.MsgAddValidator":return Sr.fromData(r);case"/opinit.opchild.v1.MsgRemoveValidator":return Cr.fromData(r);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return Ur.fromData(r);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return Br.fromData(r);case"/opinit.opchild.v1.MsgExecuteMessages":return Er.fromData(r);case"/opinit.opchild.v1.MsgSpendFeePool":return Nr.fromData(r);case"/opinit.opchild.v1.MsgSetBridgeInfo":return Wr.fromData(r);case"/opinit.opchild.v1.MsgUpdateOracle":return Hr.fromData(r);case"/opinit.opchild.v1.MsgUpdateParams":return jr.fromData(r);case"/opinit.ophost.v1.MsgRecordBatch":return Or.fromData(r);case"/opinit.ophost.v1.MsgCreateBridge":return Fr.fromData(r);case"/opinit.ophost.v1.MsgProposeOutput":return Tr.fromData(r);case"/opinit.ophost.v1.MsgDeleteOutput":return Rr.fromData(r);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return qr.fromData(r);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return $r.fromData(r);case"/opinit.ophost.v1.MsgUpdateProposer":return Lr.fromData(r);case"/opinit.ophost.v1.MsgUpdateChallenger":return zr.fromData(r);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return Gr.fromData(r);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return Jr.fromData(r);case"/opinit.ophost.v1.MsgUpdateMetadata":return Kr.fromData(r);case"/opinit.ophost.v1.MsgUpdateParams":return Vr.fromData(r);case"/connect.oracle.v2.MsgAddCurrencyPairs":return sr.fromData(r);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return nr.fromData(r);case"/initia.reward.v1.MsgUpdateParams":return Qr.fromData(r);case"/cosmos.slashing.v1beta1.MsgUnjail":return Yr.fromData(r);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Xr.fromData(r);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Zr.fromData(r);case"/miniwasm.tokenfactory.v1.MsgMint":return ts.fromData(r);case"/miniwasm.tokenfactory.v1.MsgBurn":return es.fromData(r);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return os.fromData(r);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return rs.fromData(r);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return ss.fromData(r);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return ns.fromData(r);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return tr.fromData(r);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return er.fromData(r);case"/cosmwasm.wasm.v1.MsgStoreCode":return Ce.fromData(r);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return Ue.fromData(r);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return Be.fromData(r);case"/cosmwasm.wasm.v1.MsgExecuteContract":return Ee.fromData(r);case"/cosmwasm.wasm.v1.MsgMigrateContract":return Ne.fromData(r);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return Oe.fromData(r);case"/cosmwasm.wasm.v1.MsgClearAdmin":return Fe.fromData(r);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return Te.fromData(r);case"/cosmwasm.wasm.v1.MsgUpdateParams":return Re.fromData(r);case"/cosmwasm.wasm.v1.MsgSudoContract":return qe.fromData(r);case"/cosmwasm.wasm.v1.MsgPinCodes":return $e.fromData(r);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return Le.fromData(r);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return ze.fromData(r);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return Ge.fromData(r);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return Je.fromData(r);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return Ke.fromData(r);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return Ve.fromData(r)}}c.fromData=e;function o(r){switch(r.typeUrl){case"/sdk.auction.v1.MsgAuctionBid":return he.unpackAny(r);case"/sdk.auction.v1.MsgUpdateParams":return fe.unpackAny(r);case"/cosmos.auth.v1beta1.MsgUpdateParams":return ge.unpackAny(r);case"/cosmos.authz.v1beta1.MsgGrant":return He.unpackAny(r);case"/cosmos.authz.v1beta1.MsgRevoke":return je.unpackAny(r);case"/cosmos.authz.v1beta1.MsgExec":return Qe.unpackAny(r);case"/cosmos.bank.v1beta1.MsgSend":return Ye.unpackAny(r);case"/cosmos.bank.v1beta1.MsgMultiSend":return st.unpackAny(r);case"/cosmos.bank.v1beta1.MsgUpdateParams":return Xe.unpackAny(r);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Ze.unpackAny(r);case"/initia.bank.v1.MsgSetDenomMetadata":return to.unpackAny(r);case"/celestia.blob.v1.MsgPayForBlobs":return nn.unpackAny(r);case"/cosmos.consensus.v1.MsgUpdateParams":return eo.unpackAny(r);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return oo.unpackAny(r);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return ro.unpackAny(r);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return so.unpackAny(r);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return no.unpackAny(r);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return ao.unpackAny(r);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return io.unpackAny(r);case"/initia.distribution.v1.MsgUpdateParams":return co.unpackAny(r);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return mo.unpackAny(r);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return uo.unpackAny(r);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return po.unpackAny(r);case"/minievm.evm.v1.MsgCreate":return ho.unpackAny(r);case"/minievm.evm.v1.MsgCreate2":return fo.unpackAny(r);case"/minievm.evm.v1.MsgCall":return go.unpackAny(r);case"/minievm.evm.v1.MsgUpdateParams":return yo.unpackAny(r);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return vo.unpackAny(r);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return Po.unpackAny(r);case"/noble.forwarding.v1.MsgRegisterAccount":return Ao.unpackAny(r);case"/noble.forwarding.v1.MsgClearAccount":return wo.unpackAny(r);case"/cosmos.gov.v1.MsgCancelProposal":return bo.unpackAny(r);case"/cosmos.gov.v1beta1.MsgDeposit":return Do.unpackAny(r);case"/cosmos.gov.v1.MsgDeposit":return ko.unpackAny(r);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return So.unpackAny(r);case"/cosmos.gov.v1.MsgSubmitProposal":return Co.unpackAny(r);case"/cosmos.gov.v1beta1.MsgVote":return $t.unpackAny(r);case"/cosmos.gov.v1.MsgVote":return Lt.unpackAny(r);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return Uo.unpackAny(r);case"/cosmos.gov.v1.MsgVoteWeighted":return Bo.unpackAny(r);case"/initia.gov.v1.MsgUpdateParams":return Eo.unpackAny(r);case"/cosmos.group.v1.MsgCreateGroup":return No.unpackAny(r);case"/cosmos.group.v1.MsgCreateGroupPolicy":return To.unpackAny(r);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return Ro.unpackAny(r);case"/cosmos.group.v1.MsgExec":return qo.unpackAny(r);case"/cosmos.group.v1.MsgLeaveGroup":return $o.unpackAny(r);case"/cosmos.group.v1.MsgSubmitProposal":return Gt.unpackAny(r);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return Lo.unpackAny(r);case"/cosmos.group.v1.MsgUpdateGroupMembers":return Go.unpackAny(r);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return Jo.unpackAny(r);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return Ko.unpackAny(r);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return zo.unpackAny(r);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return Vo.unpackAny(r);case"/cosmos.group.v1.MsgVote":return zt.unpackAny(r);case"/ibc.applications.fee.v1.MsgPayPacketFee":return cn.unpackAny(r);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return mn.unpackAny(r);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return dn.unpackAny(r);case"/ibc.applications.fee.v1.MsgRegisterPayee":return un.unpackAny(r);case"/initia.ibchooks.v1.MsgUpdateACL":return Ho.unpackAny(r);case"/initia.ibchooks.v1.MsgUpdateParams":return jo.unpackAny(r);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Qo.unpackAny(r);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return Yo.unpackAny(r);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return Xo.unpackAny(r);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return Zo.unpackAny(r);case"/ibc.applications.transfer.v1.MsgTransfer":return We.unpackAny(r);case"/ibc.applications.transfer.v1.MsgUpdateParams":return rn.unpackAny(r);case"/ibc.core.channel.v1.MsgChannelOpenInit":return hn.unpackAny(r);case"/ibc.core.channel.v1.MsgChannelOpenTry":return kn.unpackAny(r);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return Mn.unpackAny(r);case"/ibc.core.channel.v1.MsgChannelOpenAck":return xn.unpackAny(r);case"/ibc.core.channel.v1.MsgChannelCloseInit":return In.unpackAny(r);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return Sn.unpackAny(r);case"/ibc.core.channel.v1.MsgRecvPacket":return Cn.unpackAny(r);case"/ibc.core.channel.v1.MsgAcknowledgement":return Un.unpackAny(r);case"/ibc.core.channel.v1.MsgTimeout":return Bn.unpackAny(r);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return En.unpackAny(r);case"/ibc.core.channel.v1.MsgUpdateParams":return Nn.unpackAny(r);case"/ibc.core.client.v1.MsgCreateClient":return fn.unpackAny(r);case"/ibc.core.client.v1.MsgUpdateClient":return gn.unpackAny(r);case"/ibc.core.client.v1.MsgUpgradeClient":return yn.unpackAny(r);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return _n.unpackAny(r);case"/ibc.core.client.v1.MsgRecoverClient":return vn.unpackAny(r);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return Pn.unpackAny(r);case"/ibc.core.client.v1.MsgUpdateParams":return An.unpackAny(r);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return oa.unpackAny(r);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return ra.unpackAny(r);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return sa.unpackAny(r);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return na.unpackAny(r);case"/ibc.core.connection.v1.MsgUpdateParams":return aa.unpackAny(r);case"/initia.intertx.v1.MsgRegisterAccount":return or.unpackAny(r);case"/initia.intertx.v1.MsgSubmitTx":return rr.unpackAny(r);case"/connect.marketmap.v2.MsgCreateMarkets":return ar.unpackAny(r);case"/connect.marketmap.v2.MsgUpdateMarkets":return ir.unpackAny(r);case"/connect.marketmap.v2.MsgUpsertMarkets":return cr.unpackAny(r);case"/connect.marketmap.v2.MsgRemoveMarkets":return mr.unpackAny(r);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return ur.unpackAny(r);case"/connect.marketmap.v2.MsgParams":return dr.unpackAny(r);case"/initia.move.v1.MsgPublish":return Jt.unpackAny(r);case"/initia.move.v1.MsgExecute":return lr.unpackAny(r);case"/initia.move.v1.MsgExecuteJSON":return pr.unpackAny(r);case"/initia.move.v1.MsgScript":return hr.unpackAny(r);case"/initia.move.v1.MsgScriptJSON":return fr.unpackAny(r);case"/initia.move.v1.MsgUpdateParams":return gr.unpackAny(r);case"/initia.move.v1.MsgWhitelist":return yr.unpackAny(r);case"/initia.move.v1.MsgDelist":return _r.unpackAny(r);case"/initia.move.v1.MsgGovExecute":return vr.unpackAny(r);case"/initia.move.v1.MsgGovExecuteJSON":return Pr.unpackAny(r);case"/initia.move.v1.MsgGovPublish":return Kt.unpackAny(r);case"/initia.move.v1.MsgGovScript":return Ar.unpackAny(r);case"/initia.move.v1.MsgGovScriptJSON":return wr.unpackAny(r);case"/initia.mstaking.v1.MsgDelegate":return br.unpackAny(r);case"/initia.mstaking.v1.MsgUndelegate":return Dr.unpackAny(r);case"/initia.mstaking.v1.MsgBeginRedelegate":return kr.unpackAny(r);case"/initia.mstaking.v1.MsgCreateValidator":return Mr.unpackAny(r);case"/initia.mstaking.v1.MsgEditValidator":return Vt.unpackAny(r);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return xr.unpackAny(r);case"/initia.mstaking.v1.MsgUpdateParams":return Ir.unpackAny(r);case"/opinit.opchild.v1.MsgAddValidator":return Sr.unpackAny(r);case"/opinit.opchild.v1.MsgRemoveValidator":return Cr.unpackAny(r);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return Ur.unpackAny(r);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return Br.unpackAny(r);case"/opinit.opchild.v1.MsgExecuteMessages":return Er.unpackAny(r);case"/opinit.opchild.v1.MsgSpendFeePool":return Nr.unpackAny(r);case"/opinit.opchild.v1.MsgSetBridgeInfo":return Wr.unpackAny(r);case"/opinit.opchild.v1.MsgUpdateOracle":return Hr.unpackAny(r);case"/opinit.opchild.v1.MsgUpdateParams":return jr.unpackAny(r);case"/opinit.ophost.v1.MsgRecordBatch":return Or.unpackAny(r);case"/opinit.ophost.v1.MsgCreateBridge":return Fr.unpackAny(r);case"/opinit.ophost.v1.MsgProposeOutput":return Tr.unpackAny(r);case"/opinit.ophost.v1.MsgDeleteOutput":return Rr.unpackAny(r);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return qr.unpackAny(r);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return $r.unpackAny(r);case"/opinit.ophost.v1.MsgUpdateProposer":return Lr.unpackAny(r);case"/opinit.ophost.v1.MsgUpdateChallenger":return zr.unpackAny(r);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return Gr.unpackAny(r);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return Jr.unpackAny(r);case"/opinit.ophost.v1.MsgUpdateMetadata":return Kr.unpackAny(r);case"/opinit.ophost.v1.MsgUpdateParams":return Vr.unpackAny(r);case"/connect.oracle.v2.MsgAddCurrencyPairs":return sr.unpackAny(r);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return nr.unpackAny(r);case"/initia.reward.v1.MsgUpdateParams":return Qr.unpackAny(r);case"/cosmos.slashing.v1beta1.MsgUnjail":return Yr.unpackAny(r);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Xr.unpackAny(r);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Zr.unpackAny(r);case"/miniwasm.tokenfactory.v1.MsgMint":return ts.unpackAny(r);case"/miniwasm.tokenfactory.v1.MsgBurn":return es.unpackAny(r);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return os.unpackAny(r);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return rs.unpackAny(r);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return ss.unpackAny(r);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return ns.unpackAny(r);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return tr.unpackAny(r);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return er.unpackAny(r);case"/cosmwasm.wasm.v1.MsgStoreCode":return Ce.unpackAny(r);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return Ue.unpackAny(r);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return Be.unpackAny(r);case"/cosmwasm.wasm.v1.MsgExecuteContract":return Ee.unpackAny(r);case"/cosmwasm.wasm.v1.MsgMigrateContract":return Ne.unpackAny(r);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return Oe.unpackAny(r);case"/cosmwasm.wasm.v1.MsgClearAdmin":return Fe.unpackAny(r);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return Te.unpackAny(r);case"/cosmwasm.wasm.v1.MsgUpdateParams":return Re.unpackAny(r);case"/cosmwasm.wasm.v1.MsgSudoContract":return qe.unpackAny(r);case"/cosmwasm.wasm.v1.MsgPinCodes":return $e.unpackAny(r);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return Le.unpackAny(r);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return ze.unpackAny(r);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return Ge.unpackAny(r);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return Je.unpackAny(r);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return Ke.unpackAny(r);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return Ve.unpackAny(r);default:throw new Error(`not supported msg ${r.typeUrl}`)}}c.fromProto=o})(exports.Msg||(exports.Msg={}));function da(c,t,e){try{return q.bech32.decode(t).prefix===c&&t.length==e}catch{return!1}}exports.AccAddress=void 0;(c=>{function t(n){return da("init",n,43)||da("init",n,63)}c.validate=t;function e(n){const a=q.bech32.decode(n);return q.bech32.encode("init",a.words)}c.fromValAddress=e;function o(n){const a=q.bech32.decode(n);return"0x"+Buffer.from(q.bech32.fromWords(a.words)).toString("hex")}c.toHex=o;function r(n){const a=n.replace(/^0x0+|^0x|^0+(?!x)/,"");return a.length<=40?q.bech32.encode("init",q.bech32.toWords(Buffer.from(a.padStart(40,"0"),"hex"))):q.bech32.encode("init",q.bech32.toWords(Buffer.from(a.padStart(64,"0"),"hex")))}c.fromHex=r;function s(n){const a=q.bech32.decode(n);return Buffer.from(q.bech32.fromWords(a.words))}c.toBuffer=s})(exports.AccAddress||(exports.AccAddress={}));exports.AccPubKey=void 0;(c=>{function t(o){return da("initpub",o,46)}c.validate=t;function e(o){const r=q.bech32.decode(o);return q.bech32.encode("initpub",r.words)}c.fromAccAddress=e})(exports.AccPubKey||(exports.AccPubKey={}));exports.ValAddress=void 0;(c=>{function t(o){return da("initvaloper",o,50)}c.validate=t;function e(o){const r=q.bech32.decode(o);return q.bech32.encode("initvaloper",r.words)}c.fromAccAddress=e})(exports.ValAddress||(exports.ValAddress={}));exports.ValPubKey=void 0;(c=>{function t(o){return da("initvaloperpub",o,53)}c.validate=t;function e(o){const r=q.bech32.decode(o);return q.bech32.encode("initvaloperpub",r.words)}c.fromValAddress=e})(exports.ValPubKey||(exports.ValPubKey={}));exports.ValConsAddress=void 0;(c=>{function t(e){return da("initvalcons",e,50)}c.validate=t})(exports.ValConsAddress||(exports.ValConsAddress={}));class om{constructor(t){p(this,"bitarray");p(this,"signatures");this.multisig_pubkey=t;const e=t.pubkeys.length;this.bitarray=ls.fromBits(e),this.signatures=[]}appendSignature(t,e){const o=this.bitarray.numTrueBitsBefore(e);if(this.bitarray.getIndex(e)){this.signatures[o]=t;return}if(this.bitarray.setIndex(e,!0),o==this.signatures.length){this.signatures.push(t);return}this.signatures.splice(o,0,t)}appendSignatureFromPubKey(t,e){const o=this.multisig_pubkey.pubkeys.findIndex(r=>r.key===e.key);if(o==-1)throw new Error("provided key doesn't exist in public_keys");this.appendSignature(t,o)}appendSignatureV2s(t){for(const e of t){if(!(e.public_key instanceof ot))throw new Error("non-SimplePublicKey cannot be used to sign multisig");this.appendSignatureFromPubKey(e.data,e.public_key)}}toSignatureDescriptor(){return new H.Descriptor(new H.Descriptor.Multi(this.bitarray,this.signatures))}}class Ki extends m{constructor(t,e,o,r,s){super(),this.chain_id=t,this.account_number=e,this.sequence=o,this.auth_info=r,this.tx_body=s}toAmino(){const{chain_id:t,account_number:e,sequence:o,tx_body:{memo:r,messages:s,timeout_height:n},auth_info:{fee:a}}=this;return{chain_id:t,account_number:e.toFixed(),sequence:o.toFixed(),timeout_height:n&&n!==0?n.toFixed():void 0,fee:a.toAmino(),msgs:s.map(i=>i.toAmino()),memo:r??""}}toData(){const{account_number:t,chain_id:e,tx_body:o,auth_info:r}=this;return{body_bytes:Buffer.from(o.toBytes()).toString("base64"),auth_info_bytes:Buffer.from(r.toBytes()).toString("base64"),account_number:t.toFixed(),chain_id:e}}toProto(){const{account_number:t,chain_id:e,tx_body:o,auth_info:r}=this;return at.SignDoc.fromPartial({bodyBytes:o.toBytes(),authInfoBytes:r.toBytes(),accountNumber:BigInt(t),chainId:e})}toUnSignedTx(){return new et(this.tx_body,this.auth_info,[])}toBytes(){return at.SignDoc.encode(this.toProto()).finish()}}class la{constructor(t,e,o,r,s,n,a,i,d,h,y){this.height=t,this.txhash=e,this.raw_log=o,this.logs=r,this.gas_wanted=s,this.gas_used=n,this.tx=a,this.timestamp=i,this.events=d,this.code=h,this.codespace=y}static fromProto(t){return new la(Number(t.height),t.txhash,t.rawLog,t.logs.map(e=>Tn.fromProto(e)),Number(t.gasWanted),Number(t.gasUsed),et.unpackAny(t.tx),t.timestamp,t.events,t.code,t.codespace)}static fromData(t){return new la(parseInt(t.height),t.txhash,t.raw_log,t.logs.map(e=>Tn.fromData(e)),parseInt(t.gas_wanted),parseInt(t.gas_used),et.fromData(t.tx),t.timestamp,t.events,t.code,t.codespace)}}exports.EventsByType=void 0;(c=>{function t(e){const o={};return e.forEach(r=>{r.attributes.forEach(s=>{r.type in o||(o[r.type]=new Map),s.key in o[r.type]||o[r.type].set(s.key,[]),o[r.type].get(s.key).push(s.value)})}),o}c.parse=t})(exports.EventsByType||(exports.EventsByType={}));class Tn{constructor(t,e,o){p(this,"eventsByType");this.msg_index=t,this.log=e,this.events=o,this.eventsByType=exports.EventsByType.parse(this.events)}static fromData(t){return new Tn(t.msg_index,t.log,t.events.map(e=>({type:e.type,attributes:e.attributes.map(o=>({key:o.key,value:o.value}))})))}toData(){const{msg_index:t,log:e,events:o,eventsByType:r}=this;return{msg_index:t,log:e,events:o,eventsByType:r}}static fromProto(t){return new Tn(t.msgIndex,t.log,t.events.map(e=>({type:e.type,attributes:e.attributes.map(o=>({key:o.key,value:o.value}))})))}toProto(){const{msg_index:t,log:e,events:o}=this;return Vc.ABCIMessageLog.fromPartial({msgIndex:t,log:e,events:o})}}class Vi extends T{async accountInfo(t,e={}){const{account:o}=await this.c.get(`/cosmos/auth/v1beta1/accounts/${t}`,e);return exports.Account.fromData(o)}async moduleAccount(t,e={}){const{account:o}=await this.c.get(`/cosmos/auth/v1beta1/module_accounts/${t}`,e);return ne.fromData(o)}async parameters(t={}){return this.c.get("/cosmos/auth/v1beta1/params",t).then(e=>ms.fromData(e.params))}}class Wi extends T{async grants(t,e,o,r={}){return this.c.get("/cosmos/authz/v1beta1/grants",Object.assign({granter:t,grantee:e,msg_type_url:o},r)).then(s=>[s.grants.map(Ht.fromData),s.pagination])}async granter(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/granter/${t}`,e).then(o=>[o.grants.map(r=>Ht.fromData(r)),o.pagination])}async grantee(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/grantee/${t}`,e).then(o=>[o.grants.map(r=>Ht.fromData(r)),o.pagination])}}class Hi extends T{async balance(t,e={}){return this.c.get(`/cosmos/bank/v1beta1/balances/${t}`,e).then(o=>[u.fromData(o.balances),o.pagination])}async balanceByDenom(t,e,o={}){return this.c.get(`/cosmos/bank/v1beta1/balances/${t}/by_denom`,{...o,denom:e}).then(r=>P.fromData(r.balance))}async total(t={}){return this.c.get("/cosmos/bank/v1beta1/supply",t).then(e=>[u.fromData(e.supply),e.pagination])}async spendableBalances(t,e={}){return this.c.get(`/cosmos/bank/v1beta1/spendable_balances/${t}`,e).then(o=>[u.fromData(o.balances),o.pagination])}async parameters(t={}){return this.c.get("/cosmos/bank/v1beta1/params",t).then(e=>ds.fromData(e.params))}}class ji extends T{async rewards(t,e={}){const o=await this.c.get(`/initia/distribution/v1/delegators/${t}/rewards`,e),r={};for(const s of o.rewards)r[s.validator_address]=s.reward.map(n=>({denom:n.denom,coins:u.fromData(n.dec_coins)}));return{rewards:r,total:o.total.map(s=>({denom:s.denom,coins:u.fromData(s.dec_coins)}))}}async rewardsByValidator(t,e,o={}){return this.c.get(`/initia/distribution/v1/delegators/${t}/rewards/${e}`,o).then(r=>r.rewards.map(s=>({denom:s.denom,coins:u.fromData(s.dec_coins)})))}async validatorRewards(t,e={}){return this.c.get(`/initia/distribution/v1/validators/${t}/outstanding_rewards`,e).then(o=>o.rewards.rewards.map(r=>({denom:r.denom,coins:u.fromData(r.dec_coins)})))}async validatorCommission(t,e={}){return this.c.get(`/initia/distribution/v1/validators/${t}/commission`,e).then(o=>o.commission.commissions.map(r=>({denom:r.denom,coins:u.fromData(r.dec_coins)})))}async withdrawAddress(t,e={}){return this.c.get(`/cosmos/distribution/v1beta1/delegators/${t}/withdraw_address`,e).then(o=>o.withdraw_address)}async communityPool(t={}){return this.c.get("/cosmos/distribution/v1beta1/community_pool",t).then(e=>u.fromData(e.pool))}async parameters(t={}){return this.c.get("/initia/distribution/v1/params",t).then(e=>ps.fromData(e.params))}}class Qi extends T{async evidences(t={}){return this.c.get("/cosmos/evidence/v1beta1/evidence",t).then(e=>[e.evidence.map(exports.Evidence.fromData),e.pagination])}async evidence(t,e={}){return this.c.get(`/cosmos/evidence/v1beta1/evidence/${t}`,e).then(o=>exports.Evidence.fromData(o.evidence))}}class Yi extends T{async code(t,e={}){return this.c.get(`/minievm/evm/v1/codes/${t}`,e).then(o=>o.code)}async state(t,e,o={}){return this.c.get(`/minievm/evm/v1/states/${t}/${e}`,o).then(r=>r.value)}async erc20Factory(t={}){return this.c.get("/minievm/evm/v1/contracts/erc20_factory",t).then(e=>e.address)}async erc20Wrapper(t={}){return this.c.get("/minievm/evm/v1/contracts/erc20_wrapper",t).then(e=>e.address)}async contractAddrByDenom(t,e={}){return this.c.get("/minievm/evm/v1/contracts/by_denom",{...e,denom:t}).then(o=>o.address)}async denom(t,e={}){return this.c.get(`/minievm/evm/v1/denoms/${t}`,e).then(o=>o.denom)}async call(t,e,o,r){return this.c.post("/minievm/evm/v1/call",{sender:t,contract_addr:e,input:o,with_trace:r})}async parameters(t={}){return this.c.get("/minievm/evm/v1/params",t).then(e=>hs.fromData(e.params))}}class Xi extends T{async allowances(t,e={}){return this.c.get(`/cosmos/feegrant/v1beta1/allowances/${t}`,e).then(o=>({allowances:o.allowances.map(r=>({granter:r.granter,grantee:r.grantee,allowance:exports.Allowance.fromData(r.allowance)})),pagination:o.pagination}))}async allowance(t,e){return this.c.get(`/cosmos/feegrant/v1beta1/allowance/${t}/${e}`).then(o=>exports.Allowance.fromData(o.allowance.allowance))}async allowancesByGranter(t,e={}){return this.c.get(`/cosmos/feegrant/v1beta1/issued/${t}`,e).then(o=>({allowances:o.allowances.map(r=>({granter:r.granter,grantee:r.grantee,allowance:exports.Allowance.fromData(r.allowance)})),pagination:o.pagination}))}}class Zi extends T{async denoms(t={}){return this.c.get("/noble/forwarding/v1/denoms",t).then(e=>e.allowed_denoms)}async address(t,e,o,r={}){return this.c.get(`/noble/forwarding/v1/address/${t}/${e}/${o}`,r).then(s=>s.address)}async stats(t,e={}){return this.c.get(`/noble/forwarding/v1/stats/${t}`,e).then(o=>({num_of_accounts:parseInt(o.num_of_accounts),num_of_forwards:parseInt(o.num_of_forwards),total_forwarded:P.fromData(o.total_forwarded)}))}}class tc extends T{async proposals(t={}){return this.c.get("/initia/gov/v1/proposals",t).then(e=>[e.proposals.map(ie.fromData),e.pagination])}async proposal(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}`,e).then(o=>ie.fromData(o.proposal))}async deposits(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/deposits`,e).then(o=>[o.deposits.map(r=>Zn.fromData(r)),o.pagination])}async votes(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/votes`,e).then(o=>[o.votes.map(r=>qs.fromData(r)),o.pagination])}async tally(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}/tally`,e).then(o=>fs.fromData(o.tally_result))}async parameters(t={}){return this.c.get("/initia/gov/v1/params",t).then(e=>gs.fromData(e.params))}async emergencyProposals(t={}){return this.c.get("/initia/gov/v1/emergency_proposals",t).then(e=>[e.proposals.map(o=>ie.fromData(o)),e.pagination])}}class ec extends T{async groupInfo(t){return this.c.get(`/cosmos/group/v1/group_info/${t}`).then(e=>Wo.fromData(e.info))}async groupPolicyInfo(t){return this.c.get(`/cosmos/group/v1/group_policy_info/${t}`).then(e=>Ls.fromData(e.info))}async groupMembers(t,e={}){return this.c.get(`/cosmos/group/v1/group_members/${t}`,e).then(o=>[o.members.map(ta.fromData),o.pagination])}async groupsByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_admin/${t}`,e).then(o=>[o.groups.map(Wo.fromData),o.pagination])}async groupPoliciesByGroup(t,e={}){return this.c.get(`/cosmos/group/v1/group_policies_by_group/${t}`,e).then(o=>[o.group_policies.map(Ls.fromData),o.pagination])}async groupPoliciesByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/group_policies_by_admin/${t}`,e).then(o=>[o.group_policies.map(Ls.fromData),o.pagination])}async proposal(t){return this.c.get(`/cosmos/group/v1/proposal/${t}`).then(e=>ys.fromData(e.proposal))}async proposalsByGroupPolicy(t,e={}){return this.c.get(`/cosmos/group/v1/proposals_by_group_policy/${t}`,e).then(o=>[o.proposals.map(ys.fromData),o.pagination])}async voteByProposalVoter(t,e){return this.c.get(`/cosmos/group/v1/vote_by_proposal_voter/${t}/${e}`).then(o=>ce.fromData(o.vote))}async votesByProposal(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_proposal/${t}`,e).then(o=>[o.votes.map(ce.fromData),o.pagination])}async votesByVoter(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_voter/${t}`,e).then(o=>[o.votes.map(ce.fromData),o.pagination])}async groupsByMember(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_member/${t}`,e).then(o=>[o.groups.map(Wo.fromData),o.pagination])}async tally(t){return this.c.get(`/cosmos/group/v1/proposals/${t}/tally`).then(e=>e.tally)}async groups(t={}){return this.c.get("/cosmos/group/v1/groups",t).then(e=>[e.groups.map(Wo.fromData),e.pagination])}}class oc extends T{async channels(t={}){return this.c.get("/ibc/core/channel/v1/channels",t).then(e=>[e.channels.map(Bt.fromData),e.pagination])}async port(t,e,o={}){return this.c.get(`/ibc/core/channel/v1/channels/${t}/ports/${e}`,o).then(r=>({channel:Bt.fromData(r.channel),proof:r.proof,proof_height:w.fromData(r.proof_height)}))}async connections(t={}){return this.c.get("/ibc/core/connection/v1/connections",t).then(e=>[e.connections.map(bn.fromData),e.pagination])}async connection(t,e={}){return this.c.get(`/ibc/core/connection/v1/connections/${t}`,e).then(o=>bn.fromData(o.connection))}async connectionChannels(t,e={}){return this.c.get(`/ibc/core/channel/v1/connections/${t}/channels`,e).then(o=>[o.channels.map(Bt.fromData),w.fromData(o.height),o.pagination])}async parameters(t={}){return this.c.get("/ibc/core/client/v1/params",t).then(e=>Gs.fromData(e.params))}async clientStates(t={}){return this.c.get("/ibc/core/client/v1/client_states",t).then(e=>[e.client_states.map(ea.fromData),e.pagination])}async clientState(t,e={}){return this.c.get(`/ibc/core/client/v1/client_states/${t}`,e).then(o=>({client_state:o.client_state,proof:o.proof,proof_height:w.fromData(o.proof_height)}))}async clientStatus(t,e={}){return this.c.get(`/ibc/core/client/v1/client_status/${t}`,e).then(o=>o.status)}async consensusStates(t,e={}){return this.c.get(`/ibc/core/client/v1/consensus_states/${t}`,e).then()}async consensusStateHeights(t,e={}){return this.c.get(`/ibc/core/client/v1/consensus_states/${t}/heights`,e).then(o=>[o.consensus_state_heights.map(w.fromData),o.pagination])}async unreceivedPackets(t,e,o,r={}){return this.c.get(`/ibc/core/channel/v1/channels/${e}/ports/${t}/packet_commitments/${o.join(",")}/unreceived_packets`,r)}async unreceivedAcks(t,e,o,r={}){return this.c.get(`/ibc/core/channel/v1/channels/${e}/ports/${t}/packet_commitments/${o.join(",")}/unreceived_acks`,r)}}class rc extends T{async acls(t={}){return this.c.get("/initia/ibchooks/v1/acls",t).then(e=>[e.acls.map(ln.fromData),e.pagination])}async acl(t,e={}){return this.c.get(`/initia/ibchooks/v1/acls/${t}`,e).then(o=>ln.fromData(o.acl))}async parameters(t={}){return this.c.get("/initia/ibchooks/v1/params",t).then(e=>_s.fromData(e.params))}}class sc extends T{async classTrace(t){return this.c.get(`/ibc/apps/nft_transfer/v1/class_traces/${t}`).then(e=>pn.fromData(e.class_trace))}async classTraces(t={}){return this.c.get("/ibc/apps/nft_transfer/v1/class_traces",t).then(e=>[e.class_traces.map(pn.fromData),e.pagination])}async classHash(t){return await this.c.get(`/ibc/apps/nft_transfer/v1/class_hashes/${t}`).then(e=>e.hash)}async escrowAddress(t,e,o={}){return this.c.get(`/ibc/apps/nft_transfer/v1/channels/${t}/ports/${e}/escrow_address`,o).then(r=>r.escrow_address)}async parameters(t={}){return this.c.get("/ibc/apps/nft_transfer/v1/params",t).then(e=>vs.fromData(e.params))}}class nc extends T{async denomTrace(t){return this.c.get(`/ibc/apps/transfer/v1/denom_traces/${t}`).then(e=>sn.fromData(e.denom_trace))}async denomTraces(t={}){return this.c.get("/ibc/apps/transfer/v1/denom_traces",t).then(e=>[e.denom_traces.map(sn.fromData),e.pagination])}async denomHash(t){return await this.c.get(`/ibc/apps/transfer/v1/denom_hashes/${t}`).then(e=>e.hash)}async parameters(t={}){return this.c.get("/ibc/apps/transfer/v1/params",t).then(e=>Us.fromData(e.params))}async escrowAddress(t,e,o={}){return this.c.get(`/ibc/apps/transfer/v1/channels/${t}/ports/${e}/escrow_address`,o).then(r=>r.escrow_address)}}class ac extends T{async channelStates(t={}){return this.c.get("/ibc/apps/perm/v1/channel_states",t).then(e=>[e.channel_states,e.pagination])}async channelState(t,e){return this.c.get(`/ibc/apps/perm/v1/channel_states/${t}/${e}`).then(o=>o.channel_state)}}class ic extends T{async interchainAccount(t,e){return this.c.get(`/inter-tx/interchain_account/owner/${t}/connection/${e}`).then(o=>o.interchain_account_address)}}class cc extends T{async marketMap(t={}){return this.c.get("/connect/marketmap/v2/marketmap",t).then(e=>{const o={};for(const[r,s]of Object.entries(e.market_map.markets))o[r]=nt.fromData(s);return{markets:o}})}async markets(t={}){return this.c.get("/connect/marketmap/v2/markets",t).then(e=>e.markets.map(nt.fromData))}async market(t,e={}){return this.c.get("/connect/marketmap/v2/market",{...e,"currency_pair.Base":t.Base,"currency_pair.Quote":t.Quote}).then(o=>nt.fromData(o.market))}async lastUpdated(t={}){return this.c.get("/connect/marketmap/v2/last_updated",t).then(e=>parseInt(e.last_updated))}async parameters(t={}){return this.c.get("/connect/marketmap/v2/params",t).then(e=>Ps.fromData(e.params))}}class mc extends T{async modules(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules`,e).then(o=>[o.modules.map(ws.fromData),o.pagination])}async module(t,e,o={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules/${e}`,o).then(r=>ws.fromData(r.module))}async resources(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/resources`,e).then(o=>[o.resources.map(r=>JSON.parse(r.move_resource)),o.pagination])}async resource(t,e,o={}){return this.c.get(`/initia/move/v1/accounts/${t}/resources/by_struct_tag`,{...o,struct_tag:e}).then(r=>JSON.parse(r.resource.move_resource))}async tableInfo(t,e={}){return this.c.get(`/initia/move/v1/tables/${t}`,e).then(o=>o.table_info)}async tableEntries(t,e={}){return this.c.get(`/initia/move/v1/tables/${t}/entries`,e).then(o=>[o.table_entries,o.pagination])}async tableEntry(t,e,o={}){return this.c.get(`/initia/move/v1/tables/${t}/entries/by_key_bytes`,{...o,key_bytes:e}).then(r=>r.table_entry)}async viewFunction(t,e,o,r=[],s=[]){return this.c.post(`/initia/move/v1/accounts/${t}/modules/${e}/view_functions/${o}`,{type_args:r,args:s}).then(n=>JSON.parse(n.data))}async view(t,e,o,r=[],s=[]){return this.c.post("/initia/move/v1/view",{address:t,module_name:e,function_name:o,type_args:r,args:s})}async viewBatch(t){return this.c.post("/initia/move/v1/view/batch",{requests:t}).then(e=>e.responses)}async viewJSON(t,e,o,r=[],s=[]){return this.c.post("/initia/move/v1/view/json",{address:t,module_name:e,function_name:o,type_args:r,args:s})}async viewBatchJSON(t){return this.c.post("/initia/move/v1/view/json/batch",{requests:t}).then(e=>e.responses)}async scriptABI(t){return this.c.post("/initia/move/v1/script/abi",{code_bytes:t})}async denom(t,e={}){return this.c.get("/initia/move/v1/denom",{...e,metadata:t}).then(o=>o.denom)}async metadata(t,e={}){return this.c.get("/initia/move/v1/metadata",{...e,denom:t}).then(o=>o.metadata)}async parameters(t={}){return this.c.get("/initia/move/v1/params",t).then(e=>As.fromData(e.params))}}class uc extends T{async delegations(t,e,o={}){if(t!==void 0&&e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations/${t}`,o).then(r=>[[js.fromData(r.delegation_response)],{total:1,next_key:""}]);if(t!==void 0)return this.c.get(`/initia/mstaking/v1/delegations/${t}`,o).then(r=>[r.delegation_responses.map(js.fromData),r.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations`,o).then(r=>[r.delegation_responses.map(js.fromData),r.pagination]);throw new TypeError("arguments delegator and validator cannot both be empty")}async delegation(t,e){return this.delegations(t,e).then(o=>o[0][0])}async unbondingDelegations(t,e,o={}){if(t!==void 0&&e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations/${t}/unbonding_delegation`,o).then(r=>[[vt.fromData(r.unbond)],{next_key:"",total:1}]);if(t!==void 0)return this.c.get(`/initia/mstaking/v1/delegators/${t}/unbonding_delegations`,o).then(r=>[r.unbonding_responses.map(vt.fromData),r.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/unbonding_delegations`,o).then(r=>[r.unbonding_responses.map(vt.fromData),r.pagination]);throw new TypeError("arguments delegator and validator cannot both be empty")}async unbondingDelegation(t,e){return this.unbondingDelegations(t,e).then(o=>o[0][0])}async redelegations(t,e,o,r={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/redelegations`,{...r,src_validator_addr:e,dst_validator_addr:o}).then(s=>[s.redelegation_responses.map(Ft.fromData),s.pagination])}async bondedValidators(t,e={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/validators`,e).then(o=>[o.validators.map(W.fromData),o.pagination])}async totalDelegationBalance(t,e={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/total_delegation_balance`,e).then(o=>u.fromData(o.balance))}async validators(t={}){return this.c.get("/initia/mstaking/v1/validators",t).then(e=>[e.validators.map(W.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/initia/mstaking/v1/validators/${t}`,e).then(o=>W.fromData(o.validator))}async pool(t={}){return this.c.get("/initia/mstaking/v1/pool",t).then(e=>({bonded_tokens:u.fromData(e.pool.bonded_tokens),not_bonded_tokens:u.fromData(e.pool.not_bonded_tokens)}))}async parameters(t={}){return this.c.get("/initia/mstaking/v1/params",t).then(e=>bs.fromData(e.params))}}class dc extends T{async validators(t={}){return this.c.get("/opinit/opchild/v1/validators",t).then(e=>[e.validators.map(On.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/opinit/opchild/v1/validator/${t}`,e).then(o=>On.fromData(o.validator))}async bridgeInfo(t={}){return this.c.get("/opinit/opchild/v1/bridge_info",t).then(e=>ee.fromData(e.bridge_info))}async nextL1Sequence(t={}){return this.c.get("/opinit/opchild/v1/next_l1_sequence",t).then(e=>parseInt(e.next_l1_sequence))}async nextL2Sequence(t={}){return this.c.get("/opinit/opchild/v1/next_l2_sequence",t).then(e=>parseInt(e.next_l2_sequence))}async baseDenom(t,e={}){return this.c.get(`/opinit/opchild/v1/base_denom/${t}`,e).then(o=>o.base_denom)}async parameters(t={}){return this.c.get("/opinit/opchild/v1/params",t).then(e=>ks.fromData(e.params))}}class lc extends T{async bridgeInfos(t={}){return this.c.get("/opinit/ophost/v1/bridges",t).then(e=>[e.bridges.map(ee.fromData),e.pagination])}async bridgeInfo(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}`,e).then(o=>ee.fromData(o))}async tokenPairs(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs`,e).then(o=>[o.token_pairs,o.pagination])}async tokenPairByL1Denom(t,e,o={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs/by_l1_denom`,{...o,l1_denom:e}).then(r=>r.token_pair)}async tokenPairByL2Denom(t,e,o={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs/by_l2_denom`,{...o,l2_denom:e}).then(r=>r.token_pair)}async lastFinalizedOutput(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/last_finalized_output`,e).then(o=>({output_index:parseInt(o.output_index),output_proposal:te.fromData(o.output_proposal)}))}async outputInfos(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/outputs`,e).then(o=>[o.output_proposals.map(r=>({bridge_id:parseInt(r.bridge_id??`${t}`),output_index:parseInt(r.output_index),output_proposal:te.fromData(r.output_proposal)})),o.pagination])}async outputInfo(t,e,o={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/outputs/${e}`,o).then(r=>({bridge_id:parseInt(r.bridge_id??`${t}`),output_index:parseInt(r.output_index),output_proposal:te.fromData(r.output_proposal)}))}async withdrawalClaimed(t,e,o={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/withdrawals/claimed/by_hash`,{...o,withdrawal_hash:Buffer.from(e,"hex").toString("base64")}).then(r=>r.claimed)}async nextL1Sequence(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/next_l1_sequence`,e).then(o=>parseInt(o.next_l1_sequence))}async batchInfos(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/batch_infos`,e).then(o=>[o.batch_infos.map(r=>ca.fromData(r)),o.pagination])}async parameters(t={}){return this.c.get("/opinit/ophost/v1/params",t).then(e=>Ds.fromData(e.params))}}class pc extends T{async currencyPairs(t={}){return this.c.get("/connect/oracle/v2/get_all_tickers",t).then(e=>e.currency_pairs.map(dt.fromData))}async price(t,e={}){return this.c.get("/connect/oracle/v2/get_price",{...e,currency_pair:t.toString()}).then(o=>ia.fromData(o.price))}}class hc extends T{async last_dilution_timestamp(t={}){return this.c.get("/initia/reward/v1/last_dilution_timestamp",t).then(e=>e.last_dilution_timestamp)}async annualProvisions(t={}){return this.c.get("/initia/reward/v1/annual_provisions",t).then(e=>e.annual_provisions)}async parameters(t={}){return this.c.get("/initia/reward/v1/params",t).then(e=>Ms.fromData(e.params))}}class fc extends T{async signingInfos(t={}){return this.c.get("/cosmos/slashing/v1beta1/signing_infos",t).then(e=>[e.info.map(Fn.fromData),e.pagination])}async signingInfo(t,e={}){return this.c.get(`/cosmos/slashing/v1beta1/signing_infos/${t}`,e).then(o=>Fn.fromData(o.val_signing_info))}async parameters(t={}){return this.c.get("/cosmos/slashing/v1beta1/params",t).then(e=>xs.fromData(e.params))}}class gc extends T{async nodeInfo(t={}){return this.c.getRaw("/cosmos/base/tendermint/v1beta1/node_info",t)}async chainId(t={}){return this.c.get("/cosmos/base/tendermint/v1beta1/node_info",t).then(e=>{var o;return(o=e==null?void 0:e.default_node_info)==null?void 0:o.network})}async syncing(t={}){return this.c.getRaw("/cosmos/base/tendermint/v1beta1/syncing",t).then(e=>e.syncing)}async validatorSet(t,e={}){const o=t!==void 0?`/cosmos/base/tendermint/v1beta1/validatorsets/${t}`:"/cosmos/base/tendermint/v1beta1/validatorsets/latest";return this.c.get(o,e).then(r=>[r.validators,r.pagination])}async blockInfo(t,e={}){const o=t!==void 0?`/cosmos/base/tendermint/v1beta1/blocks/${t}`:"/cosmos/base/tendermint/v1beta1/blocks/latest";return this.c.getRaw(o,e)}}class yc extends T{async authorityMetadata(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms/${t}/authority_metadata`,e).then(o=>o.authority_metadata)}async beforeSendHookAddr(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms/${t}/before_send_hook`,e).then(o=>o.cosmwasm_address)}async denomsFromCreator(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms_from_creator/${t}`,e).then(o=>o.denoms)}async parameters(t={}){return this.c.get("/miniwasm/tokenfactory/v1/params",t).then(e=>Is.fromData(e.params))}}const bi=c=>oe.bcs.bytes(32,c).transform({input:t=>{if(t.startsWith("init1")&&(t=exports.AccAddress.toHex(t)),t.startsWith("0x")&&(t=t.slice(2).padStart(64,"0")),!t.match(/[0-9a-f]+$/i))throw new Error("invalid address");return Buffer.from(t,"hex")},output:t=>`0x${Buffer.from(t).toString("hex")}`}),rm={address:bi,object:bi,fixed_point32:c=>oe.bcs.u64(c).transform({input:t=>k(t).times(new tt.BigNumber("4294967296")).toFixed(0,tt.BigNumber.ROUND_DOWN),output:t=>k(t).div(new tt.BigNumber("4294967296")).toNumber()}),fixed_point64:c=>oe.bcs.u128(c).transform({input:t=>k(t).times(new tt.BigNumber("18446744073709551616")).toFixed(0,tt.BigNumber.ROUND_DOWN),output:t=>k(t).div(new tt.BigNumber("18446744073709551616")).toNumber()}),decimal128:c=>oe.bcs.u128(c).transform({input:t=>k(t).times(new tt.BigNumber("1000000000000000000")).toFixed(0,tt.BigNumber.ROUND_DOWN),output:t=>k(t).div(new tt.BigNumber("1000000000000000000")).toNumber()}),decimal256:c=>oe.bcs.u256(c).transform({input:t=>k(t).times(new tt.BigNumber("1000000000000000000")).toFixed(0,tt.BigNumber.ROUND_DOWN),output:t=>k(t).div(new tt.BigNumber("1000000000000000000")).toNumber()}),biguint:c=>oe.bcs.vector(oe.bcs.u8(c)).transform({input:t=>ci(BigInt(t)),output:t=>mi(t)}),bigdecimal:c=>oe.bcs.vector(oe.bcs.u8(c)).transform({input:t=>{const o=k(t).times(new tt.BigNumber("1000000000000000000")).toFixed(0,tt.BigNumber.ROUND_DOWN);return ci(BigInt(o))},output:t=>{const e=mi(t).toString();return k(e).div(new tt.BigNumber("1000000000000000000")).toNumber()}})},sm={...oe.bcs,...rm};function ci(c){const t=[];for(;c>0;)t.push(Number(c%BigInt(256))),c=c/BigInt(256);return new Uint8Array(t)}function mi(c){let t=0n;for(;c.length>0;)t=t*256n+BigInt(c.pop());return t}function nm(c){return c.code!==void 0&&c.code!==0&&c.code!=="0"}class Ia{constructor(t,e){this.gas_info=t,this.result=e}static fromData(t){return new Ia({gas_wanted:parseInt(t.gas_info.gas_wanted),gas_used:parseInt(t.gas_info.gas_used)},t.result)}}class Xs extends T{constructor(t){super(t.apiRequester),this.rest=t}async txInfo(t,e={}){return this.c.getRaw(`/cosmos/tx/v1beta1/txs/${t}`,e).then(o=>la.fromData(o.tx_response))}async create(t,e){let{fee:o}=e;const{msgs:r,memo:s,timeoutHeight:n}=e,a=[];for(const i of t){let d=i.sequenceNumber,h=i.publicKey;if(d===void 0||!h){const y=await this.rest.auth.accountInfo(i.address);d===void 0&&(d=y.getSequenceNumber()),h||(h=y.getPublicKey())}a.push({sequenceNumber:d,publicKey:h})}return o===void 0&&(o=await this.rest.tx.estimateFee(a,e)),new et(new ae(r,s??"",n??0),new kt([],o),[])}async txInfosByHeight(t){const e=await this.rest.tendermint.blockInfo(t),{txs:o}=e.block.data;if(o){const r=o.map(n=>Ra(n)),s=[];for(const n of r)s.push(await this.txInfo(n));return s}else return[]}async estimateFee(t,e){this.rest.config.gasPrices||(this.rest.config.gasPrices=await this.rest.gasPrices());const o=e.gasPrices??this.rest.config.gasPrices,r=e.gasAdjustment??this.rest.config.gasAdjustment,s=e.feeDenoms??["uinit"];let n=e.gas,a;if(o&&(a=new u(o),s)){const _=a.filter(A=>s.includes(A.denom));_.toArray().length>0&&(a=_)}const i=new ae(e.msgs,e.memo??""),d=new kt([],new Dt(0,new u)),h=new et(i,d,[]);h.appendEmptySignatures(t),(!n||n==="auto"||n==="0")&&(n=await this.estimateGas(h,{gasAdjustment:r}));const y=a?a.mul(n).toIntCeilCoins():"0uinit";return new Dt(parseInt(n),y,"","")}async estimateGas(t,e){const o=(e==null?void 0:e.gasAdjustment)??this.rest.config.gasAdjustment;let r=t;if(t.signatures.length<=0){if(!(e&&e.signers&&e.signers.length>0))throw new Error("cannot append signature");const n=new kt([],new Dt(0,new u));r=new et(t.body,n,[]),r.appendEmptySignatures(e.signers)}const s=await this.c.post("/cosmos/tx/v1beta1/simulate",{tx_bytes:Xs.encode(r)}).then(n=>Ia.fromData(n));return k(o??0).multipliedBy(s.gas_info.gas_used).toString()}async simulate(t){const e=new ae(t.msgs,t.memo??""),o=new kt([],new Dt(0,new u)),r=new et(e,o,[]);return r.appendEmptySignatures([{sequenceNumber:t.sequence}]),this.c.post("/cosmos/tx/v1beta1/simulate",{tx_bytes:Xs.encode(r)}).then(s=>Ia.fromData(s))}static encode(t){return Buffer.from(t.toBytes()).toString("base64")}static decode(t){return et.fromBuffer(Buffer.from(t,"base64"))}static hash(t){const e=Xs.encode(t);return Ra(e)}async _broadcast(t,e){const o=t instanceof et?Xs.encode(t):t;return await this.c.post("/cosmos/tx/v1beta1/txs",{tx_bytes:o,mode:e})}async broadcast(t,e=3e4){const{tx_response:r}=await this._broadcast(t,"BROADCAST_MODE_SYNC");if(r.code!=null&&r.code!=0)return{height:parseInt(r.height),txhash:r.txhash,raw_log:r.raw_log,code:r.code,codespace:r.codespace,gas_used:0,gas_wanted:0,timestamp:"",logs:[]};let s;for(let n=0;n<=e/500;n++){try{s=await this.txInfo(r.txhash)}catch{}if(s)break;await new Promise(a=>setTimeout(a,500))}if(!s)throw new Error(`Transaction was not included in a block before timeout of ${e}ms`);return{txhash:s.txhash,raw_log:s.raw_log,gas_wanted:s.gas_wanted,gas_used:s.gas_used,height:+s.height,logs:(s.logs??[]).map(n=>Tn.fromData(n)),code:s.code,codespace:s.codespace,timestamp:s.timestamp}}async broadcastSync(t){return this._broadcast(t,"BROADCAST_MODE_SYNC").then(({tx_response:e})=>{const o={height:+e.height,txhash:e.txhash,raw_log:e.raw_log};return e.code&&(o.code=e.code),e.codespace&&(o.codespace=e.codespace),o})}async broadcastAsync(t){return this._broadcast(t,"BROADCAST_MODE_ASYNC").then(({tx_response:e})=>({height:+e.height,txhash:e.txhash}))}async search(t){const e=new URLSearchParams,o=(t.query??[]).reduce((r,s)=>{if(!s.key)return r;const n=s.op??"=",a=s.key==="tx.height"?`${s.value}`:`'${s.value}'`,i=n==="EXISTS"?`${s.key} ${n}`:`${s.key} ${n} ${a}`;return r?`${r} AND ${i}`:i},"");return o&&e.append("query",o),delete t.query,Object.entries(t).forEach(r=>{e.append(r[0],r[1].toString())}),this.c.getRaw("/cosmos/tx/v1beta1/txs",e).then(r=>({txs:r.tx_responses.map(s=>la.fromData(s)),pagination:r.pagination,total:Number(r.total)}))}async searchEvents(t,e,o,r){if(r<o)throw new Error("Start height cannot be greater than end height");if(r-o>100)throw new Error("Query height range cannot be greater than 100");const s=[],n=`${t}::${e}`,a=[{key:"tx.height",value:o.toString(),op:">="},{key:"tx.height",value:r.toString(),op:"<="},{key:"move.type_tag",value:n,op:"CONTAINS"}],i=_=>_.events.filter(A=>{if(A.type!=="move")return!1;const I=A.attributes.find(C=>C.key==="type_tag");return I&&I.value.startsWith(n)}),{txs:d,total:h}=await this.search({query:a}),y=d.flatMap(_=>i(_));if(s.push(...y),h>100){const _=Math.ceil(h/100),A=[...Array(_-1).keys()].map(C=>C+2),I=await Promise.all(A.map(async C=>this.search({query:a,page:C}).then(R=>R.txs.flatMap(L=>i(L)))));s.push(...I.flat())}return s}async gasPrices(t={}){return this.c.get("/initia/tx/v1/gas_prices",t).then(e=>u.fromData(e.gas_prices))}async gasPrice(t,e={}){return this.c.get(`/initia/tx/v1/gas_prices/${t}`,e).then(o=>P.fromData(o.gas_price))}}class _c extends T{async appliedPlan(t,e={}){return this.c.get(`/cosmos/upgrade/v1beta1/applied_plan/${t}`,e).then(o=>parseInt(o.height))}async currentPlan(t={}){return this.c.get("/cosmos/upgrade/v1beta1/current_plan",t).then(e=>e.plan?Xt.fromData(e.plan):void 0)}async moduleVersions(t={}){return this.c.get("/cosmos/upgrade/v1beta1/module_versions",t).then(e=>e.module_versions.map(o=>({name:o.name,version:parseInt(o.version)})))}}class vc extends T{async contractInfo(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}`,e).then(o=>({code_id:parseInt(o.contract_info.code_id),creator:o.contract_info.creator,admin:o.contract_info.admin,label:o.contract_info.label,created:tn.fromData(o.contract_info.created),ibc_port_id:o.contract_info.ibc_port_id,extension:o.contract_info.extension}))}async contractHistory(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/history`,e).then(o=>[o.entries.map(r=>({operation:Pt.contractCodeHistoryOperationTypeFromJSON(r.operation),code_id:parseInt(r.code_id),updated:tn.fromData(r.updated),msg:r.msg})),o.pagination])}async contractsByCode(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/code/${t}/contracts`,e).then(o=>[o.contracts,o.pagination])}async allContractState(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/state`,e).then(o=>[o.models,o.pagination])}async rawContractState(t,e,o={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/raw/${e}`,o).then(r=>r.data)}async smartContractState(t,e,o={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/smart/${e}`,o).then(r=>r.data)}async codeInfos(t={}){return this.c.get("/cosmwasm/wasm/v1/code",t).then(e=>[e.code_infos.map(o=>({code_id:parseInt(o.code_id),creator:o.creator,data_hash:o.data_hash,instantiate_permission:G.fromData(o.instantiate_permission)})),e.pagination])}async codeInfo(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/code/${t}`,e).then(o=>({code_info:{code_id:parseInt(o.code_info.code_id),creator:o.code_info.creator,data_hash:o.code_info.data_hash,instantiate_permission:G.fromData(o.code_info.instantiate_permission)},data:o.data}))}async pinnedCodes(t={}){return this.c.get("/cosmwasm/wasm/v1/codes/pinned",t).then(e=>[e.code_ids.map(o=>parseInt(o)),e.pagination])}async parameters(t={}){return this.c.get("/cosmwasm/wasm/v1/codes/params",t).then(e=>us.fromData(e.params))}async contractsByCreator(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contracts/creator/${t}`,e).then(o=>[o.contract_addresses,o.pagination])}}class Pc{constructor(t,e){p(this,"accAddress");p(this,"lcd");this.rest=t,this.key=e,this.accAddress=e.accAddress,this.lcd=t}setAccountAddress(t){this.accAddress=t}async accountNumberAndSequence(){return this.rest.auth.accountInfo(this.accAddress).then(t=>({account_number:t.getAccountNumber(),sequence:t.getSequenceNumber()}))}async accountNumber(){return this.rest.auth.accountInfo(this.accAddress).then(t=>t.getAccountNumber())}async sequence(){return this.rest.auth.accountInfo(this.accAddress).then(t=>t.getSequenceNumber())}async createTx(t){return this.rest.tx.create([{address:this.accAddress,sequenceNumber:t.sequence,publicKey:this.key.publicKey}],t)}async createAndSignTx(t){this.rest.config.chainId||(this.rest.config.chainId=await this.rest.tendermint.chainId());let e=t.accountNumber,o=t.sequence;if(e===void 0||o===void 0){const s=await this.accountNumberAndSequence();e===void 0&&(e=s.account_number),o===void 0&&(o=s.sequence)}t.sequence=o,t.accountNumber=e;const r=await this.createTx(t);return this.key.signTx(r,{accountNumber:e,sequence:o,chainId:this.rest.config.chainId,signMode:t.signMode??lt.SignMode.SIGN_MODE_DIRECT})}}const am={gasAdjustment:"1.75"};class Ac{constructor(t,e,o){p(this,"URL");p(this,"config");p(this,"apiRequester");p(this,"auction");p(this,"auth");p(this,"authz");p(this,"bank");p(this,"distribution");p(this,"evidence");p(this,"evm");p(this,"feeGrant");p(this,"forwarding");p(this,"gov");p(this,"group");p(this,"ibc");p(this,"ibcHooks");p(this,"ibcNft");p(this,"ibcTransfer");p(this,"ibcPerm");p(this,"interTx");p(this,"marketmap");p(this,"move");p(this,"mstaking");p(this,"opchild");p(this,"ophost");p(this,"oracle");p(this,"reward");p(this,"slashing");p(this,"tendermint");p(this,"tokenfactory");p(this,"tx");p(this,"upgrade");p(this,"wasm");this.URL=t,this.config={...am,...e},this.apiRequester=o??new $i(this.URL),this.auction=new zi(this.apiRequester),this.auth=new Vi(this.apiRequester),this.authz=new Wi(this.apiRequester),this.bank=new Hi(this.apiRequester),this.distribution=new ji(this.apiRequester),this.evidence=new Qi(this.apiRequester),this.evm=new Yi(this.apiRequester),this.feeGrant=new Xi(this.apiRequester),this.forwarding=new Zi(this.apiRequester),this.gov=new tc(this.apiRequester),this.group=new ec(this.apiRequester),this.ibc=new oc(this.apiRequester),this.ibcHooks=new rc(this.apiRequester),this.ibcNft=new sc(this.apiRequester),this.ibcTransfer=new nc(this.apiRequester),this.ibcPerm=new ac(this.apiRequester),this.interTx=new ic(this.apiRequester),this.marketmap=new cc(this.apiRequester),this.move=new mc(this.apiRequester),this.mstaking=new uc(this.apiRequester),this.opchild=new dc(this.apiRequester),this.ophost=new lc(this.apiRequester),this.oracle=new pc(this.apiRequester),this.reward=new hc(this.apiRequester),this.slashing=new fc(this.apiRequester),this.tendermint=new gc(this.apiRequester),this.tokenfactory=new yc(this.apiRequester),this.tx=new Xs(this),this.upgrade=new _c(this.apiRequester),this.wasm=new vc(this.apiRequester)}wallet(t){return new Pc(this,t)}async gasPrices(){var t;try{return((t=(await this.opchild.parameters()).min_gas_prices.toArray()[0])==null?void 0:t.toString())??"0uinit"}catch{try{const e=await this.move.parameters();return new P(e.base_denom,e.base_min_gas_price).toString()}catch{return}}}}class im extends Ac{}var Ca={exports:{}},Di;function cm(){if(Di)return Ca.exports;Di=1;var c=typeof Reflect=="object"?Reflect:null,t=c&&typeof c.apply=="function"?c.apply:function(f,v,b){return Function.prototype.apply.call(f,v,b)},e;c&&typeof c.ownKeys=="function"?e=c.ownKeys:Object.getOwnPropertySymbols?e=function(f){return Object.getOwnPropertyNames(f).concat(Object.getOwnPropertySymbols(f))}:e=function(f){return Object.getOwnPropertyNames(f)};function o(g){console&&console.warn&&console.warn(g)}var r=Number.isNaN||function(f){return f!==f};function s(){s.init.call(this)}Ca.exports=s,Ca.exports.once=L,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var n=10;function a(g){if(typeof g!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof g)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(g){if(typeof g!="number"||g<0||r(g))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+g+".");n=g}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(f){if(typeof f!="number"||f<0||r(f))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+f+".");return this._maxListeners=f,this};function i(g){return g._maxListeners===void 0?s.defaultMaxListeners:g._maxListeners}s.prototype.getMaxListeners=function(){return i(this)},s.prototype.emit=function(f){for(var v=[],b=1;b<arguments.length;b++)v.push(arguments[b]);var S=f==="error",K=this._events;if(K!==void 0)S=S&&K.error===void 0;else if(!S)return!1;if(S){var E;if(v.length>0&&(E=v[0]),E instanceof Error)throw E;var Nt=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw Nt.context=E,Nt}var ga=K[f];if(ga===void 0)return!1;if(typeof ga=="function")t(ga,this,v);else for(var _i=ga.length,bc=I(ga,_i),b=0;b<_i;++b)t(bc[b],this,v);return!0};function d(g,f,v,b){var S,K,E;if(a(v),K=g._events,K===void 0?(K=g._events=Object.create(null),g._eventsCount=0):(K.newListener!==void 0&&(g.emit("newListener",f,v.listener?v.listener:v),K=g._events),E=K[f]),E===void 0)E=K[f]=v,++g._eventsCount;else if(typeof E=="function"?E=K[f]=b?[v,E]:[E,v]:b?E.unshift(v):E.push(v),S=i(g),S>0&&E.length>S&&!E.warned){E.warned=!0;var Nt=new Error("Possible EventEmitter memory leak detected. "+E.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");Nt.name="MaxListenersExceededWarning",Nt.emitter=g,Nt.type=f,Nt.count=E.length,o(Nt)}return g}s.prototype.addListener=function(f,v){return d(this,f,v,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(f,v){return d(this,f,v,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(g,f,v){var b={fired:!1,wrapFn:void 0,target:g,type:f,listener:v},S=h.bind(b);return S.listener=v,b.wrapFn=S,S}s.prototype.once=function(f,v){return a(v),this.on(f,y(this,f,v)),this},s.prototype.prependOnceListener=function(f,v){return a(v),this.prependListener(f,y(this,f,v)),this},s.prototype.removeListener=function(f,v){var b,S,K,E,Nt;if(a(v),S=this._events,S===void 0)return this;if(b=S[f],b===void 0)return this;if(b===v||b.listener===v)--this._eventsCount===0?this._events=Object.create(null):(delete S[f],S.removeListener&&this.emit("removeListener",f,b.listener||v));else if(typeof b!="function"){for(K=-1,E=b.length-1;E>=0;E--)if(b[E]===v||b[E].listener===v){Nt=b[E].listener,K=E;break}if(K<0)return this;K===0?b.shift():C(b,K),b.length===1&&(S[f]=b[0]),S.removeListener!==void 0&&this.emit("removeListener",f,Nt||v)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(f){var v,b,S;if(b=this._events,b===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[f]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[f]),this;if(arguments.length===0){var K=Object.keys(b),E;for(S=0;S<K.length;++S)E=K[S],E!=="removeListener"&&this.removeAllListeners(E);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(v=b[f],typeof v=="function")this.removeListener(f,v);else if(v!==void 0)for(S=v.length-1;S>=0;S--)this.removeListener(f,v[S]);return this};function _(g,f,v){var b=g._events;if(b===void 0)return[];var S=b[f];return S===void 0?[]:typeof S=="function"?v?[S.listener||S]:[S]:v?R(S):I(S,S.length)}s.prototype.listeners=function(f){return _(this,f,!0)},s.prototype.rawListeners=function(f){return _(this,f,!1)},s.listenerCount=function(g,f){return typeof g.listenerCount=="function"?g.listenerCount(f):A.call(g,f)},s.prototype.listenerCount=A;function A(g){var f=this._events;if(f!==void 0){var v=f[g];if(typeof v=="function")return 1;if(v!==void 0)return v.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function I(g,f){for(var v=new Array(f),b=0;b<f;++b)v[b]=g[b];return v}function C(g,f){for(;f+1<g.length;f++)g[f]=g[f+1];g.pop()}function R(g){for(var f=new Array(g.length),v=0;v<f.length;++v)f[v]=g[v].listener||g[v];return f}function L(g,f){return new Promise(function(v,b){function S(E){g.removeListener(f,K),b(E)}function K(){typeof g.removeListener=="function"&&g.removeListener("error",S),v([].slice.call(arguments))}J(g,f,K,{once:!0}),f!=="error"&&V(g,S,{once:!0})})}function V(g,f,v){typeof g.on=="function"&&J(g,"error",f,v)}function J(g,f,v,b){if(typeof g.on=="function")b.once?g.once(f,v):g.on(f,v);else if(typeof g.addEventListener=="function")g.addEventListener(f,function S(K){b.once&&g.removeEventListener(f,S),v(K)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof g)}return Ca.exports}var mm=cm();const ki=c=>c.replace(/'/g,"\\'");function um(c){const t=[];for(const e of Object.keys(c)){let o;const r=c[e];if(Array.isArray(r))switch(r[0]){case">":case"<":case"<=":case">=":typeof r[1]!="number"?o=`${e}${r[0]}${r[1].toISOString()}`:o=`${e}${r[0]}${r[1]}`;break;case"CONTAINS":o=`${e} CONTAINS '${ki(r[1])}'`;break;case"EXISTS":o=`${e} EXISTS`;break}else switch(typeof r){case"number":o=`${e}=${r}`;break;case"string":o=`${e}='${ki(r)}'`;break;default:o=`${e}=${r.toISOString()}`}t.push(o)}return t.join(" AND ")}class dm extends mm.EventEmitter{constructor(e,o=0,r=1e3){super();p(this,"isConnected");p(this,"reconnectTimeoutId");p(this,"queryParams");p(this,"callback");p(this,"shouldAttemptReconnect");p(this,"socket");p(this,"_reconnectCount");this.URL=e,this.reconnectCount=o,this.reconnectInterval=r,this._reconnectCount=this.reconnectCount,this.isConnected=!1,this.shouldAttemptReconnect=!!this.reconnectInterval}destroy(){this.shouldAttemptReconnect=!1,this.reconnectTimeoutId&&clearTimeout(this.reconnectTimeoutId),this.socket&&this.socket.close()}start(){this.socket=new Wc(this.URL),this.socket.onopen=this.onOpen.bind(this),this.socket.onmessage=this.onMessage.bind(this),this.socket.onclose=this.onClose.bind(this),this.socket.onerror=()=>{}}onOpen(){this.isConnected=!0,this.emit("connect"),this._reconnectCount=this.reconnectCount,this.socket.send(JSON.stringify({jsonrpc:"2.0",method:"subscribe",params:[this.queryParams],id:1}))}onMessage(e){try{let o;if(typeof e.data=="string")o=e.data;else if(e.data instanceof Buffer)o=e.data.toString();else throw new Error("Unsupported message data type");const r=JSON.parse(o);this.callback&&r.result&&r.result.query===this.queryParams&&this.callback(r.result.data)}catch(o){this.emit("error",o)}}onClose(){this.isConnected=!1,this.shouldAttemptReconnect&&(this._reconnectCount>0||this._reconnectCount===-1)?(this._reconnectCount!==-1&&this._reconnectCount--,this.reconnectTimeoutId&&clearTimeout(this.reconnectTimeoutId),this.reconnectTimeoutId=setTimeout(()=>{this.emit("reconnect"),this.start()},this.reconnectInterval)):this.emit("destroyed")}subscribe(e,o,r){this.queryParams=um({"tm.event":e,...o}),this.callback=r}subscribeTx(e,o){const r=s=>(s.value.TxResult.txhash=Ra(s.value.TxResult.tx),o(s));this.subscribe("Tx",e,r)}}const ha=85,ui=250,lm="CSM",fa={GET_VERSION:0,INS_PUBLIC_KEY_SECP256K1:1,SIGN_SECP256K1:2,GET_ADDR_SECP256K1:4},Oa={INIT:0,ADD:1,LAST:2},hi={ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},Rn={NoError:36864},di={1:"U2F: Unknown",2:"U2F: Bad request",3:"U2F: Configuration unsupported",4:"U2F: Device Ineligible",5:"U2F: Timeout",14:"Timeout",36864:"No errors",36865:"Device is busy",26626:"Error deriving keys",25600:"Execution Error",26368:"Wrong Length",27010:"Empty Buffer",27011:"Output buffer too small",27012:"Data is invalid",27013:"Conditions not satisfied",27014:"Transaction rejected",27264:"Bad key handle",27392:"Invalid P1/P2",27404:"Ledger is locked",27904:"Instruction not supported",28160:"App does not seem to be open",28416:"Unknown error",28417:"Sign/verify error"};function qn(c){return c in di?di[c]:`Unknown Status Code: ${c}`}function pm(c){return typeof c=="object"&&c!==null&&!(c instanceof Array)&&!(c instanceof Date)}function Qs(c){if(c){if(pm(c)){if(Object.prototype.hasOwnProperty.call(c,"statusCode"))return{return_code:c.statusCode,error_message:qn(c.statusCode)};if(Object.prototype.hasOwnProperty.call(c,"return_code")&&Object.prototype.hasOwnProperty.call(c,"error_message"))return c}return{return_code:65535,error_message:c.toString()}}return{return_code:65535,error_message:c.toString()}}function Fa(c){if((c==null?void 0:c.length)!==5)throw new TypeError("Invalid path.");const t=Buffer.alloc(20);return t.writeUInt32LE(2147483648+c[0],0),t.writeUInt32LE(2147483648+c[1],4),t.writeUInt32LE(2147483648+c[2],8),t.writeUInt32LE(c[3],12),t.writeUInt32LE(c[4],16),t}async function hm(c){return c.send(ha,fa.GET_VERSION,0,0).then(t=>{const e=t.slice(-2),o=e[0]*256+e[1];let r=0;return t.length>=9&&(r=(t[5]<<24)+(t[6]<<16)+(t[7]<<8)+(t[8]<<0)),{return_code:o,error_message:qn(o),test_mode:t[0]!==0,major:t[1],minor:t[2],patch:t[3],device_locked:t[4]===1,target_id:r.toString(16)}}).catch(Qs)}async function fm(c){return c.send(176,1,0,0).then(t=>{const e=t.slice(-2);let o=e[0]*256+e[1],r,s="err",n="err",a=0,i=0;if(t[0]!==1)r="response format ID not recognized",o=36865;else{r="No errors";const d=t[1];s=t.slice(2,2+d).toString("ascii");let h=2+d;const y=t[h];h+=1,n=t.slice(h,h+y).toString("ascii"),h+=y;const _=t[h];h+=1,a=_,i=t[h]}return{return_code:o,error_message:r,app_name:s,app_version:n,flag_len:a,flags_value:i,flag_recovery:(i&1)!==0,flag_signed_mcu_code:(i&2)!==0,flag_onboarded:(i&4)!==0,flag_pin_validated:(i&128)!==0}}).catch(Qs)}async function gm(c){return c.send(224,1,0,0,Buffer.from([]),[Rn.NoError,28160]).then(t=>{const e=t.slice(-2),o=e[0]*256+e[1];if(o===28160)return{return_code:o,error_message:"This command is only available in the Dashboard"};const r=t.slice(0,4).toString("hex");let s=4;const n=t[s];s+=1;const a=t.slice(s,s+n).toString();s+=n;const i=t[s];s+=1;const d=t.slice(s,s+i).toString("hex");s+=i;const h=t[s];s+=1;let y=t.slice(s,s+h);y[h-1]===0&&(y=t.slice(s,s+h-1));const _=y.toString();return{return_code:o,error_message:qn(o),target_id:r,se_version:a,flag:d,mcu_version:_}}).catch(Qs)}async function ym(c,t){return c.send(ha,fa.GET_ADDR_SECP256K1,0,0,t,[Rn.NoError]).then(e=>{const o=e.slice(-2),r=o[0]*256+o[1],s=e?Buffer.from(e.slice(0,33)):null;return{pk:"OBSOLETE PROPERTY",compressed_pk:s&&s.toJSON(),return_code:r,error_message:qn(r)}}).catch(Qs)}async function _m(c,t){return c.send(ha,fa.GET_ADDR_SECP256K1,hi.ONLY_RETRIEVE,0,t,[Rn.NoError]).then(e=>{const o=e.slice(-2),r=o[0]*256+o[1],s=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:s.toJSON(),return_code:r,error_message:qn(r)}}).catch(Qs)}async function vm(c,t){return c.send(ha,fa.GET_ADDR_SECP256K1,hi.SHOW_ADDRESS_IN_DEVICE,0,t,[Rn.NoError]).then(e=>{const o=e.slice(-2),r=o[0]*256+o[1],s=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:s.toJSON(),return_code:r,error_message:qn(r)}}).catch(Qs)}function Pm(c,t){const e=Fa(c),o=[];if(e instanceof Buffer){o.push(e);const r=Buffer.from(t);for(let s=0;s<r.length;s+=ui){let n=s+ui;s>r.length&&(n=r.length),o.push(r.slice(s,n))}}return o}async function Mi(c,t,e,o){let r=Oa.ADD;return t===1&&(r=Oa.INIT),t===e&&(r=Oa.LAST),c.send(ha,fa.SIGN_SECP256K1,r,0,o,[Rn.NoError,27012,27264]).then(s=>{const n=s.slice(-2),a=n[0]*256+n[1];let i=qn(a);(a===27264||a===27012)&&(i=`${i} : ${s.slice(0,s.length-2).toString("ascii")}`);let d=Buffer.from([]);return s.length>2&&(d=s.slice(0,s.length-2)),{signature:d.toJSON(),return_code:a,error_message:i}}).catch(Qs)}async function Am(c,t,e){const o=Pm(t,e);return Mi(c,1,o.length,o[0]).then(async r=>{let s={return_code:r.return_code,error_message:r.error_message,signature:{type:"Buffer",data:[]}};for(let n=1;n<o.length&&(s=await Mi(c,1+n,o.length,o[n]),s.return_code===Rn.NoError);n+=1);return{return_code:s.return_code,error_message:s.error_message,signature:s.signature}}).catch(Qs)}const wm="Initia",bm="Cosmos";class Ma{constructor(t){p(this,"transport");p(this,"info");p(this,"version");if(!t)throw new Error("Transport has not been defined");this.transport=t}static serializeHRP(t){if(!(t!=null&&t.length)||t.length<3||t.length>83)throw new Error("Invalid HRP");const e=Buffer.alloc(1+t.length);return e.writeUInt8(t.length,0),e.write(t,1),e}static getBech32FromPK(t,e){if(e.length!==33)throw new Error("expected compressed public key [31 bytes]");const o=(void 0)("sha256").update(e).digest(),r=new Hc().update(o).digest();return q.bech32.encode(t,q.bech32.toWords(r))}validateCompatibility(){if(this.info&&this.version){if(this.info.return_code!==36864)return this.info;if(this.version.return_code!==36864)return this.version;if(this.info.app_name===wm&&this.version.major===1||this.info.app_name===bm&&this.version.major===2)return}return{return_code:25600,error_message:"App Version is not supported"}}async initialize(){return fm(this.transport).then(t=>(this.info=t,hm(this.transport))).then(t=>(this.version=t,this.validateCompatibility()))}getInfo(){return this.info}getVersion(){return this.version}getDeviceInfo(){return gm(this.transport)}getPublicKey(t){const e=Fa(t),o=Buffer.concat([Ma.serializeHRP("init"),e]);return ym(this.transport,o)}getAddressAndPubKey(t,e){const o=Fa(t),r=Buffer.concat([Ma.serializeHRP(e),o]);return _m(this.transport,r)}showAddressAndPubKey(t,e){const o=Fa(t),r=Buffer.concat([Ma.serializeHRP(e),o]);return vm(this.transport,r)}sign(t,e){return Am(this.transport,t,e)}}class fi{constructor(t){this.publicKey=t}get accAddress(){if(!this.publicKey)throw new Error("Could not compute accAddress: missing rawAddress");return this.publicKey.address()}get valAddress(){if(!this.publicKey)throw new Error("Could not compute valAddress: missing rawAddress");return q.bech32.encode("initvaloper",q.bech32.toWords(this.publicKey.rawAddress()))}async createSignatureAmino(t){if(!this.publicKey)throw new Error("Signature could not be created: Key instance missing publicKey");return new H(this.publicKey,new H.Descriptor(new H.Descriptor.Single(lt.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,(await this.sign(Buffer.from(t.toAminoJSON()))).toString("base64"))),t.sequence)}async createSignature(t){if(!this.publicKey)throw new Error("Signature could not be created: Key instance missing publicKey");const e=t.auth_info.signer_infos;t.auth_info.signer_infos=[new Mt(this.publicKey,t.sequence,new F(new F.Single(lt.SignMode.SIGN_MODE_DIRECT)))];const o=(await this.sign(Buffer.from(t.toBytes()))).toString("base64");return t.auth_info.signer_infos=e,new H(this.publicKey,new H.Descriptor(new H.Descriptor.Single(lt.SignMode.SIGN_MODE_DIRECT,o)),t.sequence)}async createSignatureEIP191(t){if(!this.publicKey)throw new Error("Signature could not be created: Key instance missing publicKey");const e=Buffer.from(t.toAminoJSON()),r=Buffer.concat([Buffer.from(`Ethereum Signed Message:
|
|
2
|
+
`),Buffer.from(e.length.toString()),e]);return new H(this.publicKey,new H.Descriptor(new H.Descriptor.Single(lt.SignMode.SIGN_MODE_EIP_191,(await this.signWithKeccak256(r)).toString("base64"))),t.sequence)}async signTx(t,e){const o=new et(t.body,new kt([],t.auth_info.fee),[]),r=new Ki(e.chainId,e.accountNumber,e.sequence,o.auth_info,o.body);let s;if(e.signMode===lt.SignMode.SIGN_MODE_LEGACY_AMINO_JSON)s=await this.createSignatureAmino(r);else if(e.signMode==lt.SignMode.SIGN_MODE_DIRECT)s=await this.createSignature(r);else if(e.signMode==lt.SignMode.SIGN_MODE_EIP_191)s=await this.createSignatureEIP191(r);else throw new Error("not supported sign mode");const n=s.data.single;return o.signatures.push(...t.signatures,n.signature),o.auth_info.signer_infos.push(...t.auth_info.signer_infos,new Mt(s.public_key,s.sequence,new F(new F.Single(n.mode)))),o}}class Ja extends fi{constructor(e,o=!0){var t=(...Bm)=>(super(...Bm),p(this,"privateKey"),p(this,"eth"),this);const r=_a.publicKeyCreate(new Uint8Array(e),!0);t(o?new se(Buffer.from(r).toString("base64")):new ot(Buffer.from(r).toString("base64"))),this.privateKey=e,this.eth=o}static fromHex(e){const o=e.startsWith("0x")?e.slice(2):e;if(o.length!==64)throw new Error("Invalid private key length");return new Ja(Buffer.from(o,"hex"))}async sign(e){if(this.eth)return this.signWithKeccak256(e);const o=Buffer.from(Ta.SHA256.hash(new Ta.Word32Array(e)).toString(),"hex"),{signature:r}=_a.ecdsaSign(Uint8Array.from(o),Uint8Array.from(this.privateKey));return Buffer.from(r)}async signWithKeccak256(e){const o=Ci(e),{signature:r}=_a.ecdsaSign(Uint8Array.from(o),Uint8Array.from(this.privateKey));return Buffer.from(r)}}const Dm=Yc.BIP32Factory(Qc),gi=60,km={account:0,index:0,coinType:gi,eth:!0};class Mm extends Ja{constructor(e={}){const{account:o,index:r,coinType:s,eth:n}={...km,...e};let{mnemonic:a}=e;a===void 0&&(a=Ai.generateMnemonic(256));const i=Ai.mnemonicToSeedSync(a),d=Dm.fromSeed(i),h=`m/44'/${s}'/${o}'/0/${r}`,_=d.derivePath(h).privateKey;if(!_)throw new Error("Failed to derive key pair");super(Buffer.from(_),n);p(this,"mnemonic");this.mnemonic=a}}const xi=120,wc="1.0.0";class j extends Error{constructor(t){super(t),this.name="LedgerError"}}class yi extends fi{constructor(e){super();p(this,"app");p(this,"path",[44,gi,0,0,0]);this.transport=e,this.app=new Ma(this.transport)}get accAddress(){if(!this.publicKey)throw new Error("Ledger is uninitialized. Initialize it first.");return this.publicKey.address()}static async create(e,o){e||(e=await Cm());const r=new yi(e);return o!=null&&(r.path[4]=o),e&&typeof e.on=="function"&&e.on("disconnect",()=>{r.transport=void 0}),await r.initialize().catch(xm),r}async initialize(){const e=await this.app.initialize(),{app_name:o}=this.app.getInfo();if(o!=="Initia")throw new j("Open the Initia app in the Ledger");const{major:r,minor:s,patch:n}=this.app.getVersion(),a=`${r}.${s}.${n}`;if(o==="Initia"&&Xc.lt(a,wc))throw new j("Outdated version: Update Ledger Initia App to the latest version");ni(e),await this.loadAccountDetails()}async loadAccountDetails(){const e=await this.app.getAddressAndPubKey(this.path,"init");return ni(e),this.publicKey=new ot(Buffer.from(e.compressed_pk.data).toString("base64")),this}async sign(e){this.publicKey||await this.loadAccountDetails();const o=await this.app.sign(this.path,e);return ni(o),Buffer.from(Ii.signatureImport(Buffer.from(o.signature)))}async signWithKeccak256(){throw new Error("LedgerKey does not support signWithKeccak256()")}async createSignature(e){throw new Error("direct sign mode is not supported")}async getAppAddressAndPubKey(){return this.app.getAddressAndPubKey(this.path,"init")}getAppInfo(){return this.app.getInfo()}async getAppDeviceInfo(){return this.app.getDeviceInfo()}async getAppPublicKey(){return this.app.getPublicKey(this.path)}getAppVersion(){return this.app.getVersion()}async showAddressAndPubKey(){return this.app.showAddressAndPubKey(this.path,"init")}}const xm=c=>{const t=c.message.trim();if(!t.startsWith("The device is already open"))throw c.name==="TransportOpenUserCancelled"?new j("Couldn't find the Ledger. Check the Ledger is plugged in and unlocked."):t.startsWith("No WebUSB interface found for the Ledger device")?new j(`Couldn't connect to a Ledger device. Use Ledger Live to upgrade the Ledger firmware to version ${wc} or later.`):t.startsWith("Unable to claim interface")?new j("Couldn't access Ledger device. Is it being used in another tab?"):t.startsWith("Transport not defined")?new j("Couldn't access Ledger device. Is it being used in another tab?"):t.startsWith("Not supported")?new j("This browser doesn't support WebUSB yet. Update it to the latest version."):t.startsWith("No device selected")?new j("Couldn't find the Ledger. Check the Ledger is plugged in and unlocked."):c},ni=c=>{if(!c)return;const{error_message:t,device_locked:e}=c;if(e)throw new j("Ledger's screensaver mode is on");if(t.startsWith("TransportRaceCondition"))throw new j("Finish previous action in Ledger");if(t.startsWith("DisconnectedDeviceDuringOperation"))throw new j("Open the Initia app in the Ledger");switch(t){case"U2F: Timeout":throw new j("Couldn't find a connected and unlocked Ledger device");case"App does not seem to be open":throw new j("Open the Initia app in the Ledger");case"Command not allowed":throw new j("Transaction rejected");case"Transaction rejected":throw new j("User rejected the transaction");case"Unknown Status Code: 26628":throw new j("Ledger's screensaver mode is on");case"Instruction not supported":throw new j("Check the Ledger is running latest version of Initia");case"No errors":break;default:throw new j(t)}},Im=c=>c.indexOf("Win")>-1,Sm=c=>{const t=c.toLowerCase(),e=/chrome|crios/.test(t)&&!/edge|opr\//.test(t),o=e&&!window.google;if(!e&&!o)throw new j("This browser doesn't support Ledger devices");return e?"chrome":"brave"};async function Cm(){let c;if(Sm(navigator.userAgent),Im(navigator.platform)){if(!navigator.hid)throw new j("This browser doesn't have HID enabled. Enable this feature by visiting: chrome://flags/#enable-experimental-web-platform-features");const{default:t}=await import("@ledgerhq/hw-transport-webhid");c=await t.create(xi*1e3)}else{const{default:t}=await import("@ledgerhq/hw-transport-webusb");c=await t.create(xi*1e3)}return c}Object.defineProperty(exports,"State",{enumerable:!0,get:()=>Tt.State});Object.defineProperty(exports,"stateFromJSON",{enumerable:!0,get:()=>Tt.stateFromJSON});Object.defineProperty(exports,"stateToJSON",{enumerable:!0,get:()=>Tt.stateToJSON});exports.ABCIParams=Fs;exports.ACL=ln;exports.APIRequester=$i;exports.APP_KEY=lm;exports.AbsoluteTxPosition=tn;exports.AcceptedMessageKeysFilter=Me;exports.AcceptedMessagesFilter=xe;exports.AccessConfig=G;exports.AccessTuple=ht;exports.Allocation=en;exports.AllowAllMessagesFilter=ke;exports.AllowedMsgAllowance=_o;exports.AuctionAPI=zi;exports.AuctionParams=cs;exports.AuthAPI=Vi;exports.AuthInfo=kt;exports.AuthParams=ms;exports.AuthorizationGrant=Ht;exports.AuthzAPI=Wi;exports.BankAPI=Hi;exports.BankParams=ds;exports.BaseAccount=bt;exports.BasicAllowance=it;exports.BatchInfo=_t;exports.BatchInfoWithOutput=ca;exports.Blob=ua;exports.BlobTx=qa;exports.BlockParams=Es;exports.BridgeConfig=Zt;exports.BridgeInfo=ee;exports.CHUNK_SIZE=ui;exports.CLA=ha;exports.Channel=Bt;exports.ChannelCounterparty=zs;exports.ClientConsensusStates=ka;exports.CodeGrant=Cs;exports.Coin=P;exports.Coins=u;exports.CombinedLimit=De;exports.ConnectionCounterparty=Et;exports.ConsensusStateWithHeight=Js;exports.ContractExecutionAuthorization=Ie;exports.ContractGrant=Wt;exports.ContractMigrationAuthorization=Se;exports.CurrencyPair=dt;exports.DecisionPolicyWindows=Yt;exports.Delegation=js;exports.DenomMetadata=Qt;exports.DenomTrace=sn;exports.DenomUnit=Bs;exports.Deposit=Zn;exports.DistributionAPI=ji;exports.DistributionParams=ps;exports.Duration=x;exports.ERROR_CODE=Rn;exports.ERROR_DESCRIPTION=di;exports.Equivocation=lo;exports.EthPublicKey=se;exports.EvidenceAPI=Qi;exports.EvidenceParams=Ns;exports.EvmAPI=Yi;exports.EvmParams=hs;exports.ExecuteAuthorization=Pe;exports.ExecuteAuthorizationItem=Ss;exports.Fee=Dt;exports.FeeGrantAPI=Xi;exports.ForwardingAPI=Zi;exports.FungibleTokenPacketData=Aa;exports.GenericAuthorization=_e;exports.GovAPI=tc;exports.GovParams=gs;exports.GroupAPI=ec;exports.GroupInfo=Wo;exports.GroupMember=ta;exports.GroupPolicyInfo=Ls;exports.GroupProposal=ys;exports.GroupVote=ce;exports.Height=w;exports.INIT_COIN_TYPE=gi;exports.INS=fa;exports.IbcAPI=oc;exports.IbcChannelParams=wn;exports.IbcClientParams=Gs;exports.IbcConnectionParams=Dn;exports.IbcFee=me;exports.IbcHooksAPI=rc;exports.IbcHooksParams=_s;exports.IbcNftAPI=sc;exports.IbcNftParams=vs;exports.IbcPermAPI=ac;exports.IbcTransferAPI=nc;exports.IbcTransferParams=Us;exports.IbcVersion=yt;exports.IdentifiedClientState=ea;exports.IdentifiedConnection=bn;exports.IdentifiedPacketFees=ba;exports.InterTxAPI=ic;exports.JSONSerializable=m;exports.Key=fi;exports.LCDClient=im;exports.LedgerError=j;exports.LedgerKey=yi;exports.LegacyAminoMultisigPublicKey=re;exports.Market=nt;exports.MarketmapAPI=cc;exports.MarketmapParams=Ps;exports.MaxCallsLimit=we;exports.MaxFundsLimit=be;exports.Member=$s;exports.MemberRequest=gt;exports.MerklePrefix=Vs;exports.MerkleRoot=$a;exports.Metadata=wa;exports.MnemonicKey=Mm;exports.ModeInfo=F;exports.Module=ws;exports.ModuleAccount=ne;exports.MoveAPI=mc;exports.MoveParams=As;exports.MsgAcknowledgement=Un;exports.MsgAddCodeUploadParamsAddresses=Je;exports.MsgAddCurrencyPairs=sr;exports.MsgAddValidator=Sr;exports.MsgAuctionBid=he;exports.MsgBeginRedelegate=kr;exports.MsgBurn=es;exports.MsgCall=go;exports.MsgCancelProposal=bo;exports.MsgCancelUnbondingDelegation=xr;exports.MsgCancelUpgrade=er;exports.MsgChangeAdmin=os;exports.MsgChannelCloseConfirm=Sn;exports.MsgChannelCloseInit=In;exports.MsgChannelOpenAck=xn;exports.MsgChannelOpenConfirm=Mn;exports.MsgChannelOpenInit=hn;exports.MsgChannelOpenTry=kn;exports.MsgClearAdmin=Fe;exports.MsgClearForwardingAccount=wo;exports.MsgCommunityPoolSpend=mo;exports.MsgCreate=ho;exports.MsgCreate2=fo;exports.MsgCreateBridge=Fr;exports.MsgCreateClient=fn;exports.MsgCreateDenom=Zr;exports.MsgCreateGroup=No;exports.MsgCreateGroupPolicy=To;exports.MsgCreateGroupWithPolicy=Ro;exports.MsgCreateMarkets=ar;exports.MsgCreateValidator=Mr;exports.MsgDelegate=br;exports.MsgDeleteOutput=Rr;exports.MsgDelist=_r;exports.MsgDeposit=ko;exports.MsgDepositLegacy=Do;exports.MsgDepositValidatorRewardsPool=uo;exports.MsgEditValidator=Vt;exports.MsgExecAuthorized=Qe;exports.MsgExecute=lr;exports.MsgExecuteContract=Ee;exports.MsgExecuteJSON=pr;exports.MsgExecuteMessages=Er;exports.MsgFinalizeTokenDeposit=Ur;exports.MsgFinalizeTokenWithdrawal=$r;exports.MsgFundCommunityPool=io;exports.MsgGovExecute=vr;exports.MsgGovExecuteJSON=Pr;exports.MsgGovPublish=Kt;exports.MsgGovScript=Ar;exports.MsgGovScriptJSON=wr;exports.MsgGrantAllowance=vo;exports.MsgGrantAuthorization=He;exports.MsgGroupExec=qo;exports.MsgGroupVote=zt;exports.MsgIBCSoftwareUpgrade=Pn;exports.MsgInitiateTokenDeposit=qr;exports.MsgInitiateTokenWithdrawal=Br;exports.MsgInstantiateContract=Ue;exports.MsgInstantiateContractV2=Be;exports.MsgLeaveGroup=$o;exports.MsgMigrateContract=Ne;exports.MsgMint=ts;exports.MsgMultiSend=st;exports.MsgNftTransfer=Qo;exports.MsgPayForBlobs=nn;exports.MsgPayPacketFee=cn;exports.MsgPayPacketFeeAsync=mn;exports.MsgPinCodes=$e;exports.MsgProposeOutput=Tr;exports.MsgPublish=Jt;exports.MsgRecordBatch=Or;exports.MsgRecoverClient=vn;exports.MsgRecvPacket=Cn;exports.MsgRegisterAccount=or;exports.MsgRegisterCounterpartyPayee=dn;exports.MsgRegisterForwardingAccount=Ao;exports.MsgRegisterPayee=un;exports.MsgRemoveCodeUploadParamsAddresses=Ke;exports.MsgRemoveCurrencyPairs=nr;exports.MsgRemoveMarketAuthorities=ur;exports.MsgRemoveMarkets=mr;exports.MsgRemoveValidator=Cr;exports.MsgRevokeAllowance=Po;exports.MsgRevokeAuthorization=je;exports.MsgScript=hr;exports.MsgScriptJSON=fr;exports.MsgSend=Ye;exports.MsgSetBeforeSendHook=ss;exports.MsgSetBridgeInfo=Wr;exports.MsgSetDenomMetadata=to;exports.MsgSetDenomMetadataWasm=rs;exports.MsgSetSendEnabled=Ze;exports.MsgSetWithdrawAddress=so;exports.MsgSoftwareUpgrade=tr;exports.MsgSpendFeePool=Nr;exports.MsgStoreAndInstantiateContract=ze;exports.MsgStoreAndMigrateContract=Ge;exports.MsgStoreCode=Ce;exports.MsgSubmitEvidence=po;exports.MsgSubmitGroupProposal=Gt;exports.MsgSubmitMisbehaviour=_n;exports.MsgSubmitProposal=Co;exports.MsgSubmitProposalLegacy=So;exports.MsgSubmitTx=rr;exports.MsgSudoContract=qe;exports.MsgTimeout=Bn;exports.MsgTimeoutOnClose=En;exports.MsgTransfer=We;exports.MsgUndelegate=Dr;exports.MsgUnjail=Yr;exports.MsgUnpinCodes=Le;exports.MsgUpdateACL=Ho;exports.MsgUpdateAdmin=Oe;exports.MsgUpdateAuctionParams=fe;exports.MsgUpdateAuthParams=ge;exports.MsgUpdateBankParams=Xe;exports.MsgUpdateBatchInfo=Gr;exports.MsgUpdateChallenger=zr;exports.MsgUpdateClient=gn;exports.MsgUpdateConsensusParams=eo;exports.MsgUpdateContractLabel=Ve;exports.MsgUpdateCrisisParams=ro;exports.MsgUpdateDistrParams=co;exports.MsgUpdateEvmParams=yo;exports.MsgUpdateGovParams=Eo;exports.MsgUpdateGroupAdmin=Lo;exports.MsgUpdateGroupDecisionPolicy=zo;exports.MsgUpdateGroupMembers=Go;exports.MsgUpdateGroupMetadata=Jo;exports.MsgUpdateGroupPolicyAdmin=Ko;exports.MsgUpdateGroupPolicyMetadata=Vo;exports.MsgUpdateIbcChannelParams=Nn;exports.MsgUpdateIbcClientParams=An;exports.MsgUpdateIbcHooksParams=jo;exports.MsgUpdateIbcNftParams=Yo;exports.MsgUpdateIbcPermAdmin=Xo;exports.MsgUpdateIbcTransferParams=rn;exports.MsgUpdateInstantiateConfig=Te;exports.MsgUpdateMarketmapParams=dr;exports.MsgUpdateMarkets=ir;exports.MsgUpdateMetadata=Kr;exports.MsgUpdateMoveParams=gr;exports.MsgUpdateMstakingParams=Ir;exports.MsgUpdateOpchildParams=jr;exports.MsgUpdateOphostParams=Vr;exports.MsgUpdateOracle=Hr;exports.MsgUpdateOracleConfig=Jr;exports.MsgUpdatePermissionedRelayers=Zo;exports.MsgUpdateProposer=Lr;exports.MsgUpdateRewardParams=Qr;exports.MsgUpdateSlashingParams=Xr;exports.MsgUpdateTokenfactoryParams=ns;exports.MsgUpdateWasmParams=Re;exports.MsgUpgradeClient=yn;exports.MsgUpsertMarkets=cr;exports.MsgVerifyInvariant=oo;exports.MsgVote=Lt;exports.MsgVoteLegacy=$t;exports.MsgVoteWeighted=Bo;exports.MsgVoteWeightedLegacy=Uo;exports.MsgWhitelist=yr;exports.MsgWithdrawDelegatorReward=no;exports.MsgWithdrawValidatorCommission=ao;exports.MstakingAPI=uc;exports.MstakingParams=bs;exports.MultiSignature=om;exports.NftClassTrace=pn;exports.NonFungibleTokenPacketData=Da;exports.OpValidator=On;exports.OpchildAPI=dc;exports.OpchildParams=ks;exports.OphostAPI=lc;exports.OphostParams=Ds;exports.OracleAPI=pc;exports.OrderBy=Zc;exports.Output=te;exports.P1_VALUES=hi;exports.PAYLOAD_TYPE=Oa;exports.Packet=At;exports.PacketFee=de;exports.PacketId=ue;exports.ParamChange=Rs;exports.ParamChanges=Mo;exports.ParameterChangeProposal=xo;exports.PercentageDecisionPolicy=Fo;exports.PeriodicAllowance=xt;exports.Plan=Xt;exports.Proposal=ie;exports.ProviderConfig=Ws;exports.PublishAuthorization=ve;exports.QuotePrice=ia;exports.RESTClient=Ac;exports.RawKey=Ja;exports.Redelegation=Ft;exports.RewardAPI=hc;exports.RewardParams=Ms;exports.RewardWeight=Ts;exports.SendAuthorization=ye;exports.SendEnabled=jt;exports.SignDoc=Ki;exports.SignatureV2=H;exports.SignerInfo=Mt;exports.SimplePublicKey=ot;exports.SimulateResponse=Ia;exports.SlashingAPI=fc;exports.SlashingParams=xs;exports.StakeAuthorization=qt;exports.StakeAuthorizationValidators=Ot;exports.StoreCodeAuthorization=Ae;exports.TallyResult=fs;exports.TendermintAPI=gc;exports.TextProposal=Io;exports.ThresholdDecisionPolicy=Oo;exports.Ticker=Hs;exports.Timeout=Ks;exports.TokenfactoryAPI=yc;exports.TokenfactoryParams=Is;exports.TransferAuthorization=on;exports.Tx=et;exports.TxAPI=Xs;exports.TxBody=ae;exports.TxInfo=la;exports.TxLog=Tn;exports.UnbondingDelegation=vt;exports.UpgradeAPI=_c;exports.ValConsPublicKey=Z;exports.Validator=W;exports.ValidatorParams=Os;exports.ValidatorSigningInfo=Fn;exports.Vote=qs;exports.Wallet=Pc;exports.WasmAPI=vc;exports.WasmParams=us;exports.WebSocketClient=dm;exports.WeightedVoteOption=ft;exports.bcs=sm;exports.checkDecimal=Ys;exports.fromLittleEndian=mi;exports.hashToHex=Ra;exports.isTxError=nm;exports.keccak256=Gi;exports.num=k;exports.prepareSignBytes=xa;exports.removeNull=Li;exports.ripemd160=Ji;exports.sha256=Ga;exports.toLittleEndian=ci;Object.keys(tt).forEach(c=>{c!=="default"&&!Object.prototype.hasOwnProperty.call(exports,c)&&Object.defineProperty(exports,c,{enumerable:!0,get:()=>tt[c]})});
|