@initia/initia.js 0.2.16 → 0.2.18

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.
Files changed (35) hide show
  1. package/dist/client/lcd/api/GovAPI.d.ts +2 -2
  2. package/dist/client/lcd/api/IbcPermAPI.d.ts +1 -5
  3. package/dist/core/PublicKey.d.ts +29 -7
  4. package/dist/core/gov/TallyResult.d.ts +36 -0
  5. package/dist/core/gov/index.d.ts +1 -0
  6. package/dist/core/gov/proposals/Proposal.d.ts +5 -20
  7. package/dist/core/ibc/applications/perm/msgs/MsgUpdateIbcPermAdmin.d.ts +38 -0
  8. package/dist/core/ibc/applications/perm/msgs/MsgUpdatePermissionedRelayers.d.ts +38 -0
  9. package/dist/core/ibc/applications/perm/msgs/index.d.ts +8 -10
  10. package/dist/core/ibc/applications/transfer/DenomTrace.d.ts +1 -1
  11. package/dist/core/intertx/msgs/MsgRegisterAccount.d.ts +5 -1
  12. package/dist/core/marketmap/Market.d.ts +1 -1
  13. package/dist/core/marketmap/MarketmapParams.d.ts +1 -1
  14. package/dist/core/marketmap/ProviderConfig.d.ts +1 -1
  15. package/dist/core/marketmap/Ticker.d.ts +1 -1
  16. package/dist/core/marketmap/msgs/MsgCreateMarkets.d.ts +3 -3
  17. package/dist/core/marketmap/msgs/MsgRemoveMarketAuthorities.d.ts +3 -3
  18. package/dist/core/marketmap/msgs/MsgUpdateMarketmapParams.d.ts +3 -3
  19. package/dist/core/marketmap/msgs/MsgUpdateMarkets.d.ts +3 -3
  20. package/dist/core/marketmap/msgs/MsgUpsertMarkets.d.ts +33 -0
  21. package/dist/core/marketmap/msgs/index.d.ts +6 -4
  22. package/dist/core/ophost/BridgeConfig.d.ts +4 -4
  23. package/dist/core/ophost/msgs/MsgUpdateChallenger.d.ts +35 -0
  24. package/dist/core/ophost/msgs/index.d.ts +6 -6
  25. package/dist/core/oracle/CurrencyPair.d.ts +1 -1
  26. package/dist/core/oracle/QuotePrice.d.ts +1 -1
  27. package/dist/core/oracle/msgs/MsgAddCurrencyPairs.d.ts +3 -3
  28. package/dist/core/oracle/msgs/MsgRemoveCurrencyPairs.d.ts +3 -3
  29. package/dist/index.cjs.js +2 -2
  30. package/dist/index.es.js +3941 -3831
  31. package/package.json +6 -6
  32. package/dist/core/ibc/applications/perm/msgs/MsgHaltChannel.d.ts +0 -35
  33. package/dist/core/ibc/applications/perm/msgs/MsgResumeChannel.d.ts +0 -35
  34. package/dist/core/ibc/applications/perm/msgs/MsgSetPermissionedRelayers.d.ts +0 -38
  35. package/dist/core/ophost/msgs/MsgUpdateChallengers.d.ts +0 -35
package/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Ac=Object.defineProperty;var Pc=(i,t,e)=>t in i?Ac(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var p=(i,t,e)=>Pc(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const di=require("axios"),wc=require("@initia/initia.proto/cosmos/tx/v1beta1/service"),Y=require("bignumber.js"),Dc=require("@initia/initia.proto/cosmos/base/v1beta1/coin"),l=require("@initia/initia.proto/google/protobuf/any"),Dn=require("@initia/initia.proto/sdk/auction/v1/tx"),kc=require("@initia/initia.proto/sdk/auction/v1/genesis"),f=require("long"),Ks=require("@initia/initia.proto/cosmos/auth/v1beta1/auth"),Fa=require("@initia/initia.proto/cosmos/auth/v1beta1/tx"),wi=require("jscrypto/SHA256"),Mc=require("jscrypto/RIPEMD160"),xc=require("jscrypto/Base64"),Ia=require("jscrypto"),Di=require("keccak256"),$a=require("@initia/initia.proto/cosmos/crypto/multisig/keys"),La=require("@initia/initia.proto/cosmos/crypto/secp256k1/keys"),za=require("@initia/initia.proto/cosmos/crypto/ed25519/keys"),N=require("bech32"),ae=require("@initia/initia.proto/initia/mstaking/v1/authz"),Ga=require("@initia/initia.proto/cosmos/bank/v1beta1/authz"),Pa=require("@initia/initia.proto/cosmos/authz/v1beta1/authz"),kn=require("@initia/initia.proto/initia/move/v1/authz"),aa=require("@initia/initia.proto/initia/move/v1/types"),B=require("@initia/initia.proto/cosmwasm/wasm/v1/authz"),ht=require("@initia/initia.proto/cosmwasm/wasm/v1/types"),P=require("@initia/initia.proto/cosmwasm/wasm/v1/tx"),wa=require("@initia/initia.proto/ibc/applications/transfer/v1/authz"),Mn=require("@initia/initia.proto/ibc/applications/transfer/v1/tx"),Aa=require("@initia/initia.proto/ibc/core/client/v1/client"),Sc=require("@initia/initia.proto/ibc/applications/transfer/v1/transfer"),Ic=require("@initia/initia.proto/ibc/applications/transfer/v1/denomtrace"),Nc=require("@initia/initia.proto/ibc/applications/transfer/v2/packet"),ts=require("@initia/initia.proto/cosmos/authz/v1beta1/tx"),At=require("@initia/initia.proto/cosmos/bank/v1beta1/tx"),ra=require("@initia/initia.proto/cosmos/bank/v1beta1/bank"),Va=require("@initia/initia.proto/initia/bank/v1/tx"),Ka=require("@initia/initia.proto/celestia/blob/v1/tx"),Xa=require("@initia/initia.proto/celestia/blob/v1/blob"),it=require("@initia/initia.proto/cosmos/tx/signing/v1beta1/signing"),et=require("@initia/initia.proto/cosmos/tx/v1beta1/tx"),ti=require("@initia/initia.proto/cosmos/crypto/multisig/v1beta1/multisig"),Ea=require("@initia/initia.proto/tendermint/types/params"),Wa=require("@initia/initia.proto/cosmos/consensus/v1/tx"),da=require("@initia/initia.proto/cosmos/crisis/v1beta1/tx"),ot=require("@initia/initia.proto/cosmos/distribution/v1beta1/tx"),ki=require("@initia/initia.proto/initia/distribution/v1/distribution"),xn=require("@initia/initia.proto/initia/distribution/v1/tx"),Ha=require("@initia/initia.proto/cosmos/evidence/v1beta1/tx"),Ja=require("@initia/initia.proto/cosmos/evidence/v1beta1/evidence"),Pt=require("@initia/initia.proto/minievm/evm/v1/tx"),Cc=require("@initia/initia.proto/minievm/evm/v1/types"),es=require("@initia/initia.proto/cosmos/feegrant/v1beta1/feegrant"),Sn=require("@initia/initia.proto/cosmos/feegrant/v1beta1/tx"),In=require("@initia/initia.proto/noble/forwarding/v1/tx"),st=require("@initia/initia.proto/cosmos/gov/v1/tx"),wt=require("@initia/initia.proto/cosmos/gov/v1beta1/tx"),Da=require("@initia/initia.proto/cosmos/params/v1beta1/params"),ka=require("@initia/initia.proto/cosmos/gov/v1beta1/gov"),Ct=require("@initia/initia.proto/cosmos/gov/v1/gov"),oi=require("@initia/initia.proto/initia/gov/v1/gov"),ja=require("@initia/initia.proto/initia/gov/v1/tx"),I=require("@initia/initia.proto/cosmos/group/v1/types"),w=require("@initia/initia.proto/cosmos/group/v1/tx"),Dt=require("@initia/initia.proto/ibc/applications/fee/v1/tx"),Mi=require("@initia/initia.proto/ibc/applications/fee/v1/fee"),ia=require("@initia/initia.proto/ibc/core/channel/v1/channel"),Uc=require("@initia/initia.proto/ibc/applications/fee/v1/metadata"),Nn=require("@initia/initia.proto/initia/ibchooks/v1/tx"),xi=require("@initia/initia.proto/initia/ibchooks/v1/types"),Cn=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/tx"),Si=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/types"),Ec=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/packet"),rs=require("@initia/initia.proto/ibc/applications/perm/v1/tx"),C=require("@initia/initia.proto/ibc/core/channel/v1/tx"),Ii=require("@initia/initia.proto/ibc/core/commitment/v1/commitment"),Ut=require("@initia/initia.proto/ibc/core/connection/v1/connection"),H=require("@initia/initia.proto/ibc/core/client/v1/tx"),Bc=require("@initia/initia.proto/cosmos/upgrade/v1beta1/upgrade"),Un=require("@initia/initia.proto/cosmos/upgrade/v1beta1/tx"),nt=require("@initia/initia.proto/ibc/core/connection/v1/tx"),En=require("@initia/initia.proto/initia/intertx/v1/tx"),kt=require("@initia/initia.proto/slinky/marketmap/v1/tx"),Bn=require("@initia/initia.proto/slinky/oracle/v1/tx"),Oc=require("@initia/initia.proto/slinky/types/v1/currency_pair"),Tc=require("@initia/initia.proto/slinky/oracle/v1/genesis"),si=require("@initia/initia.proto/slinky/marketmap/v1/market"),Rc=require("@initia/initia.proto/slinky/marketmap/v1/params"),x=require("@initia/initia.proto/initia/move/v1/tx"),J=require("@initia/initia.proto/initia/mstaking/v1/tx"),ct=require("@initia/initia.proto/initia/mstaking/v1/staking"),R=require("@initia/opinit.proto/opinit/opchild/v1/tx"),ni=require("@initia/opinit.proto/opinit/opchild/v1/types"),S=require("@initia/opinit.proto/opinit/ophost/v1/tx"),ie=require("@initia/opinit.proto/opinit/ophost/v1/types"),qc=require("@initia/initia.proto/initia/reward/v1/types"),Qa=require("@initia/initia.proto/initia/reward/v1/tx"),On=require("@initia/initia.proto/cosmos/slashing/v1beta1/tx"),Fc=require("@initia/initia.proto/cosmos/slashing/v1beta1/slashing"),$=require("@initia/initia.proto/miniwasm/tokenfactory/v1/tx"),$c=require("@initia/initia.proto/miniwasm/tokenfactory/v1/params"),Lc=require("@initia/initia.proto/cosmos/base/abci/v1beta1/abci"),Zt=require("@mysten/bcs"),zc=require("bip32"),Gc=require("bip39"),Ni=require("secp256k1"),Vc=require("ws"),Kc=require("ripemd160"),Wc=require("semver");function Ba(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const Hc=Ba(zc),li=Ba(Gc),Ya=Ba(Ni),Jc=Ba(Wc),jc=wc.OrderBy;class Ci{constructor(t,e){p(this,"axios");p(this,"baseURL");this.baseURL=t;const r={headers:{Accept:"application/json"},timeout:3e4};this.axios=di.create({...r,...e,headers:{...r.headers,...e==null?void 0:e.headers}})}computeEndpoint(t){const e=new URL(this.baseURL);return e.pathname==="/"?e.pathname=t:e.pathname+=t,e.toString()}async getRaw(t,e={}){const r=this.computeEndpoint(t);return this.axios.get(r,{params:e}).then(o=>o.data)}async get(t,e={},r=new di.AxiosHeaders){const o=this.computeEndpoint(t);return this.axios.get(o,{params:e,headers:r}).then(s=>s.data)}async post(t,e){const r=this.computeEndpoint(t);return this.axios.post(r,e).then(o=>o.data)}}function ba(i){if(Array.isArray(i))return i.map(ba);if(typeof i!="object"||i===null)return i;const t={};return Object.keys(i).sort().forEach(e=>{i[e]===void 0||i[e]===null||(t[e]=ba(i[e]))}),t}class m{toJSON(){return JSON.stringify(ba(this.toData()))}toAminoJSON(){return JSON.stringify(ba(this.toAmino()))}}function Ui(i){return i!==null&&typeof i=="object"?Object.entries(i).filter(([,t])=>t!=null).reduce((t,[e,r])=>({...t,[e]:r===Object(r)&&!Array.isArray(r)?Ui(r):r}),{}):i}function _(i){return new Y.BigNumber(i)}function Vs(i){return typeof i=="string"?i.includes("."):!_(i).isInteger()}class v extends m{constructor(e,r){super();p(this,"amount");p(this,"isDecimal");this.denom=e,this.amount=_(r).toString(),this.isDecimal=Vs(r)}toIntCoin(){return new v(this.denom,_(this.amount).toFixed(0))}toIntCeilCoin(){return new v(this.denom,_(this.amount).toFixed(0,2))}toDecCoin(){return new v(this.denom,this.amount.includes(".")?this.amount:_(this.amount).toFixed(1))}toString(){return`${this.isDecimal&&!this.amount.includes(".")?_(this.amount).toFixed(1):_(this.amount).toFixed()}${this.denom}`}static fromString(e){const r=e.match(/^(-?[0-9]+(\.[0-9]+)?)([0-9a-zA-Z/]+)$/);if(r===null)throw new Error(`failed to parse to Coin: ${e}`);const o=r[1],s=r[3];return new v(s,o)}add(e){let r,o=this.isDecimal;if(e instanceof v){if(e.denom!==this.denom)throw new v.ArithmeticError(`cannot add two Coins of different denoms: ${this.denom} and ${e.denom}`);r=e.amount,o=o||e.isDecimal}else r=e,o=o||Vs(e);const s=_(this.amount).plus(r);return new v(this.denom,o&&s.isInteger()?s.toFixed(1):s.toFixed())}sub(e){let r,o=this.isDecimal;if(e instanceof v){if(e.denom!==this.denom)throw new v.ArithmeticError(`cannot subtract two Coins of different denoms: ${this.denom} and ${e.denom}`);r=e.amount,o=o||e.isDecimal}else r=e,o=o||Vs(e);const s=_(this.amount).minus(r);return new v(this.denom,o&&s.isInteger()?s.toFixed(1):s.toFixed())}mul(e){const r=this.isDecimal||Vs(e),o=_(this.amount).multipliedBy(e);return new v(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}div(e){const r=this.isDecimal||Vs(e),o=_(this.amount).dividedBy(e);return new v(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}mod(e){const r=this.isDecimal||Vs(e),o=_(this.amount).mod(e);return new v(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}static fromAmino(e){const{denom:r,amount:o}=e;return new v(r,o)}toAmino(){const{denom:e,amount:r}=this;return{denom:e,amount:this.isDecimal?_(r).toFixed(18):r}}static fromData(e){const{denom:r,amount:o}=e;return new v(r,o)}toData(){const{denom:e,amount:r}=this;return{denom:e,amount:this.isDecimal?_(r).toFixed(18):r}}static fromProto(e){return new v(e.denom,e.amount)}toProto(){return Dc.Coin.fromPartial({denom:this.denom,amount:this.isDecimal?_(this.amount).toFixed(18):this.amount})}}(i=>{class t{constructor(r){this.message=r}}i.ArithmeticError=t})(v||(v={}));class ce extends m{constructor(t,e,r){super(),this.bidder=t,this.bid=e,this.transactions=r}static fromAmino(t){const{value:{bidder:e,bid:r,transactions:o}}=t;return new ce(e,v.fromAmino(r),o)}toAmino(){const{bidder:t,bid:e,transactions:r}=this;return{type:"block-sdk/x/auction/MsgAuctionBid",value:{bidder:t,bid:e.toAmino(),transactions:r}}}static fromData(t){const{bidder:e,bid:r,transactions:o}=t;return new ce(e,v.fromData(r),o)}toData(){const{bidder:t,bid:e,transactions:r}=this;return{"@type":"/sdk.auction.v1.MsgAuctionBid",bidder:t,bid:e.toData(),transactions:r}}static fromProto(t){return new ce(t.bidder,v.fromProto(t.bid),t.transactions.map(e=>Buffer.from(e).toString("base64")))}toProto(){const{bidder:t,bid:e,transactions:r}=this;return Dn.MsgAuctionBid.fromPartial({bidder:t,bid:e.toProto(),transactions:r.map(o=>Buffer.from(o,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgAuctionBid",value:Dn.MsgAuctionBid.encode(this.toProto()).finish()})}static unpackAny(t){return ce.fromProto(Dn.MsgAuctionBid.decode(t.value))}}class os extends m{constructor(t,e,r,o,s,n){super(),this.max_bundle_size=t,this.escrow_account_address=e,this.reserve_fee=r,this.min_bid_increment=o,this.front_running_protection=s,this.proposer_fee=n}static fromAmino(t){const{value:{max_bundle_size:e,escrow_account_address:r,reserve_fee:o,min_bid_increment:s,front_running_protection:n,proposer_fee:a}}=t;return new os(Number.parseInt(e),r,v.fromAmino(o),v.fromAmino(s),n,a)}toAmino(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:s,proposer_fee:n}=this;return{type:"block-sdk/x/auction/Params",value:{max_bundle_size:t.toString(),escrow_account_address:e,reserve_fee:r.toAmino(),min_bid_increment:o.toAmino(),front_running_protection:s,proposer_fee:n}}}static fromData(t){const{max_bundle_size:e,escrow_account_address:r,reserve_fee:o,min_bid_increment:s,front_running_protection:n,proposer_fee:a}=t;return new os(Number.parseInt(e),r,v.fromData(o),v.fromData(s),n,a)}toData(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:s,proposer_fee:n}=this;return{"@type":"/sdk.auction.v1.Params",max_bundle_size:t.toString(),escrow_account_address:e,reserve_fee:r.toData(),min_bid_increment:o.toData(),front_running_protection:s,proposer_fee:n}}static fromProto(t){return new os(t.maxBundleSize,Buffer.from(t.escrowAccountAddress).toString("base64"),v.fromProto(t.reserveFee),v.fromProto(t.minBidIncrement),t.frontRunningProtection,t.proposerFee)}toProto(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:s,proposer_fee:n}=this;return kc.Params.fromPartial({maxBundleSize:t,escrowAccountAddress:Buffer.from(e,"base64"),reserveFee:r.toProto(),minBidIncrement:o.toProto(),frontRunningProtection:s,proposerFee:n})}}class me extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new me(e,os.fromAmino(r))}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:r}=t;return new me(e,os.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/sdk.auction.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new me(t.authority,os.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Dn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgUpdateParams",value:Dn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return me.fromProto(Dn.MsgUpdateParams.decode(t.value))}}class E{constructor(t){this.c=t}}class Ei extends E{async parameters(t={}){return this.c.get("/block-sdk/auction/v1/params",t).then(({params:e})=>os.fromData(e))}}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 r;Array.isArray(e)?r=e:(r=[],Object.keys(e).forEach(o=>r.push(new v(o,e[o]))));for(const o of r){const{denom:s}=o,n=this._coins[s];n!==void 0?this._coins[s]=n.add(o):this._coins[s]=o}if(this.toArray().some(o=>o.isDecimal))for(const o of Object.keys(this._coins))this._coins[o]=this._coins[o].toDecCoin()}}[Symbol.iterator](){let e=-1;const r=this.toArray();return{next:()=>({value:r[++e],done:e===r.length})}}toString(){return this.toArray().map(e=>e.toString()).join(",")}static fromString(e){const o=e.split(/,\s*/).map(s=>v.fromString(s));return new u(o)}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,r){let o;if(r instanceof v){if(r.denom!=e)throw new Error(`Denoms must match when setting: ${e}, ${r.denom}`);o=r}else o=new v(e,r);this._coins[e]=o}toArray(){return Object.values(this._coins).sort((e,r)=>e.denom.localeCompare(r.denom))}add(e){return e instanceof v?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(r=>r.mul(e)))}div(e){return new u(this.map(r=>r.div(e)))}mod(e){return new u(this.map(r=>r.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(v.fromAmino))}toAmino(){return this.toArray().map(e=>e.toAmino())}static fromData(e){return new u((e??[]).map(v.fromData))}toData(){return this.toArray().map(e=>e.toData())}static fromProto(e){return new u((e??[]).map(v.fromProto))}toProto(){return this.toArray().map(e=>e.toProto())}}class D{constructor(t,e=0){p(this,"seconds");p(this,"nanos");const[r,o]=(e/Math.pow(10,9)+t).toFixed(9).split(".");this.seconds=f.fromString(r),this.nanos=Number.parseInt(o)}static fromString(t){const[e,r]=Number.parseFloat(t.replace("s","")).toFixed(9).split(".");return new D(Number.parseInt(e),Number.parseInt(r))}toString(){return`${this.nanos/Math.pow(10,9)+this.seconds.toNumber()}s`}static fromAmino(t){return D.fromString(t)}toAmino(){return this.toString()}static fromData(t){return D.fromString(t)}toData(){return this.toString()}static fromProto(t){return new D(t.seconds.toNumber(),t.nanos)}toProto(){return{seconds:this.seconds,nanos:this.nanos}}}class ss extends m{constructor(t,e,r,o,s){super(),this.max_memo_characters=t,this.tx_sig_limit=e,this.tx_size_cost_per_byte=r,this.sig_verify_cost_ed25519=o,this.sig_verify_cost_secp256k1=s}static fromAmino(t){const{value:{max_memo_characters:e,tx_sig_limit:r,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:s,sig_verify_cost_secp256k1:n}}=t;return new ss(Number.parseInt(e),Number.parseInt(r),Number.parseInt(o),Number.parseInt(s),Number.parseInt(n))}toAmino(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:o,sig_verify_cost_secp256k1:s}=this;return{type:"cosmos-sdk/x/auth/Params",value:{max_memo_characters:t.toString(),tx_sig_limit:e.toString(),tx_size_cost_per_byte:r.toString(),sig_verify_cost_ed25519:o.toString(),sig_verify_cost_secp256k1:s.toString()}}}static fromData(t){const{max_memo_characters:e,tx_sig_limit:r,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:s,sig_verify_cost_secp256k1:n}=t;return new ss(Number.parseInt(e),Number.parseInt(r),Number.parseInt(o),Number.parseInt(s),Number.parseInt(n))}toData(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:o,sig_verify_cost_secp256k1:s}=this;return{"@type":"/cosmos.auth.v1beta1.Params",max_memo_characters:t.toString(),tx_sig_limit:e.toString(),tx_size_cost_per_byte:r.toString(),sig_verify_cost_ed25519:o.toString(),sig_verify_cost_secp256k1:s.toString()}}static fromProto(t){return new ss(t.maxMemoCharacters.toNumber(),t.txSigLimit.toNumber(),t.txSizeCostPerByte.toNumber(),t.sigVerifyCostEd25519.toNumber(),t.sigVerifyCostSecp256k1.toNumber())}toProto(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:o,sig_verify_cost_secp256k1:s}=this;return Ks.Params.fromPartial({maxMemoCharacters:f.fromNumber(t),txSigLimit:f.fromNumber(e),txSizeCostPerByte:f.fromNumber(r),sigVerifyCostEd25519:f.fromNumber(o),sigVerifyCostSecp256k1:f.fromNumber(s)})}}class ue extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new ue(e,ss.fromAmino(r))}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:r}=t;return new ue(e,ss.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.auth.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new ue(t.authority,ss.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Fa.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.MsgUpdateParams",value:Fa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ue.fromProto(Fa.MsgUpdateParams.decode(t.value))}}function Na(i){return wi.SHA256.hash(xc.Base64.parse(i)).toString().toUpperCase()}function Oa(i){return wi.SHA256.hash(new Ia.Word32Array(i)).toUint8Array()}function Qc(i){return Di(Buffer.from(i))}function Bi(i){return Mc.RIPEMD160.hash(new Ia.Word32Array(i)).toUint8Array()}const Yc=Buffer.from("eb5ae98721","hex"),Zc=Buffer.from("1624de6420","hex"),Xc=Buffer.from("22c1f7e2","hex"),pi=i=>{const t=Number.parseInt(i.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;(i=>{function t(o){switch(o.type){case"tendermint/PubKeySecp256k1":return Z.fromAmino(o);case"tendermint/PubKeyMultisigThreshold":return Xt.fromAmino(o);case"tendermint/PubKeyEd25519":return j.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.crypto.secp256k1.PubKey":return Z.fromData(o);case"/cosmos.crypto.multisig.LegacyAminoPubKey":return Xt.fromData(o);case"/cosmos.crypto.ed25519.PubKey":return j.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;if(s==="/cosmos.crypto.secp256k1.PubKey")return Z.unpackAny(o);if(s==="/cosmos.crypto.multisig.LegacyAminoPubKey")return Xt.unpackAny(o);if(s==="/cosmos.crypto.ed25519.PubKey")return j.unpackAny(o);throw new Error(`Pubkey type ${s} not recognized`)}i.fromProto=r})(exports.PublicKey||(exports.PublicKey={}));class Z extends m{constructor(t){super(),this.key=t}static fromAmino(t){return new Z(t.value)}toAmino(){return{type:"tendermint/PubKeySecp256k1",value:this.key}}static fromData(t){return new Z(t.key)}toData(){return{"@type":"/cosmos.crypto.secp256k1.PubKey",key:this.key}}static fromProto(t){return new Z(Buffer.from(t.key).toString("base64"))}toProto(){return La.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:La.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Z.fromProto(La.PubKey.decode(t.value))}encodeAminoPubkey(){return Buffer.concat([Yc,Buffer.from(this.key,"base64")])}rawAddress(){const t=Buffer.from(this.key,"base64");return Bi(Oa(t))}address(){return N.bech32.encode("init",N.bech32.toWords(this.rawAddress()))}pubkeyAddress(){return N.bech32.encode("initpub",N.bech32.toWords(this.encodeAminoPubkey()))}}class Xt extends m{constructor(t,e){super(),this.threshold=t,this.pubkeys=e}encodeAminoPubkey(){const t=Array.from(Xc);t.push(8),t.push(...pi(this.threshold));for(const e of this.pubkeys.map(r=>r.encodeAminoPubkey()))t.push(18),t.push(...pi(e.length)),t.push(...Array.from(e));return new Uint8Array(t)}rawAddress(){const t=this.encodeAminoPubkey();return Oa(t).slice(0,20)}address(){return N.bech32.encode("init",N.bech32.toWords(this.rawAddress()))}pubkeyAddress(){return N.bech32.encode("initpub",N.bech32.toWords(this.encodeAminoPubkey()))}static fromAmino(t){return new Xt(Number.parseInt(t.value.threshold),t.value.pubkeys.map(e=>Z.fromAmino(e)))}toAmino(){return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:this.threshold.toFixed(),pubkeys:this.pubkeys.map(t=>t.toAmino())}}}static fromData(t){return new Xt(Number.parseInt(t.threshold),t.public_keys.map(e=>Z.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 Xt(t.threshold,t.publicKeys.map(e=>Z.unpackAny(e)))}toProto(){return $a.LegacyAminoPubKey.fromPartial({threshold:this.threshold,publicKeys:this.pubkeys.map(t=>t.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:$a.LegacyAminoPubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Xt.fromProto($a.LegacyAminoPubKey.decode(t.value))}}class j extends m{constructor(t){super(),this.key=t}static fromAmino(t){return new j(t.value)}toAmino(){return{type:"tendermint/PubKeyEd25519",value:this.key}}static fromData(t){return new j(t.key)}toData(){return{"@type":"/cosmos.crypto.ed25519.PubKey",key:this.key}}static fromProto(t){return new j(Buffer.from(t.key).toString("base64"))}toProto(){return za.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:za.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return j.fromProto(za.PubKey.decode(t.value))}encodeAminoPubkey(){return Buffer.concat([Zc,Buffer.from(this.key,"base64")])}rawAddress(){const t=Buffer.from(this.key,"base64");return Oa(t).slice(0,20)}address(){return N.bech32.encode("initvalcons",N.bech32.toWords(this.rawAddress()))}pubkeyAddress(){return N.bech32.encode("initvalconspub",N.bech32.toWords(this.encodeAminoPubkey()))}}class _t extends m{constructor(t,e,r,o){super(),this.address=t,this.public_key=e,this.account_number=r,this.sequence=o}getAccountNumber(){return this.account_number}getSequenceNumber(){return this.sequence}getPublicKey(){return this.public_key}toAmino(){const{address:t,public_key:e,account_number:r,sequence:o}=this;return{type:"cosmos-sdk/BaseAccount",value:{address:t,public_key:e==null?void 0:e.toAmino(),account_number:r.toFixed(),sequence:o.toFixed()}}}static fromAmino(t){const{value:{address:e,public_key:r,account_number:o,sequence:s}}=t;return new _t(e??"",r?exports.PublicKey.fromAmino(r):void 0,Number.parseInt(o)??0,Number.parseInt(s)??0)}static fromData(t){const{address:e,pub_key:r,account_number:o,sequence:s}=t;return new _t(e??"",r?exports.PublicKey.fromData(r):void 0,Number.parseInt(o)??0,Number.parseInt(s)??0)}toData(){const{address:t,public_key:e,account_number:r,sequence:o}=this;return{"@type":"/cosmos.auth.v1beta1.BaseAccount",address:t,pub_key:e==null?void 0:e.toData(),account_number:r.toFixed(),sequence:o.toFixed()}}toProto(){const{address:t,public_key:e,account_number:r,sequence:o}=this;return Ks.BaseAccount.fromPartial({address:t,pubKey:e==null?void 0:e.packAny(),accountNumber:f.fromNumber(r),sequence:f.fromNumber(o)})}static fromProto(t){const e=t.pubKey;return new _t(t.address,e?exports.PublicKey.fromProto(e):void 0,t.accountNumber.toNumber(),t.sequence.toNumber())}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.BaseAccount",value:Ks.BaseAccount.encode(this.toProto()).finish()})}static unpackAny(t){return _t.fromProto(Ks.BaseAccount.decode(t.value))}}class te extends m{constructor(t,e,r){super(),this.base_account=t,this.name=e,this.permissions=r}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:r,permissions:o}}=t;return new te(_t.fromAmino({type:"cosmos-sdk/BaseAccount",value:e}),r,o)}toAmino(){const{base_account:t,name:e,permissions:r}=this;return{type:"cosmos-sdk/ModuleAccount",value:{base_account:t.toAmino().value,name:e,permissions:r}}}static fromData(t){const{base_account:e,name:r,permissions:o}=t;return new te(_t.fromData({"@type":"/cosmos.auth.v1beta1.BaseAccount",...e}),r,o)}toData(){const{base_account:t,name:e,permissions:r}=this;return{"@type":"/cosmos.auth.v1beta1.ModuleAccount",base_account:t.toData(),name:e,permissions:r}}static fromProto(t){return new te(_t.fromProto(t.baseAccount),t.name,t.permissions)}toProto(){const{base_account:t,name:e,permissions:r}=this;return Ks.ModuleAccount.fromPartial({baseAccount:t.toProto(),name:e,permissions:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",value:Ks.ModuleAccount.encode(this.toProto()).finish()})}static unpackAny(t){return te.fromProto(Ks.ModuleAccount.decode(t.value))}}exports.Account=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/BaseAccount":return _t.fromAmino(o);case"cosmos-sdk/ModuleAccount":return te.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.auth.v1beta1.BaseAccount":return _t.fromData(o);case"/cosmos.auth.v1beta1.ModuleAccount":return te.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;if(s==="/cosmos.auth.v1beta1.BaseAccount")return _t.unpackAny(o);if(s==="/cosmos.auth.v1beta1.ModuleAccount")return te.unpackAny(o);throw new Error(`Account type ${s} not recognized`)}i.fromProto=r})(exports.Account||(exports.Account={}));class Et extends m{constructor(e,r,o,s){super();p(this,"max_tokens");this.allow_list=r,this.deny_list=o,this.authorization_type=s,this.max_tokens=new u(e)}static fromAmino(e){const{value:{max_tokens:r,allow_list:o,deny_list:s,authorization_type:n}}=e;return new Et(u.fromAmino(r),It.fromAmino(o),It.fromAmino(s),ae.authorizationTypeFromJSON(n))}toAmino(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:s}=this;return{type:"mstake/StakeAuthorization",value:{max_tokens:e.toAmino(),allow_list:r.toAmino(),deny_list:o.toAmino(),authorization_type:ae.authorizationTypeToJSON(s)}}}static fromData(e){const{max_tokens:r,allow_list:o,deny_list:s,authorization_type:n}=e;return new Et(u.fromData(r),It.fromData(o),It.fromData(s),ae.authorizationTypeFromJSON(n))}toData(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:s}=this;return{"@type":"/initia.mstaking.v1.StakeAuthorization",max_tokens:e.toData(),allow_list:r.toData(),deny_list:o.toData(),authorization_type:ae.authorizationTypeToJSON(s)}}static fromProto(e){return new Et(u.fromProto(e.maxTokens),It.fromProto(e.allowList),It.fromProto(e.denyList),e.authorizationType)}toProto(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:s}=this;return ae.StakeAuthorization.fromPartial({maxTokens:e.toProto(),allowList:r.toProto(),denyList:o.toProto(),authorizationType:s})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.StakeAuthorization",value:ae.StakeAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return Et.fromProto(ae.StakeAuthorization.decode(e.value))}}class It extends m{constructor(t){super(),this.address=t}static fromAmino(t){return new It(t.address)}toAmino(){return{address:this.address}}static fromData(t){return new It(t.address)}toData(){return{address:this.address}}static fromProto(t){return new It(t.address)}toProto(){return ae.StakeAuthorization_Validators.fromPartial({address:this.address})}}(i=>{i.Type=ae.AuthorizationType})(Et||(Et={}));class de extends m{constructor(e,r){super();p(this,"spend_limit");this.allow_list=r,this.spend_limit=new u(e)}static fromAmino(e){return new de(u.fromAmino(e.value.spend_limit),e.value.allow_list)}toAmino(){const{spend_limit:e,allow_list:r}=this;return{type:"cosmos-sdk/SendAuthorization",value:{spend_limit:e.toAmino(),allow_list:r}}}static fromData(e){return new de(u.fromData(e.spend_limit),e.allow_list)}toData(){const{spend_limit:e,allow_list:r}=this;return{"@type":"/cosmos.bank.v1beta1.SendAuthorization",spend_limit:e.toAmino(),allow_list:r}}static fromProto(e){return new de(u.fromProto(e.spendLimit),e.allowList)}toProto(){return Ga.SendAuthorization.fromPartial({spendLimit:this.spend_limit.toProto(),allowList:this.allow_list})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.SendAuthorization",value:Ga.SendAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return de.fromProto(Ga.SendAuthorization.decode(e.value))}}class le extends m{constructor(t){super(),this.msg=t}static fromAmino(t){return new le(t.value.msg)}toAmino(){const{msg:t}=this;return{type:"cosmos-sdk/GenericAuthorization",value:{msg:t}}}static fromData(t){return new le(t.msg)}toData(){const{msg:t}=this;return{"@type":"/cosmos.authz.v1beta1.GenericAuthorization",msg:t}}static fromProto(t){return new le(t.msg)}toProto(){return Pa.GenericAuthorization.fromPartial({msg:this.msg})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",value:Pa.GenericAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return le.fromProto(Pa.GenericAuthorization.decode(t.value))}}class pe extends m{constructor(t){super(),this.module_names=t}static fromAmino(t){return new pe(t.value.module_names)}toAmino(){return{type:"move/PublishAuthorization",value:{module_names:this.module_names}}}static fromData(t){return new pe(t.module_names)}toData(){return{"@type":"/initia.move.v1.PublishAuthorization",module_names:this.module_names}}static fromProto(t){return new pe(t.moduleNames)}toProto(){return kn.PublishAuthorization.fromPartial({moduleNames:this.module_names})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.PublishAuthorization",value:kn.PublishAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return pe.fromProto(kn.PublishAuthorization.decode(t.value))}}class he extends m{constructor(t){super(),this.items=t}static fromAmino(t){return new he(t.value.items.map(ws.fromAmino))}toAmino(){return{type:"move/ExecuteAuthorization",value:{items:this.items.map(t=>t.toAmino())}}}static fromData(t){return new he(t.items.map(ws.fromData))}toData(){return{"@type":"/initia.move.v1.ExecuteAuthorization",items:this.items.map(t=>t.toData())}}static fromProto(t){return new he(t.items.map(ws.fromProto))}toProto(){return kn.ExecuteAuthorization.fromPartial({items:this.items.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.ExecuteAuthorization",value:kn.ExecuteAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return he.fromProto(kn.ExecuteAuthorization.decode(t.value))}}class ws extends m{constructor(t,e,r){super(),this.module_address=t,this.module_name=e,this.function_names=r}static fromAmino(t){const{module_address:e,module_name:r,function_names:o}=t;return new ws(e,r,o)}toAmino(){const{module_address:t,module_name:e,function_names:r}=this;return{module_address:t,module_name:e,function_names:r}}static fromData(t){const{module_address:e,module_name:r,function_names:o}=t;return new ws(e,r,o)}toData(){const{module_address:t,module_name:e,function_names:r}=this;return{module_address:t,module_name:e,function_names:r}}static fromProto(t){return new ws(t.moduleAddress,t.moduleName,t.functionNames)}toProto(){return aa.ExecuteAuthorizationItem.fromPartial({moduleAddress:this.module_address,moduleName:this.module_name,functionNames:this.function_names})}}class q extends m{constructor(t,e){super(),this.permission=t,this.addresses=e}static fromAmino(t){const{permission:e,addresses:r}=t;return new q(ht.accessTypeFromJSON(e),r)}toAmino(){const{permission:t,addresses:e}=this;return{permission:ht.accessTypeToJSON(t),addresses:e}}static fromData(t){const{permission:e,addresses:r}=t;return new q(ht.accessTypeFromJSON(e),r)}toData(){const{permission:t,addresses:e}=this;return{permission:ht.accessTypeToJSON(t),addresses:e}}static fromProto(t){return new q(t.permission,t.addresses)}toProto(){const{permission:t,addresses:e}=this;return ht.AccessConfig.fromPartial({permission:t,addresses:e})}}(i=>{i.Type=ht.AccessType})(q||(q={}));class Ds extends m{constructor(t,e){super(),this.code_hash=t,this.instantiate_permission=e}static fromAmino(t){const{code_hash:e,instantiate_permission:r}=t;return new Ds(e,r?q.fromAmino(r):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:r}=t;return new Ds(e,r?q.fromData(r):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 Ds(Buffer.from(t.codeHash).toString("base64"),t.instantiatePermission?q.fromProto(t.instantiatePermission):void 0)}toProto(){const{code_hash:t,instantiate_permission:e}=this;return B.CodeGrant.fromPartial({codeHash:Buffer.from(t,"base64"),instantiatePermission:e==null?void 0:e.toProto()})}}class fe extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new fe(t.value.grants.map(Ds.fromAmino))}toAmino(){return{type:"wasm/StoreCodeAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new fe(t.grants.map(Ds.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.StoreCodeAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new fe(t.grants.map(Ds.fromProto))}toProto(){return B.StoreCodeAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.StoreCodeAuthorization",value:B.StoreCodeAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return fe.fromProto(B.StoreCodeAuthorization.decode(t.value))}}class ge extends m{constructor(t){super(),this.remaining=t}static fromAmino(t){return new ge(Number.parseInt(t.value.remaining))}toAmino(){return{type:"wasm/MaxCallsLimit",value:{remaining:this.remaining.toString()}}}static fromData(t){return new ge(Number.parseInt(t.remaining))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxCallsLimit",remaining:this.remaining.toString()}}static fromProto(t){return new ge(t.remaining.toNumber())}toProto(){return B.MaxCallsLimit.fromPartial({remaining:f.fromNumber(this.remaining)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxCallsLimit",value:B.MaxCallsLimit.encode(this.toProto()).finish()})}static unpackAny(t){return ge.fromProto(B.MaxCallsLimit.decode(t.value))}}class ye extends m{constructor(e){super();p(this,"amounts");this.amounts=new u(e)}static fromAmino(e){return new ye(u.fromAmino(e.value.amounts))}toAmino(){return{type:"wasm/MaxFundsLimit",value:{amounts:this.amounts.toAmino()}}}static fromData(e){return new ye(u.fromData(e.amounts))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxFundsLimit",amounts:this.amounts.toData()}}static fromProto(e){return new ye(u.fromProto(e.amounts))}toProto(){return B.MaxFundsLimit.fromPartial({amounts:this.amounts.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxFundsLimit",value:B.MaxFundsLimit.encode(this.toProto()).finish()})}static unpackAny(e){return ye.fromProto(B.MaxFundsLimit.decode(e.value))}}class _e extends m{constructor(e,r){super();p(this,"amounts");this.calls_remaining=e,this.amounts=new u(r)}static fromAmino(e){const{value:{calls_remaining:r,amounts:o}}=e;return new _e(Number.parseInt(r),u.fromAmino(o))}toAmino(){const{calls_remaining:e,amounts:r}=this;return{type:"wasm/CombinedLimit",value:{calls_remaining:e.toString(),amounts:r.toAmino()}}}static fromData(e){const{calls_remaining:r,amounts:o}=e;return new _e(Number.parseInt(r),u.fromData(o))}toData(){const{calls_remaining:e,amounts:r}=this;return{"@type":"/cosmwasm.wasm.v1.CombinedLimit",calls_remaining:e.toString(),amounts:r.toData()}}static fromProto(e){return new _e(e.callsRemaining.toNumber(),u.fromProto(e.amounts))}toProto(){const{calls_remaining:e,amounts:r}=this;return B.CombinedLimit.fromPartial({callsRemaining:f.fromNumber(e),amounts:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.CombinedLimit",value:B.CombinedLimit.encode(this.toProto()).finish()})}static unpackAny(e){return _e.fromProto(B.CombinedLimit.decode(e.value))}}var la;(i=>{function t(o){switch(o.type){case"wasm/MaxCallsLimit":return ge.fromAmino(o);case"wasm/MaxFundsLimit":return ye.fromAmino(o);case"wasm/CombinedLimit":return _e.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.MaxCallsLimit":return ge.fromData(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return ye.fromData(o);case"/cosmwasm.wasm.v1.CombinedLimit":return _e.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmwasm.wasm.v1.MaxCallsLimit":return ge.unpackAny(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return ye.unpackAny(o);case"/cosmwasm.wasm.v1.CombinedLimit":return _e.unpackAny(o)}throw new Error(`ContractLimit type ${s} not recognized`)}i.fromProto=r})(la||(la={}));class ve extends m{constructor(){super()}static fromAmino(t){return new ve}toAmino(){return{type:"wasm/AllowAllMessagesFilter",value:{}}}static fromData(t){return new ve}toData(){return{"@type":"/cosmwasm.wasm.v1.AllowAllMessagesFilter"}}static fromProto(t){return new ve}toProto(){return B.AllowAllMessagesFilter.fromPartial({})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AllowAllMessagesFilter",value:B.AllowAllMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return ve.fromProto(B.AllowAllMessagesFilter.decode(t.value))}}class be extends m{constructor(t){super(),this.keys=t}static fromAmino(t){return new be(t.value.keys)}toAmino(){return{type:"wasm/AcceptedMessageKeysFilter",value:{keys:this.keys}}}static fromData(t){return new be(t.keys)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",keys:this.keys}}static fromProto(t){return new be(t.keys)}toProto(){return B.AcceptedMessageKeysFilter.fromPartial({keys:this.keys})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",value:B.AcceptedMessageKeysFilter.encode(this.toProto()).finish()})}static unpackAny(t){return be.fromProto(B.AcceptedMessageKeysFilter.decode(t.value))}}class Ae extends m{constructor(t){super(),this.messages=t}static fromAmino(t){return new Ae(t.value.messages)}toAmino(){return{type:"wasm/AcceptedMessagesFilter",value:{messages:this.messages}}}static fromData(t){return new Ae(t.messages)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessagesFilter",messages:this.messages}}static fromProto(t){return new Ae(t.messages.map(e=>Buffer.from(e).toString("base64")))}toProto(){return B.AcceptedMessagesFilter.fromPartial({messages:this.messages.map(t=>Buffer.from(t,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessagesFilter",value:B.AcceptedMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return Ae.fromProto(B.AcceptedMessagesFilter.decode(t.value))}}var pa;(i=>{function t(o){switch(o.type){case"wasm/AllowAllMessagesFilter":return ve.fromAmino(o);case"wasm/AcceptedMessageKeysFilter":return be.fromAmino(o);case"wasm/AcceptedMessagesFilter":return Ae.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return ve.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return be.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return Ae.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return ve.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return be.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return Ae.unpackAny(o)}throw new Error(`ContractFilter type ${s} not recognized`)}i.fromProto=r})(pa||(pa={}));class Lt extends m{constructor(t,e,r){super(),this.contract=t,this.limit=e,this.filter=r}static fromAmino(t){const{contract:e,limit:r,filter:o}=t;return new Lt(e,la.fromAmino(r),pa.fromAmino(o))}toAmino(){const{contract:t,limit:e,filter:r}=this;return{contract:t,limit:e.toAmino(),filter:r.toAmino()}}static fromData(t){const{contract:e,limit:r,filter:o}=t;return new Lt(e,la.fromData(r),pa.fromData(o))}toData(){const{contract:t,limit:e,filter:r}=this;return{contract:t,limit:e.toData(),filter:r.toData()}}static fromProto(t){return new Lt(t.contract,la.fromProto(t.limit),pa.fromProto(t.filter))}toProto(){const{contract:t,limit:e,filter:r}=this;return B.ContractGrant.fromPartial({contract:t,limit:e.packAny(),filter:r.packAny()})}}class Pe extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new Pe(t.value.grants.map(Lt.fromAmino))}toAmino(){return{type:"wasm/ContractExecutionAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new Pe(t.grants.map(Lt.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractExecutionAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new Pe(t.grants.map(Lt.fromProto))}toProto(){return B.ContractExecutionAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractExecutionAuthorization",value:B.ContractExecutionAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Pe.fromProto(B.ContractExecutionAuthorization.decode(t.value))}}class we extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new we(t.value.grants.map(Lt.fromAmino))}toAmino(){return{type:"wasm/ContractMigrationAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new we(t.grants.map(Lt.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractMigrationAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new we(t.grants.map(Lt.fromProto))}toProto(){return B.ContractMigrationAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractMigrationAuthorization",value:B.ContractMigrationAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return we.fromProto(B.ContractMigrationAuthorization.decode(t.value))}}class De extends m{constructor(t,e,r){super(),this.sender=t,this.wasm_byte_code=e,this.instantiate_permission=r}static fromAmino(t){const{value:{sender:e,wasm_byte_code:r,instantiate_permission:o}}=t;return new De(e,r,o?q.fromAmino(o):void 0)}toAmino(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return{type:"wasm/MsgStoreCode",value:{sender:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toAmino()}}}static fromData(t){const{sender:e,wasm_byte_code:r,instantiate_permission:o}=t;return new De(e,r,o?q.fromData(o):void 0)}toData(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreCode",sender:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toData()}}static fromProto(t){return new De(t.sender,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?q.fromProto(t.instantiatePermission):void 0)}toProto(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return P.MsgStoreCode.fromPartial({sender:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:r==null?void 0:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:P.MsgStoreCode.encode(this.toProto()).finish()})}static unpackAny(t){return De.fromProto(P.MsgStoreCode.decode(t.value))}}class ke extends m{constructor(e,r,o,s,n,a){super();p(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=s,this.msg=n,this.funds=new u(a)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:s,label:n,msg:a,funds:c}}=e;return new ke(r,o,Number.parseInt(s),n,a,u.fromAmino(c))}toAmino(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a}=this;return{type:"wasm/MsgInstantiateContract",value:{sender:e,admin:r,code_id:o.toString(),label:s,msg:n,funds:a.toAmino()}}}static fromData(e){const{sender:r,admin:o,code_id:s,label:n,msg:a,funds:c}=e;return new ke(r,o,Number.parseInt(s),n,a,u.fromData(c))}toData(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:e,admin:r,code_id:o.toString(),label:s,msg:n,funds:a.toData()}}static fromProto(e){return new ke(e.sender,e.admin,e.codeId.toNumber(),e.label,Buffer.from(e.msg).toString("base64"),u.fromProto(e.funds))}toProto(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a}=this;return P.MsgInstantiateContract.fromPartial({sender:e,admin:r,codeId:f.fromNumber(o),label:s,msg:Buffer.from(n,"base64"),funds:a.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:P.MsgInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return ke.fromProto(P.MsgInstantiateContract.decode(e.value))}}class Me extends m{constructor(e,r,o,s,n,a,c,d){super();p(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=s,this.msg=n,this.salt=c,this.fix_msg=d,this.funds=new u(a)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:s,label:n,msg:a,funds:c,salt:d,fix_msg:h}}=e;return new Me(r,o,Number.parseInt(s),n,a,u.fromAmino(c),d,h)}toAmino(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a,salt:c,fix_msg:d}=this;return{type:"wasm/MsgInstantiateContract2",value:{sender:e,admin:r,code_id:o.toString(),label:s,msg:n,funds:a.toAmino(),salt:c,fix_msg:d}}}static fromData(e){const{sender:r,admin:o,code_id:s,label:n,msg:a,funds:c,salt:d,fix_msg:h}=e;return new Me(r,o,Number.parseInt(s),n,a,u.fromData(c),d,h)}toData(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a,salt:c,fix_msg:d}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract2",sender:e,admin:r,code_id:o.toString(),label:s,msg:n,funds:a.toData(),salt:c,fix_msg:d}}static fromProto(e){return new Me(e.sender,e.admin,e.codeId.toNumber(),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:r,code_id:o,label:s,msg:n,funds:a,salt:c,fix_msg:d}=this;return P.MsgInstantiateContract2.fromPartial({sender:e,admin:r,codeId:f.fromNumber(o),label:s,msg:Buffer.from(n,"base64"),funds:a.toProto(),salt:Buffer.from(c,"base64"),fixMsg:d})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:P.MsgInstantiateContract2.encode(this.toProto()).finish()})}static unpackAny(e){return Me.fromProto(P.MsgInstantiateContract2.decode(e.value))}}class xe extends m{constructor(e,r,o,s){super();p(this,"funds");this.sender=e,this.contract=r,this.msg=o,this.funds=new u(s)}static fromAmino(e){const{value:{sender:r,contract:o,msg:s,funds:n}}=e;return new xe(r,o,s,u.fromAmino(n))}toAmino(){const{sender:e,contract:r,msg:o,funds:s}=this;return{type:"wasm/MsgExecuteContract",value:{sender:e,contract:r,msg:o,funds:s.toAmino()}}}static fromData(e){const{sender:r,contract:o,msg:s,funds:n}=e;return new xe(r,o,s,u.fromData(n))}toData(){const{sender:e,contract:r,msg:o,funds:s}=this;return{"@type":"/cosmwasm.wasm.v1.MsgExecuteContract",sender:e,contract:r,msg:o,funds:s.toData()}}static fromProto(e){return new xe(e.sender,e.contract,Buffer.from(e.msg).toString("base64"),u.fromProto(e.funds))}toProto(){const{sender:e,contract:r,msg:o,funds:s}=this;return P.MsgExecuteContract.fromPartial({sender:e,contract:r,msg:Buffer.from(o,"base64"),funds:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:P.MsgExecuteContract.encode(this.toProto()).finish()})}static unpackAny(e){return xe.fromProto(P.MsgExecuteContract.decode(e.value))}}class Se extends m{constructor(t,e,r,o){super(),this.sender=t,this.contract=e,this.code_id=r,this.msg=o}static fromAmino(t){const{value:{sender:e,contract:r,code_id:o,msg:s}}=t;return new Se(e,r,Number.parseInt(o),s)}toAmino(){const{sender:t,contract:e,code_id:r,msg:o}=this;return{type:"wasm/MsgMigrateContract",value:{sender:t,contract:e,code_id:r.toString(),msg:o}}}static fromData(t){const{sender:e,contract:r,code_id:o,msg:s}=t;return new Se(e,r,Number.parseInt(o),s)}toData(){const{sender:t,contract:e,code_id:r,msg:o}=this;return{"@type":"/cosmwasm.wasm.v1.MsgMigrateContract",sender:t,contract:e,code_id:r.toString(),msg:o}}static fromProto(t){return new Se(t.sender,t.contract,t.codeId.toNumber(),Buffer.from(t.msg).toString("base64"))}toProto(){const{sender:t,contract:e,code_id:r,msg:o}=this;return P.MsgMigrateContract.fromPartial({sender:t,contract:e,codeId:f.fromNumber(r),msg:Buffer.from(o,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:P.MsgMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return Se.fromProto(P.MsgMigrateContract.decode(t.value))}}class Ie extends m{constructor(t,e,r){super(),this.sender=t,this.new_admin=e,this.contract=r}static fromAmino(t){const{value:{sender:e,new_admin:r,contract:o}}=t;return new Ie(e,r,o)}toAmino(){const{sender:t,new_admin:e,contract:r}=this;return{type:"wasm/MsgUpdateAdmin",value:{sender:t,new_admin:e,contract:r}}}static fromData(t){const{sender:e,new_admin:r,contract:o}=t;return new Ie(e,r,o)}toData(){const{sender:t,new_admin:e,contract:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateAdmin",sender:t,new_admin:e,contract:r}}static fromProto(t){return new Ie(t.sender,t.newAdmin,t.contract)}toProto(){const{sender:t,new_admin:e,contract:r}=this;return P.MsgUpdateAdmin.fromPartial({sender:t,newAdmin:e,contract:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:P.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Ie.fromProto(P.MsgUpdateAdmin.decode(t.value))}}class Ne extends m{constructor(t,e){super(),this.sender=t,this.contract=e}static fromAmino(t){const{value:{sender:e,contract:r}}=t;return new Ne(e,r)}toAmino(){const{sender:t,contract:e}=this;return{type:"wasm/MsgClearAdmin",value:{sender:t,contract:e}}}static fromData(t){const{sender:e,contract:r}=t;return new Ne(e,r)}toData(){const{sender:t,contract:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:t,contract:e}}static fromProto(t){return new Ne(t.sender,t.contract)}toProto(){const{sender:t,contract:e}=this;return P.MsgClearAdmin.fromPartial({sender:t,contract:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:P.MsgClearAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Ne.fromProto(P.MsgClearAdmin.decode(t.value))}}class Ce extends m{constructor(t,e,r){super(),this.sender=t,this.code_id=e,this.new_instantiate_permission=r}static fromAmino(t){const{value:{sender:e,code_id:r,new_instantiate_permission:o}}=t;return new Ce(e,Number.parseInt(r),q.fromAmino(o))}toAmino(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return{type:"wasm/MsgUpdateInstantiateConfig",value:{sender:t,code_id:e.toString(),new_instantiate_permission:r.toAmino()}}}static fromData(t){const{sender:e,code_id:r,new_instantiate_permission:o}=t;return new Ce(e,Number.parseInt(r),q.fromData(o))}toData(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",sender:t,code_id:e.toString(),new_instantiate_permission:r.toData()}}static fromProto(t){return new Ce(t.sender,t.codeId.toNumber(),q.fromProto(t.newInstantiatePermission))}toProto(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return P.MsgUpdateInstantiateConfig.fromPartial({sender:t,codeId:f.fromNumber(e),newInstantiatePermission:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",value:P.MsgUpdateInstantiateConfig.encode(this.toProto()).finish()})}static unpackAny(t){return Ce.fromProto(P.MsgUpdateInstantiateConfig.decode(t.value))}}class ns 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:r}}=t;return new ns(q.fromAmino(e),ht.accessTypeFromJSON(r))}toAmino(){const{code_upload_access:t,instantiate_default_permission:e}=this;return{type:"wasm/Params",value:{code_upload_access:t.toAmino(),instantiate_default_permission:ht.accessTypeToJSON(e)}}}static fromData(t){const{code_upload_access:e,instantiate_default_permission:r}=t;return new ns(q.fromData(e),ht.accessTypeFromJSON(r))}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:ht.accessTypeToJSON(e)}}static fromProto(t){return new ns(q.fromProto(t.codeUploadAccess),t.instantiateDefaultPermission)}toProto(){const{code_upload_access:t,instantiate_default_permission:e}=this;return ht.Params.fromPartial({codeUploadAccess:t.toProto(),instantiateDefaultPermission:e})}}class Ue extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ue(e,ns.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"wasm/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Ue(e,ns.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Ue(t.authority,ns.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return P.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",value:P.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ue.fromProto(P.MsgUpdateParams.decode(t.value))}}class Ee extends m{constructor(t,e,r){super(),this.authority=t,this.contract=e,this.msg=r}static fromAmino(t){const{value:{authority:e,contract:r,msg:o}}=t;return new Ee(e,r,o)}toAmino(){const{authority:t,contract:e,msg:r}=this;return{type:"wasm/MsgSudoContract",value:{authority:t,contract:e,msg:r}}}static fromData(t){const{authority:e,contract:r,msg:o}=t;return new Ee(e,r,o)}toData(){const{authority:t,contract:e,msg:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgSudoContract",authority:t,contract:e,msg:r}}static fromProto(t){return new Ee(t.authority,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,contract:e,msg:r}=this;return P.MsgSudoContract.fromPartial({authority:t,contract:e,msg:Buffer.from(r,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",value:P.MsgSudoContract.encode(this.toProto()).finish()})}static unpackAny(t){return Ee.fromProto(P.MsgSudoContract.decode(t.value))}}class Be extends m{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:r}}=t;return new Be(e,r.map(Number.parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgPinCodes",value:{authority:t,code_ids:e.map(r=>r.toString())}}}static fromData(t){const{authority:e,code_ids:r}=t;return new Be(e,r.map(Number.parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgPinCodes",authority:t,code_ids:e.map(r=>r.toString())}}static fromProto(t){return new Be(t.authority,t.codeIds.map(e=>e.toNumber()))}toProto(){const{authority:t,code_ids:e}=this;return P.MsgPinCodes.fromPartial({authority:t,codeIds:e.map(r=>f.fromNumber(r))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",value:P.MsgPinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return Be.fromProto(P.MsgPinCodes.decode(t.value))}}class Oe extends m{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:r}}=t;return new Oe(e,r.map(Number.parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgUnpinCodes",value:{authority:t,code_ids:e.map(r=>r.toString())}}}static fromData(t){const{authority:e,code_ids:r}=t;return new Oe(e,r.map(Number.parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUnpinCodes",authority:t,code_ids:e.map(r=>r.toString())}}static fromProto(t){return new Oe(t.authority,t.codeIds.map(e=>e.toNumber()))}toProto(){const{authority:t,code_ids:e}=this;return P.MsgUnpinCodes.fromPartial({authority:t,codeIds:e.map(r=>f.fromNumber(r))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",value:P.MsgUnpinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return Oe.fromProto(P.MsgUnpinCodes.decode(t.value))}}class Te extends m{constructor(e,r,o,s,n,a,c,d,h,g,y){super();p(this,"funds");this.authority=e,this.wasm_byte_code=r,this.instantiate_permission=o,this.unpin_code=s,this.admin=n,this.label=a,this.msg=c,this.source=h,this.builder=g,this.code_hash=y,this.funds=new u(d)}static fromAmino(e){const{value:{authority:r,wasm_byte_code:o,instantiate_permission:s,unpin_code:n,admin:a,label:c,msg:d,funds:h,source:g,builder:y,code_hash:b}}=e;return new Te(r,o,s?q.fromAmino(s):void 0,n,a,c,d,u.fromAmino(h),g,y,b)}toAmino(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:s,admin:n,label:a,msg:c,funds:d,source:h,builder:g,code_hash:y}=this;return{type:"wasm/MsgStoreAndInstantiateContract",value:{authority:e,wasm_byte_code:r,instantiate_permission:o==null?void 0:o.toAmino(),unpin_code:s,admin:n,label:a,msg:c,funds:d.toAmino(),source:h,builder:g,code_hash:y}}}static fromData(e){const{authority:r,wasm_byte_code:o,instantiate_permission:s,unpin_code:n,admin:a,label:c,msg:d,funds:h,source:g,builder:y,code_hash:b}=e;return new Te(r,o,s?q.fromData(s):void 0,n,a,c,d,u.fromData(h),g,y,b)}toData(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:s,admin:n,label:a,msg:c,funds:d,source:h,builder:g,code_hash:y}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",authority:e,wasm_byte_code:r,instantiate_permission:o==null?void 0:o.toData(),unpin_code:s,admin:n,label:a,msg:c,funds:d.toData(),source:h,builder:g,code_hash:y}}static fromProto(e){return new Te(e.authority,Buffer.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?q.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:r,instantiate_permission:o,unpin_code:s,admin:n,label:a,msg:c,funds:d,source:h,builder:g,code_hash:y}=this;return P.MsgStoreAndInstantiateContract.fromPartial({authority:e,wasmByteCode:Buffer.from(r,"base64"),instantiatePermission:o==null?void 0:o.toProto(),unpinCode:s,admin:n,label:a,msg:Buffer.from(c,"base64"),funds:d.toProto(),source:h,builder:g,codeHash:Buffer.from(y,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",value:P.MsgStoreAndInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return Te.fromProto(P.MsgStoreAndInstantiateContract.decode(e.value))}}class Re extends m{constructor(t,e,r,o,s){super(),this.authority=t,this.wasm_byte_code=e,this.instantiate_permission=r,this.contract=o,this.msg=s}static fromAmino(t){const{value:{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:s,msg:n}}=t;return new Re(e,r,o?q.fromAmino(o):void 0,s,n)}toAmino(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:s}=this;return{type:"wasm/MsgStoreAndMigrateContract",value:{authority:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toAmino(),contract:o,msg:s}}}static fromData(t){const{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:s,msg:n}=t;return new Re(e,r,o?q.fromData(o):void 0,s,n)}toData(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:s}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",authority:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toData(),contract:o,msg:s}}static fromProto(t){return new Re(t.authority,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?q.fromProto(t.instantiatePermission):void 0,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:s}=this;return P.MsgStoreAndMigrateContract.fromPartial({authority:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:r==null?void 0:r.toProto(),contract:o,msg:Buffer.from(s,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",value:P.MsgStoreAndMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return Re.fromProto(P.MsgStoreAndMigrateContract.decode(t.value))}}class qe extends m{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new qe(e,r)}toAmino(){const{authority:t,addresses:e}=this;return{type:"wasm/MsgAddCodeUploadParamsAddresses",value:{authority:t,addresses:e}}}static fromData(t){const{authority:e,addresses:r}=t;return new qe(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new qe(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return P.MsgAddCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",value:P.MsgAddCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return qe.fromProto(P.MsgAddCodeUploadParamsAddresses.decode(t.value))}}class Fe extends m{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new Fe(e,r)}toAmino(){const{authority:t,addresses:e}=this;return{type:"wasm/MsgRemoveCodeUploadParamsAddresses",value:{authority:t,addresses:e}}}static fromData(t){const{authority:e,addresses:r}=t;return new Fe(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new Fe(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return P.MsgRemoveCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",value:P.MsgRemoveCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return Fe.fromProto(P.MsgRemoveCodeUploadParamsAddresses.decode(t.value))}}class $e extends m{constructor(t,e,r){super(),this.sender=t,this.new_label=e,this.contract=r}static fromAmino(t){const{value:{sender:e,new_label:r,contract:o}}=t;return new $e(e,r,o)}toAmino(){const{sender:t,new_label:e,contract:r}=this;return{type:"wasm/MsgUpdateContractLabel",value:{sender:t,new_label:e,contract:r}}}static fromData(t){const{sender:e,new_label:r,contract:o}=t;return new $e(e,r,o)}toData(){const{sender:t,new_label:e,contract:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateContractLabel",sender:t,new_label:e,contract:r}}static fromProto(t){return new $e(t.sender,t.newLabel,t.contract)}toProto(){const{sender:t,new_label:e,contract:r}=this;return P.MsgUpdateContractLabel.fromPartial({sender:t,newLabel:e,contract:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",value:P.MsgUpdateContractLabel.encode(this.toProto()).finish()})}static unpackAny(t){return $e.fromProto(P.MsgUpdateContractLabel.decode(t.value))}}class Ws extends m{constructor(t,e){super(),this.block_height=t,this.tx_index=e}static fromAmino(t){const{block_height:e,tx_index:r}=t;return new Ws(Number.parseInt(e),Number.parseInt(r))}toAmino(){const{block_height:t,tx_index:e}=this;return{block_height:t.toString(),tx_index:e.toString()}}static fromData(t){const{block_height:e,tx_index:r}=t;return new Ws(Number.parseInt(e),Number.parseInt(r))}toData(){const{block_height:t,tx_index:e}=this;return{block_height:t.toString(),tx_index:e.toString()}}static fromProto(t){return new Ws(t.blockHeight.toNumber(),t.txIndex.toNumber())}toProto(){const{block_height:t,tx_index:e}=this;return ht.AbsoluteTxPosition.fromPartial({blockHeight:f.fromNumber(t),txIndex:f.fromNumber(e)})}}class Hs extends m{constructor(e,r,o,s,n){super();p(this,"spend_limit");this.source_port=e,this.source_channel=r,this.allow_list=s,this.allowed_packet_data=n,this.spend_limit=new u(o)}static fromAmino(e){const{source_port:r,source_channel:o,spend_limit:s,allow_list:n,allowed_packet_data:a}=e;return new Hs(r,o,u.fromAmino(s),n,a)}toAmino(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:s,allowed_packet_data:n}=this;return{source_port:e,source_channel:r,spend_limit:o.toAmino(),allow_list:s,allowed_packet_data:n}}static fromData(e){const{source_port:r,source_channel:o,spend_limit:s,allow_list:n,allowed_packet_data:a}=e;return new Hs(r,o,u.fromData(s),n,a)}toData(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:s,allowed_packet_data:n}=this;return{source_port:e,source_channel:r,spend_limit:o.toData(),allow_list:s,allowed_packet_data:n}}static fromProto(e){return new Hs(e.sourcePort,e.sourceChannel,u.fromProto(e.spendLimit),e.allowList,e.allowedPacketData)}toProto(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:s,allowed_packet_data:n}=this;return wa.Allocation.fromPartial({sourcePort:e,sourceChannel:r,spendLimit:o.toProto(),allowList:s,allowedPacketData:n})}}class Js 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 Js(t.allocations.map(Hs.fromData))}toData(){return{"@type":"/ibc.applications.transfer.v1.TransferAuthorization",allocations:this.allocations.map(t=>t.toData())}}static fromProto(t){return new Js(t.allocations.map(Hs.fromProto))}toProto(){return wa.TransferAuthorization.fromPartial({allocations:this.allocations.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.TransferAuthorization",value:wa.TransferAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Js.fromProto(wa.TransferAuthorization.decode(t.value))}}class A extends m{constructor(t,e){super(),this.revision_number=t,this.revision_height=e}static fromAmino(t){const{revision_number:e,revision_height:r}=t;return new A(parseInt(e??"0"),parseInt(r??"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:r}=t;return new A(Number.parseInt(e),Number.parseInt(r))}toData(){const{revision_number:t,revision_height:e}=this;return{revision_number:t.toFixed(),revision_height:e.toFixed()}}static fromProto(t){return new A(t.revisionNumber.toNumber(),t.revisionHeight.toNumber())}toProto(){const{revision_number:t,revision_height:e}=this;return Aa.Height.fromPartial({revisionNumber:f.fromNumber(t),revisionHeight:f.fromNumber(e)})}}class Le extends m{constructor(e,r,o,s,n,a,c,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&&!c)throw new Error("both of timeout_height and timeout_timestamp are undefined");this.source_port=e,this.source_channel=r,this.token=o,this.sender=s,this.receiver=n,this.timeout_height=a,this.timeout_timestamp=c,this.memo=d}static fromAmino(e){const{value:{source_port:r,source_channel:o,token:s,sender:n,receiver:a,timeout_height:c,timeout_timestamp:d,memo:h}}=e;if(!c&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Le(r,o,s?v.fromAmino(s):void 0,n,a,c?A.fromAmino(c):void 0,d,h)}toAmino(){const{source_port:e,source_channel:r,token:o,sender:s,receiver:n,timeout_height:a,timeout_timestamp:c,memo:d}=this;return{type:"cosmos-sdk/MsgTransfer",value:{source_port:e,source_channel:r,token:o==null?void 0:o.toAmino(),sender:s,receiver:n,timeout_height:(a==null?void 0:a.toAmino())??{},timeout_timestamp:c,memo:d}}}static fromData(e){const{source_port:r,source_channel:o,token:s,sender:n,receiver:a,timeout_timestamp:c,timeout_height:d,memo:h}=e;if(!d&&!c)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Le(r,o,s?v.fromData(s):void 0,n,a,d?A.fromData(d):void 0,c==="0"?void 0:c,h)}toData(){const{source_port:e,source_channel:r,token:o,sender:s,receiver:n,timeout_height:a,timeout_timestamp:c,memo:d}=this;return{"@type":"/ibc.applications.transfer.v1.MsgTransfer",source_port:e,source_channel:r,token:o==null?void 0:o.toData(),sender:s,receiver:n,timeout_height:a?a.toData():new A(0,0).toData(),timeout_timestamp:c??"0",memo:d}}static fromProto(e){if(!e.timeoutHeight&&e.timeoutTimestamp.toNumber()==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new Le(e.sourcePort,e.sourceChannel,e.token?v.fromProto(e.token):void 0,e.sender,e.receiver,e.timeoutHeight?A.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:r,token:o,sender:s,receiver:n,timeout_height:a,timeout_timestamp:c,memo:d}=this;return Mn.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,token:o==null?void 0:o.toProto(),sender:s,receiver:n,timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:f.fromString(c??"0"),memo:d})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:Mn.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Le.fromProto(Mn.MsgTransfer.decode(e.value))}}class Tn extends m{constructor(t,e){super(),this.send_enabled=t,this.receive_enabled=e}static fromAmino(t){const{send_enabled:e,receive_enabled:r}=t;return new Tn(e,r)}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:r}=t;return new Tn(e,r)}toData(){const{send_enabled:t,receive_enabled:e}=this;return{send_enabled:t,receive_enabled:e}}static fromProto(t){return new Tn(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Sc.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class js 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:r}=t;return new js(e,Tn.fromData(r))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.applications.transfer.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new js(t.signer,Tn.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Mn.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgUpdateParams",value:Mn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return js.fromProto(Mn.MsgUpdateParams.decode(t.value))}}class Qs extends m{constructor(t,e){super(),this.path=t,this.base_denom=e}static fromAmino(t){const{path:e,base_denom:r}=t;return new Qs(e,r)}toAmino(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromData(t){const{path:e,base_denom:r}=t;return new Qs(e,r)}toData(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromProto(t){return new Qs(t.path,t.baseDenom)}toProto(){const{path:t,base_denom:e}=this;return Ic.DenomTrace.fromPartial({path:t,baseDenom:e})}}class ha extends m{constructor(t,e,r,o,s){super(),this.denom=t,this.amount=e,this.sender=r,this.receiver=o,this.memo=s}static fromAmino(t){const{denom:e,amount:r,sender:o,receiver:s,memo:n}=t;return new ha(e,r,o,s,n)}toAmino(){const{denom:t,amount:e,sender:r,receiver:o,memo:s}=this;return{denom:t,amount:e,sender:r,receiver:o,memo:s}}static fromData(t){const{denom:e,amount:r,sender:o,receiver:s,memo:n}=t;return new ha(e,r,o,s,n)}toData(){const{denom:t,amount:e,sender:r,receiver:o,memo:s}=this;return{denom:t,amount:e,sender:r,receiver:o,memo:s}}static fromProto(t){return new ha(t.denom,t.amount,t.sender,t.receiver,t.memo)}toProto(){const{denom:t,amount:e,sender:r,receiver:o,memo:s}=this;return Nc.FungibleTokenPacketData.fromPartial({denom:t,amount:e,sender:r,receiver:o,memo:s})}}class zt extends m{constructor(t,e){super(),this.authorization=t,this.expiration=e}static fromAmino(t){const{authorization:e,expiration:r}=t;return new zt(exports.Authorization.fromAmino(e),r?new Date(r):void 0)}toAmino(){const{authorization:t,expiration:e}=this;return{authorization:t.toAmino(),expiration:e==null?void 0:e.toISOString().replace(/\.000Z$/,"Z")}}static fromData(t){const{authorization:e,expiration:r}=t;return new zt(exports.Authorization.fromData(e),r?new Date(r):void 0)}toData(){const{authorization:t,expiration:e}=this;return{authorization:t.toData(),expiration:e==null?void 0:e.toISOString().replace(/\.000Z$/,"Z")}}static fromProto(t){return new zt(exports.Authorization.fromProto(t.authorization),t.expiration)}toProto(){const{authorization:t,expiration:e}=this;return Pa.Grant.fromPartial({authorization:t.packAny(),expiration:e})}}exports.Authorization=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/SendAuthorization":return de.fromAmino(o);case"cosmos-sdk/GenericAuthorization":return le.fromAmino(o);case"mstake/StakeAuthorization":return Et.fromAmino(o);case"move/ExecuteAuthorization":return he.fromAmino(o);case"move/PublishAuthorization":return pe.fromAmino(o);case"wasm/StoreCodeAuthorization":return fe.fromAmino(o);case"wasm/ContractExecutionAuthorization":return Pe.fromAmino(o);case"wasm/ContractMigrationAuthorization":return we.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.authz.v1beta1.GenericAuthorization":return le.fromData(o);case"/cosmos.bank.v1beta1.SendAuthorization":return de.fromData(o);case"/initia.mstaking.v1.StakeAuthorization":return Et.fromData(o);case"/initia.move.v1.PublishAuthorization":return pe.fromData(o);case"/initia.move.v1.ExecuteAuthorization":return he.fromData(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return fe.fromData(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return Pe.fromData(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return we.fromData(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return Js.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmos.authz.v1beta1.GenericAuthorization":return le.unpackAny(o);case"/cosmos.bank.v1beta1.SendAuthorization":return de.unpackAny(o);case"/initia.mstaking.v1.StakeAuthorization":return Et.unpackAny(o);case"/initia.move.v1.PublishAuthorization":return pe.unpackAny(o);case"/initia.move.v1.ExecuteAuthorization":return he.unpackAny(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return fe.unpackAny(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return Pe.unpackAny(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return we.unpackAny(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return Js.unpackAny(o)}throw new Error(`Authorization type ${s} not recognized`)}i.fromProto=r})(exports.Authorization||(exports.Authorization={}));class ze extends m{constructor(t,e,r){super(),this.granter=t,this.grantee=e,this.grant=r}static fromAmino(t){const{value:{granter:e,grantee:r,grant:o}}=t;return new ze(e,r,zt.fromAmino(o))}toAmino(){const{granter:t,grantee:e,grant:r}=this;return{type:"cosmos-sdk/MsgGrant",value:{granter:t,grantee:e,grant:r.toAmino()}}}static fromData(t){const{granter:e,grantee:r,grant:o}=t;return new ze(e,r,zt.fromData(o))}toData(){const{granter:t,grantee:e,grant:r}=this;return{"@type":"/cosmos.authz.v1beta1.MsgGrant",granter:t,grantee:e,grant:r.toData()}}static fromProto(t){return new ze(t.granter,t.grantee,zt.fromProto(t.grant))}toProto(){const{grant:t,granter:e,grantee:r}=this;return ts.MsgGrant.fromPartial({grant:t.toProto(),grantee:r,granter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgGrant",value:ts.MsgGrant.encode(this.toProto()).finish()})}static unpackAny(t){return ze.fromProto(ts.MsgGrant.decode(t.value))}}class Ge extends m{constructor(t,e,r){super(),this.granter=t,this.grantee=e,this.msg_type_url=r}static fromAmino(t){const{value:{granter:e,grantee:r,msg_type_url:o}}=t;return new Ge(e,r,o)}toAmino(){const{granter:t,grantee:e,msg_type_url:r}=this;return{type:"cosmos-sdk/MsgRevoke",value:{granter:t,grantee:e,msg_type_url:r}}}static fromData(t){const{granter:e,grantee:r,msg_type_url:o}=t;return new Ge(e,r,o)}toData(){const{granter:t,grantee:e,msg_type_url:r}=this;return{"@type":"/cosmos.authz.v1beta1.MsgRevoke",granter:t,grantee:e,msg_type_url:r}}static fromProto(t){return new Ge(t.granter,t.grantee,t.msgTypeUrl)}toProto(){const{granter:t,grantee:e,msg_type_url:r}=this;return ts.MsgRevoke.fromPartial({grantee:e,granter:t,msgTypeUrl:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",value:ts.MsgRevoke.encode(this.toProto()).finish()})}static unpackAny(t){return Ge.fromProto(ts.MsgRevoke.decode(t.value))}}class Ve extends m{constructor(t,e){super(),this.grantee=t,this.msgs=e}static fromAmino(t){const{value:{grantee:e,msgs:r}}=t;return new Ve(e,r.map(o=>exports.Msg.fromAmino(o)))}toAmino(){const{grantee:t,msgs:e}=this;return{type:"cosmos-sdk/MsgExec",value:{grantee:t,msgs:e.map(r=>r.toAmino())}}}static fromData(t){const{grantee:e,msgs:r}=t;return new Ve(e,r.map(o=>exports.Msg.fromData(o)))}toData(){const{grantee:t,msgs:e}=this;return{"@type":"/cosmos.authz.v1beta1.MsgExec",grantee:t,msgs:e.map(r=>r.toData())}}static fromProto(t){return new Ve(t.grantee,t.msgs.map(e=>exports.Msg.fromProto(e)))}toProto(){const{grantee:t,msgs:e}=this;return ts.MsgExec.fromPartial({grantee:t,msgs:e.map(r=>r.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:ts.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return Ve.fromProto(ts.MsgExec.decode(t.value))}}class Ke extends m{constructor(e,r,o){super();p(this,"amount");this.from_address=e,this.to_address=r,this.amount=new u(o)}static fromAmino(e){const{value:{from_address:r,to_address:o,amount:s}}=e;return new Ke(r,o,u.fromAmino(s))}toAmino(){const{from_address:e,to_address:r,amount:o}=this;return{type:"cosmos-sdk/MsgSend",value:{from_address:e,to_address:r,amount:o.toAmino()}}}static fromData(e){const{from_address:r,to_address:o,amount:s}=e;return new Ke(r,o,u.fromData(s))}toData(){const{from_address:e,to_address:r,amount:o}=this;return{"@type":"/cosmos.bank.v1beta1.MsgSend",from_address:e,to_address:r,amount:o.toData()}}static fromProto(e){return new Ke(e.fromAddress,e.toAddress,u.fromProto(e.amount))}toProto(){const{from_address:e,to_address:r,amount:o}=this;return At.MsgSend.fromPartial({fromAddress:e,toAddress:r,amount:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:At.MsgSend.encode(this.toProto()).finish()})}static unpackAny(e){return Ke.fromProto(At.MsgSend.decode(e.value))}}class X extends m{constructor(t,e){super(),this.inputs=t,this.outputs=e}static fromAmino(t){const{value:{inputs:e,outputs:r}}=t;return new X(e.map(o=>X.Input.fromAmino(o)),r.map(o=>X.Output.fromAmino(o)))}toAmino(){const{inputs:t,outputs:e}=this;return{type:"cosmos-sdk/MsgMultiSend",value:{inputs:t.map(r=>r.toAmino()),outputs:e.map(r=>r.toAmino())}}}static fromData(t){const{inputs:e,outputs:r}=t;return new X(e.map(o=>X.Input.fromData(o)),r.map(o=>X.Output.fromData(o)))}toData(){const{inputs:t,outputs:e}=this;return{"@type":"/cosmos.bank.v1beta1.MsgMultiSend",inputs:t.map(r=>r.toData()),outputs:e.map(r=>r.toData())}}static fromProto(t){return new X(t.inputs.map(e=>X.Input.fromProto(e)),t.outputs.map(e=>X.Output.fromProto(e)))}toProto(){const{inputs:t,outputs:e}=this;return At.MsgMultiSend.fromPartial({inputs:t.map(r=>r.toProto()),outputs:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgMultiSend",value:At.MsgMultiSend.encode(this.toProto()).finish()})}static unpackAny(t){return X.fromProto(At.MsgMultiSend.decode(t.value))}}(i=>{class t extends m{constructor(s,n){super();p(this,"coins");this.address=s,this.coins=new u(n)}toAmino(){const{address:s,coins:n}=this;return{address:s,coins:n.toAmino()}}static fromAmino(s){const{address:n,coins:a}=s;return new t(n,u.fromAmino(a))}toData(){const{address:s,coins:n}=this;return{address:s,coins:n.toData()}}static fromData(s){const{address:n,coins:a}=s;return new t(n,u.fromData(a))}toProto(){const{address:s,coins:n}=this;return ra.Input.fromPartial({address:s,coins:n.toProto()})}static fromProto(s){return new t(s.address,u.fromProto(s.coins))}}i.Input=t;class e extends m{constructor(s,n){super();p(this,"coins");this.address=s,this.coins=new u(n)}toAmino(){const{address:s,coins:n}=this;return{address:s,coins:n.toAmino()}}static fromAmino(s){const{address:n,coins:a}=s;return new e(n,u.fromAmino(a))}toData(){const{address:s,coins:n}=this;return{address:s,coins:n.toData()}}static fromData(s){const{address:n,coins:a}=s;return new e(n,u.fromData(a))}toProto(){const{address:s,coins:n}=this;return ra.Output.fromPartial({address:s,coins:n.toProto()})}static fromProto(s){return new e(s.address,u.fromProto(s.coins))}}i.Output=e})(X||(X={}));class Gt extends m{constructor(t,e){super(),this.denom=t,this.enabled=e}static fromAmino(t){const{denom:e,enabled:r}=t;return new Gt(e,r)}toAmino(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromData(t){const{denom:e,enabled:r}=t;return new Gt(e,r)}toData(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromProto(t){return new Gt(t.denom,t.enabled)}toProto(){const{denom:t,enabled:e}=this;return ra.SendEnabled.fromPartial({denom:t,enabled:e})}}class as 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:r}}=t;return new as(e.map(Gt.fromAmino),r)}toAmino(){const{send_enabled:t,default_send_enabled:e}=this;return{type:"cosmos-sdk/x/bank/Params",value:{send_enabled:t.map(r=>r.toAmino()),default_send_enabled:e}}}static fromData(t){const{send_enabled:e,default_send_enabled:r}=t;return new as(e.map(Gt.fromData),r)}toData(){const{send_enabled:t,default_send_enabled:e}=this;return{"@type":"/cosmos.bank.v1beta1.Params",send_enabled:t.map(r=>r.toData()),default_send_enabled:e}}static fromProto(t){return new as(t.sendEnabled.map(Gt.fromProto),t.defaultSendEnabled)}toProto(){const{send_enabled:t,default_send_enabled:e}=this;return ra.Params.fromPartial({sendEnabled:t.map(r=>r.toProto()),defaultSendEnabled:e})}}class We extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new We(e,as.fromAmino(r))}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:r}=t;return new We(e,as.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.bank.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new We(t.authority,as.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return At.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",value:At.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return We.fromProto(At.MsgUpdateParams.decode(t.value))}}class He extends m{constructor(t,e,r){super(),this.authority=t,this.send_enabled=e,this.use_default_for=r}static fromAmino(t){const{value:{authority:e,send_enabled:r,use_default_for:o}}=t;return new He(e,r.map(Gt.fromAmino),o)}toAmino(){const{authority:t,send_enabled:e,use_default_for:r}=this;return{type:"cosmos-sdk/MsgSetSendEnabled",value:{authority:t,send_enabled:e.map(o=>o.toAmino()),use_default_for:r}}}static fromData(t){const{authority:e,send_enabled:r,use_default_for:o}=t;return new He(e,r.map(Gt.fromData),o)}toData(){const{authority:t,send_enabled:e,use_default_for:r}=this;return{"@type":"/cosmos.bank.v1beta1.MsgSetSendEnabled",authority:t,send_enabled:e.map(o=>o.toData()),use_default_for:r}}static fromProto(t){return new He(t.authority,t.sendEnabled.map(Gt.fromProto),t.useDefaultFor)}toProto(){const{authority:t,send_enabled:e,use_default_for:r}=this;return At.MsgSetSendEnabled.fromPartial({authority:t,sendEnabled:e.map(o=>o.toProto()),useDefaultFor:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",value:At.MsgSetSendEnabled.encode(this.toProto()).finish()})}static unpackAny(t){return He.fromProto(At.MsgSetSendEnabled.decode(t.value))}}class ks extends m{constructor(t,e,r){super(),this.denom=t,this.exponent=e,this.aliases=r}static fromAmino(t){const{denom:e,exponent:r,aliases:o}=t;return new ks(e,Number.parseInt(r),o)}toAmino(){const{denom:t,exponent:e,aliases:r}=this;return{denom:t,exponent:e.toString(),aliases:r}}static fromData(t){const{denom:e,exponent:r,aliases:o}=t;return new ks(e,Number.parseInt(r),o)}toData(){const{denom:t,exponent:e,aliases:r}=this;return{denom:t,exponent:e.toString(),aliases:r}}static fromProto(t){return new ks(t.denom,t.exponent,t.aliases)}toProto(){const{denom:t,exponent:e,aliases:r}=this;return ra.DenomUnit.fromPartial({denom:t,exponent:e,aliases:r})}}class Vt extends m{constructor(t,e,r,o,s,n,a,c){super(),this.description=t,this.denom_units=e,this.base=r,this.display=o,this.name=s,this.symbol=n,this.uri=a,this.uri_hash=c}static fromAmino(t){const{description:e,denom_units:r,base:o,display:s,name:n,symbol:a,uri:c,uri_hash:d}=t;return new Vt(e,r.map(ks.fromAmino),o,s,n,a,c,d)}toAmino(){const{description:t,denom_units:e,base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toAmino()),base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}}static fromData(t){const{description:e,denom_units:r,base:o,display:s,name:n,symbol:a,uri:c,uri_hash:d}=t;return new Vt(e,r.map(ks.fromData),o,s,n,a,c,d)}toData(){const{description:t,denom_units:e,base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toData()),base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}}static fromProto(t){return new Vt(t.description,t.denomUnits.map(ks.fromProto),t.base,t.display,t.name,t.symbol,t.uri,t.uriHash)}toProto(){const{description:t,denom_units:e,base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}=this;return ra.Metadata.fromPartial({description:t,denomUnits:e.map(d=>d.toProto()),base:r,display:o,name:s,symbol:n,uri:a,uriHash:c})}}class Je extends m{constructor(t,e){super(),this.authority=t,this.metadata=e}static fromAmino(t){const{value:{authority:e,metadata:r}}=t;return new Je(e,Vt.fromAmino(r))}toAmino(){const{authority:t,metadata:e}=this;return{type:"bank/MsgSetDenomMetadata",value:{authority:t,metadata:e.toAmino()}}}static fromData(t){const{authority:e,metadata:r}=t;return new Je(e,Vt.fromData(r))}toData(){const{authority:t,metadata:e}=this;return{"@type":"/initia.bank.v1.MsgSetDenomMetadata",authority:t,metadata:e.toData()}}static fromProto(t){return new Je(t.authority,Vt.fromProto(t.metadata))}toProto(){const{authority:t,metadata:e}=this;return Va.MsgSetDenomMetadata.fromPartial({authority:t,metadata:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.bank.v1.MsgSetDenomMetadata",value:Va.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Je.fromProto(Va.MsgSetDenomMetadata.decode(t.value))}}class Ys extends m{constructor(t,e,r,o,s){super(),this.signer=t,this.namespaces=e,this.blob_sizes=r,this.share_commitments=o,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:r,blob_sizes:o,share_commitments:s,share_versions:n}=t;return new Ys(e,r,o.map(Number.parseInt),s,n.map(Number.parseInt))}toData(){const{signer:t,namespaces:e,blob_sizes:r,share_commitments:o,share_versions:s}=this;return{"@type":"/celestia.blob.v1.MsgPayForBlobs",signer:t,namespaces:e,blob_sizes:r.map(n=>n.toString()),share_commitments:o,share_versions:s.map(n=>n.toString())}}static fromProto(t){return new Ys(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:r,share_commitments:o,share_versions:s}=this;return Ka.MsgPayForBlobs.fromPartial({signer:t,namespaces:e.map(n=>Buffer.from(n,"base64")),blobSizes:r,shareCommitments:o.map(n=>Buffer.from(n,"base64")),shareVersions:s})}packAny(){return l.Any.fromPartial({typeUrl:"/celestia.blob.v1.MsgPayForBlobs",value:Ka.MsgPayForBlobs.encode(this.toProto()).finish()})}static unpackAny(t){return Ys.fromProto(Ka.MsgPayForBlobs.decode(t.value))}}class oa extends m{constructor(t,e,r,o){super(),this.namespace_id=t,this.data=e,this.share_version=r,this.namespace_version=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){return new oa(t.namespace_id,t.data,Number.parseInt(t.share_version),Number.parseInt(t.namespace_version))}toData(){const{namespace_id:t,data:e,share_version:r,namespace_version:o}=this;return{namespace_id:t,data:e,share_version:r.toString(),namespace_version:o.toString()}}static fromProto(t){return new oa(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:r,namespace_version:o}=this;return Xa.Blob.fromPartial({namespaceId:Buffer.from(t,"base64"),data:Buffer.from(e,"base64"),shareVersion:r,namespaceVersion:o})}}class is{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 is(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 r=0;const o=this.count();t>o&&(t=o);for(let s=0;;s++){if(s*8+7>=t)return r+=e(this.elems[s]>>7-t%8+1),r;r+=e(this.elems[s])}}static fromData(t){return new is(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 is(t.extraBitsStored,Buffer.from(t.elems))}toProto(){return ti.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})}}class Kt extends m{constructor(e,r,o,s){super();p(this,"amount");this.gas_limit=e,this.payer=o,this.granter=s,this.amount=new u(r)}static fromAmino(e){const{gas:r,amount:o}=e;return new Kt(Number.parseInt(r),u.fromAmino(o),"","")}toAmino(){return{gas:_(this.gas_limit).toFixed(0),amount:this.amount.toAmino()}}static fromData(e){return new Kt(Number.parseInt(e.gas_limit),u.fromData(e.amount),e.payer,e.granter)}toData(){const{amount:e,gas_limit:r,payer:o,granter:s}=this;return{amount:e.toData(),gas_limit:r.toFixed(),granter:s??"",payer:o??""}}static fromProto(e){return new Kt(e.gasLimit.toNumber(),u.fromProto(e.amount),e.payer,e.granter)}toProto(){const{amount:e,gas_limit:r,payer:o,granter:s}=this;return et.Fee.fromPartial({amount:e.toProto(),gasLimit:f.fromNumber(r),granter:s,payer:o})}gasPrices(){return this.amount.toDecCoins().div(this.gas_limit)}}class K{constructor(t,e,r){this.public_key=t,this.data=e,this.sequence=r}static fromData(t){return new K(exports.PublicKey.fromData(t.public_key),K.Descriptor.fromData(t.data),Number.parseInt(t.sequence))}toData(){return{public_key:this.public_key.toData(),data:this.data.toData(),sequence:this.sequence.toFixed()}}static fromAmino(t){return new K(exports.PublicKey.fromAmino(t.pub_key),new K.Descriptor(new K.Descriptor.Single(K.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,t.signature)),0)}}(i=>{i.SignMode=it.SignMode;class t{constructor(r){p(this,"single");p(this,"multi");r instanceof t.Single?this.single=r:this.multi=r}static fromData(r){if(r.single)return new t(t.Single.fromData(r.single));if(r.multi)return new t(t.Multi.fromData(r.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 r=this.single;return[new U(new U.Single(r.mode)),Buffer.from(r.signature,"base64")]}if(this.multi){const r=this.multi,o=[],s=[];for(const a of r.signatures){const[c,d]=a.toModeInfoAndSignature();o.push(c),s.push(d)}const n=ti.MultiSignature.encode(ti.MultiSignature.fromPartial({signatures:s})).finish();return[new U(new U.Multi(r.bitarray,o)),n]}throw new Error("invalid signature descriptor")}}i.Descriptor=t,(e=>{class r{constructor(n,a){this.mode=n,this.signature=a}static fromData(n){return new r(it.signModeFromJSON(n.mode),n.signature)}toData(){const{mode:n,signature:a}=this;return{mode:it.signModeToJSON(n),signature:a}}}e.Single=r;class o{constructor(n,a){this.bitarray=n,this.signatures=a}static fromData(n){return new o(is.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=o})(t=i.Descriptor||(i.Descriptor={}))})(K||(K={}));class tt{constructor(t,e,r){this.body=t,this.auth_info=e,this.signatures=r}static fromAmino(t){const e=t.value.signatures.map(r=>K.fromAmino(r));return new tt(new cs(t.value.msg.map(r=>exports.Msg.fromAmino(r)),t.value.memo,Number.parseInt(t.value.timeout_height)),new Wt([],Kt.fromAmino(t.value.fee)),e.map(r=>{var o;return((o=r.data.single)==null?void 0:o.signature)??""}))}static fromData(t){return new tt(cs.fromData(t.body),Wt.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(et.Tx.decode(t.value))}static fromProto(t){return new tt(cs.fromProto(t.body),Wt.fromProto(t.authInfo),t.signatures.map(e=>Buffer.from(e).toString("base64")))}toProto(){return et.Tx.fromPartial({body:this.body.toProto(),authInfo:this.auth_info.toProto(),signatures:this.signatures.map(t=>Buffer.from(t,"base64"))})}toBytes(){return et.Tx.encode(this.toProto()).finish()}static fromBuffer(t){return tt.fromProto(et.Tx.decode(t))}appendEmptySignatures(t){t.forEach(e=>{let r;e.publicKey?e.publicKey instanceof Xt?r=new vt(e.publicKey,e.sequenceNumber,new U(new U.Multi(is.fromBits(e.publicKey.pubkeys.length),[]))):r=new vt(e.publicKey,e.sequenceNumber,new U(new U.Single(U.SignMode.SIGN_MODE_DIRECT))):r=new vt(new Z(""),e.sequenceNumber,new U(new U.Single(U.SignMode.SIGN_MODE_DIRECT))),this.auth_info.signer_infos.push(r),this.signatures.push("")})}clearSignatures(){this.auth_info.signer_infos=[],this.signatures=[]}appendSignatures(t){for(const e of t){const[r,o]=e.data.toModeInfoAndSignature();this.signatures.push(Buffer.from(o).toString("base64")),this.auth_info.signer_infos.push(new vt(e.public_key,e.sequence,r))}}}class cs{constructor(t,e,r){this.messages=t,this.memo=e,this.timeout_height=r}static fromData(t){return new cs(t.messages.map(e=>exports.Msg.fromData(e)),t.memo,Number.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 cs(t.messages.map(e=>exports.Msg.fromProto(e)),t.memo,t.timeoutHeight.toNumber())}toProto(){return et.TxBody.fromPartial({memo:this.memo,messages:this.messages.map(t=>t.packAny()),timeoutHeight:f.fromNumber(this.timeout_height??0)})}toBytes(){return et.TxBody.encode(this.toProto()).finish()}}class Wt{constructor(t,e){this.signer_infos=t,this.fee=e}static fromData(t){return new Wt(t.signer_infos.map(e=>vt.fromData(e)),Kt.fromData(t.fee))}toData(){return{fee:this.fee.toData(),signer_infos:this.signer_infos.map(t=>t.toData())}}static fromProto(t){return new Wt(t.signerInfos.map(e=>vt.fromProto(e)),Kt.fromProto(t.fee))}toProto(){return et.AuthInfo.fromPartial({fee:this.fee.toProto(),signerInfos:this.signer_infos.map(t=>t.toProto())})}toBytes(){return et.AuthInfo.encode(this.toProto()).finish()}}class vt{constructor(t,e,r){this.public_key=t,this.sequence=e,this.mode_info=r}static fromData(t){return new vt(exports.PublicKey.fromData(t.public_key??new Z("").toData()),Number.parseInt(t.sequence),U.fromData(t.mode_info))}toData(){const{public_key:t,sequence:e,mode_info:r}=this;return{mode_info:r.toData(),public_key:t==null?void 0:t.toData(),sequence:e.toFixed()}}static fromProto(t){return new vt(exports.PublicKey.fromProto(t.publicKey??new Z("").packAny()),t.sequence.toNumber(),U.fromProto(t.modeInfo))}toProto(){const{public_key:t,sequence:e,mode_info:r}=this;return et.SignerInfo.fromPartial({modeInfo:r.toProto(),publicKey:t==null?void 0:t.packAny(),sequence:f.fromNumber(e)})}}class U{constructor(t){p(this,"single");p(this,"multi");t instanceof U.Single?this.single=t:this.multi=t}static fromData(t){if(t.single)return new U(U.Single.fromData(t.single));if(t.multi)return new U(U.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,r=t.multi;return new U(e?U.Single.fromProto(e):U.Multi.fromProto(r))}toProto(){var t,e;return et.ModeInfo.fromPartial({multi:(t=this.multi)==null?void 0:t.toProto(),single:(e=this.single)==null?void 0:e.toProto()})}}(i=>{i.SignMode=it.SignMode;class t{constructor(o){this.mode=o}static fromData(o){return new t(it.signModeFromJSON(o.mode))}toData(){return{mode:it.signModeToJSON(this.mode)}}static fromProto(o){return new t(o.mode)}toProto(){return et.ModeInfo_Single.fromPartial({mode:this.mode})}}i.Single=t;class e{constructor(o,s){this.bitarray=o,this.modeInfos=s}static fromData(o){return new e(is.fromData(o.bitarray),o.mode_infos.map(s=>i.fromData(s)))}toData(){return{bitarray:this.bitarray.toData(),mode_infos:this.modeInfos.map(o=>o.toData())}}static fromProto(o){return new e(is.fromProto(o.bitarray),o.modeInfos.map(s=>i.fromProto(s)))}toProto(){return et.ModeInfo_Multi.fromPartial({bitarray:this.bitarray.toProto(),modeInfos:this.modeInfos.map(o=>o.toProto())})}}i.Multi=e})(U||(U={}));class Ca extends m{constructor(t,e,r){super(),this.tx=t,this.blobs=e,this.type_id=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{tx:e,blobs:r,type_id:o}=t;return new Ca(tt.fromData(e),r.map(oa.fromData),o)}toData(){const{tx:t,blobs:e,type_id:r}=this;return{tx:t.toData(),blobs:e.map(o=>o.toData()),type_id:r}}static fromProto(t){return new Ca(tt.fromBuffer(Buffer.from(t.tx)),t.blobs.map(oa.fromProto),t.typeId)}toProto(){const{tx:t,blobs:e,type_id:r}=this;return Xa.BlobTx.fromPartial({tx:t.toBytes(),blobs:e.map(o=>o.toProto()),typeId:r})}toBytes(){return Xa.BlobTx.encode(this.toProto()).finish()}}class Ms extends m{constructor(t,e){super(),this.max_bytes=t,this.max_gas=e}static fromAmino(t){const{max_bytes:e,max_gas:r}=t;return new Ms(Number.parseInt(e),Number.parseInt(r))}toAmino(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toString(),max_gas:e.toString()}}static fromData(t){const{max_bytes:e,max_gas:r}=t;return new Ms(Number.parseInt(e),Number.parseInt(r))}toData(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toString(),max_gas:e.toString()}}static fromProto(t){return new Ms(t.maxBytes.toNumber(),t.maxGas.toNumber())}toProto(){const{max_bytes:t,max_gas:e}=this;return Ea.BlockParams.fromPartial({maxBytes:f.fromNumber(t),maxGas:f.fromNumber(e)})}}class xs extends m{constructor(t,e,r){super(),this.max_age_num_blocks=t,this.max_age_duration=e,this.max_bytes=r}static fromAmino(t){const{max_age_num_blocks:e,max_age_duration:r,max_bytes:o}=t;return new xs(Number.parseInt(e),D.fromAmino(r),Number.parseInt(o))}toAmino(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return{max_age_num_blocks:t.toString(),max_age_duration:e.toAmino(),max_bytes:r.toString()}}static fromData(t){const{max_age_num_blocks:e,max_age_duration:r,max_bytes:o}=t;return new xs(Number.parseInt(e),D.fromData(r),Number.parseInt(o))}toData(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return{max_age_num_blocks:t.toString(),max_age_duration:e.toData(),max_bytes:r.toString()}}static fromProto(t){return new xs(t.maxAgeNumBlocks.toNumber(),D.fromProto(t.maxAgeDuration),t.maxBytes.toNumber())}toProto(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return Ea.EvidenceParams.fromPartial({maxAgeNumBlocks:f.fromNumber(t),maxAgeDuration:e.toProto(),maxBytes:f.fromNumber(r)})}}class Ss extends m{constructor(t){super(),this.pub_key_types=t}static fromAmino(t){return new Ss(t.pub_key_types)}toAmino(){return{pub_key_types:this.pub_key_types}}static fromData(t){return new Ss(t.pub_key_types)}toData(){return{pub_key_types:this.pub_key_types}}static fromProto(t){return new Ss(t.pubKeyTypes)}toProto(){return Ea.ValidatorParams.fromPartial({pubKeyTypes:this.pub_key_types})}}class Is extends m{constructor(t){super(),this.vote_extensions_enable_height=t}static fromAmino(t){return new Is(Number.parseInt(t.vote_extensions_enable_height))}toAmino(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toString()}}static fromData(t){return new Is(Number.parseInt(t.vote_extensions_enable_height))}toData(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toString()}}static fromProto(t){return new Is(t.voteExtensionsEnableHeight.toNumber())}toProto(){return Ea.ABCIParams.fromPartial({voteExtensionsEnableHeight:f.fromNumber(this.vote_extensions_enable_height)})}}class je extends m{constructor(t,e,r,o,s){super(),this.authority=t,this.block=e,this.evidence=r,this.validator=o,this.abci=s}static fromAmino(t){const{value:{authority:e,block:r,evidence:o,validator:s,abci:n}}=t;return new je(e,r?Ms.fromAmino(r):void 0,o?xs.fromAmino(o):void 0,s?Ss.fromAmino(s):void 0,n?Is.fromAmino(n):void 0)}toAmino(){const{authority:t,block:e,evidence:r,validator:o,abci:s}=this;return{type:"cosmos-sdk/x/consensus/MsgUpdateParams",value:{authority:t,block:e==null?void 0:e.toAmino(),evidence:r==null?void 0:r.toAmino(),validator:o==null?void 0:o.toAmino(),abci:s==null?void 0:s.toAmino()}}}static fromData(t){const{authority:e,block:r,evidence:o,validator:s,abci:n}=t;return new je(e,r?Ms.fromData(r):void 0,o?xs.fromData(o):void 0,s?Ss.fromData(s):void 0,n?Is.fromData(n):void 0)}toData(){const{authority:t,block:e,evidence:r,validator:o,abci:s}=this;return{"@type":"/cosmos.consensus.v1.MsgUpdateParams",authority:t,block:e==null?void 0:e.toData(),evidence:r==null?void 0:r.toData(),validator:o==null?void 0:o.toData(),abci:s==null?void 0:s.toData()}}static fromProto(t){return new je(t.authority,Ms.fromProto(t.block),xs.fromProto(t.evidence),Ss.fromProto(t.validator),Is.fromProto(t.abci))}toProto(){const{authority:t,block:e,evidence:r,validator:o,abci:s}=this;return Wa.MsgUpdateParams.fromPartial({authority:t,block:e==null?void 0:e.toProto(),evidence:r==null?void 0:r.toProto(),validator:o==null?void 0:o.toProto(),abci:s==null?void 0:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.consensus.v1.MsgUpdateParams",value:Wa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return je.fromProto(Wa.MsgUpdateParams.decode(t.value))}}class Qe extends m{constructor(t,e,r){super(),this.sender=t,this.invariantModuleName=e,this.invariantRoute=r}static fromAmino(t){const{value:{sender:e,invariantModuleName:r,invariantRoute:o}}=t;return new Qe(e,r,o)}toAmino(){throw new Error("MsgVerifyInvarant is not allowed to send")}static fromData(t){const{sender:e,invariantModuleName:r,invariantRoute:o}=t;return new Qe(e,r,o)}toData(){const{sender:t,invariantModuleName:e,invariantRoute:r}=this;return{"@type":"/cosmos.crisis.v1beta1.MsgVerifyInvariant",sender:t,invariantModuleName:e,invariantRoute:r}}static fromProto(t){return new Qe(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:da.MsgVerifyInvariant.encode(this.toProto()).finish()})}static unpackAny(t){return Qe.fromProto(da.MsgVerifyInvariant.decode(t.value))}}class Ye extends m{constructor(t,e){super(),this.authority=t,this.constant_fee=e}static fromAmino(t){const{value:{authority:e,constant_fee:r}}=t;return new Ye(e,v.fromAmino(r))}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:r}=t;return new Ye(e,v.fromData(r))}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 Ye(t.authority,v.fromProto(t.constantFee))}toProto(){const{authority:t,constant_fee:e}=this;return da.MsgUpdateParams.fromPartial({authority:t,constantFee:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgUpdateParams",value:da.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ye.fromProto(da.MsgUpdateParams.decode(t.value))}}class Ze extends m{constructor(t,e){super(),this.delegator_address=t,this.withdraw_address=e}static fromAmino(t){const{value:{delegator_address:e,withdraw_address:r}}=t;return new Ze(e,r)}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:r}=t;return new Ze(e,r)}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 Ze(t.delegatorAddress,t.withdrawAddress)}toProto(){const{delegator_address:t,withdraw_address:e}=this;return ot.MsgSetWithdrawAddress.fromPartial({delegatorAddress:t,withdrawAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",value:ot.MsgSetWithdrawAddress.encode(this.toProto()).finish()})}static unpackAny(t){return Ze.fromProto(ot.MsgSetWithdrawAddress.decode(t.value))}}class Xe extends m{constructor(t,e){super(),this.delegator_address=t,this.validator_address=e}static fromAmino(t){const{value:{delegator_address:e,validator_address:r}}=t;return new Xe(e,r)}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:r}=t;return new Xe(e,r)}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 Xe(t.delegatorAddress,t.validatorAddress)}toProto(){const{delegator_address:t,validator_address:e}=this;return ot.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t,validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:ot.MsgWithdrawDelegatorReward.encode(this.toProto()).finish()})}static unpackAny(t){return Xe.fromProto(ot.MsgWithdrawDelegatorReward.decode(t.value))}}class tr extends m{constructor(t){super(),this.validator_address=t}static fromAmino(t){const{value:{validator_address:e}}=t;return new tr(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 tr(e)}toData(){const{validator_address:t}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",validator_address:t}}static fromProto(t){return new tr(t.validatorAddress)}toProto(){const{validator_address:t}=this;return ot.MsgWithdrawValidatorCommission.fromPartial({validatorAddress:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",value:ot.MsgWithdrawValidatorCommission.encode(this.toProto()).finish()})}static unpackAny(t){return tr.fromProto(ot.MsgWithdrawValidatorCommission.decode(t.value))}}class er extends m{constructor(e,r){super();p(this,"amount");this.depositor=e,this.amount=new u(r)}static fromAmino(e){const{value:{depositor:r,amount:o}}=e;return new er(r,u.fromAmino(o))}toAmino(){const{depositor:e,amount:r}=this;return{type:"cosmos-sdk/MsgFundCommunityPool",value:{depositor:e,amount:r.toAmino()}}}static fromData(e){const{depositor:r,amount:o}=e;return new er(r,u.fromData(o))}toData(){const{depositor:e,amount:r}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgFundCommunityPool",depositor:e,amount:r.toData()}}static fromProto(e){return new er(e.depositor,u.fromProto(e.amount))}toProto(){const{depositor:e,amount:r}=this;return ot.MsgFundCommunityPool.fromPartial({amount:r.toProto(),depositor:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",value:ot.MsgFundCommunityPool.encode(this.toProto()).finish()})}static unpackAny(e){return er.fromProto(ot.MsgFundCommunityPool.decode(e.value))}}class Ns extends m{constructor(t,e){super(),this.denom=t,this.weight=e}static fromAmino(t){const{denom:e,weight:r}=t;return new Ns(e,r)}toAmino(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromData(t){const{denom:e,weight:r}=t;return new Ns(e,r)}toData(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromProto(t){return new Ns(t.denom,t.weight)}toProto(){const{denom:t,weight:e}=this;return ki.RewardWeight.fromPartial({denom:t,weight:e})}}class ms extends m{constructor(t,e,r){super(),this.community_tax=t,this.withdraw_addr_enabled=e,this.reward_weights=r}static fromAmino(t){const{value:{community_tax:e,withdraw_addr_enabled:r,reward_weights:o}}=t;return new ms(e,r,o.map(Ns.fromAmino))}toAmino(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return{type:"distribution/Params",value:{community_tax:t,withdraw_addr_enabled:e,reward_weights:r.map(o=>o.toAmino())}}}static fromData(t){const{community_tax:e,withdraw_addr_enabled:r,reward_weights:o}=t;return new ms(e,r,o.map(Ns.fromData))}toData(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return{"@type":"/initia.distribution.v1.Params",community_tax:t,withdraw_addr_enabled:e,reward_weights:r.map(o=>o.toData())}}static fromProto(t){return new ms(t.communityTax,t.withdrawAddrEnabled,t.rewardWeights.map(Ns.fromProto))}toProto(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return ki.Params.fromPartial({communityTax:t,withdrawAddrEnabled:e,rewardWeights:r.map(o=>o.toProto())})}}class rr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new rr(e,ms.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"distribution/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new rr(e,ms.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.distribution.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new rr(t.authority,ms.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:"/initia.distribution.v1.MsgUpdateParams",value:xn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return rr.fromProto(xn.MsgUpdateParams.decode(t.value))}}class or extends m{constructor(e,r,o){super();p(this,"amount");this.authority=e,this.recipient=r,this.amount=new u(o)}static fromAmino(e){const{value:{authority:r,recipient:o,amount:s}}=e;return new or(r,o,u.fromAmino(s))}toAmino(){const{authority:e,recipient:r,amount:o}=this;return{type:"cosmos-sdk/distr/MsgCommunityPoolSpend",value:{authority:e,recipient:r,amount:o.toAmino()}}}static fromData(e){const{authority:r,recipient:o,amount:s}=e;return new or(r,o,u.fromData(s))}toData(){const{authority:e,recipient:r,amount:o}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",authority:e,recipient:r,amount:o.toData()}}static fromProto(e){return new or(e.authority,e.recipient,u.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return ot.MsgCommunityPoolSpend.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",value:ot.MsgCommunityPoolSpend.encode(this.toProto()).finish()})}static unpackAny(e){return or.fromProto(ot.MsgCommunityPoolSpend.decode(e.value))}}class sr extends m{constructor(e,r,o,s){super();p(this,"amount");this.depositor=e,this.validator_address=r,this.denom=o,this.amount=new u(s)}static fromAmino(e){const{value:{depositor:r,validator_address:o,denom:s,amount:n}}=e;return new sr(r,o,s,u.fromAmino(n))}toAmino(){const{depositor:e,validator_address:r,denom:o,amount:s}=this;return{type:"distr/MsgDepositValidatorRewardsPool",value:{depositor:e,validator_address:r,denom:o,amount:s.toAmino()}}}static fromData(e){const{depositor:r,validator_address:o,denom:s,amount:n}=e;return new sr(r,o,s,u.fromData(n))}toData(){const{depositor:e,validator_address:r,denom:o,amount:s}=this;return{"@type":"/initia.distribution.v1.MsgDepositValidatorRewardsPool",depositor:e,validator_address:r,denom:o,amount:s.toData()}}static fromProto(e){return new sr(e.depositor,e.validatorAddress,e.denom,u.fromProto(e.amount))}toProto(){const{depositor:e,validator_address:r,denom:o,amount:s}=this;return xn.MsgDepositValidatorRewardsPool.fromPartial({depositor:e,validatorAddress:r,denom:o,amount:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgDepositValidatorRewardsPool",value:xn.MsgDepositValidatorRewardsPool.encode(this.toProto()).finish()})}static unpackAny(e){return sr.fromProto(xn.MsgDepositValidatorRewardsPool.decode(e.value))}}class nr extends m{constructor(t,e,r,o){super(),this.height=t,this.time=e,this.power=r,this.consensus_address=o}static fromAmino(t){const{value:{height:e,time:r,power:o,consensus_address:s}}=t;return new nr(Number.parseInt(e),new Date(r),Number.parseInt(o),s)}toAmino(){const{height:t,time:e,power:r,consensus_address:o}=this;return{type:"cosmos-sdk/Equivocation",value:{height:t.toString(),time:e.toISOString(),power:r.toString(),consensus_address:o}}}static fromData(t){const{height:e,time:r,power:o,consensus_address:s}=t;return new nr(Number.parseInt(e),new Date(r),Number.parseInt(o),s)}toData(){const{height:t,time:e,power:r,consensus_address:o}=this;return{"@type":"/cosmos.evidence.v1beta1.Equivocation",height:t.toString(),time:e.toISOString(),power:r.toString(),consensus_address:o}}static fromProto(t){return new nr(t.height.toNumber(),t.time,t.power.toNumber(),t.consensusAddress)}toProto(){const{height:t,time:e,power:r,consensus_address:o}=this;return Ja.Equivocation.fromPartial({height:f.fromNumber(t),time:e,power:f.fromNumber(r),consensusAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.Equivocation",value:Ja.Equivocation.encode(this.toProto()).finish()})}static unpackAny(t){return nr.fromProto(Ja.Equivocation.decode(t.value))}}exports.Evidence=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/Equivocation":return nr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.evidence.v1beta1.Equivocation":return nr.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmos.evidence.v1beta1.Equivocation":return nr.unpackAny(o)}throw new Error(`Evidence type ${s} not recognized`)}i.fromProto=r})(exports.Evidence||(exports.Evidence={}));class ar extends m{constructor(t,e){super(),this.submitter=t,this.evidence=e}static fromAmino(t){const{value:{submitter:e,evidence:r}}=t;return new ar(e,exports.Evidence.fromAmino(r))}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:r}=t;return new ar(e,exports.Evidence.fromData(r))}toData(){const{submitter:t,evidence:e}=this;return{"@type":"/cosmos.evidence.v1beta1.MsgSubmitEvidence",submitter:t,evidence:e.toData()}}static fromProto(t){return new ar(t.submitter,exports.Evidence.fromProto(t.evidence))}toProto(){const{submitter:t,evidence:e}=this;return Ha.MsgSubmitEvidence.fromPartial({submitter:t,evidence:e.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.MsgSubmitEvidence",value:Ha.MsgSubmitEvidence.encode(this.toProto()).finish()})}static unpackAny(t){return ar.fromProto(Ha.MsgSubmitEvidence.decode(t.value))}}class ir extends m{constructor(t,e,r){super(),this.sender=t,this.code=e,this.value=r}static fromAmino(t){const{value:{sender:e,code:r,value:o}}=t;return new ir(e,r,o)}toAmino(){const{sender:t,code:e,value:r}=this;return{type:"evm/MsgCreate",value:{sender:t,code:e,value:r}}}static fromData(t){const{sender:e,code:r,value:o}=t;return new ir(e,r,o)}toData(){const{sender:t,code:e,value:r}=this;return{"@type":"/minievm.evm.v1.MsgCreate",sender:t,code:e,value:r}}static fromProto(t){return new ir(t.sender,t.code,t.value)}toProto(){const{sender:t,code:e,value:r}=this;return Pt.MsgCreate.fromPartial({sender:t,code:e,value:r})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate",value:Pt.MsgCreate.encode(this.toProto()).finish()})}static unpackAny(t){return ir.fromProto(Pt.MsgCreate.decode(t.value))}}class cr extends m{constructor(t,e,r,o){super(),this.sender=t,this.code=e,this.salt=r,this.value=o}static fromAmino(t){const{value:{sender:e,code:r,salt:o,value:s}}=t;return new cr(e,r,Number.parseInt(o),s)}toAmino(){const{sender:t,code:e,salt:r,value:o}=this;return{type:"evm/MsgCreate2",value:{sender:t,code:e,salt:r.toString(),value:o}}}static fromData(t){const{sender:e,code:r,salt:o,value:s}=t;return new cr(e,r,Number.parseInt(o),s)}toData(){const{sender:t,code:e,salt:r,value:o}=this;return{"@type":"/minievm.evm.v1.MsgCreate2",sender:t,code:e,salt:r.toString(),value:o}}static fromProto(t){return new cr(t.sender,t.code,t.salt.toNumber(),t.value)}toProto(){const{sender:t,code:e,salt:r,value:o}=this;return Pt.MsgCreate2.fromPartial({sender:t,code:e,salt:f.fromNumber(r),value:o})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate2",value:Pt.MsgCreate2.encode(this.toProto()).finish()})}static unpackAny(t){return cr.fromProto(Pt.MsgCreate2.decode(t.value))}}class mr extends m{constructor(t,e,r,o){super(),this.sender=t,this.contract_addr=e,this.input=r,this.value=o}static fromAmino(t){const{value:{sender:e,contract_addr:r,input:o,value:s}}=t;return new mr(e,r,o,s)}toAmino(){const{sender:t,contract_addr:e,input:r,value:o}=this;return{type:"evm/MsgCall",value:{sender:t,contract_addr:e,input:r,value:o}}}static fromData(t){const{sender:e,contract_addr:r,input:o,value:s}=t;return new mr(e,r,o,s)}toData(){const{sender:t,contract_addr:e,input:r,value:o}=this;return{"@type":"/minievm.evm.v1.MsgCall",sender:t,contract_addr:e,input:r,value:o}}static fromProto(t){return new mr(t.sender,t.contractAddr,t.input,t.value)}toProto(){const{sender:t,contract_addr:e,input:r,value:o}=this;return Pt.MsgCall.fromPartial({sender:t,contractAddr:e,input:r,value:o})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCall",value:Pt.MsgCall.encode(this.toProto()).finish()})}static unpackAny(t){return mr.fromProto(Pt.MsgCall.decode(t.value))}}class us extends m{constructor(t,e,r,o,s){super(),this.extra_eips=t,this.allowed_publishers=e,this.allow_custom_erc20=r,this.allowed_custom_erc20s=o,this.fee_denom=s}static fromAmino(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:s,fee_denom:n}=t;return new us(e.map(Number.parseInt),r,o,s,n)}toAmino(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}=this;return{extra_eips:t.map(n=>n.toString()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}}static fromData(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:s,fee_denom:n}=t;return new us(e.map(Number.parseInt),r,o,s,n)}toData(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}=this;return{extra_eips:t.map(n=>n.toString()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}}static fromProto(t){return new us(t.extraEips.map(e=>e.toNumber()),t.allowedPublishers,t.allowCustomErc20,t.allowedCustomErc20s,t.feeDenom)}toProto(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}=this;return Cc.Params.fromPartial({extraEips:t,allowedPublishers:e,allowCustomErc20:r,allowedCustomErc20s:o,feeDenom:s})}}class ur extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new ur(e,us.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"evm/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new ur(e,us.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/minievm.evm.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new ur(t.authority,us.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Pt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgUpdateParams",value:Pt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ur.fromProto(Pt.MsgUpdateParams.decode(t.value))}}class rt extends m{constructor(e,r){super();p(this,"spend_limit");this.expiration=r;let o=!1;if(e&&(this.spend_limit=new u(e),this.spend_limit.map(s=>{_(s.amount).isLessThanOrEqualTo(0)&&(o=!0)})),e&&o)throw new Error("spend_limit must be positive")}static fromAmino(e){const{value:{spend_limit:r,expiration:o}}=e;return new rt(r?u.fromAmino(r):void 0,o?new Date(o):void 0)}toAmino(){const{spend_limit:e,expiration:r}=this;return{type:"cosmos-sdk/BasicAllowance",value:{spend_limit:e==null?void 0:e.toAmino(),expiration:r==null?void 0:r.toISOString().replace(/\.000Z$/,"Z")}}}static fromData(e){const{spend_limit:r,expiration:o}=e;return new rt(r?u.fromData(r):void 0,o?new Date(o):void 0)}toData(){const{spend_limit:e,expiration:r}=this;return{"@type":"/cosmos.feegrant.v1beta1.BasicAllowance",spend_limit:e==null?void 0:e.toData(),expiration:r==null?void 0:r.toISOString().replace(/\.000Z$/,"Z")}}static fromProto(e){return new rt(u.fromProto(e.spendLimit),e.expiration)}toProto(){const{spend_limit:e,expiration:r}=this;return es.BasicAllowance.fromPartial({expiration:r,spendLimit:e==null?void 0:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",value:es.BasicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return rt.fromProto(es.BasicAllowance.decode(e.value))}}class bt extends m{constructor(e,r,o,s,n){super();p(this,"period_spend_limit");p(this,"period_can_spend");this.basic=e,this.period=r,this.period_reset=n,this.period_spend_limit=new u(o),this.period_can_spend=new u(s)}static fromAmino(e){const{value:{basic:r,period:o,period_spend_limit:s,period_can_spend:n,period_reset:a}}=e;return new bt(rt.fromAmino(r),D.fromAmino(o),u.fromAmino(s),u.fromAmino(n),new Date(a))}toAmino(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:s,period_reset:n}=this;return{type:"cosmos-sdk/PeriodicAllowance",value:{basic:e.toAmino(),period:r.toAmino(),period_spend_limit:o.toAmino(),period_can_spend:s.toAmino(),period_reset:n.toISOString().replace(/\.000Z$/,"Z")}}}static fromData(e){const{basic:r,period:o,period_spend_limit:s,period_can_spend:n,period_reset:a}=e;return new bt(rt.fromData(r),D.fromData(o),u.fromData(s),u.fromData(n),new Date(a))}toData(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:s,period_reset:n}=this;return{"@type":"/cosmos.feegrant.v1beta1.PeriodicAllowance",basic:e.toData(),period:r.toData(),period_spend_limit:o.toData(),period_can_spend:s.toData(),period_reset:n.toISOString().replace(/\.000Z$/,"Z")}}static fromProto(e){return new bt(rt.fromProto(e.basic),D.fromProto(e.period),u.fromProto(e.periodSpendLimit),u.fromProto(e.periodCanSpend),e.periodReset)}toProto(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:s,period_reset:n}=this;return es.PeriodicAllowance.fromPartial({basic:e.toProto(),period:r.toProto(),periodCanSpend:s.toProto(),periodReset:n,periodSpendLimit:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.PeriodicAllowance",value:es.PeriodicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return bt.fromProto(es.PeriodicAllowance.decode(e.value))}}class dr extends m{constructor(t,e){super(),this.allowance=t,this.allowed_messages=e}static fromAmino(t){const{value:{allowance:e,allowed_messages:r}}=t;return new dr(e.type==="cosmos-sdk/BasicAllowance"?rt.fromAmino(e):bt.fromAmino(e),r)}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:r}=t;return new dr(e["@type"]==="/cosmos.feegrant.v1beta1.BasicAllowance"?rt.fromData(e):bt.fromData(e),r)}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 dr((e==null?void 0:e.typeUrl)==="/cosmos.feegrant.v1beta1.BasicAllowance"?rt.unpackAny(e):bt.unpackAny(e),t.allowedMessages)}toProto(){const{allowance:t,allowed_messages:e}=this;return es.AllowedMsgAllowance.fromPartial({allowance:t.packAny(),allowedMessages:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",value:es.AllowedMsgAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return dr.fromProto(es.AllowedMsgAllowance.decode(t.value))}}exports.Allowance=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/BasicAllowance":return rt.fromAmino(o);case"cosmos-sdk/PeriodicAllowance":return bt.fromAmino(o);case"cosmos-sdk/AllowedMsgAllowance":return dr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return bt.fromData(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return rt.fromData(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return dr.fromData(o)}}i.fromData=e;function r(o){switch(o.typeUrl){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return bt.unpackAny(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return rt.unpackAny(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return dr.unpackAny(o)}throw new Error(`not supported allowance ${o.typeUrl}`)}i.fromProto=r})(exports.Allowance||(exports.Allowance={}));class lr extends m{constructor(t,e,r){super(),this.granter=t,this.grantee=e,this.allowance=r}static fromAmino(t){const{value:{granter:e,grantee:r,allowance:o}}=t;return new lr(e,r,exports.Allowance.fromAmino(o))}toAmino(){const{granter:t,grantee:e,allowance:r}=this;return{type:"cosmos-sdk/MsgGrantAllowance",value:{granter:t,grantee:e,allowance:r.toAmino()}}}static fromData(t){const{granter:e,grantee:r,allowance:o}=t;return new lr(e,r,exports.Allowance.fromData(o))}toData(){const{granter:t,grantee:e,allowance:r}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgGrantAllowance",granter:t,grantee:e,allowance:r.toData()}}static fromProto(t){return new lr(t.granter,t.grantee,exports.Allowance.fromProto(t.allowance))}toProto(){const{granter:t,grantee:e,allowance:r}=this;return Sn.MsgGrantAllowance.fromPartial({allowance:r.packAny(),grantee:e,granter:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",value:Sn.MsgGrantAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return lr.fromProto(Sn.MsgGrantAllowance.decode(t.value))}}class pr extends m{constructor(t,e){super(),this.granter=t,this.grantee=e}static fromAmino(t){const{value:{granter:e,grantee:r}}=t;return new pr(e,r)}toAmino(){const{granter:t,grantee:e}=this;return{type:"cosmos-sdk/MsgRevokeAllowance",value:{granter:t,grantee:e}}}static fromData(t){const{granter:e,grantee:r}=t;return new pr(e,r)}toData(){const{granter:t,grantee:e}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",granter:t,grantee:e}}static fromProto(t){return new pr(t.granter,t.grantee)}toProto(){const{granter:t,grantee:e}=this;return Sn.MsgRevokeAllowance.fromPartial({grantee:e,granter:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",value:Sn.MsgRevokeAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return pr.fromProto(Sn.MsgRevokeAllowance.decode(t.value))}}class hr extends m{constructor(t,e,r){super(),this.signer=t,this.recipient=e,this.channel=r}static fromAmino(t){const{value:{signer:e,recipient:r,channel:o}}=t;return new hr(e,r,o)}toAmino(){const{signer:t,recipient:e,channel:r}=this;return{type:"noble/forwarding/RegisterAccount",value:{signer:t,recipient:e,channel:r}}}static fromData(t){const{signer:e,recipient:r,channel:o}=t;return new hr(e,r,o)}toData(){const{signer:t,recipient:e,channel:r}=this;return{"@type":"/noble.forwarding.v1.MsgRegisterAccount",signer:t,recipient:e,channel:r}}static fromProto(t){return new hr(t.signer,t.recipient,t.channel)}toProto(){const{signer:t,recipient:e,channel:r}=this;return In.MsgRegisterAccount.fromPartial({signer:t,recipient:e,channel:r})}packAny(){return l.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgRegisterAccount",value:In.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return hr.fromProto(In.MsgRegisterAccount.decode(t.value))}}class fr extends m{constructor(t,e){super(),this.signer=t,this.address=e}static fromAmino(t){const{value:{signer:e,address:r}}=t;return new fr(e,r)}toAmino(){const{signer:t,address:e}=this;return{type:"noble/forwarding/ClearAccount",value:{signer:t,address:e}}}static fromData(t){const{signer:e,address:r}=t;return new fr(e,r)}toData(){const{signer:t,address:e}=this;return{"@type":"/noble.forwarding.v1.MsgClearAccount",signer:t,address:e}}static fromProto(t){return new fr(t.signer,t.address)}toProto(){const{signer:t,address:e}=this;return In.MsgClearAccount.fromPartial({signer:t,address:e})}packAny(){return l.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgClearAccount",value:In.MsgClearAccount.encode(this.toProto()).finish()})}static unpackAny(t){return fr.fromProto(In.MsgClearAccount.decode(t.value))}}class gr extends m{constructor(t,e){super(),this.proposal_id=t,this.proposer=e}static fromAmino(t){const{value:{proposal_id:e,proposer:r}}=t;return new gr(Number.parseInt(e),r)}toAmino(){const{proposal_id:t,proposer:e}=this;return{type:"cosmos-sdk/v1/MsgCancelProposal",value:{proposal_id:t.toString(),proposer:e}}}static fromData(t){const{proposal_id:e,proposer:r}=t;return new gr(Number.parseInt(e),r)}toData(){const{proposal_id:t,proposer:e}=this;return{"@type":"/cosmos.gov.v1.MsgCancelProposal",proposal_id:t.toString(),proposer:e}}static fromProto(t){return new gr(t.proposalId.toNumber(),t.proposer)}toProto(){const{proposal_id:t,proposer:e}=this;return st.MsgCancelProposal.fromPartial({proposalId:f.fromNumber(t),proposer:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgCancelProposal",value:st.MsgCancelProposal.encode(this.toProto()).finish()})}static unpackAny(t){return gr.fromProto(st.MsgCancelProposal.decode(t.value))}}class yr extends m{constructor(e,r,o){super();p(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new u(o)}static fromAmino(e){const{value:{proposal_id:r,depositor:o,amount:s}}=e;return new yr(Number.parseInt(r),o,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{type:"cosmos-sdk/MsgDeposit",value:{proposal_id:e.toString(),depositor:r,amount:o.toAmino()}}}static fromData(e){const{proposal_id:r,depositor:o,amount:s}=e;return new yr(Number.parseInt(r),o,u.fromData(s))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{"@type":"/cosmos.gov.v1beta1.MsgDeposit",proposal_id:e.toString(),depositor:r,amount:o.toData()}}static fromProto(e){return new yr(e.proposalId.toNumber(),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return wt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:f.fromNumber(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",value:wt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return yr.fromProto(wt.MsgDeposit.decode(e.value))}}class _r extends m{constructor(e,r,o){super();p(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new u(o)}static fromAmino(e){const{value:{proposal_id:r,depositor:o,amount:s}}=e;return new _r(Number.parseInt(r),o,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{type:"cosmos-sdk/v1/MsgDeposit",value:{proposal_id:e.toString(),depositor:r,amount:o.toAmino()}}}static fromData(e){const{proposal_id:r,depositor:o,amount:s}=e;return new _r(Number.parseInt(r),o,u.fromData(s))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{"@type":"/cosmos.gov.v1.MsgDeposit",proposal_id:e.toString(),depositor:r,amount:o.toData()}}static fromProto(e){return new _r(e.proposalId.toNumber(),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return st.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:f.fromNumber(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgDeposit",value:st.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return _r.fromProto(st.MsgDeposit.decode(e.value))}}class vr extends m{constructor(t){super(),this.paramChanges=t}static fromAmino(t){return new vr((t??[]).map(Cs.fromAmino))}toAmino(){return this.paramChanges.map(t=>t.toAmino())}static fromData(t){return new vr((t??[]).map(Cs.fromData))}toData(){return this.paramChanges.map(t=>t.toData())}static fromProto(t){return new vr((t??[]).map(Cs.fromProto))}toProto(){return this.paramChanges.map(t=>t.toProto())}}class Cs extends m{constructor(t,e,r){super(),this.subspace=t,this.key=e,this.value=r}static fromAmino(t){const{subspace:e,key:r,value:o}=t;return new Cs(e,r,o)}toAmino(){const{subspace:t,key:e,value:r}=this;return{subspace:t,key:e,value:r}}static fromData(t){const{subspace:e,key:r,value:o}=t;return new Cs(e,r,o)}toData(){const{subspace:t,key:e,value:r}=this;return{subspace:t,key:e,value:r}}static fromProto(t){return new Cs(t.subspace,t.key,t.value)}toProto(){const{subspace:t,key:e,value:r}=this;return Da.ParamChange.fromPartial({key:e,subspace:t,value:r})}}class br extends m{constructor(e,r,o){super();p(this,"changes");this.title=e,this.description=r,Array.isArray(o)?this.changes=vr.fromData(o):this.changes=o}static fromAmino(e){const{value:{title:r,description:o,changes:s}}=e;return new br(r,o,vr.fromAmino(s))}toAmino(){const{title:e,description:r,changes:o}=this;return{type:"cosmos-sdk/ParameterChangeProposal",value:{title:e,description:r,changes:o.toAmino()}}}static fromData(e){const{title:r,description:o,changes:s}=e;return new br(r,o,vr.fromData(s))}toData(){const{title:e,description:r,changes:o}=this;return{"@type":"/cosmos.params.v1beta1.ParameterChangeProposal",title:e,description:r,changes:o.toData()}}static fromProto(e){return new br(e.title,e.description,vr.fromProto(e.changes))}toProto(){const{title:e,description:r,changes:o}=this;return Da.ParameterChangeProposal.fromPartial({changes:o.toProto(),description:r,title:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:Da.ParameterChangeProposal.encode(this.toProto()).finish()})}static unpackAny(e){return br.fromProto(Da.ParameterChangeProposal.decode(e.value))}}class Ar extends m{constructor(t,e){super(),this.title=t,this.description=e}static fromAmino(t){const{value:{title:e,description:r}}=t;return new Ar(e,r)}toAmino(){const{title:t,description:e}=this;return{type:"cosmos-sdk/TextProposal",value:{title:t,description:e}}}static fromData(t){const{title:e,description:r}=t;return new Ar(e,r)}toData(){const{title:t,description:e}=this;return{"@type":"/cosmos.gov.v1beta1.TextProposal",title:t,description:e}}static fromProto(t){return new Ar(t.title,t.description)}toProto(){const{title:t,description:e}=this;return ka.TextProposal.fromPartial({description:e,title:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:ka.TextProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Ar.fromProto(ka.TextProposal.decode(t.value))}}exports.Content=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/TextProposal":return Ar.fromAmino(o);case"cosmos-sdk/ParameterChangeProposal":return br.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.gov.v1beta1.TextProposal":return Ar.fromData(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return br.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmos.gov.v1beta1.TextProposal":return Ar.unpackAny(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return br.unpackAny(o)}throw new Error(`Proposal content ${s} not recognized`)}i.fromProto=r})(exports.Content||(exports.Content={}));class ee extends m{constructor(e,r,o,s,n,a,c,d,h,g,y,b,k,M,T,F,L,z){super();p(this,"total_deposit");this.id=e,this.messages=r,this.status=o,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=g,this.emergency_next_tally_time=y,this.metadata=b,this.title=k,this.summary=M,this.proposer=T,this.expedited=F,this.emergency=L,this.failed_reason=z,this.total_deposit=new u(c)}static fromAmino(e){const{id:r,messages:o,status:s,final_tally_result:n,submit_time:a,deposit_end_time:c,total_deposit:d,voting_start_time:h,voting_end_time:g,emergency_start_time:y,emergency_next_tally_time:b,metadata:k,title:M,summary:T,proposer:F,expedited:L,emergency:z,failed_reason:V}=e;return new ee(Number.parseInt(r),o.map(exports.Msg.fromAmino),Ct.proposalStatusFromJSON(s),{yes_count:_(n.yes_count??0).toFixed(0),no_count:_(n.no_count??0).toFixed(0),abstain_count:_(n.abstain_count??0).toFixed(0),no_with_veto_count:_(n.no_with_veto_count??0).toFixed(0)},new Date(a),new Date(c),u.fromAmino(d),new Date(h),new Date(g),new Date(y),new Date(b),k,M,T,F,L,z,V)}toAmino(){const{id:e,messages:r,status:o,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:h,emergency_start_time:g,emergency_next_tally_time:y,metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}=this;return{id:e.toString(),messages:r.map(V=>V.toAmino()),status:Ct.proposalStatusToJSON(o),final_tally_result:{yes_count:_(s.yes_count).toFixed(),no_count:_(s.no_count).toFixed(),abstain_count:_(s.abstain_count).toFixed(),no_with_veto_count:_(s.no_with_veto_count).toFixed()},submit_time:n.toISOString(),deposit_end_time:a.toISOString(),total_deposit:c.toAmino(),voting_start_time:d.toISOString(),voting_end_time:h.toISOString(),emergency_start_time:g.toISOString(),emergency_next_tally_time:y.toISOString(),metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}}static fromData(e){const{id:r,messages:o,status:s,final_tally_result:n,submit_time:a,deposit_end_time:c,total_deposit:d,voting_start_time:h,voting_end_time:g,emergency_start_time:y,emergency_next_tally_time:b,metadata:k,title:M,summary:T,proposer:F,expedited:L,emergency:z,failed_reason:V}=e;return new ee(Number.parseInt(r),o.map(exports.Msg.fromData),Ct.proposalStatusFromJSON(s),{yes_count:_(n.yes_count??0).toFixed(0),no_count:_(n.no_count??0).toFixed(0),abstain_count:_(n.abstain_count??0).toFixed(0),no_with_veto_count:_(n.no_with_veto_count??0).toFixed(0)},new Date(a),new Date(c),u.fromData(d),new Date(h),new Date(g),new Date(y),new Date(b),k,M,T,F,L,z,V)}toData(){const{id:e,messages:r,status:o,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:h,emergency_start_time:g,emergency_next_tally_time:y,metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}=this;return{id:e.toString(),messages:r.map(V=>V.toData()),status:Ct.proposalStatusToJSON(o),final_tally_result:{yes_count:_(s.yes_count).toFixed(),no_count:_(s.no_count).toFixed(),abstain_count:_(s.abstain_count).toFixed(),no_with_veto_count:_(s.no_with_veto_count).toFixed()},submit_time:n.toISOString(),deposit_end_time:a.toISOString(),total_deposit:c.toData(),voting_start_time:d.toISOString(),voting_end_time:h.toISOString(),emergency_start_time:g.toISOString(),emergency_next_tally_time:y.toISOString(),metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}}static fromProto(e){var r,o,s,n;return new ee(e.id.toNumber(),e.messages.map(exports.Msg.fromProto),e.status,{yes_count:_(((r=e.finalTallyResult)==null?void 0:r.yesCount)??0).toFixed(0),no_count:_(((o=e.finalTallyResult)==null?void 0:o.noCount)??0).toFixed(0),abstain_count:_(((s=e.finalTallyResult)==null?void 0:s.abstainCount)??0).toFixed(0),no_with_veto_count:_(((n=e.finalTallyResult)==null?void 0:n.noWithVetoCount)??0).toFixed(0)},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:r,status:o,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:h,emergency_start_time:g,emergency_next_tally_time:y,metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}=this;let V;return s&&(V=Ct.TallyResult.fromPartial({yesCount:s.yes_count.toString(),noCount:s.no_count.toString(),abstainCount:s.abstain_count.toString(),noWithVetoCount:s.no_with_veto_count.toString()})),oi.Proposal.fromPartial({id:f.fromNumber(e),messages:r.map(Q=>Q.packAny()),status:o,finalTallyResult:V,submitTime:n,depositEndTime:a,totalDeposit:c.toProto(),votingStartTime:d,votingEndTime:h,emergencyStartTime:g,emergencyNextTallyTime:y,metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failedReason:z})}}(i=>{i.Status=Ct.ProposalStatus})(ee||(ee={}));class Pr extends m{constructor(e,r,o){super();p(this,"initial_deposit");this.content=e,this.proposer=o,this.initial_deposit=new u(r)}static fromAmino(e){const{value:{content:r,initial_deposit:o,proposer:s}}=e;return new Pr(r?exports.Content.fromAmino(r):void 0,u.fromAmino(o),s)}toAmino(){const{content:e,initial_deposit:r,proposer:o}=this;return{type:"cosmos-sdk/MsgSubmitProposal",value:{content:e==null?void 0:e.toAmino(),initial_deposit:r.toAmino(),proposer:o}}}static fromData(e){const{content:r,initial_deposit:o,proposer:s}=e;return new Pr(r?exports.Content.fromData(r):void 0,u.fromData(o),s)}toData(){const{content:e,initial_deposit:r,proposer:o}=this;return{"@type":"/cosmos.gov.v1beta1.MsgSubmitProposal",content:e==null?void 0:e.toData(),initial_deposit:r.toData(),proposer:o}}static fromProto(e){return new Pr(e.content?exports.Content.fromProto(e.content):void 0,u.fromProto(e.initialDeposit),e.proposer)}toProto(){const{content:e,initial_deposit:r,proposer:o}=this;return wt.MsgSubmitProposal.fromPartial({content:e==null?void 0:e.packAny(),initialDeposit:r.toProto(),proposer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposal",value:wt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return Pr.fromProto(wt.MsgSubmitProposal.decode(e.value))}}class wr extends m{constructor(e,r,o,s,n,a,c){super();p(this,"initial_deposit");this.messages=e,this.proposer=o,this.metadata=s,this.title=n,this.summary=a,this.expedited=c,this.initial_deposit=new u(r)}static fromAmino(e){const{value:{messages:r,initial_deposit:o,proposer:s,metadata:n,title:a,summary:c,expedited:d}}=e;return new wr(r.map(exports.Msg.fromAmino),u.fromAmino(o),s,n??"",a,c,d)}toAmino(){const{messages:e,initial_deposit:r,proposer:o,metadata:s,title:n,summary:a,expedited:c}=this;return{type:"cosmos-sdk/v1/MsgSubmitProposal",value:{messages:e.map(d=>d.toAmino()),initial_deposit:r.toAmino(),proposer:o,metadata:s&&s!==""?s:void 0,title:n,summary:a,expedited:c}}}static fromData(e){const{messages:r,initial_deposit:o,proposer:s,metadata:n,title:a,summary:c,expedited:d}=e;return new wr(r.map(exports.Msg.fromData),u.fromData(o),s,n,a,c,d)}toData(){const{messages:e,initial_deposit:r,proposer:o,metadata:s,title:n,summary:a,expedited:c}=this;return{"@type":"/cosmos.gov.v1.MsgSubmitProposal",messages:e.map(d=>d.toData()),initial_deposit:r.toData(),proposer:o,metadata:s,title:n,summary:a,expedited:c}}static fromProto(e){return new wr(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:r,proposer:o,metadata:s,title:n,summary:a,expedited:c}=this;return st.MsgSubmitProposal.fromPartial({messages:e.map(d=>d.packAny()),initialDeposit:r.toProto(),proposer:o,metadata:s,title:n,summary:a,expedited:c})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",value:st.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return wr.fromProto(st.MsgSubmitProposal.decode(e.value))}}class Bt extends m{constructor(t,e,r){super(),this.proposal_id=t,this.voter=e,this.option=r}static fromAmino(t){const{value:{proposal_id:e,voter:r,option:o}}=t;return new Bt(Number.parseInt(e),r,o)}toAmino(){const{proposal_id:t,voter:e,option:r}=this;return{type:"cosmos-sdk/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:r}}}static fromData(t){const{proposal_id:e,voter:r,option:o}=t;return new Bt(Number.parseInt(e),r,o)}toData(){const{proposal_id:t,voter:e,option:r}=this;return{"@type":"/cosmos.gov.v1beta1.MsgVote",proposal_id:t.toFixed(),voter:e,option:r}}static fromProto(t){return new Bt(t.proposalId.toNumber(),t.voter,t.option)}toProto(){const{proposal_id:t,voter:e,option:r}=this;return wt.MsgVote.fromPartial({option:r,proposalId:f.fromNumber(t),voter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVote",value:wt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return Bt.fromProto(wt.MsgVote.decode(t.value))}}(i=>{i.Option=ka.VoteOption})(Bt||(Bt={}));class Ot extends m{constructor(t,e,r,o){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o}static fromAmino(t){const{value:{proposal_id:e,voter:r,option:o,metadata:s}}=t;return new Ot(Number.parseInt(e),r,o,s??"")}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return{type:"cosmos-sdk/v1/MsgVote",value:{proposal_id:t.toString(),voter:e,option:r,metadata:o&&o!==""?o:void 0}}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:s}=t;return new Ot(Number.parseInt(e),r,o,s)}toData(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return{"@type":"/cosmos.gov.v1.MsgVote",proposal_id:t.toString(),voter:e,option:r,metadata:o}}static fromProto(t){return new Ot(t.proposalId.toNumber(),t.voter,t.option,t.metadata)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return st.MsgVote.fromPartial({proposalId:f.fromNumber(t),voter:e,option:r,metadata:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVote",value:st.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return Ot.fromProto(st.MsgVote.decode(t.value))}}(i=>{i.Option=Ct.VoteOption})(Ot||(Ot={}));class Us extends m{constructor(t,e,r,o){super(),this.proposal_id=t,this.voter=e,this.options=r,this.metadata=o}static fromAmino(t){const{proposal_id:e,voter:r,options:o,metadata:s}=t;return new Us(Number.parseInt(e),r,o.map(n=>mt.fromAmino(n)),s)}toAmino(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{proposal_id:t.toString(),voter:e,options:r.map(s=>s.toAmino()),metadata:o}}static fromData(t){const{proposal_id:e,voter:r,options:o,metadata:s}=t;return new Us(Number.parseInt(e),r,o.map(n=>mt.fromData(n)),s)}toData(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{proposal_id:t.toString(),voter:e,options:r.map(s=>s.toData()),metadata:o}}static fromProto(t){return new Us(t.proposalId.toNumber(),t.voter,t.options.map(e=>mt.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return Ct.Vote.fromPartial({options:r.map(s=>s.toProto()),proposalId:f.fromNumber(t),voter:e,metadata:o})}}(i=>{i.Option=Ct.VoteOption})(Us||(Us={}));class mt extends m{constructor(e,r){super();p(this,"weight");this.option=e,this.weight=_(r).toString()}static fromAmino(e){const{option:r,weight:o}=e;return new mt(r,o)}toAmino(){const{option:e,weight:r}=this;return{option:e,weight:r}}static fromData(e){const{option:r,weight:o}=e;return new mt(r,o)}toData(){const{option:e,weight:r}=this;return{option:e,weight:r}}static fromProto(e){return new mt(e.option,e.weight)}toProto(){const{option:e,weight:r}=this;return Ct.WeightedVoteOption.fromPartial({option:e,weight:r})}}class Dr extends m{constructor(t,e,r){super(),this.proposal_id=t,this.voter=e,this.options=r}static fromAmino(t){const{value:{proposal_id:e,voter:r,options:o}}=t;return new Dr(Number.parseInt(e),r,o.map(s=>mt.fromAmino(s)))}toAmino(){const{proposal_id:t,voter:e,options:r}=this;return{type:"cosmos-sdk/MsgVoteWeighted",value:{proposal_id:t.toFixed(),voter:e,options:r.map(o=>o.toAmino())}}}static fromData(t){const{proposal_id:e,voter:r,options:o}=t;return new Dr(Number.parseInt(e),r,o.map(s=>mt.fromData(s)))}toData(){const{proposal_id:t,voter:e,options:r}=this;return{"@type":"/cosmos.gov.v1beta1.MsgVoteWeighted",proposal_id:t.toFixed(),voter:e,options:r.map(o=>o.toData())}}static fromProto(t){return new Dr(t.proposalId.toNumber(),t.voter,t.options.map(e=>mt.fromProto(e)))}toProto(){const{proposal_id:t,voter:e,options:r}=this;return wt.MsgVoteWeighted.fromPartial({options:r.map(o=>o.toProto()),proposalId:f.fromNumber(t),voter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",value:wt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return Dr.fromProto(wt.MsgVoteWeighted.decode(t.value))}}class kr extends m{constructor(t,e,r,o){super(),this.proposal_id=t,this.voter=e,this.options=r,this.metadata=o}static fromAmino(t){const{value:{proposal_id:e,voter:r,options:o,metadata:s}}=t;return new kr(Number.parseInt(e),r,o.map(n=>mt.fromAmino(n)),s??"")}toAmino(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{type:"cosmos-sdk/v1/MsgVoteWeighted",value:{proposal_id:t.toFixed(),voter:e,options:r.map(s=>s.toAmino()),metadata:o&&o!==""?o:void 0}}}static fromData(t){const{proposal_id:e,voter:r,options:o,metadata:s}=t;return new kr(Number.parseInt(e),r,o.map(n=>mt.fromData(n)),s)}toData(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{"@type":"/cosmos.gov.v1.MsgVoteWeighted",proposal_id:t.toFixed(),voter:e,options:r.map(s=>s.toData()),metadata:o}}static fromProto(t){return new kr(t.proposalId.toNumber(),t.voter,t.options.map(e=>mt.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return st.MsgVoteWeighted.fromPartial({options:r.map(s=>s.toProto()),proposalId:f.fromNumber(t),voter:e,metadata:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVoteWeighted",value:st.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return kr.fromProto(st.MsgVoteWeighted.decode(t.value))}}class Zs extends m{constructor(t,e,r){super(),this.module_addr=t,this.module_name=e,this.creator_addr=r}static fromAmino(t){const{module_addr:e,module_name:r,creator_addr:o}=t;return new Zs(e,r,o)}toAmino(){const{module_addr:t,module_name:e,creator_addr:r}=this;return{module_addr:t,module_name:e,creator_addr:r}}static fromData(t){const{module_addr:e,module_name:r,creator_addr:o}=t;return new Zs(e,r,o)}toData(){const{module_addr:t,module_name:e,creator_addr:r}=this;return{module_addr:t,module_name:e,creator_addr:r}}static fromProto(t){return new Zs(t.moduleAddr,t.moduleName,t.creatorAddr)}toProto(){const{module_addr:t,module_name:e,creator_addr:r}=this;return oi.Vesting.fromPartial({moduleAddr:t,moduleName:e,creatorAddr:r})}}class ds extends m{constructor(e,r,o,s,n,a,c,d,h,g,y,b,k,M,T,F,L,z,V,Q){super();p(this,"min_deposit");p(this,"expedited_min_deposit");p(this,"emergency_min_deposit");this.max_deposit_period=r,this.voting_period=o,this.quorum=s,this.threshold=n,this.veto_threshold=a,this.min_initial_deposit_ratio=c,this.proposal_cancel_ratio=d,this.proposal_cancel_dest=h,this.expedited_voting_period=g,this.expedited_threshold=y,this.burn_vote_quorum=k,this.burn_proposal_deposit_prevote=M,this.burn_vote_veto=T,this.min_deposit_ratio=F,this.emergency_tally_interval=z,this.low_threshold_functions=V,this.vesting=Q,this.min_deposit=new u(e),this.expedited_min_deposit=new u(b),this.emergency_min_deposit=new u(L)}static fromAmino(e){const{min_deposit:r,max_deposit_period:o,voting_period:s,quorum:n,threshold:a,veto_threshold:c,min_initial_deposit_ratio:d,proposal_cancel_ratio:h,proposal_cancel_dest:g,expedited_voting_period:y,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:M,burn_proposal_deposit_prevote:T,burn_vote_veto:F,min_deposit_ratio:L,emergency_min_deposit:z,emergency_tally_interval:V,low_threshold_functions:Q,vesting:ua}=e;return new ds(u.fromAmino(r),D.fromAmino(o),D.fromAmino(s),n,a,c,d,h,g,D.fromAmino(y),b,u.fromAmino(k),M,T,F,L,u.fromAmino(z),D.fromAmino(V),Q,ua?Zs.fromAmino(ua):void 0)}toAmino(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g,expedited_threshold:y,expedited_min_deposit:b,burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L,emergency_tally_interval:z,low_threshold_functions:V,vesting:Q}=this;return{min_deposit:e.toAmino(),max_deposit_period:r.toAmino(),voting_period:o.toAmino(),quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g.toAmino(),expedited_threshold:y,expedited_min_deposit:b.toAmino(),burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L.toAmino(),emergency_tally_interval:z.toAmino(),low_threshold_functions:V,vesting:Q==null?void 0:Q.toAmino()}}static fromData(e){const{min_deposit:r,max_deposit_period:o,voting_period:s,quorum:n,threshold:a,veto_threshold:c,min_initial_deposit_ratio:d,proposal_cancel_ratio:h,proposal_cancel_dest:g,expedited_voting_period:y,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:M,burn_proposal_deposit_prevote:T,burn_vote_veto:F,min_deposit_ratio:L,emergency_min_deposit:z,emergency_tally_interval:V,low_threshold_functions:Q,vesting:ua}=e;return new ds(u.fromData(r),D.fromData(o),D.fromData(s),n,a,c,d,h,g,D.fromData(y),b,u.fromData(k),M,T,F,L,u.fromData(z),D.fromData(V),Q,ua?Zs.fromData(ua):void 0)}toData(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g,expedited_threshold:y,expedited_min_deposit:b,burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L,emergency_tally_interval:z,low_threshold_functions:V,vesting:Q}=this;return{min_deposit:e.toData(),max_deposit_period:r.toData(),voting_period:o.toData(),quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g.toData(),expedited_threshold:y,expedited_min_deposit:b.toData(),burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L.toData(),emergency_tally_interval:z.toData(),low_threshold_functions:V,vesting:Q==null?void 0:Q.toData()}}static fromProto(e){return new ds(u.fromProto(e.minDeposit),D.fromProto(e.maxDepositPeriod),D.fromProto(e.votingPeriod),e.quorum,e.threshold,e.vetoThreshold,e.minInitialDepositRatio,e.proposalCancelRatio,e.proposalCancelDest,D.fromProto(e.expeditedVotingPeriod),e.expeditedThreshold,u.fromProto(e.expeditedMinDeposit),e.burnVoteQuorum,e.burnProposalDepositPrevote,e.burnVoteVeto,e.minDepositRatio,u.fromProto(e.emergencyMinDeposit),D.fromProto(e.emergencyTallyInterval),e.lowThresholdFunctions,e.vesting?Zs.fromProto(e.vesting):void 0)}toProto(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g,expedited_threshold:y,expedited_min_deposit:b,burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L,emergency_tally_interval:z,low_threshold_functions:V,vesting:Q}=this;return oi.Params.fromPartial({minDeposit:e.toProto(),maxDepositPeriod:r.toProto(),votingPeriod:o.toProto(),quorum:s,threshold:n,vetoThreshold:a,minInitialDepositRatio:c,proposalCancelRatio:d,proposalCancelDest:h,expeditedVotingPeriod:g.toProto(),expeditedThreshold:y,expeditedMinDeposit:b.toProto(),burnVoteQuorum:k,burnProposalDepositPrevote:M,burnVoteVeto:T,minDepositRatio:F,emergencyMinDeposit:L.toProto(),emergencyTallyInterval:z.toProto(),lowThresholdFunctions:V,vesting:Q==null?void 0:Q.toProto()})}}class Mr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Mr(e,ds.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"gov/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Mr(e,ds.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.gov.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Mr(t.authority,ds.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return ja.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.gov.v1.MsgUpdateParams",value:ja.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Mr.fromProto(ja.MsgUpdateParams.decode(t.value))}}class Rn extends m{constructor(e,r,o){super();p(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new u(o)}static fromAmino(e){const{proposal_id:r,depositor:o,amount:s}=e;return new Rn(Number.parseInt(r),o,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{proposal_id:e.toString(),depositor:r,amount:o.toAmino()}}static fromData(e){const{proposal_id:r,depositor:o,amount:s}=e;return new Rn(Number.parseInt(r),o,u.fromData(s))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{proposal_id:e.toString(),depositor:r,amount:o.toData()}}static fromProto(e){return new Rn(e.proposalId.toNumber(),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Ct.Deposit.fromPartial({proposalId:f.fromNumber(e),depositor:r,amount:o.toProto()})}}class qn extends m{constructor(t,e){super(),this.group_id=t,this.member=e}static fromAmino(t){const{group_id:e,member:r}=t;return new qn(Number.parseInt(e),Es.fromAmino(r))}toAmino(){const{group_id:t,member:e}=this;return{group_id:t.toString(),member:e.toAmino()}}static fromData(t){const{group_id:e,member:r}=t;return new qn(Number.parseInt(e),Es.fromData(r))}toData(){const{group_id:t,member:e}=this;return{group_id:t.toString(),member:e.toData()}}static fromProto(t){return new qn(t.groupId.toNumber(),Es.fromProto(t.member))}toProto(){const{group_id:t,member:e}=this;return I.GroupMember.fromPartial({groupId:f.fromNumber(t),member:e.toProto()})}}class Es extends m{constructor(t,e,r,o){super(),this.address=t,this.weight=e,this.metadata=r,this.added_at=o}static fromAmino(t){const{address:e,weight:r,metadata:o,added_at:s}=t;return new Es(e,r,o,new Date(s))}toAmino(){const{address:t,weight:e,metadata:r,added_at:o}=this;return{address:t,weight:e,metadata:r,added_at:o.toISOString()}}static fromData(t){const{address:e,weight:r,metadata:o,added_at:s}=t;return new Es(e,r,o,new Date(s))}toData(){const{address:t,weight:e,metadata:r,added_at:o}=this;return{address:t,weight:e,metadata:r,added_at:o.toISOString()}}static fromProto(t){return new Es(t.address,t.weight,t.metadata,t.addedAt)}toProto(){const{address:t,weight:e,metadata:r,added_at:o}=this;return I.Member.fromPartial({address:t,weight:e,metadata:r,addedAt:o})}}class ut extends m{constructor(t,e,r){super(),this.address=t,this.weight=e,this.metadata=r}static fromAmino(t){const{address:e,weight:r,metadata:o}=t;return new ut(e,r,o)}toAmino(){const{address:t,weight:e,metadata:r}=this;return{address:t,weight:e,metadata:r}}static fromData(t){const{address:e,weight:r,metadata:o}=t;return new ut(e,r,o)}toData(){const{address:t,weight:e,metadata:r}=this;return{address:t,weight:e,metadata:r}}static fromProto(t){return new ut(t.address,t.weight,t.metadata)}toProto(){const{address:t,weight:e,metadata:r}=this;return I.MemberRequest.fromPartial({address:t,weight:e,metadata:r})}}class xr extends m{constructor(t,e,r){super(),this.admin=t,this.members=e,this.metadata=r}static fromAmino(t){const{value:{admin:e,members:r,metadata:o}}=t;return new xr(e,r.map(ut.fromAmino),o)}toAmino(){const{admin:t,members:e,metadata:r}=this;return{type:"cosmos-sdk/MsgCreateGroup",value:{admin:t,members:e.map(o=>o.toAmino()),metadata:r}}}static fromData(t){const{admin:e,members:r,metadata:o}=t;return new xr(e,r.map(ut.fromData),o)}toData(){const{admin:t,members:e,metadata:r}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroup",admin:t,members:e.map(o=>o.toData()),metadata:r}}static fromProto(t){return new xr(t.admin,t.members.map(ut.fromProto),t.metadata)}toProto(){const{admin:t,members:e,metadata:r}=this;return w.MsgCreateGroup.fromPartial({admin:t,members:e.map(o=>o.toProto()),metadata:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroup",value:w.MsgCreateGroup.encode(this.toProto()).finish()})}static unpackAny(t){return xr.fromProto(w.MsgCreateGroup.decode(t.value))}}class Ht 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:r}=t;return new Ht(D.fromAmino(e),D.fromAmino(r))}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:r}=t;return new Ht(D.fromData(e),D.fromData(r))}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 Ht(D.fromProto(t.votingPeriod),D.fromProto(t.minExecutionPeriod))}toProto(){const{voting_period:t,min_execution_period:e}=this;return I.DecisionPolicyWindows.fromPartial({votingPeriod:t.toProto(),minExecutionPeriod:e.toProto()})}}class Sr extends m{constructor(t,e){super(),this.threshold=t,this.windows=e}static fromAmino(t){const{value:{threshold:e,windows:r}}=t;return new Sr(e,Ht.fromAmino(r))}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:r}=t;return new Sr(e,Ht.fromData(r))}toData(){const{threshold:t,windows:e}=this;return{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy",threshold:t,windows:e.toData()}}static fromProto(t){return new Sr(t.threshold,Ht.fromProto(t.windows))}toProto(){const{threshold:t,windows:e}=this;return I.ThresholdDecisionPolicy.fromPartial({threshold:t,windows:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.ThresholdDecisionPolicy",value:I.ThresholdDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Sr.fromProto(I.ThresholdDecisionPolicy.decode(t.value))}}class Ir extends m{constructor(t,e){super(),this.percentage=t,this.windows=e}static fromAmino(t){const{value:{percentage:e,windows:r}}=t;return new Ir(e,Ht.fromAmino(r))}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:r}=t;return new Ir(e,Ht.fromData(r))}toData(){const{percentage:t,windows:e}=this;return{"@type":"/cosmos.group.v1.PercentageDecisionPolicy",percentage:t,windows:e.toData()}}static fromProto(t){return new Ir(t.percentage,Ht.fromProto(t.windows))}toProto(){const{percentage:t,windows:e}=this;return I.PercentageDecisionPolicy.fromPartial({percentage:t,windows:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.PercentageDecisionPolicy",value:I.PercentageDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Ir.fromProto(I.PercentageDecisionPolicy.decode(t.value))}}exports.DecisionPolicy=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/ThresholdDecisionPolicy":return Sr.fromAmino(o);case"cosmos-sdk/PercentageDecisionPolicy":return Ir.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.group.v1.ThresholdDecisionPolicy":return Sr.fromData(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return Ir.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmos.group.v1.ThresholdDecisionPolicy":return Sr.unpackAny(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return Ir.unpackAny(o)}throw new Error(`DecisionPolicy type ${s} not recognized`)}i.fromProto=r})(exports.DecisionPolicy||(exports.DecisionPolicy={}));class Nr extends m{constructor(t,e,r,o){super(),this.admin=t,this.group_id=e,this.metadata=r,this.decision_policy=o}static fromAmino(t){const{value:{admin:e,group_id:r,metadata:o,decision_policy:s}}=t;return new Nr(e,Number.parseInt(r),o,exports.DecisionPolicy.fromAmino(s))}toAmino(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return{type:"cosmos-sdk/MsgCreateGroupPolicy",value:{admin:t,group_id:e.toString(),metadata:r,decision_policy:o.toAmino()}}}static fromData(t){const{admin:e,group_id:r,metadata:o,decision_policy:s}=t;return new Nr(e,Number.parseInt(r),o,exports.DecisionPolicy.fromData(s))}toData(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroupPolicy",admin:t,group_id:e.toString(),metadata:r,decision_policy:o.toData()}}static fromProto(t){return new Nr(t.admin,t.groupId.toNumber(),t.metadata,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return w.MsgCreateGroupPolicy.fromPartial({admin:t,groupId:f.fromNumber(e),metadata:r,decisionPolicy:o.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicy",value:w.MsgCreateGroupPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Nr.fromProto(w.MsgCreateGroupPolicy.decode(t.value))}}class Cr extends m{constructor(t,e,r,o,s,n){super(),this.admin=t,this.members=e,this.group_metadata=r,this.group_policy_metadata=o,this.group_policy_as_admin=s,this.decision_policy=n}static fromAmino(t){const{value:{admin:e,members:r,group_metadata:o,group_policy_metadata:s,group_policy_as_admin:n,decision_policy:a}}=t;return new Cr(e,r.map(ut.fromAmino),o,s,n,exports.DecisionPolicy.fromAmino(a))}toAmino(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,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:r,group_policy_metadata:o,group_policy_as_admin:s,decision_policy:n.toAmino()}}}static fromData(t){const{admin:e,members:r,group_metadata:o,group_policy_metadata:s,group_policy_as_admin:n,decision_policy:a}=t;return new Cr(e,r.map(ut.fromData),o,s,n,exports.DecisionPolicy.fromData(a))}toData(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,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:r,group_policy_metadata:o,group_policy_as_admin:s,decision_policy:n.toData()}}static fromProto(t){return new Cr(t.admin,t.members.map(ut.fromProto),t.groupMetadata,t.groupPolicyMetadata,t.groupPolicyAsAdmin,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,group_policy_as_admin:s,decision_policy:n}=this;return w.MsgCreateGroupWithPolicy.fromPartial({admin:t,members:e.map(a=>a.toProto()),groupMetadata:r,groupPolicyMetadata:o,groupPolicyAsAdmin:s,decisionPolicy:n.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicy",value:w.MsgCreateGroupWithPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Cr.fromProto(w.MsgCreateGroupWithPolicy.decode(t.value))}}class Ur extends m{constructor(t,e){super(),this.proposal_id=t,this.executor=e}static fromAmino(t){const{value:{proposal_id:e,executor:r}}=t;return new Ur(Number.parseInt(e),r)}toAmino(){const{proposal_id:t,executor:e}=this;return{type:"cosmos-sdk/group/MsgExec",value:{proposal_id:t.toString(),executor:e}}}static fromData(t){const{proposal_id:e,executor:r}=t;return new Ur(Number.parseInt(e),r)}toData(){const{proposal_id:t,executor:e}=this;return{"@type":"/cosmos.group.v1.MsgExec",proposal_id:t.toString(),executor:e}}static fromProto(t){return new Ur(t.proposalId.toNumber(),t.executor)}toProto(){const{proposal_id:t,executor:e}=this;return w.MsgExec.fromPartial({proposalId:f.fromNumber(t),executor:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgExec",value:w.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return Ur.fromProto(w.MsgExec.decode(t.value))}}class Tt extends m{constructor(t,e,r,o,s){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o,this.exec=s}static fromAmino(t){const{value:{proposal_id:e,voter:r,option:o,metadata:s,exec:n}}=t;return new Tt(Number.parseInt(e),r,I.voteOptionFromJSON(o),s,w.execFromJSON(n))}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:s}=this;return{type:"cosmos-sdk/group/MsgVote",value:{proposal_id:t.toString(),voter:e,option:I.voteOptionToJSON(r),metadata:o,exec:w.execToJSON(s)}}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:s,exec:n}=t;return new Tt(Number.parseInt(e),r,I.voteOptionFromJSON(o),s,w.execFromJSON(n))}toData(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:s}=this;return{"@type":"/cosmos.group.v1.MsgVote",proposal_id:t.toString(),voter:e,option:I.voteOptionToJSON(r),metadata:o,exec:w.execToJSON(s)}}static fromProto(t){return new Tt(t.proposalId.toNumber(),t.voter,t.option,t.metadata,t.exec)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:s}=this;return w.MsgVote.fromPartial({proposalId:f.fromNumber(t),voter:e,option:r,metadata:o,exec:s})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgVote",value:w.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return Tt.fromProto(w.MsgVote.decode(t.value))}}(i=>{i.Option=I.VoteOption,i.Exec=w.Exec})(Tt||(Tt={}));class Er extends m{constructor(t,e){super(),this.address=t,this.group_id=e}static fromAmino(t){const{value:{address:e,group_id:r}}=t;return new Er(e,Number.parseInt(r))}toAmino(){const{address:t,group_id:e}=this;return{type:"cosmos-sdk/group/MsgLeaveGroup",value:{address:t,group_id:e.toString()}}}static fromData(t){const{address:e,group_id:r}=t;return new Er(e,Number.parseInt(r))}toData(){const{address:t,group_id:e}=this;return{"@type":"/cosmos.group.v1.MsgLeaveGroup",address:t,group_id:e.toString()}}static fromProto(t){return new Er(t.address,t.groupId.toNumber())}toProto(){const{address:t,group_id:e}=this;return w.MsgLeaveGroup.fromPartial({address:t,groupId:f.fromNumber(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgLeaveGroup",value:w.MsgLeaveGroup.encode(this.toProto()).finish()})}static unpackAny(t){return Er.fromProto(w.MsgLeaveGroup.decode(t.value))}}class Rt extends m{constructor(t,e,r,o,s,n,a){super(),this.group_policy_address=t,this.proposers=e,this.metadata=r,this.messages=o,this.exec=s,this.title=n,this.summary=a}static fromAmino(t){const{value:{group_policy_address:e,proposers:r,metadata:o,messages:s,exec:n,title:a,summary:c}}=t;return new Rt(e,r,o,s.map(exports.Msg.fromAmino),w.execFromJSON(n),a,c)}toAmino(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:s,title:n,summary:a}=this;return{type:"cosmos-sdk/group/MsgSubmitProposal",value:{group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toAmino()),exec:w.execToJSON(s),title:n,summary:a}}}static fromData(t){const{group_policy_address:e,proposers:r,metadata:o,messages:s,exec:n,title:a,summary:c}=t;return new Rt(e,r,o,s.map(exports.Msg.fromData),w.execFromJSON(n),a,c)}toData(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:s,title:n,summary:a}=this;return{"@type":"/cosmos.group.v1.MsgSubmitProposal",group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toData()),exec:w.execToJSON(s),title:n,summary:a}}static fromProto(t){return new Rt(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:r,messages:o,exec:s,title:n,summary:a}=this;return w.MsgSubmitProposal.fromPartial({groupPolicyAddress:t,proposers:e,metadata:r,messages:o.map(c=>c.packAny()),exec:s,title:n,summary:a})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgSubmitProposal",value:w.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Rt.fromProto(w.MsgSubmitProposal.decode(t.value))}}(i=>{i.Exec=w.Exec})(Rt||(Rt={}));class Br extends m{constructor(t,e,r){super(),this.admin=t,this.group_id=e,this.new_admin=r}static fromAmino(t){const{value:{admin:e,group_id:r,new_admin:o}}=t;return new Br(e,Number.parseInt(r),o)}toAmino(){const{admin:t,group_id:e,new_admin:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupAdmin",value:{admin:t,group_id:e.toString(),new_admin:r}}}static fromData(t){const{admin:e,group_id:r,new_admin:o}=t;return new Br(e,Number.parseInt(r),o)}toData(){const{admin:t,group_id:e,new_admin:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupAdmin",admin:t,group_id:e.toString(),new_admin:r}}static fromProto(t){return new Br(t.admin,t.groupId.toNumber(),t.newAdmin)}toProto(){const{admin:t,group_id:e,new_admin:r}=this;return w.MsgUpdateGroupAdmin.fromPartial({admin:t,groupId:f.fromNumber(e),newAdmin:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdmin",value:w.MsgUpdateGroupAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Br.fromProto(w.MsgUpdateGroupAdmin.decode(t.value))}}class Or extends m{constructor(t,e,r){super(),this.admin=t,this.group_policy_address=e,this.decision_policy=r}static fromAmino(t){const{value:{admin:e,group_policy_address:r,decision_policy:o}}=t;return new Or(e,r,exports.DecisionPolicy.fromAmino(o))}toAmino(){const{admin:t,group_policy_address:e,decision_policy:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupDecisionPolicy",value:{admin:t,group_policy_address:e,decision_policy:r.toAmino()}}}static fromData(t){const{admin:e,group_policy_address:r,decision_policy:o}=t;return new Or(e,r,exports.DecisionPolicy.fromData(o))}toData(){const{admin:t,group_policy_address:e,decision_policy:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",admin:t,group_policy_address:e,decision_policy:r.toData()}}static fromProto(t){return new Or(t.admin,t.groupPolicyAddress,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_policy_address:e,decision_policy:r}=this;return w.MsgUpdateGroupPolicyDecisionPolicy.fromPartial({admin:t,groupPolicyAddress:e,decisionPolicy:r.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",value:w.MsgUpdateGroupPolicyDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Or.fromProto(w.MsgUpdateGroupPolicyDecisionPolicy.decode(t.value))}}class Tr extends m{constructor(t,e,r){super(),this.admin=t,this.group_id=e,this.member_updates=r}static fromAmino(t){const{value:{admin:e,group_id:r,member_updates:o}}=t;return new Tr(e,Number.parseInt(r),o.map(ut.fromAmino))}toAmino(){const{admin:t,group_id:e,member_updates:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupMembers",value:{admin:t,group_id:e.toString(),member_updates:r.map(o=>o.toAmino())}}}static fromData(t){const{admin:e,group_id:r,member_updates:o}=t;return new Tr(e,Number.parseInt(r),o.map(ut.fromData))}toData(){const{admin:t,group_id:e,member_updates:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMembers",admin:t,group_id:e.toString(),member_updates:r.map(o=>o.toData())}}static fromProto(t){return new Tr(t.admin,t.groupId.toNumber(),t.memberUpdates.map(ut.fromProto))}toProto(){const{admin:t,group_id:e,member_updates:r}=this;return w.MsgUpdateGroupMembers.fromPartial({admin:t,groupId:f.fromNumber(e),memberUpdates:r.map(o=>o.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembers",value:w.MsgUpdateGroupMembers.encode(this.toProto()).finish()})}static unpackAny(t){return Tr.fromProto(w.MsgUpdateGroupMembers.decode(t.value))}}class Rr extends m{constructor(t,e,r){super(),this.admin=t,this.group_id=e,this.metadata=r}static fromAmino(t){const{value:{admin:e,group_id:r,metadata:o}}=t;return new Rr(e,Number.parseInt(r),o)}toAmino(){const{admin:t,group_id:e,metadata:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupMetadata",value:{admin:t,group_id:e.toString(),metadata:r}}}static fromData(t){const{admin:e,group_id:r,metadata:o}=t;return new Rr(e,Number.parseInt(r),o)}toData(){const{admin:t,group_id:e,metadata:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMetadata",admin:t,group_id:e.toString(),metadata:r}}static fromProto(t){return new Rr(t.admin,t.groupId.toNumber(),t.metadata)}toProto(){const{admin:t,group_id:e,metadata:r}=this;return w.MsgUpdateGroupMetadata.fromPartial({admin:t,groupId:f.fromNumber(e),metadata:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadata",value:w.MsgUpdateGroupMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Rr.fromProto(w.MsgUpdateGroupMetadata.decode(t.value))}}class qr extends m{constructor(t,e,r){super(),this.admin=t,this.group_policy_address=e,this.new_admin=r}static fromAmino(t){const{value:{admin:e,group_policy_address:r,new_admin:o}}=t;return new qr(e,r,o)}toAmino(){const{admin:t,group_policy_address:e,new_admin:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupPolicyAdmin",value:{admin:t,group_policy_address:e,new_admin:r}}}static fromData(t){const{admin:e,group_policy_address:r,new_admin:o}=t;return new qr(e,r,o)}toData(){const{admin:t,group_policy_address:e,new_admin:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",admin:t,group_policy_address:e,new_admin:r}}static fromProto(t){return new qr(t.admin,t.groupPolicyAddress,t.newAdmin)}toProto(){const{admin:t,group_policy_address:e,new_admin:r}=this;return w.MsgUpdateGroupPolicyAdmin.fromPartial({admin:t,groupPolicyAddress:e,newAdmin:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",value:w.MsgUpdateGroupPolicyAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return qr.fromProto(w.MsgUpdateGroupPolicyAdmin.decode(t.value))}}class Fr extends m{constructor(t,e,r){super(),this.admin=t,this.group_policy_address=e,this.metadata=r}static fromAmino(t){const{value:{admin:e,group_policy_address:r,metadata:o}}=t;return new Fr(e,r,o)}toAmino(){const{admin:t,group_policy_address:e,metadata:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupPolicyMetadata",value:{admin:t,group_policy_address:e,metadata:r}}}static fromData(t){const{admin:e,group_policy_address:r,metadata:o}=t;return new Fr(e,r,o)}toData(){const{admin:t,group_policy_address:e,metadata:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",admin:t,group_policy_address:e,metadata:r}}static fromProto(t){return new Fr(t.admin,t.groupPolicyAddress,t.metadata)}toProto(){const{admin:t,group_policy_address:e,metadata:r}=this;return w.MsgUpdateGroupPolicyMetadata.fromPartial({admin:t,groupPolicyAddress:e,metadata:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",value:w.MsgUpdateGroupPolicyMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Fr.fromProto(w.MsgUpdateGroupPolicyMetadata.decode(t.value))}}class $r extends m{constructor(t,e,r,o,s,n){super(),this.id=t,this.admin=e,this.metadata=r,this.version=o,this.total_weight=s,this.created_at=n}static fromAmino(t){const{id:e,admin:r,metadata:o,version:s,total_weight:n,created_at:a}=t;return new $r(Number.parseInt(e),r,o,Number.parseInt(s),n,new Date(a))}toAmino(){const{id:t,admin:e,metadata:r,version:o,total_weight:s,created_at:n}=this;return{id:t.toString(),admin:e,metadata:r,version:o.toString(),total_weight:s,created_at:n.toISOString()}}static fromData(t){const{id:e,admin:r,metadata:o,version:s,total_weight:n,created_at:a}=t;return new $r(Number.parseInt(e),r,o,Number.parseInt(s),n,new Date(a))}toData(){const{id:t,admin:e,metadata:r,version:o,total_weight:s,created_at:n}=this;return{id:t.toString(),admin:e,metadata:r,version:o.toString(),total_weight:s,created_at:n.toISOString()}}static fromProto(t){return new $r(t.id.toNumber(),t.admin,t.metadata,t.version.toNumber(),t.totalWeight,t.createdAt)}toProto(){const{id:t,admin:e,metadata:r,version:o,total_weight:s,created_at:n}=this;return I.GroupInfo.fromPartial({id:f.fromNumber(t),admin:e,metadata:r,version:f.fromNumber(o),totalWeight:s,createdAt:n})}}class Bs extends m{constructor(t,e,r,o,s,n,a){super(),this.address=t,this.group_id=e,this.admin=r,this.metadata=o,this.version=s,this.decision_policy=n,this.created_at=a}static fromAmino(t){const{address:e,group_id:r,admin:o,metadata:s,version:n,decision_policy:a,created_at:c}=t;return new Bs(e,Number.parseInt(r),o,s,Number.parseInt(n),exports.DecisionPolicy.fromAmino(a),new Date(c))}toAmino(){const{address:t,group_id:e,admin:r,metadata:o,version:s,decision_policy:n,created_at:a}=this;return{address:t,group_id:e.toString(),admin:r,metadata:o,version:s.toString(),decision_policy:n.toAmino(),created_at:a.toISOString()}}static fromData(t){const{address:e,group_id:r,admin:o,metadata:s,version:n,decision_policy:a,created_at:c}=t;return new Bs(e,Number.parseInt(r),o,s,Number.parseInt(n),exports.DecisionPolicy.fromData(a),new Date(c))}toData(){const{address:t,group_id:e,admin:r,metadata:o,version:s,decision_policy:n,created_at:a}=this;return{address:t,group_id:e.toString(),admin:r,metadata:o,version:s.toString(),decision_policy:n.toData(),created_at:a.toISOString()}}static fromProto(t){return new Bs(t.address,t.groupId.toNumber(),t.admin,t.metadata,t.version.toNumber(),exports.DecisionPolicy.fromProto(t.decisionPolicy),t.createdAt)}toProto(){const{address:t,group_id:e,admin:r,metadata:o,version:s,decision_policy:n,created_at:a}=this;return I.GroupPolicyInfo.fromPartial({address:t,groupId:f.fromNumber(e),admin:r,metadata:o,version:f.fromNumber(s),decisionPolicy:n.packAny(),createdAt:a})}}class ls extends m{constructor(t,e,r,o,s,n,a,c,d,h,g,y,b,k){super(),this.id=t,this.group_policy_address=e,this.metadata=r,this.proposers=o,this.submit_time=s,this.group_version=n,this.group_policy_version=a,this.status=c,this.final_tally_result=d,this.voting_period_end=h,this.executor_result=g,this.messages=y,this.title=b,this.summary=k}static fromAmino(t){const{id:e,group_policy_address:r,metadata:o,proposers:s,submit_time:n,group_version:a,group_policy_version:c,status:d,final_tally_result:h,voting_period_end:g,executor_result:y,messages:b,title:k,summary:M}=t;return new ls(Number.parseInt(e),r,o,s,new Date(n),Number.parseInt(a),Number.parseInt(c),I.proposalStatusFromJSON(d),{yes_count:_(h.yes_count??0).toFixed(0),no_count:_(h.no_count??0).toFixed(0),abstain_count:_(h.abstain_count??0).toFixed(0),no_with_veto_count:_(h.no_with_veto_count??0).toFixed(0)},new Date(g),I.proposalExecutorResultFromJSON(y),b.map(exports.Msg.fromAmino),k,M)}toAmino(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:s,group_version:n,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:h,executor_result:g,messages:y,title:b,summary:k}=this;return{id:t.toString(),group_policy_address:e,metadata:r,proposers:o,submit_time:s.toISOString(),group_version:n.toString(),group_policy_version:a.toString(),status:I.proposalStatusToJSON(c),final_tally_result:{yes_count:_(d.yes_count).toFixed(),no_count:_(d.no_count).toFixed(),abstain_count:_(d.abstain_count).toFixed(),no_with_veto_count:_(d.no_with_veto_count).toFixed()},voting_period_end:h.toISOString(),executor_result:I.proposalExecutorResultToJSON(g),messages:y.map(M=>M.toAmino()),title:b,summary:k}}static fromData(t){const{id:e,group_policy_address:r,metadata:o,proposers:s,submit_time:n,group_version:a,group_policy_version:c,status:d,final_tally_result:h,voting_period_end:g,executor_result:y,messages:b,title:k,summary:M}=t;return new ls(Number.parseInt(e),r,o,s,new Date(n),Number.parseInt(a),Number.parseInt(c),I.proposalStatusFromJSON(d),{yes_count:_(h.yes_count??0).toFixed(0),no_count:_(h.no_count??0).toFixed(0),abstain_count:_(h.abstain_count??0).toFixed(0),no_with_veto_count:_(h.no_with_veto_count??0).toFixed(0)},new Date(g),I.proposalExecutorResultFromJSON(y),b.map(exports.Msg.fromData),k,M)}toData(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:s,group_version:n,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:h,executor_result:g,messages:y,title:b,summary:k}=this;return{id:t.toString(),group_policy_address:e,metadata:r,proposers:o,submit_time:s.toISOString(),group_version:n.toString(),group_policy_version:a.toString(),status:I.proposalStatusToJSON(c),final_tally_result:{yes_count:_(d.yes_count).toFixed(),no_count:_(d.no_count).toFixed(),abstain_count:_(d.abstain_count).toFixed(),no_with_veto_count:_(d.no_with_veto_count).toFixed()},voting_period_end:h.toISOString(),executor_result:I.proposalExecutorResultToJSON(g),messages:y.map(M=>M.toData()),title:b,summary:k}}static fromProto(t){var e,r,o,s;return new ls(t.id.toNumber(),t.groupPolicyAddress,t.metadata,t.proposers,t.submitTime,t.groupVersion.toNumber(),t.groupPolicyVersion.toNumber(),t.status,{yes_count:_(((e=t.finalTallyResult)==null?void 0:e.yesCount)??0).toFixed(0),no_count:_(((r=t.finalTallyResult)==null?void 0:r.noCount)??0).toFixed(0),abstain_count:_(((o=t.finalTallyResult)==null?void 0:o.abstainCount)??0).toFixed(0),no_with_veto_count:_(((s=t.finalTallyResult)==null?void 0:s.noWithVetoCount)??0).toFixed(0)},t.votingPeriodEnd,t.executorResult,t.messages.map(exports.Msg.fromProto),t.title,t.summary)}toProto(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:s,group_version:n,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:h,executor_result:g,messages:y,title:b,summary:k}=this;let M;return d&&(M=I.TallyResult.fromPartial({yesCount:d.yes_count.toString(),noCount:d.no_count.toString(),abstainCount:d.abstain_count.toString(),noWithVetoCount:d.no_with_veto_count.toString()})),I.Proposal.fromPartial({id:f.fromNumber(t),groupPolicyAddress:e,metadata:r,proposers:o,submitTime:s,groupVersion:f.fromNumber(n),groupPolicyVersion:f.fromNumber(a),status:c,finalTallyResult:M,votingPeriodEnd:h,executorResult:g,messages:y.map(T=>T.packAny()),title:b,summary:k})}}(i=>{i.Status=I.ProposalStatus,i.ExecutorResult=I.ProposalExecutorResult})(ls||(ls={}));class re extends m{constructor(t,e,r,o,s){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o,this.submit_time=s}static fromAmino(t){const{proposal_id:e,voter:r,option:o,metadata:s,submit_time:n}=t;return new re(Number.parseInt(e),r,I.voteOptionFromJSON(o),s,new Date(n))}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:s}=this;return{proposal_id:t.toString(),voter:e,option:I.voteOptionToJSON(r),metadata:o,submit_time:s.toISOString()}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:s,submit_time:n}=t;return new re(Number.parseInt(e),r,I.voteOptionFromJSON(o),s,new Date(n))}toData(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:s}=this;return{proposal_id:t.toString(),voter:e,option:I.voteOptionToJSON(r),metadata:o,submit_time:s.toISOString()}}static fromProto(t){return new re(t.proposalId.toNumber(),t.voter,t.option,t.metadata,t.submitTime)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:s}=this;return I.Vote.fromPartial({proposalId:f.fromNumber(t),voter:e,option:r,metadata:o,submitTime:s})}}(i=>{i.Option=I.VoteOption})(re||(re={}));class oe extends m{constructor(e,r,o){super();p(this,"recv_fee");p(this,"ack_fee");p(this,"timeout_fee");this.recv_fee=new u(e),this.ack_fee=new u(r),this.timeout_fee=new u(o)}static fromAmino(e){const{recv_fee:r,ack_fee:o,timeout_fee:s}=e;return new oe(u.fromAmino(r),u.fromAmino(o),u.fromAmino(s))}toAmino(){const{recv_fee:e,ack_fee:r,timeout_fee:o}=this;return{recv_fee:e.toAmino(),ack_fee:r.toAmino(),timeout_fee:o.toAmino()}}static fromData(e){const{recv_fee:r,ack_fee:o,timeout_fee:s}=e;return new oe(u.fromData(r),u.fromData(o),u.fromData(s))}toData(){const{recv_fee:e,ack_fee:r,timeout_fee:o}=this;return{recv_fee:e.toData(),ack_fee:r.toData(),timeout_fee:o.toData()}}static fromProto(e){return new oe(u.fromProto(e.recvFee),u.fromProto(e.ackFee),u.fromProto(e.timeoutFee))}toProto(){const{recv_fee:e,ack_fee:r,timeout_fee:o}=this;return Mi.Fee.fromPartial({recvFee:e.toProto(),ackFee:r.toProto(),timeoutFee:o.toProto()})}}class Xs extends m{constructor(t,e,r,o,s){super(),this.fee=t,this.source_port_id=e,this.source_channel_id=r,this.signer=o,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:r,source_channel_id:o,signer:s,relayers:n}=t;return new Xs(e?oe.fromData(e):void 0,r,o,s,n)}toData(){const{fee:t,source_port_id:e,source_channel_id:r,signer:o,relayers:s}=this;return{"@type":"/ibc.applications.fee.v1.MsgPayPacketFee",fee:t==null?void 0:t.toData(),source_port_id:e,source_channel_id:r,signer:o,relayers:s}}static fromProto(t){return new Xs(t.fee?oe.fromProto(t.fee):void 0,t.sourcePortId,t.sourceChannelId,t.signer,t.relayers)}toProto(){const{fee:t,source_port_id:e,source_channel_id:r,signer:o,relayers:s}=this;return Dt.MsgPayPacketFee.fromPartial({fee:t==null?void 0:t.toProto(),sourcePortId:e,sourceChannelId:r,signer:o,relayers:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgPayPacketFee",value:Dt.MsgPayPacketFee.encode(this.toProto()).finish()})}static unpackAny(t){return Xs.fromProto(Dt.MsgPayPacketFee.decode(t.value))}}class se extends m{constructor(t,e,r){super(),this.port_id=t,this.channel_id=e,this.sequence=r}static fromAmino(t){const{port_id:e,channel_id:r,sequence:o}=t;return new se(e,r,Number.parseInt(o))}toAmino(){const{port_id:t,channel_id:e,sequence:r}=this;return{port_id:t,channel_id:e,sequence:r.toFixed()}}static fromData(t){const{port_id:e,channel_id:r,sequence:o}=t;return new se(e,r,Number.parseInt(o))}toData(){const{port_id:t,channel_id:e,sequence:r}=this;return{port_id:t,channel_id:e,sequence:r.toFixed()}}static fromProto(t){return new se(t.portId,t.channelId,t.sequence.toNumber())}toProto(){const{port_id:t,channel_id:e,sequence:r}=this;return ia.PacketId.fromPartial({portId:t,channelId:e,sequence:f.fromNumber(r)})}}class ne extends m{constructor(t,e,r=[]){super(),this.fee=t,this.refund_address=e,this.relayers=r}static fromAmino(t){const{fee:e,refund_address:r,relayers:o}=t;return new ne(e?oe.fromAmino(e):void 0,r,o)}toAmino(){const{fee:t,refund_address:e,relayers:r}=this;return{fee:t==null?void 0:t.toAmino(),refund_address:e,relayers:r}}static fromData(t){const{fee:e,refund_address:r,relayers:o}=t;return new ne(e?oe.fromData(e):void 0,r,o)}toData(){const{fee:t,refund_address:e,relayers:r}=this;return{fee:t==null?void 0:t.toData(),refund_address:e,relayers:r}}static fromProto(t){return new ne(t.fee?oe.fromProto(t.fee):void 0,t.refundAddress,t.relayers)}toProto(){const{fee:t,refund_address:e,relayers:r}=this;return Mi.PacketFee.fromPartial({fee:t==null?void 0:t.toProto(),refundAddress:e,relayers:r})}}class tn 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:r}=t;return new tn(e?se.fromData(e):void 0,r?ne.fromData(r):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 tn(t.packetId?se.fromProto(t.packetId):void 0,t.packetFee?ne.fromProto(t.packetFee):void 0)}toProto(){const{packet_id:t,packet_fee:e}=this;return Dt.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:Dt.MsgPayPacketFeeAsync.encode(this.toProto()).finish()})}static unpackAny(t){return tn.fromProto(Dt.MsgPayPacketFeeAsync.decode(t.value))}}class en extends m{constructor(t,e,r,o){super(),this.port_id=t,this.channel_id=e,this.relayer=r,this.payee=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:r,relayer:o,payee:s}=t;return new en(e,r,o,s)}toData(){const{port_id:t,channel_id:e,relayer:r,payee:o}=this;return{"@type":"/ibc.applications.fee.v1.MsgRegisterPayee",port_id:t,channel_id:e,relayer:r,payee:o}}static fromProto(t){return new en(t.portId,t.channelId,t.relayer,t.payee)}toProto(){const{port_id:t,channel_id:e,relayer:r,payee:o}=this;return Dt.MsgRegisterPayee.fromPartial({portId:t,channelId:e,relayer:r,payee:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterPayee",value:Dt.MsgRegisterPayee.encode(this.toProto()).finish()})}static unpackAny(t){return en.fromProto(Dt.MsgRegisterPayee.decode(t.value))}}class rn extends m{constructor(t,e,r,o){super(),this.port_id=t,this.channel_id=e,this.relayer=r,this.counterparty_payee=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:r,relayer:o,counterparty_payee:s}=t;return new rn(e,r,o,s)}toData(){const{port_id:t,channel_id:e,relayer:r,counterparty_payee:o}=this;return{"@type":"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",port_id:t,channel_id:e,relayer:r,counterparty_payee:o}}static fromProto(t){return new rn(t.portId,t.channelId,t.relayer,t.counterpartyPayee)}toProto(){const{port_id:t,channel_id:e,relayer:r,counterparty_payee:o}=this;return Dt.MsgRegisterCounterpartyPayee.fromPartial({portId:t,channelId:e,relayer:r,counterpartyPayee:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",value:Dt.MsgRegisterCounterpartyPayee.encode(this.toProto()).finish()})}static unpackAny(t){return rn.fromProto(Dt.MsgRegisterCounterpartyPayee.decode(t.value))}}class fa extends m{constructor(t,e){super(),this.fee_version=t,this.app_version=e}static fromAmino(t){const{fee_version:e,app_version:r}=t;return new fa(e,r)}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:r}=t;return new fa(e,r)}toData(){const{fee_version:t,app_version:e}=this;return{fee_version:t,app_version:e}}static fromProto(t){return new fa(t.feeVersion,t.appVersion)}toProto(){const{fee_version:t,app_version:e}=this;return Uc.Metadata.fromPartial({feeVersion:t,appVersion:e})}}class ga extends m{constructor(t,e=[]){super(),this.packet_id=t,this.packet_fees=e}static fromAmino(t){const{packet_id:e,packet_fees:r}=t;return new ga(e?se.fromAmino(e):void 0,r.map(o=>ne.fromAmino(o)))}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:r}=t;return new ga(e?se.fromData(e):void 0,r.map(o=>ne.fromData(o)))}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 ga(t.packetId?se.fromProto(t.packetId):void 0,t.packetFees.map(e=>ne.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 Lr extends m{constructor(t,e,r){super(),this.authority=t,this.address=e,this.allowed=r}static fromAmino(t){const{value:{authority:e,address:r,allowed:o}}=t;return new Lr(e,r,o)}toAmino(){const{authority:t,address:e,allowed:r}=this;return{type:"ibchooks/MsgUpdateACL",value:{authority:t,address:e,allowed:r}}}static fromData(t){const{authority:e,address:r,allowed:o}=t;return new Lr(e,r,o)}toData(){const{authority:t,address:e,allowed:r}=this;return{"@type":"/initia.ibchooks.v1.MsgUpdateACL",authority:t,address:e,allowed:r}}static fromProto(t){return new Lr(t.authority,t.address,t.allowed)}toProto(){const{authority:t,address:e,allowed:r}=this;return Nn.MsgUpdateACL.fromPartial({authority:t,address:e,allowed:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateACL",value:Nn.MsgUpdateACL.encode(this.toProto()).finish()})}static unpackAny(t){return Lr.fromProto(Nn.MsgUpdateACL.decode(t.value))}}class ps extends m{constructor(t){super(),this.default_allowed=t}static fromAmino(t){return new ps(t.value.default_allowed)}toAmino(){return{type:"ibc-hooks/Params",value:{default_allowed:this.default_allowed}}}static fromData(t){return new ps(t.default_allowed)}toData(){return{"@type":"/initia.ibchooks.v1.Params",default_allowed:this.default_allowed}}static fromProto(t){return new ps(t.defaultAllowed)}toProto(){return xi.Params.fromPartial({defaultAllowed:this.default_allowed})}}class zr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new zr(e,ps.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"ibchooks/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new zr(e,ps.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.ibchooks.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new zr(t.authority,ps.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Nn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateParams",value:Nn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return zr.fromProto(Nn.MsgUpdateParams.decode(t.value))}}class on extends m{constructor(t,e){super(),this.address=t,this.allowed=e}static fromAmino(t){const{address:e,allowed:r}=t;return new on(e,r)}toAmino(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromData(t){const{address:e,allowed:r}=t;return new on(e,r)}toData(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromProto(t){return new on(t.address,t.allowed)}toProto(){const{address:t,allowed:e}=this;return xi.ACL.fromPartial({address:t,allowed:e})}}class Gr extends m{constructor(e,r,o,s,n,a,c,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(!c&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");this.source_port=e,this.source_channel=r,this.class_id=o,this.token_ids=s,this.sender=n,this.receiver=a,this.timeout_height=c,this.timeout_timestamp=d,this.memo=h}static fromAmino(e){const{value:{source_port:r,source_channel:o,class_id:s,token_ids:n,sender:a,receiver:c,timeout_height:d,timeout_timestamp:h,memo:g}}=e;if(!d&&!h)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Gr(r,o,s,n,a,c,d?A.fromAmino(d):void 0,h,g)}toAmino(){const{source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:c,timeout_timestamp:d,memo:h}=this;return{type:"nft-transfer/MsgTransfer",value:{source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:(c==null?void 0:c.toAmino())??{},timeout_timestamp:d,memo:h}}}static fromData(e){const{source_port:r,source_channel:o,class_id:s,token_ids:n,sender:a,receiver:c,timeout_timestamp:d,timeout_height:h,memo:g}=e;if(!h&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Gr(r,o,s,n,a,c,h?A.fromData(h):void 0,d==="0"?void 0:d,g)}toData(){const{source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:c,timeout_timestamp:d,memo:h}=this;return{"@type":"/ibc.applications.nft_transfer.v1.MsgTransfer",source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:c?c.toData():new A(0,0).toData(),timeout_timestamp:d??"0",memo:h}}static fromProto(e){if(!e.timeoutHeight&&e.timeoutTimestamp.toNumber()==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new Gr(e.sourcePort,e.sourceChannel,e.classId,e.tokenIds,e.sender,e.receiver,e.timeoutHeight?A.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:c,timeout_timestamp:d,memo:h}=this;return Cn.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,classId:o,tokenIds:s,sender:n,receiver:a,timeoutHeight:c==null?void 0:c.toProto(),timeoutTimestamp:f.fromString(d??"0"),memo:h})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgTransfer",value:Cn.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Gr.fromProto(Cn.MsgTransfer.decode(e.value))}}class hs extends m{constructor(t,e){super(),this.send_enabled=t,this.receive_enabled=e}static fromAmino(t){const{value:{send_enabled:e,receive_enabled:r}}=t;return new hs(e,r)}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:r}=t;return new hs(e,r)}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 hs(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Si.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class Vr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Vr(e,hs.fromAmino(r))}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:r}=t;return new Vr(e,hs.fromData(r))}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 Vr(t.authority,hs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Cn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgUpdateParams",value:Cn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vr.fromProto(Cn.MsgUpdateParams.decode(t.value))}}class ya extends m{constructor(t,e,r,o,s,n,a,c,d){super(),this.class_id=t,this.class_uri=e,this.class_data=r,this.token_ids=o,this.token_uris=s,this.token_data=n,this.sender=a,this.receiver=c,this.memo=d}static fromAmino(t){const{class_id:e,class_uri:r,class_data:o,token_ids:s,token_uris:n,token_data:a,sender:c,receiver:d,memo:h}=t;return new ya(e,r,o,s,n,a,c,d,h)}toAmino(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}=this;return{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}}static fromData(t){const{class_id:e,class_uri:r,class_data:o,token_ids:s,token_uris:n,token_data:a,sender:c,receiver:d,memo:h}=t;return new ya(e,r,o,s,n,a,c,d,h)}toData(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}=this;return{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}}static fromProto(t){return new ya(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:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}=this;return Ec.NonFungibleTokenPacketData.fromPartial({classId:t,classUri:e,classData:r,tokenIds:o,tokenUris:s,tokenData:n,sender:a,receiver:c,memo:d})}}class sn extends m{constructor(t,e){super(),this.path=t,this.base_class_id=e}static fromAmino(t){const{path:e,base_class_id:r}=t;return new sn(e,r)}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:r}=t;return new sn(e,r)}toData(){const{path:t,base_class_id:e}=this;return{path:t,base_class_id:e}}static fromProto(t){return new sn(t.path,t.baseClassId)}toProto(){const{path:t,base_class_id:e}=this;return Si.ClassTrace.fromPartial({path:t,baseClassId:e})}}class Kr extends m{constructor(t,e,r,o){super(),this.authority=t,this.channel_id=e,this.port_id=r,this.relayers=o}static fromAmino(t){const{value:{authority:e,channel_id:r,port_id:o,relayers:s}}=t;return new Kr(e,r,o,s)}toAmino(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return{type:"perm/MsgSetPermissionedRelayers",value:{authority:t,channel_id:e,port_id:r,relayers:o}}}static fromData(t){const{authority:e,channel_id:r,port_id:o,relayers:s}=t;return new Kr(e,r,o,s)}toData(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return{"@type":"/ibc.applications.perm.v1.MsgSetPermissionedRelayers",authority:t,channel_id:e,port_id:r,relayers:o}}static fromProto(t){return new Kr(t.authority,t.channelId,t.portId,t.relayers)}toProto(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return rs.MsgSetPermissionedRelayers.fromPartial({authority:t,channelId:e,portId:r,relayers:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgSetPermissionedRelayers",value:rs.MsgSetPermissionedRelayers.encode(this.toProto()).finish()})}static unpackAny(t){return Kr.fromProto(rs.MsgSetPermissionedRelayers.decode(t.value))}}class Wr extends m{constructor(t,e,r){super(),this.authority=t,this.channel_id=e,this.port_id=r}static fromAmino(t){const{value:{authority:e,channel_id:r,port_id:o}}=t;return new Wr(e,r,o)}toAmino(){const{authority:t,channel_id:e,port_id:r}=this;return{type:"perm/MsgHaltChannel",value:{authority:t,channel_id:e,port_id:r}}}static fromData(t){const{authority:e,channel_id:r,port_id:o}=t;return new Wr(e,r,o)}toData(){const{authority:t,channel_id:e,port_id:r}=this;return{"@type":"/ibc.applications.perm.v1.MsgHaltChannel",authority:t,channel_id:e,port_id:r}}static fromProto(t){return new Wr(t.authority,t.channelId,t.portId)}toProto(){const{authority:t,channel_id:e,port_id:r}=this;return rs.MsgHaltChannel.fromPartial({authority:t,channelId:e,portId:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgHaltChannel",value:rs.MsgHaltChannel.encode(this.toProto()).finish()})}static unpackAny(t){return Wr.fromProto(rs.MsgHaltChannel.decode(t.value))}}class Hr extends m{constructor(t,e,r){super(),this.authority=t,this.channel_id=e,this.port_id=r}static fromAmino(t){const{value:{authority:e,channel_id:r,port_id:o}}=t;return new Hr(e,r,o)}toAmino(){const{authority:t,channel_id:e,port_id:r}=this;return{type:"perm/MsgResumeChannel",value:{authority:t,channel_id:e,port_id:r}}}static fromData(t){const{authority:e,channel_id:r,port_id:o}=t;return new Hr(e,r,o)}toData(){const{authority:t,channel_id:e,port_id:r}=this;return{"@type":"/ibc.applications.perm.v1.MsgResumeChannel",authority:t,channel_id:e,port_id:r}}static fromProto(t){return new Hr(t.authority,t.channelId,t.portId)}toProto(){const{authority:t,channel_id:e,port_id:r}=this;return rs.MsgResumeChannel.fromPartial({authority:t,channelId:e,portId:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgResumeChannel",value:rs.MsgResumeChannel.encode(this.toProto()).finish()})}static unpackAny(t){return Hr.fromProto(rs.MsgResumeChannel.decode(t.value))}}class Os extends m{constructor(t,e){super(),this.port_id=t,this.channel_id=e}static fromAmino(t){const{port_id:e,channel_id:r}=t;return new Os(e,r)}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:r}=t;return new Os(e,r)}toData(){const{port_id:t,channel_id:e}=this;return{port_id:t,channel_id:e}}static fromProto(t){return new Os(t.portId,t.channelId)}toProto(){const{port_id:t,channel_id:e}=this;return ia.Counterparty.fromPartial({portId:t,channelId:e})}}class Mt extends m{constructor(t,e,r,o,s){super(),this.state=t,this.ordering=e,this.counterparty=r,this.connection_hops=o,this.version=s}static fromAmino(t){const{state:e,ordering:r,counterparty:o,connection_hops:s,version:n}=t;return new Mt(e,r,o?Os.fromAmino(o):void 0,s,n)}toAmino(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:s}=this;return{state:t,ordering:e,counterparty:r==null?void 0:r.toAmino(),connection_hops:o,version:s}}static fromData(t){const{state:e,ordering:r,counterparty:o,connection_hops:s,version:n}=t;return new Mt(e,r,o?Os.fromData(o):void 0,s,n)}toData(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:s}=this;return{state:t,ordering:e,counterparty:r==null?void 0:r.toData(),connection_hops:o,version:s}}static fromProto(t){return new Mt(t.state,t.ordering,t.counterparty?Os.fromProto(t.counterparty):void 0,t.connectionHops,t.version)}toProto(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:s}=this;return ia.Channel.fromPartial({state:t,ordering:e,counterparty:r==null?void 0:r.toProto(),connectionHops:o,version:s})}}class nn extends m{constructor(t,e,r){super(),this.port_id=t,this.channel=e,this.signer=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:r,signer:o}=t;return new nn(e,r?Mt.fromData(r):void 0,o)}toData(){const{port_id:t,channel:e,signer:r}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenInit",port_id:t,channel:e==null?void 0:e.toData(),signer:r}}static fromProto(t){return new nn(t.portId,t.channel?Mt.fromProto(t.channel):void 0,t.signer)}toProto(){const{port_id:t,channel:e,signer:r}=this;return C.MsgChannelOpenInit.fromPartial({portId:t,channel:e==null?void 0:e.toProto(),signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",value:C.MsgChannelOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return nn.fromProto(C.MsgChannelOpenInit.decode(t.value))}}class Ts extends m{constructor(e,r){super();p(this,"height");p(this,"consensus_state");this.height=e,this.consensus_state=r}static fromAmino(e){const{height:r,consensus_state:o}=e;return new Ts(r?A.fromAmino(r):void 0,o)}toAmino(){const{height:e,consensus_state:r}=this;return{height:e==null?void 0:e.toAmino(),consensus_state:r}}static fromData(e){const{height:r,consensus_state:o}=e;return new Ts(r?A.fromData(r):void 0,o)}toData(){const{height:e,consensus_state:r}=this;return{height:e==null?void 0:e.toData(),consensus_state:r}}static fromProto(e){return new Ts(e.height?A.fromProto(e.height):void 0,e.consensusState)}toProto(){const{height:e,consensus_state:r}=this;return Aa.ConsensusStateWithHeight.fromPartial({height:e==null?void 0:e.toProto(),consensusState:r})}}class _a extends m{constructor(t,e){super(),this.client_id=t,this.consensus_states=e}static fromAmino(t){const{client_id:e,consensus_states:r}=t;return new _a(e,r.map(o=>Ts.fromAmino(o)))}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:r}=t;return new _a(e,r.map(o=>Ts.fromData(o)))}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 _a(t.clientId,t.consensusStates.map(e=>Ts.fromProto(e)))}toProto(){const{client_id:t,consensus_states:e}=this;return Aa.ClientConsensusStates.fromPartial({clientId:t,consensusStates:e.map(r=>r.toProto())})}}class Fn extends m{constructor(t,e){super(),this.client_id=t,this.client_state=e}static fromAmino(t){const{client_id:e,client_state:r}=t;return new Fn(e,r)}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:r}=t;return new Fn(e,r)}toData(){const{client_id:t,client_state:e}=this;return{client_id:t,client_state:e}}static fromProto(t){return new Fn(t.clientId,t.clientState)}toProto(){const{client_id:t,client_state:e}=this;return Aa.IdentifiedClientState.fromPartial({clientId:t,clientState:e})}}class Rs extends m{constructor(t){super(),this.allowed_clients=t}static fromAmino(t){const{allowed_clients:e}=t;return new Rs(e)}toAmino(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromData(t){const{allowed_clients:e}=t;return new Rs(e)}toData(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromProto(t){return new Rs(t.allowedClients)}toProto(){const{allowed_clients:t}=this;return Aa.Params.fromPartial({allowedClients:t})}}class qs extends m{constructor(t,e){super(),this.height=t,this.timestamp=e}static fromAmino(t){const{height:e,timestamp:r}=t;return new qs(A.fromAmino(e),Number.parseInt(r))}toAmino(){const{height:t,timestamp:e}=this;return{height:t.toAmino(),timestamp:e.toString()}}static fromData(t){const{height:e,timestamp:r}=t;return new qs(A.fromData(e),Number.parseInt(r))}toData(){const{height:t,timestamp:e}=this;return{height:t.toData(),timestamp:e.toString()}}static fromProto(t){return new qs(A.fromProto(t.height),t.timestamp.toNumber())}toProto(){const{height:t,timestamp:e}=this;return ia.Timeout.fromPartial({height:t.toProto(),timestamp:f.fromNumber(e)})}}class an extends m{constructor(t){super(),this.upgrade_timeout=t}static fromAmino(t){return new an(qs.fromAmino(t.upgrade_timeout))}toAmino(){return{upgrade_timeout:this.upgrade_timeout.toAmino()}}static fromData(t){return new an(qs.fromData(t.upgrade_timeout))}toData(){return{upgrade_timeout:this.upgrade_timeout.toData()}}static fromProto(t){return new an(qs.fromProto(t.upgradeTimeout))}toProto(){return ia.Params.fromPartial({upgradeTimeout:this.upgrade_timeout.toProto()})}}class ft extends m{constructor(t,e,r,o,s,n,a,c){super(),this.sequence=t,this.source_port=e,this.source_channel=r,this.destination_port=o,this.destination_channel=s,this.data=n,this.timeout_height=a,this.timeout_timestamp=c}static fromAmino(t){const{sequence:e,source_port:r,source_channel:o,destination_port:s,destination_channel:n,data:a,timeout_height:c,timeout_timestamp:d}=t;return new ft(e,r,o,s,n,a,c?A.fromAmino(c):void 0,d)}toAmino(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a==null?void 0:a.toAmino(),timeout_timestamp:c}}static fromData(t){const{sequence:e,source_port:r,source_channel:o,destination_port:s,destination_channel:n,data:a,timeout_height:c,timeout_timestamp:d}=t;return new ft(e,r,o,s,n,a,c?A.fromData(c):void 0,d)}toData(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a==null?void 0:a.toData(),timeout_timestamp:c}}static fromProto(t){return new ft(t.sequence.toNumber(),t.sourcePort,t.sourceChannel,t.destinationPort,t.destinationChannel,Buffer.from(t.data).toString("base64"),t.timeoutHeight?A.fromProto(t.timeoutHeight):void 0,t.timeoutTimestamp.toString())}toProto(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:c}=this;return ia.Packet.fromPartial({sequence:f.fromNumber(t),sourcePort:e,sourceChannel:r,destinationPort:o,destinationChannel:s,data:Buffer.from(n,"base64"),timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:f.fromString(c)})}}class Fs extends m{constructor(t){super(),this.key_prefix=t}static fromAmino(t){const{key_prefix:e}=t;return new Fs(e)}toAmino(){const{key_prefix:t}=this;return{key_prefix:t}}static fromData(t){const{key_prefix:e}=t;return new Fs(e)}toData(){const{key_prefix:t}=this;return{key_prefix:t}}static fromProto(t){return new Fs(Buffer.from(t.keyPrefix).toString("base64"))}toProto(){const{key_prefix:t}=this;return Ii.MerklePrefix.fromPartial({keyPrefix:Buffer.from(t,"base64")})}}class Ua 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 Ua(t.hash)}toData(){return{hash:this.hash}}static fromProto(t){return new Ua(Buffer.from(t.hash).toString("base64"))}toProto(){return Ii.MerkleRoot.fromPartial({hash:Buffer.from(this.hash,"base64")})}}class xt extends m{constructor(t,e,r){super(),this.client_id=t,this.connection_id=e,this.prefix=r}static fromAmino(t){const{client_id:e,connection_id:r,prefix:o}=t;return new xt(e,r,o?Fs.fromAmino(o):void 0)}toAmino(){const{client_id:t,connection_id:e,prefix:r}=this;return{client_id:t,connection_id:e,prefix:r}}static fromData(t){const{client_id:e,connection_id:r,prefix:o}=t;return new xt(e,r,o?Fs.fromData(o):void 0)}toData(){const{client_id:t,connection_id:e,prefix:r}=this;return{client_id:t,connection_id:e,prefix:r==null?void 0:r.toData()}}static fromProto(t){return new xt(t.clientId,t.connectionId,t.prefix?Fs.fromProto(t.prefix):void 0)}toProto(){const{client_id:t,connection_id:e,prefix:r}=this;return Ut.Counterparty.fromPartial({clientId:t,connectionId:e,prefix:r==null?void 0:r.toProto()})}}class dt extends m{constructor(t,e){super(),this.identifier=t,this.features=e}static fromAmino(t){const{identifier:e,features:r}=t;return new dt(e,r)}toAmino(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromData(t){const{identifier:e,features:r}=t;return new dt(e,r)}toData(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromProto(t){return new dt(t.identifier,t.features)}toProto(){const{identifier:t,features:e}=this;return Ut.Version.fromPartial({identifier:t,features:e})}}class cn extends m{constructor(t,e,r,o,s,n){super(),this.id=t,this.client_id=e,this.versions=r,this.state=o,this.counterparty=s,this.delay_period=n}static fromAmino(t){const{id:e,client_id:r,versions:o,state:s,counterparty:n,delay_period:a}=t;return new cn(e,r,o.map(dt.fromAmino),Ut.stateFromJSON(s),n?xt.fromAmino(n):void 0,Number.parseInt(a))}toAmino(){const{id:t,client_id:e,versions:r,state:o,counterparty:s,delay_period:n}=this;return{id:t,client_id:e,versions:r.map(c=>c.toAmino()),state:Ut.stateToJSON(o),counterparty:s==null?void 0:s.toAmino(),delay_period:n.toFixed()}}static fromData(t){const{id:e,client_id:r,versions:o,state:s,counterparty:n,delay_period:a}=t;return new cn(e,r,o.map(dt.fromData),Ut.stateFromJSON(s),n?xt.fromData(n):void 0,Number.parseInt(a))}toData(){const{id:t,client_id:e,versions:r,state:o,counterparty:s,delay_period:n}=this;return{id:t,client_id:e,versions:r.map(c=>c.toData()),state:Ut.stateToJSON(o),counterparty:s==null?void 0:s.toData(),delay_period:n.toFixed()}}static fromProto(t){return new cn(t.id,t.clientId,t.versions.map(dt.fromProto),t.state,t.counterparty?xt.fromProto(t.counterparty):void 0,t.delayPeriod.toNumber())}toProto(){const{id:t,client_id:e,versions:r,state:o,counterparty:s,delay_period:n}=this;return Ut.IdentifiedConnection.fromPartial({id:t,clientId:e,versions:r.map(a=>a.toProto()),state:o,counterparty:s==null?void 0:s.toProto(),delayPeriod:f.fromNumber(n)})}}class mn 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 mn(Number.parseInt(e))}toAmino(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toString()}}static fromData(t){const{max_expected_time_per_block:e}=t;return new mn(Number.parseInt(e))}toData(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toString()}}static fromProto(t){return new mn(t.maxExpectedTimePerBlock.toNumber())}toProto(){const{max_expected_time_per_block:t}=this;return Ut.Params.fromPartial({maxExpectedTimePerBlock:f.fromNumber(t)})}}class un extends m{constructor(t,e,r,o,s,n,a){super(),this.port_id=t,this.previous_channel_id=e,this.channel=r,this.counterparty_version=o,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:r,channel:o,counterparty_version:s,proof_init:n,proof_height:a,signer:c}=t;return new un(e,r,o?Mt.fromData(o):void 0,s,n,a?A.fromData(a):void 0,c)}toData(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:s,proof_height:n,signer:a}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenTry",port_id:t,previous_channel_id:e,channel:r==null?void 0:r.toData(),counterparty_version:o,proof_init:s,proof_height:n==null?void 0:n.toData(),signer:a}}static fromProto(t){return new un(t.portId,t.previousChannelId,t.channel?Mt.fromProto(t.channel):void 0,t.counterpartyVersion,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:s,proof_height:n,signer:a}=this;return C.MsgChannelOpenTry.fromPartial({portId:t,previousChannelId:e,channel:r==null?void 0:r.toProto(),counterpartyVersion:o,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:C.MsgChannelOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return un.fromProto(C.MsgChannelOpenTry.decode(t.value))}}class dn extends m{constructor(t,e,r,o,s){super(),this.port_id=t,this.channel_id=e,this.proof_ack=r,this.proof_height=o,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:r,proof_ack:o,proof_height:s,signer:n}=t;return new dn(e,r,o,s?A.fromData(s):void 0,n)}toData(){const{port_id:t,channel_id:e,proof_ack:r,proof_height:o,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenConfirm",port_id:t,channel_id:e,proof_ack:r,proof_height:o==null?void 0:o.toData(),signer:s}}static fromProto(t){return new dn(t.portId,t.channelId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_ack:r,proof_height:o,signer:s}=this;return C.MsgChannelOpenConfirm.fromPartial({portId:t,channelId:e,proofAck:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",value:C.MsgChannelOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return dn.fromProto(C.MsgChannelOpenConfirm.decode(t.value))}}class ln extends m{constructor(t,e,r,o,s,n,a){super(),this.port_id=t,this.channel_id=e,this.counterparty_channel_id=r,this.counterparty_version=o,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:r,counterparty_channel_id:o,counterparty_version:s,proof_try:n,proof_height:a,signer:c}=t;return new ln(e,r,o,s,n,a?A.fromData(a):void 0,c)}toData(){const{port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,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:r,counterparty_version:o,proof_try:s,proof_height:n==null?void 0:n.toData(),signer:a}}static fromProto(t){return new ln(t.portId,t.channelId,t.counterpartyChannelId,t.counterpartyVersion,Buffer.from(t.proofTry).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,proof_try:s,proof_height:n,signer:a}=this;return C.MsgChannelOpenAck.fromPartial({portId:t,channelId:e,counterpartyChannelId:r,counterpartyVersion:o,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:C.MsgChannelOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return ln.fromProto(C.MsgChannelOpenAck.decode(t.value))}}class pn extends m{constructor(t,e,r){super(),this.port_id=t,this.channel_id=e,this.signer=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:r,signer:o}=t;return new pn(e,r,o)}toData(){const{port_id:t,channel_id:e,signer:r}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseInit",port_id:t,channel_id:e,signer:r}}static fromProto(t){return new pn(t.portId,t.channelId,t.signer)}toProto(){const{port_id:t,channel_id:e,signer:r}=this;return C.MsgChannelCloseInit.fromPartial({portId:t,channelId:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",value:C.MsgChannelCloseInit.encode(this.toProto()).finish()})}static unpackAny(t){return pn.fromProto(C.MsgChannelCloseInit.decode(t.value))}}class hn extends m{constructor(t,e,r,o,s){super(),this.port_id=t,this.channel_id=e,this.proof_init=r,this.proof_height=o,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:r,proof_init:o,proof_height:s,signer:n}=t;return new hn(e,r,o,s?A.fromData(s):void 0,n)}toData(){const{port_id:t,channel_id:e,proof_init:r,proof_height:o,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseConfirm",port_id:t,channel_id:e,proof_init:r,proof_height:o==null?void 0:o.toData(),signer:s}}static fromProto(t){return new hn(t.portId,t.channelId,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_init:r,proof_height:o,signer:s}=this;return C.MsgChannelCloseConfirm.fromPartial({portId:t,channelId:e,proofInit:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",value:C.MsgChannelCloseConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return hn.fromProto(C.MsgChannelCloseConfirm.decode(t.value))}}class fn extends m{constructor(t,e,r,o){super(),this.packet=t,this.proof_commitment=e,this.proof_height=r,this.signer=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{packet:e,proof_commitment:r,proof_height:o,signer:s}=t;return new fn(e?ft.fromData(e):void 0,r,o?A.fromData(o):void 0,s)}toData(){const{packet:t,proof_commitment:e,proof_height:r,signer:o}=this;return{"@type":"/ibc.core.channel.v1.MsgRecvPacket",packet:t==null?void 0:t.toData(),proof_commitment:e,proof_height:r==null?void 0:r.toData(),signer:o}}static fromProto(t){return new fn(t.packet?ft.fromProto(t.packet):void 0,Buffer.from(t.proofCommitment).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,proof_commitment:e,proof_height:r,signer:o}=this;return C.MsgRecvPacket.fromPartial({packet:t==null?void 0:t.toProto(),proofCommitment:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",value:C.MsgRecvPacket.encode(this.toProto()).finish()})}static unpackAny(t){return fn.fromProto(C.MsgRecvPacket.decode(t.value))}}class gn extends m{constructor(t,e,r,o,s){super(),this.packet=t,this.acknowledgement=e,this.proof_acked=r,this.proof_height=o,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:r,proof_acked:o,proof_height:s,signer:n}=t;return new gn(e?ft.fromData(e):void 0,o,r,s?A.fromData(s):void 0,n)}toData(){const{packet:t,acknowledgement:e,proof_acked:r,proof_height:o,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgAcknowledgement",packet:t==null?void 0:t.toData(),acknowledgement:e,proof_acked:r,proof_height:o==null?void 0:o.toData(),signer:s}}static fromProto(t){return new gn(t.packet?ft.fromProto(t.packet):void 0,Buffer.from(t.acknowledgement).toString("base64"),Buffer.from(t.proofAcked).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,acknowledgement:e,proof_acked:r,proof_height:o,signer:s}=this;return C.MsgAcknowledgement.fromPartial({packet:t==null?void 0:t.toProto(),acknowledgement:Buffer.from(e,"base64"),proofAcked:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",value:C.MsgAcknowledgement.encode(this.toProto()).finish()})}static unpackAny(t){return gn.fromProto(C.MsgAcknowledgement.decode(t.value))}}class yn extends m{constructor(t,e,r,o,s){super(),this.packet=t,this.proof_unreceived=e,this.proof_height=r,this.next_sequence_recv=o,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:r,proof_height:o,next_sequence_recv:s,signer:n}=t;return new yn(e?ft.fromData(e):void 0,r,o?A.fromData(o):void 0,Number.parseInt(s),n)}toData(){const{packet:t,proof_unreceived:e,proof_height:r,next_sequence_recv:o,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgTimeout",packet:t==null?void 0:t.toData(),proof_unreceived:e,proof_height:r==null?void 0:r.toData(),next_sequence_recv:o.toFixed(),signer:s}}static fromProto(t){return new yn(t.packet?ft.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.nextSequenceRecv.toNumber(),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_height:r,next_sequence_recv:o,signer:s}=this;return C.MsgTimeout.fromPartial({packet:t==null?void 0:t.toProto(),proofUnreceived:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),nextSequenceRecv:f.fromNumber(o),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeout",value:C.MsgTimeout.encode(this.toProto()).finish()})}static unpackAny(t){return yn.fromProto(C.MsgTimeout.decode(t.value))}}class _n extends m{constructor(t,e,r,o,s,n){super(),this.packet=t,this.proof_unreceived=e,this.proof_close=r,this.proof_height=o,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:r,proof_close:o,proof_height:s,next_sequence_recv:n,signer:a}=t;return new _n(e?ft.fromData(e):void 0,o,r,s?A.fromData(s):void 0,Number.parseInt(n),a)}toData(){const{packet:t,proof_unreceived:e,proof_close:r,proof_height:o,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:r,proof_height:o==null?void 0:o.toData(),next_sequence_recv:s.toFixed(),signer:n}}static fromProto(t){return new _n(t.packet?ft.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),Buffer.from(t.proofClose).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.nextSequenceRecv.toNumber(),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_close:r,proof_height:o,next_sequence_recv:s,signer:n}=this;return C.MsgTimeoutOnClose.fromPartial({packet:t==null?void 0:t.toProto(),proofUnreceived:Buffer.from(e,"base64"),proofClose:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),nextSequenceRecv:f.fromNumber(s),signer:n})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",value:C.MsgTimeoutOnClose.encode(this.toProto()).finish()})}static unpackAny(t){return _n.fromProto(C.MsgTimeoutOnClose.decode(t.value))}}class vn 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:r}=t;return new vn(e,an.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/ibc.core.channel.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new vn(t.authority,an.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return C.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgUpdateParams",value:C.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return vn.fromProto(C.MsgUpdateParams.decode(t.value))}}class $n extends m{constructor(e,r,o){super();p(this,"client_state");p(this,"consensus_state");p(this,"signer");this.client_state=e,this.consensus_state=r,this.signer=o}static fromAmino(e){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(e){const{client_state:r,consensus_state:o,signer:s}=e;return new $n(r,o,s)}toData(){const{client_state:e,consensus_state:r,signer:o}=this;return{"@type":"/ibc.core.client.v1.MsgCreateClient",client_state:e,consensus_state:r,signer:o}}static fromProto(e){return new $n(e.clientState,e.consensusState,e.signer)}toProto(){const{client_state:e,consensus_state:r,signer:o}=this;return H.MsgCreateClient.fromPartial({clientState:e,consensusState:r,signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgCreateClient",value:H.MsgCreateClient.encode(this.toProto()).finish()})}static unpackAny(e){return $n.fromProto(H.MsgCreateClient.decode(e.value))}}class Ln extends m{constructor(t,e,r){super(),this.client_id=t,this.client_message=e,this.signer=r}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:r,signer:o}=t;return new Ln(e,r,o)}toData(){const{client_id:t,client_message:e,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgUpdateClient",client_id:t,client_message:e,signer:r}}static fromProto(t){return new Ln(t.clientId,t.clientMessage,t.signer)}toProto(){const{client_id:t,client_message:e,signer:r}=this;return H.MsgUpdateClient.fromPartial({clientId:t,clientMessage:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateClient",value:H.MsgUpdateClient.encode(this.toProto()).finish()})}static unpackAny(t){return Ln.fromProto(H.MsgUpdateClient.decode(t.value))}}class zn extends m{constructor(t,e,r,o,s,n){super(),this.client_id=t,this.client_state=e,this.consensus_state=r,this.proof_upgrade_client=o,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:r,consensus_state:o,proof_upgrade_client:s,proof_upgrade_consensus_state:n,signer:a}=t;return new zn(e,r,o,s,n,a)}toData(){const{client_id:t,client_state:e,consensus_state:r,proof_upgrade_client:o,proof_upgrade_consensus_state:s,signer:n}=this;return{"@type":"/ibc.core.client.v1.MsgUpgradeClient",client_id:t,client_state:e,consensus_state:r,proof_upgrade_client:o,proof_upgrade_consensus_state:s,signer:n}}static fromProto(t){return new zn(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:r,proof_upgrade_client:o,proof_upgrade_consensus_state:s,signer:n}=this;return H.MsgUpgradeClient.fromPartial({clientId:t,clientState:e,consensusState:r,proofUpgradeClient:Buffer.from(o,"base64"),proofUpgradeConsensusState:Buffer.from(s,"base64"),signer:n})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",value:H.MsgUpgradeClient.encode(this.toProto()).finish()})}static unpackAny(t){return zn.fromProto(H.MsgUpgradeClient.decode(t.value))}}class Gn extends m{constructor(t,e,r){super(),this.client_id=t,this.misbehaviour=e,this.signer=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{client_id:e,misbehaviour:r,signer:o}=t;return new Gn(e,r,o)}toData(){const{client_id:t,misbehaviour:e,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgSubmitMisbehaviour",client_id:t,misbehaviour:e,signer:r}}static fromProto(t){return new Gn(t.clientId,t.misbehaviour,t.signer)}toProto(){const{client_id:t,misbehaviour:e,signer:r}=this;return H.MsgSubmitMisbehaviour.fromPartial({clientId:t,misbehaviour:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",value:H.MsgSubmitMisbehaviour.encode(this.toProto()).finish()})}static unpackAny(t){return Gn.fromProto(H.MsgSubmitMisbehaviour.decode(t.value))}}class Vn extends m{constructor(t,e,r){super(),this.subject_client_id=t,this.substitute_client_id=e,this.signer=r}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:r,signer:o}=t;return new Vn(e,r,o)}toData(){const{subject_client_id:t,substitute_client_id:e,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgRecoverClient",subject_client_id:t,substitute_client_id:e,signer:r}}static fromProto(t){return new Vn(t.subjectClientId,t.substituteClientId,t.signer)}toProto(){const{subject_client_id:t,substitute_client_id:e,signer:r}=this;return H.MsgRecoverClient.fromPartial({subjectClientId:t,substituteClientId:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgRecoverClient",value:H.MsgRecoverClient.encode(this.toProto()).finish()})}static unpackAny(t){return Vn.fromProto(H.MsgRecoverClient.decode(t.value))}}class Jt extends m{constructor(t,e,r){super(),this.name=t,this.height=e,this.info=r}static fromAmino(t){const{name:e,height:r,info:o}=t;return new Jt(e,Number.parseInt(r),o)}toAmino(){const{name:t,height:e,info:r}=this;return{name:t,height:e.toString(),info:r}}static fromData(t){const{name:e,height:r,info:o}=t;return new Jt(e,Number.parseInt(r),o)}toData(){const{name:t,height:e,info:r}=this;return{name:t,height:e.toString(),info:r}}static fromProto(t){return new Jt(t.name,t.height.toNumber(),t.info)}toProto(){const{name:t,height:e,info:r}=this;return Bc.Plan.fromPartial({name:t,height:f.fromNumber(e),info:r})}}class Jr extends m{constructor(t,e){super(),this.authority=t,this.plan=e}static fromAmino(t){const{value:{authority:e,plan:r}}=t;return new Jr(e,Jt.fromAmino(r))}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:r}=t;return new Jr(e,Jt.fromData(r))}toData(){const{authority:t,plan:e}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",authority:t,plan:e.toData()}}static fromProto(t){return new Jr(t.authority,Jt.fromProto(t.plan))}toProto(){const{authority:t,plan:e}=this;return Un.MsgSoftwareUpgrade.fromPartial({authority:t,plan:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",value:Un.MsgSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Jr.fromProto(Un.MsgSoftwareUpgrade.decode(t.value))}}class jr extends m{constructor(t){super(),this.authority=t}static fromAmino(t){const{value:{authority:e}}=t;return new jr(e)}toAmino(){const{authority:t}=this;return{type:"cosmos-sdk/MsgCancelUpgrade",value:{authority:t}}}static fromData(t){const{authority:e}=t;return new jr(e)}toData(){const{authority:t}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",authority:t}}static fromProto(t){return new jr(t.authority)}toProto(){const{authority:t}=this;return Un.MsgCancelUpgrade.fromPartial({authority:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",value:Un.MsgCancelUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return jr.fromProto(Un.MsgCancelUpgrade.decode(t.value))}}class Kn extends m{constructor(t,e,r){super(),this.plan=t,this.upgraded_client_state=e,this.signer=r}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:r,signer:o}=t;return new Kn(Jt.fromData(e),r,o)}toData(){const{plan:t,upgraded_client_state:e,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgIBCSoftwareUpgrade",plan:t.toData(),upgraded_client_state:e,signer:r}}static fromProto(t){return new Kn(Jt.fromProto(t.plan),t.upgradedClientState,t.signer)}toProto(){const{plan:t,upgraded_client_state:e,signer:r}=this;return H.MsgIBCSoftwareUpgrade.fromPartial({plan:t.toProto(),upgradedClientState:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgIBCSoftwareUpgrade",value:H.MsgIBCSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Kn.fromProto(H.MsgIBCSoftwareUpgrade.decode(t.value))}}class Wn 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:r}=t;return new Wn(e,Rs.fromData(r))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.core.client.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new Wn(t.signer,Rs.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return H.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateParams",value:H.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Wn.fromProto(H.MsgUpdateParams.decode(t.value))}}class Hn extends m{constructor(t,e,r,o,s){super(),this.client_id=t,this.counterparty=e,this.version=r,this.delay_period=o,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:r,version:o,delay_period:s,signer:n}=t;return new Hn(e,xt.fromData(r),o?dt.fromData(o):void 0,Number.parseInt(s),n)}toData(){const{client_id:t,counterparty:e,version:r,delay_period:o,signer:s}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenInit",client_id:t,counterparty:e.toData(),version:r==null?void 0:r.toData(),delay_period:o.toFixed(),signer:s}}static fromProto(t){return new Hn(t.clientId,xt.fromProto(t.counterparty),t.version?dt.fromProto(t.version):void 0,t.delayPeriod.toNumber(),t.signer)}toProto(){const{client_id:t,counterparty:e,version:r,delay_period:o,signer:s}=this;return nt.MsgConnectionOpenInit.fromPartial({clientId:t,counterparty:e.toProto(),version:r==null?void 0:r.toProto(),delayPeriod:f.fromNumber(o),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",value:nt.MsgConnectionOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return Hn.fromProto(nt.MsgConnectionOpenInit.decode(t.value))}}class Jn extends m{constructor(t,e,r,o,s,n,a,c,d,h,g){super(),this.client_id=t,this.client_state=e,this.counterparty=r,this.delay_period=o,this.counterparty_versions=s,this.proof_height=n,this.proof_init=a,this.proof_client=c,this.proof_consensus=d,this.consensus_height=h,this.signer=g}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:r,counterparty:o,delay_period:s,counterparty_versions:n,proof_height:a,proof_init:c,proof_client:d,proof_consensus:h,consensus_height:g,signer:y}=t;return new Jn(e,r,o?xt.fromData(o):void 0,Number.parseInt(s),n.map(b=>dt.fromData(b)),a?A.fromData(a):void 0,Buffer.from(c).toString("base64"),Buffer.from(d).toString("base64"),Buffer.from(h).toString("base64"),g?A.fromData(g):void 0,y)}toData(){const{client_id:t,client_state:e,counterparty:r,delay_period:o,counterparty_versions:s,proof_height:n,proof_init:a,proof_client:c,proof_consensus:d,consensus_height:h,signer:g}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenTry",client_id:t,client_state:e,counterparty:r==null?void 0:r.toData(),delay_period:o.toFixed(),counterparty_versions:s.map(y=>y.toData()),proof_height:n==null?void 0:n.toData(),proof_init:a,proof_client:c,proof_consensus:d,consensus_height:h==null?void 0:h.toData(),signer:g}}static fromProto(t){return new Jn(t.clientId,t.clientState,t.counterparty?xt.fromProto(t.counterparty):void 0,t.delayPeriod.toNumber(),t.counterpartyVersions.map(e=>dt.fromProto(e)),t.proofHeight?A.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?A.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{client_id:t,client_state:e,counterparty:r,delay_period:o,counterparty_versions:s,proof_height:n,proof_init:a,proof_client:c,proof_consensus:d,consensus_height:h,signer:g}=this;return nt.MsgConnectionOpenTry.fromPartial({clientId:t,clientState:e,counterparty:r==null?void 0:r.toProto(),delayPeriod:f.fromNumber(o),counterpartyVersions:s.map(y=>y.toProto()),proofHeight:n==null?void 0:n.toProto(),proofInit:Buffer.from(a,"base64"),proofClient:Buffer.from(c,"base64"),proofConsensus:Buffer.from(d,"base64"),consensusHeight:h==null?void 0:h.toProto(),signer:g})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",value:nt.MsgConnectionOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return Jn.fromProto(nt.MsgConnectionOpenTry.decode(t.value))}}class jn extends m{constructor(t,e,r,o){super(),this.connection_id=t,this.proof_ack=e,this.proof_height=r,this.signer=o}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:r,proof_height:o,signer:s}=t;return new jn(e,r,o?A.fromData(o):void 0,s)}toData(){const{connection_id:t,proof_ack:e,proof_height:r,signer:o}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenConfirm",connection_id:t,proof_ack:e,proof_height:r==null?void 0:r.toData(),signer:o}}static fromProto(t){return new jn(t.connectionId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{connection_id:t,proof_ack:e,proof_height:r,signer:o}=this;return nt.MsgConnectionOpenConfirm.fromPartial({connectionId:t,proofAck:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",value:nt.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return jn.fromProto(nt.MsgConnectionOpenConfirm.decode(t.value))}}class Qn extends m{constructor(t,e,r,o,s,n,a,c,d,h){super(),this.connection_id=t,this.counterparty_connection_id=e,this.version=r,this.client_state=o,this.proof_height=s,this.proof_try=n,this.proof_client=a,this.proof_consensus=c,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:r,version:o,client_state:s,proof_height:n,proof_try:a,proof_client:c,proof_consensus:d,consensus_height:h,signer:g}=t;return new Qn(e,r,o?dt.fromData(o):void 0,s,n?A.fromData(n):void 0,a,c,d,h?A.fromData(h):void 0,g)}toData(){const{connection_id:t,counterparty_connection_id:e,version:r,client_state:o,proof_height:s,proof_try:n,proof_client:a,proof_consensus:c,consensus_height:d,signer:h}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenAck",connection_id:t,counterparty_connection_id:e,version:r==null?void 0:r.toData(),client_state:o,proof_height:s==null?void 0:s.toData(),proof_try:n,proof_client:a,proof_consensus:c,consensus_height:d==null?void 0:d.toData(),signer:h}}static fromProto(t){return new Qn(t.connectionId,t.counterpartyConnectionId,t.version?dt.fromProto(t.version):void 0,t.clientState,t.proofHeight?A.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?A.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{connection_id:t,counterparty_connection_id:e,version:r,client_state:o,proof_height:s,proof_try:n,proof_client:a,proof_consensus:c,consensus_height:d,signer:h}=this;return nt.MsgConnectionOpenAck.fromPartial({connectionId:t,counterpartyConnectionId:e,version:r==null?void 0:r.toProto(),clientState:o,proofHeight:s==null?void 0:s.toProto(),proofTry:Buffer.from(n,"base64"),proofClient:Buffer.from(a,"base64"),proofConsensus:Buffer.from(c,"base64"),consensusHeight:d==null?void 0:d.toProto(),signer:h})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",value:nt.MsgConnectionOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return Qn.fromProto(nt.MsgConnectionOpenAck.decode(t.value))}}class Yn 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:r}=t;return new Yn(e,mn.fromData(r))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.core.connection.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new Yn(t.signer,mn.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return nt.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgUpdateParams",value:nt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Yn.fromProto(nt.MsgUpdateParams.decode(t.value))}}class Qr extends m{constructor(t,e,r){super(),this.owner=t,this.connection_id=e,this.version=r}static fromAmino(t){const{value:{owner:e,connection_id:r,version:o}}=t;return new Qr(e,r,o)}toAmino(){const{owner:t,connection_id:e,version:r}=this;return{type:"intertx/MsgRegisterAccount",value:{owner:t,connection_id:e,version:r}}}static fromData(t){const{owner:e,connection_id:r,version:o}=t;return new Qr(e,r,o)}toData(){const{owner:t,connection_id:e,version:r}=this;return{"@type":"/initia.intertx.v1.MsgRegisterAccount",owner:t,connection_id:e,version:r}}static fromProto(t){return new Qr(t.owner,t.connectionId,t.version)}toProto(){const{owner:t,connection_id:e,version:r}=this;return En.MsgRegisterAccount.fromPartial({owner:t,connectionId:e,version:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgRegisterAccount",value:En.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Qr.fromProto(En.MsgRegisterAccount.decode(t.value))}}class Yr extends m{constructor(t,e,r){super(),this.owner=t,this.connection_id=e,this.msg=r}static fromAmino(t){const{value:{owner:e,connection_id:r,msg:o}}=t;return new Yr(e,r,o?exports.Msg.fromAmino(o):void 0)}toAmino(){const{owner:t,connection_id:e,msg:r}=this;return{type:"intertx/MsgSubmitTx",value:{owner:t,connection_id:e,msg:r==null?void 0:r.toAmino()}}}static fromData(t){const{owner:e,connection_id:r,msg:o}=t;return new Yr(e,r,o?exports.Msg.fromData(o):void 0)}toData(){const{owner:t,connection_id:e,msg:r}=this;return{"@type":"/initia.intertx.v1.MsgSubmitTx",owner:t,connection_id:e,msg:r==null?void 0:r.toData()}}static fromProto(t){return new Yr(t.owner,t.connectionId,t.msg?exports.Msg.fromProto(t.msg):void 0)}toProto(){const{owner:t,connection_id:e,msg:r}=this;return En.MsgSubmitTx.fromPartial({owner:t,connectionId:e,msg:r==null?void 0:r.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgSubmitTx",value:En.MsgSubmitTx.encode(this.toProto()).finish()})}static unpackAny(t){return Yr.fromProto(En.MsgSubmitTx.decode(t.value))}}class at extends m{constructor(t,e){super(),this.Base=t,this.Quote=e}toString(){return`${this.Base}/${this.Quote}`}static fromAmino(t){return new at(t.Base,t.Quote)}toAmino(){return{Base:this.Base,Quote:this.Quote}}static fromData(t){return new at(t.Base,t.Quote)}toData(){return{Base:this.Base,Quote:this.Quote}}static fromProto(t){return new at(t.Base,t.Quote)}toProto(){return Oc.CurrencyPair.fromPartial({Base:this.Base,Quote:this.Quote})}}class Zr extends m{constructor(t,e){super(),this.authority=t,this.currency_pairs=e}static fromAmino(t){const{value:{authority:e,currency_pairs:r}}=t;return new Zr(e,r.map(at.fromAmino))}toAmino(){const{authority:t,currency_pairs:e}=this;return{type:"slinky/x/oracle/MsgAddCurrencyPairs",value:{authority:t,currency_pairs:e.map(r=>r.toAmino())}}}static fromData(t){const{authority:e,currency_pairs:r}=t;return new Zr(e,r.map(at.fromData))}toData(){const{authority:t,currency_pairs:e}=this;return{"@type":"/slinky.oracle.v1.MsgAddCurrencyPairs",authority:t,currency_pairs:e.map(r=>r.toData())}}static fromProto(t){return new Zr(t.authority,t.currencyPairs.map(at.fromProto))}toProto(){const{authority:t,currency_pairs:e}=this;return Bn.MsgAddCurrencyPairs.fromPartial({authority:t,currencyPairs:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/slinky.oracle.v1.MsgAddCurrencyPairs",value:Bn.MsgAddCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Zr.fromProto(Bn.MsgAddCurrencyPairs.decode(t.value))}}class Xr extends m{constructor(t,e){super(),this.authority=t,this.currency_pair_ids=e}static fromAmino(t){const{value:{authority:e,currency_pair_ids:r}}=t;return new Xr(e,r)}toAmino(){const{authority:t,currency_pair_ids:e}=this;return{type:"slinky/x/oracle/MsgSetCurrencyPairs",value:{authority:t,currency_pair_ids:e}}}static fromData(t){const{authority:e,currency_pair_ids:r}=t;return new Xr(e,r)}toData(){const{authority:t,currency_pair_ids:e}=this;return{"@type":"/slinky.oracle.v1.MsgRemoveCurrencyPairs",authority:t,currency_pair_ids:e}}static fromProto(t){return new Xr(t.authority,t.currencyPairIds)}toProto(){const{authority:t,currency_pair_ids:e}=this;return Bn.MsgRemoveCurrencyPairs.fromPartial({authority:t,currencyPairIds:e})}packAny(){return l.Any.fromPartial({typeUrl:"/slinky.oracle.v1.MsgRemoveCurrencyPairs",value:Bn.MsgRemoveCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Xr.fromProto(Bn.MsgRemoveCurrencyPairs.decode(t.value))}}class Zn extends m{constructor(t,e,r){super(),this.price=t,this.block_timestamp=e,this.block_height=r}static fromAmino(t){const{price:e,block_timestamp:r,block_height:o}=t;return new Zn(e,new Date(r),Number.parseInt(o))}toAmino(){const{price:t,block_timestamp:e,block_height:r}=this;return{price:t,block_timestamp:e.toISOString(),block_height:r.toString()}}static fromData(t){const{price:e,block_timestamp:r,block_height:o}=t;return new Zn(e,new Date(r),Number.parseInt(o))}toData(){const{price:t,block_timestamp:e,block_height:r}=this;return{price:t,block_timestamp:e.toISOString(),block_height:r.toString()}}static fromProto(t){return new Zn(t.price,t.blockTimestamp,t.blockHeight.toNumber())}toProto(){const{price:t,block_timestamp:e,block_height:r}=this;return Tc.QuotePrice.fromPartial({price:t,blockTimestamp:e,blockHeight:f.fromNumber(r)})}}class $s extends m{constructor(t,e,r,o,s){super(),this.name=t,this.off_chain_ticker=e,this.normalize_by_pair=r,this.invert=o,this.metadata_JSON=s}static fromAmino(t){const{name:e,off_chain_ticker:r,normalize_by_pair:o,invert:s,metadata_JSON:n}=t;return new $s(e,r,o?at.fromAmino(o):void 0,s,n)}toAmino(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:s}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:r==null?void 0:r.toAmino(),invert:o,metadata_JSON:s}}static fromData(t){const{name:e,off_chain_ticker:r,normalize_by_pair:o,invert:s,metadata_JSON:n}=t;return new $s(e,r,o?at.fromData(o):void 0,s,n)}toData(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:s}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:r==null?void 0:r.toData(),invert:o,metadata_JSON:s}}static fromProto(t){return new $s(t.name,t.offChainTicker,t.normalizeByPair?at.fromProto(t.normalizeByPair):void 0,t.invert,t.metadataJSON)}toProto(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:s}=this;return si.ProviderConfig.fromPartial({name:t,offChainTicker:e,normalizeByPair:r==null?void 0:r.toProto(),invert:o,metadataJSON:s})}}class Ls extends m{constructor(t,e,r,o,s){super(),this.currency_pair=t,this.decimals=e,this.min_provider_count=r,this.enabled=o,this.metadata_JSON=s}static fromAmino(t){const{currency_pair:e,decimals:r,min_provider_count:o,enabled:s,metadata_JSON:n}=t;return new Ls(at.fromAmino(e),Number.parseInt(r),Number.parseInt(o),s,n)}toAmino(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:s}=this;return{currency_pair:t.toAmino(),decimals:e.toString(),min_provider_count:r.toString(),enabled:o,metadata_JSON:s}}static fromData(t){const{currency_pair:e,decimals:r,min_provider_count:o,enabled:s,metadata_JSON:n}=t;return new Ls(at.fromData(e),Number.parseInt(r),Number.parseInt(o),s,n)}toData(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:s}=this;return{currency_pair:t.toData(),decimals:e.toString(),min_provider_count:r.toString(),enabled:o,metadata_JSON:s}}static fromProto(t){return new Ls(at.fromProto(t.currencyPair),t.decimals.toNumber(),t.minProviderCount.toNumber(),t.enabled,t.metadataJSON)}toProto(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:s}=this;return si.Ticker.fromPartial({currencyPair:t,decimals:f.fromNumber(e),minProviderCount:f.fromNumber(r),enabled:o,metadataJSON:s})}}class gt extends m{constructor(t,e){super(),this.ticker=t,this.provider_configs=e}static fromAmino(t){const{ticker:e,provider_configs:r}=t;return new gt(Ls.fromAmino(e),r.map($s.fromAmino))}toAmino(){const{ticker:t,provider_configs:e}=this;return{ticker:t.toAmino(),provider_configs:e.map(r=>r.toAmino())}}static fromData(t){const{ticker:e,provider_configs:r}=t;return new gt(Ls.fromData(e),r.map($s.fromData))}toData(){const{ticker:t,provider_configs:e}=this;return{ticker:t.toData(),provider_configs:e.map(r=>r.toData())}}static fromProto(t){return new gt(Ls.fromProto(t.ticker),t.providerConfigs.map($s.fromProto))}toProto(){const{ticker:t,provider_configs:e}=this;return si.Market.fromPartial({ticker:t.toProto(),providerConfigs:e.map(r=>r.toProto())})}}class to extends m{constructor(t,e){super(),this.authority=t,this.create_markets=e}static fromAmino(t){const{value:{authority:e,create_markets:r}}=t;return new to(e,r.map(gt.fromAmino))}toAmino(){const{authority:t,create_markets:e}=this;return{type:"slinky/x/marketmap/MsgCreateMarkets",value:{authority:t,create_markets:e.map(r=>r.toAmino())}}}static fromData(t){const{authority:e,create_markets:r}=t;return new to(e,r.map(gt.fromData))}toData(){const{authority:t,create_markets:e}=this;return{"@type":"/slinky.marketmap.v1.MsgCreateMarkets",authority:t,create_markets:e.map(r=>r.toData())}}static fromProto(t){return new to(t.authority,t.createMarkets.map(gt.fromProto))}toProto(){const{authority:t,create_markets:e}=this;return kt.MsgCreateMarkets.fromPartial({authority:t,createMarkets:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/slinky.marketmap.v1.MsgCreateMarkets",value:kt.MsgCreateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return to.fromProto(kt.MsgCreateMarkets.decode(t.value))}}class eo extends m{constructor(t,e){super(),this.authority=t,this.update_markets=e}static fromAmino(t){const{value:{authority:e,update_markets:r}}=t;return new eo(e,r.map(gt.fromAmino))}toAmino(){const{authority:t,update_markets:e}=this;return{type:"slinky/x/marketmap/MsgUpdateMarkets",value:{authority:t,update_markets:e.map(r=>r.toAmino())}}}static fromData(t){const{authority:e,update_markets:r}=t;return new eo(e,r.map(gt.fromData))}toData(){const{authority:t,update_markets:e}=this;return{"@type":"/slinky.marketmap.v1.MsgUpdateMarkets",authority:t,update_markets:e.map(r=>r.toData())}}static fromProto(t){return new eo(t.authority,t.updateMarkets.map(gt.fromProto))}toProto(){const{authority:t,update_markets:e}=this;return kt.MsgUpdateMarkets.fromPartial({authority:t,updateMarkets:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/slinky.marketmap.v1.MsgUpdateMarkets",value:kt.MsgUpdateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return eo.fromProto(kt.MsgUpdateMarkets.decode(t.value))}}class ro extends m{constructor(t,e){super(),this.remove_addresses=t,this.admin=e}static fromAmino(t){const{value:{remove_addresses:e,admin:r}}=t;return new ro(e,r)}toAmino(){const{remove_addresses:t,admin:e}=this;return{type:"slinky/x/marketmap/MsgRemoveMarketAuthorities",value:{remove_addresses:t,admin:e}}}static fromData(t){const{remove_addresses:e,admin:r}=t;return new ro(e,r)}toData(){const{remove_addresses:t,admin:e}=this;return{"@type":"/slinky.marketmap.v1.MsgRemoveMarketAuthorities",remove_addresses:t,admin:e}}static fromProto(t){return new ro(t.removeAddresses,t.admin)}toProto(){const{remove_addresses:t,admin:e}=this;return kt.MsgRemoveMarketAuthorities.fromPartial({removeAddresses:t,admin:e})}packAny(){return l.Any.fromPartial({typeUrl:"/slinky.marketmap.v1.MsgRemoveMarketAuthorities",value:kt.MsgRemoveMarketAuthorities.encode(this.toProto()).finish()})}static unpackAny(t){return ro.fromProto(kt.MsgRemoveMarketAuthorities.decode(t.value))}}class fs extends m{constructor(t,e){super(),this.market_authorities=t,this.admin=e}static fromAmino(t){return new fs(t.market_authorities,t.admin)}toAmino(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromData(t){return new fs(t.market_authorities,t.admin)}toData(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromProto(t){return new fs(t.marketAuthorities,t.admin)}toProto(){const{market_authorities:t,admin:e}=this;return Rc.Params.fromPartial({marketAuthorities:t,admin:e})}}class oo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new oo(e,fs.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"slinky/x/marketmap/MsgParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new oo(e,fs.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/slinky.marketmap.v1.MsgParams",authority:t,params:e.toData()}}static fromProto(t){return new oo(t.authority,fs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return kt.MsgParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/slinky.marketmap.v1.MsgParams",value:kt.MsgParams.encode(this.toProto()).finish()})}static unpackAny(t){return oo.fromProto(kt.MsgParams.decode(t.value))}}class qt extends m{constructor(t,e,r){super(),this.sender=t,this.code_bytes=e,this.upgrade_policy=r}static fromAmino(t){const{value:{sender:e,code_bytes:r,upgrade_policy:o}}=t;return new qt(e,r,o||0)}toAmino(){const{sender:t,code_bytes:e,upgrade_policy:r}=this;return{type:"move/MsgPublish",value:{sender:t,code_bytes:e,upgrade_policy:r===aa.UpgradePolicy.UNSPECIFIED?void 0:r}}}static fromProto(t){return new qt(t.sender,t.codeBytes.map(e=>Buffer.from(e).toString("base64")),t.upgradePolicy)}toProto(){const{sender:t,code_bytes:e,upgrade_policy:r}=this;return x.MsgPublish.fromPartial({sender:t,codeBytes:e.map(o=>Buffer.from(o,"base64")),upgradePolicy:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgPublish",value:x.MsgPublish.encode(this.toProto()).finish()})}static unpackAny(t){return qt.fromProto(x.MsgPublish.decode(t.value))}static fromData(t){const{sender:e,code_bytes:r,upgrade_policy:o}=t;return new qt(e,r,o)}toData(){const{sender:t,code_bytes:e,upgrade_policy:r}=this;return{"@type":"/initia.move.v1.MsgPublish",sender:t,code_bytes:e,upgrade_policy:r}}}(i=>{i.Policy=aa.UpgradePolicy})(qt||(qt={}));class so extends m{constructor(e,r,o,s,n=[],a=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.module_address=r,this.module_name=o,this.function_name=s,this.type_args=n,this.args=a}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}}=e;return new so(r,o,s,n,a??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return{type:"move/MsgExecute",value:{sender:e,module_address:r,module_name:o,function_name:s,type_args:n.length===0?void 0:n,args:a.length===0?void 0:a}}}static fromProto(e){return new so(e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args.map(r=>Buffer.from(r).toString("base64")))}toProto(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return x.MsgExecute.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:s,typeArgs:n,args:a.map(c=>Buffer.from(c,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecute",value:x.MsgExecute.encode(this.toProto()).finish()})}static unpackAny(e){return so.fromProto(x.MsgExecute.decode(e.value))}static fromData(e){const{sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=e;return new so(r,o,s,n,a,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return{"@type":"/initia.move.v1.MsgExecute",sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}}}class no extends m{constructor(e,r,o,s,n=[],a=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.module_address=r,this.module_name=o,this.function_name=s,this.type_args=n,this.args=a}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}}=e;return new no(r,o,s,n,a??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return{type:"move/MsgExecuteJSON",value:{sender:e,module_address:r,module_name:o,function_name:s,type_args:n.length===0?void 0:n,args:a.length===0?void 0:a}}}static fromData(e){const{sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=e;return new no(r,o,s,n,a,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return{"@type":"/initia.move.v1.MsgExecuteJSON",sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}}static fromProto(e){return new no(e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args)}toProto(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return x.MsgExecuteJSON.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:s,typeArgs:n,args:a})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecuteJSON",value:x.MsgExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return no.fromProto(x.MsgExecuteJSON.decode(e.value))}}class ao extends m{constructor(e,r,o=[],s=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.code_bytes=r,this.type_args=o,this.args=s}static fromAmino(e){const{value:{sender:r,code_bytes:o,type_args:s,args:n}}=e;return new ao(r,o,s??[],n??[])}toAmino(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return{type:"move/MsgScript",value:{sender:e,code_bytes:r,type_args:o.length===0?void 0:o,args:s.length===0?void 0:s}}}static fromProto(e){return new ao(e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args.map(r=>Buffer.from(r).toString("base64")))}toProto(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return x.MsgScript.fromPartial({sender:e,codeBytes:Buffer.from(r,"base64"),typeArgs:o,args:s.map(n=>Buffer.from(n,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScript",value:x.MsgScript.encode(this.toProto()).finish()})}static unpackAny(e){return ao.fromProto(x.MsgScript.decode(e.value))}static fromData(e){const{sender:r,code_bytes:o,type_args:s,args:n}=e;return new ao(r,o,s,n)}toData(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return{"@type":"/initia.move.v1.MsgScript",sender:e,code_bytes:r,type_args:o,args:s}}}class io extends m{constructor(e,r,o=[],s=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.code_bytes=r,this.type_args=o,this.args=s}static fromAmino(e){const{value:{sender:r,code_bytes:o,type_args:s,args:n}}=e;return new io(r,o,s??[],n??[])}toAmino(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return{type:"move/MsgScriptJSON",value:{sender:e,code_bytes:r,type_args:o.length===0?void 0:o,args:s.length===0?void 0:s}}}static fromData(e){const{sender:r,code_bytes:o,type_args:s,args:n}=e;return new io(r,o,s,n)}toData(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return{"@type":"/initia.move.v1.MsgScriptJSON",sender:e,code_bytes:r,type_args:o,args:s}}static fromProto(e){return new io(e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args)}toProto(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return x.MsgScriptJSON.fromPartial({sender:e,codeBytes:Buffer.from(r,"base64"),typeArgs:o,args:s})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScriptJSON",value:x.MsgScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return io.fromProto(x.MsgScriptJSON.decode(e.value))}}class gs extends m{constructor(t,e,r,o,s){super(),this.base_denom=t,this.base_min_gas_price=e,this.contract_shared_revenue_ratio=r,this.script_enabled=o,this.allowed_publishers=s}static fromAmino(t){const{value:{base_denom:e,base_min_gas_price:r,contract_shared_revenue_ratio:o,script_enabled:s,allowed_publishers:n}}=t;return new gs(e,r,o,s,n)}toAmino(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}=this;return{type:"move/Params",value:{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}}}static fromData(t){const{base_denom:e,base_min_gas_price:r,contract_shared_revenue_ratio:o,script_enabled:s,allowed_publishers:n}=t;return new gs(e,r,o,s,n)}toData(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}=this;return{"@type":"/initia.move.v1.Params",base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}}static fromProto(t){return new gs(t.baseDenom,t.baseMinGasPrice,t.contractSharedRevenueRatio,t.scriptEnabled,t.allowedPublishers)}toProto(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}=this;return aa.Params.fromPartial({baseDenom:t,baseMinGasPrice:e,contractSharedRevenueRatio:r,scriptEnabled:o,allowedPublishers:s})}}class co extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new co(e,gs.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"move/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new co(e,gs.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.move.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new co(t.authority,gs.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:"/initia.move.v1.MsgUpdateParams",value:x.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return co.fromProto(x.MsgUpdateParams.decode(t.value))}}class mo extends m{constructor(t,e,r){super(),this.authority=t,this.metadata_lp=e,this.reward_weight=r}static fromAmino(t){const{value:{authority:e,metadata_lp:r,reward_weight:o}}=t;return new mo(e,r,o)}toAmino(){const{authority:t,metadata_lp:e,reward_weight:r}=this;return{type:"move/MsgWhitelist",value:{authority:t,metadata_lp:e,reward_weight:r}}}static fromData(t){const{authority:e,metadata_lp:r,reward_weight:o}=t;return new mo(e,r,o)}toData(){const{authority:t,metadata_lp:e,reward_weight:r}=this;return{"@type":"/initia.move.v1.MsgWhitelist",authority:t,metadata_lp:e,reward_weight:r}}static fromProto(t){return new mo(t.authority,t.metadataLp,t.rewardWeight)}toProto(){const{authority:t,metadata_lp:e,reward_weight:r}=this;return x.MsgWhitelist.fromPartial({authority:t,metadataLp:e,rewardWeight:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgWhitelist",value:x.MsgWhitelist.encode(this.toProto()).finish()})}static unpackAny(t){return mo.fromProto(x.MsgWhitelist.decode(t.value))}}class uo extends m{constructor(t,e){super(),this.authority=t,this.metadata_lp=e}static fromAmino(t){const{value:{authority:e,metadata_lp:r}}=t;return new uo(e,r)}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:r}=t;return new uo(e,r)}toData(){const{authority:t,metadata_lp:e}=this;return{"@type":"/initia.move.v1.MsgDelist",authority:t,metadata_lp:e}}static fromProto(t){return new uo(t.authority,t.metadataLp)}toProto(){const{authority:t,metadata_lp:e}=this;return x.MsgDelist.fromPartial({authority:t,metadataLp:e})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgDelist",value:x.MsgDelist.encode(this.toProto()).finish()})}static unpackAny(t){return uo.fromProto(x.MsgDelist.decode(t.value))}}class lo extends m{constructor(e,r,o,s,n,a=[],c=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=r,this.module_address=o,this.module_name=s,this.function_name=n,this.type_args=a,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:s,module_name:n,function_name:a,type_args:c,args:d}}=e;return new lo(r,o,s,n,a,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return{type:"move/MsgGovExecute",value:{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a.length===0?void 0:a,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:s,module_name:n,function_name:a,type_args:c,args:d}=e;return new lo(r,o,s,n,a,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecute",authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}}static fromProto(e){return new lo(e.authority,e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args.map(r=>Buffer.from(r).toString("base64")))}toProto(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return x.MsgGovExecute.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:s,functionName:n,typeArgs:a,args:c.map(d=>Buffer.from(d,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecute",value:x.MsgGovExecute.encode(this.toProto()).finish()})}static unpackAny(e){return lo.fromProto(x.MsgGovExecute.decode(e.value))}}class po extends m{constructor(e,r,o,s,n,a=[],c=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=r,this.module_address=o,this.module_name=s,this.function_name=n,this.type_args=a,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:s,module_name:n,function_name:a,type_args:c,args:d}}=e;return new po(r,o,s,n,a,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return{type:"move/MsgGovExecuteJSON",value:{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a.length===0?void 0:a,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:s,module_name:n,function_name:a,type_args:c,args:d}=e;return new po(r,o,s,n,a,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecuteJSON",authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}}static fromProto(e){return new po(e.authority,e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args)}toProto(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return x.MsgGovExecuteJSON.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:s,functionName:n,typeArgs:a,args:c})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecuteJSON",value:x.MsgGovExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return po.fromProto(x.MsgGovExecuteJSON.decode(e.value))}}class Ft extends m{constructor(t,e,r,o){super(),this.authority=t,this.sender=e,this.code_bytes=r,this.upgrade_policy=o}static fromAmino(t){const{value:{authority:e,sender:r,code_bytes:o,upgrade_policy:s}}=t;return new Ft(e,r,o,s||0)}toAmino(){const{authority:t,sender:e,code_bytes:r,upgrade_policy:o}=this;return{type:"move/MsgGovPublish",value:{authority:t,sender:e,code_bytes:r,upgrade_policy:o===aa.UpgradePolicy.UNSPECIFIED?void 0:o}}}static fromData(t){const{authority:e,sender:r,code_bytes:o,upgrade_policy:s}=t;return new Ft(e,r,o,s)}toData(){const{authority:t,sender:e,code_bytes:r,upgrade_policy:o}=this;return{"@type":"/initia.move.v1.MsgGovPublish",authority:t,sender:e,code_bytes:r,upgrade_policy:o}}static fromProto(t){return new Ft(t.authority,t.sender,t.codeBytes.map(e=>Buffer.from(e).toString("base64")),t.upgradePolicy)}toProto(){const{authority:t,sender:e,code_bytes:r,upgrade_policy:o}=this;return x.MsgGovPublish.fromPartial({authority:t,sender:e,codeBytes:r.map(s=>Buffer.from(s,"base64")),upgradePolicy:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovPublish",value:x.MsgGovPublish.encode(this.toProto()).finish()})}static unpackAny(t){return Ft.fromProto(x.MsgGovPublish.decode(t.value))}}(i=>{i.Policy=aa.UpgradePolicy})(Ft||(Ft={}));class ho extends m{constructor(e,r,o,s=[],n=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=r,this.code_bytes=o,this.type_args=s,this.args=n}static fromAmino(e){const{value:{authority:r,sender:o,code_bytes:s,type_args:n,args:a}}=e;return new ho(r,o,s,n??[],a??[])}toAmino(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return{type:"move/MsgGovScript",value:{authority:e,sender:r,code_bytes:o,type_args:s.length===0?void 0:s,args:n.length===0?void 0:n}}}static fromData(e){const{authority:r,sender:o,code_bytes:s,type_args:n,args:a}=e;return new ho(r,o,s,n,a)}toData(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return{"@type":"/initia.move.v1.MsgGovScript",authority:e,sender:r,code_bytes:o,type_args:s,args:n}}static fromProto(e){return new ho(e.authority,e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args.map(r=>Buffer.from(r).toString("base64")))}toProto(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return x.MsgGovScript.fromPartial({authority:e,sender:r,codeBytes:Buffer.from(o,"base64"),typeArgs:s,args:n.map(a=>Buffer.from(a,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScript",value:x.MsgGovScript.encode(this.toProto()).finish()})}static unpackAny(e){return ho.fromProto(x.MsgGovScript.decode(e.value))}}class fo extends m{constructor(e,r,o,s=[],n=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=r,this.code_bytes=o,this.type_args=s,this.args=n}static fromAmino(e){const{value:{authority:r,sender:o,code_bytes:s,type_args:n,args:a}}=e;return new fo(r,o,s,n??[],a??[])}toAmino(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return{type:"move/MsgGovScriptJSON",value:{authority:e,sender:r,code_bytes:o,type_args:s.length===0?void 0:s,args:n.length===0?void 0:n}}}static fromData(e){const{authority:r,sender:o,code_bytes:s,type_args:n,args:a}=e;return new fo(r,o,s,n,a)}toData(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return{"@type":"/initia.move.v1.MsgGovScriptJSON",authority:e,sender:r,code_bytes:o,type_args:s,args:n}}static fromProto(e){return new fo(e.authority,e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args)}toProto(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return x.MsgGovScriptJSON.fromPartial({authority:e,sender:r,codeBytes:Buffer.from(o,"base64"),typeArgs:s,args:n})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScriptJSON",value:x.MsgGovScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return fo.fromProto(x.MsgGovScriptJSON.decode(e.value))}}class go extends m{constructor(e,r,o){super();p(this,"amount");this.delegator_address=e,this.validator_address=r,this.amount=new u(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:s}}=e;return new go(r,o,u.fromAmino(s))}toAmino(){const{delegator_address:e,validator_address:r,amount:o}=this;return{type:"mstaking/MsgDelegate",value:{delegator_address:e,validator_address:r,amount:o.toAmino()}}}static fromProto(e){return new go(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:r,amount:o}=this;return J.MsgDelegate.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgDelegate",value:J.MsgDelegate.encode(this.toProto()).finish()})}static unpackAny(e){return go.fromProto(J.MsgDelegate.decode(e.value))}static fromData(e){const{delegator_address:r,validator_address:o,amount:s}=e;return new go(r,o,u.fromData(s))}toData(){const{delegator_address:e,validator_address:r,amount:o}=this;return{"@type":"/initia.mstaking.v1.MsgDelegate",delegator_address:e,validator_address:r,amount:o.toData()}}}class yo extends m{constructor(e,r,o){super();p(this,"amount");this.delegator_address=e,this.validator_address=r,this.amount=new u(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:s}}=e;return new yo(r,o,u.fromAmino(s))}toAmino(){const{delegator_address:e,validator_address:r,amount:o}=this;return{type:"mstaking/MsgUndelegate",value:{delegator_address:e,validator_address:r,amount:o.toAmino()}}}static fromProto(e){return new yo(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:r,amount:o}=this;return J.MsgUndelegate.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUndelegate",value:J.MsgUndelegate.encode(this.toProto()).finish()})}static unpackAny(e){return yo.fromProto(J.MsgUndelegate.decode(e.value))}static fromData(e){const{delegator_address:r,validator_address:o,amount:s}=e;return new yo(r,o,u.fromData(s))}toData(){const{delegator_address:e,validator_address:r,amount:o}=this;return{"@type":"/initia.mstaking.v1.MsgUndelegate",delegator_address:e,validator_address:r,amount:o.toData()}}}class _o extends m{constructor(e,r,o,s){super();p(this,"amount");this.delegator_address=e,this.validator_src_address=r,this.validator_dst_address=o,this.amount=new u(s)}static fromAmino(e){const{value:{delegator_address:r,validator_src_address:o,validator_dst_address:s,amount:n}}=e;return new _o(r,o,s,u.fromAmino(n))}toAmino(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s}=this;return{type:"mstaking/MsgBeginRedelegate",value:{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s.toAmino()}}}static fromData(e){const{delegator_address:r,validator_src_address:o,validator_dst_address:s,amount:n}=e;return new _o(r,o,s,u.fromData(n))}toData(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s}=this;return{"@type":"/initia.mstaking.v1.MsgBeginRedelegate",delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s.toData()}}static fromProto(e){return new _o(e.delegatorAddress,e.validatorSrcAddress,e.validatorDstAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s}=this;return J.MsgBeginRedelegate.fromPartial({amount:s.toProto(),delegatorAddress:e,validatorDstAddress:o,validatorSrcAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgBeginRedelegate",value:J.MsgBeginRedelegate.encode(this.toProto()).finish()})}static unpackAny(e){return _o.fromProto(J.MsgBeginRedelegate.decode(e.value))}}class G extends m{constructor(e,r,o,s,n,a,c,d,h,g,y,b){super();p(this,"tokens");p(this,"delegator_shares");p(this,"voting_powers");this.operator_address=e,this.consensus_pubkey=r,this.jailed=o,this.status=s,this.description=c,this.unbonding_height=d,this.unbonding_time=h,this.commission=g,this.voting_power=b,this.tokens=new u(n),this.delegator_shares=new u(a),this.voting_powers=new u(y)}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 fromAmino(e){return new G(e.operator_address,j.fromAmino(e.consensus_pubkey),e.jailed||!1,e.status||0,u.fromAmino(e.tokens),u.fromAmino(e.delegator_shares),G.Description.fromAmino(e.description),Number.parseInt(e.unbonding_height),new Date(e.unbonding_time),G.Commission.fromAmino(e.commission),u.fromAmino(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 fromData(e){return new G(e.operator_address,j.fromData(e.consensus_pubkey),e.jailed||!1,e.status||0,u.fromData(e.tokens),u.fromData(e.delegator_shares),G.Description.fromData(e.description),Number.parseInt(e.unbonding_height),new Date(e.unbonding_time),G.Commission.fromData(e.commission),u.fromData(e.voting_powers),e.voting_power)}toProto(){const{operator_address:e,consensus_pubkey:r,jailed:o,status:s,tokens:n,delegator_shares:a,description:c,unbonding_height:d,unbonding_time:h,commission:g,voting_powers:y,voting_power:b}=this;return ct.Validator.fromPartial({operatorAddress:e,consensusPubkey:r.packAny(),jailed:o,status:s,tokens:n.toProto(),delegatorShares:a.toProto(),description:c.toProto(),unbondingHeight:f.fromNumber(d),unbondingTime:h,commission:g.toProto(),votingPowers:y.toProto(),votingPower:b})}static fromProto(e){return new G(e.operatorAddress,j.unpackAny(e.consensusPubkey),e.jailed,e.status,u.fromProto(e.tokens),u.fromProto(e.delegatorShares),G.Description.fromProto(e.description),e.unbondingHeight.toNumber(),e.unbondingTime,G.Commission.fromProto(e.commission),u.fromProto(e.votingPowers),e.votingPower)}}(i=>{i.Status=ct.BondStatus;class t extends m{constructor(s,n,a,c,d){super(),this.moniker=s,this.identity=n,this.website=a,this.details=c,this.security_contact=d}toAmino(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}}static fromAmino(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 fromData(s){return new t(s.moniker,s.identity??"",s.website??"",s.details??"",s.security_contact??"")}toProto(){const{moniker:s,identity:n,website:a,details:c,security_contact:d}=this;return ct.Description.fromPartial({details:c,identity:n,moniker:s,securityContact:d,website:a})}static fromProto(s){return new t(s.moniker,s.identity,s.website,s.details,s.securityContact)}}i.Description=t;class e extends m{constructor(s,n,a){super(),this.rate=s,this.max_rate=n,this.max_change_rate=a,this.rate=_(s).toString(),this.max_rate=_(n).toString(),this.max_change_rate=_(a).toString()}static fromAmino(s){const{rate:n,max_rate:a,max_change_rate:c}=s;return new e(n,a,c)}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:c}=s;return new e(n,a,c)}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 ct.CommissionRates.fromPartial({maxChangeRate:a,maxRate:n,rate:s})}}i.CommissionRates=e;class r extends m{constructor(s,n){super(),this.commission_rates=s,this.update_time=n}toAmino(){return{commission_rates:this.commission_rates.toAmino(),update_time:this.update_time.toISOString()}}static fromAmino(s){return new r(e.fromAmino(s.commission_rates),new Date(s.update_time))}toData(){return{commission_rates:this.commission_rates.toData(),update_time:this.update_time.toISOString()}}static fromData(s){return new r(e.fromData(s.commission_rates),new Date(s.update_time))}toProto(){const{commission_rates:s,update_time:n}=this;return ct.Commission.fromPartial({commissionRates:s.toProto(),updateTime:n})}static fromProto(s){return new r(e.fromProto(s.commissionRates),s.updateTime)}}i.Commission=r})(G||(G={}));class vo extends m{constructor(e,r,o,s,n){super();p(this,"amount");this.description=e,this.commission=r,this.validator_address=o,this.pubkey=s,this.amount=new u(n)}static fromAmino(e){const{value:{description:r,commission:o,validator_address:s,pubkey:n,amount:a}}=e;return new vo(r,G.CommissionRates.fromAmino(o),s,j.fromAmino(n),u.fromAmino(a))}toAmino(){const{description:e,commission:r,validator_address:o,pubkey:s,amount:n}=this;return{type:"mstaking/MsgCreateValidator",value:{description:e,commission:r.toAmino(),validator_address:o,pubkey:s.toAmino(),amount:n.toAmino()}}}static fromData(e){const{description:r,commission:o,validator_address:s,pubkey:n,amount:a}=e;return new vo(r,G.CommissionRates.fromData(o),s,j.fromData(n),u.fromData(a))}toData(){const{description:e,commission:r,validator_address:o,pubkey:s,amount:n}=this;return{"@type":"/initia.mstaking.v1.MsgCreateValidator",description:e,commission:r.toData(),validator_address:o,pubkey:s.toData(),amount:n.toData()}}static fromProto(e){return new vo(G.Description.fromProto(e.description),G.CommissionRates.fromProto(e.commission),e.validatorAddress,exports.PublicKey.fromProto(e.pubkey),u.fromProto(e.amount))}toProto(){const{description:e,commission:r,validator_address:o,pubkey:s,amount:n}=this;return J.MsgCreateValidator.fromPartial({commission:r.toProto(),description:e.toProto(),pubkey:s.packAny(),validatorAddress:o,amount:n.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCreateValidator",value:J.MsgCreateValidator.encode(this.toProto()).finish()})}static unpackAny(e){return vo.fromProto(J.MsgCreateValidator.decode(e.value))}}class $t extends m{constructor(t,e,r){super(),this.description=t,this.validator_address=e,this.commission_rate=r}static fromAmino(t){const{value:{description:e,validator_address:r,commission_rate:o}}=t;return new $t(G.Description.fromAmino(e),r,o)}toAmino(){const{description:t,validator_address:e,commission_rate:r}=this;return{type:"mstaking/MsgEditValidator",value:{description:t,validator_address:e,commission_rate:r}}}static fromProto(t){return new $t(G.Description.fromProto(t.description),t.validatorAddress,t.commissionRate!==""?t.commissionRate:void 0)}toProto(){const{description:t,validator_address:e,commission_rate:r}=this;return J.MsgEditValidator.fromPartial({description:t.toProto(),commissionRate:(r==null?void 0:r.toString())??"",validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgEditValidator",value:J.MsgEditValidator.encode(this.toProto()).finish()})}static unpackAny(t){return $t.fromProto(J.MsgEditValidator.decode(t.value))}static fromData(t){const{description:e,validator_address:r,commission_rate:o}=t;return new $t(G.Description.fromData(e),r,o)}toData(){const{description:t,validator_address:e,commission_rate:r}=this;return{"@type":"/initia.mstaking.v1.MsgEditValidator",description:t,validator_address:e,commission_rate:r}}}(i=>{i.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]"}})($t||($t={}));class bo extends m{constructor(e,r,o,s){super();p(this,"amount");this.delegator_address=e,this.validator_address=r,this.creation_height=s,this.amount=new u(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:s,creation_height:n}}=e;return new bo(r,o,u.fromAmino(s),Number.parseInt(n))}toAmino(){const{delegator_address:e,validator_address:r,amount:o,creation_height:s}=this;return{type:"mstaking/MsgCancelUnbondingDelegation",value:{delegator_address:e,validator_address:r,amount:o.toAmino(),creation_height:s.toString()}}}static fromData(e){const{delegator_address:r,validator_address:o,amount:s,creation_height:n}=e;return new bo(r,o,u.fromData(s),Number.parseInt(n))}toData(){const{delegator_address:e,validator_address:r,amount:o,creation_height:s}=this;return{"@type":"/initia.mstaking.v1.MsgCancelUnbondingDelegation",delegator_address:e,validator_address:r,amount:o.toData(),creation_height:s.toString()}}static fromProto(e){return new bo(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount),e.creationHeight.toNumber())}toProto(){const{delegator_address:e,validator_address:r,amount:o,creation_height:s}=this;return J.MsgCancelUnbondingDelegation.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r,creationHeight:f.fromNumber(s)})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCancelUnbondingDelegation",value:J.MsgCancelUnbondingDelegation.encode(this.toProto()).finish()})}static unpackAny(e){return bo.fromProto(J.MsgCancelUnbondingDelegation.decode(e.value))}}class ys extends m{constructor(t,e,r,o,s,n,a){super(),this.unbonding_time=t,this.max_validators=e,this.max_entries=r,this.historical_entries=o,this.bond_denoms=s,this.min_voting_power=n,this.min_commission_rate=a}static fromAmino(t){const{value:{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:s,bond_denoms:n,min_voting_power:a,min_commission_rate:c}}=t;return new ys(D.fromAmino(e),r,o,s,n,Number.parseInt(a),c)}toAmino(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,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:r,historical_entries:o,bond_denoms:s,min_voting_power:n.toString(),min_commission_rate:a}}}static fromData(t){const{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:s,bond_denoms:n,min_voting_power:a,min_commission_rate:c}=t;return new ys(D.fromData(e),r,o,s,n,Number.parseInt(a),c)}toData(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,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:r,historical_entries:o,bond_denoms:s,min_voting_power:n.toString(),min_commission_rate:a}}static fromProto(t){return new ys(D.fromProto(t.unbondingTime),t.maxValidators,t.maxEntries,t.historicalEntries,t.bondDenoms,t.minVotingPower.toNumber(),t.minCommissionRate)}toProto(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,bond_denoms:s,min_voting_power:n,min_commission_rate:a}=this;return ct.Params.fromPartial({unbondingTime:t.toProto(),maxValidators:e,maxEntries:r,historicalEntries:o,bondDenoms:s,minVotingPower:f.fromNumber(n),minCommissionRate:a})}}class Ao extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ao(e,ys.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"mstaking/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Ao(e,ys.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.mstaking.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Ao(t.authority,ys.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return J.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUpdateParams",value:J.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ao.fromProto(J.MsgUpdateParams.decode(t.value))}}class zs extends m{constructor(e,r,o,s){super();p(this,"shares");p(this,"balance");this.delegator_address=e,this.validator_address=r,this.shares=new u(o),this.balance=new u(s)}static fromAmino(e){const{delegation:{delegator_address:r,validator_address:o,shares:s},balance:n}=e;return new zs(r,o,u.fromAmino(s),u.fromAmino(n))}toAmino(){const{delegator_address:e,validator_address:r,shares:o,balance:s}=this;return{delegation:{delegator_address:e,validator_address:r,shares:o.toAmino()},balance:s.toAmino()}}static fromData(e){const{delegation:{delegator_address:r,validator_address:o,shares:s},balance:n}=e;return new zs(r,o,u.fromData(s),u.fromData(n))}toData(){const{delegator_address:e,validator_address:r,shares:o,balance:s}=this;return{delegation:{delegator_address:e,validator_address:r,shares:o.toData()},balance:s.toData()}}static fromProto(e){const r=e.delegation;return new zs(r.delegatorAddress,r.validatorAddress,u.fromProto(r.shares),u.fromProto(e.balance))}toProto(){const{delegator_address:e,validator_address:r,shares:o,balance:s}=this;return ct.DelegationResponse.fromPartial({delegation:ct.Delegation.fromPartial({delegatorAddress:e,validatorAddress:r,shares:o.toProto()}),balance:s.toProto()})}}class Nt extends m{constructor(t,e,r,o){super(),this.delegator_address=t,this.validator_src_address=e,this.validator_dst_address=r,this.entries=o}static fromAmino(t){const{redelegation:{delegator_address:e,validator_src_address:r,validator_dst_address:o},entries:s}=t;return new Nt(e,r,o,s.map(n=>Nt.Entry.fromAmino(n)))}toAmino(){const{delegator_address:t,validator_src_address:e,validator_dst_address:r,entries:o}=this;return{redelegation:{delegator_address:t,validator_src_address:e,validator_dst_address:r},entries:o.map(s=>s.toAmino())}}static fromData(t){const{redelegation:{delegator_address:e,validator_src_address:r,validator_dst_address:o},entries:s}=t;return new Nt(e,r,o,s.map(n=>Nt.Entry.fromData(n)))}toData(){const{delegator_address:t,validator_src_address:e,validator_dst_address:r,entries:o}=this;return{redelegation:{delegator_address:t,validator_src_address:e,validator_dst_address:r},entries:o.map(s=>s.toData())}}static fromProto(t){const e=t.redelegation;return new Nt(e.delegatorAddress,e.validatorDstAddress,e.validatorDstAddress,t.entries.map(r=>Nt.Entry.fromProto(r)))}toProto(){const{delegator_address:t,validator_src_address:e,validator_dst_address:r,entries:o}=this;return ct.RedelegationResponse.fromPartial({entries:o.map(s=>s.toProto()),redelegation:ct.Redelegation.fromPartial({delegatorAddress:t,entries:o.map(s=>s.toProto().redelegationEntry),validatorDstAddress:r,validatorSrcAddress:e})})}}(i=>{class t extends m{constructor(o,s,n,a,c){super();p(this,"initial_balance");p(this,"shares_dst");p(this,"balance");this.creation_height=a,this.completion_time=c,this.initial_balance=new u(o),this.balance=new u(s),this.shares_dst=new u(n)}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 fromAmino(o){const{redelegation_entry:{initial_balance:s,shares_dst:n,creation_height:a,completion_time:c},balance:d}=o;return new t(u.fromAmino(s),u.fromAmino(d),u.fromAmino(n),a,new Date(c))}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 fromData(o){const{redelegation_entry:{initial_balance:s,shares_dst:n,creation_height:a,completion_time:c},balance:d}=o;return new t(u.fromData(s),u.fromData(d),u.fromData(n),a,new Date(c))}toProto(){const{initial_balance:o,balance:s,shares_dst:n,creation_height:a,completion_time:c}=this;return ct.RedelegationEntryResponse.fromPartial({balance:s.toProto(),redelegationEntry:ct.RedelegationEntry.fromPartial({completionTime:c,creationHeight:f.fromNumber(a),initialBalance:o.toProto(),sharesDst:n.toProto()})})}static fromProto(o){const s=o.redelegationEntry;return new t(u.fromProto(s.initialBalance),u.fromProto(o.balance),u.fromProto(s.sharesDst),s.creationHeight.toNumber(),s.completionTime)}}i.Entry=t})(Nt||(Nt={}));class pt extends m{constructor(t,e,r){super(),this.delegator_address=t,this.validator_address=e,this.entries=r}static fromAmino(t){const{delegator_address:e,validator_address:r,entries:o}=t;return new pt(e,r,o.map(s=>pt.Entry.fromAmino(s)))}toAmino(){const{delegator_address:t,validator_address:e,entries:r}=this;return{delegator_address:t,validator_address:e,entries:r.map(o=>o.toAmino())}}static fromData(t){const{delegator_address:e,validator_address:r,entries:o}=t;return new pt(e,r,o.map(s=>pt.Entry.fromData(s)))}toData(){const{delegator_address:t,validator_address:e,entries:r}=this;return{delegator_address:t,validator_address:e,entries:r.map(o=>o.toData())}}toProto(){const{delegator_address:t,validator_address:e,entries:r}=this;return ct.UnbondingDelegation.fromPartial({delegatorAddress:t,entries:r.map(o=>o.toProto()),validatorAddress:e})}static fromProto(t){return new pt(t.delegatorAddress,t.validatorAddress,t.entries.map(e=>pt.Entry.fromProto(e)))}}(i=>{class t extends m{constructor(o,s,n,a){super();p(this,"initial_balance");p(this,"balance");this.creation_height=n,this.completion_time=a,this.initial_balance=new u(o),this.balance=new u(s)}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 fromAmino(o){const{initial_balance:s,balance:n,creation_height:a,completion_time:c}=o;return new t(u.fromAmino(s),u.fromAmino(n),Number.parseInt(a),new Date(c))}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 fromData(o){const{initial_balance:s,balance:n,creation_height:a,completion_time:c}=o;return new t(u.fromData(s),u.fromData(n),Number.parseInt(a),new Date(c))}toProto(){const{initial_balance:o,balance:s,creation_height:n,completion_time:a}=this;return ct.UnbondingDelegationEntry.fromPartial({balance:s.toProto(),completionTime:a,creationHeight:f.fromNumber(n),initialBalance:o.toProto()})}static fromProto(o){return new t(u.fromProto(o.initialBalance),u.fromProto(o.balance),o.creationHeight.toNumber(),o.completionTime)}}i.Entry=t})(pt||(pt={}));class Po extends m{constructor(t,e,r,o){super(),this.authority=t,this.moniker=e,this.validator_address=r,this.pubkey=o}static fromAmino(t){const{value:{authority:e,moniker:r,validator_address:o,pubkey:s}}=t;return new Po(e,r,o,j.fromAmino(s))}toAmino(){const{authority:t,moniker:e,validator_address:r,pubkey:o}=this;return{type:"opchild/MsgAddValidator",value:{authority:t,moniker:e,validator_address:r,pubkey:o.toAmino()}}}static fromData(t){const{authority:e,moniker:r,validator_address:o,pubkey:s}=t;return new Po(e,r,o,j.fromData(s))}toData(){const{authority:t,moniker:e,validator_address:r,pubkey:o}=this;return{"@type":"/opinit.opchild.v1.MsgAddValidator",authority:t,moniker:e,validator_address:r,pubkey:o.toData()}}static fromProto(t){return new Po(t.authority,t.moniker,t.validatorAddress,j.unpackAny(t.pubkey))}toProto(){const{authority:t,moniker:e,validator_address:r,pubkey:o}=this;return R.MsgAddValidator.fromPartial({authority:t,moniker:e,validatorAddress:r,pubkey:o.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgAddValidator",value:R.MsgAddValidator.encode(this.toProto()).finish()})}static unpackAny(t){return Po.fromProto(R.MsgAddValidator.decode(t.value))}}class wo extends m{constructor(t,e){super(),this.authority=t,this.validator_address=e}static fromAmino(t){const{value:{authority:e,validator_address:r}}=t;return new wo(e,r)}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:r}=t;return new wo(e,r)}toData(){const{authority:t,validator_address:e}=this;return{"@type":"/opinit.opchild.v1.MsgRemoveValidator",authority:t,validator_address:e}}static fromProto(t){return new wo(t.authority,t.validatorAddress)}toProto(){const{authority:t,validator_address:e}=this;return R.MsgRemoveValidator.fromPartial({authority:t,validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgRemoveValidator",value:R.MsgRemoveValidator.encode(this.toProto()).finish()})}static unpackAny(t){return wo.fromProto(R.MsgRemoveValidator.decode(t.value))}}class Do extends m{constructor(t,e,r,o,s,n,a,c){super(),this.sender=t,this.from=e,this.to=r,this.amount=o,this.sequence=s,this.height=n,this.base_denom=a,this.data=c}static fromAmino(t){const{value:{sender:e,from:r,to:o,amount:s,sequence:n,height:a,base_denom:c,data:d}}=t;return new Do(e,r,o,v.fromAmino(s),Number.parseInt(n),Number.parseInt(a),c,d)}toAmino(){const{sender:t,from:e,to:r,amount:o,sequence:s,height:n,base_denom:a,data:c}=this;return{type:"opchild/MsgFinalizeTokenDeposit",value:{sender:t,from:e,to:r,amount:o.toAmino(),sequence:s.toString(),height:n.toString(),base_denom:a,data:c}}}static fromData(t){const{sender:e,from:r,to:o,amount:s,sequence:n,height:a,base_denom:c,data:d}=t;return new Do(e,r,o,v.fromData(s),Number.parseInt(n),Number.parseInt(a),c,d)}toData(){const{sender:t,from:e,to:r,amount:o,sequence:s,height:n,base_denom:a,data:c}=this;return{"@type":"/opinit.opchild.v1.MsgFinalizeTokenDeposit",sender:t,from:e,to:r,amount:o.toData(),sequence:s.toString(),height:n.toString(),base_denom:a,data:c}}static fromProto(t){return new Do(t.sender,t.from,t.to,v.fromProto(t.amount),t.sequence.toNumber(),t.height.toNumber(),t.baseDenom,t.data.length?Buffer.from(t.data).toString("base64"):void 0)}toProto(){const{sender:t,from:e,to:r,amount:o,sequence:s,height:n,base_denom:a,data:c}=this;return R.MsgFinalizeTokenDeposit.fromPartial({sender:t,from:e,to:r,amount:o.toProto(),sequence:f.fromNumber(s),height:f.fromNumber(n),baseDenom:a,data:c?Buffer.from(c,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgFinalizeTokenDeposit",value:R.MsgFinalizeTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return Do.fromProto(R.MsgFinalizeTokenDeposit.decode(t.value))}}class ko extends m{constructor(t,e,r){super(),this.sender=t,this.to=e,this.amount=r}static fromAmino(t){const{value:{sender:e,to:r,amount:o}}=t;return new ko(e,r,v.fromAmino(o))}toAmino(){const{sender:t,to:e,amount:r}=this;return{type:"opchild/MsgInitiateTokenWithdrawal",value:{sender:t,to:e,amount:r.toAmino()}}}static fromData(t){const{sender:e,to:r,amount:o}=t;return new ko(e,r,v.fromData(o))}toData(){const{sender:t,to:e,amount:r}=this;return{"@type":"/opinit.opchild.v1.MsgInitiateTokenWithdrawal",sender:t,to:e,amount:r.toData()}}static fromProto(t){return new ko(t.sender,t.to,v.fromProto(t.amount))}toProto(){const{sender:t,to:e,amount:r}=this;return R.MsgInitiateTokenWithdrawal.fromPartial({sender:t,to:e,amount:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgInitiateTokenWithdrawal",value:R.MsgInitiateTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return ko.fromProto(R.MsgInitiateTokenWithdrawal.decode(t.value))}}class Mo extends m{constructor(t,e){super(),this.sender=t,this.messages=e}static fromAmino(t){const{value:{sender:e,messages:r}}=t;return new Mo(e,r.map(exports.Msg.fromAmino))}toAmino(){const{sender:t,messages:e}=this;return{type:"opchild/MsgExecuteMessages",value:{sender:t,messages:e.map(r=>r.toAmino())}}}static fromData(t){const{sender:e,messages:r}=t;return new Mo(e,r.map(exports.Msg.fromData))}toData(){const{sender:t,messages:e}=this;return{"@type":"/opinit.opchild.v1.MsgExecuteMessages",sender:t,messages:e.map(r=>r.toData())}}static fromProto(t){return new Mo(t.sender,t.messages.map(exports.Msg.fromProto))}toProto(){const{sender:t,messages:e}=this;return R.MsgExecuteMessages.fromPartial({sender:t,messages:e.map(r=>r.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgExecuteMessages",value:R.MsgExecuteMessages.encode(this.toProto()).finish()})}static unpackAny(t){return Mo.fromProto(R.MsgExecuteMessages.decode(t.value))}}class xo extends m{constructor(e,r,o){super();p(this,"amount");this.authority=e,this.recipient=r,this.amount=new u(o)}static fromAmino(e){const{value:{authority:r,recipient:o,amount:s}}=e;return new xo(r,o,u.fromAmino(s))}toAmino(){const{authority:e,recipient:r,amount:o}=this;return{type:"opchild/MsgSpendFeePool",value:{authority:e,recipient:r,amount:o.toAmino()}}}static fromData(e){const{authority:r,recipient:o,amount:s}=e;return new xo(r,o,u.fromData(s))}toData(){const{authority:e,recipient:r,amount:o}=this;return{"@type":"/opinit.opchild.v1.MsgSpendFeePool",authority:e,recipient:r,amount:o.toData()}}static fromProto(e){return new xo(e.authority,e.recipient,u.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return R.MsgSpendFeePool.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSpendFeePool",value:R.MsgSpendFeePool.encode(this.toProto()).finish()})}static unpackAny(e){return xo.fromProto(R.MsgSpendFeePool.decode(e.value))}}class So extends m{constructor(t,e,r){super(),this.submitter=t,this.bridge_id=e,this.batch_bytes=r}static fromAmino(t){const{value:{submitter:e,bridge_id:r,batch_bytes:o}}=t;return new So(e,Number.parseInt(r),o)}toAmino(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return{type:"ophost/MsgRecordBatch",value:{submitter:t,bridge_id:e.toString(),batch_bytes:r}}}static fromData(t){const{submitter:e,bridge_id:r,batch_bytes:o}=t;return new So(e,Number.parseInt(r),o)}toData(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return{"@type":"/opinit.ophost.v1.MsgRecordBatch",submitter:t,bridge_id:e.toString(),batch_bytes:r}}static fromProto(t){return new So(t.submitter,t.bridgeId.toNumber(),Buffer.from(t.batchBytes).toString("base64"))}toProto(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return S.MsgRecordBatch.fromPartial({submitter:t,bridgeId:f.fromNumber(e),batchBytes:r?Buffer.from(r,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgRecordBatch",value:S.MsgRecordBatch.encode(this.toProto()).finish()})}static unpackAny(t){return So.fromProto(S.MsgRecordBatch.decode(t.value))}}class lt extends m{constructor(t,e){super(),this.submitter=t,this.chain_type=e}static fromAmino(t){const{submitter:e,chain_type:r}=t;return new lt(e,ie.batchInfo_ChainTypeFromJSON(r))}toAmino(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:ie.batchInfo_ChainTypeToJSON(e)}}static fromData(t){const{submitter:e,chain_type:r}=t;return new lt(e,ie.batchInfo_ChainTypeFromJSON(r))}toData(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:ie.batchInfo_ChainTypeToJSON(e)}}static fromProto(t){return new lt(t.submitter,t.chainType)}toProto(){const{submitter:t,chain_type:e}=this;return ie.BatchInfo.fromPartial({submitter:t,chainType:e})}}class jt extends m{constructor(t,e,r,o,s,n,a,c){super(),this.challengers=t,this.proposer=e,this.batch_info=r,this.submission_interval=o,this.finalization_period=s,this.submission_start_height=n,this.oracle_enabled=a,this.metadata=c}static fromAmino(t){const{challengers:e,proposer:r,batch_info:o,submission_interval:s,finalization_period:n,submission_start_height:a,oracle_enabled:c,metadata:d}=t;return new jt(e,r,lt.fromAmino(o),D.fromAmino(s),D.fromAmino(n),Number.parseInt(a),c,d)}toAmino(){const{challengers:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:c}=this;return{challengers:t,proposer:e,batch_info:r.toAmino(),submission_interval:o.toAmino(),finalization_period:s.toAmino(),submission_start_height:n.toString(),oracle_enabled:a,metadata:c}}static fromData(t){const{challengers:e,proposer:r,batch_info:o,submission_interval:s,finalization_period:n,submission_start_height:a,oracle_enabled:c,metadata:d}=t;return new jt(e,r,lt.fromData(o),D.fromData(s),D.fromData(n),Number.parseInt(a),c,d)}toData(){const{challengers:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:c}=this;return{challengers:t,proposer:e,batch_info:r.toData(),submission_interval:o.toData(),finalization_period:s.toData(),submission_start_height:n.toString(),oracle_enabled:a,metadata:c}}static fromProto(t){return new jt(t.challengers,t.proposer,lt.fromProto(t.batchInfo),D.fromProto(t.submissionInterval),D.fromProto(t.finalizationPeriod),t.submissionStartHeight.toNumber(),t.oracleEnabled,Buffer.from(t.metadata).toString("base64"))}toProto(){const{challengers:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:c}=this;return ie.BridgeConfig.fromPartial({challengers:t,proposer:e,batchInfo:r.toProto(),submissionInterval:o.toProto(),finalizationPeriod:s.toProto(),submissionStartHeight:f.fromNumber(n),oracleEnabled:a,metadata:c?Buffer.from(c,"base64"):void 0})}}class Io extends m{constructor(t,e){super(),this.creator=t,this.config=e}static fromAmino(t){const{value:{creator:e,config:r}}=t;return new Io(e,jt.fromAmino(r))}toAmino(){const{creator:t,config:e}=this;return{type:"ophost/MsgCreateBridge",value:{creator:t,config:e.toAmino()}}}static fromData(t){const{creator:e,config:r}=t;return new Io(e,jt.fromData(r))}toData(){const{creator:t,config:e}=this;return{"@type":"/opinit.ophost.v1.MsgCreateBridge",creator:t,config:e.toData()}}static fromProto(t){return new Io(t.creator,jt.fromProto(t.config))}toProto(){const{creator:t,config:e}=this;return S.MsgCreateBridge.fromPartial({creator:t,config:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgCreateBridge",value:S.MsgCreateBridge.encode(this.toProto()).finish()})}static unpackAny(t){return Io.fromProto(S.MsgCreateBridge.decode(t.value))}}class No extends m{constructor(t,e,r,o,s){super(),this.proposer=t,this.bridge_id=e,this.output_index=r,this.l2_block_number=o,this.output_root=s}static fromAmino(t){const{value:{proposer:e,bridge_id:r,output_index:o,l2_block_number:s,output_root:n}}=t;return new No(e,Number.parseInt(r),Number.parseInt(o),Number.parseInt(s),n)}toAmino(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:s}=this;return{type:"ophost/MsgProposeOutput",value:{proposer:t,bridge_id:e.toString(),output_index:r.toString(),l2_block_number:o.toString(),output_root:s}}}static fromData(t){const{proposer:e,bridge_id:r,output_index:o,l2_block_number:s,output_root:n}=t;return new No(e,Number.parseInt(r),Number.parseInt(o),Number.parseInt(s),n)}toData(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:s}=this;return{"@type":"/opinit.ophost.v1.MsgProposeOutput",proposer:t,bridge_id:e.toString(),output_index:r.toString(),l2_block_number:o.toString(),output_root:s}}static fromProto(t){return new No(t.proposer,t.bridgeId.toNumber(),t.outputIndex.toNumber(),t.l2BlockNumber.toNumber(),Buffer.from(t.outputRoot).toString("base64"))}toProto(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:s}=this;return S.MsgProposeOutput.fromPartial({proposer:t,bridgeId:f.fromNumber(e),outputIndex:f.fromNumber(r),l2BlockNumber:f.fromNumber(o),outputRoot:s?Buffer.from(s,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgProposeOutput",value:S.MsgProposeOutput.encode(this.toProto()).finish()})}static unpackAny(t){return No.fromProto(S.MsgProposeOutput.decode(t.value))}}class Co extends m{constructor(t,e,r){super(),this.challenger=t,this.bridge_id=e,this.output_index=r}static fromAmino(t){const{value:{challenger:e,bridge_id:r,output_index:o}}=t;return new Co(e,Number.parseInt(r),Number.parseInt(o))}toAmino(){const{challenger:t,bridge_id:e,output_index:r}=this;return{type:"ophost/MsgDeleteOutput",value:{challenger:t,bridge_id:e.toString(),output_index:r.toString()}}}static fromData(t){const{challenger:e,bridge_id:r,output_index:o}=t;return new Co(e,Number.parseInt(r),Number.parseInt(o))}toData(){const{challenger:t,bridge_id:e,output_index:r}=this;return{"@type":"/opinit.ophost.v1.MsgDeleteOutput",challenger:t,bridge_id:e.toString(),output_index:r.toString()}}static fromProto(t){return new Co(t.challenger,t.bridgeId.toNumber(),t.outputIndex.toNumber())}toProto(){const{challenger:t,bridge_id:e,output_index:r}=this;return S.MsgDeleteOutput.fromPartial({challenger:t,bridgeId:f.fromNumber(e),outputIndex:f.fromNumber(r)})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgDeleteOutput",value:S.MsgDeleteOutput.encode(this.toProto()).finish()})}static unpackAny(t){return Co.fromProto(S.MsgDeleteOutput.decode(t.value))}}class Uo extends m{constructor(t,e,r,o,s){super(),this.sender=t,this.bridge_id=e,this.to=r,this.amount=o,this.data=s}static fromAmino(t){const{value:{sender:e,bridge_id:r,to:o,amount:s,data:n}}=t;return new Uo(e,Number.parseInt(r),o,v.fromAmino(s),n)}toAmino(){const{sender:t,bridge_id:e,to:r,amount:o,data:s}=this;return{type:"ophost/MsgInitiateTokenDeposit",value:{sender:t,bridge_id:e.toString(),to:r,amount:o.toAmino(),data:s}}}static fromData(t){const{sender:e,bridge_id:r,to:o,amount:s,data:n}=t;return new Uo(e,Number.parseInt(r),o,v.fromData(s),n)}toData(){const{sender:t,bridge_id:e,to:r,amount:o,data:s}=this;return{"@type":"/opinit.ophost.v1.MsgInitiateTokenDeposit",sender:t,bridge_id:e.toString(),to:r,amount:o.toData(),data:s}}static fromProto(t){return new Uo(t.sender,t.bridgeId.toNumber(),t.to,v.fromProto(t.amount),t.data.length?Buffer.from(t.data).toString("base64"):void 0)}toProto(){const{sender:t,bridge_id:e,to:r,amount:o,data:s}=this;return S.MsgInitiateTokenDeposit.fromPartial({sender:t,bridgeId:f.fromNumber(e),to:r,amount:o.toProto(),data:s?Buffer.from(s,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgInitiateTokenDeposit",value:S.MsgInitiateTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return Uo.fromProto(S.MsgInitiateTokenDeposit.decode(t.value))}}class Eo extends m{constructor(t,e,r,o,s,n,a,c,d,h,g){super(),this.sender=t,this.bridge_id=e,this.output_index=r,this.withdrawal_proofs=o,this.from=s,this.to=n,this.sequence=a,this.amount=c,this.version=d,this.storage_root=h,this.last_block_hash=g}static fromAmino(t){const{value:{sender:e,bridge_id:r,output_index:o,withdrawal_proofs:s,from:n,to:a,sequence:c,amount:d,version:h,storage_root:g,last_block_hash:y}}=t;return new Eo(e,Number.parseInt(r),Number.parseInt(o),s,n,a,Number.parseInt(c),v.fromAmino(d),h,g,y)}toAmino(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:s,to:n,sequence:a,amount:c,version:d,storage_root:h,last_block_hash:g}=this;return{type:"ophost/MsgFinalizeTokenWithdrawal",value:{sender:t,bridge_id:e.toString(),output_index:r.toString(),withdrawal_proofs:o,from:s,to:n,sequence:a.toString(),amount:c.toAmino(),version:d,storage_root:h,last_block_hash:g}}}static fromData(t){const{sender:e,bridge_id:r,output_index:o,withdrawal_proofs:s,from:n,to:a,sequence:c,amount:d,version:h,storage_root:g,last_block_hash:y}=t;return new Eo(e,Number.parseInt(r),Number.parseInt(o),s,n,a,Number.parseInt(c),v.fromData(d),h,g,y)}toData(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:s,to:n,sequence:a,amount:c,version:d,storage_root:h,last_block_hash:g}=this;return{"@type":"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",sender:t,bridge_id:e.toString(),output_index:r.toString(),withdrawal_proofs:o,from:s,to:n,sequence:a.toString(),amount:c.toData(),version:d,storage_root:h,last_block_hash:g}}static fromProto(t){return new Eo(t.sender,t.bridgeId.toNumber(),t.outputIndex.toNumber(),t.withdrawalProofs.map(e=>Buffer.from(e).toString("base64")),t.from,t.to,t.sequence.toNumber(),v.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:r,withdrawal_proofs:o,from:s,to:n,sequence:a,amount:c,version:d,storage_root:h,last_block_hash:g}=this;return S.MsgFinalizeTokenWithdrawal.fromPartial({sender:t,bridgeId:f.fromNumber(e),outputIndex:f.fromNumber(r),withdrawalProofs:o.map(y=>Buffer.from(y,"base64")),from:s,to:n,sequence:f.fromNumber(a),amount:c.toProto(),version:Buffer.from(d,"base64"),storageRoot:Buffer.from(h,"base64"),lastBlockHash:Buffer.from(g,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",value:S.MsgFinalizeTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return Eo.fromProto(S.MsgFinalizeTokenWithdrawal.decode(t.value))}}class Bo extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.new_proposer=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,new_proposer:o}}=t;return new Bo(e,Number.parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,new_proposer:r}=this;return{type:"ophost/MsgUpdateProposer",value:{authority:t,bridge_id:e.toString(),new_proposer:r}}}static fromData(t){const{authority:e,bridge_id:r,new_proposer:o}=t;return new Bo(e,Number.parseInt(r),o)}toData(){const{authority:t,bridge_id:e,new_proposer:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateProposer",authority:t,bridge_id:e.toString(),new_proposer:r}}static fromProto(t){return new Bo(t.authority,t.bridgeId.toNumber(),t.newProposer)}toProto(){const{authority:t,bridge_id:e,new_proposer:r}=this;return S.MsgUpdateProposer.fromPartial({authority:t,bridgeId:f.fromNumber(e),newProposer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateProposer",value:S.MsgUpdateProposer.encode(this.toProto()).finish()})}static unpackAny(t){return Bo.fromProto(S.MsgUpdateProposer.decode(t.value))}}class Oo extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.new_challengers=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,new_challengers:o}}=t;return new Oo(e,Number.parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,new_challengers:r}=this;return{type:"ophost/MsgUpdateChallengers",value:{authority:t,bridge_id:e.toString(),new_challengers:r}}}static fromData(t){const{authority:e,bridge_id:r,new_challengers:o}=t;return new Oo(e,Number.parseInt(r),o)}toData(){const{authority:t,bridge_id:e,new_challengers:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateChallengers",authority:t,bridge_id:e.toString(),new_challengers:r}}static fromProto(t){return new Oo(t.authority,t.bridgeId.toNumber(),t.newChallengers)}toProto(){const{authority:t,bridge_id:e,new_challengers:r}=this;return S.MsgUpdateChallengers.fromPartial({authority:t,bridgeId:f.fromNumber(e),newChallengers:r})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateChallengers",value:S.MsgUpdateChallengers.encode(this.toProto()).finish()})}static unpackAny(t){return Oo.fromProto(S.MsgUpdateChallengers.decode(t.value))}}class To extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.new_batch_info=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,new_batch_info:o}}=t;return new To(e,Number.parseInt(r),lt.fromAmino(o))}toAmino(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return{type:"ophost/MsgUpdateBatchInfo",value:{authority:t,bridge_id:e.toString(),new_batch_info:r.toAmino()}}}static fromData(t){const{authority:e,bridge_id:r,new_batch_info:o}=t;return new To(e,Number.parseInt(r),lt.fromData(o))}toData(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateBatchInfo",authority:t,bridge_id:e.toString(),new_batch_info:r.toData()}}static fromProto(t){return new To(t.authority,t.bridgeId.toNumber(),lt.fromProto(t.newBatchInfo))}toProto(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return S.MsgUpdateBatchInfo.fromPartial({authority:t,bridgeId:f.fromNumber(e),newBatchInfo:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateBatchInfo",value:S.MsgUpdateBatchInfo.encode(this.toProto()).finish()})}static unpackAny(t){return To.fromProto(S.MsgUpdateBatchInfo.decode(t.value))}}class Ro extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.oracle_enabled=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,oracle_enabled:o}}=t;return new Ro(e,Number.parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return{type:"ophost/MsgUpdateOracleConfig",value:{authority:t,bridge_id:e.toString(),oracle_enabled:r}}}static fromData(t){const{authority:e,bridge_id:r,oracle_enabled:o}=t;return new Ro(e,Number.parseInt(r),o)}toData(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateOracleConfig",authority:t,bridge_id:e.toString(),oracle_enabled:r}}static fromProto(t){return new Ro(t.authority,t.bridgeId.toNumber(),t.oracleEnabled)}toProto(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return S.MsgUpdateOracleConfig.fromPartial({authority:t,bridgeId:f.fromNumber(e),oracleEnabled:r})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateOracleConfig",value:S.MsgUpdateOracleConfig.encode(this.toProto()).finish()})}static unpackAny(t){return Ro.fromProto(S.MsgUpdateOracleConfig.decode(t.value))}}class qo extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.metadata=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,metadata:o}}=t;return new qo(e,Number.parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,metadata:r}=this;return{type:"ophost/MsgUpdateMetadata",value:{authority:t,bridge_id:e.toString(),metadata:r}}}static fromData(t){const{authority:e,bridge_id:r,metadata:o}=t;return new qo(e,Number.parseInt(r),o)}toData(){const{authority:t,bridge_id:e,metadata:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateMetadata",authority:t,bridge_id:e.toString(),metadata:r}}static fromProto(t){return new qo(t.authority,t.bridgeId.toNumber(),Buffer.from(t.metadata).toString("base64"))}toProto(){const{authority:t,bridge_id:e,metadata:r}=this;return S.MsgUpdateMetadata.fromPartial({authority:t,bridgeId:f.fromNumber(e),metadata:Buffer.from(r,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateMetadata",value:S.MsgUpdateMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return qo.fromProto(S.MsgUpdateMetadata.decode(t.value))}}class _s extends m{constructor(e){super();p(this,"registration_fee");this.registration_fee=new u(e)}static fromAmino(e){return new _s(u.fromAmino(e.value.registration_fee))}toAmino(){return{type:"ophost/Params",value:{registration_fee:this.registration_fee.toAmino()}}}static fromData(e){return new _s(u.fromData(e.registration_fee))}toData(){return{"@type":"/opinit.ophost.v1.Params",registration_fee:this.registration_fee.toData()}}static fromProto(e){return new _s(u.fromProto(e.registrationFee))}toProto(){return ie.Params.fromPartial({registrationFee:this.registration_fee.toProto()})}}class Fo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Fo(e,_s.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"ophost/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Fo(e,_s.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Fo(t.authority,_s.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return S.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateParams",value:S.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Fo.fromProto(S.MsgUpdateParams.decode(t.value))}}class Qt extends m{constructor(t,e,r,o){super(),this.output_root=t,this.l1_block_number=e,this.l1_block_time=r,this.l2_block_number=o}static fromAmino(t){const{output_root:e,l1_block_number:r,l1_block_time:o,l2_block_number:s}=t;return new Qt(e,Number.parseInt(r),new Date(o),Number.parseInt(s))}toAmino(){const{output_root:t,l1_block_number:e,l1_block_time:r,l2_block_number:o}=this;return{output_root:t,l1_block_number:e.toString(),l1_block_time:r.toISOString(),l2_block_number:o.toString()}}static fromData(t){const{output_root:e,l1_block_number:r,l1_block_time:o,l2_block_number:s}=t;return new Qt(e,Number.parseInt(r),new Date(o),Number.parseInt(s))}toData(){const{output_root:t,l1_block_number:e,l1_block_time:r,l2_block_number:o}=this;return{output_root:t,l1_block_number:e.toString(),l1_block_time:r.toISOString(),l2_block_number:o.toString()}}static fromProto(t){return new Qt(Buffer.from(t.outputRoot).toString("base64"),t.l1BlockNumber.toNumber(),t.l1BlockTime,t.l2BlockNumber.toNumber())}toProto(){const{output_root:t,l1_block_number:e,l1_block_time:r,l2_block_number:o}=this;return ie.Output.fromPartial({outputRoot:Buffer.from(t,"base64"),l1BlockNumber:f.fromNumber(e),l1BlockTime:r,l2BlockNumber:f.fromNumber(o)})}}class Xn extends m{constructor(t,e){super(),this.batch_info=t,this.output=e}static fromAmino(t){const{batch_info:e,output:r}=t;return new Xn(lt.fromAmino(e),Qt.fromAmino(r))}toAmino(){const{batch_info:t,output:e}=this;return{batch_info:t.toAmino(),output:e.toAmino()}}static fromData(t){const{batch_info:e,output:r}=t;return new Xn(lt.fromData(e),Qt.fromData(r))}toData(){const{batch_info:t,output:e}=this;return{batch_info:t.toData(),output:e.toData()}}static fromProto(t){return new Xn(lt.fromProto(t.batchInfo),Qt.fromProto(t.output))}toProto(){const{batch_info:t,output:e}=this;return ie.BatchInfoWithOutput.fromPartial({batchInfo:t.toProto(),output:e.toProto()})}}class Yt extends m{constructor(t,e,r,o,s){super(),this.bridge_id=t,this.bridge_addr=e,this.l1_chain_id=r,this.l1_client_id=o,this.bridge_config=s}static fromAmino(t){const{bridge_id:e,bridge_addr:r,l1_chain_id:o,l1_client_id:s,bridge_config:n}=t;return new Yt(Number.parseInt(e),r,o,s,jt.fromAmino(n))}toAmino(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s}=this;return{bridge_id:t.toString(),bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s.toAmino()}}static fromData(t){const{bridge_id:e,bridge_addr:r,l1_chain_id:o,l1_client_id:s,bridge_config:n}=t;return new Yt(Number.parseInt(e),r,o,s,jt.fromData(n))}toData(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s}=this;return{bridge_id:t.toString(),bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s.toData()}}static fromProto(t){return new Yt(t.bridgeId.toNumber(),t.bridgeAddr,t.l1ChainId,t.l1ClientId,jt.fromProto(t.bridgeConfig))}toProto(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s}=this;return ni.BridgeInfo.fromPartial({bridgeId:f.fromNumber(t),bridgeAddr:e,l1ChainId:r,l1ClientId:o,bridgeConfig:s.toProto()})}}class $o extends m{constructor(t,e){super(),this.sender=t,this.bridge_info=e}static fromAmino(t){const{value:{sender:e,bridge_info:r}}=t;return new $o(e,Yt.fromAmino(r))}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:r}=t;return new $o(e,Yt.fromData(r))}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 $o(t.sender,Yt.fromProto(t.bridgeInfo))}toProto(){const{sender:t,bridge_info:e}=this;return R.MsgSetBridgeInfo.fromPartial({sender:t,bridgeInfo:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSetBridgeInfo",value:R.MsgSetBridgeInfo.encode(this.toProto()).finish()})}static unpackAny(t){return $o.fromProto(R.MsgSetBridgeInfo.decode(t.value))}}class Lo extends m{constructor(t,e,r){super(),this.sender=t,this.height=e,this.data=r}static fromAmino(t){return new Lo(t.value.sender,Number.parseInt(t.value.height),t.value.data)}toAmino(){const{sender:t,height:e,data:r}=this;return{type:"opchild/MsgUpdateOracle",value:{sender:t,height:e.toString(),data:r}}}static fromData(t){return new Lo(t.sender,Number.parseInt(t.height),t.data)}toData(){const{sender:t,height:e,data:r}=this;return{"@type":"/opinit.opchild.v1.MsgUpdateOracle",sender:t,height:e.toString(),data:r}}static fromProto(t){return new Lo(t.sender,t.height.toNumber(),Buffer.from(t.data).toString("base64"))}toProto(){const{sender:t,height:e,data:r}=this;return R.MsgUpdateOracle.fromPartial({sender:t,height:f.fromNumber(e),data:Buffer.from(r,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateOracle",value:R.MsgUpdateOracle.encode(this.toProto()).finish()})}static unpackAny(t){return Lo.fromProto(R.MsgUpdateOracle.decode(t.value))}}class vs extends m{constructor(e,r,o,s,n,a){super();p(this,"min_gas_prices");this.max_validators=e,this.historical_entries=r,this.bridge_executors=s,this.admin=n,this.fee_whitelist=a,this.min_gas_prices=new u(o)}static fromAmino(e){const{value:{max_validators:r,historical_entries:o,min_gas_prices:s,bridge_executors:n,admin:a,fee_whitelist:c}}=e;return new vs(r,o,u.fromAmino(s),n,a,c)}toAmino(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:s,admin:n,fee_whitelist:a}=this;return{type:"opchild/Params",value:{max_validators:e,historical_entries:r,min_gas_prices:o.toAmino(),bridge_executors:s,admin:n,fee_whitelist:a}}}static fromData(e){const{max_validators:r,historical_entries:o,min_gas_prices:s,bridge_executors:n,admin:a,fee_whitelist:c}=e;return new vs(r,o,u.fromData(s),n,a,c)}toData(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:s,admin:n,fee_whitelist:a}=this;return{"@type":"/opinit.opchild.v1.Params",max_validators:e,historical_entries:r,min_gas_prices:o.toData(),bridge_executors:s,admin:n,fee_whitelist:a}}static fromProto(e){return new vs(e.maxValidators,e.historicalEntries,u.fromProto(e.minGasPrices),e.bridgeExecutors,e.admin,e.feeWhitelist)}toProto(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:s,admin:n,fee_whitelist:a}=this;return ni.Params.fromPartial({maxValidators:e,historicalEntries:r,minGasPrices:o.toProto(),bridgeExecutors:s,admin:n,feeWhitelist:a})}}class zo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new zo(e,vs.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"opchild/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new zo(e,vs.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/opinit.opchild.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new zo(t.authority,vs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return R.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateParams",value:R.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return zo.fromProto(R.MsgUpdateParams.decode(t.value))}}class bn extends m{constructor(t,e,r,o){super(),this.moniker=t,this.operator_address=e,this.consensus_pubkey=r,this.cons_power=o}static fromAmino(t){const{moniker:e,operator_address:r,consensus_pubkey:o,cons_power:s}=t;return new bn(e,r,j.fromAmino(o),Number.parseInt(s))}toAmino(){const{moniker:t,operator_address:e,consensus_pubkey:r,cons_power:o}=this;return{moniker:t,operator_address:e,consensus_pubkey:r.toAmino(),cons_power:o.toString()}}static fromData(t){const{moniker:e,operator_address:r,consensus_pubkey:o,cons_power:s}=t;return new bn(e,r,j.fromData(o),Number.parseInt(s))}toData(){const{moniker:t,operator_address:e,consensus_pubkey:r,cons_power:o}=this;return{moniker:t,operator_address:e,consensus_pubkey:r.toData(),cons_power:o.toString()}}static fromProto(t){return new bn(t.moniker,t.operatorAddress,j.unpackAny(t.consensusPubkey),t.consPower.toNumber())}toProto(){const{moniker:t,operator_address:e,consensus_pubkey:r,cons_power:o}=this;return ni.Validator.fromPartial({moniker:t,operatorAddress:e,consensusPubkey:r.packAny(),consPower:f.fromNumber(o)})}}class bs extends m{constructor(t,e,r,o,s){super(),this.reward_denom=t,this.dilution_period=e,this.release_rate=r,this.dilution_rate=o,this.release_enabled=s}static fromAmino(t){const{value:{reward_denom:e,dilution_period:r,release_rate:o,dilution_rate:s,release_enabled:n}}=t;return new bs(e,D.fromAmino(r),o,s,n)}toAmino(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:s}=this;return{type:"reward/Params",value:{reward_denom:t,dilution_period:e.toAmino(),release_rate:r,dilution_rate:o,release_enabled:s}}}static fromData(t){const{reward_denom:e,dilution_period:r,release_rate:o,dilution_rate:s,release_enabled:n}=t;return new bs(e,D.fromData(r),o,s,n)}toData(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:s}=this;return{"@type":"/initia.reward.v1.Params",reward_denom:t,dilution_period:e.toData(),release_rate:r,dilution_rate:o,release_enabled:s}}static fromProto(t){return new bs(t.rewardDenom,D.fromProto(t.dilutionPeriod),t.releaseRate,t.dilutionRate,t.releaseEnabled)}toProto(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:s}=this;return qc.Params.fromPartial({rewardDenom:t,dilutionPeriod:e.toProto(),releaseRate:r,dilutionRate:o,releaseEnabled:s})}}class Go extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Go(e,bs.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"reward/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Go(e,bs.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.reward.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Go(t.authority,bs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Qa.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.reward.v1.MsgUpdateParams",value:Qa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Go.fromProto(Qa.MsgUpdateParams.decode(t.value))}}class Vo extends m{constructor(t){super(),this.address=t}static fromAmino(t){const{value:{address:e}}=t;return new Vo(e)}toAmino(){const{address:t}=this;return{type:"cosmos-sdk/MsgUnjail",value:{address:t}}}static fromData(t){const{address:e}=t;return new Vo(e)}toData(){const{address:t}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:t}}static fromProto(t){return new Vo(t.validatorAddr)}toProto(){const{address:t}=this;return On.MsgUnjail.fromPartial({validatorAddr:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:On.MsgUnjail.encode(this.toProto()).finish()})}static unpackAny(t){return Vo.fromProto(On.MsgUnjail.decode(t.value))}}class As extends m{constructor(t,e,r,o,s){super(),this.signed_blocks_window=t,this.min_signed_per_window=e,this.downtime_jail_duration=r,this.slash_fraction_double_sign=o,this.slash_fraction_downtime=s}static fromAmino(t){const{value:{signed_blocks_window:e,min_signed_per_window:r,downtime_jail_duration:o,slash_fraction_double_sign:s,slash_fraction_downtime:n}}=t;return new As(Number.parseInt(e),Number.parseInt(r),D.fromAmino(o),Number.parseInt(s),Number.parseInt(n))}toAmino(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:s}=this;return{type:"cosmos-sdk/x/slashing/Params",value:{signed_blocks_window:t.toString(),min_signed_per_window:e.toString(),downtime_jail_duration:r.toAmino(),slash_fraction_double_sign:o.toString(),slash_fraction_downtime:s.toString()}}}static fromData(t){const{signed_blocks_window:e,min_signed_per_window:r,downtime_jail_duration:o,slash_fraction_double_sign:s,slash_fraction_downtime:n}=t;return new As(Number.parseInt(e),Number.parseInt(r),D.fromData(o),Number.parseInt(s),Number.parseInt(n))}toData(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:s}=this;return{"@type":"/cosmos.slashing.v1beta1.Params",signed_blocks_window:t.toString(),min_signed_per_window:e.toString(),downtime_jail_duration:r.toData(),slash_fraction_double_sign:o.toString(),slash_fraction_downtime:s.toString()}}static fromProto(t){return new As(t.signedBlocksWindow.toNumber(),Number.parseFloat(t.minSignedPerWindow.toString()),D.fromProto(t.downtimeJailDuration),Number.parseFloat(t.slashFractionDoubleSign.toString()),Number.parseFloat(t.slashFractionDowntime.toString()))}toProto(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:s}=this;return Fc.Params.fromPartial({signedBlocksWindow:f.fromNumber(t),minSignedPerWindow:Buffer.from(e.toString()),downtimeJailDuration:r.toProto(),slashFractionDoubleSign:Buffer.from(o.toString()),slashFractionDowntime:Buffer.from(s.toString())})}}class Ko extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ko(e,As.fromAmino(r))}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:r}=t;return new Ko(e,As.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Ko(t.authority,As.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return On.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUpdateParams",value:On.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ko.fromProto(On.MsgUpdateParams.decode(t.value))}}class Wo extends m{constructor(t,e){super(),this.sender=t,this.subdenom=e}static fromAmino(t){const{value:{sender:e,subdenom:r}}=t;return new Wo(e,r)}toAmino(){const{sender:t,subdenom:e}=this;return{type:"tokenfactory/MsgCreateDenom",value:{sender:t,subdenom:e}}}static fromData(t){const{sender:e,subdenom:r}=t;return new Wo(e,r)}toData(){const{sender:t,subdenom:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgCreateDenom",sender:t,subdenom:e}}static fromProto(t){return new Wo(t.sender,t.subdenom)}toProto(){const{sender:t,subdenom:e}=this;return $.MsgCreateDenom.fromPartial({sender:t,subdenom:e})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgCreateDenom",value:$.MsgCreateDenom.encode(this.toProto()).finish()})}static unpackAny(t){return Wo.fromProto($.MsgCreateDenom.decode(t.value))}}class Ho extends m{constructor(t,e,r){super(),this.sender=t,this.amount=e,this.mint_to_address=r}static fromAmino(t){const{value:{sender:e,amount:r,mint_to_address:o}}=t;return new Ho(e,v.fromAmino(r),o)}toAmino(){const{sender:t,amount:e,mint_to_address:r}=this;return{type:"tokenfactory/MsgMint",value:{sender:t,amount:e.toAmino(),mint_to_address:r}}}static fromData(t){const{sender:e,amount:r,mint_to_address:o}=t;return new Ho(e,v.fromData(r),o)}toData(){const{sender:t,amount:e,mint_to_address:r}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgMint",sender:t,amount:e.toData(),mint_to_address:r}}static fromProto(t){return new Ho(t.sender,v.fromProto(t.amount),t.mintToAddress)}toProto(){const{sender:t,amount:e,mint_to_address:r}=this;return $.MsgMint.fromPartial({sender:t,amount:e.toProto(),mintToAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgMint",value:$.MsgMint.encode(this.toProto()).finish()})}static unpackAny(t){return Ho.fromProto($.MsgMint.decode(t.value))}}class Jo extends m{constructor(t,e,r){super(),this.sender=t,this.amount=e,this.burn_from_address=r}static fromAmino(t){const{value:{sender:e,amount:r,burn_from_address:o}}=t;return new Jo(e,v.fromAmino(r),o)}toAmino(){const{sender:t,amount:e,burn_from_address:r}=this;return{type:"tokenfactory/MsgBurn",value:{sender:t,amount:e.toAmino(),burn_from_address:r}}}static fromData(t){const{sender:e,amount:r,burn_from_address:o}=t;return new Jo(e,v.fromData(r),o)}toData(){const{sender:t,amount:e,burn_from_address:r}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgBurn",sender:t,amount:e.toData(),burn_from_address:r}}static fromProto(t){return new Jo(t.sender,v.fromProto(t.amount),t.burnFromAddress)}toProto(){const{sender:t,amount:e,burn_from_address:r}=this;return $.MsgBurn.fromPartial({sender:t,amount:e.toProto(),burnFromAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgBurn",value:$.MsgBurn.encode(this.toProto()).finish()})}static unpackAny(t){return Jo.fromProto($.MsgBurn.decode(t.value))}}class jo extends m{constructor(t,e,r){super(),this.sender=t,this.denom=e,this.new_admin=r}static fromAmino(t){const{value:{sender:e,denom:r,new_admin:o}}=t;return new jo(e,r,o)}toAmino(){const{sender:t,denom:e,new_admin:r}=this;return{type:"tokenfactory/MsgChangeAdmin",value:{sender:t,denom:e,new_admin:r}}}static fromData(t){const{sender:e,denom:r,new_admin:o}=t;return new jo(e,r,o)}toData(){const{sender:t,denom:e,new_admin:r}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgChangeAdmin",sender:t,denom:e,new_admin:r}}static fromProto(t){return new jo(t.sender,t.denom,t.newAdmin)}toProto(){const{sender:t,denom:e,new_admin:r}=this;return $.MsgChangeAdmin.fromPartial({sender:t,denom:e,newAdmin:r})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgChangeAdmin",value:$.MsgChangeAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return jo.fromProto($.MsgChangeAdmin.decode(t.value))}}class Qo extends m{constructor(t,e){super(),this.sender=t,this.metadata=e}static fromAmino(t){const{value:{sender:e,metadata:r}}=t;return new Qo(e,Vt.fromAmino(r))}toAmino(){const{sender:t,metadata:e}=this;return{type:"tokenfactory/MsgSetDenomMetadata",value:{sender:t,metadata:e.toAmino()}}}static fromData(t){const{sender:e,metadata:r}=t;return new Qo(e,Vt.fromData(r))}toData(){const{sender:t,metadata:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata",sender:t,metadata:e.toData()}}static fromProto(t){return new Qo(t.sender,Vt.fromProto(t.metadata))}toProto(){const{sender:t,metadata:e}=this;return $.MsgSetDenomMetadata.fromPartial({sender:t,metadata:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata",value:$.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Qo.fromProto($.MsgSetDenomMetadata.decode(t.value))}}class Yo extends m{constructor(t,e,r){super(),this.sender=t,this.denom=e,this.cosmwasm_address=r}static fromAmino(t){const{value:{sender:e,denom:r,cosmwasm_address:o}}=t;return new Yo(e,r,o)}toAmino(){const{sender:t,denom:e,cosmwasm_address:r}=this;return{type:"tokenfactory/MsgSetBeforeSendHook",value:{sender:t,denom:e,cosmwasm_address:r}}}static fromData(t){const{sender:e,denom:r,cosmwasm_address:o}=t;return new Yo(e,r,o)}toData(){const{sender:t,denom:e,cosmwasm_address:r}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook",sender:t,denom:e,cosmwasm_address:r}}static fromProto(t){return new Yo(t.sender,t.denom,t.cosmwasmAddress)}toProto(){const{sender:t,denom:e,cosmwasm_address:r}=this;return $.MsgSetBeforeSendHook.fromPartial({sender:t,denom:e,cosmwasmAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook",value:$.MsgSetBeforeSendHook.encode(this.toProto()).finish()})}static unpackAny(t){return Yo.fromProto($.MsgSetBeforeSendHook.decode(t.value))}}class Zo extends m{constructor(t,e,r,o){super(),this.sender=t,this.amount=e,this.transfer_from_address=r,this.transfer_to_address=o}static fromAmino(t){const{value:{sender:e,amount:r,transfer_from_address:o,transfer_to_address:s}}=t;return new Zo(e,v.fromAmino(r),o,s)}toAmino(){const{sender:t,amount:e,transfer_from_address:r,transfer_to_address:o}=this;return{type:"tokenfactory/MsgForceTransfer",value:{sender:t,amount:e.toAmino(),transfer_from_address:r,transfer_to_address:o}}}static fromData(t){const{sender:e,amount:r,transfer_from_address:o,transfer_to_address:s}=t;return new Zo(e,v.fromData(r),o,s)}toData(){const{sender:t,amount:e,transfer_from_address:r,transfer_to_address:o}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgForceTransfer",sender:t,amount:e.toData(),transfer_from_address:r,transfer_to_address:o}}static fromProto(t){return new Zo(t.sender,v.fromProto(t.amount),t.transferFromAddress,t.transferToAddress)}toProto(){const{sender:t,amount:e,transfer_from_address:r,transfer_to_address:o}=this;return $.MsgForceTransfer.fromPartial({sender:t,amount:e.toProto(),transferFromAddress:r,transferToAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgForceTransfer",value:$.MsgForceTransfer.encode(this.toProto()).finish()})}static unpackAny(t){return Zo.fromProto($.MsgForceTransfer.decode(t.value))}}class Ps extends m{constructor(e,r){super();p(this,"denom_creation_fee");this.denom_creation_gas_consume=r,this.denom_creation_fee=new u(e)}static fromAmino(e){const{denom_creation_fee:r,denom_creation_gas_consume:o}=e;return new Ps(u.fromAmino(r),Number.parseInt(o))}toAmino(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return{denom_creation_fee:e.toAmino(),denom_creation_gas_consume:r.toString()}}static fromData(e){const{denom_creation_fee:r,denom_creation_gas_consume:o}=e;return new Ps(u.fromData(r),Number.parseInt(o))}toData(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return{denom_creation_fee:e.toData(),denom_creation_gas_consume:r.toString()}}static fromProto(e){return new Ps(u.fromProto(e.denomCreationFee),e.denomCreationGasConsume.toNumber())}toProto(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return $c.Params.fromPartial({denomCreationFee:e.toProto(),denomCreationGasConsume:f.fromNumber(r)})}}class Xo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Xo(e,Ps.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"tokenfactory/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Xo(e,Ps.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Xo(t.authority,Ps.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return $.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgUpdateParams",value:$.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Xo.fromProto($.MsgUpdateParams.decode(t.value))}}exports.Msg=void 0;(i=>{function t(o){switch(o.type){case"block-sdk/x/auction/MsgAuctionBid":return ce.fromAmino(o);case"block-sdk/x/auction/MsgUpdateParams":return me.fromAmino(o);case"cosmos-sdk/x/auth/MsgUpdateParams":return ue.fromAmino(o);case"cosmos-sdk/MsgGrant":return ze.fromAmino(o);case"cosmos-sdk/MsgRevoke":return Ge.fromAmino(o);case"cosmos-sdk/MsgExec":return Ve.fromAmino(o);case"cosmos-sdk/MsgSend":return Ke.fromAmino(o);case"cosmos-sdk/MsgMultiSend":return X.fromAmino(o);case"cosmos-sdk/x/bank/MsgUpdateParams":return We.fromAmino(o);case"cosmos-sdk/MsgSetSendEnabled":return He.fromAmino(o);case"bank/MsgSetDenomMetadata":return Je.fromAmino(o);case"cosmos-sdk/MsgVerifyInvariant":return Qe.fromAmino(o);case"cosmos-sdk/x/crisis/MsgUpdateParams":return Ye.fromAmino(o);case"cosmos-sdk/x/consensus/MsgUpdateParams":return je.fromAmino(o);case"cosmos-sdk/MsgModifyWithdrawAddress":return Ze.fromAmino(o);case"cosmos-sdk/MsgWithdrawDelegationReward":return Xe.fromAmino(o);case"cosmos-sdk/MsgWithdrawValidatorCommission":return tr.fromAmino(o);case"cosmos-sdk/MsgFundCommunityPool":return er.fromAmino(o);case"distribution/MsgUpdateParams":return rr.fromAmino(o);case"cosmos-sdk/distr/MsgCommunityPoolSpend":return or.fromAmino(o);case"distr/MsgDepositValidatorRewardsPool":return sr.fromAmino(o);case"cosmos-sdk/MsgSubmitEvidence":return ar.fromAmino(o);case"evm/MsgCreate":return ir.fromAmino(o);case"evm/MsgCreate2":return cr.fromAmino(o);case"evm/MsgCall":return mr.fromAmino(o);case"evm/MsgUpdateParams":return ur.fromAmino(o);case"cosmos-sdk/MsgGrantAllowance":return lr.fromAmino(o);case"cosmos-sdk/MsgRevokeAllowance":return pr.fromAmino(o);case"noble/forwarding/RegisterAccount":return hr.fromAmino(o);case"noble/forwarding/ClearAccount":return fr.fromAmino(o);case"cosmos-sdk/v1/MsgCancelProposal":return gr.fromAmino(o);case"cosmos-sdk/MsgDeposit":return yr.fromAmino(o);case"cosmos-sdk/v1/MsgDeposit":return _r.fromAmino(o);case"cosmos-sdk/MsgSubmitProposal":return Pr.fromAmino(o);case"cosmos-sdk/v1/MsgSubmitProposal":return wr.fromAmino(o);case"cosmos-sdk/MsgVote":return Bt.fromAmino(o);case"cosmos-sdk/v1/MsgVote":return Ot.fromAmino(o);case"cosmos-sdk/MsgVoteWeighted":return Dr.fromAmino(o);case"cosmos-sdk/v1/MsgVoteWeighted":return kr.fromAmino(o);case"gov/MsgUpdateParams":return Mr.fromAmino(o);case"cosmos-sdk/MsgCreateGroup":return xr.fromAmino(o);case"cosmos-sdk/MsgCreateGroupPolicy":return Nr.fromAmino(o);case"cosmos-sdk/MsgCreateGroupWithPolicy":return Cr.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupAdmin":return Br.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupDecisionPolicy":return Or.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMembers":return Tr.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMetadata":return Rr.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyAdmin":return qr.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyMetadata":return Fr.fromAmino(o);case"cosmos-sdk/group/MsgExec":return Ur.fromAmino(o);case"cosmos-sdk/group/MsgLeaveGroup":return Er.fromAmino(o);case"cosmos-sdk/group/MsgSubmitProposal":return Rt.fromAmino(o);case"cosmos-sdk/group/MsgVote":return Tt.fromAmino(o);case"ibchooks/MsgUpdateACL":return Lr.fromAmino(o);case"ibchooks/MsgUpdateParams":return zr.fromAmino(o);case"nft-transfer/MsgTransfer":return Gr.fromAmino(o);case"nft-transfer/MsgUpdateParams":return Vr.fromAmino(o);case"perm/MsgSetPermissionedRelayers":return Kr.fromAmino(o);case"perm/MsgHaltChannel":return Wr.fromAmino(o);case"perm/MsgResumeChannel":return Hr.fromAmino(o);case"cosmos-sdk/MsgTransfer":return Le.fromAmino(o);case"intertx/MsgRegisterAccount":return Qr.fromAmino(o);case"intertx/MsgSubmitTx":return Yr.fromAmino(o);case"slinky/x/marketmap/MsgCreateMarkets":return to.fromAmino(o);case"slinky/x/marketmap/MsgUpdateMarkets":return eo.fromAmino(o);case"slinky/x/marketmap/MsgRemoveMarketAuthorities":return ro.fromAmino(o);case"slinky/x/marketmap/MsgParams":return oo.fromAmino(o);case"move/MsgPublish":return qt.fromAmino(o);case"move/MsgExecute":return so.fromAmino(o);case"move/MsgExecuteJSON":return no.fromAmino(o);case"move/MsgScript":return ao.fromAmino(o);case"move/MsgScriptJSON":return io.fromAmino(o);case"move/MsgUpdateParams":return co.fromAmino(o);case"move/MsgWhitelist":return mo.fromAmino(o);case"move/MsgDelist":return uo.fromAmino(o);case"move/MsgGovExecute":return lo.fromAmino(o);case"move/MsgGovExecuteJSON":return po.fromAmino(o);case"move/MsgGovPublish":return Ft.fromAmino(o);case"move/MsgGovScript":return ho.fromAmino(o);case"move/MsgGovScriptJSON":return fo.fromAmino(o);case"mstaking/MsgDelegate":return go.fromAmino(o);case"mstaking/MsgUndelegate":return yo.fromAmino(o);case"mstaking/MsgBeginRedelegate":return _o.fromAmino(o);case"mstaking/MsgCreateValidator":return vo.fromAmino(o);case"mstaking/MsgEditValidator":return $t.fromAmino(o);case"mstaking/MsgCancelUnbondingDelegation":return bo.fromAmino(o);case"mstaking/MsgUpdateParams":return Ao.fromAmino(o);case"opchild/MsgAddValidator":return Po.fromAmino(o);case"opchild/MsgRemoveValidator":return wo.fromAmino(o);case"opchild/MsgFinalizeTokenDeposit":return Do.fromAmino(o);case"opchild/MsgInitiateTokenWithdrawal":return ko.fromAmino(o);case"opchild/MsgExecuteMessages":return Mo.fromAmino(o);case"opchild/MsgSpendFeePool":return xo.fromAmino(o);case"opchild/MsgSetBridgeInfo":return $o.fromAmino(o);case"opchild/MsgUpdateOracle":return Lo.fromAmino(o);case"opchild/MsgUpdateParams":return zo.fromAmino(o);case"ophost/MsgRecordBatch":return So.fromAmino(o);case"ophost/MsgCreateBridge":return Io.fromAmino(o);case"ophost/MsgProposeOutput":return No.fromAmino(o);case"ophost/MsgDeleteOutput":return Co.fromAmino(o);case"ophost/MsgInitiateTokenDeposit":return Uo.fromAmino(o);case"ophost/MsgFinalizeTokenWithdrawal":return Eo.fromAmino(o);case"ophost/MsgUpdateProposer":return Bo.fromAmino(o);case"ophost/MsgUpdateChallengers":return Oo.fromAmino(o);case"ophost/MsgUpdateBatchInfo":return To.fromAmino(o);case"ophost/MsgUpdateOracleConfig":return Ro.fromAmino(o);case"ophost/MsgUpdateMetadata":return qo.fromAmino(o);case"ophost/MsgUpdateParams":return Fo.fromAmino(o);case"slinky/x/oracle/MsgAddCurrencyPairs":return Zr.fromAmino(o);case"slinky/x/oracle/MsgSetCurrencyPairs":return Xr.fromAmino(o);case"reward/MsgUpdateParams":return Go.fromAmino(o);case"cosmos-sdk/MsgUnjail":return Vo.fromAmino(o);case"cosmos-sdk/x/slashing/MsgUpdateParams":return Ko.fromAmino(o);case"tokenfactory/MsgCreateDenom":return Wo.fromAmino(o);case"tokenfactory/MsgMint":return Ho.fromAmino(o);case"tokenfactory/MsgBurn":return Jo.fromAmino(o);case"tokenfactory/MsgChangeAdmin":return jo.fromAmino(o);case"tokenfactory/MsgSetDenomMetadata":return Qo.fromAmino(o);case"tokenfactory/MsgSetBeforeSendHook":return Yo.fromAmino(o);case"tokenfactory/MsgForceTransfer":return Zo.fromAmino(o);case"tokenfactory/MsgUpdateParams":return Xo.fromAmino(o);case"cosmos-sdk/MsgSoftwareUpgrade":return Jr.fromAmino(o);case"cosmos-sdk/MsgCancelUpgrade":return jr.fromAmino(o);case"wasm/MsgStoreCode":return De.fromAmino(o);case"wasm/MsgInstantiateContract":return ke.fromAmino(o);case"wasm/MsgInstantiateContract2":return Me.fromAmino(o);case"wasm/MsgExecuteContract":return xe.fromAmino(o);case"wasm/MsgMigrateContract":return Se.fromAmino(o);case"wasm/MsgUpdateAdmin":return Ie.fromAmino(o);case"wasm/MsgClearAdmin":return Ne.fromAmino(o);case"wasm/MsgUpdateInstantiateConfig":return Ce.fromAmino(o);case"wasm/MsgUpdateParams":return Ue.fromAmino(o);case"wasm/MsgSudoContract":return Ee.fromAmino(o);case"wasm/MsgPinCodes":return Be.fromAmino(o);case"wasm/MsgUnpinCodes":return Oe.fromAmino(o);case"wasm/MsgStoreAndInstantiateContract":return Te.fromAmino(o);case"wasm/MsgStoreAndMigrateContract":return Re.fromAmino(o);case"wasm/MsgAddCodeUploadParamsAddresses":return qe.fromAmino(o);case"wasm/MsgRemoveCodeUploadParamsAddresses":return Fe.fromAmino(o);case"wasm/MsgUpdateContractLabel":return $e.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/sdk.auction.v1.MsgAuctionBid":return ce.fromData(o);case"/sdk.auction.v1.MsgUpdateParams":return me.fromData(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return ue.fromData(o);case"/cosmos.authz.v1beta1.MsgGrant":return ze.fromData(o);case"/cosmos.authz.v1beta1.MsgRevoke":return Ge.fromData(o);case"/cosmos.authz.v1beta1.MsgExec":return Ve.fromData(o);case"/cosmos.bank.v1beta1.MsgSend":return Ke.fromData(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return X.fromData(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return We.fromData(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return He.fromData(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Je.fromData(o);case"/celestia.blob.v1.MsgPayForBlobs":return Ys.fromData(o);case"/cosmos.consensus.v1.MsgUpdateParams":return je.fromData(o);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return Qe.fromData(o);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return Ye.fromData(o);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return Ze.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return Xe.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return tr.fromData(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return er.fromData(o);case"/initia.distribution.v1.MsgUpdateParams":return rr.fromData(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return or.fromData(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return sr.fromData(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return ar.fromData(o);case"/minievm.evm.v1.MsgCreate":return ir.fromData(o);case"/minievm.evm.v1.MsgCreate2":return cr.fromData(o);case"/minievm.evm.v1.MsgCall":return mr.fromData(o);case"/minievm.evm.v1.MsgUpdateParams":return ur.fromData(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return lr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return pr.fromData(o);case"/noble.forwarding.v1.MsgRegisterAccount":return hr.fromData(o);case"/noble.forwarding.v1.MsgClearAccount":return fr.fromData(o);case"/cosmos.gov.v1.MsgCancelProposal":return gr.fromData(o);case"/cosmos.gov.v1beta1.MsgDeposit":return yr.fromData(o);case"/cosmos.gov.v1.MsgDeposit":return _r.fromData(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return Pr.fromData(o);case"/cosmos.gov.v1.MsgSubmitProposal":return wr.fromData(o);case"/cosmos.gov.v1beta1.MsgVote":return Bt.fromData(o);case"/cosmos.gov.v1.MsgVote":return Ot.fromData(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return Dr.fromData(o);case"/cosmos.gov.v1.MsgVoteWeighted":return kr.fromData(o);case"/initia.gov.v1.MsgUpdateParams":return Mr.fromData(o);case"/cosmos.group.v1.MsgCreateGroup":return xr.fromData(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return Nr.fromData(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return Cr.fromData(o);case"/cosmos.group.v1.MsgExec":return Ur.fromData(o);case"/cosmos.group.v1.MsgLeaveGroup":return Er.fromData(o);case"/cosmos.group.v1.MsgSubmitProposal":return Rt.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return Br.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return Tr.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return Rr.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return qr.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return Or.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return Fr.fromData(o);case"/cosmos.group.v1.MsgVote":return Tt.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return Xs.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return tn.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return rn.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return en.fromData(o);case"/initia.ibchooks.v1.MsgUpdateACL":return Lr.fromData(o);case"/initia.ibchooks.v1.MsgUpdateParams":return zr.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Gr.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return Vr.fromData(o);case"/ibc.applications.perm.v1.MsgSetPermissionedRelayers":return Kr.fromData(o);case"/ibc.applications.perm.v1.MsgHaltChannel":return Wr.fromData(o);case"/ibc.applications.perm.v1.MsgResumeChannel":return Hr.fromData(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Le.fromData(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return js.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return nn.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return un.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return dn.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return ln.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return pn.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return hn.fromData(o);case"/ibc.core.channel.v1.MsgRecvPacket":return fn.fromData(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return gn.fromData(o);case"/ibc.core.channel.v1.MsgTimeout":return yn.fromData(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return _n.fromData(o);case"/ibc.core.channel.v1.MsgUpdateParams":return vn.fromData(o);case"/ibc.core.client.v1.MsgCreateClient":return $n.fromData(o);case"/ibc.core.client.v1.MsgUpdateClient":return Ln.fromData(o);case"/ibc.core.client.v1.MsgUpgradeClient":return zn.fromData(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return Gn.fromData(o);case"/ibc.core.client.v1.MsgRecoverClient":return Vn.fromData(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return Kn.fromData(o);case"/ibc.core.client.v1.MsgUpdateParams":return Wn.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Hn.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Jn.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return jn.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Qn.fromData(o);case"/ibc.core.connection.v1.MsgUpdateParams":return Yn.fromData(o);case"/initia.intertx.v1.MsgRegisterAccount":return Qr.fromData(o);case"/initia.intertx.v1.MsgSubmitTx":return Yr.fromData(o);case"/slinky.marketmap.v1.MsgCreateMarkets":return to.fromData(o);case"/slinky.marketmap.v1.MsgUpdateMarkets":return eo.fromData(o);case"/slinky.marketmap.v1.MsgRemoveMarketAuthorities":return ro.fromData(o);case"/slinky.marketmap.v1.MsgParams":return oo.fromData(o);case"/initia.move.v1.MsgPublish":return qt.fromData(o);case"/initia.move.v1.MsgExecute":return so.fromData(o);case"/initia.move.v1.MsgExecuteJSON":return no.fromData(o);case"/initia.move.v1.MsgScript":return ao.fromData(o);case"/initia.move.v1.MsgScriptJSON":return io.fromData(o);case"/initia.move.v1.MsgUpdateParams":return co.fromData(o);case"/initia.move.v1.MsgWhitelist":return mo.fromData(o);case"/initia.move.v1.MsgDelist":return uo.fromData(o);case"/initia.move.v1.MsgGovExecute":return lo.fromData(o);case"/initia.move.v1.MsgGovExecuteJSON":return po.fromData(o);case"/initia.move.v1.MsgGovPublish":return Ft.fromData(o);case"/initia.move.v1.MsgGovScript":return ho.fromData(o);case"/initia.move.v1.MsgGovScriptJSON":return fo.fromData(o);case"/initia.mstaking.v1.MsgDelegate":return go.fromData(o);case"/initia.mstaking.v1.MsgUndelegate":return yo.fromData(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return _o.fromData(o);case"/initia.mstaking.v1.MsgCreateValidator":return vo.fromData(o);case"/initia.mstaking.v1.MsgEditValidator":return $t.fromData(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return bo.fromData(o);case"/initia.mstaking.v1.MsgUpdateParams":return Ao.fromData(o);case"/opinit.opchild.v1.MsgAddValidator":return Po.fromData(o);case"/opinit.opchild.v1.MsgRemoveValidator":return wo.fromData(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return Do.fromData(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return ko.fromData(o);case"/opinit.opchild.v1.MsgExecuteMessages":return Mo.fromData(o);case"/opinit.opchild.v1.MsgSpendFeePool":return xo.fromData(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return $o.fromData(o);case"/opinit.opchild.v1.MsgUpdateOracle":return Lo.fromData(o);case"/opinit.opchild.v1.MsgUpdateParams":return zo.fromData(o);case"/opinit.ophost.v1.MsgRecordBatch":return So.fromData(o);case"/opinit.ophost.v1.MsgCreateBridge":return Io.fromData(o);case"/opinit.ophost.v1.MsgProposeOutput":return No.fromData(o);case"/opinit.ophost.v1.MsgDeleteOutput":return Co.fromData(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return Uo.fromData(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return Eo.fromData(o);case"/opinit.ophost.v1.MsgUpdateProposer":return Bo.fromData(o);case"/opinit.ophost.v1.MsgUpdateChallengers":return Oo.fromData(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return To.fromData(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return Ro.fromData(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return qo.fromData(o);case"/opinit.ophost.v1.MsgUpdateParams":return Fo.fromData(o);case"/slinky.oracle.v1.MsgAddCurrencyPairs":return Zr.fromData(o);case"/slinky.oracle.v1.MsgRemoveCurrencyPairs":return Xr.fromData(o);case"/initia.reward.v1.MsgUpdateParams":return Go.fromData(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return Vo.fromData(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Ko.fromData(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Wo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgMint":return Ho.fromData(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Jo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return jo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return Qo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return Yo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgForceTransfer":return Zo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return Xo.fromData(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Jr.fromData(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return jr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return De.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return ke.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return Me.fromData(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return xe.fromData(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return Se.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return Ie.fromData(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return Ne.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return Ce.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return Ue.fromData(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return Ee.fromData(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return Be.fromData(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return Oe.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return Te.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return Re.fromData(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return qe.fromData(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return Fe.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return $e.fromData(o)}}i.fromData=e;function r(o){switch(o.typeUrl){case"/sdk.auction.v1.MsgAuctionBid":return ce.unpackAny(o);case"/sdk.auction.v1.MsgUpdateParams":return me.unpackAny(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return ue.unpackAny(o);case"/cosmos.authz.v1beta1.MsgGrant":return ze.unpackAny(o);case"/cosmos.authz.v1beta1.MsgRevoke":return Ge.unpackAny(o);case"/cosmos.authz.v1beta1.MsgExec":return Ve.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSend":return Ke.unpackAny(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return X.unpackAny(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return We.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return He.unpackAny(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Je.unpackAny(o);case"/celestia.blob.v1.MsgPayForBlobs":return Ys.unpackAny(o);case"/cosmos.consensus.v1.MsgUpdateParams":return je.unpackAny(o);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return Qe.unpackAny(o);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return Ye.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return Ze.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return Xe.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return tr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return er.unpackAny(o);case"/initia.distribution.v1.MsgUpdateParams":return rr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return or.unpackAny(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return sr.unpackAny(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return ar.unpackAny(o);case"/minievm.evm.v1.MsgCreate":return ir.unpackAny(o);case"/minievm.evm.v1.MsgCreate2":return cr.unpackAny(o);case"/minievm.evm.v1.MsgCall":return mr.unpackAny(o);case"/minievm.evm.v1.MsgUpdateParams":return ur.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return lr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return pr.unpackAny(o);case"/noble.forwarding.v1.MsgRegisterAccount":return hr.unpackAny(o);case"/noble.forwarding.v1.MsgClearAccount":return fr.unpackAny(o);case"/cosmos.gov.v1.MsgCancelProposal":return gr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgDeposit":return yr.unpackAny(o);case"/cosmos.gov.v1.MsgDeposit":return _r.unpackAny(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return Pr.unpackAny(o);case"/cosmos.gov.v1.MsgSubmitProposal":return wr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVote":return Bt.unpackAny(o);case"/cosmos.gov.v1.MsgVote":return Ot.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return Dr.unpackAny(o);case"/cosmos.gov.v1.MsgVoteWeighted":return kr.unpackAny(o);case"/initia.gov.v1.MsgUpdateParams":return Mr.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroup":return xr.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return Nr.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return Cr.unpackAny(o);case"/cosmos.group.v1.MsgExec":return Ur.unpackAny(o);case"/cosmos.group.v1.MsgLeaveGroup":return Er.unpackAny(o);case"/cosmos.group.v1.MsgSubmitProposal":return Rt.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return Br.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return Tr.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return Rr.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return qr.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return Or.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return Fr.unpackAny(o);case"/cosmos.group.v1.MsgVote":return Tt.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return Xs.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return tn.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return rn.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return en.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateACL":return Lr.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateParams":return zr.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Gr.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return Vr.unpackAny(o);case"/ibc.applications.perm.v1.MsgSetPermissionedRelayers":return Kr.unpackAny(o);case"/ibc.applications.perm.v1.MsgHaltChannel":return Wr.unpackAny(o);case"/ibc.applications.perm.v1.MsgResumeChannel":return Hr.unpackAny(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Le.unpackAny(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return js.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return nn.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return un.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return dn.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return ln.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return pn.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return hn.unpackAny(o);case"/ibc.core.channel.v1.MsgRecvPacket":return fn.unpackAny(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return gn.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeout":return yn.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return _n.unpackAny(o);case"/ibc.core.channel.v1.MsgUpdateParams":return vn.unpackAny(o);case"/ibc.core.client.v1.MsgCreateClient":return $n.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateClient":return Ln.unpackAny(o);case"/ibc.core.client.v1.MsgUpgradeClient":return zn.unpackAny(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return Gn.unpackAny(o);case"/ibc.core.client.v1.MsgRecoverClient":return Vn.unpackAny(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return Kn.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateParams":return Wn.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Hn.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Jn.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return jn.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Qn.unpackAny(o);case"/ibc.core.connection.v1.MsgUpdateParams":return Yn.unpackAny(o);case"/initia.intertx.v1.MsgRegisterAccount":return Qr.unpackAny(o);case"/initia.intertx.v1.MsgSubmitTx":return Yr.unpackAny(o);case"/slinky.marketmap.v1.MsgCreateMarkets":return to.unpackAny(o);case"/slinky.marketmap.v1.MsgUpdateMarkets":return eo.unpackAny(o);case"/slinky.marketmap.v1.MsgRemoveMarketAuthorities":return ro.unpackAny(o);case"/slinky.marketmap.v1.MsgParams":return oo.unpackAny(o);case"/initia.move.v1.MsgPublish":return qt.unpackAny(o);case"/initia.move.v1.MsgExecute":return so.unpackAny(o);case"/initia.move.v1.MsgExecuteJSON":return no.unpackAny(o);case"/initia.move.v1.MsgScript":return ao.unpackAny(o);case"/initia.move.v1.MsgScriptJSON":return io.unpackAny(o);case"/initia.move.v1.MsgUpdateParams":return co.unpackAny(o);case"/initia.move.v1.MsgWhitelist":return mo.unpackAny(o);case"/initia.move.v1.MsgDelist":return uo.unpackAny(o);case"/initia.move.v1.MsgGovExecute":return lo.unpackAny(o);case"/initia.move.v1.MsgGovExecuteJSON":return po.unpackAny(o);case"/initia.move.v1.MsgGovPublish":return Ft.unpackAny(o);case"/initia.move.v1.MsgGovScript":return ho.unpackAny(o);case"/initia.move.v1.MsgGovScriptJSON":return fo.unpackAny(o);case"/initia.mstaking.v1.MsgDelegate":return go.unpackAny(o);case"/initia.mstaking.v1.MsgUndelegate":return yo.unpackAny(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return _o.unpackAny(o);case"/initia.mstaking.v1.MsgCreateValidator":return vo.unpackAny(o);case"/initia.mstaking.v1.MsgEditValidator":return $t.unpackAny(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return bo.unpackAny(o);case"/initia.mstaking.v1.MsgUpdateParams":return Ao.unpackAny(o);case"/opinit.opchild.v1.MsgAddValidator":return Po.unpackAny(o);case"/opinit.opchild.v1.MsgRemoveValidator":return wo.unpackAny(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return Do.unpackAny(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return ko.unpackAny(o);case"/opinit.opchild.v1.MsgExecuteMessages":return Mo.unpackAny(o);case"/opinit.opchild.v1.MsgSpendFeePool":return xo.unpackAny(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return $o.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateOracle":return Lo.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateParams":return zo.unpackAny(o);case"/opinit.ophost.v1.MsgRecordBatch":return So.unpackAny(o);case"/opinit.ophost.v1.MsgCreateBridge":return Io.unpackAny(o);case"/opinit.ophost.v1.MsgProposeOutput":return No.unpackAny(o);case"/opinit.ophost.v1.MsgDeleteOutput":return Co.unpackAny(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return Uo.unpackAny(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return Eo.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateProposer":return Bo.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateChallengers":return Oo.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return To.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return Ro.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return qo.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateParams":return Fo.unpackAny(o);case"/slinky.oracle.v1.MsgAddCurrencyPairs":return Zr.unpackAny(o);case"/slinky.oracle.v1.MsgRemoveCurrencyPairs":return Xr.unpackAny(o);case"/initia.reward.v1.MsgUpdateParams":return Go.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return Vo.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Ko.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Wo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgMint":return Ho.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Jo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return jo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return Qo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return Yo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgForceTransfer":return Zo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return Xo.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Jr.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return jr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return De.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return ke.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return Me.unpackAny(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return xe.unpackAny(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return Se.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return Ie.unpackAny(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return Ne.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return Ce.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return Ue.unpackAny(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return Ee.unpackAny(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return Be.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return Oe.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return Te.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return Re.unpackAny(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return qe.unpackAny(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return Fe.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return $e.unpackAny(o);default:throw new Error(`not supported msg ${o.typeUrl}`)}}i.fromProto=r})(exports.Msg||(exports.Msg={}));function sa(i,t,e){try{return N.bech32.decode(t).prefix===i&&t.length==e}catch{return!1}}exports.AccAddress=void 0;(i=>{function t(n){return sa("init",n,43)||sa("init",n,63)}i.validate=t;function e(n){const a=N.bech32.decode(n);return N.bech32.encode("init",a.words)}i.fromValAddress=e;function r(n){const a=N.bech32.decode(n);return"0x"+Buffer.from(N.bech32.fromWords(a.words)).toString("hex")}i.toHex=r;function o(n){const a=n.replace(/^0x0+|^0x|^0+(?!x)/,"");return a.length<=40?N.bech32.encode("init",N.bech32.toWords(Buffer.from(a.padStart(40,"0"),"hex"))):N.bech32.encode("init",N.bech32.toWords(Buffer.from(a.padStart(64,"0"),"hex")))}i.fromHex=o;function s(n){const a=N.bech32.decode(n);return Buffer.from(N.bech32.fromWords(a.words))}i.toBuffer=s})(exports.AccAddress||(exports.AccAddress={}));exports.AccPubKey=void 0;(i=>{function t(r){return sa("initpub",r,46)}i.validate=t;function e(r){const o=N.bech32.decode(r);return N.bech32.encode("initpub",o.words)}i.fromAccAddress=e})(exports.AccPubKey||(exports.AccPubKey={}));exports.ValAddress=void 0;(i=>{function t(r){return sa("initvaloper",r,50)}i.validate=t;function e(r){const o=N.bech32.decode(r);return N.bech32.encode("initvaloper",o.words)}i.fromAccAddress=e})(exports.ValAddress||(exports.ValAddress={}));exports.ValPubKey=void 0;(i=>{function t(r){return sa("initvaloperpub",r,53)}i.validate=t;function e(r){const o=N.bech32.decode(r);return N.bech32.encode("initvaloperpub",o.words)}i.fromValAddress=e})(exports.ValPubKey||(exports.ValPubKey={}));exports.ValConsAddress=void 0;(i=>{function t(e){return sa("initvalcons",e,50)}i.validate=t})(exports.ValConsAddress||(exports.ValConsAddress={}));class tm{constructor(t){p(this,"bitarray");p(this,"signatures");this.multisig_pubkey=t;const e=t.pubkeys.length;this.bitarray=is.fromBits(e),this.signatures=[]}appendSignature(t,e){const r=this.bitarray.numTrueBitsBefore(e);if(this.bitarray.getIndex(e)){this.signatures[r]=t;return}if(this.bitarray.setIndex(e,!0),r==this.signatures.length){this.signatures.push(t);return}this.signatures.splice(r,0,t)}appendSignatureFromPubKey(t,e){const r=this.multisig_pubkey.pubkeys.findIndex(o=>o.key===e.key);if(r==-1)throw new Error("provided key doesn't exist in public_keys");this.appendSignature(t,r)}appendSignatureV2s(t){for(const e of t){if(!(e.public_key instanceof Z))throw new Error("non-SimplePublicKey cannot be used to sign multisig");this.appendSignatureFromPubKey(e.data,e.public_key)}}toSignatureDescriptor(){return new K.Descriptor(new K.Descriptor.Multi(this.bitarray,this.signatures))}}class Oi extends m{constructor(t,e,r,o,s){super(),this.chain_id=t,this.account_number=e,this.sequence=r,this.auth_info=o,this.tx_body=s}toAmino(){const{chain_id:t,account_number:e,sequence:r,tx_body:{memo:o,messages:s,timeout_height:n},auth_info:{fee:a}}=this;return{chain_id:t,account_number:e.toString(),sequence:r.toString(),timeout_height:n&&n!==0?n.toString():void 0,fee:a.toAmino(),msgs:s.map(c=>c.toAmino()),memo:o??""}}toData(){const{account_number:t,chain_id:e,tx_body:r,auth_info:o}=this;return{body_bytes:Buffer.from(r.toBytes()).toString("base64"),auth_info_bytes:Buffer.from(o.toBytes()).toString("base64"),account_number:t.toFixed(),chain_id:e}}toProto(){const{account_number:t,chain_id:e,tx_body:r,auth_info:o}=this;return et.SignDoc.fromPartial({bodyBytes:r.toBytes(),authInfoBytes:o.toBytes(),accountNumber:f.fromNumber(t),chainId:e})}toUnSignedTx(){return new tt(this.tx_body,this.auth_info,[])}toBytes(){return et.SignDoc.encode(this.toProto()).finish()}}class na{constructor(t,e,r,o,s,n,a,c,d,h,g){this.height=t,this.txhash=e,this.raw_log=r,this.logs=o,this.gas_wanted=s,this.gas_used=n,this.tx=a,this.timestamp=c,this.events=d,this.code=h,this.codespace=g}static fromProto(t){return new na(t.height.toNumber(),t.txhash,t.rawLog,t.logs.map(e=>An.fromProto(e)),t.gasWanted.toNumber(),t.gasUsed.toNumber(),tt.unpackAny(t.tx),t.timestamp,t.events,t.code,t.codespace)}static fromData(t){return new na(Number.parseInt(t.height),t.txhash,t.raw_log,t.logs.map(e=>An.fromData(e)),Number.parseInt(t.gas_wanted),Number.parseInt(t.gas_used),tt.fromData(t.tx),t.timestamp,t.events,t.code,t.codespace)}}exports.EventsByType=void 0;(i=>{function t(e){const r={};return e.forEach(o=>{o.attributes.forEach(s=>{o.type in r||(r[o.type]=new Map),s.key in r[o.type]||r[o.type].set(s.key,[]),r[o.type].get(s.key).push(s.value)})}),r}i.parse=t})(exports.EventsByType||(exports.EventsByType={}));class An{constructor(t,e,r){p(this,"eventsByType");this.msg_index=t,this.log=e,this.events=r,this.eventsByType=exports.EventsByType.parse(this.events)}static fromData(t){return new An(t.msg_index,t.log,t.events.map(e=>({type:e.type,attributes:e.attributes.map(r=>({key:r.key,value:r.value}))})))}toData(){const{msg_index:t,log:e,events:r,eventsByType:o}=this;return{msg_index:t,log:e,events:r,eventsByType:o}}static fromProto(t){return new An(t.msgIndex,t.log,t.events.map(e=>({type:e.type,attributes:e.attributes.map(r=>({key:r.key,value:r.value}))})))}toProto(){const{msg_index:t,log:e,events:r}=this;return Lc.ABCIMessageLog.fromPartial({msgIndex:t,log:e,events:r})}}class Ti extends E{async accountInfo(t,e={}){const{account:r}=await this.c.get(`/cosmos/auth/v1beta1/accounts/${t}`,e);return exports.Account.fromData(r)}async moduleAccount(t,e={}){const{account:r}=await this.c.get(`/cosmos/auth/v1beta1/module_accounts/${t}`,e);return te.fromData(r)}async parameters(t={}){return this.c.get("/cosmos/auth/v1beta1/params",t).then(({params:e})=>ss.fromData(e))}}class Ri extends E{async grants(t,e,r,o={}){return this.c.get("/cosmos/authz/v1beta1/grants",Object.assign({granter:t,grantee:e,msg_type_url:r},o)).then(s=>[s.grants.map(zt.fromData),s.pagination])}async granter(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/granter/${t}`,e).then(r=>[r.grants.map(o=>zt.fromData(o)),r.pagination])}async grantee(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/grantee/${t}`,e).then(r=>[r.grants.map(o=>zt.fromData(o)),r.pagination])}}class qi extends E{async balance(t,e={}){return this.c.get(`/cosmos/bank/v1beta1/balances/${t}`,e).then(r=>[u.fromData(r.balances),r.pagination])}async balanceByDenom(t,e,r={}){return this.c.get(`/cosmos/bank/v1beta1/balances/${t}/by_denom`,{...r,denom:e}).then(o=>v.fromData(o.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(r=>[u.fromData(r.balances),r.pagination])}async parameters(t={}){return this.c.get("/cosmos/bank/v1beta1/params",t).then(({params:e})=>as.fromData(e))}}class Fi extends E{async rewards(t,e={}){const r=await this.c.get(`/initia/distribution/v1/delegators/${t}/rewards`,e),o={};for(const s of r.rewards)o[s.validator_address]=s.reward.map(n=>({denom:n.denom,coins:u.fromData(n.dec_coins)}));return{rewards:o,total:r.total.map(s=>({denom:s.denom,coins:u.fromData(s.dec_coins)}))}}async rewardsByValidator(t,e,r={}){return this.c.get(`/initia/distribution/v1/delegators/${t}/rewards/${e}`,r).then(o=>o.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(r=>r.rewards.rewards.map(o=>({denom:o.denom,coins:u.fromData(o.dec_coins)})))}async validatorCommission(t,e={}){return this.c.get(`/initia/distribution/v1/validators/${t}/commission`,e).then(r=>r.commission.commissions.map(o=>({denom:o.denom,coins:u.fromData(o.dec_coins)})))}async withdrawAddress(t,e={}){return this.c.get(`/cosmos/distribution/v1beta1/delegators/${t}/withdraw_address`,e).then(r=>r.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(({params:e})=>ms.fromData(e))}}class $i extends E{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(r=>exports.Evidence.fromData(r.evidence))}}class Li extends E{async code(t,e={}){return this.c.get(`/minievm/evm/v1/codes/${t}`,e).then(r=>r.code)}async state(t,e,r={}){return this.c.get(`/minievm/evm/v1/states/${t}/${e}`,r).then(o=>o.value)}async erc20Factory(t={}){return this.c.get("/minievm/evm/v1/contracts/erc20_factory",t).then(e=>e.address)}async contractAddrByDenom(t,e={}){return this.c.get("/minievm/evm/v1/contracts/by_denom",{...e,denom:t}).then(r=>r.address)}async denom(t,e={}){return this.c.get(`/minievm/evm/v1/denoms/${t}`,e).then(r=>r.denom)}async call(t,e,r,o){return this.c.post("/minievm/evm/v1/call",{sender:t,contract_addr:e,input:r,with_trace:o})}async parameters(t={}){return this.c.get("/minievm/evm/v1/params",t).then(({params:e})=>us.fromData(e))}}class zi extends E{async allowances(t,e={}){return this.c.get(`/cosmos/feegrant/v1beta1/allowances/${t}`,e).then(r=>({allowances:r.allowances.map(o=>({granter:o.granter,grantee:o.grantee,allowance:exports.Allowance.fromData(o.allowance)})),pagination:r.pagination}))}async allowance(t,e){return this.c.get(`/cosmos/feegrant/v1beta1/allowance/${t}/${e}`).then(r=>exports.Allowance.fromData(r.allowance.allowance))}async allowancesByGranter(t,e={}){return this.c.get(`/cosmos/feegrant/v1beta1/issued/${t}`,e).then(r=>({allowances:r.allowances.map(o=>({granter:o.granter,grantee:o.grantee,allowance:exports.Allowance.fromData(o.allowance)})),pagination:r.pagination}))}}class Gi extends E{async address(t,e,r={}){return this.c.get(`/noble/forwarding/v1/address/${t}/${e}`,r).then(o=>o.address)}async stats(t,e={}){return this.c.get(`/noble/forwarding/v1/stats/${t}`,e).then(r=>({num_of_accounts:parseInt(r.num_of_accounts),num_of_forwards:parseInt(r.num_of_forwards),total_forwarded:v.fromData(r.total_forwarded)}))}}class Vi extends E{async proposals(t={}){return this.c.get("/initia/gov/v1/proposals",t).then(e=>[e.proposals.map(ee.fromData),e.pagination])}async proposal(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}`,e).then(r=>ee.fromData(r.proposal))}async deposits(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/deposits`,e).then(r=>[r.deposits.map(o=>Rn.fromData(o)),r.pagination])}async votes(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/votes`,e).then(r=>[r.votes.map(o=>Us.fromData(o)),r.pagination])}async tally(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/tally`,e).then(r=>r.tally)}async parameters(t={}){return this.c.get("/initia/gov/v1/params",t).then(e=>ds.fromData(e.params))}async emergencyProposals(t={}){return this.c.get("/initia/gov/v1/emergency_proposals",t).then(e=>[e.proposals.map(r=>ee.fromData(r)),e.pagination])}}class Ki extends E{async groupInfo(t){return this.c.get(`/cosmos/group/v1/group_info/${t}`).then(e=>$r.fromData(e.info))}async groupPolicyInfo(t){return this.c.get(`/cosmos/group/v1/group_policy_info/${t}`).then(e=>Bs.fromData(e.info))}async groupMembers(t,e={}){return this.c.get(`/cosmos/group/v1/group_members/${t}`,e).then(r=>[r.members.map(qn.fromData),r.pagination])}async groupsByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_admin/${t}`,e).then(r=>[r.groups.map($r.fromData),r.pagination])}async groupPoliciesByGroup(t,e={}){return this.c.get(`/cosmos/group/v1/group_policies_by_group/${t}`,e).then(r=>[r.group_policies.map(Bs.fromData),r.pagination])}async groupPoliciesByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/group_policies_by_admin/${t}`,e).then(r=>[r.group_policies.map(Bs.fromData),r.pagination])}async proposal(t){return this.c.get(`/cosmos/group/v1/proposal/${t}`).then(e=>ls.fromData(e.proposal))}async proposalsByGroupPolicy(t,e={}){return this.c.get(`/cosmos/group/v1/proposals_by_group_policy/${t}`,e).then(r=>[r.proposals.map(ls.fromData),r.pagination])}async voteByProposalVoter(t,e){return this.c.get(`/cosmos/group/v1/vote_by_proposal_voter/${t}/${e}`).then(r=>re.fromData(r.vote))}async votesByProposal(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_proposal/${t}`,e).then(r=>[r.votes.map(re.fromData),r.pagination])}async votesByVoter(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_voter/${t}`,e).then(r=>[r.votes.map(re.fromData),r.pagination])}async groupsByMember(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_member/${t}`,e).then(r=>[r.groups.map($r.fromData),r.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($r.fromData),e.pagination])}}class Wi extends E{async channels(t={}){return this.c.get("/ibc/core/channel/v1/channels",t).then(e=>[e.channels.map(Mt.fromData),e.pagination])}async port(t,e,r={}){return this.c.get(`/ibc/core/channel/v1/channels/${t}/ports/${e}`,r).then(o=>({channel:Mt.fromData(o.channel),proof:o.proof,proof_height:A.fromData(o.proof_height)}))}async connections(t={}){return this.c.get("/ibc/core/connection/v1/connections",t).then(e=>[e.connections.map(cn.fromData),e.pagination])}async connection(t,e={}){return this.c.get(`/ibc/core/connection/v1/connections/${t}`,e).then(r=>cn.fromData(r.connection))}async connectionChannels(t,e={}){return this.c.get(`/ibc/core/channel/v1/connections/${t}/channels`,e).then(r=>[r.channels.map(Mt.fromData),A.fromData(r.height),r.pagination])}async parameters(t={}){return this.c.get("/ibc/core/client/v1/params",t).then(e=>Rs.fromData(e.params))}async clientStates(t={}){return this.c.get("/ibc/core/client/v1/client_states",t).then(e=>[e.client_states.map(Fn.fromData),e.pagination])}async clientState(t,e={}){return this.c.get(`/ibc/core/client/v1/client_states/${t}`,e).then(r=>({client_state:r.client_state,proof:r.proof,proof_height:A.fromData(r.proof_height)}))}async clientStatus(t,e={}){return this.c.get(`/ibc/core/client/v1/client_status/${t}`,e).then(r=>r.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(r=>[r.consensus_state_heights.map(A.fromData),r.pagination])}async unreceivedPackets(t,e,r,o={}){return this.c.get(`/ibc/core/channel/v1/channels/${e}/ports/${t}/packet_commitments/${r.join(",")}/unreceived_packets`,o)}async unreceivedAcks(t,e,r,o={}){return this.c.get(`/ibc/core/channel/v1/channels/${e}/ports/${t}/packet_commitments/${r.join(",")}/unreceived_acks`,o)}}class Hi extends E{async acls(t={}){return this.c.get("/initia/ibchooks/v1/acls",t).then(e=>[e.acls.map(on.fromData),e.pagination])}async acl(t,e={}){return this.c.get(`/initia/ibchooks/v1/acls/${t}`,e).then(r=>on.fromData(r.acl))}async parameters(t={}){return this.c.get("/initia/ibchooks/v1/params",t).then(e=>ps.fromData(e.params))}}class Ji extends E{async classTrace(t){return this.c.get(`/ibc/apps/nft_transfer/v1/class_traces/${t}`).then(e=>sn.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(sn.fromData),e.pagination])}async classHash(t){return await this.c.get(`/ibc/apps/nft_transfer/v1/class_hashes/${t}`).then(e=>e.hash)}async parameters(t={}){return this.c.get("/ibc/apps/nft_transfer/v1/params",t).then(({params:e})=>hs.fromData(e))}async escrowAddress(t,e,r={}){return this.c.get(`/ibc/apps/nft_transfer/v1/channels/${t}/ports/${e}/escrow_address`,r).then(o=>o.escrow_address)}}class ji extends E{async denomTrace(t){return this.c.get(`/ibc/apps/transfer/v1/denom_traces/${t}`).then(e=>Qs.fromData(e.denom_trace))}async denomTraces(t={}){return this.c.get("/ibc/apps/transfer/v1/denom_traces",t).then(e=>[e.denom_traces.map(Qs.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(({params:e})=>({send_enabled:e.send_enabled,receive_enabled:e.receive_enabled}))}async escrowAddress(t,e,r={}){return this.c.get(`/ibc/apps/transfer/v1/channels/${t}/ports/${e}/escrow_address`,r).then(o=>o.escrow_address)}}class Qi extends E{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(r=>r.channel_state)}}class Yi extends E{async interchainAccount(t,e){return this.c.get(`/inter-tx/interchain_account/owner/${t}/connection/${e}`).then(r=>r.interchain_account_address)}}class Zi extends E{async marketMap(t={}){return this.c.get("/slinky/marketmap/v1/marketmap",t).then(e=>{const r={};for(const[o,s]of Object.entries(e.market_map.markets))r[o]=gt.fromData(s);return{markets:r}})}async market(t,e={}){return this.c.get("/slinky/marketmap/v1/market",{...e,"currency_pair.Base":t.Base,"currency_pair.Quote":t.Quote}).then(r=>gt.fromData(r.market))}async lastUpdated(t={}){return this.c.get("/slinky/marketmap/v1/last_updated",t).then(e=>Number.parseInt(e.last_updated))}async parameters(t={}){return this.c.get("/slinky/marketmap/v1/params",t).then(e=>fs.fromData(e.params))}}class Xi extends E{async modules(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules`,e).then(r=>[r.modules.map(o=>({address:o.address,module_name:o.module_name,abi:o.abi,raw_bytes:o.raw_bytes,upgrade_policy:o.upgrade_policy})),r.pagination])}async module(t,e,r={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules/${e}`,r).then(({module:o})=>({address:o.address,module_name:o.module_name,abi:o.abi,raw_bytes:o.raw_bytes,upgrade_policy:o.upgrade_policy}))}async viewFunction(t,e,r,o=[],s=[]){return this.c.post(`/initia/move/v1/accounts/${t}/modules/${e}/view_functions/${r}`,{type_args:o,args:s}).then(n=>JSON.parse(n.data))}async view(t,e,r,o=[],s=[]){return this.c.post("/initia/move/v1/view",{address:t,module_name:e,function_name:r,type_args:o,args:s})}async viewBatch(t){return this.c.post("/initia/move/v1/view/batch",{requests:t}).then(e=>e.responses)}async viewJSON(t,e,r,o=[],s=[]){return this.c.post("/initia/move/v1/view/json",{address:t,module_name:e,function_name:r,type_args:o,args:s})}async viewBatchJSON(t){return this.c.post("/initia/move/v1/view/json/batch",{requests:t}).then(e=>e.responses)}async resources(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/resources`,e).then(r=>[r.resources.map(o=>JSON.parse(o.move_resource)),r.pagination])}async resource(t,e,r={}){return this.c.get(`/initia/move/v1/accounts/${t}/resources/by_struct_tag`,{...r,struct_tag:e}).then(({resource:o})=>JSON.parse(o.move_resource))}async denom(t,e={}){return this.c.get("/initia/move/v1/denom",{...e,metadata:t}).then(r=>r.denom)}async metadata(t,e={}){return this.c.get("/initia/move/v1/metadata",{...e,denom:t}).then(r=>r.metadata)}async parameters(t={}){return this.c.get("/initia/move/v1/params",t).then(({params:e})=>gs.fromData(e))}async scriptABI(t){return this.c.post("/initia/move/v1/script/abi",{code_bytes:t})}async tableInfo(t,e={}){return this.c.get(`/initia/move/v1/tables/${t}`,e).then(r=>r.table_info)}async tableEntries(t,e={}){return this.c.get(`/initia/move/v1/tables/${t}/entries`,e).then(r=>[r.table_entries,r.pagination])}async tableEntry(t,e,r={}){return this.c.get(`/initia/move/v1/tables/${t}/entries/by_key_bytes`,{...r,key_bytes:e}).then(o=>o.table_entry)}}class tc extends E{async delegations(t,e,r={}){if(t!==void 0&&e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations/${t}`,r).then(({delegation_response:o})=>[[zs.fromData(o)],{total:1,next_key:""}]);if(t!==void 0)return this.c.get(`/initia/mstaking/v1/delegations/${t}`,r).then(o=>[o.delegation_responses.map(zs.fromData),o.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations`,r).then(o=>[o.delegation_responses.map(zs.fromData),o.pagination]);throw new TypeError("arguments delegator and validator cannot both be empty")}async delegation(t,e){return this.delegations(t,e).then(r=>r[0][0])}async unbondingDelegations(t,e,r={}){if(t!==void 0&&e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations/${t}/unbonding_delegation`,r).then(({unbond:o})=>[[pt.fromData(o)],{next_key:"",total:1}]);if(t!==void 0)return this.c.get(`/initia/mstaking/v1/delegators/${t}/unbonding_delegations`,r).then(o=>[o.unbonding_responses.map(pt.fromData),o.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/unbonding_delegations`,r).then(o=>[o.unbonding_responses.map(pt.fromData),o.pagination]);throw new TypeError("arguments delegator and validator cannot both be empty")}async unbondingDelegation(t,e){return this.unbondingDelegations(t,e).then(r=>r[0][0])}async redelegations(t,e,r,o={}){const s={...o,src_validator_addr:e,dst_validator_addr:r};return this.c.get(`/initia/mstaking/v1/delegators/${t}/redelegations`,s).then(n=>[n.redelegation_responses.map(Nt.fromData),n.pagination])}async bondedValidators(t,e={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/validators`,e).then(r=>[r.validators.map(G.fromData),r.pagination])}async validators(t={}){return this.c.get("/initia/mstaking/v1/validators",t).then(e=>[e.validators.map(G.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/initia/mstaking/v1/validators/${t}`,e).then(r=>G.fromData(r.validator))}async pool(t={}){return this.c.get("/initia/mstaking/v1/pool",t).then(({pool:e})=>({bonded_tokens:u.fromData(e.bonded_tokens),not_bonded_tokens:u.fromData(e.not_bonded_tokens)}))}async parameters(t={}){return this.c.get("/initia/mstaking/v1/params",t).then(({params:e})=>ys.fromData(e))}}class ec extends E{async validators(t={}){return this.c.get("/opinit/opchild/v1/validators",t).then(e=>[e.validators.map(bn.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/opinit/opchild/v1/validator/${t}`,e).then(r=>bn.fromData(r.validator))}async bridgeInfo(t={}){return this.c.get("/opinit/opchild/v1/bridge_info",t).then(e=>Yt.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(r=>r.base_denom)}async parameters(t={}){return this.c.get("/opinit/opchild/v1/params",t).then(e=>vs.fromData(e.params))}}class rc extends E{async bridgeInfos(t={}){return this.c.get("/opinit/ophost/v1/bridges",t).then(e=>[e.bridges.map(Yt.fromData),e.pagination])}async bridgeInfo(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}`,e).then(r=>Yt.fromData(r))}async tokenPairs(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs`,e).then(r=>[r.token_pairs,r.pagination])}async tokenPairByL1Denom(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs/by_l1_denom`,{...r,l1_denom:e}).then(o=>o.token_pair)}async tokenPairByL2Denom(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs/by_l2_denom`,{...r,l2_denom:e}).then(o=>o.token_pair)}async lastFinalizedOutput(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/last_finalized_output`,e).then(r=>({output_index:Number.parseInt(r.output_index),output_proposal:Qt.fromData(r.output_proposal)}))}async outputInfos(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/outputs`,e).then(r=>[r.output_proposals.map(o=>({bridge_id:Number.parseInt(o.bridge_id??`${t}`),output_index:Number.parseInt(o.output_index),output_proposal:Qt.fromData(o.output_proposal)})),r.pagination])}async outputInfo(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/outputs/${e}`,r).then(o=>({bridge_id:Number.parseInt(o.bridge_id??`${t}`),output_index:Number.parseInt(o.output_index),output_proposal:Qt.fromData(o.output_proposal)}))}async withdrawalClaimed(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/withdrawals/claimed/by_hash`,{...r,withdrawal_hash:Buffer.from(e,"hex").toString("base64")}).then(o=>o.claimed)}async nextL1Sequence(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/next_l1_sequence`,e).then(r=>parseInt(r.next_l1_sequence))}async batchInfos(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/batch_infos`,e).then(r=>[r.batch_infos.map(o=>Xn.fromData(o)),r.pagination])}async parameters(t={}){return this.c.get("/opinit/opchild/v1/params",t).then(e=>_s.fromData(e.params))}}class oc extends E{async currencyPairs(t={}){return this.c.get("/slinky/oracle/v1/get_all_tickers",t).then(e=>e.currency_pairs.map(at.fromData))}async price(t,e={}){return this.c.get("/slinky/oracle/v1/get_price",{...e,"currency_pair.Base":t.Base,"currency_pair.Quote":t.Quote}).then(r=>Zn.fromData(r.price))}}class sc extends E{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(({params:e})=>bs.fromData(e))}}class nc extends E{async signingInfo(t,e={}){return this.c.get(`/cosmos/slashing/v1beta1/signing_infos/${t}`,e).then(({val_signing_info:r})=>({address:r.address,start_height:Number.parseInt(r.start_height),index_offset:Number.parseInt(r.index_offset),jailed_until:new Date(r.jailed_until),tombstoned:r.tombstoned,missed_blocks_counter:Number.parseInt(r.missed_blocks_counter)}))}async signingInfos(t={}){return this.c.get("/cosmos/slashing/v1beta1/signing_infos",t).then(e=>e.info.map(r=>({address:r.address,start_height:Number.parseInt(r.start_height),index_offset:Number.parseInt(r.index_offset),jailed_until:new Date(r.jailed_until),tombstoned:r.tombstoned,missed_blocks_counter:Number.parseInt(r.missed_blocks_counter)})))}async parameters(t={}){return this.c.get("/cosmos/slashing/v1beta1/params",t).then(({params:e})=>As.fromData(e))}}class ac extends E{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 r;return(r=e==null?void 0:e.default_node_info)==null?void 0:r.network})}async syncing(t={}){return this.c.getRaw("/cosmos/base/tendermint/v1beta1/syncing",t).then(e=>e.syncing)}async validatorSet(t,e={}){const r=t!==void 0?`/cosmos/base/tendermint/v1beta1/validatorsets/${t}`:"/cosmos/base/tendermint/v1beta1/validatorsets/latest";return this.c.get(r,e).then(o=>[o.validators,o.pagination])}async blockInfo(t,e={}){const r=t!==void 0?`/cosmos/base/tendermint/v1beta1/blocks/${t}`:"/cosmos/base/tendermint/v1beta1/blocks/latest";return this.c.getRaw(r,e)}}class ic extends E{async authorityMetadata(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms/${t}/authority_metadata`,e).then(r=>r.authority_metadata)}async beforeSendHookAddr(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms/${t}/before_send_hook`,e).then(r=>r.cosmwasm_address)}async denomsFromCreator(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms_from_creator/${t}`,e).then(r=>r.denoms)}async parameters(t={}){return this.c.get("/miniwasm/tokenfactory/v1/params",t).then(({params:e})=>Ps.fromData(e))}}const hi=i=>Zt.bcs.bytes(32,i).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")}`}),em={address:hi,object:hi,fixed_point32:i=>Zt.bcs.u64(i).transform({input:t=>_(t).times(new Y.BigNumber("4294967296")).toFixed(0,Y.BigNumber.ROUND_DOWN),output:t=>_(t).div(new Y.BigNumber("4294967296")).toNumber()}),fixed_point64:i=>Zt.bcs.u128(i).transform({input:t=>_(t).times(new Y.BigNumber("18446744073709551616")).toFixed(0,Y.BigNumber.ROUND_DOWN),output:t=>_(t).div(new Y.BigNumber("18446744073709551616")).toNumber()}),decimal128:i=>Zt.bcs.u128(i).transform({input:t=>_(t).times(new Y.BigNumber("1000000000000000000")).toFixed(0,Y.BigNumber.ROUND_DOWN),output:t=>_(t).div(new Y.BigNumber("1000000000000000000")).toNumber()}),decimal256:i=>Zt.bcs.u256(i).transform({input:t=>_(t).times(new Y.BigNumber("1000000000000000000")).toFixed(0,Y.BigNumber.ROUND_DOWN),output:t=>_(t).div(new Y.BigNumber("1000000000000000000")).toNumber()}),biguint:i=>Zt.bcs.vector(Zt.bcs.u8(i)).transform({input:t=>fi(BigInt(t)),output:t=>gi(t)}),bigdecimal:i=>Zt.bcs.vector(Zt.bcs.u8(i)).transform({input:t=>{const r=_(t).times(new Y.BigNumber("1000000000000000000")).toFixed(0,Y.BigNumber.ROUND_DOWN);return fi(BigInt(r))},output:t=>{const e=gi(t).toString();return _(e).div(new Y.BigNumber("1000000000000000000")).toNumber()}})},rm={...Zt.bcs,...em};function fi(i){const t=[];for(;i>0;)t.push(Number(i%BigInt(256))),i=i/BigInt(256);return new Uint8Array(t)}function gi(i){let t=0n;for(;i.length>0;)t=t*256n+BigInt(i.pop());return t}function om(i){return i.code!==void 0&&i.code!==0&&i.code!=="0"}class Ta{constructor(t,e){this.gas_info=t,this.result=e}static fromData(t){return new Ta({gas_wanted:Number.parseInt(t.gas_info.gas_wanted),gas_used:Number.parseInt(t.gas_info.gas_used)},t.result)}}class ta extends E{constructor(t){super(t.apiRequester),this.lcd=t}async txInfo(t,e={}){return this.c.getRaw(`/cosmos/tx/v1beta1/txs/${t}`,e).then(r=>na.fromData(r.tx_response))}async create(t,e){let{fee:r}=e;const{msgs:o,memo:s,timeoutHeight:n}=e,a=[];for(const c of t){let d=c.sequenceNumber,h=c.publicKey;if(d===void 0||!h){const g=await this.lcd.auth.accountInfo(c.address);d===void 0&&(d=g.getSequenceNumber()),h||(h=g.getPublicKey())}a.push({sequenceNumber:d,publicKey:h})}return r===void 0&&(r=await this.lcd.tx.estimateFee(a,e)),new tt(new cs(o,s??"",n??0),new Wt([],r),[])}async txInfosByHeight(t){const e=await this.lcd.tendermint.blockInfo(t),{txs:r}=e.block.data;if(r){const o=r.map(n=>Na(n)),s=[];for(const n of o)s.push(await this.txInfo(n));return s}else return[]}async estimateFee(t,e){const r=e.gasPrices??this.lcd.config.gasPrices,o=e.gasAdjustment??this.lcd.config.gasAdjustment,s=e.feeDenoms??["uinit"];let n=e.gas,a;if(r&&(a=new u(r),s)){const y=a.filter(b=>s.includes(b.denom));y.toArray().length>0&&(a=y)}const c=new cs(e.msgs,e.memo??""),d=new Wt([],new Kt(0,new u)),h=new tt(c,d,[]);h.appendEmptySignatures(t),(!n||n==="auto"||n==="0")&&(n=await this.estimateGas(h,{gasAdjustment:o}));const g=a?a.mul(n).toIntCeilCoins():"0uinit";return new Kt(Number.parseInt(n),g,"","")}async estimateGas(t,e){const r=(e==null?void 0:e.gasAdjustment)??this.lcd.config.gasAdjustment;let o=t;if(t.signatures.length<=0){if(!(e&&e.signers&&e.signers.length>0))throw new Error("cannot append signature");const n=new Wt([],new Kt(0,new u));o=new tt(t.body,n,[]),o.appendEmptySignatures(e.signers)}const s=await this.c.post("/cosmos/tx/v1beta1/simulate",{tx_bytes:ta.encode(o)}).then(n=>Ta.fromData(n));return _(r??0).multipliedBy(s.gas_info.gas_used).toString()}static encode(t){return Buffer.from(t.toBytes()).toString("base64")}static decode(t){return tt.fromBuffer(Buffer.from(t,"base64"))}static hash(t){const e=ta.encode(t);return Na(e)}async _broadcast(t,e){const r=t instanceof tt?ta.encode(t):t;return await this.c.post("/cosmos/tx/v1beta1/txs",{tx_bytes:r,mode:e})}async broadcast(t,e=3e4){const{tx_response:o}=await this._broadcast(t,"BROADCAST_MODE_SYNC");if(o.code!=null&&o.code!=0)return{height:Number.parseInt(o.height),txhash:o.txhash,raw_log:o.raw_log,code:o.code,codespace:o.codespace,gas_used:0,gas_wanted:0,timestamp:"",logs:[]};let s;for(let n=0;n<=e/500;n++){try{s=await this.txInfo(o.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=>An.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 r={height:+e.height,txhash:e.txhash,raw_log:e.raw_log};return e.code&&(r.code=e.code),e.codespace&&(r.codespace=e.codespace),r})}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,r=(t.query??[]).reduce((o,s)=>{if(!s.key)return o;const n=s.op??"=",a=s.key==="tx.height"?`${s.value}`:`'${s.value}'`,c=n==="EXISTS"?`${s.key} ${n}`:`${s.key} ${n} ${a}`;return o?`${o} AND ${c}`:c},"");return r&&e.append("query",r),delete t.query,Object.entries(t).forEach(o=>{e.append(o[0],o[1].toString())}),this.c.getRaw("/cosmos/tx/v1beta1/txs",e).then(o=>({txs:o.tx_responses.map(s=>na.fromData(s)),pagination:o.pagination,total:Number(o.total)}))}async searchEvents(t,e,r,o){if(o<r)throw new Error("Start height cannot be greater than end height");if(o-r>100)throw new Error("Query height range cannot be greater than 100");const s=[],n=`${t}::${e}`,a=[{key:"tx.height",value:r.toString(),op:">="},{key:"tx.height",value:o.toString(),op:"<="},{key:"move.type_tag",value:n,op:"CONTAINS"}],c=y=>y.events.filter(b=>{if(b.type!=="move")return!1;const k=b.attributes.find(M=>M.key==="type_tag");return k&&k.value.startsWith(n)}),{txs:d,total:h}=await this.search({query:a}),g=d.flatMap(y=>c(y));if(s.push(...g),h>100){const y=Math.ceil(h/100),b=[...Array(y-1).keys()].map(M=>M+2),k=await Promise.all(b.map(async M=>this.search({query:a,page:M}).then(T=>T.txs.flatMap(F=>c(F)))));s.push(...k.flat())}return s}}class cc extends E{async appliedPlan(t,e={}){return this.c.get(`/cosmos/upgrade/v1beta1/applied_plan/${t}`,e).then(r=>Number.parseInt(r.height))}async currentPlan(t={}){return this.c.get("/cosmos/upgrade/v1beta1/current_plan",t).then(e=>e.plan?Jt.fromData(e.plan):void 0)}async moduleVersions(t={}){return this.c.get("/cosmos/upgrade/v1beta1/module_versions",t).then(e=>e.module_versions.map(r=>({name:r.name,version:Number.parseInt(r.version)})))}}class mc extends E{async contractInfo(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}`,e).then(r=>({code_id:Number.parseInt(r.contract_info.code_id),creator:r.contract_info.creator,admin:r.contract_info.admin,label:r.contract_info.label,created:Ws.fromData(r.contract_info.created),ibc_port_id:r.contract_info.ibc_port_id,extension:r.contract_info.extension}))}async contractHistory(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/history`,e).then(r=>[r.entries.map(o=>({operation:ht.contractCodeHistoryOperationTypeFromJSON(o.operation),code_id:Number.parseInt(o.code_id),updated:Ws.fromData(o.updated),msg:o.msg})),r.pagination])}async contractsByCode(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/code/${t}/contracts`,e).then(r=>[r.contracts,r.pagination])}async allContractState(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/state`,e).then(r=>[r.models,r.pagination])}async rawContractState(t,e,r={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/raw/${e}`,r).then(o=>o.data)}async smartContractState(t,e,r={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/smart/${e}`,r).then(o=>o.data)}async codeInfos(t={}){return this.c.get("/cosmwasm/wasm/v1/code",t).then(e=>[e.code_infos.map(r=>({code_id:Number.parseInt(r.code_id),creator:r.creator,data_hash:r.data_hash,instantiate_permission:q.fromData(r.instantiate_permission)})),e.pagination])}async codeInfo(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/code/${t}`,e).then(r=>({code_info:{code_id:Number.parseInt(r.code_info.code_id),creator:r.code_info.creator,data_hash:r.code_info.data_hash,instantiate_permission:q.fromData(r.code_info.instantiate_permission)},data:r.data}))}async pinnedCodes(t={}){return this.c.get("/cosmwasm/wasm/v1/codes/pinned",t).then(e=>[e.code_ids.map(r=>Number.parseInt(r)),e.pagination])}async parameters(t={}){return this.c.get("/cosmwasm/wasm/v1/codes/params",t).then(e=>ns.fromData(e.params))}async contractsByCreator(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contracts/creator/${t}`,e).then(r=>[r.contract_addresses,r.pagination])}}class uc{constructor(t,e){p(this,"accAddress");this.lcd=t,this.key=e,this.accAddress=e.accAddress}setAccountAddress(t){this.accAddress=t}async accountNumberAndSequence(){return this.lcd.auth.accountInfo(this.accAddress).then(t=>({account_number:t.getAccountNumber(),sequence:t.getSequenceNumber()}))}async accountNumber(){return this.lcd.auth.accountInfo(this.accAddress).then(t=>t.getAccountNumber())}async sequence(){return this.lcd.auth.accountInfo(this.accAddress).then(t=>t.getSequenceNumber())}async createTx(t){return this.lcd.tx.create([{address:this.accAddress,sequenceNumber:t.sequence,publicKey:this.key.publicKey}],t)}async createAndSignTx(t){this.lcd.config.chainId||(this.lcd.config.chainId=await this.lcd.tendermint.chainId());let e=t.accountNumber,r=t.sequence;if(e===void 0||r===void 0){const s=await this.accountNumberAndSequence();e===void 0&&(e=s.account_number),r===void 0&&(r=s.sequence)}t.sequence=r,t.accountNumber=e;const o=await this.createTx(t);return this.key.signTx(o,{accountNumber:e,sequence:r,chainId:this.lcd.config.chainId,signMode:t.signMode??it.SignMode.SIGN_MODE_DIRECT})}}const sm={gasAdjustment:"1.75"},yi={default:{uinit:.15}};class dc{constructor(t,e,r){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={...sm,gasPrices:((e==null?void 0:e.chainId)&&yi[e.chainId])??yi.default,...e},this.apiRequester=r??new Ci(this.URL),this.auction=new Ei(this.apiRequester),this.auth=new Ti(this.apiRequester),this.authz=new Ri(this.apiRequester),this.bank=new qi(this.apiRequester),this.distribution=new Fi(this.apiRequester),this.evidence=new $i(this.apiRequester),this.evm=new Li(this.apiRequester),this.feeGrant=new zi(this.apiRequester),this.forwarding=new Gi(this.apiRequester),this.gov=new Vi(this.apiRequester),this.group=new Ki(this.apiRequester),this.ibc=new Wi(this.apiRequester),this.ibcHooks=new Hi(this.apiRequester),this.ibcNft=new Ji(this.apiRequester),this.ibcTransfer=new ji(this.apiRequester),this.ibcPerm=new Qi(this.apiRequester),this.interTx=new Yi(this.apiRequester),this.marketmap=new Zi(this.apiRequester),this.move=new Xi(this.apiRequester),this.mstaking=new tc(this.apiRequester),this.opchild=new ec(this.apiRequester),this.ophost=new rc(this.apiRequester),this.oracle=new oc(this.apiRequester),this.reward=new sc(this.apiRequester),this.slashing=new nc(this.apiRequester),this.tendermint=new ac(this.apiRequester),this.tokenfactory=new ic(this.apiRequester),this.tx=new ta(this),this.upgrade=new cc(this.apiRequester),this.wasm=new mc(this.apiRequester)}wallet(t){return new uc(this,t)}}class ai{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 N.bech32.encode("initvaloper",N.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 K(this.publicKey,new K.Descriptor(new K.Descriptor.Single(it.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 vt(this.publicKey,t.sequence,new U(new U.Single(it.SignMode.SIGN_MODE_DIRECT)))];const r=(await this.sign(Buffer.from(t.toBytes()))).toString("base64");return t.auth_info.signer_infos=e,new K(this.publicKey,new K.Descriptor(new K.Descriptor.Single(it.SignMode.SIGN_MODE_DIRECT,r)),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()),o=Buffer.concat([Buffer.from(`Ethereum Signed Message:
2
- `),Buffer.from(e.length.toString()),e]);return new K(this.publicKey,new K.Descriptor(new K.Descriptor.Single(it.SignMode.SIGN_MODE_EIP_191,(await this.signWithKeccak256(o)).toString("base64"))),t.sequence)}async signTx(t,e){const r=new tt(t.body,new Wt([],t.auth_info.fee),[]),o=new Oi(e.chainId,e.accountNumber,e.sequence,r.auth_info,r.body);let s;if(e.signMode===it.SignMode.SIGN_MODE_LEGACY_AMINO_JSON)s=await this.createSignatureAmino(o);else if(e.signMode==it.SignMode.SIGN_MODE_DIRECT)s=await this.createSignature(o);else if(e.signMode==it.SignMode.SIGN_MODE_EIP_191)s=await this.createSignatureEIP191(o);else throw new Error("not supported sign mode");const n=s.data.single;return r.signatures.push(...t.signatures,n.signature),r.auth_info.signer_infos.push(...t.auth_info.signer_infos,new vt(s.public_key,s.sequence,new U(new U.Single(n.mode)))),r}}class Ra extends ai{constructor(e){const r=Ya.publicKeyCreate(new Uint8Array(e),!0);super(new Z(Buffer.from(r).toString("base64")));p(this,"privateKey");this.privateKey=e}static fromHex(e){const r=e.startsWith("0x")?e.slice(2):e;if(r.length!==64)throw new Error("Invalid private key length");return new Ra(Buffer.from(r,"hex"))}async sign(e){const r=Buffer.from(Ia.SHA256.hash(new Ia.Word32Array(e)).toString(),"hex"),{signature:o}=Ya.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}async signWithKeccak256(e){const r=Di(e),{signature:o}=Ya.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}}const ii=118,nm={account:0,index:0,coinType:ii};class yt extends Ra{constructor(e={}){const{account:r,index:o,coinType:s}={...nm,...e};let{mnemonic:n}=e;n===void 0&&(n=li.generateMnemonic(256));const a=li.mnemonicToSeedSync(n),c=Hc.fromSeed(a),d=`m/44'/${s}'/${r}'/0/${o}`,g=c.derivePath(d).privateKey;if(!g)throw new Error("Failed to derive key pair");super(g);p(this,"mnemonic");this.mnemonic=n}}const St={validator:"walk only potato reason dance meadow any milk raise inflict retreat parent force resource battle concert acquire regret drill better cabin meadow ordinary save",test1:"exclude stay club ten scrap inflict wheat riot fly usage wait dog grain turtle fetch toy insect snap mimic inner juice hotel grant net",test2:"explain inch inherit clean poverty crime guess material element arm night demand stem kid pool large hour soul measure scan pave error weather tragic",test3:"coconut climb noble cupboard leader decide power apple twice fiber blue region present orient negative jungle blanket fat gym moon fossil bulb evil apart",test4:"topic visual tide critic march unhappy thrive permit load math artwork speed only lawn effort general under cable door relief liberty avocado swallow tenant",test5:"large smoke slam staff crisp any version olympic spatial broom forward detect notice pull option hundred private outdoor oven hint box interest into power",test6:"private fuel exile give tribe profit waste sight primary fish rookie skirt wear broom issue gold bird process once pattern tongue rival sense reject",test7:"segment hire punch same escape soap economy health what either flat diamond hammer auction index omit museum tuition decline weekend lava over time mango",test8:"churn hill piece army zero random breeze ginger magnet huge fat notable ceiling yellow security chalk merry normal junior warm theme false fade later",test9:"primary scale invite wife carpet roast blouse utility lyrics tank marriage science problem salmon minor grocery there ladder noise never gather aerobic neglect rigid",test10:"forum shiver flush artefact analyst undo hundred mixed diamond mushroom submit city march crater fatigue deal host asthma reopen barrel virtual accuse crime dune"};class am extends dc{constructor(){super("http://localhost:1317",{chainId:"local-initia"});p(this,"wallets");this.wallets={validator:this.wallet(new yt({mnemonic:St.validator})),test1:this.wallet(new yt({mnemonic:St.test1})),test2:this.wallet(new yt({mnemonic:St.test2})),test3:this.wallet(new yt({mnemonic:St.test3})),test4:this.wallet(new yt({mnemonic:St.test4})),test5:this.wallet(new yt({mnemonic:St.test5})),test6:this.wallet(new yt({mnemonic:St.test6})),test7:this.wallet(new yt({mnemonic:St.test7})),test8:this.wallet(new yt({mnemonic:St.test8})),test9:this.wallet(new yt({mnemonic:St.test9})),test10:this.wallet(new yt({mnemonic:St.test10}))}}}var ci={exports:{}},ea=typeof Reflect=="object"?Reflect:null,_i=ea&&typeof ea.apply=="function"?ea.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Ma;ea&&typeof ea.ownKeys=="function"?Ma=ea.ownKeys:Object.getOwnPropertySymbols?Ma=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ma=function(t){return Object.getOwnPropertyNames(t)};function im(i){console&&console.warn&&console.warn(i)}var lc=Number.isNaN||function(t){return t!==t};function O(){O.init.call(this)}ci.exports=O;ci.exports.once=dm;O.EventEmitter=O;O.prototype._events=void 0;O.prototype._eventsCount=0;O.prototype._maxListeners=void 0;var vi=10;function qa(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(O,"defaultMaxListeners",{enumerable:!0,get:function(){return vi},set:function(i){if(typeof i!="number"||i<0||lc(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");vi=i}});O.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};O.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||lc(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function pc(i){return i._maxListeners===void 0?O.defaultMaxListeners:i._maxListeners}O.prototype.getMaxListeners=function(){return pc(this)};O.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var o=t==="error",s=this._events;if(s!==void 0)o=o&&s.error===void 0;else if(!o)return!1;if(o){var n;if(e.length>0&&(n=e[0]),n instanceof Error)throw n;var a=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw a.context=n,a}var c=s[t];if(c===void 0)return!1;if(typeof c=="function")_i(c,this,e);else for(var d=c.length,h=_c(c,d),r=0;r<d;++r)_i(h[r],this,e);return!0};function hc(i,t,e,r){var o,s,n;if(qa(e),s=i._events,s===void 0?(s=i._events=Object.create(null),i._eventsCount=0):(s.newListener!==void 0&&(i.emit("newListener",t,e.listener?e.listener:e),s=i._events),n=s[t]),n===void 0)n=s[t]=e,++i._eventsCount;else if(typeof n=="function"?n=s[t]=r?[e,n]:[n,e]:r?n.unshift(e):n.push(e),o=pc(i),o>0&&n.length>o&&!n.warned){n.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=i,a.type=t,a.count=n.length,im(a)}return i}O.prototype.addListener=function(t,e){return hc(this,t,e,!1)};O.prototype.on=O.prototype.addListener;O.prototype.prependListener=function(t,e){return hc(this,t,e,!0)};function cm(){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 fc(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},o=cm.bind(r);return o.listener=e,r.wrapFn=o,o}O.prototype.once=function(t,e){return qa(e),this.on(t,fc(this,t,e)),this};O.prototype.prependOnceListener=function(t,e){return qa(e),this.prependListener(t,fc(this,t,e)),this};O.prototype.removeListener=function(t,e){var r,o,s,n,a;if(qa(e),o=this._events,o===void 0)return this;if(r=o[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(s=-1,n=r.length-1;n>=0;n--)if(r[n]===e||r[n].listener===e){a=r[n].listener,s=n;break}if(s<0)return this;s===0?r.shift():mm(r,s),r.length===1&&(o[t]=r[0]),o.removeListener!==void 0&&this.emit("removeListener",t,a||e)}return this};O.prototype.off=O.prototype.removeListener;O.prototype.removeAllListeners=function(t){var e,r,o;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var s=Object.keys(r),n;for(o=0;o<s.length;++o)n=s[o],n!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(o=e.length-1;o>=0;o--)this.removeListener(t,e[o]);return this};function gc(i,t,e){var r=i._events;if(r===void 0)return[];var o=r[t];return o===void 0?[]:typeof o=="function"?e?[o.listener||o]:[o]:e?um(o):_c(o,o.length)}O.prototype.listeners=function(t){return gc(this,t,!0)};O.prototype.rawListeners=function(t){return gc(this,t,!1)};O.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):yc.call(i,t)};O.prototype.listenerCount=yc;function yc(i){var t=this._events;if(t!==void 0){var e=t[i];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}O.prototype.eventNames=function(){return this._eventsCount>0?Ma(this._events):[]};function _c(i,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=i[r];return e}function mm(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function um(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function dm(i,t){return new Promise(function(e,r){function o(n){i.removeListener(t,s),r(n)}function s(){typeof i.removeListener=="function"&&i.removeListener("error",o),e([].slice.call(arguments))}vc(i,t,s,{once:!0}),t!=="error"&&lm(i,o,{once:!0})})}function lm(i,t,e){typeof i.on=="function"&&vc(i,"error",t,e)}function vc(i,t,e,r){if(typeof i.on=="function")r.once?i.once(t,e):i.on(t,e);else if(typeof i.addEventListener=="function")i.addEventListener(t,function o(s){r.once&&i.removeEventListener(t,o),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}var pm=ci.exports;const bi=i=>i.replace(/'/g,"\\'");function hm(i){const t=[];for(const e of Object.keys(i)){let r;const o=i[e];if(Array.isArray(o))switch(o[0]){case">":case"<":case"<=":case">=":typeof o[1]!="number"?r=`${e}${o[0]}${o[1].toISOString()}`:r=`${e}${o[0]}${o[1]}`;break;case"CONTAINS":r=`${e} CONTAINS '${bi(o[1])}'`;break;case"EXISTS":r=`${e} EXISTS`;break}else switch(typeof o){case"number":r=`${e}=${o}`;break;case"string":r=`${e}='${bi(o)}'`;break;default:r=`${e}=${o.toISOString()}`}t.push(r)}return t.join(" AND ")}class fm extends pm.EventEmitter{constructor(e,r=0,o=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=r,this.reconnectInterval=o,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 Vc(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 r;if(typeof e.data=="string")r=e.data;else if(e.data instanceof Buffer)r=e.data.toString();else throw new Error("Unsupported message data type");const o=JSON.parse(r);this.callback&&o.result&&o.result.query===this.queryParams&&this.callback(o.result.data)}catch(r){this.emit("error",r)}}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,r,o){this.queryParams=hm({"tm.event":e,...r}),this.callback=o}subscribeTx(e,r){const o=s=>(s.value.TxResult.txhash=Na(s.value.TxResult.tx),r(s));this.subscribe("Tx",e,o)}}const ca=85,ei=250,gm="CSM",ma={GET_VERSION:0,INS_PUBLIC_KEY_SECP256K1:1,SIGN_SECP256K1:2,GET_ADDR_SECP256K1:4},xa={INIT:0,ADD:1,LAST:2},mi={ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},Pn={NoError:36864},ri={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 wn(i){return i in ri?ri[i]:`Unknown Status Code: ${i}`}function ym(i){return typeof i=="object"&&i!==null&&!(i instanceof Array)&&!(i instanceof Date)}function Gs(i){if(i){if(ym(i)){if(Object.prototype.hasOwnProperty.call(i,"statusCode"))return{return_code:i.statusCode,error_message:wn(i.statusCode)};if(Object.prototype.hasOwnProperty.call(i,"return_code")&&Object.prototype.hasOwnProperty.call(i,"error_message"))return i}return{return_code:65535,error_message:i.toString()}}return{return_code:65535,error_message:i.toString()}}function Sa(i){if((i==null?void 0:i.length)!==5)throw new TypeError("Invalid path.");const t=Buffer.alloc(20);return t.writeUInt32LE(2147483648+i[0],0),t.writeUInt32LE(2147483648+i[1],4),t.writeUInt32LE(2147483648+i[2],8),t.writeUInt32LE(i[3],12),t.writeUInt32LE(i[4],16),t}async function _m(i){return i.send(ca,ma.GET_VERSION,0,0).then(t=>{const e=t.slice(-2),r=e[0]*256+e[1];let o=0;return t.length>=9&&(o=(t[5]<<24)+(t[6]<<16)+(t[7]<<8)+(t[8]<<0)),{return_code:r,error_message:wn(r),test_mode:t[0]!==0,major:t[1],minor:t[2],patch:t[3],device_locked:t[4]===1,target_id:o.toString(16)}}).catch(Gs)}async function vm(i){return i.send(176,1,0,0).then(t=>{const e=t.slice(-2);let r=e[0]*256+e[1],o,s="err",n="err",a=0,c=0;if(t[0]!==1)o="response format ID not recognized",r=36865;else{o="No errors";const d=t[1];s=t.slice(2,2+d).toString("ascii");let h=2+d;const g=t[h];h+=1,n=t.slice(h,h+g).toString("ascii"),h+=g;const y=t[h];h+=1,a=y,c=t[h]}return{return_code:r,error_message:o,app_name:s,app_version:n,flag_len:a,flags_value:c,flag_recovery:(c&1)!==0,flag_signed_mcu_code:(c&2)!==0,flag_onboarded:(c&4)!==0,flag_pin_validated:(c&128)!==0}}).catch(Gs)}async function bm(i){return i.send(224,1,0,0,Buffer.from([]),[Pn.NoError,28160]).then(t=>{const e=t.slice(-2),r=e[0]*256+e[1];if(r===28160)return{return_code:r,error_message:"This command is only available in the Dashboard"};const o=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 c=t[s];s+=1;const d=t.slice(s,s+c).toString("hex");s+=c;const h=t[s];s+=1;let g=t.slice(s,s+h);g[h-1]===0&&(g=t.slice(s,s+h-1));const y=g.toString();return{return_code:r,error_message:wn(r),target_id:o,se_version:a,flag:d,mcu_version:y}}).catch(Gs)}async function Am(i,t){return i.send(ca,ma.GET_ADDR_SECP256K1,0,0,t,[Pn.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],s=e?Buffer.from(e.slice(0,33)):null;return{pk:"OBSOLETE PROPERTY",compressed_pk:s&&s.toJSON(),return_code:o,error_message:wn(o)}}).catch(Gs)}async function Pm(i,t){return i.send(ca,ma.GET_ADDR_SECP256K1,mi.ONLY_RETRIEVE,0,t,[Pn.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],s=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:s.toJSON(),return_code:o,error_message:wn(o)}}).catch(Gs)}async function wm(i,t){return i.send(ca,ma.GET_ADDR_SECP256K1,mi.SHOW_ADDRESS_IN_DEVICE,0,t,[Pn.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],s=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:s.toJSON(),return_code:o,error_message:wn(o)}}).catch(Gs)}function Dm(i,t){const e=Sa(i),r=[];if(e instanceof Buffer){r.push(e);const o=Buffer.from(t);for(let s=0;s<o.length;s+=ei){let n=s+ei;s>o.length&&(n=o.length),r.push(o.slice(s,n))}}return r}async function Ai(i,t,e,r){let o=xa.ADD;return t===1&&(o=xa.INIT),t===e&&(o=xa.LAST),i.send(ca,ma.SIGN_SECP256K1,o,0,r,[Pn.NoError,27012,27264]).then(s=>{const n=s.slice(-2),a=n[0]*256+n[1];let c=wn(a);(a===27264||a===27012)&&(c=`${c} : ${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:c}}).catch(Gs)}async function km(i,t,e){const r=Dm(t,e);return Ai(i,1,r.length,r[0]).then(async o=>{let s={return_code:o.return_code,error_message:o.error_message,signature:{type:"Buffer",data:[]}};for(let n=1;n<r.length&&(s=await Ai(i,1+n,r.length,r[n]),s.return_code===Pn.NoError);n+=1);return{return_code:s.return_code,error_message:s.error_message,signature:s.signature}}).catch(Gs)}const Mm="Initia",xm="Cosmos";class va{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 r=(void 0)("sha256").update(e).digest(),o=new Kc().update(r).digest();return N.bech32.encode(t,N.bech32.toWords(o))}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===Mm&&this.version.major===1||this.info.app_name===xm&&this.version.major===2)return}return{return_code:25600,error_message:"App Version is not supported"}}async initialize(){return vm(this.transport).then(t=>(this.info=t,_m(this.transport))).then(t=>(this.version=t,this.validateCompatibility()))}getInfo(){return this.info}getVersion(){return this.version}getDeviceInfo(){return bm(this.transport)}getPublicKey(t){const e=Sa(t),r=Buffer.concat([va.serializeHRP("init"),e]);return Am(this.transport,r)}getAddressAndPubKey(t,e){const r=Sa(t),o=Buffer.concat([va.serializeHRP(e),r]);return Pm(this.transport,o)}showAddressAndPubKey(t,e){const r=Sa(t),o=Buffer.concat([va.serializeHRP(e),r]);return wm(this.transport,o)}sign(t,e){return km(this.transport,t,e)}}const Pi=120,bc="1.0.0";class W extends Error{constructor(t){super(t),this.name="LedgerError"}}class ui extends ai{constructor(e){super();p(this,"app");p(this,"path",[44,ii,0,0,0]);this.transport=e,this.app=new va(this.transport)}get accAddress(){if(!this.publicKey)throw new Error("Ledger is unintialized. Initialize it first.");return this.publicKey.address()}static async create(e,r){e||(e=await Cm());const o=new ui(e);return r!=null&&(o.path[4]=r),e&&typeof e.on=="function"&&e.on("disconnect",()=>{o.transport=void 0}),await o.initialize().catch(Sm),o}async initialize(){const e=await this.app.initialize(),{app_name:r}=this.app.getInfo();if(r!=="Initia")throw new W("Open the Initia app in the Ledger");const{major:o,minor:s,patch:n}=this.app.getVersion(),a=`${o}.${s}.${n}`;if(r==="Initia"&&Jc.lt(a,bc))throw new W("Outdated version: Update Ledger Initia App to the latest version");Za(e),await this.loadAccountDetails()}async loadAccountDetails(){const e=await this.app.getAddressAndPubKey(this.path,"init");return Za(e),this.publicKey=new Z(Buffer.from(e.compressed_pk.data).toString("base64")),this}async sign(e){this.publicKey||await this.loadAccountDetails();const r=await this.app.sign(this.path,e);return Za(r),Buffer.from(Ni.signatureImport(Buffer.from(r.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 Sm=i=>{const t=i.message.trim();if(!t.startsWith("The device is already open"))throw i.name==="TransportOpenUserCancelled"?new W("Couldn't find the Ledger. Check the Ledger is plugged in and unlocked."):t.startsWith("No WebUSB interface found for the Ledger device")?new W(`Couldn't connect to a Ledger device. Use Ledger Live to upgrade the Ledger firmware to version ${bc} or later.`):t.startsWith("Unable to claim interface")?new W("Couldn't access Ledger device. Is it being used in another tab?"):t.startsWith("Transport not defined")?new W("Couldn't access Ledger device. Is it being used in another tab?"):t.startsWith("Not supported")?new W("This browser doesn't support WebUSB yet. Update it to the latest version."):t.startsWith("No device selected")?new W("Couldn't find the Ledger. Check the Ledger is plugged in and unlocked."):i},Za=i=>{if(!i)return;const{error_message:t,device_locked:e}=i;if(e)throw new W("Ledger's screensaver mode is on");if(t.startsWith("TransportRaceCondition"))throw new W("Finish previous action in Ledger");if(t.startsWith("DisconnectedDeviceDuringOperation"))throw new W("Open the Initia app in the Ledger");switch(t){case"U2F: Timeout":throw new W("Couldn't find a connected and unlocked Ledger device");case"App does not seem to be open":throw new W("Open the Initia app in the Ledger");case"Command not allowed":throw new W("Transaction rejected");case"Transaction rejected":throw new W("User rejected the transaction");case"Unknown Status Code: 26628":throw new W("Ledger's screensaver mode is on");case"Instruction not supported":throw new W("Check the Ledger is running latest version of Initia");case"No errors":break;default:throw new W(t)}},Im=i=>i.indexOf("Win")>-1,Nm=i=>{const t=i.toLowerCase(),e=/chrome|crios/.test(t)&&!/edge|opr\//.test(t),r=e&&!window.google;if(!e&&!r)throw new W("This browser doesn't support Ledger devices");return e?"chrome":"brave"};async function Cm(){let i;if(Nm(navigator.userAgent),Im(navigator.platform)){if(!navigator.hid)throw new W("This browser doesn't have HID enabled. Enable this feature by visiting: chrome://flags/#enable-experimental-web-platform-features");const{default:t}=await Promise.resolve().then(()=>require("./TransportWebHID-CVJmgfzo.js"));i=await t.create(Pi*1e3)}else{const{default:t}=await Promise.resolve().then(()=>require("./TransportWebUSB-V4VV5RPc.js"));i=await t.create(Pi*1e3)}return i}Object.defineProperty(exports,"State",{enumerable:!0,get:()=>Ut.State});Object.defineProperty(exports,"stateFromJSON",{enumerable:!0,get:()=>Ut.stateFromJSON});Object.defineProperty(exports,"stateToJSON",{enumerable:!0,get:()=>Ut.stateToJSON});exports.ABCIParams=Is;exports.ACL=on;exports.APIRequester=Ci;exports.APP_KEY=gm;exports.AbsoluteTxPosition=Ws;exports.AcceptedMessageKeysFilter=be;exports.AcceptedMessagesFilter=Ae;exports.AccessConfig=q;exports.Allocation=Hs;exports.AllowAllMessagesFilter=ve;exports.AllowedMsgAllowance=dr;exports.AuctionAPI=Ei;exports.AuctionParams=os;exports.AuthAPI=Ti;exports.AuthInfo=Wt;exports.AuthParams=ss;exports.AuthorizationGrant=zt;exports.AuthzAPI=Ri;exports.BankAPI=qi;exports.BankParams=as;exports.BaseAccount=_t;exports.BasicAllowance=rt;exports.BatchInfo=lt;exports.BatchInfoWithOutput=Xn;exports.Blob=oa;exports.BlobTx=Ca;exports.BlockParams=Ms;exports.BridgeConfig=jt;exports.BridgeInfo=Yt;exports.CHUNK_SIZE=ei;exports.CLA=ca;exports.Channel=Mt;exports.ChannelCounterparty=Os;exports.ClientConsensusStates=_a;exports.CodeGrant=Ds;exports.Coin=v;exports.Coins=u;exports.CombinedLimit=_e;exports.ConnectionCounterparty=xt;exports.ConsensusStateWithHeight=Ts;exports.ContractExecutionAuthorization=Pe;exports.ContractGrant=Lt;exports.ContractMigrationAuthorization=we;exports.CurrencyPair=at;exports.DecisionPolicyWindows=Ht;exports.Delegation=zs;exports.DenomMetadata=Vt;exports.DenomTrace=Qs;exports.DenomUnit=ks;exports.Deposit=Rn;exports.DistributionAPI=Fi;exports.DistributionParams=ms;exports.Duration=D;exports.ERROR_CODE=Pn;exports.ERROR_DESCRIPTION=ri;exports.Equivocation=nr;exports.EvidenceAPI=$i;exports.EvidenceParams=xs;exports.EvmAPI=Li;exports.EvmParams=us;exports.ExecuteAuthorization=he;exports.ExecuteAuthorizationItem=ws;exports.Fee=Kt;exports.FeeGrantAPI=zi;exports.ForwardingAPI=Gi;exports.FungibleTokenPacketData=ha;exports.GenericAuthorization=le;exports.GovAPI=Vi;exports.GovParams=ds;exports.GroupAPI=Ki;exports.GroupInfo=$r;exports.GroupMember=qn;exports.GroupPolicyInfo=Bs;exports.GroupProposal=ls;exports.GroupVote=re;exports.Height=A;exports.INIT_COIN_TYPE=ii;exports.INS=ma;exports.IbcAPI=Wi;exports.IbcChannelParams=an;exports.IbcClientParams=Rs;exports.IbcConnectionParams=mn;exports.IbcFee=oe;exports.IbcHooksAPI=Hi;exports.IbcHooksParams=ps;exports.IbcNftAPI=Ji;exports.IbcNftParams=hs;exports.IbcPermAPI=Qi;exports.IbcTransferAPI=ji;exports.IbcVersion=dt;exports.IdentifiedClientState=Fn;exports.IdentifiedConnection=cn;exports.IdentifiedPacketFees=ga;exports.InterTxAPI=Yi;exports.JSONSerializable=m;exports.Key=ai;exports.LCDClient=dc;exports.LedgerError=W;exports.LedgerKey=ui;exports.LegacyAminoMultisigPublicKey=Xt;exports.LocalInitia=am;exports.Market=gt;exports.MarketmapAPI=Zi;exports.MarketmapParams=fs;exports.MaxCallsLimit=ge;exports.MaxFundsLimit=ye;exports.Member=Es;exports.MemberRequest=ut;exports.MerklePrefix=Fs;exports.MerkleRoot=Ua;exports.Metadata=fa;exports.MnemonicKey=yt;exports.ModeInfo=U;exports.ModuleAccount=te;exports.MoveAPI=Xi;exports.MoveParams=gs;exports.MsgAcknowledgement=gn;exports.MsgAddCodeUploadParamsAddresses=qe;exports.MsgAddCurrencyPairs=Zr;exports.MsgAddValidator=Po;exports.MsgAuctionBid=ce;exports.MsgBeginRedelegate=_o;exports.MsgBurn=Jo;exports.MsgCall=mr;exports.MsgCancelProposal=gr;exports.MsgCancelUnbondingDelegation=bo;exports.MsgCancelUpgrade=jr;exports.MsgChangeAdmin=jo;exports.MsgChannelCloseConfirm=hn;exports.MsgChannelCloseInit=pn;exports.MsgChannelOpenAck=ln;exports.MsgChannelOpenConfirm=dn;exports.MsgChannelOpenInit=nn;exports.MsgChannelOpenTry=un;exports.MsgClearAdmin=Ne;exports.MsgClearForwardingAccount=fr;exports.MsgCommunityPoolSpend=or;exports.MsgCreate=ir;exports.MsgCreate2=cr;exports.MsgCreateBridge=Io;exports.MsgCreateDenom=Wo;exports.MsgCreateGroup=xr;exports.MsgCreateGroupPolicy=Nr;exports.MsgCreateGroupWithPolicy=Cr;exports.MsgCreateMarkets=to;exports.MsgCreateValidator=vo;exports.MsgDelegate=go;exports.MsgDeleteOutput=Co;exports.MsgDelist=uo;exports.MsgDeposit=_r;exports.MsgDepositLegacy=yr;exports.MsgDepositValidatorRewardsPool=sr;exports.MsgEditValidator=$t;exports.MsgExecAuthorized=Ve;exports.MsgExecute=so;exports.MsgExecuteContract=xe;exports.MsgExecuteJSON=no;exports.MsgExecuteMessages=Mo;exports.MsgFinalizeTokenDeposit=Do;exports.MsgFinalizeTokenWithdrawal=Eo;exports.MsgForceTransfer=Zo;exports.MsgFundCommunityPool=er;exports.MsgGovExecute=lo;exports.MsgGovExecuteJSON=po;exports.MsgGovPublish=Ft;exports.MsgGovScript=ho;exports.MsgGovScriptJSON=fo;exports.MsgGrantAllowance=lr;exports.MsgGrantAuthorization=ze;exports.MsgGroupExec=Ur;exports.MsgGroupVote=Tt;exports.MsgHaltChannel=Wr;exports.MsgInitiateTokenDeposit=Uo;exports.MsgInitiateTokenWithdrawal=ko;exports.MsgInstantiateContract=ke;exports.MsgInstantiateContractV2=Me;exports.MsgLeaveGroup=Er;exports.MsgMigrateContract=Se;exports.MsgMint=Ho;exports.MsgMultiSend=X;exports.MsgNftTransfer=Gr;exports.MsgPayForBlobs=Ys;exports.MsgPayPacketFee=Xs;exports.MsgPayPacketFeeAsync=tn;exports.MsgPinCodes=Be;exports.MsgProposeOutput=No;exports.MsgPublish=qt;exports.MsgRecordBatch=So;exports.MsgRecvPacket=fn;exports.MsgRegisterAccount=Qr;exports.MsgRegisterCounterpartyPayee=rn;exports.MsgRegisterForwardingAccount=hr;exports.MsgRegisterPayee=en;exports.MsgRemoveCodeUploadParamsAddresses=Fe;exports.MsgRemoveCurrencyPairs=Xr;exports.MsgRemoveMarketAuthorities=ro;exports.MsgRemoveValidator=wo;exports.MsgResumeChannel=Hr;exports.MsgRevokeAllowance=pr;exports.MsgRevokeAuthorization=Ge;exports.MsgScript=ao;exports.MsgScriptJSON=io;exports.MsgSend=Ke;exports.MsgSetBeforeSendHook=Yo;exports.MsgSetBridgeInfo=$o;exports.MsgSetDenomMetadata=Je;exports.MsgSetDenomMetadataWasm=Qo;exports.MsgSetPermissionedRelayers=Kr;exports.MsgSetSendEnabled=He;exports.MsgSetWithdrawAddress=Ze;exports.MsgSoftwareUpgrade=Jr;exports.MsgSpendFeePool=xo;exports.MsgStoreAndInstantiateContract=Te;exports.MsgStoreAndMigrateContract=Re;exports.MsgStoreCode=De;exports.MsgSubmitEvidence=ar;exports.MsgSubmitGroupProposal=Rt;exports.MsgSubmitProposal=wr;exports.MsgSubmitProposalLegacy=Pr;exports.MsgSubmitTx=Yr;exports.MsgSudoContract=Ee;exports.MsgTimeout=yn;exports.MsgTimeoutOnClose=_n;exports.MsgTransfer=Le;exports.MsgUndelegate=yo;exports.MsgUnjail=Vo;exports.MsgUnpinCodes=Oe;exports.MsgUpdateACL=Lr;exports.MsgUpdateAdmin=Ie;exports.MsgUpdateAuctionParams=me;exports.MsgUpdateAuthParams=ue;exports.MsgUpdateBankParams=We;exports.MsgUpdateBatchInfo=To;exports.MsgUpdateChallengers=Oo;exports.MsgUpdateConsensusParams=je;exports.MsgUpdateContractLabel=$e;exports.MsgUpdateCrisisParams=Ye;exports.MsgUpdateDistrParams=rr;exports.MsgUpdateEvmParams=ur;exports.MsgUpdateGovParams=Mr;exports.MsgUpdateGroupAdmin=Br;exports.MsgUpdateGroupDecisionPolicy=Or;exports.MsgUpdateGroupMembers=Tr;exports.MsgUpdateGroupMetadata=Rr;exports.MsgUpdateGroupPolicyAdmin=qr;exports.MsgUpdateGroupPolicyMetadata=Fr;exports.MsgUpdateIbcChannelParams=vn;exports.MsgUpdateIbcHooksParams=zr;exports.MsgUpdateIbcNftParams=Vr;exports.MsgUpdateIbcTransferParams=js;exports.MsgUpdateInstantiateConfig=Ce;exports.MsgUpdateMarketmapParams=oo;exports.MsgUpdateMarkets=eo;exports.MsgUpdateMetadata=qo;exports.MsgUpdateMoveParams=co;exports.MsgUpdateMstakingParams=Ao;exports.MsgUpdateOpchildParams=zo;exports.MsgUpdateOphostParams=Fo;exports.MsgUpdateOracle=Lo;exports.MsgUpdateOracleConfig=Ro;exports.MsgUpdateProposer=Bo;exports.MsgUpdateRewardParams=Go;exports.MsgUpdateSlashingParams=Ko;exports.MsgUpdateTokenfactoryParams=Xo;exports.MsgUpdateWasmParams=Ue;exports.MsgVerifyInvariant=Qe;exports.MsgVote=Ot;exports.MsgVoteLegacy=Bt;exports.MsgVoteWeighted=kr;exports.MsgVoteWeightedLegacy=Dr;exports.MsgWhitelist=mo;exports.MsgWithdrawDelegatorReward=Xe;exports.MsgWithdrawValidatorCommission=tr;exports.MstakingAPI=tc;exports.MstakingParams=ys;exports.MultiSignature=tm;exports.NftClassTrace=sn;exports.NonFungibleTokenPacketData=ya;exports.OpValidator=bn;exports.OpchildAPI=ec;exports.OpchildParams=vs;exports.OphostAPI=rc;exports.OphostParams=_s;exports.OracleAPI=oc;exports.OrderBy=jc;exports.Output=Qt;exports.P1_VALUES=mi;exports.PAYLOAD_TYPE=xa;exports.Packet=ft;exports.PacketFee=ne;exports.PacketId=se;exports.ParamChange=Cs;exports.ParamChanges=vr;exports.ParameterChangeProposal=br;exports.PercentageDecisionPolicy=Ir;exports.PeriodicAllowance=bt;exports.Plan=Jt;exports.Proposal=ee;exports.ProviderConfig=$s;exports.PublishAuthorization=pe;exports.QuotePrice=Zn;exports.RawKey=Ra;exports.Redelegation=Nt;exports.RewardAPI=sc;exports.RewardParams=bs;exports.RewardWeight=Ns;exports.SendAuthorization=de;exports.SendEnabled=Gt;exports.SignDoc=Oi;exports.SignatureV2=K;exports.SignerInfo=vt;exports.SimplePublicKey=Z;exports.SimulateResponse=Ta;exports.SlashingAPI=nc;exports.SlashingParams=As;exports.StakeAuthorization=Et;exports.StakeAuthorizationValidators=It;exports.StoreCodeAuthorization=fe;exports.TendermintAPI=ac;exports.TextProposal=Ar;exports.ThresholdDecisionPolicy=Sr;exports.Ticker=Ls;exports.Timeout=qs;exports.TokenfactoryAPI=ic;exports.TokenfactoryParams=Ps;exports.TransferAuthorization=Js;exports.Tx=tt;exports.TxAPI=ta;exports.TxBody=cs;exports.TxInfo=na;exports.TxLog=An;exports.UnbondingDelegation=pt;exports.UpgradeAPI=cc;exports.ValConsPublicKey=j;exports.Validator=G;exports.ValidatorParams=Ss;exports.Vote=Us;exports.Wallet=uc;exports.WasmAPI=mc;exports.WasmParams=ns;exports.WebSocketClient=fm;exports.WeightedVoteOption=mt;exports.bcs=rm;exports.checkDecimal=Vs;exports.hashToHex=Na;exports.isTxError=om;exports.keccak256=Qc;exports.num=_;exports.prepareSignBytes=ba;exports.removeNull=Ui;exports.ripemd160=Bi;exports.sha256=Oa;Object.keys(Y).forEach(i=>{i!=="default"&&!Object.prototype.hasOwnProperty.call(exports,i)&&Object.defineProperty(exports,i,{enumerable:!0,get:()=>Y[i]})});
1
+ "use strict";var Mc=Object.defineProperty;var xc=(i,t,e)=>t in i?Mc(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var p=(i,t,e)=>xc(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const hi=require("axios"),Sc=require("@initia/initia.proto/cosmos/tx/v1beta1/service"),Y=require("bignumber.js"),Ic=require("@initia/initia.proto/cosmos/base/v1beta1/coin"),l=require("@initia/initia.proto/google/protobuf/any"),kn=require("@initia/initia.proto/sdk/auction/v1/tx"),Nc=require("@initia/initia.proto/sdk/auction/v1/genesis"),f=require("long"),Ws=require("@initia/initia.proto/cosmos/auth/v1beta1/auth"),Ga=require("@initia/initia.proto/cosmos/auth/v1beta1/tx"),Mi=require("secp256k1"),xi=require("jscrypto/SHA256"),Cc=require("jscrypto/RIPEMD160"),Uc=require("jscrypto/Base64"),Ua=require("jscrypto"),Si=require("keccak256"),Va=require("@initia/initia.proto/cosmos/crypto/multisig/keys"),Ka=require("@initia/initia.proto/cosmos/crypto/secp256k1/keys"),Wa=require("@initia/initia.proto/cosmos/crypto/ed25519/keys"),Ja=require("@initia/initia.proto/initia/crypto/v1beta1/ethsecp256k1/keys"),E=require("bech32"),ae=require("@initia/initia.proto/initia/mstaking/v1/authz"),Ha=require("@initia/initia.proto/cosmos/bank/v1beta1/authz"),ka=require("@initia/initia.proto/cosmos/authz/v1beta1/authz"),Mn=require("@initia/initia.proto/initia/move/v1/authz"),ca=require("@initia/initia.proto/initia/move/v1/types"),B=require("@initia/initia.proto/cosmwasm/wasm/v1/authz"),gt=require("@initia/initia.proto/cosmwasm/wasm/v1/types"),P=require("@initia/initia.proto/cosmwasm/wasm/v1/tx"),Ma=require("@initia/initia.proto/ibc/applications/transfer/v1/authz"),xn=require("@initia/initia.proto/ibc/applications/transfer/v1/tx"),Da=require("@initia/initia.proto/ibc/core/client/v1/client"),Ii=require("@initia/initia.proto/ibc/applications/transfer/v1/transfer"),Ec=require("@initia/initia.proto/ibc/applications/transfer/v2/packet"),es=require("@initia/initia.proto/cosmos/authz/v1beta1/tx"),Pt=require("@initia/initia.proto/cosmos/bank/v1beta1/tx"),sa=require("@initia/initia.proto/cosmos/bank/v1beta1/bank"),ja=require("@initia/initia.proto/initia/bank/v1/tx"),Ya=require("@initia/initia.proto/celestia/blob/v1/tx"),oi=require("@initia/initia.proto/celestia/blob/v1/blob"),mt=require("@initia/initia.proto/cosmos/tx/signing/v1beta1/signing"),rt=require("@initia/initia.proto/cosmos/tx/v1beta1/tx"),si=require("@initia/initia.proto/cosmos/crypto/multisig/v1beta1/multisig"),Ta=require("@initia/initia.proto/tendermint/types/params"),Qa=require("@initia/initia.proto/cosmos/consensus/v1/tx"),pa=require("@initia/initia.proto/cosmos/crisis/v1beta1/tx"),st=require("@initia/initia.proto/cosmos/distribution/v1beta1/tx"),Ni=require("@initia/initia.proto/initia/distribution/v1/distribution"),Sn=require("@initia/initia.proto/initia/distribution/v1/tx"),Za=require("@initia/initia.proto/cosmos/evidence/v1beta1/tx"),Xa=require("@initia/initia.proto/cosmos/evidence/v1beta1/evidence"),wt=require("@initia/initia.proto/minievm/evm/v1/tx"),Bc=require("@initia/initia.proto/minievm/evm/v1/types"),rs=require("@initia/initia.proto/cosmos/feegrant/v1beta1/feegrant"),In=require("@initia/initia.proto/cosmos/feegrant/v1beta1/tx"),Nn=require("@initia/initia.proto/noble/forwarding/v1/tx"),nt=require("@initia/initia.proto/cosmos/gov/v1/tx"),Dt=require("@initia/initia.proto/cosmos/gov/v1beta1/tx"),xa=require("@initia/initia.proto/cosmos/params/v1beta1/params"),Sa=require("@initia/initia.proto/cosmos/gov/v1beta1/gov"),Ut=require("@initia/initia.proto/cosmos/gov/v1/gov"),Ra=require("@initia/initia.proto/initia/gov/v1/gov"),ti=require("@initia/initia.proto/initia/gov/v1/tx"),I=require("@initia/initia.proto/cosmos/group/v1/types"),w=require("@initia/initia.proto/cosmos/group/v1/tx"),kt=require("@initia/initia.proto/ibc/applications/fee/v1/tx"),Ci=require("@initia/initia.proto/ibc/applications/fee/v1/fee"),ma=require("@initia/initia.proto/ibc/core/channel/v1/channel"),Oc=require("@initia/initia.proto/ibc/applications/fee/v1/metadata"),Cn=require("@initia/initia.proto/initia/ibchooks/v1/tx"),Ui=require("@initia/initia.proto/initia/ibchooks/v1/types"),Un=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/tx"),Ei=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/types"),Tc=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/packet"),En=require("@initia/initia.proto/ibc/applications/perm/v1/tx"),N=require("@initia/initia.proto/ibc/core/channel/v1/tx"),Bi=require("@initia/initia.proto/ibc/core/commitment/v1/commitment"),Ct=require("@initia/initia.proto/ibc/core/connection/v1/connection"),J=require("@initia/initia.proto/ibc/core/client/v1/tx"),Rc=require("@initia/initia.proto/cosmos/upgrade/v1beta1/upgrade"),Bn=require("@initia/initia.proto/cosmos/upgrade/v1beta1/tx"),at=require("@initia/initia.proto/ibc/core/connection/v1/tx"),On=require("@initia/initia.proto/initia/intertx/v1/tx"),it=require("@initia/initia.proto/connect/marketmap/v2/tx"),Tn=require("@initia/initia.proto/connect/oracle/v2/tx"),qc=require("@initia/initia.proto/connect/types/v2/currency_pair"),Fc=require("@initia/initia.proto/connect/oracle/v2/genesis"),ii=require("@initia/initia.proto/connect/marketmap/v2/market"),$c=require("@initia/initia.proto/connect/marketmap/v2/params"),x=require("@initia/initia.proto/initia/move/v1/tx"),H=require("@initia/initia.proto/initia/mstaking/v1/tx"),ut=require("@initia/initia.proto/initia/mstaking/v1/staking"),R=require("@initia/opinit.proto/opinit/opchild/v1/tx"),ci=require("@initia/opinit.proto/opinit/opchild/v1/types"),S=require("@initia/opinit.proto/opinit/ophost/v1/tx"),ie=require("@initia/opinit.proto/opinit/ophost/v1/types"),Lc=require("@initia/initia.proto/initia/reward/v1/types"),ei=require("@initia/initia.proto/initia/reward/v1/tx"),Rn=require("@initia/initia.proto/cosmos/slashing/v1beta1/tx"),zc=require("@initia/initia.proto/cosmos/slashing/v1beta1/slashing"),$=require("@initia/initia.proto/miniwasm/tokenfactory/v1/tx"),Gc=require("@initia/initia.proto/miniwasm/tokenfactory/v1/params"),Vc=require("@initia/initia.proto/cosmos/base/abci/v1beta1/abci"),Zt=require("@mysten/bcs"),Kc=require("bip32"),Wc=require("bip39"),Jc=require("ws"),Hc=require("ripemd160"),jc=require("semver");function qa(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const ha=qa(Mi),Yc=qa(Kc),fi=qa(Wc),Qc=qa(jc),Zc=Sc.OrderBy;class Oi{constructor(t,e){p(this,"axios");p(this,"baseURL");this.baseURL=t;const r={headers:{Accept:"application/json"},timeout:3e4};this.axios=hi.create({...r,...e,headers:{...r.headers,...e==null?void 0:e.headers}})}computeEndpoint(t){const e=new URL(this.baseURL);return e.pathname==="/"?e.pathname=t:e.pathname+=t,e.toString()}async getRaw(t,e={}){const r=this.computeEndpoint(t);return this.axios.get(r,{params:e}).then(o=>o.data)}async get(t,e={},r=new hi.AxiosHeaders){const o=this.computeEndpoint(t);return this.axios.get(o,{params:e,headers:r}).then(s=>s.data)}async post(t,e){const r=this.computeEndpoint(t);return this.axios.post(r,e).then(o=>o.data)}}function wa(i){if(Array.isArray(i))return i.map(wa);if(typeof i!="object"||i===null)return i;const t={};return Object.keys(i).sort().forEach(e=>{i[e]===void 0||i[e]===null||(t[e]=wa(i[e]))}),t}class m{toJSON(){return JSON.stringify(wa(this.toData()))}toAminoJSON(){return JSON.stringify(wa(this.toAmino()))}}function Ti(i){return i!==null&&typeof i=="object"?Object.entries(i).filter(([,t])=>t!=null).reduce((t,[e,r])=>({...t,[e]:r===Object(r)&&!Array.isArray(r)?Ti(r):r}),{}):i}function v(i){return new Y.BigNumber(i)}function Ks(i){return typeof i=="string"?i.includes("."):!v(i).isInteger()}class _ extends m{constructor(e,r){super();p(this,"amount");p(this,"isDecimal");this.denom=e,this.amount=v(r).toString(),this.isDecimal=Ks(r)}toIntCoin(){return new _(this.denom,v(this.amount).toFixed(0))}toIntCeilCoin(){return new _(this.denom,v(this.amount).toFixed(0,2))}toDecCoin(){return new _(this.denom,this.amount.includes(".")?this.amount:v(this.amount).toFixed(1))}toString(){return`${this.isDecimal&&!this.amount.includes(".")?v(this.amount).toFixed(1):v(this.amount).toFixed()}${this.denom}`}static fromString(e){const r=e.match(/^(-?[0-9]+(\.[0-9]+)?)([0-9a-zA-Z/]+)$/);if(r===null)throw new Error(`failed to parse to Coin: ${e}`);const o=r[1],s=r[3];return new _(s,o)}add(e){let r,o=this.isDecimal;if(e instanceof _){if(e.denom!==this.denom)throw new _.ArithmeticError(`cannot add two Coins of different denoms: ${this.denom} and ${e.denom}`);r=e.amount,o=o||e.isDecimal}else r=e,o=o||Ks(e);const s=v(this.amount).plus(r);return new _(this.denom,o&&s.isInteger()?s.toFixed(1):s.toFixed())}sub(e){let r,o=this.isDecimal;if(e instanceof _){if(e.denom!==this.denom)throw new _.ArithmeticError(`cannot subtract two Coins of different denoms: ${this.denom} and ${e.denom}`);r=e.amount,o=o||e.isDecimal}else r=e,o=o||Ks(e);const s=v(this.amount).minus(r);return new _(this.denom,o&&s.isInteger()?s.toFixed(1):s.toFixed())}mul(e){const r=this.isDecimal||Ks(e),o=v(this.amount).multipliedBy(e);return new _(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}div(e){const r=this.isDecimal||Ks(e),o=v(this.amount).dividedBy(e);return new _(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}mod(e){const r=this.isDecimal||Ks(e),o=v(this.amount).mod(e);return new _(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}static fromAmino(e){const{denom:r,amount:o}=e;return new _(r,o)}toAmino(){const{denom:e,amount:r}=this;return{denom:e,amount:this.isDecimal?v(r).toFixed(18):r}}static fromData(e){const{denom:r,amount:o}=e;return new _(r,o)}toData(){const{denom:e,amount:r}=this;return{denom:e,amount:this.isDecimal?v(r).toFixed(18):r}}static fromProto(e){return new _(e.denom,e.amount)}toProto(){return Ic.Coin.fromPartial({denom:this.denom,amount:this.isDecimal?v(this.amount).toFixed(18):this.amount})}}(i=>{class t{constructor(r){this.message=r}}i.ArithmeticError=t})(_||(_={}));class ce extends m{constructor(t,e,r){super(),this.bidder=t,this.bid=e,this.transactions=r}static fromAmino(t){const{value:{bidder:e,bid:r,transactions:o}}=t;return new ce(e,_.fromAmino(r),o)}toAmino(){const{bidder:t,bid:e,transactions:r}=this;return{type:"block-sdk/x/auction/MsgAuctionBid",value:{bidder:t,bid:e.toAmino(),transactions:r}}}static fromData(t){const{bidder:e,bid:r,transactions:o}=t;return new ce(e,_.fromData(r),o)}toData(){const{bidder:t,bid:e,transactions:r}=this;return{"@type":"/sdk.auction.v1.MsgAuctionBid",bidder:t,bid:e.toData(),transactions:r}}static fromProto(t){return new ce(t.bidder,_.fromProto(t.bid),t.transactions.map(e=>Buffer.from(e).toString("base64")))}toProto(){const{bidder:t,bid:e,transactions:r}=this;return kn.MsgAuctionBid.fromPartial({bidder:t,bid:e.toProto(),transactions:r.map(o=>Buffer.from(o,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgAuctionBid",value:kn.MsgAuctionBid.encode(this.toProto()).finish()})}static unpackAny(t){return ce.fromProto(kn.MsgAuctionBid.decode(t.value))}}class os extends m{constructor(t,e,r,o,s,n){super(),this.max_bundle_size=t,this.escrow_account_address=e,this.reserve_fee=r,this.min_bid_increment=o,this.front_running_protection=s,this.proposer_fee=n}static fromAmino(t){const{value:{max_bundle_size:e,escrow_account_address:r,reserve_fee:o,min_bid_increment:s,front_running_protection:n,proposer_fee:a}}=t;return new os(Number.parseInt(e),r,_.fromAmino(o),_.fromAmino(s),n,a)}toAmino(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:s,proposer_fee:n}=this;return{type:"block-sdk/x/auction/Params",value:{max_bundle_size:t.toString(),escrow_account_address:e,reserve_fee:r.toAmino(),min_bid_increment:o.toAmino(),front_running_protection:s,proposer_fee:n}}}static fromData(t){const{max_bundle_size:e,escrow_account_address:r,reserve_fee:o,min_bid_increment:s,front_running_protection:n,proposer_fee:a}=t;return new os(Number.parseInt(e),r,_.fromData(o),_.fromData(s),n,a)}toData(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:s,proposer_fee:n}=this;return{"@type":"/sdk.auction.v1.Params",max_bundle_size:t.toString(),escrow_account_address:e,reserve_fee:r.toData(),min_bid_increment:o.toData(),front_running_protection:s,proposer_fee:n}}static fromProto(t){return new os(t.maxBundleSize,Buffer.from(t.escrowAccountAddress).toString("base64"),_.fromProto(t.reserveFee),_.fromProto(t.minBidIncrement),t.frontRunningProtection,t.proposerFee)}toProto(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:s,proposer_fee:n}=this;return Nc.Params.fromPartial({maxBundleSize:t,escrowAccountAddress:Buffer.from(e,"base64"),reserveFee:r.toProto(),minBidIncrement:o.toProto(),frontRunningProtection:s,proposerFee:n})}}class me extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new me(e,os.fromAmino(r))}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:r}=t;return new me(e,os.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/sdk.auction.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new me(t.authority,os.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return kn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgUpdateParams",value:kn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return me.fromProto(kn.MsgUpdateParams.decode(t.value))}}class U{constructor(t){this.c=t}}class Ri extends U{async parameters(t={}){return this.c.get("/block-sdk/auction/v1/params",t).then(({params:e})=>os.fromData(e))}}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 r;Array.isArray(e)?r=e:(r=[],Object.keys(e).forEach(o=>r.push(new _(o,e[o]))));for(const o of r){const{denom:s}=o,n=this._coins[s];n!==void 0?this._coins[s]=n.add(o):this._coins[s]=o}if(this.toArray().some(o=>o.isDecimal))for(const o of Object.keys(this._coins))this._coins[o]=this._coins[o].toDecCoin()}}[Symbol.iterator](){let e=-1;const r=this.toArray();return{next:()=>({value:r[++e],done:e===r.length})}}toString(){return this.toArray().map(e=>e.toString()).join(",")}static fromString(e){const o=e.split(/,\s*/).map(s=>_.fromString(s));return new u(o)}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,r){let o;if(r instanceof _){if(r.denom!=e)throw new Error(`Denoms must match when setting: ${e}, ${r.denom}`);o=r}else o=new _(e,r);this._coins[e]=o}toArray(){return Object.values(this._coins).sort((e,r)=>e.denom.localeCompare(r.denom))}add(e){return e instanceof _?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(r=>r.mul(e)))}div(e){return new u(this.map(r=>r.div(e)))}mod(e){return new u(this.map(r=>r.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(_.fromAmino))}toAmino(){return this.toArray().map(e=>e.toAmino())}static fromData(e){return new u((e??[]).map(_.fromData))}toData(){return this.toArray().map(e=>e.toData())}static fromProto(e){return new u((e??[]).map(_.fromProto))}toProto(){return this.toArray().map(e=>e.toProto())}}class D{constructor(t,e=0){p(this,"seconds");p(this,"nanos");const[r,o]=(e/Math.pow(10,9)+t).toFixed(9).split(".");this.seconds=f.fromString(r),this.nanos=Number.parseInt(o)}static fromString(t){const[e,r]=Number.parseFloat(t.replace("s","")).toFixed(9).split(".");return new D(Number.parseInt(e),Number.parseInt(r))}toString(){return`${this.nanos/Math.pow(10,9)+this.seconds.toNumber()}s`}static fromAmino(t){return D.fromString(t)}toAmino(){return this.toString()}static fromData(t){return D.fromString(t)}toData(){return this.toString()}static fromProto(t){return new D(t.seconds.toNumber(),t.nanos)}toProto(){return{seconds:this.seconds,nanos:this.nanos}}}class ss extends m{constructor(t,e,r,o,s){super(),this.max_memo_characters=t,this.tx_sig_limit=e,this.tx_size_cost_per_byte=r,this.sig_verify_cost_ed25519=o,this.sig_verify_cost_secp256k1=s}static fromAmino(t){const{value:{max_memo_characters:e,tx_sig_limit:r,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:s,sig_verify_cost_secp256k1:n}}=t;return new ss(Number.parseInt(e),Number.parseInt(r),Number.parseInt(o),Number.parseInt(s),Number.parseInt(n))}toAmino(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:o,sig_verify_cost_secp256k1:s}=this;return{type:"cosmos-sdk/x/auth/Params",value:{max_memo_characters:t.toString(),tx_sig_limit:e.toString(),tx_size_cost_per_byte:r.toString(),sig_verify_cost_ed25519:o.toString(),sig_verify_cost_secp256k1:s.toString()}}}static fromData(t){const{max_memo_characters:e,tx_sig_limit:r,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:s,sig_verify_cost_secp256k1:n}=t;return new ss(Number.parseInt(e),Number.parseInt(r),Number.parseInt(o),Number.parseInt(s),Number.parseInt(n))}toData(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:o,sig_verify_cost_secp256k1:s}=this;return{"@type":"/cosmos.auth.v1beta1.Params",max_memo_characters:t.toString(),tx_sig_limit:e.toString(),tx_size_cost_per_byte:r.toString(),sig_verify_cost_ed25519:o.toString(),sig_verify_cost_secp256k1:s.toString()}}static fromProto(t){return new ss(t.maxMemoCharacters.toNumber(),t.txSigLimit.toNumber(),t.txSizeCostPerByte.toNumber(),t.sigVerifyCostEd25519.toNumber(),t.sigVerifyCostSecp256k1.toNumber())}toProto(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:o,sig_verify_cost_secp256k1:s}=this;return Ws.Params.fromPartial({maxMemoCharacters:f.fromNumber(t),txSigLimit:f.fromNumber(e),txSizeCostPerByte:f.fromNumber(r),sigVerifyCostEd25519:f.fromNumber(o),sigVerifyCostSecp256k1:f.fromNumber(s)})}}class ue extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new ue(e,ss.fromAmino(r))}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:r}=t;return new ue(e,ss.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.auth.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new ue(t.authority,ss.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ga.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.MsgUpdateParams",value:Ga.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ue.fromProto(Ga.MsgUpdateParams.decode(t.value))}}function Ea(i){return xi.SHA256.hash(Uc.Base64.parse(i)).toString().toUpperCase()}function Fa(i){return xi.SHA256.hash(new Ua.Word32Array(i)).toUint8Array()}function qi(i){return Si(Buffer.from(i))}function Fi(i){return Cc.RIPEMD160.hash(new Ua.Word32Array(i)).toUint8Array()}const Xc=Buffer.from("eb5ae98721","hex"),tm=Buffer.from("22c1f7e2","hex"),gi=i=>{const t=Number.parseInt(i.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;(i=>{function t(o){switch(o.type){case"tendermint/PubKeySecp256k1":return Q.fromAmino(o);case"tendermint/PubKeyMultisigThreshold":return Xt.fromAmino(o);case"tendermint/PubKeyEd25519":return j.fromAmino(o);case"initia/PubKeyEthSecp256k1":return de.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.crypto.secp256k1.PubKey":return Q.fromData(o);case"/cosmos.crypto.multisig.LegacyAminoPubKey":return Xt.fromData(o);case"/cosmos.crypto.ed25519.PubKey":return j.fromData(o);case"/initia.crypto.v1beta1.ethsecp256k1.PubKey":return de.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;if(s==="/cosmos.crypto.secp256k1.PubKey")return Q.unpackAny(o);if(s==="/cosmos.crypto.multisig.LegacyAminoPubKey")return Xt.unpackAny(o);if(s==="/cosmos.crypto.ed25519.PubKey")return j.unpackAny(o);if(s==="/initia.crypto.v1beta1.ethsecp256k1.PubKey")return de.unpackAny(o);throw new Error(`Pubkey type ${s} not recognized`)}i.fromProto=r})(exports.PublicKey||(exports.PublicKey={}));class Q extends m{constructor(t){super(),this.key=t}static fromAmino(t){return new Q(t.value)}toAmino(){return{type:"tendermint/PubKeySecp256k1",value:this.key}}static fromData(t){return new Q(t.key)}toData(){return{"@type":"/cosmos.crypto.secp256k1.PubKey",key:this.key}}static fromProto(t){return new Q(Buffer.from(t.key).toString("base64"))}toProto(){return Ka.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:Ka.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Q.fromProto(Ka.PubKey.decode(t.value))}encodeAminoPubkey(){return Buffer.concat([Xc,Buffer.from(this.key,"base64")])}rawAddress(){const t=Buffer.from(this.key,"base64");return Fi(Fa(t))}address(){return E.bech32.encode("init",E.bech32.toWords(this.rawAddress()))}}class Xt extends m{constructor(t,e){super(),this.threshold=t,this.pubkeys=e}encodeAminoPubkey(){const t=Array.from(tm);t.push(8),t.push(...gi(this.threshold));for(const e of this.pubkeys.map(r=>r.encodeAminoPubkey()))t.push(18),t.push(...gi(e.length)),t.push(...Array.from(e));return new Uint8Array(t)}rawAddress(){const t=this.encodeAminoPubkey();return Fa(t).slice(0,20)}address(){return E.bech32.encode("init",E.bech32.toWords(this.rawAddress()))}static fromAmino(t){return new Xt(Number.parseInt(t.value.threshold),t.value.pubkeys.map(e=>Q.fromAmino(e)))}toAmino(){return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:this.threshold.toFixed(),pubkeys:this.pubkeys.map(t=>t.toAmino())}}}static fromData(t){return new Xt(Number.parseInt(t.threshold),t.public_keys.map(e=>Q.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 Xt(t.threshold,t.publicKeys.map(e=>Q.unpackAny(e)))}toProto(){return Va.LegacyAminoPubKey.fromPartial({threshold:this.threshold,publicKeys:this.pubkeys.map(t=>t.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:Va.LegacyAminoPubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Xt.fromProto(Va.LegacyAminoPubKey.decode(t.value))}}class j extends m{constructor(t){super(),this.key=t}static fromAmino(t){return new j(t.value)}toAmino(){return{type:"tendermint/PubKeyEd25519",value:this.key}}static fromData(t){return new j(t.key)}toData(){return{"@type":"/cosmos.crypto.ed25519.PubKey",key:this.key}}static fromProto(t){return new j(Buffer.from(t.key).toString("base64"))}toProto(){return Wa.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:Wa.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return j.fromProto(Wa.PubKey.decode(t.value))}rawAddress(){const t=Buffer.from(this.key,"base64");return Fa(t).slice(0,20)}address(){return E.bech32.encode("initvalcons",E.bech32.toWords(this.rawAddress()))}}class de extends m{constructor(t){super(),this.key=t}static fromAmino(t){return new de(t.value)}toAmino(){return{type:"initia/PubKeyEthSecp256k1",value:this.key}}static fromData(t){return new de(t.key)}toData(){return{"@type":"/initia.crypto.v1beta1.ethsecp256k1.PubKey",key:this.key}}static fromProto(t){return new de(Buffer.from(t.key).toString("base64"))}toProto(){return Ja.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.crypto.v1beta1.ethsecp256k1.PubKey",value:Ja.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return de.fromProto(Ja.PubKey.decode(t.value))}rawAddress(){if(!ha.publicKeyVerify(Buffer.from(this.key,"base64")))throw new Error("Invalid public key");const e=ha.publicKeyConvert(Buffer.from(this.key,"base64"),!1);return qi(e.slice(1)).slice(12)}address(){return E.bech32.encode("init",E.bech32.toWords(this.rawAddress()))}}class vt extends m{constructor(t,e,r,o){super(),this.address=t,this.public_key=e,this.account_number=r,this.sequence=o}getAccountNumber(){return this.account_number}getSequenceNumber(){return this.sequence}getPublicKey(){return this.public_key}toAmino(){const{address:t,public_key:e,account_number:r,sequence:o}=this;return{type:"cosmos-sdk/BaseAccount",value:{address:t,public_key:e==null?void 0:e.toAmino(),account_number:r.toFixed(),sequence:o.toFixed()}}}static fromAmino(t){const{value:{address:e,public_key:r,account_number:o,sequence:s}}=t;return new vt(e??"",r?exports.PublicKey.fromAmino(r):void 0,Number.parseInt(o)??0,Number.parseInt(s)??0)}static fromData(t){const{address:e,pub_key:r,account_number:o,sequence:s}=t;return new vt(e??"",r?exports.PublicKey.fromData(r):void 0,Number.parseInt(o)??0,Number.parseInt(s)??0)}toData(){const{address:t,public_key:e,account_number:r,sequence:o}=this;return{"@type":"/cosmos.auth.v1beta1.BaseAccount",address:t,pub_key:e==null?void 0:e.toData(),account_number:r.toFixed(),sequence:o.toFixed()}}toProto(){const{address:t,public_key:e,account_number:r,sequence:o}=this;return Ws.BaseAccount.fromPartial({address:t,pubKey:e==null?void 0:e.packAny(),accountNumber:f.fromNumber(r),sequence:f.fromNumber(o)})}static fromProto(t){const e=t.pubKey;return new vt(t.address,e?exports.PublicKey.fromProto(e):void 0,t.accountNumber.toNumber(),t.sequence.toNumber())}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.BaseAccount",value:Ws.BaseAccount.encode(this.toProto()).finish()})}static unpackAny(t){return vt.fromProto(Ws.BaseAccount.decode(t.value))}}class te extends m{constructor(t,e,r){super(),this.base_account=t,this.name=e,this.permissions=r}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:r,permissions:o}}=t;return new te(vt.fromAmino({type:"cosmos-sdk/BaseAccount",value:e}),r,o)}toAmino(){const{base_account:t,name:e,permissions:r}=this;return{type:"cosmos-sdk/ModuleAccount",value:{base_account:t.toAmino().value,name:e,permissions:r}}}static fromData(t){const{base_account:e,name:r,permissions:o}=t;return new te(vt.fromData({"@type":"/cosmos.auth.v1beta1.BaseAccount",...e}),r,o)}toData(){const{base_account:t,name:e,permissions:r}=this;return{"@type":"/cosmos.auth.v1beta1.ModuleAccount",base_account:t.toData(),name:e,permissions:r}}static fromProto(t){return new te(vt.fromProto(t.baseAccount),t.name,t.permissions)}toProto(){const{base_account:t,name:e,permissions:r}=this;return Ws.ModuleAccount.fromPartial({baseAccount:t.toProto(),name:e,permissions:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",value:Ws.ModuleAccount.encode(this.toProto()).finish()})}static unpackAny(t){return te.fromProto(Ws.ModuleAccount.decode(t.value))}}exports.Account=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/BaseAccount":return vt.fromAmino(o);case"cosmos-sdk/ModuleAccount":return te.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.auth.v1beta1.BaseAccount":return vt.fromData(o);case"/cosmos.auth.v1beta1.ModuleAccount":return te.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;if(s==="/cosmos.auth.v1beta1.BaseAccount")return vt.unpackAny(o);if(s==="/cosmos.auth.v1beta1.ModuleAccount")return te.unpackAny(o);throw new Error(`Account type ${s} not recognized`)}i.fromProto=r})(exports.Account||(exports.Account={}));class Et extends m{constructor(e,r,o,s){super();p(this,"max_tokens");this.allow_list=r,this.deny_list=o,this.authorization_type=s,this.max_tokens=new u(e)}static fromAmino(e){const{value:{max_tokens:r,allow_list:o,deny_list:s,authorization_type:n}}=e;return new Et(u.fromAmino(r),It.fromAmino(o),It.fromAmino(s),ae.authorizationTypeFromJSON(n))}toAmino(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:s}=this;return{type:"mstake/StakeAuthorization",value:{max_tokens:e.toAmino(),allow_list:r.toAmino(),deny_list:o.toAmino(),authorization_type:ae.authorizationTypeToJSON(s)}}}static fromData(e){const{max_tokens:r,allow_list:o,deny_list:s,authorization_type:n}=e;return new Et(u.fromData(r),It.fromData(o),It.fromData(s),ae.authorizationTypeFromJSON(n))}toData(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:s}=this;return{"@type":"/initia.mstaking.v1.StakeAuthorization",max_tokens:e.toData(),allow_list:r.toData(),deny_list:o.toData(),authorization_type:ae.authorizationTypeToJSON(s)}}static fromProto(e){return new Et(u.fromProto(e.maxTokens),It.fromProto(e.allowList),It.fromProto(e.denyList),e.authorizationType)}toProto(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:s}=this;return ae.StakeAuthorization.fromPartial({maxTokens:e.toProto(),allowList:r.toProto(),denyList:o.toProto(),authorizationType:s})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.StakeAuthorization",value:ae.StakeAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return Et.fromProto(ae.StakeAuthorization.decode(e.value))}}class It extends m{constructor(t){super(),this.address=t}static fromAmino(t){return new It(t.address)}toAmino(){return{address:this.address}}static fromData(t){return new It(t.address)}toData(){return{address:this.address}}static fromProto(t){return new It(t.address)}toProto(){return ae.StakeAuthorization_Validators.fromPartial({address:this.address})}}(i=>{i.Type=ae.AuthorizationType})(Et||(Et={}));class le extends m{constructor(e,r){super();p(this,"spend_limit");this.allow_list=r,this.spend_limit=new u(e)}static fromAmino(e){return new le(u.fromAmino(e.value.spend_limit),e.value.allow_list)}toAmino(){const{spend_limit:e,allow_list:r}=this;return{type:"cosmos-sdk/SendAuthorization",value:{spend_limit:e.toAmino(),allow_list:r}}}static fromData(e){return new le(u.fromData(e.spend_limit),e.allow_list)}toData(){const{spend_limit:e,allow_list:r}=this;return{"@type":"/cosmos.bank.v1beta1.SendAuthorization",spend_limit:e.toAmino(),allow_list:r}}static fromProto(e){return new le(u.fromProto(e.spendLimit),e.allowList)}toProto(){return Ha.SendAuthorization.fromPartial({spendLimit:this.spend_limit.toProto(),allowList:this.allow_list})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.SendAuthorization",value:Ha.SendAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return le.fromProto(Ha.SendAuthorization.decode(e.value))}}class pe extends m{constructor(t){super(),this.msg=t}static fromAmino(t){return new pe(t.value.msg)}toAmino(){const{msg:t}=this;return{type:"cosmos-sdk/GenericAuthorization",value:{msg:t}}}static fromData(t){return new pe(t.msg)}toData(){const{msg:t}=this;return{"@type":"/cosmos.authz.v1beta1.GenericAuthorization",msg:t}}static fromProto(t){return new pe(t.msg)}toProto(){return ka.GenericAuthorization.fromPartial({msg:this.msg})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",value:ka.GenericAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return pe.fromProto(ka.GenericAuthorization.decode(t.value))}}class he extends m{constructor(t){super(),this.module_names=t}static fromAmino(t){return new he(t.value.module_names)}toAmino(){return{type:"move/PublishAuthorization",value:{module_names:this.module_names}}}static fromData(t){return new he(t.module_names)}toData(){return{"@type":"/initia.move.v1.PublishAuthorization",module_names:this.module_names}}static fromProto(t){return new he(t.moduleNames)}toProto(){return Mn.PublishAuthorization.fromPartial({moduleNames:this.module_names})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.PublishAuthorization",value:Mn.PublishAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return he.fromProto(Mn.PublishAuthorization.decode(t.value))}}class fe extends m{constructor(t){super(),this.items=t}static fromAmino(t){return new fe(t.value.items.map(Ds.fromAmino))}toAmino(){return{type:"move/ExecuteAuthorization",value:{items:this.items.map(t=>t.toAmino())}}}static fromData(t){return new fe(t.items.map(Ds.fromData))}toData(){return{"@type":"/initia.move.v1.ExecuteAuthorization",items:this.items.map(t=>t.toData())}}static fromProto(t){return new fe(t.items.map(Ds.fromProto))}toProto(){return Mn.ExecuteAuthorization.fromPartial({items:this.items.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.ExecuteAuthorization",value:Mn.ExecuteAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return fe.fromProto(Mn.ExecuteAuthorization.decode(t.value))}}class Ds extends m{constructor(t,e,r){super(),this.module_address=t,this.module_name=e,this.function_names=r}static fromAmino(t){const{module_address:e,module_name:r,function_names:o}=t;return new Ds(e,r,o)}toAmino(){const{module_address:t,module_name:e,function_names:r}=this;return{module_address:t,module_name:e,function_names:r}}static fromData(t){const{module_address:e,module_name:r,function_names:o}=t;return new Ds(e,r,o)}toData(){const{module_address:t,module_name:e,function_names:r}=this;return{module_address:t,module_name:e,function_names:r}}static fromProto(t){return new Ds(t.moduleAddress,t.moduleName,t.functionNames)}toProto(){return ca.ExecuteAuthorizationItem.fromPartial({moduleAddress:this.module_address,moduleName:this.module_name,functionNames:this.function_names})}}class q extends m{constructor(t,e){super(),this.permission=t,this.addresses=e}static fromAmino(t){const{permission:e,addresses:r}=t;return new q(gt.accessTypeFromJSON(e),r)}toAmino(){const{permission:t,addresses:e}=this;return{permission:gt.accessTypeToJSON(t),addresses:e}}static fromData(t){const{permission:e,addresses:r}=t;return new q(gt.accessTypeFromJSON(e),r)}toData(){const{permission:t,addresses:e}=this;return{permission:gt.accessTypeToJSON(t),addresses:e}}static fromProto(t){return new q(t.permission,t.addresses)}toProto(){const{permission:t,addresses:e}=this;return gt.AccessConfig.fromPartial({permission:t,addresses:e})}}(i=>{i.Type=gt.AccessType})(q||(q={}));class ks extends m{constructor(t,e){super(),this.code_hash=t,this.instantiate_permission=e}static fromAmino(t){const{code_hash:e,instantiate_permission:r}=t;return new ks(e,r?q.fromAmino(r):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:r}=t;return new ks(e,r?q.fromData(r):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 ks(Buffer.from(t.codeHash).toString("base64"),t.instantiatePermission?q.fromProto(t.instantiatePermission):void 0)}toProto(){const{code_hash:t,instantiate_permission:e}=this;return B.CodeGrant.fromPartial({codeHash:Buffer.from(t,"base64"),instantiatePermission:e==null?void 0:e.toProto()})}}class ge extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new ge(t.value.grants.map(ks.fromAmino))}toAmino(){return{type:"wasm/StoreCodeAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new ge(t.grants.map(ks.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.StoreCodeAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new ge(t.grants.map(ks.fromProto))}toProto(){return B.StoreCodeAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.StoreCodeAuthorization",value:B.StoreCodeAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return ge.fromProto(B.StoreCodeAuthorization.decode(t.value))}}class ye extends m{constructor(t){super(),this.remaining=t}static fromAmino(t){return new ye(Number.parseInt(t.value.remaining))}toAmino(){return{type:"wasm/MaxCallsLimit",value:{remaining:this.remaining.toString()}}}static fromData(t){return new ye(Number.parseInt(t.remaining))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxCallsLimit",remaining:this.remaining.toString()}}static fromProto(t){return new ye(t.remaining.toNumber())}toProto(){return B.MaxCallsLimit.fromPartial({remaining:f.fromNumber(this.remaining)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxCallsLimit",value:B.MaxCallsLimit.encode(this.toProto()).finish()})}static unpackAny(t){return ye.fromProto(B.MaxCallsLimit.decode(t.value))}}class _e extends m{constructor(e){super();p(this,"amounts");this.amounts=new u(e)}static fromAmino(e){return new _e(u.fromAmino(e.value.amounts))}toAmino(){return{type:"wasm/MaxFundsLimit",value:{amounts:this.amounts.toAmino()}}}static fromData(e){return new _e(u.fromData(e.amounts))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxFundsLimit",amounts:this.amounts.toData()}}static fromProto(e){return new _e(u.fromProto(e.amounts))}toProto(){return B.MaxFundsLimit.fromPartial({amounts:this.amounts.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxFundsLimit",value:B.MaxFundsLimit.encode(this.toProto()).finish()})}static unpackAny(e){return _e.fromProto(B.MaxFundsLimit.decode(e.value))}}class ve extends m{constructor(e,r){super();p(this,"amounts");this.calls_remaining=e,this.amounts=new u(r)}static fromAmino(e){const{value:{calls_remaining:r,amounts:o}}=e;return new ve(Number.parseInt(r),u.fromAmino(o))}toAmino(){const{calls_remaining:e,amounts:r}=this;return{type:"wasm/CombinedLimit",value:{calls_remaining:e.toString(),amounts:r.toAmino()}}}static fromData(e){const{calls_remaining:r,amounts:o}=e;return new ve(Number.parseInt(r),u.fromData(o))}toData(){const{calls_remaining:e,amounts:r}=this;return{"@type":"/cosmwasm.wasm.v1.CombinedLimit",calls_remaining:e.toString(),amounts:r.toData()}}static fromProto(e){return new ve(e.callsRemaining.toNumber(),u.fromProto(e.amounts))}toProto(){const{calls_remaining:e,amounts:r}=this;return B.CombinedLimit.fromPartial({callsRemaining:f.fromNumber(e),amounts:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.CombinedLimit",value:B.CombinedLimit.encode(this.toProto()).finish()})}static unpackAny(e){return ve.fromProto(B.CombinedLimit.decode(e.value))}}var fa;(i=>{function t(o){switch(o.type){case"wasm/MaxCallsLimit":return ye.fromAmino(o);case"wasm/MaxFundsLimit":return _e.fromAmino(o);case"wasm/CombinedLimit":return ve.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.MaxCallsLimit":return ye.fromData(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return _e.fromData(o);case"/cosmwasm.wasm.v1.CombinedLimit":return ve.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmwasm.wasm.v1.MaxCallsLimit":return ye.unpackAny(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return _e.unpackAny(o);case"/cosmwasm.wasm.v1.CombinedLimit":return ve.unpackAny(o)}throw new Error(`ContractLimit type ${s} not recognized`)}i.fromProto=r})(fa||(fa={}));class be extends m{constructor(){super()}static fromAmino(t){return new be}toAmino(){return{type:"wasm/AllowAllMessagesFilter",value:{}}}static fromData(t){return new be}toData(){return{"@type":"/cosmwasm.wasm.v1.AllowAllMessagesFilter"}}static fromProto(t){return new be}toProto(){return B.AllowAllMessagesFilter.fromPartial({})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AllowAllMessagesFilter",value:B.AllowAllMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return be.fromProto(B.AllowAllMessagesFilter.decode(t.value))}}class Ae extends m{constructor(t){super(),this.keys=t}static fromAmino(t){return new Ae(t.value.keys)}toAmino(){return{type:"wasm/AcceptedMessageKeysFilter",value:{keys:this.keys}}}static fromData(t){return new Ae(t.keys)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",keys:this.keys}}static fromProto(t){return new Ae(t.keys)}toProto(){return B.AcceptedMessageKeysFilter.fromPartial({keys:this.keys})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",value:B.AcceptedMessageKeysFilter.encode(this.toProto()).finish()})}static unpackAny(t){return Ae.fromProto(B.AcceptedMessageKeysFilter.decode(t.value))}}class Pe extends m{constructor(t){super(),this.messages=t}static fromAmino(t){return new Pe(t.value.messages)}toAmino(){return{type:"wasm/AcceptedMessagesFilter",value:{messages:this.messages}}}static fromData(t){return new Pe(t.messages)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessagesFilter",messages:this.messages}}static fromProto(t){return new Pe(t.messages.map(e=>Buffer.from(e).toString("base64")))}toProto(){return B.AcceptedMessagesFilter.fromPartial({messages:this.messages.map(t=>Buffer.from(t,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessagesFilter",value:B.AcceptedMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return Pe.fromProto(B.AcceptedMessagesFilter.decode(t.value))}}var ga;(i=>{function t(o){switch(o.type){case"wasm/AllowAllMessagesFilter":return be.fromAmino(o);case"wasm/AcceptedMessageKeysFilter":return Ae.fromAmino(o);case"wasm/AcceptedMessagesFilter":return Pe.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return be.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return Ae.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return Pe.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return be.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return Ae.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return Pe.unpackAny(o)}throw new Error(`ContractFilter type ${s} not recognized`)}i.fromProto=r})(ga||(ga={}));class Lt extends m{constructor(t,e,r){super(),this.contract=t,this.limit=e,this.filter=r}static fromAmino(t){const{contract:e,limit:r,filter:o}=t;return new Lt(e,fa.fromAmino(r),ga.fromAmino(o))}toAmino(){const{contract:t,limit:e,filter:r}=this;return{contract:t,limit:e.toAmino(),filter:r.toAmino()}}static fromData(t){const{contract:e,limit:r,filter:o}=t;return new Lt(e,fa.fromData(r),ga.fromData(o))}toData(){const{contract:t,limit:e,filter:r}=this;return{contract:t,limit:e.toData(),filter:r.toData()}}static fromProto(t){return new Lt(t.contract,fa.fromProto(t.limit),ga.fromProto(t.filter))}toProto(){const{contract:t,limit:e,filter:r}=this;return B.ContractGrant.fromPartial({contract:t,limit:e.packAny(),filter:r.packAny()})}}class we extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new we(t.value.grants.map(Lt.fromAmino))}toAmino(){return{type:"wasm/ContractExecutionAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new we(t.grants.map(Lt.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractExecutionAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new we(t.grants.map(Lt.fromProto))}toProto(){return B.ContractExecutionAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractExecutionAuthorization",value:B.ContractExecutionAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return we.fromProto(B.ContractExecutionAuthorization.decode(t.value))}}class De extends m{constructor(t){super(),this.grants=t}static fromAmino(t){return new De(t.value.grants.map(Lt.fromAmino))}toAmino(){return{type:"wasm/ContractMigrationAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new De(t.grants.map(Lt.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractMigrationAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new De(t.grants.map(Lt.fromProto))}toProto(){return B.ContractMigrationAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractMigrationAuthorization",value:B.ContractMigrationAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return De.fromProto(B.ContractMigrationAuthorization.decode(t.value))}}class ke extends m{constructor(t,e,r){super(),this.sender=t,this.wasm_byte_code=e,this.instantiate_permission=r}static fromAmino(t){const{value:{sender:e,wasm_byte_code:r,instantiate_permission:o}}=t;return new ke(e,r,o?q.fromAmino(o):void 0)}toAmino(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return{type:"wasm/MsgStoreCode",value:{sender:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toAmino()}}}static fromData(t){const{sender:e,wasm_byte_code:r,instantiate_permission:o}=t;return new ke(e,r,o?q.fromData(o):void 0)}toData(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreCode",sender:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toData()}}static fromProto(t){return new ke(t.sender,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?q.fromProto(t.instantiatePermission):void 0)}toProto(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return P.MsgStoreCode.fromPartial({sender:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:r==null?void 0:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:P.MsgStoreCode.encode(this.toProto()).finish()})}static unpackAny(t){return ke.fromProto(P.MsgStoreCode.decode(t.value))}}class Me extends m{constructor(e,r,o,s,n,a){super();p(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=s,this.msg=n,this.funds=new u(a)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:s,label:n,msg:a,funds:c}}=e;return new Me(r,o,Number.parseInt(s),n,a,u.fromAmino(c))}toAmino(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a}=this;return{type:"wasm/MsgInstantiateContract",value:{sender:e,admin:r,code_id:o.toString(),label:s,msg:n,funds:a.toAmino()}}}static fromData(e){const{sender:r,admin:o,code_id:s,label:n,msg:a,funds:c}=e;return new Me(r,o,Number.parseInt(s),n,a,u.fromData(c))}toData(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:e,admin:r,code_id:o.toString(),label:s,msg:n,funds:a.toData()}}static fromProto(e){return new Me(e.sender,e.admin,e.codeId.toNumber(),e.label,Buffer.from(e.msg).toString("base64"),u.fromProto(e.funds))}toProto(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a}=this;return P.MsgInstantiateContract.fromPartial({sender:e,admin:r,codeId:f.fromNumber(o),label:s,msg:Buffer.from(n,"base64"),funds:a.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:P.MsgInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return Me.fromProto(P.MsgInstantiateContract.decode(e.value))}}class xe extends m{constructor(e,r,o,s,n,a,c,d){super();p(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=s,this.msg=n,this.salt=c,this.fix_msg=d,this.funds=new u(a)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:s,label:n,msg:a,funds:c,salt:d,fix_msg:h}}=e;return new xe(r,o,Number.parseInt(s),n,a,u.fromAmino(c),d,h)}toAmino(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a,salt:c,fix_msg:d}=this;return{type:"wasm/MsgInstantiateContract2",value:{sender:e,admin:r,code_id:o.toString(),label:s,msg:n,funds:a.toAmino(),salt:c,fix_msg:d}}}static fromData(e){const{sender:r,admin:o,code_id:s,label:n,msg:a,funds:c,salt:d,fix_msg:h}=e;return new xe(r,o,Number.parseInt(s),n,a,u.fromData(c),d,h)}toData(){const{sender:e,admin:r,code_id:o,label:s,msg:n,funds:a,salt:c,fix_msg:d}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract2",sender:e,admin:r,code_id:o.toString(),label:s,msg:n,funds:a.toData(),salt:c,fix_msg:d}}static fromProto(e){return new xe(e.sender,e.admin,e.codeId.toNumber(),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:r,code_id:o,label:s,msg:n,funds:a,salt:c,fix_msg:d}=this;return P.MsgInstantiateContract2.fromPartial({sender:e,admin:r,codeId:f.fromNumber(o),label:s,msg:Buffer.from(n,"base64"),funds:a.toProto(),salt:Buffer.from(c,"base64"),fixMsg:d})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:P.MsgInstantiateContract2.encode(this.toProto()).finish()})}static unpackAny(e){return xe.fromProto(P.MsgInstantiateContract2.decode(e.value))}}class Se extends m{constructor(e,r,o,s){super();p(this,"funds");this.sender=e,this.contract=r,this.msg=o,this.funds=new u(s)}static fromAmino(e){const{value:{sender:r,contract:o,msg:s,funds:n}}=e;return new Se(r,o,s,u.fromAmino(n))}toAmino(){const{sender:e,contract:r,msg:o,funds:s}=this;return{type:"wasm/MsgExecuteContract",value:{sender:e,contract:r,msg:o,funds:s.toAmino()}}}static fromData(e){const{sender:r,contract:o,msg:s,funds:n}=e;return new Se(r,o,s,u.fromData(n))}toData(){const{sender:e,contract:r,msg:o,funds:s}=this;return{"@type":"/cosmwasm.wasm.v1.MsgExecuteContract",sender:e,contract:r,msg:o,funds:s.toData()}}static fromProto(e){return new Se(e.sender,e.contract,Buffer.from(e.msg).toString("base64"),u.fromProto(e.funds))}toProto(){const{sender:e,contract:r,msg:o,funds:s}=this;return P.MsgExecuteContract.fromPartial({sender:e,contract:r,msg:Buffer.from(o,"base64"),funds:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:P.MsgExecuteContract.encode(this.toProto()).finish()})}static unpackAny(e){return Se.fromProto(P.MsgExecuteContract.decode(e.value))}}class Ie extends m{constructor(t,e,r,o){super(),this.sender=t,this.contract=e,this.code_id=r,this.msg=o}static fromAmino(t){const{value:{sender:e,contract:r,code_id:o,msg:s}}=t;return new Ie(e,r,Number.parseInt(o),s)}toAmino(){const{sender:t,contract:e,code_id:r,msg:o}=this;return{type:"wasm/MsgMigrateContract",value:{sender:t,contract:e,code_id:r.toString(),msg:o}}}static fromData(t){const{sender:e,contract:r,code_id:o,msg:s}=t;return new Ie(e,r,Number.parseInt(o),s)}toData(){const{sender:t,contract:e,code_id:r,msg:o}=this;return{"@type":"/cosmwasm.wasm.v1.MsgMigrateContract",sender:t,contract:e,code_id:r.toString(),msg:o}}static fromProto(t){return new Ie(t.sender,t.contract,t.codeId.toNumber(),Buffer.from(t.msg).toString("base64"))}toProto(){const{sender:t,contract:e,code_id:r,msg:o}=this;return P.MsgMigrateContract.fromPartial({sender:t,contract:e,codeId:f.fromNumber(r),msg:Buffer.from(o,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:P.MsgMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return Ie.fromProto(P.MsgMigrateContract.decode(t.value))}}class Ne extends m{constructor(t,e,r){super(),this.sender=t,this.new_admin=e,this.contract=r}static fromAmino(t){const{value:{sender:e,new_admin:r,contract:o}}=t;return new Ne(e,r,o)}toAmino(){const{sender:t,new_admin:e,contract:r}=this;return{type:"wasm/MsgUpdateAdmin",value:{sender:t,new_admin:e,contract:r}}}static fromData(t){const{sender:e,new_admin:r,contract:o}=t;return new Ne(e,r,o)}toData(){const{sender:t,new_admin:e,contract:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateAdmin",sender:t,new_admin:e,contract:r}}static fromProto(t){return new Ne(t.sender,t.newAdmin,t.contract)}toProto(){const{sender:t,new_admin:e,contract:r}=this;return P.MsgUpdateAdmin.fromPartial({sender:t,newAdmin:e,contract:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:P.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Ne.fromProto(P.MsgUpdateAdmin.decode(t.value))}}class Ce extends m{constructor(t,e){super(),this.sender=t,this.contract=e}static fromAmino(t){const{value:{sender:e,contract:r}}=t;return new Ce(e,r)}toAmino(){const{sender:t,contract:e}=this;return{type:"wasm/MsgClearAdmin",value:{sender:t,contract:e}}}static fromData(t){const{sender:e,contract:r}=t;return new Ce(e,r)}toData(){const{sender:t,contract:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:t,contract:e}}static fromProto(t){return new Ce(t.sender,t.contract)}toProto(){const{sender:t,contract:e}=this;return P.MsgClearAdmin.fromPartial({sender:t,contract:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:P.MsgClearAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Ce.fromProto(P.MsgClearAdmin.decode(t.value))}}class Ue extends m{constructor(t,e,r){super(),this.sender=t,this.code_id=e,this.new_instantiate_permission=r}static fromAmino(t){const{value:{sender:e,code_id:r,new_instantiate_permission:o}}=t;return new Ue(e,Number.parseInt(r),q.fromAmino(o))}toAmino(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return{type:"wasm/MsgUpdateInstantiateConfig",value:{sender:t,code_id:e.toString(),new_instantiate_permission:r.toAmino()}}}static fromData(t){const{sender:e,code_id:r,new_instantiate_permission:o}=t;return new Ue(e,Number.parseInt(r),q.fromData(o))}toData(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",sender:t,code_id:e.toString(),new_instantiate_permission:r.toData()}}static fromProto(t){return new Ue(t.sender,t.codeId.toNumber(),q.fromProto(t.newInstantiatePermission))}toProto(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return P.MsgUpdateInstantiateConfig.fromPartial({sender:t,codeId:f.fromNumber(e),newInstantiatePermission:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",value:P.MsgUpdateInstantiateConfig.encode(this.toProto()).finish()})}static unpackAny(t){return Ue.fromProto(P.MsgUpdateInstantiateConfig.decode(t.value))}}class ns 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:r}}=t;return new ns(q.fromAmino(e),gt.accessTypeFromJSON(r))}toAmino(){const{code_upload_access:t,instantiate_default_permission:e}=this;return{type:"wasm/Params",value:{code_upload_access:t.toAmino(),instantiate_default_permission:gt.accessTypeToJSON(e)}}}static fromData(t){const{code_upload_access:e,instantiate_default_permission:r}=t;return new ns(q.fromData(e),gt.accessTypeFromJSON(r))}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:gt.accessTypeToJSON(e)}}static fromProto(t){return new ns(q.fromProto(t.codeUploadAccess),t.instantiateDefaultPermission)}toProto(){const{code_upload_access:t,instantiate_default_permission:e}=this;return gt.Params.fromPartial({codeUploadAccess:t.toProto(),instantiateDefaultPermission:e})}}class Ee extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ee(e,ns.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"wasm/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Ee(e,ns.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Ee(t.authority,ns.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return P.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",value:P.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ee.fromProto(P.MsgUpdateParams.decode(t.value))}}class Be extends m{constructor(t,e,r){super(),this.authority=t,this.contract=e,this.msg=r}static fromAmino(t){const{value:{authority:e,contract:r,msg:o}}=t;return new Be(e,r,o)}toAmino(){const{authority:t,contract:e,msg:r}=this;return{type:"wasm/MsgSudoContract",value:{authority:t,contract:e,msg:r}}}static fromData(t){const{authority:e,contract:r,msg:o}=t;return new Be(e,r,o)}toData(){const{authority:t,contract:e,msg:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgSudoContract",authority:t,contract:e,msg:r}}static fromProto(t){return new Be(t.authority,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,contract:e,msg:r}=this;return P.MsgSudoContract.fromPartial({authority:t,contract:e,msg:Buffer.from(r,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",value:P.MsgSudoContract.encode(this.toProto()).finish()})}static unpackAny(t){return Be.fromProto(P.MsgSudoContract.decode(t.value))}}class Oe extends m{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:r}}=t;return new Oe(e,r.map(Number.parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgPinCodes",value:{authority:t,code_ids:e.map(r=>r.toString())}}}static fromData(t){const{authority:e,code_ids:r}=t;return new Oe(e,r.map(Number.parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgPinCodes",authority:t,code_ids:e.map(r=>r.toString())}}static fromProto(t){return new Oe(t.authority,t.codeIds.map(e=>e.toNumber()))}toProto(){const{authority:t,code_ids:e}=this;return P.MsgPinCodes.fromPartial({authority:t,codeIds:e.map(r=>f.fromNumber(r))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",value:P.MsgPinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return Oe.fromProto(P.MsgPinCodes.decode(t.value))}}class Te extends m{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:r}}=t;return new Te(e,r.map(Number.parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgUnpinCodes",value:{authority:t,code_ids:e.map(r=>r.toString())}}}static fromData(t){const{authority:e,code_ids:r}=t;return new Te(e,r.map(Number.parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUnpinCodes",authority:t,code_ids:e.map(r=>r.toString())}}static fromProto(t){return new Te(t.authority,t.codeIds.map(e=>e.toNumber()))}toProto(){const{authority:t,code_ids:e}=this;return P.MsgUnpinCodes.fromPartial({authority:t,codeIds:e.map(r=>f.fromNumber(r))})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",value:P.MsgUnpinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return Te.fromProto(P.MsgUnpinCodes.decode(t.value))}}class Re extends m{constructor(e,r,o,s,n,a,c,d,h,g,y){super();p(this,"funds");this.authority=e,this.wasm_byte_code=r,this.instantiate_permission=o,this.unpin_code=s,this.admin=n,this.label=a,this.msg=c,this.source=h,this.builder=g,this.code_hash=y,this.funds=new u(d)}static fromAmino(e){const{value:{authority:r,wasm_byte_code:o,instantiate_permission:s,unpin_code:n,admin:a,label:c,msg:d,funds:h,source:g,builder:y,code_hash:b}}=e;return new Re(r,o,s?q.fromAmino(s):void 0,n,a,c,d,u.fromAmino(h),g,y,b)}toAmino(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:s,admin:n,label:a,msg:c,funds:d,source:h,builder:g,code_hash:y}=this;return{type:"wasm/MsgStoreAndInstantiateContract",value:{authority:e,wasm_byte_code:r,instantiate_permission:o==null?void 0:o.toAmino(),unpin_code:s,admin:n,label:a,msg:c,funds:d.toAmino(),source:h,builder:g,code_hash:y}}}static fromData(e){const{authority:r,wasm_byte_code:o,instantiate_permission:s,unpin_code:n,admin:a,label:c,msg:d,funds:h,source:g,builder:y,code_hash:b}=e;return new Re(r,o,s?q.fromData(s):void 0,n,a,c,d,u.fromData(h),g,y,b)}toData(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:s,admin:n,label:a,msg:c,funds:d,source:h,builder:g,code_hash:y}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",authority:e,wasm_byte_code:r,instantiate_permission:o==null?void 0:o.toData(),unpin_code:s,admin:n,label:a,msg:c,funds:d.toData(),source:h,builder:g,code_hash:y}}static fromProto(e){return new Re(e.authority,Buffer.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?q.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:r,instantiate_permission:o,unpin_code:s,admin:n,label:a,msg:c,funds:d,source:h,builder:g,code_hash:y}=this;return P.MsgStoreAndInstantiateContract.fromPartial({authority:e,wasmByteCode:Buffer.from(r,"base64"),instantiatePermission:o==null?void 0:o.toProto(),unpinCode:s,admin:n,label:a,msg:Buffer.from(c,"base64"),funds:d.toProto(),source:h,builder:g,codeHash:Buffer.from(y,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",value:P.MsgStoreAndInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return Re.fromProto(P.MsgStoreAndInstantiateContract.decode(e.value))}}class qe extends m{constructor(t,e,r,o,s){super(),this.authority=t,this.wasm_byte_code=e,this.instantiate_permission=r,this.contract=o,this.msg=s}static fromAmino(t){const{value:{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:s,msg:n}}=t;return new qe(e,r,o?q.fromAmino(o):void 0,s,n)}toAmino(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:s}=this;return{type:"wasm/MsgStoreAndMigrateContract",value:{authority:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toAmino(),contract:o,msg:s}}}static fromData(t){const{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:s,msg:n}=t;return new qe(e,r,o?q.fromData(o):void 0,s,n)}toData(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:s}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",authority:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toData(),contract:o,msg:s}}static fromProto(t){return new qe(t.authority,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?q.fromProto(t.instantiatePermission):void 0,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:s}=this;return P.MsgStoreAndMigrateContract.fromPartial({authority:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:r==null?void 0:r.toProto(),contract:o,msg:Buffer.from(s,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",value:P.MsgStoreAndMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return qe.fromProto(P.MsgStoreAndMigrateContract.decode(t.value))}}class Fe extends m{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new Fe(e,r)}toAmino(){const{authority:t,addresses:e}=this;return{type:"wasm/MsgAddCodeUploadParamsAddresses",value:{authority:t,addresses:e}}}static fromData(t){const{authority:e,addresses:r}=t;return new Fe(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new Fe(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return P.MsgAddCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",value:P.MsgAddCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return Fe.fromProto(P.MsgAddCodeUploadParamsAddresses.decode(t.value))}}class $e extends m{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new $e(e,r)}toAmino(){const{authority:t,addresses:e}=this;return{type:"wasm/MsgRemoveCodeUploadParamsAddresses",value:{authority:t,addresses:e}}}static fromData(t){const{authority:e,addresses:r}=t;return new $e(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new $e(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return P.MsgRemoveCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",value:P.MsgRemoveCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return $e.fromProto(P.MsgRemoveCodeUploadParamsAddresses.decode(t.value))}}class Le extends m{constructor(t,e,r){super(),this.sender=t,this.new_label=e,this.contract=r}static fromAmino(t){const{value:{sender:e,new_label:r,contract:o}}=t;return new Le(e,r,o)}toAmino(){const{sender:t,new_label:e,contract:r}=this;return{type:"wasm/MsgUpdateContractLabel",value:{sender:t,new_label:e,contract:r}}}static fromData(t){const{sender:e,new_label:r,contract:o}=t;return new Le(e,r,o)}toData(){const{sender:t,new_label:e,contract:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUpdateContractLabel",sender:t,new_label:e,contract:r}}static fromProto(t){return new Le(t.sender,t.newLabel,t.contract)}toProto(){const{sender:t,new_label:e,contract:r}=this;return P.MsgUpdateContractLabel.fromPartial({sender:t,newLabel:e,contract:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",value:P.MsgUpdateContractLabel.encode(this.toProto()).finish()})}static unpackAny(t){return Le.fromProto(P.MsgUpdateContractLabel.decode(t.value))}}class Js extends m{constructor(t,e){super(),this.block_height=t,this.tx_index=e}static fromAmino(t){const{block_height:e,tx_index:r}=t;return new Js(Number.parseInt(e),Number.parseInt(r))}toAmino(){const{block_height:t,tx_index:e}=this;return{block_height:t.toString(),tx_index:e.toString()}}static fromData(t){const{block_height:e,tx_index:r}=t;return new Js(Number.parseInt(e),Number.parseInt(r))}toData(){const{block_height:t,tx_index:e}=this;return{block_height:t.toString(),tx_index:e.toString()}}static fromProto(t){return new Js(t.blockHeight.toNumber(),t.txIndex.toNumber())}toProto(){const{block_height:t,tx_index:e}=this;return gt.AbsoluteTxPosition.fromPartial({blockHeight:f.fromNumber(t),txIndex:f.fromNumber(e)})}}class Hs extends m{constructor(e,r,o,s,n){super();p(this,"spend_limit");this.source_port=e,this.source_channel=r,this.allow_list=s,this.allowed_packet_data=n,this.spend_limit=new u(o)}static fromAmino(e){const{source_port:r,source_channel:o,spend_limit:s,allow_list:n,allowed_packet_data:a}=e;return new Hs(r,o,u.fromAmino(s),n,a)}toAmino(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:s,allowed_packet_data:n}=this;return{source_port:e,source_channel:r,spend_limit:o.toAmino(),allow_list:s,allowed_packet_data:n}}static fromData(e){const{source_port:r,source_channel:o,spend_limit:s,allow_list:n,allowed_packet_data:a}=e;return new Hs(r,o,u.fromData(s),n,a)}toData(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:s,allowed_packet_data:n}=this;return{source_port:e,source_channel:r,spend_limit:o.toData(),allow_list:s,allowed_packet_data:n}}static fromProto(e){return new Hs(e.sourcePort,e.sourceChannel,u.fromProto(e.spendLimit),e.allowList,e.allowedPacketData)}toProto(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:s,allowed_packet_data:n}=this;return Ma.Allocation.fromPartial({sourcePort:e,sourceChannel:r,spendLimit:o.toProto(),allowList:s,allowedPacketData:n})}}class js 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 js(t.allocations.map(Hs.fromData))}toData(){return{"@type":"/ibc.applications.transfer.v1.TransferAuthorization",allocations:this.allocations.map(t=>t.toData())}}static fromProto(t){return new js(t.allocations.map(Hs.fromProto))}toProto(){return Ma.TransferAuthorization.fromPartial({allocations:this.allocations.map(t=>t.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.TransferAuthorization",value:Ma.TransferAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return js.fromProto(Ma.TransferAuthorization.decode(t.value))}}class A extends m{constructor(t,e){super(),this.revision_number=t,this.revision_height=e}static fromAmino(t){const{revision_number:e,revision_height:r}=t;return new A(parseInt(e??"0"),parseInt(r??"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:r}=t;return new A(Number.parseInt(e),Number.parseInt(r))}toData(){const{revision_number:t,revision_height:e}=this;return{revision_number:t.toFixed(),revision_height:e.toFixed()}}static fromProto(t){return new A(t.revisionNumber.toNumber(),t.revisionHeight.toNumber())}toProto(){const{revision_number:t,revision_height:e}=this;return Da.Height.fromPartial({revisionNumber:f.fromNumber(t),revisionHeight:f.fromNumber(e)})}}class ze extends m{constructor(e,r,o,s,n,a,c,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&&!c)throw new Error("both of timeout_height and timeout_timestamp are undefined");this.source_port=e,this.source_channel=r,this.token=o,this.sender=s,this.receiver=n,this.timeout_height=a,this.timeout_timestamp=c,this.memo=d}static fromAmino(e){const{value:{source_port:r,source_channel:o,token:s,sender:n,receiver:a,timeout_height:c,timeout_timestamp:d,memo:h}}=e;if(!c&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new ze(r,o,s?_.fromAmino(s):void 0,n,a,c?A.fromAmino(c):void 0,d,h)}toAmino(){const{source_port:e,source_channel:r,token:o,sender:s,receiver:n,timeout_height:a,timeout_timestamp:c,memo:d}=this;return{type:"cosmos-sdk/MsgTransfer",value:{source_port:e,source_channel:r,token:o==null?void 0:o.toAmino(),sender:s,receiver:n,timeout_height:(a==null?void 0:a.toAmino())??{},timeout_timestamp:c,memo:d}}}static fromData(e){const{source_port:r,source_channel:o,token:s,sender:n,receiver:a,timeout_timestamp:c,timeout_height:d,memo:h}=e;if(!d&&!c)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new ze(r,o,s?_.fromData(s):void 0,n,a,d?A.fromData(d):void 0,c==="0"?void 0:c,h)}toData(){const{source_port:e,source_channel:r,token:o,sender:s,receiver:n,timeout_height:a,timeout_timestamp:c,memo:d}=this;return{"@type":"/ibc.applications.transfer.v1.MsgTransfer",source_port:e,source_channel:r,token:o==null?void 0:o.toData(),sender:s,receiver:n,timeout_height:a?a.toData():new A(0,0).toData(),timeout_timestamp:c??"0",memo:d}}static fromProto(e){if(!e.timeoutHeight&&e.timeoutTimestamp.toNumber()==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new ze(e.sourcePort,e.sourceChannel,e.token?_.fromProto(e.token):void 0,e.sender,e.receiver,e.timeoutHeight?A.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:r,token:o,sender:s,receiver:n,timeout_height:a,timeout_timestamp:c,memo:d}=this;return xn.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,token:o==null?void 0:o.toProto(),sender:s,receiver:n,timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:f.fromString(c??"0"),memo:d})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:xn.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return ze.fromProto(xn.MsgTransfer.decode(e.value))}}class qn extends m{constructor(t,e){super(),this.send_enabled=t,this.receive_enabled=e}static fromAmino(t){const{send_enabled:e,receive_enabled:r}=t;return new qn(e,r)}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:r}=t;return new qn(e,r)}toData(){const{send_enabled:t,receive_enabled:e}=this;return{send_enabled:t,receive_enabled:e}}static fromProto(t){return new qn(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Ii.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class Ys 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:r}=t;return new Ys(e,qn.fromData(r))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.applications.transfer.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new Ys(t.signer,qn.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return xn.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgUpdateParams",value:xn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ys.fromProto(xn.MsgUpdateParams.decode(t.value))}}class Qs extends m{constructor(t,e){super(),this.path=t,this.base_denom=e}static fromAmino(t){const{path:e,base_denom:r}=t;return new Qs(e,r)}toAmino(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromData(t){const{path:e,base_denom:r}=t;return new Qs(e,r)}toData(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromProto(t){return new Qs(t.path,t.baseDenom)}toProto(){const{path:t,base_denom:e}=this;return Ii.DenomTrace.fromPartial({path:t,baseDenom:e})}}class ya extends m{constructor(t,e,r,o,s){super(),this.denom=t,this.amount=e,this.sender=r,this.receiver=o,this.memo=s}static fromAmino(t){const{denom:e,amount:r,sender:o,receiver:s,memo:n}=t;return new ya(e,r,o,s,n)}toAmino(){const{denom:t,amount:e,sender:r,receiver:o,memo:s}=this;return{denom:t,amount:e,sender:r,receiver:o,memo:s}}static fromData(t){const{denom:e,amount:r,sender:o,receiver:s,memo:n}=t;return new ya(e,r,o,s,n)}toData(){const{denom:t,amount:e,sender:r,receiver:o,memo:s}=this;return{denom:t,amount:e,sender:r,receiver:o,memo:s}}static fromProto(t){return new ya(t.denom,t.amount,t.sender,t.receiver,t.memo)}toProto(){const{denom:t,amount:e,sender:r,receiver:o,memo:s}=this;return Ec.FungibleTokenPacketData.fromPartial({denom:t,amount:e,sender:r,receiver:o,memo:s})}}class zt extends m{constructor(t,e){super(),this.authorization=t,this.expiration=e}static fromAmino(t){const{authorization:e,expiration:r}=t;return new zt(exports.Authorization.fromAmino(e),r?new Date(r):void 0)}toAmino(){const{authorization:t,expiration:e}=this;return{authorization:t.toAmino(),expiration:e==null?void 0:e.toISOString().replace(/\.000Z$/,"Z")}}static fromData(t){const{authorization:e,expiration:r}=t;return new zt(exports.Authorization.fromData(e),r?new Date(r):void 0)}toData(){const{authorization:t,expiration:e}=this;return{authorization:t.toData(),expiration:e==null?void 0:e.toISOString().replace(/\.000Z$/,"Z")}}static fromProto(t){return new zt(exports.Authorization.fromProto(t.authorization),t.expiration)}toProto(){const{authorization:t,expiration:e}=this;return ka.Grant.fromPartial({authorization:t.packAny(),expiration:e})}}exports.Authorization=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/SendAuthorization":return le.fromAmino(o);case"cosmos-sdk/GenericAuthorization":return pe.fromAmino(o);case"mstake/StakeAuthorization":return Et.fromAmino(o);case"move/ExecuteAuthorization":return fe.fromAmino(o);case"move/PublishAuthorization":return he.fromAmino(o);case"wasm/StoreCodeAuthorization":return ge.fromAmino(o);case"wasm/ContractExecutionAuthorization":return we.fromAmino(o);case"wasm/ContractMigrationAuthorization":return De.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.authz.v1beta1.GenericAuthorization":return pe.fromData(o);case"/cosmos.bank.v1beta1.SendAuthorization":return le.fromData(o);case"/initia.mstaking.v1.StakeAuthorization":return Et.fromData(o);case"/initia.move.v1.PublishAuthorization":return he.fromData(o);case"/initia.move.v1.ExecuteAuthorization":return fe.fromData(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return ge.fromData(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return we.fromData(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return De.fromData(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return js.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmos.authz.v1beta1.GenericAuthorization":return pe.unpackAny(o);case"/cosmos.bank.v1beta1.SendAuthorization":return le.unpackAny(o);case"/initia.mstaking.v1.StakeAuthorization":return Et.unpackAny(o);case"/initia.move.v1.PublishAuthorization":return he.unpackAny(o);case"/initia.move.v1.ExecuteAuthorization":return fe.unpackAny(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return ge.unpackAny(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return we.unpackAny(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return De.unpackAny(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return js.unpackAny(o)}throw new Error(`Authorization type ${s} not recognized`)}i.fromProto=r})(exports.Authorization||(exports.Authorization={}));class Ge extends m{constructor(t,e,r){super(),this.granter=t,this.grantee=e,this.grant=r}static fromAmino(t){const{value:{granter:e,grantee:r,grant:o}}=t;return new Ge(e,r,zt.fromAmino(o))}toAmino(){const{granter:t,grantee:e,grant:r}=this;return{type:"cosmos-sdk/MsgGrant",value:{granter:t,grantee:e,grant:r.toAmino()}}}static fromData(t){const{granter:e,grantee:r,grant:o}=t;return new Ge(e,r,zt.fromData(o))}toData(){const{granter:t,grantee:e,grant:r}=this;return{"@type":"/cosmos.authz.v1beta1.MsgGrant",granter:t,grantee:e,grant:r.toData()}}static fromProto(t){return new Ge(t.granter,t.grantee,zt.fromProto(t.grant))}toProto(){const{grant:t,granter:e,grantee:r}=this;return es.MsgGrant.fromPartial({grant:t.toProto(),grantee:r,granter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgGrant",value:es.MsgGrant.encode(this.toProto()).finish()})}static unpackAny(t){return Ge.fromProto(es.MsgGrant.decode(t.value))}}class Ve extends m{constructor(t,e,r){super(),this.granter=t,this.grantee=e,this.msg_type_url=r}static fromAmino(t){const{value:{granter:e,grantee:r,msg_type_url:o}}=t;return new Ve(e,r,o)}toAmino(){const{granter:t,grantee:e,msg_type_url:r}=this;return{type:"cosmos-sdk/MsgRevoke",value:{granter:t,grantee:e,msg_type_url:r}}}static fromData(t){const{granter:e,grantee:r,msg_type_url:o}=t;return new Ve(e,r,o)}toData(){const{granter:t,grantee:e,msg_type_url:r}=this;return{"@type":"/cosmos.authz.v1beta1.MsgRevoke",granter:t,grantee:e,msg_type_url:r}}static fromProto(t){return new Ve(t.granter,t.grantee,t.msgTypeUrl)}toProto(){const{granter:t,grantee:e,msg_type_url:r}=this;return es.MsgRevoke.fromPartial({grantee:e,granter:t,msgTypeUrl:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",value:es.MsgRevoke.encode(this.toProto()).finish()})}static unpackAny(t){return Ve.fromProto(es.MsgRevoke.decode(t.value))}}class Ke extends m{constructor(t,e){super(),this.grantee=t,this.msgs=e}static fromAmino(t){const{value:{grantee:e,msgs:r}}=t;return new Ke(e,r.map(o=>exports.Msg.fromAmino(o)))}toAmino(){const{grantee:t,msgs:e}=this;return{type:"cosmos-sdk/MsgExec",value:{grantee:t,msgs:e.map(r=>r.toAmino())}}}static fromData(t){const{grantee:e,msgs:r}=t;return new Ke(e,r.map(o=>exports.Msg.fromData(o)))}toData(){const{grantee:t,msgs:e}=this;return{"@type":"/cosmos.authz.v1beta1.MsgExec",grantee:t,msgs:e.map(r=>r.toData())}}static fromProto(t){return new Ke(t.grantee,t.msgs.map(e=>exports.Msg.fromProto(e)))}toProto(){const{grantee:t,msgs:e}=this;return es.MsgExec.fromPartial({grantee:t,msgs:e.map(r=>r.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:es.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return Ke.fromProto(es.MsgExec.decode(t.value))}}class We extends m{constructor(e,r,o){super();p(this,"amount");this.from_address=e,this.to_address=r,this.amount=new u(o)}static fromAmino(e){const{value:{from_address:r,to_address:o,amount:s}}=e;return new We(r,o,u.fromAmino(s))}toAmino(){const{from_address:e,to_address:r,amount:o}=this;return{type:"cosmos-sdk/MsgSend",value:{from_address:e,to_address:r,amount:o.toAmino()}}}static fromData(e){const{from_address:r,to_address:o,amount:s}=e;return new We(r,o,u.fromData(s))}toData(){const{from_address:e,to_address:r,amount:o}=this;return{"@type":"/cosmos.bank.v1beta1.MsgSend",from_address:e,to_address:r,amount:o.toData()}}static fromProto(e){return new We(e.fromAddress,e.toAddress,u.fromProto(e.amount))}toProto(){const{from_address:e,to_address:r,amount:o}=this;return Pt.MsgSend.fromPartial({fromAddress:e,toAddress:r,amount:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:Pt.MsgSend.encode(this.toProto()).finish()})}static unpackAny(e){return We.fromProto(Pt.MsgSend.decode(e.value))}}class X extends m{constructor(t,e){super(),this.inputs=t,this.outputs=e}static fromAmino(t){const{value:{inputs:e,outputs:r}}=t;return new X(e.map(o=>X.Input.fromAmino(o)),r.map(o=>X.Output.fromAmino(o)))}toAmino(){const{inputs:t,outputs:e}=this;return{type:"cosmos-sdk/MsgMultiSend",value:{inputs:t.map(r=>r.toAmino()),outputs:e.map(r=>r.toAmino())}}}static fromData(t){const{inputs:e,outputs:r}=t;return new X(e.map(o=>X.Input.fromData(o)),r.map(o=>X.Output.fromData(o)))}toData(){const{inputs:t,outputs:e}=this;return{"@type":"/cosmos.bank.v1beta1.MsgMultiSend",inputs:t.map(r=>r.toData()),outputs:e.map(r=>r.toData())}}static fromProto(t){return new X(t.inputs.map(e=>X.Input.fromProto(e)),t.outputs.map(e=>X.Output.fromProto(e)))}toProto(){const{inputs:t,outputs:e}=this;return Pt.MsgMultiSend.fromPartial({inputs:t.map(r=>r.toProto()),outputs:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgMultiSend",value:Pt.MsgMultiSend.encode(this.toProto()).finish()})}static unpackAny(t){return X.fromProto(Pt.MsgMultiSend.decode(t.value))}}(i=>{class t extends m{constructor(s,n){super();p(this,"coins");this.address=s,this.coins=new u(n)}toAmino(){const{address:s,coins:n}=this;return{address:s,coins:n.toAmino()}}static fromAmino(s){const{address:n,coins:a}=s;return new t(n,u.fromAmino(a))}toData(){const{address:s,coins:n}=this;return{address:s,coins:n.toData()}}static fromData(s){const{address:n,coins:a}=s;return new t(n,u.fromData(a))}toProto(){const{address:s,coins:n}=this;return sa.Input.fromPartial({address:s,coins:n.toProto()})}static fromProto(s){return new t(s.address,u.fromProto(s.coins))}}i.Input=t;class e extends m{constructor(s,n){super();p(this,"coins");this.address=s,this.coins=new u(n)}toAmino(){const{address:s,coins:n}=this;return{address:s,coins:n.toAmino()}}static fromAmino(s){const{address:n,coins:a}=s;return new e(n,u.fromAmino(a))}toData(){const{address:s,coins:n}=this;return{address:s,coins:n.toData()}}static fromData(s){const{address:n,coins:a}=s;return new e(n,u.fromData(a))}toProto(){const{address:s,coins:n}=this;return sa.Output.fromPartial({address:s,coins:n.toProto()})}static fromProto(s){return new e(s.address,u.fromProto(s.coins))}}i.Output=e})(X||(X={}));class Gt extends m{constructor(t,e){super(),this.denom=t,this.enabled=e}static fromAmino(t){const{denom:e,enabled:r}=t;return new Gt(e,r)}toAmino(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromData(t){const{denom:e,enabled:r}=t;return new Gt(e,r)}toData(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromProto(t){return new Gt(t.denom,t.enabled)}toProto(){const{denom:t,enabled:e}=this;return sa.SendEnabled.fromPartial({denom:t,enabled:e})}}class as 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:r}}=t;return new as(e.map(Gt.fromAmino),r)}toAmino(){const{send_enabled:t,default_send_enabled:e}=this;return{type:"cosmos-sdk/x/bank/Params",value:{send_enabled:t.map(r=>r.toAmino()),default_send_enabled:e}}}static fromData(t){const{send_enabled:e,default_send_enabled:r}=t;return new as(e.map(Gt.fromData),r)}toData(){const{send_enabled:t,default_send_enabled:e}=this;return{"@type":"/cosmos.bank.v1beta1.Params",send_enabled:t.map(r=>r.toData()),default_send_enabled:e}}static fromProto(t){return new as(t.sendEnabled.map(Gt.fromProto),t.defaultSendEnabled)}toProto(){const{send_enabled:t,default_send_enabled:e}=this;return sa.Params.fromPartial({sendEnabled:t.map(r=>r.toProto()),defaultSendEnabled:e})}}class Je extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Je(e,as.fromAmino(r))}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:r}=t;return new Je(e,as.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.bank.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Je(t.authority,as.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Pt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",value:Pt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Je.fromProto(Pt.MsgUpdateParams.decode(t.value))}}class He extends m{constructor(t,e,r){super(),this.authority=t,this.send_enabled=e,this.use_default_for=r}static fromAmino(t){const{value:{authority:e,send_enabled:r,use_default_for:o}}=t;return new He(e,r.map(Gt.fromAmino),o)}toAmino(){const{authority:t,send_enabled:e,use_default_for:r}=this;return{type:"cosmos-sdk/MsgSetSendEnabled",value:{authority:t,send_enabled:e.map(o=>o.toAmino()),use_default_for:r}}}static fromData(t){const{authority:e,send_enabled:r,use_default_for:o}=t;return new He(e,r.map(Gt.fromData),o)}toData(){const{authority:t,send_enabled:e,use_default_for:r}=this;return{"@type":"/cosmos.bank.v1beta1.MsgSetSendEnabled",authority:t,send_enabled:e.map(o=>o.toData()),use_default_for:r}}static fromProto(t){return new He(t.authority,t.sendEnabled.map(Gt.fromProto),t.useDefaultFor)}toProto(){const{authority:t,send_enabled:e,use_default_for:r}=this;return Pt.MsgSetSendEnabled.fromPartial({authority:t,sendEnabled:e.map(o=>o.toProto()),useDefaultFor:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",value:Pt.MsgSetSendEnabled.encode(this.toProto()).finish()})}static unpackAny(t){return He.fromProto(Pt.MsgSetSendEnabled.decode(t.value))}}class Ms extends m{constructor(t,e,r){super(),this.denom=t,this.exponent=e,this.aliases=r}static fromAmino(t){const{denom:e,exponent:r,aliases:o}=t;return new Ms(e,Number.parseInt(r),o)}toAmino(){const{denom:t,exponent:e,aliases:r}=this;return{denom:t,exponent:e.toString(),aliases:r}}static fromData(t){const{denom:e,exponent:r,aliases:o}=t;return new Ms(e,Number.parseInt(r),o)}toData(){const{denom:t,exponent:e,aliases:r}=this;return{denom:t,exponent:e.toString(),aliases:r}}static fromProto(t){return new Ms(t.denom,t.exponent,t.aliases)}toProto(){const{denom:t,exponent:e,aliases:r}=this;return sa.DenomUnit.fromPartial({denom:t,exponent:e,aliases:r})}}class Vt extends m{constructor(t,e,r,o,s,n,a,c){super(),this.description=t,this.denom_units=e,this.base=r,this.display=o,this.name=s,this.symbol=n,this.uri=a,this.uri_hash=c}static fromAmino(t){const{description:e,denom_units:r,base:o,display:s,name:n,symbol:a,uri:c,uri_hash:d}=t;return new Vt(e,r.map(Ms.fromAmino),o,s,n,a,c,d)}toAmino(){const{description:t,denom_units:e,base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toAmino()),base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}}static fromData(t){const{description:e,denom_units:r,base:o,display:s,name:n,symbol:a,uri:c,uri_hash:d}=t;return new Vt(e,r.map(Ms.fromData),o,s,n,a,c,d)}toData(){const{description:t,denom_units:e,base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toData()),base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}}static fromProto(t){return new Vt(t.description,t.denomUnits.map(Ms.fromProto),t.base,t.display,t.name,t.symbol,t.uri,t.uriHash)}toProto(){const{description:t,denom_units:e,base:r,display:o,name:s,symbol:n,uri:a,uri_hash:c}=this;return sa.Metadata.fromPartial({description:t,denomUnits:e.map(d=>d.toProto()),base:r,display:o,name:s,symbol:n,uri:a,uriHash:c})}}class je extends m{constructor(t,e){super(),this.authority=t,this.metadata=e}static fromAmino(t){const{value:{authority:e,metadata:r}}=t;return new je(e,Vt.fromAmino(r))}toAmino(){const{authority:t,metadata:e}=this;return{type:"bank/MsgSetDenomMetadata",value:{authority:t,metadata:e.toAmino()}}}static fromData(t){const{authority:e,metadata:r}=t;return new je(e,Vt.fromData(r))}toData(){const{authority:t,metadata:e}=this;return{"@type":"/initia.bank.v1.MsgSetDenomMetadata",authority:t,metadata:e.toData()}}static fromProto(t){return new je(t.authority,Vt.fromProto(t.metadata))}toProto(){const{authority:t,metadata:e}=this;return ja.MsgSetDenomMetadata.fromPartial({authority:t,metadata:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.bank.v1.MsgSetDenomMetadata",value:ja.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return je.fromProto(ja.MsgSetDenomMetadata.decode(t.value))}}class Zs extends m{constructor(t,e,r,o,s){super(),this.signer=t,this.namespaces=e,this.blob_sizes=r,this.share_commitments=o,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:r,blob_sizes:o,share_commitments:s,share_versions:n}=t;return new Zs(e,r,o.map(Number.parseInt),s,n.map(Number.parseInt))}toData(){const{signer:t,namespaces:e,blob_sizes:r,share_commitments:o,share_versions:s}=this;return{"@type":"/celestia.blob.v1.MsgPayForBlobs",signer:t,namespaces:e,blob_sizes:r.map(n=>n.toString()),share_commitments:o,share_versions:s.map(n=>n.toString())}}static fromProto(t){return new Zs(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:r,share_commitments:o,share_versions:s}=this;return Ya.MsgPayForBlobs.fromPartial({signer:t,namespaces:e.map(n=>Buffer.from(n,"base64")),blobSizes:r,shareCommitments:o.map(n=>Buffer.from(n,"base64")),shareVersions:s})}packAny(){return l.Any.fromPartial({typeUrl:"/celestia.blob.v1.MsgPayForBlobs",value:Ya.MsgPayForBlobs.encode(this.toProto()).finish()})}static unpackAny(t){return Zs.fromProto(Ya.MsgPayForBlobs.decode(t.value))}}class na extends m{constructor(t,e,r,o){super(),this.namespace_id=t,this.data=e,this.share_version=r,this.namespace_version=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){return new na(t.namespace_id,t.data,Number.parseInt(t.share_version),Number.parseInt(t.namespace_version))}toData(){const{namespace_id:t,data:e,share_version:r,namespace_version:o}=this;return{namespace_id:t,data:e,share_version:r.toString(),namespace_version:o.toString()}}static fromProto(t){return new na(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:r,namespace_version:o}=this;return oi.Blob.fromPartial({namespaceId:Buffer.from(t,"base64"),data:Buffer.from(e,"base64"),shareVersion:r,namespaceVersion:o})}}class is{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 is(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 r=0;const o=this.count();t>o&&(t=o);for(let s=0;;s++){if(s*8+7>=t)return r+=e(this.elems[s]>>7-t%8+1),r;r+=e(this.elems[s])}}static fromData(t){return new is(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 is(t.extraBitsStored,Buffer.from(t.elems))}toProto(){return si.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})}}class Kt extends m{constructor(e,r,o,s){super();p(this,"amount");this.gas_limit=e,this.payer=o,this.granter=s,this.amount=new u(r)}static fromAmino(e){const{gas:r,amount:o}=e;return new Kt(Number.parseInt(r),u.fromAmino(o),"","")}toAmino(){return{gas:v(this.gas_limit).toFixed(0),amount:this.amount.toAmino()}}static fromData(e){return new Kt(Number.parseInt(e.gas_limit),u.fromData(e.amount),e.payer,e.granter)}toData(){const{amount:e,gas_limit:r,payer:o,granter:s}=this;return{amount:e.toData(),gas_limit:r.toFixed(),granter:s??"",payer:o??""}}static fromProto(e){return new Kt(e.gasLimit.toNumber(),u.fromProto(e.amount),e.payer,e.granter)}toProto(){const{amount:e,gas_limit:r,payer:o,granter:s}=this;return rt.Fee.fromPartial({amount:e.toProto(),gasLimit:f.fromNumber(r),granter:s,payer:o})}gasPrices(){return this.amount.toDecCoins().div(this.gas_limit)}}class V{constructor(t,e,r){this.public_key=t,this.data=e,this.sequence=r}static fromData(t){return new V(exports.PublicKey.fromData(t.public_key),V.Descriptor.fromData(t.data),Number.parseInt(t.sequence))}toData(){return{public_key:this.public_key.toData(),data:this.data.toData(),sequence:this.sequence.toFixed()}}static fromAmino(t){return new V(exports.PublicKey.fromAmino(t.pub_key),new V.Descriptor(new V.Descriptor.Single(V.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,t.signature)),0)}}(i=>{i.SignMode=mt.SignMode;class t{constructor(r){p(this,"single");p(this,"multi");r instanceof t.Single?this.single=r:this.multi=r}static fromData(r){if(r.single)return new t(t.Single.fromData(r.single));if(r.multi)return new t(t.Multi.fromData(r.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 r=this.single;return[new C(new C.Single(r.mode)),Buffer.from(r.signature,"base64")]}if(this.multi){const r=this.multi,o=[],s=[];for(const a of r.signatures){const[c,d]=a.toModeInfoAndSignature();o.push(c),s.push(d)}const n=si.MultiSignature.encode(si.MultiSignature.fromPartial({signatures:s})).finish();return[new C(new C.Multi(r.bitarray,o)),n]}throw new Error("invalid signature descriptor")}}i.Descriptor=t,(e=>{class r{constructor(n,a){this.mode=n,this.signature=a}static fromData(n){return new r(mt.signModeFromJSON(n.mode),n.signature)}toData(){const{mode:n,signature:a}=this;return{mode:mt.signModeToJSON(n),signature:a}}}e.Single=r;class o{constructor(n,a){this.bitarray=n,this.signatures=a}static fromData(n){return new o(is.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=o})(t=i.Descriptor||(i.Descriptor={}))})(V||(V={}));class tt{constructor(t,e,r){this.body=t,this.auth_info=e,this.signatures=r}static fromAmino(t){const e=t.value.signatures.map(r=>V.fromAmino(r));return new tt(new cs(t.value.msg.map(r=>exports.Msg.fromAmino(r)),t.value.memo,Number.parseInt(t.value.timeout_height)),new Wt([],Kt.fromAmino(t.value.fee)),e.map(r=>{var o;return((o=r.data.single)==null?void 0:o.signature)??""}))}static fromData(t){return new tt(cs.fromData(t.body),Wt.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(rt.Tx.decode(t.value))}static fromProto(t){return new tt(cs.fromProto(t.body),Wt.fromProto(t.authInfo),t.signatures.map(e=>Buffer.from(e).toString("base64")))}toProto(){return rt.Tx.fromPartial({body:this.body.toProto(),authInfo:this.auth_info.toProto(),signatures:this.signatures.map(t=>Buffer.from(t,"base64"))})}toBytes(){return rt.Tx.encode(this.toProto()).finish()}static fromBuffer(t){return tt.fromProto(rt.Tx.decode(t))}appendEmptySignatures(t){t.forEach(e=>{let r;e.publicKey?e.publicKey instanceof Xt?r=new bt(e.publicKey,e.sequenceNumber,new C(new C.Multi(is.fromBits(e.publicKey.pubkeys.length),[]))):r=new bt(e.publicKey,e.sequenceNumber,new C(new C.Single(C.SignMode.SIGN_MODE_DIRECT))):r=new bt(new Q(""),e.sequenceNumber,new C(new C.Single(C.SignMode.SIGN_MODE_DIRECT))),this.auth_info.signer_infos.push(r),this.signatures.push("")})}clearSignatures(){this.auth_info.signer_infos=[],this.signatures=[]}appendSignatures(t){for(const e of t){const[r,o]=e.data.toModeInfoAndSignature();this.signatures.push(Buffer.from(o).toString("base64")),this.auth_info.signer_infos.push(new bt(e.public_key,e.sequence,r))}}}class cs{constructor(t,e,r){this.messages=t,this.memo=e,this.timeout_height=r}static fromData(t){return new cs(t.messages.map(e=>exports.Msg.fromData(e)),t.memo,Number.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 cs(t.messages.map(e=>exports.Msg.fromProto(e)),t.memo,t.timeoutHeight.toNumber())}toProto(){return rt.TxBody.fromPartial({memo:this.memo,messages:this.messages.map(t=>t.packAny()),timeoutHeight:f.fromNumber(this.timeout_height??0)})}toBytes(){return rt.TxBody.encode(this.toProto()).finish()}}class Wt{constructor(t,e){this.signer_infos=t,this.fee=e}static fromData(t){return new Wt(t.signer_infos.map(e=>bt.fromData(e)),Kt.fromData(t.fee))}toData(){return{fee:this.fee.toData(),signer_infos:this.signer_infos.map(t=>t.toData())}}static fromProto(t){return new Wt(t.signerInfos.map(e=>bt.fromProto(e)),Kt.fromProto(t.fee))}toProto(){return rt.AuthInfo.fromPartial({fee:this.fee.toProto(),signerInfos:this.signer_infos.map(t=>t.toProto())})}toBytes(){return rt.AuthInfo.encode(this.toProto()).finish()}}class bt{constructor(t,e,r){this.public_key=t,this.sequence=e,this.mode_info=r}static fromData(t){return new bt(exports.PublicKey.fromData(t.public_key??new Q("").toData()),Number.parseInt(t.sequence),C.fromData(t.mode_info))}toData(){const{public_key:t,sequence:e,mode_info:r}=this;return{mode_info:r.toData(),public_key:t==null?void 0:t.toData(),sequence:e.toFixed()}}static fromProto(t){return new bt(exports.PublicKey.fromProto(t.publicKey??new Q("").packAny()),t.sequence.toNumber(),C.fromProto(t.modeInfo))}toProto(){const{public_key:t,sequence:e,mode_info:r}=this;return rt.SignerInfo.fromPartial({modeInfo:r.toProto(),publicKey:t==null?void 0:t.packAny(),sequence:f.fromNumber(e)})}}class C{constructor(t){p(this,"single");p(this,"multi");t instanceof C.Single?this.single=t:this.multi=t}static fromData(t){if(t.single)return new C(C.Single.fromData(t.single));if(t.multi)return new C(C.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,r=t.multi;return new C(e?C.Single.fromProto(e):C.Multi.fromProto(r))}toProto(){var t,e;return rt.ModeInfo.fromPartial({multi:(t=this.multi)==null?void 0:t.toProto(),single:(e=this.single)==null?void 0:e.toProto()})}}(i=>{i.SignMode=mt.SignMode;class t{constructor(o){this.mode=o}static fromData(o){return new t(mt.signModeFromJSON(o.mode))}toData(){return{mode:mt.signModeToJSON(this.mode)}}static fromProto(o){return new t(o.mode)}toProto(){return rt.ModeInfo_Single.fromPartial({mode:this.mode})}}i.Single=t;class e{constructor(o,s){this.bitarray=o,this.modeInfos=s}static fromData(o){return new e(is.fromData(o.bitarray),o.mode_infos.map(s=>i.fromData(s)))}toData(){return{bitarray:this.bitarray.toData(),mode_infos:this.modeInfos.map(o=>o.toData())}}static fromProto(o){return new e(is.fromProto(o.bitarray),o.modeInfos.map(s=>i.fromProto(s)))}toProto(){return rt.ModeInfo_Multi.fromPartial({bitarray:this.bitarray.toProto(),modeInfos:this.modeInfos.map(o=>o.toProto())})}}i.Multi=e})(C||(C={}));class Ba extends m{constructor(t,e,r){super(),this.tx=t,this.blobs=e,this.type_id=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{tx:e,blobs:r,type_id:o}=t;return new Ba(tt.fromData(e),r.map(na.fromData),o)}toData(){const{tx:t,blobs:e,type_id:r}=this;return{tx:t.toData(),blobs:e.map(o=>o.toData()),type_id:r}}static fromProto(t){return new Ba(tt.fromBuffer(Buffer.from(t.tx)),t.blobs.map(na.fromProto),t.typeId)}toProto(){const{tx:t,blobs:e,type_id:r}=this;return oi.BlobTx.fromPartial({tx:t.toBytes(),blobs:e.map(o=>o.toProto()),typeId:r})}toBytes(){return oi.BlobTx.encode(this.toProto()).finish()}}class xs extends m{constructor(t,e){super(),this.max_bytes=t,this.max_gas=e}static fromAmino(t){const{max_bytes:e,max_gas:r}=t;return new xs(Number.parseInt(e),Number.parseInt(r))}toAmino(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toString(),max_gas:e.toString()}}static fromData(t){const{max_bytes:e,max_gas:r}=t;return new xs(Number.parseInt(e),Number.parseInt(r))}toData(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toString(),max_gas:e.toString()}}static fromProto(t){return new xs(t.maxBytes.toNumber(),t.maxGas.toNumber())}toProto(){const{max_bytes:t,max_gas:e}=this;return Ta.BlockParams.fromPartial({maxBytes:f.fromNumber(t),maxGas:f.fromNumber(e)})}}class Ss extends m{constructor(t,e,r){super(),this.max_age_num_blocks=t,this.max_age_duration=e,this.max_bytes=r}static fromAmino(t){const{max_age_num_blocks:e,max_age_duration:r,max_bytes:o}=t;return new Ss(Number.parseInt(e),D.fromAmino(r),Number.parseInt(o))}toAmino(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return{max_age_num_blocks:t.toString(),max_age_duration:e.toAmino(),max_bytes:r.toString()}}static fromData(t){const{max_age_num_blocks:e,max_age_duration:r,max_bytes:o}=t;return new Ss(Number.parseInt(e),D.fromData(r),Number.parseInt(o))}toData(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return{max_age_num_blocks:t.toString(),max_age_duration:e.toData(),max_bytes:r.toString()}}static fromProto(t){return new Ss(t.maxAgeNumBlocks.toNumber(),D.fromProto(t.maxAgeDuration),t.maxBytes.toNumber())}toProto(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return Ta.EvidenceParams.fromPartial({maxAgeNumBlocks:f.fromNumber(t),maxAgeDuration:e.toProto(),maxBytes:f.fromNumber(r)})}}class Is extends m{constructor(t){super(),this.pub_key_types=t}static fromAmino(t){return new Is(t.pub_key_types)}toAmino(){return{pub_key_types:this.pub_key_types}}static fromData(t){return new Is(t.pub_key_types)}toData(){return{pub_key_types:this.pub_key_types}}static fromProto(t){return new Is(t.pubKeyTypes)}toProto(){return Ta.ValidatorParams.fromPartial({pubKeyTypes:this.pub_key_types})}}class Ns extends m{constructor(t){super(),this.vote_extensions_enable_height=t}static fromAmino(t){return new Ns(Number.parseInt(t.vote_extensions_enable_height))}toAmino(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toString()}}static fromData(t){return new Ns(Number.parseInt(t.vote_extensions_enable_height))}toData(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toString()}}static fromProto(t){return new Ns(t.voteExtensionsEnableHeight.toNumber())}toProto(){return Ta.ABCIParams.fromPartial({voteExtensionsEnableHeight:f.fromNumber(this.vote_extensions_enable_height)})}}class Ye extends m{constructor(t,e,r,o,s){super(),this.authority=t,this.block=e,this.evidence=r,this.validator=o,this.abci=s}static fromAmino(t){const{value:{authority:e,block:r,evidence:o,validator:s,abci:n}}=t;return new Ye(e,r?xs.fromAmino(r):void 0,o?Ss.fromAmino(o):void 0,s?Is.fromAmino(s):void 0,n?Ns.fromAmino(n):void 0)}toAmino(){const{authority:t,block:e,evidence:r,validator:o,abci:s}=this;return{type:"cosmos-sdk/x/consensus/MsgUpdateParams",value:{authority:t,block:e==null?void 0:e.toAmino(),evidence:r==null?void 0:r.toAmino(),validator:o==null?void 0:o.toAmino(),abci:s==null?void 0:s.toAmino()}}}static fromData(t){const{authority:e,block:r,evidence:o,validator:s,abci:n}=t;return new Ye(e,r?xs.fromData(r):void 0,o?Ss.fromData(o):void 0,s?Is.fromData(s):void 0,n?Ns.fromData(n):void 0)}toData(){const{authority:t,block:e,evidence:r,validator:o,abci:s}=this;return{"@type":"/cosmos.consensus.v1.MsgUpdateParams",authority:t,block:e==null?void 0:e.toData(),evidence:r==null?void 0:r.toData(),validator:o==null?void 0:o.toData(),abci:s==null?void 0:s.toData()}}static fromProto(t){return new Ye(t.authority,xs.fromProto(t.block),Ss.fromProto(t.evidence),Is.fromProto(t.validator),Ns.fromProto(t.abci))}toProto(){const{authority:t,block:e,evidence:r,validator:o,abci:s}=this;return Qa.MsgUpdateParams.fromPartial({authority:t,block:e==null?void 0:e.toProto(),evidence:r==null?void 0:r.toProto(),validator:o==null?void 0:o.toProto(),abci:s==null?void 0:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.consensus.v1.MsgUpdateParams",value:Qa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ye.fromProto(Qa.MsgUpdateParams.decode(t.value))}}class Qe extends m{constructor(t,e,r){super(),this.sender=t,this.invariantModuleName=e,this.invariantRoute=r}static fromAmino(t){const{value:{sender:e,invariantModuleName:r,invariantRoute:o}}=t;return new Qe(e,r,o)}toAmino(){throw new Error("MsgVerifyInvarant is not allowed to send")}static fromData(t){const{sender:e,invariantModuleName:r,invariantRoute:o}=t;return new Qe(e,r,o)}toData(){const{sender:t,invariantModuleName:e,invariantRoute:r}=this;return{"@type":"/cosmos.crisis.v1beta1.MsgVerifyInvariant",sender:t,invariantModuleName:e,invariantRoute:r}}static fromProto(t){return new Qe(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:pa.MsgVerifyInvariant.encode(this.toProto()).finish()})}static unpackAny(t){return Qe.fromProto(pa.MsgVerifyInvariant.decode(t.value))}}class Ze extends m{constructor(t,e){super(),this.authority=t,this.constant_fee=e}static fromAmino(t){const{value:{authority:e,constant_fee:r}}=t;return new Ze(e,_.fromAmino(r))}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:r}=t;return new Ze(e,_.fromData(r))}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 Ze(t.authority,_.fromProto(t.constantFee))}toProto(){const{authority:t,constant_fee:e}=this;return pa.MsgUpdateParams.fromPartial({authority:t,constantFee:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgUpdateParams",value:pa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ze.fromProto(pa.MsgUpdateParams.decode(t.value))}}class Xe extends m{constructor(t,e){super(),this.delegator_address=t,this.withdraw_address=e}static fromAmino(t){const{value:{delegator_address:e,withdraw_address:r}}=t;return new Xe(e,r)}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:r}=t;return new Xe(e,r)}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 Xe(t.delegatorAddress,t.withdrawAddress)}toProto(){const{delegator_address:t,withdraw_address:e}=this;return st.MsgSetWithdrawAddress.fromPartial({delegatorAddress:t,withdrawAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",value:st.MsgSetWithdrawAddress.encode(this.toProto()).finish()})}static unpackAny(t){return Xe.fromProto(st.MsgSetWithdrawAddress.decode(t.value))}}class tr extends m{constructor(t,e){super(),this.delegator_address=t,this.validator_address=e}static fromAmino(t){const{value:{delegator_address:e,validator_address:r}}=t;return new tr(e,r)}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:r}=t;return new tr(e,r)}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 tr(t.delegatorAddress,t.validatorAddress)}toProto(){const{delegator_address:t,validator_address:e}=this;return st.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t,validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:st.MsgWithdrawDelegatorReward.encode(this.toProto()).finish()})}static unpackAny(t){return tr.fromProto(st.MsgWithdrawDelegatorReward.decode(t.value))}}class er extends m{constructor(t){super(),this.validator_address=t}static fromAmino(t){const{value:{validator_address:e}}=t;return new er(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 er(e)}toData(){const{validator_address:t}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",validator_address:t}}static fromProto(t){return new er(t.validatorAddress)}toProto(){const{validator_address:t}=this;return st.MsgWithdrawValidatorCommission.fromPartial({validatorAddress:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",value:st.MsgWithdrawValidatorCommission.encode(this.toProto()).finish()})}static unpackAny(t){return er.fromProto(st.MsgWithdrawValidatorCommission.decode(t.value))}}class rr extends m{constructor(e,r){super();p(this,"amount");this.depositor=e,this.amount=new u(r)}static fromAmino(e){const{value:{depositor:r,amount:o}}=e;return new rr(r,u.fromAmino(o))}toAmino(){const{depositor:e,amount:r}=this;return{type:"cosmos-sdk/MsgFundCommunityPool",value:{depositor:e,amount:r.toAmino()}}}static fromData(e){const{depositor:r,amount:o}=e;return new rr(r,u.fromData(o))}toData(){const{depositor:e,amount:r}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgFundCommunityPool",depositor:e,amount:r.toData()}}static fromProto(e){return new rr(e.depositor,u.fromProto(e.amount))}toProto(){const{depositor:e,amount:r}=this;return st.MsgFundCommunityPool.fromPartial({amount:r.toProto(),depositor:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",value:st.MsgFundCommunityPool.encode(this.toProto()).finish()})}static unpackAny(e){return rr.fromProto(st.MsgFundCommunityPool.decode(e.value))}}class Cs extends m{constructor(t,e){super(),this.denom=t,this.weight=e}static fromAmino(t){const{denom:e,weight:r}=t;return new Cs(e,r)}toAmino(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromData(t){const{denom:e,weight:r}=t;return new Cs(e,r)}toData(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromProto(t){return new Cs(t.denom,t.weight)}toProto(){const{denom:t,weight:e}=this;return Ni.RewardWeight.fromPartial({denom:t,weight:e})}}class ms extends m{constructor(t,e,r){super(),this.community_tax=t,this.withdraw_addr_enabled=e,this.reward_weights=r}static fromAmino(t){const{value:{community_tax:e,withdraw_addr_enabled:r,reward_weights:o}}=t;return new ms(e,r,o.map(Cs.fromAmino))}toAmino(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return{type:"distribution/Params",value:{community_tax:t,withdraw_addr_enabled:e,reward_weights:r.map(o=>o.toAmino())}}}static fromData(t){const{community_tax:e,withdraw_addr_enabled:r,reward_weights:o}=t;return new ms(e,r,o.map(Cs.fromData))}toData(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return{"@type":"/initia.distribution.v1.Params",community_tax:t,withdraw_addr_enabled:e,reward_weights:r.map(o=>o.toData())}}static fromProto(t){return new ms(t.communityTax,t.withdrawAddrEnabled,t.rewardWeights.map(Cs.fromProto))}toProto(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return Ni.Params.fromPartial({communityTax:t,withdrawAddrEnabled:e,rewardWeights:r.map(o=>o.toProto())})}}class or extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new or(e,ms.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"distribution/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new or(e,ms.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.distribution.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new or(t.authority,ms.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Sn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgUpdateParams",value:Sn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return or.fromProto(Sn.MsgUpdateParams.decode(t.value))}}class sr extends m{constructor(e,r,o){super();p(this,"amount");this.authority=e,this.recipient=r,this.amount=new u(o)}static fromAmino(e){const{value:{authority:r,recipient:o,amount:s}}=e;return new sr(r,o,u.fromAmino(s))}toAmino(){const{authority:e,recipient:r,amount:o}=this;return{type:"cosmos-sdk/distr/MsgCommunityPoolSpend",value:{authority:e,recipient:r,amount:o.toAmino()}}}static fromData(e){const{authority:r,recipient:o,amount:s}=e;return new sr(r,o,u.fromData(s))}toData(){const{authority:e,recipient:r,amount:o}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",authority:e,recipient:r,amount:o.toData()}}static fromProto(e){return new sr(e.authority,e.recipient,u.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return st.MsgCommunityPoolSpend.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",value:st.MsgCommunityPoolSpend.encode(this.toProto()).finish()})}static unpackAny(e){return sr.fromProto(st.MsgCommunityPoolSpend.decode(e.value))}}class nr extends m{constructor(e,r,o,s){super();p(this,"amount");this.depositor=e,this.validator_address=r,this.denom=o,this.amount=new u(s)}static fromAmino(e){const{value:{depositor:r,validator_address:o,denom:s,amount:n}}=e;return new nr(r,o,s,u.fromAmino(n))}toAmino(){const{depositor:e,validator_address:r,denom:o,amount:s}=this;return{type:"distr/MsgDepositValidatorRewardsPool",value:{depositor:e,validator_address:r,denom:o,amount:s.toAmino()}}}static fromData(e){const{depositor:r,validator_address:o,denom:s,amount:n}=e;return new nr(r,o,s,u.fromData(n))}toData(){const{depositor:e,validator_address:r,denom:o,amount:s}=this;return{"@type":"/initia.distribution.v1.MsgDepositValidatorRewardsPool",depositor:e,validator_address:r,denom:o,amount:s.toData()}}static fromProto(e){return new nr(e.depositor,e.validatorAddress,e.denom,u.fromProto(e.amount))}toProto(){const{depositor:e,validator_address:r,denom:o,amount:s}=this;return Sn.MsgDepositValidatorRewardsPool.fromPartial({depositor:e,validatorAddress:r,denom:o,amount:s.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgDepositValidatorRewardsPool",value:Sn.MsgDepositValidatorRewardsPool.encode(this.toProto()).finish()})}static unpackAny(e){return nr.fromProto(Sn.MsgDepositValidatorRewardsPool.decode(e.value))}}class ar extends m{constructor(t,e,r,o){super(),this.height=t,this.time=e,this.power=r,this.consensus_address=o}static fromAmino(t){const{value:{height:e,time:r,power:o,consensus_address:s}}=t;return new ar(Number.parseInt(e),new Date(r),Number.parseInt(o),s)}toAmino(){const{height:t,time:e,power:r,consensus_address:o}=this;return{type:"cosmos-sdk/Equivocation",value:{height:t.toString(),time:e.toISOString(),power:r.toString(),consensus_address:o}}}static fromData(t){const{height:e,time:r,power:o,consensus_address:s}=t;return new ar(Number.parseInt(e),new Date(r),Number.parseInt(o),s)}toData(){const{height:t,time:e,power:r,consensus_address:o}=this;return{"@type":"/cosmos.evidence.v1beta1.Equivocation",height:t.toString(),time:e.toISOString(),power:r.toString(),consensus_address:o}}static fromProto(t){return new ar(t.height.toNumber(),t.time,t.power.toNumber(),t.consensusAddress)}toProto(){const{height:t,time:e,power:r,consensus_address:o}=this;return Xa.Equivocation.fromPartial({height:f.fromNumber(t),time:e,power:f.fromNumber(r),consensusAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.Equivocation",value:Xa.Equivocation.encode(this.toProto()).finish()})}static unpackAny(t){return ar.fromProto(Xa.Equivocation.decode(t.value))}}exports.Evidence=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/Equivocation":return ar.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.evidence.v1beta1.Equivocation":return ar.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmos.evidence.v1beta1.Equivocation":return ar.unpackAny(o)}throw new Error(`Evidence type ${s} not recognized`)}i.fromProto=r})(exports.Evidence||(exports.Evidence={}));class ir extends m{constructor(t,e){super(),this.submitter=t,this.evidence=e}static fromAmino(t){const{value:{submitter:e,evidence:r}}=t;return new ir(e,exports.Evidence.fromAmino(r))}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:r}=t;return new ir(e,exports.Evidence.fromData(r))}toData(){const{submitter:t,evidence:e}=this;return{"@type":"/cosmos.evidence.v1beta1.MsgSubmitEvidence",submitter:t,evidence:e.toData()}}static fromProto(t){return new ir(t.submitter,exports.Evidence.fromProto(t.evidence))}toProto(){const{submitter:t,evidence:e}=this;return Za.MsgSubmitEvidence.fromPartial({submitter:t,evidence:e.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.MsgSubmitEvidence",value:Za.MsgSubmitEvidence.encode(this.toProto()).finish()})}static unpackAny(t){return ir.fromProto(Za.MsgSubmitEvidence.decode(t.value))}}class cr extends m{constructor(t,e,r){super(),this.sender=t,this.code=e,this.value=r}static fromAmino(t){const{value:{sender:e,code:r,value:o}}=t;return new cr(e,r,o)}toAmino(){const{sender:t,code:e,value:r}=this;return{type:"evm/MsgCreate",value:{sender:t,code:e,value:r}}}static fromData(t){const{sender:e,code:r,value:o}=t;return new cr(e,r,o)}toData(){const{sender:t,code:e,value:r}=this;return{"@type":"/minievm.evm.v1.MsgCreate",sender:t,code:e,value:r}}static fromProto(t){return new cr(t.sender,t.code,t.value)}toProto(){const{sender:t,code:e,value:r}=this;return wt.MsgCreate.fromPartial({sender:t,code:e,value:r})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate",value:wt.MsgCreate.encode(this.toProto()).finish()})}static unpackAny(t){return cr.fromProto(wt.MsgCreate.decode(t.value))}}class mr extends m{constructor(t,e,r,o){super(),this.sender=t,this.code=e,this.salt=r,this.value=o}static fromAmino(t){const{value:{sender:e,code:r,salt:o,value:s}}=t;return new mr(e,r,Number.parseInt(o),s)}toAmino(){const{sender:t,code:e,salt:r,value:o}=this;return{type:"evm/MsgCreate2",value:{sender:t,code:e,salt:r.toString(),value:o}}}static fromData(t){const{sender:e,code:r,salt:o,value:s}=t;return new mr(e,r,Number.parseInt(o),s)}toData(){const{sender:t,code:e,salt:r,value:o}=this;return{"@type":"/minievm.evm.v1.MsgCreate2",sender:t,code:e,salt:r.toString(),value:o}}static fromProto(t){return new mr(t.sender,t.code,t.salt.toNumber(),t.value)}toProto(){const{sender:t,code:e,salt:r,value:o}=this;return wt.MsgCreate2.fromPartial({sender:t,code:e,salt:f.fromNumber(r),value:o})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate2",value:wt.MsgCreate2.encode(this.toProto()).finish()})}static unpackAny(t){return mr.fromProto(wt.MsgCreate2.decode(t.value))}}class ur extends m{constructor(t,e,r,o){super(),this.sender=t,this.contract_addr=e,this.input=r,this.value=o}static fromAmino(t){const{value:{sender:e,contract_addr:r,input:o,value:s}}=t;return new ur(e,r,o,s)}toAmino(){const{sender:t,contract_addr:e,input:r,value:o}=this;return{type:"evm/MsgCall",value:{sender:t,contract_addr:e,input:r,value:o}}}static fromData(t){const{sender:e,contract_addr:r,input:o,value:s}=t;return new ur(e,r,o,s)}toData(){const{sender:t,contract_addr:e,input:r,value:o}=this;return{"@type":"/minievm.evm.v1.MsgCall",sender:t,contract_addr:e,input:r,value:o}}static fromProto(t){return new ur(t.sender,t.contractAddr,t.input,t.value)}toProto(){const{sender:t,contract_addr:e,input:r,value:o}=this;return wt.MsgCall.fromPartial({sender:t,contractAddr:e,input:r,value:o})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCall",value:wt.MsgCall.encode(this.toProto()).finish()})}static unpackAny(t){return ur.fromProto(wt.MsgCall.decode(t.value))}}class us extends m{constructor(t,e,r,o,s){super(),this.extra_eips=t,this.allowed_publishers=e,this.allow_custom_erc20=r,this.allowed_custom_erc20s=o,this.fee_denom=s}static fromAmino(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:s,fee_denom:n}=t;return new us(e.map(Number.parseInt),r,o,s,n)}toAmino(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}=this;return{extra_eips:t.map(n=>n.toString()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}}static fromData(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:s,fee_denom:n}=t;return new us(e.map(Number.parseInt),r,o,s,n)}toData(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}=this;return{extra_eips:t.map(n=>n.toString()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}}static fromProto(t){return new us(t.extraEips.map(e=>e.toNumber()),t.allowedPublishers,t.allowCustomErc20,t.allowedCustomErc20s,t.feeDenom)}toProto(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:s}=this;return Bc.Params.fromPartial({extraEips:t,allowedPublishers:e,allowCustomErc20:r,allowedCustomErc20s:o,feeDenom:s})}}class dr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new dr(e,us.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"evm/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new dr(e,us.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/minievm.evm.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new dr(t.authority,us.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return wt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgUpdateParams",value:wt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return dr.fromProto(wt.MsgUpdateParams.decode(t.value))}}class ot extends m{constructor(e,r){super();p(this,"spend_limit");this.expiration=r;let o=!1;if(e&&(this.spend_limit=new u(e),this.spend_limit.map(s=>{v(s.amount).isLessThanOrEqualTo(0)&&(o=!0)})),e&&o)throw new Error("spend_limit must be positive")}static fromAmino(e){const{value:{spend_limit:r,expiration:o}}=e;return new ot(r?u.fromAmino(r):void 0,o?new Date(o):void 0)}toAmino(){const{spend_limit:e,expiration:r}=this;return{type:"cosmos-sdk/BasicAllowance",value:{spend_limit:e==null?void 0:e.toAmino(),expiration:r==null?void 0:r.toISOString().replace(/\.000Z$/,"Z")}}}static fromData(e){const{spend_limit:r,expiration:o}=e;return new ot(r?u.fromData(r):void 0,o?new Date(o):void 0)}toData(){const{spend_limit:e,expiration:r}=this;return{"@type":"/cosmos.feegrant.v1beta1.BasicAllowance",spend_limit:e==null?void 0:e.toData(),expiration:r==null?void 0:r.toISOString().replace(/\.000Z$/,"Z")}}static fromProto(e){return new ot(u.fromProto(e.spendLimit),e.expiration)}toProto(){const{spend_limit:e,expiration:r}=this;return rs.BasicAllowance.fromPartial({expiration:r,spendLimit:e==null?void 0:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",value:rs.BasicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return ot.fromProto(rs.BasicAllowance.decode(e.value))}}class At extends m{constructor(e,r,o,s,n){super();p(this,"period_spend_limit");p(this,"period_can_spend");this.basic=e,this.period=r,this.period_reset=n,this.period_spend_limit=new u(o),this.period_can_spend=new u(s)}static fromAmino(e){const{value:{basic:r,period:o,period_spend_limit:s,period_can_spend:n,period_reset:a}}=e;return new At(ot.fromAmino(r),D.fromAmino(o),u.fromAmino(s),u.fromAmino(n),new Date(a))}toAmino(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:s,period_reset:n}=this;return{type:"cosmos-sdk/PeriodicAllowance",value:{basic:e.toAmino(),period:r.toAmino(),period_spend_limit:o.toAmino(),period_can_spend:s.toAmino(),period_reset:n.toISOString().replace(/\.000Z$/,"Z")}}}static fromData(e){const{basic:r,period:o,period_spend_limit:s,period_can_spend:n,period_reset:a}=e;return new At(ot.fromData(r),D.fromData(o),u.fromData(s),u.fromData(n),new Date(a))}toData(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:s,period_reset:n}=this;return{"@type":"/cosmos.feegrant.v1beta1.PeriodicAllowance",basic:e.toData(),period:r.toData(),period_spend_limit:o.toData(),period_can_spend:s.toData(),period_reset:n.toISOString().replace(/\.000Z$/,"Z")}}static fromProto(e){return new At(ot.fromProto(e.basic),D.fromProto(e.period),u.fromProto(e.periodSpendLimit),u.fromProto(e.periodCanSpend),e.periodReset)}toProto(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:s,period_reset:n}=this;return rs.PeriodicAllowance.fromPartial({basic:e.toProto(),period:r.toProto(),periodCanSpend:s.toProto(),periodReset:n,periodSpendLimit:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.PeriodicAllowance",value:rs.PeriodicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return At.fromProto(rs.PeriodicAllowance.decode(e.value))}}class lr extends m{constructor(t,e){super(),this.allowance=t,this.allowed_messages=e}static fromAmino(t){const{value:{allowance:e,allowed_messages:r}}=t;return new lr(e.type==="cosmos-sdk/BasicAllowance"?ot.fromAmino(e):At.fromAmino(e),r)}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:r}=t;return new lr(e["@type"]==="/cosmos.feegrant.v1beta1.BasicAllowance"?ot.fromData(e):At.fromData(e),r)}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 lr((e==null?void 0:e.typeUrl)==="/cosmos.feegrant.v1beta1.BasicAllowance"?ot.unpackAny(e):At.unpackAny(e),t.allowedMessages)}toProto(){const{allowance:t,allowed_messages:e}=this;return rs.AllowedMsgAllowance.fromPartial({allowance:t.packAny(),allowedMessages:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",value:rs.AllowedMsgAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return lr.fromProto(rs.AllowedMsgAllowance.decode(t.value))}}exports.Allowance=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/BasicAllowance":return ot.fromAmino(o);case"cosmos-sdk/PeriodicAllowance":return At.fromAmino(o);case"cosmos-sdk/AllowedMsgAllowance":return lr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return At.fromData(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return ot.fromData(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return lr.fromData(o)}}i.fromData=e;function r(o){switch(o.typeUrl){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return At.unpackAny(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return ot.unpackAny(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return lr.unpackAny(o)}throw new Error(`not supported allowance ${o.typeUrl}`)}i.fromProto=r})(exports.Allowance||(exports.Allowance={}));class pr extends m{constructor(t,e,r){super(),this.granter=t,this.grantee=e,this.allowance=r}static fromAmino(t){const{value:{granter:e,grantee:r,allowance:o}}=t;return new pr(e,r,exports.Allowance.fromAmino(o))}toAmino(){const{granter:t,grantee:e,allowance:r}=this;return{type:"cosmos-sdk/MsgGrantAllowance",value:{granter:t,grantee:e,allowance:r.toAmino()}}}static fromData(t){const{granter:e,grantee:r,allowance:o}=t;return new pr(e,r,exports.Allowance.fromData(o))}toData(){const{granter:t,grantee:e,allowance:r}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgGrantAllowance",granter:t,grantee:e,allowance:r.toData()}}static fromProto(t){return new pr(t.granter,t.grantee,exports.Allowance.fromProto(t.allowance))}toProto(){const{granter:t,grantee:e,allowance:r}=this;return In.MsgGrantAllowance.fromPartial({allowance:r.packAny(),grantee:e,granter:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",value:In.MsgGrantAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return pr.fromProto(In.MsgGrantAllowance.decode(t.value))}}class hr extends m{constructor(t,e){super(),this.granter=t,this.grantee=e}static fromAmino(t){const{value:{granter:e,grantee:r}}=t;return new hr(e,r)}toAmino(){const{granter:t,grantee:e}=this;return{type:"cosmos-sdk/MsgRevokeAllowance",value:{granter:t,grantee:e}}}static fromData(t){const{granter:e,grantee:r}=t;return new hr(e,r)}toData(){const{granter:t,grantee:e}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",granter:t,grantee:e}}static fromProto(t){return new hr(t.granter,t.grantee)}toProto(){const{granter:t,grantee:e}=this;return In.MsgRevokeAllowance.fromPartial({grantee:e,granter:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",value:In.MsgRevokeAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return hr.fromProto(In.MsgRevokeAllowance.decode(t.value))}}class fr extends m{constructor(t,e,r){super(),this.signer=t,this.recipient=e,this.channel=r}static fromAmino(t){const{value:{signer:e,recipient:r,channel:o}}=t;return new fr(e,r,o)}toAmino(){const{signer:t,recipient:e,channel:r}=this;return{type:"noble/forwarding/RegisterAccount",value:{signer:t,recipient:e,channel:r}}}static fromData(t){const{signer:e,recipient:r,channel:o}=t;return new fr(e,r,o)}toData(){const{signer:t,recipient:e,channel:r}=this;return{"@type":"/noble.forwarding.v1.MsgRegisterAccount",signer:t,recipient:e,channel:r}}static fromProto(t){return new fr(t.signer,t.recipient,t.channel)}toProto(){const{signer:t,recipient:e,channel:r}=this;return Nn.MsgRegisterAccount.fromPartial({signer:t,recipient:e,channel:r})}packAny(){return l.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgRegisterAccount",value:Nn.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return fr.fromProto(Nn.MsgRegisterAccount.decode(t.value))}}class gr extends m{constructor(t,e){super(),this.signer=t,this.address=e}static fromAmino(t){const{value:{signer:e,address:r}}=t;return new gr(e,r)}toAmino(){const{signer:t,address:e}=this;return{type:"noble/forwarding/ClearAccount",value:{signer:t,address:e}}}static fromData(t){const{signer:e,address:r}=t;return new gr(e,r)}toData(){const{signer:t,address:e}=this;return{"@type":"/noble.forwarding.v1.MsgClearAccount",signer:t,address:e}}static fromProto(t){return new gr(t.signer,t.address)}toProto(){const{signer:t,address:e}=this;return Nn.MsgClearAccount.fromPartial({signer:t,address:e})}packAny(){return l.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgClearAccount",value:Nn.MsgClearAccount.encode(this.toProto()).finish()})}static unpackAny(t){return gr.fromProto(Nn.MsgClearAccount.decode(t.value))}}class yr extends m{constructor(t,e){super(),this.proposal_id=t,this.proposer=e}static fromAmino(t){const{value:{proposal_id:e,proposer:r}}=t;return new yr(Number.parseInt(e),r)}toAmino(){const{proposal_id:t,proposer:e}=this;return{type:"cosmos-sdk/v1/MsgCancelProposal",value:{proposal_id:t.toString(),proposer:e}}}static fromData(t){const{proposal_id:e,proposer:r}=t;return new yr(Number.parseInt(e),r)}toData(){const{proposal_id:t,proposer:e}=this;return{"@type":"/cosmos.gov.v1.MsgCancelProposal",proposal_id:t.toString(),proposer:e}}static fromProto(t){return new yr(t.proposalId.toNumber(),t.proposer)}toProto(){const{proposal_id:t,proposer:e}=this;return nt.MsgCancelProposal.fromPartial({proposalId:f.fromNumber(t),proposer:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgCancelProposal",value:nt.MsgCancelProposal.encode(this.toProto()).finish()})}static unpackAny(t){return yr.fromProto(nt.MsgCancelProposal.decode(t.value))}}class _r extends m{constructor(e,r,o){super();p(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new u(o)}static fromAmino(e){const{value:{proposal_id:r,depositor:o,amount:s}}=e;return new _r(Number.parseInt(r),o,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{type:"cosmos-sdk/MsgDeposit",value:{proposal_id:e.toString(),depositor:r,amount:o.toAmino()}}}static fromData(e){const{proposal_id:r,depositor:o,amount:s}=e;return new _r(Number.parseInt(r),o,u.fromData(s))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{"@type":"/cosmos.gov.v1beta1.MsgDeposit",proposal_id:e.toString(),depositor:r,amount:o.toData()}}static fromProto(e){return new _r(e.proposalId.toNumber(),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Dt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:f.fromNumber(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",value:Dt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return _r.fromProto(Dt.MsgDeposit.decode(e.value))}}class vr extends m{constructor(e,r,o){super();p(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new u(o)}static fromAmino(e){const{value:{proposal_id:r,depositor:o,amount:s}}=e;return new vr(Number.parseInt(r),o,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{type:"cosmos-sdk/v1/MsgDeposit",value:{proposal_id:e.toString(),depositor:r,amount:o.toAmino()}}}static fromData(e){const{proposal_id:r,depositor:o,amount:s}=e;return new vr(Number.parseInt(r),o,u.fromData(s))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{"@type":"/cosmos.gov.v1.MsgDeposit",proposal_id:e.toString(),depositor:r,amount:o.toData()}}static fromProto(e){return new vr(e.proposalId.toNumber(),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return nt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:f.fromNumber(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgDeposit",value:nt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return vr.fromProto(nt.MsgDeposit.decode(e.value))}}class br extends m{constructor(t){super(),this.paramChanges=t}static fromAmino(t){return new br((t??[]).map(Us.fromAmino))}toAmino(){return this.paramChanges.map(t=>t.toAmino())}static fromData(t){return new br((t??[]).map(Us.fromData))}toData(){return this.paramChanges.map(t=>t.toData())}static fromProto(t){return new br((t??[]).map(Us.fromProto))}toProto(){return this.paramChanges.map(t=>t.toProto())}}class Us extends m{constructor(t,e,r){super(),this.subspace=t,this.key=e,this.value=r}static fromAmino(t){const{subspace:e,key:r,value:o}=t;return new Us(e,r,o)}toAmino(){const{subspace:t,key:e,value:r}=this;return{subspace:t,key:e,value:r}}static fromData(t){const{subspace:e,key:r,value:o}=t;return new Us(e,r,o)}toData(){const{subspace:t,key:e,value:r}=this;return{subspace:t,key:e,value:r}}static fromProto(t){return new Us(t.subspace,t.key,t.value)}toProto(){const{subspace:t,key:e,value:r}=this;return xa.ParamChange.fromPartial({key:e,subspace:t,value:r})}}class Ar extends m{constructor(e,r,o){super();p(this,"changes");this.title=e,this.description=r,Array.isArray(o)?this.changes=br.fromData(o):this.changes=o}static fromAmino(e){const{value:{title:r,description:o,changes:s}}=e;return new Ar(r,o,br.fromAmino(s))}toAmino(){const{title:e,description:r,changes:o}=this;return{type:"cosmos-sdk/ParameterChangeProposal",value:{title:e,description:r,changes:o.toAmino()}}}static fromData(e){const{title:r,description:o,changes:s}=e;return new Ar(r,o,br.fromData(s))}toData(){const{title:e,description:r,changes:o}=this;return{"@type":"/cosmos.params.v1beta1.ParameterChangeProposal",title:e,description:r,changes:o.toData()}}static fromProto(e){return new Ar(e.title,e.description,br.fromProto(e.changes))}toProto(){const{title:e,description:r,changes:o}=this;return xa.ParameterChangeProposal.fromPartial({changes:o.toProto(),description:r,title:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:xa.ParameterChangeProposal.encode(this.toProto()).finish()})}static unpackAny(e){return Ar.fromProto(xa.ParameterChangeProposal.decode(e.value))}}class Pr extends m{constructor(t,e){super(),this.title=t,this.description=e}static fromAmino(t){const{value:{title:e,description:r}}=t;return new Pr(e,r)}toAmino(){const{title:t,description:e}=this;return{type:"cosmos-sdk/TextProposal",value:{title:t,description:e}}}static fromData(t){const{title:e,description:r}=t;return new Pr(e,r)}toData(){const{title:t,description:e}=this;return{"@type":"/cosmos.gov.v1beta1.TextProposal",title:t,description:e}}static fromProto(t){return new Pr(t.title,t.description)}toProto(){const{title:t,description:e}=this;return Sa.TextProposal.fromPartial({description:e,title:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:Sa.TextProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Pr.fromProto(Sa.TextProposal.decode(t.value))}}exports.Content=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/TextProposal":return Pr.fromAmino(o);case"cosmos-sdk/ParameterChangeProposal":return Ar.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.gov.v1beta1.TextProposal":return Pr.fromData(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return Ar.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmos.gov.v1beta1.TextProposal":return Pr.unpackAny(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return Ar.unpackAny(o)}throw new Error(`Proposal content ${s} not recognized`)}i.fromProto=r})(exports.Content||(exports.Content={}));class ds extends m{constructor(t,e,r,o){super(),this.tally_height=t,this.total_staking_power=e,this.total_vesting_power=r,this.v1_tally_result=o}static fromAmino(t){const{tally_height:e,total_staking_power:r,total_vesting_power:o,v1_tally_result:s}=t;return new ds(Number.parseInt(e),r,o,s)}toAmino(){const{tally_height:t,total_staking_power:e,total_vesting_power:r,v1_tally_result:o}=this;return{tally_height:t.toString(),total_staking_power:e,total_vesting_power:r,v1_tally_result:o}}static fromData(t){const{tally_height:e,total_staking_power:r,total_vesting_power:o,v1_tally_result:s}=t;return new ds(Number.parseInt(e),r,o,s)}toData(){const{tally_height:t,total_staking_power:e,total_vesting_power:r,v1_tally_result:o}=this;return{tally_height:t.toString(),total_staking_power:e,total_vesting_power:r,v1_tally_result:o}}static fromProto(t){var e,r,o,s;return new ds(t.tallyHeight.toNumber(),t.totalStakingPower,t.totalVestingPower,{yes_count:((e=t.v1TallyResult)==null?void 0:e.yesCount)??"0",abstain_count:((r=t.v1TallyResult)==null?void 0:r.abstainCount)??"0",no_count:((o=t.v1TallyResult)==null?void 0:o.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:r,v1_tally_result:o}=this;return Ra.TallyResult.fromPartial({tallyHeight:f.fromNumber(t),totalStakingPower:e,totalVestingPower:r,v1TallyResult:Ut.TallyResult.fromPartial({yesCount:o.yes_count,abstainCount:o.abstain_count,noCount:o.no_count,noWithVetoCount:o.no_with_veto_count})})}}class ee extends m{constructor(e,r,o,s,n,a,c,d,h,g,y,b,k,M,T,F,L,z){super();p(this,"total_deposit");this.id=e,this.messages=r,this.status=o,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=g,this.emergency_next_tally_time=y,this.metadata=b,this.title=k,this.summary=M,this.proposer=T,this.expedited=F,this.emergency=L,this.failed_reason=z,this.total_deposit=new u(c)}static fromAmino(e){const{id:r,messages:o,status:s,final_tally_result:n,submit_time:a,deposit_end_time:c,total_deposit:d,voting_start_time:h,voting_end_time:g,emergency_start_time:y,emergency_next_tally_time:b,metadata:k,title:M,summary:T,proposer:F,expedited:L,emergency:z,failed_reason:K}=e;return new ee(Number.parseInt(r),o.map(exports.Msg.fromAmino),Ut.proposalStatusFromJSON(s),ds.fromAmino(n),new Date(a),new Date(c),u.fromAmino(d),new Date(h),new Date(g),new Date(y),new Date(b),k,M,T,F,L,z,K)}toAmino(){const{id:e,messages:r,status:o,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:h,emergency_start_time:g,emergency_next_tally_time:y,metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}=this;return{id:e.toString(),messages:r.map(K=>K.toAmino()),status:Ut.proposalStatusToJSON(o),final_tally_result:s.toAmino(),submit_time:n.toISOString(),deposit_end_time:a.toISOString(),total_deposit:c.toAmino(),voting_start_time:d.toISOString(),voting_end_time:h.toISOString(),emergency_start_time:g.toISOString(),emergency_next_tally_time:y.toISOString(),metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}}static fromData(e){const{id:r,messages:o,status:s,final_tally_result:n,submit_time:a,deposit_end_time:c,total_deposit:d,voting_start_time:h,voting_end_time:g,emergency_start_time:y,emergency_next_tally_time:b,metadata:k,title:M,summary:T,proposer:F,expedited:L,emergency:z,failed_reason:K}=e;return new ee(Number.parseInt(r),o.map(exports.Msg.fromData),Ut.proposalStatusFromJSON(s),ds.fromData(n),new Date(a),new Date(c),u.fromData(d),new Date(h),new Date(g),new Date(y),new Date(b),k,M,T,F,L,z,K)}toData(){const{id:e,messages:r,status:o,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:h,emergency_start_time:g,emergency_next_tally_time:y,metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}=this;return{id:e.toString(),messages:r.map(K=>K.toData()),status:Ut.proposalStatusToJSON(o),final_tally_result:s.toData(),submit_time:n.toISOString(),deposit_end_time:a.toISOString(),total_deposit:c.toData(),voting_start_time:d.toISOString(),voting_end_time:h.toISOString(),emergency_start_time:g.toISOString(),emergency_next_tally_time:y.toISOString(),metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}}static fromProto(e){return new ee(e.id.toNumber(),e.messages.map(exports.Msg.fromProto),e.status,ds.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:r,status:o,final_tally_result:s,submit_time:n,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:h,emergency_start_time:g,emergency_next_tally_time:y,metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failed_reason:z}=this;return Ra.Proposal.fromPartial({id:f.fromNumber(e),messages:r.map(K=>K.packAny()),status:o,finalTallyResult:s.toProto(),submitTime:n,depositEndTime:a,totalDeposit:c.toProto(),votingStartTime:d,votingEndTime:h,emergencyStartTime:g,emergencyNextTallyTime:y,metadata:b,title:k,summary:M,proposer:T,expedited:F,emergency:L,failedReason:z})}}(i=>{i.Status=Ut.ProposalStatus})(ee||(ee={}));class wr extends m{constructor(e,r,o){super();p(this,"initial_deposit");this.content=e,this.proposer=o,this.initial_deposit=new u(r)}static fromAmino(e){const{value:{content:r,initial_deposit:o,proposer:s}}=e;return new wr(r?exports.Content.fromAmino(r):void 0,u.fromAmino(o),s)}toAmino(){const{content:e,initial_deposit:r,proposer:o}=this;return{type:"cosmos-sdk/MsgSubmitProposal",value:{content:e==null?void 0:e.toAmino(),initial_deposit:r.toAmino(),proposer:o}}}static fromData(e){const{content:r,initial_deposit:o,proposer:s}=e;return new wr(r?exports.Content.fromData(r):void 0,u.fromData(o),s)}toData(){const{content:e,initial_deposit:r,proposer:o}=this;return{"@type":"/cosmos.gov.v1beta1.MsgSubmitProposal",content:e==null?void 0:e.toData(),initial_deposit:r.toData(),proposer:o}}static fromProto(e){return new wr(e.content?exports.Content.fromProto(e.content):void 0,u.fromProto(e.initialDeposit),e.proposer)}toProto(){const{content:e,initial_deposit:r,proposer:o}=this;return Dt.MsgSubmitProposal.fromPartial({content:e==null?void 0:e.packAny(),initialDeposit:r.toProto(),proposer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposal",value:Dt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return wr.fromProto(Dt.MsgSubmitProposal.decode(e.value))}}class Dr extends m{constructor(e,r,o,s,n,a,c){super();p(this,"initial_deposit");this.messages=e,this.proposer=o,this.metadata=s,this.title=n,this.summary=a,this.expedited=c,this.initial_deposit=new u(r)}static fromAmino(e){const{value:{messages:r,initial_deposit:o,proposer:s,metadata:n,title:a,summary:c,expedited:d}}=e;return new Dr(r.map(exports.Msg.fromAmino),u.fromAmino(o),s,n??"",a,c,d)}toAmino(){const{messages:e,initial_deposit:r,proposer:o,metadata:s,title:n,summary:a,expedited:c}=this;return{type:"cosmos-sdk/v1/MsgSubmitProposal",value:{messages:e.map(d=>d.toAmino()),initial_deposit:r.toAmino(),proposer:o,metadata:s&&s!==""?s:void 0,title:n,summary:a,expedited:c}}}static fromData(e){const{messages:r,initial_deposit:o,proposer:s,metadata:n,title:a,summary:c,expedited:d}=e;return new Dr(r.map(exports.Msg.fromData),u.fromData(o),s,n,a,c,d)}toData(){const{messages:e,initial_deposit:r,proposer:o,metadata:s,title:n,summary:a,expedited:c}=this;return{"@type":"/cosmos.gov.v1.MsgSubmitProposal",messages:e.map(d=>d.toData()),initial_deposit:r.toData(),proposer:o,metadata:s,title:n,summary:a,expedited:c}}static fromProto(e){return new Dr(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:r,proposer:o,metadata:s,title:n,summary:a,expedited:c}=this;return nt.MsgSubmitProposal.fromPartial({messages:e.map(d=>d.packAny()),initialDeposit:r.toProto(),proposer:o,metadata:s,title:n,summary:a,expedited:c})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",value:nt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return Dr.fromProto(nt.MsgSubmitProposal.decode(e.value))}}class Bt extends m{constructor(t,e,r){super(),this.proposal_id=t,this.voter=e,this.option=r}static fromAmino(t){const{value:{proposal_id:e,voter:r,option:o}}=t;return new Bt(Number.parseInt(e),r,o)}toAmino(){const{proposal_id:t,voter:e,option:r}=this;return{type:"cosmos-sdk/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:r}}}static fromData(t){const{proposal_id:e,voter:r,option:o}=t;return new Bt(Number.parseInt(e),r,o)}toData(){const{proposal_id:t,voter:e,option:r}=this;return{"@type":"/cosmos.gov.v1beta1.MsgVote",proposal_id:t.toFixed(),voter:e,option:r}}static fromProto(t){return new Bt(t.proposalId.toNumber(),t.voter,t.option)}toProto(){const{proposal_id:t,voter:e,option:r}=this;return Dt.MsgVote.fromPartial({option:r,proposalId:f.fromNumber(t),voter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVote",value:Dt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return Bt.fromProto(Dt.MsgVote.decode(t.value))}}(i=>{i.Option=Sa.VoteOption})(Bt||(Bt={}));class Ot extends m{constructor(t,e,r,o){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o}static fromAmino(t){const{value:{proposal_id:e,voter:r,option:o,metadata:s}}=t;return new Ot(Number.parseInt(e),r,o,s??"")}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return{type:"cosmos-sdk/v1/MsgVote",value:{proposal_id:t.toString(),voter:e,option:r,metadata:o&&o!==""?o:void 0}}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:s}=t;return new Ot(Number.parseInt(e),r,o,s)}toData(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return{"@type":"/cosmos.gov.v1.MsgVote",proposal_id:t.toString(),voter:e,option:r,metadata:o}}static fromProto(t){return new Ot(t.proposalId.toNumber(),t.voter,t.option,t.metadata)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return nt.MsgVote.fromPartial({proposalId:f.fromNumber(t),voter:e,option:r,metadata:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVote",value:nt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return Ot.fromProto(nt.MsgVote.decode(t.value))}}(i=>{i.Option=Ut.VoteOption})(Ot||(Ot={}));class Es extends m{constructor(t,e,r,o){super(),this.proposal_id=t,this.voter=e,this.options=r,this.metadata=o}static fromAmino(t){const{proposal_id:e,voter:r,options:o,metadata:s}=t;return new Es(Number.parseInt(e),r,o.map(n=>dt.fromAmino(n)),s)}toAmino(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{proposal_id:t.toString(),voter:e,options:r.map(s=>s.toAmino()),metadata:o}}static fromData(t){const{proposal_id:e,voter:r,options:o,metadata:s}=t;return new Es(Number.parseInt(e),r,o.map(n=>dt.fromData(n)),s)}toData(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{proposal_id:t.toString(),voter:e,options:r.map(s=>s.toData()),metadata:o}}static fromProto(t){return new Es(t.proposalId.toNumber(),t.voter,t.options.map(e=>dt.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return Ut.Vote.fromPartial({options:r.map(s=>s.toProto()),proposalId:f.fromNumber(t),voter:e,metadata:o})}}(i=>{i.Option=Ut.VoteOption})(Es||(Es={}));class dt extends m{constructor(e,r){super();p(this,"weight");this.option=e,this.weight=v(r).toString()}static fromAmino(e){const{option:r,weight:o}=e;return new dt(r,o)}toAmino(){const{option:e,weight:r}=this;return{option:e,weight:r}}static fromData(e){const{option:r,weight:o}=e;return new dt(r,o)}toData(){const{option:e,weight:r}=this;return{option:e,weight:r}}static fromProto(e){return new dt(e.option,e.weight)}toProto(){const{option:e,weight:r}=this;return Ut.WeightedVoteOption.fromPartial({option:e,weight:r})}}class kr extends m{constructor(t,e,r){super(),this.proposal_id=t,this.voter=e,this.options=r}static fromAmino(t){const{value:{proposal_id:e,voter:r,options:o}}=t;return new kr(Number.parseInt(e),r,o.map(s=>dt.fromAmino(s)))}toAmino(){const{proposal_id:t,voter:e,options:r}=this;return{type:"cosmos-sdk/MsgVoteWeighted",value:{proposal_id:t.toFixed(),voter:e,options:r.map(o=>o.toAmino())}}}static fromData(t){const{proposal_id:e,voter:r,options:o}=t;return new kr(Number.parseInt(e),r,o.map(s=>dt.fromData(s)))}toData(){const{proposal_id:t,voter:e,options:r}=this;return{"@type":"/cosmos.gov.v1beta1.MsgVoteWeighted",proposal_id:t.toFixed(),voter:e,options:r.map(o=>o.toData())}}static fromProto(t){return new kr(t.proposalId.toNumber(),t.voter,t.options.map(e=>dt.fromProto(e)))}toProto(){const{proposal_id:t,voter:e,options:r}=this;return Dt.MsgVoteWeighted.fromPartial({options:r.map(o=>o.toProto()),proposalId:f.fromNumber(t),voter:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",value:Dt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return kr.fromProto(Dt.MsgVoteWeighted.decode(t.value))}}class Mr extends m{constructor(t,e,r,o){super(),this.proposal_id=t,this.voter=e,this.options=r,this.metadata=o}static fromAmino(t){const{value:{proposal_id:e,voter:r,options:o,metadata:s}}=t;return new Mr(Number.parseInt(e),r,o.map(n=>dt.fromAmino(n)),s??"")}toAmino(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{type:"cosmos-sdk/v1/MsgVoteWeighted",value:{proposal_id:t.toFixed(),voter:e,options:r.map(s=>s.toAmino()),metadata:o&&o!==""?o:void 0}}}static fromData(t){const{proposal_id:e,voter:r,options:o,metadata:s}=t;return new Mr(Number.parseInt(e),r,o.map(n=>dt.fromData(n)),s)}toData(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{"@type":"/cosmos.gov.v1.MsgVoteWeighted",proposal_id:t.toFixed(),voter:e,options:r.map(s=>s.toData()),metadata:o}}static fromProto(t){return new Mr(t.proposalId.toNumber(),t.voter,t.options.map(e=>dt.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return nt.MsgVoteWeighted.fromPartial({options:r.map(s=>s.toProto()),proposalId:f.fromNumber(t),voter:e,metadata:o})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVoteWeighted",value:nt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return Mr.fromProto(nt.MsgVoteWeighted.decode(t.value))}}class Xs extends m{constructor(t,e,r){super(),this.module_addr=t,this.module_name=e,this.creator_addr=r}static fromAmino(t){const{module_addr:e,module_name:r,creator_addr:o}=t;return new Xs(e,r,o)}toAmino(){const{module_addr:t,module_name:e,creator_addr:r}=this;return{module_addr:t,module_name:e,creator_addr:r}}static fromData(t){const{module_addr:e,module_name:r,creator_addr:o}=t;return new Xs(e,r,o)}toData(){const{module_addr:t,module_name:e,creator_addr:r}=this;return{module_addr:t,module_name:e,creator_addr:r}}static fromProto(t){return new Xs(t.moduleAddr,t.moduleName,t.creatorAddr)}toProto(){const{module_addr:t,module_name:e,creator_addr:r}=this;return Ra.Vesting.fromPartial({moduleAddr:t,moduleName:e,creatorAddr:r})}}class ls extends m{constructor(e,r,o,s,n,a,c,d,h,g,y,b,k,M,T,F,L,z,K,Z){super();p(this,"min_deposit");p(this,"expedited_min_deposit");p(this,"emergency_min_deposit");this.max_deposit_period=r,this.voting_period=o,this.quorum=s,this.threshold=n,this.veto_threshold=a,this.min_initial_deposit_ratio=c,this.proposal_cancel_ratio=d,this.proposal_cancel_dest=h,this.expedited_voting_period=g,this.expedited_threshold=y,this.burn_vote_quorum=k,this.burn_proposal_deposit_prevote=M,this.burn_vote_veto=T,this.min_deposit_ratio=F,this.emergency_tally_interval=z,this.low_threshold_functions=K,this.vesting=Z,this.min_deposit=new u(e),this.expedited_min_deposit=new u(b),this.emergency_min_deposit=new u(L)}static fromAmino(e){const{min_deposit:r,max_deposit_period:o,voting_period:s,quorum:n,threshold:a,veto_threshold:c,min_initial_deposit_ratio:d,proposal_cancel_ratio:h,proposal_cancel_dest:g,expedited_voting_period:y,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:M,burn_proposal_deposit_prevote:T,burn_vote_veto:F,min_deposit_ratio:L,emergency_min_deposit:z,emergency_tally_interval:K,low_threshold_functions:Z,vesting:la}=e;return new ls(u.fromAmino(r),D.fromAmino(o),D.fromAmino(s),n,a,c,d,h,g,D.fromAmino(y),b,u.fromAmino(k),M,T,F,L,u.fromAmino(z),D.fromAmino(K),Z,la?Xs.fromAmino(la):void 0)}toAmino(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g,expedited_threshold:y,expedited_min_deposit:b,burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L,emergency_tally_interval:z,low_threshold_functions:K,vesting:Z}=this;return{min_deposit:e.toAmino(),max_deposit_period:r.toAmino(),voting_period:o.toAmino(),quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g.toAmino(),expedited_threshold:y,expedited_min_deposit:b.toAmino(),burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L.toAmino(),emergency_tally_interval:z.toAmino(),low_threshold_functions:K,vesting:Z==null?void 0:Z.toAmino()}}static fromData(e){const{min_deposit:r,max_deposit_period:o,voting_period:s,quorum:n,threshold:a,veto_threshold:c,min_initial_deposit_ratio:d,proposal_cancel_ratio:h,proposal_cancel_dest:g,expedited_voting_period:y,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:M,burn_proposal_deposit_prevote:T,burn_vote_veto:F,min_deposit_ratio:L,emergency_min_deposit:z,emergency_tally_interval:K,low_threshold_functions:Z,vesting:la}=e;return new ls(u.fromData(r),D.fromData(o),D.fromData(s),n,a,c,d,h,g,D.fromData(y),b,u.fromData(k),M,T,F,L,u.fromData(z),D.fromData(K),Z,la?Xs.fromData(la):void 0)}toData(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g,expedited_threshold:y,expedited_min_deposit:b,burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L,emergency_tally_interval:z,low_threshold_functions:K,vesting:Z}=this;return{min_deposit:e.toData(),max_deposit_period:r.toData(),voting_period:o.toData(),quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g.toData(),expedited_threshold:y,expedited_min_deposit:b.toData(),burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L.toData(),emergency_tally_interval:z.toData(),low_threshold_functions:K,vesting:Z==null?void 0:Z.toData()}}static fromProto(e){return new ls(u.fromProto(e.minDeposit),D.fromProto(e.maxDepositPeriod),D.fromProto(e.votingPeriod),e.quorum,e.threshold,e.vetoThreshold,e.minInitialDepositRatio,e.proposalCancelRatio,e.proposalCancelDest,D.fromProto(e.expeditedVotingPeriod),e.expeditedThreshold,u.fromProto(e.expeditedMinDeposit),e.burnVoteQuorum,e.burnProposalDepositPrevote,e.burnVoteVeto,e.minDepositRatio,u.fromProto(e.emergencyMinDeposit),D.fromProto(e.emergencyTallyInterval),e.lowThresholdFunctions,e.vesting?Xs.fromProto(e.vesting):void 0)}toProto(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:s,threshold:n,veto_threshold:a,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:h,expedited_voting_period:g,expedited_threshold:y,expedited_min_deposit:b,burn_vote_quorum:k,burn_proposal_deposit_prevote:M,burn_vote_veto:T,min_deposit_ratio:F,emergency_min_deposit:L,emergency_tally_interval:z,low_threshold_functions:K,vesting:Z}=this;return Ra.Params.fromPartial({minDeposit:e.toProto(),maxDepositPeriod:r.toProto(),votingPeriod:o.toProto(),quorum:s,threshold:n,vetoThreshold:a,minInitialDepositRatio:c,proposalCancelRatio:d,proposalCancelDest:h,expeditedVotingPeriod:g.toProto(),expeditedThreshold:y,expeditedMinDeposit:b.toProto(),burnVoteQuorum:k,burnProposalDepositPrevote:M,burnVoteVeto:T,minDepositRatio:F,emergencyMinDeposit:L.toProto(),emergencyTallyInterval:z.toProto(),lowThresholdFunctions:K,vesting:Z==null?void 0:Z.toProto()})}}class xr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new xr(e,ls.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"gov/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new xr(e,ls.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.gov.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new xr(t.authority,ls.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return ti.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.gov.v1.MsgUpdateParams",value:ti.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return xr.fromProto(ti.MsgUpdateParams.decode(t.value))}}class Fn extends m{constructor(e,r,o){super();p(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new u(o)}static fromAmino(e){const{proposal_id:r,depositor:o,amount:s}=e;return new Fn(Number.parseInt(r),o,u.fromAmino(s))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{proposal_id:e.toString(),depositor:r,amount:o.toAmino()}}static fromData(e){const{proposal_id:r,depositor:o,amount:s}=e;return new Fn(Number.parseInt(r),o,u.fromData(s))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{proposal_id:e.toString(),depositor:r,amount:o.toData()}}static fromProto(e){return new Fn(e.proposalId.toNumber(),e.depositor,u.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Ut.Deposit.fromPartial({proposalId:f.fromNumber(e),depositor:r,amount:o.toProto()})}}class $n extends m{constructor(t,e){super(),this.group_id=t,this.member=e}static fromAmino(t){const{group_id:e,member:r}=t;return new $n(Number.parseInt(e),Bs.fromAmino(r))}toAmino(){const{group_id:t,member:e}=this;return{group_id:t.toString(),member:e.toAmino()}}static fromData(t){const{group_id:e,member:r}=t;return new $n(Number.parseInt(e),Bs.fromData(r))}toData(){const{group_id:t,member:e}=this;return{group_id:t.toString(),member:e.toData()}}static fromProto(t){return new $n(t.groupId.toNumber(),Bs.fromProto(t.member))}toProto(){const{group_id:t,member:e}=this;return I.GroupMember.fromPartial({groupId:f.fromNumber(t),member:e.toProto()})}}class Bs extends m{constructor(t,e,r,o){super(),this.address=t,this.weight=e,this.metadata=r,this.added_at=o}static fromAmino(t){const{address:e,weight:r,metadata:o,added_at:s}=t;return new Bs(e,r,o,new Date(s))}toAmino(){const{address:t,weight:e,metadata:r,added_at:o}=this;return{address:t,weight:e,metadata:r,added_at:o.toISOString()}}static fromData(t){const{address:e,weight:r,metadata:o,added_at:s}=t;return new Bs(e,r,o,new Date(s))}toData(){const{address:t,weight:e,metadata:r,added_at:o}=this;return{address:t,weight:e,metadata:r,added_at:o.toISOString()}}static fromProto(t){return new Bs(t.address,t.weight,t.metadata,t.addedAt)}toProto(){const{address:t,weight:e,metadata:r,added_at:o}=this;return I.Member.fromPartial({address:t,weight:e,metadata:r,addedAt:o})}}class lt extends m{constructor(t,e,r){super(),this.address=t,this.weight=e,this.metadata=r}static fromAmino(t){const{address:e,weight:r,metadata:o}=t;return new lt(e,r,o)}toAmino(){const{address:t,weight:e,metadata:r}=this;return{address:t,weight:e,metadata:r}}static fromData(t){const{address:e,weight:r,metadata:o}=t;return new lt(e,r,o)}toData(){const{address:t,weight:e,metadata:r}=this;return{address:t,weight:e,metadata:r}}static fromProto(t){return new lt(t.address,t.weight,t.metadata)}toProto(){const{address:t,weight:e,metadata:r}=this;return I.MemberRequest.fromPartial({address:t,weight:e,metadata:r})}}class Sr extends m{constructor(t,e,r){super(),this.admin=t,this.members=e,this.metadata=r}static fromAmino(t){const{value:{admin:e,members:r,metadata:o}}=t;return new Sr(e,r.map(lt.fromAmino),o)}toAmino(){const{admin:t,members:e,metadata:r}=this;return{type:"cosmos-sdk/MsgCreateGroup",value:{admin:t,members:e.map(o=>o.toAmino()),metadata:r}}}static fromData(t){const{admin:e,members:r,metadata:o}=t;return new Sr(e,r.map(lt.fromData),o)}toData(){const{admin:t,members:e,metadata:r}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroup",admin:t,members:e.map(o=>o.toData()),metadata:r}}static fromProto(t){return new Sr(t.admin,t.members.map(lt.fromProto),t.metadata)}toProto(){const{admin:t,members:e,metadata:r}=this;return w.MsgCreateGroup.fromPartial({admin:t,members:e.map(o=>o.toProto()),metadata:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroup",value:w.MsgCreateGroup.encode(this.toProto()).finish()})}static unpackAny(t){return Sr.fromProto(w.MsgCreateGroup.decode(t.value))}}class Jt 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:r}=t;return new Jt(D.fromAmino(e),D.fromAmino(r))}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:r}=t;return new Jt(D.fromData(e),D.fromData(r))}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 Jt(D.fromProto(t.votingPeriod),D.fromProto(t.minExecutionPeriod))}toProto(){const{voting_period:t,min_execution_period:e}=this;return I.DecisionPolicyWindows.fromPartial({votingPeriod:t.toProto(),minExecutionPeriod:e.toProto()})}}class Ir extends m{constructor(t,e){super(),this.threshold=t,this.windows=e}static fromAmino(t){const{value:{threshold:e,windows:r}}=t;return new Ir(e,Jt.fromAmino(r))}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:r}=t;return new Ir(e,Jt.fromData(r))}toData(){const{threshold:t,windows:e}=this;return{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy",threshold:t,windows:e.toData()}}static fromProto(t){return new Ir(t.threshold,Jt.fromProto(t.windows))}toProto(){const{threshold:t,windows:e}=this;return I.ThresholdDecisionPolicy.fromPartial({threshold:t,windows:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.ThresholdDecisionPolicy",value:I.ThresholdDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Ir.fromProto(I.ThresholdDecisionPolicy.decode(t.value))}}class Nr extends m{constructor(t,e){super(),this.percentage=t,this.windows=e}static fromAmino(t){const{value:{percentage:e,windows:r}}=t;return new Nr(e,Jt.fromAmino(r))}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:r}=t;return new Nr(e,Jt.fromData(r))}toData(){const{percentage:t,windows:e}=this;return{"@type":"/cosmos.group.v1.PercentageDecisionPolicy",percentage:t,windows:e.toData()}}static fromProto(t){return new Nr(t.percentage,Jt.fromProto(t.windows))}toProto(){const{percentage:t,windows:e}=this;return I.PercentageDecisionPolicy.fromPartial({percentage:t,windows:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.PercentageDecisionPolicy",value:I.PercentageDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Nr.fromProto(I.PercentageDecisionPolicy.decode(t.value))}}exports.DecisionPolicy=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/ThresholdDecisionPolicy":return Ir.fromAmino(o);case"cosmos-sdk/PercentageDecisionPolicy":return Nr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.group.v1.ThresholdDecisionPolicy":return Ir.fromData(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return Nr.fromData(o)}}i.fromData=e;function r(o){const s=o.typeUrl;switch(s){case"/cosmos.group.v1.ThresholdDecisionPolicy":return Ir.unpackAny(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return Nr.unpackAny(o)}throw new Error(`DecisionPolicy type ${s} not recognized`)}i.fromProto=r})(exports.DecisionPolicy||(exports.DecisionPolicy={}));class Cr extends m{constructor(t,e,r,o){super(),this.admin=t,this.group_id=e,this.metadata=r,this.decision_policy=o}static fromAmino(t){const{value:{admin:e,group_id:r,metadata:o,decision_policy:s}}=t;return new Cr(e,Number.parseInt(r),o,exports.DecisionPolicy.fromAmino(s))}toAmino(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return{type:"cosmos-sdk/MsgCreateGroupPolicy",value:{admin:t,group_id:e.toString(),metadata:r,decision_policy:o.toAmino()}}}static fromData(t){const{admin:e,group_id:r,metadata:o,decision_policy:s}=t;return new Cr(e,Number.parseInt(r),o,exports.DecisionPolicy.fromData(s))}toData(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroupPolicy",admin:t,group_id:e.toString(),metadata:r,decision_policy:o.toData()}}static fromProto(t){return new Cr(t.admin,t.groupId.toNumber(),t.metadata,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return w.MsgCreateGroupPolicy.fromPartial({admin:t,groupId:f.fromNumber(e),metadata:r,decisionPolicy:o.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicy",value:w.MsgCreateGroupPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Cr.fromProto(w.MsgCreateGroupPolicy.decode(t.value))}}class Ur extends m{constructor(t,e,r,o,s,n){super(),this.admin=t,this.members=e,this.group_metadata=r,this.group_policy_metadata=o,this.group_policy_as_admin=s,this.decision_policy=n}static fromAmino(t){const{value:{admin:e,members:r,group_metadata:o,group_policy_metadata:s,group_policy_as_admin:n,decision_policy:a}}=t;return new Ur(e,r.map(lt.fromAmino),o,s,n,exports.DecisionPolicy.fromAmino(a))}toAmino(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,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:r,group_policy_metadata:o,group_policy_as_admin:s,decision_policy:n.toAmino()}}}static fromData(t){const{admin:e,members:r,group_metadata:o,group_policy_metadata:s,group_policy_as_admin:n,decision_policy:a}=t;return new Ur(e,r.map(lt.fromData),o,s,n,exports.DecisionPolicy.fromData(a))}toData(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,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:r,group_policy_metadata:o,group_policy_as_admin:s,decision_policy:n.toData()}}static fromProto(t){return new Ur(t.admin,t.members.map(lt.fromProto),t.groupMetadata,t.groupPolicyMetadata,t.groupPolicyAsAdmin,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,group_policy_as_admin:s,decision_policy:n}=this;return w.MsgCreateGroupWithPolicy.fromPartial({admin:t,members:e.map(a=>a.toProto()),groupMetadata:r,groupPolicyMetadata:o,groupPolicyAsAdmin:s,decisionPolicy:n.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicy",value:w.MsgCreateGroupWithPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Ur.fromProto(w.MsgCreateGroupWithPolicy.decode(t.value))}}class Er extends m{constructor(t,e){super(),this.proposal_id=t,this.executor=e}static fromAmino(t){const{value:{proposal_id:e,executor:r}}=t;return new Er(Number.parseInt(e),r)}toAmino(){const{proposal_id:t,executor:e}=this;return{type:"cosmos-sdk/group/MsgExec",value:{proposal_id:t.toString(),executor:e}}}static fromData(t){const{proposal_id:e,executor:r}=t;return new Er(Number.parseInt(e),r)}toData(){const{proposal_id:t,executor:e}=this;return{"@type":"/cosmos.group.v1.MsgExec",proposal_id:t.toString(),executor:e}}static fromProto(t){return new Er(t.proposalId.toNumber(),t.executor)}toProto(){const{proposal_id:t,executor:e}=this;return w.MsgExec.fromPartial({proposalId:f.fromNumber(t),executor:e})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgExec",value:w.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return Er.fromProto(w.MsgExec.decode(t.value))}}class Tt extends m{constructor(t,e,r,o,s){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o,this.exec=s}static fromAmino(t){const{value:{proposal_id:e,voter:r,option:o,metadata:s,exec:n}}=t;return new Tt(Number.parseInt(e),r,I.voteOptionFromJSON(o),s,w.execFromJSON(n))}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:s}=this;return{type:"cosmos-sdk/group/MsgVote",value:{proposal_id:t.toString(),voter:e,option:I.voteOptionToJSON(r),metadata:o,exec:w.execToJSON(s)}}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:s,exec:n}=t;return new Tt(Number.parseInt(e),r,I.voteOptionFromJSON(o),s,w.execFromJSON(n))}toData(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:s}=this;return{"@type":"/cosmos.group.v1.MsgVote",proposal_id:t.toString(),voter:e,option:I.voteOptionToJSON(r),metadata:o,exec:w.execToJSON(s)}}static fromProto(t){return new Tt(t.proposalId.toNumber(),t.voter,t.option,t.metadata,t.exec)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:s}=this;return w.MsgVote.fromPartial({proposalId:f.fromNumber(t),voter:e,option:r,metadata:o,exec:s})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgVote",value:w.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return Tt.fromProto(w.MsgVote.decode(t.value))}}(i=>{i.Option=I.VoteOption,i.Exec=w.Exec})(Tt||(Tt={}));class Br extends m{constructor(t,e){super(),this.address=t,this.group_id=e}static fromAmino(t){const{value:{address:e,group_id:r}}=t;return new Br(e,Number.parseInt(r))}toAmino(){const{address:t,group_id:e}=this;return{type:"cosmos-sdk/group/MsgLeaveGroup",value:{address:t,group_id:e.toString()}}}static fromData(t){const{address:e,group_id:r}=t;return new Br(e,Number.parseInt(r))}toData(){const{address:t,group_id:e}=this;return{"@type":"/cosmos.group.v1.MsgLeaveGroup",address:t,group_id:e.toString()}}static fromProto(t){return new Br(t.address,t.groupId.toNumber())}toProto(){const{address:t,group_id:e}=this;return w.MsgLeaveGroup.fromPartial({address:t,groupId:f.fromNumber(e)})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgLeaveGroup",value:w.MsgLeaveGroup.encode(this.toProto()).finish()})}static unpackAny(t){return Br.fromProto(w.MsgLeaveGroup.decode(t.value))}}class Rt extends m{constructor(t,e,r,o,s,n,a){super(),this.group_policy_address=t,this.proposers=e,this.metadata=r,this.messages=o,this.exec=s,this.title=n,this.summary=a}static fromAmino(t){const{value:{group_policy_address:e,proposers:r,metadata:o,messages:s,exec:n,title:a,summary:c}}=t;return new Rt(e,r,o,s.map(exports.Msg.fromAmino),w.execFromJSON(n),a,c)}toAmino(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:s,title:n,summary:a}=this;return{type:"cosmos-sdk/group/MsgSubmitProposal",value:{group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toAmino()),exec:w.execToJSON(s),title:n,summary:a}}}static fromData(t){const{group_policy_address:e,proposers:r,metadata:o,messages:s,exec:n,title:a,summary:c}=t;return new Rt(e,r,o,s.map(exports.Msg.fromData),w.execFromJSON(n),a,c)}toData(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:s,title:n,summary:a}=this;return{"@type":"/cosmos.group.v1.MsgSubmitProposal",group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toData()),exec:w.execToJSON(s),title:n,summary:a}}static fromProto(t){return new Rt(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:r,messages:o,exec:s,title:n,summary:a}=this;return w.MsgSubmitProposal.fromPartial({groupPolicyAddress:t,proposers:e,metadata:r,messages:o.map(c=>c.packAny()),exec:s,title:n,summary:a})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgSubmitProposal",value:w.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Rt.fromProto(w.MsgSubmitProposal.decode(t.value))}}(i=>{i.Exec=w.Exec})(Rt||(Rt={}));class Or extends m{constructor(t,e,r){super(),this.admin=t,this.group_id=e,this.new_admin=r}static fromAmino(t){const{value:{admin:e,group_id:r,new_admin:o}}=t;return new Or(e,Number.parseInt(r),o)}toAmino(){const{admin:t,group_id:e,new_admin:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupAdmin",value:{admin:t,group_id:e.toString(),new_admin:r}}}static fromData(t){const{admin:e,group_id:r,new_admin:o}=t;return new Or(e,Number.parseInt(r),o)}toData(){const{admin:t,group_id:e,new_admin:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupAdmin",admin:t,group_id:e.toString(),new_admin:r}}static fromProto(t){return new Or(t.admin,t.groupId.toNumber(),t.newAdmin)}toProto(){const{admin:t,group_id:e,new_admin:r}=this;return w.MsgUpdateGroupAdmin.fromPartial({admin:t,groupId:f.fromNumber(e),newAdmin:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdmin",value:w.MsgUpdateGroupAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Or.fromProto(w.MsgUpdateGroupAdmin.decode(t.value))}}class Tr extends m{constructor(t,e,r){super(),this.admin=t,this.group_policy_address=e,this.decision_policy=r}static fromAmino(t){const{value:{admin:e,group_policy_address:r,decision_policy:o}}=t;return new Tr(e,r,exports.DecisionPolicy.fromAmino(o))}toAmino(){const{admin:t,group_policy_address:e,decision_policy:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupDecisionPolicy",value:{admin:t,group_policy_address:e,decision_policy:r.toAmino()}}}static fromData(t){const{admin:e,group_policy_address:r,decision_policy:o}=t;return new Tr(e,r,exports.DecisionPolicy.fromData(o))}toData(){const{admin:t,group_policy_address:e,decision_policy:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",admin:t,group_policy_address:e,decision_policy:r.toData()}}static fromProto(t){return new Tr(t.admin,t.groupPolicyAddress,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_policy_address:e,decision_policy:r}=this;return w.MsgUpdateGroupPolicyDecisionPolicy.fromPartial({admin:t,groupPolicyAddress:e,decisionPolicy:r.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",value:w.MsgUpdateGroupPolicyDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return Tr.fromProto(w.MsgUpdateGroupPolicyDecisionPolicy.decode(t.value))}}class Rr extends m{constructor(t,e,r){super(),this.admin=t,this.group_id=e,this.member_updates=r}static fromAmino(t){const{value:{admin:e,group_id:r,member_updates:o}}=t;return new Rr(e,Number.parseInt(r),o.map(lt.fromAmino))}toAmino(){const{admin:t,group_id:e,member_updates:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupMembers",value:{admin:t,group_id:e.toString(),member_updates:r.map(o=>o.toAmino())}}}static fromData(t){const{admin:e,group_id:r,member_updates:o}=t;return new Rr(e,Number.parseInt(r),o.map(lt.fromData))}toData(){const{admin:t,group_id:e,member_updates:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMembers",admin:t,group_id:e.toString(),member_updates:r.map(o=>o.toData())}}static fromProto(t){return new Rr(t.admin,t.groupId.toNumber(),t.memberUpdates.map(lt.fromProto))}toProto(){const{admin:t,group_id:e,member_updates:r}=this;return w.MsgUpdateGroupMembers.fromPartial({admin:t,groupId:f.fromNumber(e),memberUpdates:r.map(o=>o.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembers",value:w.MsgUpdateGroupMembers.encode(this.toProto()).finish()})}static unpackAny(t){return Rr.fromProto(w.MsgUpdateGroupMembers.decode(t.value))}}class qr extends m{constructor(t,e,r){super(),this.admin=t,this.group_id=e,this.metadata=r}static fromAmino(t){const{value:{admin:e,group_id:r,metadata:o}}=t;return new qr(e,Number.parseInt(r),o)}toAmino(){const{admin:t,group_id:e,metadata:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupMetadata",value:{admin:t,group_id:e.toString(),metadata:r}}}static fromData(t){const{admin:e,group_id:r,metadata:o}=t;return new qr(e,Number.parseInt(r),o)}toData(){const{admin:t,group_id:e,metadata:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMetadata",admin:t,group_id:e.toString(),metadata:r}}static fromProto(t){return new qr(t.admin,t.groupId.toNumber(),t.metadata)}toProto(){const{admin:t,group_id:e,metadata:r}=this;return w.MsgUpdateGroupMetadata.fromPartial({admin:t,groupId:f.fromNumber(e),metadata:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadata",value:w.MsgUpdateGroupMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return qr.fromProto(w.MsgUpdateGroupMetadata.decode(t.value))}}class Fr extends m{constructor(t,e,r){super(),this.admin=t,this.group_policy_address=e,this.new_admin=r}static fromAmino(t){const{value:{admin:e,group_policy_address:r,new_admin:o}}=t;return new Fr(e,r,o)}toAmino(){const{admin:t,group_policy_address:e,new_admin:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupPolicyAdmin",value:{admin:t,group_policy_address:e,new_admin:r}}}static fromData(t){const{admin:e,group_policy_address:r,new_admin:o}=t;return new Fr(e,r,o)}toData(){const{admin:t,group_policy_address:e,new_admin:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",admin:t,group_policy_address:e,new_admin:r}}static fromProto(t){return new Fr(t.admin,t.groupPolicyAddress,t.newAdmin)}toProto(){const{admin:t,group_policy_address:e,new_admin:r}=this;return w.MsgUpdateGroupPolicyAdmin.fromPartial({admin:t,groupPolicyAddress:e,newAdmin:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",value:w.MsgUpdateGroupPolicyAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Fr.fromProto(w.MsgUpdateGroupPolicyAdmin.decode(t.value))}}class $r extends m{constructor(t,e,r){super(),this.admin=t,this.group_policy_address=e,this.metadata=r}static fromAmino(t){const{value:{admin:e,group_policy_address:r,metadata:o}}=t;return new $r(e,r,o)}toAmino(){const{admin:t,group_policy_address:e,metadata:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupPolicyMetadata",value:{admin:t,group_policy_address:e,metadata:r}}}static fromData(t){const{admin:e,group_policy_address:r,metadata:o}=t;return new $r(e,r,o)}toData(){const{admin:t,group_policy_address:e,metadata:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",admin:t,group_policy_address:e,metadata:r}}static fromProto(t){return new $r(t.admin,t.groupPolicyAddress,t.metadata)}toProto(){const{admin:t,group_policy_address:e,metadata:r}=this;return w.MsgUpdateGroupPolicyMetadata.fromPartial({admin:t,groupPolicyAddress:e,metadata:r})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",value:w.MsgUpdateGroupPolicyMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return $r.fromProto(w.MsgUpdateGroupPolicyMetadata.decode(t.value))}}class Lr extends m{constructor(t,e,r,o,s,n){super(),this.id=t,this.admin=e,this.metadata=r,this.version=o,this.total_weight=s,this.created_at=n}static fromAmino(t){const{id:e,admin:r,metadata:o,version:s,total_weight:n,created_at:a}=t;return new Lr(Number.parseInt(e),r,o,Number.parseInt(s),n,new Date(a))}toAmino(){const{id:t,admin:e,metadata:r,version:o,total_weight:s,created_at:n}=this;return{id:t.toString(),admin:e,metadata:r,version:o.toString(),total_weight:s,created_at:n.toISOString()}}static fromData(t){const{id:e,admin:r,metadata:o,version:s,total_weight:n,created_at:a}=t;return new Lr(Number.parseInt(e),r,o,Number.parseInt(s),n,new Date(a))}toData(){const{id:t,admin:e,metadata:r,version:o,total_weight:s,created_at:n}=this;return{id:t.toString(),admin:e,metadata:r,version:o.toString(),total_weight:s,created_at:n.toISOString()}}static fromProto(t){return new Lr(t.id.toNumber(),t.admin,t.metadata,t.version.toNumber(),t.totalWeight,t.createdAt)}toProto(){const{id:t,admin:e,metadata:r,version:o,total_weight:s,created_at:n}=this;return I.GroupInfo.fromPartial({id:f.fromNumber(t),admin:e,metadata:r,version:f.fromNumber(o),totalWeight:s,createdAt:n})}}class Os extends m{constructor(t,e,r,o,s,n,a){super(),this.address=t,this.group_id=e,this.admin=r,this.metadata=o,this.version=s,this.decision_policy=n,this.created_at=a}static fromAmino(t){const{address:e,group_id:r,admin:o,metadata:s,version:n,decision_policy:a,created_at:c}=t;return new Os(e,Number.parseInt(r),o,s,Number.parseInt(n),exports.DecisionPolicy.fromAmino(a),new Date(c))}toAmino(){const{address:t,group_id:e,admin:r,metadata:o,version:s,decision_policy:n,created_at:a}=this;return{address:t,group_id:e.toString(),admin:r,metadata:o,version:s.toString(),decision_policy:n.toAmino(),created_at:a.toISOString()}}static fromData(t){const{address:e,group_id:r,admin:o,metadata:s,version:n,decision_policy:a,created_at:c}=t;return new Os(e,Number.parseInt(r),o,s,Number.parseInt(n),exports.DecisionPolicy.fromData(a),new Date(c))}toData(){const{address:t,group_id:e,admin:r,metadata:o,version:s,decision_policy:n,created_at:a}=this;return{address:t,group_id:e.toString(),admin:r,metadata:o,version:s.toString(),decision_policy:n.toData(),created_at:a.toISOString()}}static fromProto(t){return new Os(t.address,t.groupId.toNumber(),t.admin,t.metadata,t.version.toNumber(),exports.DecisionPolicy.fromProto(t.decisionPolicy),t.createdAt)}toProto(){const{address:t,group_id:e,admin:r,metadata:o,version:s,decision_policy:n,created_at:a}=this;return I.GroupPolicyInfo.fromPartial({address:t,groupId:f.fromNumber(e),admin:r,metadata:o,version:f.fromNumber(s),decisionPolicy:n.packAny(),createdAt:a})}}class ps extends m{constructor(t,e,r,o,s,n,a,c,d,h,g,y,b,k){super(),this.id=t,this.group_policy_address=e,this.metadata=r,this.proposers=o,this.submit_time=s,this.group_version=n,this.group_policy_version=a,this.status=c,this.final_tally_result=d,this.voting_period_end=h,this.executor_result=g,this.messages=y,this.title=b,this.summary=k}static fromAmino(t){const{id:e,group_policy_address:r,metadata:o,proposers:s,submit_time:n,group_version:a,group_policy_version:c,status:d,final_tally_result:h,voting_period_end:g,executor_result:y,messages:b,title:k,summary:M}=t;return new ps(Number.parseInt(e),r,o,s,new Date(n),Number.parseInt(a),Number.parseInt(c),I.proposalStatusFromJSON(d),{yes_count:v(h.yes_count??0).toFixed(0),no_count:v(h.no_count??0).toFixed(0),abstain_count:v(h.abstain_count??0).toFixed(0),no_with_veto_count:v(h.no_with_veto_count??0).toFixed(0)},new Date(g),I.proposalExecutorResultFromJSON(y),b.map(exports.Msg.fromAmino),k,M)}toAmino(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:s,group_version:n,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:h,executor_result:g,messages:y,title:b,summary:k}=this;return{id:t.toString(),group_policy_address:e,metadata:r,proposers:o,submit_time:s.toISOString(),group_version:n.toString(),group_policy_version:a.toString(),status:I.proposalStatusToJSON(c),final_tally_result:{yes_count:v(d.yes_count).toFixed(),no_count:v(d.no_count).toFixed(),abstain_count:v(d.abstain_count).toFixed(),no_with_veto_count:v(d.no_with_veto_count).toFixed()},voting_period_end:h.toISOString(),executor_result:I.proposalExecutorResultToJSON(g),messages:y.map(M=>M.toAmino()),title:b,summary:k}}static fromData(t){const{id:e,group_policy_address:r,metadata:o,proposers:s,submit_time:n,group_version:a,group_policy_version:c,status:d,final_tally_result:h,voting_period_end:g,executor_result:y,messages:b,title:k,summary:M}=t;return new ps(Number.parseInt(e),r,o,s,new Date(n),Number.parseInt(a),Number.parseInt(c),I.proposalStatusFromJSON(d),{yes_count:v(h.yes_count??0).toFixed(0),no_count:v(h.no_count??0).toFixed(0),abstain_count:v(h.abstain_count??0).toFixed(0),no_with_veto_count:v(h.no_with_veto_count??0).toFixed(0)},new Date(g),I.proposalExecutorResultFromJSON(y),b.map(exports.Msg.fromData),k,M)}toData(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:s,group_version:n,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:h,executor_result:g,messages:y,title:b,summary:k}=this;return{id:t.toString(),group_policy_address:e,metadata:r,proposers:o,submit_time:s.toISOString(),group_version:n.toString(),group_policy_version:a.toString(),status:I.proposalStatusToJSON(c),final_tally_result:{yes_count:v(d.yes_count).toFixed(),no_count:v(d.no_count).toFixed(),abstain_count:v(d.abstain_count).toFixed(),no_with_veto_count:v(d.no_with_veto_count).toFixed()},voting_period_end:h.toISOString(),executor_result:I.proposalExecutorResultToJSON(g),messages:y.map(M=>M.toData()),title:b,summary:k}}static fromProto(t){var e,r,o,s;return new ps(t.id.toNumber(),t.groupPolicyAddress,t.metadata,t.proposers,t.submitTime,t.groupVersion.toNumber(),t.groupPolicyVersion.toNumber(),t.status,{yes_count:v(((e=t.finalTallyResult)==null?void 0:e.yesCount)??0).toFixed(0),no_count:v(((r=t.finalTallyResult)==null?void 0:r.noCount)??0).toFixed(0),abstain_count:v(((o=t.finalTallyResult)==null?void 0:o.abstainCount)??0).toFixed(0),no_with_veto_count:v(((s=t.finalTallyResult)==null?void 0:s.noWithVetoCount)??0).toFixed(0)},t.votingPeriodEnd,t.executorResult,t.messages.map(exports.Msg.fromProto),t.title,t.summary)}toProto(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:s,group_version:n,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:h,executor_result:g,messages:y,title:b,summary:k}=this;let M;return d&&(M=I.TallyResult.fromPartial({yesCount:d.yes_count.toString(),noCount:d.no_count.toString(),abstainCount:d.abstain_count.toString(),noWithVetoCount:d.no_with_veto_count.toString()})),I.Proposal.fromPartial({id:f.fromNumber(t),groupPolicyAddress:e,metadata:r,proposers:o,submitTime:s,groupVersion:f.fromNumber(n),groupPolicyVersion:f.fromNumber(a),status:c,finalTallyResult:M,votingPeriodEnd:h,executorResult:g,messages:y.map(T=>T.packAny()),title:b,summary:k})}}(i=>{i.Status=I.ProposalStatus,i.ExecutorResult=I.ProposalExecutorResult})(ps||(ps={}));class re extends m{constructor(t,e,r,o,s){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o,this.submit_time=s}static fromAmino(t){const{proposal_id:e,voter:r,option:o,metadata:s,submit_time:n}=t;return new re(Number.parseInt(e),r,I.voteOptionFromJSON(o),s,new Date(n))}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:s}=this;return{proposal_id:t.toString(),voter:e,option:I.voteOptionToJSON(r),metadata:o,submit_time:s.toISOString()}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:s,submit_time:n}=t;return new re(Number.parseInt(e),r,I.voteOptionFromJSON(o),s,new Date(n))}toData(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:s}=this;return{proposal_id:t.toString(),voter:e,option:I.voteOptionToJSON(r),metadata:o,submit_time:s.toISOString()}}static fromProto(t){return new re(t.proposalId.toNumber(),t.voter,t.option,t.metadata,t.submitTime)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:s}=this;return I.Vote.fromPartial({proposalId:f.fromNumber(t),voter:e,option:r,metadata:o,submitTime:s})}}(i=>{i.Option=I.VoteOption})(re||(re={}));class oe extends m{constructor(e,r,o){super();p(this,"recv_fee");p(this,"ack_fee");p(this,"timeout_fee");this.recv_fee=new u(e),this.ack_fee=new u(r),this.timeout_fee=new u(o)}static fromAmino(e){const{recv_fee:r,ack_fee:o,timeout_fee:s}=e;return new oe(u.fromAmino(r),u.fromAmino(o),u.fromAmino(s))}toAmino(){const{recv_fee:e,ack_fee:r,timeout_fee:o}=this;return{recv_fee:e.toAmino(),ack_fee:r.toAmino(),timeout_fee:o.toAmino()}}static fromData(e){const{recv_fee:r,ack_fee:o,timeout_fee:s}=e;return new oe(u.fromData(r),u.fromData(o),u.fromData(s))}toData(){const{recv_fee:e,ack_fee:r,timeout_fee:o}=this;return{recv_fee:e.toData(),ack_fee:r.toData(),timeout_fee:o.toData()}}static fromProto(e){return new oe(u.fromProto(e.recvFee),u.fromProto(e.ackFee),u.fromProto(e.timeoutFee))}toProto(){const{recv_fee:e,ack_fee:r,timeout_fee:o}=this;return Ci.Fee.fromPartial({recvFee:e.toProto(),ackFee:r.toProto(),timeoutFee:o.toProto()})}}class tn extends m{constructor(t,e,r,o,s){super(),this.fee=t,this.source_port_id=e,this.source_channel_id=r,this.signer=o,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:r,source_channel_id:o,signer:s,relayers:n}=t;return new tn(e?oe.fromData(e):void 0,r,o,s,n)}toData(){const{fee:t,source_port_id:e,source_channel_id:r,signer:o,relayers:s}=this;return{"@type":"/ibc.applications.fee.v1.MsgPayPacketFee",fee:t==null?void 0:t.toData(),source_port_id:e,source_channel_id:r,signer:o,relayers:s}}static fromProto(t){return new tn(t.fee?oe.fromProto(t.fee):void 0,t.sourcePortId,t.sourceChannelId,t.signer,t.relayers)}toProto(){const{fee:t,source_port_id:e,source_channel_id:r,signer:o,relayers:s}=this;return kt.MsgPayPacketFee.fromPartial({fee:t==null?void 0:t.toProto(),sourcePortId:e,sourceChannelId:r,signer:o,relayers:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgPayPacketFee",value:kt.MsgPayPacketFee.encode(this.toProto()).finish()})}static unpackAny(t){return tn.fromProto(kt.MsgPayPacketFee.decode(t.value))}}class se extends m{constructor(t,e,r){super(),this.port_id=t,this.channel_id=e,this.sequence=r}static fromAmino(t){const{port_id:e,channel_id:r,sequence:o}=t;return new se(e,r,Number.parseInt(o))}toAmino(){const{port_id:t,channel_id:e,sequence:r}=this;return{port_id:t,channel_id:e,sequence:r.toFixed()}}static fromData(t){const{port_id:e,channel_id:r,sequence:o}=t;return new se(e,r,Number.parseInt(o))}toData(){const{port_id:t,channel_id:e,sequence:r}=this;return{port_id:t,channel_id:e,sequence:r.toFixed()}}static fromProto(t){return new se(t.portId,t.channelId,t.sequence.toNumber())}toProto(){const{port_id:t,channel_id:e,sequence:r}=this;return ma.PacketId.fromPartial({portId:t,channelId:e,sequence:f.fromNumber(r)})}}class ne extends m{constructor(t,e,r=[]){super(),this.fee=t,this.refund_address=e,this.relayers=r}static fromAmino(t){const{fee:e,refund_address:r,relayers:o}=t;return new ne(e?oe.fromAmino(e):void 0,r,o)}toAmino(){const{fee:t,refund_address:e,relayers:r}=this;return{fee:t==null?void 0:t.toAmino(),refund_address:e,relayers:r}}static fromData(t){const{fee:e,refund_address:r,relayers:o}=t;return new ne(e?oe.fromData(e):void 0,r,o)}toData(){const{fee:t,refund_address:e,relayers:r}=this;return{fee:t==null?void 0:t.toData(),refund_address:e,relayers:r}}static fromProto(t){return new ne(t.fee?oe.fromProto(t.fee):void 0,t.refundAddress,t.relayers)}toProto(){const{fee:t,refund_address:e,relayers:r}=this;return Ci.PacketFee.fromPartial({fee:t==null?void 0:t.toProto(),refundAddress:e,relayers:r})}}class en 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:r}=t;return new en(e?se.fromData(e):void 0,r?ne.fromData(r):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 en(t.packetId?se.fromProto(t.packetId):void 0,t.packetFee?ne.fromProto(t.packetFee):void 0)}toProto(){const{packet_id:t,packet_fee:e}=this;return kt.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:kt.MsgPayPacketFeeAsync.encode(this.toProto()).finish()})}static unpackAny(t){return en.fromProto(kt.MsgPayPacketFeeAsync.decode(t.value))}}class rn extends m{constructor(t,e,r,o){super(),this.port_id=t,this.channel_id=e,this.relayer=r,this.payee=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:r,relayer:o,payee:s}=t;return new rn(e,r,o,s)}toData(){const{port_id:t,channel_id:e,relayer:r,payee:o}=this;return{"@type":"/ibc.applications.fee.v1.MsgRegisterPayee",port_id:t,channel_id:e,relayer:r,payee:o}}static fromProto(t){return new rn(t.portId,t.channelId,t.relayer,t.payee)}toProto(){const{port_id:t,channel_id:e,relayer:r,payee:o}=this;return kt.MsgRegisterPayee.fromPartial({portId:t,channelId:e,relayer:r,payee:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterPayee",value:kt.MsgRegisterPayee.encode(this.toProto()).finish()})}static unpackAny(t){return rn.fromProto(kt.MsgRegisterPayee.decode(t.value))}}class on extends m{constructor(t,e,r,o){super(),this.port_id=t,this.channel_id=e,this.relayer=r,this.counterparty_payee=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:r,relayer:o,counterparty_payee:s}=t;return new on(e,r,o,s)}toData(){const{port_id:t,channel_id:e,relayer:r,counterparty_payee:o}=this;return{"@type":"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",port_id:t,channel_id:e,relayer:r,counterparty_payee:o}}static fromProto(t){return new on(t.portId,t.channelId,t.relayer,t.counterpartyPayee)}toProto(){const{port_id:t,channel_id:e,relayer:r,counterparty_payee:o}=this;return kt.MsgRegisterCounterpartyPayee.fromPartial({portId:t,channelId:e,relayer:r,counterpartyPayee:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",value:kt.MsgRegisterCounterpartyPayee.encode(this.toProto()).finish()})}static unpackAny(t){return on.fromProto(kt.MsgRegisterCounterpartyPayee.decode(t.value))}}class _a extends m{constructor(t,e){super(),this.fee_version=t,this.app_version=e}static fromAmino(t){const{fee_version:e,app_version:r}=t;return new _a(e,r)}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:r}=t;return new _a(e,r)}toData(){const{fee_version:t,app_version:e}=this;return{fee_version:t,app_version:e}}static fromProto(t){return new _a(t.feeVersion,t.appVersion)}toProto(){const{fee_version:t,app_version:e}=this;return Oc.Metadata.fromPartial({feeVersion:t,appVersion:e})}}class va extends m{constructor(t,e=[]){super(),this.packet_id=t,this.packet_fees=e}static fromAmino(t){const{packet_id:e,packet_fees:r}=t;return new va(e?se.fromAmino(e):void 0,r.map(o=>ne.fromAmino(o)))}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:r}=t;return new va(e?se.fromData(e):void 0,r.map(o=>ne.fromData(o)))}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 va(t.packetId?se.fromProto(t.packetId):void 0,t.packetFees.map(e=>ne.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 zr extends m{constructor(t,e,r){super(),this.authority=t,this.address=e,this.allowed=r}static fromAmino(t){const{value:{authority:e,address:r,allowed:o}}=t;return new zr(e,r,o)}toAmino(){const{authority:t,address:e,allowed:r}=this;return{type:"ibchooks/MsgUpdateACL",value:{authority:t,address:e,allowed:r}}}static fromData(t){const{authority:e,address:r,allowed:o}=t;return new zr(e,r,o)}toData(){const{authority:t,address:e,allowed:r}=this;return{"@type":"/initia.ibchooks.v1.MsgUpdateACL",authority:t,address:e,allowed:r}}static fromProto(t){return new zr(t.authority,t.address,t.allowed)}toProto(){const{authority:t,address:e,allowed:r}=this;return Cn.MsgUpdateACL.fromPartial({authority:t,address:e,allowed:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateACL",value:Cn.MsgUpdateACL.encode(this.toProto()).finish()})}static unpackAny(t){return zr.fromProto(Cn.MsgUpdateACL.decode(t.value))}}class hs extends m{constructor(t){super(),this.default_allowed=t}static fromAmino(t){return new hs(t.value.default_allowed)}toAmino(){return{type:"ibc-hooks/Params",value:{default_allowed:this.default_allowed}}}static fromData(t){return new hs(t.default_allowed)}toData(){return{"@type":"/initia.ibchooks.v1.Params",default_allowed:this.default_allowed}}static fromProto(t){return new hs(t.defaultAllowed)}toProto(){return Ui.Params.fromPartial({defaultAllowed:this.default_allowed})}}class Gr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Gr(e,hs.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"ibchooks/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Gr(e,hs.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.ibchooks.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Gr(t.authority,hs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Cn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateParams",value:Cn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Gr.fromProto(Cn.MsgUpdateParams.decode(t.value))}}class sn extends m{constructor(t,e){super(),this.address=t,this.allowed=e}static fromAmino(t){const{address:e,allowed:r}=t;return new sn(e,r)}toAmino(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromData(t){const{address:e,allowed:r}=t;return new sn(e,r)}toData(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromProto(t){return new sn(t.address,t.allowed)}toProto(){const{address:t,allowed:e}=this;return Ui.ACL.fromPartial({address:t,allowed:e})}}class Vr extends m{constructor(e,r,o,s,n,a,c,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(!c&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");this.source_port=e,this.source_channel=r,this.class_id=o,this.token_ids=s,this.sender=n,this.receiver=a,this.timeout_height=c,this.timeout_timestamp=d,this.memo=h}static fromAmino(e){const{value:{source_port:r,source_channel:o,class_id:s,token_ids:n,sender:a,receiver:c,timeout_height:d,timeout_timestamp:h,memo:g}}=e;if(!d&&!h)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Vr(r,o,s,n,a,c,d?A.fromAmino(d):void 0,h,g)}toAmino(){const{source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:c,timeout_timestamp:d,memo:h}=this;return{type:"nft-transfer/MsgTransfer",value:{source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:(c==null?void 0:c.toAmino())??{},timeout_timestamp:d,memo:h}}}static fromData(e){const{source_port:r,source_channel:o,class_id:s,token_ids:n,sender:a,receiver:c,timeout_timestamp:d,timeout_height:h,memo:g}=e;if(!h&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Vr(r,o,s,n,a,c,h?A.fromData(h):void 0,d==="0"?void 0:d,g)}toData(){const{source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:c,timeout_timestamp:d,memo:h}=this;return{"@type":"/ibc.applications.nft_transfer.v1.MsgTransfer",source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:c?c.toData():new A(0,0).toData(),timeout_timestamp:d??"0",memo:h}}static fromProto(e){if(!e.timeoutHeight&&e.timeoutTimestamp.toNumber()==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new Vr(e.sourcePort,e.sourceChannel,e.classId,e.tokenIds,e.sender,e.receiver,e.timeoutHeight?A.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:r,class_id:o,token_ids:s,sender:n,receiver:a,timeout_height:c,timeout_timestamp:d,memo:h}=this;return Un.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,classId:o,tokenIds:s,sender:n,receiver:a,timeoutHeight:c==null?void 0:c.toProto(),timeoutTimestamp:f.fromString(d??"0"),memo:h})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgTransfer",value:Un.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Vr.fromProto(Un.MsgTransfer.decode(e.value))}}class fs extends m{constructor(t,e){super(),this.send_enabled=t,this.receive_enabled=e}static fromAmino(t){const{value:{send_enabled:e,receive_enabled:r}}=t;return new fs(e,r)}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:r}=t;return new fs(e,r)}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 fs(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Ei.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class Kr extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Kr(e,fs.fromAmino(r))}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:r}=t;return new Kr(e,fs.fromData(r))}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 Kr(t.authority,fs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Un.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgUpdateParams",value:Un.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Kr.fromProto(Un.MsgUpdateParams.decode(t.value))}}class ba extends m{constructor(t,e,r,o,s,n,a,c,d){super(),this.class_id=t,this.class_uri=e,this.class_data=r,this.token_ids=o,this.token_uris=s,this.token_data=n,this.sender=a,this.receiver=c,this.memo=d}static fromAmino(t){const{class_id:e,class_uri:r,class_data:o,token_ids:s,token_uris:n,token_data:a,sender:c,receiver:d,memo:h}=t;return new ba(e,r,o,s,n,a,c,d,h)}toAmino(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}=this;return{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}}static fromData(t){const{class_id:e,class_uri:r,class_data:o,token_ids:s,token_uris:n,token_data:a,sender:c,receiver:d,memo:h}=t;return new ba(e,r,o,s,n,a,c,d,h)}toData(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}=this;return{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}}static fromProto(t){return new ba(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:r,token_ids:o,token_uris:s,token_data:n,sender:a,receiver:c,memo:d}=this;return Tc.NonFungibleTokenPacketData.fromPartial({classId:t,classUri:e,classData:r,tokenIds:o,tokenUris:s,tokenData:n,sender:a,receiver:c,memo:d})}}class nn extends m{constructor(t,e){super(),this.path=t,this.base_class_id=e}static fromAmino(t){const{path:e,base_class_id:r}=t;return new nn(e,r)}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:r}=t;return new nn(e,r)}toData(){const{path:t,base_class_id:e}=this;return{path:t,base_class_id:e}}static fromProto(t){return new nn(t.path,t.baseClassId)}toProto(){const{path:t,base_class_id:e}=this;return Ei.ClassTrace.fromPartial({path:t,baseClassId:e})}}class Wr extends m{constructor(t,e,r,o){super(),this.authority=t,this.channel_id=e,this.port_id=r,this.admin=o}static fromAmino(t){const{value:{authority:e,channel_id:r,port_id:o,admin:s}}=t;return new Wr(e,r,o,s)}toAmino(){const{authority:t,channel_id:e,port_id:r,admin:o}=this;return{type:"ibc-perm/MsgUpdateAdmin",value:{authority:t,channel_id:e,port_id:r,admin:o}}}static fromData(t){const{authority:e,channel_id:r,port_id:o,admin:s}=t;return new Wr(e,r,o,s)}toData(){const{authority:t,channel_id:e,port_id:r,admin:o}=this;return{"@type":"/ibc.applications.perm.v1.MsgUpdateAdmin",authority:t,channel_id:e,port_id:r,admin:o}}static fromProto(t){return new Wr(t.authority,t.channelId,t.portId,t.admin)}toProto(){const{authority:t,channel_id:e,port_id:r,admin:o}=this;return En.MsgUpdateAdmin.fromPartial({authority:t,channelId:e,portId:r,admin:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdateAdmin",value:En.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Wr.fromProto(En.MsgUpdateAdmin.decode(t.value))}}class Jr extends m{constructor(t,e,r,o){super(),this.authority=t,this.channel_id=e,this.port_id=r,this.relayers=o}static fromAmino(t){const{value:{authority:e,channel_id:r,port_id:o,relayers:s}}=t;return new Jr(e,r,o,s)}toAmino(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return{type:"ibc-perm/MsgUpdatePermissionedRelayers",value:{authority:t,channel_id:e,port_id:r,relayers:o}}}static fromData(t){const{authority:e,channel_id:r,port_id:o,relayers:s}=t;return new Jr(e,r,o,s)}toData(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return{"@type":"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers",authority:t,channel_id:e,port_id:r,relayers:o}}static fromProto(t){return new Jr(t.authority,t.channelId,t.portId,t.relayers)}toProto(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return En.MsgUpdatePermissionedRelayers.fromPartial({authority:t,channelId:e,portId:r,relayers:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers",value:En.MsgUpdatePermissionedRelayers.encode(this.toProto()).finish()})}static unpackAny(t){return Jr.fromProto(En.MsgUpdatePermissionedRelayers.decode(t.value))}}class Ts extends m{constructor(t,e){super(),this.port_id=t,this.channel_id=e}static fromAmino(t){const{port_id:e,channel_id:r}=t;return new Ts(e,r)}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:r}=t;return new Ts(e,r)}toData(){const{port_id:t,channel_id:e}=this;return{port_id:t,channel_id:e}}static fromProto(t){return new Ts(t.portId,t.channelId)}toProto(){const{port_id:t,channel_id:e}=this;return ma.Counterparty.fromPartial({portId:t,channelId:e})}}class Mt extends m{constructor(t,e,r,o,s){super(),this.state=t,this.ordering=e,this.counterparty=r,this.connection_hops=o,this.version=s}static fromAmino(t){const{state:e,ordering:r,counterparty:o,connection_hops:s,version:n}=t;return new Mt(e,r,o?Ts.fromAmino(o):void 0,s,n)}toAmino(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:s}=this;return{state:t,ordering:e,counterparty:r==null?void 0:r.toAmino(),connection_hops:o,version:s}}static fromData(t){const{state:e,ordering:r,counterparty:o,connection_hops:s,version:n}=t;return new Mt(e,r,o?Ts.fromData(o):void 0,s,n)}toData(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:s}=this;return{state:t,ordering:e,counterparty:r==null?void 0:r.toData(),connection_hops:o,version:s}}static fromProto(t){return new Mt(t.state,t.ordering,t.counterparty?Ts.fromProto(t.counterparty):void 0,t.connectionHops,t.version)}toProto(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:s}=this;return ma.Channel.fromPartial({state:t,ordering:e,counterparty:r==null?void 0:r.toProto(),connectionHops:o,version:s})}}class an extends m{constructor(t,e,r){super(),this.port_id=t,this.channel=e,this.signer=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:r,signer:o}=t;return new an(e,r?Mt.fromData(r):void 0,o)}toData(){const{port_id:t,channel:e,signer:r}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenInit",port_id:t,channel:e==null?void 0:e.toData(),signer:r}}static fromProto(t){return new an(t.portId,t.channel?Mt.fromProto(t.channel):void 0,t.signer)}toProto(){const{port_id:t,channel:e,signer:r}=this;return N.MsgChannelOpenInit.fromPartial({portId:t,channel:e==null?void 0:e.toProto(),signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",value:N.MsgChannelOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return an.fromProto(N.MsgChannelOpenInit.decode(t.value))}}class Rs extends m{constructor(e,r){super();p(this,"height");p(this,"consensus_state");this.height=e,this.consensus_state=r}static fromAmino(e){const{height:r,consensus_state:o}=e;return new Rs(r?A.fromAmino(r):void 0,o)}toAmino(){const{height:e,consensus_state:r}=this;return{height:e==null?void 0:e.toAmino(),consensus_state:r}}static fromData(e){const{height:r,consensus_state:o}=e;return new Rs(r?A.fromData(r):void 0,o)}toData(){const{height:e,consensus_state:r}=this;return{height:e==null?void 0:e.toData(),consensus_state:r}}static fromProto(e){return new Rs(e.height?A.fromProto(e.height):void 0,e.consensusState)}toProto(){const{height:e,consensus_state:r}=this;return Da.ConsensusStateWithHeight.fromPartial({height:e==null?void 0:e.toProto(),consensusState:r})}}class Aa extends m{constructor(t,e){super(),this.client_id=t,this.consensus_states=e}static fromAmino(t){const{client_id:e,consensus_states:r}=t;return new Aa(e,r.map(o=>Rs.fromAmino(o)))}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:r}=t;return new Aa(e,r.map(o=>Rs.fromData(o)))}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 Aa(t.clientId,t.consensusStates.map(e=>Rs.fromProto(e)))}toProto(){const{client_id:t,consensus_states:e}=this;return Da.ClientConsensusStates.fromPartial({clientId:t,consensusStates:e.map(r=>r.toProto())})}}class Ln extends m{constructor(t,e){super(),this.client_id=t,this.client_state=e}static fromAmino(t){const{client_id:e,client_state:r}=t;return new Ln(e,r)}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:r}=t;return new Ln(e,r)}toData(){const{client_id:t,client_state:e}=this;return{client_id:t,client_state:e}}static fromProto(t){return new Ln(t.clientId,t.clientState)}toProto(){const{client_id:t,client_state:e}=this;return Da.IdentifiedClientState.fromPartial({clientId:t,clientState:e})}}class qs extends m{constructor(t){super(),this.allowed_clients=t}static fromAmino(t){const{allowed_clients:e}=t;return new qs(e)}toAmino(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromData(t){const{allowed_clients:e}=t;return new qs(e)}toData(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromProto(t){return new qs(t.allowedClients)}toProto(){const{allowed_clients:t}=this;return Da.Params.fromPartial({allowedClients:t})}}class Fs extends m{constructor(t,e){super(),this.height=t,this.timestamp=e}static fromAmino(t){const{height:e,timestamp:r}=t;return new Fs(A.fromAmino(e),Number.parseInt(r))}toAmino(){const{height:t,timestamp:e}=this;return{height:t.toAmino(),timestamp:e.toString()}}static fromData(t){const{height:e,timestamp:r}=t;return new Fs(A.fromData(e),Number.parseInt(r))}toData(){const{height:t,timestamp:e}=this;return{height:t.toData(),timestamp:e.toString()}}static fromProto(t){return new Fs(A.fromProto(t.height),t.timestamp.toNumber())}toProto(){const{height:t,timestamp:e}=this;return ma.Timeout.fromPartial({height:t.toProto(),timestamp:f.fromNumber(e)})}}class cn extends m{constructor(t){super(),this.upgrade_timeout=t}static fromAmino(t){return new cn(Fs.fromAmino(t.upgrade_timeout))}toAmino(){return{upgrade_timeout:this.upgrade_timeout.toAmino()}}static fromData(t){return new cn(Fs.fromData(t.upgrade_timeout))}toData(){return{upgrade_timeout:this.upgrade_timeout.toData()}}static fromProto(t){return new cn(Fs.fromProto(t.upgradeTimeout))}toProto(){return ma.Params.fromPartial({upgradeTimeout:this.upgrade_timeout.toProto()})}}class yt extends m{constructor(t,e,r,o,s,n,a,c){super(),this.sequence=t,this.source_port=e,this.source_channel=r,this.destination_port=o,this.destination_channel=s,this.data=n,this.timeout_height=a,this.timeout_timestamp=c}static fromAmino(t){const{sequence:e,source_port:r,source_channel:o,destination_port:s,destination_channel:n,data:a,timeout_height:c,timeout_timestamp:d}=t;return new yt(e,r,o,s,n,a,c?A.fromAmino(c):void 0,d)}toAmino(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a==null?void 0:a.toAmino(),timeout_timestamp:c}}static fromData(t){const{sequence:e,source_port:r,source_channel:o,destination_port:s,destination_channel:n,data:a,timeout_height:c,timeout_timestamp:d}=t;return new yt(e,r,o,s,n,a,c?A.fromData(c):void 0,d)}toData(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a==null?void 0:a.toData(),timeout_timestamp:c}}static fromProto(t){return new yt(t.sequence.toNumber(),t.sourcePort,t.sourceChannel,t.destinationPort,t.destinationChannel,Buffer.from(t.data).toString("base64"),t.timeoutHeight?A.fromProto(t.timeoutHeight):void 0,t.timeoutTimestamp.toString())}toProto(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:s,data:n,timeout_height:a,timeout_timestamp:c}=this;return ma.Packet.fromPartial({sequence:f.fromNumber(t),sourcePort:e,sourceChannel:r,destinationPort:o,destinationChannel:s,data:Buffer.from(n,"base64"),timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:f.fromString(c)})}}class $s extends m{constructor(t){super(),this.key_prefix=t}static fromAmino(t){const{key_prefix:e}=t;return new $s(e)}toAmino(){const{key_prefix:t}=this;return{key_prefix:t}}static fromData(t){const{key_prefix:e}=t;return new $s(e)}toData(){const{key_prefix:t}=this;return{key_prefix:t}}static fromProto(t){return new $s(Buffer.from(t.keyPrefix).toString("base64"))}toProto(){const{key_prefix:t}=this;return Bi.MerklePrefix.fromPartial({keyPrefix:Buffer.from(t,"base64")})}}class Oa 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 Oa(t.hash)}toData(){return{hash:this.hash}}static fromProto(t){return new Oa(Buffer.from(t.hash).toString("base64"))}toProto(){return Bi.MerkleRoot.fromPartial({hash:Buffer.from(this.hash,"base64")})}}class xt extends m{constructor(t,e,r){super(),this.client_id=t,this.connection_id=e,this.prefix=r}static fromAmino(t){const{client_id:e,connection_id:r,prefix:o}=t;return new xt(e,r,o?$s.fromAmino(o):void 0)}toAmino(){const{client_id:t,connection_id:e,prefix:r}=this;return{client_id:t,connection_id:e,prefix:r}}static fromData(t){const{client_id:e,connection_id:r,prefix:o}=t;return new xt(e,r,o?$s.fromData(o):void 0)}toData(){const{client_id:t,connection_id:e,prefix:r}=this;return{client_id:t,connection_id:e,prefix:r==null?void 0:r.toData()}}static fromProto(t){return new xt(t.clientId,t.connectionId,t.prefix?$s.fromProto(t.prefix):void 0)}toProto(){const{client_id:t,connection_id:e,prefix:r}=this;return Ct.Counterparty.fromPartial({clientId:t,connectionId:e,prefix:r==null?void 0:r.toProto()})}}class pt extends m{constructor(t,e){super(),this.identifier=t,this.features=e}static fromAmino(t){const{identifier:e,features:r}=t;return new pt(e,r)}toAmino(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromData(t){const{identifier:e,features:r}=t;return new pt(e,r)}toData(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromProto(t){return new pt(t.identifier,t.features)}toProto(){const{identifier:t,features:e}=this;return Ct.Version.fromPartial({identifier:t,features:e})}}class mn extends m{constructor(t,e,r,o,s,n){super(),this.id=t,this.client_id=e,this.versions=r,this.state=o,this.counterparty=s,this.delay_period=n}static fromAmino(t){const{id:e,client_id:r,versions:o,state:s,counterparty:n,delay_period:a}=t;return new mn(e,r,o.map(pt.fromAmino),Ct.stateFromJSON(s),n?xt.fromAmino(n):void 0,Number.parseInt(a))}toAmino(){const{id:t,client_id:e,versions:r,state:o,counterparty:s,delay_period:n}=this;return{id:t,client_id:e,versions:r.map(c=>c.toAmino()),state:Ct.stateToJSON(o),counterparty:s==null?void 0:s.toAmino(),delay_period:n.toFixed()}}static fromData(t){const{id:e,client_id:r,versions:o,state:s,counterparty:n,delay_period:a}=t;return new mn(e,r,o.map(pt.fromData),Ct.stateFromJSON(s),n?xt.fromData(n):void 0,Number.parseInt(a))}toData(){const{id:t,client_id:e,versions:r,state:o,counterparty:s,delay_period:n}=this;return{id:t,client_id:e,versions:r.map(c=>c.toData()),state:Ct.stateToJSON(o),counterparty:s==null?void 0:s.toData(),delay_period:n.toFixed()}}static fromProto(t){return new mn(t.id,t.clientId,t.versions.map(pt.fromProto),t.state,t.counterparty?xt.fromProto(t.counterparty):void 0,t.delayPeriod.toNumber())}toProto(){const{id:t,client_id:e,versions:r,state:o,counterparty:s,delay_period:n}=this;return Ct.IdentifiedConnection.fromPartial({id:t,clientId:e,versions:r.map(a=>a.toProto()),state:o,counterparty:s==null?void 0:s.toProto(),delayPeriod:f.fromNumber(n)})}}class un 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 un(Number.parseInt(e))}toAmino(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toString()}}static fromData(t){const{max_expected_time_per_block:e}=t;return new un(Number.parseInt(e))}toData(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toString()}}static fromProto(t){return new un(t.maxExpectedTimePerBlock.toNumber())}toProto(){const{max_expected_time_per_block:t}=this;return Ct.Params.fromPartial({maxExpectedTimePerBlock:f.fromNumber(t)})}}class dn extends m{constructor(t,e,r,o,s,n,a){super(),this.port_id=t,this.previous_channel_id=e,this.channel=r,this.counterparty_version=o,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:r,channel:o,counterparty_version:s,proof_init:n,proof_height:a,signer:c}=t;return new dn(e,r,o?Mt.fromData(o):void 0,s,n,a?A.fromData(a):void 0,c)}toData(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:s,proof_height:n,signer:a}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenTry",port_id:t,previous_channel_id:e,channel:r==null?void 0:r.toData(),counterparty_version:o,proof_init:s,proof_height:n==null?void 0:n.toData(),signer:a}}static fromProto(t){return new dn(t.portId,t.previousChannelId,t.channel?Mt.fromProto(t.channel):void 0,t.counterpartyVersion,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:s,proof_height:n,signer:a}=this;return N.MsgChannelOpenTry.fromPartial({portId:t,previousChannelId:e,channel:r==null?void 0:r.toProto(),counterpartyVersion:o,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:N.MsgChannelOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return dn.fromProto(N.MsgChannelOpenTry.decode(t.value))}}class ln extends m{constructor(t,e,r,o,s){super(),this.port_id=t,this.channel_id=e,this.proof_ack=r,this.proof_height=o,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:r,proof_ack:o,proof_height:s,signer:n}=t;return new ln(e,r,o,s?A.fromData(s):void 0,n)}toData(){const{port_id:t,channel_id:e,proof_ack:r,proof_height:o,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenConfirm",port_id:t,channel_id:e,proof_ack:r,proof_height:o==null?void 0:o.toData(),signer:s}}static fromProto(t){return new ln(t.portId,t.channelId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_ack:r,proof_height:o,signer:s}=this;return N.MsgChannelOpenConfirm.fromPartial({portId:t,channelId:e,proofAck:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",value:N.MsgChannelOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return ln.fromProto(N.MsgChannelOpenConfirm.decode(t.value))}}class pn extends m{constructor(t,e,r,o,s,n,a){super(),this.port_id=t,this.channel_id=e,this.counterparty_channel_id=r,this.counterparty_version=o,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:r,counterparty_channel_id:o,counterparty_version:s,proof_try:n,proof_height:a,signer:c}=t;return new pn(e,r,o,s,n,a?A.fromData(a):void 0,c)}toData(){const{port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,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:r,counterparty_version:o,proof_try:s,proof_height:n==null?void 0:n.toData(),signer:a}}static fromProto(t){return new pn(t.portId,t.channelId,t.counterpartyChannelId,t.counterpartyVersion,Buffer.from(t.proofTry).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,proof_try:s,proof_height:n,signer:a}=this;return N.MsgChannelOpenAck.fromPartial({portId:t,channelId:e,counterpartyChannelId:r,counterpartyVersion:o,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:N.MsgChannelOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return pn.fromProto(N.MsgChannelOpenAck.decode(t.value))}}class hn extends m{constructor(t,e,r){super(),this.port_id=t,this.channel_id=e,this.signer=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:r,signer:o}=t;return new hn(e,r,o)}toData(){const{port_id:t,channel_id:e,signer:r}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseInit",port_id:t,channel_id:e,signer:r}}static fromProto(t){return new hn(t.portId,t.channelId,t.signer)}toProto(){const{port_id:t,channel_id:e,signer:r}=this;return N.MsgChannelCloseInit.fromPartial({portId:t,channelId:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",value:N.MsgChannelCloseInit.encode(this.toProto()).finish()})}static unpackAny(t){return hn.fromProto(N.MsgChannelCloseInit.decode(t.value))}}class fn extends m{constructor(t,e,r,o,s){super(),this.port_id=t,this.channel_id=e,this.proof_init=r,this.proof_height=o,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:r,proof_init:o,proof_height:s,signer:n}=t;return new fn(e,r,o,s?A.fromData(s):void 0,n)}toData(){const{port_id:t,channel_id:e,proof_init:r,proof_height:o,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelCloseConfirm",port_id:t,channel_id:e,proof_init:r,proof_height:o==null?void 0:o.toData(),signer:s}}static fromProto(t){return new fn(t.portId,t.channelId,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_init:r,proof_height:o,signer:s}=this;return N.MsgChannelCloseConfirm.fromPartial({portId:t,channelId:e,proofInit:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",value:N.MsgChannelCloseConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return fn.fromProto(N.MsgChannelCloseConfirm.decode(t.value))}}class gn extends m{constructor(t,e,r,o){super(),this.packet=t,this.proof_commitment=e,this.proof_height=r,this.signer=o}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{packet:e,proof_commitment:r,proof_height:o,signer:s}=t;return new gn(e?yt.fromData(e):void 0,r,o?A.fromData(o):void 0,s)}toData(){const{packet:t,proof_commitment:e,proof_height:r,signer:o}=this;return{"@type":"/ibc.core.channel.v1.MsgRecvPacket",packet:t==null?void 0:t.toData(),proof_commitment:e,proof_height:r==null?void 0:r.toData(),signer:o}}static fromProto(t){return new gn(t.packet?yt.fromProto(t.packet):void 0,Buffer.from(t.proofCommitment).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,proof_commitment:e,proof_height:r,signer:o}=this;return N.MsgRecvPacket.fromPartial({packet:t==null?void 0:t.toProto(),proofCommitment:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",value:N.MsgRecvPacket.encode(this.toProto()).finish()})}static unpackAny(t){return gn.fromProto(N.MsgRecvPacket.decode(t.value))}}class yn extends m{constructor(t,e,r,o,s){super(),this.packet=t,this.acknowledgement=e,this.proof_acked=r,this.proof_height=o,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:r,proof_acked:o,proof_height:s,signer:n}=t;return new yn(e?yt.fromData(e):void 0,o,r,s?A.fromData(s):void 0,n)}toData(){const{packet:t,acknowledgement:e,proof_acked:r,proof_height:o,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgAcknowledgement",packet:t==null?void 0:t.toData(),acknowledgement:e,proof_acked:r,proof_height:o==null?void 0:o.toData(),signer:s}}static fromProto(t){return new yn(t.packet?yt.fromProto(t.packet):void 0,Buffer.from(t.acknowledgement).toString("base64"),Buffer.from(t.proofAcked).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,acknowledgement:e,proof_acked:r,proof_height:o,signer:s}=this;return N.MsgAcknowledgement.fromPartial({packet:t==null?void 0:t.toProto(),acknowledgement:Buffer.from(e,"base64"),proofAcked:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",value:N.MsgAcknowledgement.encode(this.toProto()).finish()})}static unpackAny(t){return yn.fromProto(N.MsgAcknowledgement.decode(t.value))}}class _n extends m{constructor(t,e,r,o,s){super(),this.packet=t,this.proof_unreceived=e,this.proof_height=r,this.next_sequence_recv=o,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:r,proof_height:o,next_sequence_recv:s,signer:n}=t;return new _n(e?yt.fromData(e):void 0,r,o?A.fromData(o):void 0,Number.parseInt(s),n)}toData(){const{packet:t,proof_unreceived:e,proof_height:r,next_sequence_recv:o,signer:s}=this;return{"@type":"/ibc.core.channel.v1.MsgTimeout",packet:t==null?void 0:t.toData(),proof_unreceived:e,proof_height:r==null?void 0:r.toData(),next_sequence_recv:o.toFixed(),signer:s}}static fromProto(t){return new _n(t.packet?yt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.nextSequenceRecv.toNumber(),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_height:r,next_sequence_recv:o,signer:s}=this;return N.MsgTimeout.fromPartial({packet:t==null?void 0:t.toProto(),proofUnreceived:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),nextSequenceRecv:f.fromNumber(o),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeout",value:N.MsgTimeout.encode(this.toProto()).finish()})}static unpackAny(t){return _n.fromProto(N.MsgTimeout.decode(t.value))}}class vn extends m{constructor(t,e,r,o,s,n){super(),this.packet=t,this.proof_unreceived=e,this.proof_close=r,this.proof_height=o,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:r,proof_close:o,proof_height:s,next_sequence_recv:n,signer:a}=t;return new vn(e?yt.fromData(e):void 0,o,r,s?A.fromData(s):void 0,Number.parseInt(n),a)}toData(){const{packet:t,proof_unreceived:e,proof_close:r,proof_height:o,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:r,proof_height:o==null?void 0:o.toData(),next_sequence_recv:s.toFixed(),signer:n}}static fromProto(t){return new vn(t.packet?yt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),Buffer.from(t.proofClose).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.nextSequenceRecv.toNumber(),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_close:r,proof_height:o,next_sequence_recv:s,signer:n}=this;return N.MsgTimeoutOnClose.fromPartial({packet:t==null?void 0:t.toProto(),proofUnreceived:Buffer.from(e,"base64"),proofClose:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),nextSequenceRecv:f.fromNumber(s),signer:n})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",value:N.MsgTimeoutOnClose.encode(this.toProto()).finish()})}static unpackAny(t){return vn.fromProto(N.MsgTimeoutOnClose.decode(t.value))}}class bn 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:r}=t;return new bn(e,cn.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/ibc.core.channel.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new bn(t.authority,cn.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:"/ibc.core.channel.v1.MsgUpdateParams",value:N.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return bn.fromProto(N.MsgUpdateParams.decode(t.value))}}class zn extends m{constructor(e,r,o){super();p(this,"client_state");p(this,"consensus_state");p(this,"signer");this.client_state=e,this.consensus_state=r,this.signer=o}static fromAmino(e){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(e){const{client_state:r,consensus_state:o,signer:s}=e;return new zn(r,o,s)}toData(){const{client_state:e,consensus_state:r,signer:o}=this;return{"@type":"/ibc.core.client.v1.MsgCreateClient",client_state:e,consensus_state:r,signer:o}}static fromProto(e){return new zn(e.clientState,e.consensusState,e.signer)}toProto(){const{client_state:e,consensus_state:r,signer:o}=this;return J.MsgCreateClient.fromPartial({clientState:e,consensusState:r,signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgCreateClient",value:J.MsgCreateClient.encode(this.toProto()).finish()})}static unpackAny(e){return zn.fromProto(J.MsgCreateClient.decode(e.value))}}class Gn extends m{constructor(t,e,r){super(),this.client_id=t,this.client_message=e,this.signer=r}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:r,signer:o}=t;return new Gn(e,r,o)}toData(){const{client_id:t,client_message:e,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgUpdateClient",client_id:t,client_message:e,signer:r}}static fromProto(t){return new Gn(t.clientId,t.clientMessage,t.signer)}toProto(){const{client_id:t,client_message:e,signer:r}=this;return J.MsgUpdateClient.fromPartial({clientId:t,clientMessage:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateClient",value:J.MsgUpdateClient.encode(this.toProto()).finish()})}static unpackAny(t){return Gn.fromProto(J.MsgUpdateClient.decode(t.value))}}class Vn extends m{constructor(t,e,r,o,s,n){super(),this.client_id=t,this.client_state=e,this.consensus_state=r,this.proof_upgrade_client=o,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:r,consensus_state:o,proof_upgrade_client:s,proof_upgrade_consensus_state:n,signer:a}=t;return new Vn(e,r,o,s,n,a)}toData(){const{client_id:t,client_state:e,consensus_state:r,proof_upgrade_client:o,proof_upgrade_consensus_state:s,signer:n}=this;return{"@type":"/ibc.core.client.v1.MsgUpgradeClient",client_id:t,client_state:e,consensus_state:r,proof_upgrade_client:o,proof_upgrade_consensus_state:s,signer:n}}static fromProto(t){return new Vn(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:r,proof_upgrade_client:o,proof_upgrade_consensus_state:s,signer:n}=this;return J.MsgUpgradeClient.fromPartial({clientId:t,clientState:e,consensusState:r,proofUpgradeClient:Buffer.from(o,"base64"),proofUpgradeConsensusState:Buffer.from(s,"base64"),signer:n})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",value:J.MsgUpgradeClient.encode(this.toProto()).finish()})}static unpackAny(t){return Vn.fromProto(J.MsgUpgradeClient.decode(t.value))}}class Kn extends m{constructor(t,e,r){super(),this.client_id=t,this.misbehaviour=e,this.signer=r}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{client_id:e,misbehaviour:r,signer:o}=t;return new Kn(e,r,o)}toData(){const{client_id:t,misbehaviour:e,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgSubmitMisbehaviour",client_id:t,misbehaviour:e,signer:r}}static fromProto(t){return new Kn(t.clientId,t.misbehaviour,t.signer)}toProto(){const{client_id:t,misbehaviour:e,signer:r}=this;return J.MsgSubmitMisbehaviour.fromPartial({clientId:t,misbehaviour:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",value:J.MsgSubmitMisbehaviour.encode(this.toProto()).finish()})}static unpackAny(t){return Kn.fromProto(J.MsgSubmitMisbehaviour.decode(t.value))}}class Wn extends m{constructor(t,e,r){super(),this.subject_client_id=t,this.substitute_client_id=e,this.signer=r}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:r,signer:o}=t;return new Wn(e,r,o)}toData(){const{subject_client_id:t,substitute_client_id:e,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgRecoverClient",subject_client_id:t,substitute_client_id:e,signer:r}}static fromProto(t){return new Wn(t.subjectClientId,t.substituteClientId,t.signer)}toProto(){const{subject_client_id:t,substitute_client_id:e,signer:r}=this;return J.MsgRecoverClient.fromPartial({subjectClientId:t,substituteClientId:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgRecoverClient",value:J.MsgRecoverClient.encode(this.toProto()).finish()})}static unpackAny(t){return Wn.fromProto(J.MsgRecoverClient.decode(t.value))}}class Ht extends m{constructor(t,e,r){super(),this.name=t,this.height=e,this.info=r}static fromAmino(t){const{name:e,height:r,info:o}=t;return new Ht(e,Number.parseInt(r),o)}toAmino(){const{name:t,height:e,info:r}=this;return{name:t,height:e.toString(),info:r}}static fromData(t){const{name:e,height:r,info:o}=t;return new Ht(e,Number.parseInt(r),o)}toData(){const{name:t,height:e,info:r}=this;return{name:t,height:e.toString(),info:r}}static fromProto(t){return new Ht(t.name,t.height.toNumber(),t.info)}toProto(){const{name:t,height:e,info:r}=this;return Rc.Plan.fromPartial({name:t,height:f.fromNumber(e),info:r})}}class Hr extends m{constructor(t,e){super(),this.authority=t,this.plan=e}static fromAmino(t){const{value:{authority:e,plan:r}}=t;return new Hr(e,Ht.fromAmino(r))}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:r}=t;return new Hr(e,Ht.fromData(r))}toData(){const{authority:t,plan:e}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",authority:t,plan:e.toData()}}static fromProto(t){return new Hr(t.authority,Ht.fromProto(t.plan))}toProto(){const{authority:t,plan:e}=this;return Bn.MsgSoftwareUpgrade.fromPartial({authority:t,plan:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",value:Bn.MsgSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Hr.fromProto(Bn.MsgSoftwareUpgrade.decode(t.value))}}class jr extends m{constructor(t){super(),this.authority=t}static fromAmino(t){const{value:{authority:e}}=t;return new jr(e)}toAmino(){const{authority:t}=this;return{type:"cosmos-sdk/MsgCancelUpgrade",value:{authority:t}}}static fromData(t){const{authority:e}=t;return new jr(e)}toData(){const{authority:t}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",authority:t}}static fromProto(t){return new jr(t.authority)}toProto(){const{authority:t}=this;return Bn.MsgCancelUpgrade.fromPartial({authority:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",value:Bn.MsgCancelUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return jr.fromProto(Bn.MsgCancelUpgrade.decode(t.value))}}class Jn extends m{constructor(t,e,r){super(),this.plan=t,this.upgraded_client_state=e,this.signer=r}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:r,signer:o}=t;return new Jn(Ht.fromData(e),r,o)}toData(){const{plan:t,upgraded_client_state:e,signer:r}=this;return{"@type":"/ibc.core.client.v1.MsgIBCSoftwareUpgrade",plan:t.toData(),upgraded_client_state:e,signer:r}}static fromProto(t){return new Jn(Ht.fromProto(t.plan),t.upgradedClientState,t.signer)}toProto(){const{plan:t,upgraded_client_state:e,signer:r}=this;return J.MsgIBCSoftwareUpgrade.fromPartial({plan:t.toProto(),upgradedClientState:e,signer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgIBCSoftwareUpgrade",value:J.MsgIBCSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Jn.fromProto(J.MsgIBCSoftwareUpgrade.decode(t.value))}}class Hn 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:r}=t;return new Hn(e,qs.fromData(r))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.core.client.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new Hn(t.signer,qs.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return J.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateParams",value:J.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Hn.fromProto(J.MsgUpdateParams.decode(t.value))}}class jn extends m{constructor(t,e,r,o,s){super(),this.client_id=t,this.counterparty=e,this.version=r,this.delay_period=o,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:r,version:o,delay_period:s,signer:n}=t;return new jn(e,xt.fromData(r),o?pt.fromData(o):void 0,Number.parseInt(s),n)}toData(){const{client_id:t,counterparty:e,version:r,delay_period:o,signer:s}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenInit",client_id:t,counterparty:e.toData(),version:r==null?void 0:r.toData(),delay_period:o.toFixed(),signer:s}}static fromProto(t){return new jn(t.clientId,xt.fromProto(t.counterparty),t.version?pt.fromProto(t.version):void 0,t.delayPeriod.toNumber(),t.signer)}toProto(){const{client_id:t,counterparty:e,version:r,delay_period:o,signer:s}=this;return at.MsgConnectionOpenInit.fromPartial({clientId:t,counterparty:e.toProto(),version:r==null?void 0:r.toProto(),delayPeriod:f.fromNumber(o),signer:s})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",value:at.MsgConnectionOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return jn.fromProto(at.MsgConnectionOpenInit.decode(t.value))}}class Yn extends m{constructor(t,e,r,o,s,n,a,c,d,h,g){super(),this.client_id=t,this.client_state=e,this.counterparty=r,this.delay_period=o,this.counterparty_versions=s,this.proof_height=n,this.proof_init=a,this.proof_client=c,this.proof_consensus=d,this.consensus_height=h,this.signer=g}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:r,counterparty:o,delay_period:s,counterparty_versions:n,proof_height:a,proof_init:c,proof_client:d,proof_consensus:h,consensus_height:g,signer:y}=t;return new Yn(e,r,o?xt.fromData(o):void 0,Number.parseInt(s),n.map(b=>pt.fromData(b)),a?A.fromData(a):void 0,Buffer.from(c).toString("base64"),Buffer.from(d).toString("base64"),Buffer.from(h).toString("base64"),g?A.fromData(g):void 0,y)}toData(){const{client_id:t,client_state:e,counterparty:r,delay_period:o,counterparty_versions:s,proof_height:n,proof_init:a,proof_client:c,proof_consensus:d,consensus_height:h,signer:g}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenTry",client_id:t,client_state:e,counterparty:r==null?void 0:r.toData(),delay_period:o.toFixed(),counterparty_versions:s.map(y=>y.toData()),proof_height:n==null?void 0:n.toData(),proof_init:a,proof_client:c,proof_consensus:d,consensus_height:h==null?void 0:h.toData(),signer:g}}static fromProto(t){return new Yn(t.clientId,t.clientState,t.counterparty?xt.fromProto(t.counterparty):void 0,t.delayPeriod.toNumber(),t.counterpartyVersions.map(e=>pt.fromProto(e)),t.proofHeight?A.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?A.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{client_id:t,client_state:e,counterparty:r,delay_period:o,counterparty_versions:s,proof_height:n,proof_init:a,proof_client:c,proof_consensus:d,consensus_height:h,signer:g}=this;return at.MsgConnectionOpenTry.fromPartial({clientId:t,clientState:e,counterparty:r==null?void 0:r.toProto(),delayPeriod:f.fromNumber(o),counterpartyVersions:s.map(y=>y.toProto()),proofHeight:n==null?void 0:n.toProto(),proofInit:Buffer.from(a,"base64"),proofClient:Buffer.from(c,"base64"),proofConsensus:Buffer.from(d,"base64"),consensusHeight:h==null?void 0:h.toProto(),signer:g})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",value:at.MsgConnectionOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return Yn.fromProto(at.MsgConnectionOpenTry.decode(t.value))}}class Qn extends m{constructor(t,e,r,o){super(),this.connection_id=t,this.proof_ack=e,this.proof_height=r,this.signer=o}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:r,proof_height:o,signer:s}=t;return new Qn(e,r,o?A.fromData(o):void 0,s)}toData(){const{connection_id:t,proof_ack:e,proof_height:r,signer:o}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenConfirm",connection_id:t,proof_ack:e,proof_height:r==null?void 0:r.toData(),signer:o}}static fromProto(t){return new Qn(t.connectionId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?A.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{connection_id:t,proof_ack:e,proof_height:r,signer:o}=this;return at.MsgConnectionOpenConfirm.fromPartial({connectionId:t,proofAck:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:o})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",value:at.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return Qn.fromProto(at.MsgConnectionOpenConfirm.decode(t.value))}}class Zn extends m{constructor(t,e,r,o,s,n,a,c,d,h){super(),this.connection_id=t,this.counterparty_connection_id=e,this.version=r,this.client_state=o,this.proof_height=s,this.proof_try=n,this.proof_client=a,this.proof_consensus=c,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:r,version:o,client_state:s,proof_height:n,proof_try:a,proof_client:c,proof_consensus:d,consensus_height:h,signer:g}=t;return new Zn(e,r,o?pt.fromData(o):void 0,s,n?A.fromData(n):void 0,a,c,d,h?A.fromData(h):void 0,g)}toData(){const{connection_id:t,counterparty_connection_id:e,version:r,client_state:o,proof_height:s,proof_try:n,proof_client:a,proof_consensus:c,consensus_height:d,signer:h}=this;return{"@type":"/ibc.core.connection.v1.MsgConnectionOpenAck",connection_id:t,counterparty_connection_id:e,version:r==null?void 0:r.toData(),client_state:o,proof_height:s==null?void 0:s.toData(),proof_try:n,proof_client:a,proof_consensus:c,consensus_height:d==null?void 0:d.toData(),signer:h}}static fromProto(t){return new Zn(t.connectionId,t.counterpartyConnectionId,t.version?pt.fromProto(t.version):void 0,t.clientState,t.proofHeight?A.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?A.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{connection_id:t,counterparty_connection_id:e,version:r,client_state:o,proof_height:s,proof_try:n,proof_client:a,proof_consensus:c,consensus_height:d,signer:h}=this;return at.MsgConnectionOpenAck.fromPartial({connectionId:t,counterpartyConnectionId:e,version:r==null?void 0:r.toProto(),clientState:o,proofHeight:s==null?void 0:s.toProto(),proofTry:Buffer.from(n,"base64"),proofClient:Buffer.from(a,"base64"),proofConsensus:Buffer.from(c,"base64"),consensusHeight:d==null?void 0:d.toProto(),signer:h})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",value:at.MsgConnectionOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return Zn.fromProto(at.MsgConnectionOpenAck.decode(t.value))}}class Xn 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:r}=t;return new Xn(e,un.fromData(r))}toData(){const{signer:t,params:e}=this;return{"@type":"/ibc.core.connection.v1.MsgUpdateParams",signer:t,params:e.toData()}}static fromProto(t){return new Xn(t.signer,un.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return at.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgUpdateParams",value:at.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Xn.fromProto(at.MsgUpdateParams.decode(t.value))}}class Yr extends m{constructor(t,e,r,o){super(),this.owner=t,this.connection_id=e,this.version=r,this.ordering=o}static fromAmino(t){const{value:{owner:e,connection_id:r,version:o,ordering:s}}=t;return new Yr(e,r,o,s)}toAmino(){const{owner:t,connection_id:e,version:r,ordering:o}=this;return{type:"intertx/MsgRegisterAccount",value:{owner:t,connection_id:e,version:r,ordering:o}}}static fromData(t){const{owner:e,connection_id:r,version:o,ordering:s}=t;return new Yr(e,r,o,s)}toData(){const{owner:t,connection_id:e,version:r,ordering:o}=this;return{"@type":"/initia.intertx.v1.MsgRegisterAccount",owner:t,connection_id:e,version:r,ordering:o}}static fromProto(t){return new Yr(t.owner,t.connectionId,t.version,t.ordering)}toProto(){const{owner:t,connection_id:e,version:r,ordering:o}=this;return On.MsgRegisterAccount.fromPartial({owner:t,connectionId:e,version:r,ordering:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgRegisterAccount",value:On.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Yr.fromProto(On.MsgRegisterAccount.decode(t.value))}}class Qr extends m{constructor(t,e,r){super(),this.owner=t,this.connection_id=e,this.msg=r}static fromAmino(t){const{value:{owner:e,connection_id:r,msg:o}}=t;return new Qr(e,r,o?exports.Msg.fromAmino(o):void 0)}toAmino(){const{owner:t,connection_id:e,msg:r}=this;return{type:"intertx/MsgSubmitTx",value:{owner:t,connection_id:e,msg:r==null?void 0:r.toAmino()}}}static fromData(t){const{owner:e,connection_id:r,msg:o}=t;return new Qr(e,r,o?exports.Msg.fromData(o):void 0)}toData(){const{owner:t,connection_id:e,msg:r}=this;return{"@type":"/initia.intertx.v1.MsgSubmitTx",owner:t,connection_id:e,msg:r==null?void 0:r.toData()}}static fromProto(t){return new Qr(t.owner,t.connectionId,t.msg?exports.Msg.fromProto(t.msg):void 0)}toProto(){const{owner:t,connection_id:e,msg:r}=this;return On.MsgSubmitTx.fromPartial({owner:t,connectionId:e,msg:r==null?void 0:r.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgSubmitTx",value:On.MsgSubmitTx.encode(this.toProto()).finish()})}static unpackAny(t){return Qr.fromProto(On.MsgSubmitTx.decode(t.value))}}class ct extends m{constructor(t,e){super(),this.Base=t,this.Quote=e}toString(){return`${this.Base}/${this.Quote}`}static fromAmino(t){return new ct(t.Base,t.Quote)}toAmino(){return{Base:this.Base,Quote:this.Quote}}static fromData(t){return new ct(t.Base,t.Quote)}toData(){return{Base:this.Base,Quote:this.Quote}}static fromProto(t){return new ct(t.Base,t.Quote)}toProto(){return qc.CurrencyPair.fromPartial({Base:this.Base,Quote:this.Quote})}}class Zr extends m{constructor(t,e){super(),this.authority=t,this.currency_pairs=e}static fromAmino(t){const{value:{authority:e,currency_pairs:r}}=t;return new Zr(e,r.map(ct.fromAmino))}toAmino(){const{authority:t,currency_pairs:e}=this;return{type:"connect/x/oracle/MsgAddCurrencyPairs",value:{authority:t,currency_pairs:e.map(r=>r.toAmino())}}}static fromData(t){const{authority:e,currency_pairs:r}=t;return new Zr(e,r.map(ct.fromData))}toData(){const{authority:t,currency_pairs:e}=this;return{"@type":"/connect.oracle.v2.MsgAddCurrencyPairs",authority:t,currency_pairs:e.map(r=>r.toData())}}static fromProto(t){return new Zr(t.authority,t.currencyPairs.map(ct.fromProto))}toProto(){const{authority:t,currency_pairs:e}=this;return Tn.MsgAddCurrencyPairs.fromPartial({authority:t,currencyPairs:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgAddCurrencyPairs",value:Tn.MsgAddCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Zr.fromProto(Tn.MsgAddCurrencyPairs.decode(t.value))}}class Xr extends m{constructor(t,e){super(),this.authority=t,this.currency_pair_ids=e}static fromAmino(t){const{value:{authority:e,currency_pair_ids:r}}=t;return new Xr(e,r)}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:r}=t;return new Xr(e,r)}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 Xr(t.authority,t.currencyPairIds)}toProto(){const{authority:t,currency_pair_ids:e}=this;return Tn.MsgRemoveCurrencyPairs.fromPartial({authority:t,currencyPairIds:e})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgRemoveCurrencyPairs",value:Tn.MsgRemoveCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Xr.fromProto(Tn.MsgRemoveCurrencyPairs.decode(t.value))}}class ta extends m{constructor(t,e,r){super(),this.price=t,this.block_timestamp=e,this.block_height=r}static fromAmino(t){const{price:e,block_timestamp:r,block_height:o}=t;return new ta(e,new Date(r),Number.parseInt(o))}toAmino(){const{price:t,block_timestamp:e,block_height:r}=this;return{price:t,block_timestamp:e.toISOString(),block_height:r.toString()}}static fromData(t){const{price:e,block_timestamp:r,block_height:o}=t;return new ta(e,new Date(r),Number.parseInt(o))}toData(){const{price:t,block_timestamp:e,block_height:r}=this;return{price:t,block_timestamp:e.toISOString(),block_height:r.toString()}}static fromProto(t){return new ta(t.price,t.blockTimestamp,t.blockHeight.toNumber())}toProto(){const{price:t,block_timestamp:e,block_height:r}=this;return Fc.QuotePrice.fromPartial({price:t,blockTimestamp:e,blockHeight:f.fromNumber(r)})}}class Ls extends m{constructor(t,e,r,o,s){super(),this.name=t,this.off_chain_ticker=e,this.normalize_by_pair=r,this.invert=o,this.metadata_JSON=s}static fromAmino(t){const{name:e,off_chain_ticker:r,normalize_by_pair:o,invert:s,metadata_JSON:n}=t;return new Ls(e,r,o?ct.fromAmino(o):void 0,s,n)}toAmino(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:s}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:r==null?void 0:r.toAmino(),invert:o,metadata_JSON:s}}static fromData(t){const{name:e,off_chain_ticker:r,normalize_by_pair:o,invert:s,metadata_JSON:n}=t;return new Ls(e,r,o?ct.fromData(o):void 0,s,n)}toData(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:s}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:r==null?void 0:r.toData(),invert:o,metadata_JSON:s}}static fromProto(t){return new Ls(t.name,t.offChainTicker,t.normalizeByPair?ct.fromProto(t.normalizeByPair):void 0,t.invert,t.metadataJSON)}toProto(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:s}=this;return ii.ProviderConfig.fromPartial({name:t,offChainTicker:e,normalizeByPair:r==null?void 0:r.toProto(),invert:o,metadataJSON:s})}}class zs extends m{constructor(t,e,r,o,s){super(),this.currency_pair=t,this.decimals=e,this.min_provider_count=r,this.enabled=o,this.metadata_JSON=s}static fromAmino(t){const{currency_pair:e,decimals:r,min_provider_count:o,enabled:s,metadata_JSON:n}=t;return new zs(ct.fromAmino(e),Number.parseInt(r),Number.parseInt(o),s,n)}toAmino(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:s}=this;return{currency_pair:t.toAmino(),decimals:e.toString(),min_provider_count:r.toString(),enabled:o,metadata_JSON:s}}static fromData(t){const{currency_pair:e,decimals:r,min_provider_count:o,enabled:s,metadata_JSON:n}=t;return new zs(ct.fromData(e),Number.parseInt(r),Number.parseInt(o),s,n)}toData(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:s}=this;return{currency_pair:t.toData(),decimals:e.toString(),min_provider_count:r.toString(),enabled:o,metadata_JSON:s}}static fromProto(t){return new zs(ct.fromProto(t.currencyPair),t.decimals.toNumber(),t.minProviderCount.toNumber(),t.enabled,t.metadataJSON)}toProto(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:s}=this;return ii.Ticker.fromPartial({currencyPair:t,decimals:f.fromNumber(e),minProviderCount:f.fromNumber(r),enabled:o,metadataJSON:s})}}class et extends m{constructor(t,e){super(),this.ticker=t,this.provider_configs=e}static fromAmino(t){const{ticker:e,provider_configs:r}=t;return new et(zs.fromAmino(e),r.map(Ls.fromAmino))}toAmino(){const{ticker:t,provider_configs:e}=this;return{ticker:t.toAmino(),provider_configs:e.map(r=>r.toAmino())}}static fromData(t){const{ticker:e,provider_configs:r}=t;return new et(zs.fromData(e),r.map(Ls.fromData))}toData(){const{ticker:t,provider_configs:e}=this;return{ticker:t.toData(),provider_configs:e.map(r=>r.toData())}}static fromProto(t){return new et(zs.fromProto(t.ticker),t.providerConfigs.map(Ls.fromProto))}toProto(){const{ticker:t,provider_configs:e}=this;return ii.Market.fromPartial({ticker:t.toProto(),providerConfigs:e.map(r=>r.toProto())})}}class to extends m{constructor(t,e){super(),this.authority=t,this.create_markets=e}static fromAmino(t){const{value:{authority:e,create_markets:r}}=t;return new to(e,r.map(et.fromAmino))}toAmino(){const{authority:t,create_markets:e}=this;return{type:"connect/x/marketmap/MsgCreateMarkets",value:{authority:t,create_markets:e.map(r=>r.toAmino())}}}static fromData(t){const{authority:e,create_markets:r}=t;return new to(e,r.map(et.fromData))}toData(){const{authority:t,create_markets:e}=this;return{"@type":"/connect.marketmap.v2.MsgCreateMarkets",authority:t,create_markets:e.map(r=>r.toData())}}static fromProto(t){return new to(t.authority,t.createMarkets.map(et.fromProto))}toProto(){const{authority:t,create_markets:e}=this;return it.MsgCreateMarkets.fromPartial({authority:t,createMarkets:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgCreateMarkets",value:it.MsgCreateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return to.fromProto(it.MsgCreateMarkets.decode(t.value))}}class eo extends m{constructor(t,e){super(),this.authority=t,this.update_markets=e}static fromAmino(t){const{value:{authority:e,update_markets:r}}=t;return new eo(e,r.map(et.fromAmino))}toAmino(){const{authority:t,update_markets:e}=this;return{type:"connect/x/marketmap/MsgUpdateMarkets",value:{authority:t,update_markets:e.map(r=>r.toAmino())}}}static fromData(t){const{authority:e,update_markets:r}=t;return new eo(e,r.map(et.fromData))}toData(){const{authority:t,update_markets:e}=this;return{"@type":"/connect.marketmap.v2.MsgUpdateMarkets",authority:t,update_markets:e.map(r=>r.toData())}}static fromProto(t){return new eo(t.authority,t.updateMarkets.map(et.fromProto))}toProto(){const{authority:t,update_markets:e}=this;return it.MsgUpdateMarkets.fromPartial({authority:t,updateMarkets:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpdateMarkets",value:it.MsgUpdateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return eo.fromProto(it.MsgUpdateMarkets.decode(t.value))}}class ro extends m{constructor(t,e){super(),this.authority=t,this.markets=e}static fromAmino(t){const{value:{authority:e,markets:r}}=t;return new ro(e,r.map(et.fromAmino))}toAmino(){const{authority:t,markets:e}=this;return{type:"connect/x/marketmap/MsgUpsertMarkets",value:{authority:t,markets:e.map(r=>r.toAmino())}}}static fromData(t){const{authority:e,markets:r}=t;return new ro(e,r.map(et.fromData))}toData(){const{authority:t,markets:e}=this;return{"@type":"/connect.marketmap.v2.MsgUpsertMarkets",authority:t,markets:e.map(r=>r.toData())}}static fromProto(t){return new ro(t.authority,t.markets.map(et.fromProto))}toProto(){const{authority:t,markets:e}=this;return it.MsgUpsertMarkets.fromPartial({authority:t,markets:e.map(r=>r.toProto())})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpsertMarkets",value:it.MsgUpsertMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return ro.fromProto(it.MsgUpsertMarkets.decode(t.value))}}class oo extends m{constructor(t,e){super(),this.remove_addresses=t,this.admin=e}static fromAmino(t){const{value:{remove_addresses:e,admin:r}}=t;return new oo(e,r)}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:r}=t;return new oo(e,r)}toData(){const{remove_addresses:t,admin:e}=this;return{"@type":"/connect.marketmap.v2.MsgRemoveMarketAuthorities",remove_addresses:t,admin:e}}static fromProto(t){return new oo(t.removeAddresses,t.admin)}toProto(){const{remove_addresses:t,admin:e}=this;return it.MsgRemoveMarketAuthorities.fromPartial({removeAddresses:t,admin:e})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgRemoveMarketAuthorities",value:it.MsgRemoveMarketAuthorities.encode(this.toProto()).finish()})}static unpackAny(t){return oo.fromProto(it.MsgRemoveMarketAuthorities.decode(t.value))}}class gs extends m{constructor(t,e){super(),this.market_authorities=t,this.admin=e}static fromAmino(t){return new gs(t.market_authorities,t.admin)}toAmino(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromData(t){return new gs(t.market_authorities,t.admin)}toData(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromProto(t){return new gs(t.marketAuthorities,t.admin)}toProto(){const{market_authorities:t,admin:e}=this;return $c.Params.fromPartial({marketAuthorities:t,admin:e})}}class so extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new so(e,gs.fromAmino(r))}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:r}=t;return new so(e,gs.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/connect.marketmap.v2.MsgParams",authority:t,params:e.toData()}}static fromProto(t){return new so(t.authority,gs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return it.MsgParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgParams",value:it.MsgParams.encode(this.toProto()).finish()})}static unpackAny(t){return so.fromProto(it.MsgParams.decode(t.value))}}class qt extends m{constructor(t,e,r){super(),this.sender=t,this.code_bytes=e,this.upgrade_policy=r}static fromAmino(t){const{value:{sender:e,code_bytes:r,upgrade_policy:o}}=t;return new qt(e,r,o||0)}toAmino(){const{sender:t,code_bytes:e,upgrade_policy:r}=this;return{type:"move/MsgPublish",value:{sender:t,code_bytes:e,upgrade_policy:r===ca.UpgradePolicy.UNSPECIFIED?void 0:r}}}static fromProto(t){return new qt(t.sender,t.codeBytes.map(e=>Buffer.from(e).toString("base64")),t.upgradePolicy)}toProto(){const{sender:t,code_bytes:e,upgrade_policy:r}=this;return x.MsgPublish.fromPartial({sender:t,codeBytes:e.map(o=>Buffer.from(o,"base64")),upgradePolicy:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgPublish",value:x.MsgPublish.encode(this.toProto()).finish()})}static unpackAny(t){return qt.fromProto(x.MsgPublish.decode(t.value))}static fromData(t){const{sender:e,code_bytes:r,upgrade_policy:o}=t;return new qt(e,r,o)}toData(){const{sender:t,code_bytes:e,upgrade_policy:r}=this;return{"@type":"/initia.move.v1.MsgPublish",sender:t,code_bytes:e,upgrade_policy:r}}}(i=>{i.Policy=ca.UpgradePolicy})(qt||(qt={}));class no extends m{constructor(e,r,o,s,n=[],a=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.module_address=r,this.module_name=o,this.function_name=s,this.type_args=n,this.args=a}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}}=e;return new no(r,o,s,n,a??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return{type:"move/MsgExecute",value:{sender:e,module_address:r,module_name:o,function_name:s,type_args:n.length===0?void 0:n,args:a.length===0?void 0:a}}}static fromProto(e){return new no(e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args.map(r=>Buffer.from(r).toString("base64")))}toProto(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return x.MsgExecute.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:s,typeArgs:n,args:a.map(c=>Buffer.from(c,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecute",value:x.MsgExecute.encode(this.toProto()).finish()})}static unpackAny(e){return no.fromProto(x.MsgExecute.decode(e.value))}static fromData(e){const{sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=e;return new no(r,o,s,n,a,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return{"@type":"/initia.move.v1.MsgExecute",sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}}}class ao extends m{constructor(e,r,o,s,n=[],a=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.module_address=r,this.module_name=o,this.function_name=s,this.type_args=n,this.args=a}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}}=e;return new ao(r,o,s,n,a??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return{type:"move/MsgExecuteJSON",value:{sender:e,module_address:r,module_name:o,function_name:s,type_args:n.length===0?void 0:n,args:a.length===0?void 0:a}}}static fromData(e){const{sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=e;return new ao(r,o,s,n,a,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return{"@type":"/initia.move.v1.MsgExecuteJSON",sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}}static fromProto(e){return new ao(e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args)}toProto(){const{sender:e,module_address:r,module_name:o,function_name:s,type_args:n,args:a}=this;return x.MsgExecuteJSON.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:s,typeArgs:n,args:a})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecuteJSON",value:x.MsgExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return ao.fromProto(x.MsgExecuteJSON.decode(e.value))}}class io extends m{constructor(e,r,o=[],s=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.code_bytes=r,this.type_args=o,this.args=s}static fromAmino(e){const{value:{sender:r,code_bytes:o,type_args:s,args:n}}=e;return new io(r,o,s??[],n??[])}toAmino(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return{type:"move/MsgScript",value:{sender:e,code_bytes:r,type_args:o.length===0?void 0:o,args:s.length===0?void 0:s}}}static fromProto(e){return new io(e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args.map(r=>Buffer.from(r).toString("base64")))}toProto(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return x.MsgScript.fromPartial({sender:e,codeBytes:Buffer.from(r,"base64"),typeArgs:o,args:s.map(n=>Buffer.from(n,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScript",value:x.MsgScript.encode(this.toProto()).finish()})}static unpackAny(e){return io.fromProto(x.MsgScript.decode(e.value))}static fromData(e){const{sender:r,code_bytes:o,type_args:s,args:n}=e;return new io(r,o,s,n)}toData(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return{"@type":"/initia.move.v1.MsgScript",sender:e,code_bytes:r,type_args:o,args:s}}}class co extends m{constructor(e,r,o=[],s=[]){super();p(this,"type_args");p(this,"args");this.sender=e,this.code_bytes=r,this.type_args=o,this.args=s}static fromAmino(e){const{value:{sender:r,code_bytes:o,type_args:s,args:n}}=e;return new co(r,o,s??[],n??[])}toAmino(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return{type:"move/MsgScriptJSON",value:{sender:e,code_bytes:r,type_args:o.length===0?void 0:o,args:s.length===0?void 0:s}}}static fromData(e){const{sender:r,code_bytes:o,type_args:s,args:n}=e;return new co(r,o,s,n)}toData(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return{"@type":"/initia.move.v1.MsgScriptJSON",sender:e,code_bytes:r,type_args:o,args:s}}static fromProto(e){return new co(e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args)}toProto(){const{sender:e,code_bytes:r,type_args:o,args:s}=this;return x.MsgScriptJSON.fromPartial({sender:e,codeBytes:Buffer.from(r,"base64"),typeArgs:o,args:s})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScriptJSON",value:x.MsgScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return co.fromProto(x.MsgScriptJSON.decode(e.value))}}class ys extends m{constructor(t,e,r,o,s){super(),this.base_denom=t,this.base_min_gas_price=e,this.contract_shared_revenue_ratio=r,this.script_enabled=o,this.allowed_publishers=s}static fromAmino(t){const{value:{base_denom:e,base_min_gas_price:r,contract_shared_revenue_ratio:o,script_enabled:s,allowed_publishers:n}}=t;return new ys(e,r,o,s,n)}toAmino(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}=this;return{type:"move/Params",value:{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}}}static fromData(t){const{base_denom:e,base_min_gas_price:r,contract_shared_revenue_ratio:o,script_enabled:s,allowed_publishers:n}=t;return new ys(e,r,o,s,n)}toData(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}=this;return{"@type":"/initia.move.v1.Params",base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}}static fromProto(t){return new ys(t.baseDenom,t.baseMinGasPrice,t.contractSharedRevenueRatio,t.scriptEnabled,t.allowedPublishers)}toProto(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:s}=this;return ca.Params.fromPartial({baseDenom:t,baseMinGasPrice:e,contractSharedRevenueRatio:r,scriptEnabled:o,allowedPublishers:s})}}class mo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new mo(e,ys.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"move/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new mo(e,ys.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.move.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new mo(t.authority,ys.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:"/initia.move.v1.MsgUpdateParams",value:x.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return mo.fromProto(x.MsgUpdateParams.decode(t.value))}}class uo extends m{constructor(t,e,r){super(),this.authority=t,this.metadata_lp=e,this.reward_weight=r}static fromAmino(t){const{value:{authority:e,metadata_lp:r,reward_weight:o}}=t;return new uo(e,r,o)}toAmino(){const{authority:t,metadata_lp:e,reward_weight:r}=this;return{type:"move/MsgWhitelist",value:{authority:t,metadata_lp:e,reward_weight:r}}}static fromData(t){const{authority:e,metadata_lp:r,reward_weight:o}=t;return new uo(e,r,o)}toData(){const{authority:t,metadata_lp:e,reward_weight:r}=this;return{"@type":"/initia.move.v1.MsgWhitelist",authority:t,metadata_lp:e,reward_weight:r}}static fromProto(t){return new uo(t.authority,t.metadataLp,t.rewardWeight)}toProto(){const{authority:t,metadata_lp:e,reward_weight:r}=this;return x.MsgWhitelist.fromPartial({authority:t,metadataLp:e,rewardWeight:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgWhitelist",value:x.MsgWhitelist.encode(this.toProto()).finish()})}static unpackAny(t){return uo.fromProto(x.MsgWhitelist.decode(t.value))}}class lo extends m{constructor(t,e){super(),this.authority=t,this.metadata_lp=e}static fromAmino(t){const{value:{authority:e,metadata_lp:r}}=t;return new lo(e,r)}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:r}=t;return new lo(e,r)}toData(){const{authority:t,metadata_lp:e}=this;return{"@type":"/initia.move.v1.MsgDelist",authority:t,metadata_lp:e}}static fromProto(t){return new lo(t.authority,t.metadataLp)}toProto(){const{authority:t,metadata_lp:e}=this;return x.MsgDelist.fromPartial({authority:t,metadataLp:e})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgDelist",value:x.MsgDelist.encode(this.toProto()).finish()})}static unpackAny(t){return lo.fromProto(x.MsgDelist.decode(t.value))}}class po extends m{constructor(e,r,o,s,n,a=[],c=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=r,this.module_address=o,this.module_name=s,this.function_name=n,this.type_args=a,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:s,module_name:n,function_name:a,type_args:c,args:d}}=e;return new po(r,o,s,n,a,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return{type:"move/MsgGovExecute",value:{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a.length===0?void 0:a,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:s,module_name:n,function_name:a,type_args:c,args:d}=e;return new po(r,o,s,n,a,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecute",authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}}static fromProto(e){return new po(e.authority,e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args.map(r=>Buffer.from(r).toString("base64")))}toProto(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return x.MsgGovExecute.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:s,functionName:n,typeArgs:a,args:c.map(d=>Buffer.from(d,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecute",value:x.MsgGovExecute.encode(this.toProto()).finish()})}static unpackAny(e){return po.fromProto(x.MsgGovExecute.decode(e.value))}}class ho extends m{constructor(e,r,o,s,n,a=[],c=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=r,this.module_address=o,this.module_name=s,this.function_name=n,this.type_args=a,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:s,module_name:n,function_name:a,type_args:c,args:d}}=e;return new ho(r,o,s,n,a,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return{type:"move/MsgGovExecuteJSON",value:{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a.length===0?void 0:a,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:s,module_name:n,function_name:a,type_args:c,args:d}=e;return new ho(r,o,s,n,a,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecuteJSON",authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}}static fromProto(e){return new ho(e.authority,e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args)}toProto(){const{authority:e,sender:r,module_address:o,module_name:s,function_name:n,type_args:a,args:c}=this;return x.MsgGovExecuteJSON.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:s,functionName:n,typeArgs:a,args:c})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecuteJSON",value:x.MsgGovExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return ho.fromProto(x.MsgGovExecuteJSON.decode(e.value))}}class Ft extends m{constructor(t,e,r,o){super(),this.authority=t,this.sender=e,this.code_bytes=r,this.upgrade_policy=o}static fromAmino(t){const{value:{authority:e,sender:r,code_bytes:o,upgrade_policy:s}}=t;return new Ft(e,r,o,s||0)}toAmino(){const{authority:t,sender:e,code_bytes:r,upgrade_policy:o}=this;return{type:"move/MsgGovPublish",value:{authority:t,sender:e,code_bytes:r,upgrade_policy:o===ca.UpgradePolicy.UNSPECIFIED?void 0:o}}}static fromData(t){const{authority:e,sender:r,code_bytes:o,upgrade_policy:s}=t;return new Ft(e,r,o,s)}toData(){const{authority:t,sender:e,code_bytes:r,upgrade_policy:o}=this;return{"@type":"/initia.move.v1.MsgGovPublish",authority:t,sender:e,code_bytes:r,upgrade_policy:o}}static fromProto(t){return new Ft(t.authority,t.sender,t.codeBytes.map(e=>Buffer.from(e).toString("base64")),t.upgradePolicy)}toProto(){const{authority:t,sender:e,code_bytes:r,upgrade_policy:o}=this;return x.MsgGovPublish.fromPartial({authority:t,sender:e,codeBytes:r.map(s=>Buffer.from(s,"base64")),upgradePolicy:o})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovPublish",value:x.MsgGovPublish.encode(this.toProto()).finish()})}static unpackAny(t){return Ft.fromProto(x.MsgGovPublish.decode(t.value))}}(i=>{i.Policy=ca.UpgradePolicy})(Ft||(Ft={}));class fo extends m{constructor(e,r,o,s=[],n=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=r,this.code_bytes=o,this.type_args=s,this.args=n}static fromAmino(e){const{value:{authority:r,sender:o,code_bytes:s,type_args:n,args:a}}=e;return new fo(r,o,s,n??[],a??[])}toAmino(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return{type:"move/MsgGovScript",value:{authority:e,sender:r,code_bytes:o,type_args:s.length===0?void 0:s,args:n.length===0?void 0:n}}}static fromData(e){const{authority:r,sender:o,code_bytes:s,type_args:n,args:a}=e;return new fo(r,o,s,n,a)}toData(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return{"@type":"/initia.move.v1.MsgGovScript",authority:e,sender:r,code_bytes:o,type_args:s,args:n}}static fromProto(e){return new fo(e.authority,e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args.map(r=>Buffer.from(r).toString("base64")))}toProto(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return x.MsgGovScript.fromPartial({authority:e,sender:r,codeBytes:Buffer.from(o,"base64"),typeArgs:s,args:n.map(a=>Buffer.from(a,"base64"))})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScript",value:x.MsgGovScript.encode(this.toProto()).finish()})}static unpackAny(e){return fo.fromProto(x.MsgGovScript.decode(e.value))}}class go extends m{constructor(e,r,o,s=[],n=[]){super();p(this,"type_args");p(this,"args");this.authority=e,this.sender=r,this.code_bytes=o,this.type_args=s,this.args=n}static fromAmino(e){const{value:{authority:r,sender:o,code_bytes:s,type_args:n,args:a}}=e;return new go(r,o,s,n??[],a??[])}toAmino(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return{type:"move/MsgGovScriptJSON",value:{authority:e,sender:r,code_bytes:o,type_args:s.length===0?void 0:s,args:n.length===0?void 0:n}}}static fromData(e){const{authority:r,sender:o,code_bytes:s,type_args:n,args:a}=e;return new go(r,o,s,n,a)}toData(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return{"@type":"/initia.move.v1.MsgGovScriptJSON",authority:e,sender:r,code_bytes:o,type_args:s,args:n}}static fromProto(e){return new go(e.authority,e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args)}toProto(){const{authority:e,sender:r,code_bytes:o,type_args:s,args:n}=this;return x.MsgGovScriptJSON.fromPartial({authority:e,sender:r,codeBytes:Buffer.from(o,"base64"),typeArgs:s,args:n})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScriptJSON",value:x.MsgGovScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return go.fromProto(x.MsgGovScriptJSON.decode(e.value))}}class yo extends m{constructor(e,r,o){super();p(this,"amount");this.delegator_address=e,this.validator_address=r,this.amount=new u(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:s}}=e;return new yo(r,o,u.fromAmino(s))}toAmino(){const{delegator_address:e,validator_address:r,amount:o}=this;return{type:"mstaking/MsgDelegate",value:{delegator_address:e,validator_address:r,amount:o.toAmino()}}}static fromProto(e){return new yo(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:r,amount:o}=this;return H.MsgDelegate.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgDelegate",value:H.MsgDelegate.encode(this.toProto()).finish()})}static unpackAny(e){return yo.fromProto(H.MsgDelegate.decode(e.value))}static fromData(e){const{delegator_address:r,validator_address:o,amount:s}=e;return new yo(r,o,u.fromData(s))}toData(){const{delegator_address:e,validator_address:r,amount:o}=this;return{"@type":"/initia.mstaking.v1.MsgDelegate",delegator_address:e,validator_address:r,amount:o.toData()}}}class _o extends m{constructor(e,r,o){super();p(this,"amount");this.delegator_address=e,this.validator_address=r,this.amount=new u(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:s}}=e;return new _o(r,o,u.fromAmino(s))}toAmino(){const{delegator_address:e,validator_address:r,amount:o}=this;return{type:"mstaking/MsgUndelegate",value:{delegator_address:e,validator_address:r,amount:o.toAmino()}}}static fromProto(e){return new _o(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:r,amount:o}=this;return H.MsgUndelegate.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUndelegate",value:H.MsgUndelegate.encode(this.toProto()).finish()})}static unpackAny(e){return _o.fromProto(H.MsgUndelegate.decode(e.value))}static fromData(e){const{delegator_address:r,validator_address:o,amount:s}=e;return new _o(r,o,u.fromData(s))}toData(){const{delegator_address:e,validator_address:r,amount:o}=this;return{"@type":"/initia.mstaking.v1.MsgUndelegate",delegator_address:e,validator_address:r,amount:o.toData()}}}class vo extends m{constructor(e,r,o,s){super();p(this,"amount");this.delegator_address=e,this.validator_src_address=r,this.validator_dst_address=o,this.amount=new u(s)}static fromAmino(e){const{value:{delegator_address:r,validator_src_address:o,validator_dst_address:s,amount:n}}=e;return new vo(r,o,s,u.fromAmino(n))}toAmino(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s}=this;return{type:"mstaking/MsgBeginRedelegate",value:{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s.toAmino()}}}static fromData(e){const{delegator_address:r,validator_src_address:o,validator_dst_address:s,amount:n}=e;return new vo(r,o,s,u.fromData(n))}toData(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s}=this;return{"@type":"/initia.mstaking.v1.MsgBeginRedelegate",delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s.toData()}}static fromProto(e){return new vo(e.delegatorAddress,e.validatorSrcAddress,e.validatorDstAddress,u.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:s}=this;return H.MsgBeginRedelegate.fromPartial({amount:s.toProto(),delegatorAddress:e,validatorDstAddress:o,validatorSrcAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgBeginRedelegate",value:H.MsgBeginRedelegate.encode(this.toProto()).finish()})}static unpackAny(e){return vo.fromProto(H.MsgBeginRedelegate.decode(e.value))}}class G extends m{constructor(e,r,o,s,n,a,c,d,h,g,y,b){super();p(this,"tokens");p(this,"delegator_shares");p(this,"voting_powers");this.operator_address=e,this.consensus_pubkey=r,this.jailed=o,this.status=s,this.description=c,this.unbonding_height=d,this.unbonding_time=h,this.commission=g,this.voting_power=b,this.tokens=new u(n),this.delegator_shares=new u(a),this.voting_powers=new u(y)}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 fromAmino(e){return new G(e.operator_address,j.fromAmino(e.consensus_pubkey),e.jailed||!1,e.status||0,u.fromAmino(e.tokens),u.fromAmino(e.delegator_shares),G.Description.fromAmino(e.description),Number.parseInt(e.unbonding_height),new Date(e.unbonding_time),G.Commission.fromAmino(e.commission),u.fromAmino(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 fromData(e){return new G(e.operator_address,j.fromData(e.consensus_pubkey),e.jailed||!1,e.status||0,u.fromData(e.tokens),u.fromData(e.delegator_shares),G.Description.fromData(e.description),Number.parseInt(e.unbonding_height),new Date(e.unbonding_time),G.Commission.fromData(e.commission),u.fromData(e.voting_powers),e.voting_power)}toProto(){const{operator_address:e,consensus_pubkey:r,jailed:o,status:s,tokens:n,delegator_shares:a,description:c,unbonding_height:d,unbonding_time:h,commission:g,voting_powers:y,voting_power:b}=this;return ut.Validator.fromPartial({operatorAddress:e,consensusPubkey:r.packAny(),jailed:o,status:s,tokens:n.toProto(),delegatorShares:a.toProto(),description:c.toProto(),unbondingHeight:f.fromNumber(d),unbondingTime:h,commission:g.toProto(),votingPowers:y.toProto(),votingPower:b})}static fromProto(e){return new G(e.operatorAddress,j.unpackAny(e.consensusPubkey),e.jailed,e.status,u.fromProto(e.tokens),u.fromProto(e.delegatorShares),G.Description.fromProto(e.description),e.unbondingHeight.toNumber(),e.unbondingTime,G.Commission.fromProto(e.commission),u.fromProto(e.votingPowers),e.votingPower)}}(i=>{i.Status=ut.BondStatus;class t extends m{constructor(s,n,a,c,d){super(),this.moniker=s,this.identity=n,this.website=a,this.details=c,this.security_contact=d}toAmino(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}}static fromAmino(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 fromData(s){return new t(s.moniker,s.identity??"",s.website??"",s.details??"",s.security_contact??"")}toProto(){const{moniker:s,identity:n,website:a,details:c,security_contact:d}=this;return ut.Description.fromPartial({details:c,identity:n,moniker:s,securityContact:d,website:a})}static fromProto(s){return new t(s.moniker,s.identity,s.website,s.details,s.securityContact)}}i.Description=t;class e extends m{constructor(s,n,a){super(),this.rate=s,this.max_rate=n,this.max_change_rate=a,this.rate=v(s).toString(),this.max_rate=v(n).toString(),this.max_change_rate=v(a).toString()}static fromAmino(s){const{rate:n,max_rate:a,max_change_rate:c}=s;return new e(n,a,c)}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:c}=s;return new e(n,a,c)}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 ut.CommissionRates.fromPartial({maxChangeRate:a,maxRate:n,rate:s})}}i.CommissionRates=e;class r extends m{constructor(s,n){super(),this.commission_rates=s,this.update_time=n}toAmino(){return{commission_rates:this.commission_rates.toAmino(),update_time:this.update_time.toISOString()}}static fromAmino(s){return new r(e.fromAmino(s.commission_rates),new Date(s.update_time))}toData(){return{commission_rates:this.commission_rates.toData(),update_time:this.update_time.toISOString()}}static fromData(s){return new r(e.fromData(s.commission_rates),new Date(s.update_time))}toProto(){const{commission_rates:s,update_time:n}=this;return ut.Commission.fromPartial({commissionRates:s.toProto(),updateTime:n})}static fromProto(s){return new r(e.fromProto(s.commissionRates),s.updateTime)}}i.Commission=r})(G||(G={}));class bo extends m{constructor(e,r,o,s,n){super();p(this,"amount");this.description=e,this.commission=r,this.validator_address=o,this.pubkey=s,this.amount=new u(n)}static fromAmino(e){const{value:{description:r,commission:o,validator_address:s,pubkey:n,amount:a}}=e;return new bo(r,G.CommissionRates.fromAmino(o),s,j.fromAmino(n),u.fromAmino(a))}toAmino(){const{description:e,commission:r,validator_address:o,pubkey:s,amount:n}=this;return{type:"mstaking/MsgCreateValidator",value:{description:e,commission:r.toAmino(),validator_address:o,pubkey:s.toAmino(),amount:n.toAmino()}}}static fromData(e){const{description:r,commission:o,validator_address:s,pubkey:n,amount:a}=e;return new bo(r,G.CommissionRates.fromData(o),s,j.fromData(n),u.fromData(a))}toData(){const{description:e,commission:r,validator_address:o,pubkey:s,amount:n}=this;return{"@type":"/initia.mstaking.v1.MsgCreateValidator",description:e,commission:r.toData(),validator_address:o,pubkey:s.toData(),amount:n.toData()}}static fromProto(e){return new bo(G.Description.fromProto(e.description),G.CommissionRates.fromProto(e.commission),e.validatorAddress,exports.PublicKey.fromProto(e.pubkey),u.fromProto(e.amount))}toProto(){const{description:e,commission:r,validator_address:o,pubkey:s,amount:n}=this;return H.MsgCreateValidator.fromPartial({commission:r.toProto(),description:e.toProto(),pubkey:s.packAny(),validatorAddress:o,amount:n.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCreateValidator",value:H.MsgCreateValidator.encode(this.toProto()).finish()})}static unpackAny(e){return bo.fromProto(H.MsgCreateValidator.decode(e.value))}}class $t extends m{constructor(t,e,r){super(),this.description=t,this.validator_address=e,this.commission_rate=r}static fromAmino(t){const{value:{description:e,validator_address:r,commission_rate:o}}=t;return new $t(G.Description.fromAmino(e),r,o)}toAmino(){const{description:t,validator_address:e,commission_rate:r}=this;return{type:"mstaking/MsgEditValidator",value:{description:t,validator_address:e,commission_rate:r}}}static fromProto(t){return new $t(G.Description.fromProto(t.description),t.validatorAddress,t.commissionRate!==""?t.commissionRate:void 0)}toProto(){const{description:t,validator_address:e,commission_rate:r}=this;return H.MsgEditValidator.fromPartial({description:t.toProto(),commissionRate:(r==null?void 0:r.toString())??"",validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgEditValidator",value:H.MsgEditValidator.encode(this.toProto()).finish()})}static unpackAny(t){return $t.fromProto(H.MsgEditValidator.decode(t.value))}static fromData(t){const{description:e,validator_address:r,commission_rate:o}=t;return new $t(G.Description.fromData(e),r,o)}toData(){const{description:t,validator_address:e,commission_rate:r}=this;return{"@type":"/initia.mstaking.v1.MsgEditValidator",description:t,validator_address:e,commission_rate:r}}}(i=>{i.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]"}})($t||($t={}));class Ao extends m{constructor(e,r,o,s){super();p(this,"amount");this.delegator_address=e,this.validator_address=r,this.creation_height=s,this.amount=new u(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:s,creation_height:n}}=e;return new Ao(r,o,u.fromAmino(s),Number.parseInt(n))}toAmino(){const{delegator_address:e,validator_address:r,amount:o,creation_height:s}=this;return{type:"mstaking/MsgCancelUnbondingDelegation",value:{delegator_address:e,validator_address:r,amount:o.toAmino(),creation_height:s.toString()}}}static fromData(e){const{delegator_address:r,validator_address:o,amount:s,creation_height:n}=e;return new Ao(r,o,u.fromData(s),Number.parseInt(n))}toData(){const{delegator_address:e,validator_address:r,amount:o,creation_height:s}=this;return{"@type":"/initia.mstaking.v1.MsgCancelUnbondingDelegation",delegator_address:e,validator_address:r,amount:o.toData(),creation_height:s.toString()}}static fromProto(e){return new Ao(e.delegatorAddress,e.validatorAddress,u.fromProto(e.amount),e.creationHeight.toNumber())}toProto(){const{delegator_address:e,validator_address:r,amount:o,creation_height:s}=this;return H.MsgCancelUnbondingDelegation.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r,creationHeight:f.fromNumber(s)})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCancelUnbondingDelegation",value:H.MsgCancelUnbondingDelegation.encode(this.toProto()).finish()})}static unpackAny(e){return Ao.fromProto(H.MsgCancelUnbondingDelegation.decode(e.value))}}class _s extends m{constructor(t,e,r,o,s,n,a){super(),this.unbonding_time=t,this.max_validators=e,this.max_entries=r,this.historical_entries=o,this.bond_denoms=s,this.min_voting_power=n,this.min_commission_rate=a}static fromAmino(t){const{value:{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:s,bond_denoms:n,min_voting_power:a,min_commission_rate:c}}=t;return new _s(D.fromAmino(e),r,o,s,n,Number.parseInt(a),c)}toAmino(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,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:r,historical_entries:o,bond_denoms:s,min_voting_power:n.toString(),min_commission_rate:a}}}static fromData(t){const{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:s,bond_denoms:n,min_voting_power:a,min_commission_rate:c}=t;return new _s(D.fromData(e),r,o,s,n,Number.parseInt(a),c)}toData(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,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:r,historical_entries:o,bond_denoms:s,min_voting_power:n.toString(),min_commission_rate:a}}static fromProto(t){return new _s(D.fromProto(t.unbondingTime),t.maxValidators,t.maxEntries,t.historicalEntries,t.bondDenoms,t.minVotingPower.toNumber(),t.minCommissionRate)}toProto(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,bond_denoms:s,min_voting_power:n,min_commission_rate:a}=this;return ut.Params.fromPartial({unbondingTime:t.toProto(),maxValidators:e,maxEntries:r,historicalEntries:o,bondDenoms:s,minVotingPower:f.fromNumber(n),minCommissionRate:a})}}class Po extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Po(e,_s.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"mstaking/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Po(e,_s.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.mstaking.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Po(t.authority,_s.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return H.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUpdateParams",value:H.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Po.fromProto(H.MsgUpdateParams.decode(t.value))}}class Gs extends m{constructor(e,r,o,s){super();p(this,"shares");p(this,"balance");this.delegator_address=e,this.validator_address=r,this.shares=new u(o),this.balance=new u(s)}static fromAmino(e){const{delegation:{delegator_address:r,validator_address:o,shares:s},balance:n}=e;return new Gs(r,o,u.fromAmino(s),u.fromAmino(n))}toAmino(){const{delegator_address:e,validator_address:r,shares:o,balance:s}=this;return{delegation:{delegator_address:e,validator_address:r,shares:o.toAmino()},balance:s.toAmino()}}static fromData(e){const{delegation:{delegator_address:r,validator_address:o,shares:s},balance:n}=e;return new Gs(r,o,u.fromData(s),u.fromData(n))}toData(){const{delegator_address:e,validator_address:r,shares:o,balance:s}=this;return{delegation:{delegator_address:e,validator_address:r,shares:o.toData()},balance:s.toData()}}static fromProto(e){const r=e.delegation;return new Gs(r.delegatorAddress,r.validatorAddress,u.fromProto(r.shares),u.fromProto(e.balance))}toProto(){const{delegator_address:e,validator_address:r,shares:o,balance:s}=this;return ut.DelegationResponse.fromPartial({delegation:ut.Delegation.fromPartial({delegatorAddress:e,validatorAddress:r,shares:o.toProto()}),balance:s.toProto()})}}class Nt extends m{constructor(t,e,r,o){super(),this.delegator_address=t,this.validator_src_address=e,this.validator_dst_address=r,this.entries=o}static fromAmino(t){const{redelegation:{delegator_address:e,validator_src_address:r,validator_dst_address:o},entries:s}=t;return new Nt(e,r,o,s.map(n=>Nt.Entry.fromAmino(n)))}toAmino(){const{delegator_address:t,validator_src_address:e,validator_dst_address:r,entries:o}=this;return{redelegation:{delegator_address:t,validator_src_address:e,validator_dst_address:r},entries:o.map(s=>s.toAmino())}}static fromData(t){const{redelegation:{delegator_address:e,validator_src_address:r,validator_dst_address:o},entries:s}=t;return new Nt(e,r,o,s.map(n=>Nt.Entry.fromData(n)))}toData(){const{delegator_address:t,validator_src_address:e,validator_dst_address:r,entries:o}=this;return{redelegation:{delegator_address:t,validator_src_address:e,validator_dst_address:r},entries:o.map(s=>s.toData())}}static fromProto(t){const e=t.redelegation;return new Nt(e.delegatorAddress,e.validatorDstAddress,e.validatorDstAddress,t.entries.map(r=>Nt.Entry.fromProto(r)))}toProto(){const{delegator_address:t,validator_src_address:e,validator_dst_address:r,entries:o}=this;return ut.RedelegationResponse.fromPartial({entries:o.map(s=>s.toProto()),redelegation:ut.Redelegation.fromPartial({delegatorAddress:t,entries:o.map(s=>s.toProto().redelegationEntry),validatorDstAddress:r,validatorSrcAddress:e})})}}(i=>{class t extends m{constructor(o,s,n,a,c){super();p(this,"initial_balance");p(this,"shares_dst");p(this,"balance");this.creation_height=a,this.completion_time=c,this.initial_balance=new u(o),this.balance=new u(s),this.shares_dst=new u(n)}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 fromAmino(o){const{redelegation_entry:{initial_balance:s,shares_dst:n,creation_height:a,completion_time:c},balance:d}=o;return new t(u.fromAmino(s),u.fromAmino(d),u.fromAmino(n),a,new Date(c))}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 fromData(o){const{redelegation_entry:{initial_balance:s,shares_dst:n,creation_height:a,completion_time:c},balance:d}=o;return new t(u.fromData(s),u.fromData(d),u.fromData(n),a,new Date(c))}toProto(){const{initial_balance:o,balance:s,shares_dst:n,creation_height:a,completion_time:c}=this;return ut.RedelegationEntryResponse.fromPartial({balance:s.toProto(),redelegationEntry:ut.RedelegationEntry.fromPartial({completionTime:c,creationHeight:f.fromNumber(a),initialBalance:o.toProto(),sharesDst:n.toProto()})})}static fromProto(o){const s=o.redelegationEntry;return new t(u.fromProto(s.initialBalance),u.fromProto(o.balance),u.fromProto(s.sharesDst),s.creationHeight.toNumber(),s.completionTime)}}i.Entry=t})(Nt||(Nt={}));class ft extends m{constructor(t,e,r){super(),this.delegator_address=t,this.validator_address=e,this.entries=r}static fromAmino(t){const{delegator_address:e,validator_address:r,entries:o}=t;return new ft(e,r,o.map(s=>ft.Entry.fromAmino(s)))}toAmino(){const{delegator_address:t,validator_address:e,entries:r}=this;return{delegator_address:t,validator_address:e,entries:r.map(o=>o.toAmino())}}static fromData(t){const{delegator_address:e,validator_address:r,entries:o}=t;return new ft(e,r,o.map(s=>ft.Entry.fromData(s)))}toData(){const{delegator_address:t,validator_address:e,entries:r}=this;return{delegator_address:t,validator_address:e,entries:r.map(o=>o.toData())}}toProto(){const{delegator_address:t,validator_address:e,entries:r}=this;return ut.UnbondingDelegation.fromPartial({delegatorAddress:t,entries:r.map(o=>o.toProto()),validatorAddress:e})}static fromProto(t){return new ft(t.delegatorAddress,t.validatorAddress,t.entries.map(e=>ft.Entry.fromProto(e)))}}(i=>{class t extends m{constructor(o,s,n,a){super();p(this,"initial_balance");p(this,"balance");this.creation_height=n,this.completion_time=a,this.initial_balance=new u(o),this.balance=new u(s)}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 fromAmino(o){const{initial_balance:s,balance:n,creation_height:a,completion_time:c}=o;return new t(u.fromAmino(s),u.fromAmino(n),Number.parseInt(a),new Date(c))}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 fromData(o){const{initial_balance:s,balance:n,creation_height:a,completion_time:c}=o;return new t(u.fromData(s),u.fromData(n),Number.parseInt(a),new Date(c))}toProto(){const{initial_balance:o,balance:s,creation_height:n,completion_time:a}=this;return ut.UnbondingDelegationEntry.fromPartial({balance:s.toProto(),completionTime:a,creationHeight:f.fromNumber(n),initialBalance:o.toProto()})}static fromProto(o){return new t(u.fromProto(o.initialBalance),u.fromProto(o.balance),o.creationHeight.toNumber(),o.completionTime)}}i.Entry=t})(ft||(ft={}));class wo extends m{constructor(t,e,r,o){super(),this.authority=t,this.moniker=e,this.validator_address=r,this.pubkey=o}static fromAmino(t){const{value:{authority:e,moniker:r,validator_address:o,pubkey:s}}=t;return new wo(e,r,o,j.fromAmino(s))}toAmino(){const{authority:t,moniker:e,validator_address:r,pubkey:o}=this;return{type:"opchild/MsgAddValidator",value:{authority:t,moniker:e,validator_address:r,pubkey:o.toAmino()}}}static fromData(t){const{authority:e,moniker:r,validator_address:o,pubkey:s}=t;return new wo(e,r,o,j.fromData(s))}toData(){const{authority:t,moniker:e,validator_address:r,pubkey:o}=this;return{"@type":"/opinit.opchild.v1.MsgAddValidator",authority:t,moniker:e,validator_address:r,pubkey:o.toData()}}static fromProto(t){return new wo(t.authority,t.moniker,t.validatorAddress,j.unpackAny(t.pubkey))}toProto(){const{authority:t,moniker:e,validator_address:r,pubkey:o}=this;return R.MsgAddValidator.fromPartial({authority:t,moniker:e,validatorAddress:r,pubkey:o.packAny()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgAddValidator",value:R.MsgAddValidator.encode(this.toProto()).finish()})}static unpackAny(t){return wo.fromProto(R.MsgAddValidator.decode(t.value))}}class Do extends m{constructor(t,e){super(),this.authority=t,this.validator_address=e}static fromAmino(t){const{value:{authority:e,validator_address:r}}=t;return new Do(e,r)}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:r}=t;return new Do(e,r)}toData(){const{authority:t,validator_address:e}=this;return{"@type":"/opinit.opchild.v1.MsgRemoveValidator",authority:t,validator_address:e}}static fromProto(t){return new Do(t.authority,t.validatorAddress)}toProto(){const{authority:t,validator_address:e}=this;return R.MsgRemoveValidator.fromPartial({authority:t,validatorAddress:e})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgRemoveValidator",value:R.MsgRemoveValidator.encode(this.toProto()).finish()})}static unpackAny(t){return Do.fromProto(R.MsgRemoveValidator.decode(t.value))}}class ko extends m{constructor(t,e,r,o,s,n,a,c){super(),this.sender=t,this.from=e,this.to=r,this.amount=o,this.sequence=s,this.height=n,this.base_denom=a,this.data=c}static fromAmino(t){const{value:{sender:e,from:r,to:o,amount:s,sequence:n,height:a,base_denom:c,data:d}}=t;return new ko(e,r,o,_.fromAmino(s),Number.parseInt(n),Number.parseInt(a),c,d)}toAmino(){const{sender:t,from:e,to:r,amount:o,sequence:s,height:n,base_denom:a,data:c}=this;return{type:"opchild/MsgFinalizeTokenDeposit",value:{sender:t,from:e,to:r,amount:o.toAmino(),sequence:s.toString(),height:n.toString(),base_denom:a,data:c}}}static fromData(t){const{sender:e,from:r,to:o,amount:s,sequence:n,height:a,base_denom:c,data:d}=t;return new ko(e,r,o,_.fromData(s),Number.parseInt(n),Number.parseInt(a),c,d)}toData(){const{sender:t,from:e,to:r,amount:o,sequence:s,height:n,base_denom:a,data:c}=this;return{"@type":"/opinit.opchild.v1.MsgFinalizeTokenDeposit",sender:t,from:e,to:r,amount:o.toData(),sequence:s.toString(),height:n.toString(),base_denom:a,data:c}}static fromProto(t){return new ko(t.sender,t.from,t.to,_.fromProto(t.amount),t.sequence.toNumber(),t.height.toNumber(),t.baseDenom,t.data.length?Buffer.from(t.data).toString("base64"):void 0)}toProto(){const{sender:t,from:e,to:r,amount:o,sequence:s,height:n,base_denom:a,data:c}=this;return R.MsgFinalizeTokenDeposit.fromPartial({sender:t,from:e,to:r,amount:o.toProto(),sequence:f.fromNumber(s),height:f.fromNumber(n),baseDenom:a,data:c?Buffer.from(c,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgFinalizeTokenDeposit",value:R.MsgFinalizeTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return ko.fromProto(R.MsgFinalizeTokenDeposit.decode(t.value))}}class Mo extends m{constructor(t,e,r){super(),this.sender=t,this.to=e,this.amount=r}static fromAmino(t){const{value:{sender:e,to:r,amount:o}}=t;return new Mo(e,r,_.fromAmino(o))}toAmino(){const{sender:t,to:e,amount:r}=this;return{type:"opchild/MsgInitiateTokenWithdrawal",value:{sender:t,to:e,amount:r.toAmino()}}}static fromData(t){const{sender:e,to:r,amount:o}=t;return new Mo(e,r,_.fromData(o))}toData(){const{sender:t,to:e,amount:r}=this;return{"@type":"/opinit.opchild.v1.MsgInitiateTokenWithdrawal",sender:t,to:e,amount:r.toData()}}static fromProto(t){return new Mo(t.sender,t.to,_.fromProto(t.amount))}toProto(){const{sender:t,to:e,amount:r}=this;return R.MsgInitiateTokenWithdrawal.fromPartial({sender:t,to:e,amount:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgInitiateTokenWithdrawal",value:R.MsgInitiateTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return Mo.fromProto(R.MsgInitiateTokenWithdrawal.decode(t.value))}}class xo extends m{constructor(t,e){super(),this.sender=t,this.messages=e}static fromAmino(t){const{value:{sender:e,messages:r}}=t;return new xo(e,r.map(exports.Msg.fromAmino))}toAmino(){const{sender:t,messages:e}=this;return{type:"opchild/MsgExecuteMessages",value:{sender:t,messages:e.map(r=>r.toAmino())}}}static fromData(t){const{sender:e,messages:r}=t;return new xo(e,r.map(exports.Msg.fromData))}toData(){const{sender:t,messages:e}=this;return{"@type":"/opinit.opchild.v1.MsgExecuteMessages",sender:t,messages:e.map(r=>r.toData())}}static fromProto(t){return new xo(t.sender,t.messages.map(exports.Msg.fromProto))}toProto(){const{sender:t,messages:e}=this;return R.MsgExecuteMessages.fromPartial({sender:t,messages:e.map(r=>r.packAny())})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgExecuteMessages",value:R.MsgExecuteMessages.encode(this.toProto()).finish()})}static unpackAny(t){return xo.fromProto(R.MsgExecuteMessages.decode(t.value))}}class So extends m{constructor(e,r,o){super();p(this,"amount");this.authority=e,this.recipient=r,this.amount=new u(o)}static fromAmino(e){const{value:{authority:r,recipient:o,amount:s}}=e;return new So(r,o,u.fromAmino(s))}toAmino(){const{authority:e,recipient:r,amount:o}=this;return{type:"opchild/MsgSpendFeePool",value:{authority:e,recipient:r,amount:o.toAmino()}}}static fromData(e){const{authority:r,recipient:o,amount:s}=e;return new So(r,o,u.fromData(s))}toData(){const{authority:e,recipient:r,amount:o}=this;return{"@type":"/opinit.opchild.v1.MsgSpendFeePool",authority:e,recipient:r,amount:o.toData()}}static fromProto(e){return new So(e.authority,e.recipient,u.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return R.MsgSpendFeePool.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSpendFeePool",value:R.MsgSpendFeePool.encode(this.toProto()).finish()})}static unpackAny(e){return So.fromProto(R.MsgSpendFeePool.decode(e.value))}}class Io extends m{constructor(t,e,r){super(),this.submitter=t,this.bridge_id=e,this.batch_bytes=r}static fromAmino(t){const{value:{submitter:e,bridge_id:r,batch_bytes:o}}=t;return new Io(e,Number.parseInt(r),o)}toAmino(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return{type:"ophost/MsgRecordBatch",value:{submitter:t,bridge_id:e.toString(),batch_bytes:r}}}static fromData(t){const{submitter:e,bridge_id:r,batch_bytes:o}=t;return new Io(e,Number.parseInt(r),o)}toData(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return{"@type":"/opinit.ophost.v1.MsgRecordBatch",submitter:t,bridge_id:e.toString(),batch_bytes:r}}static fromProto(t){return new Io(t.submitter,t.bridgeId.toNumber(),Buffer.from(t.batchBytes).toString("base64"))}toProto(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return S.MsgRecordBatch.fromPartial({submitter:t,bridgeId:f.fromNumber(e),batchBytes:r?Buffer.from(r,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgRecordBatch",value:S.MsgRecordBatch.encode(this.toProto()).finish()})}static unpackAny(t){return Io.fromProto(S.MsgRecordBatch.decode(t.value))}}class ht extends m{constructor(t,e){super(),this.submitter=t,this.chain_type=e}static fromAmino(t){const{submitter:e,chain_type:r}=t;return new ht(e,ie.batchInfo_ChainTypeFromJSON(r))}toAmino(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:ie.batchInfo_ChainTypeToJSON(e)}}static fromData(t){const{submitter:e,chain_type:r}=t;return new ht(e,ie.batchInfo_ChainTypeFromJSON(r))}toData(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:ie.batchInfo_ChainTypeToJSON(e)}}static fromProto(t){return new ht(t.submitter,t.chainType)}toProto(){const{submitter:t,chain_type:e}=this;return ie.BatchInfo.fromPartial({submitter:t,chainType:e})}}class jt extends m{constructor(t,e,r,o,s,n,a,c){super(),this.challenger=t,this.proposer=e,this.batch_info=r,this.submission_interval=o,this.finalization_period=s,this.submission_start_height=n,this.oracle_enabled=a,this.metadata=c}static fromAmino(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:s,finalization_period:n,submission_start_height:a,oracle_enabled:c,metadata:d}=t;return new jt(e,r,ht.fromAmino(o),D.fromAmino(s),D.fromAmino(n),Number.parseInt(a),c,d)}toAmino(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:c}=this;return{challenger:t,proposer:e,batch_info:r.toAmino(),submission_interval:o.toAmino(),finalization_period:s.toAmino(),submission_start_height:n.toString(),oracle_enabled:a,metadata:c}}static fromData(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:s,finalization_period:n,submission_start_height:a,oracle_enabled:c,metadata:d}=t;return new jt(e,r,ht.fromData(o),D.fromData(s),D.fromData(n),Number.parseInt(a),c,d)}toData(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:c}=this;return{challenger:t,proposer:e,batch_info:r.toData(),submission_interval:o.toData(),finalization_period:s.toData(),submission_start_height:n.toString(),oracle_enabled:a,metadata:c}}static fromProto(t){return new jt(t.challenger,t.proposer,ht.fromProto(t.batchInfo),D.fromProto(t.submissionInterval),D.fromProto(t.finalizationPeriod),t.submissionStartHeight.toNumber(),t.oracleEnabled,Buffer.from(t.metadata).toString("base64"))}toProto(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:s,submission_start_height:n,oracle_enabled:a,metadata:c}=this;return ie.BridgeConfig.fromPartial({challenger:t,proposer:e,batchInfo:r.toProto(),submissionInterval:o.toProto(),finalizationPeriod:s.toProto(),submissionStartHeight:f.fromNumber(n),oracleEnabled:a,metadata:c?Buffer.from(c,"base64"):void 0})}}class No extends m{constructor(t,e){super(),this.creator=t,this.config=e}static fromAmino(t){const{value:{creator:e,config:r}}=t;return new No(e,jt.fromAmino(r))}toAmino(){const{creator:t,config:e}=this;return{type:"ophost/MsgCreateBridge",value:{creator:t,config:e.toAmino()}}}static fromData(t){const{creator:e,config:r}=t;return new No(e,jt.fromData(r))}toData(){const{creator:t,config:e}=this;return{"@type":"/opinit.ophost.v1.MsgCreateBridge",creator:t,config:e.toData()}}static fromProto(t){return new No(t.creator,jt.fromProto(t.config))}toProto(){const{creator:t,config:e}=this;return S.MsgCreateBridge.fromPartial({creator:t,config:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgCreateBridge",value:S.MsgCreateBridge.encode(this.toProto()).finish()})}static unpackAny(t){return No.fromProto(S.MsgCreateBridge.decode(t.value))}}class Co extends m{constructor(t,e,r,o,s){super(),this.proposer=t,this.bridge_id=e,this.output_index=r,this.l2_block_number=o,this.output_root=s}static fromAmino(t){const{value:{proposer:e,bridge_id:r,output_index:o,l2_block_number:s,output_root:n}}=t;return new Co(e,Number.parseInt(r),Number.parseInt(o),Number.parseInt(s),n)}toAmino(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:s}=this;return{type:"ophost/MsgProposeOutput",value:{proposer:t,bridge_id:e.toString(),output_index:r.toString(),l2_block_number:o.toString(),output_root:s}}}static fromData(t){const{proposer:e,bridge_id:r,output_index:o,l2_block_number:s,output_root:n}=t;return new Co(e,Number.parseInt(r),Number.parseInt(o),Number.parseInt(s),n)}toData(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:s}=this;return{"@type":"/opinit.ophost.v1.MsgProposeOutput",proposer:t,bridge_id:e.toString(),output_index:r.toString(),l2_block_number:o.toString(),output_root:s}}static fromProto(t){return new Co(t.proposer,t.bridgeId.toNumber(),t.outputIndex.toNumber(),t.l2BlockNumber.toNumber(),Buffer.from(t.outputRoot).toString("base64"))}toProto(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:s}=this;return S.MsgProposeOutput.fromPartial({proposer:t,bridgeId:f.fromNumber(e),outputIndex:f.fromNumber(r),l2BlockNumber:f.fromNumber(o),outputRoot:s?Buffer.from(s,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgProposeOutput",value:S.MsgProposeOutput.encode(this.toProto()).finish()})}static unpackAny(t){return Co.fromProto(S.MsgProposeOutput.decode(t.value))}}class Uo extends m{constructor(t,e,r){super(),this.challenger=t,this.bridge_id=e,this.output_index=r}static fromAmino(t){const{value:{challenger:e,bridge_id:r,output_index:o}}=t;return new Uo(e,Number.parseInt(r),Number.parseInt(o))}toAmino(){const{challenger:t,bridge_id:e,output_index:r}=this;return{type:"ophost/MsgDeleteOutput",value:{challenger:t,bridge_id:e.toString(),output_index:r.toString()}}}static fromData(t){const{challenger:e,bridge_id:r,output_index:o}=t;return new Uo(e,Number.parseInt(r),Number.parseInt(o))}toData(){const{challenger:t,bridge_id:e,output_index:r}=this;return{"@type":"/opinit.ophost.v1.MsgDeleteOutput",challenger:t,bridge_id:e.toString(),output_index:r.toString()}}static fromProto(t){return new Uo(t.challenger,t.bridgeId.toNumber(),t.outputIndex.toNumber())}toProto(){const{challenger:t,bridge_id:e,output_index:r}=this;return S.MsgDeleteOutput.fromPartial({challenger:t,bridgeId:f.fromNumber(e),outputIndex:f.fromNumber(r)})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgDeleteOutput",value:S.MsgDeleteOutput.encode(this.toProto()).finish()})}static unpackAny(t){return Uo.fromProto(S.MsgDeleteOutput.decode(t.value))}}class Eo extends m{constructor(t,e,r,o,s){super(),this.sender=t,this.bridge_id=e,this.to=r,this.amount=o,this.data=s}static fromAmino(t){const{value:{sender:e,bridge_id:r,to:o,amount:s,data:n}}=t;return new Eo(e,Number.parseInt(r),o,_.fromAmino(s),n)}toAmino(){const{sender:t,bridge_id:e,to:r,amount:o,data:s}=this;return{type:"ophost/MsgInitiateTokenDeposit",value:{sender:t,bridge_id:e.toString(),to:r,amount:o.toAmino(),data:s}}}static fromData(t){const{sender:e,bridge_id:r,to:o,amount:s,data:n}=t;return new Eo(e,Number.parseInt(r),o,_.fromData(s),n)}toData(){const{sender:t,bridge_id:e,to:r,amount:o,data:s}=this;return{"@type":"/opinit.ophost.v1.MsgInitiateTokenDeposit",sender:t,bridge_id:e.toString(),to:r,amount:o.toData(),data:s}}static fromProto(t){return new Eo(t.sender,t.bridgeId.toNumber(),t.to,_.fromProto(t.amount),t.data.length?Buffer.from(t.data).toString("base64"):void 0)}toProto(){const{sender:t,bridge_id:e,to:r,amount:o,data:s}=this;return S.MsgInitiateTokenDeposit.fromPartial({sender:t,bridgeId:f.fromNumber(e),to:r,amount:o.toProto(),data:s?Buffer.from(s,"base64"):void 0})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgInitiateTokenDeposit",value:S.MsgInitiateTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return Eo.fromProto(S.MsgInitiateTokenDeposit.decode(t.value))}}class Bo extends m{constructor(t,e,r,o,s,n,a,c,d,h,g){super(),this.sender=t,this.bridge_id=e,this.output_index=r,this.withdrawal_proofs=o,this.from=s,this.to=n,this.sequence=a,this.amount=c,this.version=d,this.storage_root=h,this.last_block_hash=g}static fromAmino(t){const{value:{sender:e,bridge_id:r,output_index:o,withdrawal_proofs:s,from:n,to:a,sequence:c,amount:d,version:h,storage_root:g,last_block_hash:y}}=t;return new Bo(e,Number.parseInt(r),Number.parseInt(o),s,n,a,Number.parseInt(c),_.fromAmino(d),h,g,y)}toAmino(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:s,to:n,sequence:a,amount:c,version:d,storage_root:h,last_block_hash:g}=this;return{type:"ophost/MsgFinalizeTokenWithdrawal",value:{sender:t,bridge_id:e.toString(),output_index:r.toString(),withdrawal_proofs:o,from:s,to:n,sequence:a.toString(),amount:c.toAmino(),version:d,storage_root:h,last_block_hash:g}}}static fromData(t){const{sender:e,bridge_id:r,output_index:o,withdrawal_proofs:s,from:n,to:a,sequence:c,amount:d,version:h,storage_root:g,last_block_hash:y}=t;return new Bo(e,Number.parseInt(r),Number.parseInt(o),s,n,a,Number.parseInt(c),_.fromData(d),h,g,y)}toData(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:s,to:n,sequence:a,amount:c,version:d,storage_root:h,last_block_hash:g}=this;return{"@type":"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",sender:t,bridge_id:e.toString(),output_index:r.toString(),withdrawal_proofs:o,from:s,to:n,sequence:a.toString(),amount:c.toData(),version:d,storage_root:h,last_block_hash:g}}static fromProto(t){return new Bo(t.sender,t.bridgeId.toNumber(),t.outputIndex.toNumber(),t.withdrawalProofs.map(e=>Buffer.from(e).toString("base64")),t.from,t.to,t.sequence.toNumber(),_.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:r,withdrawal_proofs:o,from:s,to:n,sequence:a,amount:c,version:d,storage_root:h,last_block_hash:g}=this;return S.MsgFinalizeTokenWithdrawal.fromPartial({sender:t,bridgeId:f.fromNumber(e),outputIndex:f.fromNumber(r),withdrawalProofs:o.map(y=>Buffer.from(y,"base64")),from:s,to:n,sequence:f.fromNumber(a),amount:c.toProto(),version:Buffer.from(d,"base64"),storageRoot:Buffer.from(h,"base64"),lastBlockHash:Buffer.from(g,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",value:S.MsgFinalizeTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return Bo.fromProto(S.MsgFinalizeTokenWithdrawal.decode(t.value))}}class Oo extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.new_proposer=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,new_proposer:o}}=t;return new Oo(e,Number.parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,new_proposer:r}=this;return{type:"ophost/MsgUpdateProposer",value:{authority:t,bridge_id:e.toString(),new_proposer:r}}}static fromData(t){const{authority:e,bridge_id:r,new_proposer:o}=t;return new Oo(e,Number.parseInt(r),o)}toData(){const{authority:t,bridge_id:e,new_proposer:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateProposer",authority:t,bridge_id:e.toString(),new_proposer:r}}static fromProto(t){return new Oo(t.authority,t.bridgeId.toNumber(),t.newProposer)}toProto(){const{authority:t,bridge_id:e,new_proposer:r}=this;return S.MsgUpdateProposer.fromPartial({authority:t,bridgeId:f.fromNumber(e),newProposer:r})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateProposer",value:S.MsgUpdateProposer.encode(this.toProto()).finish()})}static unpackAny(t){return Oo.fromProto(S.MsgUpdateProposer.decode(t.value))}}class To extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.challenger=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,challenger:o}}=t;return new To(e,Number.parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,challenger:r}=this;return{type:"ophost/MsgUpdateChallenger",value:{authority:t,bridge_id:e.toString(),challenger:r}}}static fromData(t){const{authority:e,bridge_id:r,challenger:o}=t;return new To(e,Number.parseInt(r),o)}toData(){const{authority:t,bridge_id:e,challenger:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateChallenger",authority:t,bridge_id:e.toString(),challenger:r}}static fromProto(t){return new To(t.authority,t.bridgeId.toNumber(),t.challenger)}toProto(){const{authority:t,bridge_id:e,challenger:r}=this;return S.MsgUpdateChallenger.fromPartial({authority:t,bridgeId:f.fromNumber(e),challenger:r})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateChallenger",value:S.MsgUpdateChallenger.encode(this.toProto()).finish()})}static unpackAny(t){return To.fromProto(S.MsgUpdateChallenger.decode(t.value))}}class Ro extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.new_batch_info=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,new_batch_info:o}}=t;return new Ro(e,Number.parseInt(r),ht.fromAmino(o))}toAmino(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return{type:"ophost/MsgUpdateBatchInfo",value:{authority:t,bridge_id:e.toString(),new_batch_info:r.toAmino()}}}static fromData(t){const{authority:e,bridge_id:r,new_batch_info:o}=t;return new Ro(e,Number.parseInt(r),ht.fromData(o))}toData(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateBatchInfo",authority:t,bridge_id:e.toString(),new_batch_info:r.toData()}}static fromProto(t){return new Ro(t.authority,t.bridgeId.toNumber(),ht.fromProto(t.newBatchInfo))}toProto(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return S.MsgUpdateBatchInfo.fromPartial({authority:t,bridgeId:f.fromNumber(e),newBatchInfo:r.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateBatchInfo",value:S.MsgUpdateBatchInfo.encode(this.toProto()).finish()})}static unpackAny(t){return Ro.fromProto(S.MsgUpdateBatchInfo.decode(t.value))}}class qo extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.oracle_enabled=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,oracle_enabled:o}}=t;return new qo(e,Number.parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return{type:"ophost/MsgUpdateOracleConfig",value:{authority:t,bridge_id:e.toString(),oracle_enabled:r}}}static fromData(t){const{authority:e,bridge_id:r,oracle_enabled:o}=t;return new qo(e,Number.parseInt(r),o)}toData(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateOracleConfig",authority:t,bridge_id:e.toString(),oracle_enabled:r}}static fromProto(t){return new qo(t.authority,t.bridgeId.toNumber(),t.oracleEnabled)}toProto(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return S.MsgUpdateOracleConfig.fromPartial({authority:t,bridgeId:f.fromNumber(e),oracleEnabled:r})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateOracleConfig",value:S.MsgUpdateOracleConfig.encode(this.toProto()).finish()})}static unpackAny(t){return qo.fromProto(S.MsgUpdateOracleConfig.decode(t.value))}}class Fo extends m{constructor(t,e,r){super(),this.authority=t,this.bridge_id=e,this.metadata=r}static fromAmino(t){const{value:{authority:e,bridge_id:r,metadata:o}}=t;return new Fo(e,Number.parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,metadata:r}=this;return{type:"ophost/MsgUpdateMetadata",value:{authority:t,bridge_id:e.toString(),metadata:r}}}static fromData(t){const{authority:e,bridge_id:r,metadata:o}=t;return new Fo(e,Number.parseInt(r),o)}toData(){const{authority:t,bridge_id:e,metadata:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateMetadata",authority:t,bridge_id:e.toString(),metadata:r}}static fromProto(t){return new Fo(t.authority,t.bridgeId.toNumber(),Buffer.from(t.metadata).toString("base64"))}toProto(){const{authority:t,bridge_id:e,metadata:r}=this;return S.MsgUpdateMetadata.fromPartial({authority:t,bridgeId:f.fromNumber(e),metadata:Buffer.from(r,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateMetadata",value:S.MsgUpdateMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Fo.fromProto(S.MsgUpdateMetadata.decode(t.value))}}class vs extends m{constructor(e){super();p(this,"registration_fee");this.registration_fee=new u(e)}static fromAmino(e){return new vs(u.fromAmino(e.value.registration_fee))}toAmino(){return{type:"ophost/Params",value:{registration_fee:this.registration_fee.toAmino()}}}static fromData(e){return new vs(u.fromData(e.registration_fee))}toData(){return{"@type":"/opinit.ophost.v1.Params",registration_fee:this.registration_fee.toData()}}static fromProto(e){return new vs(u.fromProto(e.registrationFee))}toProto(){return ie.Params.fromPartial({registrationFee:this.registration_fee.toProto()})}}class $o extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new $o(e,vs.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"ophost/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new $o(e,vs.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new $o(t.authority,vs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return S.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateParams",value:S.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return $o.fromProto(S.MsgUpdateParams.decode(t.value))}}class Yt extends m{constructor(t,e,r,o){super(),this.output_root=t,this.l1_block_number=e,this.l1_block_time=r,this.l2_block_number=o}static fromAmino(t){const{output_root:e,l1_block_number:r,l1_block_time:o,l2_block_number:s}=t;return new Yt(e,Number.parseInt(r),new Date(o),Number.parseInt(s))}toAmino(){const{output_root:t,l1_block_number:e,l1_block_time:r,l2_block_number:o}=this;return{output_root:t,l1_block_number:e.toString(),l1_block_time:r.toISOString(),l2_block_number:o.toString()}}static fromData(t){const{output_root:e,l1_block_number:r,l1_block_time:o,l2_block_number:s}=t;return new Yt(e,Number.parseInt(r),new Date(o),Number.parseInt(s))}toData(){const{output_root:t,l1_block_number:e,l1_block_time:r,l2_block_number:o}=this;return{output_root:t,l1_block_number:e.toString(),l1_block_time:r.toISOString(),l2_block_number:o.toString()}}static fromProto(t){return new Yt(Buffer.from(t.outputRoot).toString("base64"),t.l1BlockNumber.toNumber(),t.l1BlockTime,t.l2BlockNumber.toNumber())}toProto(){const{output_root:t,l1_block_number:e,l1_block_time:r,l2_block_number:o}=this;return ie.Output.fromPartial({outputRoot:Buffer.from(t,"base64"),l1BlockNumber:f.fromNumber(e),l1BlockTime:r,l2BlockNumber:f.fromNumber(o)})}}class ea extends m{constructor(t,e){super(),this.batch_info=t,this.output=e}static fromAmino(t){const{batch_info:e,output:r}=t;return new ea(ht.fromAmino(e),Yt.fromAmino(r))}toAmino(){const{batch_info:t,output:e}=this;return{batch_info:t.toAmino(),output:e.toAmino()}}static fromData(t){const{batch_info:e,output:r}=t;return new ea(ht.fromData(e),Yt.fromData(r))}toData(){const{batch_info:t,output:e}=this;return{batch_info:t.toData(),output:e.toData()}}static fromProto(t){return new ea(ht.fromProto(t.batchInfo),Yt.fromProto(t.output))}toProto(){const{batch_info:t,output:e}=this;return ie.BatchInfoWithOutput.fromPartial({batchInfo:t.toProto(),output:e.toProto()})}}class Qt extends m{constructor(t,e,r,o,s){super(),this.bridge_id=t,this.bridge_addr=e,this.l1_chain_id=r,this.l1_client_id=o,this.bridge_config=s}static fromAmino(t){const{bridge_id:e,bridge_addr:r,l1_chain_id:o,l1_client_id:s,bridge_config:n}=t;return new Qt(Number.parseInt(e),r,o,s,jt.fromAmino(n))}toAmino(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s}=this;return{bridge_id:t.toString(),bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s.toAmino()}}static fromData(t){const{bridge_id:e,bridge_addr:r,l1_chain_id:o,l1_client_id:s,bridge_config:n}=t;return new Qt(Number.parseInt(e),r,o,s,jt.fromData(n))}toData(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s}=this;return{bridge_id:t.toString(),bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s.toData()}}static fromProto(t){return new Qt(t.bridgeId.toNumber(),t.bridgeAddr,t.l1ChainId,t.l1ClientId,jt.fromProto(t.bridgeConfig))}toProto(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:s}=this;return ci.BridgeInfo.fromPartial({bridgeId:f.fromNumber(t),bridgeAddr:e,l1ChainId:r,l1ClientId:o,bridgeConfig:s.toProto()})}}class Lo extends m{constructor(t,e){super(),this.sender=t,this.bridge_info=e}static fromAmino(t){const{value:{sender:e,bridge_info:r}}=t;return new Lo(e,Qt.fromAmino(r))}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:r}=t;return new Lo(e,Qt.fromData(r))}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 Lo(t.sender,Qt.fromProto(t.bridgeInfo))}toProto(){const{sender:t,bridge_info:e}=this;return R.MsgSetBridgeInfo.fromPartial({sender:t,bridgeInfo:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSetBridgeInfo",value:R.MsgSetBridgeInfo.encode(this.toProto()).finish()})}static unpackAny(t){return Lo.fromProto(R.MsgSetBridgeInfo.decode(t.value))}}class zo extends m{constructor(t,e,r){super(),this.sender=t,this.height=e,this.data=r}static fromAmino(t){return new zo(t.value.sender,Number.parseInt(t.value.height),t.value.data)}toAmino(){const{sender:t,height:e,data:r}=this;return{type:"opchild/MsgUpdateOracle",value:{sender:t,height:e.toString(),data:r}}}static fromData(t){return new zo(t.sender,Number.parseInt(t.height),t.data)}toData(){const{sender:t,height:e,data:r}=this;return{"@type":"/opinit.opchild.v1.MsgUpdateOracle",sender:t,height:e.toString(),data:r}}static fromProto(t){return new zo(t.sender,t.height.toNumber(),Buffer.from(t.data).toString("base64"))}toProto(){const{sender:t,height:e,data:r}=this;return R.MsgUpdateOracle.fromPartial({sender:t,height:f.fromNumber(e),data:Buffer.from(r,"base64")})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateOracle",value:R.MsgUpdateOracle.encode(this.toProto()).finish()})}static unpackAny(t){return zo.fromProto(R.MsgUpdateOracle.decode(t.value))}}class bs extends m{constructor(e,r,o,s,n,a){super();p(this,"min_gas_prices");this.max_validators=e,this.historical_entries=r,this.bridge_executors=s,this.admin=n,this.fee_whitelist=a,this.min_gas_prices=new u(o)}static fromAmino(e){const{value:{max_validators:r,historical_entries:o,min_gas_prices:s,bridge_executors:n,admin:a,fee_whitelist:c}}=e;return new bs(r,o,u.fromAmino(s),n,a,c)}toAmino(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:s,admin:n,fee_whitelist:a}=this;return{type:"opchild/Params",value:{max_validators:e,historical_entries:r,min_gas_prices:o.toAmino(),bridge_executors:s,admin:n,fee_whitelist:a}}}static fromData(e){const{max_validators:r,historical_entries:o,min_gas_prices:s,bridge_executors:n,admin:a,fee_whitelist:c}=e;return new bs(r,o,u.fromData(s),n,a,c)}toData(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:s,admin:n,fee_whitelist:a}=this;return{"@type":"/opinit.opchild.v1.Params",max_validators:e,historical_entries:r,min_gas_prices:o.toData(),bridge_executors:s,admin:n,fee_whitelist:a}}static fromProto(e){return new bs(e.maxValidators,e.historicalEntries,u.fromProto(e.minGasPrices),e.bridgeExecutors,e.admin,e.feeWhitelist)}toProto(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:s,admin:n,fee_whitelist:a}=this;return ci.Params.fromPartial({maxValidators:e,historicalEntries:r,minGasPrices:o.toProto(),bridgeExecutors:s,admin:n,feeWhitelist:a})}}class Go extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Go(e,bs.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"opchild/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Go(e,bs.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/opinit.opchild.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Go(t.authority,bs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return R.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateParams",value:R.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Go.fromProto(R.MsgUpdateParams.decode(t.value))}}class An extends m{constructor(t,e,r,o){super(),this.moniker=t,this.operator_address=e,this.consensus_pubkey=r,this.cons_power=o}static fromAmino(t){const{moniker:e,operator_address:r,consensus_pubkey:o,cons_power:s}=t;return new An(e,r,j.fromAmino(o),Number.parseInt(s))}toAmino(){const{moniker:t,operator_address:e,consensus_pubkey:r,cons_power:o}=this;return{moniker:t,operator_address:e,consensus_pubkey:r.toAmino(),cons_power:o.toString()}}static fromData(t){const{moniker:e,operator_address:r,consensus_pubkey:o,cons_power:s}=t;return new An(e,r,j.fromData(o),Number.parseInt(s))}toData(){const{moniker:t,operator_address:e,consensus_pubkey:r,cons_power:o}=this;return{moniker:t,operator_address:e,consensus_pubkey:r.toData(),cons_power:o.toString()}}static fromProto(t){return new An(t.moniker,t.operatorAddress,j.unpackAny(t.consensusPubkey),t.consPower.toNumber())}toProto(){const{moniker:t,operator_address:e,consensus_pubkey:r,cons_power:o}=this;return ci.Validator.fromPartial({moniker:t,operatorAddress:e,consensusPubkey:r.packAny(),consPower:f.fromNumber(o)})}}class As extends m{constructor(t,e,r,o,s){super(),this.reward_denom=t,this.dilution_period=e,this.release_rate=r,this.dilution_rate=o,this.release_enabled=s}static fromAmino(t){const{value:{reward_denom:e,dilution_period:r,release_rate:o,dilution_rate:s,release_enabled:n}}=t;return new As(e,D.fromAmino(r),o,s,n)}toAmino(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:s}=this;return{type:"reward/Params",value:{reward_denom:t,dilution_period:e.toAmino(),release_rate:r,dilution_rate:o,release_enabled:s}}}static fromData(t){const{reward_denom:e,dilution_period:r,release_rate:o,dilution_rate:s,release_enabled:n}=t;return new As(e,D.fromData(r),o,s,n)}toData(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:s}=this;return{"@type":"/initia.reward.v1.Params",reward_denom:t,dilution_period:e.toData(),release_rate:r,dilution_rate:o,release_enabled:s}}static fromProto(t){return new As(t.rewardDenom,D.fromProto(t.dilutionPeriod),t.releaseRate,t.dilutionRate,t.releaseEnabled)}toProto(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:s}=this;return Lc.Params.fromPartial({rewardDenom:t,dilutionPeriod:e.toProto(),releaseRate:r,dilutionRate:o,releaseEnabled:s})}}class Vo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Vo(e,As.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"reward/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new Vo(e,As.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/initia.reward.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Vo(t.authority,As.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return ei.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/initia.reward.v1.MsgUpdateParams",value:ei.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vo.fromProto(ei.MsgUpdateParams.decode(t.value))}}class Ko extends m{constructor(t){super(),this.address=t}static fromAmino(t){const{value:{address:e}}=t;return new Ko(e)}toAmino(){const{address:t}=this;return{type:"cosmos-sdk/MsgUnjail",value:{address:t}}}static fromData(t){const{address:e}=t;return new Ko(e)}toData(){const{address:t}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:t}}static fromProto(t){return new Ko(t.validatorAddr)}toProto(){const{address:t}=this;return Rn.MsgUnjail.fromPartial({validatorAddr:t})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:Rn.MsgUnjail.encode(this.toProto()).finish()})}static unpackAny(t){return Ko.fromProto(Rn.MsgUnjail.decode(t.value))}}class Ps extends m{constructor(t,e,r,o,s){super(),this.signed_blocks_window=t,this.min_signed_per_window=e,this.downtime_jail_duration=r,this.slash_fraction_double_sign=o,this.slash_fraction_downtime=s}static fromAmino(t){const{value:{signed_blocks_window:e,min_signed_per_window:r,downtime_jail_duration:o,slash_fraction_double_sign:s,slash_fraction_downtime:n}}=t;return new Ps(Number.parseInt(e),Number.parseInt(r),D.fromAmino(o),Number.parseInt(s),Number.parseInt(n))}toAmino(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:s}=this;return{type:"cosmos-sdk/x/slashing/Params",value:{signed_blocks_window:t.toString(),min_signed_per_window:e.toString(),downtime_jail_duration:r.toAmino(),slash_fraction_double_sign:o.toString(),slash_fraction_downtime:s.toString()}}}static fromData(t){const{signed_blocks_window:e,min_signed_per_window:r,downtime_jail_duration:o,slash_fraction_double_sign:s,slash_fraction_downtime:n}=t;return new Ps(Number.parseInt(e),Number.parseInt(r),D.fromData(o),Number.parseInt(s),Number.parseInt(n))}toData(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:s}=this;return{"@type":"/cosmos.slashing.v1beta1.Params",signed_blocks_window:t.toString(),min_signed_per_window:e.toString(),downtime_jail_duration:r.toData(),slash_fraction_double_sign:o.toString(),slash_fraction_downtime:s.toString()}}static fromProto(t){return new Ps(t.signedBlocksWindow.toNumber(),Number.parseFloat(t.minSignedPerWindow.toString()),D.fromProto(t.downtimeJailDuration),Number.parseFloat(t.slashFractionDoubleSign.toString()),Number.parseFloat(t.slashFractionDowntime.toString()))}toProto(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:s}=this;return zc.Params.fromPartial({signedBlocksWindow:f.fromNumber(t),minSignedPerWindow:Buffer.from(e.toString()),downtimeJailDuration:r.toProto(),slashFractionDoubleSign:Buffer.from(o.toString()),slashFractionDowntime:Buffer.from(s.toString())})}}class Wo extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Wo(e,Ps.fromAmino(r))}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:r}=t;return new Wo(e,Ps.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new Wo(t.authority,Ps.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Rn.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUpdateParams",value:Rn.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Wo.fromProto(Rn.MsgUpdateParams.decode(t.value))}}class Jo extends m{constructor(t,e){super(),this.sender=t,this.subdenom=e}static fromAmino(t){const{value:{sender:e,subdenom:r}}=t;return new Jo(e,r)}toAmino(){const{sender:t,subdenom:e}=this;return{type:"tokenfactory/MsgCreateDenom",value:{sender:t,subdenom:e}}}static fromData(t){const{sender:e,subdenom:r}=t;return new Jo(e,r)}toData(){const{sender:t,subdenom:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgCreateDenom",sender:t,subdenom:e}}static fromProto(t){return new Jo(t.sender,t.subdenom)}toProto(){const{sender:t,subdenom:e}=this;return $.MsgCreateDenom.fromPartial({sender:t,subdenom:e})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgCreateDenom",value:$.MsgCreateDenom.encode(this.toProto()).finish()})}static unpackAny(t){return Jo.fromProto($.MsgCreateDenom.decode(t.value))}}class Ho extends m{constructor(t,e,r){super(),this.sender=t,this.amount=e,this.mint_to_address=r}static fromAmino(t){const{value:{sender:e,amount:r,mint_to_address:o}}=t;return new Ho(e,_.fromAmino(r),o)}toAmino(){const{sender:t,amount:e,mint_to_address:r}=this;return{type:"tokenfactory/MsgMint",value:{sender:t,amount:e.toAmino(),mint_to_address:r}}}static fromData(t){const{sender:e,amount:r,mint_to_address:o}=t;return new Ho(e,_.fromData(r),o)}toData(){const{sender:t,amount:e,mint_to_address:r}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgMint",sender:t,amount:e.toData(),mint_to_address:r}}static fromProto(t){return new Ho(t.sender,_.fromProto(t.amount),t.mintToAddress)}toProto(){const{sender:t,amount:e,mint_to_address:r}=this;return $.MsgMint.fromPartial({sender:t,amount:e.toProto(),mintToAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgMint",value:$.MsgMint.encode(this.toProto()).finish()})}static unpackAny(t){return Ho.fromProto($.MsgMint.decode(t.value))}}class jo extends m{constructor(t,e,r){super(),this.sender=t,this.amount=e,this.burn_from_address=r}static fromAmino(t){const{value:{sender:e,amount:r,burn_from_address:o}}=t;return new jo(e,_.fromAmino(r),o)}toAmino(){const{sender:t,amount:e,burn_from_address:r}=this;return{type:"tokenfactory/MsgBurn",value:{sender:t,amount:e.toAmino(),burn_from_address:r}}}static fromData(t){const{sender:e,amount:r,burn_from_address:o}=t;return new jo(e,_.fromData(r),o)}toData(){const{sender:t,amount:e,burn_from_address:r}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgBurn",sender:t,amount:e.toData(),burn_from_address:r}}static fromProto(t){return new jo(t.sender,_.fromProto(t.amount),t.burnFromAddress)}toProto(){const{sender:t,amount:e,burn_from_address:r}=this;return $.MsgBurn.fromPartial({sender:t,amount:e.toProto(),burnFromAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgBurn",value:$.MsgBurn.encode(this.toProto()).finish()})}static unpackAny(t){return jo.fromProto($.MsgBurn.decode(t.value))}}class Yo extends m{constructor(t,e,r){super(),this.sender=t,this.denom=e,this.new_admin=r}static fromAmino(t){const{value:{sender:e,denom:r,new_admin:o}}=t;return new Yo(e,r,o)}toAmino(){const{sender:t,denom:e,new_admin:r}=this;return{type:"tokenfactory/MsgChangeAdmin",value:{sender:t,denom:e,new_admin:r}}}static fromData(t){const{sender:e,denom:r,new_admin:o}=t;return new Yo(e,r,o)}toData(){const{sender:t,denom:e,new_admin:r}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgChangeAdmin",sender:t,denom:e,new_admin:r}}static fromProto(t){return new Yo(t.sender,t.denom,t.newAdmin)}toProto(){const{sender:t,denom:e,new_admin:r}=this;return $.MsgChangeAdmin.fromPartial({sender:t,denom:e,newAdmin:r})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgChangeAdmin",value:$.MsgChangeAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Yo.fromProto($.MsgChangeAdmin.decode(t.value))}}class Qo extends m{constructor(t,e){super(),this.sender=t,this.metadata=e}static fromAmino(t){const{value:{sender:e,metadata:r}}=t;return new Qo(e,Vt.fromAmino(r))}toAmino(){const{sender:t,metadata:e}=this;return{type:"tokenfactory/MsgSetDenomMetadata",value:{sender:t,metadata:e.toAmino()}}}static fromData(t){const{sender:e,metadata:r}=t;return new Qo(e,Vt.fromData(r))}toData(){const{sender:t,metadata:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata",sender:t,metadata:e.toData()}}static fromProto(t){return new Qo(t.sender,Vt.fromProto(t.metadata))}toProto(){const{sender:t,metadata:e}=this;return $.MsgSetDenomMetadata.fromPartial({sender:t,metadata:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata",value:$.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Qo.fromProto($.MsgSetDenomMetadata.decode(t.value))}}class Zo extends m{constructor(t,e,r){super(),this.sender=t,this.denom=e,this.cosmwasm_address=r}static fromAmino(t){const{value:{sender:e,denom:r,cosmwasm_address:o}}=t;return new Zo(e,r,o)}toAmino(){const{sender:t,denom:e,cosmwasm_address:r}=this;return{type:"tokenfactory/MsgSetBeforeSendHook",value:{sender:t,denom:e,cosmwasm_address:r}}}static fromData(t){const{sender:e,denom:r,cosmwasm_address:o}=t;return new Zo(e,r,o)}toData(){const{sender:t,denom:e,cosmwasm_address:r}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook",sender:t,denom:e,cosmwasm_address:r}}static fromProto(t){return new Zo(t.sender,t.denom,t.cosmwasmAddress)}toProto(){const{sender:t,denom:e,cosmwasm_address:r}=this;return $.MsgSetBeforeSendHook.fromPartial({sender:t,denom:e,cosmwasmAddress:r})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook",value:$.MsgSetBeforeSendHook.encode(this.toProto()).finish()})}static unpackAny(t){return Zo.fromProto($.MsgSetBeforeSendHook.decode(t.value))}}class Xo extends m{constructor(t,e,r,o){super(),this.sender=t,this.amount=e,this.transfer_from_address=r,this.transfer_to_address=o}static fromAmino(t){const{value:{sender:e,amount:r,transfer_from_address:o,transfer_to_address:s}}=t;return new Xo(e,_.fromAmino(r),o,s)}toAmino(){const{sender:t,amount:e,transfer_from_address:r,transfer_to_address:o}=this;return{type:"tokenfactory/MsgForceTransfer",value:{sender:t,amount:e.toAmino(),transfer_from_address:r,transfer_to_address:o}}}static fromData(t){const{sender:e,amount:r,transfer_from_address:o,transfer_to_address:s}=t;return new Xo(e,_.fromData(r),o,s)}toData(){const{sender:t,amount:e,transfer_from_address:r,transfer_to_address:o}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgForceTransfer",sender:t,amount:e.toData(),transfer_from_address:r,transfer_to_address:o}}static fromProto(t){return new Xo(t.sender,_.fromProto(t.amount),t.transferFromAddress,t.transferToAddress)}toProto(){const{sender:t,amount:e,transfer_from_address:r,transfer_to_address:o}=this;return $.MsgForceTransfer.fromPartial({sender:t,amount:e.toProto(),transferFromAddress:r,transferToAddress:o})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgForceTransfer",value:$.MsgForceTransfer.encode(this.toProto()).finish()})}static unpackAny(t){return Xo.fromProto($.MsgForceTransfer.decode(t.value))}}class ws extends m{constructor(e,r){super();p(this,"denom_creation_fee");this.denom_creation_gas_consume=r,this.denom_creation_fee=new u(e)}static fromAmino(e){const{denom_creation_fee:r,denom_creation_gas_consume:o}=e;return new ws(u.fromAmino(r),Number.parseInt(o))}toAmino(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return{denom_creation_fee:e.toAmino(),denom_creation_gas_consume:r.toString()}}static fromData(e){const{denom_creation_fee:r,denom_creation_gas_consume:o}=e;return new ws(u.fromData(r),Number.parseInt(o))}toData(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return{denom_creation_fee:e.toData(),denom_creation_gas_consume:r.toString()}}static fromProto(e){return new ws(u.fromProto(e.denomCreationFee),e.denomCreationGasConsume.toNumber())}toProto(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return Gc.Params.fromPartial({denomCreationFee:e.toProto(),denomCreationGasConsume:f.fromNumber(r)})}}class ts extends m{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new ts(e,ws.fromAmino(r))}toAmino(){const{authority:t,params:e}=this;return{type:"tokenfactory/MsgUpdateParams",value:{authority:t,params:e.toAmino()}}}static fromData(t){const{authority:e,params:r}=t;return new ts(e,ws.fromData(r))}toData(){const{authority:t,params:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgUpdateParams",authority:t,params:e.toData()}}static fromProto(t){return new ts(t.authority,ws.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return $.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return l.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgUpdateParams",value:$.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ts.fromProto($.MsgUpdateParams.decode(t.value))}}exports.Msg=void 0;(i=>{function t(o){switch(o.type){case"block-sdk/x/auction/MsgAuctionBid":return ce.fromAmino(o);case"block-sdk/x/auction/MsgUpdateParams":return me.fromAmino(o);case"cosmos-sdk/x/auth/MsgUpdateParams":return ue.fromAmino(o);case"cosmos-sdk/MsgGrant":return Ge.fromAmino(o);case"cosmos-sdk/MsgRevoke":return Ve.fromAmino(o);case"cosmos-sdk/MsgExec":return Ke.fromAmino(o);case"cosmos-sdk/MsgSend":return We.fromAmino(o);case"cosmos-sdk/MsgMultiSend":return X.fromAmino(o);case"cosmos-sdk/x/bank/MsgUpdateParams":return Je.fromAmino(o);case"cosmos-sdk/MsgSetSendEnabled":return He.fromAmino(o);case"bank/MsgSetDenomMetadata":return je.fromAmino(o);case"cosmos-sdk/MsgVerifyInvariant":return Qe.fromAmino(o);case"cosmos-sdk/x/crisis/MsgUpdateParams":return Ze.fromAmino(o);case"cosmos-sdk/x/consensus/MsgUpdateParams":return Ye.fromAmino(o);case"cosmos-sdk/MsgModifyWithdrawAddress":return Xe.fromAmino(o);case"cosmos-sdk/MsgWithdrawDelegationReward":return tr.fromAmino(o);case"cosmos-sdk/MsgWithdrawValidatorCommission":return er.fromAmino(o);case"cosmos-sdk/MsgFundCommunityPool":return rr.fromAmino(o);case"distribution/MsgUpdateParams":return or.fromAmino(o);case"cosmos-sdk/distr/MsgCommunityPoolSpend":return sr.fromAmino(o);case"distr/MsgDepositValidatorRewardsPool":return nr.fromAmino(o);case"cosmos-sdk/MsgSubmitEvidence":return ir.fromAmino(o);case"evm/MsgCreate":return cr.fromAmino(o);case"evm/MsgCreate2":return mr.fromAmino(o);case"evm/MsgCall":return ur.fromAmino(o);case"evm/MsgUpdateParams":return dr.fromAmino(o);case"cosmos-sdk/MsgGrantAllowance":return pr.fromAmino(o);case"cosmos-sdk/MsgRevokeAllowance":return hr.fromAmino(o);case"noble/forwarding/RegisterAccount":return fr.fromAmino(o);case"noble/forwarding/ClearAccount":return gr.fromAmino(o);case"cosmos-sdk/v1/MsgCancelProposal":return yr.fromAmino(o);case"cosmos-sdk/MsgDeposit":return _r.fromAmino(o);case"cosmos-sdk/v1/MsgDeposit":return vr.fromAmino(o);case"cosmos-sdk/MsgSubmitProposal":return wr.fromAmino(o);case"cosmos-sdk/v1/MsgSubmitProposal":return Dr.fromAmino(o);case"cosmos-sdk/MsgVote":return Bt.fromAmino(o);case"cosmos-sdk/v1/MsgVote":return Ot.fromAmino(o);case"cosmos-sdk/MsgVoteWeighted":return kr.fromAmino(o);case"cosmos-sdk/v1/MsgVoteWeighted":return Mr.fromAmino(o);case"gov/MsgUpdateParams":return xr.fromAmino(o);case"cosmos-sdk/MsgCreateGroup":return Sr.fromAmino(o);case"cosmos-sdk/MsgCreateGroupPolicy":return Cr.fromAmino(o);case"cosmos-sdk/MsgCreateGroupWithPolicy":return Ur.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupAdmin":return Or.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupDecisionPolicy":return Tr.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMembers":return Rr.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMetadata":return qr.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyAdmin":return Fr.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyMetadata":return $r.fromAmino(o);case"cosmos-sdk/group/MsgExec":return Er.fromAmino(o);case"cosmos-sdk/group/MsgLeaveGroup":return Br.fromAmino(o);case"cosmos-sdk/group/MsgSubmitProposal":return Rt.fromAmino(o);case"cosmos-sdk/group/MsgVote":return Tt.fromAmino(o);case"ibchooks/MsgUpdateACL":return zr.fromAmino(o);case"ibchooks/MsgUpdateParams":return Gr.fromAmino(o);case"nft-transfer/MsgTransfer":return Vr.fromAmino(o);case"nft-transfer/MsgUpdateParams":return Kr.fromAmino(o);case"ibc-perm/MsgUpdateAdmin":return Wr.fromAmino(o);case"ibc-perm/MsgUpdatePermissionedRelayers":return Jr.fromAmino(o);case"cosmos-sdk/MsgTransfer":return ze.fromAmino(o);case"intertx/MsgRegisterAccount":return Yr.fromAmino(o);case"intertx/MsgSubmitTx":return Qr.fromAmino(o);case"connect/x/marketmap/MsgCreateMarkets":return to.fromAmino(o);case"connect/x/marketmap/MsgUpdateMarkets":return eo.fromAmino(o);case"connect/x/marketmap/MsgUpsertMarkets":return ro.fromAmino(o);case"connect/x/marketmap/MsgRemoveMarketAuthorities":return oo.fromAmino(o);case"connect/x/marketmap/MsgParams":return so.fromAmino(o);case"move/MsgPublish":return qt.fromAmino(o);case"move/MsgExecute":return no.fromAmino(o);case"move/MsgExecuteJSON":return ao.fromAmino(o);case"move/MsgScript":return io.fromAmino(o);case"move/MsgScriptJSON":return co.fromAmino(o);case"move/MsgUpdateParams":return mo.fromAmino(o);case"move/MsgWhitelist":return uo.fromAmino(o);case"move/MsgDelist":return lo.fromAmino(o);case"move/MsgGovExecute":return po.fromAmino(o);case"move/MsgGovExecuteJSON":return ho.fromAmino(o);case"move/MsgGovPublish":return Ft.fromAmino(o);case"move/MsgGovScript":return fo.fromAmino(o);case"move/MsgGovScriptJSON":return go.fromAmino(o);case"mstaking/MsgDelegate":return yo.fromAmino(o);case"mstaking/MsgUndelegate":return _o.fromAmino(o);case"mstaking/MsgBeginRedelegate":return vo.fromAmino(o);case"mstaking/MsgCreateValidator":return bo.fromAmino(o);case"mstaking/MsgEditValidator":return $t.fromAmino(o);case"mstaking/MsgCancelUnbondingDelegation":return Ao.fromAmino(o);case"mstaking/MsgUpdateParams":return Po.fromAmino(o);case"opchild/MsgAddValidator":return wo.fromAmino(o);case"opchild/MsgRemoveValidator":return Do.fromAmino(o);case"opchild/MsgFinalizeTokenDeposit":return ko.fromAmino(o);case"opchild/MsgInitiateTokenWithdrawal":return Mo.fromAmino(o);case"opchild/MsgExecuteMessages":return xo.fromAmino(o);case"opchild/MsgSpendFeePool":return So.fromAmino(o);case"opchild/MsgSetBridgeInfo":return Lo.fromAmino(o);case"opchild/MsgUpdateOracle":return zo.fromAmino(o);case"opchild/MsgUpdateParams":return Go.fromAmino(o);case"ophost/MsgRecordBatch":return Io.fromAmino(o);case"ophost/MsgCreateBridge":return No.fromAmino(o);case"ophost/MsgProposeOutput":return Co.fromAmino(o);case"ophost/MsgDeleteOutput":return Uo.fromAmino(o);case"ophost/MsgInitiateTokenDeposit":return Eo.fromAmino(o);case"ophost/MsgFinalizeTokenWithdrawal":return Bo.fromAmino(o);case"ophost/MsgUpdateProposer":return Oo.fromAmino(o);case"ophost/MsgUpdateChallenger":return To.fromAmino(o);case"ophost/MsgUpdateBatchInfo":return Ro.fromAmino(o);case"ophost/MsgUpdateOracleConfig":return qo.fromAmino(o);case"ophost/MsgUpdateMetadata":return Fo.fromAmino(o);case"ophost/MsgUpdateParams":return $o.fromAmino(o);case"connect/x/oracle/MsgAddCurrencyPairs":return Zr.fromAmino(o);case"connect/x/oracle/MsgRemoveCurrencyPairs":return Xr.fromAmino(o);case"reward/MsgUpdateParams":return Vo.fromAmino(o);case"cosmos-sdk/MsgUnjail":return Ko.fromAmino(o);case"cosmos-sdk/x/slashing/MsgUpdateParams":return Wo.fromAmino(o);case"tokenfactory/MsgCreateDenom":return Jo.fromAmino(o);case"tokenfactory/MsgMint":return Ho.fromAmino(o);case"tokenfactory/MsgBurn":return jo.fromAmino(o);case"tokenfactory/MsgChangeAdmin":return Yo.fromAmino(o);case"tokenfactory/MsgSetDenomMetadata":return Qo.fromAmino(o);case"tokenfactory/MsgSetBeforeSendHook":return Zo.fromAmino(o);case"tokenfactory/MsgForceTransfer":return Xo.fromAmino(o);case"tokenfactory/MsgUpdateParams":return ts.fromAmino(o);case"cosmos-sdk/MsgSoftwareUpgrade":return Hr.fromAmino(o);case"cosmos-sdk/MsgCancelUpgrade":return jr.fromAmino(o);case"wasm/MsgStoreCode":return ke.fromAmino(o);case"wasm/MsgInstantiateContract":return Me.fromAmino(o);case"wasm/MsgInstantiateContract2":return xe.fromAmino(o);case"wasm/MsgExecuteContract":return Se.fromAmino(o);case"wasm/MsgMigrateContract":return Ie.fromAmino(o);case"wasm/MsgUpdateAdmin":return Ne.fromAmino(o);case"wasm/MsgClearAdmin":return Ce.fromAmino(o);case"wasm/MsgUpdateInstantiateConfig":return Ue.fromAmino(o);case"wasm/MsgUpdateParams":return Ee.fromAmino(o);case"wasm/MsgSudoContract":return Be.fromAmino(o);case"wasm/MsgPinCodes":return Oe.fromAmino(o);case"wasm/MsgUnpinCodes":return Te.fromAmino(o);case"wasm/MsgStoreAndInstantiateContract":return Re.fromAmino(o);case"wasm/MsgStoreAndMigrateContract":return qe.fromAmino(o);case"wasm/MsgAddCodeUploadParamsAddresses":return Fe.fromAmino(o);case"wasm/MsgRemoveCodeUploadParamsAddresses":return $e.fromAmino(o);case"wasm/MsgUpdateContractLabel":return Le.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/sdk.auction.v1.MsgAuctionBid":return ce.fromData(o);case"/sdk.auction.v1.MsgUpdateParams":return me.fromData(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return ue.fromData(o);case"/cosmos.authz.v1beta1.MsgGrant":return Ge.fromData(o);case"/cosmos.authz.v1beta1.MsgRevoke":return Ve.fromData(o);case"/cosmos.authz.v1beta1.MsgExec":return Ke.fromData(o);case"/cosmos.bank.v1beta1.MsgSend":return We.fromData(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return X.fromData(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return Je.fromData(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return He.fromData(o);case"/initia.bank.v1.MsgSetDenomMetadata":return je.fromData(o);case"/celestia.blob.v1.MsgPayForBlobs":return Zs.fromData(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Ye.fromData(o);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return Qe.fromData(o);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return Ze.fromData(o);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return Xe.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return tr.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return er.fromData(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return rr.fromData(o);case"/initia.distribution.v1.MsgUpdateParams":return or.fromData(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return sr.fromData(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return nr.fromData(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return ir.fromData(o);case"/minievm.evm.v1.MsgCreate":return cr.fromData(o);case"/minievm.evm.v1.MsgCreate2":return mr.fromData(o);case"/minievm.evm.v1.MsgCall":return ur.fromData(o);case"/minievm.evm.v1.MsgUpdateParams":return dr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return pr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return hr.fromData(o);case"/noble.forwarding.v1.MsgRegisterAccount":return fr.fromData(o);case"/noble.forwarding.v1.MsgClearAccount":return gr.fromData(o);case"/cosmos.gov.v1.MsgCancelProposal":return yr.fromData(o);case"/cosmos.gov.v1beta1.MsgDeposit":return _r.fromData(o);case"/cosmos.gov.v1.MsgDeposit":return vr.fromData(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return wr.fromData(o);case"/cosmos.gov.v1.MsgSubmitProposal":return Dr.fromData(o);case"/cosmos.gov.v1beta1.MsgVote":return Bt.fromData(o);case"/cosmos.gov.v1.MsgVote":return Ot.fromData(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return kr.fromData(o);case"/cosmos.gov.v1.MsgVoteWeighted":return Mr.fromData(o);case"/initia.gov.v1.MsgUpdateParams":return xr.fromData(o);case"/cosmos.group.v1.MsgCreateGroup":return Sr.fromData(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return Cr.fromData(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return Ur.fromData(o);case"/cosmos.group.v1.MsgExec":return Er.fromData(o);case"/cosmos.group.v1.MsgLeaveGroup":return Br.fromData(o);case"/cosmos.group.v1.MsgSubmitProposal":return Rt.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return Or.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return Rr.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return qr.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return Fr.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return Tr.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return $r.fromData(o);case"/cosmos.group.v1.MsgVote":return Tt.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return tn.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return en.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return on.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return rn.fromData(o);case"/initia.ibchooks.v1.MsgUpdateACL":return zr.fromData(o);case"/initia.ibchooks.v1.MsgUpdateParams":return Gr.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Vr.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return Kr.fromData(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return Wr.fromData(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return Jr.fromData(o);case"/ibc.applications.transfer.v1.MsgTransfer":return ze.fromData(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return Ys.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return an.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return dn.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return ln.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return pn.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return hn.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return fn.fromData(o);case"/ibc.core.channel.v1.MsgRecvPacket":return gn.fromData(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return yn.fromData(o);case"/ibc.core.channel.v1.MsgTimeout":return _n.fromData(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return vn.fromData(o);case"/ibc.core.channel.v1.MsgUpdateParams":return bn.fromData(o);case"/ibc.core.client.v1.MsgCreateClient":return zn.fromData(o);case"/ibc.core.client.v1.MsgUpdateClient":return Gn.fromData(o);case"/ibc.core.client.v1.MsgUpgradeClient":return Vn.fromData(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return Kn.fromData(o);case"/ibc.core.client.v1.MsgRecoverClient":return Wn.fromData(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return Jn.fromData(o);case"/ibc.core.client.v1.MsgUpdateParams":return Hn.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return jn.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Yn.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Qn.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Zn.fromData(o);case"/ibc.core.connection.v1.MsgUpdateParams":return Xn.fromData(o);case"/initia.intertx.v1.MsgRegisterAccount":return Yr.fromData(o);case"/initia.intertx.v1.MsgSubmitTx":return Qr.fromData(o);case"/connect.marketmap.v2.MsgCreateMarkets":return to.fromData(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return eo.fromData(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return ro.fromData(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return oo.fromData(o);case"/connect.marketmap.v2.MsgParams":return so.fromData(o);case"/initia.move.v1.MsgPublish":return qt.fromData(o);case"/initia.move.v1.MsgExecute":return no.fromData(o);case"/initia.move.v1.MsgExecuteJSON":return ao.fromData(o);case"/initia.move.v1.MsgScript":return io.fromData(o);case"/initia.move.v1.MsgScriptJSON":return co.fromData(o);case"/initia.move.v1.MsgUpdateParams":return mo.fromData(o);case"/initia.move.v1.MsgWhitelist":return uo.fromData(o);case"/initia.move.v1.MsgDelist":return lo.fromData(o);case"/initia.move.v1.MsgGovExecute":return po.fromData(o);case"/initia.move.v1.MsgGovExecuteJSON":return ho.fromData(o);case"/initia.move.v1.MsgGovPublish":return Ft.fromData(o);case"/initia.move.v1.MsgGovScript":return fo.fromData(o);case"/initia.move.v1.MsgGovScriptJSON":return go.fromData(o);case"/initia.mstaking.v1.MsgDelegate":return yo.fromData(o);case"/initia.mstaking.v1.MsgUndelegate":return _o.fromData(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return vo.fromData(o);case"/initia.mstaking.v1.MsgCreateValidator":return bo.fromData(o);case"/initia.mstaking.v1.MsgEditValidator":return $t.fromData(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return Ao.fromData(o);case"/initia.mstaking.v1.MsgUpdateParams":return Po.fromData(o);case"/opinit.opchild.v1.MsgAddValidator":return wo.fromData(o);case"/opinit.opchild.v1.MsgRemoveValidator":return Do.fromData(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return ko.fromData(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return Mo.fromData(o);case"/opinit.opchild.v1.MsgExecuteMessages":return xo.fromData(o);case"/opinit.opchild.v1.MsgSpendFeePool":return So.fromData(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return Lo.fromData(o);case"/opinit.opchild.v1.MsgUpdateOracle":return zo.fromData(o);case"/opinit.opchild.v1.MsgUpdateParams":return Go.fromData(o);case"/opinit.ophost.v1.MsgRecordBatch":return Io.fromData(o);case"/opinit.ophost.v1.MsgCreateBridge":return No.fromData(o);case"/opinit.ophost.v1.MsgProposeOutput":return Co.fromData(o);case"/opinit.ophost.v1.MsgDeleteOutput":return Uo.fromData(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return Eo.fromData(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return Bo.fromData(o);case"/opinit.ophost.v1.MsgUpdateProposer":return Oo.fromData(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return To.fromData(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return Ro.fromData(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return qo.fromData(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return Fo.fromData(o);case"/opinit.ophost.v1.MsgUpdateParams":return $o.fromData(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Zr.fromData(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Xr.fromData(o);case"/initia.reward.v1.MsgUpdateParams":return Vo.fromData(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return Ko.fromData(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Wo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Jo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgMint":return Ho.fromData(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return jo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return Yo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return Qo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return Zo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgForceTransfer":return Xo.fromData(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return ts.fromData(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Hr.fromData(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return jr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return ke.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return Me.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return xe.fromData(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return Se.fromData(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return Ie.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return Ne.fromData(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return Ce.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return Ue.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return Ee.fromData(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return Be.fromData(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return Oe.fromData(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return Te.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return Re.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return qe.fromData(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return Fe.fromData(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return $e.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return Le.fromData(o)}}i.fromData=e;function r(o){switch(o.typeUrl){case"/sdk.auction.v1.MsgAuctionBid":return ce.unpackAny(o);case"/sdk.auction.v1.MsgUpdateParams":return me.unpackAny(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return ue.unpackAny(o);case"/cosmos.authz.v1beta1.MsgGrant":return Ge.unpackAny(o);case"/cosmos.authz.v1beta1.MsgRevoke":return Ve.unpackAny(o);case"/cosmos.authz.v1beta1.MsgExec":return Ke.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSend":return We.unpackAny(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return X.unpackAny(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return Je.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return He.unpackAny(o);case"/initia.bank.v1.MsgSetDenomMetadata":return je.unpackAny(o);case"/celestia.blob.v1.MsgPayForBlobs":return Zs.unpackAny(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Ye.unpackAny(o);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return Qe.unpackAny(o);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return Ze.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return Xe.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return tr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return er.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return rr.unpackAny(o);case"/initia.distribution.v1.MsgUpdateParams":return or.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return sr.unpackAny(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return nr.unpackAny(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return ir.unpackAny(o);case"/minievm.evm.v1.MsgCreate":return cr.unpackAny(o);case"/minievm.evm.v1.MsgCreate2":return mr.unpackAny(o);case"/minievm.evm.v1.MsgCall":return ur.unpackAny(o);case"/minievm.evm.v1.MsgUpdateParams":return dr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return pr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return hr.unpackAny(o);case"/noble.forwarding.v1.MsgRegisterAccount":return fr.unpackAny(o);case"/noble.forwarding.v1.MsgClearAccount":return gr.unpackAny(o);case"/cosmos.gov.v1.MsgCancelProposal":return yr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgDeposit":return _r.unpackAny(o);case"/cosmos.gov.v1.MsgDeposit":return vr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return wr.unpackAny(o);case"/cosmos.gov.v1.MsgSubmitProposal":return Dr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVote":return Bt.unpackAny(o);case"/cosmos.gov.v1.MsgVote":return Ot.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return kr.unpackAny(o);case"/cosmos.gov.v1.MsgVoteWeighted":return Mr.unpackAny(o);case"/initia.gov.v1.MsgUpdateParams":return xr.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroup":return Sr.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return Cr.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return Ur.unpackAny(o);case"/cosmos.group.v1.MsgExec":return Er.unpackAny(o);case"/cosmos.group.v1.MsgLeaveGroup":return Br.unpackAny(o);case"/cosmos.group.v1.MsgSubmitProposal":return Rt.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return Or.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return Rr.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return qr.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return Fr.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return Tr.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return $r.unpackAny(o);case"/cosmos.group.v1.MsgVote":return Tt.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return tn.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return en.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return on.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return rn.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateACL":return zr.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateParams":return Gr.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Vr.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return Kr.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return Wr.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return Jr.unpackAny(o);case"/ibc.applications.transfer.v1.MsgTransfer":return ze.unpackAny(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return Ys.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return an.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return dn.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return ln.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return pn.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return hn.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return fn.unpackAny(o);case"/ibc.core.channel.v1.MsgRecvPacket":return gn.unpackAny(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return yn.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeout":return _n.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return vn.unpackAny(o);case"/ibc.core.channel.v1.MsgUpdateParams":return bn.unpackAny(o);case"/ibc.core.client.v1.MsgCreateClient":return zn.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateClient":return Gn.unpackAny(o);case"/ibc.core.client.v1.MsgUpgradeClient":return Vn.unpackAny(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return Kn.unpackAny(o);case"/ibc.core.client.v1.MsgRecoverClient":return Wn.unpackAny(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return Jn.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateParams":return Hn.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return jn.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Yn.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Qn.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Zn.unpackAny(o);case"/ibc.core.connection.v1.MsgUpdateParams":return Xn.unpackAny(o);case"/initia.intertx.v1.MsgRegisterAccount":return Yr.unpackAny(o);case"/initia.intertx.v1.MsgSubmitTx":return Qr.unpackAny(o);case"/connect.marketmap.v2.MsgCreateMarkets":return to.unpackAny(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return eo.unpackAny(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return ro.unpackAny(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return oo.unpackAny(o);case"/connect.marketmap.v2.MsgParams":return so.unpackAny(o);case"/initia.move.v1.MsgPublish":return qt.unpackAny(o);case"/initia.move.v1.MsgExecute":return no.unpackAny(o);case"/initia.move.v1.MsgExecuteJSON":return ao.unpackAny(o);case"/initia.move.v1.MsgScript":return io.unpackAny(o);case"/initia.move.v1.MsgScriptJSON":return co.unpackAny(o);case"/initia.move.v1.MsgUpdateParams":return mo.unpackAny(o);case"/initia.move.v1.MsgWhitelist":return uo.unpackAny(o);case"/initia.move.v1.MsgDelist":return lo.unpackAny(o);case"/initia.move.v1.MsgGovExecute":return po.unpackAny(o);case"/initia.move.v1.MsgGovExecuteJSON":return ho.unpackAny(o);case"/initia.move.v1.MsgGovPublish":return Ft.unpackAny(o);case"/initia.move.v1.MsgGovScript":return fo.unpackAny(o);case"/initia.move.v1.MsgGovScriptJSON":return go.unpackAny(o);case"/initia.mstaking.v1.MsgDelegate":return yo.unpackAny(o);case"/initia.mstaking.v1.MsgUndelegate":return _o.unpackAny(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return vo.unpackAny(o);case"/initia.mstaking.v1.MsgCreateValidator":return bo.unpackAny(o);case"/initia.mstaking.v1.MsgEditValidator":return $t.unpackAny(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return Ao.unpackAny(o);case"/initia.mstaking.v1.MsgUpdateParams":return Po.unpackAny(o);case"/opinit.opchild.v1.MsgAddValidator":return wo.unpackAny(o);case"/opinit.opchild.v1.MsgRemoveValidator":return Do.unpackAny(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return ko.unpackAny(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return Mo.unpackAny(o);case"/opinit.opchild.v1.MsgExecuteMessages":return xo.unpackAny(o);case"/opinit.opchild.v1.MsgSpendFeePool":return So.unpackAny(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return Lo.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateOracle":return zo.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateParams":return Go.unpackAny(o);case"/opinit.ophost.v1.MsgRecordBatch":return Io.unpackAny(o);case"/opinit.ophost.v1.MsgCreateBridge":return No.unpackAny(o);case"/opinit.ophost.v1.MsgProposeOutput":return Co.unpackAny(o);case"/opinit.ophost.v1.MsgDeleteOutput":return Uo.unpackAny(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return Eo.unpackAny(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return Bo.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateProposer":return Oo.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return To.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return Ro.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return qo.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return Fo.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateParams":return $o.unpackAny(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Zr.unpackAny(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Xr.unpackAny(o);case"/initia.reward.v1.MsgUpdateParams":return Vo.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return Ko.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Wo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Jo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgMint":return Ho.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return jo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return Yo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return Qo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return Zo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgForceTransfer":return Xo.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return ts.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Hr.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return jr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return ke.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return Me.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return xe.unpackAny(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return Se.unpackAny(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return Ie.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return Ne.unpackAny(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return Ce.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return Ue.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return Ee.unpackAny(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return Be.unpackAny(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return Oe.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return Te.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return Re.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return qe.unpackAny(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return Fe.unpackAny(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return $e.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return Le.unpackAny(o);default:throw new Error(`not supported msg ${o.typeUrl}`)}}i.fromProto=r})(exports.Msg||(exports.Msg={}));function aa(i,t,e){try{return E.bech32.decode(t).prefix===i&&t.length==e}catch{return!1}}exports.AccAddress=void 0;(i=>{function t(n){return aa("init",n,43)||aa("init",n,63)}i.validate=t;function e(n){const a=E.bech32.decode(n);return E.bech32.encode("init",a.words)}i.fromValAddress=e;function r(n){const a=E.bech32.decode(n);return"0x"+Buffer.from(E.bech32.fromWords(a.words)).toString("hex")}i.toHex=r;function o(n){const a=n.replace(/^0x0+|^0x|^0+(?!x)/,"");return a.length<=40?E.bech32.encode("init",E.bech32.toWords(Buffer.from(a.padStart(40,"0"),"hex"))):E.bech32.encode("init",E.bech32.toWords(Buffer.from(a.padStart(64,"0"),"hex")))}i.fromHex=o;function s(n){const a=E.bech32.decode(n);return Buffer.from(E.bech32.fromWords(a.words))}i.toBuffer=s})(exports.AccAddress||(exports.AccAddress={}));exports.AccPubKey=void 0;(i=>{function t(r){return aa("initpub",r,46)}i.validate=t;function e(r){const o=E.bech32.decode(r);return E.bech32.encode("initpub",o.words)}i.fromAccAddress=e})(exports.AccPubKey||(exports.AccPubKey={}));exports.ValAddress=void 0;(i=>{function t(r){return aa("initvaloper",r,50)}i.validate=t;function e(r){const o=E.bech32.decode(r);return E.bech32.encode("initvaloper",o.words)}i.fromAccAddress=e})(exports.ValAddress||(exports.ValAddress={}));exports.ValPubKey=void 0;(i=>{function t(r){return aa("initvaloperpub",r,53)}i.validate=t;function e(r){const o=E.bech32.decode(r);return E.bech32.encode("initvaloperpub",o.words)}i.fromValAddress=e})(exports.ValPubKey||(exports.ValPubKey={}));exports.ValConsAddress=void 0;(i=>{function t(e){return aa("initvalcons",e,50)}i.validate=t})(exports.ValConsAddress||(exports.ValConsAddress={}));class em{constructor(t){p(this,"bitarray");p(this,"signatures");this.multisig_pubkey=t;const e=t.pubkeys.length;this.bitarray=is.fromBits(e),this.signatures=[]}appendSignature(t,e){const r=this.bitarray.numTrueBitsBefore(e);if(this.bitarray.getIndex(e)){this.signatures[r]=t;return}if(this.bitarray.setIndex(e,!0),r==this.signatures.length){this.signatures.push(t);return}this.signatures.splice(r,0,t)}appendSignatureFromPubKey(t,e){const r=this.multisig_pubkey.pubkeys.findIndex(o=>o.key===e.key);if(r==-1)throw new Error("provided key doesn't exist in public_keys");this.appendSignature(t,r)}appendSignatureV2s(t){for(const e of t){if(!(e.public_key instanceof Q))throw new Error("non-SimplePublicKey cannot be used to sign multisig");this.appendSignatureFromPubKey(e.data,e.public_key)}}toSignatureDescriptor(){return new V.Descriptor(new V.Descriptor.Multi(this.bitarray,this.signatures))}}class $i extends m{constructor(t,e,r,o,s){super(),this.chain_id=t,this.account_number=e,this.sequence=r,this.auth_info=o,this.tx_body=s}toAmino(){const{chain_id:t,account_number:e,sequence:r,tx_body:{memo:o,messages:s,timeout_height:n},auth_info:{fee:a}}=this;return{chain_id:t,account_number:e.toString(),sequence:r.toString(),timeout_height:n&&n!==0?n.toString():void 0,fee:a.toAmino(),msgs:s.map(c=>c.toAmino()),memo:o??""}}toData(){const{account_number:t,chain_id:e,tx_body:r,auth_info:o}=this;return{body_bytes:Buffer.from(r.toBytes()).toString("base64"),auth_info_bytes:Buffer.from(o.toBytes()).toString("base64"),account_number:t.toFixed(),chain_id:e}}toProto(){const{account_number:t,chain_id:e,tx_body:r,auth_info:o}=this;return rt.SignDoc.fromPartial({bodyBytes:r.toBytes(),authInfoBytes:o.toBytes(),accountNumber:f.fromNumber(t),chainId:e})}toUnSignedTx(){return new tt(this.tx_body,this.auth_info,[])}toBytes(){return rt.SignDoc.encode(this.toProto()).finish()}}class ia{constructor(t,e,r,o,s,n,a,c,d,h,g){this.height=t,this.txhash=e,this.raw_log=r,this.logs=o,this.gas_wanted=s,this.gas_used=n,this.tx=a,this.timestamp=c,this.events=d,this.code=h,this.codespace=g}static fromProto(t){return new ia(t.height.toNumber(),t.txhash,t.rawLog,t.logs.map(e=>Pn.fromProto(e)),t.gasWanted.toNumber(),t.gasUsed.toNumber(),tt.unpackAny(t.tx),t.timestamp,t.events,t.code,t.codespace)}static fromData(t){return new ia(Number.parseInt(t.height),t.txhash,t.raw_log,t.logs.map(e=>Pn.fromData(e)),Number.parseInt(t.gas_wanted),Number.parseInt(t.gas_used),tt.fromData(t.tx),t.timestamp,t.events,t.code,t.codespace)}}exports.EventsByType=void 0;(i=>{function t(e){const r={};return e.forEach(o=>{o.attributes.forEach(s=>{o.type in r||(r[o.type]=new Map),s.key in r[o.type]||r[o.type].set(s.key,[]),r[o.type].get(s.key).push(s.value)})}),r}i.parse=t})(exports.EventsByType||(exports.EventsByType={}));class Pn{constructor(t,e,r){p(this,"eventsByType");this.msg_index=t,this.log=e,this.events=r,this.eventsByType=exports.EventsByType.parse(this.events)}static fromData(t){return new Pn(t.msg_index,t.log,t.events.map(e=>({type:e.type,attributes:e.attributes.map(r=>({key:r.key,value:r.value}))})))}toData(){const{msg_index:t,log:e,events:r,eventsByType:o}=this;return{msg_index:t,log:e,events:r,eventsByType:o}}static fromProto(t){return new Pn(t.msgIndex,t.log,t.events.map(e=>({type:e.type,attributes:e.attributes.map(r=>({key:r.key,value:r.value}))})))}toProto(){const{msg_index:t,log:e,events:r}=this;return Vc.ABCIMessageLog.fromPartial({msgIndex:t,log:e,events:r})}}class Li extends U{async accountInfo(t,e={}){const{account:r}=await this.c.get(`/cosmos/auth/v1beta1/accounts/${t}`,e);return exports.Account.fromData(r)}async moduleAccount(t,e={}){const{account:r}=await this.c.get(`/cosmos/auth/v1beta1/module_accounts/${t}`,e);return te.fromData(r)}async parameters(t={}){return this.c.get("/cosmos/auth/v1beta1/params",t).then(({params:e})=>ss.fromData(e))}}class zi extends U{async grants(t,e,r,o={}){return this.c.get("/cosmos/authz/v1beta1/grants",Object.assign({granter:t,grantee:e,msg_type_url:r},o)).then(s=>[s.grants.map(zt.fromData),s.pagination])}async granter(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/granter/${t}`,e).then(r=>[r.grants.map(o=>zt.fromData(o)),r.pagination])}async grantee(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/grantee/${t}`,e).then(r=>[r.grants.map(o=>zt.fromData(o)),r.pagination])}}class Gi extends U{async balance(t,e={}){return this.c.get(`/cosmos/bank/v1beta1/balances/${t}`,e).then(r=>[u.fromData(r.balances),r.pagination])}async balanceByDenom(t,e,r={}){return this.c.get(`/cosmos/bank/v1beta1/balances/${t}/by_denom`,{...r,denom:e}).then(o=>_.fromData(o.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(r=>[u.fromData(r.balances),r.pagination])}async parameters(t={}){return this.c.get("/cosmos/bank/v1beta1/params",t).then(({params:e})=>as.fromData(e))}}class Vi extends U{async rewards(t,e={}){const r=await this.c.get(`/initia/distribution/v1/delegators/${t}/rewards`,e),o={};for(const s of r.rewards)o[s.validator_address]=s.reward.map(n=>({denom:n.denom,coins:u.fromData(n.dec_coins)}));return{rewards:o,total:r.total.map(s=>({denom:s.denom,coins:u.fromData(s.dec_coins)}))}}async rewardsByValidator(t,e,r={}){return this.c.get(`/initia/distribution/v1/delegators/${t}/rewards/${e}`,r).then(o=>o.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(r=>r.rewards.rewards.map(o=>({denom:o.denom,coins:u.fromData(o.dec_coins)})))}async validatorCommission(t,e={}){return this.c.get(`/initia/distribution/v1/validators/${t}/commission`,e).then(r=>r.commission.commissions.map(o=>({denom:o.denom,coins:u.fromData(o.dec_coins)})))}async withdrawAddress(t,e={}){return this.c.get(`/cosmos/distribution/v1beta1/delegators/${t}/withdraw_address`,e).then(r=>r.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(({params:e})=>ms.fromData(e))}}class Ki extends U{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(r=>exports.Evidence.fromData(r.evidence))}}class Wi extends U{async code(t,e={}){return this.c.get(`/minievm/evm/v1/codes/${t}`,e).then(r=>r.code)}async state(t,e,r={}){return this.c.get(`/minievm/evm/v1/states/${t}/${e}`,r).then(o=>o.value)}async erc20Factory(t={}){return this.c.get("/minievm/evm/v1/contracts/erc20_factory",t).then(e=>e.address)}async contractAddrByDenom(t,e={}){return this.c.get("/minievm/evm/v1/contracts/by_denom",{...e,denom:t}).then(r=>r.address)}async denom(t,e={}){return this.c.get(`/minievm/evm/v1/denoms/${t}`,e).then(r=>r.denom)}async call(t,e,r,o){return this.c.post("/minievm/evm/v1/call",{sender:t,contract_addr:e,input:r,with_trace:o})}async parameters(t={}){return this.c.get("/minievm/evm/v1/params",t).then(({params:e})=>us.fromData(e))}}class Ji extends U{async allowances(t,e={}){return this.c.get(`/cosmos/feegrant/v1beta1/allowances/${t}`,e).then(r=>({allowances:r.allowances.map(o=>({granter:o.granter,grantee:o.grantee,allowance:exports.Allowance.fromData(o.allowance)})),pagination:r.pagination}))}async allowance(t,e){return this.c.get(`/cosmos/feegrant/v1beta1/allowance/${t}/${e}`).then(r=>exports.Allowance.fromData(r.allowance.allowance))}async allowancesByGranter(t,e={}){return this.c.get(`/cosmos/feegrant/v1beta1/issued/${t}`,e).then(r=>({allowances:r.allowances.map(o=>({granter:o.granter,grantee:o.grantee,allowance:exports.Allowance.fromData(o.allowance)})),pagination:r.pagination}))}}class Hi extends U{async address(t,e,r={}){return this.c.get(`/noble/forwarding/v1/address/${t}/${e}`,r).then(o=>o.address)}async stats(t,e={}){return this.c.get(`/noble/forwarding/v1/stats/${t}`,e).then(r=>({num_of_accounts:parseInt(r.num_of_accounts),num_of_forwards:parseInt(r.num_of_forwards),total_forwarded:_.fromData(r.total_forwarded)}))}}class ji extends U{async proposals(t={}){return this.c.get("/initia/gov/v1/proposals",t).then(e=>[e.proposals.map(ee.fromData),e.pagination])}async proposal(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}`,e).then(r=>ee.fromData(r.proposal))}async deposits(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/deposits`,e).then(r=>[r.deposits.map(o=>Fn.fromData(o)),r.pagination])}async votes(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/votes`,e).then(r=>[r.votes.map(o=>Es.fromData(o)),r.pagination])}async tally(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}/tally`,e).then(r=>ds.fromData(r.tally_result))}async parameters(t={}){return this.c.get("/initia/gov/v1/params",t).then(e=>ls.fromData(e.params))}async emergencyProposals(t={}){return this.c.get("/initia/gov/v1/emergency_proposals",t).then(e=>[e.proposals.map(r=>ee.fromData(r)),e.pagination])}}class Yi extends U{async groupInfo(t){return this.c.get(`/cosmos/group/v1/group_info/${t}`).then(e=>Lr.fromData(e.info))}async groupPolicyInfo(t){return this.c.get(`/cosmos/group/v1/group_policy_info/${t}`).then(e=>Os.fromData(e.info))}async groupMembers(t,e={}){return this.c.get(`/cosmos/group/v1/group_members/${t}`,e).then(r=>[r.members.map($n.fromData),r.pagination])}async groupsByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_admin/${t}`,e).then(r=>[r.groups.map(Lr.fromData),r.pagination])}async groupPoliciesByGroup(t,e={}){return this.c.get(`/cosmos/group/v1/group_policies_by_group/${t}`,e).then(r=>[r.group_policies.map(Os.fromData),r.pagination])}async groupPoliciesByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/group_policies_by_admin/${t}`,e).then(r=>[r.group_policies.map(Os.fromData),r.pagination])}async proposal(t){return this.c.get(`/cosmos/group/v1/proposal/${t}`).then(e=>ps.fromData(e.proposal))}async proposalsByGroupPolicy(t,e={}){return this.c.get(`/cosmos/group/v1/proposals_by_group_policy/${t}`,e).then(r=>[r.proposals.map(ps.fromData),r.pagination])}async voteByProposalVoter(t,e){return this.c.get(`/cosmos/group/v1/vote_by_proposal_voter/${t}/${e}`).then(r=>re.fromData(r.vote))}async votesByProposal(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_proposal/${t}`,e).then(r=>[r.votes.map(re.fromData),r.pagination])}async votesByVoter(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_voter/${t}`,e).then(r=>[r.votes.map(re.fromData),r.pagination])}async groupsByMember(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_member/${t}`,e).then(r=>[r.groups.map(Lr.fromData),r.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(Lr.fromData),e.pagination])}}class Qi extends U{async channels(t={}){return this.c.get("/ibc/core/channel/v1/channels",t).then(e=>[e.channels.map(Mt.fromData),e.pagination])}async port(t,e,r={}){return this.c.get(`/ibc/core/channel/v1/channels/${t}/ports/${e}`,r).then(o=>({channel:Mt.fromData(o.channel),proof:o.proof,proof_height:A.fromData(o.proof_height)}))}async connections(t={}){return this.c.get("/ibc/core/connection/v1/connections",t).then(e=>[e.connections.map(mn.fromData),e.pagination])}async connection(t,e={}){return this.c.get(`/ibc/core/connection/v1/connections/${t}`,e).then(r=>mn.fromData(r.connection))}async connectionChannels(t,e={}){return this.c.get(`/ibc/core/channel/v1/connections/${t}/channels`,e).then(r=>[r.channels.map(Mt.fromData),A.fromData(r.height),r.pagination])}async parameters(t={}){return this.c.get("/ibc/core/client/v1/params",t).then(e=>qs.fromData(e.params))}async clientStates(t={}){return this.c.get("/ibc/core/client/v1/client_states",t).then(e=>[e.client_states.map(Ln.fromData),e.pagination])}async clientState(t,e={}){return this.c.get(`/ibc/core/client/v1/client_states/${t}`,e).then(r=>({client_state:r.client_state,proof:r.proof,proof_height:A.fromData(r.proof_height)}))}async clientStatus(t,e={}){return this.c.get(`/ibc/core/client/v1/client_status/${t}`,e).then(r=>r.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(r=>[r.consensus_state_heights.map(A.fromData),r.pagination])}async unreceivedPackets(t,e,r,o={}){return this.c.get(`/ibc/core/channel/v1/channels/${e}/ports/${t}/packet_commitments/${r.join(",")}/unreceived_packets`,o)}async unreceivedAcks(t,e,r,o={}){return this.c.get(`/ibc/core/channel/v1/channels/${e}/ports/${t}/packet_commitments/${r.join(",")}/unreceived_acks`,o)}}class Zi extends U{async acls(t={}){return this.c.get("/initia/ibchooks/v1/acls",t).then(e=>[e.acls.map(sn.fromData),e.pagination])}async acl(t,e={}){return this.c.get(`/initia/ibchooks/v1/acls/${t}`,e).then(r=>sn.fromData(r.acl))}async parameters(t={}){return this.c.get("/initia/ibchooks/v1/params",t).then(e=>hs.fromData(e.params))}}class Xi extends U{async classTrace(t){return this.c.get(`/ibc/apps/nft_transfer/v1/class_traces/${t}`).then(e=>nn.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(nn.fromData),e.pagination])}async classHash(t){return await this.c.get(`/ibc/apps/nft_transfer/v1/class_hashes/${t}`).then(e=>e.hash)}async parameters(t={}){return this.c.get("/ibc/apps/nft_transfer/v1/params",t).then(({params:e})=>fs.fromData(e))}async escrowAddress(t,e,r={}){return this.c.get(`/ibc/apps/nft_transfer/v1/channels/${t}/ports/${e}/escrow_address`,r).then(o=>o.escrow_address)}}class tc extends U{async denomTrace(t){return this.c.get(`/ibc/apps/transfer/v1/denom_traces/${t}`).then(e=>Qs.fromData(e.denom_trace))}async denomTraces(t={}){return this.c.get("/ibc/apps/transfer/v1/denom_traces",t).then(e=>[e.denom_traces.map(Qs.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(({params:e})=>({send_enabled:e.send_enabled,receive_enabled:e.receive_enabled}))}async escrowAddress(t,e,r={}){return this.c.get(`/ibc/apps/transfer/v1/channels/${t}/ports/${e}/escrow_address`,r).then(o=>o.escrow_address)}}class ec extends U{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(r=>r.channel_state)}}class rc extends U{async interchainAccount(t,e){return this.c.get(`/inter-tx/interchain_account/owner/${t}/connection/${e}`).then(r=>r.interchain_account_address)}}class oc extends U{async marketMap(t={}){return this.c.get("/connect/marketmap/v2/marketmap",t).then(e=>{const r={};for(const[o,s]of Object.entries(e.market_map.markets))r[o]=et.fromData(s);return{markets:r}})}async market(t,e={}){return this.c.get("/connect/marketmap/v2/market",{...e,"currency_pair.Base":t.Base,"currency_pair.Quote":t.Quote}).then(r=>et.fromData(r.market))}async lastUpdated(t={}){return this.c.get("/connect/marketmap/v2/last_updated",t).then(e=>Number.parseInt(e.last_updated))}async parameters(t={}){return this.c.get("/connect/marketmap/v2/params",t).then(e=>gs.fromData(e.params))}}class sc extends U{async modules(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules`,e).then(r=>[r.modules.map(o=>({address:o.address,module_name:o.module_name,abi:o.abi,raw_bytes:o.raw_bytes,upgrade_policy:o.upgrade_policy})),r.pagination])}async module(t,e,r={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules/${e}`,r).then(({module:o})=>({address:o.address,module_name:o.module_name,abi:o.abi,raw_bytes:o.raw_bytes,upgrade_policy:o.upgrade_policy}))}async viewFunction(t,e,r,o=[],s=[]){return this.c.post(`/initia/move/v1/accounts/${t}/modules/${e}/view_functions/${r}`,{type_args:o,args:s}).then(n=>JSON.parse(n.data))}async view(t,e,r,o=[],s=[]){return this.c.post("/initia/move/v1/view",{address:t,module_name:e,function_name:r,type_args:o,args:s})}async viewBatch(t){return this.c.post("/initia/move/v1/view/batch",{requests:t}).then(e=>e.responses)}async viewJSON(t,e,r,o=[],s=[]){return this.c.post("/initia/move/v1/view/json",{address:t,module_name:e,function_name:r,type_args:o,args:s})}async viewBatchJSON(t){return this.c.post("/initia/move/v1/view/json/batch",{requests:t}).then(e=>e.responses)}async resources(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/resources`,e).then(r=>[r.resources.map(o=>JSON.parse(o.move_resource)),r.pagination])}async resource(t,e,r={}){return this.c.get(`/initia/move/v1/accounts/${t}/resources/by_struct_tag`,{...r,struct_tag:e}).then(({resource:o})=>JSON.parse(o.move_resource))}async denom(t,e={}){return this.c.get("/initia/move/v1/denom",{...e,metadata:t}).then(r=>r.denom)}async metadata(t,e={}){return this.c.get("/initia/move/v1/metadata",{...e,denom:t}).then(r=>r.metadata)}async parameters(t={}){return this.c.get("/initia/move/v1/params",t).then(({params:e})=>ys.fromData(e))}async scriptABI(t){return this.c.post("/initia/move/v1/script/abi",{code_bytes:t})}async tableInfo(t,e={}){return this.c.get(`/initia/move/v1/tables/${t}`,e).then(r=>r.table_info)}async tableEntries(t,e={}){return this.c.get(`/initia/move/v1/tables/${t}/entries`,e).then(r=>[r.table_entries,r.pagination])}async tableEntry(t,e,r={}){return this.c.get(`/initia/move/v1/tables/${t}/entries/by_key_bytes`,{...r,key_bytes:e}).then(o=>o.table_entry)}}class nc extends U{async delegations(t,e,r={}){if(t!==void 0&&e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations/${t}`,r).then(({delegation_response:o})=>[[Gs.fromData(o)],{total:1,next_key:""}]);if(t!==void 0)return this.c.get(`/initia/mstaking/v1/delegations/${t}`,r).then(o=>[o.delegation_responses.map(Gs.fromData),o.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations`,r).then(o=>[o.delegation_responses.map(Gs.fromData),o.pagination]);throw new TypeError("arguments delegator and validator cannot both be empty")}async delegation(t,e){return this.delegations(t,e).then(r=>r[0][0])}async unbondingDelegations(t,e,r={}){if(t!==void 0&&e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations/${t}/unbonding_delegation`,r).then(({unbond:o})=>[[ft.fromData(o)],{next_key:"",total:1}]);if(t!==void 0)return this.c.get(`/initia/mstaking/v1/delegators/${t}/unbonding_delegations`,r).then(o=>[o.unbonding_responses.map(ft.fromData),o.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/unbonding_delegations`,r).then(o=>[o.unbonding_responses.map(ft.fromData),o.pagination]);throw new TypeError("arguments delegator and validator cannot both be empty")}async unbondingDelegation(t,e){return this.unbondingDelegations(t,e).then(r=>r[0][0])}async redelegations(t,e,r,o={}){const s={...o,src_validator_addr:e,dst_validator_addr:r};return this.c.get(`/initia/mstaking/v1/delegators/${t}/redelegations`,s).then(n=>[n.redelegation_responses.map(Nt.fromData),n.pagination])}async bondedValidators(t,e={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/validators`,e).then(r=>[r.validators.map(G.fromData),r.pagination])}async validators(t={}){return this.c.get("/initia/mstaking/v1/validators",t).then(e=>[e.validators.map(G.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/initia/mstaking/v1/validators/${t}`,e).then(r=>G.fromData(r.validator))}async pool(t={}){return this.c.get("/initia/mstaking/v1/pool",t).then(({pool:e})=>({bonded_tokens:u.fromData(e.bonded_tokens),not_bonded_tokens:u.fromData(e.not_bonded_tokens)}))}async parameters(t={}){return this.c.get("/initia/mstaking/v1/params",t).then(({params:e})=>_s.fromData(e))}}class ac extends U{async validators(t={}){return this.c.get("/opinit/opchild/v1/validators",t).then(e=>[e.validators.map(An.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/opinit/opchild/v1/validator/${t}`,e).then(r=>An.fromData(r.validator))}async bridgeInfo(t={}){return this.c.get("/opinit/opchild/v1/bridge_info",t).then(e=>Qt.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(r=>r.base_denom)}async parameters(t={}){return this.c.get("/opinit/opchild/v1/params",t).then(e=>bs.fromData(e.params))}}class ic extends U{async bridgeInfos(t={}){return this.c.get("/opinit/ophost/v1/bridges",t).then(e=>[e.bridges.map(Qt.fromData),e.pagination])}async bridgeInfo(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}`,e).then(r=>Qt.fromData(r))}async tokenPairs(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs`,e).then(r=>[r.token_pairs,r.pagination])}async tokenPairByL1Denom(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs/by_l1_denom`,{...r,l1_denom:e}).then(o=>o.token_pair)}async tokenPairByL2Denom(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/token_pairs/by_l2_denom`,{...r,l2_denom:e}).then(o=>o.token_pair)}async lastFinalizedOutput(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/last_finalized_output`,e).then(r=>({output_index:Number.parseInt(r.output_index),output_proposal:Yt.fromData(r.output_proposal)}))}async outputInfos(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/outputs`,e).then(r=>[r.output_proposals.map(o=>({bridge_id:Number.parseInt(o.bridge_id??`${t}`),output_index:Number.parseInt(o.output_index),output_proposal:Yt.fromData(o.output_proposal)})),r.pagination])}async outputInfo(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/outputs/${e}`,r).then(o=>({bridge_id:Number.parseInt(o.bridge_id??`${t}`),output_index:Number.parseInt(o.output_index),output_proposal:Yt.fromData(o.output_proposal)}))}async withdrawalClaimed(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/withdrawals/claimed/by_hash`,{...r,withdrawal_hash:Buffer.from(e,"hex").toString("base64")}).then(o=>o.claimed)}async nextL1Sequence(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/next_l1_sequence`,e).then(r=>parseInt(r.next_l1_sequence))}async batchInfos(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/batch_infos`,e).then(r=>[r.batch_infos.map(o=>ea.fromData(o)),r.pagination])}async parameters(t={}){return this.c.get("/opinit/opchild/v1/params",t).then(e=>vs.fromData(e.params))}}class cc extends U{async currencyPairs(t={}){return this.c.get("/connect/oracle/v2/get_all_tickers",t).then(e=>e.currency_pairs.map(ct.fromData))}async price(t,e={}){return this.c.get("/connect/oracle/v2/get_price",{...e,currency_pair:t.toString()}).then(r=>ta.fromData(r.price))}}class mc extends U{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(({params:e})=>As.fromData(e))}}class uc extends U{async signingInfo(t,e={}){return this.c.get(`/cosmos/slashing/v1beta1/signing_infos/${t}`,e).then(({val_signing_info:r})=>({address:r.address,start_height:Number.parseInt(r.start_height),index_offset:Number.parseInt(r.index_offset),jailed_until:new Date(r.jailed_until),tombstoned:r.tombstoned,missed_blocks_counter:Number.parseInt(r.missed_blocks_counter)}))}async signingInfos(t={}){return this.c.get("/cosmos/slashing/v1beta1/signing_infos",t).then(e=>e.info.map(r=>({address:r.address,start_height:Number.parseInt(r.start_height),index_offset:Number.parseInt(r.index_offset),jailed_until:new Date(r.jailed_until),tombstoned:r.tombstoned,missed_blocks_counter:Number.parseInt(r.missed_blocks_counter)})))}async parameters(t={}){return this.c.get("/cosmos/slashing/v1beta1/params",t).then(({params:e})=>Ps.fromData(e))}}class dc extends U{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 r;return(r=e==null?void 0:e.default_node_info)==null?void 0:r.network})}async syncing(t={}){return this.c.getRaw("/cosmos/base/tendermint/v1beta1/syncing",t).then(e=>e.syncing)}async validatorSet(t,e={}){const r=t!==void 0?`/cosmos/base/tendermint/v1beta1/validatorsets/${t}`:"/cosmos/base/tendermint/v1beta1/validatorsets/latest";return this.c.get(r,e).then(o=>[o.validators,o.pagination])}async blockInfo(t,e={}){const r=t!==void 0?`/cosmos/base/tendermint/v1beta1/blocks/${t}`:"/cosmos/base/tendermint/v1beta1/blocks/latest";return this.c.getRaw(r,e)}}class lc extends U{async authorityMetadata(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms/${t}/authority_metadata`,e).then(r=>r.authority_metadata)}async beforeSendHookAddr(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms/${t}/before_send_hook`,e).then(r=>r.cosmwasm_address)}async denomsFromCreator(t,e={}){return this.c.get(`/miniwasm/tokenfactory/v1/denoms_from_creator/${t}`,e).then(r=>r.denoms)}async parameters(t={}){return this.c.get("/miniwasm/tokenfactory/v1/params",t).then(({params:e})=>ws.fromData(e))}}const yi=i=>Zt.bcs.bytes(32,i).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:yi,object:yi,fixed_point32:i=>Zt.bcs.u64(i).transform({input:t=>v(t).times(new Y.BigNumber("4294967296")).toFixed(0,Y.BigNumber.ROUND_DOWN),output:t=>v(t).div(new Y.BigNumber("4294967296")).toNumber()}),fixed_point64:i=>Zt.bcs.u128(i).transform({input:t=>v(t).times(new Y.BigNumber("18446744073709551616")).toFixed(0,Y.BigNumber.ROUND_DOWN),output:t=>v(t).div(new Y.BigNumber("18446744073709551616")).toNumber()}),decimal128:i=>Zt.bcs.u128(i).transform({input:t=>v(t).times(new Y.BigNumber("1000000000000000000")).toFixed(0,Y.BigNumber.ROUND_DOWN),output:t=>v(t).div(new Y.BigNumber("1000000000000000000")).toNumber()}),decimal256:i=>Zt.bcs.u256(i).transform({input:t=>v(t).times(new Y.BigNumber("1000000000000000000")).toFixed(0,Y.BigNumber.ROUND_DOWN),output:t=>v(t).div(new Y.BigNumber("1000000000000000000")).toNumber()}),biguint:i=>Zt.bcs.vector(Zt.bcs.u8(i)).transform({input:t=>_i(BigInt(t)),output:t=>vi(t)}),bigdecimal:i=>Zt.bcs.vector(Zt.bcs.u8(i)).transform({input:t=>{const r=v(t).times(new Y.BigNumber("1000000000000000000")).toFixed(0,Y.BigNumber.ROUND_DOWN);return _i(BigInt(r))},output:t=>{const e=vi(t).toString();return v(e).div(new Y.BigNumber("1000000000000000000")).toNumber()}})},om={...Zt.bcs,...rm};function _i(i){const t=[];for(;i>0;)t.push(Number(i%BigInt(256))),i=i/BigInt(256);return new Uint8Array(t)}function vi(i){let t=0n;for(;i.length>0;)t=t*256n+BigInt(i.pop());return t}function sm(i){return i.code!==void 0&&i.code!==0&&i.code!=="0"}class $a{constructor(t,e){this.gas_info=t,this.result=e}static fromData(t){return new $a({gas_wanted:Number.parseInt(t.gas_info.gas_wanted),gas_used:Number.parseInt(t.gas_info.gas_used)},t.result)}}class ra extends U{constructor(t){super(t.apiRequester),this.lcd=t}async txInfo(t,e={}){return this.c.getRaw(`/cosmos/tx/v1beta1/txs/${t}`,e).then(r=>ia.fromData(r.tx_response))}async create(t,e){let{fee:r}=e;const{msgs:o,memo:s,timeoutHeight:n}=e,a=[];for(const c of t){let d=c.sequenceNumber,h=c.publicKey;if(d===void 0||!h){const g=await this.lcd.auth.accountInfo(c.address);d===void 0&&(d=g.getSequenceNumber()),h||(h=g.getPublicKey())}a.push({sequenceNumber:d,publicKey:h})}return r===void 0&&(r=await this.lcd.tx.estimateFee(a,e)),new tt(new cs(o,s??"",n??0),new Wt([],r),[])}async txInfosByHeight(t){const e=await this.lcd.tendermint.blockInfo(t),{txs:r}=e.block.data;if(r){const o=r.map(n=>Ea(n)),s=[];for(const n of o)s.push(await this.txInfo(n));return s}else return[]}async estimateFee(t,e){const r=e.gasPrices??this.lcd.config.gasPrices,o=e.gasAdjustment??this.lcd.config.gasAdjustment,s=e.feeDenoms??["uinit"];let n=e.gas,a;if(r&&(a=new u(r),s)){const y=a.filter(b=>s.includes(b.denom));y.toArray().length>0&&(a=y)}const c=new cs(e.msgs,e.memo??""),d=new Wt([],new Kt(0,new u)),h=new tt(c,d,[]);h.appendEmptySignatures(t),(!n||n==="auto"||n==="0")&&(n=await this.estimateGas(h,{gasAdjustment:o}));const g=a?a.mul(n).toIntCeilCoins():"0uinit";return new Kt(Number.parseInt(n),g,"","")}async estimateGas(t,e){const r=(e==null?void 0:e.gasAdjustment)??this.lcd.config.gasAdjustment;let o=t;if(t.signatures.length<=0){if(!(e&&e.signers&&e.signers.length>0))throw new Error("cannot append signature");const n=new Wt([],new Kt(0,new u));o=new tt(t.body,n,[]),o.appendEmptySignatures(e.signers)}const s=await this.c.post("/cosmos/tx/v1beta1/simulate",{tx_bytes:ra.encode(o)}).then(n=>$a.fromData(n));return v(r??0).multipliedBy(s.gas_info.gas_used).toString()}static encode(t){return Buffer.from(t.toBytes()).toString("base64")}static decode(t){return tt.fromBuffer(Buffer.from(t,"base64"))}static hash(t){const e=ra.encode(t);return Ea(e)}async _broadcast(t,e){const r=t instanceof tt?ra.encode(t):t;return await this.c.post("/cosmos/tx/v1beta1/txs",{tx_bytes:r,mode:e})}async broadcast(t,e=3e4){const{tx_response:o}=await this._broadcast(t,"BROADCAST_MODE_SYNC");if(o.code!=null&&o.code!=0)return{height:Number.parseInt(o.height),txhash:o.txhash,raw_log:o.raw_log,code:o.code,codespace:o.codespace,gas_used:0,gas_wanted:0,timestamp:"",logs:[]};let s;for(let n=0;n<=e/500;n++){try{s=await this.txInfo(o.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=>Pn.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 r={height:+e.height,txhash:e.txhash,raw_log:e.raw_log};return e.code&&(r.code=e.code),e.codespace&&(r.codespace=e.codespace),r})}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,r=(t.query??[]).reduce((o,s)=>{if(!s.key)return o;const n=s.op??"=",a=s.key==="tx.height"?`${s.value}`:`'${s.value}'`,c=n==="EXISTS"?`${s.key} ${n}`:`${s.key} ${n} ${a}`;return o?`${o} AND ${c}`:c},"");return r&&e.append("query",r),delete t.query,Object.entries(t).forEach(o=>{e.append(o[0],o[1].toString())}),this.c.getRaw("/cosmos/tx/v1beta1/txs",e).then(o=>({txs:o.tx_responses.map(s=>ia.fromData(s)),pagination:o.pagination,total:Number(o.total)}))}async searchEvents(t,e,r,o){if(o<r)throw new Error("Start height cannot be greater than end height");if(o-r>100)throw new Error("Query height range cannot be greater than 100");const s=[],n=`${t}::${e}`,a=[{key:"tx.height",value:r.toString(),op:">="},{key:"tx.height",value:o.toString(),op:"<="},{key:"move.type_tag",value:n,op:"CONTAINS"}],c=y=>y.events.filter(b=>{if(b.type!=="move")return!1;const k=b.attributes.find(M=>M.key==="type_tag");return k&&k.value.startsWith(n)}),{txs:d,total:h}=await this.search({query:a}),g=d.flatMap(y=>c(y));if(s.push(...g),h>100){const y=Math.ceil(h/100),b=[...Array(y-1).keys()].map(M=>M+2),k=await Promise.all(b.map(async M=>this.search({query:a,page:M}).then(T=>T.txs.flatMap(F=>c(F)))));s.push(...k.flat())}return s}}class pc extends U{async appliedPlan(t,e={}){return this.c.get(`/cosmos/upgrade/v1beta1/applied_plan/${t}`,e).then(r=>Number.parseInt(r.height))}async currentPlan(t={}){return this.c.get("/cosmos/upgrade/v1beta1/current_plan",t).then(e=>e.plan?Ht.fromData(e.plan):void 0)}async moduleVersions(t={}){return this.c.get("/cosmos/upgrade/v1beta1/module_versions",t).then(e=>e.module_versions.map(r=>({name:r.name,version:Number.parseInt(r.version)})))}}class hc extends U{async contractInfo(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}`,e).then(r=>({code_id:Number.parseInt(r.contract_info.code_id),creator:r.contract_info.creator,admin:r.contract_info.admin,label:r.contract_info.label,created:Js.fromData(r.contract_info.created),ibc_port_id:r.contract_info.ibc_port_id,extension:r.contract_info.extension}))}async contractHistory(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/history`,e).then(r=>[r.entries.map(o=>({operation:gt.contractCodeHistoryOperationTypeFromJSON(o.operation),code_id:Number.parseInt(o.code_id),updated:Js.fromData(o.updated),msg:o.msg})),r.pagination])}async contractsByCode(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/code/${t}/contracts`,e).then(r=>[r.contracts,r.pagination])}async allContractState(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/state`,e).then(r=>[r.models,r.pagination])}async rawContractState(t,e,r={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/raw/${e}`,r).then(o=>o.data)}async smartContractState(t,e,r={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/smart/${e}`,r).then(o=>o.data)}async codeInfos(t={}){return this.c.get("/cosmwasm/wasm/v1/code",t).then(e=>[e.code_infos.map(r=>({code_id:Number.parseInt(r.code_id),creator:r.creator,data_hash:r.data_hash,instantiate_permission:q.fromData(r.instantiate_permission)})),e.pagination])}async codeInfo(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/code/${t}`,e).then(r=>({code_info:{code_id:Number.parseInt(r.code_info.code_id),creator:r.code_info.creator,data_hash:r.code_info.data_hash,instantiate_permission:q.fromData(r.code_info.instantiate_permission)},data:r.data}))}async pinnedCodes(t={}){return this.c.get("/cosmwasm/wasm/v1/codes/pinned",t).then(e=>[e.code_ids.map(r=>Number.parseInt(r)),e.pagination])}async parameters(t={}){return this.c.get("/cosmwasm/wasm/v1/codes/params",t).then(e=>ns.fromData(e.params))}async contractsByCreator(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contracts/creator/${t}`,e).then(r=>[r.contract_addresses,r.pagination])}}class fc{constructor(t,e){p(this,"accAddress");this.lcd=t,this.key=e,this.accAddress=e.accAddress}setAccountAddress(t){this.accAddress=t}async accountNumberAndSequence(){return this.lcd.auth.accountInfo(this.accAddress).then(t=>({account_number:t.getAccountNumber(),sequence:t.getSequenceNumber()}))}async accountNumber(){return this.lcd.auth.accountInfo(this.accAddress).then(t=>t.getAccountNumber())}async sequence(){return this.lcd.auth.accountInfo(this.accAddress).then(t=>t.getSequenceNumber())}async createTx(t){return this.lcd.tx.create([{address:this.accAddress,sequenceNumber:t.sequence,publicKey:this.key.publicKey}],t)}async createAndSignTx(t){this.lcd.config.chainId||(this.lcd.config.chainId=await this.lcd.tendermint.chainId());let e=t.accountNumber,r=t.sequence;if(e===void 0||r===void 0){const s=await this.accountNumberAndSequence();e===void 0&&(e=s.account_number),r===void 0&&(r=s.sequence)}t.sequence=r,t.accountNumber=e;const o=await this.createTx(t);return this.key.signTx(o,{accountNumber:e,sequence:r,chainId:this.lcd.config.chainId,signMode:t.signMode??mt.SignMode.SIGN_MODE_DIRECT})}}const nm={gasAdjustment:"1.75"},bi={default:{uinit:.15}};class gc{constructor(t,e,r){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={...nm,gasPrices:((e==null?void 0:e.chainId)&&bi[e.chainId])??bi.default,...e},this.apiRequester=r??new Oi(this.URL),this.auction=new Ri(this.apiRequester),this.auth=new Li(this.apiRequester),this.authz=new zi(this.apiRequester),this.bank=new Gi(this.apiRequester),this.distribution=new Vi(this.apiRequester),this.evidence=new Ki(this.apiRequester),this.evm=new Wi(this.apiRequester),this.feeGrant=new Ji(this.apiRequester),this.forwarding=new Hi(this.apiRequester),this.gov=new ji(this.apiRequester),this.group=new Yi(this.apiRequester),this.ibc=new Qi(this.apiRequester),this.ibcHooks=new Zi(this.apiRequester),this.ibcNft=new Xi(this.apiRequester),this.ibcTransfer=new tc(this.apiRequester),this.ibcPerm=new ec(this.apiRequester),this.interTx=new rc(this.apiRequester),this.marketmap=new oc(this.apiRequester),this.move=new sc(this.apiRequester),this.mstaking=new nc(this.apiRequester),this.opchild=new ac(this.apiRequester),this.ophost=new ic(this.apiRequester),this.oracle=new cc(this.apiRequester),this.reward=new mc(this.apiRequester),this.slashing=new uc(this.apiRequester),this.tendermint=new dc(this.apiRequester),this.tokenfactory=new lc(this.apiRequester),this.tx=new ra(this),this.upgrade=new pc(this.apiRequester),this.wasm=new hc(this.apiRequester)}wallet(t){return new fc(this,t)}}class mi{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 E.bech32.encode("initvaloper",E.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 V(this.publicKey,new V.Descriptor(new V.Descriptor.Single(mt.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 bt(this.publicKey,t.sequence,new C(new C.Single(mt.SignMode.SIGN_MODE_DIRECT)))];const r=(await this.sign(Buffer.from(t.toBytes()))).toString("base64");return t.auth_info.signer_infos=e,new V(this.publicKey,new V.Descriptor(new V.Descriptor.Single(mt.SignMode.SIGN_MODE_DIRECT,r)),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()),o=Buffer.concat([Buffer.from(`Ethereum Signed Message:
2
+ `),Buffer.from(e.length.toString()),e]);return new V(this.publicKey,new V.Descriptor(new V.Descriptor.Single(mt.SignMode.SIGN_MODE_EIP_191,(await this.signWithKeccak256(o)).toString("base64"))),t.sequence)}async signTx(t,e){const r=new tt(t.body,new Wt([],t.auth_info.fee),[]),o=new $i(e.chainId,e.accountNumber,e.sequence,r.auth_info,r.body);let s;if(e.signMode===mt.SignMode.SIGN_MODE_LEGACY_AMINO_JSON)s=await this.createSignatureAmino(o);else if(e.signMode==mt.SignMode.SIGN_MODE_DIRECT)s=await this.createSignature(o);else if(e.signMode==mt.SignMode.SIGN_MODE_EIP_191)s=await this.createSignatureEIP191(o);else throw new Error("not supported sign mode");const n=s.data.single;return r.signatures.push(...t.signatures,n.signature),r.auth_info.signer_infos.push(...t.auth_info.signer_infos,new bt(s.public_key,s.sequence,new C(new C.Single(n.mode)))),r}}class La extends mi{constructor(e){const r=ha.publicKeyCreate(new Uint8Array(e),!0);super(new Q(Buffer.from(r).toString("base64")));p(this,"privateKey");this.privateKey=e}static fromHex(e){const r=e.startsWith("0x")?e.slice(2):e;if(r.length!==64)throw new Error("Invalid private key length");return new La(Buffer.from(r,"hex"))}async sign(e){const r=Buffer.from(Ua.SHA256.hash(new Ua.Word32Array(e)).toString(),"hex"),{signature:o}=ha.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}async signWithKeccak256(e){const r=Si(e),{signature:o}=ha.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}}const ui=118,am={account:0,index:0,coinType:ui};class _t extends La{constructor(e={}){const{account:r,index:o,coinType:s}={...am,...e};let{mnemonic:n}=e;n===void 0&&(n=fi.generateMnemonic(256));const a=fi.mnemonicToSeedSync(n),c=Yc.fromSeed(a),d=`m/44'/${s}'/${r}'/0/${o}`,g=c.derivePath(d).privateKey;if(!g)throw new Error("Failed to derive key pair");super(g);p(this,"mnemonic");this.mnemonic=n}}const St={validator:"walk only potato reason dance meadow any milk raise inflict retreat parent force resource battle concert acquire regret drill better cabin meadow ordinary save",test1:"exclude stay club ten scrap inflict wheat riot fly usage wait dog grain turtle fetch toy insect snap mimic inner juice hotel grant net",test2:"explain inch inherit clean poverty crime guess material element arm night demand stem kid pool large hour soul measure scan pave error weather tragic",test3:"coconut climb noble cupboard leader decide power apple twice fiber blue region present orient negative jungle blanket fat gym moon fossil bulb evil apart",test4:"topic visual tide critic march unhappy thrive permit load math artwork speed only lawn effort general under cable door relief liberty avocado swallow tenant",test5:"large smoke slam staff crisp any version olympic spatial broom forward detect notice pull option hundred private outdoor oven hint box interest into power",test6:"private fuel exile give tribe profit waste sight primary fish rookie skirt wear broom issue gold bird process once pattern tongue rival sense reject",test7:"segment hire punch same escape soap economy health what either flat diamond hammer auction index omit museum tuition decline weekend lava over time mango",test8:"churn hill piece army zero random breeze ginger magnet huge fat notable ceiling yellow security chalk merry normal junior warm theme false fade later",test9:"primary scale invite wife carpet roast blouse utility lyrics tank marriage science problem salmon minor grocery there ladder noise never gather aerobic neglect rigid",test10:"forum shiver flush artefact analyst undo hundred mixed diamond mushroom submit city march crater fatigue deal host asthma reopen barrel virtual accuse crime dune"};class im extends gc{constructor(){super("http://localhost:1317",{chainId:"local-initia"});p(this,"wallets");this.wallets={validator:this.wallet(new _t({mnemonic:St.validator})),test1:this.wallet(new _t({mnemonic:St.test1})),test2:this.wallet(new _t({mnemonic:St.test2})),test3:this.wallet(new _t({mnemonic:St.test3})),test4:this.wallet(new _t({mnemonic:St.test4})),test5:this.wallet(new _t({mnemonic:St.test5})),test6:this.wallet(new _t({mnemonic:St.test6})),test7:this.wallet(new _t({mnemonic:St.test7})),test8:this.wallet(new _t({mnemonic:St.test8})),test9:this.wallet(new _t({mnemonic:St.test9})),test10:this.wallet(new _t({mnemonic:St.test10}))}}}var di={exports:{}},oa=typeof Reflect=="object"?Reflect:null,Ai=oa&&typeof oa.apply=="function"?oa.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Ia;oa&&typeof oa.ownKeys=="function"?Ia=oa.ownKeys:Object.getOwnPropertySymbols?Ia=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ia=function(t){return Object.getOwnPropertyNames(t)};function cm(i){console&&console.warn&&console.warn(i)}var yc=Number.isNaN||function(t){return t!==t};function O(){O.init.call(this)}di.exports=O;di.exports.once=lm;O.EventEmitter=O;O.prototype._events=void 0;O.prototype._eventsCount=0;O.prototype._maxListeners=void 0;var Pi=10;function za(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(O,"defaultMaxListeners",{enumerable:!0,get:function(){return Pi},set:function(i){if(typeof i!="number"||i<0||yc(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Pi=i}});O.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};O.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||yc(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function _c(i){return i._maxListeners===void 0?O.defaultMaxListeners:i._maxListeners}O.prototype.getMaxListeners=function(){return _c(this)};O.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var o=t==="error",s=this._events;if(s!==void 0)o=o&&s.error===void 0;else if(!o)return!1;if(o){var n;if(e.length>0&&(n=e[0]),n instanceof Error)throw n;var a=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw a.context=n,a}var c=s[t];if(c===void 0)return!1;if(typeof c=="function")Ai(c,this,e);else for(var d=c.length,h=wc(c,d),r=0;r<d;++r)Ai(h[r],this,e);return!0};function vc(i,t,e,r){var o,s,n;if(za(e),s=i._events,s===void 0?(s=i._events=Object.create(null),i._eventsCount=0):(s.newListener!==void 0&&(i.emit("newListener",t,e.listener?e.listener:e),s=i._events),n=s[t]),n===void 0)n=s[t]=e,++i._eventsCount;else if(typeof n=="function"?n=s[t]=r?[e,n]:[n,e]:r?n.unshift(e):n.push(e),o=_c(i),o>0&&n.length>o&&!n.warned){n.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=i,a.type=t,a.count=n.length,cm(a)}return i}O.prototype.addListener=function(t,e){return vc(this,t,e,!1)};O.prototype.on=O.prototype.addListener;O.prototype.prependListener=function(t,e){return vc(this,t,e,!0)};function mm(){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 bc(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},o=mm.bind(r);return o.listener=e,r.wrapFn=o,o}O.prototype.once=function(t,e){return za(e),this.on(t,bc(this,t,e)),this};O.prototype.prependOnceListener=function(t,e){return za(e),this.prependListener(t,bc(this,t,e)),this};O.prototype.removeListener=function(t,e){var r,o,s,n,a;if(za(e),o=this._events,o===void 0)return this;if(r=o[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(s=-1,n=r.length-1;n>=0;n--)if(r[n]===e||r[n].listener===e){a=r[n].listener,s=n;break}if(s<0)return this;s===0?r.shift():um(r,s),r.length===1&&(o[t]=r[0]),o.removeListener!==void 0&&this.emit("removeListener",t,a||e)}return this};O.prototype.off=O.prototype.removeListener;O.prototype.removeAllListeners=function(t){var e,r,o;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var s=Object.keys(r),n;for(o=0;o<s.length;++o)n=s[o],n!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(o=e.length-1;o>=0;o--)this.removeListener(t,e[o]);return this};function Ac(i,t,e){var r=i._events;if(r===void 0)return[];var o=r[t];return o===void 0?[]:typeof o=="function"?e?[o.listener||o]:[o]:e?dm(o):wc(o,o.length)}O.prototype.listeners=function(t){return Ac(this,t,!0)};O.prototype.rawListeners=function(t){return Ac(this,t,!1)};O.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):Pc.call(i,t)};O.prototype.listenerCount=Pc;function Pc(i){var t=this._events;if(t!==void 0){var e=t[i];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}O.prototype.eventNames=function(){return this._eventsCount>0?Ia(this._events):[]};function wc(i,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=i[r];return e}function um(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function dm(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function lm(i,t){return new Promise(function(e,r){function o(n){i.removeListener(t,s),r(n)}function s(){typeof i.removeListener=="function"&&i.removeListener("error",o),e([].slice.call(arguments))}Dc(i,t,s,{once:!0}),t!=="error"&&pm(i,o,{once:!0})})}function pm(i,t,e){typeof i.on=="function"&&Dc(i,"error",t,e)}function Dc(i,t,e,r){if(typeof i.on=="function")r.once?i.once(t,e):i.on(t,e);else if(typeof i.addEventListener=="function")i.addEventListener(t,function o(s){r.once&&i.removeEventListener(t,o),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}var hm=di.exports;const wi=i=>i.replace(/'/g,"\\'");function fm(i){const t=[];for(const e of Object.keys(i)){let r;const o=i[e];if(Array.isArray(o))switch(o[0]){case">":case"<":case"<=":case">=":typeof o[1]!="number"?r=`${e}${o[0]}${o[1].toISOString()}`:r=`${e}${o[0]}${o[1]}`;break;case"CONTAINS":r=`${e} CONTAINS '${wi(o[1])}'`;break;case"EXISTS":r=`${e} EXISTS`;break}else switch(typeof o){case"number":r=`${e}=${o}`;break;case"string":r=`${e}='${wi(o)}'`;break;default:r=`${e}=${o.toISOString()}`}t.push(r)}return t.join(" AND ")}class gm extends hm.EventEmitter{constructor(e,r=0,o=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=r,this.reconnectInterval=o,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 Jc(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 r;if(typeof e.data=="string")r=e.data;else if(e.data instanceof Buffer)r=e.data.toString();else throw new Error("Unsupported message data type");const o=JSON.parse(r);this.callback&&o.result&&o.result.query===this.queryParams&&this.callback(o.result.data)}catch(r){this.emit("error",r)}}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,r,o){this.queryParams=fm({"tm.event":e,...r}),this.callback=o}subscribeTx(e,r){const o=s=>(s.value.TxResult.txhash=Ea(s.value.TxResult.tx),r(s));this.subscribe("Tx",e,o)}}const ua=85,ni=250,ym="CSM",da={GET_VERSION:0,INS_PUBLIC_KEY_SECP256K1:1,SIGN_SECP256K1:2,GET_ADDR_SECP256K1:4},Na={INIT:0,ADD:1,LAST:2},li={ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},wn={NoError:36864},ai={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 Dn(i){return i in ai?ai[i]:`Unknown Status Code: ${i}`}function _m(i){return typeof i=="object"&&i!==null&&!(i instanceof Array)&&!(i instanceof Date)}function Vs(i){if(i){if(_m(i)){if(Object.prototype.hasOwnProperty.call(i,"statusCode"))return{return_code:i.statusCode,error_message:Dn(i.statusCode)};if(Object.prototype.hasOwnProperty.call(i,"return_code")&&Object.prototype.hasOwnProperty.call(i,"error_message"))return i}return{return_code:65535,error_message:i.toString()}}return{return_code:65535,error_message:i.toString()}}function Ca(i){if((i==null?void 0:i.length)!==5)throw new TypeError("Invalid path.");const t=Buffer.alloc(20);return t.writeUInt32LE(2147483648+i[0],0),t.writeUInt32LE(2147483648+i[1],4),t.writeUInt32LE(2147483648+i[2],8),t.writeUInt32LE(i[3],12),t.writeUInt32LE(i[4],16),t}async function vm(i){return i.send(ua,da.GET_VERSION,0,0).then(t=>{const e=t.slice(-2),r=e[0]*256+e[1];let o=0;return t.length>=9&&(o=(t[5]<<24)+(t[6]<<16)+(t[7]<<8)+(t[8]<<0)),{return_code:r,error_message:Dn(r),test_mode:t[0]!==0,major:t[1],minor:t[2],patch:t[3],device_locked:t[4]===1,target_id:o.toString(16)}}).catch(Vs)}async function bm(i){return i.send(176,1,0,0).then(t=>{const e=t.slice(-2);let r=e[0]*256+e[1],o,s="err",n="err",a=0,c=0;if(t[0]!==1)o="response format ID not recognized",r=36865;else{o="No errors";const d=t[1];s=t.slice(2,2+d).toString("ascii");let h=2+d;const g=t[h];h+=1,n=t.slice(h,h+g).toString("ascii"),h+=g;const y=t[h];h+=1,a=y,c=t[h]}return{return_code:r,error_message:o,app_name:s,app_version:n,flag_len:a,flags_value:c,flag_recovery:(c&1)!==0,flag_signed_mcu_code:(c&2)!==0,flag_onboarded:(c&4)!==0,flag_pin_validated:(c&128)!==0}}).catch(Vs)}async function Am(i){return i.send(224,1,0,0,Buffer.from([]),[wn.NoError,28160]).then(t=>{const e=t.slice(-2),r=e[0]*256+e[1];if(r===28160)return{return_code:r,error_message:"This command is only available in the Dashboard"};const o=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 c=t[s];s+=1;const d=t.slice(s,s+c).toString("hex");s+=c;const h=t[s];s+=1;let g=t.slice(s,s+h);g[h-1]===0&&(g=t.slice(s,s+h-1));const y=g.toString();return{return_code:r,error_message:Dn(r),target_id:o,se_version:a,flag:d,mcu_version:y}}).catch(Vs)}async function Pm(i,t){return i.send(ua,da.GET_ADDR_SECP256K1,0,0,t,[wn.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],s=e?Buffer.from(e.slice(0,33)):null;return{pk:"OBSOLETE PROPERTY",compressed_pk:s&&s.toJSON(),return_code:o,error_message:Dn(o)}}).catch(Vs)}async function wm(i,t){return i.send(ua,da.GET_ADDR_SECP256K1,li.ONLY_RETRIEVE,0,t,[wn.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],s=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:s.toJSON(),return_code:o,error_message:Dn(o)}}).catch(Vs)}async function Dm(i,t){return i.send(ua,da.GET_ADDR_SECP256K1,li.SHOW_ADDRESS_IN_DEVICE,0,t,[wn.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],s=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:s.toJSON(),return_code:o,error_message:Dn(o)}}).catch(Vs)}function km(i,t){const e=Ca(i),r=[];if(e instanceof Buffer){r.push(e);const o=Buffer.from(t);for(let s=0;s<o.length;s+=ni){let n=s+ni;s>o.length&&(n=o.length),r.push(o.slice(s,n))}}return r}async function Di(i,t,e,r){let o=Na.ADD;return t===1&&(o=Na.INIT),t===e&&(o=Na.LAST),i.send(ua,da.SIGN_SECP256K1,o,0,r,[wn.NoError,27012,27264]).then(s=>{const n=s.slice(-2),a=n[0]*256+n[1];let c=Dn(a);(a===27264||a===27012)&&(c=`${c} : ${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:c}}).catch(Vs)}async function Mm(i,t,e){const r=km(t,e);return Di(i,1,r.length,r[0]).then(async o=>{let s={return_code:o.return_code,error_message:o.error_message,signature:{type:"Buffer",data:[]}};for(let n=1;n<r.length&&(s=await Di(i,1+n,r.length,r[n]),s.return_code===wn.NoError);n+=1);return{return_code:s.return_code,error_message:s.error_message,signature:s.signature}}).catch(Vs)}const xm="Initia",Sm="Cosmos";class Pa{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 r=(void 0)("sha256").update(e).digest(),o=new Hc().update(r).digest();return E.bech32.encode(t,E.bech32.toWords(o))}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===xm&&this.version.major===1||this.info.app_name===Sm&&this.version.major===2)return}return{return_code:25600,error_message:"App Version is not supported"}}async initialize(){return bm(this.transport).then(t=>(this.info=t,vm(this.transport))).then(t=>(this.version=t,this.validateCompatibility()))}getInfo(){return this.info}getVersion(){return this.version}getDeviceInfo(){return Am(this.transport)}getPublicKey(t){const e=Ca(t),r=Buffer.concat([Pa.serializeHRP("init"),e]);return Pm(this.transport,r)}getAddressAndPubKey(t,e){const r=Ca(t),o=Buffer.concat([Pa.serializeHRP(e),r]);return wm(this.transport,o)}showAddressAndPubKey(t,e){const r=Ca(t),o=Buffer.concat([Pa.serializeHRP(e),r]);return Dm(this.transport,o)}sign(t,e){return Mm(this.transport,t,e)}}const ki=120,kc="1.0.0";class W extends Error{constructor(t){super(t),this.name="LedgerError"}}class pi extends mi{constructor(e){super();p(this,"app");p(this,"path",[44,ui,0,0,0]);this.transport=e,this.app=new Pa(this.transport)}get accAddress(){if(!this.publicKey)throw new Error("Ledger is unintialized. Initialize it first.");return this.publicKey.address()}static async create(e,r){e||(e=await Um());const o=new pi(e);return r!=null&&(o.path[4]=r),e&&typeof e.on=="function"&&e.on("disconnect",()=>{o.transport=void 0}),await o.initialize().catch(Im),o}async initialize(){const e=await this.app.initialize(),{app_name:r}=this.app.getInfo();if(r!=="Initia")throw new W("Open the Initia app in the Ledger");const{major:o,minor:s,patch:n}=this.app.getVersion(),a=`${o}.${s}.${n}`;if(r==="Initia"&&Qc.lt(a,kc))throw new W("Outdated version: Update Ledger Initia App to the latest version");ri(e),await this.loadAccountDetails()}async loadAccountDetails(){const e=await this.app.getAddressAndPubKey(this.path,"init");return ri(e),this.publicKey=new Q(Buffer.from(e.compressed_pk.data).toString("base64")),this}async sign(e){this.publicKey||await this.loadAccountDetails();const r=await this.app.sign(this.path,e);return ri(r),Buffer.from(Mi.signatureImport(Buffer.from(r.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 Im=i=>{const t=i.message.trim();if(!t.startsWith("The device is already open"))throw i.name==="TransportOpenUserCancelled"?new W("Couldn't find the Ledger. Check the Ledger is plugged in and unlocked."):t.startsWith("No WebUSB interface found for the Ledger device")?new W(`Couldn't connect to a Ledger device. Use Ledger Live to upgrade the Ledger firmware to version ${kc} or later.`):t.startsWith("Unable to claim interface")?new W("Couldn't access Ledger device. Is it being used in another tab?"):t.startsWith("Transport not defined")?new W("Couldn't access Ledger device. Is it being used in another tab?"):t.startsWith("Not supported")?new W("This browser doesn't support WebUSB yet. Update it to the latest version."):t.startsWith("No device selected")?new W("Couldn't find the Ledger. Check the Ledger is plugged in and unlocked."):i},ri=i=>{if(!i)return;const{error_message:t,device_locked:e}=i;if(e)throw new W("Ledger's screensaver mode is on");if(t.startsWith("TransportRaceCondition"))throw new W("Finish previous action in Ledger");if(t.startsWith("DisconnectedDeviceDuringOperation"))throw new W("Open the Initia app in the Ledger");switch(t){case"U2F: Timeout":throw new W("Couldn't find a connected and unlocked Ledger device");case"App does not seem to be open":throw new W("Open the Initia app in the Ledger");case"Command not allowed":throw new W("Transaction rejected");case"Transaction rejected":throw new W("User rejected the transaction");case"Unknown Status Code: 26628":throw new W("Ledger's screensaver mode is on");case"Instruction not supported":throw new W("Check the Ledger is running latest version of Initia");case"No errors":break;default:throw new W(t)}},Nm=i=>i.indexOf("Win")>-1,Cm=i=>{const t=i.toLowerCase(),e=/chrome|crios/.test(t)&&!/edge|opr\//.test(t),r=e&&!window.google;if(!e&&!r)throw new W("This browser doesn't support Ledger devices");return e?"chrome":"brave"};async function Um(){let i;if(Cm(navigator.userAgent),Nm(navigator.platform)){if(!navigator.hid)throw new W("This browser doesn't have HID enabled. Enable this feature by visiting: chrome://flags/#enable-experimental-web-platform-features");const{default:t}=await Promise.resolve().then(()=>require("./TransportWebHID-CVJmgfzo.js"));i=await t.create(ki*1e3)}else{const{default:t}=await Promise.resolve().then(()=>require("./TransportWebUSB-V4VV5RPc.js"));i=await t.create(ki*1e3)}return i}Object.defineProperty(exports,"State",{enumerable:!0,get:()=>Ct.State});Object.defineProperty(exports,"stateFromJSON",{enumerable:!0,get:()=>Ct.stateFromJSON});Object.defineProperty(exports,"stateToJSON",{enumerable:!0,get:()=>Ct.stateToJSON});exports.ABCIParams=Ns;exports.ACL=sn;exports.APIRequester=Oi;exports.APP_KEY=ym;exports.AbsoluteTxPosition=Js;exports.AcceptedMessageKeysFilter=Ae;exports.AcceptedMessagesFilter=Pe;exports.AccessConfig=q;exports.Allocation=Hs;exports.AllowAllMessagesFilter=be;exports.AllowedMsgAllowance=lr;exports.AuctionAPI=Ri;exports.AuctionParams=os;exports.AuthAPI=Li;exports.AuthInfo=Wt;exports.AuthParams=ss;exports.AuthorizationGrant=zt;exports.AuthzAPI=zi;exports.BankAPI=Gi;exports.BankParams=as;exports.BaseAccount=vt;exports.BasicAllowance=ot;exports.BatchInfo=ht;exports.BatchInfoWithOutput=ea;exports.Blob=na;exports.BlobTx=Ba;exports.BlockParams=xs;exports.BridgeConfig=jt;exports.BridgeInfo=Qt;exports.CHUNK_SIZE=ni;exports.CLA=ua;exports.Channel=Mt;exports.ChannelCounterparty=Ts;exports.ClientConsensusStates=Aa;exports.CodeGrant=ks;exports.Coin=_;exports.Coins=u;exports.CombinedLimit=ve;exports.ConnectionCounterparty=xt;exports.ConsensusStateWithHeight=Rs;exports.ContractExecutionAuthorization=we;exports.ContractGrant=Lt;exports.ContractMigrationAuthorization=De;exports.CurrencyPair=ct;exports.DecisionPolicyWindows=Jt;exports.Delegation=Gs;exports.DenomMetadata=Vt;exports.DenomTrace=Qs;exports.DenomUnit=Ms;exports.Deposit=Fn;exports.DistributionAPI=Vi;exports.DistributionParams=ms;exports.Duration=D;exports.ERROR_CODE=wn;exports.ERROR_DESCRIPTION=ai;exports.Equivocation=ar;exports.EthPublicKey=de;exports.EvidenceAPI=Ki;exports.EvidenceParams=Ss;exports.EvmAPI=Wi;exports.EvmParams=us;exports.ExecuteAuthorization=fe;exports.ExecuteAuthorizationItem=Ds;exports.Fee=Kt;exports.FeeGrantAPI=Ji;exports.ForwardingAPI=Hi;exports.FungibleTokenPacketData=ya;exports.GenericAuthorization=pe;exports.GovAPI=ji;exports.GovParams=ls;exports.GroupAPI=Yi;exports.GroupInfo=Lr;exports.GroupMember=$n;exports.GroupPolicyInfo=Os;exports.GroupProposal=ps;exports.GroupVote=re;exports.Height=A;exports.INIT_COIN_TYPE=ui;exports.INS=da;exports.IbcAPI=Qi;exports.IbcChannelParams=cn;exports.IbcClientParams=qs;exports.IbcConnectionParams=un;exports.IbcFee=oe;exports.IbcHooksAPI=Zi;exports.IbcHooksParams=hs;exports.IbcNftAPI=Xi;exports.IbcNftParams=fs;exports.IbcPermAPI=ec;exports.IbcTransferAPI=tc;exports.IbcVersion=pt;exports.IdentifiedClientState=Ln;exports.IdentifiedConnection=mn;exports.IdentifiedPacketFees=va;exports.InterTxAPI=rc;exports.JSONSerializable=m;exports.Key=mi;exports.LCDClient=gc;exports.LedgerError=W;exports.LedgerKey=pi;exports.LegacyAminoMultisigPublicKey=Xt;exports.LocalInitia=im;exports.Market=et;exports.MarketmapAPI=oc;exports.MarketmapParams=gs;exports.MaxCallsLimit=ye;exports.MaxFundsLimit=_e;exports.Member=Bs;exports.MemberRequest=lt;exports.MerklePrefix=$s;exports.MerkleRoot=Oa;exports.Metadata=_a;exports.MnemonicKey=_t;exports.ModeInfo=C;exports.ModuleAccount=te;exports.MoveAPI=sc;exports.MoveParams=ys;exports.MsgAcknowledgement=yn;exports.MsgAddCodeUploadParamsAddresses=Fe;exports.MsgAddCurrencyPairs=Zr;exports.MsgAddValidator=wo;exports.MsgAuctionBid=ce;exports.MsgBeginRedelegate=vo;exports.MsgBurn=jo;exports.MsgCall=ur;exports.MsgCancelProposal=yr;exports.MsgCancelUnbondingDelegation=Ao;exports.MsgCancelUpgrade=jr;exports.MsgChangeAdmin=Yo;exports.MsgChannelCloseConfirm=fn;exports.MsgChannelCloseInit=hn;exports.MsgChannelOpenAck=pn;exports.MsgChannelOpenConfirm=ln;exports.MsgChannelOpenInit=an;exports.MsgChannelOpenTry=dn;exports.MsgClearAdmin=Ce;exports.MsgClearForwardingAccount=gr;exports.MsgCommunityPoolSpend=sr;exports.MsgCreate=cr;exports.MsgCreate2=mr;exports.MsgCreateBridge=No;exports.MsgCreateDenom=Jo;exports.MsgCreateGroup=Sr;exports.MsgCreateGroupPolicy=Cr;exports.MsgCreateGroupWithPolicy=Ur;exports.MsgCreateMarkets=to;exports.MsgCreateValidator=bo;exports.MsgDelegate=yo;exports.MsgDeleteOutput=Uo;exports.MsgDelist=lo;exports.MsgDeposit=vr;exports.MsgDepositLegacy=_r;exports.MsgDepositValidatorRewardsPool=nr;exports.MsgEditValidator=$t;exports.MsgExecAuthorized=Ke;exports.MsgExecute=no;exports.MsgExecuteContract=Se;exports.MsgExecuteJSON=ao;exports.MsgExecuteMessages=xo;exports.MsgFinalizeTokenDeposit=ko;exports.MsgFinalizeTokenWithdrawal=Bo;exports.MsgForceTransfer=Xo;exports.MsgFundCommunityPool=rr;exports.MsgGovExecute=po;exports.MsgGovExecuteJSON=ho;exports.MsgGovPublish=Ft;exports.MsgGovScript=fo;exports.MsgGovScriptJSON=go;exports.MsgGrantAllowance=pr;exports.MsgGrantAuthorization=Ge;exports.MsgGroupExec=Er;exports.MsgGroupVote=Tt;exports.MsgInitiateTokenDeposit=Eo;exports.MsgInitiateTokenWithdrawal=Mo;exports.MsgInstantiateContract=Me;exports.MsgInstantiateContractV2=xe;exports.MsgLeaveGroup=Br;exports.MsgMigrateContract=Ie;exports.MsgMint=Ho;exports.MsgMultiSend=X;exports.MsgNftTransfer=Vr;exports.MsgPayForBlobs=Zs;exports.MsgPayPacketFee=tn;exports.MsgPayPacketFeeAsync=en;exports.MsgPinCodes=Oe;exports.MsgProposeOutput=Co;exports.MsgPublish=qt;exports.MsgRecordBatch=Io;exports.MsgRecvPacket=gn;exports.MsgRegisterAccount=Yr;exports.MsgRegisterCounterpartyPayee=on;exports.MsgRegisterForwardingAccount=fr;exports.MsgRegisterPayee=rn;exports.MsgRemoveCodeUploadParamsAddresses=$e;exports.MsgRemoveCurrencyPairs=Xr;exports.MsgRemoveMarketAuthorities=oo;exports.MsgRemoveValidator=Do;exports.MsgRevokeAllowance=hr;exports.MsgRevokeAuthorization=Ve;exports.MsgScript=io;exports.MsgScriptJSON=co;exports.MsgSend=We;exports.MsgSetBeforeSendHook=Zo;exports.MsgSetBridgeInfo=Lo;exports.MsgSetDenomMetadata=je;exports.MsgSetDenomMetadataWasm=Qo;exports.MsgSetSendEnabled=He;exports.MsgSetWithdrawAddress=Xe;exports.MsgSoftwareUpgrade=Hr;exports.MsgSpendFeePool=So;exports.MsgStoreAndInstantiateContract=Re;exports.MsgStoreAndMigrateContract=qe;exports.MsgStoreCode=ke;exports.MsgSubmitEvidence=ir;exports.MsgSubmitGroupProposal=Rt;exports.MsgSubmitProposal=Dr;exports.MsgSubmitProposalLegacy=wr;exports.MsgSubmitTx=Qr;exports.MsgSudoContract=Be;exports.MsgTimeout=_n;exports.MsgTimeoutOnClose=vn;exports.MsgTransfer=ze;exports.MsgUndelegate=_o;exports.MsgUnjail=Ko;exports.MsgUnpinCodes=Te;exports.MsgUpdateACL=zr;exports.MsgUpdateAdmin=Ne;exports.MsgUpdateAuctionParams=me;exports.MsgUpdateAuthParams=ue;exports.MsgUpdateBankParams=Je;exports.MsgUpdateBatchInfo=Ro;exports.MsgUpdateChallenger=To;exports.MsgUpdateConsensusParams=Ye;exports.MsgUpdateContractLabel=Le;exports.MsgUpdateCrisisParams=Ze;exports.MsgUpdateDistrParams=or;exports.MsgUpdateEvmParams=dr;exports.MsgUpdateGovParams=xr;exports.MsgUpdateGroupAdmin=Or;exports.MsgUpdateGroupDecisionPolicy=Tr;exports.MsgUpdateGroupMembers=Rr;exports.MsgUpdateGroupMetadata=qr;exports.MsgUpdateGroupPolicyAdmin=Fr;exports.MsgUpdateGroupPolicyMetadata=$r;exports.MsgUpdateIbcChannelParams=bn;exports.MsgUpdateIbcHooksParams=Gr;exports.MsgUpdateIbcNftParams=Kr;exports.MsgUpdateIbcPermAdmin=Wr;exports.MsgUpdateIbcTransferParams=Ys;exports.MsgUpdateInstantiateConfig=Ue;exports.MsgUpdateMarketmapParams=so;exports.MsgUpdateMarkets=eo;exports.MsgUpdateMetadata=Fo;exports.MsgUpdateMoveParams=mo;exports.MsgUpdateMstakingParams=Po;exports.MsgUpdateOpchildParams=Go;exports.MsgUpdateOphostParams=$o;exports.MsgUpdateOracle=zo;exports.MsgUpdateOracleConfig=qo;exports.MsgUpdatePermissionedRelayers=Jr;exports.MsgUpdateProposer=Oo;exports.MsgUpdateRewardParams=Vo;exports.MsgUpdateSlashingParams=Wo;exports.MsgUpdateTokenfactoryParams=ts;exports.MsgUpdateWasmParams=Ee;exports.MsgUpsertMarkets=ro;exports.MsgVerifyInvariant=Qe;exports.MsgVote=Ot;exports.MsgVoteLegacy=Bt;exports.MsgVoteWeighted=Mr;exports.MsgVoteWeightedLegacy=kr;exports.MsgWhitelist=uo;exports.MsgWithdrawDelegatorReward=tr;exports.MsgWithdrawValidatorCommission=er;exports.MstakingAPI=nc;exports.MstakingParams=_s;exports.MultiSignature=em;exports.NftClassTrace=nn;exports.NonFungibleTokenPacketData=ba;exports.OpValidator=An;exports.OpchildAPI=ac;exports.OpchildParams=bs;exports.OphostAPI=ic;exports.OphostParams=vs;exports.OracleAPI=cc;exports.OrderBy=Zc;exports.Output=Yt;exports.P1_VALUES=li;exports.PAYLOAD_TYPE=Na;exports.Packet=yt;exports.PacketFee=ne;exports.PacketId=se;exports.ParamChange=Us;exports.ParamChanges=br;exports.ParameterChangeProposal=Ar;exports.PercentageDecisionPolicy=Nr;exports.PeriodicAllowance=At;exports.Plan=Ht;exports.Proposal=ee;exports.ProviderConfig=Ls;exports.PublishAuthorization=he;exports.QuotePrice=ta;exports.RawKey=La;exports.Redelegation=Nt;exports.RewardAPI=mc;exports.RewardParams=As;exports.RewardWeight=Cs;exports.SendAuthorization=le;exports.SendEnabled=Gt;exports.SignDoc=$i;exports.SignatureV2=V;exports.SignerInfo=bt;exports.SimplePublicKey=Q;exports.SimulateResponse=$a;exports.SlashingAPI=uc;exports.SlashingParams=Ps;exports.StakeAuthorization=Et;exports.StakeAuthorizationValidators=It;exports.StoreCodeAuthorization=ge;exports.TallyResult=ds;exports.TendermintAPI=dc;exports.TextProposal=Pr;exports.ThresholdDecisionPolicy=Ir;exports.Ticker=zs;exports.Timeout=Fs;exports.TokenfactoryAPI=lc;exports.TokenfactoryParams=ws;exports.TransferAuthorization=js;exports.Tx=tt;exports.TxAPI=ra;exports.TxBody=cs;exports.TxInfo=ia;exports.TxLog=Pn;exports.UnbondingDelegation=ft;exports.UpgradeAPI=pc;exports.ValConsPublicKey=j;exports.Validator=G;exports.ValidatorParams=Is;exports.Vote=Es;exports.Wallet=fc;exports.WasmAPI=hc;exports.WasmParams=ns;exports.WebSocketClient=gm;exports.WeightedVoteOption=dt;exports.bcs=om;exports.checkDecimal=Ks;exports.hashToHex=Ea;exports.isTxError=sm;exports.keccak256=qi;exports.num=v;exports.prepareSignBytes=wa;exports.removeNull=Ti;exports.ripemd160=Fi;exports.sha256=Fa;Object.keys(Y).forEach(i=>{i!=="default"&&!Object.prototype.hasOwnProperty.call(exports,i)&&Object.defineProperty(exports,i,{enumerable:!0,get:()=>Y[i]})});