@initia/initia.js 0.2.26 → 0.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Zm=Object.defineProperty;var Ym=(a,t,e)=>t in a?Zm(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var _=(a,t,e)=>Ym(a,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const uu=require("axios"),Xm=require("@initia/initia.proto/cosmos/tx/v1beta1/service"),At=require("bignumber.js"),Qm=require("@initia/initia.proto/cosmos/base/v1beta1/coin"),f=require("@initia/initia.proto/google/protobuf/any"),Oa=require("@initia/initia.proto/sdk/auction/v1/tx"),td=require("@initia/initia.proto/sdk/auction/v1/genesis"),ed=require("@initia/initia.proto/google/protobuf/duration"),$s=require("@initia/initia.proto/cosmos/auth/v1beta1/auth"),dc=require("@initia/initia.proto/cosmos/auth/v1beta1/tx"),wu=require("secp256k1"),Au=require("jscrypto/SHA256"),rd=require("jscrypto/RIPEMD160"),od=require("jscrypto/Base64"),Gi=require("jscrypto"),Pu=require("keccak256"),lc=require("@initia/initia.proto/cosmos/crypto/multisig/keys"),pc=require("@initia/initia.proto/cosmos/crypto/secp256k1/keys"),hc=require("@initia/initia.proto/cosmos/crypto/ed25519/keys"),fc=require("@initia/initia.proto/initia/crypto/v1beta1/ethsecp256k1/keys"),et=require("bech32"),Le=require("@initia/initia.proto/initia/mstaking/v1/authz"),gc=require("@initia/initia.proto/cosmos/bank/v1beta1/authz"),qi=require("@initia/initia.proto/cosmos/authz/v1beta1/authz"),Na=require("@initia/initia.proto/initia/move/v1/authz"),Wt=require("@initia/initia.proto/initia/move/v1/types"),rt=require("@initia/initia.proto/cosmwasm/wasm/v1/authz"),zt=require("@initia/initia.proto/cosmwasm/wasm/v1/types"),E=require("@initia/initia.proto/cosmwasm/wasm/v1/tx"),$i=require("@initia/initia.proto/ibc/applications/transfer/v1/authz"),Ta=require("@initia/initia.proto/ibc/applications/transfer/v1/tx"),Ii=require("@initia/initia.proto/ibc/core/client/v1/client"),bu=require("@initia/initia.proto/ibc/applications/transfer/v1/transfer"),nd=require("@initia/initia.proto/ibc/applications/transfer/v2/packet"),Tn=require("@initia/initia.proto/cosmos/authz/v1beta1/tx"),Yt=require("@initia/initia.proto/cosmos/bank/v1beta1/tx"),si=require("@initia/initia.proto/cosmos/bank/v1beta1/bank"),yc=require("@initia/initia.proto/initia/bank/v1/tx"),_c=require("@initia/initia.proto/celestia/blob/v1/tx"),Mc=require("@initia/initia.proto/celestia/blob/v1/blob"),Ot=require("@initia/initia.proto/cosmos/tx/signing/v1beta1/signing"),Mt=require("@initia/initia.proto/cosmos/tx/v1beta1/tx"),Sc=require("@initia/initia.proto/cosmos/crypto/multisig/v1beta1/multisig"),Xi=require("@initia/initia.proto/tendermint/types/params"),vc=require("@initia/initia.proto/cosmos/consensus/v1/tx"),yi=require("@initia/initia.proto/cosmos/crisis/v1beta1/tx"),It=require("@initia/initia.proto/cosmos/distribution/v1beta1/tx"),Du=require("@initia/initia.proto/initia/distribution/v1/distribution"),Fa=require("@initia/initia.proto/initia/distribution/v1/tx"),wc=require("@initia/initia.proto/cosmos/evidence/v1beta1/tx"),Ac=require("@initia/initia.proto/cosmos/evidence/v1beta1/evidence"),ku=require("@initia/initia.proto/minievm/evm/v1/types"),Xt=require("@initia/initia.proto/minievm/evm/v1/tx"),Fn=require("@initia/initia.proto/cosmos/feegrant/v1beta1/feegrant"),Ra=require("@initia/initia.proto/cosmos/feegrant/v1beta1/tx"),qa=require("@initia/initia.proto/noble/forwarding/v1/tx"),Bt=require("@initia/initia.proto/cosmos/gov/v1/tx"),Qt=require("@initia/initia.proto/cosmos/gov/v1beta1/tx"),Li=require("@initia/initia.proto/cosmos/params/v1beta1/params"),Hi=require("@initia/initia.proto/cosmos/gov/v1beta1/gov"),me=require("@initia/initia.proto/cosmos/gov/v1/gov"),Qi=require("@initia/initia.proto/initia/gov/v1/gov"),Pc=require("@initia/initia.proto/initia/gov/v1/tx"),V=require("@initia/initia.proto/cosmos/group/v1/types"),R=require("@initia/initia.proto/cosmos/group/v1/tx"),te=require("@initia/initia.proto/ibc/applications/fee/v1/tx"),xu=require("@initia/initia.proto/ibc/applications/fee/v1/fee"),ui=require("@initia/initia.proto/ibc/core/channel/v1/channel"),sd=require("@initia/initia.proto/ibc/applications/fee/v1/metadata"),$a=require("@initia/initia.proto/initia/ibchooks/v1/tx"),Mu=require("@initia/initia.proto/initia/ibchooks/v1/types"),La=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/tx"),Su=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/types"),ad=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/packet"),Ha=require("@initia/initia.proto/ibc/applications/perm/v1/tx"),J=require("@initia/initia.proto/ibc/core/channel/v1/tx"),ft=require("@initia/initia.proto/ibc/core/client/v1/tx"),id=require("@initia/initia.proto/cosmos/upgrade/v1beta1/upgrade"),za=require("@initia/initia.proto/cosmos/upgrade/v1beta1/tx"),Iu=require("@initia/initia.proto/ibc/core/commitment/v1/commitment"),ue=require("@initia/initia.proto/ibc/core/connection/v1/connection"),Ut=require("@initia/initia.proto/ibc/core/connection/v1/tx"),Va=require("@initia/initia.proto/initia/intertx/v1/tx"),Ct=require("@initia/initia.proto/connect/marketmap/v2/tx"),Ka=require("@initia/initia.proto/connect/oracle/v2/tx"),cd=require("@initia/initia.proto/connect/types/v2/currency_pair"),ud=require("@initia/initia.proto/connect/oracle/v2/genesis"),Oc=require("@initia/initia.proto/connect/marketmap/v2/market"),md=require("@initia/initia.proto/connect/marketmap/v2/params"),H=require("@initia/initia.proto/initia/move/v1/tx"),gt=require("@initia/initia.proto/initia/mstaking/v1/tx"),Nt=require("@initia/initia.proto/initia/mstaking/v1/staking"),st=require("@initia/opinit.proto/opinit/opchild/v1/tx"),Nc=require("@initia/opinit.proto/opinit/opchild/v1/types"),z=require("@initia/opinit.proto/opinit/ophost/v1/tx"),He=require("@initia/opinit.proto/opinit/ophost/v1/types"),dd=require("@initia/initia.proto/initia/reward/v1/types"),bc=require("@initia/initia.proto/initia/reward/v1/tx"),Ga=require("@initia/initia.proto/cosmos/slashing/v1beta1/tx"),Bu=require("@initia/initia.proto/cosmos/slashing/v1beta1/slashing"),ct=require("@initia/initia.proto/miniwasm/tokenfactory/v1/tx"),ld=require("@initia/initia.proto/miniwasm/tokenfactory/v1/params"),pd=require("@initia/initia.proto/cosmos/base/abci/v1beta1/abci"),Ce=require("@mysten/bcs"),hd=require("ws"),fd=require("ripemd160"),gd=require("semver"),yd=require("bip32"),mu=require("bip39");function Uu(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const _i=Uu(wu),_d=Uu(gd),vd=Xm.OrderBy;class Cu{constructor(t,e){_(this,"axios");_(this,"baseURL");this.baseURL=t;const r={headers:{Accept:"application/json"},timeout:3e4};this.axios=uu.create({...r,...e,headers:{...r.headers,...e==null?void 0:e.headers}})}validateEndpoint(t){if(["../","..\\","%2E%2E%2F","%2E%2E%5C"].some(r=>t.includes(r)))throw new Error("Relative path not allowed");if(t.includes("?"))throw new Error("Query param should be passed via the params argument")}computeEndpoint(t){const e=t.replace(/^\/+/,""),r=new URL(this.baseURL);return r.pathname.endsWith("/")||(r.pathname+="/"),r.pathname+=e,r.toString()}async getRaw(t,e={}){this.validateEndpoint(t);const r=this.computeEndpoint(t);return this.axios.get(r,{params:e}).then(o=>o.data)}async get(t,e={},r=new uu.AxiosHeaders){this.validateEndpoint(t);const o=this.computeEndpoint(t);return this.axios.get(o,{params:e,headers:r}).then(n=>n.data)}async post(t,e){this.validateEndpoint(t);const r=this.computeEndpoint(t);return this.axios.post(r,e).then(o=>o.data)}}function Mi(a){if(Array.isArray(a))return a.map(Mi);if(typeof a!="object"||a===null)return a;const t={};return Object.keys(a).sort().forEach(e=>{a[e]===void 0||a[e]===null||(t[e]=Mi(a[e]))}),t}class u{toJSON(){return JSON.stringify(Mi(this.toData()))}toAminoJSON(){return JSON.stringify(Mi(this.toAmino()))}}function Eu(a){return a!==null&&typeof a=="object"?Object.entries(a).filter(([,t])=>t!=null).reduce((t,[e,r])=>({...t,[e]:r===Object(r)&&!Array.isArray(r)?Eu(r):r}),{}):a}function F(a){return new At.BigNumber(a)}function qs(a){return typeof a=="string"?a.includes("."):!F(a).isInteger()}class S extends u{constructor(e,r){super();_(this,"amount");_(this,"isDecimal");this.denom=e,this.amount=F(r).toString(),this.isDecimal=qs(r)}toIntCoin(){return new S(this.denom,F(this.amount).toFixed())}toIntCeilCoin(){return new S(this.denom,F(this.amount).toFixed(0,2))}toDecCoin(){return new S(this.denom,this.amount.includes(".")?this.amount:F(this.amount).toFixed(1))}toString(){return`${this.isDecimal&&!this.amount.includes(".")?F(this.amount).toFixed(1):F(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],n=r[3];return new S(n,o)}add(e){let r,o=this.isDecimal;if(e instanceof S){if(e.denom!==this.denom)throw new S.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||qs(e);const n=F(this.amount).plus(r);return new S(this.denom,o&&n.isInteger()?n.toFixed(1):n.toFixed())}sub(e){let r,o=this.isDecimal;if(e instanceof S){if(e.denom!==this.denom)throw new S.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||qs(e);const n=F(this.amount).minus(r);return new S(this.denom,o&&n.isInteger()?n.toFixed(1):n.toFixed())}mul(e){const r=this.isDecimal||qs(e),o=F(this.amount).multipliedBy(e);return new S(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}div(e){const r=this.isDecimal||qs(e),o=F(this.amount).dividedBy(e);return new S(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}mod(e){const r=this.isDecimal||qs(e),o=F(this.amount).mod(e);return new S(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}static fromAmino(e){const{denom:r,amount:o}=e;return new S(r,o)}toAmino(){const{denom:e,amount:r}=this;return{denom:e,amount:this.isDecimal?F(r).toFixed(18):r}}static fromData(e){const{denom:r,amount:o}=e;return new S(r,o)}toData(){const{denom:e,amount:r}=this;return{denom:e,amount:this.isDecimal?F(r).toFixed(18):r}}static fromProto(e){return new S(e.denom,e.amount)}toProto(){return Qm.Coin.fromPartial({denom:this.denom,amount:this.isDecimal?F(this.amount).toFixed(18):this.amount})}}(a=>{class t{constructor(r){this.message=r}}a.ArithmeticError=t})(S||(S={}));class ze extends u{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 ze(e,S.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 ze(e,S.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 ze(t.bidder,S.fromProto(t.bid),t.transactions.map(e=>Buffer.from(e).toString("base64")))}toProto(){const{bidder:t,bid:e,transactions:r}=this;return Oa.MsgAuctionBid.fromPartial({bidder:t,bid:e.toProto(),transactions:r.map(o=>Buffer.from(o,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgAuctionBid",value:Oa.MsgAuctionBid.encode(this.toProto()).finish()})}static unpackAny(t){return ze.fromProto(Oa.MsgAuctionBid.decode(t.value))}}class Rn extends u{constructor(t,e,r,o,n,s){super(),this.max_bundle_size=t,this.escrow_account_address=e,this.reserve_fee=r,this.min_bid_increment=o,this.front_running_protection=n,this.proposer_fee=s}static fromAmino(t){const{value:{max_bundle_size:e,escrow_account_address:r,reserve_fee:o,min_bid_increment:n,front_running_protection:s,proposer_fee:i}}=t;return new Rn(parseInt(e),r,S.fromAmino(o),S.fromAmino(n),s,i)}toAmino(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:n,proposer_fee:s}=this;return{type:"block-sdk/x/auction/Params",value:{max_bundle_size:t.toFixed(),escrow_account_address:e,reserve_fee:r.toAmino(),min_bid_increment:o.toAmino(),front_running_protection:n,proposer_fee:s}}}static fromData(t){const{max_bundle_size:e,escrow_account_address:r,reserve_fee:o,min_bid_increment:n,front_running_protection:s,proposer_fee:i}=t;return new Rn(parseInt(e),r,S.fromData(o),S.fromData(n),s,i)}toData(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:n,proposer_fee:s}=this;return{"@type":"/sdk.auction.v1.Params",max_bundle_size:t.toFixed(),escrow_account_address:e,reserve_fee:r.toData(),min_bid_increment:o.toData(),front_running_protection:n,proposer_fee:s}}static fromProto(t){return new Rn(t.maxBundleSize,Buffer.from(t.escrowAccountAddress).toString("base64"),S.fromProto(t.reserveFee),S.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:n,proposer_fee:s}=this;return td.Params.fromPartial({maxBundleSize:t,escrowAccountAddress:Buffer.from(e,"base64"),reserveFee:r.toProto(),minBidIncrement:o.toProto(),frontRunningProtection:n,proposerFee:s})}}class Ve extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ve(e,Rn.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 Ve(e,Rn.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 Ve(t.authority,Rn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Oa.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgUpdateParams",value:Oa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ve.fromProto(Oa.MsgUpdateParams.decode(t.value))}}class Q{constructor(t){this.c=t}}class Ou extends Q{async parameters(t={}){return this.c.get("/block-sdk/auction/v1/params",t).then(e=>Rn.fromData(e.params))}}class l extends u{constructor(e={}){super();_(this,"_coins");if(e instanceof l)this._coins={...e._coins};else if(typeof e=="string")this._coins=l.fromString(e)._coins;else{this._coins={};let r;Array.isArray(e)?r=e:(r=[],Object.keys(e).forEach(o=>r.push(new S(o,e[o]))));for(const o of r){const{denom:n}=o,s=this._coins[n];s!==void 0?this._coins[n]=s.add(o):this._coins[n]=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(n=>S.fromString(n));return new l(o)}denoms(){return this.map(e=>e.denom)}toDecCoins(){return new l(this.map(e=>e.toDecCoin()))}toIntCoins(){return new l(this.map(e=>e.toIntCoin()))}toIntCeilCoins(){return new l(this.map(e=>e.toIntCeilCoin()))}get(e){return this._coins[e]}set(e,r){let o;if(r instanceof S){if(r.denom!=e)throw new Error(`Denoms must match when setting: ${e}, ${r.denom}`);o=r}else o=new S(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 S?new l([e,...Object.values(this._coins)]):new l([...Object.values(e._coins),...Object.values(this._coins)])}sub(e){return this.add(e.mul(-1))}mul(e){return new l(this.map(r=>r.mul(e)))}div(e){return new l(this.map(r=>r.div(e)))}mod(e){return new l(this.map(r=>r.mod(e)))}map(e){return this.toArray().map(e)}filter(e){return new l(this.toArray().filter(e))}static fromAmino(e){return new l((e??[]).map(S.fromAmino))}toAmino(){return this.toArray().map(e=>e.toAmino())}static fromData(e){return new l((e??[]).map(S.fromData))}toData(){return this.toArray().map(e=>e.toData())}static fromProto(e){return new l((e??[]).map(S.fromProto))}toProto(){return this.toArray().map(e=>e.toProto())}}class q{constructor(t,e=0){_(this,"seconds");_(this,"nanos");const[r,o]=(e/Math.pow(10,9)+t).toFixed(9).split(".");this.seconds=parseInt(r),this.nanos=parseInt(o)}static fromString(t){const[e,r]=parseFloat(t.replace("s","")).toFixed(9).split(".");return new q(parseInt(e),parseInt(r))}toString(){return`${this.nanos/Math.pow(10,9)+this.seconds}s`}static fromAmino(t){return q.fromString(t)}toAmino(){return this.toString()}static fromData(t){return q.fromString(t)}toData(){return this.toString()}static fromProto(t){return new q(Number(t.seconds),t.nanos)}toProto(){return ed.Duration.fromPartial({seconds:BigInt(this.seconds),nanos:this.nanos})}}class qn extends u{constructor(t,e,r,o,n){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=n}static fromAmino(t){const{value:{max_memo_characters:e,tx_sig_limit:r,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:n,sig_verify_cost_secp256k1:s}}=t;return new qn(parseInt(e),parseInt(r),parseInt(o),parseInt(n),parseInt(s))}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:n}=this;return{type:"cosmos-sdk/x/auth/Params",value:{max_memo_characters:t.toFixed(),tx_sig_limit:e.toFixed(),tx_size_cost_per_byte:r.toFixed(),sig_verify_cost_ed25519:o.toFixed(),sig_verify_cost_secp256k1:n.toFixed()}}}static fromData(t){const{max_memo_characters:e,tx_sig_limit:r,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:n,sig_verify_cost_secp256k1:s}=t;return new qn(parseInt(e),parseInt(r),parseInt(o),parseInt(n),parseInt(s))}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:n}=this;return{"@type":"/cosmos.auth.v1beta1.Params",max_memo_characters:t.toFixed(),tx_sig_limit:e.toFixed(),tx_size_cost_per_byte:r.toFixed(),sig_verify_cost_ed25519:o.toFixed(),sig_verify_cost_secp256k1:n.toFixed()}}static fromProto(t){return new qn(Number(t.maxMemoCharacters),Number(t.txSigLimit),Number(t.txSizeCostPerByte),Number(t.sigVerifyCostEd25519),Number(t.sigVerifyCostSecp256k1))}toProto(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:o,sig_verify_cost_secp256k1:n}=this;return $s.Params.fromPartial({maxMemoCharacters:BigInt(t),txSigLimit:BigInt(e),txSizeCostPerByte:BigInt(r),sigVerifyCostEd25519:BigInt(o),sigVerifyCostSecp256k1:BigInt(n)})}}class Ke extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ke(e,qn.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 Ke(e,qn.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 Ke(t.authority,qn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return dc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.MsgUpdateParams",value:dc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ke.fromProto(dc.MsgUpdateParams.decode(t.value))}}function Wi(a){return Au.SHA256.hash(od.Base64.parse(a)).toString().toUpperCase()}function tc(a){return Au.SHA256.hash(new Gi.Word32Array(a)).toUint8Array()}function Nu(a){return Pu(Buffer.from(a))}function Tu(a){return rd.RIPEMD160.hash(new Gi.Word32Array(a)).toUint8Array()}const wd=Buffer.from("eb5ae98721","hex"),Ad=Buffer.from("22c1f7e2","hex"),du=a=>{const t=parseInt(a.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;(a=>{function t(o){switch(o.type){case"tendermint/PubKeySecp256k1":return Pt.fromAmino(o);case"tendermint/PubKeyMultisigThreshold":return Ee.fromAmino(o);case"tendermint/PubKeyEd25519":return _t.fromAmino(o);case"initia/PubKeyEthSecp256k1":return Oe.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.crypto.secp256k1.PubKey":return Pt.fromData(o);case"/cosmos.crypto.multisig.LegacyAminoPubKey":return Ee.fromData(o);case"/cosmos.crypto.ed25519.PubKey":return _t.fromData(o);case"/initia.crypto.v1beta1.ethsecp256k1.PubKey":return Oe.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;if(n==="/cosmos.crypto.secp256k1.PubKey")return Pt.unpackAny(o);if(n==="/cosmos.crypto.multisig.LegacyAminoPubKey")return Ee.unpackAny(o);if(n==="/cosmos.crypto.ed25519.PubKey")return _t.unpackAny(o);if(n==="/initia.crypto.v1beta1.ethsecp256k1.PubKey")return Oe.unpackAny(o);throw new Error(`Pubkey type ${n} not recognized`)}a.fromProto=r})(exports.PublicKey||(exports.PublicKey={}));class Pt extends u{constructor(t){super(),this.key=t}static fromAmino(t){return new Pt(t.value)}toAmino(){return{type:"tendermint/PubKeySecp256k1",value:this.key}}static fromData(t){return new Pt(t.key)}toData(){return{"@type":"/cosmos.crypto.secp256k1.PubKey",key:this.key}}static fromProto(t){return new Pt(Buffer.from(t.key).toString("base64"))}toProto(){return pc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:pc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Pt.fromProto(pc.PubKey.decode(t.value))}encodeAminoPubkey(){return Buffer.concat([wd,Buffer.from(this.key,"base64")])}rawAddress(){const t=Buffer.from(this.key,"base64");return Tu(tc(t))}address(){return et.bech32.encode("init",et.bech32.toWords(this.rawAddress()))}}class Ee extends u{constructor(t,e){super(),this.threshold=t,this.pubkeys=e}encodeAminoPubkey(){const t=Array.from(Ad);t.push(8),t.push(...du(this.threshold));for(const e of this.pubkeys.map(r=>r.encodeAminoPubkey()))t.push(18),t.push(...du(e.length)),t.push(...Array.from(e));return new Uint8Array(t)}rawAddress(){const t=this.encodeAminoPubkey();return tc(t).slice(0,20)}address(){return et.bech32.encode("init",et.bech32.toWords(this.rawAddress()))}static fromAmino(t){return new Ee(parseInt(t.value.threshold),t.value.pubkeys.map(e=>Pt.fromAmino(e)))}toAmino(){return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:this.threshold.toFixed(),pubkeys:this.pubkeys.map(t=>t.toAmino())}}}static fromData(t){return new Ee(parseInt(t.threshold),t.public_keys.map(e=>Pt.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 Ee(t.threshold,t.publicKeys.map(e=>Pt.unpackAny(e)))}toProto(){return lc.LegacyAminoPubKey.fromPartial({threshold:this.threshold,publicKeys:this.pubkeys.map(t=>t.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:lc.LegacyAminoPubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Ee.fromProto(lc.LegacyAminoPubKey.decode(t.value))}}class _t extends u{constructor(t){super(),this.key=t}static fromAmino(t){return new _t(t.value)}toAmino(){return{type:"tendermint/PubKeyEd25519",value:this.key}}static fromData(t){return new _t(t.key)}toData(){return{"@type":"/cosmos.crypto.ed25519.PubKey",key:this.key}}static fromProto(t){return new _t(Buffer.from(t.key).toString("base64"))}toProto(){return hc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:hc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return _t.fromProto(hc.PubKey.decode(t.value))}rawAddress(){const t=Buffer.from(this.key,"base64");return tc(t).slice(0,20)}address(){return et.bech32.encode("initvalcons",et.bech32.toWords(this.rawAddress()))}}class Oe extends u{constructor(t){super(),this.key=t}static fromAmino(t){return new Oe(t.value)}toAmino(){return{type:"initia/PubKeyEthSecp256k1",value:this.key}}static fromData(t){return new Oe(t.key)}toData(){return{"@type":"/initia.crypto.v1beta1.ethsecp256k1.PubKey",key:this.key}}static fromProto(t){return new Oe(Buffer.from(t.key).toString("base64"))}toProto(){return fc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.crypto.v1beta1.ethsecp256k1.PubKey",value:fc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Oe.fromProto(fc.PubKey.decode(t.value))}rawAddress(){if(!_i.publicKeyVerify(Buffer.from(this.key,"base64")))throw new Error("Invalid public key");const e=_i.publicKeyConvert(Buffer.from(this.key,"base64"),!1);return Nu(e.slice(1)).slice(12)}address(){return et.bech32.encode("init",et.bech32.toWords(this.rawAddress()))}}class jt extends u{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}static fromAmino(t){const{value:{address:e,public_key:r,account_number:o,sequence:n}}=t;return new jt(e??"",r?exports.PublicKey.fromAmino(r):void 0,parseInt(o)??0,parseInt(n)??0)}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 fromData(t){const{address:e,pub_key:r,account_number:o,sequence:n}=t;return new jt(e??"",r?exports.PublicKey.fromData(r):void 0,parseInt(o)??0,parseInt(n)??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()}}static fromProto(t){const e=t.pubKey;return new jt(t.address,e?exports.PublicKey.fromProto(e):void 0,Number(t.accountNumber),Number(t.sequence))}toProto(){const{address:t,public_key:e,account_number:r,sequence:o}=this;return $s.BaseAccount.fromPartial({address:t,pubKey:e==null?void 0:e.packAny(),accountNumber:BigInt(r),sequence:BigInt(o)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.BaseAccount",value:$s.BaseAccount.encode(this.toProto()).finish()})}static unpackAny(t){return jt.fromProto($s.BaseAccount.decode(t.value))}}class Ne extends u{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 Ne(jt.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 Ne(jt.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 Ne(jt.fromProto(t.baseAccount),t.name,t.permissions)}toProto(){const{base_account:t,name:e,permissions:r}=this;return $s.ModuleAccount.fromPartial({baseAccount:t.toProto(),name:e,permissions:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",value:$s.ModuleAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Ne.fromProto($s.ModuleAccount.decode(t.value))}}exports.Account=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/BaseAccount":return jt.fromAmino(o);case"cosmos-sdk/ModuleAccount":return Ne.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.auth.v1beta1.BaseAccount":return jt.fromData(o);case"/cosmos.auth.v1beta1.ModuleAccount":return Ne.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;if(n==="/cosmos.auth.v1beta1.BaseAccount")return jt.unpackAny(o);if(n==="/cosmos.auth.v1beta1.ModuleAccount")return Ne.unpackAny(o);throw new Error(`Account type ${n} not recognized`)}a.fromProto=r})(exports.Account||(exports.Account={}));class de extends u{constructor(e,r,o,n){super();_(this,"max_tokens");this.allow_list=r,this.deny_list=o,this.authorization_type=n,this.max_tokens=new l(e)}static fromAmino(e){const{value:{max_tokens:r,allow_list:o,deny_list:n,authorization_type:s}}=e;return new de(l.fromAmino(r),ie.fromAmino(o),ie.fromAmino(n),Le.authorizationTypeFromJSON(s))}toAmino(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:n}=this;return{type:"mstake/StakeAuthorization",value:{max_tokens:e.toAmino(),allow_list:r.toAmino(),deny_list:o.toAmino(),authorization_type:Le.authorizationTypeToJSON(n)}}}static fromData(e){const{max_tokens:r,allow_list:o,deny_list:n,authorization_type:s}=e;return new de(l.fromData(r),ie.fromData(o),ie.fromData(n),Le.authorizationTypeFromJSON(s))}toData(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:n}=this;return{"@type":"/initia.mstaking.v1.StakeAuthorization",max_tokens:e.toData(),allow_list:r.toData(),deny_list:o.toData(),authorization_type:Le.authorizationTypeToJSON(n)}}static fromProto(e){return new de(l.fromProto(e.maxTokens),ie.fromProto(e.allowList),ie.fromProto(e.denyList),e.authorizationType)}toProto(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:n}=this;return Le.StakeAuthorization.fromPartial({maxTokens:e.toProto(),allowList:r.toProto(),denyList:o.toProto(),authorizationType:n})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.StakeAuthorization",value:Le.StakeAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return de.fromProto(Le.StakeAuthorization.decode(e.value))}}class ie extends u{constructor(t){super(),this.address=t}static fromAmino(t){return new ie(t.address)}toAmino(){return{address:this.address}}static fromData(t){return new ie(t.address)}toData(){return{address:this.address}}static fromProto(t){return new ie(t.address)}toProto(){return Le.StakeAuthorization_Validators.fromPartial({address:this.address})}}(a=>{a.Type=Le.AuthorizationType})(de||(de={}));class Ge extends u{constructor(e,r){super();_(this,"spend_limit");this.allow_list=r,this.spend_limit=new l(e)}static fromAmino(e){return new Ge(l.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 Ge(l.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 Ge(l.fromProto(e.spendLimit),e.allowList)}toProto(){return gc.SendAuthorization.fromPartial({spendLimit:this.spend_limit.toProto(),allowList:this.allow_list})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.SendAuthorization",value:gc.SendAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return Ge.fromProto(gc.SendAuthorization.decode(e.value))}}class We extends u{constructor(t){super(),this.msg=t}static fromAmino(t){return new We(t.value.msg)}toAmino(){const{msg:t}=this;return{type:"cosmos-sdk/GenericAuthorization",value:{msg:t}}}static fromData(t){return new We(t.msg)}toData(){const{msg:t}=this;return{"@type":"/cosmos.authz.v1beta1.GenericAuthorization",msg:t}}static fromProto(t){return new We(t.msg)}toProto(){return qi.GenericAuthorization.fromPartial({msg:this.msg})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",value:qi.GenericAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return We.fromProto(qi.GenericAuthorization.decode(t.value))}}class je extends u{constructor(t){super(),this.module_names=t}static fromAmino(t){return new je(t.value.module_names)}toAmino(){return{type:"move/PublishAuthorization",value:{module_names:this.module_names}}}static fromData(t){return new je(t.module_names)}toData(){return{"@type":"/initia.move.v1.PublishAuthorization",module_names:this.module_names}}static fromProto(t){return new je(t.moduleNames)}toProto(){return Na.PublishAuthorization.fromPartial({moduleNames:this.module_names})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.PublishAuthorization",value:Na.PublishAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return je.fromProto(Na.PublishAuthorization.decode(t.value))}}class Je extends u{constructor(t){super(),this.items=t}static fromAmino(t){return new Je(t.value.items.map(ms.fromAmino))}toAmino(){return{type:"move/ExecuteAuthorization",value:{items:this.items.map(t=>t.toAmino())}}}static fromData(t){return new Je(t.items.map(ms.fromData))}toData(){return{"@type":"/initia.move.v1.ExecuteAuthorization",items:this.items.map(t=>t.toData())}}static fromProto(t){return new Je(t.items.map(ms.fromProto))}toProto(){return Na.ExecuteAuthorization.fromPartial({items:this.items.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.ExecuteAuthorization",value:Na.ExecuteAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Je.fromProto(Na.ExecuteAuthorization.decode(t.value))}}class ms extends u{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 ms(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 ms(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 ms(t.moduleAddress,t.moduleName,t.functionNames)}toProto(){return Wt.ExecuteAuthorizationItem.fromPartial({moduleAddress:this.module_address,moduleName:this.module_name,functionNames:this.function_names})}}class at extends u{constructor(t,e){super(),this.permission=t,this.addresses=e}static fromAmino(t){const{permission:e,addresses:r}=t;return new at(zt.accessTypeFromJSON(e),r)}toAmino(){const{permission:t,addresses:e}=this;return{permission:zt.accessTypeToJSON(t),addresses:e}}static fromData(t){const{permission:e,addresses:r}=t;return new at(zt.accessTypeFromJSON(e),r)}toData(){const{permission:t,addresses:e}=this;return{permission:zt.accessTypeToJSON(t),addresses:e}}static fromProto(t){return new at(t.permission,t.addresses)}toProto(){const{permission:t,addresses:e}=this;return zt.AccessConfig.fromPartial({permission:t,addresses:e})}}(a=>{a.Type=zt.AccessType})(at||(at={}));class ds extends u{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?at.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?at.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?at.fromProto(t.instantiatePermission):void 0)}toProto(){const{code_hash:t,instantiate_permission:e}=this;return rt.CodeGrant.fromPartial({codeHash:Buffer.from(t,"base64"),instantiatePermission:e==null?void 0:e.toProto()})}}class Ze extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new Ze(t.value.grants.map(ds.fromAmino))}toAmino(){return{type:"wasm/StoreCodeAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new Ze(t.grants.map(ds.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.StoreCodeAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new Ze(t.grants.map(ds.fromProto))}toProto(){return rt.StoreCodeAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.StoreCodeAuthorization",value:rt.StoreCodeAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Ze.fromProto(rt.StoreCodeAuthorization.decode(t.value))}}class Ye extends u{constructor(t){super(),this.remaining=t}static fromAmino(t){return new Ye(parseInt(t.value.remaining))}toAmino(){return{type:"wasm/MaxCallsLimit",value:{remaining:this.remaining.toFixed()}}}static fromData(t){return new Ye(parseInt(t.remaining))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxCallsLimit",remaining:this.remaining.toFixed()}}static fromProto(t){return new Ye(Number(t.remaining))}toProto(){return rt.MaxCallsLimit.fromPartial({remaining:BigInt(this.remaining)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxCallsLimit",value:rt.MaxCallsLimit.encode(this.toProto()).finish()})}static unpackAny(t){return Ye.fromProto(rt.MaxCallsLimit.decode(t.value))}}class Xe extends u{constructor(e){super();_(this,"amounts");this.amounts=new l(e)}static fromAmino(e){return new Xe(l.fromAmino(e.value.amounts))}toAmino(){return{type:"wasm/MaxFundsLimit",value:{amounts:this.amounts.toAmino()}}}static fromData(e){return new Xe(l.fromData(e.amounts))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxFundsLimit",amounts:this.amounts.toData()}}static fromProto(e){return new Xe(l.fromProto(e.amounts))}toProto(){return rt.MaxFundsLimit.fromPartial({amounts:this.amounts.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxFundsLimit",value:rt.MaxFundsLimit.encode(this.toProto()).finish()})}static unpackAny(e){return Xe.fromProto(rt.MaxFundsLimit.decode(e.value))}}class Qe extends u{constructor(e,r){super();_(this,"amounts");this.calls_remaining=e,this.amounts=new l(r)}static fromAmino(e){const{value:{calls_remaining:r,amounts:o}}=e;return new Qe(parseInt(r),l.fromAmino(o))}toAmino(){const{calls_remaining:e,amounts:r}=this;return{type:"wasm/CombinedLimit",value:{calls_remaining:e.toFixed(),amounts:r.toAmino()}}}static fromData(e){const{calls_remaining:r,amounts:o}=e;return new Qe(parseInt(r),l.fromData(o))}toData(){const{calls_remaining:e,amounts:r}=this;return{"@type":"/cosmwasm.wasm.v1.CombinedLimit",calls_remaining:e.toFixed(),amounts:r.toData()}}static fromProto(e){return new Qe(Number(e.callsRemaining),l.fromProto(e.amounts))}toProto(){const{calls_remaining:e,amounts:r}=this;return rt.CombinedLimit.fromPartial({callsRemaining:BigInt(e),amounts:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.CombinedLimit",value:rt.CombinedLimit.encode(this.toProto()).finish()})}static unpackAny(e){return Qe.fromProto(rt.CombinedLimit.decode(e.value))}}var vi;(a=>{function t(o){switch(o.type){case"wasm/MaxCallsLimit":return Ye.fromAmino(o);case"wasm/MaxFundsLimit":return Xe.fromAmino(o);case"wasm/CombinedLimit":return Qe.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.MaxCallsLimit":return Ye.fromData(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return Xe.fromData(o);case"/cosmwasm.wasm.v1.CombinedLimit":return Qe.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmwasm.wasm.v1.MaxCallsLimit":return Ye.unpackAny(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return Xe.unpackAny(o);case"/cosmwasm.wasm.v1.CombinedLimit":return Qe.unpackAny(o)}throw new Error(`ContractLimit type ${n} not recognized`)}a.fromProto=r})(vi||(vi={}));class tr extends u{constructor(){super()}static fromAmino(t){return new tr}toAmino(){return{type:"wasm/AllowAllMessagesFilter",value:{}}}static fromData(t){return new tr}toData(){return{"@type":"/cosmwasm.wasm.v1.AllowAllMessagesFilter"}}static fromProto(t){return new tr}toProto(){return rt.AllowAllMessagesFilter.fromPartial({})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AllowAllMessagesFilter",value:rt.AllowAllMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return tr.fromProto(rt.AllowAllMessagesFilter.decode(t.value))}}class er extends u{constructor(t){super(),this.keys=t}static fromAmino(t){return new er(t.value.keys)}toAmino(){return{type:"wasm/AcceptedMessageKeysFilter",value:{keys:this.keys}}}static fromData(t){return new er(t.keys)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",keys:this.keys}}static fromProto(t){return new er(t.keys)}toProto(){return rt.AcceptedMessageKeysFilter.fromPartial({keys:this.keys})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",value:rt.AcceptedMessageKeysFilter.encode(this.toProto()).finish()})}static unpackAny(t){return er.fromProto(rt.AcceptedMessageKeysFilter.decode(t.value))}}class rr extends u{constructor(t){super(),this.messages=t}static fromAmino(t){return new rr(t.value.messages)}toAmino(){return{type:"wasm/AcceptedMessagesFilter",value:{messages:this.messages}}}static fromData(t){return new rr(t.messages)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessagesFilter",messages:this.messages}}static fromProto(t){return new rr(t.messages.map(e=>Buffer.from(e).toString("base64")))}toProto(){return rt.AcceptedMessagesFilter.fromPartial({messages:this.messages.map(t=>Buffer.from(t,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessagesFilter",value:rt.AcceptedMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return rr.fromProto(rt.AcceptedMessagesFilter.decode(t.value))}}var wi;(a=>{function t(o){switch(o.type){case"wasm/AllowAllMessagesFilter":return tr.fromAmino(o);case"wasm/AcceptedMessageKeysFilter":return er.fromAmino(o);case"wasm/AcceptedMessagesFilter":return rr.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return tr.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return er.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return rr.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return tr.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return er.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return rr.unpackAny(o)}throw new Error(`ContractFilter type ${n} not recognized`)}a.fromProto=r})(wi||(wi={}));class ve extends u{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 ve(e,vi.fromAmino(r),wi.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 ve(e,vi.fromData(r),wi.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 ve(t.contract,vi.fromProto(t.limit),wi.fromProto(t.filter))}toProto(){const{contract:t,limit:e,filter:r}=this;return rt.ContractGrant.fromPartial({contract:t,limit:e.packAny(),filter:r.packAny()})}}class or extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new or(t.value.grants.map(ve.fromAmino))}toAmino(){return{type:"wasm/ContractExecutionAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new or(t.grants.map(ve.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractExecutionAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new or(t.grants.map(ve.fromProto))}toProto(){return rt.ContractExecutionAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractExecutionAuthorization",value:rt.ContractExecutionAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return or.fromProto(rt.ContractExecutionAuthorization.decode(t.value))}}class nr extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new nr(t.value.grants.map(ve.fromAmino))}toAmino(){return{type:"wasm/ContractMigrationAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new nr(t.grants.map(ve.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractMigrationAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new nr(t.grants.map(ve.fromProto))}toProto(){return rt.ContractMigrationAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractMigrationAuthorization",value:rt.ContractMigrationAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return nr.fromProto(rt.ContractMigrationAuthorization.decode(t.value))}}class sr extends u{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 sr(e,r,o?at.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 sr(e,r,o?at.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 sr(t.sender,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?at.fromProto(t.instantiatePermission):void 0)}toProto(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return E.MsgStoreCode.fromPartial({sender:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:r==null?void 0:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:E.MsgStoreCode.encode(this.toProto()).finish()})}static unpackAny(t){return sr.fromProto(E.MsgStoreCode.decode(t.value))}}class ar extends u{constructor(e,r,o,n,s,i){super();_(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=n,this.msg=s,this.funds=new l(i)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:n,label:s,msg:i,funds:c}}=e;return new ar(r,o,parseInt(n),s,Buffer.from(JSON.stringify(i)).toString("base64"),l.fromAmino(c))}toAmino(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i}=this;return{type:"wasm/MsgInstantiateContract",value:{sender:e,admin:r,code_id:o.toFixed(),label:n,msg:JSON.parse(Buffer.from(s,"base64").toString()),funds:i.toAmino()}}}static fromData(e){const{sender:r,admin:o,code_id:n,label:s,msg:i,funds:c}=e;return new ar(r,o,parseInt(n),s,Buffer.from(JSON.stringify(i)).toString("base64"),l.fromData(c))}toData(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:e,admin:r,code_id:o.toFixed(),label:n,msg:JSON.parse(Buffer.from(s,"base64").toString()),funds:i.toData()}}static fromProto(e){return new ar(e.sender,e.admin,Number(e.codeId),e.label,Buffer.from(e.msg).toString("base64"),l.fromProto(e.funds))}toProto(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i}=this;return E.MsgInstantiateContract.fromPartial({sender:e,admin:r,codeId:BigInt(o),label:n,msg:Buffer.from(s,"base64"),funds:i.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:E.MsgInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return ar.fromProto(E.MsgInstantiateContract.decode(e.value))}}class ir extends u{constructor(e,r,o,n,s,i,c,d){super();_(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=n,this.msg=s,this.salt=c,this.fix_msg=d,this.funds=new l(i)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:n,label:s,msg:i,funds:c,salt:d,fix_msg:g}}=e;return new ir(r,o,parseInt(n),s,Buffer.from(JSON.stringify(i)).toString("base64"),l.fromAmino(c),d,g)}toAmino(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i,salt:c,fix_msg:d}=this;return{type:"wasm/MsgInstantiateContract2",value:{sender:e,admin:r,code_id:o.toFixed(),label:n,msg:JSON.parse(Buffer.from(s,"base64").toString()),funds:i.toAmino(),salt:c,fix_msg:d}}}static fromData(e){const{sender:r,admin:o,code_id:n,label:s,msg:i,funds:c,salt:d,fix_msg:g}=e;return new ir(r,o,parseInt(n),s,Buffer.from(JSON.stringify(i)).toString("base64"),l.fromData(c),d,g)}toData(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i,salt:c,fix_msg:d}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract2",sender:e,admin:r,code_id:o.toFixed(),label:n,msg:JSON.parse(Buffer.from(s,"base64").toString()),funds:i.toData(),salt:c,fix_msg:d}}static fromProto(e){return new ir(e.sender,e.admin,Number(e.codeId),e.label,Buffer.from(e.msg).toString("base64"),l.fromProto(e.funds),Buffer.from(e.salt).toString("base64"),e.fixMsg)}toProto(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i,salt:c,fix_msg:d}=this;return E.MsgInstantiateContract2.fromPartial({sender:e,admin:r,codeId:BigInt(o),label:n,msg:Buffer.from(s,"base64"),funds:i.toProto(),salt:Buffer.from(c,"base64"),fixMsg:d})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:E.MsgInstantiateContract2.encode(this.toProto()).finish()})}static unpackAny(e){return ir.fromProto(E.MsgInstantiateContract2.decode(e.value))}}class cr extends u{constructor(e,r,o,n){super();_(this,"funds");this.sender=e,this.contract=r,this.msg=o,this.funds=new l(n)}static fromAmino(e){const{value:{sender:r,contract:o,msg:n,funds:s}}=e;return new cr(r,o,Buffer.from(JSON.stringify(n)).toString("base64"),l.fromAmino(s))}toAmino(){const{sender:e,contract:r,msg:o,funds:n}=this;return{type:"wasm/MsgExecuteContract",value:{sender:e,contract:r,msg:JSON.parse(Buffer.from(o,"base64").toString()),funds:n.toAmino()}}}static fromData(e){const{sender:r,contract:o,msg:n,funds:s}=e;return new cr(r,o,Buffer.from(JSON.stringify(n)).toString("base64"),l.fromData(s))}toData(){const{sender:e,contract:r,msg:o,funds:n}=this;return{"@type":"/cosmwasm.wasm.v1.MsgExecuteContract",sender:e,contract:r,msg:JSON.parse(Buffer.from(o,"base64").toString()),funds:n.toData()}}static fromProto(e){return new cr(e.sender,e.contract,Buffer.from(e.msg).toString("base64"),l.fromProto(e.funds))}toProto(){const{sender:e,contract:r,msg:o,funds:n}=this;return E.MsgExecuteContract.fromPartial({sender:e,contract:r,msg:Buffer.from(o,"base64"),funds:n.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:E.MsgExecuteContract.encode(this.toProto()).finish()})}static unpackAny(e){return cr.fromProto(E.MsgExecuteContract.decode(e.value))}}class ur extends u{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:n}}=t;return new ur(e,r,parseInt(o),Buffer.from(JSON.stringify(n)).toString("base64"))}toAmino(){const{sender:t,contract:e,code_id:r,msg:o}=this;return{type:"wasm/MsgMigrateContract",value:{sender:t,contract:e,code_id:r.toFixed(),msg:JSON.parse(Buffer.from(o,"base64").toString())}}}static fromData(t){const{sender:e,contract:r,code_id:o,msg:n}=t;return new ur(e,r,parseInt(o),Buffer.from(JSON.stringify(n)).toString("base64"))}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.toFixed(),msg:JSON.parse(Buffer.from(o,"base64").toString())}}static fromProto(t){return new ur(t.sender,t.contract,Number(t.codeId),Buffer.from(t.msg).toString("base64"))}toProto(){const{sender:t,contract:e,code_id:r,msg:o}=this;return E.MsgMigrateContract.fromPartial({sender:t,contract:e,codeId:BigInt(r),msg:Buffer.from(o,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:E.MsgMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return ur.fromProto(E.MsgMigrateContract.decode(t.value))}}class mr extends u{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 mr(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 mr(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 mr(t.sender,t.newAdmin,t.contract)}toProto(){const{sender:t,new_admin:e,contract:r}=this;return E.MsgUpdateAdmin.fromPartial({sender:t,newAdmin:e,contract:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:E.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return mr.fromProto(E.MsgUpdateAdmin.decode(t.value))}}class dr extends u{constructor(t,e){super(),this.sender=t,this.contract=e}static fromAmino(t){const{value:{sender:e,contract:r}}=t;return new dr(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 dr(e,r)}toData(){const{sender:t,contract:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:t,contract:e}}static fromProto(t){return new dr(t.sender,t.contract)}toProto(){const{sender:t,contract:e}=this;return E.MsgClearAdmin.fromPartial({sender:t,contract:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:E.MsgClearAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return dr.fromProto(E.MsgClearAdmin.decode(t.value))}}class lr extends u{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 lr(e,parseInt(r),at.fromAmino(o))}toAmino(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return{type:"wasm/MsgUpdateInstantiateConfig",value:{sender:t,code_id:e.toFixed(),new_instantiate_permission:r.toAmino()}}}static fromData(t){const{sender:e,code_id:r,new_instantiate_permission:o}=t;return new lr(e,parseInt(r),at.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.toFixed(),new_instantiate_permission:r.toData()}}static fromProto(t){return new lr(t.sender,Number(t.codeId),at.fromProto(t.newInstantiatePermission))}toProto(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return E.MsgUpdateInstantiateConfig.fromPartial({sender:t,codeId:BigInt(e),newInstantiatePermission:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",value:E.MsgUpdateInstantiateConfig.encode(this.toProto()).finish()})}static unpackAny(t){return lr.fromProto(E.MsgUpdateInstantiateConfig.decode(t.value))}}class $n extends u{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 $n(at.fromAmino(e),zt.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:zt.accessTypeToJSON(e)}}}static fromData(t){const{code_upload_access:e,instantiate_default_permission:r}=t;return new $n(at.fromData(e),zt.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:zt.accessTypeToJSON(e)}}static fromProto(t){return new $n(at.fromProto(t.codeUploadAccess),t.instantiateDefaultPermission)}toProto(){const{code_upload_access:t,instantiate_default_permission:e}=this;return zt.Params.fromPartial({codeUploadAccess:t.toProto(),instantiateDefaultPermission:e})}}class pr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new pr(e,$n.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 pr(e,$n.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 pr(t.authority,$n.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return E.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",value:E.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return pr.fromProto(E.MsgUpdateParams.decode(t.value))}}class hr extends u{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 hr(e,r,Buffer.from(JSON.stringify(o)).toString("base64"))}toAmino(){const{authority:t,contract:e,msg:r}=this;return{type:"wasm/MsgSudoContract",value:{authority:t,contract:e,msg:JSON.parse(Buffer.from(r,"base64").toString())}}}static fromData(t){const{authority:e,contract:r,msg:o}=t;return new hr(e,r,Buffer.from(JSON.stringify(o)).toString("base64"))}toData(){const{authority:t,contract:e,msg:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgSudoContract",authority:t,contract:e,msg:JSON.parse(Buffer.from(r,"base64").toString())}}static fromProto(t){return new hr(t.authority,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,contract:e,msg:r}=this;return E.MsgSudoContract.fromPartial({authority:t,contract:e,msg:Buffer.from(r,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",value:E.MsgSudoContract.encode(this.toProto()).finish()})}static unpackAny(t){return hr.fromProto(E.MsgSudoContract.decode(t.value))}}class fr extends u{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:r}}=t;return new fr(e,r.map(parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgPinCodes",value:{authority:t,code_ids:e.map(r=>r.toFixed())}}}static fromData(t){const{authority:e,code_ids:r}=t;return new fr(e,r.map(parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgPinCodes",authority:t,code_ids:e.map(r=>r.toFixed())}}static fromProto(t){return new fr(t.authority,t.codeIds.map(e=>Number(e)))}toProto(){const{authority:t,code_ids:e}=this;return E.MsgPinCodes.fromPartial({authority:t,codeIds:e.map(r=>BigInt(r))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",value:E.MsgPinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return fr.fromProto(E.MsgPinCodes.decode(t.value))}}class gr extends u{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:r}}=t;return new gr(e,r.map(parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgUnpinCodes",value:{authority:t,code_ids:e.map(r=>r.toFixed())}}}static fromData(t){const{authority:e,code_ids:r}=t;return new gr(e,r.map(parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUnpinCodes",authority:t,code_ids:e.map(r=>r.toFixed())}}static fromProto(t){return new gr(t.authority,t.codeIds.map(e=>Number(e)))}toProto(){const{authority:t,code_ids:e}=this;return E.MsgUnpinCodes.fromPartial({authority:t,codeIds:e.map(r=>BigInt(r))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",value:E.MsgUnpinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return gr.fromProto(E.MsgUnpinCodes.decode(t.value))}}class yr extends u{constructor(e,r,o,n,s,i,c,d,g,v,b){super();_(this,"funds");this.authority=e,this.wasm_byte_code=r,this.instantiate_permission=o,this.unpin_code=n,this.admin=s,this.label=i,this.msg=c,this.source=g,this.builder=v,this.code_hash=b,this.funds=new l(d)}static fromAmino(e){const{value:{authority:r,wasm_byte_code:o,instantiate_permission:n,unpin_code:s,admin:i,label:c,msg:d,funds:g,source:v,builder:b,code_hash:k}}=e;return new yr(r,o,n?at.fromAmino(n):void 0,s,i,c,Buffer.from(JSON.stringify(d)).toString("base64"),l.fromAmino(g),v,b,k)}toAmino(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:n,admin:s,label:i,msg:c,funds:d,source:g,builder:v,code_hash:b}=this;return{type:"wasm/MsgStoreAndInstantiateContract",value:{authority:e,wasm_byte_code:r,instantiate_permission:o==null?void 0:o.toAmino(),unpin_code:n,admin:s,label:i,msg:JSON.parse(Buffer.from(c,"base64").toString()),funds:d.toAmino(),source:g,builder:v,code_hash:b}}}static fromData(e){const{authority:r,wasm_byte_code:o,instantiate_permission:n,unpin_code:s,admin:i,label:c,msg:d,funds:g,source:v,builder:b,code_hash:k}=e;return new yr(r,o,n?at.fromData(n):void 0,s,i,c,Buffer.from(JSON.stringify(d)).toString("base64"),l.fromData(g),v,b,k)}toData(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:n,admin:s,label:i,msg:c,funds:d,source:g,builder:v,code_hash:b}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",authority:e,wasm_byte_code:r,instantiate_permission:o==null?void 0:o.toData(),unpin_code:n,admin:s,label:i,msg:JSON.parse(Buffer.from(c,"base64").toString()),funds:d.toData(),source:g,builder:v,code_hash:b}}static fromProto(e){return new yr(e.authority,Buffer.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?at.fromProto(e.instantiatePermission):void 0,e.unpinCode,e.admin,e.label,Buffer.from(e.msg).toString("base64"),l.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:n,admin:s,label:i,msg:c,funds:d,source:g,builder:v,code_hash:b}=this;return E.MsgStoreAndInstantiateContract.fromPartial({authority:e,wasmByteCode:Buffer.from(r,"base64"),instantiatePermission:o==null?void 0:o.toProto(),unpinCode:n,admin:s,label:i,msg:Buffer.from(c,"base64"),funds:d.toProto(),source:g,builder:v,codeHash:Buffer.from(b,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",value:E.MsgStoreAndInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return yr.fromProto(E.MsgStoreAndInstantiateContract.decode(e.value))}}class _r extends u{constructor(t,e,r,o,n){super(),this.authority=t,this.wasm_byte_code=e,this.instantiate_permission=r,this.contract=o,this.msg=n}static fromAmino(t){const{value:{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:n,msg:s}}=t;return new _r(e,r,o?at.fromAmino(o):void 0,n,Buffer.from(JSON.stringify(s)).toString("base64"))}toAmino(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:n}=this;return{type:"wasm/MsgStoreAndMigrateContract",value:{authority:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toAmino(),contract:o,msg:JSON.parse(Buffer.from(n,"base64").toString())}}}static fromData(t){const{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:n,msg:s}=t;return new _r(e,r,o?at.fromData(o):void 0,n,Buffer.from(JSON.stringify(s)).toString("base64"))}toData(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:n}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",authority:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toData(),contract:o,msg:JSON.parse(Buffer.from(n,"base64").toString())}}static fromProto(t){return new _r(t.authority,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?at.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:n}=this;return E.MsgStoreAndMigrateContract.fromPartial({authority:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:r==null?void 0:r.toProto(),contract:o,msg:Buffer.from(n,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",value:E.MsgStoreAndMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return _r.fromProto(E.MsgStoreAndMigrateContract.decode(t.value))}}class vr extends u{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new vr(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 vr(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new vr(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return E.MsgAddCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",value:E.MsgAddCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return vr.fromProto(E.MsgAddCodeUploadParamsAddresses.decode(t.value))}}class wr extends u{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new wr(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 wr(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new wr(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return E.MsgRemoveCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",value:E.MsgRemoveCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return wr.fromProto(E.MsgRemoveCodeUploadParamsAddresses.decode(t.value))}}class Ar extends u{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 Ar(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 Ar(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 Ar(t.sender,t.newLabel,t.contract)}toProto(){const{sender:t,new_label:e,contract:r}=this;return E.MsgUpdateContractLabel.fromPartial({sender:t,newLabel:e,contract:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",value:E.MsgUpdateContractLabel.encode(this.toProto()).finish()})}static unpackAny(t){return Ar.fromProto(E.MsgUpdateContractLabel.decode(t.value))}}class Ls extends u{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 Ls(parseInt(e),parseInt(r))}toAmino(){const{block_height:t,tx_index:e}=this;return{block_height:t.toFixed(),tx_index:e.toFixed()}}static fromData(t){const{block_height:e,tx_index:r}=t;return new Ls(parseInt(e),parseInt(r))}toData(){const{block_height:t,tx_index:e}=this;return{block_height:t.toFixed(),tx_index:e.toFixed()}}static fromProto(t){return new Ls(Number(t.blockHeight),Number(t.txIndex))}toProto(){const{block_height:t,tx_index:e}=this;return zt.AbsoluteTxPosition.fromPartial({blockHeight:BigInt(t),txIndex:BigInt(e)})}}class Hs extends u{constructor(e,r,o,n,s){super();_(this,"spend_limit");this.source_port=e,this.source_channel=r,this.allow_list=n,this.allowed_packet_data=s,this.spend_limit=new l(o)}static fromAmino(e){const{source_port:r,source_channel:o,spend_limit:n,allow_list:s,allowed_packet_data:i}=e;return new Hs(r,o,l.fromAmino(n),s,i)}toAmino(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:n,allowed_packet_data:s}=this;return{source_port:e,source_channel:r,spend_limit:o.toAmino(),allow_list:n,allowed_packet_data:s}}static fromData(e){const{source_port:r,source_channel:o,spend_limit:n,allow_list:s,allowed_packet_data:i}=e;return new Hs(r,o,l.fromData(n),s,i)}toData(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:n,allowed_packet_data:s}=this;return{source_port:e,source_channel:r,spend_limit:o.toData(),allow_list:n,allowed_packet_data:s}}static fromProto(e){return new Hs(e.sourcePort,e.sourceChannel,l.fromProto(e.spendLimit),e.allowList,e.allowedPacketData)}toProto(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:n,allowed_packet_data:s}=this;return $i.Allocation.fromPartial({sourcePort:e,sourceChannel:r,spendLimit:o.toProto(),allowList:n,allowedPacketData:s})}}class zs extends u{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 zs(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 zs(t.allocations.map(Hs.fromProto))}toProto(){return $i.TransferAuthorization.fromPartial({allocations:this.allocations.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.TransferAuthorization",value:$i.TransferAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return zs.fromProto($i.TransferAuthorization.decode(t.value))}}class U extends u{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 U(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 U(parseInt(e),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 U(Number(t.revisionNumber),Number(t.revisionHeight))}toProto(){const{revision_number:t,revision_height:e}=this;return Ii.Height.fromPartial({revisionNumber:BigInt(t),revisionHeight:BigInt(e)})}}class Pr extends u{constructor(e,r,o,n,s,i,c,d){super();_(this,"source_port");_(this,"source_channel");_(this,"token");_(this,"sender");_(this,"receiver");_(this,"timeout_height");_(this,"timeout_timestamp");_(this,"memo");if(!i&&!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=n,this.receiver=s,this.timeout_height=i,this.timeout_timestamp=c,this.memo=d}static fromAmino(e){const{value:{source_port:r,source_channel:o,token:n,sender:s,receiver:i,timeout_height:c,timeout_timestamp:d,memo:g}}=e;if(!c&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Pr(r,o,n?S.fromAmino(n):void 0,s,i,U.fromAmino(c),d,g)}toAmino(){const{source_port:e,source_channel:r,token:o,sender:n,receiver:s,timeout_height:i,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:n,receiver:s,timeout_height:(i==null?void 0:i.toAmino())??{},timeout_timestamp:c,memo:d===""?void 0:d}}}static fromData(e){const{source_port:r,source_channel:o,token:n,sender:s,receiver:i,timeout_timestamp:c,timeout_height:d,memo:g}=e;if(!d&&!c)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Pr(r,o,n?S.fromData(n):void 0,s,i,d?U.fromData(d):void 0,c==="0"?void 0:c,g)}toData(){const{source_port:e,source_channel:r,token:o,sender:n,receiver:s,timeout_height:i,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:n,receiver:s,timeout_height:i?i.toData():new U(0,0).toData(),timeout_timestamp:c??"0",memo:d}}static fromProto(e){if(!e.timeoutHeight&&Number(e.timeoutTimestamp)==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new Pr(e.sourcePort,e.sourceChannel,e.token?S.fromProto(e.token):void 0,e.sender,e.receiver,e.timeoutHeight?U.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:r,token:o,sender:n,receiver:s,timeout_height:i,timeout_timestamp:c,memo:d}=this;return Ta.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,token:o==null?void 0:o.toProto(),sender:n,receiver:s,timeoutHeight:i==null?void 0:i.toProto(),timeoutTimestamp:c?BigInt(c):void 0,memo:d})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:Ta.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Pr.fromProto(Ta.MsgTransfer.decode(e.value))}}class ls extends u{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 ls(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 ls(e,r)}toData(){const{send_enabled:t,receive_enabled:e}=this;return{send_enabled:t,receive_enabled:e}}static fromProto(t){return new ls(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return bu.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class Vs extends u{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 Vs(e,ls.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 Vs(t.signer,ls.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Ta.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgUpdateParams",value:Ta.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vs.fromProto(Ta.MsgUpdateParams.decode(t.value))}}class Ks extends u{constructor(t,e){super(),this.path=t,this.base_denom=e}static fromAmino(t){const{path:e,base_denom:r}=t;return new Ks(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 Ks(e,r)}toData(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromProto(t){return new Ks(t.path,t.baseDenom)}toProto(){const{path:t,base_denom:e}=this;return bu.DenomTrace.fromPartial({path:t,baseDenom:e})}}class Ai extends u{constructor(t,e,r,o,n){super(),this.denom=t,this.amount=e,this.sender=r,this.receiver=o,this.memo=n}static fromAmino(t){const{denom:e,amount:r,sender:o,receiver:n,memo:s}=t;return new Ai(e,r,o,n,s)}toAmino(){const{denom:t,amount:e,sender:r,receiver:o,memo:n}=this;return{denom:t,amount:e,sender:r,receiver:o,memo:n}}static fromData(t){const{denom:e,amount:r,sender:o,receiver:n,memo:s}=t;return new Ai(e,r,o,n,s)}toData(){const{denom:t,amount:e,sender:r,receiver:o,memo:n}=this;return{denom:t,amount:e,sender:r,receiver:o,memo:n}}static fromProto(t){return new Ai(t.denom,t.amount,t.sender,t.receiver,t.memo)}toProto(){const{denom:t,amount:e,sender:r,receiver:o,memo:n}=this;return nd.FungibleTokenPacketData.fromPartial({denom:t,amount:e,sender:r,receiver:o,memo:n})}}class we extends u{constructor(t,e){super(),this.authorization=t,this.expiration=e}static fromAmino(t){const{authorization:e,expiration:r}=t;return new we(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()}}static fromData(t){const{authorization:e,expiration:r}=t;return new we(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()}}static fromProto(t){return new we(exports.Authorization.fromProto(t.authorization),t.expiration)}toProto(){const{authorization:t,expiration:e}=this;return qi.Grant.fromPartial({authorization:t.packAny(),expiration:e})}}exports.Authorization=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/SendAuthorization":return Ge.fromAmino(o);case"cosmos-sdk/GenericAuthorization":return We.fromAmino(o);case"mstake/StakeAuthorization":return de.fromAmino(o);case"move/ExecuteAuthorization":return Je.fromAmino(o);case"move/PublishAuthorization":return je.fromAmino(o);case"wasm/StoreCodeAuthorization":return Ze.fromAmino(o);case"wasm/ContractExecutionAuthorization":return or.fromAmino(o);case"wasm/ContractMigrationAuthorization":return nr.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.authz.v1beta1.GenericAuthorization":return We.fromData(o);case"/cosmos.bank.v1beta1.SendAuthorization":return Ge.fromData(o);case"/initia.mstaking.v1.StakeAuthorization":return de.fromData(o);case"/initia.move.v1.PublishAuthorization":return je.fromData(o);case"/initia.move.v1.ExecuteAuthorization":return Je.fromData(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Ze.fromData(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return or.fromData(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return nr.fromData(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return zs.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.authz.v1beta1.GenericAuthorization":return We.unpackAny(o);case"/cosmos.bank.v1beta1.SendAuthorization":return Ge.unpackAny(o);case"/initia.mstaking.v1.StakeAuthorization":return de.unpackAny(o);case"/initia.move.v1.PublishAuthorization":return je.unpackAny(o);case"/initia.move.v1.ExecuteAuthorization":return Je.unpackAny(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Ze.unpackAny(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return or.unpackAny(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return nr.unpackAny(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return zs.unpackAny(o)}throw new Error(`Authorization type ${n} not recognized`)}a.fromProto=r})(exports.Authorization||(exports.Authorization={}));class br extends u{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 br(e,r,we.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 br(e,r,we.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 br(t.granter,t.grantee,we.fromProto(t.grant))}toProto(){const{grant:t,granter:e,grantee:r}=this;return Tn.MsgGrant.fromPartial({grant:t.toProto(),grantee:r,granter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgGrant",value:Tn.MsgGrant.encode(this.toProto()).finish()})}static unpackAny(t){return br.fromProto(Tn.MsgGrant.decode(t.value))}}class Dr extends u{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 Dr(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 Dr(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 Dr(t.granter,t.grantee,t.msgTypeUrl)}toProto(){const{granter:t,grantee:e,msg_type_url:r}=this;return Tn.MsgRevoke.fromPartial({grantee:e,granter:t,msgTypeUrl:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",value:Tn.MsgRevoke.encode(this.toProto()).finish()})}static unpackAny(t){return Dr.fromProto(Tn.MsgRevoke.decode(t.value))}}class kr extends u{constructor(t,e){super(),this.grantee=t,this.msgs=e}static fromAmino(t){const{value:{grantee:e,msgs:r}}=t;return new kr(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 kr(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 kr(t.grantee,t.msgs.map(e=>exports.Msg.fromProto(e)))}toProto(){const{grantee:t,msgs:e}=this;return Tn.MsgExec.fromPartial({grantee:t,msgs:e.map(r=>r.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:Tn.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return kr.fromProto(Tn.MsgExec.decode(t.value))}}class xr extends u{constructor(e,r,o){super();_(this,"amount");this.from_address=e,this.to_address=r,this.amount=new l(o)}static fromAmino(e){const{value:{from_address:r,to_address:o,amount:n}}=e;return new xr(r,o,l.fromAmino(n))}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:n}=e;return new xr(r,o,l.fromData(n))}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 xr(e.fromAddress,e.toAddress,l.fromProto(e.amount))}toProto(){const{from_address:e,to_address:r,amount:o}=this;return Yt.MsgSend.fromPartial({fromAddress:e,toAddress:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:Yt.MsgSend.encode(this.toProto()).finish()})}static unpackAny(e){return xr.fromProto(Yt.MsgSend.decode(e.value))}}class bt extends u{constructor(t,e){super(),this.inputs=t,this.outputs=e}static fromAmino(t){const{value:{inputs:e,outputs:r}}=t;return new bt(e.map(o=>bt.Input.fromAmino(o)),r.map(o=>bt.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 bt(e.map(o=>bt.Input.fromData(o)),r.map(o=>bt.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 bt(t.inputs.map(e=>bt.Input.fromProto(e)),t.outputs.map(e=>bt.Output.fromProto(e)))}toProto(){const{inputs:t,outputs:e}=this;return Yt.MsgMultiSend.fromPartial({inputs:t.map(r=>r.toProto()),outputs:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgMultiSend",value:Yt.MsgMultiSend.encode(this.toProto()).finish()})}static unpackAny(t){return bt.fromProto(Yt.MsgMultiSend.decode(t.value))}}(a=>{class t extends u{constructor(n,s){super();_(this,"coins");this.address=n,this.coins=new l(s)}static fromAmino(n){const{address:s,coins:i}=n;return new t(s,l.fromAmino(i))}toAmino(){const{address:n,coins:s}=this;return{address:n,coins:s.toAmino()}}static fromData(n){const{address:s,coins:i}=n;return new t(s,l.fromData(i))}toData(){const{address:n,coins:s}=this;return{address:n,coins:s.toData()}}static fromProto(n){return new t(n.address,l.fromProto(n.coins))}toProto(){const{address:n,coins:s}=this;return si.Input.fromPartial({address:n,coins:s.toProto()})}}a.Input=t;class e extends u{constructor(n,s){super();_(this,"coins");this.address=n,this.coins=new l(s)}static fromAmino(n){const{address:s,coins:i}=n;return new e(s,l.fromAmino(i))}toAmino(){const{address:n,coins:s}=this;return{address:n,coins:s.toAmino()}}static fromData(n){const{address:s,coins:i}=n;return new e(s,l.fromData(i))}toData(){const{address:n,coins:s}=this;return{address:n,coins:s.toData()}}static fromProto(n){return new e(n.address,l.fromProto(n.coins))}toProto(){const{address:n,coins:s}=this;return si.Output.fromPartial({address:n,coins:s.toProto()})}}a.Output=e})(bt||(bt={}));class Ae extends u{constructor(t,e){super(),this.denom=t,this.enabled=e}static fromAmino(t){const{denom:e,enabled:r}=t;return new Ae(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 Ae(e,r)}toData(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromProto(t){return new Ae(t.denom,t.enabled)}toProto(){const{denom:t,enabled:e}=this;return si.SendEnabled.fromPartial({denom:t,enabled:e})}}class Ln extends u{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 Ln(e.map(Ae.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 Ln(e.map(Ae.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 Ln(t.sendEnabled.map(Ae.fromProto),t.defaultSendEnabled)}toProto(){const{send_enabled:t,default_send_enabled:e}=this;return si.Params.fromPartial({sendEnabled:t.map(r=>r.toProto()),defaultSendEnabled:e})}}class Mr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Mr(e,Ln.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 Mr(e,Ln.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 Mr(t.authority,Ln.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Yt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",value:Yt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Mr.fromProto(Yt.MsgUpdateParams.decode(t.value))}}class Sr extends u{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 Sr(e,r.map(Ae.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 Sr(e,r.map(Ae.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 Sr(t.authority,t.sendEnabled.map(Ae.fromProto),t.useDefaultFor)}toProto(){const{authority:t,send_enabled:e,use_default_for:r}=this;return Yt.MsgSetSendEnabled.fromPartial({authority:t,sendEnabled:e.map(o=>o.toProto()),useDefaultFor:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",value:Yt.MsgSetSendEnabled.encode(this.toProto()).finish()})}static unpackAny(t){return Sr.fromProto(Yt.MsgSetSendEnabled.decode(t.value))}}class ps extends u{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 ps(e,parseInt(r),o)}toAmino(){const{denom:t,exponent:e,aliases:r}=this;return{denom:t,exponent:e.toFixed(),aliases:r}}static fromData(t){const{denom:e,exponent:r,aliases:o}=t;return new ps(e,parseInt(r),o)}toData(){const{denom:t,exponent:e,aliases:r}=this;return{denom:t,exponent:e.toFixed(),aliases:r}}static fromProto(t){return new ps(t.denom,t.exponent,t.aliases)}toProto(){const{denom:t,exponent:e,aliases:r}=this;return si.DenomUnit.fromPartial({denom:t,exponent:e,aliases:r})}}class Pe extends u{constructor(t,e,r,o,n,s,i,c){super(),this.description=t,this.denom_units=e,this.base=r,this.display=o,this.name=n,this.symbol=s,this.uri=i,this.uri_hash=c}static fromAmino(t){const{description:e,denom_units:r,base:o,display:n,name:s,symbol:i,uri:c,uri_hash:d}=t;return new Pe(e,r.map(ps.fromAmino),o,n,s,i,c,d)}toAmino(){const{description:t,denom_units:e,base:r,display:o,name:n,symbol:s,uri:i,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toAmino()),base:r,display:o,name:n,symbol:s,uri:i,uri_hash:c}}static fromData(t){const{description:e,denom_units:r,base:o,display:n,name:s,symbol:i,uri:c,uri_hash:d}=t;return new Pe(e,r.map(ps.fromData),o,n,s,i,c,d)}toData(){const{description:t,denom_units:e,base:r,display:o,name:n,symbol:s,uri:i,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toData()),base:r,display:o,name:n,symbol:s,uri:i,uri_hash:c}}static fromProto(t){return new Pe(t.description,t.denomUnits.map(ps.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:n,symbol:s,uri:i,uri_hash:c}=this;return si.Metadata.fromPartial({description:t,denomUnits:e.map(d=>d.toProto()),base:r,display:o,name:n,symbol:s,uri:i,uriHash:c})}}class Ir extends u{constructor(t,e){super(),this.authority=t,this.metadata=e}static fromAmino(t){const{value:{authority:e,metadata:r}}=t;return new Ir(e,Pe.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 Ir(e,Pe.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 Ir(t.authority,Pe.fromProto(t.metadata))}toProto(){const{authority:t,metadata:e}=this;return yc.MsgSetDenomMetadata.fromPartial({authority:t,metadata:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.bank.v1.MsgSetDenomMetadata",value:yc.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Ir.fromProto(yc.MsgSetDenomMetadata.decode(t.value))}}class Gs extends u{constructor(t,e,r,o,n){super(),this.signer=t,this.namespaces=e,this.blob_sizes=r,this.share_commitments=o,this.share_versions=n}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:n,share_versions:s}=t;return new Gs(e,r,o.map(parseInt),n,s.map(parseInt))}toData(){const{signer:t,namespaces:e,blob_sizes:r,share_commitments:o,share_versions:n}=this;return{"@type":"/celestia.blob.v1.MsgPayForBlobs",signer:t,namespaces:e,blob_sizes:r.map(s=>s.toFixed()),share_commitments:o,share_versions:n.map(s=>s.toFixed())}}static fromProto(t){return new Gs(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:n}=this;return _c.MsgPayForBlobs.fromPartial({signer:t,namespaces:e.map(s=>Buffer.from(s,"base64")),blobSizes:r,shareCommitments:o.map(s=>Buffer.from(s,"base64")),shareVersions:n})}packAny(){return f.Any.fromPartial({typeUrl:"/celestia.blob.v1.MsgPayForBlobs",value:_c.MsgPayForBlobs.encode(this.toProto()).finish()})}static unpackAny(t){return Gs.fromProto(_c.MsgPayForBlobs.decode(t.value))}}class ai extends u{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 ai(t.namespace_id,t.data,parseInt(t.share_version),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.toFixed(),namespace_version:o.toFixed()}}static fromProto(t){return new ai(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 Mc.Blob.fromPartial({namespaceId:Buffer.from(t,"base64"),data:Buffer.from(e,"base64"),shareVersion:r,namespaceVersion:o})}}class Hn{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 Hn(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=n=>n.toString(2).split("0").join("").length;let r=0;const o=this.count();t>o&&(t=o);for(let n=0;;n++){if(n*8+7>=t)return r+=e(this.elems[n]>>7-t%8+1),r;r+=e(this.elems[n])}}static fromData(t){return new Hn(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 Hn(t.extraBitsStored,Buffer.from(t.elems))}toProto(){return Sc.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})}}class be extends u{constructor(e,r,o,n){super();_(this,"amount");this.gas_limit=e,this.payer=o,this.granter=n,this.amount=new l(r)}static fromAmino(e){const{gas:r,amount:o}=e;return new be(parseInt(r),l.fromAmino(o),"","")}toAmino(){return{gas:F(this.gas_limit).toFixed(),amount:this.amount.toAmino()}}static fromData(e){return new be(parseInt(e.gas_limit),l.fromData(e.amount),e.payer,e.granter)}toData(){const{amount:e,gas_limit:r,payer:o,granter:n}=this;return{amount:e.toData(),gas_limit:r.toFixed(),granter:n??"",payer:o??""}}static fromProto(e){return new be(Number(e.gasLimit),l.fromProto(e.amount),e.payer,e.granter)}toProto(){const{amount:e,gas_limit:r,payer:o,granter:n}=this;return Mt.Fee.fromPartial({amount:e.toProto(),gasLimit:BigInt(r),granter:n,payer:o})}gasPrices(){return this.amount.toDecCoins().div(this.gas_limit)}}class lt{constructor(t,e,r){this.public_key=t,this.data=e,this.sequence=r}static fromAmino(t){return new lt(exports.PublicKey.fromAmino(t.pub_key),new lt.Descriptor(new lt.Descriptor.Single(lt.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,t.signature)),0)}static fromData(t){return new lt(exports.PublicKey.fromData(t.public_key),lt.Descriptor.fromData(t.data),parseInt(t.sequence))}toData(){return{public_key:this.public_key.toData(),data:this.data.toData(),sequence:this.sequence.toFixed()}}}(a=>{a.SignMode=Ot.SignMode;class t{constructor(r){_(this,"single");_(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 X(new X.Single(r.mode)),Buffer.from(r.signature,"base64")]}if(this.multi){const r=this.multi,o=[],n=[];for(const i of r.signatures){const[c,d]=i.toModeInfoAndSignature();o.push(c),n.push(d)}const s=Sc.MultiSignature.encode(Sc.MultiSignature.fromPartial({signatures:n})).finish();return[new X(new X.Multi(r.bitarray,o)),s]}throw new Error("invalid signature descriptor")}}a.Descriptor=t,(e=>{class r{constructor(s,i){this.mode=s,this.signature=i}static fromData(s){return new r(Ot.signModeFromJSON(s.mode),s.signature)}toData(){const{mode:s,signature:i}=this;return{mode:Ot.signModeToJSON(s),signature:i}}}e.Single=r;class o{constructor(s,i){this.bitarray=s,this.signatures=i}static fromData(s){return new o(Hn.fromData(s.bitarray),s.signatures.map(i=>e.fromData(i)))}toData(){return{bitarray:this.bitarray.toData(),signatures:this.signatures.map(s=>s.toData())}}}e.Multi=o})(t=a.Descriptor||(a.Descriptor={}))})(lt||(lt={}));class Dt{constructor(t,e,r){this.body=t,this.auth_info=e,this.signatures=r}static fromAmino(t){const e=t.value.signatures.map(r=>lt.fromAmino(r));return new Dt(new zn(t.value.msg.map(r=>exports.Msg.fromAmino(r)),t.value.memo,parseInt(t.value.timeout_height)),new De([],be.fromAmino(t.value.fee)),e.map(r=>{var o;return((o=r.data.single)==null?void 0:o.signature)??""}))}static fromData(t){return new Dt(zn.fromData(t.body),De.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(Mt.Tx.decode(t.value))}static fromProto(t){return new Dt(zn.fromProto(t.body),De.fromProto(t.authInfo),t.signatures.map(e=>Buffer.from(e).toString("base64")))}toProto(){return Mt.Tx.fromPartial({body:this.body.toProto(),authInfo:this.auth_info.toProto(),signatures:this.signatures.map(t=>Buffer.from(t,"base64"))})}toBytes(){return Mt.Tx.encode(this.toProto()).finish()}static fromBuffer(t){return Dt.fromProto(Mt.Tx.decode(t))}appendEmptySignatures(t){t.forEach(e=>{let r;e.publicKey?e.publicKey instanceof Ee?r=new Jt(e.publicKey,e.sequenceNumber,new X(new X.Multi(Hn.fromBits(e.publicKey.pubkeys.length),[]))):r=new Jt(e.publicKey,e.sequenceNumber,new X(new X.Single(X.SignMode.SIGN_MODE_DIRECT))):r=new Jt(new Pt(""),e.sequenceNumber,new X(new X.Single(X.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 Jt(e.public_key,e.sequence,r))}}}class zn{constructor(t,e,r){this.messages=t,this.memo=e,this.timeout_height=r}static fromData(t){return new zn(t.messages.map(e=>exports.Msg.fromData(e)),t.memo,parseInt(t.timeout_height))}toData(){return{memo:this.memo??"",messages:this.messages.map(t=>t.toData()),timeout_height:(this.timeout_height??0).toFixed()}}static fromProto(t){return new zn(t.messages.map(e=>exports.Msg.fromProto(e)),t.memo,Number(t.timeoutHeight))}toProto(){return Mt.TxBody.fromPartial({memo:this.memo,messages:this.messages.map(t=>t.packAny()),timeoutHeight:this.timeout_height?BigInt(this.timeout_height):void 0})}toBytes(){return Mt.TxBody.encode(this.toProto()).finish()}}class De{constructor(t,e){this.signer_infos=t,this.fee=e}static fromData(t){return new De(t.signer_infos.map(e=>Jt.fromData(e)),be.fromData(t.fee))}toData(){return{fee:this.fee.toData(),signer_infos:this.signer_infos.map(t=>t.toData())}}static fromProto(t){return new De(t.signerInfos.map(e=>Jt.fromProto(e)),be.fromProto(t.fee))}toProto(){return Mt.AuthInfo.fromPartial({fee:this.fee.toProto(),signerInfos:this.signer_infos.map(t=>t.toProto())})}toBytes(){return Mt.AuthInfo.encode(this.toProto()).finish()}}class Jt{constructor(t,e,r){this.public_key=t,this.sequence=e,this.mode_info=r}static fromData(t){return new Jt(exports.PublicKey.fromData(t.public_key??new Pt("").toData()),parseInt(t.sequence),X.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 Jt(exports.PublicKey.fromProto(t.publicKey??new Pt("").packAny()),Number(t.sequence),X.fromProto(t.modeInfo))}toProto(){const{public_key:t,sequence:e,mode_info:r}=this;return Mt.SignerInfo.fromPartial({modeInfo:r.toProto(),publicKey:t==null?void 0:t.packAny(),sequence:BigInt(e)})}}class X{constructor(t){_(this,"single");_(this,"multi");t instanceof X.Single?this.single=t:this.multi=t}static fromData(t){if(t.single)return new X(X.Single.fromData(t.single));if(t.multi)return new X(X.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 X(e?X.Single.fromProto(e):X.Multi.fromProto(r))}toProto(){var t,e;return Mt.ModeInfo.fromPartial({multi:(t=this.multi)==null?void 0:t.toProto(),single:(e=this.single)==null?void 0:e.toProto()})}}(a=>{a.SignMode=Ot.SignMode;class t{constructor(o){this.mode=o}static fromData(o){return new t(Ot.signModeFromJSON(o.mode))}toData(){return{mode:Ot.signModeToJSON(this.mode)}}static fromProto(o){return new t(o.mode)}toProto(){return Mt.ModeInfo_Single.fromPartial({mode:this.mode})}}a.Single=t;class e{constructor(o,n){this.bitarray=o,this.modeInfos=n}static fromData(o){return new e(Hn.fromData(o.bitarray),o.mode_infos.map(n=>a.fromData(n)))}toData(){return{bitarray:this.bitarray.toData(),mode_infos:this.modeInfos.map(o=>o.toData())}}static fromProto(o){return new e(Hn.fromProto(o.bitarray),o.modeInfos.map(n=>a.fromProto(n)))}toProto(){return Mt.ModeInfo_Multi.fromPartial({bitarray:this.bitarray.toProto(),modeInfos:this.modeInfos.map(o=>o.toProto())})}}a.Multi=e})(X||(X={}));class ji extends u{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 ji(Dt.fromData(e),r.map(ai.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 ji(Dt.fromBuffer(Buffer.from(t.tx)),t.blobs.map(ai.fromProto),t.typeId)}toProto(){const{tx:t,blobs:e,type_id:r}=this;return Mc.BlobTx.fromPartial({tx:t.toBytes(),blobs:e.map(o=>o.toProto()),typeId:r})}toBytes(){return Mc.BlobTx.encode(this.toProto()).finish()}}class hs extends u{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 hs(parseInt(e),parseInt(r))}toAmino(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toFixed(),max_gas:e.toFixed()}}static fromData(t){const{max_bytes:e,max_gas:r}=t;return new hs(parseInt(e),parseInt(r))}toData(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toFixed(),max_gas:e.toFixed()}}static fromProto(t){return new hs(Number(t.maxBytes),Number(t.maxGas))}toProto(){const{max_bytes:t,max_gas:e}=this;return Xi.BlockParams.fromPartial({maxBytes:BigInt(t),maxGas:BigInt(e)})}}class fs extends u{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 fs(parseInt(e),q.fromAmino(r),parseInt(o))}toAmino(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return{max_age_num_blocks:t.toFixed(),max_age_duration:e.toAmino(),max_bytes:r.toFixed()}}static fromData(t){const{max_age_num_blocks:e,max_age_duration:r,max_bytes:o}=t;return new fs(parseInt(e),q.fromData(r),parseInt(o))}toData(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return{max_age_num_blocks:t.toFixed(),max_age_duration:e.toData(),max_bytes:r.toFixed()}}static fromProto(t){return new fs(Number(t.maxAgeNumBlocks),q.fromProto(t.maxAgeDuration),Number(t.maxBytes))}toProto(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return Xi.EvidenceParams.fromPartial({maxAgeNumBlocks:BigInt(t),maxAgeDuration:e.toProto(),maxBytes:BigInt(r)})}}class gs extends u{constructor(t){super(),this.pub_key_types=t}static fromAmino(t){return new gs(t.pub_key_types)}toAmino(){return{pub_key_types:this.pub_key_types}}static fromData(t){return new gs(t.pub_key_types)}toData(){return{pub_key_types:this.pub_key_types}}static fromProto(t){return new gs(t.pubKeyTypes)}toProto(){return Xi.ValidatorParams.fromPartial({pubKeyTypes:this.pub_key_types})}}class ys extends u{constructor(t){super(),this.vote_extensions_enable_height=t}static fromAmino(t){return new ys(parseInt(t.vote_extensions_enable_height))}toAmino(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromData(t){return new ys(parseInt(t.vote_extensions_enable_height))}toData(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromProto(t){return new ys(Number(t.voteExtensionsEnableHeight))}toProto(){return Xi.ABCIParams.fromPartial({voteExtensionsEnableHeight:BigInt(this.vote_extensions_enable_height)})}}class Br extends u{constructor(t,e,r,o,n){super(),this.authority=t,this.block=e,this.evidence=r,this.validator=o,this.abci=n}static fromAmino(t){const{value:{authority:e,block:r,evidence:o,validator:n,abci:s}}=t;return new Br(e,r?hs.fromAmino(r):void 0,o?fs.fromAmino(o):void 0,n?gs.fromAmino(n):void 0,s?ys.fromAmino(s):void 0)}toAmino(){const{authority:t,block:e,evidence:r,validator:o,abci:n}=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:n==null?void 0:n.toAmino()}}}static fromData(t){const{authority:e,block:r,evidence:o,validator:n,abci:s}=t;return new Br(e,r?hs.fromData(r):void 0,o?fs.fromData(o):void 0,n?gs.fromData(n):void 0,s?ys.fromData(s):void 0)}toData(){const{authority:t,block:e,evidence:r,validator:o,abci:n}=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:n==null?void 0:n.toData()}}static fromProto(t){return new Br(t.authority,hs.fromProto(t.block),fs.fromProto(t.evidence),gs.fromProto(t.validator),ys.fromProto(t.abci))}toProto(){const{authority:t,block:e,evidence:r,validator:o,abci:n}=this;return vc.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:n==null?void 0:n.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.consensus.v1.MsgUpdateParams",value:vc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Br.fromProto(vc.MsgUpdateParams.decode(t.value))}}class Ur extends u{constructor(t,e,r){super(),this.sender=t,this.invariant_module_name=e,this.invariant_route=r}static fromAmino(t){const{value:{sender:e,invariant_module_name:r,invariant_route:o}}=t;return new Ur(e,r,o)}toAmino(){throw new Error("MsgVerifyInvarant is not allowed to send")}static fromData(t){const{sender:e,invariant_module_name:r,invariant_route:o}=t;return new Ur(e,r,o)}toData(){const{sender:t,invariant_module_name:e,invariant_route:r}=this;return{"@type":"/cosmos.crisis.v1beta1.MsgVerifyInvariant",sender:t,invariant_module_name:e,invariant_route:r}}static fromProto(t){return new Ur(t.sender,t.invariantModuleName,t.invariantRoute)}toProto(){throw new Error("MsgVerifyInvarant is not allowed to send")}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgVerifyInvariant",value:yi.MsgVerifyInvariant.encode(this.toProto()).finish()})}static unpackAny(t){return Ur.fromProto(yi.MsgVerifyInvariant.decode(t.value))}}class Cr extends u{constructor(t,e){super(),this.authority=t,this.constant_fee=e}static fromAmino(t){const{value:{authority:e,constant_fee:r}}=t;return new Cr(e,S.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 Cr(e,S.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 Cr(t.authority,S.fromProto(t.constantFee))}toProto(){const{authority:t,constant_fee:e}=this;return yi.MsgUpdateParams.fromPartial({authority:t,constantFee:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgUpdateParams",value:yi.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Cr.fromProto(yi.MsgUpdateParams.decode(t.value))}}class Er extends u{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 Er(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 Er(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 Er(t.delegatorAddress,t.withdrawAddress)}toProto(){const{delegator_address:t,withdraw_address:e}=this;return It.MsgSetWithdrawAddress.fromPartial({delegatorAddress:t,withdrawAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",value:It.MsgSetWithdrawAddress.encode(this.toProto()).finish()})}static unpackAny(t){return Er.fromProto(It.MsgSetWithdrawAddress.decode(t.value))}}class Or extends u{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 Or(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 Or(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 Or(t.delegatorAddress,t.validatorAddress)}toProto(){const{delegator_address:t,validator_address:e}=this;return It.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t,validatorAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:It.MsgWithdrawDelegatorReward.encode(this.toProto()).finish()})}static unpackAny(t){return Or.fromProto(It.MsgWithdrawDelegatorReward.decode(t.value))}}class Nr extends u{constructor(t){super(),this.validator_address=t}static fromAmino(t){const{value:{validator_address:e}}=t;return new Nr(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 Nr(e)}toData(){const{validator_address:t}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",validator_address:t}}static fromProto(t){return new Nr(t.validatorAddress)}toProto(){const{validator_address:t}=this;return It.MsgWithdrawValidatorCommission.fromPartial({validatorAddress:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",value:It.MsgWithdrawValidatorCommission.encode(this.toProto()).finish()})}static unpackAny(t){return Nr.fromProto(It.MsgWithdrawValidatorCommission.decode(t.value))}}class Tr extends u{constructor(e,r){super();_(this,"amount");this.depositor=e,this.amount=new l(r)}static fromAmino(e){const{value:{depositor:r,amount:o}}=e;return new Tr(r,l.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 Tr(r,l.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 Tr(e.depositor,l.fromProto(e.amount))}toProto(){const{depositor:e,amount:r}=this;return It.MsgFundCommunityPool.fromPartial({amount:r.toProto(),depositor:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",value:It.MsgFundCommunityPool.encode(this.toProto()).finish()})}static unpackAny(e){return Tr.fromProto(It.MsgFundCommunityPool.decode(e.value))}}class _s extends u{constructor(t,e){super(),this.denom=t,this.weight=e}static fromAmino(t){const{denom:e,weight:r}=t;return new _s(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 _s(e,r)}toData(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromProto(t){return new _s(t.denom,t.weight)}toProto(){const{denom:t,weight:e}=this;return Du.RewardWeight.fromPartial({denom:t,weight:e})}}class Vn extends u{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 Vn(e,r,o.map(_s.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 Vn(e,r,o.map(_s.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 Vn(t.communityTax,t.withdrawAddrEnabled,t.rewardWeights.map(_s.fromProto))}toProto(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return Du.Params.fromPartial({communityTax:t,withdrawAddrEnabled:e,rewardWeights:r.map(o=>o.toProto())})}}class Fr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Fr(e,Vn.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 Fr(e,Vn.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 Fr(t.authority,Vn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Fa.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgUpdateParams",value:Fa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Fr.fromProto(Fa.MsgUpdateParams.decode(t.value))}}class Rr extends u{constructor(e,r,o){super();_(this,"amount");this.authority=e,this.recipient=r,this.amount=new l(o)}static fromAmino(e){const{value:{authority:r,recipient:o,amount:n}}=e;return new Rr(r,o,l.fromAmino(n))}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:n}=e;return new Rr(r,o,l.fromData(n))}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 Rr(e.authority,e.recipient,l.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return It.MsgCommunityPoolSpend.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",value:It.MsgCommunityPoolSpend.encode(this.toProto()).finish()})}static unpackAny(e){return Rr.fromProto(It.MsgCommunityPoolSpend.decode(e.value))}}class qr extends u{constructor(e,r,o,n){super();_(this,"amount");this.depositor=e,this.validator_address=r,this.denom=o,this.amount=new l(n)}static fromAmino(e){const{value:{depositor:r,validator_address:o,denom:n,amount:s}}=e;return new qr(r,o,n,l.fromAmino(s))}toAmino(){const{depositor:e,validator_address:r,denom:o,amount:n}=this;return{type:"distr/MsgDepositValidatorRewardsPool",value:{depositor:e,validator_address:r,denom:o,amount:n.toAmino()}}}static fromData(e){const{depositor:r,validator_address:o,denom:n,amount:s}=e;return new qr(r,o,n,l.fromData(s))}toData(){const{depositor:e,validator_address:r,denom:o,amount:n}=this;return{"@type":"/initia.distribution.v1.MsgDepositValidatorRewardsPool",depositor:e,validator_address:r,denom:o,amount:n.toData()}}static fromProto(e){return new qr(e.depositor,e.validatorAddress,e.denom,l.fromProto(e.amount))}toProto(){const{depositor:e,validator_address:r,denom:o,amount:n}=this;return Fa.MsgDepositValidatorRewardsPool.fromPartial({depositor:e,validatorAddress:r,denom:o,amount:n.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgDepositValidatorRewardsPool",value:Fa.MsgDepositValidatorRewardsPool.encode(this.toProto()).finish()})}static unpackAny(e){return qr.fromProto(Fa.MsgDepositValidatorRewardsPool.decode(e.value))}}class $r extends u{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:n}}=t;return new $r(parseInt(e),new Date(r),parseInt(o),n)}toAmino(){const{height:t,time:e,power:r,consensus_address:o}=this;return{type:"cosmos-sdk/Equivocation",value:{height:t.toFixed(),time:e.toISOString(),power:r.toFixed(),consensus_address:o}}}static fromData(t){const{height:e,time:r,power:o,consensus_address:n}=t;return new $r(parseInt(e),new Date(r),parseInt(o),n)}toData(){const{height:t,time:e,power:r,consensus_address:o}=this;return{"@type":"/cosmos.evidence.v1beta1.Equivocation",height:t.toFixed(),time:e.toISOString(),power:r.toFixed(),consensus_address:o}}static fromProto(t){return new $r(Number(t.height),t.time,Number(t.power),t.consensusAddress)}toProto(){const{height:t,time:e,power:r,consensus_address:o}=this;return Ac.Equivocation.fromPartial({height:BigInt(t),time:e,power:BigInt(r),consensusAddress:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.Equivocation",value:Ac.Equivocation.encode(this.toProto()).finish()})}static unpackAny(t){return $r.fromProto(Ac.Equivocation.decode(t.value))}}exports.Evidence=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/Equivocation":return $r.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.evidence.v1beta1.Equivocation":return $r.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.evidence.v1beta1.Equivocation":return $r.unpackAny(o)}throw new Error(`Evidence type ${n} not recognized`)}a.fromProto=r})(exports.Evidence||(exports.Evidence={}));class Lr extends u{constructor(t,e){super(),this.submitter=t,this.evidence=e}static fromAmino(t){const{value:{submitter:e,evidence:r}}=t;return new Lr(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 Lr(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 Lr(t.submitter,exports.Evidence.fromProto(t.evidence))}toProto(){const{submitter:t,evidence:e}=this;return wc.MsgSubmitEvidence.fromPartial({submitter:t,evidence:e.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.MsgSubmitEvidence",value:wc.MsgSubmitEvidence.encode(this.toProto()).finish()})}static unpackAny(t){return Lr.fromProto(wc.MsgSubmitEvidence.decode(t.value))}}class Tt extends u{constructor(t,e){super(),this.address=t,this.storage_keys=e}static fromAmino(t){const{address:e,storage_keys:r}=t;return new Tt(e,r)}toAmino(){const{address:t,storage_keys:e}=this;return{address:t,storage_keys:e}}static fromData(t){const{address:e,storage_keys:r}=t;return new Tt(e,r)}toData(){const{address:t,storage_keys:e}=this;return{address:t,storage_keys:e}}static fromProto(t){return new Tt(t.address,t.storageKeys)}toProto(){const{address:t,storage_keys:e}=this;return ku.AccessTuple.fromPartial({address:t,storageKeys:e})}}class Hr extends u{constructor(t,e,r,o){super(),this.sender=t,this.code=e,this.value=r,this.access_list=o}static fromAmino(t){const{value:{sender:e,code:r,value:o,access_list:n}}=t;return new Hr(e,r,o,n.map(Tt.fromAmino))}toAmino(){const{sender:t,code:e,value:r,access_list:o}=this;return{type:"evm/MsgCreate",value:{sender:t,code:e,value:r,access_list:o.map(n=>n.toAmino())}}}static fromData(t){const{sender:e,code:r,value:o,access_list:n}=t;return new Hr(e,r,o,n.map(Tt.fromData))}toData(){const{sender:t,code:e,value:r,access_list:o}=this;return{"@type":"/minievm.evm.v1.MsgCreate",sender:t,code:e,value:r,access_list:o.map(n=>n.toData())}}static fromProto(t){return new Hr(t.sender,t.code,t.value,t.accessList.map(Tt.fromProto))}toProto(){const{sender:t,code:e,value:r,access_list:o}=this;return Xt.MsgCreate.fromPartial({sender:t,code:e,value:r,accessList:o.map(n=>n.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate",value:Xt.MsgCreate.encode(this.toProto()).finish()})}static unpackAny(t){return Hr.fromProto(Xt.MsgCreate.decode(t.value))}}class zr extends u{constructor(t,e,r,o,n){super(),this.sender=t,this.code=e,this.salt=r,this.value=o,this.access_list=n}static fromAmino(t){const{value:{sender:e,code:r,salt:o,value:n,access_list:s}}=t;return new zr(e,r,parseInt(o),n,s.map(Tt.fromAmino))}toAmino(){const{sender:t,code:e,salt:r,value:o,access_list:n}=this;return{type:"evm/MsgCreate2",value:{sender:t,code:e,salt:r.toFixed(),value:o,access_list:n.map(s=>s.toAmino())}}}static fromData(t){const{sender:e,code:r,salt:o,value:n,access_list:s}=t;return new zr(e,r,parseInt(o),n,s.map(Tt.fromData))}toData(){const{sender:t,code:e,salt:r,value:o,access_list:n}=this;return{"@type":"/minievm.evm.v1.MsgCreate2",sender:t,code:e,salt:r.toFixed(),value:o,access_list:n.map(s=>s.toData())}}static fromProto(t){return new zr(t.sender,t.code,Number(t.salt),t.value,t.accessList.map(Tt.fromProto))}toProto(){const{sender:t,code:e,salt:r,value:o,access_list:n}=this;return Xt.MsgCreate2.fromPartial({sender:t,code:e,salt:BigInt(r),value:o,accessList:n.map(s=>s.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate2",value:Xt.MsgCreate2.encode(this.toProto()).finish()})}static unpackAny(t){return zr.fromProto(Xt.MsgCreate2.decode(t.value))}}class Vr extends u{constructor(t,e,r,o,n){super(),this.sender=t,this.contract_addr=e,this.input=r,this.value=o,this.access_list=n}static fromAmino(t){const{value:{sender:e,contract_addr:r,input:o,value:n,access_list:s}}=t;return new Vr(e,r,o,n,s.map(Tt.fromAmino))}toAmino(){const{sender:t,contract_addr:e,input:r,value:o,access_list:n}=this;return{type:"evm/MsgCall",value:{sender:t,contract_addr:e,input:r,value:o,access_list:n.map(s=>s.toAmino())}}}static fromData(t){const{sender:e,contract_addr:r,input:o,value:n,access_list:s}=t;return new Vr(e,r,o,n,s.map(Tt.fromData))}toData(){const{sender:t,contract_addr:e,input:r,value:o,access_list:n}=this;return{"@type":"/minievm.evm.v1.MsgCall",sender:t,contract_addr:e,input:r,value:o,access_list:n.map(s=>s.toData())}}static fromProto(t){return new Vr(t.sender,t.contractAddr,t.input,t.value,t.accessList.map(Tt.fromProto))}toProto(){const{sender:t,contract_addr:e,input:r,value:o,access_list:n}=this;return Xt.MsgCall.fromPartial({sender:t,contractAddr:e,input:r,value:o,accessList:n.map(s=>s.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCall",value:Xt.MsgCall.encode(this.toProto()).finish()})}static unpackAny(t){return Vr.fromProto(Xt.MsgCall.decode(t.value))}}class Kn extends u{constructor(t,e,r,o,n,s,i){super(),this.extra_eips=t,this.allowed_publishers=e,this.allow_custom_erc20=r,this.allowed_custom_erc20s=o,this.fee_denom=n,this.gas_refund_ratio=s,this.num_retain_block_hashes=i}static fromAmino(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:n,fee_denom:s,gas_refund_ratio:i,num_retain_block_hashes:c}=t;return new Kn(e.map(parseInt),r,o,n,s,i,parseInt(c))}toAmino(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i}=this;return{extra_eips:t.map(c=>c.toFixed()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i.toFixed()}}static fromData(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:n,fee_denom:s,gas_refund_ratio:i,num_retain_block_hashes:c}=t;return new Kn(e.map(parseInt),r,o,n,s,i,parseInt(c))}toData(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i}=this;return{extra_eips:t.map(c=>c.toFixed()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i.toFixed()}}static fromProto(t){return new Kn(t.extraEips.map(e=>Number(e)),t.allowedPublishers,t.allowCustomErc20,t.allowedCustomErc20s,t.feeDenom,t.gasRefundRatio,Number(t.numRetainBlockHashes))}toProto(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i}=this;return ku.Params.fromPartial({extraEips:t.map(c=>BigInt(c)),allowedPublishers:e,allowCustomErc20:r,allowedCustomErc20s:o,feeDenom:n,gasRefundRatio:s,numRetainBlockHashes:BigInt(i)})}}class Kr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Kr(e,Kn.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 Kr(e,Kn.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 Kr(t.authority,Kn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Xt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgUpdateParams",value:Xt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Kr.fromProto(Xt.MsgUpdateParams.decode(t.value))}}class St extends u{constructor(e,r){super();_(this,"spend_limit");this.expiration=r;let o=!1;if(e&&(this.spend_limit=new l(e),this.spend_limit.map(n=>{F(n.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 St(r?l.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()}}}static fromData(e){const{spend_limit:r,expiration:o}=e;return new St(r?l.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()}}static fromProto(e){return new St(l.fromProto(e.spendLimit),e.expiration)}toProto(){const{spend_limit:e,expiration:r}=this;return Fn.BasicAllowance.fromPartial({expiration:r,spendLimit:e==null?void 0:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",value:Fn.BasicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return St.fromProto(Fn.BasicAllowance.decode(e.value))}}class Zt extends u{constructor(e,r,o,n,s){super();_(this,"period_spend_limit");_(this,"period_can_spend");this.basic=e,this.period=r,this.period_reset=s,this.period_spend_limit=new l(o),this.period_can_spend=new l(n)}static fromAmino(e){const{value:{basic:r,period:o,period_spend_limit:n,period_can_spend:s,period_reset:i}}=e;return new Zt(St.fromAmino(r),q.fromAmino(o),l.fromAmino(n),l.fromAmino(s),new Date(i))}toAmino(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:n,period_reset:s}=this;return{type:"cosmos-sdk/PeriodicAllowance",value:{basic:e.toAmino(),period:r.toAmino(),period_spend_limit:o.toAmino(),period_can_spend:n.toAmino(),period_reset:s.toISOString()}}}static fromData(e){const{basic:r,period:o,period_spend_limit:n,period_can_spend:s,period_reset:i}=e;return new Zt(St.fromData(r),q.fromData(o),l.fromData(n),l.fromData(s),new Date(i))}toData(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:n,period_reset:s}=this;return{"@type":"/cosmos.feegrant.v1beta1.PeriodicAllowance",basic:e.toData(),period:r.toData(),period_spend_limit:o.toData(),period_can_spend:n.toData(),period_reset:s.toISOString()}}static fromProto(e){return new Zt(St.fromProto(e.basic),q.fromProto(e.period),l.fromProto(e.periodSpendLimit),l.fromProto(e.periodCanSpend),e.periodReset)}toProto(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:n,period_reset:s}=this;return Fn.PeriodicAllowance.fromPartial({basic:e.toProto(),period:r.toProto(),periodCanSpend:n.toProto(),periodReset:s,periodSpendLimit:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.PeriodicAllowance",value:Fn.PeriodicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return Zt.fromProto(Fn.PeriodicAllowance.decode(e.value))}}class Gr extends u{constructor(t,e){super(),this.allowance=t,this.allowed_messages=e}static fromAmino(t){const{value:{allowance:e,allowed_messages:r}}=t;return new Gr(e.type==="cosmos-sdk/BasicAllowance"?St.fromAmino(e):Zt.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 Gr(e["@type"]==="/cosmos.feegrant.v1beta1.BasicAllowance"?St.fromData(e):Zt.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 Gr((e==null?void 0:e.typeUrl)==="/cosmos.feegrant.v1beta1.BasicAllowance"?St.unpackAny(e):Zt.unpackAny(e),t.allowedMessages)}toProto(){const{allowance:t,allowed_messages:e}=this;return Fn.AllowedMsgAllowance.fromPartial({allowance:t.packAny(),allowedMessages:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",value:Fn.AllowedMsgAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Gr.fromProto(Fn.AllowedMsgAllowance.decode(t.value))}}exports.Allowance=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/BasicAllowance":return St.fromAmino(o);case"cosmos-sdk/PeriodicAllowance":return Zt.fromAmino(o);case"cosmos-sdk/AllowedMsgAllowance":return Gr.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return Zt.fromData(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return St.fromData(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return Gr.fromData(o)}}a.fromData=e;function r(o){switch(o.typeUrl){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return Zt.unpackAny(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return St.unpackAny(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return Gr.unpackAny(o)}throw new Error(`not supported allowance ${o.typeUrl}`)}a.fromProto=r})(exports.Allowance||(exports.Allowance={}));class Wr extends u{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 Wr(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 Wr(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 Wr(t.granter,t.grantee,exports.Allowance.fromProto(t.allowance))}toProto(){const{granter:t,grantee:e,allowance:r}=this;return Ra.MsgGrantAllowance.fromPartial({allowance:r.packAny(),grantee:e,granter:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",value:Ra.MsgGrantAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Wr.fromProto(Ra.MsgGrantAllowance.decode(t.value))}}class jr extends u{constructor(t,e){super(),this.granter=t,this.grantee=e}static fromAmino(t){const{value:{granter:e,grantee:r}}=t;return new jr(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 jr(e,r)}toData(){const{granter:t,grantee:e}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",granter:t,grantee:e}}static fromProto(t){return new jr(t.granter,t.grantee)}toProto(){const{granter:t,grantee:e}=this;return Ra.MsgRevokeAllowance.fromPartial({grantee:e,granter:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",value:Ra.MsgRevokeAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return jr.fromProto(Ra.MsgRevokeAllowance.decode(t.value))}}class Jr extends u{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 Jr(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 Jr(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 Jr(t.signer,t.recipient,t.channel)}toProto(){const{signer:t,recipient:e,channel:r}=this;return qa.MsgRegisterAccount.fromPartial({signer:t,recipient:e,channel:r})}packAny(){return f.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgRegisterAccount",value:qa.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Jr.fromProto(qa.MsgRegisterAccount.decode(t.value))}}class Zr extends u{constructor(t,e){super(),this.signer=t,this.address=e}static fromAmino(t){const{value:{signer:e,address:r}}=t;return new Zr(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 Zr(e,r)}toData(){const{signer:t,address:e}=this;return{"@type":"/noble.forwarding.v1.MsgClearAccount",signer:t,address:e}}static fromProto(t){return new Zr(t.signer,t.address)}toProto(){const{signer:t,address:e}=this;return qa.MsgClearAccount.fromPartial({signer:t,address:e})}packAny(){return f.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgClearAccount",value:qa.MsgClearAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Zr.fromProto(qa.MsgClearAccount.decode(t.value))}}class Yr extends u{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(parseInt(e),r)}toAmino(){const{proposal_id:t,proposer:e}=this;return{type:"cosmos-sdk/v1/MsgCancelProposal",value:{proposal_id:t.toFixed(),proposer:e}}}static fromData(t){const{proposal_id:e,proposer:r}=t;return new Yr(parseInt(e),r)}toData(){const{proposal_id:t,proposer:e}=this;return{"@type":"/cosmos.gov.v1.MsgCancelProposal",proposal_id:t.toFixed(),proposer:e}}static fromProto(t){return new Yr(Number(t.proposalId),t.proposer)}toProto(){const{proposal_id:t,proposer:e}=this;return Bt.MsgCancelProposal.fromPartial({proposalId:BigInt(t),proposer:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgCancelProposal",value:Bt.MsgCancelProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Yr.fromProto(Bt.MsgCancelProposal.decode(t.value))}}class Xr extends u{constructor(e,r,o){super();_(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new l(o)}static fromAmino(e){const{value:{proposal_id:r,depositor:o,amount:n}}=e;return new Xr(parseInt(r),o,l.fromAmino(n))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{type:"cosmos-sdk/MsgDeposit",value:{proposal_id:e.toFixed(),depositor:r,amount:o.toAmino()}}}static fromData(e){const{proposal_id:r,depositor:o,amount:n}=e;return new Xr(parseInt(r),o,l.fromData(n))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{"@type":"/cosmos.gov.v1beta1.MsgDeposit",proposal_id:e.toFixed(),depositor:r,amount:o.toData()}}static fromProto(e){return new Xr(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Qt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",value:Qt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Xr.fromProto(Qt.MsgDeposit.decode(e.value))}}class Qr extends u{constructor(e,r,o){super();_(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new l(o)}static fromAmino(e){const{value:{proposal_id:r,depositor:o,amount:n}}=e;return new Qr(parseInt(r),o,l.fromAmino(n))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{type:"cosmos-sdk/v1/MsgDeposit",value:{proposal_id:e.toFixed(),depositor:r,amount:o.toAmino()}}}static fromData(e){const{proposal_id:r,depositor:o,amount:n}=e;return new Qr(parseInt(r),o,l.fromData(n))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{"@type":"/cosmos.gov.v1.MsgDeposit",proposal_id:e.toFixed(),depositor:r,amount:o.toData()}}static fromProto(e){return new Qr(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Bt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgDeposit",value:Bt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Qr.fromProto(Bt.MsgDeposit.decode(e.value))}}class to extends u{constructor(t){super(),this.paramChanges=t}static fromAmino(t){return new to((t??[]).map(vs.fromAmino))}toAmino(){return this.paramChanges.map(t=>t.toAmino())}static fromData(t){return new to((t??[]).map(vs.fromData))}toData(){return this.paramChanges.map(t=>t.toData())}static fromProto(t){return new to((t??[]).map(vs.fromProto))}toProto(){return this.paramChanges.map(t=>t.toProto())}}class vs extends u{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 vs(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 vs(e,r,o)}toData(){const{subspace:t,key:e,value:r}=this;return{subspace:t,key:e,value:r}}static fromProto(t){return new vs(t.subspace,t.key,t.value)}toProto(){const{subspace:t,key:e,value:r}=this;return Li.ParamChange.fromPartial({key:e,subspace:t,value:r})}}class eo extends u{constructor(e,r,o){super();_(this,"changes");this.title=e,this.description=r,Array.isArray(o)?this.changes=to.fromData(o):this.changes=o}static fromAmino(e){const{value:{title:r,description:o,changes:n}}=e;return new eo(r,o,to.fromAmino(n))}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:n}=e;return new eo(r,o,to.fromData(n))}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 eo(e.title,e.description,to.fromProto(e.changes))}toProto(){const{title:e,description:r,changes:o}=this;return Li.ParameterChangeProposal.fromPartial({changes:o.toProto(),description:r,title:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:Li.ParameterChangeProposal.encode(this.toProto()).finish()})}static unpackAny(e){return eo.fromProto(Li.ParameterChangeProposal.decode(e.value))}}class ro extends u{constructor(t,e){super(),this.title=t,this.description=e}static fromAmino(t){const{value:{title:e,description:r}}=t;return new ro(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 ro(e,r)}toData(){const{title:t,description:e}=this;return{"@type":"/cosmos.gov.v1beta1.TextProposal",title:t,description:e}}static fromProto(t){return new ro(t.title,t.description)}toProto(){const{title:t,description:e}=this;return Hi.TextProposal.fromPartial({description:e,title:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:Hi.TextProposal.encode(this.toProto()).finish()})}static unpackAny(t){return ro.fromProto(Hi.TextProposal.decode(t.value))}}exports.Content=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/TextProposal":return ro.fromAmino(o);case"cosmos-sdk/ParameterChangeProposal":return eo.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.gov.v1beta1.TextProposal":return ro.fromData(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return eo.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.gov.v1beta1.TextProposal":return ro.unpackAny(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return eo.unpackAny(o)}throw new Error(`Proposal content ${n} not recognized`)}a.fromProto=r})(exports.Content||(exports.Content={}));class Gn extends u{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:n}=t;return new Gn(parseInt(e),r,o,n)}toAmino(){const{tally_height:t,total_staking_power:e,total_vesting_power:r,v1_tally_result:o}=this;return{tally_height:t.toFixed(),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:n}=t;return new Gn(parseInt(e),r,o,n)}toData(){const{tally_height:t,total_staking_power:e,total_vesting_power:r,v1_tally_result:o}=this;return{tally_height:t.toFixed(),total_staking_power:e,total_vesting_power:r,v1_tally_result:o}}static fromProto(t){var e,r,o,n;return new Gn(Number(t.tallyHeight),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:((n=t.v1TallyResult)==null?void 0:n.noWithVetoCount)??"0"})}toProto(){const{tally_height:t,total_staking_power:e,total_vesting_power:r,v1_tally_result:o}=this;return Qi.TallyResult.fromPartial({tallyHeight:BigInt(t),totalStakingPower:e,totalVestingPower:r,v1TallyResult:me.TallyResult.fromPartial({yesCount:o.yes_count,abstainCount:o.abstain_count,noCount:o.no_count,noWithVetoCount:o.no_with_veto_count})})}}class Te extends u{constructor(e,r,o,n,s,i,c,d,g,v,b,k,C,N,K,Y,tt,I){super();_(this,"total_deposit");this.id=e,this.messages=r,this.status=o,this.final_tally_result=n,this.submit_time=s,this.deposit_end_time=i,this.voting_start_time=d,this.voting_end_time=g,this.emergency_start_time=v,this.emergency_next_tally_time=b,this.metadata=k,this.title=C,this.summary=N,this.proposer=K,this.expedited=Y,this.emergency=tt,this.failed_reason=I,this.total_deposit=new l(c)}static fromAmino(e){const{id:r,messages:o,status:n,final_tally_result:s,submit_time:i,deposit_end_time:c,total_deposit:d,voting_start_time:g,voting_end_time:v,emergency_start_time:b,emergency_next_tally_time:k,metadata:C,title:N,summary:K,proposer:Y,expedited:tt,emergency:I,failed_reason:ot}=e;return new Te(parseInt(r),o.map(exports.Msg.fromAmino),me.proposalStatusFromJSON(n),Gn.fromAmino(s),new Date(i),new Date(c),l.fromAmino(d),new Date(g),new Date(v),new Date(b),new Date(k),C,N,K,Y,tt,I,ot)}toAmino(){const{id:e,messages:r,status:o,final_tally_result:n,submit_time:s,deposit_end_time:i,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}=this;return{id:e.toFixed(),messages:r.map(ot=>ot.toAmino()),status:me.proposalStatusToJSON(o),final_tally_result:n.toAmino(),submit_time:s.toISOString(),deposit_end_time:i.toISOString(),total_deposit:c.toAmino(),voting_start_time:d.toISOString(),voting_end_time:g.toISOString(),emergency_start_time:v.toISOString(),emergency_next_tally_time:b.toISOString(),metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}}static fromData(e){const{id:r,messages:o,status:n,final_tally_result:s,submit_time:i,deposit_end_time:c,total_deposit:d,voting_start_time:g,voting_end_time:v,emergency_start_time:b,emergency_next_tally_time:k,metadata:C,title:N,summary:K,proposer:Y,expedited:tt,emergency:I,failed_reason:ot}=e;return new Te(parseInt(r),o.map(exports.Msg.fromData),me.proposalStatusFromJSON(n),Gn.fromData(s),new Date(i),new Date(c),l.fromData(d),new Date(g),new Date(v),new Date(b),new Date(k),C,N,K,Y,tt,I,ot)}toData(){const{id:e,messages:r,status:o,final_tally_result:n,submit_time:s,deposit_end_time:i,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}=this;return{id:e.toFixed(),messages:r.map(ot=>ot.toData()),status:me.proposalStatusToJSON(o),final_tally_result:n.toData(),submit_time:s.toISOString(),deposit_end_time:i.toISOString(),total_deposit:c.toData(),voting_start_time:d.toISOString(),voting_end_time:g.toISOString(),emergency_start_time:v.toISOString(),emergency_next_tally_time:b.toISOString(),metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}}static fromProto(e){return new Te(Number(e.id),e.messages.map(exports.Msg.fromProto),e.status,Gn.fromProto(e.finalTallyResult),e.submitTime,e.depositEndTime,l.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:n,submit_time:s,deposit_end_time:i,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}=this;return Qi.Proposal.fromPartial({id:BigInt(e),messages:r.map(ot=>ot.packAny()),status:o,finalTallyResult:n.toProto(),submitTime:s,depositEndTime:i,totalDeposit:c.toProto(),votingStartTime:d,votingEndTime:g,emergencyStartTime:v,emergencyNextTallyTime:b,metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failedReason:I})}}(a=>{a.Status=me.ProposalStatus})(Te||(Te={}));class oo extends u{constructor(e,r,o){super();_(this,"initial_deposit");this.content=e,this.proposer=o,this.initial_deposit=new l(r)}static fromAmino(e){const{value:{content:r,initial_deposit:o,proposer:n}}=e;return new oo(r?exports.Content.fromAmino(r):void 0,l.fromAmino(o),n)}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:n}=e;return new oo(r?exports.Content.fromData(r):void 0,l.fromData(o),n)}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 oo(e.content?exports.Content.fromProto(e.content):void 0,l.fromProto(e.initialDeposit),e.proposer)}toProto(){const{content:e,initial_deposit:r,proposer:o}=this;return Qt.MsgSubmitProposal.fromPartial({content:e==null?void 0:e.packAny(),initialDeposit:r.toProto(),proposer:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposal",value:Qt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return oo.fromProto(Qt.MsgSubmitProposal.decode(e.value))}}class no extends u{constructor(e,r,o,n,s,i,c){super();_(this,"initial_deposit");this.messages=e,this.proposer=o,this.metadata=n,this.title=s,this.summary=i,this.expedited=c,this.initial_deposit=new l(r)}static fromAmino(e){const{value:{messages:r,initial_deposit:o,proposer:n,metadata:s,title:i,summary:c,expedited:d}}=e;return new no(r.map(exports.Msg.fromAmino),l.fromAmino(o),n,s??"",i,c,d)}toAmino(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:i,expedited:c}=this;return{type:"cosmos-sdk/v1/MsgSubmitProposal",value:{messages:e.map(d=>d.toAmino()),initial_deposit:r.toAmino(),proposer:o,metadata:n&&n!==""?n:void 0,title:s,summary:i,expedited:c}}}static fromData(e){const{messages:r,initial_deposit:o,proposer:n,metadata:s,title:i,summary:c,expedited:d}=e;return new no(r.map(exports.Msg.fromData),l.fromData(o),n,s,i,c,d)}toData(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:i,expedited:c}=this;return{"@type":"/cosmos.gov.v1.MsgSubmitProposal",messages:e.map(d=>d.toData()),initial_deposit:r.toData(),proposer:o,metadata:n,title:s,summary:i,expedited:c}}static fromProto(e){return new no(e.messages.map(exports.Msg.fromProto),l.fromProto(e.initialDeposit),e.proposer,e.metadata,e.title,e.summary,e.expedited)}toProto(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:i,expedited:c}=this;return Bt.MsgSubmitProposal.fromPartial({messages:e.map(d=>d.packAny()),initialDeposit:r.toProto(),proposer:o,metadata:n,title:s,summary:i,expedited:c})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",value:Bt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return no.fromProto(Bt.MsgSubmitProposal.decode(e.value))}}class le extends u{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 le(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 le(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 le(Number(t.proposalId),t.voter,t.option)}toProto(){const{proposal_id:t,voter:e,option:r}=this;return Qt.MsgVote.fromPartial({option:r,proposalId:BigInt(t),voter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVote",value:Qt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return le.fromProto(Qt.MsgVote.decode(t.value))}}(a=>{a.Option=Hi.VoteOption})(le||(le={}));class pe extends u{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:n}}=t;return new pe(parseInt(e),r,o,n??"")}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return{type:"cosmos-sdk/v1/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:r,metadata:o&&o!==""?o:void 0}}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:n}=t;return new pe(parseInt(e),r,o,n)}toData(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return{"@type":"/cosmos.gov.v1.MsgVote",proposal_id:t.toFixed(),voter:e,option:r,metadata:o}}static fromProto(t){return new pe(Number(t.proposalId),t.voter,t.option,t.metadata)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return Bt.MsgVote.fromPartial({proposalId:BigInt(t),voter:e,option:r,metadata:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVote",value:Bt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return pe.fromProto(Bt.MsgVote.decode(t.value))}}(a=>{a.Option=me.VoteOption})(pe||(pe={}));class ws extends u{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:n}=t;return new ws(parseInt(e),r,o.map(s=>Ft.fromAmino(s)),n)}toAmino(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{proposal_id:t.toFixed(),voter:e,options:r.map(n=>n.toAmino()),metadata:o}}static fromData(t){const{proposal_id:e,voter:r,options:o,metadata:n}=t;return new ws(parseInt(e),r,o.map(s=>Ft.fromData(s)),n)}toData(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{proposal_id:t.toFixed(),voter:e,options:r.map(n=>n.toData()),metadata:o}}static fromProto(t){return new ws(Number(t.proposalId),t.voter,t.options.map(e=>Ft.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return me.Vote.fromPartial({options:r.map(n=>n.toProto()),proposalId:BigInt(t),voter:e,metadata:o})}}(a=>{a.Option=me.VoteOption})(ws||(ws={}));class Ft extends u{constructor(t,e){super(),this.option=t,this.weight=e}static fromAmino(t){const{option:e,weight:r}=t;return new Ft(e,parseFloat(r))}toAmino(){const{option:t,weight:e}=this;return{option:t,weight:e.toString()}}static fromData(t){const{option:e,weight:r}=t;return new Ft(e,parseFloat(r))}toData(){const{option:t,weight:e}=this;return{option:t,weight:e.toString()}}static fromProto(t){return new Ft(t.option,parseFloat(t.weight))}toProto(){const{option:t,weight:e}=this;return me.WeightedVoteOption.fromPartial({option:t,weight:e.toString()})}}class so extends u{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 so(parseInt(e),r,o.map(n=>Ft.fromAmino(n)))}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 so(parseInt(e),r,o.map(n=>Ft.fromData(n)))}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 so(Number(t.proposalId),t.voter,t.options.map(e=>Ft.fromProto(e)))}toProto(){const{proposal_id:t,voter:e,options:r}=this;return Qt.MsgVoteWeighted.fromPartial({options:r.map(o=>o.toProto()),proposalId:BigInt(t),voter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",value:Qt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return so.fromProto(Qt.MsgVoteWeighted.decode(t.value))}}class ao extends u{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:n}}=t;return new ao(parseInt(e),r,o.map(s=>Ft.fromAmino(s)),n??"")}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(n=>n.toAmino()),metadata:o&&o!==""?o:void 0}}}static fromData(t){const{proposal_id:e,voter:r,options:o,metadata:n}=t;return new ao(parseInt(e),r,o.map(s=>Ft.fromData(s)),n)}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(n=>n.toData()),metadata:o}}static fromProto(t){return new ao(Number(t.proposalId),t.voter,t.options.map(e=>Ft.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return Bt.MsgVoteWeighted.fromPartial({options:r.map(n=>n.toProto()),proposalId:BigInt(t),voter:e,metadata:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVoteWeighted",value:Bt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return ao.fromProto(Bt.MsgVoteWeighted.decode(t.value))}}class Ws extends u{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 Ws(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 Ws(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 Ws(t.moduleAddr,t.moduleName,t.creatorAddr)}toProto(){const{module_addr:t,module_name:e,creator_addr:r}=this;return Qi.Vesting.fromPartial({moduleAddr:t,moduleName:e,creatorAddr:r})}}class Wn extends u{constructor(e,r,o,n,s,i,c,d,g,v,b,k,C,N,K,Y,tt,I,ot,ut){super();_(this,"min_deposit");_(this,"expedited_min_deposit");_(this,"emergency_min_deposit");this.max_deposit_period=r,this.voting_period=o,this.quorum=n,this.threshold=s,this.veto_threshold=i,this.min_initial_deposit_ratio=c,this.proposal_cancel_ratio=d,this.proposal_cancel_dest=g,this.expedited_voting_period=v,this.expedited_threshold=b,this.burn_vote_quorum=C,this.burn_proposal_deposit_prevote=N,this.burn_vote_veto=K,this.min_deposit_ratio=Y,this.emergency_tally_interval=I,this.low_threshold_functions=ot,this.vesting=ut,this.min_deposit=new l(e),this.expedited_min_deposit=new l(k),this.emergency_min_deposit=new l(tt)}static fromAmino(e){const{min_deposit:r,max_deposit_period:o,voting_period:n,quorum:s,threshold:i,veto_threshold:c,min_initial_deposit_ratio:d,proposal_cancel_ratio:g,proposal_cancel_dest:v,expedited_voting_period:b,expedited_threshold:k,expedited_min_deposit:C,burn_vote_quorum:N,burn_proposal_deposit_prevote:K,burn_vote_veto:Y,min_deposit_ratio:tt,emergency_min_deposit:I,emergency_tally_interval:ot,low_threshold_functions:ut,vesting:L}=e;return new Wn(l.fromAmino(r),q.fromAmino(o),q.fromAmino(n),s,i,c,d,g,v,q.fromAmino(b),k,l.fromAmino(C),N,K,Y,tt,l.fromAmino(I),q.fromAmino(ot),ut,L?Ws.fromAmino(L):void 0)}toAmino(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:I,low_threshold_functions:ot,vesting:ut}=this;return{min_deposit:e.toAmino(),max_deposit_period:r.toAmino(),voting_period:o.toAmino(),quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v.toAmino(),expedited_threshold:b,expedited_min_deposit:k.toAmino(),burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt.toAmino(),emergency_tally_interval:I.toAmino(),low_threshold_functions:ot,vesting:ut==null?void 0:ut.toAmino()}}static fromData(e){const{min_deposit:r,max_deposit_period:o,voting_period:n,quorum:s,threshold:i,veto_threshold:c,min_initial_deposit_ratio:d,proposal_cancel_ratio:g,proposal_cancel_dest:v,expedited_voting_period:b,expedited_threshold:k,expedited_min_deposit:C,burn_vote_quorum:N,burn_proposal_deposit_prevote:K,burn_vote_veto:Y,min_deposit_ratio:tt,emergency_min_deposit:I,emergency_tally_interval:ot,low_threshold_functions:ut,vesting:L}=e;return new Wn(l.fromData(r),q.fromData(o),q.fromData(n),s,i,c,d,g,v,q.fromData(b),k,l.fromData(C),N,K,Y,tt,l.fromData(I),q.fromData(ot),ut,L?Ws.fromData(L):void 0)}toData(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:I,low_threshold_functions:ot,vesting:ut}=this;return{min_deposit:e.toData(),max_deposit_period:r.toData(),voting_period:o.toData(),quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v.toData(),expedited_threshold:b,expedited_min_deposit:k.toData(),burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt.toData(),emergency_tally_interval:I.toData(),low_threshold_functions:ot,vesting:ut==null?void 0:ut.toData()}}static fromProto(e){return new Wn(l.fromProto(e.minDeposit),q.fromProto(e.maxDepositPeriod),q.fromProto(e.votingPeriod),e.quorum,e.threshold,e.vetoThreshold,e.minInitialDepositRatio,e.proposalCancelRatio,e.proposalCancelDest,q.fromProto(e.expeditedVotingPeriod),e.expeditedThreshold,l.fromProto(e.expeditedMinDeposit),e.burnVoteQuorum,e.burnProposalDepositPrevote,e.burnVoteVeto,e.minDepositRatio,l.fromProto(e.emergencyMinDeposit),q.fromProto(e.emergencyTallyInterval),e.lowThresholdFunctions,e.vesting?Ws.fromProto(e.vesting):void 0)}toProto(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:I,low_threshold_functions:ot,vesting:ut}=this;return Qi.Params.fromPartial({minDeposit:e.toProto(),maxDepositPeriod:r.toProto(),votingPeriod:o.toProto(),quorum:n,threshold:s,vetoThreshold:i,minInitialDepositRatio:c,proposalCancelRatio:d,proposalCancelDest:g,expeditedVotingPeriod:v.toProto(),expeditedThreshold:b,expeditedMinDeposit:k.toProto(),burnVoteQuorum:C,burnProposalDepositPrevote:N,burnVoteVeto:K,minDepositRatio:Y,emergencyMinDeposit:tt.toProto(),emergencyTallyInterval:I.toProto(),lowThresholdFunctions:ot,vesting:ut==null?void 0:ut.toProto()})}}class io extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new io(e,Wn.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 io(e,Wn.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 io(t.authority,Wn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Pc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.gov.v1.MsgUpdateParams",value:Pc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return io.fromProto(Pc.MsgUpdateParams.decode(t.value))}}class Wa extends u{constructor(e,r,o){super();_(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new l(o)}static fromAmino(e){const{proposal_id:r,depositor:o,amount:n}=e;return new Wa(parseInt(r),o,l.fromAmino(n))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{proposal_id:e.toFixed(),depositor:r,amount:o.toAmino()}}static fromData(e){const{proposal_id:r,depositor:o,amount:n}=e;return new Wa(parseInt(r),o,l.fromData(n))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{proposal_id:e.toFixed(),depositor:r,amount:o.toData()}}static fromProto(e){return new Wa(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return me.Deposit.fromPartial({proposalId:BigInt(e),depositor:r,amount:o.toProto()})}}class ja extends u{constructor(t,e){super(),this.group_id=t,this.member=e}static fromAmino(t){const{group_id:e,member:r}=t;return new ja(parseInt(e),As.fromAmino(r))}toAmino(){const{group_id:t,member:e}=this;return{group_id:t.toFixed(),member:e.toAmino()}}static fromData(t){const{group_id:e,member:r}=t;return new ja(parseInt(e),As.fromData(r))}toData(){const{group_id:t,member:e}=this;return{group_id:t.toFixed(),member:e.toData()}}static fromProto(t){return new ja(Number(t.groupId),As.fromProto(t.member))}toProto(){const{group_id:t,member:e}=this;return V.GroupMember.fromPartial({groupId:BigInt(t),member:e.toProto()})}}class As extends u{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:n}=t;return new As(e,r,o,new Date(n))}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:n}=t;return new As(e,r,o,new Date(n))}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 As(t.address,t.weight,t.metadata,t.addedAt)}toProto(){const{address:t,weight:e,metadata:r,added_at:o}=this;return V.Member.fromPartial({address:t,weight:e,metadata:r,addedAt:o})}}class Rt extends u{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 Rt(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 Rt(e,r,o)}toData(){const{address:t,weight:e,metadata:r}=this;return{address:t,weight:e,metadata:r}}static fromProto(t){return new Rt(t.address,t.weight,t.metadata)}toProto(){const{address:t,weight:e,metadata:r}=this;return V.MemberRequest.fromPartial({address:t,weight:e,metadata:r})}}class co extends u{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 co(e,r.map(Rt.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 co(e,r.map(Rt.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 co(t.admin,t.members.map(Rt.fromProto),t.metadata)}toProto(){const{admin:t,members:e,metadata:r}=this;return R.MsgCreateGroup.fromPartial({admin:t,members:e.map(o=>o.toProto()),metadata:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroup",value:R.MsgCreateGroup.encode(this.toProto()).finish()})}static unpackAny(t){return co.fromProto(R.MsgCreateGroup.decode(t.value))}}class ke extends u{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 ke(q.fromAmino(e),q.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 ke(q.fromData(e),q.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 ke(q.fromProto(t.votingPeriod),q.fromProto(t.minExecutionPeriod))}toProto(){const{voting_period:t,min_execution_period:e}=this;return V.DecisionPolicyWindows.fromPartial({votingPeriod:t.toProto(),minExecutionPeriod:e.toProto()})}}class uo extends u{constructor(t,e){super(),this.threshold=t,this.windows=e}static fromAmino(t){const{value:{threshold:e,windows:r}}=t;return new uo(e,ke.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 uo(e,ke.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 uo(t.threshold,ke.fromProto(t.windows))}toProto(){const{threshold:t,windows:e}=this;return V.ThresholdDecisionPolicy.fromPartial({threshold:t,windows:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.ThresholdDecisionPolicy",value:V.ThresholdDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return uo.fromProto(V.ThresholdDecisionPolicy.decode(t.value))}}class mo extends u{constructor(t,e){super(),this.percentage=t,this.windows=e}static fromAmino(t){const{value:{percentage:e,windows:r}}=t;return new mo(e,ke.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 mo(e,ke.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 mo(t.percentage,ke.fromProto(t.windows))}toProto(){const{percentage:t,windows:e}=this;return V.PercentageDecisionPolicy.fromPartial({percentage:t,windows:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.PercentageDecisionPolicy",value:V.PercentageDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return mo.fromProto(V.PercentageDecisionPolicy.decode(t.value))}}exports.DecisionPolicy=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/ThresholdDecisionPolicy":return uo.fromAmino(o);case"cosmos-sdk/PercentageDecisionPolicy":return mo.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.group.v1.ThresholdDecisionPolicy":return uo.fromData(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return mo.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.group.v1.ThresholdDecisionPolicy":return uo.unpackAny(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return mo.unpackAny(o)}throw new Error(`DecisionPolicy type ${n} not recognized`)}a.fromProto=r})(exports.DecisionPolicy||(exports.DecisionPolicy={}));class lo extends u{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:n}}=t;return new lo(e,parseInt(r),o,exports.DecisionPolicy.fromAmino(n))}toAmino(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return{type:"cosmos-sdk/MsgCreateGroupPolicy",value:{admin:t,group_id:e.toFixed(),metadata:r,decision_policy:o.toAmino()}}}static fromData(t){const{admin:e,group_id:r,metadata:o,decision_policy:n}=t;return new lo(e,parseInt(r),o,exports.DecisionPolicy.fromData(n))}toData(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroupPolicy",admin:t,group_id:e.toFixed(),metadata:r,decision_policy:o.toData()}}static fromProto(t){return new lo(t.admin,Number(t.groupId),t.metadata,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return R.MsgCreateGroupPolicy.fromPartial({admin:t,groupId:BigInt(e),metadata:r,decisionPolicy:o.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicy",value:R.MsgCreateGroupPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return lo.fromProto(R.MsgCreateGroupPolicy.decode(t.value))}}class po extends u{constructor(t,e,r,o,n,s){super(),this.admin=t,this.members=e,this.group_metadata=r,this.group_policy_metadata=o,this.group_policy_as_admin=n,this.decision_policy=s}static fromAmino(t){const{value:{admin:e,members:r,group_metadata:o,group_policy_metadata:n,group_policy_as_admin:s,decision_policy:i}}=t;return new po(e,r.map(Rt.fromAmino),o,n,s,exports.DecisionPolicy.fromAmino(i))}toAmino(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s}=this;return{type:"cosmos-sdk/MsgCreateGroupWithPolicy",value:{admin:t,members:e.map(i=>i.toAmino()),group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s.toAmino()}}}static fromData(t){const{admin:e,members:r,group_metadata:o,group_policy_metadata:n,group_policy_as_admin:s,decision_policy:i}=t;return new po(e,r.map(Rt.fromData),o,n,s,exports.DecisionPolicy.fromData(i))}toData(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroupWithPolicy",admin:t,members:e.map(i=>i.toData()),group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s.toData()}}static fromProto(t){return new po(t.admin,t.members.map(Rt.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:n,decision_policy:s}=this;return R.MsgCreateGroupWithPolicy.fromPartial({admin:t,members:e.map(i=>i.toProto()),groupMetadata:r,groupPolicyMetadata:o,groupPolicyAsAdmin:n,decisionPolicy:s.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicy",value:R.MsgCreateGroupWithPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return po.fromProto(R.MsgCreateGroupWithPolicy.decode(t.value))}}class ho extends u{constructor(t,e){super(),this.proposal_id=t,this.executor=e}static fromAmino(t){const{value:{proposal_id:e,executor:r}}=t;return new ho(parseInt(e),r)}toAmino(){const{proposal_id:t,executor:e}=this;return{type:"cosmos-sdk/group/MsgExec",value:{proposal_id:t.toFixed(),executor:e}}}static fromData(t){const{proposal_id:e,executor:r}=t;return new ho(parseInt(e),r)}toData(){const{proposal_id:t,executor:e}=this;return{"@type":"/cosmos.group.v1.MsgExec",proposal_id:t.toFixed(),executor:e}}static fromProto(t){return new ho(Number(t.proposalId),t.executor)}toProto(){const{proposal_id:t,executor:e}=this;return R.MsgExec.fromPartial({proposalId:BigInt(t),executor:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgExec",value:R.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return ho.fromProto(R.MsgExec.decode(t.value))}}class he extends u{constructor(t,e,r,o,n){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o,this.exec=n}static fromAmino(t){const{value:{proposal_id:e,voter:r,option:o,metadata:n,exec:s}}=t;return new he(parseInt(e),r,V.voteOptionFromJSON(o),n,R.execFromJSON(s))}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:n}=this;return{type:"cosmos-sdk/group/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:V.voteOptionToJSON(r),metadata:o,exec:R.execToJSON(n)}}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:n,exec:s}=t;return new he(parseInt(e),r,V.voteOptionFromJSON(o),n,R.execFromJSON(s))}toData(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:n}=this;return{"@type":"/cosmos.group.v1.MsgVote",proposal_id:t.toFixed(),voter:e,option:V.voteOptionToJSON(r),metadata:o,exec:R.execToJSON(n)}}static fromProto(t){return new he(Number(t.proposalId),t.voter,t.option,t.metadata,t.exec)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:n}=this;return R.MsgVote.fromPartial({proposalId:BigInt(t),voter:e,option:r,metadata:o,exec:n})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgVote",value:R.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return he.fromProto(R.MsgVote.decode(t.value))}}(a=>{a.Option=V.VoteOption,a.Exec=R.Exec})(he||(he={}));class fo extends u{constructor(t,e){super(),this.address=t,this.group_id=e}static fromAmino(t){const{value:{address:e,group_id:r}}=t;return new fo(e,parseInt(r))}toAmino(){const{address:t,group_id:e}=this;return{type:"cosmos-sdk/group/MsgLeaveGroup",value:{address:t,group_id:e.toFixed()}}}static fromData(t){const{address:e,group_id:r}=t;return new fo(e,parseInt(r))}toData(){const{address:t,group_id:e}=this;return{"@type":"/cosmos.group.v1.MsgLeaveGroup",address:t,group_id:e.toFixed()}}static fromProto(t){return new fo(t.address,Number(t.groupId))}toProto(){const{address:t,group_id:e}=this;return R.MsgLeaveGroup.fromPartial({address:t,groupId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgLeaveGroup",value:R.MsgLeaveGroup.encode(this.toProto()).finish()})}static unpackAny(t){return fo.fromProto(R.MsgLeaveGroup.decode(t.value))}}class fe extends u{constructor(t,e,r,o,n,s,i){super(),this.group_policy_address=t,this.proposers=e,this.metadata=r,this.messages=o,this.exec=n,this.title=s,this.summary=i}static fromAmino(t){const{value:{group_policy_address:e,proposers:r,metadata:o,messages:n,exec:s,title:i,summary:c}}=t;return new fe(e,r,o,n.map(exports.Msg.fromAmino),R.execFromJSON(s),i,c)}toAmino(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:n,title:s,summary:i}=this;return{type:"cosmos-sdk/group/MsgSubmitProposal",value:{group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toAmino()),exec:R.execToJSON(n),title:s,summary:i}}}static fromData(t){const{group_policy_address:e,proposers:r,metadata:o,messages:n,exec:s,title:i,summary:c}=t;return new fe(e,r,o,n.map(exports.Msg.fromData),R.execFromJSON(s),i,c)}toData(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:n,title:s,summary:i}=this;return{"@type":"/cosmos.group.v1.MsgSubmitProposal",group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toData()),exec:R.execToJSON(n),title:s,summary:i}}static fromProto(t){return new fe(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:n,title:s,summary:i}=this;return R.MsgSubmitProposal.fromPartial({groupPolicyAddress:t,proposers:e,metadata:r,messages:o.map(c=>c.packAny()),exec:n,title:s,summary:i})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgSubmitProposal",value:R.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(t){return fe.fromProto(R.MsgSubmitProposal.decode(t.value))}}(a=>{a.Exec=R.Exec})(fe||(fe={}));class go extends u{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 go(e,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.toFixed(),new_admin:r}}}static fromData(t){const{admin:e,group_id:r,new_admin:o}=t;return new go(e,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.toFixed(),new_admin:r}}static fromProto(t){return new go(t.admin,Number(t.groupId),t.newAdmin)}toProto(){const{admin:t,group_id:e,new_admin:r}=this;return R.MsgUpdateGroupAdmin.fromPartial({admin:t,groupId:BigInt(e),newAdmin:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdmin",value:R.MsgUpdateGroupAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return go.fromProto(R.MsgUpdateGroupAdmin.decode(t.value))}}class yo extends u{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 yo(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 yo(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 yo(t.admin,t.groupPolicyAddress,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_policy_address:e,decision_policy:r}=this;return R.MsgUpdateGroupPolicyDecisionPolicy.fromPartial({admin:t,groupPolicyAddress:e,decisionPolicy:r.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",value:R.MsgUpdateGroupPolicyDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return yo.fromProto(R.MsgUpdateGroupPolicyDecisionPolicy.decode(t.value))}}class _o extends u{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 _o(e,parseInt(r),o.map(Rt.fromAmino))}toAmino(){const{admin:t,group_id:e,member_updates:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupMembers",value:{admin:t,group_id:e.toFixed(),member_updates:r.map(o=>o.toAmino())}}}static fromData(t){const{admin:e,group_id:r,member_updates:o}=t;return new _o(e,parseInt(r),o.map(Rt.fromData))}toData(){const{admin:t,group_id:e,member_updates:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMembers",admin:t,group_id:e.toFixed(),member_updates:r.map(o=>o.toData())}}static fromProto(t){return new _o(t.admin,Number(t.groupId),t.memberUpdates.map(Rt.fromProto))}toProto(){const{admin:t,group_id:e,member_updates:r}=this;return R.MsgUpdateGroupMembers.fromPartial({admin:t,groupId:BigInt(e),memberUpdates:r.map(o=>o.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembers",value:R.MsgUpdateGroupMembers.encode(this.toProto()).finish()})}static unpackAny(t){return _o.fromProto(R.MsgUpdateGroupMembers.decode(t.value))}}class vo extends u{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 vo(e,parseInt(r),o)}toAmino(){const{admin:t,group_id:e,metadata:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupMetadata",value:{admin:t,group_id:e.toFixed(),metadata:r}}}static fromData(t){const{admin:e,group_id:r,metadata:o}=t;return new vo(e,parseInt(r),o)}toData(){const{admin:t,group_id:e,metadata:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMetadata",admin:t,group_id:e.toFixed(),metadata:r}}static fromProto(t){return new vo(t.admin,Number(t.groupId),t.metadata)}toProto(){const{admin:t,group_id:e,metadata:r}=this;return R.MsgUpdateGroupMetadata.fromPartial({admin:t,groupId:BigInt(e),metadata:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadata",value:R.MsgUpdateGroupMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return vo.fromProto(R.MsgUpdateGroupMetadata.decode(t.value))}}class wo extends u{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 wo(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 wo(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 wo(t.admin,t.groupPolicyAddress,t.newAdmin)}toProto(){const{admin:t,group_policy_address:e,new_admin:r}=this;return R.MsgUpdateGroupPolicyAdmin.fromPartial({admin:t,groupPolicyAddress:e,newAdmin:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",value:R.MsgUpdateGroupPolicyAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return wo.fromProto(R.MsgUpdateGroupPolicyAdmin.decode(t.value))}}class Ao extends u{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 Ao(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 Ao(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 Ao(t.admin,t.groupPolicyAddress,t.metadata)}toProto(){const{admin:t,group_policy_address:e,metadata:r}=this;return R.MsgUpdateGroupPolicyMetadata.fromPartial({admin:t,groupPolicyAddress:e,metadata:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",value:R.MsgUpdateGroupPolicyMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Ao.fromProto(R.MsgUpdateGroupPolicyMetadata.decode(t.value))}}class Po extends u{constructor(t,e,r,o,n,s){super(),this.id=t,this.admin=e,this.metadata=r,this.version=o,this.total_weight=n,this.created_at=s}static fromAmino(t){const{id:e,admin:r,metadata:o,version:n,total_weight:s,created_at:i}=t;return new Po(parseInt(e),r,o,parseInt(n),s,new Date(i))}toAmino(){const{id:t,admin:e,metadata:r,version:o,total_weight:n,created_at:s}=this;return{id:t.toFixed(),admin:e,metadata:r,version:o.toFixed(),total_weight:n,created_at:s.toISOString()}}static fromData(t){const{id:e,admin:r,metadata:o,version:n,total_weight:s,created_at:i}=t;return new Po(parseInt(e),r,o,parseInt(n),s,new Date(i))}toData(){const{id:t,admin:e,metadata:r,version:o,total_weight:n,created_at:s}=this;return{id:t.toFixed(),admin:e,metadata:r,version:o.toFixed(),total_weight:n,created_at:s.toISOString()}}static fromProto(t){return new Po(Number(t.id),t.admin,t.metadata,Number(t.version),t.totalWeight,t.createdAt)}toProto(){const{id:t,admin:e,metadata:r,version:o,total_weight:n,created_at:s}=this;return V.GroupInfo.fromPartial({id:BigInt(t),admin:e,metadata:r,version:BigInt(o),totalWeight:n,createdAt:s})}}class Ps extends u{constructor(t,e,r,o,n,s,i){super(),this.address=t,this.group_id=e,this.admin=r,this.metadata=o,this.version=n,this.decision_policy=s,this.created_at=i}static fromAmino(t){const{address:e,group_id:r,admin:o,metadata:n,version:s,decision_policy:i,created_at:c}=t;return new Ps(e,parseInt(r),o,n,parseInt(s),exports.DecisionPolicy.fromAmino(i),new Date(c))}toAmino(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:i}=this;return{address:t,group_id:e.toFixed(),admin:r,metadata:o,version:n.toFixed(),decision_policy:s.toAmino(),created_at:i.toISOString()}}static fromData(t){const{address:e,group_id:r,admin:o,metadata:n,version:s,decision_policy:i,created_at:c}=t;return new Ps(e,parseInt(r),o,n,parseInt(s),exports.DecisionPolicy.fromData(i),new Date(c))}toData(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:i}=this;return{address:t,group_id:e.toFixed(),admin:r,metadata:o,version:n.toFixed(),decision_policy:s.toData(),created_at:i.toISOString()}}static fromProto(t){return new Ps(t.address,Number(t.groupId),t.admin,t.metadata,Number(t.version),exports.DecisionPolicy.fromProto(t.decisionPolicy),t.createdAt)}toProto(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:i}=this;return V.GroupPolicyInfo.fromPartial({address:t,groupId:BigInt(e),admin:r,metadata:o,version:BigInt(n),decisionPolicy:s.packAny(),createdAt:i})}}class jn extends u{constructor(t,e,r,o,n,s,i,c,d,g,v,b,k,C){super(),this.id=t,this.group_policy_address=e,this.metadata=r,this.proposers=o,this.submit_time=n,this.group_version=s,this.group_policy_version=i,this.status=c,this.final_tally_result=d,this.voting_period_end=g,this.executor_result=v,this.messages=b,this.title=k,this.summary=C}static fromAmino(t){const{id:e,group_policy_address:r,metadata:o,proposers:n,submit_time:s,group_version:i,group_policy_version:c,status:d,final_tally_result:g,voting_period_end:v,executor_result:b,messages:k,title:C,summary:N}=t;return new jn(parseInt(e),r,o,n,new Date(s),parseInt(i),parseInt(c),V.proposalStatusFromJSON(d),{yes_count:F(g.yes_count??0).toFixed(),no_count:F(g.no_count??0).toFixed(),abstain_count:F(g.abstain_count??0).toFixed(),no_with_veto_count:F(g.no_with_veto_count??0).toFixed()},new Date(v),V.proposalExecutorResultFromJSON(b),k.map(exports.Msg.fromAmino),C,N)}toAmino(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:i,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:C}=this;return{id:t.toFixed(),group_policy_address:e,metadata:r,proposers:o,submit_time:n.toISOString(),group_version:s.toFixed(),group_policy_version:i.toFixed(),status:V.proposalStatusToJSON(c),final_tally_result:{yes_count:F(d.yes_count).toFixed(),no_count:F(d.no_count).toFixed(),abstain_count:F(d.abstain_count).toFixed(),no_with_veto_count:F(d.no_with_veto_count).toFixed()},voting_period_end:g.toISOString(),executor_result:V.proposalExecutorResultToJSON(v),messages:b.map(N=>N.toAmino()),title:k,summary:C}}static fromData(t){const{id:e,group_policy_address:r,metadata:o,proposers:n,submit_time:s,group_version:i,group_policy_version:c,status:d,final_tally_result:g,voting_period_end:v,executor_result:b,messages:k,title:C,summary:N}=t;return new jn(parseInt(e),r,o,n,new Date(s),parseInt(i),parseInt(c),V.proposalStatusFromJSON(d),{yes_count:F(g.yes_count??0).toFixed(),no_count:F(g.no_count??0).toFixed(),abstain_count:F(g.abstain_count??0).toFixed(),no_with_veto_count:F(g.no_with_veto_count??0).toFixed()},new Date(v),V.proposalExecutorResultFromJSON(b),k.map(exports.Msg.fromData),C,N)}toData(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:i,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:C}=this;return{id:t.toFixed(),group_policy_address:e,metadata:r,proposers:o,submit_time:n.toISOString(),group_version:s.toFixed(),group_policy_version:i.toFixed(),status:V.proposalStatusToJSON(c),final_tally_result:{yes_count:F(d.yes_count).toFixed(),no_count:F(d.no_count).toFixed(),abstain_count:F(d.abstain_count).toFixed(),no_with_veto_count:F(d.no_with_veto_count).toFixed()},voting_period_end:g.toISOString(),executor_result:V.proposalExecutorResultToJSON(v),messages:b.map(N=>N.toData()),title:k,summary:C}}static fromProto(t){var e,r,o,n;return new jn(Number(t.id),t.groupPolicyAddress,t.metadata,t.proposers,t.submitTime,Number(t.groupVersion),Number(t.groupPolicyVersion),t.status,{yes_count:F(((e=t.finalTallyResult)==null?void 0:e.yesCount)??0).toFixed(),no_count:F(((r=t.finalTallyResult)==null?void 0:r.noCount)??0).toFixed(),abstain_count:F(((o=t.finalTallyResult)==null?void 0:o.abstainCount)??0).toFixed(),no_with_veto_count:F(((n=t.finalTallyResult)==null?void 0:n.noWithVetoCount)??0).toFixed()},t.votingPeriodEnd,t.executorResult,t.messages.map(exports.Msg.fromProto),t.title,t.summary)}toProto(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:i,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:C}=this;let N;return d&&(N=V.TallyResult.fromPartial({yesCount:d.yes_count,noCount:d.no_count,abstainCount:d.abstain_count,noWithVetoCount:d.no_with_veto_count})),V.Proposal.fromPartial({id:BigInt(t),groupPolicyAddress:e,metadata:r,proposers:o,submitTime:n,groupVersion:BigInt(s),groupPolicyVersion:BigInt(i),status:c,finalTallyResult:N,votingPeriodEnd:g,executorResult:v,messages:b.map(K=>K.packAny()),title:k,summary:C})}}(a=>{a.Status=V.ProposalStatus,a.ExecutorResult=V.ProposalExecutorResult})(jn||(jn={}));class Fe extends u{constructor(t,e,r,o,n){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o,this.submit_time=n}static fromAmino(t){const{proposal_id:e,voter:r,option:o,metadata:n,submit_time:s}=t;return new Fe(parseInt(e),r,V.voteOptionFromJSON(o),n,new Date(s))}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:n}=this;return{proposal_id:t.toFixed(),voter:e,option:V.voteOptionToJSON(r),metadata:o,submit_time:n.toISOString()}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:n,submit_time:s}=t;return new Fe(parseInt(e),r,V.voteOptionFromJSON(o),n,new Date(s))}toData(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:n}=this;return{proposal_id:t.toFixed(),voter:e,option:V.voteOptionToJSON(r),metadata:o,submit_time:n.toISOString()}}static fromProto(t){return new Fe(Number(t.proposalId),t.voter,t.option,t.metadata,t.submitTime)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:n}=this;return V.Vote.fromPartial({proposalId:BigInt(t),voter:e,option:r,metadata:o,submitTime:n})}}(a=>{a.Option=V.VoteOption})(Fe||(Fe={}));class Re extends u{constructor(e,r,o){super();_(this,"recv_fee");_(this,"ack_fee");_(this,"timeout_fee");this.recv_fee=new l(e),this.ack_fee=new l(r),this.timeout_fee=new l(o)}static fromAmino(e){const{recv_fee:r,ack_fee:o,timeout_fee:n}=e;return new Re(l.fromAmino(r),l.fromAmino(o),l.fromAmino(n))}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:n}=e;return new Re(l.fromData(r),l.fromData(o),l.fromData(n))}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 Re(l.fromProto(e.recvFee),l.fromProto(e.ackFee),l.fromProto(e.timeoutFee))}toProto(){const{recv_fee:e,ack_fee:r,timeout_fee:o}=this;return xu.Fee.fromPartial({recvFee:e.toProto(),ackFee:r.toProto(),timeoutFee:o.toProto()})}}class js extends u{constructor(t,e,r,o,n){super(),this.fee=t,this.source_port_id=e,this.source_channel_id=r,this.signer=o,this.relayers=n}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:n,relayers:s}=t;return new js(e?Re.fromData(e):void 0,r,o,n,s)}toData(){const{fee:t,source_port_id:e,source_channel_id:r,signer:o,relayers:n}=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:n}}static fromProto(t){return new js(t.fee?Re.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:n}=this;return te.MsgPayPacketFee.fromPartial({fee:t==null?void 0:t.toProto(),sourcePortId:e,sourceChannelId:r,signer:o,relayers:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgPayPacketFee",value:te.MsgPayPacketFee.encode(this.toProto()).finish()})}static unpackAny(t){return js.fromProto(te.MsgPayPacketFee.decode(t.value))}}class qe extends u{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 qe(e,r,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 qe(e,r,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 qe(t.portId,t.channelId,Number(t.sequence))}toProto(){const{port_id:t,channel_id:e,sequence:r}=this;return ui.PacketId.fromPartial({portId:t,channelId:e,sequence:BigInt(r)})}}class $e extends u{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 $e(e?Re.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 $e(e?Re.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 $e(t.fee?Re.fromProto(t.fee):void 0,t.refundAddress,t.relayers)}toProto(){const{fee:t,refund_address:e,relayers:r}=this;return xu.PacketFee.fromPartial({fee:t==null?void 0:t.toProto(),refundAddress:e,relayers:r})}}class Js extends u{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 Js(e?qe.fromData(e):void 0,r?$e.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 Js(t.packetId?qe.fromProto(t.packetId):void 0,t.packetFee?$e.fromProto(t.packetFee):void 0)}toProto(){const{packet_id:t,packet_fee:e}=this;return te.MsgPayPacketFeeAsync.fromPartial({packetId:t==null?void 0:t.toProto(),packetFee:e==null?void 0:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgPayPacketFeeAsync",value:te.MsgPayPacketFeeAsync.encode(this.toProto()).finish()})}static unpackAny(t){return Js.fromProto(te.MsgPayPacketFeeAsync.decode(t.value))}}class Zs extends u{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:n}=t;return new Zs(e,r,o,n)}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 Zs(t.portId,t.channelId,t.relayer,t.payee)}toProto(){const{port_id:t,channel_id:e,relayer:r,payee:o}=this;return te.MsgRegisterPayee.fromPartial({portId:t,channelId:e,relayer:r,payee:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterPayee",value:te.MsgRegisterPayee.encode(this.toProto()).finish()})}static unpackAny(t){return Zs.fromProto(te.MsgRegisterPayee.decode(t.value))}}class Ys extends u{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:n}=t;return new Ys(e,r,o,n)}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 Ys(t.portId,t.channelId,t.relayer,t.counterpartyPayee)}toProto(){const{port_id:t,channel_id:e,relayer:r,counterparty_payee:o}=this;return te.MsgRegisterCounterpartyPayee.fromPartial({portId:t,channelId:e,relayer:r,counterpartyPayee:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",value:te.MsgRegisterCounterpartyPayee.encode(this.toProto()).finish()})}static unpackAny(t){return Ys.fromProto(te.MsgRegisterCounterpartyPayee.decode(t.value))}}class Pi extends u{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 Pi(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 Pi(e,r)}toData(){const{fee_version:t,app_version:e}=this;return{fee_version:t,app_version:e}}static fromProto(t){return new Pi(t.feeVersion,t.appVersion)}toProto(){const{fee_version:t,app_version:e}=this;return sd.Metadata.fromPartial({feeVersion:t,appVersion:e})}}class bi extends u{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 bi(e?qe.fromAmino(e):void 0,r.map(o=>$e.fromAmino(o)))}toAmino(){const{packet_id:t,packet_fees:e}=this;return{packet_id:t==null?void 0:t.toAmino(),packet_fees:e.map(r=>r.toAmino())}}static fromData(t){const{packet_id:e,packet_fees:r}=t;return new bi(e?qe.fromData(e):void 0,r.map(o=>$e.fromData(o)))}toData(){const{packet_id:t,packet_fees:e}=this;return{packet_id:t==null?void 0:t.toData(),packet_fees:e.map(r=>r.toData())}}static fromProto(t){return new bi(t.packetId?qe.fromProto(t.packetId):void 0,t.packetFees.map(e=>$e.fromProto(e)))}toProto(){const{packet_id:t,packet_fees:e}=this;return{packetId:t==null?void 0:t.toProto(),packetFees:e.map(r=>r.toProto())}}}class bo extends u{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 bo(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 bo(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 bo(t.authority,t.address,t.allowed)}toProto(){const{authority:t,address:e,allowed:r}=this;return $a.MsgUpdateACL.fromPartial({authority:t,address:e,allowed:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateACL",value:$a.MsgUpdateACL.encode(this.toProto()).finish()})}static unpackAny(t){return bo.fromProto($a.MsgUpdateACL.decode(t.value))}}class Jn extends u{constructor(t){super(),this.default_allowed=t}static fromAmino(t){return new Jn(t.value.default_allowed)}toAmino(){return{type:"ibc-hooks/Params",value:{default_allowed:this.default_allowed}}}static fromData(t){return new Jn(t.default_allowed)}toData(){return{"@type":"/initia.ibchooks.v1.Params",default_allowed:this.default_allowed}}static fromProto(t){return new Jn(t.defaultAllowed)}toProto(){return Mu.Params.fromPartial({defaultAllowed:this.default_allowed})}}class Do extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Do(e,Jn.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 Do(e,Jn.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 Do(t.authority,Jn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return $a.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateParams",value:$a.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Do.fromProto($a.MsgUpdateParams.decode(t.value))}}class Xs extends u{constructor(t,e){super(),this.address=t,this.allowed=e}static fromAmino(t){const{address:e,allowed:r}=t;return new Xs(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 Xs(e,r)}toData(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromProto(t){return new Xs(t.address,t.allowed)}toProto(){const{address:t,allowed:e}=this;return Mu.ACL.fromPartial({address:t,allowed:e})}}class ko extends u{constructor(e,r,o,n,s,i,c,d,g){super();_(this,"source_port");_(this,"source_channel");_(this,"class_id");_(this,"token_ids");_(this,"sender");_(this,"receiver");_(this,"timeout_height");_(this,"timeout_timestamp");_(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=n,this.sender=s,this.receiver=i,this.timeout_height=c,this.timeout_timestamp=d,this.memo=g}static fromAmino(e){const{value:{source_port:r,source_channel:o,class_id:n,token_ids:s,sender:i,receiver:c,timeout_height:d,timeout_timestamp:g,memo:v}}=e;if(!d&&!g)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new ko(r,o,n,s,i,c,U.fromAmino(d),g,v)}toAmino(){const{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:c,timeout_timestamp:d,memo:g}=this;return{type:"nft-transfer/MsgTransfer",value:{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:(c==null?void 0:c.toAmino())??{},timeout_timestamp:d,memo:g===""?void 0:g}}}static fromData(e){const{source_port:r,source_channel:o,class_id:n,token_ids:s,sender:i,receiver:c,timeout_timestamp:d,timeout_height:g,memo:v}=e;if(!g&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new ko(r,o,n,s,i,c,g?U.fromData(g):void 0,d==="0"?void 0:d,v)}toData(){const{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:c,timeout_timestamp:d,memo:g}=this;return{"@type":"/ibc.applications.nft_transfer.v1.MsgTransfer",source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:c?c.toData():new U(0,0).toData(),timeout_timestamp:d??"0",memo:g}}static fromProto(e){if(!e.timeoutHeight&&Number(e.timeoutTimestamp)==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new ko(e.sourcePort,e.sourceChannel,e.classId,e.tokenIds,e.sender,e.receiver,e.timeoutHeight?U.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:c,timeout_timestamp:d,memo:g}=this;return La.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,classId:o,tokenIds:n,sender:s,receiver:i,timeoutHeight:c==null?void 0:c.toProto(),timeoutTimestamp:d?BigInt(d):void 0,memo:g})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgTransfer",value:La.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return ko.fromProto(La.MsgTransfer.decode(e.value))}}class Zn extends u{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 Zn(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 Zn(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 Zn(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Su.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class xo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new xo(e,Zn.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 xo(e,Zn.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 xo(t.authority,Zn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return La.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgUpdateParams",value:La.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return xo.fromProto(La.MsgUpdateParams.decode(t.value))}}class Di extends u{constructor(t,e,r,o,n,s,i,c,d){super(),this.class_id=t,this.class_uri=e,this.class_data=r,this.token_ids=o,this.token_uris=n,this.token_data=s,this.sender=i,this.receiver=c,this.memo=d}static fromAmino(t){const{class_id:e,class_uri:r,class_data:o,token_ids:n,token_uris:s,token_data:i,sender:c,receiver:d,memo:g}=t;return new Di(e,r,o,n,s,i,c,d,g)}toAmino(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:i,receiver:c,memo:d}=this;return{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:i,receiver:c,memo:d}}static fromData(t){const{class_id:e,class_uri:r,class_data:o,token_ids:n,token_uris:s,token_data:i,sender:c,receiver:d,memo:g}=t;return new Di(e,r,o,n,s,i,c,d,g)}toData(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:i,receiver:c,memo:d}=this;return{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:i,receiver:c,memo:d}}static fromProto(t){return new Di(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:n,token_data:s,sender:i,receiver:c,memo:d}=this;return ad.NonFungibleTokenPacketData.fromPartial({classId:t,classUri:e,classData:r,tokenIds:o,tokenUris:n,tokenData:s,sender:i,receiver:c,memo:d})}}class Qs extends u{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 Qs(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 Qs(e,r)}toData(){const{path:t,base_class_id:e}=this;return{path:t,base_class_id:e}}static fromProto(t){return new Qs(t.path,t.baseClassId)}toProto(){const{path:t,base_class_id:e}=this;return Su.ClassTrace.fromPartial({path:t,baseClassId:e})}}class Mo extends u{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:n}}=t;return new Mo(e,r,o,n)}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:n}=t;return new Mo(e,r,o,n)}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 Mo(t.authority,t.channelId,t.portId,t.admin)}toProto(){const{authority:t,channel_id:e,port_id:r,admin:o}=this;return Ha.MsgUpdateAdmin.fromPartial({authority:t,channelId:e,portId:r,admin:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdateAdmin",value:Ha.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Mo.fromProto(Ha.MsgUpdateAdmin.decode(t.value))}}class So extends u{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:n}}=t;return new So(e,r,o,n)}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:n}=t;return new So(e,r,o,n)}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 So(t.authority,t.channelId,t.portId,t.relayers)}toProto(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return Ha.MsgUpdatePermissionedRelayers.fromPartial({authority:t,channelId:e,portId:r,relayers:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers",value:Ha.MsgUpdatePermissionedRelayers.encode(this.toProto()).finish()})}static unpackAny(t){return So.fromProto(Ha.MsgUpdatePermissionedRelayers.decode(t.value))}}class bs extends u{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 bs(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 bs(e,r)}toData(){const{port_id:t,channel_id:e}=this;return{port_id:t,channel_id:e}}static fromProto(t){return new bs(t.portId,t.channelId)}toProto(){const{port_id:t,channel_id:e}=this;return ui.Counterparty.fromPartial({portId:t,channelId:e})}}class ee extends u{constructor(t,e,r,o,n){super(),this.state=t,this.ordering=e,this.counterparty=r,this.connection_hops=o,this.version=n}static fromAmino(t){const{state:e,ordering:r,counterparty:o,connection_hops:n,version:s}=t;return new ee(e,r,o?bs.fromAmino(o):void 0,n,s)}toAmino(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:n}=this;return{state:t,ordering:e,counterparty:r==null?void 0:r.toAmino(),connection_hops:o,version:n}}static fromData(t){const{state:e,ordering:r,counterparty:o,connection_hops:n,version:s}=t;return new ee(e,r,o?bs.fromData(o):void 0,n,s)}toData(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:n}=this;return{state:t,ordering:e,counterparty:r==null?void 0:r.toData(),connection_hops:o,version:n}}static fromProto(t){return new ee(t.state,t.ordering,t.counterparty?bs.fromProto(t.counterparty):void 0,t.connectionHops,t.version)}toProto(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:n}=this;return ui.Channel.fromPartial({state:t,ordering:e,counterparty:r==null?void 0:r.toProto(),connectionHops:o,version:n})}}class ta extends u{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 ta(e,r?ee.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 ta(t.portId,t.channel?ee.fromProto(t.channel):void 0,t.signer)}toProto(){const{port_id:t,channel:e,signer:r}=this;return J.MsgChannelOpenInit.fromPartial({portId:t,channel:e==null?void 0:e.toProto(),signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",value:J.MsgChannelOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return ta.fromProto(J.MsgChannelOpenInit.decode(t.value))}}class ea extends u{constructor(e,r,o){super();_(this,"client_state");_(this,"consensus_state");_(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:n}=e;return new ea(r,o,n)}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 ea(e.clientState,e.consensusState,e.signer)}toProto(){const{client_state:e,consensus_state:r,signer:o}=this;return ft.MsgCreateClient.fromPartial({clientState:e,consensusState:r,signer:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgCreateClient",value:ft.MsgCreateClient.encode(this.toProto()).finish()})}static unpackAny(e){return ea.fromProto(ft.MsgCreateClient.decode(e.value))}}class ra extends u{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 ra(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 ra(t.clientId,t.clientMessage,t.signer)}toProto(){const{client_id:t,client_message:e,signer:r}=this;return ft.MsgUpdateClient.fromPartial({clientId:t,clientMessage:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateClient",value:ft.MsgUpdateClient.encode(this.toProto()).finish()})}static unpackAny(t){return ra.fromProto(ft.MsgUpdateClient.decode(t.value))}}class oa extends u{constructor(t,e,r,o,n,s){super(),this.client_id=t,this.client_state=e,this.consensus_state=r,this.proof_upgrade_client=o,this.proof_upgrade_consensus_state=n,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,client_state:r,consensus_state:o,proof_upgrade_client:n,proof_upgrade_consensus_state:s,signer:i}=t;return new oa(e,r,o,n,s,i)}toData(){const{client_id:t,client_state:e,consensus_state:r,proof_upgrade_client:o,proof_upgrade_consensus_state:n,signer:s}=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:n,signer:s}}static fromProto(t){return new oa(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:n,signer:s}=this;return ft.MsgUpgradeClient.fromPartial({clientId:t,clientState:e,consensusState:r,proofUpgradeClient:Buffer.from(o,"base64"),proofUpgradeConsensusState:Buffer.from(n,"base64"),signer:s})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",value:ft.MsgUpgradeClient.encode(this.toProto()).finish()})}static unpackAny(t){return oa.fromProto(ft.MsgUpgradeClient.decode(t.value))}}class na extends u{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 na(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 na(t.clientId,t.misbehaviour,t.signer)}toProto(){const{client_id:t,misbehaviour:e,signer:r}=this;return ft.MsgSubmitMisbehaviour.fromPartial({clientId:t,misbehaviour:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",value:ft.MsgSubmitMisbehaviour.encode(this.toProto()).finish()})}static unpackAny(t){return na.fromProto(ft.MsgSubmitMisbehaviour.decode(t.value))}}class sa extends u{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 sa(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 sa(t.subjectClientId,t.substituteClientId,t.signer)}toProto(){const{subject_client_id:t,substitute_client_id:e,signer:r}=this;return ft.MsgRecoverClient.fromPartial({subjectClientId:t,substituteClientId:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgRecoverClient",value:ft.MsgRecoverClient.encode(this.toProto()).finish()})}static unpackAny(t){return sa.fromProto(ft.MsgRecoverClient.decode(t.value))}}class xe extends u{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 xe(e,parseInt(r),o)}toAmino(){const{name:t,height:e,info:r}=this;return{name:t,height:e.toFixed(),info:r}}static fromData(t){const{name:e,height:r,info:o}=t;return new xe(e,parseInt(r),o)}toData(){const{name:t,height:e,info:r}=this;return{name:t,height:e.toFixed(),info:r}}static fromProto(t){return new xe(t.name,Number(t.height),t.info)}toProto(){const{name:t,height:e,info:r}=this;return id.Plan.fromPartial({name:t,height:BigInt(e),info:r})}}class Io extends u{constructor(t,e){super(),this.authority=t,this.plan=e}static fromAmino(t){const{value:{authority:e,plan:r}}=t;return new Io(e,xe.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 Io(e,xe.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 Io(t.authority,xe.fromProto(t.plan))}toProto(){const{authority:t,plan:e}=this;return za.MsgSoftwareUpgrade.fromPartial({authority:t,plan:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",value:za.MsgSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Io.fromProto(za.MsgSoftwareUpgrade.decode(t.value))}}class Bo extends u{constructor(t){super(),this.authority=t}static fromAmino(t){const{value:{authority:e}}=t;return new Bo(e)}toAmino(){const{authority:t}=this;return{type:"cosmos-sdk/MsgCancelUpgrade",value:{authority:t}}}static fromData(t){const{authority:e}=t;return new Bo(e)}toData(){const{authority:t}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",authority:t}}static fromProto(t){return new Bo(t.authority)}toProto(){const{authority:t}=this;return za.MsgCancelUpgrade.fromPartial({authority:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",value:za.MsgCancelUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Bo.fromProto(za.MsgCancelUpgrade.decode(t.value))}}class aa extends u{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 aa(xe.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 aa(xe.fromProto(t.plan),t.upgradedClientState,t.signer)}toProto(){const{plan:t,upgraded_client_state:e,signer:r}=this;return ft.MsgIBCSoftwareUpgrade.fromPartial({plan:t.toProto(),upgradedClientState:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgIBCSoftwareUpgrade",value:ft.MsgIBCSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return aa.fromProto(ft.MsgIBCSoftwareUpgrade.decode(t.value))}}class Ds extends u{constructor(t){super(),this.allowed_clients=t}static fromAmino(t){const{allowed_clients:e}=t;return new Ds(e)}toAmino(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromData(t){const{allowed_clients:e}=t;return new Ds(e)}toData(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromProto(t){return new Ds(t.allowedClients)}toProto(){const{allowed_clients:t}=this;return Ii.Params.fromPartial({allowedClients:t})}}class ia extends u{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 ia(e,Ds.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 ia(t.signer,Ds.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return ft.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateParams",value:ft.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ia.fromProto(ft.MsgUpdateParams.decode(t.value))}}class ks extends u{constructor(e,r){super();_(this,"height");_(this,"consensus_state");this.height=e,this.consensus_state=r}static fromAmino(e){const{height:r,consensus_state:o}=e;return new ks(r?U.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 ks(r?U.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 ks(e.height?U.fromProto(e.height):void 0,e.consensusState)}toProto(){const{height:e,consensus_state:r}=this;return Ii.ConsensusStateWithHeight.fromPartial({height:e==null?void 0:e.toProto(),consensusState:r})}}class ki extends u{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 ki(e,r.map(o=>ks.fromAmino(o)))}toAmino(){const{client_id:t,consensus_states:e}=this;return{client_id:t,consensus_states:e.map(r=>r.toAmino())}}static fromData(t){const{client_id:e,consensus_states:r}=t;return new ki(e,r.map(o=>ks.fromData(o)))}toData(){const{client_id:t,consensus_states:e}=this;return{client_id:t,consensus_states:e.map(r=>r.toData())}}static fromProto(t){return new ki(t.clientId,t.consensusStates.map(e=>ks.fromProto(e)))}toProto(){const{client_id:t,consensus_states:e}=this;return Ii.ClientConsensusStates.fromPartial({clientId:t,consensusStates:e.map(r=>r.toProto())})}}class Ja extends u{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 Ja(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 Ja(e,r)}toData(){const{client_id:t,client_state:e}=this;return{client_id:t,client_state:e}}static fromProto(t){return new Ja(t.clientId,t.clientState)}toProto(){const{client_id:t,client_state:e}=this;return Ii.IdentifiedClientState.fromPartial({clientId:t,clientState:e})}}class xs extends u{constructor(t,e){super(),this.height=t,this.timestamp=e}static fromAmino(t){const{height:e,timestamp:r}=t;return new xs(U.fromAmino(e),parseInt(r))}toAmino(){const{height:t,timestamp:e}=this;return{height:t.toAmino(),timestamp:e.toFixed()}}static fromData(t){const{height:e,timestamp:r}=t;return new xs(U.fromData(e),parseInt(r))}toData(){const{height:t,timestamp:e}=this;return{height:t.toData(),timestamp:e.toFixed()}}static fromProto(t){return new xs(U.fromProto(t.height),Number(t.timestamp))}toProto(){const{height:t,timestamp:e}=this;return ui.Timeout.fromPartial({height:t.toProto(),timestamp:BigInt(e)})}}class ca extends u{constructor(t){super(),this.upgrade_timeout=t}static fromAmino(t){return new ca(xs.fromAmino(t.upgrade_timeout))}toAmino(){return{upgrade_timeout:this.upgrade_timeout.toAmino()}}static fromData(t){return new ca(xs.fromData(t.upgrade_timeout))}toData(){return{upgrade_timeout:this.upgrade_timeout.toData()}}static fromProto(t){return new ca(xs.fromProto(t.upgradeTimeout))}toProto(){return ui.Params.fromPartial({upgradeTimeout:this.upgrade_timeout.toProto()})}}class Vt extends u{constructor(t,e,r,o,n,s,i,c){super(),this.sequence=t,this.source_port=e,this.source_channel=r,this.destination_port=o,this.destination_channel=n,this.data=s,this.timeout_height=i,this.timeout_timestamp=c}static fromAmino(t){const{sequence:e,source_port:r,source_channel:o,destination_port:n,destination_channel:s,data:i,timeout_height:c,timeout_timestamp:d}=t;return new Vt(e,r,o,n,s,i,c?U.fromAmino(c):void 0,d)}toAmino(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i==null?void 0:i.toAmino(),timeout_timestamp:c}}static fromData(t){const{sequence:e,source_port:r,source_channel:o,destination_port:n,destination_channel:s,data:i,timeout_height:c,timeout_timestamp:d}=t;return new Vt(e,r,o,n,s,i,c?U.fromData(c):void 0,d)}toData(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i==null?void 0:i.toData(),timeout_timestamp:c}}static fromProto(t){return new Vt(Number(t.sequence),t.sourcePort,t.sourceChannel,t.destinationPort,t.destinationChannel,Buffer.from(t.data).toString("base64"),t.timeoutHeight?U.fromProto(t.timeoutHeight):void 0,t.timeoutTimestamp.toString())}toProto(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i,timeout_timestamp:c}=this;return ui.Packet.fromPartial({sequence:BigInt(t),sourcePort:e,sourceChannel:r,destinationPort:o,destinationChannel:n,data:Buffer.from(s,"base64"),timeoutHeight:i==null?void 0:i.toProto(),timeoutTimestamp:BigInt(c)})}}class Ms extends u{constructor(t){super(),this.key_prefix=t}static fromAmino(t){const{key_prefix:e}=t;return new Ms(e)}toAmino(){const{key_prefix:t}=this;return{key_prefix:t}}static fromData(t){const{key_prefix:e}=t;return new Ms(e)}toData(){const{key_prefix:t}=this;return{key_prefix:t}}static fromProto(t){return new Ms(Buffer.from(t.keyPrefix).toString("base64"))}toProto(){const{key_prefix:t}=this;return Iu.MerklePrefix.fromPartial({keyPrefix:Buffer.from(t,"base64")})}}class Ji extends u{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 Ji(t.hash)}toData(){return{hash:this.hash}}static fromProto(t){return new Ji(Buffer.from(t.hash).toString("base64"))}toProto(){return Iu.MerkleRoot.fromPartial({hash:Buffer.from(this.hash,"base64")})}}class re extends u{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 re(e,r,o?Ms.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 re(e,r,o?Ms.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 re(t.clientId,t.connectionId,t.prefix?Ms.fromProto(t.prefix):void 0)}toProto(){const{client_id:t,connection_id:e,prefix:r}=this;return ue.Counterparty.fromPartial({clientId:t,connectionId:e,prefix:r==null?void 0:r.toProto()})}}class qt extends u{constructor(t,e){super(),this.identifier=t,this.features=e}static fromAmino(t){const{identifier:e,features:r}=t;return new qt(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 qt(e,r)}toData(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromProto(t){return new qt(t.identifier,t.features)}toProto(){const{identifier:t,features:e}=this;return ue.Version.fromPartial({identifier:t,features:e})}}class ua extends u{constructor(t,e,r,o,n,s){super(),this.id=t,this.client_id=e,this.versions=r,this.state=o,this.counterparty=n,this.delay_period=s}static fromAmino(t){const{id:e,client_id:r,versions:o,state:n,counterparty:s,delay_period:i}=t;return new ua(e,r,o.map(qt.fromAmino),ue.stateFromJSON(n),s?re.fromAmino(s):void 0,parseInt(i))}toAmino(){const{id:t,client_id:e,versions:r,state:o,counterparty:n,delay_period:s}=this;return{id:t,client_id:e,versions:r.map(i=>i.toAmino()),state:ue.stateToJSON(o),counterparty:n==null?void 0:n.toAmino(),delay_period:s.toFixed()}}static fromData(t){const{id:e,client_id:r,versions:o,state:n,counterparty:s,delay_period:i}=t;return new ua(e,r,o.map(qt.fromData),ue.stateFromJSON(n),s?re.fromData(s):void 0,parseInt(i))}toData(){const{id:t,client_id:e,versions:r,state:o,counterparty:n,delay_period:s}=this;return{id:t,client_id:e,versions:r.map(i=>i.toData()),state:ue.stateToJSON(o),counterparty:n==null?void 0:n.toData(),delay_period:s.toFixed()}}static fromProto(t){return new ua(t.id,t.clientId,t.versions.map(qt.fromProto),t.state,t.counterparty?re.fromProto(t.counterparty):void 0,Number(t.delayPeriod))}toProto(){const{id:t,client_id:e,versions:r,state:o,counterparty:n,delay_period:s}=this;return ue.IdentifiedConnection.fromPartial({id:t,clientId:e,versions:r.map(i=>i.toProto()),state:o,counterparty:n==null?void 0:n.toProto(),delayPeriod:BigInt(s)})}}class ma extends u{constructor(t){super(),this.max_expected_time_per_block=t}static fromAmino(t){const{max_expected_time_per_block:e}=t;return new ma(parseInt(e))}toAmino(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toFixed()}}static fromData(t){const{max_expected_time_per_block:e}=t;return new ma(parseInt(e))}toData(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toFixed()}}static fromProto(t){return new ma(Number(t.maxExpectedTimePerBlock))}toProto(){const{max_expected_time_per_block:t}=this;return ue.Params.fromPartial({maxExpectedTimePerBlock:BigInt(t)})}}class da extends u{constructor(t,e,r,o,n,s,i){super(),this.port_id=t,this.previous_channel_id=e,this.channel=r,this.counterparty_version=o,this.proof_init=n,this.proof_height=s,this.signer=i}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:n,proof_init:s,proof_height:i,signer:c}=t;return new da(e,r,o?ee.fromData(o):void 0,n,s,i?U.fromData(i):void 0,c)}toData(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:n,proof_height:s,signer:i}=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:n,proof_height:s==null?void 0:s.toData(),signer:i}}static fromProto(t){return new da(t.portId,t.previousChannelId,t.channel?ee.fromProto(t.channel):void 0,t.counterpartyVersion,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:n,proof_height:s,signer:i}=this;return J.MsgChannelOpenTry.fromPartial({portId:t,previousChannelId:e,channel:r==null?void 0:r.toProto(),counterpartyVersion:o,proofInit:Buffer.from(n,"base64"),proofHeight:s==null?void 0:s.toProto(),signer:i})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",value:J.MsgChannelOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return da.fromProto(J.MsgChannelOpenTry.decode(t.value))}}class la extends u{constructor(t,e,r,o,n){super(),this.port_id=t,this.channel_id=e,this.proof_ack=r,this.proof_height=o,this.signer=n}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:n,signer:s}=t;return new la(e,r,o,n?U.fromData(n):void 0,s)}toData(){const{port_id:t,channel_id:e,proof_ack:r,proof_height:o,signer:n}=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:n}}static fromProto(t){return new la(t.portId,t.channelId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_ack:r,proof_height:o,signer:n}=this;return J.MsgChannelOpenConfirm.fromPartial({portId:t,channelId:e,proofAck:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",value:J.MsgChannelOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return la.fromProto(J.MsgChannelOpenConfirm.decode(t.value))}}class pa extends u{constructor(t,e,r,o,n,s,i){super(),this.port_id=t,this.channel_id=e,this.counterparty_channel_id=r,this.counterparty_version=o,this.proof_try=n,this.proof_height=s,this.signer=i}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:n,proof_try:s,proof_height:i,signer:c}=t;return new pa(e,r,o,n,s,i?U.fromData(i):void 0,c)}toData(){const{port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,proof_try:n,proof_height:s,signer:i}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenAck",port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,proof_try:n,proof_height:s==null?void 0:s.toData(),signer:i}}static fromProto(t){return new pa(t.portId,t.channelId,t.counterpartyChannelId,t.counterpartyVersion,Buffer.from(t.proofTry).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,proof_try:n,proof_height:s,signer:i}=this;return J.MsgChannelOpenAck.fromPartial({portId:t,channelId:e,counterpartyChannelId:r,counterpartyVersion:o,proofTry:Buffer.from(n,"base64"),proofHeight:s==null?void 0:s.toProto(),signer:i})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",value:J.MsgChannelOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return pa.fromProto(J.MsgChannelOpenAck.decode(t.value))}}class ha extends u{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 ha(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 ha(t.portId,t.channelId,t.signer)}toProto(){const{port_id:t,channel_id:e,signer:r}=this;return J.MsgChannelCloseInit.fromPartial({portId:t,channelId:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",value:J.MsgChannelCloseInit.encode(this.toProto()).finish()})}static unpackAny(t){return ha.fromProto(J.MsgChannelCloseInit.decode(t.value))}}class fa extends u{constructor(t,e,r,o,n){super(),this.port_id=t,this.channel_id=e,this.proof_init=r,this.proof_height=o,this.signer=n}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:n,signer:s}=t;return new fa(e,r,o,n?U.fromData(n):void 0,s)}toData(){const{port_id:t,channel_id:e,proof_init:r,proof_height:o,signer:n}=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:n}}static fromProto(t){return new fa(t.portId,t.channelId,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_init:r,proof_height:o,signer:n}=this;return J.MsgChannelCloseConfirm.fromPartial({portId:t,channelId:e,proofInit:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",value:J.MsgChannelCloseConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return fa.fromProto(J.MsgChannelCloseConfirm.decode(t.value))}}class ga extends u{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:n}=t;return new ga(e?Vt.fromData(e):void 0,r,o?U.fromData(o):void 0,n)}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 ga(t.packet?Vt.fromProto(t.packet):void 0,Buffer.from(t.proofCommitment).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,proof_commitment:e,proof_height:r,signer:o}=this;return J.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 f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",value:J.MsgRecvPacket.encode(this.toProto()).finish()})}static unpackAny(t){return ga.fromProto(J.MsgRecvPacket.decode(t.value))}}class ya extends u{constructor(t,e,r,o,n){super(),this.packet=t,this.acknowledgement=e,this.proof_acked=r,this.proof_height=o,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,acknowledgement:r,proof_acked:o,proof_height:n,signer:s}=t;return new ya(e?Vt.fromData(e):void 0,o,r,n?U.fromData(n):void 0,s)}toData(){const{packet:t,acknowledgement:e,proof_acked:r,proof_height:o,signer:n}=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:n}}static fromProto(t){return new ya(t.packet?Vt.fromProto(t.packet):void 0,Buffer.from(t.acknowledgement).toString("base64"),Buffer.from(t.proofAcked).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,acknowledgement:e,proof_acked:r,proof_height:o,signer:n}=this;return J.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:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",value:J.MsgAcknowledgement.encode(this.toProto()).finish()})}static unpackAny(t){return ya.fromProto(J.MsgAcknowledgement.decode(t.value))}}class _a extends u{constructor(t,e,r,o,n){super(),this.packet=t,this.proof_unreceived=e,this.proof_height=r,this.next_sequence_recv=o,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_height:o,next_sequence_recv:n,signer:s}=t;return new _a(e?Vt.fromData(e):void 0,r,o?U.fromData(o):void 0,parseInt(n),s)}toData(){const{packet:t,proof_unreceived:e,proof_height:r,next_sequence_recv:o,signer:n}=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:n}}static fromProto(t){return new _a(t.packet?Vt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,Number(t.nextSequenceRecv),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_height:r,next_sequence_recv:o,signer:n}=this;return J.MsgTimeout.fromPartial({packet:t==null?void 0:t.toProto(),proofUnreceived:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),nextSequenceRecv:BigInt(o),signer:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeout",value:J.MsgTimeout.encode(this.toProto()).finish()})}static unpackAny(t){return _a.fromProto(J.MsgTimeout.decode(t.value))}}class va extends u{constructor(t,e,r,o,n,s){super(),this.packet=t,this.proof_unreceived=e,this.proof_close=r,this.proof_height=o,this.next_sequence_recv=n,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_close:o,proof_height:n,next_sequence_recv:s,signer:i}=t;return new va(e?Vt.fromData(e):void 0,o,r,n?U.fromData(n):void 0,parseInt(s),i)}toData(){const{packet:t,proof_unreceived:e,proof_close:r,proof_height:o,next_sequence_recv:n,signer:s}=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:n.toFixed(),signer:s}}static fromProto(t){return new va(t.packet?Vt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),Buffer.from(t.proofClose).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,Number(t.nextSequenceRecv),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_close:r,proof_height:o,next_sequence_recv:n,signer:s}=this;return J.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:BigInt(n),signer:s})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",value:J.MsgTimeoutOnClose.encode(this.toProto()).finish()})}static unpackAny(t){return va.fromProto(J.MsgTimeoutOnClose.decode(t.value))}}class wa extends u{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 wa(e,ca.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 wa(t.authority,ca.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return J.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgUpdateParams",value:J.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return wa.fromProto(J.MsgUpdateParams.decode(t.value))}}class Za extends u{constructor(t,e,r,o,n){super(),this.client_id=t,this.counterparty=e,this.version=r,this.delay_period=o,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,counterparty:r,version:o,delay_period:n,signer:s}=t;return new Za(e,re.fromData(r),o?qt.fromData(o):void 0,parseInt(n),s)}toData(){const{client_id:t,counterparty:e,version:r,delay_period:o,signer:n}=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:n}}static fromProto(t){return new Za(t.clientId,re.fromProto(t.counterparty),t.version?qt.fromProto(t.version):void 0,Number(t.delayPeriod),t.signer)}toProto(){const{client_id:t,counterparty:e,version:r,delay_period:o,signer:n}=this;return Ut.MsgConnectionOpenInit.fromPartial({clientId:t,counterparty:e.toProto(),version:r==null?void 0:r.toProto(),delayPeriod:BigInt(o),signer:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",value:Ut.MsgConnectionOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return Za.fromProto(Ut.MsgConnectionOpenInit.decode(t.value))}}class Ya extends u{constructor(t,e,r,o,n,s,i,c,d,g,v){super(),this.client_id=t,this.client_state=e,this.counterparty=r,this.delay_period=o,this.counterparty_versions=n,this.proof_height=s,this.proof_init=i,this.proof_client=c,this.proof_consensus=d,this.consensus_height=g,this.signer=v}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:n,counterparty_versions:s,proof_height:i,proof_init:c,proof_client:d,proof_consensus:g,consensus_height:v,signer:b}=t;return new Ya(e,r,o?re.fromData(o):void 0,parseInt(n),s.map(k=>qt.fromData(k)),i?U.fromData(i):void 0,Buffer.from(c).toString("base64"),Buffer.from(d).toString("base64"),Buffer.from(g).toString("base64"),v?U.fromData(v):void 0,b)}toData(){const{client_id:t,client_state:e,counterparty:r,delay_period:o,counterparty_versions:n,proof_height:s,proof_init:i,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=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:n.map(b=>b.toData()),proof_height:s==null?void 0:s.toData(),proof_init:i,proof_client:c,proof_consensus:d,consensus_height:g==null?void 0:g.toData(),signer:v}}static fromProto(t){return new Ya(t.clientId,t.clientState,t.counterparty?re.fromProto(t.counterparty):void 0,Number(t.delayPeriod),t.counterpartyVersions.map(e=>qt.fromProto(e)),t.proofHeight?U.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?U.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{client_id:t,client_state:e,counterparty:r,delay_period:o,counterparty_versions:n,proof_height:s,proof_init:i,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=this;return Ut.MsgConnectionOpenTry.fromPartial({clientId:t,clientState:e,counterparty:r==null?void 0:r.toProto(),delayPeriod:BigInt(o),counterpartyVersions:n.map(b=>b.toProto()),proofHeight:s==null?void 0:s.toProto(),proofInit:Buffer.from(i,"base64"),proofClient:Buffer.from(c,"base64"),proofConsensus:Buffer.from(d,"base64"),consensusHeight:g==null?void 0:g.toProto(),signer:v})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",value:Ut.MsgConnectionOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return Ya.fromProto(Ut.MsgConnectionOpenTry.decode(t.value))}}class Xa extends u{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:n}=t;return new Xa(e,r,o?U.fromData(o):void 0,n)}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 Xa(t.connectionId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{connection_id:t,proof_ack:e,proof_height:r,signer:o}=this;return Ut.MsgConnectionOpenConfirm.fromPartial({connectionId:t,proofAck:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",value:Ut.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return Xa.fromProto(Ut.MsgConnectionOpenConfirm.decode(t.value))}}class Qa extends u{constructor(t,e,r,o,n,s,i,c,d,g){super(),this.connection_id=t,this.counterparty_connection_id=e,this.version=r,this.client_state=o,this.proof_height=n,this.proof_try=s,this.proof_client=i,this.proof_consensus=c,this.consensus_height=d,this.signer=g}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:n,proof_height:s,proof_try:i,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=t;return new Qa(e,r,o?qt.fromData(o):void 0,n,s?U.fromData(s):void 0,i,c,d,g?U.fromData(g):void 0,v)}toData(){const{connection_id:t,counterparty_connection_id:e,version:r,client_state:o,proof_height:n,proof_try:s,proof_client:i,proof_consensus:c,consensus_height:d,signer:g}=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:n==null?void 0:n.toData(),proof_try:s,proof_client:i,proof_consensus:c,consensus_height:d==null?void 0:d.toData(),signer:g}}static fromProto(t){return new Qa(t.connectionId,t.counterpartyConnectionId,t.version?qt.fromProto(t.version):void 0,t.clientState,t.proofHeight?U.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?U.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{connection_id:t,counterparty_connection_id:e,version:r,client_state:o,proof_height:n,proof_try:s,proof_client:i,proof_consensus:c,consensus_height:d,signer:g}=this;return Ut.MsgConnectionOpenAck.fromPartial({connectionId:t,counterpartyConnectionId:e,version:r==null?void 0:r.toProto(),clientState:o,proofHeight:n==null?void 0:n.toProto(),proofTry:Buffer.from(s,"base64"),proofClient:Buffer.from(i,"base64"),proofConsensus:Buffer.from(c,"base64"),consensusHeight:d==null?void 0:d.toProto(),signer:g})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",value:Ut.MsgConnectionOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return Qa.fromProto(Ut.MsgConnectionOpenAck.decode(t.value))}}class ti extends u{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 ti(e,ma.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 ti(t.signer,ma.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Ut.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgUpdateParams",value:Ut.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ti.fromProto(Ut.MsgUpdateParams.decode(t.value))}}class Uo extends u{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:n}}=t;return new Uo(e,r,o,n)}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:n}=t;return new Uo(e,r,o,n)}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 Uo(t.owner,t.connectionId,t.version,t.ordering)}toProto(){const{owner:t,connection_id:e,version:r,ordering:o}=this;return Va.MsgRegisterAccount.fromPartial({owner:t,connectionId:e,version:r,ordering:o})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgRegisterAccount",value:Va.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Uo.fromProto(Va.MsgRegisterAccount.decode(t.value))}}class Co extends u{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 Co(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 Co(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 Co(t.owner,t.connectionId,t.msg?exports.Msg.fromProto(t.msg):void 0)}toProto(){const{owner:t,connection_id:e,msg:r}=this;return Va.MsgSubmitTx.fromPartial({owner:t,connectionId:e,msg:r==null?void 0:r.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgSubmitTx",value:Va.MsgSubmitTx.encode(this.toProto()).finish()})}static unpackAny(t){return Co.fromProto(Va.MsgSubmitTx.decode(t.value))}}class Et extends u{constructor(t,e){super(),this.Base=t,this.Quote=e}toString(){return`${this.Base}/${this.Quote}`}static fromAmino(t){return new Et(t.Base,t.Quote)}toAmino(){return{Base:this.Base,Quote:this.Quote}}static fromData(t){return new Et(t.Base,t.Quote)}toData(){return{Base:this.Base,Quote:this.Quote}}static fromProto(t){return new Et(t.Base,t.Quote)}toProto(){return cd.CurrencyPair.fromPartial({Base:this.Base,Quote:this.Quote})}}class Eo extends u{constructor(t,e){super(),this.authority=t,this.currency_pairs=e}static fromAmino(t){const{value:{authority:e,currency_pairs:r}}=t;return new Eo(e,r.map(Et.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 Eo(e,r.map(Et.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 Eo(t.authority,t.currencyPairs.map(Et.fromProto))}toProto(){const{authority:t,currency_pairs:e}=this;return Ka.MsgAddCurrencyPairs.fromPartial({authority:t,currencyPairs:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgAddCurrencyPairs",value:Ka.MsgAddCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Eo.fromProto(Ka.MsgAddCurrencyPairs.decode(t.value))}}class Oo extends u{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 Oo(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 Oo(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 Oo(t.authority,t.currencyPairIds)}toProto(){const{authority:t,currency_pair_ids:e}=this;return Ka.MsgRemoveCurrencyPairs.fromPartial({authority:t,currencyPairIds:e})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgRemoveCurrencyPairs",value:Ka.MsgRemoveCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Oo.fromProto(Ka.MsgRemoveCurrencyPairs.decode(t.value))}}class ei extends u{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 ei(e,new Date(r),parseInt(o))}toAmino(){const{price:t,block_timestamp:e,block_height:r}=this;return{price:t,block_timestamp:e.toISOString(),block_height:r.toFixed()}}static fromData(t){const{price:e,block_timestamp:r,block_height:o}=t;return new ei(e,new Date(r),parseInt(o))}toData(){const{price:t,block_timestamp:e,block_height:r}=this;return{price:t,block_timestamp:e.toISOString(),block_height:r.toFixed()}}static fromProto(t){return new ei(t.price,t.blockTimestamp,Number(t.blockHeight))}toProto(){const{price:t,block_timestamp:e,block_height:r}=this;return ud.QuotePrice.fromPartial({price:t,blockTimestamp:e,blockHeight:BigInt(r)})}}class Ss extends u{constructor(t,e,r,o,n){super(),this.name=t,this.off_chain_ticker=e,this.normalize_by_pair=r,this.invert=o,this.metadata_JSON=n}static fromAmino(t){const{name:e,off_chain_ticker:r,normalize_by_pair:o,invert:n,metadata_JSON:s}=t;return new Ss(e,r,o?Et.fromAmino(o):void 0,n,s)}toAmino(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:n}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:r==null?void 0:r.toAmino(),invert:o,metadata_JSON:n}}static fromData(t){const{name:e,off_chain_ticker:r,normalize_by_pair:o,invert:n,metadata_JSON:s}=t;return new Ss(e,r,o?Et.fromData(o):void 0,n,s)}toData(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:n}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:r==null?void 0:r.toData(),invert:o,metadata_JSON:n}}static fromProto(t){return new Ss(t.name,t.offChainTicker,t.normalizeByPair?Et.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:n}=this;return Oc.ProviderConfig.fromPartial({name:t,offChainTicker:e,normalizeByPair:r==null?void 0:r.toProto(),invert:o,metadataJSON:n})}}class Is extends u{constructor(t,e,r,o,n){super(),this.currency_pair=t,this.decimals=e,this.min_provider_count=r,this.enabled=o,this.metadata_JSON=n}static fromAmino(t){const{currency_pair:e,decimals:r,min_provider_count:o,enabled:n,metadata_JSON:s}=t;return new Is(Et.fromAmino(e),parseInt(r),parseInt(o),n,s)}toAmino(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:n}=this;return{currency_pair:t.toAmino(),decimals:e.toFixed(),min_provider_count:r.toFixed(),enabled:o,metadata_JSON:n}}static fromData(t){const{currency_pair:e,decimals:r,min_provider_count:o,enabled:n,metadata_JSON:s}=t;return new Is(Et.fromData(e),parseInt(r),parseInt(o),n,s)}toData(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:n}=this;return{currency_pair:t.toData(),decimals:e.toFixed(),min_provider_count:r.toFixed(),enabled:o,metadata_JSON:n}}static fromProto(t){return new Is(Et.fromProto(t.currencyPair),Number(t.decimals),Number(t.minProviderCount),t.enabled,t.metadataJSON)}toProto(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:n}=this;return Oc.Ticker.fromPartial({currencyPair:t,decimals:BigInt(e),minProviderCount:BigInt(r),enabled:o,metadataJSON:n})}}class kt extends u{constructor(t,e){super(),this.ticker=t,this.provider_configs=e}static fromAmino(t){const{ticker:e,provider_configs:r}=t;return new kt(Is.fromAmino(e),r.map(Ss.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 kt(Is.fromData(e),r.map(Ss.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 kt(Is.fromProto(t.ticker),t.providerConfigs.map(Ss.fromProto))}toProto(){const{ticker:t,provider_configs:e}=this;return Oc.Market.fromPartial({ticker:t.toProto(),providerConfigs:e.map(r=>r.toProto())})}}class No extends u{constructor(t,e){super(),this.authority=t,this.create_markets=e}static fromAmino(t){const{value:{authority:e,create_markets:r}}=t;return new No(e,r.map(kt.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 No(e,r.map(kt.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 No(t.authority,t.createMarkets.map(kt.fromProto))}toProto(){const{authority:t,create_markets:e}=this;return Ct.MsgCreateMarkets.fromPartial({authority:t,createMarkets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgCreateMarkets",value:Ct.MsgCreateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return No.fromProto(Ct.MsgCreateMarkets.decode(t.value))}}class To extends u{constructor(t,e){super(),this.authority=t,this.update_markets=e}static fromAmino(t){const{value:{authority:e,update_markets:r}}=t;return new To(e,r.map(kt.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 To(e,r.map(kt.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 To(t.authority,t.updateMarkets.map(kt.fromProto))}toProto(){const{authority:t,update_markets:e}=this;return Ct.MsgUpdateMarkets.fromPartial({authority:t,updateMarkets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpdateMarkets",value:Ct.MsgUpdateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return To.fromProto(Ct.MsgUpdateMarkets.decode(t.value))}}class Fo extends u{constructor(t,e){super(),this.authority=t,this.markets=e}static fromAmino(t){const{value:{authority:e,markets:r}}=t;return new Fo(e,r.map(kt.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 Fo(e,r.map(kt.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 Fo(t.authority,t.markets.map(kt.fromProto))}toProto(){const{authority:t,markets:e}=this;return Ct.MsgUpsertMarkets.fromPartial({authority:t,markets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpsertMarkets",value:Ct.MsgUpsertMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return Fo.fromProto(Ct.MsgUpsertMarkets.decode(t.value))}}class Ro extends u{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:"connect/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":"/connect.marketmap.v2.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 Ct.MsgRemoveMarketAuthorities.fromPartial({removeAddresses:t,admin:e})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgRemoveMarketAuthorities",value:Ct.MsgRemoveMarketAuthorities.encode(this.toProto()).finish()})}static unpackAny(t){return Ro.fromProto(Ct.MsgRemoveMarketAuthorities.decode(t.value))}}class Yn extends u{constructor(t,e){super(),this.market_authorities=t,this.admin=e}static fromAmino(t){return new Yn(t.market_authorities,t.admin)}toAmino(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromData(t){return new Yn(t.market_authorities,t.admin)}toData(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromProto(t){return new Yn(t.marketAuthorities,t.admin)}toProto(){const{market_authorities:t,admin:e}=this;return md.Params.fromPartial({marketAuthorities:t,admin:e})}}class qo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new qo(e,Yn.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 qo(e,Yn.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 qo(t.authority,Yn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ct.MsgParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgParams",value:Ct.MsgParams.encode(this.toProto()).finish()})}static unpackAny(t){return qo.fromProto(Ct.MsgParams.decode(t.value))}}class ge extends u{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 ge(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===Wt.UpgradePolicy.UNSPECIFIED?void 0:r}}}static fromData(t){const{sender:e,code_bytes:r,upgrade_policy:o}=t;return new ge(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}}static fromProto(t){return new ge(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 H.MsgPublish.fromPartial({sender:t,codeBytes:e.map(o=>Buffer.from(o,"base64")),upgradePolicy:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgPublish",value:H.MsgPublish.encode(this.toProto()).finish()})}static unpackAny(t){return ge.fromProto(H.MsgPublish.decode(t.value))}}(a=>{a.Policy=Wt.UpgradePolicy})(ge||(ge={}));class $o extends u{constructor(e,r,o,n,s=[],i=[]){super();_(this,"type_args");_(this,"args");this.sender=e,this.module_address=r,this.module_name=o,this.function_name=n,this.type_args=s,this.args=i}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}}=e;return new $o(r,o,n,s,i??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return{type:"move/MsgExecute",value:{sender:e,module_address:r,module_name:o,function_name:n,type_args:s.length===0?void 0:s,args:i.length===0?void 0:i}}}static fromData(e){const{sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=e;return new $o(r,o,n,s,i,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return{"@type":"/initia.move.v1.MsgExecute",sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}}static fromProto(e){return new $o(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:n,type_args:s,args:i}=this;return H.MsgExecute.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:n,typeArgs:s,args:i.map(c=>Buffer.from(c,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecute",value:H.MsgExecute.encode(this.toProto()).finish()})}static unpackAny(e){return $o.fromProto(H.MsgExecute.decode(e.value))}}class Lo extends u{constructor(e,r,o,n,s=[],i=[]){super();_(this,"type_args");_(this,"args");this.sender=e,this.module_address=r,this.module_name=o,this.function_name=n,this.type_args=s,this.args=i}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}}=e;return new Lo(r,o,n,s,i??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return{type:"move/MsgExecuteJSON",value:{sender:e,module_address:r,module_name:o,function_name:n,type_args:s.length===0?void 0:s,args:i.length===0?void 0:i}}}static fromData(e){const{sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=e;return new Lo(r,o,n,s,i,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return{"@type":"/initia.move.v1.MsgExecuteJSON",sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}}static fromProto(e){return new Lo(e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args)}toProto(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return H.MsgExecuteJSON.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:n,typeArgs:s,args:i})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecuteJSON",value:H.MsgExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return Lo.fromProto(H.MsgExecuteJSON.decode(e.value))}}class Ho extends u{constructor(e,r,o=[],n=[]){super();_(this,"type_args");_(this,"args");this.sender=e,this.code_bytes=r,this.type_args=o,this.args=n}static fromAmino(e){const{value:{sender:r,code_bytes:o,type_args:n,args:s}}=e;return new Ho(r,o,n??[],s??[])}toAmino(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return{type:"move/MsgScript",value:{sender:e,code_bytes:r,type_args:o.length===0?void 0:o,args:n.length===0?void 0:n}}}static fromData(e){const{sender:r,code_bytes:o,type_args:n,args:s}=e;return new Ho(r,o,n,s)}toData(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return{"@type":"/initia.move.v1.MsgScript",sender:e,code_bytes:r,type_args:o,args:n}}static fromProto(e){return new Ho(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:n}=this;return H.MsgScript.fromPartial({sender:e,codeBytes:Buffer.from(r,"base64"),typeArgs:o,args:n.map(s=>Buffer.from(s,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScript",value:H.MsgScript.encode(this.toProto()).finish()})}static unpackAny(e){return Ho.fromProto(H.MsgScript.decode(e.value))}}class zo extends u{constructor(e,r,o=[],n=[]){super();_(this,"type_args");_(this,"args");this.sender=e,this.code_bytes=r,this.type_args=o,this.args=n}static fromAmino(e){const{value:{sender:r,code_bytes:o,type_args:n,args:s}}=e;return new zo(r,o,n??[],s??[])}toAmino(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return{type:"move/MsgScriptJSON",value:{sender:e,code_bytes:r,type_args:o.length===0?void 0:o,args:n.length===0?void 0:n}}}static fromData(e){const{sender:r,code_bytes:o,type_args:n,args:s}=e;return new zo(r,o,n,s)}toData(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return{"@type":"/initia.move.v1.MsgScriptJSON",sender:e,code_bytes:r,type_args:o,args:n}}static fromProto(e){return new zo(e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args)}toProto(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return H.MsgScriptJSON.fromPartial({sender:e,codeBytes:Buffer.from(r,"base64"),typeArgs:o,args:n})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScriptJSON",value:H.MsgScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return zo.fromProto(H.MsgScriptJSON.decode(e.value))}}class Xn extends u{constructor(t,e,r,o,n){super(),this.base_denom=t,this.base_min_gas_price=e,this.contract_shared_revenue_ratio=r,this.script_enabled=o,this.allowed_publishers=n}static fromAmino(t){const{value:{base_denom:e,base_min_gas_price:r,contract_shared_revenue_ratio:o,script_enabled:n,allowed_publishers:s}}=t;return new Xn(e,r,o,n,s)}toAmino(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:n}=this;return{type:"move/Params",value:{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:n}}}static fromData(t){const{base_denom:e,base_min_gas_price:r,contract_shared_revenue_ratio:o,script_enabled:n,allowed_publishers:s}=t;return new Xn(e,r,o,n,s)}toData(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:n}=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:n}}static fromProto(t){return new Xn(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:n}=this;return Wt.Params.fromPartial({baseDenom:t,baseMinGasPrice:e,contractSharedRevenueRatio:r,scriptEnabled:o,allowedPublishers:n})}}class Vo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Vo(e,Xn.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 Vo(e,Xn.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 Vo(t.authority,Xn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return H.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgUpdateParams",value:H.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vo.fromProto(H.MsgUpdateParams.decode(t.value))}}class Ko extends u{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 Ko(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 Ko(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 Ko(t.authority,t.metadataLp,t.rewardWeight)}toProto(){const{authority:t,metadata_lp:e,reward_weight:r}=this;return H.MsgWhitelist.fromPartial({authority:t,metadataLp:e,rewardWeight:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgWhitelist",value:H.MsgWhitelist.encode(this.toProto()).finish()})}static unpackAny(t){return Ko.fromProto(H.MsgWhitelist.decode(t.value))}}class Go extends u{constructor(t,e){super(),this.authority=t,this.metadata_lp=e}static fromAmino(t){const{value:{authority:e,metadata_lp:r}}=t;return new Go(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 Go(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 Go(t.authority,t.metadataLp)}toProto(){const{authority:t,metadata_lp:e}=this;return H.MsgDelist.fromPartial({authority:t,metadataLp:e})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgDelist",value:H.MsgDelist.encode(this.toProto()).finish()})}static unpackAny(t){return Go.fromProto(H.MsgDelist.decode(t.value))}}class Wo extends u{constructor(e,r,o,n,s,i=[],c=[]){super();_(this,"type_args");_(this,"args");this.authority=e,this.sender=r,this.module_address=o,this.module_name=n,this.function_name=s,this.type_args=i,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:n,module_name:s,function_name:i,type_args:c,args:d}}=e;return new Wo(r,o,n,s,i,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=this;return{type:"move/MsgGovExecute",value:{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i.length===0?void 0:i,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:n,module_name:s,function_name:i,type_args:c,args:d}=e;return new Wo(r,o,n,s,i,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecute",authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}}static fromProto(e){return new Wo(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:n,function_name:s,type_args:i,args:c}=this;return H.MsgGovExecute.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:n,functionName:s,typeArgs:i,args:c.map(d=>Buffer.from(d,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecute",value:H.MsgGovExecute.encode(this.toProto()).finish()})}static unpackAny(e){return Wo.fromProto(H.MsgGovExecute.decode(e.value))}}class jo extends u{constructor(e,r,o,n,s,i=[],c=[]){super();_(this,"type_args");_(this,"args");this.authority=e,this.sender=r,this.module_address=o,this.module_name=n,this.function_name=s,this.type_args=i,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:n,module_name:s,function_name:i,type_args:c,args:d}}=e;return new jo(r,o,n,s,i,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=this;return{type:"move/MsgGovExecuteJSON",value:{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i.length===0?void 0:i,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:n,module_name:s,function_name:i,type_args:c,args:d}=e;return new jo(r,o,n,s,i,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecuteJSON",authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}}static fromProto(e){return new jo(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:n,function_name:s,type_args:i,args:c}=this;return H.MsgGovExecuteJSON.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:n,functionName:s,typeArgs:i,args:c})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecuteJSON",value:H.MsgGovExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return jo.fromProto(H.MsgGovExecuteJSON.decode(e.value))}}class ye extends u{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:n}}=t;return new ye(e,r,o,n||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===Wt.UpgradePolicy.UNSPECIFIED?void 0:o}}}static fromData(t){const{authority:e,sender:r,code_bytes:o,upgrade_policy:n}=t;return new ye(e,r,o,n)}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 ye(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 H.MsgGovPublish.fromPartial({authority:t,sender:e,codeBytes:r.map(n=>Buffer.from(n,"base64")),upgradePolicy:o})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovPublish",value:H.MsgGovPublish.encode(this.toProto()).finish()})}static unpackAny(t){return ye.fromProto(H.MsgGovPublish.decode(t.value))}}(a=>{a.Policy=Wt.UpgradePolicy})(ye||(ye={}));class Jo extends u{constructor(e,r,o,n=[],s=[]){super();_(this,"type_args");_(this,"args");this.authority=e,this.sender=r,this.code_bytes=o,this.type_args=n,this.args=s}static fromAmino(e){const{value:{authority:r,sender:o,code_bytes:n,type_args:s,args:i}}=e;return new Jo(r,o,n,s??[],i??[])}toAmino(){const{authority:e,sender:r,code_bytes:o,type_args:n,args:s}=this;return{type:"move/MsgGovScript",value:{authority:e,sender:r,code_bytes:o,type_args:n.length===0?void 0:n,args:s.length===0?void 0:s}}}static fromData(e){const{authority:r,sender:o,code_bytes:n,type_args:s,args:i}=e;return new Jo(r,o,n,s,i)}toData(){const{authority:e,sender:r,code_bytes:o,type_args:n,args:s}=this;return{"@type":"/initia.move.v1.MsgGovScript",authority:e,sender:r,code_bytes:o,type_args:n,args:s}}static fromProto(e){return new Jo(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:n,args:s}=this;return H.MsgGovScript.fromPartial({authority:e,sender:r,codeBytes:Buffer.from(o,"base64"),typeArgs:n,args:s.map(i=>Buffer.from(i,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScript",value:H.MsgGovScript.encode(this.toProto()).finish()})}static unpackAny(e){return Jo.fromProto(H.MsgGovScript.decode(e.value))}}class Zo extends u{constructor(e,r,o,n=[],s=[]){super();_(this,"type_args");_(this,"args");this.authority=e,this.sender=r,this.code_bytes=o,this.type_args=n,this.args=s}static fromAmino(e){const{value:{authority:r,sender:o,code_bytes:n,type_args:s,args:i}}=e;return new Zo(r,o,n,s??[],i??[])}toAmino(){const{authority:e,sender:r,code_bytes:o,type_args:n,args:s}=this;return{type:"move/MsgGovScriptJSON",value:{authority:e,sender:r,code_bytes:o,type_args:n.length===0?void 0:n,args:s.length===0?void 0:s}}}static fromData(e){const{authority:r,sender:o,code_bytes:n,type_args:s,args:i}=e;return new Zo(r,o,n,s,i)}toData(){const{authority:e,sender:r,code_bytes:o,type_args:n,args:s}=this;return{"@type":"/initia.move.v1.MsgGovScriptJSON",authority:e,sender:r,code_bytes:o,type_args:n,args:s}}static fromProto(e){return new Zo(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:n,args:s}=this;return H.MsgGovScriptJSON.fromPartial({authority:e,sender:r,codeBytes:Buffer.from(o,"base64"),typeArgs:n,args:s})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScriptJSON",value:H.MsgGovScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return Zo.fromProto(H.MsgGovScriptJSON.decode(e.value))}}class Qn extends u{constructor(t,e,r,o,n){super(),this.address=t,this.module_name=e,this.abi=r,this.raw_bytes=o,this.upgrade_policy=n}static fromAmino(t){const{address:e,module_name:r,abi:o,raw_bytes:n,upgrade_policy:s}=t;return new Qn(e,r,o,n,Wt.upgradePolicyFromJSON(s))}toAmino(){const{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:n}=this;return{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:Wt.upgradePolicyToJSON(n)}}static fromData(t){const{address:e,module_name:r,abi:o,raw_bytes:n,upgrade_policy:s}=t;return new Qn(e,r,o,n,Wt.upgradePolicyFromJSON(s))}toData(){const{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:n}=this;return{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:Wt.upgradePolicyToJSON(n)}}static fromProto(t){return new Qn(t.address,t.moduleName,t.abi,Buffer.from(t.rawBytes).toString("base64"),t.upgradePolicy)}toProto(){const{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:n}=this;return Wt.Module.fromPartial({address:t,moduleName:e,abi:r,rawBytes:Buffer.from(o,"base64"),upgradePolicy:n})}}(a=>{a.Policy=Wt.UpgradePolicy})(Qn||(Qn={}));class Yo extends u{constructor(e,r,o){super();_(this,"amount");this.delegator_address=e,this.validator_address=r,this.amount=new l(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:n}}=e;return new Yo(r,o,l.fromAmino(n))}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 fromData(e){const{delegator_address:r,validator_address:o,amount:n}=e;return new Yo(r,o,l.fromData(n))}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()}}static fromProto(e){return new Yo(e.delegatorAddress,e.validatorAddress,l.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:r,amount:o}=this;return gt.MsgDelegate.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgDelegate",value:gt.MsgDelegate.encode(this.toProto()).finish()})}static unpackAny(e){return Yo.fromProto(gt.MsgDelegate.decode(e.value))}}class Xo extends u{constructor(e,r,o){super();_(this,"amount");this.delegator_address=e,this.validator_address=r,this.amount=new l(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:n}}=e;return new Xo(r,o,l.fromAmino(n))}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 fromData(e){const{delegator_address:r,validator_address:o,amount:n}=e;return new Xo(r,o,l.fromData(n))}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()}}static fromProto(e){return new Xo(e.delegatorAddress,e.validatorAddress,l.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:r,amount:o}=this;return gt.MsgUndelegate.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUndelegate",value:gt.MsgUndelegate.encode(this.toProto()).finish()})}static unpackAny(e){return Xo.fromProto(gt.MsgUndelegate.decode(e.value))}}class Qo extends u{constructor(e,r,o,n){super();_(this,"amount");this.delegator_address=e,this.validator_src_address=r,this.validator_dst_address=o,this.amount=new l(n)}static fromAmino(e){const{value:{delegator_address:r,validator_src_address:o,validator_dst_address:n,amount:s}}=e;return new Qo(r,o,n,l.fromAmino(s))}toAmino(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n}=this;return{type:"mstaking/MsgBeginRedelegate",value:{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n.toAmino()}}}static fromData(e){const{delegator_address:r,validator_src_address:o,validator_dst_address:n,amount:s}=e;return new Qo(r,o,n,l.fromData(s))}toData(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n}=this;return{"@type":"/initia.mstaking.v1.MsgBeginRedelegate",delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n.toData()}}static fromProto(e){return new Qo(e.delegatorAddress,e.validatorSrcAddress,e.validatorDstAddress,l.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n}=this;return gt.MsgBeginRedelegate.fromPartial({amount:n.toProto(),delegatorAddress:e,validatorDstAddress:o,validatorSrcAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgBeginRedelegate",value:gt.MsgBeginRedelegate.encode(this.toProto()).finish()})}static unpackAny(e){return Qo.fromProto(gt.MsgBeginRedelegate.decode(e.value))}}class dt extends u{constructor(e,r,o,n,s,i,c,d,g,v,b,k){super();_(this,"tokens");_(this,"delegator_shares");_(this,"voting_powers");this.operator_address=e,this.consensus_pubkey=r,this.jailed=o,this.status=n,this.description=c,this.unbonding_height=d,this.unbonding_time=g,this.commission=v,this.voting_power=k,this.tokens=new l(s),this.delegator_shares=new l(i),this.voting_powers=new l(b)}static fromAmino(e){return new dt(e.operator_address,_t.fromAmino(e.consensus_pubkey),e.jailed||!1,e.status||0,l.fromAmino(e.tokens),l.fromAmino(e.delegator_shares),dt.Description.fromAmino(e.description),parseInt(e.unbonding_height),new Date(e.unbonding_time),dt.Commission.fromAmino(e.commission),l.fromAmino(e.voting_powers),e.voting_power)}toAmino(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toAmino(),jailed:this.jailed,status:this.status,tokens:this.tokens.toAmino(),delegator_shares:this.delegator_shares.toAmino(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toAmino(),voting_powers:this.voting_powers.toAmino(),voting_power:this.voting_power}}static fromData(e){return new dt(e.operator_address,_t.fromData(e.consensus_pubkey),e.jailed||!1,e.status||0,l.fromData(e.tokens),l.fromData(e.delegator_shares),dt.Description.fromData(e.description),parseInt(e.unbonding_height),new Date(e.unbonding_time),dt.Commission.fromData(e.commission),l.fromData(e.voting_powers),e.voting_power)}toData(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toData(),jailed:this.jailed,status:this.status,tokens:this.tokens.toData(),delegator_shares:this.delegator_shares.toData(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toData(),voting_powers:this.voting_powers.toData(),voting_power:this.voting_power}}static fromProto(e){return new dt(e.operatorAddress,_t.unpackAny(e.consensusPubkey),e.jailed,e.status,l.fromProto(e.tokens),l.fromProto(e.delegatorShares),dt.Description.fromProto(e.description),Number(e.unbondingHeight),e.unbondingTime,dt.Commission.fromProto(e.commission),l.fromProto(e.votingPowers),e.votingPower)}toProto(){const{operator_address:e,consensus_pubkey:r,jailed:o,status:n,tokens:s,delegator_shares:i,description:c,unbonding_height:d,unbonding_time:g,commission:v,voting_powers:b,voting_power:k}=this;return Nt.Validator.fromPartial({operatorAddress:e,consensusPubkey:r.packAny(),jailed:o,status:n,tokens:s.toProto(),delegatorShares:i.toProto(),description:c.toProto(),unbondingHeight:BigInt(d),unbondingTime:g,commission:v.toProto(),votingPowers:b.toProto(),votingPower:k})}}(a=>{a.Status=Nt.BondStatus;class t extends u{constructor(n,s,i,c,d){super(),this.moniker=n,this.identity=s,this.website=i,this.details=c,this.security_contact=d}static fromAmino(n){return new t(n.moniker,n.identity??"",n.website??"",n.details??"",n.security_contact??"")}toAmino(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}}static fromData(n){return new t(n.moniker,n.identity??"",n.website??"",n.details??"",n.security_contact??"")}toData(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}}static fromProto(n){return new t(n.moniker,n.identity,n.website,n.details,n.securityContact)}toProto(){const{moniker:n,identity:s,website:i,details:c,security_contact:d}=this;return Nt.Description.fromPartial({details:c,identity:s,moniker:n,securityContact:d,website:i})}}a.Description=t;class e extends u{constructor(n,s,i){super(),this.rate=n,this.max_rate=s,this.max_change_rate=i}static fromAmino(n){const{rate:s,max_rate:i,max_change_rate:c}=n;return new e(s,i,c)}toAmino(){const{rate:n,max_rate:s,max_change_rate:i}=this;return{rate:n,max_rate:s,max_change_rate:i}}static fromData(n){const{rate:s,max_rate:i,max_change_rate:c}=n;return new e(s,i,c)}toData(){const{rate:n,max_rate:s,max_change_rate:i}=this;return{rate:n,max_rate:s,max_change_rate:i}}static fromProto(n){return new e(n.rate,n.maxRate,n.maxChangeRate)}toProto(){const{rate:n,max_rate:s,max_change_rate:i}=this;return Nt.CommissionRates.fromPartial({maxChangeRate:i,maxRate:s,rate:n})}}a.CommissionRates=e;class r extends u{constructor(n,s){super(),this.commission_rates=n,this.update_time=s}static fromAmino(n){return new r(e.fromAmino(n.commission_rates),new Date(n.update_time))}toAmino(){return{commission_rates:this.commission_rates.toAmino(),update_time:this.update_time.toISOString()}}static fromData(n){return new r(e.fromData(n.commission_rates),new Date(n.update_time))}toData(){return{commission_rates:this.commission_rates.toData(),update_time:this.update_time.toISOString()}}static fromProto(n){return new r(e.fromProto(n.commissionRates),n.updateTime)}toProto(){const{commission_rates:n,update_time:s}=this;return Nt.Commission.fromPartial({commissionRates:n.toProto(),updateTime:s})}}a.Commission=r})(dt||(dt={}));class tn extends u{constructor(e,r,o,n,s){super();_(this,"amount");this.description=e,this.commission=r,this.validator_address=o,this.pubkey=n,this.amount=new l(s)}static fromAmino(e){const{value:{description:r,commission:o,validator_address:n,pubkey:s,amount:i}}=e;return new tn(r,dt.CommissionRates.fromAmino(o),n,_t.fromAmino(s),l.fromAmino(i))}toAmino(){const{description:e,commission:r,validator_address:o,pubkey:n,amount:s}=this;return{type:"mstaking/MsgCreateValidator",value:{description:e,commission:r.toAmino(),validator_address:o,pubkey:n.toAmino(),amount:s.toAmino()}}}static fromData(e){const{description:r,commission:o,validator_address:n,pubkey:s,amount:i}=e;return new tn(r,dt.CommissionRates.fromData(o),n,_t.fromData(s),l.fromData(i))}toData(){const{description:e,commission:r,validator_address:o,pubkey:n,amount:s}=this;return{"@type":"/initia.mstaking.v1.MsgCreateValidator",description:e,commission:r.toData(),validator_address:o,pubkey:n.toData(),amount:s.toData()}}static fromProto(e){return new tn(dt.Description.fromProto(e.description),dt.CommissionRates.fromProto(e.commission),e.validatorAddress,exports.PublicKey.fromProto(e.pubkey),l.fromProto(e.amount))}toProto(){const{description:e,commission:r,validator_address:o,pubkey:n,amount:s}=this;return gt.MsgCreateValidator.fromPartial({commission:r.toProto(),description:e.toProto(),pubkey:n.packAny(),validatorAddress:o,amount:s.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCreateValidator",value:gt.MsgCreateValidator.encode(this.toProto()).finish()})}static unpackAny(e){return tn.fromProto(gt.MsgCreateValidator.decode(e.value))}}class _e extends u{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 _e(dt.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 fromData(t){const{description:e,validator_address:r,commission_rate:o}=t;return new _e(dt.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}}static fromProto(t){return new _e(dt.Description.fromProto(t.description),t.validatorAddress,t.commissionRate!==""?t.commissionRate:void 0)}toProto(){const{description:t,validator_address:e,commission_rate:r}=this;return gt.MsgEditValidator.fromPartial({description:t.toProto(),commissionRate:r,validatorAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgEditValidator",value:gt.MsgEditValidator.encode(this.toProto()).finish()})}static unpackAny(t){return _e.fromProto(gt.MsgEditValidator.decode(t.value))}}(a=>{a.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]"}})(_e||(_e={}));class en extends u{constructor(e,r,o,n){super();_(this,"amount");this.delegator_address=e,this.validator_address=r,this.creation_height=n,this.amount=new l(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:n,creation_height:s}}=e;return new en(r,o,l.fromAmino(n),parseInt(s))}toAmino(){const{delegator_address:e,validator_address:r,amount:o,creation_height:n}=this;return{type:"mstaking/MsgCancelUnbondingDelegation",value:{delegator_address:e,validator_address:r,amount:o.toAmino(),creation_height:n.toFixed()}}}static fromData(e){const{delegator_address:r,validator_address:o,amount:n,creation_height:s}=e;return new en(r,o,l.fromData(n),parseInt(s))}toData(){const{delegator_address:e,validator_address:r,amount:o,creation_height:n}=this;return{"@type":"/initia.mstaking.v1.MsgCancelUnbondingDelegation",delegator_address:e,validator_address:r,amount:o.toData(),creation_height:n.toFixed()}}static fromProto(e){return new en(e.delegatorAddress,e.validatorAddress,l.fromProto(e.amount),Number(e.creationHeight))}toProto(){const{delegator_address:e,validator_address:r,amount:o,creation_height:n}=this;return gt.MsgCancelUnbondingDelegation.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r,creationHeight:BigInt(n)})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCancelUnbondingDelegation",value:gt.MsgCancelUnbondingDelegation.encode(this.toProto()).finish()})}static unpackAny(e){return en.fromProto(gt.MsgCancelUnbondingDelegation.decode(e.value))}}class ts extends u{constructor(t,e,r,o,n,s,i){super(),this.unbonding_time=t,this.max_validators=e,this.max_entries=r,this.historical_entries=o,this.bond_denoms=n,this.min_voting_power=s,this.min_commission_rate=i}static fromAmino(t){const{value:{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:n,bond_denoms:s,min_voting_power:i,min_commission_rate:c}}=t;return new ts(q.fromAmino(e),r,o,n,s,parseInt(i),c)}toAmino(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s,min_commission_rate:i}=this;return{type:"mstaking/Params",value:{unbonding_time:t.toAmino(),max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s.toFixed(),min_commission_rate:i}}}static fromData(t){const{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:n,bond_denoms:s,min_voting_power:i,min_commission_rate:c}=t;return new ts(q.fromData(e),r,o,n,s,parseInt(i),c)}toData(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s,min_commission_rate:i}=this;return{"@type":"/initia.mstaking.v1.Params",unbonding_time:t.toData(),max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s.toFixed(),min_commission_rate:i}}static fromProto(t){return new ts(q.fromProto(t.unbondingTime),t.maxValidators,t.maxEntries,t.historicalEntries,t.bondDenoms,Number(t.minVotingPower),t.minCommissionRate)}toProto(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s,min_commission_rate:i}=this;return Nt.Params.fromPartial({unbondingTime:t.toProto(),maxValidators:e,maxEntries:r,historicalEntries:o,bondDenoms:n,minVotingPower:BigInt(s),minCommissionRate:i})}}class rn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new rn(e,ts.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 rn(e,ts.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 rn(t.authority,ts.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return gt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUpdateParams",value:gt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return rn.fromProto(gt.MsgUpdateParams.decode(t.value))}}class Bs extends u{constructor(e,r,o,n){super();_(this,"shares");_(this,"balance");this.delegator_address=e,this.validator_address=r,this.shares=new l(o),this.balance=new l(n)}static fromAmino(e){const{delegation:{delegator_address:r,validator_address:o,shares:n},balance:s}=e;return new Bs(r,o,l.fromAmino(n),l.fromAmino(s))}toAmino(){const{delegator_address:e,validator_address:r,shares:o,balance:n}=this;return{delegation:{delegator_address:e,validator_address:r,shares:o.toAmino()},balance:n.toAmino()}}static fromData(e){const{delegation:{delegator_address:r,validator_address:o,shares:n},balance:s}=e;return new Bs(r,o,l.fromData(n),l.fromData(s))}toData(){const{delegator_address:e,validator_address:r,shares:o,balance:n}=this;return{delegation:{delegator_address:e,validator_address:r,shares:o.toData()},balance:n.toData()}}static fromProto(e){const r=e.delegation;return new Bs(r.delegatorAddress,r.validatorAddress,l.fromProto(r.shares),l.fromProto(e.balance))}toProto(){const{delegator_address:e,validator_address:r,shares:o,balance:n}=this;return Nt.DelegationResponse.fromPartial({delegation:Nt.Delegation.fromPartial({delegatorAddress:e,validatorAddress:r,shares:o.toProto()}),balance:n.toProto()})}}class ce extends u{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:n}=t;return new ce(e,r,o,n.map(s=>ce.Entry.fromAmino(s)))}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(n=>n.toAmino())}}static fromData(t){const{redelegation:{delegator_address:e,validator_src_address:r,validator_dst_address:o},entries:n}=t;return new ce(e,r,o,n.map(s=>ce.Entry.fromData(s)))}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(n=>n.toData())}}static fromProto(t){const e=t.redelegation;return new ce(e.delegatorAddress,e.validatorDstAddress,e.validatorDstAddress,t.entries.map(r=>ce.Entry.fromProto(r)))}toProto(){const{delegator_address:t,validator_src_address:e,validator_dst_address:r,entries:o}=this;return Nt.RedelegationResponse.fromPartial({entries:o.map(n=>n.toProto()),redelegation:Nt.Redelegation.fromPartial({delegatorAddress:t,entries:o.map(n=>n.toProto().redelegationEntry),validatorDstAddress:r,validatorSrcAddress:e})})}}(a=>{class t extends u{constructor(o,n,s,i,c){super();_(this,"initial_balance");_(this,"shares_dst");_(this,"balance");this.creation_height=i,this.completion_time=c,this.initial_balance=new l(o),this.balance=new l(n),this.shares_dst=new l(s)}static fromAmino(o){const{redelegation_entry:{initial_balance:n,shares_dst:s,creation_height:i,completion_time:c},balance:d}=o;return new t(l.fromAmino(n),l.fromAmino(d),l.fromAmino(s),i,new Date(c))}toAmino(){return{redelegation_entry:{initial_balance:this.initial_balance.toAmino(),shares_dst:this.shares_dst.toAmino(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toAmino()}}static fromData(o){const{redelegation_entry:{initial_balance:n,shares_dst:s,creation_height:i,completion_time:c},balance:d}=o;return new t(l.fromData(n),l.fromData(d),l.fromData(s),i,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 fromProto(o){const n=o.redelegationEntry;return new t(l.fromProto(n.initialBalance),l.fromProto(o.balance),l.fromProto(n.sharesDst),Number(n.creationHeight),n.completionTime)}toProto(){const{initial_balance:o,balance:n,shares_dst:s,creation_height:i,completion_time:c}=this;return Nt.RedelegationEntryResponse.fromPartial({balance:n.toProto(),redelegationEntry:Nt.RedelegationEntry.fromPartial({completionTime:c,creationHeight:BigInt(i),initialBalance:o.toProto(),sharesDst:s.toProto()})})}}a.Entry=t})(ce||(ce={}));class Ht extends u{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 Ht(e,r,o.map(n=>Ht.Entry.fromAmino(n)))}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 Ht(e,r,o.map(n=>Ht.Entry.fromData(n)))}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 Nt.UnbondingDelegation.fromPartial({delegatorAddress:t,entries:r.map(o=>o.toProto()),validatorAddress:e})}static fromProto(t){return new Ht(t.delegatorAddress,t.validatorAddress,t.entries.map(e=>Ht.Entry.fromProto(e)))}}(a=>{class t extends u{constructor(o,n,s,i){super();_(this,"initial_balance");_(this,"balance");this.creation_height=s,this.completion_time=i,this.initial_balance=new l(o),this.balance=new l(n)}static fromAmino(o){const{initial_balance:n,balance:s,creation_height:i,completion_time:c}=o;return new t(l.fromAmino(n),l.fromAmino(s),parseInt(i),new Date(c))}toAmino(){return{initial_balance:this.initial_balance.toAmino(),balance:this.balance.toAmino(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}}static fromData(o){const{initial_balance:n,balance:s,creation_height:i,completion_time:c}=o;return new t(l.fromData(n),l.fromData(s),parseInt(i),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 fromProto(o){return new t(l.fromProto(o.initialBalance),l.fromProto(o.balance),Number(o.creationHeight),o.completionTime)}toProto(){const{initial_balance:o,balance:n,creation_height:s,completion_time:i}=this;return Nt.UnbondingDelegationEntry.fromPartial({balance:n.toProto(),completionTime:i,creationHeight:BigInt(s),initialBalance:o.toProto()})}}a.Entry=t})(Ht||(Ht={}));class on extends u{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:n}}=t;return new on(e,r,o,_t.fromAmino(n))}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:n}=t;return new on(e,r,o,_t.fromData(n))}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 on(t.authority,t.moniker,t.validatorAddress,_t.unpackAny(t.pubkey))}toProto(){const{authority:t,moniker:e,validator_address:r,pubkey:o}=this;return st.MsgAddValidator.fromPartial({authority:t,moniker:e,validatorAddress:r,pubkey:o.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgAddValidator",value:st.MsgAddValidator.encode(this.toProto()).finish()})}static unpackAny(t){return on.fromProto(st.MsgAddValidator.decode(t.value))}}class nn extends u{constructor(t,e){super(),this.authority=t,this.validator_address=e}static fromAmino(t){const{value:{authority:e,validator_address:r}}=t;return new nn(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 nn(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 nn(t.authority,t.validatorAddress)}toProto(){const{authority:t,validator_address:e}=this;return st.MsgRemoveValidator.fromPartial({authority:t,validatorAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgRemoveValidator",value:st.MsgRemoveValidator.encode(this.toProto()).finish()})}static unpackAny(t){return nn.fromProto(st.MsgRemoveValidator.decode(t.value))}}class sn extends u{constructor(t,e,r,o,n,s,i,c){super(),this.sender=t,this.from=e,this.to=r,this.amount=o,this.sequence=n,this.height=s,this.base_denom=i,this.data=c}static fromAmino(t){const{value:{sender:e,from:r,to:o,amount:n,sequence:s,height:i,base_denom:c,data:d}}=t;return new sn(e,r,o,S.fromAmino(n),parseInt(s),parseInt(i),c,d)}toAmino(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:i,data:c}=this;return{type:"opchild/MsgFinalizeTokenDeposit",value:{sender:t,from:e,to:r,amount:o.toAmino(),sequence:n.toFixed(),height:s.toFixed(),base_denom:i,data:c}}}static fromData(t){const{sender:e,from:r,to:o,amount:n,sequence:s,height:i,base_denom:c,data:d}=t;return new sn(e,r,o,S.fromData(n),parseInt(s),parseInt(i),c,d)}toData(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:i,data:c}=this;return{"@type":"/opinit.opchild.v1.MsgFinalizeTokenDeposit",sender:t,from:e,to:r,amount:o.toData(),sequence:n.toFixed(),height:s.toFixed(),base_denom:i,data:c}}static fromProto(t){return new sn(t.sender,t.from,t.to,S.fromProto(t.amount),Number(t.sequence),Number(t.height),t.baseDenom,t.data.length?Buffer.from(t.data).toString("base64"):void 0)}toProto(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:i,data:c}=this;return st.MsgFinalizeTokenDeposit.fromPartial({sender:t,from:e,to:r,amount:o.toProto(),sequence:BigInt(n),height:BigInt(s),baseDenom:i,data:c?Buffer.from(c,"base64"):void 0})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgFinalizeTokenDeposit",value:st.MsgFinalizeTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return sn.fromProto(st.MsgFinalizeTokenDeposit.decode(t.value))}}class an extends u{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 an(e,r,S.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 an(e,r,S.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 an(t.sender,t.to,S.fromProto(t.amount))}toProto(){const{sender:t,to:e,amount:r}=this;return st.MsgInitiateTokenWithdrawal.fromPartial({sender:t,to:e,amount:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgInitiateTokenWithdrawal",value:st.MsgInitiateTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return an.fromProto(st.MsgInitiateTokenWithdrawal.decode(t.value))}}class cn extends u{constructor(t,e){super(),this.sender=t,this.messages=e}static fromAmino(t){const{value:{sender:e,messages:r}}=t;return new cn(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 cn(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 cn(t.sender,t.messages.map(exports.Msg.fromProto))}toProto(){const{sender:t,messages:e}=this;return st.MsgExecuteMessages.fromPartial({sender:t,messages:e.map(r=>r.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgExecuteMessages",value:st.MsgExecuteMessages.encode(this.toProto()).finish()})}static unpackAny(t){return cn.fromProto(st.MsgExecuteMessages.decode(t.value))}}class un extends u{constructor(e,r,o){super();_(this,"amount");this.authority=e,this.recipient=r,this.amount=new l(o)}static fromAmino(e){const{value:{authority:r,recipient:o,amount:n}}=e;return new un(r,o,l.fromAmino(n))}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:n}=e;return new un(r,o,l.fromData(n))}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 un(e.authority,e.recipient,l.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return st.MsgSpendFeePool.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSpendFeePool",value:st.MsgSpendFeePool.encode(this.toProto()).finish()})}static unpackAny(e){return un.fromProto(st.MsgSpendFeePool.decode(e.value))}}class mn extends u{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 mn(e,parseInt(r),o)}toAmino(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return{type:"ophost/MsgRecordBatch",value:{submitter:t,bridge_id:e.toFixed(),batch_bytes:r}}}static fromData(t){const{submitter:e,bridge_id:r,batch_bytes:o}=t;return new mn(e,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.toFixed(),batch_bytes:r}}static fromProto(t){return new mn(t.submitter,Number(t.bridgeId),Buffer.from(t.batchBytes).toString("base64"))}toProto(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return z.MsgRecordBatch.fromPartial({submitter:t,bridgeId:BigInt(e),batchBytes:r?Buffer.from(r,"base64"):void 0})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgRecordBatch",value:z.MsgRecordBatch.encode(this.toProto()).finish()})}static unpackAny(t){return mn.fromProto(z.MsgRecordBatch.decode(t.value))}}class $t extends u{constructor(t,e){super(),this.submitter=t,this.chain_type=e}static fromAmino(t){const{submitter:e,chain_type:r}=t;return new $t(e,He.batchInfo_ChainTypeFromJSON(r))}toAmino(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:He.batchInfo_ChainTypeToJSON(e)}}static fromData(t){const{submitter:e,chain_type:r}=t;return new $t(e,He.batchInfo_ChainTypeFromJSON(r))}toData(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:He.batchInfo_ChainTypeToJSON(e)}}static fromProto(t){return new $t(t.submitter,t.chainType)}toProto(){const{submitter:t,chain_type:e}=this;return He.BatchInfo.fromPartial({submitter:t,chainType:e})}}class Me extends u{constructor(t,e,r,o,n,s,i,c){super(),this.challenger=t,this.proposer=e,this.batch_info=r,this.submission_interval=o,this.finalization_period=n,this.submission_start_height=s,this.oracle_enabled=i,this.metadata=c}static fromAmino(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:n,finalization_period:s,submission_start_height:i,oracle_enabled:c,metadata:d}=t;return new Me(e,r,$t.fromAmino(o),q.fromAmino(n),q.fromAmino(s),parseInt(i),c,d)}toAmino(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:i,metadata:c}=this;return{challenger:t,proposer:e,batch_info:r.toAmino(),submission_interval:o.toAmino(),finalization_period:n.toAmino(),submission_start_height:s.toFixed(),oracle_enabled:i,metadata:c}}static fromData(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:n,finalization_period:s,submission_start_height:i,oracle_enabled:c,metadata:d}=t;return new Me(e,r,$t.fromData(o),q.fromData(n),q.fromData(s),parseInt(i),c,d)}toData(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:i,metadata:c}=this;return{challenger:t,proposer:e,batch_info:r.toData(),submission_interval:o.toData(),finalization_period:n.toData(),submission_start_height:s.toFixed(),oracle_enabled:i,metadata:c}}static fromProto(t){return new Me(t.challenger,t.proposer,$t.fromProto(t.batchInfo),q.fromProto(t.submissionInterval),q.fromProto(t.finalizationPeriod),Number(t.submissionStartHeight),t.oracleEnabled,Buffer.from(t.metadata).toString("base64"))}toProto(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:i,metadata:c}=this;return He.BridgeConfig.fromPartial({challenger:t,proposer:e,batchInfo:r.toProto(),submissionInterval:o.toProto(),finalizationPeriod:n.toProto(),submissionStartHeight:BigInt(s),oracleEnabled:i,metadata:c?Buffer.from(c,"base64"):void 0})}}class dn extends u{constructor(t,e){super(),this.creator=t,this.config=e}static fromAmino(t){const{value:{creator:e,config:r}}=t;return new dn(e,Me.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 dn(e,Me.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 dn(t.creator,Me.fromProto(t.config))}toProto(){const{creator:t,config:e}=this;return z.MsgCreateBridge.fromPartial({creator:t,config:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgCreateBridge",value:z.MsgCreateBridge.encode(this.toProto()).finish()})}static unpackAny(t){return dn.fromProto(z.MsgCreateBridge.decode(t.value))}}class ln extends u{constructor(t,e,r,o,n){super(),this.proposer=t,this.bridge_id=e,this.output_index=r,this.l2_block_number=o,this.output_root=n}static fromAmino(t){const{value:{proposer:e,bridge_id:r,output_index:o,l2_block_number:n,output_root:s}}=t;return new ln(e,parseInt(r),parseInt(o),parseInt(n),s)}toAmino(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:n}=this;return{type:"ophost/MsgProposeOutput",value:{proposer:t,bridge_id:e.toFixed(),output_index:r.toFixed(),l2_block_number:o.toFixed(),output_root:n}}}static fromData(t){const{proposer:e,bridge_id:r,output_index:o,l2_block_number:n,output_root:s}=t;return new ln(e,parseInt(r),parseInt(o),parseInt(n),s)}toData(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:n}=this;return{"@type":"/opinit.ophost.v1.MsgProposeOutput",proposer:t,bridge_id:e.toFixed(),output_index:r.toFixed(),l2_block_number:o.toFixed(),output_root:n}}static fromProto(t){return new ln(t.proposer,Number(t.bridgeId),Number(t.outputIndex),Number(t.l2BlockNumber),Buffer.from(t.outputRoot).toString("base64"))}toProto(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:n}=this;return z.MsgProposeOutput.fromPartial({proposer:t,bridgeId:BigInt(e),outputIndex:BigInt(r),l2BlockNumber:BigInt(o),outputRoot:n?Buffer.from(n,"base64"):void 0})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgProposeOutput",value:z.MsgProposeOutput.encode(this.toProto()).finish()})}static unpackAny(t){return ln.fromProto(z.MsgProposeOutput.decode(t.value))}}class pn extends u{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 pn(e,parseInt(r),parseInt(o))}toAmino(){const{challenger:t,bridge_id:e,output_index:r}=this;return{type:"ophost/MsgDeleteOutput",value:{challenger:t,bridge_id:e.toFixed(),output_index:r.toFixed()}}}static fromData(t){const{challenger:e,bridge_id:r,output_index:o}=t;return new pn(e,parseInt(r),parseInt(o))}toData(){const{challenger:t,bridge_id:e,output_index:r}=this;return{"@type":"/opinit.ophost.v1.MsgDeleteOutput",challenger:t,bridge_id:e.toFixed(),output_index:r.toFixed()}}static fromProto(t){return new pn(t.challenger,Number(t.bridgeId),Number(t.outputIndex))}toProto(){const{challenger:t,bridge_id:e,output_index:r}=this;return z.MsgDeleteOutput.fromPartial({challenger:t,bridgeId:BigInt(e),outputIndex:BigInt(r)})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgDeleteOutput",value:z.MsgDeleteOutput.encode(this.toProto()).finish()})}static unpackAny(t){return pn.fromProto(z.MsgDeleteOutput.decode(t.value))}}class hn extends u{constructor(t,e,r,o,n){super(),this.sender=t,this.bridge_id=e,this.to=r,this.amount=o,this.data=n}static fromAmino(t){const{value:{sender:e,bridge_id:r,to:o,amount:n,data:s}}=t;return new hn(e,parseInt(r),o,S.fromAmino(n),s)}toAmino(){const{sender:t,bridge_id:e,to:r,amount:o,data:n}=this;return{type:"ophost/MsgInitiateTokenDeposit",value:{sender:t,bridge_id:e.toFixed(),to:r,amount:o.toAmino(),data:n}}}static fromData(t){const{sender:e,bridge_id:r,to:o,amount:n,data:s}=t;return new hn(e,parseInt(r),o,S.fromData(n),s)}toData(){const{sender:t,bridge_id:e,to:r,amount:o,data:n}=this;return{"@type":"/opinit.ophost.v1.MsgInitiateTokenDeposit",sender:t,bridge_id:e.toFixed(),to:r,amount:o.toData(),data:n}}static fromProto(t){return new hn(t.sender,Number(t.bridgeId),t.to,S.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:n}=this;return z.MsgInitiateTokenDeposit.fromPartial({sender:t,bridgeId:BigInt(e),to:r,amount:o.toProto(),data:n?Buffer.from(n,"base64"):void 0})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgInitiateTokenDeposit",value:z.MsgInitiateTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return hn.fromProto(z.MsgInitiateTokenDeposit.decode(t.value))}}class fn extends u{constructor(t,e,r,o,n,s,i,c,d,g,v){super(),this.sender=t,this.bridge_id=e,this.output_index=r,this.withdrawal_proofs=o,this.from=n,this.to=s,this.sequence=i,this.amount=c,this.version=d,this.storage_root=g,this.last_block_hash=v}static fromAmino(t){const{value:{sender:e,bridge_id:r,output_index:o,withdrawal_proofs:n,from:s,to:i,sequence:c,amount:d,version:g,storage_root:v,last_block_hash:b}}=t;return new fn(e,parseInt(r),parseInt(o),n,s,i,parseInt(c),S.fromAmino(d),g,v,b)}toAmino(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:n,to:s,sequence:i,amount:c,version:d,storage_root:g,last_block_hash:v}=this;return{type:"ophost/MsgFinalizeTokenWithdrawal",value:{sender:t,bridge_id:e.toFixed(),output_index:r.toFixed(),withdrawal_proofs:o,from:n,to:s,sequence:i.toFixed(),amount:c.toAmino(),version:d,storage_root:g,last_block_hash:v}}}static fromData(t){const{sender:e,bridge_id:r,output_index:o,withdrawal_proofs:n,from:s,to:i,sequence:c,amount:d,version:g,storage_root:v,last_block_hash:b}=t;return new fn(e,parseInt(r),parseInt(o),n,s,i,parseInt(c),S.fromData(d),g,v,b)}toData(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:n,to:s,sequence:i,amount:c,version:d,storage_root:g,last_block_hash:v}=this;return{"@type":"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",sender:t,bridge_id:e.toFixed(),output_index:r.toFixed(),withdrawal_proofs:o,from:n,to:s,sequence:i.toFixed(),amount:c.toData(),version:d,storage_root:g,last_block_hash:v}}static fromProto(t){return new fn(t.sender,Number(t.bridgeId),Number(t.outputIndex),t.withdrawalProofs.map(e=>Buffer.from(e).toString("base64")),t.from,t.to,Number(t.sequence),S.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:n,to:s,sequence:i,amount:c,version:d,storage_root:g,last_block_hash:v}=this;return z.MsgFinalizeTokenWithdrawal.fromPartial({sender:t,bridgeId:BigInt(e),outputIndex:BigInt(r),withdrawalProofs:o.map(b=>Buffer.from(b,"base64")),from:n,to:s,sequence:BigInt(i),amount:c.toProto(),version:Buffer.from(d,"base64"),storageRoot:Buffer.from(g,"base64"),lastBlockHash:Buffer.from(v,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",value:z.MsgFinalizeTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return fn.fromProto(z.MsgFinalizeTokenWithdrawal.decode(t.value))}}class gn extends u{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 gn(e,parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,new_proposer:r}=this;return{type:"ophost/MsgUpdateProposer",value:{authority:t,bridge_id:e.toFixed(),new_proposer:r}}}static fromData(t){const{authority:e,bridge_id:r,new_proposer:o}=t;return new gn(e,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.toFixed(),new_proposer:r}}static fromProto(t){return new gn(t.authority,Number(t.bridgeId),t.newProposer)}toProto(){const{authority:t,bridge_id:e,new_proposer:r}=this;return z.MsgUpdateProposer.fromPartial({authority:t,bridgeId:BigInt(e),newProposer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateProposer",value:z.MsgUpdateProposer.encode(this.toProto()).finish()})}static unpackAny(t){return gn.fromProto(z.MsgUpdateProposer.decode(t.value))}}class yn extends u{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 yn(e,parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,challenger:r}=this;return{type:"ophost/MsgUpdateChallenger",value:{authority:t,bridge_id:e.toFixed(),challenger:r}}}static fromData(t){const{authority:e,bridge_id:r,challenger:o}=t;return new yn(e,parseInt(r),o)}toData(){const{authority:t,bridge_id:e,challenger:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateChallenger",authority:t,bridge_id:e.toFixed(),challenger:r}}static fromProto(t){return new yn(t.authority,Number(t.bridgeId),t.challenger)}toProto(){const{authority:t,bridge_id:e,challenger:r}=this;return z.MsgUpdateChallenger.fromPartial({authority:t,bridgeId:BigInt(e),challenger:r})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateChallenger",value:z.MsgUpdateChallenger.encode(this.toProto()).finish()})}static unpackAny(t){return yn.fromProto(z.MsgUpdateChallenger.decode(t.value))}}class _n extends u{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 _n(e,parseInt(r),$t.fromAmino(o))}toAmino(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return{type:"ophost/MsgUpdateBatchInfo",value:{authority:t,bridge_id:e.toFixed(),new_batch_info:r.toAmino()}}}static fromData(t){const{authority:e,bridge_id:r,new_batch_info:o}=t;return new _n(e,parseInt(r),$t.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.toFixed(),new_batch_info:r.toData()}}static fromProto(t){return new _n(t.authority,Number(t.bridgeId),$t.fromProto(t.newBatchInfo))}toProto(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return z.MsgUpdateBatchInfo.fromPartial({authority:t,bridgeId:BigInt(e),newBatchInfo:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateBatchInfo",value:z.MsgUpdateBatchInfo.encode(this.toProto()).finish()})}static unpackAny(t){return _n.fromProto(z.MsgUpdateBatchInfo.decode(t.value))}}class vn extends u{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 vn(e,parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return{type:"ophost/MsgUpdateOracleConfig",value:{authority:t,bridge_id:e.toFixed(),oracle_enabled:r}}}static fromData(t){const{authority:e,bridge_id:r,oracle_enabled:o}=t;return new vn(e,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.toFixed(),oracle_enabled:r}}static fromProto(t){return new vn(t.authority,Number(t.bridgeId),t.oracleEnabled)}toProto(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return z.MsgUpdateOracleConfig.fromPartial({authority:t,bridgeId:BigInt(e),oracleEnabled:r})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateOracleConfig",value:z.MsgUpdateOracleConfig.encode(this.toProto()).finish()})}static unpackAny(t){return vn.fromProto(z.MsgUpdateOracleConfig.decode(t.value))}}class wn extends u{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 wn(e,parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,metadata:r}=this;return{type:"ophost/MsgUpdateMetadata",value:{authority:t,bridge_id:e.toFixed(),metadata:r}}}static fromData(t){const{authority:e,bridge_id:r,metadata:o}=t;return new wn(e,parseInt(r),o)}toData(){const{authority:t,bridge_id:e,metadata:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateMetadata",authority:t,bridge_id:e.toFixed(),metadata:r}}static fromProto(t){return new wn(t.authority,Number(t.bridgeId),Buffer.from(t.metadata).toString("base64"))}toProto(){const{authority:t,bridge_id:e,metadata:r}=this;return z.MsgUpdateMetadata.fromPartial({authority:t,bridgeId:BigInt(e),metadata:Buffer.from(r,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateMetadata",value:z.MsgUpdateMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return wn.fromProto(z.MsgUpdateMetadata.decode(t.value))}}class es extends u{constructor(e){super();_(this,"registration_fee");this.registration_fee=new l(e)}static fromAmino(e){return new es(l.fromAmino(e.value.registration_fee))}toAmino(){return{type:"ophost/Params",value:{registration_fee:this.registration_fee.toAmino()}}}static fromData(e){return new es(l.fromData(e.registration_fee))}toData(){return{"@type":"/opinit.ophost.v1.Params",registration_fee:this.registration_fee.toData()}}static fromProto(e){return new es(l.fromProto(e.registrationFee))}toProto(){return He.Params.fromPartial({registrationFee:this.registration_fee.toProto()})}}class An extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new An(e,es.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 An(e,es.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 An(t.authority,es.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return z.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateParams",value:z.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return An.fromProto(z.MsgUpdateParams.decode(t.value))}}class Se extends u{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:n}=t;return new Se(e,parseInt(r),new Date(o),parseInt(n))}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.toFixed(),l1_block_time:r.toISOString(),l2_block_number:o.toFixed()}}static fromData(t){const{output_root:e,l1_block_number:r,l1_block_time:o,l2_block_number:n}=t;return new Se(e,parseInt(r),new Date(o),parseInt(n))}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.toFixed(),l1_block_time:r.toISOString(),l2_block_number:o.toFixed()}}static fromProto(t){return new Se(Buffer.from(t.outputRoot).toString("base64"),Number(t.l1BlockNumber),t.l1BlockTime,Number(t.l2BlockNumber))}toProto(){const{output_root:t,l1_block_number:e,l1_block_time:r,l2_block_number:o}=this;return He.Output.fromPartial({outputRoot:Buffer.from(t,"base64"),l1BlockNumber:BigInt(e),l1BlockTime:r,l2BlockNumber:BigInt(o)})}}class ri extends u{constructor(t,e){super(),this.batch_info=t,this.output=e}static fromAmino(t){const{batch_info:e,output:r}=t;return new ri($t.fromAmino(e),Se.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 ri($t.fromData(e),Se.fromData(r))}toData(){const{batch_info:t,output:e}=this;return{batch_info:t.toData(),output:e.toData()}}static fromProto(t){return new ri($t.fromProto(t.batchInfo),Se.fromProto(t.output))}toProto(){const{batch_info:t,output:e}=this;return He.BatchInfoWithOutput.fromPartial({batchInfo:t.toProto(),output:e.toProto()})}}class Ie extends u{constructor(t,e,r,o,n){super(),this.bridge_id=t,this.bridge_addr=e,this.l1_chain_id=r,this.l1_client_id=o,this.bridge_config=n}static fromAmino(t){const{bridge_id:e,bridge_addr:r,l1_chain_id:o,l1_client_id:n,bridge_config:s}=t;return new Ie(parseInt(e),r,o,n,Me.fromAmino(s))}toAmino(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n}=this;return{bridge_id:t.toFixed(),bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n.toAmino()}}static fromData(t){const{bridge_id:e,bridge_addr:r,l1_chain_id:o,l1_client_id:n,bridge_config:s}=t;return new Ie(parseInt(e),r,o,n,Me.fromData(s))}toData(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n}=this;return{bridge_id:t.toFixed(),bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n.toData()}}static fromProto(t){return new Ie(Number(t.bridgeId),t.bridgeAddr,t.l1ChainId,t.l1ClientId,Me.fromProto(t.bridgeConfig))}toProto(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n}=this;return Nc.BridgeInfo.fromPartial({bridgeId:BigInt(t),bridgeAddr:e,l1ChainId:r,l1ClientId:o,bridgeConfig:n.toProto()})}}class Pn extends u{constructor(t,e){super(),this.sender=t,this.bridge_info=e}static fromAmino(t){const{value:{sender:e,bridge_info:r}}=t;return new Pn(e,Ie.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 Pn(e,Ie.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 Pn(t.sender,Ie.fromProto(t.bridgeInfo))}toProto(){const{sender:t,bridge_info:e}=this;return st.MsgSetBridgeInfo.fromPartial({sender:t,bridgeInfo:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSetBridgeInfo",value:st.MsgSetBridgeInfo.encode(this.toProto()).finish()})}static unpackAny(t){return Pn.fromProto(st.MsgSetBridgeInfo.decode(t.value))}}class bn extends u{constructor(t,e,r){super(),this.sender=t,this.height=e,this.data=r}static fromAmino(t){return new bn(t.value.sender,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.toFixed(),data:r}}}static fromData(t){return new bn(t.sender,parseInt(t.height),t.data)}toData(){const{sender:t,height:e,data:r}=this;return{"@type":"/opinit.opchild.v1.MsgUpdateOracle",sender:t,height:e.toFixed(),data:r}}static fromProto(t){return new bn(t.sender,Number(t.height),Buffer.from(t.data).toString("base64"))}toProto(){const{sender:t,height:e,data:r}=this;return st.MsgUpdateOracle.fromPartial({sender:t,height:BigInt(e),data:Buffer.from(r,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateOracle",value:st.MsgUpdateOracle.encode(this.toProto()).finish()})}static unpackAny(t){return bn.fromProto(st.MsgUpdateOracle.decode(t.value))}}class rs extends u{constructor(e,r,o,n,s,i){super();_(this,"min_gas_prices");this.max_validators=e,this.historical_entries=r,this.bridge_executors=n,this.admin=s,this.fee_whitelist=i,this.min_gas_prices=new l(o)}static fromAmino(e){const{value:{max_validators:r,historical_entries:o,min_gas_prices:n,bridge_executors:s,admin:i,fee_whitelist:c}}=e;return new rs(r,o,l.fromAmino(n),s,i,c)}toAmino(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:i}=this;return{type:"opchild/Params",value:{max_validators:e,historical_entries:r,min_gas_prices:o.toAmino(),bridge_executors:n,admin:s,fee_whitelist:i}}}static fromData(e){const{max_validators:r,historical_entries:o,min_gas_prices:n,bridge_executors:s,admin:i,fee_whitelist:c}=e;return new rs(r,o,l.fromData(n),s,i,c)}toData(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:i}=this;return{"@type":"/opinit.opchild.v1.Params",max_validators:e,historical_entries:r,min_gas_prices:o.toData(),bridge_executors:n,admin:s,fee_whitelist:i}}static fromProto(e){return new rs(e.maxValidators,e.historicalEntries,l.fromProto(e.minGasPrices),e.bridgeExecutors,e.admin,e.feeWhitelist)}toProto(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:i}=this;return Nc.Params.fromPartial({maxValidators:e,historicalEntries:r,minGasPrices:o.toProto(),bridgeExecutors:n,admin:s,feeWhitelist:i})}}class Dn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Dn(e,rs.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 Dn(e,rs.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 Dn(t.authority,rs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return st.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateParams",value:st.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Dn.fromProto(st.MsgUpdateParams.decode(t.value))}}class Aa extends u{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:n}=t;return new Aa(e,r,_t.fromAmino(o),parseInt(n))}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.toFixed()}}static fromData(t){const{moniker:e,operator_address:r,consensus_pubkey:o,cons_power:n}=t;return new Aa(e,r,_t.fromData(o),parseInt(n))}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.toFixed()}}static fromProto(t){return new Aa(t.moniker,t.operatorAddress,_t.unpackAny(t.consensusPubkey),Number(t.consPower))}toProto(){const{moniker:t,operator_address:e,consensus_pubkey:r,cons_power:o}=this;return Nc.Validator.fromPartial({moniker:t,operatorAddress:e,consensusPubkey:r.packAny(),consPower:BigInt(o)})}}class os extends u{constructor(t,e,r,o,n){super(),this.reward_denom=t,this.dilution_period=e,this.release_rate=r,this.dilution_rate=o,this.release_enabled=n}static fromAmino(t){const{value:{reward_denom:e,dilution_period:r,release_rate:o,dilution_rate:n,release_enabled:s}}=t;return new os(e,q.fromAmino(r),o,n,s)}toAmino(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:n}=this;return{type:"reward/Params",value:{reward_denom:t,dilution_period:e.toAmino(),release_rate:r,dilution_rate:o,release_enabled:n}}}static fromData(t){const{reward_denom:e,dilution_period:r,release_rate:o,dilution_rate:n,release_enabled:s}=t;return new os(e,q.fromData(r),o,n,s)}toData(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:n}=this;return{"@type":"/initia.reward.v1.Params",reward_denom:t,dilution_period:e.toData(),release_rate:r,dilution_rate:o,release_enabled:n}}static fromProto(t){return new os(t.rewardDenom,q.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:n}=this;return dd.Params.fromPartial({rewardDenom:t,dilutionPeriod:e.toProto(),releaseRate:r,dilutionRate:o,releaseEnabled:n})}}class kn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new kn(e,os.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 kn(e,os.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 kn(t.authority,os.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return bc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.reward.v1.MsgUpdateParams",value:bc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return kn.fromProto(bc.MsgUpdateParams.decode(t.value))}}class xn extends u{constructor(t){super(),this.address=t}static fromAmino(t){const{value:{address:e}}=t;return new xn(e)}toAmino(){const{address:t}=this;return{type:"cosmos-sdk/MsgUnjail",value:{address:t}}}static fromData(t){const{address:e}=t;return new xn(e)}toData(){const{address:t}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:t}}static fromProto(t){return new xn(t.validatorAddr)}toProto(){const{address:t}=this;return Ga.MsgUnjail.fromPartial({validatorAddr:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:Ga.MsgUnjail.encode(this.toProto()).finish()})}static unpackAny(t){return xn.fromProto(Ga.MsgUnjail.decode(t.value))}}class ns extends u{constructor(t,e,r,o,n){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=n}static fromAmino(t){const{value:{signed_blocks_window:e,min_signed_per_window:r,downtime_jail_duration:o,slash_fraction_double_sign:n,slash_fraction_downtime:s}}=t;return new ns(parseInt(e),r,q.fromAmino(o),n,s)}toAmino(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:n}=this;return{type:"cosmos-sdk/x/slashing/Params",value:{signed_blocks_window:t.toFixed(),min_signed_per_window:e,downtime_jail_duration:r.toAmino(),slash_fraction_double_sign:o,slash_fraction_downtime:n}}}static fromData(t){const{signed_blocks_window:e,min_signed_per_window:r,downtime_jail_duration:o,slash_fraction_double_sign:n,slash_fraction_downtime:s}=t;return new ns(parseInt(e),r,q.fromData(o),n,s)}toData(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:n}=this;return{"@type":"/cosmos.slashing.v1beta1.Params",signed_blocks_window:t.toFixed(),min_signed_per_window:e,downtime_jail_duration:r.toData(),slash_fraction_double_sign:o,slash_fraction_downtime:n}}static fromProto(t){return new ns(Number(t.signedBlocksWindow),t.minSignedPerWindow.toString(),q.fromProto(t.downtimeJailDuration),t.slashFractionDoubleSign.toString(),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:n}=this;return Bu.Params.fromPartial({signedBlocksWindow:BigInt(t),minSignedPerWindow:Buffer.from(e),downtimeJailDuration:r.toProto(),slashFractionDoubleSign:Buffer.from(o),slashFractionDowntime:Buffer.from(n)})}}class Mn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Mn(e,ns.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 Mn(e,ns.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 Mn(t.authority,ns.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ga.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUpdateParams",value:Ga.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Mn.fromProto(Ga.MsgUpdateParams.decode(t.value))}}class Pa extends u{constructor(t,e,r,o,n,s){super(),this.address=t,this.start_height=e,this.index_offset=r,this.jailed_until=o,this.tombstoned=n,this.missed_blocks_counter=s}static fromAmino(t){const{address:e,start_height:r,index_offset:o,jailed_until:n,tombstoned:s,missed_blocks_counter:i}=t;return new Pa(e,parseInt(r),parseInt(o),new Date(n),s,parseInt(i))}toAmino(){const{address:t,start_height:e,index_offset:r,jailed_until:o,tombstoned:n,missed_blocks_counter:s}=this;return{address:t,start_height:e.toFixed(),index_offset:r.toFixed(),jailed_until:o.toISOString(),tombstoned:n,missed_blocks_counter:s.toFixed()}}static fromData(t){const{address:e,start_height:r,index_offset:o,jailed_until:n,tombstoned:s,missed_blocks_counter:i}=t;return new Pa(e,parseInt(r),parseInt(o),new Date(n),s,parseInt(i))}toData(){const{address:t,start_height:e,index_offset:r,jailed_until:o,tombstoned:n,missed_blocks_counter:s}=this;return{address:t,start_height:e.toFixed(),index_offset:r.toFixed(),jailed_until:o.toISOString(),tombstoned:n,missed_blocks_counter:s.toFixed()}}static fromProto(t){return new Pa(t.address,Number(t.startHeight),Number(t.indexOffset),t.jailedUntil,t.tombstoned,Number(t.missedBlocksCounter))}toProto(){const{address:t,start_height:e,index_offset:r,jailed_until:o,tombstoned:n,missed_blocks_counter:s}=this;return Bu.ValidatorSigningInfo.fromPartial({address:t,startHeight:BigInt(e),indexOffset:BigInt(r),jailedUntil:o,tombstoned:n,missedBlocksCounter:BigInt(s)})}}class Sn extends u{constructor(t,e){super(),this.sender=t,this.subdenom=e}static fromAmino(t){const{value:{sender:e,subdenom:r}}=t;return new Sn(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 Sn(e,r)}toData(){const{sender:t,subdenom:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgCreateDenom",sender:t,subdenom:e}}static fromProto(t){return new Sn(t.sender,t.subdenom)}toProto(){const{sender:t,subdenom:e}=this;return ct.MsgCreateDenom.fromPartial({sender:t,subdenom:e})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgCreateDenom",value:ct.MsgCreateDenom.encode(this.toProto()).finish()})}static unpackAny(t){return Sn.fromProto(ct.MsgCreateDenom.decode(t.value))}}class In extends u{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 In(e,S.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 In(e,S.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 In(t.sender,S.fromProto(t.amount),t.mintToAddress)}toProto(){const{sender:t,amount:e,mint_to_address:r}=this;return ct.MsgMint.fromPartial({sender:t,amount:e.toProto(),mintToAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgMint",value:ct.MsgMint.encode(this.toProto()).finish()})}static unpackAny(t){return In.fromProto(ct.MsgMint.decode(t.value))}}class Bn extends u{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 Bn(e,S.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 Bn(e,S.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 Bn(t.sender,S.fromProto(t.amount),t.burnFromAddress)}toProto(){const{sender:t,amount:e,burn_from_address:r}=this;return ct.MsgBurn.fromPartial({sender:t,amount:e.toProto(),burnFromAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgBurn",value:ct.MsgBurn.encode(this.toProto()).finish()})}static unpackAny(t){return Bn.fromProto(ct.MsgBurn.decode(t.value))}}class Un extends u{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 Un(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 Un(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 Un(t.sender,t.denom,t.newAdmin)}toProto(){const{sender:t,denom:e,new_admin:r}=this;return ct.MsgChangeAdmin.fromPartial({sender:t,denom:e,newAdmin:r})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgChangeAdmin",value:ct.MsgChangeAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Un.fromProto(ct.MsgChangeAdmin.decode(t.value))}}class Cn extends u{constructor(t,e){super(),this.sender=t,this.metadata=e}static fromAmino(t){const{value:{sender:e,metadata:r}}=t;return new Cn(e,Pe.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 Cn(e,Pe.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 Cn(t.sender,Pe.fromProto(t.metadata))}toProto(){const{sender:t,metadata:e}=this;return ct.MsgSetDenomMetadata.fromPartial({sender:t,metadata:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata",value:ct.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Cn.fromProto(ct.MsgSetDenomMetadata.decode(t.value))}}class En extends u{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 En(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 En(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 En(t.sender,t.denom,t.cosmwasmAddress)}toProto(){const{sender:t,denom:e,cosmwasm_address:r}=this;return ct.MsgSetBeforeSendHook.fromPartial({sender:t,denom:e,cosmwasmAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook",value:ct.MsgSetBeforeSendHook.encode(this.toProto()).finish()})}static unpackAny(t){return En.fromProto(ct.MsgSetBeforeSendHook.decode(t.value))}}class On extends u{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:n}}=t;return new On(e,S.fromAmino(r),o,n)}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:n}=t;return new On(e,S.fromData(r),o,n)}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 On(t.sender,S.fromProto(t.amount),t.transferFromAddress,t.transferToAddress)}toProto(){const{sender:t,amount:e,transfer_from_address:r,transfer_to_address:o}=this;return ct.MsgForceTransfer.fromPartial({sender:t,amount:e.toProto(),transferFromAddress:r,transferToAddress:o})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgForceTransfer",value:ct.MsgForceTransfer.encode(this.toProto()).finish()})}static unpackAny(t){return On.fromProto(ct.MsgForceTransfer.decode(t.value))}}class ss extends u{constructor(e,r){super();_(this,"denom_creation_fee");this.denom_creation_gas_consume=r,this.denom_creation_fee=new l(e)}static fromAmino(e){const{denom_creation_fee:r,denom_creation_gas_consume:o}=e;return new ss(l.fromAmino(r),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.toFixed()}}static fromData(e){const{denom_creation_fee:r,denom_creation_gas_consume:o}=e;return new ss(l.fromData(r),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.toFixed()}}static fromProto(e){return new ss(l.fromProto(e.denomCreationFee),Number(e.denomCreationGasConsume))}toProto(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return ld.Params.fromPartial({denomCreationFee:e.toProto(),denomCreationGasConsume:BigInt(r)})}}class Nn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Nn(e,ss.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 Nn(e,ss.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 Nn(t.authority,ss.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return ct.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgUpdateParams",value:ct.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Nn.fromProto(ct.MsgUpdateParams.decode(t.value))}}exports.Msg=void 0;(a=>{function t(o){switch(o.type){case"block-sdk/x/auction/MsgAuctionBid":return ze.fromAmino(o);case"block-sdk/x/auction/MsgUpdateParams":return Ve.fromAmino(o);case"cosmos-sdk/x/auth/MsgUpdateParams":return Ke.fromAmino(o);case"cosmos-sdk/MsgGrant":return br.fromAmino(o);case"cosmos-sdk/MsgRevoke":return Dr.fromAmino(o);case"cosmos-sdk/MsgExec":return kr.fromAmino(o);case"cosmos-sdk/MsgSend":return xr.fromAmino(o);case"cosmos-sdk/MsgMultiSend":return bt.fromAmino(o);case"cosmos-sdk/x/bank/MsgUpdateParams":return Mr.fromAmino(o);case"cosmos-sdk/MsgSetSendEnabled":return Sr.fromAmino(o);case"bank/MsgSetDenomMetadata":return Ir.fromAmino(o);case"cosmos-sdk/MsgVerifyInvariant":return Ur.fromAmino(o);case"cosmos-sdk/x/crisis/MsgUpdateParams":return Cr.fromAmino(o);case"cosmos-sdk/x/consensus/MsgUpdateParams":return Br.fromAmino(o);case"cosmos-sdk/MsgModifyWithdrawAddress":return Er.fromAmino(o);case"cosmos-sdk/MsgWithdrawDelegationReward":return Or.fromAmino(o);case"cosmos-sdk/MsgWithdrawValidatorCommission":return Nr.fromAmino(o);case"cosmos-sdk/MsgFundCommunityPool":return Tr.fromAmino(o);case"distribution/MsgUpdateParams":return Fr.fromAmino(o);case"cosmos-sdk/distr/MsgCommunityPoolSpend":return Rr.fromAmino(o);case"distr/MsgDepositValidatorRewardsPool":return qr.fromAmino(o);case"cosmos-sdk/MsgSubmitEvidence":return Lr.fromAmino(o);case"evm/MsgCreate":return Hr.fromAmino(o);case"evm/MsgCreate2":return zr.fromAmino(o);case"evm/MsgCall":return Vr.fromAmino(o);case"evm/MsgUpdateParams":return Kr.fromAmino(o);case"cosmos-sdk/MsgGrantAllowance":return Wr.fromAmino(o);case"cosmos-sdk/MsgRevokeAllowance":return jr.fromAmino(o);case"noble/forwarding/RegisterAccount":return Jr.fromAmino(o);case"noble/forwarding/ClearAccount":return Zr.fromAmino(o);case"cosmos-sdk/v1/MsgCancelProposal":return Yr.fromAmino(o);case"cosmos-sdk/MsgDeposit":return Xr.fromAmino(o);case"cosmos-sdk/v1/MsgDeposit":return Qr.fromAmino(o);case"cosmos-sdk/MsgSubmitProposal":return oo.fromAmino(o);case"cosmos-sdk/v1/MsgSubmitProposal":return no.fromAmino(o);case"cosmos-sdk/MsgVote":return le.fromAmino(o);case"cosmos-sdk/v1/MsgVote":return pe.fromAmino(o);case"cosmos-sdk/MsgVoteWeighted":return so.fromAmino(o);case"cosmos-sdk/v1/MsgVoteWeighted":return ao.fromAmino(o);case"gov/MsgUpdateParams":return io.fromAmino(o);case"cosmos-sdk/MsgCreateGroup":return co.fromAmino(o);case"cosmos-sdk/MsgCreateGroupPolicy":return lo.fromAmino(o);case"cosmos-sdk/MsgCreateGroupWithPolicy":return po.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupAdmin":return go.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupDecisionPolicy":return yo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMembers":return _o.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMetadata":return vo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyAdmin":return wo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyMetadata":return Ao.fromAmino(o);case"cosmos-sdk/group/MsgExec":return ho.fromAmino(o);case"cosmos-sdk/group/MsgLeaveGroup":return fo.fromAmino(o);case"cosmos-sdk/group/MsgSubmitProposal":return fe.fromAmino(o);case"cosmos-sdk/group/MsgVote":return he.fromAmino(o);case"ibchooks/MsgUpdateACL":return bo.fromAmino(o);case"ibchooks/MsgUpdateParams":return Do.fromAmino(o);case"nft-transfer/MsgTransfer":return ko.fromAmino(o);case"nft-transfer/MsgUpdateParams":return xo.fromAmino(o);case"ibc-perm/MsgUpdateAdmin":return Mo.fromAmino(o);case"ibc-perm/MsgUpdatePermissionedRelayers":return So.fromAmino(o);case"cosmos-sdk/MsgTransfer":return Pr.fromAmino(o);case"intertx/MsgRegisterAccount":return Uo.fromAmino(o);case"intertx/MsgSubmitTx":return Co.fromAmino(o);case"connect/x/marketmap/MsgCreateMarkets":return No.fromAmino(o);case"connect/x/marketmap/MsgUpdateMarkets":return To.fromAmino(o);case"connect/x/marketmap/MsgUpsertMarkets":return Fo.fromAmino(o);case"connect/x/marketmap/MsgRemoveMarketAuthorities":return Ro.fromAmino(o);case"connect/x/marketmap/MsgParams":return qo.fromAmino(o);case"move/MsgPublish":return ge.fromAmino(o);case"move/MsgExecute":return $o.fromAmino(o);case"move/MsgExecuteJSON":return Lo.fromAmino(o);case"move/MsgScript":return Ho.fromAmino(o);case"move/MsgScriptJSON":return zo.fromAmino(o);case"move/MsgUpdateParams":return Vo.fromAmino(o);case"move/MsgWhitelist":return Ko.fromAmino(o);case"move/MsgDelist":return Go.fromAmino(o);case"move/MsgGovExecute":return Wo.fromAmino(o);case"move/MsgGovExecuteJSON":return jo.fromAmino(o);case"move/MsgGovPublish":return ye.fromAmino(o);case"move/MsgGovScript":return Jo.fromAmino(o);case"move/MsgGovScriptJSON":return Zo.fromAmino(o);case"mstaking/MsgDelegate":return Yo.fromAmino(o);case"mstaking/MsgUndelegate":return Xo.fromAmino(o);case"mstaking/MsgBeginRedelegate":return Qo.fromAmino(o);case"mstaking/MsgCreateValidator":return tn.fromAmino(o);case"mstaking/MsgEditValidator":return _e.fromAmino(o);case"mstaking/MsgCancelUnbondingDelegation":return en.fromAmino(o);case"mstaking/MsgUpdateParams":return rn.fromAmino(o);case"opchild/MsgAddValidator":return on.fromAmino(o);case"opchild/MsgRemoveValidator":return nn.fromAmino(o);case"opchild/MsgFinalizeTokenDeposit":return sn.fromAmino(o);case"opchild/MsgInitiateTokenWithdrawal":return an.fromAmino(o);case"opchild/MsgExecuteMessages":return cn.fromAmino(o);case"opchild/MsgSpendFeePool":return un.fromAmino(o);case"opchild/MsgSetBridgeInfo":return Pn.fromAmino(o);case"opchild/MsgUpdateOracle":return bn.fromAmino(o);case"opchild/MsgUpdateParams":return Dn.fromAmino(o);case"ophost/MsgRecordBatch":return mn.fromAmino(o);case"ophost/MsgCreateBridge":return dn.fromAmino(o);case"ophost/MsgProposeOutput":return ln.fromAmino(o);case"ophost/MsgDeleteOutput":return pn.fromAmino(o);case"ophost/MsgInitiateTokenDeposit":return hn.fromAmino(o);case"ophost/MsgFinalizeTokenWithdrawal":return fn.fromAmino(o);case"ophost/MsgUpdateProposer":return gn.fromAmino(o);case"ophost/MsgUpdateChallenger":return yn.fromAmino(o);case"ophost/MsgUpdateBatchInfo":return _n.fromAmino(o);case"ophost/MsgUpdateOracleConfig":return vn.fromAmino(o);case"ophost/MsgUpdateMetadata":return wn.fromAmino(o);case"ophost/MsgUpdateParams":return An.fromAmino(o);case"connect/x/oracle/MsgAddCurrencyPairs":return Eo.fromAmino(o);case"connect/x/oracle/MsgRemoveCurrencyPairs":return Oo.fromAmino(o);case"reward/MsgUpdateParams":return kn.fromAmino(o);case"cosmos-sdk/MsgUnjail":return xn.fromAmino(o);case"cosmos-sdk/x/slashing/MsgUpdateParams":return Mn.fromAmino(o);case"tokenfactory/MsgCreateDenom":return Sn.fromAmino(o);case"tokenfactory/MsgMint":return In.fromAmino(o);case"tokenfactory/MsgBurn":return Bn.fromAmino(o);case"tokenfactory/MsgChangeAdmin":return Un.fromAmino(o);case"tokenfactory/MsgSetDenomMetadata":return Cn.fromAmino(o);case"tokenfactory/MsgSetBeforeSendHook":return En.fromAmino(o);case"tokenfactory/MsgForceTransfer":return On.fromAmino(o);case"tokenfactory/MsgUpdateParams":return Nn.fromAmino(o);case"cosmos-sdk/MsgSoftwareUpgrade":return Io.fromAmino(o);case"cosmos-sdk/MsgCancelUpgrade":return Bo.fromAmino(o);case"wasm/MsgStoreCode":return sr.fromAmino(o);case"wasm/MsgInstantiateContract":return ar.fromAmino(o);case"wasm/MsgInstantiateContract2":return ir.fromAmino(o);case"wasm/MsgExecuteContract":return cr.fromAmino(o);case"wasm/MsgMigrateContract":return ur.fromAmino(o);case"wasm/MsgUpdateAdmin":return mr.fromAmino(o);case"wasm/MsgClearAdmin":return dr.fromAmino(o);case"wasm/MsgUpdateInstantiateConfig":return lr.fromAmino(o);case"wasm/MsgUpdateParams":return pr.fromAmino(o);case"wasm/MsgSudoContract":return hr.fromAmino(o);case"wasm/MsgPinCodes":return fr.fromAmino(o);case"wasm/MsgUnpinCodes":return gr.fromAmino(o);case"wasm/MsgStoreAndInstantiateContract":return yr.fromAmino(o);case"wasm/MsgStoreAndMigrateContract":return _r.fromAmino(o);case"wasm/MsgAddCodeUploadParamsAddresses":return vr.fromAmino(o);case"wasm/MsgRemoveCodeUploadParamsAddresses":return wr.fromAmino(o);case"wasm/MsgUpdateContractLabel":return Ar.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/sdk.auction.v1.MsgAuctionBid":return ze.fromData(o);case"/sdk.auction.v1.MsgUpdateParams":return Ve.fromData(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return Ke.fromData(o);case"/cosmos.authz.v1beta1.MsgGrant":return br.fromData(o);case"/cosmos.authz.v1beta1.MsgRevoke":return Dr.fromData(o);case"/cosmos.authz.v1beta1.MsgExec":return kr.fromData(o);case"/cosmos.bank.v1beta1.MsgSend":return xr.fromData(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return bt.fromData(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return Mr.fromData(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Sr.fromData(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Ir.fromData(o);case"/celestia.blob.v1.MsgPayForBlobs":return Gs.fromData(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Br.fromData(o);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return Ur.fromData(o);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return Cr.fromData(o);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return Er.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return Or.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return Nr.fromData(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return Tr.fromData(o);case"/initia.distribution.v1.MsgUpdateParams":return Fr.fromData(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return Rr.fromData(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return qr.fromData(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return Lr.fromData(o);case"/minievm.evm.v1.MsgCreate":return Hr.fromData(o);case"/minievm.evm.v1.MsgCreate2":return zr.fromData(o);case"/minievm.evm.v1.MsgCall":return Vr.fromData(o);case"/minievm.evm.v1.MsgUpdateParams":return Kr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return Wr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return jr.fromData(o);case"/noble.forwarding.v1.MsgRegisterAccount":return Jr.fromData(o);case"/noble.forwarding.v1.MsgClearAccount":return Zr.fromData(o);case"/cosmos.gov.v1.MsgCancelProposal":return Yr.fromData(o);case"/cosmos.gov.v1beta1.MsgDeposit":return Xr.fromData(o);case"/cosmos.gov.v1.MsgDeposit":return Qr.fromData(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return oo.fromData(o);case"/cosmos.gov.v1.MsgSubmitProposal":return no.fromData(o);case"/cosmos.gov.v1beta1.MsgVote":return le.fromData(o);case"/cosmos.gov.v1.MsgVote":return pe.fromData(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return so.fromData(o);case"/cosmos.gov.v1.MsgVoteWeighted":return ao.fromData(o);case"/initia.gov.v1.MsgUpdateParams":return io.fromData(o);case"/cosmos.group.v1.MsgCreateGroup":return co.fromData(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return lo.fromData(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return po.fromData(o);case"/cosmos.group.v1.MsgExec":return ho.fromData(o);case"/cosmos.group.v1.MsgLeaveGroup":return fo.fromData(o);case"/cosmos.group.v1.MsgSubmitProposal":return fe.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return go.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return _o.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return vo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return wo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return yo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return Ao.fromData(o);case"/cosmos.group.v1.MsgVote":return he.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return js.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return Js.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return Ys.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return Zs.fromData(o);case"/initia.ibchooks.v1.MsgUpdateACL":return bo.fromData(o);case"/initia.ibchooks.v1.MsgUpdateParams":return Do.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return ko.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return xo.fromData(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return Mo.fromData(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return So.fromData(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Pr.fromData(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return Vs.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return ta.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return da.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return la.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return pa.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return ha.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return fa.fromData(o);case"/ibc.core.channel.v1.MsgRecvPacket":return ga.fromData(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return ya.fromData(o);case"/ibc.core.channel.v1.MsgTimeout":return _a.fromData(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return va.fromData(o);case"/ibc.core.channel.v1.MsgUpdateParams":return wa.fromData(o);case"/ibc.core.client.v1.MsgCreateClient":return ea.fromData(o);case"/ibc.core.client.v1.MsgUpdateClient":return ra.fromData(o);case"/ibc.core.client.v1.MsgUpgradeClient":return oa.fromData(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return na.fromData(o);case"/ibc.core.client.v1.MsgRecoverClient":return sa.fromData(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return aa.fromData(o);case"/ibc.core.client.v1.MsgUpdateParams":return ia.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Za.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Ya.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Xa.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Qa.fromData(o);case"/ibc.core.connection.v1.MsgUpdateParams":return ti.fromData(o);case"/initia.intertx.v1.MsgRegisterAccount":return Uo.fromData(o);case"/initia.intertx.v1.MsgSubmitTx":return Co.fromData(o);case"/connect.marketmap.v2.MsgCreateMarkets":return No.fromData(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return To.fromData(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return Fo.fromData(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return Ro.fromData(o);case"/connect.marketmap.v2.MsgParams":return qo.fromData(o);case"/initia.move.v1.MsgPublish":return ge.fromData(o);case"/initia.move.v1.MsgExecute":return $o.fromData(o);case"/initia.move.v1.MsgExecuteJSON":return Lo.fromData(o);case"/initia.move.v1.MsgScript":return Ho.fromData(o);case"/initia.move.v1.MsgScriptJSON":return zo.fromData(o);case"/initia.move.v1.MsgUpdateParams":return Vo.fromData(o);case"/initia.move.v1.MsgWhitelist":return Ko.fromData(o);case"/initia.move.v1.MsgDelist":return Go.fromData(o);case"/initia.move.v1.MsgGovExecute":return Wo.fromData(o);case"/initia.move.v1.MsgGovExecuteJSON":return jo.fromData(o);case"/initia.move.v1.MsgGovPublish":return ye.fromData(o);case"/initia.move.v1.MsgGovScript":return Jo.fromData(o);case"/initia.move.v1.MsgGovScriptJSON":return Zo.fromData(o);case"/initia.mstaking.v1.MsgDelegate":return Yo.fromData(o);case"/initia.mstaking.v1.MsgUndelegate":return Xo.fromData(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return Qo.fromData(o);case"/initia.mstaking.v1.MsgCreateValidator":return tn.fromData(o);case"/initia.mstaking.v1.MsgEditValidator":return _e.fromData(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return en.fromData(o);case"/initia.mstaking.v1.MsgUpdateParams":return rn.fromData(o);case"/opinit.opchild.v1.MsgAddValidator":return on.fromData(o);case"/opinit.opchild.v1.MsgRemoveValidator":return nn.fromData(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return sn.fromData(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return an.fromData(o);case"/opinit.opchild.v1.MsgExecuteMessages":return cn.fromData(o);case"/opinit.opchild.v1.MsgSpendFeePool":return un.fromData(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return Pn.fromData(o);case"/opinit.opchild.v1.MsgUpdateOracle":return bn.fromData(o);case"/opinit.opchild.v1.MsgUpdateParams":return Dn.fromData(o);case"/opinit.ophost.v1.MsgRecordBatch":return mn.fromData(o);case"/opinit.ophost.v1.MsgCreateBridge":return dn.fromData(o);case"/opinit.ophost.v1.MsgProposeOutput":return ln.fromData(o);case"/opinit.ophost.v1.MsgDeleteOutput":return pn.fromData(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return hn.fromData(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return fn.fromData(o);case"/opinit.ophost.v1.MsgUpdateProposer":return gn.fromData(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return yn.fromData(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return _n.fromData(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return vn.fromData(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return wn.fromData(o);case"/opinit.ophost.v1.MsgUpdateParams":return An.fromData(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Eo.fromData(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Oo.fromData(o);case"/initia.reward.v1.MsgUpdateParams":return kn.fromData(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return xn.fromData(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Mn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Sn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgMint":return In.fromData(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Bn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return Un.fromData(o);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return Cn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return En.fromData(o);case"/miniwasm.tokenfactory.v1.MsgForceTransfer":return On.fromData(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return Nn.fromData(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Io.fromData(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return Bo.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return sr.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return ar.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return ir.fromData(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return cr.fromData(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return ur.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return mr.fromData(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return dr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return lr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return pr.fromData(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return hr.fromData(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return fr.fromData(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return gr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return yr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return _r.fromData(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return vr.fromData(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return wr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return Ar.fromData(o)}}a.fromData=e;function r(o){switch(o.typeUrl){case"/sdk.auction.v1.MsgAuctionBid":return ze.unpackAny(o);case"/sdk.auction.v1.MsgUpdateParams":return Ve.unpackAny(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return Ke.unpackAny(o);case"/cosmos.authz.v1beta1.MsgGrant":return br.unpackAny(o);case"/cosmos.authz.v1beta1.MsgRevoke":return Dr.unpackAny(o);case"/cosmos.authz.v1beta1.MsgExec":return kr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSend":return xr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return bt.unpackAny(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return Mr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Sr.unpackAny(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Ir.unpackAny(o);case"/celestia.blob.v1.MsgPayForBlobs":return Gs.unpackAny(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Br.unpackAny(o);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return Ur.unpackAny(o);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return Cr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return Er.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return Or.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return Nr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return Tr.unpackAny(o);case"/initia.distribution.v1.MsgUpdateParams":return Fr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return Rr.unpackAny(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return qr.unpackAny(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return Lr.unpackAny(o);case"/minievm.evm.v1.MsgCreate":return Hr.unpackAny(o);case"/minievm.evm.v1.MsgCreate2":return zr.unpackAny(o);case"/minievm.evm.v1.MsgCall":return Vr.unpackAny(o);case"/minievm.evm.v1.MsgUpdateParams":return Kr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return Wr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return jr.unpackAny(o);case"/noble.forwarding.v1.MsgRegisterAccount":return Jr.unpackAny(o);case"/noble.forwarding.v1.MsgClearAccount":return Zr.unpackAny(o);case"/cosmos.gov.v1.MsgCancelProposal":return Yr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgDeposit":return Xr.unpackAny(o);case"/cosmos.gov.v1.MsgDeposit":return Qr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return oo.unpackAny(o);case"/cosmos.gov.v1.MsgSubmitProposal":return no.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVote":return le.unpackAny(o);case"/cosmos.gov.v1.MsgVote":return pe.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return so.unpackAny(o);case"/cosmos.gov.v1.MsgVoteWeighted":return ao.unpackAny(o);case"/initia.gov.v1.MsgUpdateParams":return io.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroup":return co.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return lo.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return po.unpackAny(o);case"/cosmos.group.v1.MsgExec":return ho.unpackAny(o);case"/cosmos.group.v1.MsgLeaveGroup":return fo.unpackAny(o);case"/cosmos.group.v1.MsgSubmitProposal":return fe.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return go.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return _o.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return vo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return wo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return yo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return Ao.unpackAny(o);case"/cosmos.group.v1.MsgVote":return he.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return js.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return Js.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return Ys.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return Zs.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateACL":return bo.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateParams":return Do.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return ko.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return xo.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return Mo.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return So.unpackAny(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Pr.unpackAny(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return Vs.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return ta.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return da.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return la.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return pa.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return ha.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return fa.unpackAny(o);case"/ibc.core.channel.v1.MsgRecvPacket":return ga.unpackAny(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return ya.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeout":return _a.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return va.unpackAny(o);case"/ibc.core.channel.v1.MsgUpdateParams":return wa.unpackAny(o);case"/ibc.core.client.v1.MsgCreateClient":return ea.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateClient":return ra.unpackAny(o);case"/ibc.core.client.v1.MsgUpgradeClient":return oa.unpackAny(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return na.unpackAny(o);case"/ibc.core.client.v1.MsgRecoverClient":return sa.unpackAny(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return aa.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateParams":return ia.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Za.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Ya.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Xa.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Qa.unpackAny(o);case"/ibc.core.connection.v1.MsgUpdateParams":return ti.unpackAny(o);case"/initia.intertx.v1.MsgRegisterAccount":return Uo.unpackAny(o);case"/initia.intertx.v1.MsgSubmitTx":return Co.unpackAny(o);case"/connect.marketmap.v2.MsgCreateMarkets":return No.unpackAny(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return To.unpackAny(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return Fo.unpackAny(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return Ro.unpackAny(o);case"/connect.marketmap.v2.MsgParams":return qo.unpackAny(o);case"/initia.move.v1.MsgPublish":return ge.unpackAny(o);case"/initia.move.v1.MsgExecute":return $o.unpackAny(o);case"/initia.move.v1.MsgExecuteJSON":return Lo.unpackAny(o);case"/initia.move.v1.MsgScript":return Ho.unpackAny(o);case"/initia.move.v1.MsgScriptJSON":return zo.unpackAny(o);case"/initia.move.v1.MsgUpdateParams":return Vo.unpackAny(o);case"/initia.move.v1.MsgWhitelist":return Ko.unpackAny(o);case"/initia.move.v1.MsgDelist":return Go.unpackAny(o);case"/initia.move.v1.MsgGovExecute":return Wo.unpackAny(o);case"/initia.move.v1.MsgGovExecuteJSON":return jo.unpackAny(o);case"/initia.move.v1.MsgGovPublish":return ye.unpackAny(o);case"/initia.move.v1.MsgGovScript":return Jo.unpackAny(o);case"/initia.move.v1.MsgGovScriptJSON":return Zo.unpackAny(o);case"/initia.mstaking.v1.MsgDelegate":return Yo.unpackAny(o);case"/initia.mstaking.v1.MsgUndelegate":return Xo.unpackAny(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return Qo.unpackAny(o);case"/initia.mstaking.v1.MsgCreateValidator":return tn.unpackAny(o);case"/initia.mstaking.v1.MsgEditValidator":return _e.unpackAny(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return en.unpackAny(o);case"/initia.mstaking.v1.MsgUpdateParams":return rn.unpackAny(o);case"/opinit.opchild.v1.MsgAddValidator":return on.unpackAny(o);case"/opinit.opchild.v1.MsgRemoveValidator":return nn.unpackAny(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return sn.unpackAny(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return an.unpackAny(o);case"/opinit.opchild.v1.MsgExecuteMessages":return cn.unpackAny(o);case"/opinit.opchild.v1.MsgSpendFeePool":return un.unpackAny(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return Pn.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateOracle":return bn.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateParams":return Dn.unpackAny(o);case"/opinit.ophost.v1.MsgRecordBatch":return mn.unpackAny(o);case"/opinit.ophost.v1.MsgCreateBridge":return dn.unpackAny(o);case"/opinit.ophost.v1.MsgProposeOutput":return ln.unpackAny(o);case"/opinit.ophost.v1.MsgDeleteOutput":return pn.unpackAny(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return hn.unpackAny(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return fn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateProposer":return gn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return yn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return _n.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return vn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return wn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateParams":return An.unpackAny(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Eo.unpackAny(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Oo.unpackAny(o);case"/initia.reward.v1.MsgUpdateParams":return kn.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return xn.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Mn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Sn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgMint":return In.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Bn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return Un.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return Cn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return En.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgForceTransfer":return On.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return Nn.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Io.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return Bo.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return sr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return ar.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return ir.unpackAny(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return cr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return ur.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return mr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return dr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return lr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return pr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return hr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return fr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return gr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return yr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return _r.unpackAny(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return vr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return wr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return Ar.unpackAny(o);default:throw new Error(`not supported msg ${o.typeUrl}`)}}a.fromProto=r})(exports.Msg||(exports.Msg={}));function ii(a,t,e){try{return et.bech32.decode(t).prefix===a&&t.length==e}catch{return!1}}exports.AccAddress=void 0;(a=>{function t(s){return ii("init",s,43)||ii("init",s,63)}a.validate=t;function e(s){const i=et.bech32.decode(s);return et.bech32.encode("init",i.words)}a.fromValAddress=e;function r(s){const i=et.bech32.decode(s);return"0x"+Buffer.from(et.bech32.fromWords(i.words)).toString("hex")}a.toHex=r;function o(s){const i=s.replace(/^0x0+|^0x|^0+(?!x)/,"");return i.length<=40?et.bech32.encode("init",et.bech32.toWords(Buffer.from(i.padStart(40,"0"),"hex"))):et.bech32.encode("init",et.bech32.toWords(Buffer.from(i.padStart(64,"0"),"hex")))}a.fromHex=o;function n(s){const i=et.bech32.decode(s);return Buffer.from(et.bech32.fromWords(i.words))}a.toBuffer=n})(exports.AccAddress||(exports.AccAddress={}));exports.AccPubKey=void 0;(a=>{function t(r){return ii("initpub",r,46)}a.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initpub",o.words)}a.fromAccAddress=e})(exports.AccPubKey||(exports.AccPubKey={}));exports.ValAddress=void 0;(a=>{function t(r){return ii("initvaloper",r,50)}a.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initvaloper",o.words)}a.fromAccAddress=e})(exports.ValAddress||(exports.ValAddress={}));exports.ValPubKey=void 0;(a=>{function t(r){return ii("initvaloperpub",r,53)}a.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initvaloperpub",o.words)}a.fromValAddress=e})(exports.ValPubKey||(exports.ValPubKey={}));exports.ValConsAddress=void 0;(a=>{function t(e){return ii("initvalcons",e,50)}a.validate=t})(exports.ValConsAddress||(exports.ValConsAddress={}));class Pd{constructor(t){_(this,"bitarray");_(this,"signatures");this.multisig_pubkey=t;const e=t.pubkeys.length;this.bitarray=Hn.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 Pt))throw new Error("non-SimplePublicKey cannot be used to sign multisig");this.appendSignatureFromPubKey(e.data,e.public_key)}}toSignatureDescriptor(){return new lt.Descriptor(new lt.Descriptor.Multi(this.bitarray,this.signatures))}}class Fu extends u{constructor(t,e,r,o,n){super(),this.chain_id=t,this.account_number=e,this.sequence=r,this.auth_info=o,this.tx_body=n}toAmino(){const{chain_id:t,account_number:e,sequence:r,tx_body:{memo:o,messages:n,timeout_height:s},auth_info:{fee:i}}=this;return{chain_id:t,account_number:e.toFixed(),sequence:r.toFixed(),timeout_height:s&&s!==0?s.toFixed():void 0,fee:i.toAmino(),msgs:n.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 Mt.SignDoc.fromPartial({bodyBytes:r.toBytes(),authInfoBytes:o.toBytes(),accountNumber:BigInt(t),chainId:e})}toUnSignedTx(){return new Dt(this.tx_body,this.auth_info,[])}toBytes(){return Mt.SignDoc.encode(this.toProto()).finish()}}class ci{constructor(t,e,r,o,n,s,i,c,d,g,v){this.height=t,this.txhash=e,this.raw_log=r,this.logs=o,this.gas_wanted=n,this.gas_used=s,this.tx=i,this.timestamp=c,this.events=d,this.code=g,this.codespace=v}static fromProto(t){return new ci(Number(t.height),t.txhash,t.rawLog,t.logs.map(e=>ba.fromProto(e)),Number(t.gasWanted),Number(t.gasUsed),Dt.unpackAny(t.tx),t.timestamp,t.events,t.code,t.codespace)}static fromData(t){return new ci(parseInt(t.height),t.txhash,t.raw_log,t.logs.map(e=>ba.fromData(e)),parseInt(t.gas_wanted),parseInt(t.gas_used),Dt.fromData(t.tx),t.timestamp,t.events,t.code,t.codespace)}}exports.EventsByType=void 0;(a=>{function t(e){const r={};return e.forEach(o=>{o.attributes.forEach(n=>{o.type in r||(r[o.type]=new Map),n.key in r[o.type]||r[o.type].set(n.key,[]),r[o.type].get(n.key).push(n.value)})}),r}a.parse=t})(exports.EventsByType||(exports.EventsByType={}));class ba{constructor(t,e,r){_(this,"eventsByType");this.msg_index=t,this.log=e,this.events=r,this.eventsByType=exports.EventsByType.parse(this.events)}static fromData(t){return new ba(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 ba(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 pd.ABCIMessageLog.fromPartial({msgIndex:t,log:e,events:r})}}class Ru extends Q{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 Ne.fromData(r)}async parameters(t={}){return this.c.get("/cosmos/auth/v1beta1/params",t).then(e=>qn.fromData(e.params))}}class qu extends Q{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(n=>[n.grants.map(we.fromData),n.pagination])}async granter(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/granter/${t}`,e).then(r=>[r.grants.map(o=>we.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=>we.fromData(o)),r.pagination])}}class $u extends Q{async balance(t,e={}){return this.c.get(`/cosmos/bank/v1beta1/balances/${t}`,e).then(r=>[l.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=>S.fromData(o.balance))}async total(t={}){return this.c.get("/cosmos/bank/v1beta1/supply",t).then(e=>[l.fromData(e.supply),e.pagination])}async spendableBalances(t,e={}){return this.c.get(`/cosmos/bank/v1beta1/spendable_balances/${t}`,e).then(r=>[l.fromData(r.balances),r.pagination])}async parameters(t={}){return this.c.get("/cosmos/bank/v1beta1/params",t).then(e=>Ln.fromData(e.params))}}class Lu extends Q{async rewards(t,e={}){const r=await this.c.get(`/initia/distribution/v1/delegators/${t}/rewards`,e),o={};for(const n of r.rewards)o[n.validator_address]=n.reward.map(s=>({denom:s.denom,coins:l.fromData(s.dec_coins)}));return{rewards:o,total:r.total.map(n=>({denom:n.denom,coins:l.fromData(n.dec_coins)}))}}async rewardsByValidator(t,e,r={}){return this.c.get(`/initia/distribution/v1/delegators/${t}/rewards/${e}`,r).then(o=>o.rewards.map(n=>({denom:n.denom,coins:l.fromData(n.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:l.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:l.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=>l.fromData(e.pool))}async parameters(t={}){return this.c.get("/initia/distribution/v1/params",t).then(e=>Vn.fromData(e.params))}}class Hu extends Q{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 zu extends Q{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 erc20Wrapper(t={}){return this.c.get("/minievm/evm/v1/contracts/erc20_wrapper",t).then(e=>e.address)}async contractAddrByDenom(t,e={}){return this.c.get("/minievm/evm/v1/contracts/by_denom",{...e,denom:t}).then(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(e=>Kn.fromData(e.params))}}class Vu extends Q{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 Ku extends Q{async denoms(t={}){return this.c.get("/noble/forwarding/v1/denoms",t).then(e=>e.allowed_denoms)}async address(t,e,r,o={}){return this.c.get(`/noble/forwarding/v1/address/${t}/${e}/${r}`,o).then(n=>n.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:S.fromData(r.total_forwarded)}))}}class Gu extends Q{async proposals(t={}){return this.c.get("/initia/gov/v1/proposals",t).then(e=>[e.proposals.map(Te.fromData),e.pagination])}async proposal(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}`,e).then(r=>Te.fromData(r.proposal))}async deposits(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/deposits`,e).then(r=>[r.deposits.map(o=>Wa.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=>ws.fromData(o)),r.pagination])}async tally(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}/tally`,e).then(r=>Gn.fromData(r.tally_result))}async parameters(t={}){return this.c.get("/initia/gov/v1/params",t).then(e=>Wn.fromData(e.params))}async emergencyProposals(t={}){return this.c.get("/initia/gov/v1/emergency_proposals",t).then(e=>[e.proposals.map(r=>Te.fromData(r)),e.pagination])}}class Wu extends Q{async groupInfo(t){return this.c.get(`/cosmos/group/v1/group_info/${t}`).then(e=>Po.fromData(e.info))}async groupPolicyInfo(t){return this.c.get(`/cosmos/group/v1/group_policy_info/${t}`).then(e=>Ps.fromData(e.info))}async groupMembers(t,e={}){return this.c.get(`/cosmos/group/v1/group_members/${t}`,e).then(r=>[r.members.map(ja.fromData),r.pagination])}async groupsByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_admin/${t}`,e).then(r=>[r.groups.map(Po.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(Ps.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(Ps.fromData),r.pagination])}async proposal(t){return this.c.get(`/cosmos/group/v1/proposal/${t}`).then(e=>jn.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(jn.fromData),r.pagination])}async voteByProposalVoter(t,e){return this.c.get(`/cosmos/group/v1/vote_by_proposal_voter/${t}/${e}`).then(r=>Fe.fromData(r.vote))}async votesByProposal(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_proposal/${t}`,e).then(r=>[r.votes.map(Fe.fromData),r.pagination])}async votesByVoter(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_voter/${t}`,e).then(r=>[r.votes.map(Fe.fromData),r.pagination])}async groupsByMember(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_member/${t}`,e).then(r=>[r.groups.map(Po.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(Po.fromData),e.pagination])}}class ju extends Q{async channels(t={}){return this.c.get("/ibc/core/channel/v1/channels",t).then(e=>[e.channels.map(ee.fromData),e.pagination])}async port(t,e,r={}){return this.c.get(`/ibc/core/channel/v1/channels/${t}/ports/${e}`,r).then(o=>({channel:ee.fromData(o.channel),proof:o.proof,proof_height:U.fromData(o.proof_height)}))}async connections(t={}){return this.c.get("/ibc/core/connection/v1/connections",t).then(e=>[e.connections.map(ua.fromData),e.pagination])}async connection(t,e={}){return this.c.get(`/ibc/core/connection/v1/connections/${t}`,e).then(r=>ua.fromData(r.connection))}async connectionChannels(t,e={}){return this.c.get(`/ibc/core/channel/v1/connections/${t}/channels`,e).then(r=>[r.channels.map(ee.fromData),U.fromData(r.height),r.pagination])}async parameters(t={}){return this.c.get("/ibc/core/client/v1/params",t).then(e=>Ds.fromData(e.params))}async clientStates(t={}){return this.c.get("/ibc/core/client/v1/client_states",t).then(e=>[e.client_states.map(Ja.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:U.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(U.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 Ju extends Q{async acls(t={}){return this.c.get("/initia/ibchooks/v1/acls",t).then(e=>[e.acls.map(Xs.fromData),e.pagination])}async acl(t,e={}){return this.c.get(`/initia/ibchooks/v1/acls/${t}`,e).then(r=>Xs.fromData(r.acl))}async parameters(t={}){return this.c.get("/initia/ibchooks/v1/params",t).then(e=>Jn.fromData(e.params))}}class Zu extends Q{async classTrace(t){return this.c.get(`/ibc/apps/nft_transfer/v1/class_traces/${t}`).then(e=>Qs.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(Qs.fromData),e.pagination])}async classHash(t){return await this.c.get(`/ibc/apps/nft_transfer/v1/class_hashes/${t}`).then(e=>e.hash)}async escrowAddress(t,e,r={}){return this.c.get(`/ibc/apps/nft_transfer/v1/channels/${t}/ports/${e}/escrow_address`,r).then(o=>o.escrow_address)}async parameters(t={}){return this.c.get("/ibc/apps/nft_transfer/v1/params",t).then(e=>Zn.fromData(e.params))}}class Yu extends Q{async denomTrace(t){return this.c.get(`/ibc/apps/transfer/v1/denom_traces/${t}`).then(e=>Ks.fromData(e.denom_trace))}async denomTraces(t={}){return this.c.get("/ibc/apps/transfer/v1/denom_traces",t).then(e=>[e.denom_traces.map(Ks.fromData),e.pagination])}async denomHash(t){return await this.c.get(`/ibc/apps/transfer/v1/denom_hashes/${t}`).then(e=>e.hash)}async parameters(t={}){return this.c.get("/ibc/apps/transfer/v1/params",t).then(e=>ls.fromData(e.params))}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 Xu extends Q{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 Qu extends Q{async interchainAccount(t,e){return this.c.get(`/inter-tx/interchain_account/owner/${t}/connection/${e}`).then(r=>r.interchain_account_address)}}class tm extends Q{async marketMap(t={}){return this.c.get("/connect/marketmap/v2/marketmap",t).then(e=>{const r={};for(const[o,n]of Object.entries(e.market_map.markets))r[o]=kt.fromData(n);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=>kt.fromData(r.market))}async lastUpdated(t={}){return this.c.get("/connect/marketmap/v2/last_updated",t).then(e=>parseInt(e.last_updated))}async parameters(t={}){return this.c.get("/connect/marketmap/v2/params",t).then(e=>Yn.fromData(e.params))}}class em extends Q{async modules(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules`,e).then(r=>[r.modules.map(Qn.fromData),r.pagination])}async module(t,e,r={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules/${e}`,r).then(o=>Qn.fromData(o.module))}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(o=>JSON.parse(o.resource.move_resource))}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)}async viewFunction(t,e,r,o=[],n=[]){return this.c.post(`/initia/move/v1/accounts/${t}/modules/${e}/view_functions/${r}`,{type_args:o,args:n}).then(s=>JSON.parse(s.data))}async view(t,e,r,o=[],n=[]){return this.c.post("/initia/move/v1/view",{address:t,module_name:e,function_name:r,type_args:o,args:n})}async viewBatch(t){return this.c.post("/initia/move/v1/view/batch",{requests:t}).then(e=>e.responses)}async viewJSON(t,e,r,o=[],n=[]){return this.c.post("/initia/move/v1/view/json",{address:t,module_name:e,function_name:r,type_args:o,args:n})}async viewBatchJSON(t){return this.c.post("/initia/move/v1/view/json/batch",{requests:t}).then(e=>e.responses)}async scriptABI(t){return this.c.post("/initia/move/v1/script/abi",{code_bytes:t})}async denom(t,e={}){return this.c.get("/initia/move/v1/denom",{...e,metadata:t}).then(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(e=>Xn.fromData(e.params))}}class rm extends Q{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(o=>[[Bs.fromData(o.delegation_response)],{total:1,next_key:""}]);if(t!==void 0)return this.c.get(`/initia/mstaking/v1/delegations/${t}`,r).then(o=>[o.delegation_responses.map(Bs.fromData),o.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations`,r).then(o=>[o.delegation_responses.map(Bs.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(o=>[[Ht.fromData(o.unbond)],{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(Ht.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(Ht.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={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/redelegations`,{...o,src_validator_addr:e,dst_validator_addr:r}).then(n=>[n.redelegation_responses.map(ce.fromData),n.pagination])}async bondedValidators(t,e={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/validators`,e).then(r=>[r.validators.map(dt.fromData),r.pagination])}async validators(t={}){return this.c.get("/initia/mstaking/v1/validators",t).then(e=>[e.validators.map(dt.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/initia/mstaking/v1/validators/${t}`,e).then(r=>dt.fromData(r.validator))}async pool(t={}){return this.c.get("/initia/mstaking/v1/pool",t).then(e=>({bonded_tokens:l.fromData(e.pool.bonded_tokens),not_bonded_tokens:l.fromData(e.pool.not_bonded_tokens)}))}async parameters(t={}){return this.c.get("/initia/mstaking/v1/params",t).then(e=>ts.fromData(e.params))}}class om extends Q{async validators(t={}){return this.c.get("/opinit/opchild/v1/validators",t).then(e=>[e.validators.map(Aa.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/opinit/opchild/v1/validator/${t}`,e).then(r=>Aa.fromData(r.validator))}async bridgeInfo(t={}){return this.c.get("/opinit/opchild/v1/bridge_info",t).then(e=>Ie.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=>rs.fromData(e.params))}}class nm extends Q{async bridgeInfos(t={}){return this.c.get("/opinit/ophost/v1/bridges",t).then(e=>[e.bridges.map(Ie.fromData),e.pagination])}async bridgeInfo(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}`,e).then(r=>Ie.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:parseInt(r.output_index),output_proposal:Se.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:parseInt(o.bridge_id??`${t}`),output_index:parseInt(o.output_index),output_proposal:Se.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:parseInt(o.bridge_id??`${t}`),output_index:parseInt(o.output_index),output_proposal:Se.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=>ri.fromData(o)),r.pagination])}async parameters(t={}){return this.c.get("/opinit/ophost/v1/params",t).then(e=>es.fromData(e.params))}}class sm extends Q{async currencyPairs(t={}){return this.c.get("/connect/oracle/v2/get_all_tickers",t).then(e=>e.currency_pairs.map(Et.fromData))}async price(t,e={}){return this.c.get("/connect/oracle/v2/get_price",{...e,currency_pair:t.toString()}).then(r=>ei.fromData(r.price))}}class am extends Q{async last_dilution_timestamp(t={}){return this.c.get("/initia/reward/v1/last_dilution_timestamp",t).then(e=>e.last_dilution_timestamp)}async annualProvisions(t={}){return this.c.get("/initia/reward/v1/annual_provisions",t).then(e=>e.annual_provisions)}async parameters(t={}){return this.c.get("/initia/reward/v1/params",t).then(e=>os.fromData(e.params))}}class im extends Q{async signingInfos(t={}){return this.c.get("/cosmos/slashing/v1beta1/signing_infos",t).then(e=>[e.info.map(Pa.fromData),e.pagination])}async signingInfo(t,e={}){return this.c.get(`/cosmos/slashing/v1beta1/signing_infos/${t}`,e).then(r=>Pa.fromData(r.val_signing_info))}async parameters(t={}){return this.c.get("/cosmos/slashing/v1beta1/params",t).then(e=>ns.fromData(e.params))}}class cm extends Q{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 um extends Q{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(e=>ss.fromData(e.params))}}const lu=a=>Ce.bcs.bytes(32,a).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")}`}),bd={address:lu,object:lu,fixed_point32:a=>Ce.bcs.u64(a).transform({input:t=>F(t).times(new At.BigNumber("4294967296")).toFixed(0,At.BigNumber.ROUND_DOWN),output:t=>F(t).div(new At.BigNumber("4294967296")).toNumber()}),fixed_point64:a=>Ce.bcs.u128(a).transform({input:t=>F(t).times(new At.BigNumber("18446744073709551616")).toFixed(0,At.BigNumber.ROUND_DOWN),output:t=>F(t).div(new At.BigNumber("18446744073709551616")).toNumber()}),decimal128:a=>Ce.bcs.u128(a).transform({input:t=>F(t).times(new At.BigNumber("1000000000000000000")).toFixed(0,At.BigNumber.ROUND_DOWN),output:t=>F(t).div(new At.BigNumber("1000000000000000000")).toNumber()}),decimal256:a=>Ce.bcs.u256(a).transform({input:t=>F(t).times(new At.BigNumber("1000000000000000000")).toFixed(0,At.BigNumber.ROUND_DOWN),output:t=>F(t).div(new At.BigNumber("1000000000000000000")).toNumber()}),biguint:a=>Ce.bcs.vector(Ce.bcs.u8(a)).transform({input:t=>Ic(BigInt(t)),output:t=>Bc(t)}),bigdecimal:a=>Ce.bcs.vector(Ce.bcs.u8(a)).transform({input:t=>{const r=F(t).times(new At.BigNumber("1000000000000000000")).toFixed(0,At.BigNumber.ROUND_DOWN);return Ic(BigInt(r))},output:t=>{const e=Bc(t).toString();return F(e).div(new At.BigNumber("1000000000000000000")).toNumber()}})},Dd={...Ce.bcs,...bd};function Ic(a){const t=[];for(;a>0;)t.push(Number(a%BigInt(256))),a=a/BigInt(256);return new Uint8Array(t)}function Bc(a){let t=0n;for(;a.length>0;)t=t*256n+BigInt(a.pop());return t}function kd(a){return a.code!==void 0&&a.code!==0&&a.code!=="0"}class ec{constructor(t,e){this.gas_info=t,this.result=e}static fromData(t){return new ec({gas_wanted:parseInt(t.gas_info.gas_wanted),gas_used:parseInt(t.gas_info.gas_used)},t.result)}}class oi extends Q{constructor(t){super(t.apiRequester),this.rest=t}async txInfo(t,e={}){return this.c.getRaw(`/cosmos/tx/v1beta1/txs/${t}`,e).then(r=>ci.fromData(r.tx_response))}async create(t,e){let{fee:r}=e;const{msgs:o,memo:n,timeoutHeight:s}=e,i=[];for(const c of t){let d=c.sequenceNumber,g=c.publicKey;if(d===void 0||!g){const v=await this.rest.auth.accountInfo(c.address);d===void 0&&(d=v.getSequenceNumber()),g||(g=v.getPublicKey())}i.push({sequenceNumber:d,publicKey:g})}return r===void 0&&(r=await this.rest.tx.estimateFee(i,e)),new Dt(new zn(o,n??"",s??0),new De([],r),[])}async txInfosByHeight(t){const e=await this.rest.tendermint.blockInfo(t),{txs:r}=e.block.data;if(r){const o=r.map(s=>Wi(s)),n=[];for(const s of o)n.push(await this.txInfo(s));return n}else return[]}async estimateFee(t,e){const r=e.gasPrices??this.rest.config.gasPrices,o=e.gasAdjustment??this.rest.config.gasAdjustment,n=e.feeDenoms??["uinit"];let s=e.gas,i;if(r&&(i=new l(r),n)){const b=i.filter(k=>n.includes(k.denom));b.toArray().length>0&&(i=b)}const c=new zn(e.msgs,e.memo??""),d=new De([],new be(0,new l)),g=new Dt(c,d,[]);g.appendEmptySignatures(t),(!s||s==="auto"||s==="0")&&(s=await this.estimateGas(g,{gasAdjustment:o}));const v=i?i.mul(s).toIntCeilCoins():"0uinit";return new be(parseInt(s),v,"","")}async estimateGas(t,e){const r=(e==null?void 0:e.gasAdjustment)??this.rest.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 s=new De([],new be(0,new l));o=new Dt(t.body,s,[]),o.appendEmptySignatures(e.signers)}const n=await this.c.post("/cosmos/tx/v1beta1/simulate",{tx_bytes:oi.encode(o)}).then(s=>ec.fromData(s));return F(r??0).multipliedBy(n.gas_info.gas_used).toString()}static encode(t){return Buffer.from(t.toBytes()).toString("base64")}static decode(t){return Dt.fromBuffer(Buffer.from(t,"base64"))}static hash(t){const e=oi.encode(t);return Wi(e)}async _broadcast(t,e){const r=t instanceof Dt?oi.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: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 n;for(let s=0;s<=e/500;s++){try{n=await this.txInfo(o.txhash)}catch{}if(n)break;await new Promise(i=>setTimeout(i,500))}if(!n)throw new Error(`Transaction was not included in a block before timeout of ${e}ms`);return{txhash:n.txhash,raw_log:n.raw_log,gas_wanted:n.gas_wanted,gas_used:n.gas_used,height:+n.height,logs:(n.logs??[]).map(s=>ba.fromData(s)),code:n.code,codespace:n.codespace,timestamp:n.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,n)=>{if(!n.key)return o;const s=n.op??"=",i=n.key==="tx.height"?`${n.value}`:`'${n.value}'`,c=s==="EXISTS"?`${n.key} ${s}`:`${n.key} ${s} ${i}`;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(n=>ci.fromData(n)),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 n=[],s=`${t}::${e}`,i=[{key:"tx.height",value:r.toString(),op:">="},{key:"tx.height",value:o.toString(),op:"<="},{key:"move.type_tag",value:s,op:"CONTAINS"}],c=b=>b.events.filter(k=>{if(k.type!=="move")return!1;const C=k.attributes.find(N=>N.key==="type_tag");return C&&C.value.startsWith(s)}),{txs:d,total:g}=await this.search({query:i}),v=d.flatMap(b=>c(b));if(n.push(...v),g>100){const b=Math.ceil(g/100),k=[...Array(b-1).keys()].map(N=>N+2),C=await Promise.all(k.map(async N=>this.search({query:i,page:N}).then(K=>K.txs.flatMap(Y=>c(Y)))));n.push(...C.flat())}return n}async gasPrices(t={}){return this.c.get("/initia/tx/v1/gas_prices",t).then(e=>l.fromData(e.gas_prices))}async gasPrice(t,e={}){return this.c.get(`/initia/tx/v1/gas_prices/${t}`,e).then(r=>S.fromData(r.gas_price))}}class mm extends Q{async appliedPlan(t,e={}){return this.c.get(`/cosmos/upgrade/v1beta1/applied_plan/${t}`,e).then(r=>parseInt(r.height))}async currentPlan(t={}){return this.c.get("/cosmos/upgrade/v1beta1/current_plan",t).then(e=>e.plan?xe.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:parseInt(r.version)})))}}class dm extends Q{async contractInfo(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}`,e).then(r=>({code_id:parseInt(r.contract_info.code_id),creator:r.contract_info.creator,admin:r.contract_info.admin,label:r.contract_info.label,created:Ls.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:zt.contractCodeHistoryOperationTypeFromJSON(o.operation),code_id:parseInt(o.code_id),updated:Ls.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:parseInt(r.code_id),creator:r.creator,data_hash:r.data_hash,instantiate_permission:at.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:parseInt(r.code_info.code_id),creator:r.code_info.creator,data_hash:r.code_info.data_hash,instantiate_permission:at.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=>parseInt(r)),e.pagination])}async parameters(t={}){return this.c.get("/cosmwasm/wasm/v1/codes/params",t).then(e=>$n.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 lm{constructor(t,e){_(this,"accAddress");_(this,"lcd");this.rest=t,this.key=e,this.accAddress=e.accAddress,this.lcd=t}setAccountAddress(t){this.accAddress=t}async accountNumberAndSequence(){return this.rest.auth.accountInfo(this.accAddress).then(t=>({account_number:t.getAccountNumber(),sequence:t.getSequenceNumber()}))}async accountNumber(){return this.rest.auth.accountInfo(this.accAddress).then(t=>t.getAccountNumber())}async sequence(){return this.rest.auth.accountInfo(this.accAddress).then(t=>t.getSequenceNumber())}async createTx(t){return this.rest.tx.create([{address:this.accAddress,sequenceNumber:t.sequence,publicKey:this.key.publicKey}],t)}async createAndSignTx(t){this.rest.config.chainId||(this.rest.config.chainId=await this.rest.tendermint.chainId());let e=t.accountNumber,r=t.sequence;if(e===void 0||r===void 0){const n=await this.accountNumberAndSequence();e===void 0&&(e=n.account_number),r===void 0&&(r=n.sequence)}t.sequence=r,t.accountNumber=e;const o=await this.createTx(t);return this.key.signTx(o,{accountNumber:e,sequence:r,chainId:this.rest.config.chainId,signMode:t.signMode??Ot.SignMode.SIGN_MODE_DIRECT})}}const xd={gasAdjustment:"1.75"},pu={default:{uinit:.15}};class pm{constructor(t,e,r){_(this,"URL");_(this,"config");_(this,"apiRequester");_(this,"auction");_(this,"auth");_(this,"authz");_(this,"bank");_(this,"distribution");_(this,"evidence");_(this,"evm");_(this,"feeGrant");_(this,"forwarding");_(this,"gov");_(this,"group");_(this,"ibc");_(this,"ibcHooks");_(this,"ibcNft");_(this,"ibcTransfer");_(this,"ibcPerm");_(this,"interTx");_(this,"marketmap");_(this,"move");_(this,"mstaking");_(this,"opchild");_(this,"ophost");_(this,"oracle");_(this,"reward");_(this,"slashing");_(this,"tendermint");_(this,"tokenfactory");_(this,"tx");_(this,"upgrade");_(this,"wasm");this.URL=t,this.config={...xd,gasPrices:((e==null?void 0:e.chainId)&&pu[e.chainId])??pu.default,...e},this.apiRequester=r??new Cu(this.URL),this.auction=new Ou(this.apiRequester),this.auth=new Ru(this.apiRequester),this.authz=new qu(this.apiRequester),this.bank=new $u(this.apiRequester),this.distribution=new Lu(this.apiRequester),this.evidence=new Hu(this.apiRequester),this.evm=new zu(this.apiRequester),this.feeGrant=new Vu(this.apiRequester),this.forwarding=new Ku(this.apiRequester),this.gov=new Gu(this.apiRequester),this.group=new Wu(this.apiRequester),this.ibc=new ju(this.apiRequester),this.ibcHooks=new Ju(this.apiRequester),this.ibcNft=new Zu(this.apiRequester),this.ibcTransfer=new Yu(this.apiRequester),this.ibcPerm=new Xu(this.apiRequester),this.interTx=new Qu(this.apiRequester),this.marketmap=new tm(this.apiRequester),this.move=new em(this.apiRequester),this.mstaking=new rm(this.apiRequester),this.opchild=new om(this.apiRequester),this.ophost=new nm(this.apiRequester),this.oracle=new sm(this.apiRequester),this.reward=new am(this.apiRequester),this.slashing=new im(this.apiRequester),this.tendermint=new cm(this.apiRequester),this.tokenfactory=new um(this.apiRequester),this.tx=new oi(this),this.upgrade=new mm(this.apiRequester),this.wasm=new dm(this.apiRequester)}wallet(t){return new lm(this,t)}}class Md extends pm{}function Sd(a){if(a.__esModule)return a;var t=a.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(a).forEach(function(r){var o=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return a[r]}})}),e}var Tc={exports:{}},ni=typeof Reflect=="object"?Reflect:null,hu=ni&&typeof ni.apply=="function"?ni.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},zi;ni&&typeof ni.ownKeys=="function"?zi=ni.ownKeys:Object.getOwnPropertySymbols?zi=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:zi=function(t){return Object.getOwnPropertyNames(t)};function Id(a){console&&console.warn&&console.warn(a)}var hm=Number.isNaN||function(t){return t!==t};function nt(){nt.init.call(this)}Tc.exports=nt;Tc.exports.once=Ed;nt.EventEmitter=nt;nt.prototype._events=void 0;nt.prototype._eventsCount=0;nt.prototype._maxListeners=void 0;var fu=10;function rc(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(nt,"defaultMaxListeners",{enumerable:!0,get:function(){return fu},set:function(a){if(typeof a!="number"||a<0||hm(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");fu=a}});nt.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};nt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||hm(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 fm(a){return a._maxListeners===void 0?nt.defaultMaxListeners:a._maxListeners}nt.prototype.getMaxListeners=function(){return fm(this)};nt.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var o=t==="error",n=this._events;if(n!==void 0)o=o&&n.error===void 0;else if(!o)return!1;if(o){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var i=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw i.context=s,i}var c=n[t];if(c===void 0)return!1;if(typeof c=="function")hu(c,this,e);else for(var d=c.length,g=wm(c,d),r=0;r<d;++r)hu(g[r],this,e);return!0};function gm(a,t,e,r){var o,n,s;if(rc(e),n=a._events,n===void 0?(n=a._events=Object.create(null),a._eventsCount=0):(n.newListener!==void 0&&(a.emit("newListener",t,e.listener?e.listener:e),n=a._events),s=n[t]),s===void 0)s=n[t]=e,++a._eventsCount;else if(typeof s=="function"?s=n[t]=r?[e,s]:[s,e]:r?s.unshift(e):s.push(e),o=fm(a),o>0&&s.length>o&&!s.warned){s.warned=!0;var i=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");i.name="MaxListenersExceededWarning",i.emitter=a,i.type=t,i.count=s.length,Id(i)}return a}nt.prototype.addListener=function(t,e){return gm(this,t,e,!1)};nt.prototype.on=nt.prototype.addListener;nt.prototype.prependListener=function(t,e){return gm(this,t,e,!0)};function Bd(){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 ym(a,t,e){var r={fired:!1,wrapFn:void 0,target:a,type:t,listener:e},o=Bd.bind(r);return o.listener=e,r.wrapFn=o,o}nt.prototype.once=function(t,e){return rc(e),this.on(t,ym(this,t,e)),this};nt.prototype.prependOnceListener=function(t,e){return rc(e),this.prependListener(t,ym(this,t,e)),this};nt.prototype.removeListener=function(t,e){var r,o,n,s,i;if(rc(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(n=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){i=r[s].listener,n=s;break}if(n<0)return this;n===0?r.shift():Ud(r,n),r.length===1&&(o[t]=r[0]),o.removeListener!==void 0&&this.emit("removeListener",t,i||e)}return this};nt.prototype.off=nt.prototype.removeListener;nt.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 n=Object.keys(r),s;for(o=0;o<n.length;++o)s=n[o],s!=="removeListener"&&this.removeAllListeners(s);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 _m(a,t,e){var r=a._events;if(r===void 0)return[];var o=r[t];return o===void 0?[]:typeof o=="function"?e?[o.listener||o]:[o]:e?Cd(o):wm(o,o.length)}nt.prototype.listeners=function(t){return _m(this,t,!0)};nt.prototype.rawListeners=function(t){return _m(this,t,!1)};nt.listenerCount=function(a,t){return typeof a.listenerCount=="function"?a.listenerCount(t):vm.call(a,t)};nt.prototype.listenerCount=vm;function vm(a){var t=this._events;if(t!==void 0){var e=t[a];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}nt.prototype.eventNames=function(){return this._eventsCount>0?zi(this._events):[]};function wm(a,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=a[r];return e}function Ud(a,t){for(;t+1<a.length;t++)a[t]=a[t+1];a.pop()}function Cd(a){for(var t=new Array(a.length),e=0;e<t.length;++e)t[e]=a[e].listener||a[e];return t}function Ed(a,t){return new Promise(function(e,r){function o(s){a.removeListener(t,n),r(s)}function n(){typeof a.removeListener=="function"&&a.removeListener("error",o),e([].slice.call(arguments))}Am(a,t,n,{once:!0}),t!=="error"&&Od(a,o,{once:!0})})}function Od(a,t,e){typeof a.on=="function"&&Am(a,"error",t,e)}function Am(a,t,e,r){if(typeof a.on=="function")r.once?a.once(t,e):a.on(t,e);else if(typeof a.addEventListener=="function")a.addEventListener(t,function o(n){r.once&&a.removeEventListener(t,o),e(n)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a)}var Nd=Tc.exports;const gu=a=>a.replace(/'/g,"\\'");function Td(a){const t=[];for(const e of Object.keys(a)){let r;const o=a[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 '${gu(o[1])}'`;break;case"EXISTS":r=`${e} EXISTS`;break}else switch(typeof o){case"number":r=`${e}=${o}`;break;case"string":r=`${e}='${gu(o)}'`;break;default:r=`${e}=${o.toISOString()}`}t.push(r)}return t.join(" AND ")}class Fd extends Nd.EventEmitter{constructor(e,r=0,o=1e3){super();_(this,"isConnected");_(this,"reconnectTimeoutId");_(this,"queryParams");_(this,"callback");_(this,"shouldAttemptReconnect");_(this,"socket");_(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 hd(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=Td({"tm.event":e,...r}),this.callback=o}subscribeTx(e,r){const o=n=>(n.value.TxResult.txhash=Wi(n.value.TxResult.tx),r(n));this.subscribe("Tx",e,o)}}const Rd={},qd=Object.freeze(Object.defineProperty({__proto__:null,default:Rd},Symbol.toStringTag,{value:"Module"})),mi=85,Uc=250,$d="CSM",di={GET_VERSION:0,INS_PUBLIC_KEY_SECP256K1:1,SIGN_SECP256K1:2,GET_ADDR_SECP256K1:4},Vi={INIT:0,ADD:1,LAST:2},Fc={ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},Da={NoError:36864},Cc={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 ka(a){return a in Cc?Cc[a]:`Unknown Status Code: ${a}`}function Ld(a){return typeof a=="object"&&a!==null&&!(a instanceof Array)&&!(a instanceof Date)}function Os(a){if(a){if(Ld(a)){if(Object.prototype.hasOwnProperty.call(a,"statusCode"))return{return_code:a.statusCode,error_message:ka(a.statusCode)};if(Object.prototype.hasOwnProperty.call(a,"return_code")&&Object.prototype.hasOwnProperty.call(a,"error_message"))return a}return{return_code:65535,error_message:a.toString()}}return{return_code:65535,error_message:a.toString()}}function Ki(a){if((a==null?void 0:a.length)!==5)throw new TypeError("Invalid path.");const t=Buffer.alloc(20);return t.writeUInt32LE(2147483648+a[0],0),t.writeUInt32LE(2147483648+a[1],4),t.writeUInt32LE(2147483648+a[2],8),t.writeUInt32LE(a[3],12),t.writeUInt32LE(a[4],16),t}async function Hd(a){return a.send(mi,di.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:ka(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(Os)}async function zd(a){return a.send(176,1,0,0).then(t=>{const e=t.slice(-2);let r=e[0]*256+e[1],o,n="err",s="err",i=0,c=0;if(t[0]!==1)o="response format ID not recognized",r=36865;else{o="No errors";const d=t[1];n=t.slice(2,2+d).toString("ascii");let g=2+d;const v=t[g];g+=1,s=t.slice(g,g+v).toString("ascii"),g+=v;const b=t[g];g+=1,i=b,c=t[g]}return{return_code:r,error_message:o,app_name:n,app_version:s,flag_len:i,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(Os)}async function Vd(a){return a.send(224,1,0,0,Buffer.from([]),[Da.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 n=4;const s=t[n];n+=1;const i=t.slice(n,n+s).toString();n+=s;const c=t[n];n+=1;const d=t.slice(n,n+c).toString("hex");n+=c;const g=t[n];n+=1;let v=t.slice(n,n+g);v[g-1]===0&&(v=t.slice(n,n+g-1));const b=v.toString();return{return_code:r,error_message:ka(r),target_id:o,se_version:i,flag:d,mcu_version:b}}).catch(Os)}async function Kd(a,t){return a.send(mi,di.GET_ADDR_SECP256K1,0,0,t,[Da.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],n=e?Buffer.from(e.slice(0,33)):null;return{pk:"OBSOLETE PROPERTY",compressed_pk:n&&n.toJSON(),return_code:o,error_message:ka(o)}}).catch(Os)}async function Gd(a,t){return a.send(mi,di.GET_ADDR_SECP256K1,Fc.ONLY_RETRIEVE,0,t,[Da.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],n=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:n.toJSON(),return_code:o,error_message:ka(o)}}).catch(Os)}async function Wd(a,t){return a.send(mi,di.GET_ADDR_SECP256K1,Fc.SHOW_ADDRESS_IN_DEVICE,0,t,[Da.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],n=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:n.toJSON(),return_code:o,error_message:ka(o)}}).catch(Os)}function jd(a,t){const e=Ki(a),r=[];if(e instanceof Buffer){r.push(e);const o=Buffer.from(t);for(let n=0;n<o.length;n+=Uc){let s=n+Uc;n>o.length&&(s=o.length),r.push(o.slice(n,s))}}return r}async function yu(a,t,e,r){let o=Vi.ADD;return t===1&&(o=Vi.INIT),t===e&&(o=Vi.LAST),a.send(mi,di.SIGN_SECP256K1,o,0,r,[Da.NoError,27012,27264]).then(n=>{const s=n.slice(-2),i=s[0]*256+s[1];let c=ka(i);(i===27264||i===27012)&&(c=`${c} : ${n.slice(0,n.length-2).toString("ascii")}`);let d=Buffer.from([]);return n.length>2&&(d=n.slice(0,n.length-2)),{signature:d.toJSON(),return_code:i,error_message:c}}).catch(Os)}async function Jd(a,t,e){const r=jd(t,e);return yu(a,1,r.length,r[0]).then(async o=>{let n={return_code:o.return_code,error_message:o.error_message,signature:{type:"Buffer",data:[]}};for(let s=1;s<r.length&&(n=await yu(a,1+s,r.length,r[s]),n.return_code===Da.NoError);s+=1);return{return_code:n.return_code,error_message:n.error_message,signature:n.signature}}).catch(Os)}const Zd="Initia",Yd="Cosmos";class xi{constructor(t){_(this,"transport");_(this,"info");_(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 fd().update(r).digest();return et.bech32.encode(t,et.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===Zd&&this.version.major===1||this.info.app_name===Yd&&this.version.major===2)return}return{return_code:25600,error_message:"App Version is not supported"}}async initialize(){return zd(this.transport).then(t=>(this.info=t,Hd(this.transport))).then(t=>(this.version=t,this.validateCompatibility()))}getInfo(){return this.info}getVersion(){return this.version}getDeviceInfo(){return Vd(this.transport)}getPublicKey(t){const e=Ki(t),r=Buffer.concat([xi.serializeHRP("init"),e]);return Kd(this.transport,r)}getAddressAndPubKey(t,e){const r=Ki(t),o=Buffer.concat([xi.serializeHRP(e),r]);return Gd(this.transport,o)}showAddressAndPubKey(t,e){const r=Ki(t),o=Buffer.concat([xi.serializeHRP(e),r]);return Wd(this.transport,o)}sign(t,e){return Jd(this.transport,t,e)}}class Rc{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 et.bech32.encode("initvaloper",et.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 lt(this.publicKey,new lt.Descriptor(new lt.Descriptor.Single(Ot.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 Jt(this.publicKey,t.sequence,new X(new X.Single(Ot.SignMode.SIGN_MODE_DIRECT)))];const r=(await this.sign(Buffer.from(t.toBytes()))).toString("base64");return t.auth_info.signer_infos=e,new lt(this.publicKey,new lt.Descriptor(new lt.Descriptor.Single(Ot.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:
1
+ "use strict";var Zm=Object.defineProperty;var Ym=(a,t,e)=>t in a?Zm(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var _=(a,t,e)=>Ym(a,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const uu=require("axios"),Xm=require("@initia/initia.proto/cosmos/tx/v1beta1/service"),At=require("bignumber.js"),Qm=require("@initia/initia.proto/cosmos/base/v1beta1/coin"),f=require("@initia/initia.proto/google/protobuf/any"),Oa=require("@initia/initia.proto/sdk/auction/v1/tx"),td=require("@initia/initia.proto/sdk/auction/v1/genesis"),ed=require("@initia/initia.proto/google/protobuf/duration"),$s=require("@initia/initia.proto/cosmos/auth/v1beta1/auth"),dc=require("@initia/initia.proto/cosmos/auth/v1beta1/tx"),wu=require("secp256k1"),Au=require("jscrypto/SHA256"),rd=require("jscrypto/RIPEMD160"),od=require("jscrypto/Base64"),Gi=require("jscrypto"),Pu=require("keccak256"),lc=require("@initia/initia.proto/cosmos/crypto/multisig/keys"),pc=require("@initia/initia.proto/cosmos/crypto/secp256k1/keys"),hc=require("@initia/initia.proto/cosmos/crypto/ed25519/keys"),fc=require("@initia/initia.proto/initia/crypto/v1beta1/ethsecp256k1/keys"),et=require("bech32"),Le=require("@initia/initia.proto/initia/mstaking/v1/authz"),gc=require("@initia/initia.proto/cosmos/bank/v1beta1/authz"),qi=require("@initia/initia.proto/cosmos/authz/v1beta1/authz"),Na=require("@initia/initia.proto/initia/move/v1/authz"),Wt=require("@initia/initia.proto/initia/move/v1/types"),rt=require("@initia/initia.proto/cosmwasm/wasm/v1/authz"),zt=require("@initia/initia.proto/cosmwasm/wasm/v1/types"),E=require("@initia/initia.proto/cosmwasm/wasm/v1/tx"),$i=require("@initia/initia.proto/ibc/applications/transfer/v1/authz"),Ta=require("@initia/initia.proto/ibc/applications/transfer/v1/tx"),Ii=require("@initia/initia.proto/ibc/core/client/v1/client"),bu=require("@initia/initia.proto/ibc/applications/transfer/v1/transfer"),nd=require("@initia/initia.proto/ibc/applications/transfer/v2/packet"),Tn=require("@initia/initia.proto/cosmos/authz/v1beta1/tx"),Yt=require("@initia/initia.proto/cosmos/bank/v1beta1/tx"),si=require("@initia/initia.proto/cosmos/bank/v1beta1/bank"),yc=require("@initia/initia.proto/initia/bank/v1/tx"),_c=require("@initia/initia.proto/celestia/blob/v1/tx"),Mc=require("@initia/initia.proto/celestia/blob/v1/blob"),Ot=require("@initia/initia.proto/cosmos/tx/signing/v1beta1/signing"),Mt=require("@initia/initia.proto/cosmos/tx/v1beta1/tx"),Sc=require("@initia/initia.proto/cosmos/crypto/multisig/v1beta1/multisig"),Xi=require("@initia/initia.proto/tendermint/types/params"),vc=require("@initia/initia.proto/cosmos/consensus/v1/tx"),yi=require("@initia/initia.proto/cosmos/crisis/v1beta1/tx"),It=require("@initia/initia.proto/cosmos/distribution/v1beta1/tx"),Du=require("@initia/initia.proto/initia/distribution/v1/distribution"),Fa=require("@initia/initia.proto/initia/distribution/v1/tx"),wc=require("@initia/initia.proto/cosmos/evidence/v1beta1/tx"),Ac=require("@initia/initia.proto/cosmos/evidence/v1beta1/evidence"),ku=require("@initia/initia.proto/minievm/evm/v1/types"),Xt=require("@initia/initia.proto/minievm/evm/v1/tx"),Fn=require("@initia/initia.proto/cosmos/feegrant/v1beta1/feegrant"),Ra=require("@initia/initia.proto/cosmos/feegrant/v1beta1/tx"),qa=require("@initia/initia.proto/noble/forwarding/v1/tx"),Bt=require("@initia/initia.proto/cosmos/gov/v1/tx"),Qt=require("@initia/initia.proto/cosmos/gov/v1beta1/tx"),Li=require("@initia/initia.proto/cosmos/params/v1beta1/params"),Hi=require("@initia/initia.proto/cosmos/gov/v1beta1/gov"),me=require("@initia/initia.proto/cosmos/gov/v1/gov"),Qi=require("@initia/initia.proto/initia/gov/v1/gov"),Pc=require("@initia/initia.proto/initia/gov/v1/tx"),V=require("@initia/initia.proto/cosmos/group/v1/types"),R=require("@initia/initia.proto/cosmos/group/v1/tx"),te=require("@initia/initia.proto/ibc/applications/fee/v1/tx"),xu=require("@initia/initia.proto/ibc/applications/fee/v1/fee"),ui=require("@initia/initia.proto/ibc/core/channel/v1/channel"),sd=require("@initia/initia.proto/ibc/applications/fee/v1/metadata"),$a=require("@initia/initia.proto/initia/ibchooks/v1/tx"),Mu=require("@initia/initia.proto/initia/ibchooks/v1/types"),La=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/tx"),Su=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/types"),ad=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/packet"),Ha=require("@initia/initia.proto/ibc/applications/perm/v1/tx"),J=require("@initia/initia.proto/ibc/core/channel/v1/tx"),ft=require("@initia/initia.proto/ibc/core/client/v1/tx"),id=require("@initia/initia.proto/cosmos/upgrade/v1beta1/upgrade"),za=require("@initia/initia.proto/cosmos/upgrade/v1beta1/tx"),Iu=require("@initia/initia.proto/ibc/core/commitment/v1/commitment"),ue=require("@initia/initia.proto/ibc/core/connection/v1/connection"),Ut=require("@initia/initia.proto/ibc/core/connection/v1/tx"),Va=require("@initia/initia.proto/initia/intertx/v1/tx"),Ct=require("@initia/initia.proto/connect/marketmap/v2/tx"),Ka=require("@initia/initia.proto/connect/oracle/v2/tx"),cd=require("@initia/initia.proto/connect/types/v2/currency_pair"),ud=require("@initia/initia.proto/connect/oracle/v2/genesis"),Oc=require("@initia/initia.proto/connect/marketmap/v2/market"),md=require("@initia/initia.proto/connect/marketmap/v2/params"),H=require("@initia/initia.proto/initia/move/v1/tx"),gt=require("@initia/initia.proto/initia/mstaking/v1/tx"),Nt=require("@initia/initia.proto/initia/mstaking/v1/staking"),st=require("@initia/opinit.proto/opinit/opchild/v1/tx"),Nc=require("@initia/opinit.proto/opinit/opchild/v1/types"),z=require("@initia/opinit.proto/opinit/ophost/v1/tx"),He=require("@initia/opinit.proto/opinit/ophost/v1/types"),dd=require("@initia/initia.proto/initia/reward/v1/types"),bc=require("@initia/initia.proto/initia/reward/v1/tx"),Ga=require("@initia/initia.proto/cosmos/slashing/v1beta1/tx"),Bu=require("@initia/initia.proto/cosmos/slashing/v1beta1/slashing"),ct=require("@initia/initia.proto/miniwasm/tokenfactory/v1/tx"),ld=require("@initia/initia.proto/miniwasm/tokenfactory/v1/params"),pd=require("@initia/initia.proto/cosmos/base/abci/v1beta1/abci"),Ce=require("@mysten/bcs"),hd=require("ws"),fd=require("ripemd160"),gd=require("semver"),yd=require("bip32"),mu=require("bip39");function Uu(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const _i=Uu(wu),_d=Uu(gd),vd=Xm.OrderBy;class Cu{constructor(t,e){_(this,"axios");_(this,"baseURL");this.baseURL=t;const r={headers:{Accept:"application/json"},timeout:3e4};this.axios=uu.create({...r,...e,headers:{...r.headers,...e==null?void 0:e.headers}})}validateEndpoint(t){if(["../","..\\","%2E%2E%2F","%2E%2E%5C"].some(r=>t.includes(r)))throw new Error("Relative path not allowed");if(t.includes("?"))throw new Error("Query param should be passed via the params argument")}computeEndpoint(t){const e=t.replace(/^\/+/,""),r=new URL(this.baseURL);return r.pathname.endsWith("/")||(r.pathname+="/"),r.pathname+=e,r.toString()}async getRaw(t,e={}){this.validateEndpoint(t);const r=this.computeEndpoint(t);return this.axios.get(r,{params:e}).then(o=>o.data)}async get(t,e={},r=new uu.AxiosHeaders){this.validateEndpoint(t);const o=this.computeEndpoint(t);return this.axios.get(o,{params:e,headers:r}).then(n=>n.data)}async post(t,e){this.validateEndpoint(t);const r=this.computeEndpoint(t);return this.axios.post(r,e).then(o=>o.data)}}function Mi(a){if(Array.isArray(a))return a.map(Mi);if(typeof a!="object"||a===null)return a;const t={};return Object.keys(a).sort().forEach(e=>{a[e]===void 0||a[e]===null||(t[e]=Mi(a[e]))}),t}class u{toJSON(){return JSON.stringify(Mi(this.toData()))}toAminoJSON(){return JSON.stringify(Mi(this.toAmino()))}}function Eu(a){return a!==null&&typeof a=="object"?Object.entries(a).filter(([,t])=>t!=null).reduce((t,[e,r])=>({...t,[e]:r===Object(r)&&!Array.isArray(r)?Eu(r):r}),{}):a}function F(a){return new At.BigNumber(a)}function qs(a){return typeof a=="string"?a.includes("."):!F(a).isInteger()}class S extends u{constructor(e,r){super();_(this,"amount");_(this,"isDecimal");this.denom=e,this.amount=F(r).toFixed(),this.isDecimal=qs(r)}toIntCoin(){return new S(this.denom,F(this.amount).toFixed(0))}toIntCeilCoin(){return new S(this.denom,F(this.amount).toFixed(0,At.BigNumber.ROUND_CEIL))}toDecCoin(){return new S(this.denom,this.amount.includes(".")?this.amount:F(this.amount).toFixed(1))}toString(){return`${this.isDecimal&&!this.amount.includes(".")?F(this.amount).toFixed(1):F(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],n=r[3];return new S(n,o)}add(e){let r,o=this.isDecimal;if(e instanceof S){if(e.denom!==this.denom)throw new S.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||qs(e);const n=F(this.amount).plus(r);return new S(this.denom,o&&n.isInteger()?n.toFixed(1):n.toFixed())}sub(e){let r,o=this.isDecimal;if(e instanceof S){if(e.denom!==this.denom)throw new S.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||qs(e);const n=F(this.amount).minus(r);return new S(this.denom,o&&n.isInteger()?n.toFixed(1):n.toFixed())}mul(e){const r=this.isDecimal||qs(e),o=F(this.amount).multipliedBy(e);return new S(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}div(e){const r=this.isDecimal||qs(e),o=F(this.amount).dividedBy(e);return new S(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}mod(e){const r=this.isDecimal||qs(e),o=F(this.amount).mod(e);return new S(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}static fromAmino(e){const{denom:r,amount:o}=e;return new S(r,o)}toAmino(){const{denom:e,amount:r}=this;return{denom:e,amount:this.isDecimal?F(r).toFixed(18):r}}static fromData(e){const{denom:r,amount:o}=e;return new S(r,o)}toData(){const{denom:e,amount:r}=this;return{denom:e,amount:this.isDecimal?F(r).toFixed(18):r}}static fromProto(e){return new S(e.denom,e.amount)}toProto(){return Qm.Coin.fromPartial({denom:this.denom,amount:this.isDecimal?F(this.amount).toFixed(18):this.amount})}}(a=>{class t{constructor(r){this.message=r}}a.ArithmeticError=t})(S||(S={}));class ze extends u{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 ze(e,S.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 ze(e,S.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 ze(t.bidder,S.fromProto(t.bid),t.transactions.map(e=>Buffer.from(e).toString("base64")))}toProto(){const{bidder:t,bid:e,transactions:r}=this;return Oa.MsgAuctionBid.fromPartial({bidder:t,bid:e.toProto(),transactions:r.map(o=>Buffer.from(o,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgAuctionBid",value:Oa.MsgAuctionBid.encode(this.toProto()).finish()})}static unpackAny(t){return ze.fromProto(Oa.MsgAuctionBid.decode(t.value))}}class Rn extends u{constructor(t,e,r,o,n,s){super(),this.max_bundle_size=t,this.escrow_account_address=e,this.reserve_fee=r,this.min_bid_increment=o,this.front_running_protection=n,this.proposer_fee=s}static fromAmino(t){const{value:{max_bundle_size:e,escrow_account_address:r,reserve_fee:o,min_bid_increment:n,front_running_protection:s,proposer_fee:i}}=t;return new Rn(parseInt(e),r,S.fromAmino(o),S.fromAmino(n),s,i)}toAmino(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:n,proposer_fee:s}=this;return{type:"block-sdk/x/auction/Params",value:{max_bundle_size:t.toFixed(),escrow_account_address:e,reserve_fee:r.toAmino(),min_bid_increment:o.toAmino(),front_running_protection:n,proposer_fee:s}}}static fromData(t){const{max_bundle_size:e,escrow_account_address:r,reserve_fee:o,min_bid_increment:n,front_running_protection:s,proposer_fee:i}=t;return new Rn(parseInt(e),r,S.fromData(o),S.fromData(n),s,i)}toData(){const{max_bundle_size:t,escrow_account_address:e,reserve_fee:r,min_bid_increment:o,front_running_protection:n,proposer_fee:s}=this;return{"@type":"/sdk.auction.v1.Params",max_bundle_size:t.toFixed(),escrow_account_address:e,reserve_fee:r.toData(),min_bid_increment:o.toData(),front_running_protection:n,proposer_fee:s}}static fromProto(t){return new Rn(t.maxBundleSize,Buffer.from(t.escrowAccountAddress).toString("base64"),S.fromProto(t.reserveFee),S.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:n,proposer_fee:s}=this;return td.Params.fromPartial({maxBundleSize:t,escrowAccountAddress:Buffer.from(e,"base64"),reserveFee:r.toProto(),minBidIncrement:o.toProto(),frontRunningProtection:n,proposerFee:s})}}class Ve extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ve(e,Rn.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 Ve(e,Rn.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 Ve(t.authority,Rn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Oa.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgUpdateParams",value:Oa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ve.fromProto(Oa.MsgUpdateParams.decode(t.value))}}class Q{constructor(t){this.c=t}}class Ou extends Q{async parameters(t={}){return this.c.get("/block-sdk/auction/v1/params",t).then(e=>Rn.fromData(e.params))}}class l extends u{constructor(e={}){super();_(this,"_coins");if(e instanceof l)this._coins={...e._coins};else if(typeof e=="string")this._coins=l.fromString(e)._coins;else{this._coins={};let r;Array.isArray(e)?r=e:(r=[],Object.keys(e).forEach(o=>r.push(new S(o,e[o]))));for(const o of r){const{denom:n}=o,s=this._coins[n];s!==void 0?this._coins[n]=s.add(o):this._coins[n]=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(n=>S.fromString(n));return new l(o)}denoms(){return this.map(e=>e.denom)}toDecCoins(){return new l(this.map(e=>e.toDecCoin()))}toIntCoins(){return new l(this.map(e=>e.toIntCoin()))}toIntCeilCoins(){return new l(this.map(e=>e.toIntCeilCoin()))}get(e){return this._coins[e]}set(e,r){let o;if(r instanceof S){if(r.denom!=e)throw new Error(`Denoms must match when setting: ${e}, ${r.denom}`);o=r}else o=new S(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 S?new l([e,...Object.values(this._coins)]):new l([...Object.values(e._coins),...Object.values(this._coins)])}sub(e){return this.add(e.mul(-1))}mul(e){return new l(this.map(r=>r.mul(e)))}div(e){return new l(this.map(r=>r.div(e)))}mod(e){return new l(this.map(r=>r.mod(e)))}map(e){return this.toArray().map(e)}filter(e){return new l(this.toArray().filter(e))}static fromAmino(e){return new l((e??[]).map(S.fromAmino))}toAmino(){return this.toArray().map(e=>e.toAmino())}static fromData(e){return new l((e??[]).map(S.fromData))}toData(){return this.toArray().map(e=>e.toData())}static fromProto(e){return new l((e??[]).map(S.fromProto))}toProto(){return this.toArray().map(e=>e.toProto())}}class q{constructor(t,e=0){_(this,"seconds");_(this,"nanos");const[r,o]=(e/Math.pow(10,9)+t).toFixed(9).split(".");this.seconds=parseInt(r),this.nanos=parseInt(o)}static fromString(t){const[e,r]=parseFloat(t.replace("s","")).toFixed(9).split(".");return new q(parseInt(e),parseInt(r))}toString(){return`${this.nanos/Math.pow(10,9)+this.seconds}s`}static fromAmino(t){return q.fromString(t)}toAmino(){return this.toString()}static fromData(t){return q.fromString(t)}toData(){return this.toString()}static fromProto(t){return new q(Number(t.seconds),t.nanos)}toProto(){return ed.Duration.fromPartial({seconds:BigInt(this.seconds),nanos:this.nanos})}}class qn extends u{constructor(t,e,r,o,n){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=n}static fromAmino(t){const{value:{max_memo_characters:e,tx_sig_limit:r,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:n,sig_verify_cost_secp256k1:s}}=t;return new qn(parseInt(e),parseInt(r),parseInt(o),parseInt(n),parseInt(s))}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:n}=this;return{type:"cosmos-sdk/x/auth/Params",value:{max_memo_characters:t.toFixed(),tx_sig_limit:e.toFixed(),tx_size_cost_per_byte:r.toFixed(),sig_verify_cost_ed25519:o.toFixed(),sig_verify_cost_secp256k1:n.toFixed()}}}static fromData(t){const{max_memo_characters:e,tx_sig_limit:r,tx_size_cost_per_byte:o,sig_verify_cost_ed25519:n,sig_verify_cost_secp256k1:s}=t;return new qn(parseInt(e),parseInt(r),parseInt(o),parseInt(n),parseInt(s))}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:n}=this;return{"@type":"/cosmos.auth.v1beta1.Params",max_memo_characters:t.toFixed(),tx_sig_limit:e.toFixed(),tx_size_cost_per_byte:r.toFixed(),sig_verify_cost_ed25519:o.toFixed(),sig_verify_cost_secp256k1:n.toFixed()}}static fromProto(t){return new qn(Number(t.maxMemoCharacters),Number(t.txSigLimit),Number(t.txSizeCostPerByte),Number(t.sigVerifyCostEd25519),Number(t.sigVerifyCostSecp256k1))}toProto(){const{max_memo_characters:t,tx_sig_limit:e,tx_size_cost_per_byte:r,sig_verify_cost_ed25519:o,sig_verify_cost_secp256k1:n}=this;return $s.Params.fromPartial({maxMemoCharacters:BigInt(t),txSigLimit:BigInt(e),txSizeCostPerByte:BigInt(r),sigVerifyCostEd25519:BigInt(o),sigVerifyCostSecp256k1:BigInt(n)})}}class Ke extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ke(e,qn.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 Ke(e,qn.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 Ke(t.authority,qn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return dc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.MsgUpdateParams",value:dc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ke.fromProto(dc.MsgUpdateParams.decode(t.value))}}function Wi(a){return Au.SHA256.hash(od.Base64.parse(a)).toString().toUpperCase()}function tc(a){return Au.SHA256.hash(new Gi.Word32Array(a)).toUint8Array()}function Nu(a){return Pu(Buffer.from(a))}function Tu(a){return rd.RIPEMD160.hash(new Gi.Word32Array(a)).toUint8Array()}const wd=Buffer.from("eb5ae98721","hex"),Ad=Buffer.from("22c1f7e2","hex"),du=a=>{const t=parseInt(a.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;(a=>{function t(o){switch(o.type){case"tendermint/PubKeySecp256k1":return Pt.fromAmino(o);case"tendermint/PubKeyMultisigThreshold":return Ee.fromAmino(o);case"tendermint/PubKeyEd25519":return _t.fromAmino(o);case"initia/PubKeyEthSecp256k1":return Oe.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.crypto.secp256k1.PubKey":return Pt.fromData(o);case"/cosmos.crypto.multisig.LegacyAminoPubKey":return Ee.fromData(o);case"/cosmos.crypto.ed25519.PubKey":return _t.fromData(o);case"/initia.crypto.v1beta1.ethsecp256k1.PubKey":return Oe.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;if(n==="/cosmos.crypto.secp256k1.PubKey")return Pt.unpackAny(o);if(n==="/cosmos.crypto.multisig.LegacyAminoPubKey")return Ee.unpackAny(o);if(n==="/cosmos.crypto.ed25519.PubKey")return _t.unpackAny(o);if(n==="/initia.crypto.v1beta1.ethsecp256k1.PubKey")return Oe.unpackAny(o);throw new Error(`Pubkey type ${n} not recognized`)}a.fromProto=r})(exports.PublicKey||(exports.PublicKey={}));class Pt extends u{constructor(t){super(),this.key=t}static fromAmino(t){return new Pt(t.value)}toAmino(){return{type:"tendermint/PubKeySecp256k1",value:this.key}}static fromData(t){return new Pt(t.key)}toData(){return{"@type":"/cosmos.crypto.secp256k1.PubKey",key:this.key}}static fromProto(t){return new Pt(Buffer.from(t.key).toString("base64"))}toProto(){return pc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:pc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Pt.fromProto(pc.PubKey.decode(t.value))}encodeAminoPubkey(){return Buffer.concat([wd,Buffer.from(this.key,"base64")])}rawAddress(){const t=Buffer.from(this.key,"base64");return Tu(tc(t))}address(){return et.bech32.encode("init",et.bech32.toWords(this.rawAddress()))}}class Ee extends u{constructor(t,e){super(),this.threshold=t,this.pubkeys=e}encodeAminoPubkey(){const t=Array.from(Ad);t.push(8),t.push(...du(this.threshold));for(const e of this.pubkeys.map(r=>r.encodeAminoPubkey()))t.push(18),t.push(...du(e.length)),t.push(...Array.from(e));return new Uint8Array(t)}rawAddress(){const t=this.encodeAminoPubkey();return tc(t).slice(0,20)}address(){return et.bech32.encode("init",et.bech32.toWords(this.rawAddress()))}static fromAmino(t){return new Ee(parseInt(t.value.threshold),t.value.pubkeys.map(e=>Pt.fromAmino(e)))}toAmino(){return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:this.threshold.toFixed(),pubkeys:this.pubkeys.map(t=>t.toAmino())}}}static fromData(t){return new Ee(parseInt(t.threshold),t.public_keys.map(e=>Pt.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 Ee(t.threshold,t.publicKeys.map(e=>Pt.unpackAny(e)))}toProto(){return lc.LegacyAminoPubKey.fromPartial({threshold:this.threshold,publicKeys:this.pubkeys.map(t=>t.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:lc.LegacyAminoPubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Ee.fromProto(lc.LegacyAminoPubKey.decode(t.value))}}class _t extends u{constructor(t){super(),this.key=t}static fromAmino(t){return new _t(t.value)}toAmino(){return{type:"tendermint/PubKeyEd25519",value:this.key}}static fromData(t){return new _t(t.key)}toData(){return{"@type":"/cosmos.crypto.ed25519.PubKey",key:this.key}}static fromProto(t){return new _t(Buffer.from(t.key).toString("base64"))}toProto(){return hc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:hc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return _t.fromProto(hc.PubKey.decode(t.value))}rawAddress(){const t=Buffer.from(this.key,"base64");return tc(t).slice(0,20)}address(){return et.bech32.encode("initvalcons",et.bech32.toWords(this.rawAddress()))}}class Oe extends u{constructor(t){super(),this.key=t}static fromAmino(t){return new Oe(t.value)}toAmino(){return{type:"initia/PubKeyEthSecp256k1",value:this.key}}static fromData(t){return new Oe(t.key)}toData(){return{"@type":"/initia.crypto.v1beta1.ethsecp256k1.PubKey",key:this.key}}static fromProto(t){return new Oe(Buffer.from(t.key).toString("base64"))}toProto(){return fc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.crypto.v1beta1.ethsecp256k1.PubKey",value:fc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Oe.fromProto(fc.PubKey.decode(t.value))}rawAddress(){if(!_i.publicKeyVerify(Buffer.from(this.key,"base64")))throw new Error("Invalid public key");const e=_i.publicKeyConvert(Buffer.from(this.key,"base64"),!1);return Nu(e.slice(1)).slice(12)}address(){return et.bech32.encode("init",et.bech32.toWords(this.rawAddress()))}}class jt extends u{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}static fromAmino(t){const{value:{address:e,public_key:r,account_number:o,sequence:n}}=t;return new jt(e??"",r?exports.PublicKey.fromAmino(r):void 0,parseInt(o)??0,parseInt(n)??0)}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 fromData(t){const{address:e,pub_key:r,account_number:o,sequence:n}=t;return new jt(e??"",r?exports.PublicKey.fromData(r):void 0,parseInt(o)??0,parseInt(n)??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()}}static fromProto(t){const e=t.pubKey;return new jt(t.address,e?exports.PublicKey.fromProto(e):void 0,Number(t.accountNumber),Number(t.sequence))}toProto(){const{address:t,public_key:e,account_number:r,sequence:o}=this;return $s.BaseAccount.fromPartial({address:t,pubKey:e==null?void 0:e.packAny(),accountNumber:BigInt(r),sequence:BigInt(o)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.BaseAccount",value:$s.BaseAccount.encode(this.toProto()).finish()})}static unpackAny(t){return jt.fromProto($s.BaseAccount.decode(t.value))}}class Ne extends u{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 Ne(jt.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 Ne(jt.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 Ne(jt.fromProto(t.baseAccount),t.name,t.permissions)}toProto(){const{base_account:t,name:e,permissions:r}=this;return $s.ModuleAccount.fromPartial({baseAccount:t.toProto(),name:e,permissions:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",value:$s.ModuleAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Ne.fromProto($s.ModuleAccount.decode(t.value))}}exports.Account=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/BaseAccount":return jt.fromAmino(o);case"cosmos-sdk/ModuleAccount":return Ne.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.auth.v1beta1.BaseAccount":return jt.fromData(o);case"/cosmos.auth.v1beta1.ModuleAccount":return Ne.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;if(n==="/cosmos.auth.v1beta1.BaseAccount")return jt.unpackAny(o);if(n==="/cosmos.auth.v1beta1.ModuleAccount")return Ne.unpackAny(o);throw new Error(`Account type ${n} not recognized`)}a.fromProto=r})(exports.Account||(exports.Account={}));class de extends u{constructor(e,r,o,n){super();_(this,"max_tokens");this.allow_list=r,this.deny_list=o,this.authorization_type=n,this.max_tokens=new l(e)}static fromAmino(e){const{value:{max_tokens:r,allow_list:o,deny_list:n,authorization_type:s}}=e;return new de(l.fromAmino(r),ie.fromAmino(o),ie.fromAmino(n),Le.authorizationTypeFromJSON(s))}toAmino(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:n}=this;return{type:"mstake/StakeAuthorization",value:{max_tokens:e.toAmino(),allow_list:r.toAmino(),deny_list:o.toAmino(),authorization_type:Le.authorizationTypeToJSON(n)}}}static fromData(e){const{max_tokens:r,allow_list:o,deny_list:n,authorization_type:s}=e;return new de(l.fromData(r),ie.fromData(o),ie.fromData(n),Le.authorizationTypeFromJSON(s))}toData(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:n}=this;return{"@type":"/initia.mstaking.v1.StakeAuthorization",max_tokens:e.toData(),allow_list:r.toData(),deny_list:o.toData(),authorization_type:Le.authorizationTypeToJSON(n)}}static fromProto(e){return new de(l.fromProto(e.maxTokens),ie.fromProto(e.allowList),ie.fromProto(e.denyList),e.authorizationType)}toProto(){const{max_tokens:e,allow_list:r,deny_list:o,authorization_type:n}=this;return Le.StakeAuthorization.fromPartial({maxTokens:e.toProto(),allowList:r.toProto(),denyList:o.toProto(),authorizationType:n})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.StakeAuthorization",value:Le.StakeAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return de.fromProto(Le.StakeAuthorization.decode(e.value))}}class ie extends u{constructor(t){super(),this.address=t}static fromAmino(t){return new ie(t.address)}toAmino(){return{address:this.address}}static fromData(t){return new ie(t.address)}toData(){return{address:this.address}}static fromProto(t){return new ie(t.address)}toProto(){return Le.StakeAuthorization_Validators.fromPartial({address:this.address})}}(a=>{a.Type=Le.AuthorizationType})(de||(de={}));class Ge extends u{constructor(e,r){super();_(this,"spend_limit");this.allow_list=r,this.spend_limit=new l(e)}static fromAmino(e){return new Ge(l.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 Ge(l.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 Ge(l.fromProto(e.spendLimit),e.allowList)}toProto(){return gc.SendAuthorization.fromPartial({spendLimit:this.spend_limit.toProto(),allowList:this.allow_list})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.SendAuthorization",value:gc.SendAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return Ge.fromProto(gc.SendAuthorization.decode(e.value))}}class We extends u{constructor(t){super(),this.msg=t}static fromAmino(t){return new We(t.value.msg)}toAmino(){const{msg:t}=this;return{type:"cosmos-sdk/GenericAuthorization",value:{msg:t}}}static fromData(t){return new We(t.msg)}toData(){const{msg:t}=this;return{"@type":"/cosmos.authz.v1beta1.GenericAuthorization",msg:t}}static fromProto(t){return new We(t.msg)}toProto(){return qi.GenericAuthorization.fromPartial({msg:this.msg})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",value:qi.GenericAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return We.fromProto(qi.GenericAuthorization.decode(t.value))}}class je extends u{constructor(t){super(),this.module_names=t}static fromAmino(t){return new je(t.value.module_names)}toAmino(){return{type:"move/PublishAuthorization",value:{module_names:this.module_names}}}static fromData(t){return new je(t.module_names)}toData(){return{"@type":"/initia.move.v1.PublishAuthorization",module_names:this.module_names}}static fromProto(t){return new je(t.moduleNames)}toProto(){return Na.PublishAuthorization.fromPartial({moduleNames:this.module_names})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.PublishAuthorization",value:Na.PublishAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return je.fromProto(Na.PublishAuthorization.decode(t.value))}}class Je extends u{constructor(t){super(),this.items=t}static fromAmino(t){return new Je(t.value.items.map(ms.fromAmino))}toAmino(){return{type:"move/ExecuteAuthorization",value:{items:this.items.map(t=>t.toAmino())}}}static fromData(t){return new Je(t.items.map(ms.fromData))}toData(){return{"@type":"/initia.move.v1.ExecuteAuthorization",items:this.items.map(t=>t.toData())}}static fromProto(t){return new Je(t.items.map(ms.fromProto))}toProto(){return Na.ExecuteAuthorization.fromPartial({items:this.items.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.ExecuteAuthorization",value:Na.ExecuteAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Je.fromProto(Na.ExecuteAuthorization.decode(t.value))}}class ms extends u{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 ms(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 ms(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 ms(t.moduleAddress,t.moduleName,t.functionNames)}toProto(){return Wt.ExecuteAuthorizationItem.fromPartial({moduleAddress:this.module_address,moduleName:this.module_name,functionNames:this.function_names})}}class at extends u{constructor(t,e){super(),this.permission=t,this.addresses=e}static fromAmino(t){const{permission:e,addresses:r}=t;return new at(zt.accessTypeFromJSON(e),r)}toAmino(){const{permission:t,addresses:e}=this;return{permission:zt.accessTypeToJSON(t),addresses:e}}static fromData(t){const{permission:e,addresses:r}=t;return new at(zt.accessTypeFromJSON(e),r)}toData(){const{permission:t,addresses:e}=this;return{permission:zt.accessTypeToJSON(t),addresses:e}}static fromProto(t){return new at(t.permission,t.addresses)}toProto(){const{permission:t,addresses:e}=this;return zt.AccessConfig.fromPartial({permission:t,addresses:e})}}(a=>{a.Type=zt.AccessType})(at||(at={}));class ds extends u{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?at.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?at.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?at.fromProto(t.instantiatePermission):void 0)}toProto(){const{code_hash:t,instantiate_permission:e}=this;return rt.CodeGrant.fromPartial({codeHash:Buffer.from(t,"base64"),instantiatePermission:e==null?void 0:e.toProto()})}}class Ze extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new Ze(t.value.grants.map(ds.fromAmino))}toAmino(){return{type:"wasm/StoreCodeAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new Ze(t.grants.map(ds.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.StoreCodeAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new Ze(t.grants.map(ds.fromProto))}toProto(){return rt.StoreCodeAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.StoreCodeAuthorization",value:rt.StoreCodeAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Ze.fromProto(rt.StoreCodeAuthorization.decode(t.value))}}class Ye extends u{constructor(t){super(),this.remaining=t}static fromAmino(t){return new Ye(parseInt(t.value.remaining))}toAmino(){return{type:"wasm/MaxCallsLimit",value:{remaining:this.remaining.toFixed()}}}static fromData(t){return new Ye(parseInt(t.remaining))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxCallsLimit",remaining:this.remaining.toFixed()}}static fromProto(t){return new Ye(Number(t.remaining))}toProto(){return rt.MaxCallsLimit.fromPartial({remaining:BigInt(this.remaining)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxCallsLimit",value:rt.MaxCallsLimit.encode(this.toProto()).finish()})}static unpackAny(t){return Ye.fromProto(rt.MaxCallsLimit.decode(t.value))}}class Xe extends u{constructor(e){super();_(this,"amounts");this.amounts=new l(e)}static fromAmino(e){return new Xe(l.fromAmino(e.value.amounts))}toAmino(){return{type:"wasm/MaxFundsLimit",value:{amounts:this.amounts.toAmino()}}}static fromData(e){return new Xe(l.fromData(e.amounts))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxFundsLimit",amounts:this.amounts.toData()}}static fromProto(e){return new Xe(l.fromProto(e.amounts))}toProto(){return rt.MaxFundsLimit.fromPartial({amounts:this.amounts.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MaxFundsLimit",value:rt.MaxFundsLimit.encode(this.toProto()).finish()})}static unpackAny(e){return Xe.fromProto(rt.MaxFundsLimit.decode(e.value))}}class Qe extends u{constructor(e,r){super();_(this,"amounts");this.calls_remaining=e,this.amounts=new l(r)}static fromAmino(e){const{value:{calls_remaining:r,amounts:o}}=e;return new Qe(parseInt(r),l.fromAmino(o))}toAmino(){const{calls_remaining:e,amounts:r}=this;return{type:"wasm/CombinedLimit",value:{calls_remaining:e.toFixed(),amounts:r.toAmino()}}}static fromData(e){const{calls_remaining:r,amounts:o}=e;return new Qe(parseInt(r),l.fromData(o))}toData(){const{calls_remaining:e,amounts:r}=this;return{"@type":"/cosmwasm.wasm.v1.CombinedLimit",calls_remaining:e.toFixed(),amounts:r.toData()}}static fromProto(e){return new Qe(Number(e.callsRemaining),l.fromProto(e.amounts))}toProto(){const{calls_remaining:e,amounts:r}=this;return rt.CombinedLimit.fromPartial({callsRemaining:BigInt(e),amounts:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.CombinedLimit",value:rt.CombinedLimit.encode(this.toProto()).finish()})}static unpackAny(e){return Qe.fromProto(rt.CombinedLimit.decode(e.value))}}var vi;(a=>{function t(o){switch(o.type){case"wasm/MaxCallsLimit":return Ye.fromAmino(o);case"wasm/MaxFundsLimit":return Xe.fromAmino(o);case"wasm/CombinedLimit":return Qe.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.MaxCallsLimit":return Ye.fromData(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return Xe.fromData(o);case"/cosmwasm.wasm.v1.CombinedLimit":return Qe.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmwasm.wasm.v1.MaxCallsLimit":return Ye.unpackAny(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return Xe.unpackAny(o);case"/cosmwasm.wasm.v1.CombinedLimit":return Qe.unpackAny(o)}throw new Error(`ContractLimit type ${n} not recognized`)}a.fromProto=r})(vi||(vi={}));class tr extends u{constructor(){super()}static fromAmino(t){return new tr}toAmino(){return{type:"wasm/AllowAllMessagesFilter",value:{}}}static fromData(t){return new tr}toData(){return{"@type":"/cosmwasm.wasm.v1.AllowAllMessagesFilter"}}static fromProto(t){return new tr}toProto(){return rt.AllowAllMessagesFilter.fromPartial({})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AllowAllMessagesFilter",value:rt.AllowAllMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return tr.fromProto(rt.AllowAllMessagesFilter.decode(t.value))}}class er extends u{constructor(t){super(),this.keys=t}static fromAmino(t){return new er(t.value.keys)}toAmino(){return{type:"wasm/AcceptedMessageKeysFilter",value:{keys:this.keys}}}static fromData(t){return new er(t.keys)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",keys:this.keys}}static fromProto(t){return new er(t.keys)}toProto(){return rt.AcceptedMessageKeysFilter.fromPartial({keys:this.keys})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",value:rt.AcceptedMessageKeysFilter.encode(this.toProto()).finish()})}static unpackAny(t){return er.fromProto(rt.AcceptedMessageKeysFilter.decode(t.value))}}class rr extends u{constructor(t){super(),this.messages=t}static fromAmino(t){return new rr(t.value.messages)}toAmino(){return{type:"wasm/AcceptedMessagesFilter",value:{messages:this.messages}}}static fromData(t){return new rr(t.messages)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessagesFilter",messages:this.messages}}static fromProto(t){return new rr(t.messages.map(e=>Buffer.from(e).toString("base64")))}toProto(){return rt.AcceptedMessagesFilter.fromPartial({messages:this.messages.map(t=>Buffer.from(t,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.AcceptedMessagesFilter",value:rt.AcceptedMessagesFilter.encode(this.toProto()).finish()})}static unpackAny(t){return rr.fromProto(rt.AcceptedMessagesFilter.decode(t.value))}}var wi;(a=>{function t(o){switch(o.type){case"wasm/AllowAllMessagesFilter":return tr.fromAmino(o);case"wasm/AcceptedMessageKeysFilter":return er.fromAmino(o);case"wasm/AcceptedMessagesFilter":return rr.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return tr.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return er.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return rr.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return tr.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return er.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return rr.unpackAny(o)}throw new Error(`ContractFilter type ${n} not recognized`)}a.fromProto=r})(wi||(wi={}));class ve extends u{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 ve(e,vi.fromAmino(r),wi.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 ve(e,vi.fromData(r),wi.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 ve(t.contract,vi.fromProto(t.limit),wi.fromProto(t.filter))}toProto(){const{contract:t,limit:e,filter:r}=this;return rt.ContractGrant.fromPartial({contract:t,limit:e.packAny(),filter:r.packAny()})}}class or extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new or(t.value.grants.map(ve.fromAmino))}toAmino(){return{type:"wasm/ContractExecutionAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new or(t.grants.map(ve.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractExecutionAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new or(t.grants.map(ve.fromProto))}toProto(){return rt.ContractExecutionAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractExecutionAuthorization",value:rt.ContractExecutionAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return or.fromProto(rt.ContractExecutionAuthorization.decode(t.value))}}class nr extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new nr(t.value.grants.map(ve.fromAmino))}toAmino(){return{type:"wasm/ContractMigrationAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new nr(t.grants.map(ve.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractMigrationAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new nr(t.grants.map(ve.fromProto))}toProto(){return rt.ContractMigrationAuthorization.fromPartial({grants:this.grants.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.ContractMigrationAuthorization",value:rt.ContractMigrationAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return nr.fromProto(rt.ContractMigrationAuthorization.decode(t.value))}}class sr extends u{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 sr(e,r,o?at.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 sr(e,r,o?at.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 sr(t.sender,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?at.fromProto(t.instantiatePermission):void 0)}toProto(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return E.MsgStoreCode.fromPartial({sender:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:r==null?void 0:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:E.MsgStoreCode.encode(this.toProto()).finish()})}static unpackAny(t){return sr.fromProto(E.MsgStoreCode.decode(t.value))}}class ar extends u{constructor(e,r,o,n,s,i){super();_(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=n,this.msg=s,this.funds=new l(i)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:n,label:s,msg:i,funds:c}}=e;return new ar(r,o,parseInt(n),s,Buffer.from(JSON.stringify(i)).toString("base64"),l.fromAmino(c))}toAmino(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i}=this;return{type:"wasm/MsgInstantiateContract",value:{sender:e,admin:r,code_id:o.toFixed(),label:n,msg:JSON.parse(Buffer.from(s,"base64").toString()),funds:i.toAmino()}}}static fromData(e){const{sender:r,admin:o,code_id:n,label:s,msg:i,funds:c}=e;return new ar(r,o,parseInt(n),s,Buffer.from(JSON.stringify(i)).toString("base64"),l.fromData(c))}toData(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:e,admin:r,code_id:o.toFixed(),label:n,msg:JSON.parse(Buffer.from(s,"base64").toString()),funds:i.toData()}}static fromProto(e){return new ar(e.sender,e.admin,Number(e.codeId),e.label,Buffer.from(e.msg).toString("base64"),l.fromProto(e.funds))}toProto(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i}=this;return E.MsgInstantiateContract.fromPartial({sender:e,admin:r,codeId:BigInt(o),label:n,msg:Buffer.from(s,"base64"),funds:i.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:E.MsgInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return ar.fromProto(E.MsgInstantiateContract.decode(e.value))}}class ir extends u{constructor(e,r,o,n,s,i,c,d){super();_(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=n,this.msg=s,this.salt=c,this.fix_msg=d,this.funds=new l(i)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:n,label:s,msg:i,funds:c,salt:d,fix_msg:g}}=e;return new ir(r,o,parseInt(n),s,Buffer.from(JSON.stringify(i)).toString("base64"),l.fromAmino(c),d,g)}toAmino(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i,salt:c,fix_msg:d}=this;return{type:"wasm/MsgInstantiateContract2",value:{sender:e,admin:r,code_id:o.toFixed(),label:n,msg:JSON.parse(Buffer.from(s,"base64").toString()),funds:i.toAmino(),salt:c,fix_msg:d}}}static fromData(e){const{sender:r,admin:o,code_id:n,label:s,msg:i,funds:c,salt:d,fix_msg:g}=e;return new ir(r,o,parseInt(n),s,Buffer.from(JSON.stringify(i)).toString("base64"),l.fromData(c),d,g)}toData(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i,salt:c,fix_msg:d}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract2",sender:e,admin:r,code_id:o.toFixed(),label:n,msg:JSON.parse(Buffer.from(s,"base64").toString()),funds:i.toData(),salt:c,fix_msg:d}}static fromProto(e){return new ir(e.sender,e.admin,Number(e.codeId),e.label,Buffer.from(e.msg).toString("base64"),l.fromProto(e.funds),Buffer.from(e.salt).toString("base64"),e.fixMsg)}toProto(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:i,salt:c,fix_msg:d}=this;return E.MsgInstantiateContract2.fromPartial({sender:e,admin:r,codeId:BigInt(o),label:n,msg:Buffer.from(s,"base64"),funds:i.toProto(),salt:Buffer.from(c,"base64"),fixMsg:d})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:E.MsgInstantiateContract2.encode(this.toProto()).finish()})}static unpackAny(e){return ir.fromProto(E.MsgInstantiateContract2.decode(e.value))}}class cr extends u{constructor(e,r,o,n){super();_(this,"funds");this.sender=e,this.contract=r,this.msg=o,this.funds=new l(n)}static fromAmino(e){const{value:{sender:r,contract:o,msg:n,funds:s}}=e;return new cr(r,o,Buffer.from(JSON.stringify(n)).toString("base64"),l.fromAmino(s))}toAmino(){const{sender:e,contract:r,msg:o,funds:n}=this;return{type:"wasm/MsgExecuteContract",value:{sender:e,contract:r,msg:JSON.parse(Buffer.from(o,"base64").toString()),funds:n.toAmino()}}}static fromData(e){const{sender:r,contract:o,msg:n,funds:s}=e;return new cr(r,o,Buffer.from(JSON.stringify(n)).toString("base64"),l.fromData(s))}toData(){const{sender:e,contract:r,msg:o,funds:n}=this;return{"@type":"/cosmwasm.wasm.v1.MsgExecuteContract",sender:e,contract:r,msg:JSON.parse(Buffer.from(o,"base64").toString()),funds:n.toData()}}static fromProto(e){return new cr(e.sender,e.contract,Buffer.from(e.msg).toString("base64"),l.fromProto(e.funds))}toProto(){const{sender:e,contract:r,msg:o,funds:n}=this;return E.MsgExecuteContract.fromPartial({sender:e,contract:r,msg:Buffer.from(o,"base64"),funds:n.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:E.MsgExecuteContract.encode(this.toProto()).finish()})}static unpackAny(e){return cr.fromProto(E.MsgExecuteContract.decode(e.value))}}class ur extends u{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:n}}=t;return new ur(e,r,parseInt(o),Buffer.from(JSON.stringify(n)).toString("base64"))}toAmino(){const{sender:t,contract:e,code_id:r,msg:o}=this;return{type:"wasm/MsgMigrateContract",value:{sender:t,contract:e,code_id:r.toFixed(),msg:JSON.parse(Buffer.from(o,"base64").toString())}}}static fromData(t){const{sender:e,contract:r,code_id:o,msg:n}=t;return new ur(e,r,parseInt(o),Buffer.from(JSON.stringify(n)).toString("base64"))}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.toFixed(),msg:JSON.parse(Buffer.from(o,"base64").toString())}}static fromProto(t){return new ur(t.sender,t.contract,Number(t.codeId),Buffer.from(t.msg).toString("base64"))}toProto(){const{sender:t,contract:e,code_id:r,msg:o}=this;return E.MsgMigrateContract.fromPartial({sender:t,contract:e,codeId:BigInt(r),msg:Buffer.from(o,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:E.MsgMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return ur.fromProto(E.MsgMigrateContract.decode(t.value))}}class mr extends u{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 mr(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 mr(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 mr(t.sender,t.newAdmin,t.contract)}toProto(){const{sender:t,new_admin:e,contract:r}=this;return E.MsgUpdateAdmin.fromPartial({sender:t,newAdmin:e,contract:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:E.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return mr.fromProto(E.MsgUpdateAdmin.decode(t.value))}}class dr extends u{constructor(t,e){super(),this.sender=t,this.contract=e}static fromAmino(t){const{value:{sender:e,contract:r}}=t;return new dr(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 dr(e,r)}toData(){const{sender:t,contract:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:t,contract:e}}static fromProto(t){return new dr(t.sender,t.contract)}toProto(){const{sender:t,contract:e}=this;return E.MsgClearAdmin.fromPartial({sender:t,contract:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:E.MsgClearAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return dr.fromProto(E.MsgClearAdmin.decode(t.value))}}class lr extends u{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 lr(e,parseInt(r),at.fromAmino(o))}toAmino(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return{type:"wasm/MsgUpdateInstantiateConfig",value:{sender:t,code_id:e.toFixed(),new_instantiate_permission:r.toAmino()}}}static fromData(t){const{sender:e,code_id:r,new_instantiate_permission:o}=t;return new lr(e,parseInt(r),at.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.toFixed(),new_instantiate_permission:r.toData()}}static fromProto(t){return new lr(t.sender,Number(t.codeId),at.fromProto(t.newInstantiatePermission))}toProto(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return E.MsgUpdateInstantiateConfig.fromPartial({sender:t,codeId:BigInt(e),newInstantiatePermission:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",value:E.MsgUpdateInstantiateConfig.encode(this.toProto()).finish()})}static unpackAny(t){return lr.fromProto(E.MsgUpdateInstantiateConfig.decode(t.value))}}class $n extends u{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 $n(at.fromAmino(e),zt.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:zt.accessTypeToJSON(e)}}}static fromData(t){const{code_upload_access:e,instantiate_default_permission:r}=t;return new $n(at.fromData(e),zt.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:zt.accessTypeToJSON(e)}}static fromProto(t){return new $n(at.fromProto(t.codeUploadAccess),t.instantiateDefaultPermission)}toProto(){const{code_upload_access:t,instantiate_default_permission:e}=this;return zt.Params.fromPartial({codeUploadAccess:t.toProto(),instantiateDefaultPermission:e})}}class pr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new pr(e,$n.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 pr(e,$n.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 pr(t.authority,$n.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return E.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",value:E.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return pr.fromProto(E.MsgUpdateParams.decode(t.value))}}class hr extends u{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 hr(e,r,Buffer.from(JSON.stringify(o)).toString("base64"))}toAmino(){const{authority:t,contract:e,msg:r}=this;return{type:"wasm/MsgSudoContract",value:{authority:t,contract:e,msg:JSON.parse(Buffer.from(r,"base64").toString())}}}static fromData(t){const{authority:e,contract:r,msg:o}=t;return new hr(e,r,Buffer.from(JSON.stringify(o)).toString("base64"))}toData(){const{authority:t,contract:e,msg:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgSudoContract",authority:t,contract:e,msg:JSON.parse(Buffer.from(r,"base64").toString())}}static fromProto(t){return new hr(t.authority,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,contract:e,msg:r}=this;return E.MsgSudoContract.fromPartial({authority:t,contract:e,msg:Buffer.from(r,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",value:E.MsgSudoContract.encode(this.toProto()).finish()})}static unpackAny(t){return hr.fromProto(E.MsgSudoContract.decode(t.value))}}class fr extends u{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:r}}=t;return new fr(e,r.map(parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgPinCodes",value:{authority:t,code_ids:e.map(r=>r.toFixed())}}}static fromData(t){const{authority:e,code_ids:r}=t;return new fr(e,r.map(parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgPinCodes",authority:t,code_ids:e.map(r=>r.toFixed())}}static fromProto(t){return new fr(t.authority,t.codeIds.map(e=>Number(e)))}toProto(){const{authority:t,code_ids:e}=this;return E.MsgPinCodes.fromPartial({authority:t,codeIds:e.map(r=>BigInt(r))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",value:E.MsgPinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return fr.fromProto(E.MsgPinCodes.decode(t.value))}}class gr extends u{constructor(t,e){super(),this.authority=t,this.code_ids=e}static fromAmino(t){const{value:{authority:e,code_ids:r}}=t;return new gr(e,r.map(parseInt))}toAmino(){const{authority:t,code_ids:e}=this;return{type:"wasm/MsgUnpinCodes",value:{authority:t,code_ids:e.map(r=>r.toFixed())}}}static fromData(t){const{authority:e,code_ids:r}=t;return new gr(e,r.map(parseInt))}toData(){const{authority:t,code_ids:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgUnpinCodes",authority:t,code_ids:e.map(r=>r.toFixed())}}static fromProto(t){return new gr(t.authority,t.codeIds.map(e=>Number(e)))}toProto(){const{authority:t,code_ids:e}=this;return E.MsgUnpinCodes.fromPartial({authority:t,codeIds:e.map(r=>BigInt(r))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",value:E.MsgUnpinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return gr.fromProto(E.MsgUnpinCodes.decode(t.value))}}class yr extends u{constructor(e,r,o,n,s,i,c,d,g,v,b){super();_(this,"funds");this.authority=e,this.wasm_byte_code=r,this.instantiate_permission=o,this.unpin_code=n,this.admin=s,this.label=i,this.msg=c,this.source=g,this.builder=v,this.code_hash=b,this.funds=new l(d)}static fromAmino(e){const{value:{authority:r,wasm_byte_code:o,instantiate_permission:n,unpin_code:s,admin:i,label:c,msg:d,funds:g,source:v,builder:b,code_hash:k}}=e;return new yr(r,o,n?at.fromAmino(n):void 0,s,i,c,Buffer.from(JSON.stringify(d)).toString("base64"),l.fromAmino(g),v,b,k)}toAmino(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:n,admin:s,label:i,msg:c,funds:d,source:g,builder:v,code_hash:b}=this;return{type:"wasm/MsgStoreAndInstantiateContract",value:{authority:e,wasm_byte_code:r,instantiate_permission:o==null?void 0:o.toAmino(),unpin_code:n,admin:s,label:i,msg:JSON.parse(Buffer.from(c,"base64").toString()),funds:d.toAmino(),source:g,builder:v,code_hash:b}}}static fromData(e){const{authority:r,wasm_byte_code:o,instantiate_permission:n,unpin_code:s,admin:i,label:c,msg:d,funds:g,source:v,builder:b,code_hash:k}=e;return new yr(r,o,n?at.fromData(n):void 0,s,i,c,Buffer.from(JSON.stringify(d)).toString("base64"),l.fromData(g),v,b,k)}toData(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:n,admin:s,label:i,msg:c,funds:d,source:g,builder:v,code_hash:b}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",authority:e,wasm_byte_code:r,instantiate_permission:o==null?void 0:o.toData(),unpin_code:n,admin:s,label:i,msg:JSON.parse(Buffer.from(c,"base64").toString()),funds:d.toData(),source:g,builder:v,code_hash:b}}static fromProto(e){return new yr(e.authority,Buffer.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?at.fromProto(e.instantiatePermission):void 0,e.unpinCode,e.admin,e.label,Buffer.from(e.msg).toString("base64"),l.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:n,admin:s,label:i,msg:c,funds:d,source:g,builder:v,code_hash:b}=this;return E.MsgStoreAndInstantiateContract.fromPartial({authority:e,wasmByteCode:Buffer.from(r,"base64"),instantiatePermission:o==null?void 0:o.toProto(),unpinCode:n,admin:s,label:i,msg:Buffer.from(c,"base64"),funds:d.toProto(),source:g,builder:v,codeHash:Buffer.from(b,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",value:E.MsgStoreAndInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return yr.fromProto(E.MsgStoreAndInstantiateContract.decode(e.value))}}class _r extends u{constructor(t,e,r,o,n){super(),this.authority=t,this.wasm_byte_code=e,this.instantiate_permission=r,this.contract=o,this.msg=n}static fromAmino(t){const{value:{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:n,msg:s}}=t;return new _r(e,r,o?at.fromAmino(o):void 0,n,Buffer.from(JSON.stringify(s)).toString("base64"))}toAmino(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:n}=this;return{type:"wasm/MsgStoreAndMigrateContract",value:{authority:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toAmino(),contract:o,msg:JSON.parse(Buffer.from(n,"base64").toString())}}}static fromData(t){const{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:n,msg:s}=t;return new _r(e,r,o?at.fromData(o):void 0,n,Buffer.from(JSON.stringify(s)).toString("base64"))}toData(){const{authority:t,wasm_byte_code:e,instantiate_permission:r,contract:o,msg:n}=this;return{"@type":"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",authority:t,wasm_byte_code:e,instantiate_permission:r==null?void 0:r.toData(),contract:o,msg:JSON.parse(Buffer.from(n,"base64").toString())}}static fromProto(t){return new _r(t.authority,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?at.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:n}=this;return E.MsgStoreAndMigrateContract.fromPartial({authority:t,wasmByteCode:Buffer.from(e,"base64"),instantiatePermission:r==null?void 0:r.toProto(),contract:o,msg:Buffer.from(n,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",value:E.MsgStoreAndMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return _r.fromProto(E.MsgStoreAndMigrateContract.decode(t.value))}}class vr extends u{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new vr(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 vr(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new vr(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return E.MsgAddCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",value:E.MsgAddCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return vr.fromProto(E.MsgAddCodeUploadParamsAddresses.decode(t.value))}}class wr extends u{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new wr(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 wr(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new wr(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return E.MsgRemoveCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",value:E.MsgRemoveCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return wr.fromProto(E.MsgRemoveCodeUploadParamsAddresses.decode(t.value))}}class Ar extends u{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 Ar(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 Ar(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 Ar(t.sender,t.newLabel,t.contract)}toProto(){const{sender:t,new_label:e,contract:r}=this;return E.MsgUpdateContractLabel.fromPartial({sender:t,newLabel:e,contract:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",value:E.MsgUpdateContractLabel.encode(this.toProto()).finish()})}static unpackAny(t){return Ar.fromProto(E.MsgUpdateContractLabel.decode(t.value))}}class Ls extends u{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 Ls(parseInt(e),parseInt(r))}toAmino(){const{block_height:t,tx_index:e}=this;return{block_height:t.toFixed(),tx_index:e.toFixed()}}static fromData(t){const{block_height:e,tx_index:r}=t;return new Ls(parseInt(e),parseInt(r))}toData(){const{block_height:t,tx_index:e}=this;return{block_height:t.toFixed(),tx_index:e.toFixed()}}static fromProto(t){return new Ls(Number(t.blockHeight),Number(t.txIndex))}toProto(){const{block_height:t,tx_index:e}=this;return zt.AbsoluteTxPosition.fromPartial({blockHeight:BigInt(t),txIndex:BigInt(e)})}}class Hs extends u{constructor(e,r,o,n,s){super();_(this,"spend_limit");this.source_port=e,this.source_channel=r,this.allow_list=n,this.allowed_packet_data=s,this.spend_limit=new l(o)}static fromAmino(e){const{source_port:r,source_channel:o,spend_limit:n,allow_list:s,allowed_packet_data:i}=e;return new Hs(r,o,l.fromAmino(n),s,i)}toAmino(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:n,allowed_packet_data:s}=this;return{source_port:e,source_channel:r,spend_limit:o.toAmino(),allow_list:n,allowed_packet_data:s}}static fromData(e){const{source_port:r,source_channel:o,spend_limit:n,allow_list:s,allowed_packet_data:i}=e;return new Hs(r,o,l.fromData(n),s,i)}toData(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:n,allowed_packet_data:s}=this;return{source_port:e,source_channel:r,spend_limit:o.toData(),allow_list:n,allowed_packet_data:s}}static fromProto(e){return new Hs(e.sourcePort,e.sourceChannel,l.fromProto(e.spendLimit),e.allowList,e.allowedPacketData)}toProto(){const{source_port:e,source_channel:r,spend_limit:o,allow_list:n,allowed_packet_data:s}=this;return $i.Allocation.fromPartial({sourcePort:e,sourceChannel:r,spendLimit:o.toProto(),allowList:n,allowedPacketData:s})}}class zs extends u{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 zs(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 zs(t.allocations.map(Hs.fromProto))}toProto(){return $i.TransferAuthorization.fromPartial({allocations:this.allocations.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.TransferAuthorization",value:$i.TransferAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return zs.fromProto($i.TransferAuthorization.decode(t.value))}}class U extends u{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 U(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 U(parseInt(e),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 U(Number(t.revisionNumber),Number(t.revisionHeight))}toProto(){const{revision_number:t,revision_height:e}=this;return Ii.Height.fromPartial({revisionNumber:BigInt(t),revisionHeight:BigInt(e)})}}class Pr extends u{constructor(e,r,o,n,s,i,c,d){super();_(this,"source_port");_(this,"source_channel");_(this,"token");_(this,"sender");_(this,"receiver");_(this,"timeout_height");_(this,"timeout_timestamp");_(this,"memo");if(!i&&!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=n,this.receiver=s,this.timeout_height=i,this.timeout_timestamp=c,this.memo=d}static fromAmino(e){const{value:{source_port:r,source_channel:o,token:n,sender:s,receiver:i,timeout_height:c,timeout_timestamp:d,memo:g}}=e;if(!c&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Pr(r,o,n?S.fromAmino(n):void 0,s,i,U.fromAmino(c),d,g)}toAmino(){const{source_port:e,source_channel:r,token:o,sender:n,receiver:s,timeout_height:i,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:n,receiver:s,timeout_height:(i==null?void 0:i.toAmino())??{},timeout_timestamp:c,memo:d===""?void 0:d}}}static fromData(e){const{source_port:r,source_channel:o,token:n,sender:s,receiver:i,timeout_timestamp:c,timeout_height:d,memo:g}=e;if(!d&&!c)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new Pr(r,o,n?S.fromData(n):void 0,s,i,d?U.fromData(d):void 0,c==="0"?void 0:c,g)}toData(){const{source_port:e,source_channel:r,token:o,sender:n,receiver:s,timeout_height:i,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:n,receiver:s,timeout_height:i?i.toData():new U(0,0).toData(),timeout_timestamp:c??"0",memo:d}}static fromProto(e){if(!e.timeoutHeight&&Number(e.timeoutTimestamp)==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new Pr(e.sourcePort,e.sourceChannel,e.token?S.fromProto(e.token):void 0,e.sender,e.receiver,e.timeoutHeight?U.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:r,token:o,sender:n,receiver:s,timeout_height:i,timeout_timestamp:c,memo:d}=this;return Ta.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,token:o==null?void 0:o.toProto(),sender:n,receiver:s,timeoutHeight:i==null?void 0:i.toProto(),timeoutTimestamp:c?BigInt(c):void 0,memo:d})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:Ta.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Pr.fromProto(Ta.MsgTransfer.decode(e.value))}}class ls extends u{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 ls(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 ls(e,r)}toData(){const{send_enabled:t,receive_enabled:e}=this;return{send_enabled:t,receive_enabled:e}}static fromProto(t){return new ls(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return bu.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class Vs extends u{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 Vs(e,ls.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 Vs(t.signer,ls.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Ta.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgUpdateParams",value:Ta.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vs.fromProto(Ta.MsgUpdateParams.decode(t.value))}}class Ks extends u{constructor(t,e){super(),this.path=t,this.base_denom=e}static fromAmino(t){const{path:e,base_denom:r}=t;return new Ks(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 Ks(e,r)}toData(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromProto(t){return new Ks(t.path,t.baseDenom)}toProto(){const{path:t,base_denom:e}=this;return bu.DenomTrace.fromPartial({path:t,baseDenom:e})}}class Ai extends u{constructor(t,e,r,o,n){super(),this.denom=t,this.amount=e,this.sender=r,this.receiver=o,this.memo=n}static fromAmino(t){const{denom:e,amount:r,sender:o,receiver:n,memo:s}=t;return new Ai(e,r,o,n,s)}toAmino(){const{denom:t,amount:e,sender:r,receiver:o,memo:n}=this;return{denom:t,amount:e,sender:r,receiver:o,memo:n}}static fromData(t){const{denom:e,amount:r,sender:o,receiver:n,memo:s}=t;return new Ai(e,r,o,n,s)}toData(){const{denom:t,amount:e,sender:r,receiver:o,memo:n}=this;return{denom:t,amount:e,sender:r,receiver:o,memo:n}}static fromProto(t){return new Ai(t.denom,t.amount,t.sender,t.receiver,t.memo)}toProto(){const{denom:t,amount:e,sender:r,receiver:o,memo:n}=this;return nd.FungibleTokenPacketData.fromPartial({denom:t,amount:e,sender:r,receiver:o,memo:n})}}class we extends u{constructor(t,e){super(),this.authorization=t,this.expiration=e}static fromAmino(t){const{authorization:e,expiration:r}=t;return new we(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()}}static fromData(t){const{authorization:e,expiration:r}=t;return new we(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()}}static fromProto(t){return new we(exports.Authorization.fromProto(t.authorization),t.expiration)}toProto(){const{authorization:t,expiration:e}=this;return qi.Grant.fromPartial({authorization:t.packAny(),expiration:e})}}exports.Authorization=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/SendAuthorization":return Ge.fromAmino(o);case"cosmos-sdk/GenericAuthorization":return We.fromAmino(o);case"mstake/StakeAuthorization":return de.fromAmino(o);case"move/ExecuteAuthorization":return Je.fromAmino(o);case"move/PublishAuthorization":return je.fromAmino(o);case"wasm/StoreCodeAuthorization":return Ze.fromAmino(o);case"wasm/ContractExecutionAuthorization":return or.fromAmino(o);case"wasm/ContractMigrationAuthorization":return nr.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.authz.v1beta1.GenericAuthorization":return We.fromData(o);case"/cosmos.bank.v1beta1.SendAuthorization":return Ge.fromData(o);case"/initia.mstaking.v1.StakeAuthorization":return de.fromData(o);case"/initia.move.v1.PublishAuthorization":return je.fromData(o);case"/initia.move.v1.ExecuteAuthorization":return Je.fromData(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Ze.fromData(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return or.fromData(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return nr.fromData(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return zs.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.authz.v1beta1.GenericAuthorization":return We.unpackAny(o);case"/cosmos.bank.v1beta1.SendAuthorization":return Ge.unpackAny(o);case"/initia.mstaking.v1.StakeAuthorization":return de.unpackAny(o);case"/initia.move.v1.PublishAuthorization":return je.unpackAny(o);case"/initia.move.v1.ExecuteAuthorization":return Je.unpackAny(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Ze.unpackAny(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return or.unpackAny(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return nr.unpackAny(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return zs.unpackAny(o)}throw new Error(`Authorization type ${n} not recognized`)}a.fromProto=r})(exports.Authorization||(exports.Authorization={}));class br extends u{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 br(e,r,we.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 br(e,r,we.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 br(t.granter,t.grantee,we.fromProto(t.grant))}toProto(){const{grant:t,granter:e,grantee:r}=this;return Tn.MsgGrant.fromPartial({grant:t.toProto(),grantee:r,granter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgGrant",value:Tn.MsgGrant.encode(this.toProto()).finish()})}static unpackAny(t){return br.fromProto(Tn.MsgGrant.decode(t.value))}}class Dr extends u{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 Dr(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 Dr(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 Dr(t.granter,t.grantee,t.msgTypeUrl)}toProto(){const{granter:t,grantee:e,msg_type_url:r}=this;return Tn.MsgRevoke.fromPartial({grantee:e,granter:t,msgTypeUrl:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",value:Tn.MsgRevoke.encode(this.toProto()).finish()})}static unpackAny(t){return Dr.fromProto(Tn.MsgRevoke.decode(t.value))}}class kr extends u{constructor(t,e){super(),this.grantee=t,this.msgs=e}static fromAmino(t){const{value:{grantee:e,msgs:r}}=t;return new kr(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 kr(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 kr(t.grantee,t.msgs.map(e=>exports.Msg.fromProto(e)))}toProto(){const{grantee:t,msgs:e}=this;return Tn.MsgExec.fromPartial({grantee:t,msgs:e.map(r=>r.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:Tn.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return kr.fromProto(Tn.MsgExec.decode(t.value))}}class xr extends u{constructor(e,r,o){super();_(this,"amount");this.from_address=e,this.to_address=r,this.amount=new l(o)}static fromAmino(e){const{value:{from_address:r,to_address:o,amount:n}}=e;return new xr(r,o,l.fromAmino(n))}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:n}=e;return new xr(r,o,l.fromData(n))}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 xr(e.fromAddress,e.toAddress,l.fromProto(e.amount))}toProto(){const{from_address:e,to_address:r,amount:o}=this;return Yt.MsgSend.fromPartial({fromAddress:e,toAddress:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:Yt.MsgSend.encode(this.toProto()).finish()})}static unpackAny(e){return xr.fromProto(Yt.MsgSend.decode(e.value))}}class bt extends u{constructor(t,e){super(),this.inputs=t,this.outputs=e}static fromAmino(t){const{value:{inputs:e,outputs:r}}=t;return new bt(e.map(o=>bt.Input.fromAmino(o)),r.map(o=>bt.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 bt(e.map(o=>bt.Input.fromData(o)),r.map(o=>bt.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 bt(t.inputs.map(e=>bt.Input.fromProto(e)),t.outputs.map(e=>bt.Output.fromProto(e)))}toProto(){const{inputs:t,outputs:e}=this;return Yt.MsgMultiSend.fromPartial({inputs:t.map(r=>r.toProto()),outputs:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgMultiSend",value:Yt.MsgMultiSend.encode(this.toProto()).finish()})}static unpackAny(t){return bt.fromProto(Yt.MsgMultiSend.decode(t.value))}}(a=>{class t extends u{constructor(n,s){super();_(this,"coins");this.address=n,this.coins=new l(s)}static fromAmino(n){const{address:s,coins:i}=n;return new t(s,l.fromAmino(i))}toAmino(){const{address:n,coins:s}=this;return{address:n,coins:s.toAmino()}}static fromData(n){const{address:s,coins:i}=n;return new t(s,l.fromData(i))}toData(){const{address:n,coins:s}=this;return{address:n,coins:s.toData()}}static fromProto(n){return new t(n.address,l.fromProto(n.coins))}toProto(){const{address:n,coins:s}=this;return si.Input.fromPartial({address:n,coins:s.toProto()})}}a.Input=t;class e extends u{constructor(n,s){super();_(this,"coins");this.address=n,this.coins=new l(s)}static fromAmino(n){const{address:s,coins:i}=n;return new e(s,l.fromAmino(i))}toAmino(){const{address:n,coins:s}=this;return{address:n,coins:s.toAmino()}}static fromData(n){const{address:s,coins:i}=n;return new e(s,l.fromData(i))}toData(){const{address:n,coins:s}=this;return{address:n,coins:s.toData()}}static fromProto(n){return new e(n.address,l.fromProto(n.coins))}toProto(){const{address:n,coins:s}=this;return si.Output.fromPartial({address:n,coins:s.toProto()})}}a.Output=e})(bt||(bt={}));class Ae extends u{constructor(t,e){super(),this.denom=t,this.enabled=e}static fromAmino(t){const{denom:e,enabled:r}=t;return new Ae(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 Ae(e,r)}toData(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromProto(t){return new Ae(t.denom,t.enabled)}toProto(){const{denom:t,enabled:e}=this;return si.SendEnabled.fromPartial({denom:t,enabled:e})}}class Ln extends u{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 Ln(e.map(Ae.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 Ln(e.map(Ae.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 Ln(t.sendEnabled.map(Ae.fromProto),t.defaultSendEnabled)}toProto(){const{send_enabled:t,default_send_enabled:e}=this;return si.Params.fromPartial({sendEnabled:t.map(r=>r.toProto()),defaultSendEnabled:e})}}class Mr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Mr(e,Ln.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 Mr(e,Ln.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 Mr(t.authority,Ln.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Yt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",value:Yt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Mr.fromProto(Yt.MsgUpdateParams.decode(t.value))}}class Sr extends u{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 Sr(e,r.map(Ae.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 Sr(e,r.map(Ae.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 Sr(t.authority,t.sendEnabled.map(Ae.fromProto),t.useDefaultFor)}toProto(){const{authority:t,send_enabled:e,use_default_for:r}=this;return Yt.MsgSetSendEnabled.fromPartial({authority:t,sendEnabled:e.map(o=>o.toProto()),useDefaultFor:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",value:Yt.MsgSetSendEnabled.encode(this.toProto()).finish()})}static unpackAny(t){return Sr.fromProto(Yt.MsgSetSendEnabled.decode(t.value))}}class ps extends u{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 ps(e,parseInt(r),o)}toAmino(){const{denom:t,exponent:e,aliases:r}=this;return{denom:t,exponent:e.toFixed(),aliases:r}}static fromData(t){const{denom:e,exponent:r,aliases:o}=t;return new ps(e,parseInt(r),o)}toData(){const{denom:t,exponent:e,aliases:r}=this;return{denom:t,exponent:e.toFixed(),aliases:r}}static fromProto(t){return new ps(t.denom,t.exponent,t.aliases)}toProto(){const{denom:t,exponent:e,aliases:r}=this;return si.DenomUnit.fromPartial({denom:t,exponent:e,aliases:r})}}class Pe extends u{constructor(t,e,r,o,n,s,i,c){super(),this.description=t,this.denom_units=e,this.base=r,this.display=o,this.name=n,this.symbol=s,this.uri=i,this.uri_hash=c}static fromAmino(t){const{description:e,denom_units:r,base:o,display:n,name:s,symbol:i,uri:c,uri_hash:d}=t;return new Pe(e,r.map(ps.fromAmino),o,n,s,i,c,d)}toAmino(){const{description:t,denom_units:e,base:r,display:o,name:n,symbol:s,uri:i,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toAmino()),base:r,display:o,name:n,symbol:s,uri:i,uri_hash:c}}static fromData(t){const{description:e,denom_units:r,base:o,display:n,name:s,symbol:i,uri:c,uri_hash:d}=t;return new Pe(e,r.map(ps.fromData),o,n,s,i,c,d)}toData(){const{description:t,denom_units:e,base:r,display:o,name:n,symbol:s,uri:i,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toData()),base:r,display:o,name:n,symbol:s,uri:i,uri_hash:c}}static fromProto(t){return new Pe(t.description,t.denomUnits.map(ps.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:n,symbol:s,uri:i,uri_hash:c}=this;return si.Metadata.fromPartial({description:t,denomUnits:e.map(d=>d.toProto()),base:r,display:o,name:n,symbol:s,uri:i,uriHash:c})}}class Ir extends u{constructor(t,e){super(),this.authority=t,this.metadata=e}static fromAmino(t){const{value:{authority:e,metadata:r}}=t;return new Ir(e,Pe.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 Ir(e,Pe.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 Ir(t.authority,Pe.fromProto(t.metadata))}toProto(){const{authority:t,metadata:e}=this;return yc.MsgSetDenomMetadata.fromPartial({authority:t,metadata:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.bank.v1.MsgSetDenomMetadata",value:yc.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Ir.fromProto(yc.MsgSetDenomMetadata.decode(t.value))}}class Gs extends u{constructor(t,e,r,o,n){super(),this.signer=t,this.namespaces=e,this.blob_sizes=r,this.share_commitments=o,this.share_versions=n}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:n,share_versions:s}=t;return new Gs(e,r,o.map(parseInt),n,s.map(parseInt))}toData(){const{signer:t,namespaces:e,blob_sizes:r,share_commitments:o,share_versions:n}=this;return{"@type":"/celestia.blob.v1.MsgPayForBlobs",signer:t,namespaces:e,blob_sizes:r.map(s=>s.toFixed()),share_commitments:o,share_versions:n.map(s=>s.toFixed())}}static fromProto(t){return new Gs(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:n}=this;return _c.MsgPayForBlobs.fromPartial({signer:t,namespaces:e.map(s=>Buffer.from(s,"base64")),blobSizes:r,shareCommitments:o.map(s=>Buffer.from(s,"base64")),shareVersions:n})}packAny(){return f.Any.fromPartial({typeUrl:"/celestia.blob.v1.MsgPayForBlobs",value:_c.MsgPayForBlobs.encode(this.toProto()).finish()})}static unpackAny(t){return Gs.fromProto(_c.MsgPayForBlobs.decode(t.value))}}class ai extends u{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 ai(t.namespace_id,t.data,parseInt(t.share_version),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.toFixed(),namespace_version:o.toFixed()}}static fromProto(t){return new ai(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 Mc.Blob.fromPartial({namespaceId:Buffer.from(t,"base64"),data:Buffer.from(e,"base64"),shareVersion:r,namespaceVersion:o})}}class Hn{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 Hn(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=n=>n.toString(2).split("0").join("").length;let r=0;const o=this.count();t>o&&(t=o);for(let n=0;;n++){if(n*8+7>=t)return r+=e(this.elems[n]>>7-t%8+1),r;r+=e(this.elems[n])}}static fromData(t){return new Hn(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 Hn(t.extraBitsStored,Buffer.from(t.elems))}toProto(){return Sc.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})}}class be extends u{constructor(e,r,o,n){super();_(this,"amount");this.gas_limit=e,this.payer=o,this.granter=n,this.amount=new l(r)}static fromAmino(e){const{gas:r,amount:o}=e;return new be(parseInt(r),l.fromAmino(o),"","")}toAmino(){return{gas:F(this.gas_limit).toFixed(),amount:this.amount.toAmino()}}static fromData(e){return new be(parseInt(e.gas_limit),l.fromData(e.amount),e.payer,e.granter)}toData(){const{amount:e,gas_limit:r,payer:o,granter:n}=this;return{amount:e.toData(),gas_limit:r.toFixed(),granter:n??"",payer:o??""}}static fromProto(e){return new be(Number(e.gasLimit),l.fromProto(e.amount),e.payer,e.granter)}toProto(){const{amount:e,gas_limit:r,payer:o,granter:n}=this;return Mt.Fee.fromPartial({amount:e.toProto(),gasLimit:BigInt(r),granter:n,payer:o})}gasPrices(){return this.amount.toDecCoins().div(this.gas_limit)}}class lt{constructor(t,e,r){this.public_key=t,this.data=e,this.sequence=r}static fromAmino(t){return new lt(exports.PublicKey.fromAmino(t.pub_key),new lt.Descriptor(new lt.Descriptor.Single(lt.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,t.signature)),0)}static fromData(t){return new lt(exports.PublicKey.fromData(t.public_key),lt.Descriptor.fromData(t.data),parseInt(t.sequence))}toData(){return{public_key:this.public_key.toData(),data:this.data.toData(),sequence:this.sequence.toFixed()}}}(a=>{a.SignMode=Ot.SignMode;class t{constructor(r){_(this,"single");_(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 X(new X.Single(r.mode)),Buffer.from(r.signature,"base64")]}if(this.multi){const r=this.multi,o=[],n=[];for(const i of r.signatures){const[c,d]=i.toModeInfoAndSignature();o.push(c),n.push(d)}const s=Sc.MultiSignature.encode(Sc.MultiSignature.fromPartial({signatures:n})).finish();return[new X(new X.Multi(r.bitarray,o)),s]}throw new Error("invalid signature descriptor")}}a.Descriptor=t,(e=>{class r{constructor(s,i){this.mode=s,this.signature=i}static fromData(s){return new r(Ot.signModeFromJSON(s.mode),s.signature)}toData(){const{mode:s,signature:i}=this;return{mode:Ot.signModeToJSON(s),signature:i}}}e.Single=r;class o{constructor(s,i){this.bitarray=s,this.signatures=i}static fromData(s){return new o(Hn.fromData(s.bitarray),s.signatures.map(i=>e.fromData(i)))}toData(){return{bitarray:this.bitarray.toData(),signatures:this.signatures.map(s=>s.toData())}}}e.Multi=o})(t=a.Descriptor||(a.Descriptor={}))})(lt||(lt={}));class Dt{constructor(t,e,r){this.body=t,this.auth_info=e,this.signatures=r}static fromAmino(t){const e=t.value.signatures.map(r=>lt.fromAmino(r));return new Dt(new zn(t.value.msg.map(r=>exports.Msg.fromAmino(r)),t.value.memo,parseInt(t.value.timeout_height)),new De([],be.fromAmino(t.value.fee)),e.map(r=>{var o;return((o=r.data.single)==null?void 0:o.signature)??""}))}static fromData(t){return new Dt(zn.fromData(t.body),De.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(Mt.Tx.decode(t.value))}static fromProto(t){return new Dt(zn.fromProto(t.body),De.fromProto(t.authInfo),t.signatures.map(e=>Buffer.from(e).toString("base64")))}toProto(){return Mt.Tx.fromPartial({body:this.body.toProto(),authInfo:this.auth_info.toProto(),signatures:this.signatures.map(t=>Buffer.from(t,"base64"))})}toBytes(){return Mt.Tx.encode(this.toProto()).finish()}static fromBuffer(t){return Dt.fromProto(Mt.Tx.decode(t))}appendEmptySignatures(t){t.forEach(e=>{let r;e.publicKey?e.publicKey instanceof Ee?r=new Jt(e.publicKey,e.sequenceNumber,new X(new X.Multi(Hn.fromBits(e.publicKey.pubkeys.length),[]))):r=new Jt(e.publicKey,e.sequenceNumber,new X(new X.Single(X.SignMode.SIGN_MODE_DIRECT))):r=new Jt(new Pt(""),e.sequenceNumber,new X(new X.Single(X.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 Jt(e.public_key,e.sequence,r))}}}class zn{constructor(t,e,r){this.messages=t,this.memo=e,this.timeout_height=r}static fromData(t){return new zn(t.messages.map(e=>exports.Msg.fromData(e)),t.memo,parseInt(t.timeout_height))}toData(){return{memo:this.memo??"",messages:this.messages.map(t=>t.toData()),timeout_height:(this.timeout_height??0).toFixed()}}static fromProto(t){return new zn(t.messages.map(e=>exports.Msg.fromProto(e)),t.memo,Number(t.timeoutHeight))}toProto(){return Mt.TxBody.fromPartial({memo:this.memo,messages:this.messages.map(t=>t.packAny()),timeoutHeight:this.timeout_height?BigInt(this.timeout_height):void 0})}toBytes(){return Mt.TxBody.encode(this.toProto()).finish()}}class De{constructor(t,e){this.signer_infos=t,this.fee=e}static fromData(t){return new De(t.signer_infos.map(e=>Jt.fromData(e)),be.fromData(t.fee))}toData(){return{fee:this.fee.toData(),signer_infos:this.signer_infos.map(t=>t.toData())}}static fromProto(t){return new De(t.signerInfos.map(e=>Jt.fromProto(e)),be.fromProto(t.fee))}toProto(){return Mt.AuthInfo.fromPartial({fee:this.fee.toProto(),signerInfos:this.signer_infos.map(t=>t.toProto())})}toBytes(){return Mt.AuthInfo.encode(this.toProto()).finish()}}class Jt{constructor(t,e,r){this.public_key=t,this.sequence=e,this.mode_info=r}static fromData(t){return new Jt(exports.PublicKey.fromData(t.public_key??new Pt("").toData()),parseInt(t.sequence),X.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 Jt(exports.PublicKey.fromProto(t.publicKey??new Pt("").packAny()),Number(t.sequence),X.fromProto(t.modeInfo))}toProto(){const{public_key:t,sequence:e,mode_info:r}=this;return Mt.SignerInfo.fromPartial({modeInfo:r.toProto(),publicKey:t==null?void 0:t.packAny(),sequence:BigInt(e)})}}class X{constructor(t){_(this,"single");_(this,"multi");t instanceof X.Single?this.single=t:this.multi=t}static fromData(t){if(t.single)return new X(X.Single.fromData(t.single));if(t.multi)return new X(X.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 X(e?X.Single.fromProto(e):X.Multi.fromProto(r))}toProto(){var t,e;return Mt.ModeInfo.fromPartial({multi:(t=this.multi)==null?void 0:t.toProto(),single:(e=this.single)==null?void 0:e.toProto()})}}(a=>{a.SignMode=Ot.SignMode;class t{constructor(o){this.mode=o}static fromData(o){return new t(Ot.signModeFromJSON(o.mode))}toData(){return{mode:Ot.signModeToJSON(this.mode)}}static fromProto(o){return new t(o.mode)}toProto(){return Mt.ModeInfo_Single.fromPartial({mode:this.mode})}}a.Single=t;class e{constructor(o,n){this.bitarray=o,this.modeInfos=n}static fromData(o){return new e(Hn.fromData(o.bitarray),o.mode_infos.map(n=>a.fromData(n)))}toData(){return{bitarray:this.bitarray.toData(),mode_infos:this.modeInfos.map(o=>o.toData())}}static fromProto(o){return new e(Hn.fromProto(o.bitarray),o.modeInfos.map(n=>a.fromProto(n)))}toProto(){return Mt.ModeInfo_Multi.fromPartial({bitarray:this.bitarray.toProto(),modeInfos:this.modeInfos.map(o=>o.toProto())})}}a.Multi=e})(X||(X={}));class ji extends u{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 ji(Dt.fromData(e),r.map(ai.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 ji(Dt.fromBuffer(Buffer.from(t.tx)),t.blobs.map(ai.fromProto),t.typeId)}toProto(){const{tx:t,blobs:e,type_id:r}=this;return Mc.BlobTx.fromPartial({tx:t.toBytes(),blobs:e.map(o=>o.toProto()),typeId:r})}toBytes(){return Mc.BlobTx.encode(this.toProto()).finish()}}class hs extends u{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 hs(parseInt(e),parseInt(r))}toAmino(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toFixed(),max_gas:e.toFixed()}}static fromData(t){const{max_bytes:e,max_gas:r}=t;return new hs(parseInt(e),parseInt(r))}toData(){const{max_bytes:t,max_gas:e}=this;return{max_bytes:t.toFixed(),max_gas:e.toFixed()}}static fromProto(t){return new hs(Number(t.maxBytes),Number(t.maxGas))}toProto(){const{max_bytes:t,max_gas:e}=this;return Xi.BlockParams.fromPartial({maxBytes:BigInt(t),maxGas:BigInt(e)})}}class fs extends u{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 fs(parseInt(e),q.fromAmino(r),parseInt(o))}toAmino(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return{max_age_num_blocks:t.toFixed(),max_age_duration:e.toAmino(),max_bytes:r.toFixed()}}static fromData(t){const{max_age_num_blocks:e,max_age_duration:r,max_bytes:o}=t;return new fs(parseInt(e),q.fromData(r),parseInt(o))}toData(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return{max_age_num_blocks:t.toFixed(),max_age_duration:e.toData(),max_bytes:r.toFixed()}}static fromProto(t){return new fs(Number(t.maxAgeNumBlocks),q.fromProto(t.maxAgeDuration),Number(t.maxBytes))}toProto(){const{max_age_num_blocks:t,max_age_duration:e,max_bytes:r}=this;return Xi.EvidenceParams.fromPartial({maxAgeNumBlocks:BigInt(t),maxAgeDuration:e.toProto(),maxBytes:BigInt(r)})}}class gs extends u{constructor(t){super(),this.pub_key_types=t}static fromAmino(t){return new gs(t.pub_key_types)}toAmino(){return{pub_key_types:this.pub_key_types}}static fromData(t){return new gs(t.pub_key_types)}toData(){return{pub_key_types:this.pub_key_types}}static fromProto(t){return new gs(t.pubKeyTypes)}toProto(){return Xi.ValidatorParams.fromPartial({pubKeyTypes:this.pub_key_types})}}class ys extends u{constructor(t){super(),this.vote_extensions_enable_height=t}static fromAmino(t){return new ys(parseInt(t.vote_extensions_enable_height))}toAmino(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromData(t){return new ys(parseInt(t.vote_extensions_enable_height))}toData(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromProto(t){return new ys(Number(t.voteExtensionsEnableHeight))}toProto(){return Xi.ABCIParams.fromPartial({voteExtensionsEnableHeight:BigInt(this.vote_extensions_enable_height)})}}class Br extends u{constructor(t,e,r,o,n){super(),this.authority=t,this.block=e,this.evidence=r,this.validator=o,this.abci=n}static fromAmino(t){const{value:{authority:e,block:r,evidence:o,validator:n,abci:s}}=t;return new Br(e,r?hs.fromAmino(r):void 0,o?fs.fromAmino(o):void 0,n?gs.fromAmino(n):void 0,s?ys.fromAmino(s):void 0)}toAmino(){const{authority:t,block:e,evidence:r,validator:o,abci:n}=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:n==null?void 0:n.toAmino()}}}static fromData(t){const{authority:e,block:r,evidence:o,validator:n,abci:s}=t;return new Br(e,r?hs.fromData(r):void 0,o?fs.fromData(o):void 0,n?gs.fromData(n):void 0,s?ys.fromData(s):void 0)}toData(){const{authority:t,block:e,evidence:r,validator:o,abci:n}=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:n==null?void 0:n.toData()}}static fromProto(t){return new Br(t.authority,hs.fromProto(t.block),fs.fromProto(t.evidence),gs.fromProto(t.validator),ys.fromProto(t.abci))}toProto(){const{authority:t,block:e,evidence:r,validator:o,abci:n}=this;return vc.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:n==null?void 0:n.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.consensus.v1.MsgUpdateParams",value:vc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Br.fromProto(vc.MsgUpdateParams.decode(t.value))}}class Ur extends u{constructor(t,e,r){super(),this.sender=t,this.invariant_module_name=e,this.invariant_route=r}static fromAmino(t){const{value:{sender:e,invariant_module_name:r,invariant_route:o}}=t;return new Ur(e,r,o)}toAmino(){throw new Error("MsgVerifyInvarant is not allowed to send")}static fromData(t){const{sender:e,invariant_module_name:r,invariant_route:o}=t;return new Ur(e,r,o)}toData(){const{sender:t,invariant_module_name:e,invariant_route:r}=this;return{"@type":"/cosmos.crisis.v1beta1.MsgVerifyInvariant",sender:t,invariant_module_name:e,invariant_route:r}}static fromProto(t){return new Ur(t.sender,t.invariantModuleName,t.invariantRoute)}toProto(){throw new Error("MsgVerifyInvarant is not allowed to send")}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgVerifyInvariant",value:yi.MsgVerifyInvariant.encode(this.toProto()).finish()})}static unpackAny(t){return Ur.fromProto(yi.MsgVerifyInvariant.decode(t.value))}}class Cr extends u{constructor(t,e){super(),this.authority=t,this.constant_fee=e}static fromAmino(t){const{value:{authority:e,constant_fee:r}}=t;return new Cr(e,S.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 Cr(e,S.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 Cr(t.authority,S.fromProto(t.constantFee))}toProto(){const{authority:t,constant_fee:e}=this;return yi.MsgUpdateParams.fromPartial({authority:t,constantFee:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgUpdateParams",value:yi.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Cr.fromProto(yi.MsgUpdateParams.decode(t.value))}}class Er extends u{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 Er(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 Er(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 Er(t.delegatorAddress,t.withdrawAddress)}toProto(){const{delegator_address:t,withdraw_address:e}=this;return It.MsgSetWithdrawAddress.fromPartial({delegatorAddress:t,withdrawAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",value:It.MsgSetWithdrawAddress.encode(this.toProto()).finish()})}static unpackAny(t){return Er.fromProto(It.MsgSetWithdrawAddress.decode(t.value))}}class Or extends u{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 Or(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 Or(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 Or(t.delegatorAddress,t.validatorAddress)}toProto(){const{delegator_address:t,validator_address:e}=this;return It.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t,validatorAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:It.MsgWithdrawDelegatorReward.encode(this.toProto()).finish()})}static unpackAny(t){return Or.fromProto(It.MsgWithdrawDelegatorReward.decode(t.value))}}class Nr extends u{constructor(t){super(),this.validator_address=t}static fromAmino(t){const{value:{validator_address:e}}=t;return new Nr(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 Nr(e)}toData(){const{validator_address:t}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",validator_address:t}}static fromProto(t){return new Nr(t.validatorAddress)}toProto(){const{validator_address:t}=this;return It.MsgWithdrawValidatorCommission.fromPartial({validatorAddress:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",value:It.MsgWithdrawValidatorCommission.encode(this.toProto()).finish()})}static unpackAny(t){return Nr.fromProto(It.MsgWithdrawValidatorCommission.decode(t.value))}}class Tr extends u{constructor(e,r){super();_(this,"amount");this.depositor=e,this.amount=new l(r)}static fromAmino(e){const{value:{depositor:r,amount:o}}=e;return new Tr(r,l.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 Tr(r,l.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 Tr(e.depositor,l.fromProto(e.amount))}toProto(){const{depositor:e,amount:r}=this;return It.MsgFundCommunityPool.fromPartial({amount:r.toProto(),depositor:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",value:It.MsgFundCommunityPool.encode(this.toProto()).finish()})}static unpackAny(e){return Tr.fromProto(It.MsgFundCommunityPool.decode(e.value))}}class _s extends u{constructor(t,e){super(),this.denom=t,this.weight=e}static fromAmino(t){const{denom:e,weight:r}=t;return new _s(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 _s(e,r)}toData(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromProto(t){return new _s(t.denom,t.weight)}toProto(){const{denom:t,weight:e}=this;return Du.RewardWeight.fromPartial({denom:t,weight:e})}}class Vn extends u{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 Vn(e,r,o.map(_s.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 Vn(e,r,o.map(_s.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 Vn(t.communityTax,t.withdrawAddrEnabled,t.rewardWeights.map(_s.fromProto))}toProto(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return Du.Params.fromPartial({communityTax:t,withdrawAddrEnabled:e,rewardWeights:r.map(o=>o.toProto())})}}class Fr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Fr(e,Vn.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 Fr(e,Vn.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 Fr(t.authority,Vn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Fa.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgUpdateParams",value:Fa.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Fr.fromProto(Fa.MsgUpdateParams.decode(t.value))}}class Rr extends u{constructor(e,r,o){super();_(this,"amount");this.authority=e,this.recipient=r,this.amount=new l(o)}static fromAmino(e){const{value:{authority:r,recipient:o,amount:n}}=e;return new Rr(r,o,l.fromAmino(n))}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:n}=e;return new Rr(r,o,l.fromData(n))}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 Rr(e.authority,e.recipient,l.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return It.MsgCommunityPoolSpend.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",value:It.MsgCommunityPoolSpend.encode(this.toProto()).finish()})}static unpackAny(e){return Rr.fromProto(It.MsgCommunityPoolSpend.decode(e.value))}}class qr extends u{constructor(e,r,o,n){super();_(this,"amount");this.depositor=e,this.validator_address=r,this.denom=o,this.amount=new l(n)}static fromAmino(e){const{value:{depositor:r,validator_address:o,denom:n,amount:s}}=e;return new qr(r,o,n,l.fromAmino(s))}toAmino(){const{depositor:e,validator_address:r,denom:o,amount:n}=this;return{type:"distr/MsgDepositValidatorRewardsPool",value:{depositor:e,validator_address:r,denom:o,amount:n.toAmino()}}}static fromData(e){const{depositor:r,validator_address:o,denom:n,amount:s}=e;return new qr(r,o,n,l.fromData(s))}toData(){const{depositor:e,validator_address:r,denom:o,amount:n}=this;return{"@type":"/initia.distribution.v1.MsgDepositValidatorRewardsPool",depositor:e,validator_address:r,denom:o,amount:n.toData()}}static fromProto(e){return new qr(e.depositor,e.validatorAddress,e.denom,l.fromProto(e.amount))}toProto(){const{depositor:e,validator_address:r,denom:o,amount:n}=this;return Fa.MsgDepositValidatorRewardsPool.fromPartial({depositor:e,validatorAddress:r,denom:o,amount:n.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgDepositValidatorRewardsPool",value:Fa.MsgDepositValidatorRewardsPool.encode(this.toProto()).finish()})}static unpackAny(e){return qr.fromProto(Fa.MsgDepositValidatorRewardsPool.decode(e.value))}}class $r extends u{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:n}}=t;return new $r(parseInt(e),new Date(r),parseInt(o),n)}toAmino(){const{height:t,time:e,power:r,consensus_address:o}=this;return{type:"cosmos-sdk/Equivocation",value:{height:t.toFixed(),time:e.toISOString(),power:r.toFixed(),consensus_address:o}}}static fromData(t){const{height:e,time:r,power:o,consensus_address:n}=t;return new $r(parseInt(e),new Date(r),parseInt(o),n)}toData(){const{height:t,time:e,power:r,consensus_address:o}=this;return{"@type":"/cosmos.evidence.v1beta1.Equivocation",height:t.toFixed(),time:e.toISOString(),power:r.toFixed(),consensus_address:o}}static fromProto(t){return new $r(Number(t.height),t.time,Number(t.power),t.consensusAddress)}toProto(){const{height:t,time:e,power:r,consensus_address:o}=this;return Ac.Equivocation.fromPartial({height:BigInt(t),time:e,power:BigInt(r),consensusAddress:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.Equivocation",value:Ac.Equivocation.encode(this.toProto()).finish()})}static unpackAny(t){return $r.fromProto(Ac.Equivocation.decode(t.value))}}exports.Evidence=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/Equivocation":return $r.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.evidence.v1beta1.Equivocation":return $r.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.evidence.v1beta1.Equivocation":return $r.unpackAny(o)}throw new Error(`Evidence type ${n} not recognized`)}a.fromProto=r})(exports.Evidence||(exports.Evidence={}));class Lr extends u{constructor(t,e){super(),this.submitter=t,this.evidence=e}static fromAmino(t){const{value:{submitter:e,evidence:r}}=t;return new Lr(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 Lr(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 Lr(t.submitter,exports.Evidence.fromProto(t.evidence))}toProto(){const{submitter:t,evidence:e}=this;return wc.MsgSubmitEvidence.fromPartial({submitter:t,evidence:e.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.MsgSubmitEvidence",value:wc.MsgSubmitEvidence.encode(this.toProto()).finish()})}static unpackAny(t){return Lr.fromProto(wc.MsgSubmitEvidence.decode(t.value))}}class Tt extends u{constructor(t,e){super(),this.address=t,this.storage_keys=e}static fromAmino(t){const{address:e,storage_keys:r}=t;return new Tt(e,r)}toAmino(){const{address:t,storage_keys:e}=this;return{address:t,storage_keys:e}}static fromData(t){const{address:e,storage_keys:r}=t;return new Tt(e,r)}toData(){const{address:t,storage_keys:e}=this;return{address:t,storage_keys:e}}static fromProto(t){return new Tt(t.address,t.storageKeys)}toProto(){const{address:t,storage_keys:e}=this;return ku.AccessTuple.fromPartial({address:t,storageKeys:e})}}class Hr extends u{constructor(t,e,r,o){super(),this.sender=t,this.code=e,this.value=r,this.access_list=o}static fromAmino(t){const{value:{sender:e,code:r,value:o,access_list:n}}=t;return new Hr(e,r,o,n.map(Tt.fromAmino))}toAmino(){const{sender:t,code:e,value:r,access_list:o}=this;return{type:"evm/MsgCreate",value:{sender:t,code:e,value:r,access_list:o.map(n=>n.toAmino())}}}static fromData(t){const{sender:e,code:r,value:o,access_list:n}=t;return new Hr(e,r,o,n.map(Tt.fromData))}toData(){const{sender:t,code:e,value:r,access_list:o}=this;return{"@type":"/minievm.evm.v1.MsgCreate",sender:t,code:e,value:r,access_list:o.map(n=>n.toData())}}static fromProto(t){return new Hr(t.sender,t.code,t.value,t.accessList.map(Tt.fromProto))}toProto(){const{sender:t,code:e,value:r,access_list:o}=this;return Xt.MsgCreate.fromPartial({sender:t,code:e,value:r,accessList:o.map(n=>n.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate",value:Xt.MsgCreate.encode(this.toProto()).finish()})}static unpackAny(t){return Hr.fromProto(Xt.MsgCreate.decode(t.value))}}class zr extends u{constructor(t,e,r,o,n){super(),this.sender=t,this.code=e,this.salt=r,this.value=o,this.access_list=n}static fromAmino(t){const{value:{sender:e,code:r,salt:o,value:n,access_list:s}}=t;return new zr(e,r,parseInt(o),n,s.map(Tt.fromAmino))}toAmino(){const{sender:t,code:e,salt:r,value:o,access_list:n}=this;return{type:"evm/MsgCreate2",value:{sender:t,code:e,salt:r.toFixed(),value:o,access_list:n.map(s=>s.toAmino())}}}static fromData(t){const{sender:e,code:r,salt:o,value:n,access_list:s}=t;return new zr(e,r,parseInt(o),n,s.map(Tt.fromData))}toData(){const{sender:t,code:e,salt:r,value:o,access_list:n}=this;return{"@type":"/minievm.evm.v1.MsgCreate2",sender:t,code:e,salt:r.toFixed(),value:o,access_list:n.map(s=>s.toData())}}static fromProto(t){return new zr(t.sender,t.code,Number(t.salt),t.value,t.accessList.map(Tt.fromProto))}toProto(){const{sender:t,code:e,salt:r,value:o,access_list:n}=this;return Xt.MsgCreate2.fromPartial({sender:t,code:e,salt:BigInt(r),value:o,accessList:n.map(s=>s.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate2",value:Xt.MsgCreate2.encode(this.toProto()).finish()})}static unpackAny(t){return zr.fromProto(Xt.MsgCreate2.decode(t.value))}}class Vr extends u{constructor(t,e,r,o,n){super(),this.sender=t,this.contract_addr=e,this.input=r,this.value=o,this.access_list=n}static fromAmino(t){const{value:{sender:e,contract_addr:r,input:o,value:n,access_list:s}}=t;return new Vr(e,r,o,n,s.map(Tt.fromAmino))}toAmino(){const{sender:t,contract_addr:e,input:r,value:o,access_list:n}=this;return{type:"evm/MsgCall",value:{sender:t,contract_addr:e,input:r,value:o,access_list:n.map(s=>s.toAmino())}}}static fromData(t){const{sender:e,contract_addr:r,input:o,value:n,access_list:s}=t;return new Vr(e,r,o,n,s.map(Tt.fromData))}toData(){const{sender:t,contract_addr:e,input:r,value:o,access_list:n}=this;return{"@type":"/minievm.evm.v1.MsgCall",sender:t,contract_addr:e,input:r,value:o,access_list:n.map(s=>s.toData())}}static fromProto(t){return new Vr(t.sender,t.contractAddr,t.input,t.value,t.accessList.map(Tt.fromProto))}toProto(){const{sender:t,contract_addr:e,input:r,value:o,access_list:n}=this;return Xt.MsgCall.fromPartial({sender:t,contractAddr:e,input:r,value:o,accessList:n.map(s=>s.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCall",value:Xt.MsgCall.encode(this.toProto()).finish()})}static unpackAny(t){return Vr.fromProto(Xt.MsgCall.decode(t.value))}}class Kn extends u{constructor(t,e,r,o,n,s,i){super(),this.extra_eips=t,this.allowed_publishers=e,this.allow_custom_erc20=r,this.allowed_custom_erc20s=o,this.fee_denom=n,this.gas_refund_ratio=s,this.num_retain_block_hashes=i}static fromAmino(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:n,fee_denom:s,gas_refund_ratio:i,num_retain_block_hashes:c}=t;return new Kn(e.map(parseInt),r,o,n,s,i,parseInt(c))}toAmino(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i}=this;return{extra_eips:t.map(c=>c.toFixed()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i.toFixed()}}static fromData(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:n,fee_denom:s,gas_refund_ratio:i,num_retain_block_hashes:c}=t;return new Kn(e.map(parseInt),r,o,n,s,i,parseInt(c))}toData(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i}=this;return{extra_eips:t.map(c=>c.toFixed()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i.toFixed()}}static fromProto(t){return new Kn(t.extraEips.map(e=>Number(e)),t.allowedPublishers,t.allowCustomErc20,t.allowedCustomErc20s,t.feeDenom,t.gasRefundRatio,Number(t.numRetainBlockHashes))}toProto(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n,gas_refund_ratio:s,num_retain_block_hashes:i}=this;return ku.Params.fromPartial({extraEips:t.map(c=>BigInt(c)),allowedPublishers:e,allowCustomErc20:r,allowedCustomErc20s:o,feeDenom:n,gasRefundRatio:s,numRetainBlockHashes:BigInt(i)})}}class Kr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Kr(e,Kn.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 Kr(e,Kn.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 Kr(t.authority,Kn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Xt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgUpdateParams",value:Xt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Kr.fromProto(Xt.MsgUpdateParams.decode(t.value))}}class St extends u{constructor(e,r){super();_(this,"spend_limit");this.expiration=r;let o=!1;if(e&&(this.spend_limit=new l(e),this.spend_limit.map(n=>{F(n.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 St(r?l.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()}}}static fromData(e){const{spend_limit:r,expiration:o}=e;return new St(r?l.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()}}static fromProto(e){return new St(l.fromProto(e.spendLimit),e.expiration)}toProto(){const{spend_limit:e,expiration:r}=this;return Fn.BasicAllowance.fromPartial({expiration:r,spendLimit:e==null?void 0:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",value:Fn.BasicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return St.fromProto(Fn.BasicAllowance.decode(e.value))}}class Zt extends u{constructor(e,r,o,n,s){super();_(this,"period_spend_limit");_(this,"period_can_spend");this.basic=e,this.period=r,this.period_reset=s,this.period_spend_limit=new l(o),this.period_can_spend=new l(n)}static fromAmino(e){const{value:{basic:r,period:o,period_spend_limit:n,period_can_spend:s,period_reset:i}}=e;return new Zt(St.fromAmino(r),q.fromAmino(o),l.fromAmino(n),l.fromAmino(s),new Date(i))}toAmino(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:n,period_reset:s}=this;return{type:"cosmos-sdk/PeriodicAllowance",value:{basic:e.toAmino(),period:r.toAmino(),period_spend_limit:o.toAmino(),period_can_spend:n.toAmino(),period_reset:s.toISOString()}}}static fromData(e){const{basic:r,period:o,period_spend_limit:n,period_can_spend:s,period_reset:i}=e;return new Zt(St.fromData(r),q.fromData(o),l.fromData(n),l.fromData(s),new Date(i))}toData(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:n,period_reset:s}=this;return{"@type":"/cosmos.feegrant.v1beta1.PeriodicAllowance",basic:e.toData(),period:r.toData(),period_spend_limit:o.toData(),period_can_spend:n.toData(),period_reset:s.toISOString()}}static fromProto(e){return new Zt(St.fromProto(e.basic),q.fromProto(e.period),l.fromProto(e.periodSpendLimit),l.fromProto(e.periodCanSpend),e.periodReset)}toProto(){const{basic:e,period:r,period_spend_limit:o,period_can_spend:n,period_reset:s}=this;return Fn.PeriodicAllowance.fromPartial({basic:e.toProto(),period:r.toProto(),periodCanSpend:n.toProto(),periodReset:s,periodSpendLimit:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.PeriodicAllowance",value:Fn.PeriodicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return Zt.fromProto(Fn.PeriodicAllowance.decode(e.value))}}class Gr extends u{constructor(t,e){super(),this.allowance=t,this.allowed_messages=e}static fromAmino(t){const{value:{allowance:e,allowed_messages:r}}=t;return new Gr(e.type==="cosmos-sdk/BasicAllowance"?St.fromAmino(e):Zt.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 Gr(e["@type"]==="/cosmos.feegrant.v1beta1.BasicAllowance"?St.fromData(e):Zt.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 Gr((e==null?void 0:e.typeUrl)==="/cosmos.feegrant.v1beta1.BasicAllowance"?St.unpackAny(e):Zt.unpackAny(e),t.allowedMessages)}toProto(){const{allowance:t,allowed_messages:e}=this;return Fn.AllowedMsgAllowance.fromPartial({allowance:t.packAny(),allowedMessages:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",value:Fn.AllowedMsgAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Gr.fromProto(Fn.AllowedMsgAllowance.decode(t.value))}}exports.Allowance=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/BasicAllowance":return St.fromAmino(o);case"cosmos-sdk/PeriodicAllowance":return Zt.fromAmino(o);case"cosmos-sdk/AllowedMsgAllowance":return Gr.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return Zt.fromData(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return St.fromData(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return Gr.fromData(o)}}a.fromData=e;function r(o){switch(o.typeUrl){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return Zt.unpackAny(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return St.unpackAny(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return Gr.unpackAny(o)}throw new Error(`not supported allowance ${o.typeUrl}`)}a.fromProto=r})(exports.Allowance||(exports.Allowance={}));class Wr extends u{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 Wr(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 Wr(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 Wr(t.granter,t.grantee,exports.Allowance.fromProto(t.allowance))}toProto(){const{granter:t,grantee:e,allowance:r}=this;return Ra.MsgGrantAllowance.fromPartial({allowance:r.packAny(),grantee:e,granter:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",value:Ra.MsgGrantAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Wr.fromProto(Ra.MsgGrantAllowance.decode(t.value))}}class jr extends u{constructor(t,e){super(),this.granter=t,this.grantee=e}static fromAmino(t){const{value:{granter:e,grantee:r}}=t;return new jr(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 jr(e,r)}toData(){const{granter:t,grantee:e}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",granter:t,grantee:e}}static fromProto(t){return new jr(t.granter,t.grantee)}toProto(){const{granter:t,grantee:e}=this;return Ra.MsgRevokeAllowance.fromPartial({grantee:e,granter:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",value:Ra.MsgRevokeAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return jr.fromProto(Ra.MsgRevokeAllowance.decode(t.value))}}class Jr extends u{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 Jr(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 Jr(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 Jr(t.signer,t.recipient,t.channel)}toProto(){const{signer:t,recipient:e,channel:r}=this;return qa.MsgRegisterAccount.fromPartial({signer:t,recipient:e,channel:r})}packAny(){return f.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgRegisterAccount",value:qa.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Jr.fromProto(qa.MsgRegisterAccount.decode(t.value))}}class Zr extends u{constructor(t,e){super(),this.signer=t,this.address=e}static fromAmino(t){const{value:{signer:e,address:r}}=t;return new Zr(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 Zr(e,r)}toData(){const{signer:t,address:e}=this;return{"@type":"/noble.forwarding.v1.MsgClearAccount",signer:t,address:e}}static fromProto(t){return new Zr(t.signer,t.address)}toProto(){const{signer:t,address:e}=this;return qa.MsgClearAccount.fromPartial({signer:t,address:e})}packAny(){return f.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgClearAccount",value:qa.MsgClearAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Zr.fromProto(qa.MsgClearAccount.decode(t.value))}}class Yr extends u{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(parseInt(e),r)}toAmino(){const{proposal_id:t,proposer:e}=this;return{type:"cosmos-sdk/v1/MsgCancelProposal",value:{proposal_id:t.toFixed(),proposer:e}}}static fromData(t){const{proposal_id:e,proposer:r}=t;return new Yr(parseInt(e),r)}toData(){const{proposal_id:t,proposer:e}=this;return{"@type":"/cosmos.gov.v1.MsgCancelProposal",proposal_id:t.toFixed(),proposer:e}}static fromProto(t){return new Yr(Number(t.proposalId),t.proposer)}toProto(){const{proposal_id:t,proposer:e}=this;return Bt.MsgCancelProposal.fromPartial({proposalId:BigInt(t),proposer:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgCancelProposal",value:Bt.MsgCancelProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Yr.fromProto(Bt.MsgCancelProposal.decode(t.value))}}class Xr extends u{constructor(e,r,o){super();_(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new l(o)}static fromAmino(e){const{value:{proposal_id:r,depositor:o,amount:n}}=e;return new Xr(parseInt(r),o,l.fromAmino(n))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{type:"cosmos-sdk/MsgDeposit",value:{proposal_id:e.toFixed(),depositor:r,amount:o.toAmino()}}}static fromData(e){const{proposal_id:r,depositor:o,amount:n}=e;return new Xr(parseInt(r),o,l.fromData(n))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{"@type":"/cosmos.gov.v1beta1.MsgDeposit",proposal_id:e.toFixed(),depositor:r,amount:o.toData()}}static fromProto(e){return new Xr(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Qt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",value:Qt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Xr.fromProto(Qt.MsgDeposit.decode(e.value))}}class Qr extends u{constructor(e,r,o){super();_(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new l(o)}static fromAmino(e){const{value:{proposal_id:r,depositor:o,amount:n}}=e;return new Qr(parseInt(r),o,l.fromAmino(n))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{type:"cosmos-sdk/v1/MsgDeposit",value:{proposal_id:e.toFixed(),depositor:r,amount:o.toAmino()}}}static fromData(e){const{proposal_id:r,depositor:o,amount:n}=e;return new Qr(parseInt(r),o,l.fromData(n))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{"@type":"/cosmos.gov.v1.MsgDeposit",proposal_id:e.toFixed(),depositor:r,amount:o.toData()}}static fromProto(e){return new Qr(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Bt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgDeposit",value:Bt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Qr.fromProto(Bt.MsgDeposit.decode(e.value))}}class to extends u{constructor(t){super(),this.paramChanges=t}static fromAmino(t){return new to((t??[]).map(vs.fromAmino))}toAmino(){return this.paramChanges.map(t=>t.toAmino())}static fromData(t){return new to((t??[]).map(vs.fromData))}toData(){return this.paramChanges.map(t=>t.toData())}static fromProto(t){return new to((t??[]).map(vs.fromProto))}toProto(){return this.paramChanges.map(t=>t.toProto())}}class vs extends u{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 vs(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 vs(e,r,o)}toData(){const{subspace:t,key:e,value:r}=this;return{subspace:t,key:e,value:r}}static fromProto(t){return new vs(t.subspace,t.key,t.value)}toProto(){const{subspace:t,key:e,value:r}=this;return Li.ParamChange.fromPartial({key:e,subspace:t,value:r})}}class eo extends u{constructor(e,r,o){super();_(this,"changes");this.title=e,this.description=r,Array.isArray(o)?this.changes=to.fromData(o):this.changes=o}static fromAmino(e){const{value:{title:r,description:o,changes:n}}=e;return new eo(r,o,to.fromAmino(n))}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:n}=e;return new eo(r,o,to.fromData(n))}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 eo(e.title,e.description,to.fromProto(e.changes))}toProto(){const{title:e,description:r,changes:o}=this;return Li.ParameterChangeProposal.fromPartial({changes:o.toProto(),description:r,title:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:Li.ParameterChangeProposal.encode(this.toProto()).finish()})}static unpackAny(e){return eo.fromProto(Li.ParameterChangeProposal.decode(e.value))}}class ro extends u{constructor(t,e){super(),this.title=t,this.description=e}static fromAmino(t){const{value:{title:e,description:r}}=t;return new ro(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 ro(e,r)}toData(){const{title:t,description:e}=this;return{"@type":"/cosmos.gov.v1beta1.TextProposal",title:t,description:e}}static fromProto(t){return new ro(t.title,t.description)}toProto(){const{title:t,description:e}=this;return Hi.TextProposal.fromPartial({description:e,title:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:Hi.TextProposal.encode(this.toProto()).finish()})}static unpackAny(t){return ro.fromProto(Hi.TextProposal.decode(t.value))}}exports.Content=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/TextProposal":return ro.fromAmino(o);case"cosmos-sdk/ParameterChangeProposal":return eo.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.gov.v1beta1.TextProposal":return ro.fromData(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return eo.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.gov.v1beta1.TextProposal":return ro.unpackAny(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return eo.unpackAny(o)}throw new Error(`Proposal content ${n} not recognized`)}a.fromProto=r})(exports.Content||(exports.Content={}));class Gn extends u{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:n}=t;return new Gn(parseInt(e),r,o,n)}toAmino(){const{tally_height:t,total_staking_power:e,total_vesting_power:r,v1_tally_result:o}=this;return{tally_height:t.toFixed(),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:n}=t;return new Gn(parseInt(e),r,o,n)}toData(){const{tally_height:t,total_staking_power:e,total_vesting_power:r,v1_tally_result:o}=this;return{tally_height:t.toFixed(),total_staking_power:e,total_vesting_power:r,v1_tally_result:o}}static fromProto(t){var e,r,o,n;return new Gn(Number(t.tallyHeight),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:((n=t.v1TallyResult)==null?void 0:n.noWithVetoCount)??"0"})}toProto(){const{tally_height:t,total_staking_power:e,total_vesting_power:r,v1_tally_result:o}=this;return Qi.TallyResult.fromPartial({tallyHeight:BigInt(t),totalStakingPower:e,totalVestingPower:r,v1TallyResult:me.TallyResult.fromPartial({yesCount:o.yes_count,abstainCount:o.abstain_count,noCount:o.no_count,noWithVetoCount:o.no_with_veto_count})})}}class Te extends u{constructor(e,r,o,n,s,i,c,d,g,v,b,k,C,N,K,Y,tt,I){super();_(this,"total_deposit");this.id=e,this.messages=r,this.status=o,this.final_tally_result=n,this.submit_time=s,this.deposit_end_time=i,this.voting_start_time=d,this.voting_end_time=g,this.emergency_start_time=v,this.emergency_next_tally_time=b,this.metadata=k,this.title=C,this.summary=N,this.proposer=K,this.expedited=Y,this.emergency=tt,this.failed_reason=I,this.total_deposit=new l(c)}static fromAmino(e){const{id:r,messages:o,status:n,final_tally_result:s,submit_time:i,deposit_end_time:c,total_deposit:d,voting_start_time:g,voting_end_time:v,emergency_start_time:b,emergency_next_tally_time:k,metadata:C,title:N,summary:K,proposer:Y,expedited:tt,emergency:I,failed_reason:ot}=e;return new Te(parseInt(r),o.map(exports.Msg.fromAmino),me.proposalStatusFromJSON(n),Gn.fromAmino(s),new Date(i),new Date(c),l.fromAmino(d),new Date(g),new Date(v),new Date(b),new Date(k),C,N,K,Y,tt,I,ot)}toAmino(){const{id:e,messages:r,status:o,final_tally_result:n,submit_time:s,deposit_end_time:i,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}=this;return{id:e.toFixed(),messages:r.map(ot=>ot.toAmino()),status:me.proposalStatusToJSON(o),final_tally_result:n.toAmino(),submit_time:s.toISOString(),deposit_end_time:i.toISOString(),total_deposit:c.toAmino(),voting_start_time:d.toISOString(),voting_end_time:g.toISOString(),emergency_start_time:v.toISOString(),emergency_next_tally_time:b.toISOString(),metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}}static fromData(e){const{id:r,messages:o,status:n,final_tally_result:s,submit_time:i,deposit_end_time:c,total_deposit:d,voting_start_time:g,voting_end_time:v,emergency_start_time:b,emergency_next_tally_time:k,metadata:C,title:N,summary:K,proposer:Y,expedited:tt,emergency:I,failed_reason:ot}=e;return new Te(parseInt(r),o.map(exports.Msg.fromData),me.proposalStatusFromJSON(n),Gn.fromData(s),new Date(i),new Date(c),l.fromData(d),new Date(g),new Date(v),new Date(b),new Date(k),C,N,K,Y,tt,I,ot)}toData(){const{id:e,messages:r,status:o,final_tally_result:n,submit_time:s,deposit_end_time:i,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}=this;return{id:e.toFixed(),messages:r.map(ot=>ot.toData()),status:me.proposalStatusToJSON(o),final_tally_result:n.toData(),submit_time:s.toISOString(),deposit_end_time:i.toISOString(),total_deposit:c.toData(),voting_start_time:d.toISOString(),voting_end_time:g.toISOString(),emergency_start_time:v.toISOString(),emergency_next_tally_time:b.toISOString(),metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}}static fromProto(e){return new Te(Number(e.id),e.messages.map(exports.Msg.fromProto),e.status,Gn.fromProto(e.finalTallyResult),e.submitTime,e.depositEndTime,l.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:n,submit_time:s,deposit_end_time:i,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:I}=this;return Qi.Proposal.fromPartial({id:BigInt(e),messages:r.map(ot=>ot.packAny()),status:o,finalTallyResult:n.toProto(),submitTime:s,depositEndTime:i,totalDeposit:c.toProto(),votingStartTime:d,votingEndTime:g,emergencyStartTime:v,emergencyNextTallyTime:b,metadata:k,title:C,summary:N,proposer:K,expedited:Y,emergency:tt,failedReason:I})}}(a=>{a.Status=me.ProposalStatus})(Te||(Te={}));class oo extends u{constructor(e,r,o){super();_(this,"initial_deposit");this.content=e,this.proposer=o,this.initial_deposit=new l(r)}static fromAmino(e){const{value:{content:r,initial_deposit:o,proposer:n}}=e;return new oo(r?exports.Content.fromAmino(r):void 0,l.fromAmino(o),n)}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:n}=e;return new oo(r?exports.Content.fromData(r):void 0,l.fromData(o),n)}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 oo(e.content?exports.Content.fromProto(e.content):void 0,l.fromProto(e.initialDeposit),e.proposer)}toProto(){const{content:e,initial_deposit:r,proposer:o}=this;return Qt.MsgSubmitProposal.fromPartial({content:e==null?void 0:e.packAny(),initialDeposit:r.toProto(),proposer:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposal",value:Qt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return oo.fromProto(Qt.MsgSubmitProposal.decode(e.value))}}class no extends u{constructor(e,r,o,n,s,i,c){super();_(this,"initial_deposit");this.messages=e,this.proposer=o,this.metadata=n,this.title=s,this.summary=i,this.expedited=c,this.initial_deposit=new l(r)}static fromAmino(e){const{value:{messages:r,initial_deposit:o,proposer:n,metadata:s,title:i,summary:c,expedited:d}}=e;return new no(r.map(exports.Msg.fromAmino),l.fromAmino(o),n,s??"",i,c,d)}toAmino(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:i,expedited:c}=this;return{type:"cosmos-sdk/v1/MsgSubmitProposal",value:{messages:e.map(d=>d.toAmino()),initial_deposit:r.toAmino(),proposer:o,metadata:n&&n!==""?n:void 0,title:s,summary:i,expedited:c}}}static fromData(e){const{messages:r,initial_deposit:o,proposer:n,metadata:s,title:i,summary:c,expedited:d}=e;return new no(r.map(exports.Msg.fromData),l.fromData(o),n,s,i,c,d)}toData(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:i,expedited:c}=this;return{"@type":"/cosmos.gov.v1.MsgSubmitProposal",messages:e.map(d=>d.toData()),initial_deposit:r.toData(),proposer:o,metadata:n,title:s,summary:i,expedited:c}}static fromProto(e){return new no(e.messages.map(exports.Msg.fromProto),l.fromProto(e.initialDeposit),e.proposer,e.metadata,e.title,e.summary,e.expedited)}toProto(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:i,expedited:c}=this;return Bt.MsgSubmitProposal.fromPartial({messages:e.map(d=>d.packAny()),initialDeposit:r.toProto(),proposer:o,metadata:n,title:s,summary:i,expedited:c})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",value:Bt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return no.fromProto(Bt.MsgSubmitProposal.decode(e.value))}}class le extends u{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 le(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 le(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 le(Number(t.proposalId),t.voter,t.option)}toProto(){const{proposal_id:t,voter:e,option:r}=this;return Qt.MsgVote.fromPartial({option:r,proposalId:BigInt(t),voter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVote",value:Qt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return le.fromProto(Qt.MsgVote.decode(t.value))}}(a=>{a.Option=Hi.VoteOption})(le||(le={}));class pe extends u{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:n}}=t;return new pe(parseInt(e),r,o,n??"")}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return{type:"cosmos-sdk/v1/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:r,metadata:o&&o!==""?o:void 0}}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:n}=t;return new pe(parseInt(e),r,o,n)}toData(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return{"@type":"/cosmos.gov.v1.MsgVote",proposal_id:t.toFixed(),voter:e,option:r,metadata:o}}static fromProto(t){return new pe(Number(t.proposalId),t.voter,t.option,t.metadata)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return Bt.MsgVote.fromPartial({proposalId:BigInt(t),voter:e,option:r,metadata:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVote",value:Bt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return pe.fromProto(Bt.MsgVote.decode(t.value))}}(a=>{a.Option=me.VoteOption})(pe||(pe={}));class ws extends u{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:n}=t;return new ws(parseInt(e),r,o.map(s=>Ft.fromAmino(s)),n)}toAmino(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{proposal_id:t.toFixed(),voter:e,options:r.map(n=>n.toAmino()),metadata:o}}static fromData(t){const{proposal_id:e,voter:r,options:o,metadata:n}=t;return new ws(parseInt(e),r,o.map(s=>Ft.fromData(s)),n)}toData(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return{proposal_id:t.toFixed(),voter:e,options:r.map(n=>n.toData()),metadata:o}}static fromProto(t){return new ws(Number(t.proposalId),t.voter,t.options.map(e=>Ft.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return me.Vote.fromPartial({options:r.map(n=>n.toProto()),proposalId:BigInt(t),voter:e,metadata:o})}}(a=>{a.Option=me.VoteOption})(ws||(ws={}));class Ft extends u{constructor(t,e){super(),this.option=t,this.weight=e}static fromAmino(t){const{option:e,weight:r}=t;return new Ft(e,parseFloat(r))}toAmino(){const{option:t,weight:e}=this;return{option:t,weight:e.toString()}}static fromData(t){const{option:e,weight:r}=t;return new Ft(e,parseFloat(r))}toData(){const{option:t,weight:e}=this;return{option:t,weight:e.toString()}}static fromProto(t){return new Ft(t.option,parseFloat(t.weight))}toProto(){const{option:t,weight:e}=this;return me.WeightedVoteOption.fromPartial({option:t,weight:e.toString()})}}class so extends u{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 so(parseInt(e),r,o.map(n=>Ft.fromAmino(n)))}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 so(parseInt(e),r,o.map(n=>Ft.fromData(n)))}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 so(Number(t.proposalId),t.voter,t.options.map(e=>Ft.fromProto(e)))}toProto(){const{proposal_id:t,voter:e,options:r}=this;return Qt.MsgVoteWeighted.fromPartial({options:r.map(o=>o.toProto()),proposalId:BigInt(t),voter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",value:Qt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return so.fromProto(Qt.MsgVoteWeighted.decode(t.value))}}class ao extends u{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:n}}=t;return new ao(parseInt(e),r,o.map(s=>Ft.fromAmino(s)),n??"")}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(n=>n.toAmino()),metadata:o&&o!==""?o:void 0}}}static fromData(t){const{proposal_id:e,voter:r,options:o,metadata:n}=t;return new ao(parseInt(e),r,o.map(s=>Ft.fromData(s)),n)}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(n=>n.toData()),metadata:o}}static fromProto(t){return new ao(Number(t.proposalId),t.voter,t.options.map(e=>Ft.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return Bt.MsgVoteWeighted.fromPartial({options:r.map(n=>n.toProto()),proposalId:BigInt(t),voter:e,metadata:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVoteWeighted",value:Bt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return ao.fromProto(Bt.MsgVoteWeighted.decode(t.value))}}class Ws extends u{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 Ws(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 Ws(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 Ws(t.moduleAddr,t.moduleName,t.creatorAddr)}toProto(){const{module_addr:t,module_name:e,creator_addr:r}=this;return Qi.Vesting.fromPartial({moduleAddr:t,moduleName:e,creatorAddr:r})}}class Wn extends u{constructor(e,r,o,n,s,i,c,d,g,v,b,k,C,N,K,Y,tt,I,ot,ut){super();_(this,"min_deposit");_(this,"expedited_min_deposit");_(this,"emergency_min_deposit");this.max_deposit_period=r,this.voting_period=o,this.quorum=n,this.threshold=s,this.veto_threshold=i,this.min_initial_deposit_ratio=c,this.proposal_cancel_ratio=d,this.proposal_cancel_dest=g,this.expedited_voting_period=v,this.expedited_threshold=b,this.burn_vote_quorum=C,this.burn_proposal_deposit_prevote=N,this.burn_vote_veto=K,this.min_deposit_ratio=Y,this.emergency_tally_interval=I,this.low_threshold_functions=ot,this.vesting=ut,this.min_deposit=new l(e),this.expedited_min_deposit=new l(k),this.emergency_min_deposit=new l(tt)}static fromAmino(e){const{min_deposit:r,max_deposit_period:o,voting_period:n,quorum:s,threshold:i,veto_threshold:c,min_initial_deposit_ratio:d,proposal_cancel_ratio:g,proposal_cancel_dest:v,expedited_voting_period:b,expedited_threshold:k,expedited_min_deposit:C,burn_vote_quorum:N,burn_proposal_deposit_prevote:K,burn_vote_veto:Y,min_deposit_ratio:tt,emergency_min_deposit:I,emergency_tally_interval:ot,low_threshold_functions:ut,vesting:L}=e;return new Wn(l.fromAmino(r),q.fromAmino(o),q.fromAmino(n),s,i,c,d,g,v,q.fromAmino(b),k,l.fromAmino(C),N,K,Y,tt,l.fromAmino(I),q.fromAmino(ot),ut,L?Ws.fromAmino(L):void 0)}toAmino(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:I,low_threshold_functions:ot,vesting:ut}=this;return{min_deposit:e.toAmino(),max_deposit_period:r.toAmino(),voting_period:o.toAmino(),quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v.toAmino(),expedited_threshold:b,expedited_min_deposit:k.toAmino(),burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt.toAmino(),emergency_tally_interval:I.toAmino(),low_threshold_functions:ot,vesting:ut==null?void 0:ut.toAmino()}}static fromData(e){const{min_deposit:r,max_deposit_period:o,voting_period:n,quorum:s,threshold:i,veto_threshold:c,min_initial_deposit_ratio:d,proposal_cancel_ratio:g,proposal_cancel_dest:v,expedited_voting_period:b,expedited_threshold:k,expedited_min_deposit:C,burn_vote_quorum:N,burn_proposal_deposit_prevote:K,burn_vote_veto:Y,min_deposit_ratio:tt,emergency_min_deposit:I,emergency_tally_interval:ot,low_threshold_functions:ut,vesting:L}=e;return new Wn(l.fromData(r),q.fromData(o),q.fromData(n),s,i,c,d,g,v,q.fromData(b),k,l.fromData(C),N,K,Y,tt,l.fromData(I),q.fromData(ot),ut,L?Ws.fromData(L):void 0)}toData(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:I,low_threshold_functions:ot,vesting:ut}=this;return{min_deposit:e.toData(),max_deposit_period:r.toData(),voting_period:o.toData(),quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v.toData(),expedited_threshold:b,expedited_min_deposit:k.toData(),burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt.toData(),emergency_tally_interval:I.toData(),low_threshold_functions:ot,vesting:ut==null?void 0:ut.toData()}}static fromProto(e){return new Wn(l.fromProto(e.minDeposit),q.fromProto(e.maxDepositPeriod),q.fromProto(e.votingPeriod),e.quorum,e.threshold,e.vetoThreshold,e.minInitialDepositRatio,e.proposalCancelRatio,e.proposalCancelDest,q.fromProto(e.expeditedVotingPeriod),e.expeditedThreshold,l.fromProto(e.expeditedMinDeposit),e.burnVoteQuorum,e.burnProposalDepositPrevote,e.burnVoteVeto,e.minDepositRatio,l.fromProto(e.emergencyMinDeposit),q.fromProto(e.emergencyTallyInterval),e.lowThresholdFunctions,e.vesting?Ws.fromProto(e.vesting):void 0)}toProto(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:i,min_initial_deposit_ratio:c,proposal_cancel_ratio:d,proposal_cancel_dest:g,expedited_voting_period:v,expedited_threshold:b,expedited_min_deposit:k,burn_vote_quorum:C,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:I,low_threshold_functions:ot,vesting:ut}=this;return Qi.Params.fromPartial({minDeposit:e.toProto(),maxDepositPeriod:r.toProto(),votingPeriod:o.toProto(),quorum:n,threshold:s,vetoThreshold:i,minInitialDepositRatio:c,proposalCancelRatio:d,proposalCancelDest:g,expeditedVotingPeriod:v.toProto(),expeditedThreshold:b,expeditedMinDeposit:k.toProto(),burnVoteQuorum:C,burnProposalDepositPrevote:N,burnVoteVeto:K,minDepositRatio:Y,emergencyMinDeposit:tt.toProto(),emergencyTallyInterval:I.toProto(),lowThresholdFunctions:ot,vesting:ut==null?void 0:ut.toProto()})}}class io extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new io(e,Wn.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 io(e,Wn.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 io(t.authority,Wn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Pc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.gov.v1.MsgUpdateParams",value:Pc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return io.fromProto(Pc.MsgUpdateParams.decode(t.value))}}class Wa extends u{constructor(e,r,o){super();_(this,"amount");this.proposal_id=e,this.depositor=r,this.amount=new l(o)}static fromAmino(e){const{proposal_id:r,depositor:o,amount:n}=e;return new Wa(parseInt(r),o,l.fromAmino(n))}toAmino(){const{proposal_id:e,depositor:r,amount:o}=this;return{proposal_id:e.toFixed(),depositor:r,amount:o.toAmino()}}static fromData(e){const{proposal_id:r,depositor:o,amount:n}=e;return new Wa(parseInt(r),o,l.fromData(n))}toData(){const{proposal_id:e,depositor:r,amount:o}=this;return{proposal_id:e.toFixed(),depositor:r,amount:o.toData()}}static fromProto(e){return new Wa(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return me.Deposit.fromPartial({proposalId:BigInt(e),depositor:r,amount:o.toProto()})}}class ja extends u{constructor(t,e){super(),this.group_id=t,this.member=e}static fromAmino(t){const{group_id:e,member:r}=t;return new ja(parseInt(e),As.fromAmino(r))}toAmino(){const{group_id:t,member:e}=this;return{group_id:t.toFixed(),member:e.toAmino()}}static fromData(t){const{group_id:e,member:r}=t;return new ja(parseInt(e),As.fromData(r))}toData(){const{group_id:t,member:e}=this;return{group_id:t.toFixed(),member:e.toData()}}static fromProto(t){return new ja(Number(t.groupId),As.fromProto(t.member))}toProto(){const{group_id:t,member:e}=this;return V.GroupMember.fromPartial({groupId:BigInt(t),member:e.toProto()})}}class As extends u{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:n}=t;return new As(e,r,o,new Date(n))}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:n}=t;return new As(e,r,o,new Date(n))}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 As(t.address,t.weight,t.metadata,t.addedAt)}toProto(){const{address:t,weight:e,metadata:r,added_at:o}=this;return V.Member.fromPartial({address:t,weight:e,metadata:r,addedAt:o})}}class Rt extends u{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 Rt(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 Rt(e,r,o)}toData(){const{address:t,weight:e,metadata:r}=this;return{address:t,weight:e,metadata:r}}static fromProto(t){return new Rt(t.address,t.weight,t.metadata)}toProto(){const{address:t,weight:e,metadata:r}=this;return V.MemberRequest.fromPartial({address:t,weight:e,metadata:r})}}class co extends u{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 co(e,r.map(Rt.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 co(e,r.map(Rt.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 co(t.admin,t.members.map(Rt.fromProto),t.metadata)}toProto(){const{admin:t,members:e,metadata:r}=this;return R.MsgCreateGroup.fromPartial({admin:t,members:e.map(o=>o.toProto()),metadata:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroup",value:R.MsgCreateGroup.encode(this.toProto()).finish()})}static unpackAny(t){return co.fromProto(R.MsgCreateGroup.decode(t.value))}}class ke extends u{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 ke(q.fromAmino(e),q.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 ke(q.fromData(e),q.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 ke(q.fromProto(t.votingPeriod),q.fromProto(t.minExecutionPeriod))}toProto(){const{voting_period:t,min_execution_period:e}=this;return V.DecisionPolicyWindows.fromPartial({votingPeriod:t.toProto(),minExecutionPeriod:e.toProto()})}}class uo extends u{constructor(t,e){super(),this.threshold=t,this.windows=e}static fromAmino(t){const{value:{threshold:e,windows:r}}=t;return new uo(e,ke.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 uo(e,ke.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 uo(t.threshold,ke.fromProto(t.windows))}toProto(){const{threshold:t,windows:e}=this;return V.ThresholdDecisionPolicy.fromPartial({threshold:t,windows:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.ThresholdDecisionPolicy",value:V.ThresholdDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return uo.fromProto(V.ThresholdDecisionPolicy.decode(t.value))}}class mo extends u{constructor(t,e){super(),this.percentage=t,this.windows=e}static fromAmino(t){const{value:{percentage:e,windows:r}}=t;return new mo(e,ke.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 mo(e,ke.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 mo(t.percentage,ke.fromProto(t.windows))}toProto(){const{percentage:t,windows:e}=this;return V.PercentageDecisionPolicy.fromPartial({percentage:t,windows:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.PercentageDecisionPolicy",value:V.PercentageDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return mo.fromProto(V.PercentageDecisionPolicy.decode(t.value))}}exports.DecisionPolicy=void 0;(a=>{function t(o){switch(o.type){case"cosmos-sdk/ThresholdDecisionPolicy":return uo.fromAmino(o);case"cosmos-sdk/PercentageDecisionPolicy":return mo.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.group.v1.ThresholdDecisionPolicy":return uo.fromData(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return mo.fromData(o)}}a.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.group.v1.ThresholdDecisionPolicy":return uo.unpackAny(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return mo.unpackAny(o)}throw new Error(`DecisionPolicy type ${n} not recognized`)}a.fromProto=r})(exports.DecisionPolicy||(exports.DecisionPolicy={}));class lo extends u{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:n}}=t;return new lo(e,parseInt(r),o,exports.DecisionPolicy.fromAmino(n))}toAmino(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return{type:"cosmos-sdk/MsgCreateGroupPolicy",value:{admin:t,group_id:e.toFixed(),metadata:r,decision_policy:o.toAmino()}}}static fromData(t){const{admin:e,group_id:r,metadata:o,decision_policy:n}=t;return new lo(e,parseInt(r),o,exports.DecisionPolicy.fromData(n))}toData(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroupPolicy",admin:t,group_id:e.toFixed(),metadata:r,decision_policy:o.toData()}}static fromProto(t){return new lo(t.admin,Number(t.groupId),t.metadata,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_id:e,metadata:r,decision_policy:o}=this;return R.MsgCreateGroupPolicy.fromPartial({admin:t,groupId:BigInt(e),metadata:r,decisionPolicy:o.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicy",value:R.MsgCreateGroupPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return lo.fromProto(R.MsgCreateGroupPolicy.decode(t.value))}}class po extends u{constructor(t,e,r,o,n,s){super(),this.admin=t,this.members=e,this.group_metadata=r,this.group_policy_metadata=o,this.group_policy_as_admin=n,this.decision_policy=s}static fromAmino(t){const{value:{admin:e,members:r,group_metadata:o,group_policy_metadata:n,group_policy_as_admin:s,decision_policy:i}}=t;return new po(e,r.map(Rt.fromAmino),o,n,s,exports.DecisionPolicy.fromAmino(i))}toAmino(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s}=this;return{type:"cosmos-sdk/MsgCreateGroupWithPolicy",value:{admin:t,members:e.map(i=>i.toAmino()),group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s.toAmino()}}}static fromData(t){const{admin:e,members:r,group_metadata:o,group_policy_metadata:n,group_policy_as_admin:s,decision_policy:i}=t;return new po(e,r.map(Rt.fromData),o,n,s,exports.DecisionPolicy.fromData(i))}toData(){const{admin:t,members:e,group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s}=this;return{"@type":"/cosmos.group.v1.MsgCreateGroupWithPolicy",admin:t,members:e.map(i=>i.toData()),group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s.toData()}}static fromProto(t){return new po(t.admin,t.members.map(Rt.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:n,decision_policy:s}=this;return R.MsgCreateGroupWithPolicy.fromPartial({admin:t,members:e.map(i=>i.toProto()),groupMetadata:r,groupPolicyMetadata:o,groupPolicyAsAdmin:n,decisionPolicy:s.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicy",value:R.MsgCreateGroupWithPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return po.fromProto(R.MsgCreateGroupWithPolicy.decode(t.value))}}class ho extends u{constructor(t,e){super(),this.proposal_id=t,this.executor=e}static fromAmino(t){const{value:{proposal_id:e,executor:r}}=t;return new ho(parseInt(e),r)}toAmino(){const{proposal_id:t,executor:e}=this;return{type:"cosmos-sdk/group/MsgExec",value:{proposal_id:t.toFixed(),executor:e}}}static fromData(t){const{proposal_id:e,executor:r}=t;return new ho(parseInt(e),r)}toData(){const{proposal_id:t,executor:e}=this;return{"@type":"/cosmos.group.v1.MsgExec",proposal_id:t.toFixed(),executor:e}}static fromProto(t){return new ho(Number(t.proposalId),t.executor)}toProto(){const{proposal_id:t,executor:e}=this;return R.MsgExec.fromPartial({proposalId:BigInt(t),executor:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgExec",value:R.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return ho.fromProto(R.MsgExec.decode(t.value))}}class he extends u{constructor(t,e,r,o,n){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o,this.exec=n}static fromAmino(t){const{value:{proposal_id:e,voter:r,option:o,metadata:n,exec:s}}=t;return new he(parseInt(e),r,V.voteOptionFromJSON(o),n,R.execFromJSON(s))}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:n}=this;return{type:"cosmos-sdk/group/MsgVote",value:{proposal_id:t.toFixed(),voter:e,option:V.voteOptionToJSON(r),metadata:o,exec:R.execToJSON(n)}}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:n,exec:s}=t;return new he(parseInt(e),r,V.voteOptionFromJSON(o),n,R.execFromJSON(s))}toData(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:n}=this;return{"@type":"/cosmos.group.v1.MsgVote",proposal_id:t.toFixed(),voter:e,option:V.voteOptionToJSON(r),metadata:o,exec:R.execToJSON(n)}}static fromProto(t){return new he(Number(t.proposalId),t.voter,t.option,t.metadata,t.exec)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o,exec:n}=this;return R.MsgVote.fromPartial({proposalId:BigInt(t),voter:e,option:r,metadata:o,exec:n})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgVote",value:R.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return he.fromProto(R.MsgVote.decode(t.value))}}(a=>{a.Option=V.VoteOption,a.Exec=R.Exec})(he||(he={}));class fo extends u{constructor(t,e){super(),this.address=t,this.group_id=e}static fromAmino(t){const{value:{address:e,group_id:r}}=t;return new fo(e,parseInt(r))}toAmino(){const{address:t,group_id:e}=this;return{type:"cosmos-sdk/group/MsgLeaveGroup",value:{address:t,group_id:e.toFixed()}}}static fromData(t){const{address:e,group_id:r}=t;return new fo(e,parseInt(r))}toData(){const{address:t,group_id:e}=this;return{"@type":"/cosmos.group.v1.MsgLeaveGroup",address:t,group_id:e.toFixed()}}static fromProto(t){return new fo(t.address,Number(t.groupId))}toProto(){const{address:t,group_id:e}=this;return R.MsgLeaveGroup.fromPartial({address:t,groupId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgLeaveGroup",value:R.MsgLeaveGroup.encode(this.toProto()).finish()})}static unpackAny(t){return fo.fromProto(R.MsgLeaveGroup.decode(t.value))}}class fe extends u{constructor(t,e,r,o,n,s,i){super(),this.group_policy_address=t,this.proposers=e,this.metadata=r,this.messages=o,this.exec=n,this.title=s,this.summary=i}static fromAmino(t){const{value:{group_policy_address:e,proposers:r,metadata:o,messages:n,exec:s,title:i,summary:c}}=t;return new fe(e,r,o,n.map(exports.Msg.fromAmino),R.execFromJSON(s),i,c)}toAmino(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:n,title:s,summary:i}=this;return{type:"cosmos-sdk/group/MsgSubmitProposal",value:{group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toAmino()),exec:R.execToJSON(n),title:s,summary:i}}}static fromData(t){const{group_policy_address:e,proposers:r,metadata:o,messages:n,exec:s,title:i,summary:c}=t;return new fe(e,r,o,n.map(exports.Msg.fromData),R.execFromJSON(s),i,c)}toData(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:n,title:s,summary:i}=this;return{"@type":"/cosmos.group.v1.MsgSubmitProposal",group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toData()),exec:R.execToJSON(n),title:s,summary:i}}static fromProto(t){return new fe(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:n,title:s,summary:i}=this;return R.MsgSubmitProposal.fromPartial({groupPolicyAddress:t,proposers:e,metadata:r,messages:o.map(c=>c.packAny()),exec:n,title:s,summary:i})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgSubmitProposal",value:R.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(t){return fe.fromProto(R.MsgSubmitProposal.decode(t.value))}}(a=>{a.Exec=R.Exec})(fe||(fe={}));class go extends u{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 go(e,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.toFixed(),new_admin:r}}}static fromData(t){const{admin:e,group_id:r,new_admin:o}=t;return new go(e,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.toFixed(),new_admin:r}}static fromProto(t){return new go(t.admin,Number(t.groupId),t.newAdmin)}toProto(){const{admin:t,group_id:e,new_admin:r}=this;return R.MsgUpdateGroupAdmin.fromPartial({admin:t,groupId:BigInt(e),newAdmin:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdmin",value:R.MsgUpdateGroupAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return go.fromProto(R.MsgUpdateGroupAdmin.decode(t.value))}}class yo extends u{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 yo(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 yo(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 yo(t.admin,t.groupPolicyAddress,exports.DecisionPolicy.fromProto(t.decisionPolicy))}toProto(){const{admin:t,group_policy_address:e,decision_policy:r}=this;return R.MsgUpdateGroupPolicyDecisionPolicy.fromPartial({admin:t,groupPolicyAddress:e,decisionPolicy:r.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",value:R.MsgUpdateGroupPolicyDecisionPolicy.encode(this.toProto()).finish()})}static unpackAny(t){return yo.fromProto(R.MsgUpdateGroupPolicyDecisionPolicy.decode(t.value))}}class _o extends u{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 _o(e,parseInt(r),o.map(Rt.fromAmino))}toAmino(){const{admin:t,group_id:e,member_updates:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupMembers",value:{admin:t,group_id:e.toFixed(),member_updates:r.map(o=>o.toAmino())}}}static fromData(t){const{admin:e,group_id:r,member_updates:o}=t;return new _o(e,parseInt(r),o.map(Rt.fromData))}toData(){const{admin:t,group_id:e,member_updates:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMembers",admin:t,group_id:e.toFixed(),member_updates:r.map(o=>o.toData())}}static fromProto(t){return new _o(t.admin,Number(t.groupId),t.memberUpdates.map(Rt.fromProto))}toProto(){const{admin:t,group_id:e,member_updates:r}=this;return R.MsgUpdateGroupMembers.fromPartial({admin:t,groupId:BigInt(e),memberUpdates:r.map(o=>o.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembers",value:R.MsgUpdateGroupMembers.encode(this.toProto()).finish()})}static unpackAny(t){return _o.fromProto(R.MsgUpdateGroupMembers.decode(t.value))}}class vo extends u{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 vo(e,parseInt(r),o)}toAmino(){const{admin:t,group_id:e,metadata:r}=this;return{type:"cosmos-sdk/MsgUpdateGroupMetadata",value:{admin:t,group_id:e.toFixed(),metadata:r}}}static fromData(t){const{admin:e,group_id:r,metadata:o}=t;return new vo(e,parseInt(r),o)}toData(){const{admin:t,group_id:e,metadata:r}=this;return{"@type":"/cosmos.group.v1.MsgUpdateGroupMetadata",admin:t,group_id:e.toFixed(),metadata:r}}static fromProto(t){return new vo(t.admin,Number(t.groupId),t.metadata)}toProto(){const{admin:t,group_id:e,metadata:r}=this;return R.MsgUpdateGroupMetadata.fromPartial({admin:t,groupId:BigInt(e),metadata:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadata",value:R.MsgUpdateGroupMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return vo.fromProto(R.MsgUpdateGroupMetadata.decode(t.value))}}class wo extends u{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 wo(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 wo(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 wo(t.admin,t.groupPolicyAddress,t.newAdmin)}toProto(){const{admin:t,group_policy_address:e,new_admin:r}=this;return R.MsgUpdateGroupPolicyAdmin.fromPartial({admin:t,groupPolicyAddress:e,newAdmin:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",value:R.MsgUpdateGroupPolicyAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return wo.fromProto(R.MsgUpdateGroupPolicyAdmin.decode(t.value))}}class Ao extends u{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 Ao(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 Ao(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 Ao(t.admin,t.groupPolicyAddress,t.metadata)}toProto(){const{admin:t,group_policy_address:e,metadata:r}=this;return R.MsgUpdateGroupPolicyMetadata.fromPartial({admin:t,groupPolicyAddress:e,metadata:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",value:R.MsgUpdateGroupPolicyMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Ao.fromProto(R.MsgUpdateGroupPolicyMetadata.decode(t.value))}}class Po extends u{constructor(t,e,r,o,n,s){super(),this.id=t,this.admin=e,this.metadata=r,this.version=o,this.total_weight=n,this.created_at=s}static fromAmino(t){const{id:e,admin:r,metadata:o,version:n,total_weight:s,created_at:i}=t;return new Po(parseInt(e),r,o,parseInt(n),s,new Date(i))}toAmino(){const{id:t,admin:e,metadata:r,version:o,total_weight:n,created_at:s}=this;return{id:t.toFixed(),admin:e,metadata:r,version:o.toFixed(),total_weight:n,created_at:s.toISOString()}}static fromData(t){const{id:e,admin:r,metadata:o,version:n,total_weight:s,created_at:i}=t;return new Po(parseInt(e),r,o,parseInt(n),s,new Date(i))}toData(){const{id:t,admin:e,metadata:r,version:o,total_weight:n,created_at:s}=this;return{id:t.toFixed(),admin:e,metadata:r,version:o.toFixed(),total_weight:n,created_at:s.toISOString()}}static fromProto(t){return new Po(Number(t.id),t.admin,t.metadata,Number(t.version),t.totalWeight,t.createdAt)}toProto(){const{id:t,admin:e,metadata:r,version:o,total_weight:n,created_at:s}=this;return V.GroupInfo.fromPartial({id:BigInt(t),admin:e,metadata:r,version:BigInt(o),totalWeight:n,createdAt:s})}}class Ps extends u{constructor(t,e,r,o,n,s,i){super(),this.address=t,this.group_id=e,this.admin=r,this.metadata=o,this.version=n,this.decision_policy=s,this.created_at=i}static fromAmino(t){const{address:e,group_id:r,admin:o,metadata:n,version:s,decision_policy:i,created_at:c}=t;return new Ps(e,parseInt(r),o,n,parseInt(s),exports.DecisionPolicy.fromAmino(i),new Date(c))}toAmino(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:i}=this;return{address:t,group_id:e.toFixed(),admin:r,metadata:o,version:n.toFixed(),decision_policy:s.toAmino(),created_at:i.toISOString()}}static fromData(t){const{address:e,group_id:r,admin:o,metadata:n,version:s,decision_policy:i,created_at:c}=t;return new Ps(e,parseInt(r),o,n,parseInt(s),exports.DecisionPolicy.fromData(i),new Date(c))}toData(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:i}=this;return{address:t,group_id:e.toFixed(),admin:r,metadata:o,version:n.toFixed(),decision_policy:s.toData(),created_at:i.toISOString()}}static fromProto(t){return new Ps(t.address,Number(t.groupId),t.admin,t.metadata,Number(t.version),exports.DecisionPolicy.fromProto(t.decisionPolicy),t.createdAt)}toProto(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:i}=this;return V.GroupPolicyInfo.fromPartial({address:t,groupId:BigInt(e),admin:r,metadata:o,version:BigInt(n),decisionPolicy:s.packAny(),createdAt:i})}}class jn extends u{constructor(t,e,r,o,n,s,i,c,d,g,v,b,k,C){super(),this.id=t,this.group_policy_address=e,this.metadata=r,this.proposers=o,this.submit_time=n,this.group_version=s,this.group_policy_version=i,this.status=c,this.final_tally_result=d,this.voting_period_end=g,this.executor_result=v,this.messages=b,this.title=k,this.summary=C}static fromAmino(t){const{id:e,group_policy_address:r,metadata:o,proposers:n,submit_time:s,group_version:i,group_policy_version:c,status:d,final_tally_result:g,voting_period_end:v,executor_result:b,messages:k,title:C,summary:N}=t;return new jn(parseInt(e),r,o,n,new Date(s),parseInt(i),parseInt(c),V.proposalStatusFromJSON(d),{yes_count:F(g.yes_count??0).toFixed(),no_count:F(g.no_count??0).toFixed(),abstain_count:F(g.abstain_count??0).toFixed(),no_with_veto_count:F(g.no_with_veto_count??0).toFixed()},new Date(v),V.proposalExecutorResultFromJSON(b),k.map(exports.Msg.fromAmino),C,N)}toAmino(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:i,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:C}=this;return{id:t.toFixed(),group_policy_address:e,metadata:r,proposers:o,submit_time:n.toISOString(),group_version:s.toFixed(),group_policy_version:i.toFixed(),status:V.proposalStatusToJSON(c),final_tally_result:{yes_count:F(d.yes_count).toFixed(),no_count:F(d.no_count).toFixed(),abstain_count:F(d.abstain_count).toFixed(),no_with_veto_count:F(d.no_with_veto_count).toFixed()},voting_period_end:g.toISOString(),executor_result:V.proposalExecutorResultToJSON(v),messages:b.map(N=>N.toAmino()),title:k,summary:C}}static fromData(t){const{id:e,group_policy_address:r,metadata:o,proposers:n,submit_time:s,group_version:i,group_policy_version:c,status:d,final_tally_result:g,voting_period_end:v,executor_result:b,messages:k,title:C,summary:N}=t;return new jn(parseInt(e),r,o,n,new Date(s),parseInt(i),parseInt(c),V.proposalStatusFromJSON(d),{yes_count:F(g.yes_count??0).toFixed(),no_count:F(g.no_count??0).toFixed(),abstain_count:F(g.abstain_count??0).toFixed(),no_with_veto_count:F(g.no_with_veto_count??0).toFixed()},new Date(v),V.proposalExecutorResultFromJSON(b),k.map(exports.Msg.fromData),C,N)}toData(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:i,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:C}=this;return{id:t.toFixed(),group_policy_address:e,metadata:r,proposers:o,submit_time:n.toISOString(),group_version:s.toFixed(),group_policy_version:i.toFixed(),status:V.proposalStatusToJSON(c),final_tally_result:{yes_count:F(d.yes_count).toFixed(),no_count:F(d.no_count).toFixed(),abstain_count:F(d.abstain_count).toFixed(),no_with_veto_count:F(d.no_with_veto_count).toFixed()},voting_period_end:g.toISOString(),executor_result:V.proposalExecutorResultToJSON(v),messages:b.map(N=>N.toData()),title:k,summary:C}}static fromProto(t){var e,r,o,n;return new jn(Number(t.id),t.groupPolicyAddress,t.metadata,t.proposers,t.submitTime,Number(t.groupVersion),Number(t.groupPolicyVersion),t.status,{yes_count:F(((e=t.finalTallyResult)==null?void 0:e.yesCount)??0).toFixed(),no_count:F(((r=t.finalTallyResult)==null?void 0:r.noCount)??0).toFixed(),abstain_count:F(((o=t.finalTallyResult)==null?void 0:o.abstainCount)??0).toFixed(),no_with_veto_count:F(((n=t.finalTallyResult)==null?void 0:n.noWithVetoCount)??0).toFixed()},t.votingPeriodEnd,t.executorResult,t.messages.map(exports.Msg.fromProto),t.title,t.summary)}toProto(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:i,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:C}=this;let N;return d&&(N=V.TallyResult.fromPartial({yesCount:d.yes_count,noCount:d.no_count,abstainCount:d.abstain_count,noWithVetoCount:d.no_with_veto_count})),V.Proposal.fromPartial({id:BigInt(t),groupPolicyAddress:e,metadata:r,proposers:o,submitTime:n,groupVersion:BigInt(s),groupPolicyVersion:BigInt(i),status:c,finalTallyResult:N,votingPeriodEnd:g,executorResult:v,messages:b.map(K=>K.packAny()),title:k,summary:C})}}(a=>{a.Status=V.ProposalStatus,a.ExecutorResult=V.ProposalExecutorResult})(jn||(jn={}));class Fe extends u{constructor(t,e,r,o,n){super(),this.proposal_id=t,this.voter=e,this.option=r,this.metadata=o,this.submit_time=n}static fromAmino(t){const{proposal_id:e,voter:r,option:o,metadata:n,submit_time:s}=t;return new Fe(parseInt(e),r,V.voteOptionFromJSON(o),n,new Date(s))}toAmino(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:n}=this;return{proposal_id:t.toFixed(),voter:e,option:V.voteOptionToJSON(r),metadata:o,submit_time:n.toISOString()}}static fromData(t){const{proposal_id:e,voter:r,option:o,metadata:n,submit_time:s}=t;return new Fe(parseInt(e),r,V.voteOptionFromJSON(o),n,new Date(s))}toData(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:n}=this;return{proposal_id:t.toFixed(),voter:e,option:V.voteOptionToJSON(r),metadata:o,submit_time:n.toISOString()}}static fromProto(t){return new Fe(Number(t.proposalId),t.voter,t.option,t.metadata,t.submitTime)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o,submit_time:n}=this;return V.Vote.fromPartial({proposalId:BigInt(t),voter:e,option:r,metadata:o,submitTime:n})}}(a=>{a.Option=V.VoteOption})(Fe||(Fe={}));class Re extends u{constructor(e,r,o){super();_(this,"recv_fee");_(this,"ack_fee");_(this,"timeout_fee");this.recv_fee=new l(e),this.ack_fee=new l(r),this.timeout_fee=new l(o)}static fromAmino(e){const{recv_fee:r,ack_fee:o,timeout_fee:n}=e;return new Re(l.fromAmino(r),l.fromAmino(o),l.fromAmino(n))}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:n}=e;return new Re(l.fromData(r),l.fromData(o),l.fromData(n))}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 Re(l.fromProto(e.recvFee),l.fromProto(e.ackFee),l.fromProto(e.timeoutFee))}toProto(){const{recv_fee:e,ack_fee:r,timeout_fee:o}=this;return xu.Fee.fromPartial({recvFee:e.toProto(),ackFee:r.toProto(),timeoutFee:o.toProto()})}}class js extends u{constructor(t,e,r,o,n){super(),this.fee=t,this.source_port_id=e,this.source_channel_id=r,this.signer=o,this.relayers=n}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:n,relayers:s}=t;return new js(e?Re.fromData(e):void 0,r,o,n,s)}toData(){const{fee:t,source_port_id:e,source_channel_id:r,signer:o,relayers:n}=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:n}}static fromProto(t){return new js(t.fee?Re.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:n}=this;return te.MsgPayPacketFee.fromPartial({fee:t==null?void 0:t.toProto(),sourcePortId:e,sourceChannelId:r,signer:o,relayers:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgPayPacketFee",value:te.MsgPayPacketFee.encode(this.toProto()).finish()})}static unpackAny(t){return js.fromProto(te.MsgPayPacketFee.decode(t.value))}}class qe extends u{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 qe(e,r,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 qe(e,r,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 qe(t.portId,t.channelId,Number(t.sequence))}toProto(){const{port_id:t,channel_id:e,sequence:r}=this;return ui.PacketId.fromPartial({portId:t,channelId:e,sequence:BigInt(r)})}}class $e extends u{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 $e(e?Re.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 $e(e?Re.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 $e(t.fee?Re.fromProto(t.fee):void 0,t.refundAddress,t.relayers)}toProto(){const{fee:t,refund_address:e,relayers:r}=this;return xu.PacketFee.fromPartial({fee:t==null?void 0:t.toProto(),refundAddress:e,relayers:r})}}class Js extends u{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 Js(e?qe.fromData(e):void 0,r?$e.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 Js(t.packetId?qe.fromProto(t.packetId):void 0,t.packetFee?$e.fromProto(t.packetFee):void 0)}toProto(){const{packet_id:t,packet_fee:e}=this;return te.MsgPayPacketFeeAsync.fromPartial({packetId:t==null?void 0:t.toProto(),packetFee:e==null?void 0:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgPayPacketFeeAsync",value:te.MsgPayPacketFeeAsync.encode(this.toProto()).finish()})}static unpackAny(t){return Js.fromProto(te.MsgPayPacketFeeAsync.decode(t.value))}}class Zs extends u{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:n}=t;return new Zs(e,r,o,n)}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 Zs(t.portId,t.channelId,t.relayer,t.payee)}toProto(){const{port_id:t,channel_id:e,relayer:r,payee:o}=this;return te.MsgRegisterPayee.fromPartial({portId:t,channelId:e,relayer:r,payee:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterPayee",value:te.MsgRegisterPayee.encode(this.toProto()).finish()})}static unpackAny(t){return Zs.fromProto(te.MsgRegisterPayee.decode(t.value))}}class Ys extends u{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:n}=t;return new Ys(e,r,o,n)}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 Ys(t.portId,t.channelId,t.relayer,t.counterpartyPayee)}toProto(){const{port_id:t,channel_id:e,relayer:r,counterparty_payee:o}=this;return te.MsgRegisterCounterpartyPayee.fromPartial({portId:t,channelId:e,relayer:r,counterpartyPayee:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",value:te.MsgRegisterCounterpartyPayee.encode(this.toProto()).finish()})}static unpackAny(t){return Ys.fromProto(te.MsgRegisterCounterpartyPayee.decode(t.value))}}class Pi extends u{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 Pi(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 Pi(e,r)}toData(){const{fee_version:t,app_version:e}=this;return{fee_version:t,app_version:e}}static fromProto(t){return new Pi(t.feeVersion,t.appVersion)}toProto(){const{fee_version:t,app_version:e}=this;return sd.Metadata.fromPartial({feeVersion:t,appVersion:e})}}class bi extends u{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 bi(e?qe.fromAmino(e):void 0,r.map(o=>$e.fromAmino(o)))}toAmino(){const{packet_id:t,packet_fees:e}=this;return{packet_id:t==null?void 0:t.toAmino(),packet_fees:e.map(r=>r.toAmino())}}static fromData(t){const{packet_id:e,packet_fees:r}=t;return new bi(e?qe.fromData(e):void 0,r.map(o=>$e.fromData(o)))}toData(){const{packet_id:t,packet_fees:e}=this;return{packet_id:t==null?void 0:t.toData(),packet_fees:e.map(r=>r.toData())}}static fromProto(t){return new bi(t.packetId?qe.fromProto(t.packetId):void 0,t.packetFees.map(e=>$e.fromProto(e)))}toProto(){const{packet_id:t,packet_fees:e}=this;return{packetId:t==null?void 0:t.toProto(),packetFees:e.map(r=>r.toProto())}}}class bo extends u{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 bo(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 bo(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 bo(t.authority,t.address,t.allowed)}toProto(){const{authority:t,address:e,allowed:r}=this;return $a.MsgUpdateACL.fromPartial({authority:t,address:e,allowed:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateACL",value:$a.MsgUpdateACL.encode(this.toProto()).finish()})}static unpackAny(t){return bo.fromProto($a.MsgUpdateACL.decode(t.value))}}class Jn extends u{constructor(t){super(),this.default_allowed=t}static fromAmino(t){return new Jn(t.value.default_allowed)}toAmino(){return{type:"ibc-hooks/Params",value:{default_allowed:this.default_allowed}}}static fromData(t){return new Jn(t.default_allowed)}toData(){return{"@type":"/initia.ibchooks.v1.Params",default_allowed:this.default_allowed}}static fromProto(t){return new Jn(t.defaultAllowed)}toProto(){return Mu.Params.fromPartial({defaultAllowed:this.default_allowed})}}class Do extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Do(e,Jn.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 Do(e,Jn.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 Do(t.authority,Jn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return $a.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateParams",value:$a.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Do.fromProto($a.MsgUpdateParams.decode(t.value))}}class Xs extends u{constructor(t,e){super(),this.address=t,this.allowed=e}static fromAmino(t){const{address:e,allowed:r}=t;return new Xs(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 Xs(e,r)}toData(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromProto(t){return new Xs(t.address,t.allowed)}toProto(){const{address:t,allowed:e}=this;return Mu.ACL.fromPartial({address:t,allowed:e})}}class ko extends u{constructor(e,r,o,n,s,i,c,d,g){super();_(this,"source_port");_(this,"source_channel");_(this,"class_id");_(this,"token_ids");_(this,"sender");_(this,"receiver");_(this,"timeout_height");_(this,"timeout_timestamp");_(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=n,this.sender=s,this.receiver=i,this.timeout_height=c,this.timeout_timestamp=d,this.memo=g}static fromAmino(e){const{value:{source_port:r,source_channel:o,class_id:n,token_ids:s,sender:i,receiver:c,timeout_height:d,timeout_timestamp:g,memo:v}}=e;if(!d&&!g)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new ko(r,o,n,s,i,c,U.fromAmino(d),g,v)}toAmino(){const{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:c,timeout_timestamp:d,memo:g}=this;return{type:"nft-transfer/MsgTransfer",value:{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:(c==null?void 0:c.toAmino())??{},timeout_timestamp:d,memo:g===""?void 0:g}}}static fromData(e){const{source_port:r,source_channel:o,class_id:n,token_ids:s,sender:i,receiver:c,timeout_timestamp:d,timeout_height:g,memo:v}=e;if(!g&&!d)throw new Error("both of timeout_height and timeout_timestamp are undefined");return new ko(r,o,n,s,i,c,g?U.fromData(g):void 0,d==="0"?void 0:d,v)}toData(){const{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:c,timeout_timestamp:d,memo:g}=this;return{"@type":"/ibc.applications.nft_transfer.v1.MsgTransfer",source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:c?c.toData():new U(0,0).toData(),timeout_timestamp:d??"0",memo:g}}static fromProto(e){if(!e.timeoutHeight&&Number(e.timeoutTimestamp)==0)throw new Error("both of timeout_height and timeout_timestamp are empty");return new ko(e.sourcePort,e.sourceChannel,e.classId,e.tokenIds,e.sender,e.receiver,e.timeoutHeight?U.fromProto(e.timeoutHeight):void 0,e.timeoutTimestamp.toString(),e.memo)}toProto(){const{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:i,timeout_height:c,timeout_timestamp:d,memo:g}=this;return La.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,classId:o,tokenIds:n,sender:s,receiver:i,timeoutHeight:c==null?void 0:c.toProto(),timeoutTimestamp:d?BigInt(d):void 0,memo:g})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgTransfer",value:La.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return ko.fromProto(La.MsgTransfer.decode(e.value))}}class Zn extends u{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 Zn(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 Zn(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 Zn(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Su.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class xo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new xo(e,Zn.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 xo(e,Zn.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 xo(t.authority,Zn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return La.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgUpdateParams",value:La.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return xo.fromProto(La.MsgUpdateParams.decode(t.value))}}class Di extends u{constructor(t,e,r,o,n,s,i,c,d){super(),this.class_id=t,this.class_uri=e,this.class_data=r,this.token_ids=o,this.token_uris=n,this.token_data=s,this.sender=i,this.receiver=c,this.memo=d}static fromAmino(t){const{class_id:e,class_uri:r,class_data:o,token_ids:n,token_uris:s,token_data:i,sender:c,receiver:d,memo:g}=t;return new Di(e,r,o,n,s,i,c,d,g)}toAmino(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:i,receiver:c,memo:d}=this;return{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:i,receiver:c,memo:d}}static fromData(t){const{class_id:e,class_uri:r,class_data:o,token_ids:n,token_uris:s,token_data:i,sender:c,receiver:d,memo:g}=t;return new Di(e,r,o,n,s,i,c,d,g)}toData(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:i,receiver:c,memo:d}=this;return{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:i,receiver:c,memo:d}}static fromProto(t){return new Di(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:n,token_data:s,sender:i,receiver:c,memo:d}=this;return ad.NonFungibleTokenPacketData.fromPartial({classId:t,classUri:e,classData:r,tokenIds:o,tokenUris:n,tokenData:s,sender:i,receiver:c,memo:d})}}class Qs extends u{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 Qs(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 Qs(e,r)}toData(){const{path:t,base_class_id:e}=this;return{path:t,base_class_id:e}}static fromProto(t){return new Qs(t.path,t.baseClassId)}toProto(){const{path:t,base_class_id:e}=this;return Su.ClassTrace.fromPartial({path:t,baseClassId:e})}}class Mo extends u{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:n}}=t;return new Mo(e,r,o,n)}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:n}=t;return new Mo(e,r,o,n)}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 Mo(t.authority,t.channelId,t.portId,t.admin)}toProto(){const{authority:t,channel_id:e,port_id:r,admin:o}=this;return Ha.MsgUpdateAdmin.fromPartial({authority:t,channelId:e,portId:r,admin:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdateAdmin",value:Ha.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Mo.fromProto(Ha.MsgUpdateAdmin.decode(t.value))}}class So extends u{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:n}}=t;return new So(e,r,o,n)}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:n}=t;return new So(e,r,o,n)}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 So(t.authority,t.channelId,t.portId,t.relayers)}toProto(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return Ha.MsgUpdatePermissionedRelayers.fromPartial({authority:t,channelId:e,portId:r,relayers:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers",value:Ha.MsgUpdatePermissionedRelayers.encode(this.toProto()).finish()})}static unpackAny(t){return So.fromProto(Ha.MsgUpdatePermissionedRelayers.decode(t.value))}}class bs extends u{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 bs(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 bs(e,r)}toData(){const{port_id:t,channel_id:e}=this;return{port_id:t,channel_id:e}}static fromProto(t){return new bs(t.portId,t.channelId)}toProto(){const{port_id:t,channel_id:e}=this;return ui.Counterparty.fromPartial({portId:t,channelId:e})}}class ee extends u{constructor(t,e,r,o,n){super(),this.state=t,this.ordering=e,this.counterparty=r,this.connection_hops=o,this.version=n}static fromAmino(t){const{state:e,ordering:r,counterparty:o,connection_hops:n,version:s}=t;return new ee(e,r,o?bs.fromAmino(o):void 0,n,s)}toAmino(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:n}=this;return{state:t,ordering:e,counterparty:r==null?void 0:r.toAmino(),connection_hops:o,version:n}}static fromData(t){const{state:e,ordering:r,counterparty:o,connection_hops:n,version:s}=t;return new ee(e,r,o?bs.fromData(o):void 0,n,s)}toData(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:n}=this;return{state:t,ordering:e,counterparty:r==null?void 0:r.toData(),connection_hops:o,version:n}}static fromProto(t){return new ee(t.state,t.ordering,t.counterparty?bs.fromProto(t.counterparty):void 0,t.connectionHops,t.version)}toProto(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:n}=this;return ui.Channel.fromPartial({state:t,ordering:e,counterparty:r==null?void 0:r.toProto(),connectionHops:o,version:n})}}class ta extends u{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 ta(e,r?ee.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 ta(t.portId,t.channel?ee.fromProto(t.channel):void 0,t.signer)}toProto(){const{port_id:t,channel:e,signer:r}=this;return J.MsgChannelOpenInit.fromPartial({portId:t,channel:e==null?void 0:e.toProto(),signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",value:J.MsgChannelOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return ta.fromProto(J.MsgChannelOpenInit.decode(t.value))}}class ea extends u{constructor(e,r,o){super();_(this,"client_state");_(this,"consensus_state");_(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:n}=e;return new ea(r,o,n)}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 ea(e.clientState,e.consensusState,e.signer)}toProto(){const{client_state:e,consensus_state:r,signer:o}=this;return ft.MsgCreateClient.fromPartial({clientState:e,consensusState:r,signer:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgCreateClient",value:ft.MsgCreateClient.encode(this.toProto()).finish()})}static unpackAny(e){return ea.fromProto(ft.MsgCreateClient.decode(e.value))}}class ra extends u{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 ra(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 ra(t.clientId,t.clientMessage,t.signer)}toProto(){const{client_id:t,client_message:e,signer:r}=this;return ft.MsgUpdateClient.fromPartial({clientId:t,clientMessage:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateClient",value:ft.MsgUpdateClient.encode(this.toProto()).finish()})}static unpackAny(t){return ra.fromProto(ft.MsgUpdateClient.decode(t.value))}}class oa extends u{constructor(t,e,r,o,n,s){super(),this.client_id=t,this.client_state=e,this.consensus_state=r,this.proof_upgrade_client=o,this.proof_upgrade_consensus_state=n,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,client_state:r,consensus_state:o,proof_upgrade_client:n,proof_upgrade_consensus_state:s,signer:i}=t;return new oa(e,r,o,n,s,i)}toData(){const{client_id:t,client_state:e,consensus_state:r,proof_upgrade_client:o,proof_upgrade_consensus_state:n,signer:s}=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:n,signer:s}}static fromProto(t){return new oa(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:n,signer:s}=this;return ft.MsgUpgradeClient.fromPartial({clientId:t,clientState:e,consensusState:r,proofUpgradeClient:Buffer.from(o,"base64"),proofUpgradeConsensusState:Buffer.from(n,"base64"),signer:s})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",value:ft.MsgUpgradeClient.encode(this.toProto()).finish()})}static unpackAny(t){return oa.fromProto(ft.MsgUpgradeClient.decode(t.value))}}class na extends u{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 na(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 na(t.clientId,t.misbehaviour,t.signer)}toProto(){const{client_id:t,misbehaviour:e,signer:r}=this;return ft.MsgSubmitMisbehaviour.fromPartial({clientId:t,misbehaviour:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",value:ft.MsgSubmitMisbehaviour.encode(this.toProto()).finish()})}static unpackAny(t){return na.fromProto(ft.MsgSubmitMisbehaviour.decode(t.value))}}class sa extends u{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 sa(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 sa(t.subjectClientId,t.substituteClientId,t.signer)}toProto(){const{subject_client_id:t,substitute_client_id:e,signer:r}=this;return ft.MsgRecoverClient.fromPartial({subjectClientId:t,substituteClientId:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgRecoverClient",value:ft.MsgRecoverClient.encode(this.toProto()).finish()})}static unpackAny(t){return sa.fromProto(ft.MsgRecoverClient.decode(t.value))}}class xe extends u{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 xe(e,parseInt(r),o)}toAmino(){const{name:t,height:e,info:r}=this;return{name:t,height:e.toFixed(),info:r}}static fromData(t){const{name:e,height:r,info:o}=t;return new xe(e,parseInt(r),o)}toData(){const{name:t,height:e,info:r}=this;return{name:t,height:e.toFixed(),info:r}}static fromProto(t){return new xe(t.name,Number(t.height),t.info)}toProto(){const{name:t,height:e,info:r}=this;return id.Plan.fromPartial({name:t,height:BigInt(e),info:r})}}class Io extends u{constructor(t,e){super(),this.authority=t,this.plan=e}static fromAmino(t){const{value:{authority:e,plan:r}}=t;return new Io(e,xe.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 Io(e,xe.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 Io(t.authority,xe.fromProto(t.plan))}toProto(){const{authority:t,plan:e}=this;return za.MsgSoftwareUpgrade.fromPartial({authority:t,plan:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",value:za.MsgSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Io.fromProto(za.MsgSoftwareUpgrade.decode(t.value))}}class Bo extends u{constructor(t){super(),this.authority=t}static fromAmino(t){const{value:{authority:e}}=t;return new Bo(e)}toAmino(){const{authority:t}=this;return{type:"cosmos-sdk/MsgCancelUpgrade",value:{authority:t}}}static fromData(t){const{authority:e}=t;return new Bo(e)}toData(){const{authority:t}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",authority:t}}static fromProto(t){return new Bo(t.authority)}toProto(){const{authority:t}=this;return za.MsgCancelUpgrade.fromPartial({authority:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",value:za.MsgCancelUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Bo.fromProto(za.MsgCancelUpgrade.decode(t.value))}}class aa extends u{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 aa(xe.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 aa(xe.fromProto(t.plan),t.upgradedClientState,t.signer)}toProto(){const{plan:t,upgraded_client_state:e,signer:r}=this;return ft.MsgIBCSoftwareUpgrade.fromPartial({plan:t.toProto(),upgradedClientState:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgIBCSoftwareUpgrade",value:ft.MsgIBCSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return aa.fromProto(ft.MsgIBCSoftwareUpgrade.decode(t.value))}}class Ds extends u{constructor(t){super(),this.allowed_clients=t}static fromAmino(t){const{allowed_clients:e}=t;return new Ds(e)}toAmino(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromData(t){const{allowed_clients:e}=t;return new Ds(e)}toData(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromProto(t){return new Ds(t.allowedClients)}toProto(){const{allowed_clients:t}=this;return Ii.Params.fromPartial({allowedClients:t})}}class ia extends u{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 ia(e,Ds.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 ia(t.signer,Ds.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return ft.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.client.v1.MsgUpdateParams",value:ft.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ia.fromProto(ft.MsgUpdateParams.decode(t.value))}}class ks extends u{constructor(e,r){super();_(this,"height");_(this,"consensus_state");this.height=e,this.consensus_state=r}static fromAmino(e){const{height:r,consensus_state:o}=e;return new ks(r?U.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 ks(r?U.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 ks(e.height?U.fromProto(e.height):void 0,e.consensusState)}toProto(){const{height:e,consensus_state:r}=this;return Ii.ConsensusStateWithHeight.fromPartial({height:e==null?void 0:e.toProto(),consensusState:r})}}class ki extends u{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 ki(e,r.map(o=>ks.fromAmino(o)))}toAmino(){const{client_id:t,consensus_states:e}=this;return{client_id:t,consensus_states:e.map(r=>r.toAmino())}}static fromData(t){const{client_id:e,consensus_states:r}=t;return new ki(e,r.map(o=>ks.fromData(o)))}toData(){const{client_id:t,consensus_states:e}=this;return{client_id:t,consensus_states:e.map(r=>r.toData())}}static fromProto(t){return new ki(t.clientId,t.consensusStates.map(e=>ks.fromProto(e)))}toProto(){const{client_id:t,consensus_states:e}=this;return Ii.ClientConsensusStates.fromPartial({clientId:t,consensusStates:e.map(r=>r.toProto())})}}class Ja extends u{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 Ja(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 Ja(e,r)}toData(){const{client_id:t,client_state:e}=this;return{client_id:t,client_state:e}}static fromProto(t){return new Ja(t.clientId,t.clientState)}toProto(){const{client_id:t,client_state:e}=this;return Ii.IdentifiedClientState.fromPartial({clientId:t,clientState:e})}}class xs extends u{constructor(t,e){super(),this.height=t,this.timestamp=e}static fromAmino(t){const{height:e,timestamp:r}=t;return new xs(U.fromAmino(e),parseInt(r))}toAmino(){const{height:t,timestamp:e}=this;return{height:t.toAmino(),timestamp:e.toFixed()}}static fromData(t){const{height:e,timestamp:r}=t;return new xs(U.fromData(e),parseInt(r))}toData(){const{height:t,timestamp:e}=this;return{height:t.toData(),timestamp:e.toFixed()}}static fromProto(t){return new xs(U.fromProto(t.height),Number(t.timestamp))}toProto(){const{height:t,timestamp:e}=this;return ui.Timeout.fromPartial({height:t.toProto(),timestamp:BigInt(e)})}}class ca extends u{constructor(t){super(),this.upgrade_timeout=t}static fromAmino(t){return new ca(xs.fromAmino(t.upgrade_timeout))}toAmino(){return{upgrade_timeout:this.upgrade_timeout.toAmino()}}static fromData(t){return new ca(xs.fromData(t.upgrade_timeout))}toData(){return{upgrade_timeout:this.upgrade_timeout.toData()}}static fromProto(t){return new ca(xs.fromProto(t.upgradeTimeout))}toProto(){return ui.Params.fromPartial({upgradeTimeout:this.upgrade_timeout.toProto()})}}class Vt extends u{constructor(t,e,r,o,n,s,i,c){super(),this.sequence=t,this.source_port=e,this.source_channel=r,this.destination_port=o,this.destination_channel=n,this.data=s,this.timeout_height=i,this.timeout_timestamp=c}static fromAmino(t){const{sequence:e,source_port:r,source_channel:o,destination_port:n,destination_channel:s,data:i,timeout_height:c,timeout_timestamp:d}=t;return new Vt(e,r,o,n,s,i,c?U.fromAmino(c):void 0,d)}toAmino(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i==null?void 0:i.toAmino(),timeout_timestamp:c}}static fromData(t){const{sequence:e,source_port:r,source_channel:o,destination_port:n,destination_channel:s,data:i,timeout_height:c,timeout_timestamp:d}=t;return new Vt(e,r,o,n,s,i,c?U.fromData(c):void 0,d)}toData(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i==null?void 0:i.toData(),timeout_timestamp:c}}static fromProto(t){return new Vt(Number(t.sequence),t.sourcePort,t.sourceChannel,t.destinationPort,t.destinationChannel,Buffer.from(t.data).toString("base64"),t.timeoutHeight?U.fromProto(t.timeoutHeight):void 0,t.timeoutTimestamp.toString())}toProto(){const{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:i,timeout_timestamp:c}=this;return ui.Packet.fromPartial({sequence:BigInt(t),sourcePort:e,sourceChannel:r,destinationPort:o,destinationChannel:n,data:Buffer.from(s,"base64"),timeoutHeight:i==null?void 0:i.toProto(),timeoutTimestamp:BigInt(c)})}}class Ms extends u{constructor(t){super(),this.key_prefix=t}static fromAmino(t){const{key_prefix:e}=t;return new Ms(e)}toAmino(){const{key_prefix:t}=this;return{key_prefix:t}}static fromData(t){const{key_prefix:e}=t;return new Ms(e)}toData(){const{key_prefix:t}=this;return{key_prefix:t}}static fromProto(t){return new Ms(Buffer.from(t.keyPrefix).toString("base64"))}toProto(){const{key_prefix:t}=this;return Iu.MerklePrefix.fromPartial({keyPrefix:Buffer.from(t,"base64")})}}class Ji extends u{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 Ji(t.hash)}toData(){return{hash:this.hash}}static fromProto(t){return new Ji(Buffer.from(t.hash).toString("base64"))}toProto(){return Iu.MerkleRoot.fromPartial({hash:Buffer.from(this.hash,"base64")})}}class re extends u{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 re(e,r,o?Ms.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 re(e,r,o?Ms.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 re(t.clientId,t.connectionId,t.prefix?Ms.fromProto(t.prefix):void 0)}toProto(){const{client_id:t,connection_id:e,prefix:r}=this;return ue.Counterparty.fromPartial({clientId:t,connectionId:e,prefix:r==null?void 0:r.toProto()})}}class qt extends u{constructor(t,e){super(),this.identifier=t,this.features=e}static fromAmino(t){const{identifier:e,features:r}=t;return new qt(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 qt(e,r)}toData(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromProto(t){return new qt(t.identifier,t.features)}toProto(){const{identifier:t,features:e}=this;return ue.Version.fromPartial({identifier:t,features:e})}}class ua extends u{constructor(t,e,r,o,n,s){super(),this.id=t,this.client_id=e,this.versions=r,this.state=o,this.counterparty=n,this.delay_period=s}static fromAmino(t){const{id:e,client_id:r,versions:o,state:n,counterparty:s,delay_period:i}=t;return new ua(e,r,o.map(qt.fromAmino),ue.stateFromJSON(n),s?re.fromAmino(s):void 0,parseInt(i))}toAmino(){const{id:t,client_id:e,versions:r,state:o,counterparty:n,delay_period:s}=this;return{id:t,client_id:e,versions:r.map(i=>i.toAmino()),state:ue.stateToJSON(o),counterparty:n==null?void 0:n.toAmino(),delay_period:s.toFixed()}}static fromData(t){const{id:e,client_id:r,versions:o,state:n,counterparty:s,delay_period:i}=t;return new ua(e,r,o.map(qt.fromData),ue.stateFromJSON(n),s?re.fromData(s):void 0,parseInt(i))}toData(){const{id:t,client_id:e,versions:r,state:o,counterparty:n,delay_period:s}=this;return{id:t,client_id:e,versions:r.map(i=>i.toData()),state:ue.stateToJSON(o),counterparty:n==null?void 0:n.toData(),delay_period:s.toFixed()}}static fromProto(t){return new ua(t.id,t.clientId,t.versions.map(qt.fromProto),t.state,t.counterparty?re.fromProto(t.counterparty):void 0,Number(t.delayPeriod))}toProto(){const{id:t,client_id:e,versions:r,state:o,counterparty:n,delay_period:s}=this;return ue.IdentifiedConnection.fromPartial({id:t,clientId:e,versions:r.map(i=>i.toProto()),state:o,counterparty:n==null?void 0:n.toProto(),delayPeriod:BigInt(s)})}}class ma extends u{constructor(t){super(),this.max_expected_time_per_block=t}static fromAmino(t){const{max_expected_time_per_block:e}=t;return new ma(parseInt(e))}toAmino(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toFixed()}}static fromData(t){const{max_expected_time_per_block:e}=t;return new ma(parseInt(e))}toData(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toFixed()}}static fromProto(t){return new ma(Number(t.maxExpectedTimePerBlock))}toProto(){const{max_expected_time_per_block:t}=this;return ue.Params.fromPartial({maxExpectedTimePerBlock:BigInt(t)})}}class da extends u{constructor(t,e,r,o,n,s,i){super(),this.port_id=t,this.previous_channel_id=e,this.channel=r,this.counterparty_version=o,this.proof_init=n,this.proof_height=s,this.signer=i}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:n,proof_init:s,proof_height:i,signer:c}=t;return new da(e,r,o?ee.fromData(o):void 0,n,s,i?U.fromData(i):void 0,c)}toData(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:n,proof_height:s,signer:i}=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:n,proof_height:s==null?void 0:s.toData(),signer:i}}static fromProto(t){return new da(t.portId,t.previousChannelId,t.channel?ee.fromProto(t.channel):void 0,t.counterpartyVersion,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:n,proof_height:s,signer:i}=this;return J.MsgChannelOpenTry.fromPartial({portId:t,previousChannelId:e,channel:r==null?void 0:r.toProto(),counterpartyVersion:o,proofInit:Buffer.from(n,"base64"),proofHeight:s==null?void 0:s.toProto(),signer:i})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",value:J.MsgChannelOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return da.fromProto(J.MsgChannelOpenTry.decode(t.value))}}class la extends u{constructor(t,e,r,o,n){super(),this.port_id=t,this.channel_id=e,this.proof_ack=r,this.proof_height=o,this.signer=n}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:n,signer:s}=t;return new la(e,r,o,n?U.fromData(n):void 0,s)}toData(){const{port_id:t,channel_id:e,proof_ack:r,proof_height:o,signer:n}=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:n}}static fromProto(t){return new la(t.portId,t.channelId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_ack:r,proof_height:o,signer:n}=this;return J.MsgChannelOpenConfirm.fromPartial({portId:t,channelId:e,proofAck:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",value:J.MsgChannelOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return la.fromProto(J.MsgChannelOpenConfirm.decode(t.value))}}class pa extends u{constructor(t,e,r,o,n,s,i){super(),this.port_id=t,this.channel_id=e,this.counterparty_channel_id=r,this.counterparty_version=o,this.proof_try=n,this.proof_height=s,this.signer=i}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:n,proof_try:s,proof_height:i,signer:c}=t;return new pa(e,r,o,n,s,i?U.fromData(i):void 0,c)}toData(){const{port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,proof_try:n,proof_height:s,signer:i}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenAck",port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,proof_try:n,proof_height:s==null?void 0:s.toData(),signer:i}}static fromProto(t){return new pa(t.portId,t.channelId,t.counterpartyChannelId,t.counterpartyVersion,Buffer.from(t.proofTry).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,counterparty_channel_id:r,counterparty_version:o,proof_try:n,proof_height:s,signer:i}=this;return J.MsgChannelOpenAck.fromPartial({portId:t,channelId:e,counterpartyChannelId:r,counterpartyVersion:o,proofTry:Buffer.from(n,"base64"),proofHeight:s==null?void 0:s.toProto(),signer:i})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",value:J.MsgChannelOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return pa.fromProto(J.MsgChannelOpenAck.decode(t.value))}}class ha extends u{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 ha(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 ha(t.portId,t.channelId,t.signer)}toProto(){const{port_id:t,channel_id:e,signer:r}=this;return J.MsgChannelCloseInit.fromPartial({portId:t,channelId:e,signer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",value:J.MsgChannelCloseInit.encode(this.toProto()).finish()})}static unpackAny(t){return ha.fromProto(J.MsgChannelCloseInit.decode(t.value))}}class fa extends u{constructor(t,e,r,o,n){super(),this.port_id=t,this.channel_id=e,this.proof_init=r,this.proof_height=o,this.signer=n}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:n,signer:s}=t;return new fa(e,r,o,n?U.fromData(n):void 0,s)}toData(){const{port_id:t,channel_id:e,proof_init:r,proof_height:o,signer:n}=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:n}}static fromProto(t){return new fa(t.portId,t.channelId,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{port_id:t,channel_id:e,proof_init:r,proof_height:o,signer:n}=this;return J.MsgChannelCloseConfirm.fromPartial({portId:t,channelId:e,proofInit:Buffer.from(r,"base64"),proofHeight:o==null?void 0:o.toProto(),signer:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",value:J.MsgChannelCloseConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return fa.fromProto(J.MsgChannelCloseConfirm.decode(t.value))}}class ga extends u{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:n}=t;return new ga(e?Vt.fromData(e):void 0,r,o?U.fromData(o):void 0,n)}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 ga(t.packet?Vt.fromProto(t.packet):void 0,Buffer.from(t.proofCommitment).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,proof_commitment:e,proof_height:r,signer:o}=this;return J.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 f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",value:J.MsgRecvPacket.encode(this.toProto()).finish()})}static unpackAny(t){return ga.fromProto(J.MsgRecvPacket.decode(t.value))}}class ya extends u{constructor(t,e,r,o,n){super(),this.packet=t,this.acknowledgement=e,this.proof_acked=r,this.proof_height=o,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,acknowledgement:r,proof_acked:o,proof_height:n,signer:s}=t;return new ya(e?Vt.fromData(e):void 0,o,r,n?U.fromData(n):void 0,s)}toData(){const{packet:t,acknowledgement:e,proof_acked:r,proof_height:o,signer:n}=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:n}}static fromProto(t){return new ya(t.packet?Vt.fromProto(t.packet):void 0,Buffer.from(t.acknowledgement).toString("base64"),Buffer.from(t.proofAcked).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{packet:t,acknowledgement:e,proof_acked:r,proof_height:o,signer:n}=this;return J.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:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",value:J.MsgAcknowledgement.encode(this.toProto()).finish()})}static unpackAny(t){return ya.fromProto(J.MsgAcknowledgement.decode(t.value))}}class _a extends u{constructor(t,e,r,o,n){super(),this.packet=t,this.proof_unreceived=e,this.proof_height=r,this.next_sequence_recv=o,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_height:o,next_sequence_recv:n,signer:s}=t;return new _a(e?Vt.fromData(e):void 0,r,o?U.fromData(o):void 0,parseInt(n),s)}toData(){const{packet:t,proof_unreceived:e,proof_height:r,next_sequence_recv:o,signer:n}=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:n}}static fromProto(t){return new _a(t.packet?Vt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,Number(t.nextSequenceRecv),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_height:r,next_sequence_recv:o,signer:n}=this;return J.MsgTimeout.fromPartial({packet:t==null?void 0:t.toProto(),proofUnreceived:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),nextSequenceRecv:BigInt(o),signer:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeout",value:J.MsgTimeout.encode(this.toProto()).finish()})}static unpackAny(t){return _a.fromProto(J.MsgTimeout.decode(t.value))}}class va extends u{constructor(t,e,r,o,n,s){super(),this.packet=t,this.proof_unreceived=e,this.proof_close=r,this.proof_height=o,this.next_sequence_recv=n,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_close:o,proof_height:n,next_sequence_recv:s,signer:i}=t;return new va(e?Vt.fromData(e):void 0,o,r,n?U.fromData(n):void 0,parseInt(s),i)}toData(){const{packet:t,proof_unreceived:e,proof_close:r,proof_height:o,next_sequence_recv:n,signer:s}=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:n.toFixed(),signer:s}}static fromProto(t){return new va(t.packet?Vt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),Buffer.from(t.proofClose).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,Number(t.nextSequenceRecv),t.signer)}toProto(){const{packet:t,proof_unreceived:e,proof_close:r,proof_height:o,next_sequence_recv:n,signer:s}=this;return J.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:BigInt(n),signer:s})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",value:J.MsgTimeoutOnClose.encode(this.toProto()).finish()})}static unpackAny(t){return va.fromProto(J.MsgTimeoutOnClose.decode(t.value))}}class wa extends u{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 wa(e,ca.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 wa(t.authority,ca.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return J.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgUpdateParams",value:J.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return wa.fromProto(J.MsgUpdateParams.decode(t.value))}}class Za extends u{constructor(t,e,r,o,n){super(),this.client_id=t,this.counterparty=e,this.version=r,this.delay_period=o,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,counterparty:r,version:o,delay_period:n,signer:s}=t;return new Za(e,re.fromData(r),o?qt.fromData(o):void 0,parseInt(n),s)}toData(){const{client_id:t,counterparty:e,version:r,delay_period:o,signer:n}=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:n}}static fromProto(t){return new Za(t.clientId,re.fromProto(t.counterparty),t.version?qt.fromProto(t.version):void 0,Number(t.delayPeriod),t.signer)}toProto(){const{client_id:t,counterparty:e,version:r,delay_period:o,signer:n}=this;return Ut.MsgConnectionOpenInit.fromPartial({clientId:t,counterparty:e.toProto(),version:r==null?void 0:r.toProto(),delayPeriod:BigInt(o),signer:n})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",value:Ut.MsgConnectionOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return Za.fromProto(Ut.MsgConnectionOpenInit.decode(t.value))}}class Ya extends u{constructor(t,e,r,o,n,s,i,c,d,g,v){super(),this.client_id=t,this.client_state=e,this.counterparty=r,this.delay_period=o,this.counterparty_versions=n,this.proof_height=s,this.proof_init=i,this.proof_client=c,this.proof_consensus=d,this.consensus_height=g,this.signer=v}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:n,counterparty_versions:s,proof_height:i,proof_init:c,proof_client:d,proof_consensus:g,consensus_height:v,signer:b}=t;return new Ya(e,r,o?re.fromData(o):void 0,parseInt(n),s.map(k=>qt.fromData(k)),i?U.fromData(i):void 0,Buffer.from(c).toString("base64"),Buffer.from(d).toString("base64"),Buffer.from(g).toString("base64"),v?U.fromData(v):void 0,b)}toData(){const{client_id:t,client_state:e,counterparty:r,delay_period:o,counterparty_versions:n,proof_height:s,proof_init:i,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=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:n.map(b=>b.toData()),proof_height:s==null?void 0:s.toData(),proof_init:i,proof_client:c,proof_consensus:d,consensus_height:g==null?void 0:g.toData(),signer:v}}static fromProto(t){return new Ya(t.clientId,t.clientState,t.counterparty?re.fromProto(t.counterparty):void 0,Number(t.delayPeriod),t.counterpartyVersions.map(e=>qt.fromProto(e)),t.proofHeight?U.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?U.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{client_id:t,client_state:e,counterparty:r,delay_period:o,counterparty_versions:n,proof_height:s,proof_init:i,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=this;return Ut.MsgConnectionOpenTry.fromPartial({clientId:t,clientState:e,counterparty:r==null?void 0:r.toProto(),delayPeriod:BigInt(o),counterpartyVersions:n.map(b=>b.toProto()),proofHeight:s==null?void 0:s.toProto(),proofInit:Buffer.from(i,"base64"),proofClient:Buffer.from(c,"base64"),proofConsensus:Buffer.from(d,"base64"),consensusHeight:g==null?void 0:g.toProto(),signer:v})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",value:Ut.MsgConnectionOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return Ya.fromProto(Ut.MsgConnectionOpenTry.decode(t.value))}}class Xa extends u{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:n}=t;return new Xa(e,r,o?U.fromData(o):void 0,n)}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 Xa(t.connectionId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?U.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{connection_id:t,proof_ack:e,proof_height:r,signer:o}=this;return Ut.MsgConnectionOpenConfirm.fromPartial({connectionId:t,proofAck:Buffer.from(e,"base64"),proofHeight:r==null?void 0:r.toProto(),signer:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",value:Ut.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return Xa.fromProto(Ut.MsgConnectionOpenConfirm.decode(t.value))}}class Qa extends u{constructor(t,e,r,o,n,s,i,c,d,g){super(),this.connection_id=t,this.counterparty_connection_id=e,this.version=r,this.client_state=o,this.proof_height=n,this.proof_try=s,this.proof_client=i,this.proof_consensus=c,this.consensus_height=d,this.signer=g}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:n,proof_height:s,proof_try:i,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=t;return new Qa(e,r,o?qt.fromData(o):void 0,n,s?U.fromData(s):void 0,i,c,d,g?U.fromData(g):void 0,v)}toData(){const{connection_id:t,counterparty_connection_id:e,version:r,client_state:o,proof_height:n,proof_try:s,proof_client:i,proof_consensus:c,consensus_height:d,signer:g}=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:n==null?void 0:n.toData(),proof_try:s,proof_client:i,proof_consensus:c,consensus_height:d==null?void 0:d.toData(),signer:g}}static fromProto(t){return new Qa(t.connectionId,t.counterpartyConnectionId,t.version?qt.fromProto(t.version):void 0,t.clientState,t.proofHeight?U.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?U.fromProto(t.consensusHeight):void 0,t.signer)}toProto(){const{connection_id:t,counterparty_connection_id:e,version:r,client_state:o,proof_height:n,proof_try:s,proof_client:i,proof_consensus:c,consensus_height:d,signer:g}=this;return Ut.MsgConnectionOpenAck.fromPartial({connectionId:t,counterpartyConnectionId:e,version:r==null?void 0:r.toProto(),clientState:o,proofHeight:n==null?void 0:n.toProto(),proofTry:Buffer.from(s,"base64"),proofClient:Buffer.from(i,"base64"),proofConsensus:Buffer.from(c,"base64"),consensusHeight:d==null?void 0:d.toProto(),signer:g})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",value:Ut.MsgConnectionOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return Qa.fromProto(Ut.MsgConnectionOpenAck.decode(t.value))}}class ti extends u{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 ti(e,ma.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 ti(t.signer,ma.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Ut.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgUpdateParams",value:Ut.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ti.fromProto(Ut.MsgUpdateParams.decode(t.value))}}class Uo extends u{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:n}}=t;return new Uo(e,r,o,n)}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:n}=t;return new Uo(e,r,o,n)}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 Uo(t.owner,t.connectionId,t.version,t.ordering)}toProto(){const{owner:t,connection_id:e,version:r,ordering:o}=this;return Va.MsgRegisterAccount.fromPartial({owner:t,connectionId:e,version:r,ordering:o})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgRegisterAccount",value:Va.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Uo.fromProto(Va.MsgRegisterAccount.decode(t.value))}}class Co extends u{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 Co(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 Co(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 Co(t.owner,t.connectionId,t.msg?exports.Msg.fromProto(t.msg):void 0)}toProto(){const{owner:t,connection_id:e,msg:r}=this;return Va.MsgSubmitTx.fromPartial({owner:t,connectionId:e,msg:r==null?void 0:r.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgSubmitTx",value:Va.MsgSubmitTx.encode(this.toProto()).finish()})}static unpackAny(t){return Co.fromProto(Va.MsgSubmitTx.decode(t.value))}}class Et extends u{constructor(t,e){super(),this.Base=t,this.Quote=e}toString(){return`${this.Base}/${this.Quote}`}static fromAmino(t){return new Et(t.Base,t.Quote)}toAmino(){return{Base:this.Base,Quote:this.Quote}}static fromData(t){return new Et(t.Base,t.Quote)}toData(){return{Base:this.Base,Quote:this.Quote}}static fromProto(t){return new Et(t.Base,t.Quote)}toProto(){return cd.CurrencyPair.fromPartial({Base:this.Base,Quote:this.Quote})}}class Eo extends u{constructor(t,e){super(),this.authority=t,this.currency_pairs=e}static fromAmino(t){const{value:{authority:e,currency_pairs:r}}=t;return new Eo(e,r.map(Et.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 Eo(e,r.map(Et.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 Eo(t.authority,t.currencyPairs.map(Et.fromProto))}toProto(){const{authority:t,currency_pairs:e}=this;return Ka.MsgAddCurrencyPairs.fromPartial({authority:t,currencyPairs:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgAddCurrencyPairs",value:Ka.MsgAddCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Eo.fromProto(Ka.MsgAddCurrencyPairs.decode(t.value))}}class Oo extends u{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 Oo(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 Oo(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 Oo(t.authority,t.currencyPairIds)}toProto(){const{authority:t,currency_pair_ids:e}=this;return Ka.MsgRemoveCurrencyPairs.fromPartial({authority:t,currencyPairIds:e})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgRemoveCurrencyPairs",value:Ka.MsgRemoveCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Oo.fromProto(Ka.MsgRemoveCurrencyPairs.decode(t.value))}}class ei extends u{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 ei(e,new Date(r),parseInt(o))}toAmino(){const{price:t,block_timestamp:e,block_height:r}=this;return{price:t,block_timestamp:e.toISOString(),block_height:r.toFixed()}}static fromData(t){const{price:e,block_timestamp:r,block_height:o}=t;return new ei(e,new Date(r),parseInt(o))}toData(){const{price:t,block_timestamp:e,block_height:r}=this;return{price:t,block_timestamp:e.toISOString(),block_height:r.toFixed()}}static fromProto(t){return new ei(t.price,t.blockTimestamp,Number(t.blockHeight))}toProto(){const{price:t,block_timestamp:e,block_height:r}=this;return ud.QuotePrice.fromPartial({price:t,blockTimestamp:e,blockHeight:BigInt(r)})}}class Ss extends u{constructor(t,e,r,o,n){super(),this.name=t,this.off_chain_ticker=e,this.normalize_by_pair=r,this.invert=o,this.metadata_JSON=n}static fromAmino(t){const{name:e,off_chain_ticker:r,normalize_by_pair:o,invert:n,metadata_JSON:s}=t;return new Ss(e,r,o?Et.fromAmino(o):void 0,n,s)}toAmino(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:n}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:r==null?void 0:r.toAmino(),invert:o,metadata_JSON:n}}static fromData(t){const{name:e,off_chain_ticker:r,normalize_by_pair:o,invert:n,metadata_JSON:s}=t;return new Ss(e,r,o?Et.fromData(o):void 0,n,s)}toData(){const{name:t,off_chain_ticker:e,normalize_by_pair:r,invert:o,metadata_JSON:n}=this;return{name:t,off_chain_ticker:e,normalize_by_pair:r==null?void 0:r.toData(),invert:o,metadata_JSON:n}}static fromProto(t){return new Ss(t.name,t.offChainTicker,t.normalizeByPair?Et.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:n}=this;return Oc.ProviderConfig.fromPartial({name:t,offChainTicker:e,normalizeByPair:r==null?void 0:r.toProto(),invert:o,metadataJSON:n})}}class Is extends u{constructor(t,e,r,o,n){super(),this.currency_pair=t,this.decimals=e,this.min_provider_count=r,this.enabled=o,this.metadata_JSON=n}static fromAmino(t){const{currency_pair:e,decimals:r,min_provider_count:o,enabled:n,metadata_JSON:s}=t;return new Is(Et.fromAmino(e),parseInt(r),parseInt(o),n,s)}toAmino(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:n}=this;return{currency_pair:t.toAmino(),decimals:e.toFixed(),min_provider_count:r.toFixed(),enabled:o,metadata_JSON:n}}static fromData(t){const{currency_pair:e,decimals:r,min_provider_count:o,enabled:n,metadata_JSON:s}=t;return new Is(Et.fromData(e),parseInt(r),parseInt(o),n,s)}toData(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:n}=this;return{currency_pair:t.toData(),decimals:e.toFixed(),min_provider_count:r.toFixed(),enabled:o,metadata_JSON:n}}static fromProto(t){return new Is(Et.fromProto(t.currencyPair),Number(t.decimals),Number(t.minProviderCount),t.enabled,t.metadataJSON)}toProto(){const{currency_pair:t,decimals:e,min_provider_count:r,enabled:o,metadata_JSON:n}=this;return Oc.Ticker.fromPartial({currencyPair:t,decimals:BigInt(e),minProviderCount:BigInt(r),enabled:o,metadataJSON:n})}}class kt extends u{constructor(t,e){super(),this.ticker=t,this.provider_configs=e}static fromAmino(t){const{ticker:e,provider_configs:r}=t;return new kt(Is.fromAmino(e),r.map(Ss.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 kt(Is.fromData(e),r.map(Ss.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 kt(Is.fromProto(t.ticker),t.providerConfigs.map(Ss.fromProto))}toProto(){const{ticker:t,provider_configs:e}=this;return Oc.Market.fromPartial({ticker:t.toProto(),providerConfigs:e.map(r=>r.toProto())})}}class No extends u{constructor(t,e){super(),this.authority=t,this.create_markets=e}static fromAmino(t){const{value:{authority:e,create_markets:r}}=t;return new No(e,r.map(kt.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 No(e,r.map(kt.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 No(t.authority,t.createMarkets.map(kt.fromProto))}toProto(){const{authority:t,create_markets:e}=this;return Ct.MsgCreateMarkets.fromPartial({authority:t,createMarkets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgCreateMarkets",value:Ct.MsgCreateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return No.fromProto(Ct.MsgCreateMarkets.decode(t.value))}}class To extends u{constructor(t,e){super(),this.authority=t,this.update_markets=e}static fromAmino(t){const{value:{authority:e,update_markets:r}}=t;return new To(e,r.map(kt.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 To(e,r.map(kt.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 To(t.authority,t.updateMarkets.map(kt.fromProto))}toProto(){const{authority:t,update_markets:e}=this;return Ct.MsgUpdateMarkets.fromPartial({authority:t,updateMarkets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpdateMarkets",value:Ct.MsgUpdateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return To.fromProto(Ct.MsgUpdateMarkets.decode(t.value))}}class Fo extends u{constructor(t,e){super(),this.authority=t,this.markets=e}static fromAmino(t){const{value:{authority:e,markets:r}}=t;return new Fo(e,r.map(kt.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 Fo(e,r.map(kt.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 Fo(t.authority,t.markets.map(kt.fromProto))}toProto(){const{authority:t,markets:e}=this;return Ct.MsgUpsertMarkets.fromPartial({authority:t,markets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpsertMarkets",value:Ct.MsgUpsertMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return Fo.fromProto(Ct.MsgUpsertMarkets.decode(t.value))}}class Ro extends u{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:"connect/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":"/connect.marketmap.v2.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 Ct.MsgRemoveMarketAuthorities.fromPartial({removeAddresses:t,admin:e})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgRemoveMarketAuthorities",value:Ct.MsgRemoveMarketAuthorities.encode(this.toProto()).finish()})}static unpackAny(t){return Ro.fromProto(Ct.MsgRemoveMarketAuthorities.decode(t.value))}}class Yn extends u{constructor(t,e){super(),this.market_authorities=t,this.admin=e}static fromAmino(t){return new Yn(t.market_authorities,t.admin)}toAmino(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromData(t){return new Yn(t.market_authorities,t.admin)}toData(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromProto(t){return new Yn(t.marketAuthorities,t.admin)}toProto(){const{market_authorities:t,admin:e}=this;return md.Params.fromPartial({marketAuthorities:t,admin:e})}}class qo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new qo(e,Yn.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 qo(e,Yn.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 qo(t.authority,Yn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ct.MsgParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgParams",value:Ct.MsgParams.encode(this.toProto()).finish()})}static unpackAny(t){return qo.fromProto(Ct.MsgParams.decode(t.value))}}class ge extends u{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 ge(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===Wt.UpgradePolicy.UNSPECIFIED?void 0:r}}}static fromData(t){const{sender:e,code_bytes:r,upgrade_policy:o}=t;return new ge(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}}static fromProto(t){return new ge(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 H.MsgPublish.fromPartial({sender:t,codeBytes:e.map(o=>Buffer.from(o,"base64")),upgradePolicy:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgPublish",value:H.MsgPublish.encode(this.toProto()).finish()})}static unpackAny(t){return ge.fromProto(H.MsgPublish.decode(t.value))}}(a=>{a.Policy=Wt.UpgradePolicy})(ge||(ge={}));class $o extends u{constructor(e,r,o,n,s=[],i=[]){super();_(this,"type_args");_(this,"args");this.sender=e,this.module_address=r,this.module_name=o,this.function_name=n,this.type_args=s,this.args=i}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}}=e;return new $o(r,o,n,s,i??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return{type:"move/MsgExecute",value:{sender:e,module_address:r,module_name:o,function_name:n,type_args:s.length===0?void 0:s,args:i.length===0?void 0:i}}}static fromData(e){const{sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=e;return new $o(r,o,n,s,i,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return{"@type":"/initia.move.v1.MsgExecute",sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}}static fromProto(e){return new $o(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:n,type_args:s,args:i}=this;return H.MsgExecute.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:n,typeArgs:s,args:i.map(c=>Buffer.from(c,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecute",value:H.MsgExecute.encode(this.toProto()).finish()})}static unpackAny(e){return $o.fromProto(H.MsgExecute.decode(e.value))}}class Lo extends u{constructor(e,r,o,n,s=[],i=[]){super();_(this,"type_args");_(this,"args");this.sender=e,this.module_address=r,this.module_name=o,this.function_name=n,this.type_args=s,this.args=i}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}}=e;return new Lo(r,o,n,s,i??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return{type:"move/MsgExecuteJSON",value:{sender:e,module_address:r,module_name:o,function_name:n,type_args:s.length===0?void 0:s,args:i.length===0?void 0:i}}}static fromData(e){const{sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=e;return new Lo(r,o,n,s,i,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return{"@type":"/initia.move.v1.MsgExecuteJSON",sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}}static fromProto(e){return new Lo(e.sender,e.moduleAddress,e.moduleName,e.functionName,e.typeArgs,e.args)}toProto(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:i}=this;return H.MsgExecuteJSON.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:n,typeArgs:s,args:i})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecuteJSON",value:H.MsgExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return Lo.fromProto(H.MsgExecuteJSON.decode(e.value))}}class Ho extends u{constructor(e,r,o=[],n=[]){super();_(this,"type_args");_(this,"args");this.sender=e,this.code_bytes=r,this.type_args=o,this.args=n}static fromAmino(e){const{value:{sender:r,code_bytes:o,type_args:n,args:s}}=e;return new Ho(r,o,n??[],s??[])}toAmino(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return{type:"move/MsgScript",value:{sender:e,code_bytes:r,type_args:o.length===0?void 0:o,args:n.length===0?void 0:n}}}static fromData(e){const{sender:r,code_bytes:o,type_args:n,args:s}=e;return new Ho(r,o,n,s)}toData(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return{"@type":"/initia.move.v1.MsgScript",sender:e,code_bytes:r,type_args:o,args:n}}static fromProto(e){return new Ho(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:n}=this;return H.MsgScript.fromPartial({sender:e,codeBytes:Buffer.from(r,"base64"),typeArgs:o,args:n.map(s=>Buffer.from(s,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScript",value:H.MsgScript.encode(this.toProto()).finish()})}static unpackAny(e){return Ho.fromProto(H.MsgScript.decode(e.value))}}class zo extends u{constructor(e,r,o=[],n=[]){super();_(this,"type_args");_(this,"args");this.sender=e,this.code_bytes=r,this.type_args=o,this.args=n}static fromAmino(e){const{value:{sender:r,code_bytes:o,type_args:n,args:s}}=e;return new zo(r,o,n??[],s??[])}toAmino(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return{type:"move/MsgScriptJSON",value:{sender:e,code_bytes:r,type_args:o.length===0?void 0:o,args:n.length===0?void 0:n}}}static fromData(e){const{sender:r,code_bytes:o,type_args:n,args:s}=e;return new zo(r,o,n,s)}toData(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return{"@type":"/initia.move.v1.MsgScriptJSON",sender:e,code_bytes:r,type_args:o,args:n}}static fromProto(e){return new zo(e.sender,Buffer.from(e.codeBytes).toString("base64"),e.typeArgs,e.args)}toProto(){const{sender:e,code_bytes:r,type_args:o,args:n}=this;return H.MsgScriptJSON.fromPartial({sender:e,codeBytes:Buffer.from(r,"base64"),typeArgs:o,args:n})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgScriptJSON",value:H.MsgScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return zo.fromProto(H.MsgScriptJSON.decode(e.value))}}class Xn extends u{constructor(t,e,r,o,n){super(),this.base_denom=t,this.base_min_gas_price=e,this.contract_shared_revenue_ratio=r,this.script_enabled=o,this.allowed_publishers=n}static fromAmino(t){const{value:{base_denom:e,base_min_gas_price:r,contract_shared_revenue_ratio:o,script_enabled:n,allowed_publishers:s}}=t;return new Xn(e,r,o,n,s)}toAmino(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:n}=this;return{type:"move/Params",value:{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:n}}}static fromData(t){const{base_denom:e,base_min_gas_price:r,contract_shared_revenue_ratio:o,script_enabled:n,allowed_publishers:s}=t;return new Xn(e,r,o,n,s)}toData(){const{base_denom:t,base_min_gas_price:e,contract_shared_revenue_ratio:r,script_enabled:o,allowed_publishers:n}=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:n}}static fromProto(t){return new Xn(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:n}=this;return Wt.Params.fromPartial({baseDenom:t,baseMinGasPrice:e,contractSharedRevenueRatio:r,scriptEnabled:o,allowedPublishers:n})}}class Vo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Vo(e,Xn.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 Vo(e,Xn.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 Vo(t.authority,Xn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return H.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgUpdateParams",value:H.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vo.fromProto(H.MsgUpdateParams.decode(t.value))}}class Ko extends u{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 Ko(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 Ko(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 Ko(t.authority,t.metadataLp,t.rewardWeight)}toProto(){const{authority:t,metadata_lp:e,reward_weight:r}=this;return H.MsgWhitelist.fromPartial({authority:t,metadataLp:e,rewardWeight:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgWhitelist",value:H.MsgWhitelist.encode(this.toProto()).finish()})}static unpackAny(t){return Ko.fromProto(H.MsgWhitelist.decode(t.value))}}class Go extends u{constructor(t,e){super(),this.authority=t,this.metadata_lp=e}static fromAmino(t){const{value:{authority:e,metadata_lp:r}}=t;return new Go(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 Go(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 Go(t.authority,t.metadataLp)}toProto(){const{authority:t,metadata_lp:e}=this;return H.MsgDelist.fromPartial({authority:t,metadataLp:e})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgDelist",value:H.MsgDelist.encode(this.toProto()).finish()})}static unpackAny(t){return Go.fromProto(H.MsgDelist.decode(t.value))}}class Wo extends u{constructor(e,r,o,n,s,i=[],c=[]){super();_(this,"type_args");_(this,"args");this.authority=e,this.sender=r,this.module_address=o,this.module_name=n,this.function_name=s,this.type_args=i,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:n,module_name:s,function_name:i,type_args:c,args:d}}=e;return new Wo(r,o,n,s,i,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=this;return{type:"move/MsgGovExecute",value:{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i.length===0?void 0:i,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:n,module_name:s,function_name:i,type_args:c,args:d}=e;return new Wo(r,o,n,s,i,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecute",authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}}static fromProto(e){return new Wo(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:n,function_name:s,type_args:i,args:c}=this;return H.MsgGovExecute.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:n,functionName:s,typeArgs:i,args:c.map(d=>Buffer.from(d,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecute",value:H.MsgGovExecute.encode(this.toProto()).finish()})}static unpackAny(e){return Wo.fromProto(H.MsgGovExecute.decode(e.value))}}class jo extends u{constructor(e,r,o,n,s,i=[],c=[]){super();_(this,"type_args");_(this,"args");this.authority=e,this.sender=r,this.module_address=o,this.module_name=n,this.function_name=s,this.type_args=i,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:n,module_name:s,function_name:i,type_args:c,args:d}}=e;return new jo(r,o,n,s,i,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=this;return{type:"move/MsgGovExecuteJSON",value:{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i.length===0?void 0:i,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:n,module_name:s,function_name:i,type_args:c,args:d}=e;return new jo(r,o,n,s,i,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecuteJSON",authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:i,args:c}}static fromProto(e){return new jo(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:n,function_name:s,type_args:i,args:c}=this;return H.MsgGovExecuteJSON.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:n,functionName:s,typeArgs:i,args:c})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecuteJSON",value:H.MsgGovExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return jo.fromProto(H.MsgGovExecuteJSON.decode(e.value))}}class ye extends u{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:n}}=t;return new ye(e,r,o,n||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===Wt.UpgradePolicy.UNSPECIFIED?void 0:o}}}static fromData(t){const{authority:e,sender:r,code_bytes:o,upgrade_policy:n}=t;return new ye(e,r,o,n)}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 ye(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 H.MsgGovPublish.fromPartial({authority:t,sender:e,codeBytes:r.map(n=>Buffer.from(n,"base64")),upgradePolicy:o})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovPublish",value:H.MsgGovPublish.encode(this.toProto()).finish()})}static unpackAny(t){return ye.fromProto(H.MsgGovPublish.decode(t.value))}}(a=>{a.Policy=Wt.UpgradePolicy})(ye||(ye={}));class Jo extends u{constructor(e,r,o,n=[],s=[]){super();_(this,"type_args");_(this,"args");this.authority=e,this.sender=r,this.code_bytes=o,this.type_args=n,this.args=s}static fromAmino(e){const{value:{authority:r,sender:o,code_bytes:n,type_args:s,args:i}}=e;return new Jo(r,o,n,s??[],i??[])}toAmino(){const{authority:e,sender:r,code_bytes:o,type_args:n,args:s}=this;return{type:"move/MsgGovScript",value:{authority:e,sender:r,code_bytes:o,type_args:n.length===0?void 0:n,args:s.length===0?void 0:s}}}static fromData(e){const{authority:r,sender:o,code_bytes:n,type_args:s,args:i}=e;return new Jo(r,o,n,s,i)}toData(){const{authority:e,sender:r,code_bytes:o,type_args:n,args:s}=this;return{"@type":"/initia.move.v1.MsgGovScript",authority:e,sender:r,code_bytes:o,type_args:n,args:s}}static fromProto(e){return new Jo(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:n,args:s}=this;return H.MsgGovScript.fromPartial({authority:e,sender:r,codeBytes:Buffer.from(o,"base64"),typeArgs:n,args:s.map(i=>Buffer.from(i,"base64"))})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScript",value:H.MsgGovScript.encode(this.toProto()).finish()})}static unpackAny(e){return Jo.fromProto(H.MsgGovScript.decode(e.value))}}class Zo extends u{constructor(e,r,o,n=[],s=[]){super();_(this,"type_args");_(this,"args");this.authority=e,this.sender=r,this.code_bytes=o,this.type_args=n,this.args=s}static fromAmino(e){const{value:{authority:r,sender:o,code_bytes:n,type_args:s,args:i}}=e;return new Zo(r,o,n,s??[],i??[])}toAmino(){const{authority:e,sender:r,code_bytes:o,type_args:n,args:s}=this;return{type:"move/MsgGovScriptJSON",value:{authority:e,sender:r,code_bytes:o,type_args:n.length===0?void 0:n,args:s.length===0?void 0:s}}}static fromData(e){const{authority:r,sender:o,code_bytes:n,type_args:s,args:i}=e;return new Zo(r,o,n,s,i)}toData(){const{authority:e,sender:r,code_bytes:o,type_args:n,args:s}=this;return{"@type":"/initia.move.v1.MsgGovScriptJSON",authority:e,sender:r,code_bytes:o,type_args:n,args:s}}static fromProto(e){return new Zo(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:n,args:s}=this;return H.MsgGovScriptJSON.fromPartial({authority:e,sender:r,codeBytes:Buffer.from(o,"base64"),typeArgs:n,args:s})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovScriptJSON",value:H.MsgGovScriptJSON.encode(this.toProto()).finish()})}static unpackAny(e){return Zo.fromProto(H.MsgGovScriptJSON.decode(e.value))}}class Qn extends u{constructor(t,e,r,o,n){super(),this.address=t,this.module_name=e,this.abi=r,this.raw_bytes=o,this.upgrade_policy=n}static fromAmino(t){const{address:e,module_name:r,abi:o,raw_bytes:n,upgrade_policy:s}=t;return new Qn(e,r,o,n,Wt.upgradePolicyFromJSON(s))}toAmino(){const{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:n}=this;return{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:Wt.upgradePolicyToJSON(n)}}static fromData(t){const{address:e,module_name:r,abi:o,raw_bytes:n,upgrade_policy:s}=t;return new Qn(e,r,o,n,Wt.upgradePolicyFromJSON(s))}toData(){const{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:n}=this;return{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:Wt.upgradePolicyToJSON(n)}}static fromProto(t){return new Qn(t.address,t.moduleName,t.abi,Buffer.from(t.rawBytes).toString("base64"),t.upgradePolicy)}toProto(){const{address:t,module_name:e,abi:r,raw_bytes:o,upgrade_policy:n}=this;return Wt.Module.fromPartial({address:t,moduleName:e,abi:r,rawBytes:Buffer.from(o,"base64"),upgradePolicy:n})}}(a=>{a.Policy=Wt.UpgradePolicy})(Qn||(Qn={}));class Yo extends u{constructor(e,r,o){super();_(this,"amount");this.delegator_address=e,this.validator_address=r,this.amount=new l(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:n}}=e;return new Yo(r,o,l.fromAmino(n))}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 fromData(e){const{delegator_address:r,validator_address:o,amount:n}=e;return new Yo(r,o,l.fromData(n))}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()}}static fromProto(e){return new Yo(e.delegatorAddress,e.validatorAddress,l.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:r,amount:o}=this;return gt.MsgDelegate.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgDelegate",value:gt.MsgDelegate.encode(this.toProto()).finish()})}static unpackAny(e){return Yo.fromProto(gt.MsgDelegate.decode(e.value))}}class Xo extends u{constructor(e,r,o){super();_(this,"amount");this.delegator_address=e,this.validator_address=r,this.amount=new l(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:n}}=e;return new Xo(r,o,l.fromAmino(n))}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 fromData(e){const{delegator_address:r,validator_address:o,amount:n}=e;return new Xo(r,o,l.fromData(n))}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()}}static fromProto(e){return new Xo(e.delegatorAddress,e.validatorAddress,l.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_address:r,amount:o}=this;return gt.MsgUndelegate.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUndelegate",value:gt.MsgUndelegate.encode(this.toProto()).finish()})}static unpackAny(e){return Xo.fromProto(gt.MsgUndelegate.decode(e.value))}}class Qo extends u{constructor(e,r,o,n){super();_(this,"amount");this.delegator_address=e,this.validator_src_address=r,this.validator_dst_address=o,this.amount=new l(n)}static fromAmino(e){const{value:{delegator_address:r,validator_src_address:o,validator_dst_address:n,amount:s}}=e;return new Qo(r,o,n,l.fromAmino(s))}toAmino(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n}=this;return{type:"mstaking/MsgBeginRedelegate",value:{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n.toAmino()}}}static fromData(e){const{delegator_address:r,validator_src_address:o,validator_dst_address:n,amount:s}=e;return new Qo(r,o,n,l.fromData(s))}toData(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n}=this;return{"@type":"/initia.mstaking.v1.MsgBeginRedelegate",delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n.toData()}}static fromProto(e){return new Qo(e.delegatorAddress,e.validatorSrcAddress,e.validatorDstAddress,l.fromProto(e.amount))}toProto(){const{delegator_address:e,validator_src_address:r,validator_dst_address:o,amount:n}=this;return gt.MsgBeginRedelegate.fromPartial({amount:n.toProto(),delegatorAddress:e,validatorDstAddress:o,validatorSrcAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgBeginRedelegate",value:gt.MsgBeginRedelegate.encode(this.toProto()).finish()})}static unpackAny(e){return Qo.fromProto(gt.MsgBeginRedelegate.decode(e.value))}}class dt extends u{constructor(e,r,o,n,s,i,c,d,g,v,b,k){super();_(this,"tokens");_(this,"delegator_shares");_(this,"voting_powers");this.operator_address=e,this.consensus_pubkey=r,this.jailed=o,this.status=n,this.description=c,this.unbonding_height=d,this.unbonding_time=g,this.commission=v,this.voting_power=k,this.tokens=new l(s),this.delegator_shares=new l(i),this.voting_powers=new l(b)}static fromAmino(e){return new dt(e.operator_address,_t.fromAmino(e.consensus_pubkey),e.jailed||!1,e.status||0,l.fromAmino(e.tokens),l.fromAmino(e.delegator_shares),dt.Description.fromAmino(e.description),parseInt(e.unbonding_height),new Date(e.unbonding_time),dt.Commission.fromAmino(e.commission),l.fromAmino(e.voting_powers),e.voting_power)}toAmino(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toAmino(),jailed:this.jailed,status:this.status,tokens:this.tokens.toAmino(),delegator_shares:this.delegator_shares.toAmino(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toAmino(),voting_powers:this.voting_powers.toAmino(),voting_power:this.voting_power}}static fromData(e){return new dt(e.operator_address,_t.fromData(e.consensus_pubkey),e.jailed||!1,e.status||0,l.fromData(e.tokens),l.fromData(e.delegator_shares),dt.Description.fromData(e.description),parseInt(e.unbonding_height),new Date(e.unbonding_time),dt.Commission.fromData(e.commission),l.fromData(e.voting_powers),e.voting_power)}toData(){return{operator_address:this.operator_address,consensus_pubkey:this.consensus_pubkey.toData(),jailed:this.jailed,status:this.status,tokens:this.tokens.toData(),delegator_shares:this.delegator_shares.toData(),description:this.description,unbonding_height:this.unbonding_height.toFixed(),unbonding_time:this.unbonding_time.toISOString(),commission:this.commission.toData(),voting_powers:this.voting_powers.toData(),voting_power:this.voting_power}}static fromProto(e){return new dt(e.operatorAddress,_t.unpackAny(e.consensusPubkey),e.jailed,e.status,l.fromProto(e.tokens),l.fromProto(e.delegatorShares),dt.Description.fromProto(e.description),Number(e.unbondingHeight),e.unbondingTime,dt.Commission.fromProto(e.commission),l.fromProto(e.votingPowers),e.votingPower)}toProto(){const{operator_address:e,consensus_pubkey:r,jailed:o,status:n,tokens:s,delegator_shares:i,description:c,unbonding_height:d,unbonding_time:g,commission:v,voting_powers:b,voting_power:k}=this;return Nt.Validator.fromPartial({operatorAddress:e,consensusPubkey:r.packAny(),jailed:o,status:n,tokens:s.toProto(),delegatorShares:i.toProto(),description:c.toProto(),unbondingHeight:BigInt(d),unbondingTime:g,commission:v.toProto(),votingPowers:b.toProto(),votingPower:k})}}(a=>{a.Status=Nt.BondStatus;class t extends u{constructor(n,s,i,c,d){super(),this.moniker=n,this.identity=s,this.website=i,this.details=c,this.security_contact=d}static fromAmino(n){return new t(n.moniker,n.identity??"",n.website??"",n.details??"",n.security_contact??"")}toAmino(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}}static fromData(n){return new t(n.moniker,n.identity??"",n.website??"",n.details??"",n.security_contact??"")}toData(){return{moniker:this.moniker,identity:this.identity,website:this.website,details:this.details,security_contact:this.security_contact}}static fromProto(n){return new t(n.moniker,n.identity,n.website,n.details,n.securityContact)}toProto(){const{moniker:n,identity:s,website:i,details:c,security_contact:d}=this;return Nt.Description.fromPartial({details:c,identity:s,moniker:n,securityContact:d,website:i})}}a.Description=t;class e extends u{constructor(n,s,i){super(),this.rate=n,this.max_rate=s,this.max_change_rate=i}static fromAmino(n){const{rate:s,max_rate:i,max_change_rate:c}=n;return new e(s,i,c)}toAmino(){const{rate:n,max_rate:s,max_change_rate:i}=this;return{rate:n,max_rate:s,max_change_rate:i}}static fromData(n){const{rate:s,max_rate:i,max_change_rate:c}=n;return new e(s,i,c)}toData(){const{rate:n,max_rate:s,max_change_rate:i}=this;return{rate:n,max_rate:s,max_change_rate:i}}static fromProto(n){return new e(n.rate,n.maxRate,n.maxChangeRate)}toProto(){const{rate:n,max_rate:s,max_change_rate:i}=this;return Nt.CommissionRates.fromPartial({maxChangeRate:i,maxRate:s,rate:n})}}a.CommissionRates=e;class r extends u{constructor(n,s){super(),this.commission_rates=n,this.update_time=s}static fromAmino(n){return new r(e.fromAmino(n.commission_rates),new Date(n.update_time))}toAmino(){return{commission_rates:this.commission_rates.toAmino(),update_time:this.update_time.toISOString()}}static fromData(n){return new r(e.fromData(n.commission_rates),new Date(n.update_time))}toData(){return{commission_rates:this.commission_rates.toData(),update_time:this.update_time.toISOString()}}static fromProto(n){return new r(e.fromProto(n.commissionRates),n.updateTime)}toProto(){const{commission_rates:n,update_time:s}=this;return Nt.Commission.fromPartial({commissionRates:n.toProto(),updateTime:s})}}a.Commission=r})(dt||(dt={}));class tn extends u{constructor(e,r,o,n,s){super();_(this,"amount");this.description=e,this.commission=r,this.validator_address=o,this.pubkey=n,this.amount=new l(s)}static fromAmino(e){const{value:{description:r,commission:o,validator_address:n,pubkey:s,amount:i}}=e;return new tn(r,dt.CommissionRates.fromAmino(o),n,_t.fromAmino(s),l.fromAmino(i))}toAmino(){const{description:e,commission:r,validator_address:o,pubkey:n,amount:s}=this;return{type:"mstaking/MsgCreateValidator",value:{description:e,commission:r.toAmino(),validator_address:o,pubkey:n.toAmino(),amount:s.toAmino()}}}static fromData(e){const{description:r,commission:o,validator_address:n,pubkey:s,amount:i}=e;return new tn(r,dt.CommissionRates.fromData(o),n,_t.fromData(s),l.fromData(i))}toData(){const{description:e,commission:r,validator_address:o,pubkey:n,amount:s}=this;return{"@type":"/initia.mstaking.v1.MsgCreateValidator",description:e,commission:r.toData(),validator_address:o,pubkey:n.toData(),amount:s.toData()}}static fromProto(e){return new tn(dt.Description.fromProto(e.description),dt.CommissionRates.fromProto(e.commission),e.validatorAddress,exports.PublicKey.fromProto(e.pubkey),l.fromProto(e.amount))}toProto(){const{description:e,commission:r,validator_address:o,pubkey:n,amount:s}=this;return gt.MsgCreateValidator.fromPartial({commission:r.toProto(),description:e.toProto(),pubkey:n.packAny(),validatorAddress:o,amount:s.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCreateValidator",value:gt.MsgCreateValidator.encode(this.toProto()).finish()})}static unpackAny(e){return tn.fromProto(gt.MsgCreateValidator.decode(e.value))}}class _e extends u{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 _e(dt.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 fromData(t){const{description:e,validator_address:r,commission_rate:o}=t;return new _e(dt.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}}static fromProto(t){return new _e(dt.Description.fromProto(t.description),t.validatorAddress,t.commissionRate!==""?t.commissionRate:void 0)}toProto(){const{description:t,validator_address:e,commission_rate:r}=this;return gt.MsgEditValidator.fromPartial({description:t.toProto(),commissionRate:r,validatorAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgEditValidator",value:gt.MsgEditValidator.encode(this.toProto()).finish()})}static unpackAny(t){return _e.fromProto(gt.MsgEditValidator.decode(t.value))}}(a=>{a.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]"}})(_e||(_e={}));class en extends u{constructor(e,r,o,n){super();_(this,"amount");this.delegator_address=e,this.validator_address=r,this.creation_height=n,this.amount=new l(o)}static fromAmino(e){const{value:{delegator_address:r,validator_address:o,amount:n,creation_height:s}}=e;return new en(r,o,l.fromAmino(n),parseInt(s))}toAmino(){const{delegator_address:e,validator_address:r,amount:o,creation_height:n}=this;return{type:"mstaking/MsgCancelUnbondingDelegation",value:{delegator_address:e,validator_address:r,amount:o.toAmino(),creation_height:n.toFixed()}}}static fromData(e){const{delegator_address:r,validator_address:o,amount:n,creation_height:s}=e;return new en(r,o,l.fromData(n),parseInt(s))}toData(){const{delegator_address:e,validator_address:r,amount:o,creation_height:n}=this;return{"@type":"/initia.mstaking.v1.MsgCancelUnbondingDelegation",delegator_address:e,validator_address:r,amount:o.toData(),creation_height:n.toFixed()}}static fromProto(e){return new en(e.delegatorAddress,e.validatorAddress,l.fromProto(e.amount),Number(e.creationHeight))}toProto(){const{delegator_address:e,validator_address:r,amount:o,creation_height:n}=this;return gt.MsgCancelUnbondingDelegation.fromPartial({amount:o.toProto(),delegatorAddress:e,validatorAddress:r,creationHeight:BigInt(n)})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgCancelUnbondingDelegation",value:gt.MsgCancelUnbondingDelegation.encode(this.toProto()).finish()})}static unpackAny(e){return en.fromProto(gt.MsgCancelUnbondingDelegation.decode(e.value))}}class ts extends u{constructor(t,e,r,o,n,s,i){super(),this.unbonding_time=t,this.max_validators=e,this.max_entries=r,this.historical_entries=o,this.bond_denoms=n,this.min_voting_power=s,this.min_commission_rate=i}static fromAmino(t){const{value:{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:n,bond_denoms:s,min_voting_power:i,min_commission_rate:c}}=t;return new ts(q.fromAmino(e),r,o,n,s,parseInt(i),c)}toAmino(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s,min_commission_rate:i}=this;return{type:"mstaking/Params",value:{unbonding_time:t.toAmino(),max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s.toFixed(),min_commission_rate:i}}}static fromData(t){const{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:n,bond_denoms:s,min_voting_power:i,min_commission_rate:c}=t;return new ts(q.fromData(e),r,o,n,s,parseInt(i),c)}toData(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s,min_commission_rate:i}=this;return{"@type":"/initia.mstaking.v1.Params",unbonding_time:t.toData(),max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s.toFixed(),min_commission_rate:i}}static fromProto(t){return new ts(q.fromProto(t.unbondingTime),t.maxValidators,t.maxEntries,t.historicalEntries,t.bondDenoms,Number(t.minVotingPower),t.minCommissionRate)}toProto(){const{unbonding_time:t,max_validators:e,max_entries:r,historical_entries:o,bond_denoms:n,min_voting_power:s,min_commission_rate:i}=this;return Nt.Params.fromPartial({unbondingTime:t.toProto(),maxValidators:e,maxEntries:r,historicalEntries:o,bondDenoms:n,minVotingPower:BigInt(s),minCommissionRate:i})}}class rn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new rn(e,ts.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 rn(e,ts.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 rn(t.authority,ts.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return gt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.MsgUpdateParams",value:gt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return rn.fromProto(gt.MsgUpdateParams.decode(t.value))}}class Bs extends u{constructor(e,r,o,n){super();_(this,"shares");_(this,"balance");this.delegator_address=e,this.validator_address=r,this.shares=new l(o),this.balance=new l(n)}static fromAmino(e){const{delegation:{delegator_address:r,validator_address:o,shares:n},balance:s}=e;return new Bs(r,o,l.fromAmino(n),l.fromAmino(s))}toAmino(){const{delegator_address:e,validator_address:r,shares:o,balance:n}=this;return{delegation:{delegator_address:e,validator_address:r,shares:o.toAmino()},balance:n.toAmino()}}static fromData(e){const{delegation:{delegator_address:r,validator_address:o,shares:n},balance:s}=e;return new Bs(r,o,l.fromData(n),l.fromData(s))}toData(){const{delegator_address:e,validator_address:r,shares:o,balance:n}=this;return{delegation:{delegator_address:e,validator_address:r,shares:o.toData()},balance:n.toData()}}static fromProto(e){const r=e.delegation;return new Bs(r.delegatorAddress,r.validatorAddress,l.fromProto(r.shares),l.fromProto(e.balance))}toProto(){const{delegator_address:e,validator_address:r,shares:o,balance:n}=this;return Nt.DelegationResponse.fromPartial({delegation:Nt.Delegation.fromPartial({delegatorAddress:e,validatorAddress:r,shares:o.toProto()}),balance:n.toProto()})}}class ce extends u{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:n}=t;return new ce(e,r,o,n.map(s=>ce.Entry.fromAmino(s)))}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(n=>n.toAmino())}}static fromData(t){const{redelegation:{delegator_address:e,validator_src_address:r,validator_dst_address:o},entries:n}=t;return new ce(e,r,o,n.map(s=>ce.Entry.fromData(s)))}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(n=>n.toData())}}static fromProto(t){const e=t.redelegation;return new ce(e.delegatorAddress,e.validatorDstAddress,e.validatorDstAddress,t.entries.map(r=>ce.Entry.fromProto(r)))}toProto(){const{delegator_address:t,validator_src_address:e,validator_dst_address:r,entries:o}=this;return Nt.RedelegationResponse.fromPartial({entries:o.map(n=>n.toProto()),redelegation:Nt.Redelegation.fromPartial({delegatorAddress:t,entries:o.map(n=>n.toProto().redelegationEntry),validatorDstAddress:r,validatorSrcAddress:e})})}}(a=>{class t extends u{constructor(o,n,s,i,c){super();_(this,"initial_balance");_(this,"shares_dst");_(this,"balance");this.creation_height=i,this.completion_time=c,this.initial_balance=new l(o),this.balance=new l(n),this.shares_dst=new l(s)}static fromAmino(o){const{redelegation_entry:{initial_balance:n,shares_dst:s,creation_height:i,completion_time:c},balance:d}=o;return new t(l.fromAmino(n),l.fromAmino(d),l.fromAmino(s),i,new Date(c))}toAmino(){return{redelegation_entry:{initial_balance:this.initial_balance.toAmino(),shares_dst:this.shares_dst.toAmino(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toAmino()}}static fromData(o){const{redelegation_entry:{initial_balance:n,shares_dst:s,creation_height:i,completion_time:c},balance:d}=o;return new t(l.fromData(n),l.fromData(d),l.fromData(s),i,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 fromProto(o){const n=o.redelegationEntry;return new t(l.fromProto(n.initialBalance),l.fromProto(o.balance),l.fromProto(n.sharesDst),Number(n.creationHeight),n.completionTime)}toProto(){const{initial_balance:o,balance:n,shares_dst:s,creation_height:i,completion_time:c}=this;return Nt.RedelegationEntryResponse.fromPartial({balance:n.toProto(),redelegationEntry:Nt.RedelegationEntry.fromPartial({completionTime:c,creationHeight:BigInt(i),initialBalance:o.toProto(),sharesDst:s.toProto()})})}}a.Entry=t})(ce||(ce={}));class Ht extends u{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 Ht(e,r,o.map(n=>Ht.Entry.fromAmino(n)))}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 Ht(e,r,o.map(n=>Ht.Entry.fromData(n)))}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 Nt.UnbondingDelegation.fromPartial({delegatorAddress:t,entries:r.map(o=>o.toProto()),validatorAddress:e})}static fromProto(t){return new Ht(t.delegatorAddress,t.validatorAddress,t.entries.map(e=>Ht.Entry.fromProto(e)))}}(a=>{class t extends u{constructor(o,n,s,i){super();_(this,"initial_balance");_(this,"balance");this.creation_height=s,this.completion_time=i,this.initial_balance=new l(o),this.balance=new l(n)}static fromAmino(o){const{initial_balance:n,balance:s,creation_height:i,completion_time:c}=o;return new t(l.fromAmino(n),l.fromAmino(s),parseInt(i),new Date(c))}toAmino(){return{initial_balance:this.initial_balance.toAmino(),balance:this.balance.toAmino(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}}static fromData(o){const{initial_balance:n,balance:s,creation_height:i,completion_time:c}=o;return new t(l.fromData(n),l.fromData(s),parseInt(i),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 fromProto(o){return new t(l.fromProto(o.initialBalance),l.fromProto(o.balance),Number(o.creationHeight),o.completionTime)}toProto(){const{initial_balance:o,balance:n,creation_height:s,completion_time:i}=this;return Nt.UnbondingDelegationEntry.fromPartial({balance:n.toProto(),completionTime:i,creationHeight:BigInt(s),initialBalance:o.toProto()})}}a.Entry=t})(Ht||(Ht={}));class on extends u{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:n}}=t;return new on(e,r,o,_t.fromAmino(n))}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:n}=t;return new on(e,r,o,_t.fromData(n))}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 on(t.authority,t.moniker,t.validatorAddress,_t.unpackAny(t.pubkey))}toProto(){const{authority:t,moniker:e,validator_address:r,pubkey:o}=this;return st.MsgAddValidator.fromPartial({authority:t,moniker:e,validatorAddress:r,pubkey:o.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgAddValidator",value:st.MsgAddValidator.encode(this.toProto()).finish()})}static unpackAny(t){return on.fromProto(st.MsgAddValidator.decode(t.value))}}class nn extends u{constructor(t,e){super(),this.authority=t,this.validator_address=e}static fromAmino(t){const{value:{authority:e,validator_address:r}}=t;return new nn(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 nn(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 nn(t.authority,t.validatorAddress)}toProto(){const{authority:t,validator_address:e}=this;return st.MsgRemoveValidator.fromPartial({authority:t,validatorAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgRemoveValidator",value:st.MsgRemoveValidator.encode(this.toProto()).finish()})}static unpackAny(t){return nn.fromProto(st.MsgRemoveValidator.decode(t.value))}}class sn extends u{constructor(t,e,r,o,n,s,i,c){super(),this.sender=t,this.from=e,this.to=r,this.amount=o,this.sequence=n,this.height=s,this.base_denom=i,this.data=c}static fromAmino(t){const{value:{sender:e,from:r,to:o,amount:n,sequence:s,height:i,base_denom:c,data:d}}=t;return new sn(e,r,o,S.fromAmino(n),parseInt(s),parseInt(i),c,d)}toAmino(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:i,data:c}=this;return{type:"opchild/MsgFinalizeTokenDeposit",value:{sender:t,from:e,to:r,amount:o.toAmino(),sequence:n.toFixed(),height:s.toFixed(),base_denom:i,data:c}}}static fromData(t){const{sender:e,from:r,to:o,amount:n,sequence:s,height:i,base_denom:c,data:d}=t;return new sn(e,r,o,S.fromData(n),parseInt(s),parseInt(i),c,d)}toData(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:i,data:c}=this;return{"@type":"/opinit.opchild.v1.MsgFinalizeTokenDeposit",sender:t,from:e,to:r,amount:o.toData(),sequence:n.toFixed(),height:s.toFixed(),base_denom:i,data:c}}static fromProto(t){return new sn(t.sender,t.from,t.to,S.fromProto(t.amount),Number(t.sequence),Number(t.height),t.baseDenom,t.data.length?Buffer.from(t.data).toString("base64"):void 0)}toProto(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:i,data:c}=this;return st.MsgFinalizeTokenDeposit.fromPartial({sender:t,from:e,to:r,amount:o.toProto(),sequence:BigInt(n),height:BigInt(s),baseDenom:i,data:c?Buffer.from(c,"base64"):void 0})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgFinalizeTokenDeposit",value:st.MsgFinalizeTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return sn.fromProto(st.MsgFinalizeTokenDeposit.decode(t.value))}}class an extends u{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 an(e,r,S.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 an(e,r,S.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 an(t.sender,t.to,S.fromProto(t.amount))}toProto(){const{sender:t,to:e,amount:r}=this;return st.MsgInitiateTokenWithdrawal.fromPartial({sender:t,to:e,amount:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgInitiateTokenWithdrawal",value:st.MsgInitiateTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return an.fromProto(st.MsgInitiateTokenWithdrawal.decode(t.value))}}class cn extends u{constructor(t,e){super(),this.sender=t,this.messages=e}static fromAmino(t){const{value:{sender:e,messages:r}}=t;return new cn(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 cn(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 cn(t.sender,t.messages.map(exports.Msg.fromProto))}toProto(){const{sender:t,messages:e}=this;return st.MsgExecuteMessages.fromPartial({sender:t,messages:e.map(r=>r.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgExecuteMessages",value:st.MsgExecuteMessages.encode(this.toProto()).finish()})}static unpackAny(t){return cn.fromProto(st.MsgExecuteMessages.decode(t.value))}}class un extends u{constructor(e,r,o){super();_(this,"amount");this.authority=e,this.recipient=r,this.amount=new l(o)}static fromAmino(e){const{value:{authority:r,recipient:o,amount:n}}=e;return new un(r,o,l.fromAmino(n))}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:n}=e;return new un(r,o,l.fromData(n))}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 un(e.authority,e.recipient,l.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return st.MsgSpendFeePool.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSpendFeePool",value:st.MsgSpendFeePool.encode(this.toProto()).finish()})}static unpackAny(e){return un.fromProto(st.MsgSpendFeePool.decode(e.value))}}class mn extends u{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 mn(e,parseInt(r),o)}toAmino(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return{type:"ophost/MsgRecordBatch",value:{submitter:t,bridge_id:e.toFixed(),batch_bytes:r}}}static fromData(t){const{submitter:e,bridge_id:r,batch_bytes:o}=t;return new mn(e,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.toFixed(),batch_bytes:r}}static fromProto(t){return new mn(t.submitter,Number(t.bridgeId),Buffer.from(t.batchBytes).toString("base64"))}toProto(){const{submitter:t,bridge_id:e,batch_bytes:r}=this;return z.MsgRecordBatch.fromPartial({submitter:t,bridgeId:BigInt(e),batchBytes:r?Buffer.from(r,"base64"):void 0})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgRecordBatch",value:z.MsgRecordBatch.encode(this.toProto()).finish()})}static unpackAny(t){return mn.fromProto(z.MsgRecordBatch.decode(t.value))}}class $t extends u{constructor(t,e){super(),this.submitter=t,this.chain_type=e}static fromAmino(t){const{submitter:e,chain_type:r}=t;return new $t(e,He.batchInfo_ChainTypeFromJSON(r))}toAmino(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:He.batchInfo_ChainTypeToJSON(e)}}static fromData(t){const{submitter:e,chain_type:r}=t;return new $t(e,He.batchInfo_ChainTypeFromJSON(r))}toData(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:He.batchInfo_ChainTypeToJSON(e)}}static fromProto(t){return new $t(t.submitter,t.chainType)}toProto(){const{submitter:t,chain_type:e}=this;return He.BatchInfo.fromPartial({submitter:t,chainType:e})}}class Me extends u{constructor(t,e,r,o,n,s,i,c){super(),this.challenger=t,this.proposer=e,this.batch_info=r,this.submission_interval=o,this.finalization_period=n,this.submission_start_height=s,this.oracle_enabled=i,this.metadata=c}static fromAmino(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:n,finalization_period:s,submission_start_height:i,oracle_enabled:c,metadata:d}=t;return new Me(e,r,$t.fromAmino(o),q.fromAmino(n),q.fromAmino(s),parseInt(i),c,d)}toAmino(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:i,metadata:c}=this;return{challenger:t,proposer:e,batch_info:r.toAmino(),submission_interval:o.toAmino(),finalization_period:n.toAmino(),submission_start_height:s.toFixed(),oracle_enabled:i,metadata:c}}static fromData(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:n,finalization_period:s,submission_start_height:i,oracle_enabled:c,metadata:d}=t;return new Me(e,r,$t.fromData(o),q.fromData(n),q.fromData(s),parseInt(i),c,d)}toData(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:i,metadata:c}=this;return{challenger:t,proposer:e,batch_info:r.toData(),submission_interval:o.toData(),finalization_period:n.toData(),submission_start_height:s.toFixed(),oracle_enabled:i,metadata:c}}static fromProto(t){return new Me(t.challenger,t.proposer,$t.fromProto(t.batchInfo),q.fromProto(t.submissionInterval),q.fromProto(t.finalizationPeriod),Number(t.submissionStartHeight),t.oracleEnabled,Buffer.from(t.metadata).toString("base64"))}toProto(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:i,metadata:c}=this;return He.BridgeConfig.fromPartial({challenger:t,proposer:e,batchInfo:r.toProto(),submissionInterval:o.toProto(),finalizationPeriod:n.toProto(),submissionStartHeight:BigInt(s),oracleEnabled:i,metadata:c?Buffer.from(c,"base64"):void 0})}}class dn extends u{constructor(t,e){super(),this.creator=t,this.config=e}static fromAmino(t){const{value:{creator:e,config:r}}=t;return new dn(e,Me.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 dn(e,Me.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 dn(t.creator,Me.fromProto(t.config))}toProto(){const{creator:t,config:e}=this;return z.MsgCreateBridge.fromPartial({creator:t,config:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgCreateBridge",value:z.MsgCreateBridge.encode(this.toProto()).finish()})}static unpackAny(t){return dn.fromProto(z.MsgCreateBridge.decode(t.value))}}class ln extends u{constructor(t,e,r,o,n){super(),this.proposer=t,this.bridge_id=e,this.output_index=r,this.l2_block_number=o,this.output_root=n}static fromAmino(t){const{value:{proposer:e,bridge_id:r,output_index:o,l2_block_number:n,output_root:s}}=t;return new ln(e,parseInt(r),parseInt(o),parseInt(n),s)}toAmino(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:n}=this;return{type:"ophost/MsgProposeOutput",value:{proposer:t,bridge_id:e.toFixed(),output_index:r.toFixed(),l2_block_number:o.toFixed(),output_root:n}}}static fromData(t){const{proposer:e,bridge_id:r,output_index:o,l2_block_number:n,output_root:s}=t;return new ln(e,parseInt(r),parseInt(o),parseInt(n),s)}toData(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:n}=this;return{"@type":"/opinit.ophost.v1.MsgProposeOutput",proposer:t,bridge_id:e.toFixed(),output_index:r.toFixed(),l2_block_number:o.toFixed(),output_root:n}}static fromProto(t){return new ln(t.proposer,Number(t.bridgeId),Number(t.outputIndex),Number(t.l2BlockNumber),Buffer.from(t.outputRoot).toString("base64"))}toProto(){const{proposer:t,bridge_id:e,output_index:r,l2_block_number:o,output_root:n}=this;return z.MsgProposeOutput.fromPartial({proposer:t,bridgeId:BigInt(e),outputIndex:BigInt(r),l2BlockNumber:BigInt(o),outputRoot:n?Buffer.from(n,"base64"):void 0})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgProposeOutput",value:z.MsgProposeOutput.encode(this.toProto()).finish()})}static unpackAny(t){return ln.fromProto(z.MsgProposeOutput.decode(t.value))}}class pn extends u{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 pn(e,parseInt(r),parseInt(o))}toAmino(){const{challenger:t,bridge_id:e,output_index:r}=this;return{type:"ophost/MsgDeleteOutput",value:{challenger:t,bridge_id:e.toFixed(),output_index:r.toFixed()}}}static fromData(t){const{challenger:e,bridge_id:r,output_index:o}=t;return new pn(e,parseInt(r),parseInt(o))}toData(){const{challenger:t,bridge_id:e,output_index:r}=this;return{"@type":"/opinit.ophost.v1.MsgDeleteOutput",challenger:t,bridge_id:e.toFixed(),output_index:r.toFixed()}}static fromProto(t){return new pn(t.challenger,Number(t.bridgeId),Number(t.outputIndex))}toProto(){const{challenger:t,bridge_id:e,output_index:r}=this;return z.MsgDeleteOutput.fromPartial({challenger:t,bridgeId:BigInt(e),outputIndex:BigInt(r)})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgDeleteOutput",value:z.MsgDeleteOutput.encode(this.toProto()).finish()})}static unpackAny(t){return pn.fromProto(z.MsgDeleteOutput.decode(t.value))}}class hn extends u{constructor(t,e,r,o,n){super(),this.sender=t,this.bridge_id=e,this.to=r,this.amount=o,this.data=n}static fromAmino(t){const{value:{sender:e,bridge_id:r,to:o,amount:n,data:s}}=t;return new hn(e,parseInt(r),o,S.fromAmino(n),s)}toAmino(){const{sender:t,bridge_id:e,to:r,amount:o,data:n}=this;return{type:"ophost/MsgInitiateTokenDeposit",value:{sender:t,bridge_id:e.toFixed(),to:r,amount:o.toAmino(),data:n}}}static fromData(t){const{sender:e,bridge_id:r,to:o,amount:n,data:s}=t;return new hn(e,parseInt(r),o,S.fromData(n),s)}toData(){const{sender:t,bridge_id:e,to:r,amount:o,data:n}=this;return{"@type":"/opinit.ophost.v1.MsgInitiateTokenDeposit",sender:t,bridge_id:e.toFixed(),to:r,amount:o.toData(),data:n}}static fromProto(t){return new hn(t.sender,Number(t.bridgeId),t.to,S.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:n}=this;return z.MsgInitiateTokenDeposit.fromPartial({sender:t,bridgeId:BigInt(e),to:r,amount:o.toProto(),data:n?Buffer.from(n,"base64"):void 0})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgInitiateTokenDeposit",value:z.MsgInitiateTokenDeposit.encode(this.toProto()).finish()})}static unpackAny(t){return hn.fromProto(z.MsgInitiateTokenDeposit.decode(t.value))}}class fn extends u{constructor(t,e,r,o,n,s,i,c,d,g,v){super(),this.sender=t,this.bridge_id=e,this.output_index=r,this.withdrawal_proofs=o,this.from=n,this.to=s,this.sequence=i,this.amount=c,this.version=d,this.storage_root=g,this.last_block_hash=v}static fromAmino(t){const{value:{sender:e,bridge_id:r,output_index:o,withdrawal_proofs:n,from:s,to:i,sequence:c,amount:d,version:g,storage_root:v,last_block_hash:b}}=t;return new fn(e,parseInt(r),parseInt(o),n,s,i,parseInt(c),S.fromAmino(d),g,v,b)}toAmino(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:n,to:s,sequence:i,amount:c,version:d,storage_root:g,last_block_hash:v}=this;return{type:"ophost/MsgFinalizeTokenWithdrawal",value:{sender:t,bridge_id:e.toFixed(),output_index:r.toFixed(),withdrawal_proofs:o,from:n,to:s,sequence:i.toFixed(),amount:c.toAmino(),version:d,storage_root:g,last_block_hash:v}}}static fromData(t){const{sender:e,bridge_id:r,output_index:o,withdrawal_proofs:n,from:s,to:i,sequence:c,amount:d,version:g,storage_root:v,last_block_hash:b}=t;return new fn(e,parseInt(r),parseInt(o),n,s,i,parseInt(c),S.fromData(d),g,v,b)}toData(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:n,to:s,sequence:i,amount:c,version:d,storage_root:g,last_block_hash:v}=this;return{"@type":"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",sender:t,bridge_id:e.toFixed(),output_index:r.toFixed(),withdrawal_proofs:o,from:n,to:s,sequence:i.toFixed(),amount:c.toData(),version:d,storage_root:g,last_block_hash:v}}static fromProto(t){return new fn(t.sender,Number(t.bridgeId),Number(t.outputIndex),t.withdrawalProofs.map(e=>Buffer.from(e).toString("base64")),t.from,t.to,Number(t.sequence),S.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:n,to:s,sequence:i,amount:c,version:d,storage_root:g,last_block_hash:v}=this;return z.MsgFinalizeTokenWithdrawal.fromPartial({sender:t,bridgeId:BigInt(e),outputIndex:BigInt(r),withdrawalProofs:o.map(b=>Buffer.from(b,"base64")),from:n,to:s,sequence:BigInt(i),amount:c.toProto(),version:Buffer.from(d,"base64"),storageRoot:Buffer.from(g,"base64"),lastBlockHash:Buffer.from(v,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal",value:z.MsgFinalizeTokenWithdrawal.encode(this.toProto()).finish()})}static unpackAny(t){return fn.fromProto(z.MsgFinalizeTokenWithdrawal.decode(t.value))}}class gn extends u{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 gn(e,parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,new_proposer:r}=this;return{type:"ophost/MsgUpdateProposer",value:{authority:t,bridge_id:e.toFixed(),new_proposer:r}}}static fromData(t){const{authority:e,bridge_id:r,new_proposer:o}=t;return new gn(e,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.toFixed(),new_proposer:r}}static fromProto(t){return new gn(t.authority,Number(t.bridgeId),t.newProposer)}toProto(){const{authority:t,bridge_id:e,new_proposer:r}=this;return z.MsgUpdateProposer.fromPartial({authority:t,bridgeId:BigInt(e),newProposer:r})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateProposer",value:z.MsgUpdateProposer.encode(this.toProto()).finish()})}static unpackAny(t){return gn.fromProto(z.MsgUpdateProposer.decode(t.value))}}class yn extends u{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 yn(e,parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,challenger:r}=this;return{type:"ophost/MsgUpdateChallenger",value:{authority:t,bridge_id:e.toFixed(),challenger:r}}}static fromData(t){const{authority:e,bridge_id:r,challenger:o}=t;return new yn(e,parseInt(r),o)}toData(){const{authority:t,bridge_id:e,challenger:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateChallenger",authority:t,bridge_id:e.toFixed(),challenger:r}}static fromProto(t){return new yn(t.authority,Number(t.bridgeId),t.challenger)}toProto(){const{authority:t,bridge_id:e,challenger:r}=this;return z.MsgUpdateChallenger.fromPartial({authority:t,bridgeId:BigInt(e),challenger:r})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateChallenger",value:z.MsgUpdateChallenger.encode(this.toProto()).finish()})}static unpackAny(t){return yn.fromProto(z.MsgUpdateChallenger.decode(t.value))}}class _n extends u{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 _n(e,parseInt(r),$t.fromAmino(o))}toAmino(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return{type:"ophost/MsgUpdateBatchInfo",value:{authority:t,bridge_id:e.toFixed(),new_batch_info:r.toAmino()}}}static fromData(t){const{authority:e,bridge_id:r,new_batch_info:o}=t;return new _n(e,parseInt(r),$t.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.toFixed(),new_batch_info:r.toData()}}static fromProto(t){return new _n(t.authority,Number(t.bridgeId),$t.fromProto(t.newBatchInfo))}toProto(){const{authority:t,bridge_id:e,new_batch_info:r}=this;return z.MsgUpdateBatchInfo.fromPartial({authority:t,bridgeId:BigInt(e),newBatchInfo:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateBatchInfo",value:z.MsgUpdateBatchInfo.encode(this.toProto()).finish()})}static unpackAny(t){return _n.fromProto(z.MsgUpdateBatchInfo.decode(t.value))}}class vn extends u{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 vn(e,parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return{type:"ophost/MsgUpdateOracleConfig",value:{authority:t,bridge_id:e.toFixed(),oracle_enabled:r}}}static fromData(t){const{authority:e,bridge_id:r,oracle_enabled:o}=t;return new vn(e,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.toFixed(),oracle_enabled:r}}static fromProto(t){return new vn(t.authority,Number(t.bridgeId),t.oracleEnabled)}toProto(){const{authority:t,bridge_id:e,oracle_enabled:r}=this;return z.MsgUpdateOracleConfig.fromPartial({authority:t,bridgeId:BigInt(e),oracleEnabled:r})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateOracleConfig",value:z.MsgUpdateOracleConfig.encode(this.toProto()).finish()})}static unpackAny(t){return vn.fromProto(z.MsgUpdateOracleConfig.decode(t.value))}}class wn extends u{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 wn(e,parseInt(r),o)}toAmino(){const{authority:t,bridge_id:e,metadata:r}=this;return{type:"ophost/MsgUpdateMetadata",value:{authority:t,bridge_id:e.toFixed(),metadata:r}}}static fromData(t){const{authority:e,bridge_id:r,metadata:o}=t;return new wn(e,parseInt(r),o)}toData(){const{authority:t,bridge_id:e,metadata:r}=this;return{"@type":"/opinit.ophost.v1.MsgUpdateMetadata",authority:t,bridge_id:e.toFixed(),metadata:r}}static fromProto(t){return new wn(t.authority,Number(t.bridgeId),Buffer.from(t.metadata).toString("base64"))}toProto(){const{authority:t,bridge_id:e,metadata:r}=this;return z.MsgUpdateMetadata.fromPartial({authority:t,bridgeId:BigInt(e),metadata:Buffer.from(r,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateMetadata",value:z.MsgUpdateMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return wn.fromProto(z.MsgUpdateMetadata.decode(t.value))}}class es extends u{constructor(e){super();_(this,"registration_fee");this.registration_fee=new l(e)}static fromAmino(e){return new es(l.fromAmino(e.value.registration_fee))}toAmino(){return{type:"ophost/Params",value:{registration_fee:this.registration_fee.toAmino()}}}static fromData(e){return new es(l.fromData(e.registration_fee))}toData(){return{"@type":"/opinit.ophost.v1.Params",registration_fee:this.registration_fee.toData()}}static fromProto(e){return new es(l.fromProto(e.registrationFee))}toProto(){return He.Params.fromPartial({registrationFee:this.registration_fee.toProto()})}}class An extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new An(e,es.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 An(e,es.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 An(t.authority,es.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return z.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.ophost.v1.MsgUpdateParams",value:z.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return An.fromProto(z.MsgUpdateParams.decode(t.value))}}class Se extends u{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:n}=t;return new Se(e,parseInt(r),new Date(o),parseInt(n))}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.toFixed(),l1_block_time:r.toISOString(),l2_block_number:o.toFixed()}}static fromData(t){const{output_root:e,l1_block_number:r,l1_block_time:o,l2_block_number:n}=t;return new Se(e,parseInt(r),new Date(o),parseInt(n))}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.toFixed(),l1_block_time:r.toISOString(),l2_block_number:o.toFixed()}}static fromProto(t){return new Se(Buffer.from(t.outputRoot).toString("base64"),Number(t.l1BlockNumber),t.l1BlockTime,Number(t.l2BlockNumber))}toProto(){const{output_root:t,l1_block_number:e,l1_block_time:r,l2_block_number:o}=this;return He.Output.fromPartial({outputRoot:Buffer.from(t,"base64"),l1BlockNumber:BigInt(e),l1BlockTime:r,l2BlockNumber:BigInt(o)})}}class ri extends u{constructor(t,e){super(),this.batch_info=t,this.output=e}static fromAmino(t){const{batch_info:e,output:r}=t;return new ri($t.fromAmino(e),Se.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 ri($t.fromData(e),Se.fromData(r))}toData(){const{batch_info:t,output:e}=this;return{batch_info:t.toData(),output:e.toData()}}static fromProto(t){return new ri($t.fromProto(t.batchInfo),Se.fromProto(t.output))}toProto(){const{batch_info:t,output:e}=this;return He.BatchInfoWithOutput.fromPartial({batchInfo:t.toProto(),output:e.toProto()})}}class Ie extends u{constructor(t,e,r,o,n){super(),this.bridge_id=t,this.bridge_addr=e,this.l1_chain_id=r,this.l1_client_id=o,this.bridge_config=n}static fromAmino(t){const{bridge_id:e,bridge_addr:r,l1_chain_id:o,l1_client_id:n,bridge_config:s}=t;return new Ie(parseInt(e),r,o,n,Me.fromAmino(s))}toAmino(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n}=this;return{bridge_id:t.toFixed(),bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n.toAmino()}}static fromData(t){const{bridge_id:e,bridge_addr:r,l1_chain_id:o,l1_client_id:n,bridge_config:s}=t;return new Ie(parseInt(e),r,o,n,Me.fromData(s))}toData(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n}=this;return{bridge_id:t.toFixed(),bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n.toData()}}static fromProto(t){return new Ie(Number(t.bridgeId),t.bridgeAddr,t.l1ChainId,t.l1ClientId,Me.fromProto(t.bridgeConfig))}toProto(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n}=this;return Nc.BridgeInfo.fromPartial({bridgeId:BigInt(t),bridgeAddr:e,l1ChainId:r,l1ClientId:o,bridgeConfig:n.toProto()})}}class Pn extends u{constructor(t,e){super(),this.sender=t,this.bridge_info=e}static fromAmino(t){const{value:{sender:e,bridge_info:r}}=t;return new Pn(e,Ie.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 Pn(e,Ie.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 Pn(t.sender,Ie.fromProto(t.bridgeInfo))}toProto(){const{sender:t,bridge_info:e}=this;return st.MsgSetBridgeInfo.fromPartial({sender:t,bridgeInfo:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgSetBridgeInfo",value:st.MsgSetBridgeInfo.encode(this.toProto()).finish()})}static unpackAny(t){return Pn.fromProto(st.MsgSetBridgeInfo.decode(t.value))}}class bn extends u{constructor(t,e,r){super(),this.sender=t,this.height=e,this.data=r}static fromAmino(t){return new bn(t.value.sender,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.toFixed(),data:r}}}static fromData(t){return new bn(t.sender,parseInt(t.height),t.data)}toData(){const{sender:t,height:e,data:r}=this;return{"@type":"/opinit.opchild.v1.MsgUpdateOracle",sender:t,height:e.toFixed(),data:r}}static fromProto(t){return new bn(t.sender,Number(t.height),Buffer.from(t.data).toString("base64"))}toProto(){const{sender:t,height:e,data:r}=this;return st.MsgUpdateOracle.fromPartial({sender:t,height:BigInt(e),data:Buffer.from(r,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateOracle",value:st.MsgUpdateOracle.encode(this.toProto()).finish()})}static unpackAny(t){return bn.fromProto(st.MsgUpdateOracle.decode(t.value))}}class rs extends u{constructor(e,r,o,n,s,i){super();_(this,"min_gas_prices");this.max_validators=e,this.historical_entries=r,this.bridge_executors=n,this.admin=s,this.fee_whitelist=i,this.min_gas_prices=new l(o)}static fromAmino(e){const{value:{max_validators:r,historical_entries:o,min_gas_prices:n,bridge_executors:s,admin:i,fee_whitelist:c}}=e;return new rs(r,o,l.fromAmino(n),s,i,c)}toAmino(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:i}=this;return{type:"opchild/Params",value:{max_validators:e,historical_entries:r,min_gas_prices:o.toAmino(),bridge_executors:n,admin:s,fee_whitelist:i}}}static fromData(e){const{max_validators:r,historical_entries:o,min_gas_prices:n,bridge_executors:s,admin:i,fee_whitelist:c}=e;return new rs(r,o,l.fromData(n),s,i,c)}toData(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:i}=this;return{"@type":"/opinit.opchild.v1.Params",max_validators:e,historical_entries:r,min_gas_prices:o.toData(),bridge_executors:n,admin:s,fee_whitelist:i}}static fromProto(e){return new rs(e.maxValidators,e.historicalEntries,l.fromProto(e.minGasPrices),e.bridgeExecutors,e.admin,e.feeWhitelist)}toProto(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:i}=this;return Nc.Params.fromPartial({maxValidators:e,historicalEntries:r,minGasPrices:o.toProto(),bridgeExecutors:n,admin:s,feeWhitelist:i})}}class Dn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Dn(e,rs.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 Dn(e,rs.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 Dn(t.authority,rs.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return st.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/opinit.opchild.v1.MsgUpdateParams",value:st.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Dn.fromProto(st.MsgUpdateParams.decode(t.value))}}class Aa extends u{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:n}=t;return new Aa(e,r,_t.fromAmino(o),parseInt(n))}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.toFixed()}}static fromData(t){const{moniker:e,operator_address:r,consensus_pubkey:o,cons_power:n}=t;return new Aa(e,r,_t.fromData(o),parseInt(n))}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.toFixed()}}static fromProto(t){return new Aa(t.moniker,t.operatorAddress,_t.unpackAny(t.consensusPubkey),Number(t.consPower))}toProto(){const{moniker:t,operator_address:e,consensus_pubkey:r,cons_power:o}=this;return Nc.Validator.fromPartial({moniker:t,operatorAddress:e,consensusPubkey:r.packAny(),consPower:BigInt(o)})}}class os extends u{constructor(t,e,r,o,n){super(),this.reward_denom=t,this.dilution_period=e,this.release_rate=r,this.dilution_rate=o,this.release_enabled=n}static fromAmino(t){const{value:{reward_denom:e,dilution_period:r,release_rate:o,dilution_rate:n,release_enabled:s}}=t;return new os(e,q.fromAmino(r),o,n,s)}toAmino(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:n}=this;return{type:"reward/Params",value:{reward_denom:t,dilution_period:e.toAmino(),release_rate:r,dilution_rate:o,release_enabled:n}}}static fromData(t){const{reward_denom:e,dilution_period:r,release_rate:o,dilution_rate:n,release_enabled:s}=t;return new os(e,q.fromData(r),o,n,s)}toData(){const{reward_denom:t,dilution_period:e,release_rate:r,dilution_rate:o,release_enabled:n}=this;return{"@type":"/initia.reward.v1.Params",reward_denom:t,dilution_period:e.toData(),release_rate:r,dilution_rate:o,release_enabled:n}}static fromProto(t){return new os(t.rewardDenom,q.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:n}=this;return dd.Params.fromPartial({rewardDenom:t,dilutionPeriod:e.toProto(),releaseRate:r,dilutionRate:o,releaseEnabled:n})}}class kn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new kn(e,os.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 kn(e,os.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 kn(t.authority,os.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return bc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.reward.v1.MsgUpdateParams",value:bc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return kn.fromProto(bc.MsgUpdateParams.decode(t.value))}}class xn extends u{constructor(t){super(),this.address=t}static fromAmino(t){const{value:{address:e}}=t;return new xn(e)}toAmino(){const{address:t}=this;return{type:"cosmos-sdk/MsgUnjail",value:{address:t}}}static fromData(t){const{address:e}=t;return new xn(e)}toData(){const{address:t}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:t}}static fromProto(t){return new xn(t.validatorAddr)}toProto(){const{address:t}=this;return Ga.MsgUnjail.fromPartial({validatorAddr:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:Ga.MsgUnjail.encode(this.toProto()).finish()})}static unpackAny(t){return xn.fromProto(Ga.MsgUnjail.decode(t.value))}}class ns extends u{constructor(t,e,r,o,n){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=n}static fromAmino(t){const{value:{signed_blocks_window:e,min_signed_per_window:r,downtime_jail_duration:o,slash_fraction_double_sign:n,slash_fraction_downtime:s}}=t;return new ns(parseInt(e),r,q.fromAmino(o),n,s)}toAmino(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:n}=this;return{type:"cosmos-sdk/x/slashing/Params",value:{signed_blocks_window:t.toFixed(),min_signed_per_window:e,downtime_jail_duration:r.toAmino(),slash_fraction_double_sign:o,slash_fraction_downtime:n}}}static fromData(t){const{signed_blocks_window:e,min_signed_per_window:r,downtime_jail_duration:o,slash_fraction_double_sign:n,slash_fraction_downtime:s}=t;return new ns(parseInt(e),r,q.fromData(o),n,s)}toData(){const{signed_blocks_window:t,min_signed_per_window:e,downtime_jail_duration:r,slash_fraction_double_sign:o,slash_fraction_downtime:n}=this;return{"@type":"/cosmos.slashing.v1beta1.Params",signed_blocks_window:t.toFixed(),min_signed_per_window:e,downtime_jail_duration:r.toData(),slash_fraction_double_sign:o,slash_fraction_downtime:n}}static fromProto(t){return new ns(Number(t.signedBlocksWindow),t.minSignedPerWindow.toString(),q.fromProto(t.downtimeJailDuration),t.slashFractionDoubleSign.toString(),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:n}=this;return Bu.Params.fromPartial({signedBlocksWindow:BigInt(t),minSignedPerWindow:Buffer.from(e),downtimeJailDuration:r.toProto(),slashFractionDoubleSign:Buffer.from(o),slashFractionDowntime:Buffer.from(n)})}}class Mn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Mn(e,ns.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 Mn(e,ns.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 Mn(t.authority,ns.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ga.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUpdateParams",value:Ga.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Mn.fromProto(Ga.MsgUpdateParams.decode(t.value))}}class Pa extends u{constructor(t,e,r,o,n,s){super(),this.address=t,this.start_height=e,this.index_offset=r,this.jailed_until=o,this.tombstoned=n,this.missed_blocks_counter=s}static fromAmino(t){const{address:e,start_height:r,index_offset:o,jailed_until:n,tombstoned:s,missed_blocks_counter:i}=t;return new Pa(e,parseInt(r),parseInt(o),new Date(n),s,parseInt(i))}toAmino(){const{address:t,start_height:e,index_offset:r,jailed_until:o,tombstoned:n,missed_blocks_counter:s}=this;return{address:t,start_height:e.toFixed(),index_offset:r.toFixed(),jailed_until:o.toISOString(),tombstoned:n,missed_blocks_counter:s.toFixed()}}static fromData(t){const{address:e,start_height:r,index_offset:o,jailed_until:n,tombstoned:s,missed_blocks_counter:i}=t;return new Pa(e,parseInt(r),parseInt(o),new Date(n),s,parseInt(i))}toData(){const{address:t,start_height:e,index_offset:r,jailed_until:o,tombstoned:n,missed_blocks_counter:s}=this;return{address:t,start_height:e.toFixed(),index_offset:r.toFixed(),jailed_until:o.toISOString(),tombstoned:n,missed_blocks_counter:s.toFixed()}}static fromProto(t){return new Pa(t.address,Number(t.startHeight),Number(t.indexOffset),t.jailedUntil,t.tombstoned,Number(t.missedBlocksCounter))}toProto(){const{address:t,start_height:e,index_offset:r,jailed_until:o,tombstoned:n,missed_blocks_counter:s}=this;return Bu.ValidatorSigningInfo.fromPartial({address:t,startHeight:BigInt(e),indexOffset:BigInt(r),jailedUntil:o,tombstoned:n,missedBlocksCounter:BigInt(s)})}}class Sn extends u{constructor(t,e){super(),this.sender=t,this.subdenom=e}static fromAmino(t){const{value:{sender:e,subdenom:r}}=t;return new Sn(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 Sn(e,r)}toData(){const{sender:t,subdenom:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgCreateDenom",sender:t,subdenom:e}}static fromProto(t){return new Sn(t.sender,t.subdenom)}toProto(){const{sender:t,subdenom:e}=this;return ct.MsgCreateDenom.fromPartial({sender:t,subdenom:e})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgCreateDenom",value:ct.MsgCreateDenom.encode(this.toProto()).finish()})}static unpackAny(t){return Sn.fromProto(ct.MsgCreateDenom.decode(t.value))}}class In extends u{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 In(e,S.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 In(e,S.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 In(t.sender,S.fromProto(t.amount),t.mintToAddress)}toProto(){const{sender:t,amount:e,mint_to_address:r}=this;return ct.MsgMint.fromPartial({sender:t,amount:e.toProto(),mintToAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgMint",value:ct.MsgMint.encode(this.toProto()).finish()})}static unpackAny(t){return In.fromProto(ct.MsgMint.decode(t.value))}}class Bn extends u{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 Bn(e,S.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 Bn(e,S.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 Bn(t.sender,S.fromProto(t.amount),t.burnFromAddress)}toProto(){const{sender:t,amount:e,burn_from_address:r}=this;return ct.MsgBurn.fromPartial({sender:t,amount:e.toProto(),burnFromAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgBurn",value:ct.MsgBurn.encode(this.toProto()).finish()})}static unpackAny(t){return Bn.fromProto(ct.MsgBurn.decode(t.value))}}class Un extends u{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 Un(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 Un(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 Un(t.sender,t.denom,t.newAdmin)}toProto(){const{sender:t,denom:e,new_admin:r}=this;return ct.MsgChangeAdmin.fromPartial({sender:t,denom:e,newAdmin:r})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgChangeAdmin",value:ct.MsgChangeAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return Un.fromProto(ct.MsgChangeAdmin.decode(t.value))}}class Cn extends u{constructor(t,e){super(),this.sender=t,this.metadata=e}static fromAmino(t){const{value:{sender:e,metadata:r}}=t;return new Cn(e,Pe.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 Cn(e,Pe.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 Cn(t.sender,Pe.fromProto(t.metadata))}toProto(){const{sender:t,metadata:e}=this;return ct.MsgSetDenomMetadata.fromPartial({sender:t,metadata:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata",value:ct.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Cn.fromProto(ct.MsgSetDenomMetadata.decode(t.value))}}class En extends u{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 En(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 En(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 En(t.sender,t.denom,t.cosmwasmAddress)}toProto(){const{sender:t,denom:e,cosmwasm_address:r}=this;return ct.MsgSetBeforeSendHook.fromPartial({sender:t,denom:e,cosmwasmAddress:r})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook",value:ct.MsgSetBeforeSendHook.encode(this.toProto()).finish()})}static unpackAny(t){return En.fromProto(ct.MsgSetBeforeSendHook.decode(t.value))}}class On extends u{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:n}}=t;return new On(e,S.fromAmino(r),o,n)}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:n}=t;return new On(e,S.fromData(r),o,n)}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 On(t.sender,S.fromProto(t.amount),t.transferFromAddress,t.transferToAddress)}toProto(){const{sender:t,amount:e,transfer_from_address:r,transfer_to_address:o}=this;return ct.MsgForceTransfer.fromPartial({sender:t,amount:e.toProto(),transferFromAddress:r,transferToAddress:o})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgForceTransfer",value:ct.MsgForceTransfer.encode(this.toProto()).finish()})}static unpackAny(t){return On.fromProto(ct.MsgForceTransfer.decode(t.value))}}class ss extends u{constructor(e,r){super();_(this,"denom_creation_fee");this.denom_creation_gas_consume=r,this.denom_creation_fee=new l(e)}static fromAmino(e){const{denom_creation_fee:r,denom_creation_gas_consume:o}=e;return new ss(l.fromAmino(r),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.toFixed()}}static fromData(e){const{denom_creation_fee:r,denom_creation_gas_consume:o}=e;return new ss(l.fromData(r),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.toFixed()}}static fromProto(e){return new ss(l.fromProto(e.denomCreationFee),Number(e.denomCreationGasConsume))}toProto(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return ld.Params.fromPartial({denomCreationFee:e.toProto(),denomCreationGasConsume:BigInt(r)})}}class Nn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Nn(e,ss.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 Nn(e,ss.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 Nn(t.authority,ss.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return ct.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/miniwasm.tokenfactory.v1.MsgUpdateParams",value:ct.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Nn.fromProto(ct.MsgUpdateParams.decode(t.value))}}exports.Msg=void 0;(a=>{function t(o){switch(o.type){case"block-sdk/x/auction/MsgAuctionBid":return ze.fromAmino(o);case"block-sdk/x/auction/MsgUpdateParams":return Ve.fromAmino(o);case"cosmos-sdk/x/auth/MsgUpdateParams":return Ke.fromAmino(o);case"cosmos-sdk/MsgGrant":return br.fromAmino(o);case"cosmos-sdk/MsgRevoke":return Dr.fromAmino(o);case"cosmos-sdk/MsgExec":return kr.fromAmino(o);case"cosmos-sdk/MsgSend":return xr.fromAmino(o);case"cosmos-sdk/MsgMultiSend":return bt.fromAmino(o);case"cosmos-sdk/x/bank/MsgUpdateParams":return Mr.fromAmino(o);case"cosmos-sdk/MsgSetSendEnabled":return Sr.fromAmino(o);case"bank/MsgSetDenomMetadata":return Ir.fromAmino(o);case"cosmos-sdk/MsgVerifyInvariant":return Ur.fromAmino(o);case"cosmos-sdk/x/crisis/MsgUpdateParams":return Cr.fromAmino(o);case"cosmos-sdk/x/consensus/MsgUpdateParams":return Br.fromAmino(o);case"cosmos-sdk/MsgModifyWithdrawAddress":return Er.fromAmino(o);case"cosmos-sdk/MsgWithdrawDelegationReward":return Or.fromAmino(o);case"cosmos-sdk/MsgWithdrawValidatorCommission":return Nr.fromAmino(o);case"cosmos-sdk/MsgFundCommunityPool":return Tr.fromAmino(o);case"distribution/MsgUpdateParams":return Fr.fromAmino(o);case"cosmos-sdk/distr/MsgCommunityPoolSpend":return Rr.fromAmino(o);case"distr/MsgDepositValidatorRewardsPool":return qr.fromAmino(o);case"cosmos-sdk/MsgSubmitEvidence":return Lr.fromAmino(o);case"evm/MsgCreate":return Hr.fromAmino(o);case"evm/MsgCreate2":return zr.fromAmino(o);case"evm/MsgCall":return Vr.fromAmino(o);case"evm/MsgUpdateParams":return Kr.fromAmino(o);case"cosmos-sdk/MsgGrantAllowance":return Wr.fromAmino(o);case"cosmos-sdk/MsgRevokeAllowance":return jr.fromAmino(o);case"noble/forwarding/RegisterAccount":return Jr.fromAmino(o);case"noble/forwarding/ClearAccount":return Zr.fromAmino(o);case"cosmos-sdk/v1/MsgCancelProposal":return Yr.fromAmino(o);case"cosmos-sdk/MsgDeposit":return Xr.fromAmino(o);case"cosmos-sdk/v1/MsgDeposit":return Qr.fromAmino(o);case"cosmos-sdk/MsgSubmitProposal":return oo.fromAmino(o);case"cosmos-sdk/v1/MsgSubmitProposal":return no.fromAmino(o);case"cosmos-sdk/MsgVote":return le.fromAmino(o);case"cosmos-sdk/v1/MsgVote":return pe.fromAmino(o);case"cosmos-sdk/MsgVoteWeighted":return so.fromAmino(o);case"cosmos-sdk/v1/MsgVoteWeighted":return ao.fromAmino(o);case"gov/MsgUpdateParams":return io.fromAmino(o);case"cosmos-sdk/MsgCreateGroup":return co.fromAmino(o);case"cosmos-sdk/MsgCreateGroupPolicy":return lo.fromAmino(o);case"cosmos-sdk/MsgCreateGroupWithPolicy":return po.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupAdmin":return go.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupDecisionPolicy":return yo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMembers":return _o.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMetadata":return vo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyAdmin":return wo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyMetadata":return Ao.fromAmino(o);case"cosmos-sdk/group/MsgExec":return ho.fromAmino(o);case"cosmos-sdk/group/MsgLeaveGroup":return fo.fromAmino(o);case"cosmos-sdk/group/MsgSubmitProposal":return fe.fromAmino(o);case"cosmos-sdk/group/MsgVote":return he.fromAmino(o);case"ibchooks/MsgUpdateACL":return bo.fromAmino(o);case"ibchooks/MsgUpdateParams":return Do.fromAmino(o);case"nft-transfer/MsgTransfer":return ko.fromAmino(o);case"nft-transfer/MsgUpdateParams":return xo.fromAmino(o);case"ibc-perm/MsgUpdateAdmin":return Mo.fromAmino(o);case"ibc-perm/MsgUpdatePermissionedRelayers":return So.fromAmino(o);case"cosmos-sdk/MsgTransfer":return Pr.fromAmino(o);case"intertx/MsgRegisterAccount":return Uo.fromAmino(o);case"intertx/MsgSubmitTx":return Co.fromAmino(o);case"connect/x/marketmap/MsgCreateMarkets":return No.fromAmino(o);case"connect/x/marketmap/MsgUpdateMarkets":return To.fromAmino(o);case"connect/x/marketmap/MsgUpsertMarkets":return Fo.fromAmino(o);case"connect/x/marketmap/MsgRemoveMarketAuthorities":return Ro.fromAmino(o);case"connect/x/marketmap/MsgParams":return qo.fromAmino(o);case"move/MsgPublish":return ge.fromAmino(o);case"move/MsgExecute":return $o.fromAmino(o);case"move/MsgExecuteJSON":return Lo.fromAmino(o);case"move/MsgScript":return Ho.fromAmino(o);case"move/MsgScriptJSON":return zo.fromAmino(o);case"move/MsgUpdateParams":return Vo.fromAmino(o);case"move/MsgWhitelist":return Ko.fromAmino(o);case"move/MsgDelist":return Go.fromAmino(o);case"move/MsgGovExecute":return Wo.fromAmino(o);case"move/MsgGovExecuteJSON":return jo.fromAmino(o);case"move/MsgGovPublish":return ye.fromAmino(o);case"move/MsgGovScript":return Jo.fromAmino(o);case"move/MsgGovScriptJSON":return Zo.fromAmino(o);case"mstaking/MsgDelegate":return Yo.fromAmino(o);case"mstaking/MsgUndelegate":return Xo.fromAmino(o);case"mstaking/MsgBeginRedelegate":return Qo.fromAmino(o);case"mstaking/MsgCreateValidator":return tn.fromAmino(o);case"mstaking/MsgEditValidator":return _e.fromAmino(o);case"mstaking/MsgCancelUnbondingDelegation":return en.fromAmino(o);case"mstaking/MsgUpdateParams":return rn.fromAmino(o);case"opchild/MsgAddValidator":return on.fromAmino(o);case"opchild/MsgRemoveValidator":return nn.fromAmino(o);case"opchild/MsgFinalizeTokenDeposit":return sn.fromAmino(o);case"opchild/MsgInitiateTokenWithdrawal":return an.fromAmino(o);case"opchild/MsgExecuteMessages":return cn.fromAmino(o);case"opchild/MsgSpendFeePool":return un.fromAmino(o);case"opchild/MsgSetBridgeInfo":return Pn.fromAmino(o);case"opchild/MsgUpdateOracle":return bn.fromAmino(o);case"opchild/MsgUpdateParams":return Dn.fromAmino(o);case"ophost/MsgRecordBatch":return mn.fromAmino(o);case"ophost/MsgCreateBridge":return dn.fromAmino(o);case"ophost/MsgProposeOutput":return ln.fromAmino(o);case"ophost/MsgDeleteOutput":return pn.fromAmino(o);case"ophost/MsgInitiateTokenDeposit":return hn.fromAmino(o);case"ophost/MsgFinalizeTokenWithdrawal":return fn.fromAmino(o);case"ophost/MsgUpdateProposer":return gn.fromAmino(o);case"ophost/MsgUpdateChallenger":return yn.fromAmino(o);case"ophost/MsgUpdateBatchInfo":return _n.fromAmino(o);case"ophost/MsgUpdateOracleConfig":return vn.fromAmino(o);case"ophost/MsgUpdateMetadata":return wn.fromAmino(o);case"ophost/MsgUpdateParams":return An.fromAmino(o);case"connect/x/oracle/MsgAddCurrencyPairs":return Eo.fromAmino(o);case"connect/x/oracle/MsgRemoveCurrencyPairs":return Oo.fromAmino(o);case"reward/MsgUpdateParams":return kn.fromAmino(o);case"cosmos-sdk/MsgUnjail":return xn.fromAmino(o);case"cosmos-sdk/x/slashing/MsgUpdateParams":return Mn.fromAmino(o);case"tokenfactory/MsgCreateDenom":return Sn.fromAmino(o);case"tokenfactory/MsgMint":return In.fromAmino(o);case"tokenfactory/MsgBurn":return Bn.fromAmino(o);case"tokenfactory/MsgChangeAdmin":return Un.fromAmino(o);case"tokenfactory/MsgSetDenomMetadata":return Cn.fromAmino(o);case"tokenfactory/MsgSetBeforeSendHook":return En.fromAmino(o);case"tokenfactory/MsgForceTransfer":return On.fromAmino(o);case"tokenfactory/MsgUpdateParams":return Nn.fromAmino(o);case"cosmos-sdk/MsgSoftwareUpgrade":return Io.fromAmino(o);case"cosmos-sdk/MsgCancelUpgrade":return Bo.fromAmino(o);case"wasm/MsgStoreCode":return sr.fromAmino(o);case"wasm/MsgInstantiateContract":return ar.fromAmino(o);case"wasm/MsgInstantiateContract2":return ir.fromAmino(o);case"wasm/MsgExecuteContract":return cr.fromAmino(o);case"wasm/MsgMigrateContract":return ur.fromAmino(o);case"wasm/MsgUpdateAdmin":return mr.fromAmino(o);case"wasm/MsgClearAdmin":return dr.fromAmino(o);case"wasm/MsgUpdateInstantiateConfig":return lr.fromAmino(o);case"wasm/MsgUpdateParams":return pr.fromAmino(o);case"wasm/MsgSudoContract":return hr.fromAmino(o);case"wasm/MsgPinCodes":return fr.fromAmino(o);case"wasm/MsgUnpinCodes":return gr.fromAmino(o);case"wasm/MsgStoreAndInstantiateContract":return yr.fromAmino(o);case"wasm/MsgStoreAndMigrateContract":return _r.fromAmino(o);case"wasm/MsgAddCodeUploadParamsAddresses":return vr.fromAmino(o);case"wasm/MsgRemoveCodeUploadParamsAddresses":return wr.fromAmino(o);case"wasm/MsgUpdateContractLabel":return Ar.fromAmino(o)}}a.fromAmino=t;function e(o){switch(o["@type"]){case"/sdk.auction.v1.MsgAuctionBid":return ze.fromData(o);case"/sdk.auction.v1.MsgUpdateParams":return Ve.fromData(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return Ke.fromData(o);case"/cosmos.authz.v1beta1.MsgGrant":return br.fromData(o);case"/cosmos.authz.v1beta1.MsgRevoke":return Dr.fromData(o);case"/cosmos.authz.v1beta1.MsgExec":return kr.fromData(o);case"/cosmos.bank.v1beta1.MsgSend":return xr.fromData(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return bt.fromData(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return Mr.fromData(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Sr.fromData(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Ir.fromData(o);case"/celestia.blob.v1.MsgPayForBlobs":return Gs.fromData(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Br.fromData(o);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return Ur.fromData(o);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return Cr.fromData(o);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return Er.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return Or.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return Nr.fromData(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return Tr.fromData(o);case"/initia.distribution.v1.MsgUpdateParams":return Fr.fromData(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return Rr.fromData(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return qr.fromData(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return Lr.fromData(o);case"/minievm.evm.v1.MsgCreate":return Hr.fromData(o);case"/minievm.evm.v1.MsgCreate2":return zr.fromData(o);case"/minievm.evm.v1.MsgCall":return Vr.fromData(o);case"/minievm.evm.v1.MsgUpdateParams":return Kr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return Wr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return jr.fromData(o);case"/noble.forwarding.v1.MsgRegisterAccount":return Jr.fromData(o);case"/noble.forwarding.v1.MsgClearAccount":return Zr.fromData(o);case"/cosmos.gov.v1.MsgCancelProposal":return Yr.fromData(o);case"/cosmos.gov.v1beta1.MsgDeposit":return Xr.fromData(o);case"/cosmos.gov.v1.MsgDeposit":return Qr.fromData(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return oo.fromData(o);case"/cosmos.gov.v1.MsgSubmitProposal":return no.fromData(o);case"/cosmos.gov.v1beta1.MsgVote":return le.fromData(o);case"/cosmos.gov.v1.MsgVote":return pe.fromData(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return so.fromData(o);case"/cosmos.gov.v1.MsgVoteWeighted":return ao.fromData(o);case"/initia.gov.v1.MsgUpdateParams":return io.fromData(o);case"/cosmos.group.v1.MsgCreateGroup":return co.fromData(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return lo.fromData(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return po.fromData(o);case"/cosmos.group.v1.MsgExec":return ho.fromData(o);case"/cosmos.group.v1.MsgLeaveGroup":return fo.fromData(o);case"/cosmos.group.v1.MsgSubmitProposal":return fe.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return go.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return _o.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return vo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return wo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return yo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return Ao.fromData(o);case"/cosmos.group.v1.MsgVote":return he.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return js.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return Js.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return Ys.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return Zs.fromData(o);case"/initia.ibchooks.v1.MsgUpdateACL":return bo.fromData(o);case"/initia.ibchooks.v1.MsgUpdateParams":return Do.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return ko.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return xo.fromData(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return Mo.fromData(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return So.fromData(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Pr.fromData(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return Vs.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return ta.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return da.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return la.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return pa.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return ha.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return fa.fromData(o);case"/ibc.core.channel.v1.MsgRecvPacket":return ga.fromData(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return ya.fromData(o);case"/ibc.core.channel.v1.MsgTimeout":return _a.fromData(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return va.fromData(o);case"/ibc.core.channel.v1.MsgUpdateParams":return wa.fromData(o);case"/ibc.core.client.v1.MsgCreateClient":return ea.fromData(o);case"/ibc.core.client.v1.MsgUpdateClient":return ra.fromData(o);case"/ibc.core.client.v1.MsgUpgradeClient":return oa.fromData(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return na.fromData(o);case"/ibc.core.client.v1.MsgRecoverClient":return sa.fromData(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return aa.fromData(o);case"/ibc.core.client.v1.MsgUpdateParams":return ia.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Za.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Ya.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Xa.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Qa.fromData(o);case"/ibc.core.connection.v1.MsgUpdateParams":return ti.fromData(o);case"/initia.intertx.v1.MsgRegisterAccount":return Uo.fromData(o);case"/initia.intertx.v1.MsgSubmitTx":return Co.fromData(o);case"/connect.marketmap.v2.MsgCreateMarkets":return No.fromData(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return To.fromData(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return Fo.fromData(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return Ro.fromData(o);case"/connect.marketmap.v2.MsgParams":return qo.fromData(o);case"/initia.move.v1.MsgPublish":return ge.fromData(o);case"/initia.move.v1.MsgExecute":return $o.fromData(o);case"/initia.move.v1.MsgExecuteJSON":return Lo.fromData(o);case"/initia.move.v1.MsgScript":return Ho.fromData(o);case"/initia.move.v1.MsgScriptJSON":return zo.fromData(o);case"/initia.move.v1.MsgUpdateParams":return Vo.fromData(o);case"/initia.move.v1.MsgWhitelist":return Ko.fromData(o);case"/initia.move.v1.MsgDelist":return Go.fromData(o);case"/initia.move.v1.MsgGovExecute":return Wo.fromData(o);case"/initia.move.v1.MsgGovExecuteJSON":return jo.fromData(o);case"/initia.move.v1.MsgGovPublish":return ye.fromData(o);case"/initia.move.v1.MsgGovScript":return Jo.fromData(o);case"/initia.move.v1.MsgGovScriptJSON":return Zo.fromData(o);case"/initia.mstaking.v1.MsgDelegate":return Yo.fromData(o);case"/initia.mstaking.v1.MsgUndelegate":return Xo.fromData(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return Qo.fromData(o);case"/initia.mstaking.v1.MsgCreateValidator":return tn.fromData(o);case"/initia.mstaking.v1.MsgEditValidator":return _e.fromData(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return en.fromData(o);case"/initia.mstaking.v1.MsgUpdateParams":return rn.fromData(o);case"/opinit.opchild.v1.MsgAddValidator":return on.fromData(o);case"/opinit.opchild.v1.MsgRemoveValidator":return nn.fromData(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return sn.fromData(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return an.fromData(o);case"/opinit.opchild.v1.MsgExecuteMessages":return cn.fromData(o);case"/opinit.opchild.v1.MsgSpendFeePool":return un.fromData(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return Pn.fromData(o);case"/opinit.opchild.v1.MsgUpdateOracle":return bn.fromData(o);case"/opinit.opchild.v1.MsgUpdateParams":return Dn.fromData(o);case"/opinit.ophost.v1.MsgRecordBatch":return mn.fromData(o);case"/opinit.ophost.v1.MsgCreateBridge":return dn.fromData(o);case"/opinit.ophost.v1.MsgProposeOutput":return ln.fromData(o);case"/opinit.ophost.v1.MsgDeleteOutput":return pn.fromData(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return hn.fromData(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return fn.fromData(o);case"/opinit.ophost.v1.MsgUpdateProposer":return gn.fromData(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return yn.fromData(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return _n.fromData(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return vn.fromData(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return wn.fromData(o);case"/opinit.ophost.v1.MsgUpdateParams":return An.fromData(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Eo.fromData(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Oo.fromData(o);case"/initia.reward.v1.MsgUpdateParams":return kn.fromData(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return xn.fromData(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Mn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Sn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgMint":return In.fromData(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Bn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return Un.fromData(o);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return Cn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return En.fromData(o);case"/miniwasm.tokenfactory.v1.MsgForceTransfer":return On.fromData(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return Nn.fromData(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Io.fromData(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return Bo.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return sr.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return ar.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return ir.fromData(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return cr.fromData(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return ur.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return mr.fromData(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return dr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return lr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return pr.fromData(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return hr.fromData(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return fr.fromData(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return gr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return yr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return _r.fromData(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return vr.fromData(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return wr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return Ar.fromData(o)}}a.fromData=e;function r(o){switch(o.typeUrl){case"/sdk.auction.v1.MsgAuctionBid":return ze.unpackAny(o);case"/sdk.auction.v1.MsgUpdateParams":return Ve.unpackAny(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return Ke.unpackAny(o);case"/cosmos.authz.v1beta1.MsgGrant":return br.unpackAny(o);case"/cosmos.authz.v1beta1.MsgRevoke":return Dr.unpackAny(o);case"/cosmos.authz.v1beta1.MsgExec":return kr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSend":return xr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return bt.unpackAny(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return Mr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Sr.unpackAny(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Ir.unpackAny(o);case"/celestia.blob.v1.MsgPayForBlobs":return Gs.unpackAny(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Br.unpackAny(o);case"/cosmos.crisis.v1beta1.MsgVerifyInvariant":return Ur.unpackAny(o);case"/cosmos.crisis.v1beta1.MsgUpdateParams":return Cr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":return Er.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":return Or.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return Nr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return Tr.unpackAny(o);case"/initia.distribution.v1.MsgUpdateParams":return Fr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return Rr.unpackAny(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return qr.unpackAny(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return Lr.unpackAny(o);case"/minievm.evm.v1.MsgCreate":return Hr.unpackAny(o);case"/minievm.evm.v1.MsgCreate2":return zr.unpackAny(o);case"/minievm.evm.v1.MsgCall":return Vr.unpackAny(o);case"/minievm.evm.v1.MsgUpdateParams":return Kr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return Wr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return jr.unpackAny(o);case"/noble.forwarding.v1.MsgRegisterAccount":return Jr.unpackAny(o);case"/noble.forwarding.v1.MsgClearAccount":return Zr.unpackAny(o);case"/cosmos.gov.v1.MsgCancelProposal":return Yr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgDeposit":return Xr.unpackAny(o);case"/cosmos.gov.v1.MsgDeposit":return Qr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return oo.unpackAny(o);case"/cosmos.gov.v1.MsgSubmitProposal":return no.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVote":return le.unpackAny(o);case"/cosmos.gov.v1.MsgVote":return pe.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return so.unpackAny(o);case"/cosmos.gov.v1.MsgVoteWeighted":return ao.unpackAny(o);case"/initia.gov.v1.MsgUpdateParams":return io.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroup":return co.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return lo.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return po.unpackAny(o);case"/cosmos.group.v1.MsgExec":return ho.unpackAny(o);case"/cosmos.group.v1.MsgLeaveGroup":return fo.unpackAny(o);case"/cosmos.group.v1.MsgSubmitProposal":return fe.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return go.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return _o.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return vo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return wo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return yo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return Ao.unpackAny(o);case"/cosmos.group.v1.MsgVote":return he.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return js.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return Js.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return Ys.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return Zs.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateACL":return bo.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateParams":return Do.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return ko.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return xo.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return Mo.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return So.unpackAny(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Pr.unpackAny(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return Vs.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return ta.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return da.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return la.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return pa.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return ha.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return fa.unpackAny(o);case"/ibc.core.channel.v1.MsgRecvPacket":return ga.unpackAny(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return ya.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeout":return _a.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return va.unpackAny(o);case"/ibc.core.channel.v1.MsgUpdateParams":return wa.unpackAny(o);case"/ibc.core.client.v1.MsgCreateClient":return ea.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateClient":return ra.unpackAny(o);case"/ibc.core.client.v1.MsgUpgradeClient":return oa.unpackAny(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return na.unpackAny(o);case"/ibc.core.client.v1.MsgRecoverClient":return sa.unpackAny(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return aa.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateParams":return ia.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Za.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Ya.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Xa.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Qa.unpackAny(o);case"/ibc.core.connection.v1.MsgUpdateParams":return ti.unpackAny(o);case"/initia.intertx.v1.MsgRegisterAccount":return Uo.unpackAny(o);case"/initia.intertx.v1.MsgSubmitTx":return Co.unpackAny(o);case"/connect.marketmap.v2.MsgCreateMarkets":return No.unpackAny(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return To.unpackAny(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return Fo.unpackAny(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return Ro.unpackAny(o);case"/connect.marketmap.v2.MsgParams":return qo.unpackAny(o);case"/initia.move.v1.MsgPublish":return ge.unpackAny(o);case"/initia.move.v1.MsgExecute":return $o.unpackAny(o);case"/initia.move.v1.MsgExecuteJSON":return Lo.unpackAny(o);case"/initia.move.v1.MsgScript":return Ho.unpackAny(o);case"/initia.move.v1.MsgScriptJSON":return zo.unpackAny(o);case"/initia.move.v1.MsgUpdateParams":return Vo.unpackAny(o);case"/initia.move.v1.MsgWhitelist":return Ko.unpackAny(o);case"/initia.move.v1.MsgDelist":return Go.unpackAny(o);case"/initia.move.v1.MsgGovExecute":return Wo.unpackAny(o);case"/initia.move.v1.MsgGovExecuteJSON":return jo.unpackAny(o);case"/initia.move.v1.MsgGovPublish":return ye.unpackAny(o);case"/initia.move.v1.MsgGovScript":return Jo.unpackAny(o);case"/initia.move.v1.MsgGovScriptJSON":return Zo.unpackAny(o);case"/initia.mstaking.v1.MsgDelegate":return Yo.unpackAny(o);case"/initia.mstaking.v1.MsgUndelegate":return Xo.unpackAny(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return Qo.unpackAny(o);case"/initia.mstaking.v1.MsgCreateValidator":return tn.unpackAny(o);case"/initia.mstaking.v1.MsgEditValidator":return _e.unpackAny(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return en.unpackAny(o);case"/initia.mstaking.v1.MsgUpdateParams":return rn.unpackAny(o);case"/opinit.opchild.v1.MsgAddValidator":return on.unpackAny(o);case"/opinit.opchild.v1.MsgRemoveValidator":return nn.unpackAny(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return sn.unpackAny(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return an.unpackAny(o);case"/opinit.opchild.v1.MsgExecuteMessages":return cn.unpackAny(o);case"/opinit.opchild.v1.MsgSpendFeePool":return un.unpackAny(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return Pn.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateOracle":return bn.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateParams":return Dn.unpackAny(o);case"/opinit.ophost.v1.MsgRecordBatch":return mn.unpackAny(o);case"/opinit.ophost.v1.MsgCreateBridge":return dn.unpackAny(o);case"/opinit.ophost.v1.MsgProposeOutput":return ln.unpackAny(o);case"/opinit.ophost.v1.MsgDeleteOutput":return pn.unpackAny(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return hn.unpackAny(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return fn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateProposer":return gn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return yn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return _n.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return vn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return wn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateParams":return An.unpackAny(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Eo.unpackAny(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Oo.unpackAny(o);case"/initia.reward.v1.MsgUpdateParams":return kn.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return xn.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return Mn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Sn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgMint":return In.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Bn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgChangeAdmin":return Un.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgSetDenomMetadata":return Cn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgSetBeforeSendHook":return En.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgForceTransfer":return On.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return Nn.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Io.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return Bo.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return sr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return ar.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return ir.unpackAny(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return cr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return ur.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return mr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return dr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return lr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return pr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return hr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return fr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return gr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return yr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return _r.unpackAny(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return vr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return wr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return Ar.unpackAny(o);default:throw new Error(`not supported msg ${o.typeUrl}`)}}a.fromProto=r})(exports.Msg||(exports.Msg={}));function ii(a,t,e){try{return et.bech32.decode(t).prefix===a&&t.length==e}catch{return!1}}exports.AccAddress=void 0;(a=>{function t(s){return ii("init",s,43)||ii("init",s,63)}a.validate=t;function e(s){const i=et.bech32.decode(s);return et.bech32.encode("init",i.words)}a.fromValAddress=e;function r(s){const i=et.bech32.decode(s);return"0x"+Buffer.from(et.bech32.fromWords(i.words)).toString("hex")}a.toHex=r;function o(s){const i=s.replace(/^0x0+|^0x|^0+(?!x)/,"");return i.length<=40?et.bech32.encode("init",et.bech32.toWords(Buffer.from(i.padStart(40,"0"),"hex"))):et.bech32.encode("init",et.bech32.toWords(Buffer.from(i.padStart(64,"0"),"hex")))}a.fromHex=o;function n(s){const i=et.bech32.decode(s);return Buffer.from(et.bech32.fromWords(i.words))}a.toBuffer=n})(exports.AccAddress||(exports.AccAddress={}));exports.AccPubKey=void 0;(a=>{function t(r){return ii("initpub",r,46)}a.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initpub",o.words)}a.fromAccAddress=e})(exports.AccPubKey||(exports.AccPubKey={}));exports.ValAddress=void 0;(a=>{function t(r){return ii("initvaloper",r,50)}a.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initvaloper",o.words)}a.fromAccAddress=e})(exports.ValAddress||(exports.ValAddress={}));exports.ValPubKey=void 0;(a=>{function t(r){return ii("initvaloperpub",r,53)}a.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initvaloperpub",o.words)}a.fromValAddress=e})(exports.ValPubKey||(exports.ValPubKey={}));exports.ValConsAddress=void 0;(a=>{function t(e){return ii("initvalcons",e,50)}a.validate=t})(exports.ValConsAddress||(exports.ValConsAddress={}));class Pd{constructor(t){_(this,"bitarray");_(this,"signatures");this.multisig_pubkey=t;const e=t.pubkeys.length;this.bitarray=Hn.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 Pt))throw new Error("non-SimplePublicKey cannot be used to sign multisig");this.appendSignatureFromPubKey(e.data,e.public_key)}}toSignatureDescriptor(){return new lt.Descriptor(new lt.Descriptor.Multi(this.bitarray,this.signatures))}}class Fu extends u{constructor(t,e,r,o,n){super(),this.chain_id=t,this.account_number=e,this.sequence=r,this.auth_info=o,this.tx_body=n}toAmino(){const{chain_id:t,account_number:e,sequence:r,tx_body:{memo:o,messages:n,timeout_height:s},auth_info:{fee:i}}=this;return{chain_id:t,account_number:e.toFixed(),sequence:r.toFixed(),timeout_height:s&&s!==0?s.toFixed():void 0,fee:i.toAmino(),msgs:n.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 Mt.SignDoc.fromPartial({bodyBytes:r.toBytes(),authInfoBytes:o.toBytes(),accountNumber:BigInt(t),chainId:e})}toUnSignedTx(){return new Dt(this.tx_body,this.auth_info,[])}toBytes(){return Mt.SignDoc.encode(this.toProto()).finish()}}class ci{constructor(t,e,r,o,n,s,i,c,d,g,v){this.height=t,this.txhash=e,this.raw_log=r,this.logs=o,this.gas_wanted=n,this.gas_used=s,this.tx=i,this.timestamp=c,this.events=d,this.code=g,this.codespace=v}static fromProto(t){return new ci(Number(t.height),t.txhash,t.rawLog,t.logs.map(e=>ba.fromProto(e)),Number(t.gasWanted),Number(t.gasUsed),Dt.unpackAny(t.tx),t.timestamp,t.events,t.code,t.codespace)}static fromData(t){return new ci(parseInt(t.height),t.txhash,t.raw_log,t.logs.map(e=>ba.fromData(e)),parseInt(t.gas_wanted),parseInt(t.gas_used),Dt.fromData(t.tx),t.timestamp,t.events,t.code,t.codespace)}}exports.EventsByType=void 0;(a=>{function t(e){const r={};return e.forEach(o=>{o.attributes.forEach(n=>{o.type in r||(r[o.type]=new Map),n.key in r[o.type]||r[o.type].set(n.key,[]),r[o.type].get(n.key).push(n.value)})}),r}a.parse=t})(exports.EventsByType||(exports.EventsByType={}));class ba{constructor(t,e,r){_(this,"eventsByType");this.msg_index=t,this.log=e,this.events=r,this.eventsByType=exports.EventsByType.parse(this.events)}static fromData(t){return new ba(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 ba(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 pd.ABCIMessageLog.fromPartial({msgIndex:t,log:e,events:r})}}class Ru extends Q{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 Ne.fromData(r)}async parameters(t={}){return this.c.get("/cosmos/auth/v1beta1/params",t).then(e=>qn.fromData(e.params))}}class qu extends Q{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(n=>[n.grants.map(we.fromData),n.pagination])}async granter(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/granter/${t}`,e).then(r=>[r.grants.map(o=>we.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=>we.fromData(o)),r.pagination])}}class $u extends Q{async balance(t,e={}){return this.c.get(`/cosmos/bank/v1beta1/balances/${t}`,e).then(r=>[l.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=>S.fromData(o.balance))}async total(t={}){return this.c.get("/cosmos/bank/v1beta1/supply",t).then(e=>[l.fromData(e.supply),e.pagination])}async spendableBalances(t,e={}){return this.c.get(`/cosmos/bank/v1beta1/spendable_balances/${t}`,e).then(r=>[l.fromData(r.balances),r.pagination])}async parameters(t={}){return this.c.get("/cosmos/bank/v1beta1/params",t).then(e=>Ln.fromData(e.params))}}class Lu extends Q{async rewards(t,e={}){const r=await this.c.get(`/initia/distribution/v1/delegators/${t}/rewards`,e),o={};for(const n of r.rewards)o[n.validator_address]=n.reward.map(s=>({denom:s.denom,coins:l.fromData(s.dec_coins)}));return{rewards:o,total:r.total.map(n=>({denom:n.denom,coins:l.fromData(n.dec_coins)}))}}async rewardsByValidator(t,e,r={}){return this.c.get(`/initia/distribution/v1/delegators/${t}/rewards/${e}`,r).then(o=>o.rewards.map(n=>({denom:n.denom,coins:l.fromData(n.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:l.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:l.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=>l.fromData(e.pool))}async parameters(t={}){return this.c.get("/initia/distribution/v1/params",t).then(e=>Vn.fromData(e.params))}}class Hu extends Q{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 zu extends Q{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 erc20Wrapper(t={}){return this.c.get("/minievm/evm/v1/contracts/erc20_wrapper",t).then(e=>e.address)}async contractAddrByDenom(t,e={}){return this.c.get("/minievm/evm/v1/contracts/by_denom",{...e,denom:t}).then(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(e=>Kn.fromData(e.params))}}class Vu extends Q{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 Ku extends Q{async denoms(t={}){return this.c.get("/noble/forwarding/v1/denoms",t).then(e=>e.allowed_denoms)}async address(t,e,r,o={}){return this.c.get(`/noble/forwarding/v1/address/${t}/${e}/${r}`,o).then(n=>n.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:S.fromData(r.total_forwarded)}))}}class Gu extends Q{async proposals(t={}){return this.c.get("/initia/gov/v1/proposals",t).then(e=>[e.proposals.map(Te.fromData),e.pagination])}async proposal(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}`,e).then(r=>Te.fromData(r.proposal))}async deposits(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/deposits`,e).then(r=>[r.deposits.map(o=>Wa.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=>ws.fromData(o)),r.pagination])}async tally(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}/tally`,e).then(r=>Gn.fromData(r.tally_result))}async parameters(t={}){return this.c.get("/initia/gov/v1/params",t).then(e=>Wn.fromData(e.params))}async emergencyProposals(t={}){return this.c.get("/initia/gov/v1/emergency_proposals",t).then(e=>[e.proposals.map(r=>Te.fromData(r)),e.pagination])}}class Wu extends Q{async groupInfo(t){return this.c.get(`/cosmos/group/v1/group_info/${t}`).then(e=>Po.fromData(e.info))}async groupPolicyInfo(t){return this.c.get(`/cosmos/group/v1/group_policy_info/${t}`).then(e=>Ps.fromData(e.info))}async groupMembers(t,e={}){return this.c.get(`/cosmos/group/v1/group_members/${t}`,e).then(r=>[r.members.map(ja.fromData),r.pagination])}async groupsByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_admin/${t}`,e).then(r=>[r.groups.map(Po.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(Ps.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(Ps.fromData),r.pagination])}async proposal(t){return this.c.get(`/cosmos/group/v1/proposal/${t}`).then(e=>jn.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(jn.fromData),r.pagination])}async voteByProposalVoter(t,e){return this.c.get(`/cosmos/group/v1/vote_by_proposal_voter/${t}/${e}`).then(r=>Fe.fromData(r.vote))}async votesByProposal(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_proposal/${t}`,e).then(r=>[r.votes.map(Fe.fromData),r.pagination])}async votesByVoter(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_voter/${t}`,e).then(r=>[r.votes.map(Fe.fromData),r.pagination])}async groupsByMember(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_member/${t}`,e).then(r=>[r.groups.map(Po.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(Po.fromData),e.pagination])}}class ju extends Q{async channels(t={}){return this.c.get("/ibc/core/channel/v1/channels",t).then(e=>[e.channels.map(ee.fromData),e.pagination])}async port(t,e,r={}){return this.c.get(`/ibc/core/channel/v1/channels/${t}/ports/${e}`,r).then(o=>({channel:ee.fromData(o.channel),proof:o.proof,proof_height:U.fromData(o.proof_height)}))}async connections(t={}){return this.c.get("/ibc/core/connection/v1/connections",t).then(e=>[e.connections.map(ua.fromData),e.pagination])}async connection(t,e={}){return this.c.get(`/ibc/core/connection/v1/connections/${t}`,e).then(r=>ua.fromData(r.connection))}async connectionChannels(t,e={}){return this.c.get(`/ibc/core/channel/v1/connections/${t}/channels`,e).then(r=>[r.channels.map(ee.fromData),U.fromData(r.height),r.pagination])}async parameters(t={}){return this.c.get("/ibc/core/client/v1/params",t).then(e=>Ds.fromData(e.params))}async clientStates(t={}){return this.c.get("/ibc/core/client/v1/client_states",t).then(e=>[e.client_states.map(Ja.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:U.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(U.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 Ju extends Q{async acls(t={}){return this.c.get("/initia/ibchooks/v1/acls",t).then(e=>[e.acls.map(Xs.fromData),e.pagination])}async acl(t,e={}){return this.c.get(`/initia/ibchooks/v1/acls/${t}`,e).then(r=>Xs.fromData(r.acl))}async parameters(t={}){return this.c.get("/initia/ibchooks/v1/params",t).then(e=>Jn.fromData(e.params))}}class Zu extends Q{async classTrace(t){return this.c.get(`/ibc/apps/nft_transfer/v1/class_traces/${t}`).then(e=>Qs.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(Qs.fromData),e.pagination])}async classHash(t){return await this.c.get(`/ibc/apps/nft_transfer/v1/class_hashes/${t}`).then(e=>e.hash)}async escrowAddress(t,e,r={}){return this.c.get(`/ibc/apps/nft_transfer/v1/channels/${t}/ports/${e}/escrow_address`,r).then(o=>o.escrow_address)}async parameters(t={}){return this.c.get("/ibc/apps/nft_transfer/v1/params",t).then(e=>Zn.fromData(e.params))}}class Yu extends Q{async denomTrace(t){return this.c.get(`/ibc/apps/transfer/v1/denom_traces/${t}`).then(e=>Ks.fromData(e.denom_trace))}async denomTraces(t={}){return this.c.get("/ibc/apps/transfer/v1/denom_traces",t).then(e=>[e.denom_traces.map(Ks.fromData),e.pagination])}async denomHash(t){return await this.c.get(`/ibc/apps/transfer/v1/denom_hashes/${t}`).then(e=>e.hash)}async parameters(t={}){return this.c.get("/ibc/apps/transfer/v1/params",t).then(e=>ls.fromData(e.params))}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 Xu extends Q{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 Qu extends Q{async interchainAccount(t,e){return this.c.get(`/inter-tx/interchain_account/owner/${t}/connection/${e}`).then(r=>r.interchain_account_address)}}class tm extends Q{async marketMap(t={}){return this.c.get("/connect/marketmap/v2/marketmap",t).then(e=>{const r={};for(const[o,n]of Object.entries(e.market_map.markets))r[o]=kt.fromData(n);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=>kt.fromData(r.market))}async lastUpdated(t={}){return this.c.get("/connect/marketmap/v2/last_updated",t).then(e=>parseInt(e.last_updated))}async parameters(t={}){return this.c.get("/connect/marketmap/v2/params",t).then(e=>Yn.fromData(e.params))}}class em extends Q{async modules(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules`,e).then(r=>[r.modules.map(Qn.fromData),r.pagination])}async module(t,e,r={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules/${e}`,r).then(o=>Qn.fromData(o.module))}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(o=>JSON.parse(o.resource.move_resource))}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)}async viewFunction(t,e,r,o=[],n=[]){return this.c.post(`/initia/move/v1/accounts/${t}/modules/${e}/view_functions/${r}`,{type_args:o,args:n}).then(s=>JSON.parse(s.data))}async view(t,e,r,o=[],n=[]){return this.c.post("/initia/move/v1/view",{address:t,module_name:e,function_name:r,type_args:o,args:n})}async viewBatch(t){return this.c.post("/initia/move/v1/view/batch",{requests:t}).then(e=>e.responses)}async viewJSON(t,e,r,o=[],n=[]){return this.c.post("/initia/move/v1/view/json",{address:t,module_name:e,function_name:r,type_args:o,args:n})}async viewBatchJSON(t){return this.c.post("/initia/move/v1/view/json/batch",{requests:t}).then(e=>e.responses)}async scriptABI(t){return this.c.post("/initia/move/v1/script/abi",{code_bytes:t})}async denom(t,e={}){return this.c.get("/initia/move/v1/denom",{...e,metadata:t}).then(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(e=>Xn.fromData(e.params))}}class rm extends Q{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(o=>[[Bs.fromData(o.delegation_response)],{total:1,next_key:""}]);if(t!==void 0)return this.c.get(`/initia/mstaking/v1/delegations/${t}`,r).then(o=>[o.delegation_responses.map(Bs.fromData),o.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations`,r).then(o=>[o.delegation_responses.map(Bs.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(o=>[[Ht.fromData(o.unbond)],{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(Ht.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(Ht.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={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/redelegations`,{...o,src_validator_addr:e,dst_validator_addr:r}).then(n=>[n.redelegation_responses.map(ce.fromData),n.pagination])}async bondedValidators(t,e={}){return this.c.get(`/initia/mstaking/v1/delegators/${t}/validators`,e).then(r=>[r.validators.map(dt.fromData),r.pagination])}async validators(t={}){return this.c.get("/initia/mstaking/v1/validators",t).then(e=>[e.validators.map(dt.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/initia/mstaking/v1/validators/${t}`,e).then(r=>dt.fromData(r.validator))}async pool(t={}){return this.c.get("/initia/mstaking/v1/pool",t).then(e=>({bonded_tokens:l.fromData(e.pool.bonded_tokens),not_bonded_tokens:l.fromData(e.pool.not_bonded_tokens)}))}async parameters(t={}){return this.c.get("/initia/mstaking/v1/params",t).then(e=>ts.fromData(e.params))}}class om extends Q{async validators(t={}){return this.c.get("/opinit/opchild/v1/validators",t).then(e=>[e.validators.map(Aa.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/opinit/opchild/v1/validator/${t}`,e).then(r=>Aa.fromData(r.validator))}async bridgeInfo(t={}){return this.c.get("/opinit/opchild/v1/bridge_info",t).then(e=>Ie.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=>rs.fromData(e.params))}}class nm extends Q{async bridgeInfos(t={}){return this.c.get("/opinit/ophost/v1/bridges",t).then(e=>[e.bridges.map(Ie.fromData),e.pagination])}async bridgeInfo(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}`,e).then(r=>Ie.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:parseInt(r.output_index),output_proposal:Se.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:parseInt(o.bridge_id??`${t}`),output_index:parseInt(o.output_index),output_proposal:Se.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:parseInt(o.bridge_id??`${t}`),output_index:parseInt(o.output_index),output_proposal:Se.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=>ri.fromData(o)),r.pagination])}async parameters(t={}){return this.c.get("/opinit/ophost/v1/params",t).then(e=>es.fromData(e.params))}}class sm extends Q{async currencyPairs(t={}){return this.c.get("/connect/oracle/v2/get_all_tickers",t).then(e=>e.currency_pairs.map(Et.fromData))}async price(t,e={}){return this.c.get("/connect/oracle/v2/get_price",{...e,currency_pair:t.toString()}).then(r=>ei.fromData(r.price))}}class am extends Q{async last_dilution_timestamp(t={}){return this.c.get("/initia/reward/v1/last_dilution_timestamp",t).then(e=>e.last_dilution_timestamp)}async annualProvisions(t={}){return this.c.get("/initia/reward/v1/annual_provisions",t).then(e=>e.annual_provisions)}async parameters(t={}){return this.c.get("/initia/reward/v1/params",t).then(e=>os.fromData(e.params))}}class im extends Q{async signingInfos(t={}){return this.c.get("/cosmos/slashing/v1beta1/signing_infos",t).then(e=>[e.info.map(Pa.fromData),e.pagination])}async signingInfo(t,e={}){return this.c.get(`/cosmos/slashing/v1beta1/signing_infos/${t}`,e).then(r=>Pa.fromData(r.val_signing_info))}async parameters(t={}){return this.c.get("/cosmos/slashing/v1beta1/params",t).then(e=>ns.fromData(e.params))}}class cm extends Q{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 um extends Q{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(e=>ss.fromData(e.params))}}const lu=a=>Ce.bcs.bytes(32,a).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")}`}),bd={address:lu,object:lu,fixed_point32:a=>Ce.bcs.u64(a).transform({input:t=>F(t).times(new At.BigNumber("4294967296")).toFixed(0,At.BigNumber.ROUND_DOWN),output:t=>F(t).div(new At.BigNumber("4294967296")).toNumber()}),fixed_point64:a=>Ce.bcs.u128(a).transform({input:t=>F(t).times(new At.BigNumber("18446744073709551616")).toFixed(0,At.BigNumber.ROUND_DOWN),output:t=>F(t).div(new At.BigNumber("18446744073709551616")).toNumber()}),decimal128:a=>Ce.bcs.u128(a).transform({input:t=>F(t).times(new At.BigNumber("1000000000000000000")).toFixed(0,At.BigNumber.ROUND_DOWN),output:t=>F(t).div(new At.BigNumber("1000000000000000000")).toNumber()}),decimal256:a=>Ce.bcs.u256(a).transform({input:t=>F(t).times(new At.BigNumber("1000000000000000000")).toFixed(0,At.BigNumber.ROUND_DOWN),output:t=>F(t).div(new At.BigNumber("1000000000000000000")).toNumber()}),biguint:a=>Ce.bcs.vector(Ce.bcs.u8(a)).transform({input:t=>Ic(BigInt(t)),output:t=>Bc(t)}),bigdecimal:a=>Ce.bcs.vector(Ce.bcs.u8(a)).transform({input:t=>{const r=F(t).times(new At.BigNumber("1000000000000000000")).toFixed(0,At.BigNumber.ROUND_DOWN);return Ic(BigInt(r))},output:t=>{const e=Bc(t).toString();return F(e).div(new At.BigNumber("1000000000000000000")).toNumber()}})},Dd={...Ce.bcs,...bd};function Ic(a){const t=[];for(;a>0;)t.push(Number(a%BigInt(256))),a=a/BigInt(256);return new Uint8Array(t)}function Bc(a){let t=0n;for(;a.length>0;)t=t*256n+BigInt(a.pop());return t}function kd(a){return a.code!==void 0&&a.code!==0&&a.code!=="0"}class ec{constructor(t,e){this.gas_info=t,this.result=e}static fromData(t){return new ec({gas_wanted:parseInt(t.gas_info.gas_wanted),gas_used:parseInt(t.gas_info.gas_used)},t.result)}}class oi extends Q{constructor(t){super(t.apiRequester),this.rest=t}async txInfo(t,e={}){return this.c.getRaw(`/cosmos/tx/v1beta1/txs/${t}`,e).then(r=>ci.fromData(r.tx_response))}async create(t,e){let{fee:r}=e;const{msgs:o,memo:n,timeoutHeight:s}=e,i=[];for(const c of t){let d=c.sequenceNumber,g=c.publicKey;if(d===void 0||!g){const v=await this.rest.auth.accountInfo(c.address);d===void 0&&(d=v.getSequenceNumber()),g||(g=v.getPublicKey())}i.push({sequenceNumber:d,publicKey:g})}return r===void 0&&(r=await this.rest.tx.estimateFee(i,e)),new Dt(new zn(o,n??"",s??0),new De([],r),[])}async txInfosByHeight(t){const e=await this.rest.tendermint.blockInfo(t),{txs:r}=e.block.data;if(r){const o=r.map(s=>Wi(s)),n=[];for(const s of o)n.push(await this.txInfo(s));return n}else return[]}async estimateFee(t,e){const r=e.gasPrices??this.rest.config.gasPrices,o=e.gasAdjustment??this.rest.config.gasAdjustment,n=e.feeDenoms??["uinit"];let s=e.gas,i;if(r&&(i=new l(r),n)){const b=i.filter(k=>n.includes(k.denom));b.toArray().length>0&&(i=b)}const c=new zn(e.msgs,e.memo??""),d=new De([],new be(0,new l)),g=new Dt(c,d,[]);g.appendEmptySignatures(t),(!s||s==="auto"||s==="0")&&(s=await this.estimateGas(g,{gasAdjustment:o}));const v=i?i.mul(s).toIntCeilCoins():"0uinit";return new be(parseInt(s),v,"","")}async estimateGas(t,e){const r=(e==null?void 0:e.gasAdjustment)??this.rest.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 s=new De([],new be(0,new l));o=new Dt(t.body,s,[]),o.appendEmptySignatures(e.signers)}const n=await this.c.post("/cosmos/tx/v1beta1/simulate",{tx_bytes:oi.encode(o)}).then(s=>ec.fromData(s));return F(r??0).multipliedBy(n.gas_info.gas_used).toString()}static encode(t){return Buffer.from(t.toBytes()).toString("base64")}static decode(t){return Dt.fromBuffer(Buffer.from(t,"base64"))}static hash(t){const e=oi.encode(t);return Wi(e)}async _broadcast(t,e){const r=t instanceof Dt?oi.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: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 n;for(let s=0;s<=e/500;s++){try{n=await this.txInfo(o.txhash)}catch{}if(n)break;await new Promise(i=>setTimeout(i,500))}if(!n)throw new Error(`Transaction was not included in a block before timeout of ${e}ms`);return{txhash:n.txhash,raw_log:n.raw_log,gas_wanted:n.gas_wanted,gas_used:n.gas_used,height:+n.height,logs:(n.logs??[]).map(s=>ba.fromData(s)),code:n.code,codespace:n.codespace,timestamp:n.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,n)=>{if(!n.key)return o;const s=n.op??"=",i=n.key==="tx.height"?`${n.value}`:`'${n.value}'`,c=s==="EXISTS"?`${n.key} ${s}`:`${n.key} ${s} ${i}`;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(n=>ci.fromData(n)),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 n=[],s=`${t}::${e}`,i=[{key:"tx.height",value:r.toString(),op:">="},{key:"tx.height",value:o.toString(),op:"<="},{key:"move.type_tag",value:s,op:"CONTAINS"}],c=b=>b.events.filter(k=>{if(k.type!=="move")return!1;const C=k.attributes.find(N=>N.key==="type_tag");return C&&C.value.startsWith(s)}),{txs:d,total:g}=await this.search({query:i}),v=d.flatMap(b=>c(b));if(n.push(...v),g>100){const b=Math.ceil(g/100),k=[...Array(b-1).keys()].map(N=>N+2),C=await Promise.all(k.map(async N=>this.search({query:i,page:N}).then(K=>K.txs.flatMap(Y=>c(Y)))));n.push(...C.flat())}return n}async gasPrices(t={}){return this.c.get("/initia/tx/v1/gas_prices",t).then(e=>l.fromData(e.gas_prices))}async gasPrice(t,e={}){return this.c.get(`/initia/tx/v1/gas_prices/${t}`,e).then(r=>S.fromData(r.gas_price))}}class mm extends Q{async appliedPlan(t,e={}){return this.c.get(`/cosmos/upgrade/v1beta1/applied_plan/${t}`,e).then(r=>parseInt(r.height))}async currentPlan(t={}){return this.c.get("/cosmos/upgrade/v1beta1/current_plan",t).then(e=>e.plan?xe.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:parseInt(r.version)})))}}class dm extends Q{async contractInfo(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}`,e).then(r=>({code_id:parseInt(r.contract_info.code_id),creator:r.contract_info.creator,admin:r.contract_info.admin,label:r.contract_info.label,created:Ls.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:zt.contractCodeHistoryOperationTypeFromJSON(o.operation),code_id:parseInt(o.code_id),updated:Ls.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:parseInt(r.code_id),creator:r.creator,data_hash:r.data_hash,instantiate_permission:at.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:parseInt(r.code_info.code_id),creator:r.code_info.creator,data_hash:r.code_info.data_hash,instantiate_permission:at.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=>parseInt(r)),e.pagination])}async parameters(t={}){return this.c.get("/cosmwasm/wasm/v1/codes/params",t).then(e=>$n.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 lm{constructor(t,e){_(this,"accAddress");_(this,"lcd");this.rest=t,this.key=e,this.accAddress=e.accAddress,this.lcd=t}setAccountAddress(t){this.accAddress=t}async accountNumberAndSequence(){return this.rest.auth.accountInfo(this.accAddress).then(t=>({account_number:t.getAccountNumber(),sequence:t.getSequenceNumber()}))}async accountNumber(){return this.rest.auth.accountInfo(this.accAddress).then(t=>t.getAccountNumber())}async sequence(){return this.rest.auth.accountInfo(this.accAddress).then(t=>t.getSequenceNumber())}async createTx(t){return this.rest.tx.create([{address:this.accAddress,sequenceNumber:t.sequence,publicKey:this.key.publicKey}],t)}async createAndSignTx(t){this.rest.config.chainId||(this.rest.config.chainId=await this.rest.tendermint.chainId());let e=t.accountNumber,r=t.sequence;if(e===void 0||r===void 0){const n=await this.accountNumberAndSequence();e===void 0&&(e=n.account_number),r===void 0&&(r=n.sequence)}t.sequence=r,t.accountNumber=e;const o=await this.createTx(t);return this.key.signTx(o,{accountNumber:e,sequence:r,chainId:this.rest.config.chainId,signMode:t.signMode??Ot.SignMode.SIGN_MODE_DIRECT})}}const xd={gasAdjustment:"1.75"},pu={default:{uinit:.15}};class pm{constructor(t,e,r){_(this,"URL");_(this,"config");_(this,"apiRequester");_(this,"auction");_(this,"auth");_(this,"authz");_(this,"bank");_(this,"distribution");_(this,"evidence");_(this,"evm");_(this,"feeGrant");_(this,"forwarding");_(this,"gov");_(this,"group");_(this,"ibc");_(this,"ibcHooks");_(this,"ibcNft");_(this,"ibcTransfer");_(this,"ibcPerm");_(this,"interTx");_(this,"marketmap");_(this,"move");_(this,"mstaking");_(this,"opchild");_(this,"ophost");_(this,"oracle");_(this,"reward");_(this,"slashing");_(this,"tendermint");_(this,"tokenfactory");_(this,"tx");_(this,"upgrade");_(this,"wasm");this.URL=t,this.config={...xd,gasPrices:((e==null?void 0:e.chainId)&&pu[e.chainId])??pu.default,...e},this.apiRequester=r??new Cu(this.URL),this.auction=new Ou(this.apiRequester),this.auth=new Ru(this.apiRequester),this.authz=new qu(this.apiRequester),this.bank=new $u(this.apiRequester),this.distribution=new Lu(this.apiRequester),this.evidence=new Hu(this.apiRequester),this.evm=new zu(this.apiRequester),this.feeGrant=new Vu(this.apiRequester),this.forwarding=new Ku(this.apiRequester),this.gov=new Gu(this.apiRequester),this.group=new Wu(this.apiRequester),this.ibc=new ju(this.apiRequester),this.ibcHooks=new Ju(this.apiRequester),this.ibcNft=new Zu(this.apiRequester),this.ibcTransfer=new Yu(this.apiRequester),this.ibcPerm=new Xu(this.apiRequester),this.interTx=new Qu(this.apiRequester),this.marketmap=new tm(this.apiRequester),this.move=new em(this.apiRequester),this.mstaking=new rm(this.apiRequester),this.opchild=new om(this.apiRequester),this.ophost=new nm(this.apiRequester),this.oracle=new sm(this.apiRequester),this.reward=new am(this.apiRequester),this.slashing=new im(this.apiRequester),this.tendermint=new cm(this.apiRequester),this.tokenfactory=new um(this.apiRequester),this.tx=new oi(this),this.upgrade=new mm(this.apiRequester),this.wasm=new dm(this.apiRequester)}wallet(t){return new lm(this,t)}}class Md extends pm{}function Sd(a){if(a.__esModule)return a;var t=a.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(a).forEach(function(r){var o=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return a[r]}})}),e}var Tc={exports:{}},ni=typeof Reflect=="object"?Reflect:null,hu=ni&&typeof ni.apply=="function"?ni.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},zi;ni&&typeof ni.ownKeys=="function"?zi=ni.ownKeys:Object.getOwnPropertySymbols?zi=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:zi=function(t){return Object.getOwnPropertyNames(t)};function Id(a){console&&console.warn&&console.warn(a)}var hm=Number.isNaN||function(t){return t!==t};function nt(){nt.init.call(this)}Tc.exports=nt;Tc.exports.once=Ed;nt.EventEmitter=nt;nt.prototype._events=void 0;nt.prototype._eventsCount=0;nt.prototype._maxListeners=void 0;var fu=10;function rc(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(nt,"defaultMaxListeners",{enumerable:!0,get:function(){return fu},set:function(a){if(typeof a!="number"||a<0||hm(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");fu=a}});nt.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};nt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||hm(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 fm(a){return a._maxListeners===void 0?nt.defaultMaxListeners:a._maxListeners}nt.prototype.getMaxListeners=function(){return fm(this)};nt.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var o=t==="error",n=this._events;if(n!==void 0)o=o&&n.error===void 0;else if(!o)return!1;if(o){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var i=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw i.context=s,i}var c=n[t];if(c===void 0)return!1;if(typeof c=="function")hu(c,this,e);else for(var d=c.length,g=wm(c,d),r=0;r<d;++r)hu(g[r],this,e);return!0};function gm(a,t,e,r){var o,n,s;if(rc(e),n=a._events,n===void 0?(n=a._events=Object.create(null),a._eventsCount=0):(n.newListener!==void 0&&(a.emit("newListener",t,e.listener?e.listener:e),n=a._events),s=n[t]),s===void 0)s=n[t]=e,++a._eventsCount;else if(typeof s=="function"?s=n[t]=r?[e,s]:[s,e]:r?s.unshift(e):s.push(e),o=fm(a),o>0&&s.length>o&&!s.warned){s.warned=!0;var i=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");i.name="MaxListenersExceededWarning",i.emitter=a,i.type=t,i.count=s.length,Id(i)}return a}nt.prototype.addListener=function(t,e){return gm(this,t,e,!1)};nt.prototype.on=nt.prototype.addListener;nt.prototype.prependListener=function(t,e){return gm(this,t,e,!0)};function Bd(){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 ym(a,t,e){var r={fired:!1,wrapFn:void 0,target:a,type:t,listener:e},o=Bd.bind(r);return o.listener=e,r.wrapFn=o,o}nt.prototype.once=function(t,e){return rc(e),this.on(t,ym(this,t,e)),this};nt.prototype.prependOnceListener=function(t,e){return rc(e),this.prependListener(t,ym(this,t,e)),this};nt.prototype.removeListener=function(t,e){var r,o,n,s,i;if(rc(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(n=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){i=r[s].listener,n=s;break}if(n<0)return this;n===0?r.shift():Ud(r,n),r.length===1&&(o[t]=r[0]),o.removeListener!==void 0&&this.emit("removeListener",t,i||e)}return this};nt.prototype.off=nt.prototype.removeListener;nt.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 n=Object.keys(r),s;for(o=0;o<n.length;++o)s=n[o],s!=="removeListener"&&this.removeAllListeners(s);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 _m(a,t,e){var r=a._events;if(r===void 0)return[];var o=r[t];return o===void 0?[]:typeof o=="function"?e?[o.listener||o]:[o]:e?Cd(o):wm(o,o.length)}nt.prototype.listeners=function(t){return _m(this,t,!0)};nt.prototype.rawListeners=function(t){return _m(this,t,!1)};nt.listenerCount=function(a,t){return typeof a.listenerCount=="function"?a.listenerCount(t):vm.call(a,t)};nt.prototype.listenerCount=vm;function vm(a){var t=this._events;if(t!==void 0){var e=t[a];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}nt.prototype.eventNames=function(){return this._eventsCount>0?zi(this._events):[]};function wm(a,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=a[r];return e}function Ud(a,t){for(;t+1<a.length;t++)a[t]=a[t+1];a.pop()}function Cd(a){for(var t=new Array(a.length),e=0;e<t.length;++e)t[e]=a[e].listener||a[e];return t}function Ed(a,t){return new Promise(function(e,r){function o(s){a.removeListener(t,n),r(s)}function n(){typeof a.removeListener=="function"&&a.removeListener("error",o),e([].slice.call(arguments))}Am(a,t,n,{once:!0}),t!=="error"&&Od(a,o,{once:!0})})}function Od(a,t,e){typeof a.on=="function"&&Am(a,"error",t,e)}function Am(a,t,e,r){if(typeof a.on=="function")r.once?a.once(t,e):a.on(t,e);else if(typeof a.addEventListener=="function")a.addEventListener(t,function o(n){r.once&&a.removeEventListener(t,o),e(n)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a)}var Nd=Tc.exports;const gu=a=>a.replace(/'/g,"\\'");function Td(a){const t=[];for(const e of Object.keys(a)){let r;const o=a[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 '${gu(o[1])}'`;break;case"EXISTS":r=`${e} EXISTS`;break}else switch(typeof o){case"number":r=`${e}=${o}`;break;case"string":r=`${e}='${gu(o)}'`;break;default:r=`${e}=${o.toISOString()}`}t.push(r)}return t.join(" AND ")}class Fd extends Nd.EventEmitter{constructor(e,r=0,o=1e3){super();_(this,"isConnected");_(this,"reconnectTimeoutId");_(this,"queryParams");_(this,"callback");_(this,"shouldAttemptReconnect");_(this,"socket");_(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 hd(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=Td({"tm.event":e,...r}),this.callback=o}subscribeTx(e,r){const o=n=>(n.value.TxResult.txhash=Wi(n.value.TxResult.tx),r(n));this.subscribe("Tx",e,o)}}const Rd={},qd=Object.freeze(Object.defineProperty({__proto__:null,default:Rd},Symbol.toStringTag,{value:"Module"})),mi=85,Uc=250,$d="CSM",di={GET_VERSION:0,INS_PUBLIC_KEY_SECP256K1:1,SIGN_SECP256K1:2,GET_ADDR_SECP256K1:4},Vi={INIT:0,ADD:1,LAST:2},Fc={ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},Da={NoError:36864},Cc={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 ka(a){return a in Cc?Cc[a]:`Unknown Status Code: ${a}`}function Ld(a){return typeof a=="object"&&a!==null&&!(a instanceof Array)&&!(a instanceof Date)}function Os(a){if(a){if(Ld(a)){if(Object.prototype.hasOwnProperty.call(a,"statusCode"))return{return_code:a.statusCode,error_message:ka(a.statusCode)};if(Object.prototype.hasOwnProperty.call(a,"return_code")&&Object.prototype.hasOwnProperty.call(a,"error_message"))return a}return{return_code:65535,error_message:a.toString()}}return{return_code:65535,error_message:a.toString()}}function Ki(a){if((a==null?void 0:a.length)!==5)throw new TypeError("Invalid path.");const t=Buffer.alloc(20);return t.writeUInt32LE(2147483648+a[0],0),t.writeUInt32LE(2147483648+a[1],4),t.writeUInt32LE(2147483648+a[2],8),t.writeUInt32LE(a[3],12),t.writeUInt32LE(a[4],16),t}async function Hd(a){return a.send(mi,di.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:ka(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(Os)}async function zd(a){return a.send(176,1,0,0).then(t=>{const e=t.slice(-2);let r=e[0]*256+e[1],o,n="err",s="err",i=0,c=0;if(t[0]!==1)o="response format ID not recognized",r=36865;else{o="No errors";const d=t[1];n=t.slice(2,2+d).toString("ascii");let g=2+d;const v=t[g];g+=1,s=t.slice(g,g+v).toString("ascii"),g+=v;const b=t[g];g+=1,i=b,c=t[g]}return{return_code:r,error_message:o,app_name:n,app_version:s,flag_len:i,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(Os)}async function Vd(a){return a.send(224,1,0,0,Buffer.from([]),[Da.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 n=4;const s=t[n];n+=1;const i=t.slice(n,n+s).toString();n+=s;const c=t[n];n+=1;const d=t.slice(n,n+c).toString("hex");n+=c;const g=t[n];n+=1;let v=t.slice(n,n+g);v[g-1]===0&&(v=t.slice(n,n+g-1));const b=v.toString();return{return_code:r,error_message:ka(r),target_id:o,se_version:i,flag:d,mcu_version:b}}).catch(Os)}async function Kd(a,t){return a.send(mi,di.GET_ADDR_SECP256K1,0,0,t,[Da.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],n=e?Buffer.from(e.slice(0,33)):null;return{pk:"OBSOLETE PROPERTY",compressed_pk:n&&n.toJSON(),return_code:o,error_message:ka(o)}}).catch(Os)}async function Gd(a,t){return a.send(mi,di.GET_ADDR_SECP256K1,Fc.ONLY_RETRIEVE,0,t,[Da.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],n=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:n.toJSON(),return_code:o,error_message:ka(o)}}).catch(Os)}async function Wd(a,t){return a.send(mi,di.GET_ADDR_SECP256K1,Fc.SHOW_ADDRESS_IN_DEVICE,0,t,[Da.NoError]).then(e=>{const r=e.slice(-2),o=r[0]*256+r[1],n=Buffer.from(e.slice(0,33));return{bech32_address:Buffer.from(e.slice(33,-2)).toString(),compressed_pk:n.toJSON(),return_code:o,error_message:ka(o)}}).catch(Os)}function jd(a,t){const e=Ki(a),r=[];if(e instanceof Buffer){r.push(e);const o=Buffer.from(t);for(let n=0;n<o.length;n+=Uc){let s=n+Uc;n>o.length&&(s=o.length),r.push(o.slice(n,s))}}return r}async function yu(a,t,e,r){let o=Vi.ADD;return t===1&&(o=Vi.INIT),t===e&&(o=Vi.LAST),a.send(mi,di.SIGN_SECP256K1,o,0,r,[Da.NoError,27012,27264]).then(n=>{const s=n.slice(-2),i=s[0]*256+s[1];let c=ka(i);(i===27264||i===27012)&&(c=`${c} : ${n.slice(0,n.length-2).toString("ascii")}`);let d=Buffer.from([]);return n.length>2&&(d=n.slice(0,n.length-2)),{signature:d.toJSON(),return_code:i,error_message:c}}).catch(Os)}async function Jd(a,t,e){const r=jd(t,e);return yu(a,1,r.length,r[0]).then(async o=>{let n={return_code:o.return_code,error_message:o.error_message,signature:{type:"Buffer",data:[]}};for(let s=1;s<r.length&&(n=await yu(a,1+s,r.length,r[s]),n.return_code===Da.NoError);s+=1);return{return_code:n.return_code,error_message:n.error_message,signature:n.signature}}).catch(Os)}const Zd="Initia",Yd="Cosmos";class xi{constructor(t){_(this,"transport");_(this,"info");_(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 fd().update(r).digest();return et.bech32.encode(t,et.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===Zd&&this.version.major===1||this.info.app_name===Yd&&this.version.major===2)return}return{return_code:25600,error_message:"App Version is not supported"}}async initialize(){return zd(this.transport).then(t=>(this.info=t,Hd(this.transport))).then(t=>(this.version=t,this.validateCompatibility()))}getInfo(){return this.info}getVersion(){return this.version}getDeviceInfo(){return Vd(this.transport)}getPublicKey(t){const e=Ki(t),r=Buffer.concat([xi.serializeHRP("init"),e]);return Kd(this.transport,r)}getAddressAndPubKey(t,e){const r=Ki(t),o=Buffer.concat([xi.serializeHRP(e),r]);return Gd(this.transport,o)}showAddressAndPubKey(t,e){const r=Ki(t),o=Buffer.concat([xi.serializeHRP(e),r]);return Wd(this.transport,o)}sign(t,e){return Jd(this.transport,t,e)}}class Rc{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 et.bech32.encode("initvaloper",et.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 lt(this.publicKey,new lt.Descriptor(new lt.Descriptor.Single(Ot.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 Jt(this.publicKey,t.sequence,new X(new X.Single(Ot.SignMode.SIGN_MODE_DIRECT)))];const r=(await this.sign(Buffer.from(t.toBytes()))).toString("base64");return t.auth_info.signer_infos=e,new lt(this.publicKey,new lt.Descriptor(new lt.Descriptor.Single(Ot.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
2
  `),Buffer.from(e.length.toString()),e]);return new lt(this.publicKey,new lt.Descriptor(new lt.Descriptor.Single(Ot.SignMode.SIGN_MODE_EIP_191,(await this.signWithKeccak256(o)).toString("base64"))),t.sequence)}async signTx(t,e){const r=new Dt(t.body,new De([],t.auth_info.fee),[]),o=new Fu(e.chainId,e.accountNumber,e.sequence,r.auth_info,r.body);let n;if(e.signMode===Ot.SignMode.SIGN_MODE_LEGACY_AMINO_JSON)n=await this.createSignatureAmino(o);else if(e.signMode==Ot.SignMode.SIGN_MODE_DIRECT)n=await this.createSignature(o);else if(e.signMode==Ot.SignMode.SIGN_MODE_EIP_191)n=await this.createSignatureEIP191(o);else throw new Error("not supported sign mode");const s=n.data.single;return r.signatures.push(...t.signatures,s.signature),r.auth_info.signer_infos.push(...t.auth_info.signer_infos,new Jt(n.public_key,n.sequence,new X(new X.Single(s.mode)))),r}}var pt={},Pm={};const Xd=Sd(qd);(function(a){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(a,"__esModule",{value:!0}),a.utils=a.schnorr=a.verify=a.signSync=a.sign=a.getSharedSecret=a.recoverPublicKey=a.getPublicKey=a.Signature=a.Point=a.CURVE=void 0;const t=Xd,e=BigInt(0),r=BigInt(1),o=BigInt(2),n=BigInt(3),s=BigInt(8),i=Object.freeze({a:e,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:r,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});a.CURVE=i;const c=(h,m)=>(h+m/o)/m,d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(h){const{n:m}=i,p=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),y=-r*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),w=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),A=p,D=BigInt("0x100000000000000000000000000000000"),M=c(A*h,m),T=c(-y*h,m);let B=x(h-M*p-T*w,m),$=x(-M*y-T*A,m);const G=B>D,W=$>D;if(G&&(B=m-B),W&&($=m-$),B>D||$>D)throw new Error("splitScalarEndo: Endomorphism failed, k="+h);return{k1neg:G,k1:B,k2neg:W,k2:$}}},g=32,v=32,b=32,k=g+1,C=2*g+1;function N(h){const{a:m,b:p}=i,y=x(h*h),w=x(y*h);return x(w+m*h+p)}const K=i.a===e;class Y extends Error{constructor(m){super(m)}}function tt(h){if(!(h instanceof I))throw new TypeError("JacobianPoint expected")}class I{constructor(m,p,y){this.x=m,this.y=p,this.z=y}static fromAffine(m){if(!(m instanceof L))throw new TypeError("JacobianPoint#fromAffine: expected Point");return m.equals(L.ZERO)?I.ZERO:new I(m.x,m.y,r)}static toAffineBatch(m){const p=Fm(m.map(y=>y.z));return m.map((y,w)=>y.toAffine(p[w]))}static normalizeZ(m){return I.toAffineBatch(m).map(I.fromAffine)}equals(m){tt(m);const{x:p,y,z:w}=this,{x:A,y:D,z:M}=m,T=x(w*w),B=x(M*M),$=x(p*B),G=x(A*T),W=x(x(y*M)*B),wt=x(x(D*w)*T);return $===G&&W===wt}negate(){return new I(this.x,x(-this.y),this.z)}double(){const{x:m,y:p,z:y}=this,w=x(m*m),A=x(p*p),D=x(A*A),M=m+A,T=x(o*(x(M*M)-w-D)),B=x(n*w),$=x(B*B),G=x($-o*T),W=x(B*(T-G)-s*D),wt=x(o*p*y);return new I(G,W,wt)}add(m){tt(m);const{x:p,y,z:w}=this,{x:A,y:D,z:M}=m;if(A===e||D===e)return this;if(p===e||y===e)return m;const T=x(w*w),B=x(M*M),$=x(p*B),G=x(A*T),W=x(x(y*M)*B),wt=x(x(D*w)*T),yt=x(G-$),ae=x(wt-W);if(yt===e)return ae===e?this.double():I.ZERO;const Ua=x(yt*yt),Ca=x(yt*Ua),Ea=x($*Ua),Ri=x(ae*ae-Ca-o*Ea),mc=x(ae*(Ea-Ri)-W*Ca),fi=x(w*M*yt);return new I(Ri,mc,fi)}subtract(m){return this.add(m.negate())}multiplyUnsafe(m){const p=I.ZERO;if(typeof m=="bigint"&&m===e)return p;let y=Jc(m);if(y===r)return this;if(!K){let G=p,W=this;for(;y>e;)y&r&&(G=G.add(W)),W=W.double(),y>>=r;return G}let{k1neg:w,k1:A,k2neg:D,k2:M}=d.splitScalar(y),T=p,B=p,$=this;for(;A>e||M>e;)A&r&&(T=T.add($)),M&r&&(B=B.add($)),$=$.double(),A>>=r,M>>=r;return w&&(T=T.negate()),D&&(B=B.negate()),B=new I(x(B.x*d.beta),B.y,B.z),T.add(B)}precomputeWindow(m){const p=K?128/m+1:256/m+1,y=[];let w=this,A=w;for(let D=0;D<p;D++){A=w,y.push(A);for(let M=1;M<2**(m-1);M++)A=A.add(w),y.push(A);w=A.double()}return y}wNAF(m,p){!p&&this.equals(I.BASE)&&(p=L.BASE);const y=p&&p._WINDOW_SIZE||1;if(256%y)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let w=p&&ut.get(p);w||(w=this.precomputeWindow(y),p&&y!==1&&(w=I.normalizeZ(w),ut.set(p,w)));let A=I.ZERO,D=I.BASE;const M=1+(K?128/y:256/y),T=2**(y-1),B=BigInt(2**y-1),$=2**y,G=BigInt(y);for(let W=0;W<M;W++){const wt=W*T;let yt=Number(m&B);m>>=G,yt>T&&(yt-=$,m+=r);const ae=wt,Ua=wt+Math.abs(yt)-1,Ca=W%2!==0,Ea=yt<0;yt===0?D=D.add(ot(Ca,w[ae])):A=A.add(ot(Ea,w[Ua]))}return{p:A,f:D}}multiply(m,p){let y=Jc(m),w,A;if(K){const{k1neg:D,k1:M,k2neg:T,k2:B}=d.splitScalar(y);let{p:$,f:G}=this.wNAF(M,p),{p:W,f:wt}=this.wNAF(B,p);$=ot(D,$),W=ot(T,W),W=new I(x(W.x*d.beta),W.y,W.z),w=$.add(W),A=G.add(wt)}else{const{p:D,f:M}=this.wNAF(y,p);w=D,A=M}return I.normalizeZ([w,A])[0]}toAffine(m){const{x:p,y,z:w}=this,A=this.equals(I.ZERO);m==null&&(m=A?s:Ma(w));const D=m,M=x(D*D),T=x(M*D),B=x(p*M),$=x(y*T),G=x(w*D);if(A)return L.ZERO;if(G!==r)throw new Error("invZ was invalid");return new L(B,$)}}I.BASE=new I(i.Gx,i.Gy,r),I.ZERO=new I(e,r,e);function ot(h,m){const p=m.negate();return h?p:m}const ut=new WeakMap;class L{constructor(m,p){this.x=m,this.y=p}_setWindowSize(m){this._WINDOW_SIZE=m,ut.delete(this)}hasEvenY(){return this.y%o===e}static fromCompressedHex(m){const p=m.length===32,y=xt(p?m:m.subarray(1));if(!Ni(y))throw new Error("Point is not on curve");const w=N(y);let A=Tm(w);const D=(A&r)===r;p?D&&(A=x(-A)):(m[0]&1)===1!==D&&(A=x(-A));const M=new L(y,A);return M.assertValidity(),M}static fromUncompressedHex(m){const p=xt(m.subarray(1,g+1)),y=xt(m.subarray(g+1,g*2+1)),w=new L(p,y);return w.assertValidity(),w}static fromHex(m){const p=Ue(m),y=p.length,w=p[0];if(y===g)return this.fromCompressedHex(p);if(y===k&&(w===2||w===3))return this.fromCompressedHex(p);if(y===C&&w===4)return this.fromUncompressedHex(p);throw new Error(`Point.fromHex: received invalid point. Expected 32-${k} compressed bytes or ${C} uncompressed bytes, not ${y}`)}static fromPrivateKey(m){return L.BASE.multiply(Rs(m))}static fromSignature(m,p,y){const{r:w,s:A}=Xc(p);if(![0,1,2,3].includes(y))throw new Error("Cannot recover: invalid recovery bit");const D=cc(Ue(m)),{n:M}=i,T=y===2||y===3?w+M:w,B=Ma(T,M),$=x(-D*B,M),G=x(A*B,M),W=y&1?"03":"02",wt=L.fromHex(W+Z(T)),yt=L.BASE.multiplyAndAddUnsafe(wt,$,G);if(!yt)throw new Error("Cannot recover signature: point at infinify");return yt.assertValidity(),yt}toRawBytes(m=!1){return se(this.toHex(m))}toHex(m=!1){const p=Z(this.x);return m?`${this.hasEvenY()?"02":"03"}${p}`:`04${p}${Z(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const m="Point is not on elliptic curve",{x:p,y}=this;if(!Ni(p)||!Ni(y))throw new Error(m);const w=x(y*y),A=N(p);if(x(w-A)!==e)throw new Error(m)}equals(m){return this.x===m.x&&this.y===m.y}negate(){return new L(this.x,x(-this.y))}double(){return I.fromAffine(this).double().toAffine()}add(m){return I.fromAffine(this).add(I.fromAffine(m)).toAffine()}subtract(m){return this.add(m.negate())}multiply(m){return I.fromAffine(this).multiply(m,this).toAffine()}multiplyAndAddUnsafe(m,p,y){const w=I.fromAffine(this),A=p===e||p===r||this!==L.BASE?w.multiplyUnsafe(p):w.multiply(p),D=I.fromAffine(m).multiplyUnsafe(y),M=A.add(D);return M.equals(I.ZERO)?void 0:M.toAffine()}}a.Point=L,L.BASE=new L(i.Gx,i.Gy),L.ZERO=new L(e,e);function Ei(h){return Number.parseInt(h[0],16)>=8?"00"+h:h}function Oi(h){if(h.length<2||h[0]!==2)throw new Error(`Invalid signature integer tag: ${O(h)}`);const m=h[1],p=h.subarray(2,m+2);if(!m||p.length!==m)throw new Error("Invalid signature integer: wrong length");if(p[0]===0&&p[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:xt(p),left:h.subarray(m+2)}}function ic(h){if(h.length<2||h[0]!=48)throw new Error(`Invalid signature tag: ${O(h)}`);if(h[1]!==h.length-2)throw new Error("Invalid signature: incorrect length");const{data:m,left:p}=Oi(h.subarray(2)),{data:y,left:w}=Oi(p);if(w.length)throw new Error(`Invalid signature: left bytes after parsing: ${O(w)}`);return{r:m,s:y}}class ne{constructor(m,p){this.r=m,this.s=p,this.assertValidity()}static fromCompact(m){const p=m instanceof Uint8Array,y="Signature.fromCompact";if(typeof m!="string"&&!p)throw new TypeError(`${y}: Expected string or Uint8Array`);const w=p?O(m):m;if(w.length!==128)throw new Error(`${y}: Expected 64-byte hex`);return new ne(Fs(w.slice(0,64)),Fs(w.slice(64,128)))}static fromDER(m){const p=m instanceof Uint8Array;if(typeof m!="string"&&!p)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:y,s:w}=ic(p?m:se(m));return new ne(y,w)}static fromHex(m){return this.fromDER(m)}assertValidity(){const{r:m,s:p}=this;if(!Ia(m))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Ia(p))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const m=i.n>>r;return this.s>m}normalizeS(){return this.hasHighS()?new ne(this.r,x(-this.s,i.n)):this}toDERRawBytes(){return se(this.toDERHex())}toDERHex(){const m=Ei(vt(this.s)),p=Ei(vt(this.r)),y=m.length/2,w=p.length/2,A=vt(y),D=vt(w);return`30${vt(w+y+4)}02${D}${p}02${A}${m}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return se(this.toCompactHex())}toCompactHex(){return Z(this.r)+Z(this.s)}}a.Signature=ne;function Be(...h){if(!h.every(y=>y instanceof Uint8Array))throw new Error("Uint8Array list expected");if(h.length===1)return h[0];const m=h.reduce((y,w)=>y+w.length,0),p=new Uint8Array(m);for(let y=0,w=0;y<h.length;y++){const A=h[y];p.set(A,w),w+=A.length}return p}const P=Array.from({length:256},(h,m)=>m.toString(16).padStart(2,"0"));function O(h){if(!(h instanceof Uint8Array))throw new Error("Expected Uint8Array");let m="";for(let p=0;p<h.length;p++)m+=P[h[p]];return m}const mt=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function Z(h){if(typeof h!="bigint")throw new Error("Expected bigint");if(!(e<=h&&h<mt))throw new Error("Expected number 0 <= n < 2^256");return h.toString(16).padStart(64,"0")}function it(h){const m=se(Z(h));if(m.length!==32)throw new Error("Error: expected 32 bytes");return m}function vt(h){const m=h.toString(16);return m.length&1?`0${m}`:m}function Fs(h){if(typeof h!="string")throw new TypeError("hexToNumber: expected string, got "+typeof h);return BigInt(`0x${h}`)}function se(h){if(typeof h!="string")throw new TypeError("hexToBytes: expected string, got "+typeof h);if(h.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+h.length);const m=new Uint8Array(h.length/2);for(let p=0;p<m.length;p++){const y=p*2,w=h.slice(y,y+2),A=Number.parseInt(w,16);if(Number.isNaN(A)||A<0)throw new Error("Invalid byte sequence");m[p]=A}return m}function xt(h){return Fs(O(h))}function Ue(h){return h instanceof Uint8Array?Uint8Array.from(h):se(h)}function Jc(h){if(typeof h=="number"&&Number.isSafeInteger(h)&&h>0)return BigInt(h);if(typeof h=="bigint"&&Ia(h))return h;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function x(h,m=i.P){const p=h%m;return p>=e?p:m+p}function Kt(h,m){const{P:p}=i;let y=h;for(;m-- >e;)y*=y,y%=p;return y}function Tm(h){const{P:m}=i,p=BigInt(6),y=BigInt(11),w=BigInt(22),A=BigInt(23),D=BigInt(44),M=BigInt(88),T=h*h*h%m,B=T*T*h%m,$=Kt(B,n)*B%m,G=Kt($,n)*B%m,W=Kt(G,o)*T%m,wt=Kt(W,y)*W%m,yt=Kt(wt,w)*wt%m,ae=Kt(yt,D)*yt%m,Ua=Kt(ae,M)*ae%m,Ca=Kt(Ua,D)*yt%m,Ea=Kt(Ca,n)*B%m,Ri=Kt(Ea,A)*wt%m,mc=Kt(Ri,p)*T%m,fi=Kt(mc,o);if(fi*fi%m!==h)throw new Error("Cannot find square root");return fi}function Ma(h,m=i.P){if(h===e||m<=e)throw new Error(`invert: expected positive integers, got n=${h} mod=${m}`);let p=x(h,m),y=m,w=e,A=r;for(;p!==e;){const M=y/p,T=y%p,B=w-A*M;y=p,p=T,w=A,A=B}if(y!==r)throw new Error("invert: does not exist");return x(w,m)}function Fm(h,m=i.P){const p=new Array(h.length),y=h.reduce((A,D,M)=>D===e?A:(p[M]=A,x(A*D,m)),r),w=Ma(y,m);return h.reduceRight((A,D,M)=>D===e?A:(p[M]=x(A*p[M],m),x(A*D,m)),w),p}function Rm(h){const m=h.length*8-v*8,p=xt(h);return m>0?p>>BigInt(m):p}function cc(h,m=!1){const p=Rm(h);if(m)return p;const{n:y}=i;return p>=y?p-y:p}let Sa,hi;class Zc{constructor(m,p){if(this.hashLen=m,this.qByteLen=p,typeof m!="number"||m<2)throw new Error("hashLen must be a number");if(typeof p!="number"||p<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(m).fill(1),this.k=new Uint8Array(m).fill(0),this.counter=0}hmac(...m){return a.utils.hmacSha256(this.k,...m)}hmacSync(...m){return hi(this.k,...m)}checkSync(){if(typeof hi!="function")throw new Y("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(m=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),m),this.v=await this.hmac(this.v),m.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),m),this.v=await this.hmac(this.v))}reseedSync(m=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),m),this.v=this.hmacSync(this.v),m.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),m),this.v=this.hmacSync(this.v))}async generate(){this.incr();let m=0;const p=[];for(;m<this.qByteLen;){this.v=await this.hmac(this.v);const y=this.v.slice();p.push(y),m+=this.v.length}return Be(...p)}generateSync(){this.checkSync(),this.incr();let m=0;const p=[];for(;m<this.qByteLen;){this.v=this.hmacSync(this.v);const y=this.v.slice();p.push(y),m+=this.v.length}return Be(...p)}}function Ia(h){return e<h&&h<i.n}function Ni(h){return e<h&&h<i.P}function Yc(h,m,p,y=!0){const{n:w}=i,A=cc(h,!0);if(!Ia(A))return;const D=Ma(A,w),M=L.BASE.multiply(A),T=x(M.x,w);if(T===e)return;const B=x(D*x(m+p*T,w),w);if(B===e)return;let $=new ne(T,B),G=(M.x===$.r?0:2)|Number(M.y&r);return y&&$.hasHighS()&&($=$.normalizeS(),G^=1),{sig:$,recovery:G}}function Rs(h){let m;if(typeof h=="bigint")m=h;else if(typeof h=="number"&&Number.isSafeInteger(h)&&h>0)m=BigInt(h);else if(typeof h=="string"){if(h.length!==2*v)throw new Error("Expected 32 bytes of private key");m=Fs(h)}else if(h instanceof Uint8Array){if(h.length!==v)throw new Error("Expected 32 bytes of private key");m=xt(h)}else throw new TypeError("Expected valid private key");if(!Ia(m))throw new Error("Expected private key: 0 < key < n");return m}function uc(h){return h instanceof L?(h.assertValidity(),h):L.fromHex(h)}function Xc(h){if(h instanceof ne)return h.assertValidity(),h;try{return ne.fromDER(h)}catch{return ne.fromCompact(h)}}function qm(h,m=!1){return L.fromPrivateKey(h).toRawBytes(m)}a.getPublicKey=qm;function $m(h,m,p,y=!1){return L.fromSignature(h,m,p).toRawBytes(y)}a.recoverPublicKey=$m;function Qc(h){const m=h instanceof Uint8Array,p=typeof h=="string",y=(m||p)&&h.length;return m?y===k||y===C:p?y===k*2||y===C*2:h instanceof L}function Lm(h,m,p=!1){if(Qc(h))throw new TypeError("getSharedSecret: first arg must be private key");if(!Qc(m))throw new TypeError("getSharedSecret: second arg must be public key");const y=uc(m);return y.assertValidity(),y.multiply(Rs(h)).toRawBytes(p)}a.getSharedSecret=Lm;function tu(h){const m=h.length>g?h.slice(0,g):h;return xt(m)}function Hm(h){const m=tu(h),p=x(m,i.n);return eu(p<e?m:p)}function eu(h){return it(h)}function ru(h,m,p){if(h==null)throw new Error(`sign: expected valid message hash, not "${h}"`);const y=Ue(h),w=Rs(m),A=[eu(w),Hm(y)];if(p!=null){p===!0&&(p=a.utils.randomBytes(g));const T=Ue(p);if(T.length!==g)throw new Error(`sign: Expected ${g} bytes of extra data`);A.push(T)}const D=Be(...A),M=tu(y);return{seed:D,m:M,d:w}}function ou(h,m){const{sig:p,recovery:y}=h,{der:w,recovered:A}=Object.assign({canonical:!0,der:!0},m),D=w?p.toDERRawBytes():p.toCompactRawBytes();return A?[D,y]:D}async function zm(h,m,p={}){const{seed:y,m:w,d:A}=ru(h,m,p.extraEntropy),D=new Zc(b,v);await D.reseed(y);let M;for(;!(M=Yc(await D.generate(),w,A,p.canonical));)await D.reseed();return ou(M,p)}a.sign=zm;function Vm(h,m,p={}){const{seed:y,m:w,d:A}=ru(h,m,p.extraEntropy),D=new Zc(b,v);D.reseedSync(y);let M;for(;!(M=Yc(D.generateSync(),w,A,p.canonical));)D.reseedSync();return ou(M,p)}a.signSync=Vm;const Km={strict:!0};function Gm(h,m,p,y=Km){let w;try{w=Xc(h),m=Ue(m)}catch{return!1}const{r:A,s:D}=w;if(y.strict&&w.hasHighS())return!1;const M=cc(m);let T;try{T=uc(p)}catch{return!1}const{n:B}=i,$=Ma(D,B),G=x(M*$,B),W=x(A*$,B),wt=L.BASE.multiplyAndAddUnsafe(T,G,W);return wt?x(wt.x,B)===A:!1}a.verify=Gm;function Ti(h){return x(xt(h),i.n)}class Ba{constructor(m,p){this.r=m,this.s=p,this.assertValidity()}static fromHex(m){const p=Ue(m);if(p.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${p.length}`);const y=xt(p.subarray(0,32)),w=xt(p.subarray(32,64));return new Ba(y,w)}assertValidity(){const{r:m,s:p}=this;if(!Ni(m)||!Ia(p))throw new Error("Invalid signature")}toHex(){return Z(this.r)+Z(this.s)}toRawBytes(){return se(this.toHex())}}function Wm(h){return L.fromPrivateKey(h).toRawX()}class nu{constructor(m,p,y=a.utils.randomBytes()){if(m==null)throw new TypeError(`sign: Expected valid message, not "${m}"`);this.m=Ue(m);const{x:w,scalar:A}=this.getScalar(Rs(p));if(this.px=w,this.d=A,this.rand=Ue(y),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(m){const p=L.fromPrivateKey(m),y=p.hasEvenY()?m:i.n-m;return{point:p,scalar:y,x:p.toRawX()}}initNonce(m,p){return it(m^xt(p))}finalizeNonce(m){const p=x(xt(m),i.n);if(p===e)throw new Error("sign: Creation of signature failed. k is zero");const{point:y,x:w,scalar:A}=this.getScalar(p);return{R:y,rx:w,k:A}}finalizeSig(m,p,y,w){return new Ba(m.x,x(p+y*w,i.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m,d:p,px:y,rand:w}=this,A=a.utils.taggedHash,D=this.initNonce(p,await A(is.aux,w)),{R:M,rx:T,k:B}=this.finalizeNonce(await A(is.nonce,D,y,m)),$=Ti(await A(is.challenge,T,y,m)),G=this.finalizeSig(M,B,$,p);return await iu(G,m,y)||this.error(),G}calcSync(){const{m,d:p,px:y,rand:w}=this,A=a.utils.taggedHashSync,D=this.initNonce(p,A(is.aux,w)),{R:M,rx:T,k:B}=this.finalizeNonce(A(is.nonce,D,y,m)),$=Ti(A(is.challenge,T,y,m)),G=this.finalizeSig(M,B,$,p);return cu(G,m,y)||this.error(),G}}async function jm(h,m,p){return new nu(h,m,p).calc()}function Jm(h,m,p){return new nu(h,m,p).calcSync()}function su(h,m,p){const y=h instanceof Ba,w=y?h:Ba.fromHex(h);return y&&w.assertValidity(),{...w,m:Ue(m),P:uc(p)}}function au(h,m,p,y){const w=L.BASE.multiplyAndAddUnsafe(m,Rs(p),x(-y,i.n));return!(!w||!w.hasEvenY()||w.x!==h)}async function iu(h,m,p){try{const{r:y,s:w,m:A,P:D}=su(h,m,p),M=Ti(await a.utils.taggedHash(is.challenge,it(y),D.toRawX(),A));return au(y,D,w,M)}catch{return!1}}function cu(h,m,p){try{const{r:y,s:w,m:A,P:D}=su(h,m,p),M=Ti(a.utils.taggedHashSync(is.challenge,it(y),D.toRawX(),A));return au(y,D,w,M)}catch(y){if(y instanceof Y)throw y;return!1}}a.schnorr={Signature:Ba,getPublicKey:Wm,sign:jm,verify:iu,signSync:Jm,verifySync:cu},L.BASE._setWindowSize(8);const Lt={node:t,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},is={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Fi={};a.utils={bytesToHex:O,hexToBytes:se,concatBytes:Be,mod:x,invert:Ma,isValidPrivateKey(h){try{return Rs(h),!0}catch{return!1}},_bigintTo32Bytes:it,_normalizePrivateKey:Rs,hashToPrivateKey:h=>{h=Ue(h);const m=v+8;if(h.length<m||h.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const p=x(xt(h),i.n-r)+r;return it(p)},randomBytes:(h=32)=>{if(Lt.web)return Lt.web.getRandomValues(new Uint8Array(h));if(Lt.node){const{randomBytes:m}=Lt.node;return Uint8Array.from(m(h))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>a.utils.hashToPrivateKey(a.utils.randomBytes(v+8)),precompute(h=8,m=L.BASE){const p=m===L.BASE?m:new L(m.x,m.y);return p._setWindowSize(h),p.multiply(n),p},sha256:async(...h)=>{if(Lt.web){const m=await Lt.web.subtle.digest("SHA-256",Be(...h));return new Uint8Array(m)}else if(Lt.node){const{createHash:m}=Lt.node,p=m("sha256");return h.forEach(y=>p.update(y)),Uint8Array.from(p.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(h,...m)=>{if(Lt.web){const p=await Lt.web.subtle.importKey("raw",h,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),y=Be(...m),w=await Lt.web.subtle.sign("HMAC",p,y);return new Uint8Array(w)}else if(Lt.node){const{createHmac:p}=Lt.node,y=p("sha256",h);return m.forEach(w=>y.update(w)),Uint8Array.from(y.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(h,...m)=>{let p=Fi[h];if(p===void 0){const y=await a.utils.sha256(Uint8Array.from(h,w=>w.charCodeAt(0)));p=Be(y,y),Fi[h]=p}return a.utils.sha256(p,...m)},taggedHashSync:(h,...m)=>{if(typeof Sa!="function")throw new Y("sha256Sync is undefined, you need to set it");let p=Fi[h];if(p===void 0){const y=Sa(Uint8Array.from(h,w=>w.charCodeAt(0)));p=Be(y,y),Fi[h]=p}return Sa(p,...m)},_JacobianPoint:I},Object.defineProperties(a.utils,{sha256Sync:{configurable:!1,get(){return Sa},set(h){Sa||(Sa=h)}},hmacSha256Sync:{configurable:!1,get(){return hi},set(h){hi||(hi=h)}}})})(Pm);var bm={},oe={};Object.defineProperty(oe,"__esModule",{value:!0});oe.isBytes=km;oe.number=Zi;oe.bool=Dm;oe.bytes=qc;oe.hash=xm;oe.exists=Mm;oe.output=Sm;function Zi(a){if(!Number.isSafeInteger(a)||a<0)throw new Error(`positive integer expected, not ${a}`)}function Dm(a){if(typeof a!="boolean")throw new Error(`boolean expected, not ${a}`)}function km(a){return a instanceof Uint8Array||a!=null&&typeof a=="object"&&a.constructor.name==="Uint8Array"}function qc(a,...t){if(!km(a))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(a.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${a.length}`)}function xm(a){if(typeof a!="function"||typeof a.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Zi(a.outputLen),Zi(a.blockLen)}function Mm(a,t=!0){if(a.destroyed)throw new Error("Hash instance has been destroyed");if(t&&a.finished)throw new Error("Hash#digest() has already been called")}function Sm(a,t){qc(a);const e=t.outputLen;if(a.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}const Qd={number:Zi,bool:Dm,bytes:qc,hash:xm,exists:Mm,output:Sm};oe.default=Qd;var oc={},nc={};Object.defineProperty(nc,"__esModule",{value:!0});nc.crypto=void 0;nc.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(a){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(a,"__esModule",{value:!0}),a.Hash=a.nextTick=a.byteSwapIfBE=a.byteSwap=a.isLE=a.rotl=a.rotr=a.createView=a.u32=a.u8=void 0,a.isBytes=r,a.byteSwap32=g,a.bytesToHex=b,a.hexToBytes=N,a.asyncLoop=Y,a.utf8ToBytes=tt,a.toBytes=I,a.concatBytes=ot,a.checkOpts=Ei,a.wrapConstructor=Oi,a.wrapConstructorWithOpts=ic,a.wrapXOFConstructorWithOpts=ne,a.randomBytes=Be;const t=nc,e=oe;function r(P){return P instanceof Uint8Array||P!=null&&typeof P=="object"&&P.constructor.name==="Uint8Array"}const o=P=>new Uint8Array(P.buffer,P.byteOffset,P.byteLength);a.u8=o;const n=P=>new Uint32Array(P.buffer,P.byteOffset,Math.floor(P.byteLength/4));a.u32=n;const s=P=>new DataView(P.buffer,P.byteOffset,P.byteLength);a.createView=s;const i=(P,O)=>P<<32-O|P>>>O;a.rotr=i;const c=(P,O)=>P<<O|P>>>32-O>>>0;a.rotl=c,a.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const d=P=>P<<24&4278190080|P<<8&16711680|P>>>8&65280|P>>>24&255;a.byteSwap=d,a.byteSwapIfBE=a.isLE?P=>P:P=>(0,a.byteSwap)(P);function g(P){for(let O=0;O<P.length;O++)P[O]=(0,a.byteSwap)(P[O])}const v=Array.from({length:256},(P,O)=>O.toString(16).padStart(2,"0"));function b(P){(0,e.bytes)(P);let O="";for(let mt=0;mt<P.length;mt++)O+=v[P[mt]];return O}const k={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function C(P){if(P>=k._0&&P<=k._9)return P-k._0;if(P>=k._A&&P<=k._F)return P-(k._A-10);if(P>=k._a&&P<=k._f)return P-(k._a-10)}function N(P){if(typeof P!="string")throw new Error("hex string expected, got "+typeof P);const O=P.length,mt=O/2;if(O%2)throw new Error("padded hex string expected, got unpadded hex of length "+O);const Z=new Uint8Array(mt);for(let it=0,vt=0;it<mt;it++,vt+=2){const Fs=C(P.charCodeAt(vt)),se=C(P.charCodeAt(vt+1));if(Fs===void 0||se===void 0){const xt=P[vt]+P[vt+1];throw new Error('hex string expected, got non-hex character "'+xt+'" at index '+vt)}Z[it]=Fs*16+se}return Z}const K=async()=>{};a.nextTick=K;async function Y(P,O,mt){let Z=Date.now();for(let it=0;it<P;it++){mt(it);const vt=Date.now()-Z;vt>=0&&vt<O||(await(0,a.nextTick)(),Z+=vt)}}function tt(P){if(typeof P!="string")throw new Error(`utf8ToBytes expected string, got ${typeof P}`);return new Uint8Array(new TextEncoder().encode(P))}function I(P){return typeof P=="string"&&(P=tt(P)),(0,e.bytes)(P),P}function ot(...P){let O=0;for(let Z=0;Z<P.length;Z++){const it=P[Z];(0,e.bytes)(it),O+=it.length}const mt=new Uint8Array(O);for(let Z=0,it=0;Z<P.length;Z++){const vt=P[Z];mt.set(vt,it),it+=vt.length}return mt}class ut{clone(){return this._cloneInto()}}a.Hash=ut;const L={}.toString;function Ei(P,O){if(O!==void 0&&L.call(O)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(P,O)}function Oi(P){const O=Z=>P().update(I(Z)).digest(),mt=P();return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=()=>P(),O}function ic(P){const O=(Z,it)=>P(it).update(I(Z)).digest(),mt=P({});return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=Z=>P(Z),O}function ne(P){const O=(Z,it)=>P(it).update(I(Z)).digest(),mt=P({});return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=Z=>P(Z),O}function Be(P=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(P));if(t.crypto&&typeof t.crypto.randomBytes=="function")return t.crypto.randomBytes(P);throw new Error("crypto.getRandomValues must be defined")}})(oc);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.hmac=a.HMAC=void 0;const t=oe,e=oc;class r extends e.Hash{constructor(s,i){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(s);const c=(0,e.toBytes)(i);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const d=this.blockLen,g=new Uint8Array(d);g.set(c.length>d?s.create().update(c).digest():c);for(let v=0;v<g.length;v++)g[v]^=54;this.iHash.update(g),this.oHash=s.create();for(let v=0;v<g.length;v++)g[v]^=106;this.oHash.update(g),g.fill(0)}update(s){return(0,t.exists)(this),this.iHash.update(s),this}digestInto(s){(0,t.exists)(this),(0,t.bytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:i,iHash:c,finished:d,destroyed:g,blockLen:v,outputLen:b}=this;return s=s,s.finished=d,s.destroyed=g,s.blockLen=v,s.outputLen=b,s.oHash=i._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}a.HMAC=r;const o=(n,s,i)=>new r(n,s).update(i).digest();a.hmac=o,a.hmac.create=(n,s)=>new r(n,s)})(bm);var Us={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.HashMD=Cs.Maj=Cs.Chi=void 0;const Dc=oe,gi=oc;function tl(a,t,e,r){if(typeof a.setBigUint64=="function")return a.setBigUint64(t,e,r);const o=BigInt(32),n=BigInt(4294967295),s=Number(e>>o&n),i=Number(e&n),c=r?4:0,d=r?0:4;a.setUint32(t+c,s,r),a.setUint32(t+d,i,r)}const el=(a,t,e)=>a&t^~a&e;Cs.Chi=el;const rl=(a,t,e)=>a&t^a&e^t&e;Cs.Maj=rl;class ol extends gi.Hash{constructor(t,e,r,o){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,gi.createView)(this.buffer)}update(t){(0,Dc.exists)(this);const{view:e,buffer:r,blockLen:o}=this;t=(0,gi.toBytes)(t);const n=t.length;for(let s=0;s<n;){const i=Math.min(o-this.pos,n-s);if(i===o){const c=(0,gi.createView)(t);for(;o<=n-s;s+=o)this.process(c,s);continue}r.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,Dc.exists)(this),(0,Dc.output)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:o,isLE:n}=this;let{pos:s}=this;e[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>o-s&&(this.process(r,0),s=0);for(let v=s;v<o;v++)e[v]=0;tl(r,o-8,BigInt(this.length*8),n),this.process(r,0);const i=(0,gi.createView)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=c/4,g=this.get();if(d>g.length)throw new Error("_sha2: outputLen bigger than state");for(let v=0;v<d;v++)i.setUint32(4*v,g[v],n)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:o,finished:n,destroyed:s,pos:i}=this;return t.length=o,t.pos=i,t.finished=n,t.destroyed=s,o%e&&t.buffer.set(r),t}}Cs.HashMD=ol;Object.defineProperty(Us,"__esModule",{value:!0});Us.sha224=Us.sha256=Us.SHA256=void 0;const kc=Cs,Gt=oc,nl=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),cs=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),us=new Uint32Array(64);class $c extends kc.HashMD{constructor(){super(64,32,8,!1),this.A=cs[0]|0,this.B=cs[1]|0,this.C=cs[2]|0,this.D=cs[3]|0,this.E=cs[4]|0,this.F=cs[5]|0,this.G=cs[6]|0,this.H=cs[7]|0}get(){const{A:t,B:e,C:r,D:o,E:n,F:s,G:i,H:c}=this;return[t,e,r,o,n,s,i,c]}set(t,e,r,o,n,s,i,c){this.A=t|0,this.B=e|0,this.C=r|0,this.D=o|0,this.E=n|0,this.F=s|0,this.G=i|0,this.H=c|0}process(t,e){for(let v=0;v<16;v++,e+=4)us[v]=t.getUint32(e,!1);for(let v=16;v<64;v++){const b=us[v-15],k=us[v-2],C=(0,Gt.rotr)(b,7)^(0,Gt.rotr)(b,18)^b>>>3,N=(0,Gt.rotr)(k,17)^(0,Gt.rotr)(k,19)^k>>>10;us[v]=N+us[v-7]+C+us[v-16]|0}let{A:r,B:o,C:n,D:s,E:i,F:c,G:d,H:g}=this;for(let v=0;v<64;v++){const b=(0,Gt.rotr)(i,6)^(0,Gt.rotr)(i,11)^(0,Gt.rotr)(i,25),k=g+b+(0,kc.Chi)(i,c,d)+nl[v]+us[v]|0,N=((0,Gt.rotr)(r,2)^(0,Gt.rotr)(r,13)^(0,Gt.rotr)(r,22))+(0,kc.Maj)(r,o,n)|0;g=d,d=c,c=i,i=s+k|0,s=n,n=o,o=r,r=k+N|0}r=r+this.A|0,o=o+this.B|0,n=n+this.C|0,s=s+this.D|0,i=i+this.E|0,c=c+this.F|0,d=d+this.G|0,g=g+this.H|0,this.set(r,o,n,s,i,c,d,g)}roundClean(){us.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}Us.SHA256=$c;class sl extends $c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}Us.sha256=(0,Gt.wrapConstructor)(()=>new $c);Us.sha224=(0,Gt.wrapConstructor)(()=>new sl);var al=Pm,il=bm,Im=Us;function cl(a){var t=Object.create(null);return a&&Object.keys(a).forEach(function(e){if(e!=="default"){var r=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return a[e]}})}}),t.default=a,Object.freeze(t)}var j=cl(al);const Ns="Expected Private",Ts="Expected Point",Bi="Expected Tweak",ul="Expected Hash",Yi="Expected Signature",Lc="Expected Extra Data (32 bytes)",Ui="Expected Scalar",ml="Bad Recovery Id";j.utils.hmacSha256Sync=(a,...t)=>il.hmac(Im.sha256,a,j.utils.concatBytes(...t));j.utils.sha256Sync=(...a)=>Im.sha256(j.utils.concatBytes(...a));const Hc=j.utils._normalizePrivateKey,dl=32,ll=32,Ec=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65]),pl=32,hl=new Uint8Array(32),fl=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,69,81,35,25,80,183,95,196,64,45,161,114,47,201,186,238]);function gl(a){return a instanceof Uint8Array}function Si(a,t){for(let e=0;e<32;++e)if(a[e]!==t[e])return a[e]<t[e]?-1:1;return 0}function _u(a){return Si(a,hl)===0}function Ci(a){return!(!(a instanceof Uint8Array)||a.length!==ll||Si(a,Ec)>=0)}function zc(a){return a instanceof Uint8Array&&a.length===64&&Si(a.subarray(0,32),Ec)<0&&Si(a.subarray(32,64),Ec)<0}function yl(a){return gl(a)&&a.length===64&&Si(a.subarray(0,32),fl)<0}function _l(a){return!(_u(a.subarray(0,32))||_u(a.subarray(32,64)))}function li(a){return a instanceof Uint8Array&&a.length===dl}function Vc(a){return a===void 0||a instanceof Uint8Array&&a.length===pl}function Bm(a){if(typeof a!="string")throw new TypeError("hexToNumber: expected string, got "+typeof a);return BigInt(`0x${a}`)}function vl(a){return Bm(j.utils.bytesToHex(a))}function Kc(a){let t;if(typeof a=="bigint")t=a;else if(typeof a=="number"&&Number.isSafeInteger(a)&&a>=0)t=BigInt(a);else if(typeof a=="string"){if(a.length!==64)throw new Error("Expected 32 bytes of private scalar");t=Bm(a)}else if(a instanceof Uint8Array){if(a.length!==32)throw new Error("Expected 32 bytes of private scalar");t=vl(a)}else throw new TypeError("Expected valid private scalar");if(t<0)throw new Error("Expected private scalar >= 0");return t}const wl=(a,t)=>{const e=Hc(a),r=Kc(t),o=j.utils._bigintTo32Bytes(j.utils.mod(e+r,j.CURVE.n));return j.utils.isValidPrivateKey(o)?o:null},Al=(a,t)=>{const e=Hc(a),r=Kc(t),o=j.utils._bigintTo32Bytes(j.utils.mod(e-r,j.CURVE.n));return j.utils.isValidPrivateKey(o)?o:null},Pl=a=>{const t=Hc(a),e=j.utils._bigintTo32Bytes(j.CURVE.n-t);return j.utils.isValidPrivateKey(e)?e:null},Um=(a,t,e)=>{const r=j.Point.fromHex(a),o=Kc(t),n=j.Point.BASE.multiplyAndAddUnsafe(r,o,BigInt(1));if(!n)throw new Error("Tweaked point at infinity");return n.toRawBytes(e)},bl=(a,t,e)=>{const r=j.Point.fromHex(a),o=typeof t=="string"?t:j.utils.bytesToHex(t),n=BigInt(`0x${o}`);return r.multiply(n).toRawBytes(e)};function pi(a,t){return a===void 0?t!==void 0?Cm(t):!0:!!a}function xa(a){try{return a()}catch{return null}}function Gc(a,t){if(a.length===32!==t)return!1;try{return!!j.Point.fromHex(a)}catch{return!1}}function Es(a){return Gc(a,!1)}function Cm(a){return Gc(a,!1)&&a.length===33}function as(a){return j.utils.isValidPrivateKey(a)}function sc(a){return Gc(a,!0)}function Dl(a,t){if(!sc(a))throw new Error(Ts);if(!Ci(t))throw new Error(Bi);return xa(()=>{const e=Um(a,t,!0);return{parity:e[0]%2===1?1:0,xOnlyPubkey:e.slice(1)}})}function Em(a){if(!Es(a))throw new Error(Ts);return a.slice(1,33)}function Om(a,t){if(!as(a))throw new Error(Ns);return xa(()=>j.getPublicKey(a,pi(t)))}function kl(a){if(!as(a))throw new Error(Ns);return Em(Om(a))}function xl(a,t){if(!Es(a))throw new Error(Ts);return j.Point.fromHex(a).toRawBytes(pi(t,a))}function Ml(a,t,e){if(!Es(a))throw new Error(Ts);if(!Ci(t))throw new Error(Bi);return xa(()=>bl(a,t,pi(e,a)))}function Sl(a,t,e){if(!Es(a)||!Es(t))throw new Error(Ts);return xa(()=>{const r=j.Point.fromHex(a),o=j.Point.fromHex(t);return r.equals(o.negate())?null:r.add(o).toRawBytes(pi(e,a))})}function Il(a,t,e){if(!Es(a))throw new Error(Ts);if(!Ci(t))throw new Error(Bi);return xa(()=>Um(a,t,pi(e,a)))}function Bl(a,t){if(as(a)===!1)throw new Error(Ns);if(Ci(t)===!1)throw new Error(Bi);return xa(()=>wl(a,t))}function Ul(a,t){if(as(a)===!1)throw new Error(Ns);if(Ci(t)===!1)throw new Error(Bi);return xa(()=>Al(a,t))}function Cl(a){if(as(a)===!1)throw new Error(Ns);return Pl(a)}function El(a,t,e){if(!as(t))throw new Error(Ns);if(!li(a))throw new Error(Ui);if(!Vc(e))throw new Error(Lc);return j.signSync(a,t,{der:!1,extraEntropy:e})}function Ol(a,t,e){if(!as(t))throw new Error(Ns);if(!li(a))throw new Error(Ui);if(!Vc(e))throw new Error(Lc);const[r,o]=j.signSync(a,t,{der:!1,extraEntropy:e,recovered:!0});return{signature:r,recoveryId:o}}function Nl(a,t,e=Buffer.alloc(32,0)){if(!as(t))throw new Error(Ns);if(!li(a))throw new Error(Ui);if(!Vc(e))throw new Error(Lc);return j.schnorr.signSync(a,t,e)}function Tl(a,t,e,r){if(!li(a))throw new Error(ul);if(!zc(t)||!_l(t))throw new Error(Yi);if(e&2&&!yl(t))throw new Error(ml);if(!sc(t.subarray(0,32)))throw new Error(Yi);return j.recoverPublicKey(a,t,e,pi(r))}function Fl(a,t,e,r){if(!Es(t))throw new Error(Ts);if(!zc(e))throw new Error(Yi);if(!li(a))throw new Error(Ui);return j.verify(e,a,t,{strict:r})}function Rl(a,t,e){if(!sc(t))throw new Error(Ts);if(!zc(e))throw new Error(Yi);if(!li(a))throw new Error(Ui);return j.schnorr.verifySync(e,a,t)}pt.isPoint=Es;pt.isPointCompressed=Cm;pt.isPrivate=as;pt.isXOnlyPoint=sc;pt.pointAdd=Sl;pt.pointAddScalar=Il;pt.pointCompress=xl;pt.pointFromScalar=Om;pt.pointMultiply=Ml;pt.privateAdd=Bl;pt.privateNegate=Cl;pt.privateSub=Ul;pt.recover=Tl;pt.sign=El;pt.signRecoverable=Ol;pt.signSchnorr=Nl;pt.verify=Fl;pt.verifySchnorr=Rl;pt.xOnlyPointAddTweak=Dl;pt.xOnlyPointFromPoint=Em;pt.xOnlyPointFromScalar=kl;class ac extends Rc{constructor(e,r=!1){var t=(...jl)=>(super(...jl),_(this,"privateKey"),_(this,"eth"),this);const o=_i.publicKeyCreate(new Uint8Array(e),!0);t(r?new Oe(Buffer.from(o).toString("base64")):new Pt(Buffer.from(o).toString("base64"))),this.privateKey=e,this.eth=r}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 ac(Buffer.from(r,"hex"))}async sign(e){if(this.eth)return this.signWithKeccak256(e);const r=Buffer.from(Gi.SHA256.hash(new Gi.Word32Array(e)).toString(),"hex"),{signature:o}=_i.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}async signWithKeccak256(e){const r=Pu(e),{signature:o}=_i.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}}const ql=yd.BIP32Factory(pt),Wc=118,$l={account:0,index:0,coinType:Wc,eth:!1};class Ll extends ac{constructor(e={}){const{account:r,index:o,coinType:n,eth:s}={...$l,...e};let{mnemonic:i}=e;i===void 0&&(i=mu.generateMnemonic(256));const c=mu.mnemonicToSeedSync(i),d=ql.fromSeed(c),g=`m/44'/${n}'/${r}'/0/${o}`,b=d.derivePath(g).privateKey;if(!b)throw new Error("Failed to derive key pair");super(Buffer.from(b),s);_(this,"mnemonic");this.mnemonic=i}}const vu=120,Nm="1.0.0";class ht extends Error{constructor(t){super(t),this.name="LedgerError"}}class jc extends Rc{constructor(e){super();_(this,"app");_(this,"path",[44,Wc,0,0,0]);this.transport=e,this.app=new xi(this.transport)}get accAddress(){if(!this.publicKey)throw new Error("Ledger is uninitialized. Initialize it first.");return this.publicKey.address()}static async create(e,r){e||(e=await Kl());const o=new jc(e);return r!=null&&(o.path[4]=r),e&&typeof e.on=="function"&&e.on("disconnect",()=>{o.transport=void 0}),await o.initialize().catch(Hl),o}async initialize(){const e=await this.app.initialize(),{app_name:r}=this.app.getInfo();if(r!=="Initia")throw new ht("Open the Initia app in the Ledger");const{major:o,minor:n,patch:s}=this.app.getVersion(),i=`${o}.${n}.${s}`;if(r==="Initia"&&_d.lt(i,Nm))throw new ht("Outdated version: Update Ledger Initia App to the latest version");xc(e),await this.loadAccountDetails()}async loadAccountDetails(){const e=await this.app.getAddressAndPubKey(this.path,"init");return xc(e),this.publicKey=new Pt(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 xc(r),Buffer.from(wu.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 Hl=a=>{const t=a.message.trim();if(!t.startsWith("The device is already open"))throw a.name==="TransportOpenUserCancelled"?new ht("Couldn't find the Ledger. Check the Ledger is plugged in and unlocked."):t.startsWith("No WebUSB interface found for the Ledger device")?new ht(`Couldn't connect to a Ledger device. Use Ledger Live to upgrade the Ledger firmware to version ${Nm} or later.`):t.startsWith("Unable to claim interface")?new ht("Couldn't access Ledger device. Is it being used in another tab?"):t.startsWith("Transport not defined")?new ht("Couldn't access Ledger device. Is it being used in another tab?"):t.startsWith("Not supported")?new ht("This browser doesn't support WebUSB yet. Update it to the latest version."):t.startsWith("No device selected")?new ht("Couldn't find the Ledger. Check the Ledger is plugged in and unlocked."):a},xc=a=>{if(!a)return;const{error_message:t,device_locked:e}=a;if(e)throw new ht("Ledger's screensaver mode is on");if(t.startsWith("TransportRaceCondition"))throw new ht("Finish previous action in Ledger");if(t.startsWith("DisconnectedDeviceDuringOperation"))throw new ht("Open the Initia app in the Ledger");switch(t){case"U2F: Timeout":throw new ht("Couldn't find a connected and unlocked Ledger device");case"App does not seem to be open":throw new ht("Open the Initia app in the Ledger");case"Command not allowed":throw new ht("Transaction rejected");case"Transaction rejected":throw new ht("User rejected the transaction");case"Unknown Status Code: 26628":throw new ht("Ledger's screensaver mode is on");case"Instruction not supported":throw new ht("Check the Ledger is running latest version of Initia");case"No errors":break;default:throw new ht(t)}},zl=a=>a.indexOf("Win")>-1,Vl=a=>{const t=a.toLowerCase(),e=/chrome|crios/.test(t)&&!/edge|opr\//.test(t),r=e&&!window.google;if(!e&&!r)throw new ht("This browser doesn't support Ledger devices");return e?"chrome":"brave"};async function Kl(){let a;if(Vl(navigator.userAgent),zl(navigator.platform)){if(!navigator.hid)throw new ht("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-BJGOHoD4.js"));a=await t.create(vu*1e3)}else{const{default:t}=await Promise.resolve().then(()=>require("./TransportWebUSB-Bog8kAV9.js"));a=await t.create(vu*1e3)}return a}Object.defineProperty(exports,"State",{enumerable:!0,get:()=>ue.State});Object.defineProperty(exports,"stateFromJSON",{enumerable:!0,get:()=>ue.stateFromJSON});Object.defineProperty(exports,"stateToJSON",{enumerable:!0,get:()=>ue.stateToJSON});exports.ABCIParams=ys;exports.ACL=Xs;exports.APIRequester=Cu;exports.APP_KEY=$d;exports.AbsoluteTxPosition=Ls;exports.AcceptedMessageKeysFilter=er;exports.AcceptedMessagesFilter=rr;exports.AccessConfig=at;exports.AccessTuple=Tt;exports.Allocation=Hs;exports.AllowAllMessagesFilter=tr;exports.AllowedMsgAllowance=Gr;exports.AuctionAPI=Ou;exports.AuctionParams=Rn;exports.AuthAPI=Ru;exports.AuthInfo=De;exports.AuthParams=qn;exports.AuthorizationGrant=we;exports.AuthzAPI=qu;exports.BankAPI=$u;exports.BankParams=Ln;exports.BaseAccount=jt;exports.BasicAllowance=St;exports.BatchInfo=$t;exports.BatchInfoWithOutput=ri;exports.Blob=ai;exports.BlobTx=ji;exports.BlockParams=hs;exports.BridgeConfig=Me;exports.BridgeInfo=Ie;exports.CHUNK_SIZE=Uc;exports.CLA=mi;exports.Channel=ee;exports.ChannelCounterparty=bs;exports.ClientConsensusStates=ki;exports.CodeGrant=ds;exports.Coin=S;exports.Coins=l;exports.CombinedLimit=Qe;exports.ConnectionCounterparty=re;exports.ConsensusStateWithHeight=ks;exports.ContractExecutionAuthorization=or;exports.ContractGrant=ve;exports.ContractMigrationAuthorization=nr;exports.CurrencyPair=Et;exports.DecisionPolicyWindows=ke;exports.Delegation=Bs;exports.DenomMetadata=Pe;exports.DenomTrace=Ks;exports.DenomUnit=ps;exports.Deposit=Wa;exports.DistributionAPI=Lu;exports.DistributionParams=Vn;exports.Duration=q;exports.ERROR_CODE=Da;exports.ERROR_DESCRIPTION=Cc;exports.Equivocation=$r;exports.EthPublicKey=Oe;exports.EvidenceAPI=Hu;exports.EvidenceParams=fs;exports.EvmAPI=zu;exports.EvmParams=Kn;exports.ExecuteAuthorization=Je;exports.ExecuteAuthorizationItem=ms;exports.Fee=be;exports.FeeGrantAPI=Vu;exports.ForwardingAPI=Ku;exports.FungibleTokenPacketData=Ai;exports.GenericAuthorization=We;exports.GovAPI=Gu;exports.GovParams=Wn;exports.GroupAPI=Wu;exports.GroupInfo=Po;exports.GroupMember=ja;exports.GroupPolicyInfo=Ps;exports.GroupProposal=jn;exports.GroupVote=Fe;exports.Height=U;exports.INIT_COIN_TYPE=Wc;exports.INS=di;exports.IbcAPI=ju;exports.IbcChannelParams=ca;exports.IbcClientParams=Ds;exports.IbcConnectionParams=ma;exports.IbcFee=Re;exports.IbcHooksAPI=Ju;exports.IbcHooksParams=Jn;exports.IbcNftAPI=Zu;exports.IbcNftParams=Zn;exports.IbcPermAPI=Xu;exports.IbcTransferAPI=Yu;exports.IbcTransferParams=ls;exports.IbcVersion=qt;exports.IdentifiedClientState=Ja;exports.IdentifiedConnection=ua;exports.IdentifiedPacketFees=bi;exports.InterTxAPI=Qu;exports.JSONSerializable=u;exports.Key=Rc;exports.LCDClient=Md;exports.LedgerError=ht;exports.LedgerKey=jc;exports.LegacyAminoMultisigPublicKey=Ee;exports.Market=kt;exports.MarketmapAPI=tm;exports.MarketmapParams=Yn;exports.MaxCallsLimit=Ye;exports.MaxFundsLimit=Xe;exports.Member=As;exports.MemberRequest=Rt;exports.MerklePrefix=Ms;exports.MerkleRoot=Ji;exports.Metadata=Pi;exports.MnemonicKey=Ll;exports.ModeInfo=X;exports.Module=Qn;exports.ModuleAccount=Ne;exports.MoveAPI=em;exports.MoveParams=Xn;exports.MsgAcknowledgement=ya;exports.MsgAddCodeUploadParamsAddresses=vr;exports.MsgAddCurrencyPairs=Eo;exports.MsgAddValidator=on;exports.MsgAuctionBid=ze;exports.MsgBeginRedelegate=Qo;exports.MsgBurn=Bn;exports.MsgCall=Vr;exports.MsgCancelProposal=Yr;exports.MsgCancelUnbondingDelegation=en;exports.MsgCancelUpgrade=Bo;exports.MsgChangeAdmin=Un;exports.MsgChannelCloseConfirm=fa;exports.MsgChannelCloseInit=ha;exports.MsgChannelOpenAck=pa;exports.MsgChannelOpenConfirm=la;exports.MsgChannelOpenInit=ta;exports.MsgChannelOpenTry=da;exports.MsgClearAdmin=dr;exports.MsgClearForwardingAccount=Zr;exports.MsgCommunityPoolSpend=Rr;exports.MsgCreate=Hr;exports.MsgCreate2=zr;exports.MsgCreateBridge=dn;exports.MsgCreateClient=ea;exports.MsgCreateDenom=Sn;exports.MsgCreateGroup=co;exports.MsgCreateGroupPolicy=lo;exports.MsgCreateGroupWithPolicy=po;exports.MsgCreateMarkets=No;exports.MsgCreateValidator=tn;exports.MsgDelegate=Yo;exports.MsgDeleteOutput=pn;exports.MsgDelist=Go;exports.MsgDeposit=Qr;exports.MsgDepositLegacy=Xr;exports.MsgDepositValidatorRewardsPool=qr;exports.MsgEditValidator=_e;exports.MsgExecAuthorized=kr;exports.MsgExecute=$o;exports.MsgExecuteContract=cr;exports.MsgExecuteJSON=Lo;exports.MsgExecuteMessages=cn;exports.MsgFinalizeTokenDeposit=sn;exports.MsgFinalizeTokenWithdrawal=fn;exports.MsgForceTransfer=On;exports.MsgFundCommunityPool=Tr;exports.MsgGovExecute=Wo;exports.MsgGovExecuteJSON=jo;exports.MsgGovPublish=ye;exports.MsgGovScript=Jo;exports.MsgGovScriptJSON=Zo;exports.MsgGrantAllowance=Wr;exports.MsgGrantAuthorization=br;exports.MsgGroupExec=ho;exports.MsgGroupVote=he;exports.MsgIBCSoftwareUpgrade=aa;exports.MsgInitiateTokenDeposit=hn;exports.MsgInitiateTokenWithdrawal=an;exports.MsgInstantiateContract=ar;exports.MsgInstantiateContractV2=ir;exports.MsgLeaveGroup=fo;exports.MsgMigrateContract=ur;exports.MsgMint=In;exports.MsgMultiSend=bt;exports.MsgNftTransfer=ko;exports.MsgPayForBlobs=Gs;exports.MsgPayPacketFee=js;exports.MsgPayPacketFeeAsync=Js;exports.MsgPinCodes=fr;exports.MsgProposeOutput=ln;exports.MsgPublish=ge;exports.MsgRecordBatch=mn;exports.MsgRecoverClient=sa;exports.MsgRecvPacket=ga;exports.MsgRegisterAccount=Uo;exports.MsgRegisterCounterpartyPayee=Ys;exports.MsgRegisterForwardingAccount=Jr;exports.MsgRegisterPayee=Zs;exports.MsgRemoveCodeUploadParamsAddresses=wr;exports.MsgRemoveCurrencyPairs=Oo;exports.MsgRemoveMarketAuthorities=Ro;exports.MsgRemoveValidator=nn;exports.MsgRevokeAllowance=jr;exports.MsgRevokeAuthorization=Dr;exports.MsgScript=Ho;exports.MsgScriptJSON=zo;exports.MsgSend=xr;exports.MsgSetBeforeSendHook=En;exports.MsgSetBridgeInfo=Pn;exports.MsgSetDenomMetadata=Ir;exports.MsgSetDenomMetadataWasm=Cn;exports.MsgSetSendEnabled=Sr;exports.MsgSetWithdrawAddress=Er;exports.MsgSoftwareUpgrade=Io;exports.MsgSpendFeePool=un;exports.MsgStoreAndInstantiateContract=yr;exports.MsgStoreAndMigrateContract=_r;exports.MsgStoreCode=sr;exports.MsgSubmitEvidence=Lr;exports.MsgSubmitGroupProposal=fe;exports.MsgSubmitMisbehaviour=na;exports.MsgSubmitProposal=no;exports.MsgSubmitProposalLegacy=oo;exports.MsgSubmitTx=Co;exports.MsgSudoContract=hr;exports.MsgTimeout=_a;exports.MsgTimeoutOnClose=va;exports.MsgTransfer=Pr;exports.MsgUndelegate=Xo;exports.MsgUnjail=xn;exports.MsgUnpinCodes=gr;exports.MsgUpdateACL=bo;exports.MsgUpdateAdmin=mr;exports.MsgUpdateAuctionParams=Ve;exports.MsgUpdateAuthParams=Ke;exports.MsgUpdateBankParams=Mr;exports.MsgUpdateBatchInfo=_n;exports.MsgUpdateChallenger=yn;exports.MsgUpdateClient=ra;exports.MsgUpdateConsensusParams=Br;exports.MsgUpdateContractLabel=Ar;exports.MsgUpdateCrisisParams=Cr;exports.MsgUpdateDistrParams=Fr;exports.MsgUpdateEvmParams=Kr;exports.MsgUpdateGovParams=io;exports.MsgUpdateGroupAdmin=go;exports.MsgUpdateGroupDecisionPolicy=yo;exports.MsgUpdateGroupMembers=_o;exports.MsgUpdateGroupMetadata=vo;exports.MsgUpdateGroupPolicyAdmin=wo;exports.MsgUpdateGroupPolicyMetadata=Ao;exports.MsgUpdateIbcChannelParams=wa;exports.MsgUpdateIbcClientParams=ia;exports.MsgUpdateIbcHooksParams=Do;exports.MsgUpdateIbcNftParams=xo;exports.MsgUpdateIbcPermAdmin=Mo;exports.MsgUpdateIbcTransferParams=Vs;exports.MsgUpdateInstantiateConfig=lr;exports.MsgUpdateMarketmapParams=qo;exports.MsgUpdateMarkets=To;exports.MsgUpdateMetadata=wn;exports.MsgUpdateMoveParams=Vo;exports.MsgUpdateMstakingParams=rn;exports.MsgUpdateOpchildParams=Dn;exports.MsgUpdateOphostParams=An;exports.MsgUpdateOracle=bn;exports.MsgUpdateOracleConfig=vn;exports.MsgUpdatePermissionedRelayers=So;exports.MsgUpdateProposer=gn;exports.MsgUpdateRewardParams=kn;exports.MsgUpdateSlashingParams=Mn;exports.MsgUpdateTokenfactoryParams=Nn;exports.MsgUpdateWasmParams=pr;exports.MsgUpgradeClient=oa;exports.MsgUpsertMarkets=Fo;exports.MsgVerifyInvariant=Ur;exports.MsgVote=pe;exports.MsgVoteLegacy=le;exports.MsgVoteWeighted=ao;exports.MsgVoteWeightedLegacy=so;exports.MsgWhitelist=Ko;exports.MsgWithdrawDelegatorReward=Or;exports.MsgWithdrawValidatorCommission=Nr;exports.MstakingAPI=rm;exports.MstakingParams=ts;exports.MultiSignature=Pd;exports.NftClassTrace=Qs;exports.NonFungibleTokenPacketData=Di;exports.OpValidator=Aa;exports.OpchildAPI=om;exports.OpchildParams=rs;exports.OphostAPI=nm;exports.OphostParams=es;exports.OracleAPI=sm;exports.OrderBy=vd;exports.Output=Se;exports.P1_VALUES=Fc;exports.PAYLOAD_TYPE=Vi;exports.Packet=Vt;exports.PacketFee=$e;exports.PacketId=qe;exports.ParamChange=vs;exports.ParamChanges=to;exports.ParameterChangeProposal=eo;exports.PercentageDecisionPolicy=mo;exports.PeriodicAllowance=Zt;exports.Plan=xe;exports.Proposal=Te;exports.ProviderConfig=Ss;exports.PublishAuthorization=je;exports.QuotePrice=ei;exports.RESTClient=pm;exports.RawKey=ac;exports.Redelegation=ce;exports.RewardAPI=am;exports.RewardParams=os;exports.RewardWeight=_s;exports.SendAuthorization=Ge;exports.SendEnabled=Ae;exports.SignDoc=Fu;exports.SignatureV2=lt;exports.SignerInfo=Jt;exports.SimplePublicKey=Pt;exports.SimulateResponse=ec;exports.SlashingAPI=im;exports.SlashingParams=ns;exports.StakeAuthorization=de;exports.StakeAuthorizationValidators=ie;exports.StoreCodeAuthorization=Ze;exports.TallyResult=Gn;exports.TendermintAPI=cm;exports.TextProposal=ro;exports.ThresholdDecisionPolicy=uo;exports.Ticker=Is;exports.Timeout=xs;exports.TokenfactoryAPI=um;exports.TokenfactoryParams=ss;exports.TransferAuthorization=zs;exports.Tx=Dt;exports.TxAPI=oi;exports.TxBody=zn;exports.TxInfo=ci;exports.TxLog=ba;exports.UnbondingDelegation=Ht;exports.UpgradeAPI=mm;exports.ValConsPublicKey=_t;exports.Validator=dt;exports.ValidatorParams=gs;exports.ValidatorSigningInfo=Pa;exports.Vote=ws;exports.Wallet=lm;exports.WasmAPI=dm;exports.WasmParams=$n;exports.WebSocketClient=Fd;exports.WeightedVoteOption=Ft;exports.bcs=Dd;exports.checkDecimal=qs;exports.fromLittleEndian=Bc;exports.hashToHex=Wi;exports.isTxError=kd;exports.keccak256=Nu;exports.num=F;exports.prepareSignBytes=Mi;exports.removeNull=Eu;exports.ripemd160=Tu;exports.sha256=tc;exports.toLittleEndian=Ic;Object.keys(At).forEach(a=>{a!=="default"&&!Object.prototype.hasOwnProperty.call(exports,a)&&Object.defineProperty(exports,a,{enumerable:!0,get:()=>At[a]})});