@initia/initia.js 0.2.22 → 0.2.24

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 jm=Object.defineProperty;var Jm=(i,t,e)=>t in i?jm(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var _=(i,t,e)=>Jm(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const iu=require("axios"),Zm=require("@initia/initia.proto/cosmos/tx/v1beta1/service"),At=require("bignumber.js"),Ym=require("@initia/initia.proto/cosmos/base/v1beta1/coin"),f=require("@initia/initia.proto/google/protobuf/any"),Bi=require("@initia/initia.proto/sdk/auction/v1/tx"),Xm=require("@initia/initia.proto/sdk/auction/v1/genesis"),Qm=require("@initia/initia.proto/google/protobuf/duration"),qs=require("@initia/initia.proto/cosmos/auth/v1beta1/auth"),mc=require("@initia/initia.proto/cosmos/auth/v1beta1/tx"),vu=require("secp256k1"),wu=require("jscrypto/SHA256"),td=require("jscrypto/RIPEMD160"),ed=require("jscrypto/Base64"),Ka=require("jscrypto"),Au=require("keccak256"),dc=require("@initia/initia.proto/cosmos/crypto/multisig/keys"),lc=require("@initia/initia.proto/cosmos/crypto/secp256k1/keys"),pc=require("@initia/initia.proto/cosmos/crypto/ed25519/keys"),hc=require("@initia/initia.proto/initia/crypto/v1beta1/ethsecp256k1/keys"),et=require("bech32"),$e=require("@initia/initia.proto/initia/mstaking/v1/authz"),fc=require("@initia/initia.proto/cosmos/bank/v1beta1/authz"),Ra=require("@initia/initia.proto/cosmos/authz/v1beta1/authz"),Oi=require("@initia/initia.proto/initia/move/v1/authz"),Gt=require("@initia/initia.proto/initia/move/v1/types"),rt=require("@initia/initia.proto/cosmwasm/wasm/v1/authz"),Ht=require("@initia/initia.proto/cosmwasm/wasm/v1/types"),B=require("@initia/initia.proto/cosmwasm/wasm/v1/tx"),qa=require("@initia/initia.proto/ibc/applications/transfer/v1/authz"),Ni=require("@initia/initia.proto/ibc/applications/transfer/v1/tx"),Ia=require("@initia/initia.proto/ibc/core/client/v1/client"),Pu=require("@initia/initia.proto/ibc/applications/transfer/v1/transfer"),rd=require("@initia/initia.proto/ibc/applications/transfer/v2/packet"),Nn=require("@initia/initia.proto/cosmos/authz/v1beta1/tx"),Zt=require("@initia/initia.proto/cosmos/bank/v1beta1/tx"),na=require("@initia/initia.proto/cosmos/bank/v1beta1/bank"),gc=require("@initia/initia.proto/initia/bank/v1/tx"),yc=require("@initia/initia.proto/celestia/blob/v1/tx"),xc=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"),Mc=require("@initia/initia.proto/cosmos/crypto/multisig/v1beta1/multisig"),Ya=require("@initia/initia.proto/tendermint/types/params"),_c=require("@initia/initia.proto/cosmos/consensus/v1/tx"),ga=require("@initia/initia.proto/cosmos/crisis/v1beta1/tx"),St=require("@initia/initia.proto/cosmos/distribution/v1beta1/tx"),bu=require("@initia/initia.proto/initia/distribution/v1/distribution"),Ti=require("@initia/initia.proto/initia/distribution/v1/tx"),vc=require("@initia/initia.proto/cosmos/evidence/v1beta1/tx"),wc=require("@initia/initia.proto/cosmos/evidence/v1beta1/evidence"),Yt=require("@initia/initia.proto/minievm/evm/v1/tx"),od=require("@initia/initia.proto/minievm/evm/v1/types"),Tn=require("@initia/initia.proto/cosmos/feegrant/v1beta1/feegrant"),Fi=require("@initia/initia.proto/cosmos/feegrant/v1beta1/tx"),Ri=require("@initia/initia.proto/noble/forwarding/v1/tx"),Ut=require("@initia/initia.proto/cosmos/gov/v1/tx"),Xt=require("@initia/initia.proto/cosmos/gov/v1beta1/tx"),$a=require("@initia/initia.proto/cosmos/params/v1beta1/params"),La=require("@initia/initia.proto/cosmos/gov/v1beta1/gov"),ue=require("@initia/initia.proto/cosmos/gov/v1/gov"),Xa=require("@initia/initia.proto/initia/gov/v1/gov"),Ac=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"),Qt=require("@initia/initia.proto/ibc/applications/fee/v1/tx"),Du=require("@initia/initia.proto/ibc/applications/fee/v1/fee"),ca=require("@initia/initia.proto/ibc/core/channel/v1/channel"),nd=require("@initia/initia.proto/ibc/applications/fee/v1/metadata"),qi=require("@initia/initia.proto/initia/ibchooks/v1/tx"),ku=require("@initia/initia.proto/initia/ibchooks/v1/types"),$i=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/tx"),xu=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/types"),sd=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/packet"),Li=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"),Hi=require("@initia/initia.proto/cosmos/upgrade/v1beta1/tx"),Mu=require("@initia/initia.proto/ibc/core/commitment/v1/commitment"),ce=require("@initia/initia.proto/ibc/core/connection/v1/connection"),Ct=require("@initia/initia.proto/ibc/core/connection/v1/tx"),zi=require("@initia/initia.proto/initia/intertx/v1/tx"),Et=require("@initia/initia.proto/connect/marketmap/v2/tx"),Vi=require("@initia/initia.proto/connect/oracle/v2/tx"),ad=require("@initia/initia.proto/connect/types/v2/currency_pair"),cd=require("@initia/initia.proto/connect/oracle/v2/genesis"),Cc=require("@initia/initia.proto/connect/marketmap/v2/market"),ud=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"),Ec=require("@initia/opinit.proto/opinit/opchild/v1/types"),z=require("@initia/opinit.proto/opinit/ophost/v1/tx"),Le=require("@initia/opinit.proto/opinit/ophost/v1/types"),md=require("@initia/initia.proto/initia/reward/v1/types"),Pc=require("@initia/initia.proto/initia/reward/v1/tx"),Ki=require("@initia/initia.proto/cosmos/slashing/v1beta1/tx"),Iu=require("@initia/initia.proto/cosmos/slashing/v1beta1/slashing"),ct=require("@initia/initia.proto/miniwasm/tokenfactory/v1/tx"),dd=require("@initia/initia.proto/miniwasm/tokenfactory/v1/params"),ld=require("@initia/initia.proto/cosmos/base/abci/v1beta1/abci"),Ce=require("@mysten/bcs"),pd=require("ws"),hd=require("ripemd160"),fd=require("semver"),gd=require("bip32"),au=require("bip39");function Su(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const ya=Su(vu),yd=Su(fd),_d=Zm.OrderBy;class Uu{constructor(t,e){_(this,"axios");_(this,"baseURL");this.baseURL=t;const r={headers:{Accept:"application/json"},timeout:3e4};this.axios=iu.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=new URL(this.baseURL);return e.pathname==="/"?e.pathname=t:e.pathname+=t,e.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 iu.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 xa(i){if(Array.isArray(i))return i.map(xa);if(typeof i!="object"||i===null)return i;const t={};return Object.keys(i).sort().forEach(e=>{i[e]===void 0||i[e]===null||(t[e]=xa(i[e]))}),t}class u{toJSON(){return JSON.stringify(xa(this.toData()))}toAminoJSON(){return JSON.stringify(xa(this.toAmino()))}}function Cu(i){return i!==null&&typeof i=="object"?Object.entries(i).filter(([,t])=>t!=null).reduce((t,[e,r])=>({...t,[e]:r===Object(r)&&!Array.isArray(r)?Cu(r):r}),{}):i}function F(i){return new At.BigNumber(i)}function Rs(i){return typeof i=="string"?i.includes("."):!F(i).isInteger()}class I extends u{constructor(e,r){super();_(this,"amount");_(this,"isDecimal");this.denom=e,this.amount=F(r).toString(),this.isDecimal=Rs(r)}toIntCoin(){return new I(this.denom,F(this.amount).toFixed())}toIntCeilCoin(){return new I(this.denom,F(this.amount).toFixed(0,2))}toDecCoin(){return new I(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 I(n,o)}add(e){let r,o=this.isDecimal;if(e instanceof I){if(e.denom!==this.denom)throw new I.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||Rs(e);const n=F(this.amount).plus(r);return new I(this.denom,o&&n.isInteger()?n.toFixed(1):n.toFixed())}sub(e){let r,o=this.isDecimal;if(e instanceof I){if(e.denom!==this.denom)throw new I.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||Rs(e);const n=F(this.amount).minus(r);return new I(this.denom,o&&n.isInteger()?n.toFixed(1):n.toFixed())}mul(e){const r=this.isDecimal||Rs(e),o=F(this.amount).multipliedBy(e);return new I(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}div(e){const r=this.isDecimal||Rs(e),o=F(this.amount).dividedBy(e);return new I(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}mod(e){const r=this.isDecimal||Rs(e),o=F(this.amount).mod(e);return new I(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}static fromAmino(e){const{denom:r,amount:o}=e;return new I(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 I(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 I(e.denom,e.amount)}toProto(){return Ym.Coin.fromPartial({denom:this.denom,amount:this.isDecimal?F(this.amount).toFixed(18):this.amount})}}(i=>{class t{constructor(r){this.message=r}}i.ArithmeticError=t})(I||(I={}));class He 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 He(e,I.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 He(e,I.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 He(t.bidder,I.fromProto(t.bid),t.transactions.map(e=>Buffer.from(e).toString("base64")))}toProto(){const{bidder:t,bid:e,transactions:r}=this;return Bi.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:Bi.MsgAuctionBid.encode(this.toProto()).finish()})}static unpackAny(t){return He.fromProto(Bi.MsgAuctionBid.decode(t.value))}}class Fn 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:a}}=t;return new Fn(parseInt(e),r,I.fromAmino(o),I.fromAmino(n),s,a)}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:a}=t;return new Fn(parseInt(e),r,I.fromData(o),I.fromData(n),s,a)}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 Fn(t.maxBundleSize,Buffer.from(t.escrowAccountAddress).toString("base64"),I.fromProto(t.reserveFee),I.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 Xm.Params.fromPartial({maxBundleSize:t,escrowAccountAddress:Buffer.from(e,"base64"),reserveFee:r.toProto(),minBidIncrement:o.toProto(),frontRunningProtection:n,proposerFee:s})}}class ze extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new ze(e,Fn.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 ze(e,Fn.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 ze(t.authority,Fn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Bi.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgUpdateParams",value:Bi.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ze.fromProto(Bi.MsgUpdateParams.decode(t.value))}}class Q{constructor(t){this.c=t}}class Eu extends Q{async parameters(t={}){return this.c.get("/block-sdk/auction/v1/params",t).then(e=>Fn.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 I(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=>I.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 I){if(r.denom!=e)throw new Error(`Denoms must match when setting: ${e}, ${r.denom}`);o=r}else o=new I(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 I?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(I.fromAmino))}toAmino(){return this.toArray().map(e=>e.toAmino())}static fromData(e){return new l((e??[]).map(I.fromData))}toData(){return this.toArray().map(e=>e.toData())}static fromProto(e){return new l((e??[]).map(I.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 Qm.Duration.fromPartial({seconds:BigInt(this.seconds),nanos:this.nanos})}}class Rn 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 Rn(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 Rn(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 Rn(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 qs.Params.fromPartial({maxMemoCharacters:BigInt(t),txSigLimit:BigInt(e),txSizeCostPerByte:BigInt(r),sigVerifyCostEd25519:BigInt(o),sigVerifyCostSecp256k1:BigInt(n)})}}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:"cosmos-sdk/x/auth/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":"/cosmos.auth.v1beta1.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 mc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.MsgUpdateParams",value:mc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ve.fromProto(mc.MsgUpdateParams.decode(t.value))}}function Ga(i){return wu.SHA256.hash(ed.Base64.parse(i)).toString().toUpperCase()}function Qa(i){return wu.SHA256.hash(new Ka.Word32Array(i)).toUint8Array()}function Bu(i){return Au(Buffer.from(i))}function Ou(i){return td.RIPEMD160.hash(new Ka.Word32Array(i)).toUint8Array()}const vd=Buffer.from("eb5ae98721","hex"),wd=Buffer.from("22c1f7e2","hex"),cu=i=>{const t=parseInt(i.toString());if(t>127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]};exports.PublicKey=void 0;(i=>{function t(o){switch(o.type){case"tendermint/PubKeySecp256k1":return Pt.fromAmino(o);case"tendermint/PubKeyMultisigThreshold":return Ee.fromAmino(o);case"tendermint/PubKeyEd25519":return _t.fromAmino(o);case"initia/PubKeyEthSecp256k1":return Be.fromAmino(o)}}i.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 Be.fromData(o)}}i.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 Be.unpackAny(o);throw new Error(`Pubkey type ${n} not recognized`)}i.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 lc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:lc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Pt.fromProto(lc.PubKey.decode(t.value))}encodeAminoPubkey(){return Buffer.concat([vd,Buffer.from(this.key,"base64")])}rawAddress(){const t=Buffer.from(this.key,"base64");return Ou(Qa(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(wd);t.push(8),t.push(...cu(this.threshold));for(const e of this.pubkeys.map(r=>r.encodeAminoPubkey()))t.push(18),t.push(...cu(e.length)),t.push(...Array.from(e));return new Uint8Array(t)}rawAddress(){const t=this.encodeAminoPubkey();return Qa(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 dc.LegacyAminoPubKey.fromPartial({threshold:this.threshold,publicKeys:this.pubkeys.map(t=>t.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:dc.LegacyAminoPubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Ee.fromProto(dc.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 pc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:pc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return _t.fromProto(pc.PubKey.decode(t.value))}rawAddress(){const t=Buffer.from(this.key,"base64");return Qa(t).slice(0,20)}address(){return et.bech32.encode("initvalcons",et.bech32.toWords(this.rawAddress()))}}class Be extends u{constructor(t){super(),this.key=t}static fromAmino(t){return new Be(t.value)}toAmino(){return{type:"initia/PubKeyEthSecp256k1",value:this.key}}static fromData(t){return new Be(t.key)}toData(){return{"@type":"/initia.crypto.v1beta1.ethsecp256k1.PubKey",key:this.key}}static fromProto(t){return new Be(Buffer.from(t.key).toString("base64"))}toProto(){return hc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.crypto.v1beta1.ethsecp256k1.PubKey",value:hc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Be.fromProto(hc.PubKey.decode(t.value))}rawAddress(){if(!ya.publicKeyVerify(Buffer.from(this.key,"base64")))throw new Error("Invalid public key");const e=ya.publicKeyConvert(Buffer.from(this.key,"base64"),!1);return Bu(e.slice(1)).slice(12)}address(){return et.bech32.encode("init",et.bech32.toWords(this.rawAddress()))}}class Wt 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 Wt(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 Wt(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 Wt(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 qs.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:qs.BaseAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Wt.fromProto(qs.BaseAccount.decode(t.value))}}class Oe 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 Oe(Wt.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 Oe(Wt.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 Oe(Wt.fromProto(t.baseAccount),t.name,t.permissions)}toProto(){const{base_account:t,name:e,permissions:r}=this;return qs.ModuleAccount.fromPartial({baseAccount:t.toProto(),name:e,permissions:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",value:qs.ModuleAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Oe.fromProto(qs.ModuleAccount.decode(t.value))}}exports.Account=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/BaseAccount":return Wt.fromAmino(o);case"cosmos-sdk/ModuleAccount":return Oe.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.auth.v1beta1.BaseAccount":return Wt.fromData(o);case"/cosmos.auth.v1beta1.ModuleAccount":return Oe.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;if(n==="/cosmos.auth.v1beta1.BaseAccount")return Wt.unpackAny(o);if(n==="/cosmos.auth.v1beta1.ModuleAccount")return Oe.unpackAny(o);throw new Error(`Account type ${n} not recognized`)}i.fromProto=r})(exports.Account||(exports.Account={}));class me 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 me(l.fromAmino(r),ie.fromAmino(o),ie.fromAmino(n),$e.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:$e.authorizationTypeToJSON(n)}}}static fromData(e){const{max_tokens:r,allow_list:o,deny_list:n,authorization_type:s}=e;return new me(l.fromData(r),ie.fromData(o),ie.fromData(n),$e.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:$e.authorizationTypeToJSON(n)}}static fromProto(e){return new me(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 $e.StakeAuthorization.fromPartial({maxTokens:e.toProto(),allowList:r.toProto(),denyList:o.toProto(),authorizationType:n})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.StakeAuthorization",value:$e.StakeAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return me.fromProto($e.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 $e.StakeAuthorization_Validators.fromPartial({address:this.address})}}(i=>{i.Type=$e.AuthorizationType})(me||(me={}));class Ke extends u{constructor(e,r){super();_(this,"spend_limit");this.allow_list=r,this.spend_limit=new l(e)}static fromAmino(e){return new Ke(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 Ke(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 Ke(l.fromProto(e.spendLimit),e.allowList)}toProto(){return fc.SendAuthorization.fromPartial({spendLimit:this.spend_limit.toProto(),allowList:this.allow_list})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.SendAuthorization",value:fc.SendAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return Ke.fromProto(fc.SendAuthorization.decode(e.value))}}class Ge extends u{constructor(t){super(),this.msg=t}static fromAmino(t){return new Ge(t.value.msg)}toAmino(){const{msg:t}=this;return{type:"cosmos-sdk/GenericAuthorization",value:{msg:t}}}static fromData(t){return new Ge(t.msg)}toData(){const{msg:t}=this;return{"@type":"/cosmos.authz.v1beta1.GenericAuthorization",msg:t}}static fromProto(t){return new Ge(t.msg)}toProto(){return Ra.GenericAuthorization.fromPartial({msg:this.msg})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",value:Ra.GenericAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Ge.fromProto(Ra.GenericAuthorization.decode(t.value))}}class We extends u{constructor(t){super(),this.module_names=t}static fromAmino(t){return new We(t.value.module_names)}toAmino(){return{type:"move/PublishAuthorization",value:{module_names:this.module_names}}}static fromData(t){return new We(t.module_names)}toData(){return{"@type":"/initia.move.v1.PublishAuthorization",module_names:this.module_names}}static fromProto(t){return new We(t.moduleNames)}toProto(){return Oi.PublishAuthorization.fromPartial({moduleNames:this.module_names})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.PublishAuthorization",value:Oi.PublishAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return We.fromProto(Oi.PublishAuthorization.decode(t.value))}}class je extends u{constructor(t){super(),this.items=t}static fromAmino(t){return new je(t.value.items.map(us.fromAmino))}toAmino(){return{type:"move/ExecuteAuthorization",value:{items:this.items.map(t=>t.toAmino())}}}static fromData(t){return new je(t.items.map(us.fromData))}toData(){return{"@type":"/initia.move.v1.ExecuteAuthorization",items:this.items.map(t=>t.toData())}}static fromProto(t){return new je(t.items.map(us.fromProto))}toProto(){return Oi.ExecuteAuthorization.fromPartial({items:this.items.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.ExecuteAuthorization",value:Oi.ExecuteAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return je.fromProto(Oi.ExecuteAuthorization.decode(t.value))}}class us 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 us(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 us(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 us(t.moduleAddress,t.moduleName,t.functionNames)}toProto(){return Gt.ExecuteAuthorizationItem.fromPartial({moduleAddress:this.module_address,moduleName:this.module_name,functionNames:this.function_names})}}class it extends u{constructor(t,e){super(),this.permission=t,this.addresses=e}static fromAmino(t){const{permission:e,addresses:r}=t;return new it(Ht.accessTypeFromJSON(e),r)}toAmino(){const{permission:t,addresses:e}=this;return{permission:Ht.accessTypeToJSON(t),addresses:e}}static fromData(t){const{permission:e,addresses:r}=t;return new it(Ht.accessTypeFromJSON(e),r)}toData(){const{permission:t,addresses:e}=this;return{permission:Ht.accessTypeToJSON(t),addresses:e}}static fromProto(t){return new it(t.permission,t.addresses)}toProto(){const{permission:t,addresses:e}=this;return Ht.AccessConfig.fromPartial({permission:t,addresses:e})}}(i=>{i.Type=Ht.AccessType})(it||(it={}));class ms 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 ms(e,r?it.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 ms(e,r?it.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 ms(Buffer.from(t.codeHash).toString("base64"),t.instantiatePermission?it.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 Je extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new Je(t.value.grants.map(ms.fromAmino))}toAmino(){return{type:"wasm/StoreCodeAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new Je(t.grants.map(ms.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.StoreCodeAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new Je(t.grants.map(ms.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 Je.fromProto(rt.StoreCodeAuthorization.decode(t.value))}}class Ze extends u{constructor(t){super(),this.remaining=t}static fromAmino(t){return new Ze(parseInt(t.value.remaining))}toAmino(){return{type:"wasm/MaxCallsLimit",value:{remaining:this.remaining.toFixed()}}}static fromData(t){return new Ze(parseInt(t.remaining))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxCallsLimit",remaining:this.remaining.toFixed()}}static fromProto(t){return new Ze(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 Ze.fromProto(rt.MaxCallsLimit.decode(t.value))}}class Ye extends u{constructor(e){super();_(this,"amounts");this.amounts=new l(e)}static fromAmino(e){return new Ye(l.fromAmino(e.value.amounts))}toAmino(){return{type:"wasm/MaxFundsLimit",value:{amounts:this.amounts.toAmino()}}}static fromData(e){return new Ye(l.fromData(e.amounts))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxFundsLimit",amounts:this.amounts.toData()}}static fromProto(e){return new Ye(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 Ye.fromProto(rt.MaxFundsLimit.decode(e.value))}}class Xe 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 Xe(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 Xe(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 Xe(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 Xe.fromProto(rt.CombinedLimit.decode(e.value))}}var _a;(i=>{function t(o){switch(o.type){case"wasm/MaxCallsLimit":return Ze.fromAmino(o);case"wasm/MaxFundsLimit":return Ye.fromAmino(o);case"wasm/CombinedLimit":return Xe.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.MaxCallsLimit":return Ze.fromData(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return Ye.fromData(o);case"/cosmwasm.wasm.v1.CombinedLimit":return Xe.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmwasm.wasm.v1.MaxCallsLimit":return Ze.unpackAny(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return Ye.unpackAny(o);case"/cosmwasm.wasm.v1.CombinedLimit":return Xe.unpackAny(o)}throw new Error(`ContractLimit type ${n} not recognized`)}i.fromProto=r})(_a||(_a={}));class Qe extends u{constructor(){super()}static fromAmino(t){return new Qe}toAmino(){return{type:"wasm/AllowAllMessagesFilter",value:{}}}static fromData(t){return new Qe}toData(){return{"@type":"/cosmwasm.wasm.v1.AllowAllMessagesFilter"}}static fromProto(t){return new Qe}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 Qe.fromProto(rt.AllowAllMessagesFilter.decode(t.value))}}class tr extends u{constructor(t){super(),this.keys=t}static fromAmino(t){return new tr(t.value.keys)}toAmino(){return{type:"wasm/AcceptedMessageKeysFilter",value:{keys:this.keys}}}static fromData(t){return new tr(t.keys)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",keys:this.keys}}static fromProto(t){return new tr(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 tr.fromProto(rt.AcceptedMessageKeysFilter.decode(t.value))}}class er extends u{constructor(t){super(),this.messages=t}static fromAmino(t){return new er(t.value.messages)}toAmino(){return{type:"wasm/AcceptedMessagesFilter",value:{messages:this.messages}}}static fromData(t){return new er(t.messages)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessagesFilter",messages:this.messages}}static fromProto(t){return new er(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 er.fromProto(rt.AcceptedMessagesFilter.decode(t.value))}}var va;(i=>{function t(o){switch(o.type){case"wasm/AllowAllMessagesFilter":return Qe.fromAmino(o);case"wasm/AcceptedMessageKeysFilter":return tr.fromAmino(o);case"wasm/AcceptedMessagesFilter":return er.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return Qe.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return tr.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return er.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return Qe.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return tr.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return er.unpackAny(o)}throw new Error(`ContractFilter type ${n} not recognized`)}i.fromProto=r})(va||(va={}));class _e 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 _e(e,_a.fromAmino(r),va.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 _e(e,_a.fromData(r),va.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 _e(t.contract,_a.fromProto(t.limit),va.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 rr extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new rr(t.value.grants.map(_e.fromAmino))}toAmino(){return{type:"wasm/ContractExecutionAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new rr(t.grants.map(_e.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractExecutionAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new rr(t.grants.map(_e.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 rr.fromProto(rt.ContractExecutionAuthorization.decode(t.value))}}class or extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new or(t.value.grants.map(_e.fromAmino))}toAmino(){return{type:"wasm/ContractMigrationAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new or(t.grants.map(_e.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractMigrationAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new or(t.grants.map(_e.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 or.fromProto(rt.ContractMigrationAuthorization.decode(t.value))}}class nr 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 nr(e,r,o?it.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 nr(e,r,o?it.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 nr(t.sender,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?it.fromProto(t.instantiatePermission):void 0)}toProto(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return B.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:B.MsgStoreCode.encode(this.toProto()).finish()})}static unpackAny(t){return nr.fromProto(B.MsgStoreCode.decode(t.value))}}class sr extends u{constructor(e,r,o,n,s,a){super();_(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=n,this.msg=s,this.funds=new l(a)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:n,label:s,msg:a,funds:c}}=e;return new sr(r,o,parseInt(n),s,a,l.fromAmino(c))}toAmino(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:a}=this;return{type:"wasm/MsgInstantiateContract",value:{sender:e,admin:r,code_id:o.toFixed(),label:n,msg:s,funds:a.toAmino()}}}static fromData(e){const{sender:r,admin:o,code_id:n,label:s,msg:a,funds:c}=e;return new sr(r,o,parseInt(n),s,a,l.fromData(c))}toData(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:a}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:e,admin:r,code_id:o.toFixed(),label:n,msg:s,funds:a.toData()}}static fromProto(e){return new sr(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:a}=this;return B.MsgInstantiateContract.fromPartial({sender:e,admin:r,codeId:BigInt(o),label:n,msg:Buffer.from(s,"base64"),funds:a.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:B.MsgInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return sr.fromProto(B.MsgInstantiateContract.decode(e.value))}}class ir extends u{constructor(e,r,o,n,s,a,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(a)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:n,label:s,msg:a,funds:c,salt:d,fix_msg:g}}=e;return new ir(r,o,parseInt(n),s,a,l.fromAmino(c),d,g)}toAmino(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:a,salt:c,fix_msg:d}=this;return{type:"wasm/MsgInstantiateContract2",value:{sender:e,admin:r,code_id:o.toFixed(),label:n,msg:s,funds:a.toAmino(),salt:c,fix_msg:d}}}static fromData(e){const{sender:r,admin:o,code_id:n,label:s,msg:a,funds:c,salt:d,fix_msg:g}=e;return new ir(r,o,parseInt(n),s,a,l.fromData(c),d,g)}toData(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:a,salt:c,fix_msg:d}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract2",sender:e,admin:r,code_id:o.toFixed(),label:n,msg:s,funds:a.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:a,salt:c,fix_msg:d}=this;return B.MsgInstantiateContract2.fromPartial({sender:e,admin:r,codeId:BigInt(o),label:n,msg:Buffer.from(s,"base64"),funds:a.toProto(),salt:Buffer.from(c,"base64"),fixMsg:d})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:B.MsgInstantiateContract2.encode(this.toProto()).finish()})}static unpackAny(e){return ir.fromProto(B.MsgInstantiateContract2.decode(e.value))}}class ar 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 ar(r,o,n,l.fromAmino(s))}toAmino(){const{sender:e,contract:r,msg:o,funds:n}=this;return{type:"wasm/MsgExecuteContract",value:{sender:e,contract:r,msg:o,funds:n.toAmino()}}}static fromData(e){const{sender:r,contract:o,msg:n,funds:s}=e;return new ar(r,o,n,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:o,funds:n.toData()}}static fromProto(e){return new ar(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 B.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:B.MsgExecuteContract.encode(this.toProto()).finish()})}static unpackAny(e){return ar.fromProto(B.MsgExecuteContract.decode(e.value))}}class cr 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 cr(e,r,parseInt(o),n)}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:o}}}static fromData(t){const{sender:e,contract:r,code_id:o,msg:n}=t;return new cr(e,r,parseInt(o),n)}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:o}}static fromProto(t){return new cr(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 B.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:B.MsgMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return cr.fromProto(B.MsgMigrateContract.decode(t.value))}}class ur 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 ur(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 ur(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 ur(t.sender,t.newAdmin,t.contract)}toProto(){const{sender:t,new_admin:e,contract:r}=this;return B.MsgUpdateAdmin.fromPartial({sender:t,newAdmin:e,contract:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:B.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return ur.fromProto(B.MsgUpdateAdmin.decode(t.value))}}class mr extends u{constructor(t,e){super(),this.sender=t,this.contract=e}static fromAmino(t){const{value:{sender:e,contract:r}}=t;return new mr(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 mr(e,r)}toData(){const{sender:t,contract:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:t,contract:e}}static fromProto(t){return new mr(t.sender,t.contract)}toProto(){const{sender:t,contract:e}=this;return B.MsgClearAdmin.fromPartial({sender:t,contract:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:B.MsgClearAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return mr.fromProto(B.MsgClearAdmin.decode(t.value))}}class dr 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 dr(e,parseInt(r),it.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 dr(e,parseInt(r),it.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 dr(t.sender,Number(t.codeId),it.fromProto(t.newInstantiatePermission))}toProto(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return B.MsgUpdateInstantiateConfig.fromPartial({sender:t,codeId:BigInt(e),newInstantiatePermission:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",value:B.MsgUpdateInstantiateConfig.encode(this.toProto()).finish()})}static unpackAny(t){return dr.fromProto(B.MsgUpdateInstantiateConfig.decode(t.value))}}class qn 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 qn(it.fromAmino(e),Ht.accessTypeFromJSON(r))}toAmino(){const{code_upload_access:t,instantiate_default_permission:e}=this;return{type:"wasm/Params",value:{code_upload_access:t.toAmino(),instantiate_default_permission:Ht.accessTypeToJSON(e)}}}static fromData(t){const{code_upload_access:e,instantiate_default_permission:r}=t;return new qn(it.fromData(e),Ht.accessTypeFromJSON(r))}toData(){const{code_upload_access:t,instantiate_default_permission:e}=this;return{"@type":"/cosmwasm.wasm.v1.Params",code_upload_access:t.toData(),instantiate_default_permission:Ht.accessTypeToJSON(e)}}static fromProto(t){return new qn(it.fromProto(t.codeUploadAccess),t.instantiateDefaultPermission)}toProto(){const{code_upload_access:t,instantiate_default_permission:e}=this;return Ht.Params.fromPartial({codeUploadAccess:t.toProto(),instantiateDefaultPermission:e})}}class lr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new lr(e,qn.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 lr(e,qn.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 lr(t.authority,qn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return B.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",value:B.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return lr.fromProto(B.MsgUpdateParams.decode(t.value))}}class pr 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 pr(e,r,o)}toAmino(){const{authority:t,contract:e,msg:r}=this;return{type:"wasm/MsgSudoContract",value:{authority:t,contract:e,msg:r}}}static fromData(t){const{authority:e,contract:r,msg:o}=t;return new pr(e,r,o)}toData(){const{authority:t,contract:e,msg:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgSudoContract",authority:t,contract:e,msg:r}}static fromProto(t){return new pr(t.authority,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,contract:e,msg:r}=this;return B.MsgSudoContract.fromPartial({authority:t,contract:e,msg:Buffer.from(r,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",value:B.MsgSudoContract.encode(this.toProto()).finish()})}static unpackAny(t){return pr.fromProto(B.MsgSudoContract.decode(t.value))}}class hr 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 hr(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 hr(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 hr(t.authority,t.codeIds.map(e=>Number(e)))}toProto(){const{authority:t,code_ids:e}=this;return B.MsgPinCodes.fromPartial({authority:t,codeIds:e.map(r=>BigInt(r))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",value:B.MsgPinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return hr.fromProto(B.MsgPinCodes.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/MsgUnpinCodes",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.MsgUnpinCodes",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 B.MsgUnpinCodes.fromPartial({authority:t,codeIds:e.map(r=>BigInt(r))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",value:B.MsgUnpinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return fr.fromProto(B.MsgUnpinCodes.decode(t.value))}}class gr extends u{constructor(e,r,o,n,s,a,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=a,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:a,label:c,msg:d,funds:g,source:v,builder:b,code_hash:k}}=e;return new gr(r,o,n?it.fromAmino(n):void 0,s,a,c,d,l.fromAmino(g),v,b,k)}toAmino(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:n,admin:s,label:a,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:a,msg:c,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:a,label:c,msg:d,funds:g,source:v,builder:b,code_hash:k}=e;return new gr(r,o,n?it.fromData(n):void 0,s,a,c,d,l.fromData(g),v,b,k)}toData(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:n,admin:s,label:a,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:a,msg:c,funds:d.toData(),source:g,builder:v,code_hash:b}}static fromProto(e){return new gr(e.authority,Buffer.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?it.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:a,msg:c,funds:d,source:g,builder:v,code_hash:b}=this;return B.MsgStoreAndInstantiateContract.fromPartial({authority:e,wasmByteCode:Buffer.from(r,"base64"),instantiatePermission:o==null?void 0:o.toProto(),unpinCode:n,admin:s,label:a,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:B.MsgStoreAndInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return gr.fromProto(B.MsgStoreAndInstantiateContract.decode(e.value))}}class yr 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 yr(e,r,o?it.fromAmino(o):void 0,n,s)}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:n}}}static fromData(t){const{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:n,msg:s}=t;return new yr(e,r,o?it.fromData(o):void 0,n,s)}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:n}}static fromProto(t){return new yr(t.authority,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?it.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 B.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:B.MsgStoreAndMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return yr.fromProto(B.MsgStoreAndMigrateContract.decode(t.value))}}class _r extends u{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new _r(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 _r(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new _r(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return B.MsgAddCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",value:B.MsgAddCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return _r.fromProto(B.MsgAddCodeUploadParamsAddresses.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/MsgRemoveCodeUploadParamsAddresses",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.MsgRemoveCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new vr(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return B.MsgRemoveCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",value:B.MsgRemoveCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return vr.fromProto(B.MsgRemoveCodeUploadParamsAddresses.decode(t.value))}}class wr 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 wr(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 wr(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 wr(t.sender,t.newLabel,t.contract)}toProto(){const{sender:t,new_label:e,contract:r}=this;return B.MsgUpdateContractLabel.fromPartial({sender:t,newLabel:e,contract:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",value:B.MsgUpdateContractLabel.encode(this.toProto()).finish()})}static unpackAny(t){return wr.fromProto(B.MsgUpdateContractLabel.decode(t.value))}}class $s 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 $s(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 $s(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 $s(Number(t.blockHeight),Number(t.txIndex))}toProto(){const{block_height:t,tx_index:e}=this;return Ht.AbsoluteTxPosition.fromPartial({blockHeight:BigInt(t),txIndex:BigInt(e)})}}class Ls 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:a}=e;return new Ls(r,o,l.fromAmino(n),s,a)}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:a}=e;return new Ls(r,o,l.fromData(n),s,a)}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 Ls(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 qa.Allocation.fromPartial({sourcePort:e,sourceChannel:r,spendLimit:o.toProto(),allowList:n,allowedPacketData:s})}}class Hs 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 Hs(t.allocations.map(Ls.fromData))}toData(){return{"@type":"/ibc.applications.transfer.v1.TransferAuthorization",allocations:this.allocations.map(t=>t.toData())}}static fromProto(t){return new Hs(t.allocations.map(Ls.fromProto))}toProto(){return qa.TransferAuthorization.fromPartial({allocations:this.allocations.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.TransferAuthorization",value:qa.TransferAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Hs.fromProto(qa.TransferAuthorization.decode(t.value))}}class C 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 C(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 C(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 C(Number(t.revisionNumber),Number(t.revisionHeight))}toProto(){const{revision_number:t,revision_height:e}=this;return Ia.Height.fromPartial({revisionNumber:BigInt(t),revisionHeight:BigInt(e)})}}class Ar extends u{constructor(e,r,o,n,s,a,c,d){super();_(this,"source_port");_(this,"source_channel");_(this,"token");_(this,"sender");_(this,"receiver");_(this,"timeout_height");_(this,"timeout_timestamp");_(this,"memo");if(!a&&!c)throw new Error("both of timeout_height and timeout_timestamp are undefined");this.source_port=e,this.source_channel=r,this.token=o,this.sender=n,this.receiver=s,this.timeout_height=a,this.timeout_timestamp=c,this.memo=d}static fromAmino(e){const{value:{source_port:r,source_channel:o,token:n,sender:s,receiver:a,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 Ar(r,o,n?I.fromAmino(n):void 0,s,a,c?C.fromAmino(c):void 0,d,g)}toAmino(){const{source_port:e,source_channel:r,token:o,sender:n,receiver:s,timeout_height:a,timeout_timestamp:c,memo:d}=this;return{type:"cosmos-sdk/MsgTransfer",value:{source_port:e,source_channel:r,token:o==null?void 0:o.toAmino(),sender:n,receiver:s,timeout_height:(a==null?void 0:a.toAmino())??{},timeout_timestamp:c,memo:d}}}static fromData(e){const{source_port:r,source_channel:o,token:n,sender:s,receiver:a,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 Ar(r,o,n?I.fromData(n):void 0,s,a,d?C.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:a,timeout_timestamp:c,memo:d}=this;return{"@type":"/ibc.applications.transfer.v1.MsgTransfer",source_port:e,source_channel:r,token:o==null?void 0:o.toData(),sender:n,receiver:s,timeout_height:a?a.toData():new C(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 Ar(e.sourcePort,e.sourceChannel,e.token?I.fromProto(e.token):void 0,e.sender,e.receiver,e.timeoutHeight?C.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:a,timeout_timestamp:c,memo:d}=this;return Ni.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,token:o==null?void 0:o.toProto(),sender:n,receiver:s,timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:c?BigInt(c):void 0,memo:d})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:Ni.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Ar.fromProto(Ni.MsgTransfer.decode(e.value))}}class ds 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 ds(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 ds(e,r)}toData(){const{send_enabled:t,receive_enabled:e}=this;return{send_enabled:t,receive_enabled:e}}static fromProto(t){return new ds(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Pu.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class zs 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 zs(e,ds.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 zs(t.signer,ds.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Ni.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgUpdateParams",value:Ni.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return zs.fromProto(Ni.MsgUpdateParams.decode(t.value))}}class Vs 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 Vs(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 Vs(e,r)}toData(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromProto(t){return new Vs(t.path,t.baseDenom)}toProto(){const{path:t,base_denom:e}=this;return Pu.DenomTrace.fromPartial({path:t,baseDenom:e})}}class wa 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 wa(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 wa(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 wa(t.denom,t.amount,t.sender,t.receiver,t.memo)}toProto(){const{denom:t,amount:e,sender:r,receiver:o,memo:n}=this;return rd.FungibleTokenPacketData.fromPartial({denom:t,amount:e,sender:r,receiver:o,memo:n})}}class ve extends u{constructor(t,e){super(),this.authorization=t,this.expiration=e}static fromAmino(t){const{authorization:e,expiration:r}=t;return new ve(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 ve(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 ve(exports.Authorization.fromProto(t.authorization),t.expiration)}toProto(){const{authorization:t,expiration:e}=this;return Ra.Grant.fromPartial({authorization:t.packAny(),expiration:e})}}exports.Authorization=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/SendAuthorization":return Ke.fromAmino(o);case"cosmos-sdk/GenericAuthorization":return Ge.fromAmino(o);case"mstake/StakeAuthorization":return me.fromAmino(o);case"move/ExecuteAuthorization":return je.fromAmino(o);case"move/PublishAuthorization":return We.fromAmino(o);case"wasm/StoreCodeAuthorization":return Je.fromAmino(o);case"wasm/ContractExecutionAuthorization":return rr.fromAmino(o);case"wasm/ContractMigrationAuthorization":return or.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.authz.v1beta1.GenericAuthorization":return Ge.fromData(o);case"/cosmos.bank.v1beta1.SendAuthorization":return Ke.fromData(o);case"/initia.mstaking.v1.StakeAuthorization":return me.fromData(o);case"/initia.move.v1.PublishAuthorization":return We.fromData(o);case"/initia.move.v1.ExecuteAuthorization":return je.fromData(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Je.fromData(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return rr.fromData(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return or.fromData(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return Hs.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.authz.v1beta1.GenericAuthorization":return Ge.unpackAny(o);case"/cosmos.bank.v1beta1.SendAuthorization":return Ke.unpackAny(o);case"/initia.mstaking.v1.StakeAuthorization":return me.unpackAny(o);case"/initia.move.v1.PublishAuthorization":return We.unpackAny(o);case"/initia.move.v1.ExecuteAuthorization":return je.unpackAny(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Je.unpackAny(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return rr.unpackAny(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return or.unpackAny(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return Hs.unpackAny(o)}throw new Error(`Authorization type ${n} not recognized`)}i.fromProto=r})(exports.Authorization||(exports.Authorization={}));class Pr 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 Pr(e,r,ve.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 Pr(e,r,ve.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 Pr(t.granter,t.grantee,ve.fromProto(t.grant))}toProto(){const{grant:t,granter:e,grantee:r}=this;return Nn.MsgGrant.fromPartial({grant:t.toProto(),grantee:r,granter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgGrant",value:Nn.MsgGrant.encode(this.toProto()).finish()})}static unpackAny(t){return Pr.fromProto(Nn.MsgGrant.decode(t.value))}}class br 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 br(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 br(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 br(t.granter,t.grantee,t.msgTypeUrl)}toProto(){const{granter:t,grantee:e,msg_type_url:r}=this;return Nn.MsgRevoke.fromPartial({grantee:e,granter:t,msgTypeUrl:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",value:Nn.MsgRevoke.encode(this.toProto()).finish()})}static unpackAny(t){return br.fromProto(Nn.MsgRevoke.decode(t.value))}}class Dr extends u{constructor(t,e){super(),this.grantee=t,this.msgs=e}static fromAmino(t){const{value:{grantee:e,msgs:r}}=t;return new Dr(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 Dr(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 Dr(t.grantee,t.msgs.map(e=>exports.Msg.fromProto(e)))}toProto(){const{grantee:t,msgs:e}=this;return Nn.MsgExec.fromPartial({grantee:t,msgs:e.map(r=>r.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:Nn.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return Dr.fromProto(Nn.MsgExec.decode(t.value))}}class kr 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 kr(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 kr(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 kr(e.fromAddress,e.toAddress,l.fromProto(e.amount))}toProto(){const{from_address:e,to_address:r,amount:o}=this;return Zt.MsgSend.fromPartial({fromAddress:e,toAddress:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:Zt.MsgSend.encode(this.toProto()).finish()})}static unpackAny(e){return kr.fromProto(Zt.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 Zt.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:Zt.MsgMultiSend.encode(this.toProto()).finish()})}static unpackAny(t){return bt.fromProto(Zt.MsgMultiSend.decode(t.value))}}(i=>{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:a}=n;return new t(s,l.fromAmino(a))}toAmino(){const{address:n,coins:s}=this;return{address:n,coins:s.toAmino()}}static fromData(n){const{address:s,coins:a}=n;return new t(s,l.fromData(a))}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 na.Input.fromPartial({address:n,coins:s.toProto()})}}i.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:a}=n;return new e(s,l.fromAmino(a))}toAmino(){const{address:n,coins:s}=this;return{address:n,coins:s.toAmino()}}static fromData(n){const{address:s,coins:a}=n;return new e(s,l.fromData(a))}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 na.Output.fromPartial({address:n,coins:s.toProto()})}}i.Output=e})(bt||(bt={}));class we extends u{constructor(t,e){super(),this.denom=t,this.enabled=e}static fromAmino(t){const{denom:e,enabled:r}=t;return new we(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 we(e,r)}toData(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromProto(t){return new we(t.denom,t.enabled)}toProto(){const{denom:t,enabled:e}=this;return na.SendEnabled.fromPartial({denom:t,enabled:e})}}class $n 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 $n(e.map(we.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 $n(e.map(we.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 $n(t.sendEnabled.map(we.fromProto),t.defaultSendEnabled)}toProto(){const{send_enabled:t,default_send_enabled:e}=this;return na.Params.fromPartial({sendEnabled:t.map(r=>r.toProto()),defaultSendEnabled:e})}}class xr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new xr(e,$n.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 xr(e,$n.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 xr(t.authority,$n.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Zt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",value:Zt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return xr.fromProto(Zt.MsgUpdateParams.decode(t.value))}}class Mr 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 Mr(e,r.map(we.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 Mr(e,r.map(we.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 Mr(t.authority,t.sendEnabled.map(we.fromProto),t.useDefaultFor)}toProto(){const{authority:t,send_enabled:e,use_default_for:r}=this;return Zt.MsgSetSendEnabled.fromPartial({authority:t,sendEnabled:e.map(o=>o.toProto()),useDefaultFor:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",value:Zt.MsgSetSendEnabled.encode(this.toProto()).finish()})}static unpackAny(t){return Mr.fromProto(Zt.MsgSetSendEnabled.decode(t.value))}}class ls 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 ls(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 ls(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 ls(t.denom,t.exponent,t.aliases)}toProto(){const{denom:t,exponent:e,aliases:r}=this;return na.DenomUnit.fromPartial({denom:t,exponent:e,aliases:r})}}class Ae extends u{constructor(t,e,r,o,n,s,a,c){super(),this.description=t,this.denom_units=e,this.base=r,this.display=o,this.name=n,this.symbol=s,this.uri=a,this.uri_hash=c}static fromAmino(t){const{description:e,denom_units:r,base:o,display:n,name:s,symbol:a,uri:c,uri_hash:d}=t;return new Ae(e,r.map(ls.fromAmino),o,n,s,a,c,d)}toAmino(){const{description:t,denom_units:e,base:r,display:o,name:n,symbol:s,uri:a,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toAmino()),base:r,display:o,name:n,symbol:s,uri:a,uri_hash:c}}static fromData(t){const{description:e,denom_units:r,base:o,display:n,name:s,symbol:a,uri:c,uri_hash:d}=t;return new Ae(e,r.map(ls.fromData),o,n,s,a,c,d)}toData(){const{description:t,denom_units:e,base:r,display:o,name:n,symbol:s,uri:a,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toData()),base:r,display:o,name:n,symbol:s,uri:a,uri_hash:c}}static fromProto(t){return new Ae(t.description,t.denomUnits.map(ls.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:a,uri_hash:c}=this;return na.Metadata.fromPartial({description:t,denomUnits:e.map(d=>d.toProto()),base:r,display:o,name:n,symbol:s,uri:a,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,Ae.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,Ae.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,Ae.fromProto(t.metadata))}toProto(){const{authority:t,metadata:e}=this;return gc.MsgSetDenomMetadata.fromPartial({authority:t,metadata:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.bank.v1.MsgSetDenomMetadata",value:gc.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Ir.fromProto(gc.MsgSetDenomMetadata.decode(t.value))}}class Ks 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 Ks(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 Ks(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 yc.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:yc.MsgPayForBlobs.encode(this.toProto()).finish()})}static unpackAny(t){return Ks.fromProto(yc.MsgPayForBlobs.decode(t.value))}}class sa 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 sa(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 sa(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 xc.Blob.fromPartial({namespaceId:Buffer.from(t,"base64"),data:Buffer.from(e,"base64"),shareVersion:r,namespaceVersion:o})}}class Ln{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 Ln(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 Ln(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 Ln(t.extraBitsStored,Buffer.from(t.elems))}toProto(){return Mc.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})}}class Pe 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 Pe(parseInt(r),l.fromAmino(o),"","")}toAmino(){return{gas:F(this.gas_limit).toFixed(),amount:this.amount.toAmino()}}static fromData(e){return new Pe(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 Pe(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()}}}(i=>{i.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 a of r.signatures){const[c,d]=a.toModeInfoAndSignature();o.push(c),n.push(d)}const s=Mc.MultiSignature.encode(Mc.MultiSignature.fromPartial({signatures:n})).finish();return[new X(new X.Multi(r.bitarray,o)),s]}throw new Error("invalid signature descriptor")}}i.Descriptor=t,(e=>{class r{constructor(s,a){this.mode=s,this.signature=a}static fromData(s){return new r(Ot.signModeFromJSON(s.mode),s.signature)}toData(){const{mode:s,signature:a}=this;return{mode:Ot.signModeToJSON(s),signature:a}}}e.Single=r;class o{constructor(s,a){this.bitarray=s,this.signatures=a}static fromData(s){return new o(Ln.fromData(s.bitarray),s.signatures.map(a=>e.fromData(a)))}toData(){return{bitarray:this.bitarray.toData(),signatures:this.signatures.map(s=>s.toData())}}}e.Multi=o})(t=i.Descriptor||(i.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 Hn(t.value.msg.map(r=>exports.Msg.fromAmino(r)),t.value.memo,parseInt(t.value.timeout_height)),new be([],Pe.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(Hn.fromData(t.body),be.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(Hn.fromProto(t.body),be.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(Ln.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 Hn{constructor(t,e,r){this.messages=t,this.memo=e,this.timeout_height=r}static fromData(t){return new Hn(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 Hn(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 be{constructor(t,e){this.signer_infos=t,this.fee=e}static fromData(t){return new be(t.signer_infos.map(e=>jt.fromData(e)),Pe.fromData(t.fee))}toData(){return{fee:this.fee.toData(),signer_infos:this.signer_infos.map(t=>t.toData())}}static fromProto(t){return new be(t.signerInfos.map(e=>jt.fromProto(e)),Pe.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()})}}(i=>{i.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})}}i.Single=t;class e{constructor(o,n){this.bitarray=o,this.modeInfos=n}static fromData(o){return new e(Ln.fromData(o.bitarray),o.mode_infos.map(n=>i.fromData(n)))}toData(){return{bitarray:this.bitarray.toData(),mode_infos:this.modeInfos.map(o=>o.toData())}}static fromProto(o){return new e(Ln.fromProto(o.bitarray),o.modeInfos.map(n=>i.fromProto(n)))}toProto(){return Mt.ModeInfo_Multi.fromPartial({bitarray:this.bitarray.toProto(),modeInfos:this.modeInfos.map(o=>o.toProto())})}}i.Multi=e})(X||(X={}));class Wa 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 Wa(Dt.fromData(e),r.map(sa.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 Wa(Dt.fromBuffer(Buffer.from(t.tx)),t.blobs.map(sa.fromProto),t.typeId)}toProto(){const{tx:t,blobs:e,type_id:r}=this;return xc.BlobTx.fromPartial({tx:t.toBytes(),blobs:e.map(o=>o.toProto()),typeId:r})}toBytes(){return xc.BlobTx.encode(this.toProto()).finish()}}class ps 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 ps(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 ps(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 ps(Number(t.maxBytes),Number(t.maxGas))}toProto(){const{max_bytes:t,max_gas:e}=this;return Ya.BlockParams.fromPartial({maxBytes:BigInt(t),maxGas:BigInt(e)})}}class hs 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 hs(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 hs(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 hs(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 Ya.EvidenceParams.fromPartial({maxAgeNumBlocks:BigInt(t),maxAgeDuration:e.toProto(),maxBytes:BigInt(r)})}}class fs extends u{constructor(t){super(),this.pub_key_types=t}static fromAmino(t){return new fs(t.pub_key_types)}toAmino(){return{pub_key_types:this.pub_key_types}}static fromData(t){return new fs(t.pub_key_types)}toData(){return{pub_key_types:this.pub_key_types}}static fromProto(t){return new fs(t.pubKeyTypes)}toProto(){return Ya.ValidatorParams.fromPartial({pubKeyTypes:this.pub_key_types})}}class gs extends u{constructor(t){super(),this.vote_extensions_enable_height=t}static fromAmino(t){return new gs(parseInt(t.vote_extensions_enable_height))}toAmino(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromData(t){return new gs(parseInt(t.vote_extensions_enable_height))}toData(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromProto(t){return new gs(Number(t.voteExtensionsEnableHeight))}toProto(){return Ya.ABCIParams.fromPartial({voteExtensionsEnableHeight:BigInt(this.vote_extensions_enable_height)})}}class Sr 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 Sr(e,r?ps.fromAmino(r):void 0,o?hs.fromAmino(o):void 0,n?fs.fromAmino(n):void 0,s?gs.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 Sr(e,r?ps.fromData(r):void 0,o?hs.fromData(o):void 0,n?fs.fromData(n):void 0,s?gs.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 Sr(t.authority,ps.fromProto(t.block),hs.fromProto(t.evidence),fs.fromProto(t.validator),gs.fromProto(t.abci))}toProto(){const{authority:t,block:e,evidence:r,validator:o,abci:n}=this;return _c.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:_c.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Sr.fromProto(_c.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:ga.MsgVerifyInvariant.encode(this.toProto()).finish()})}static unpackAny(t){return Ur.fromProto(ga.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,I.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,I.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,I.fromProto(t.constantFee))}toProto(){const{authority:t,constant_fee:e}=this;return ga.MsgUpdateParams.fromPartial({authority:t,constantFee:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgUpdateParams",value:ga.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Cr.fromProto(ga.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 St.MsgSetWithdrawAddress.fromPartial({delegatorAddress:t,withdrawAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",value:St.MsgSetWithdrawAddress.encode(this.toProto()).finish()})}static unpackAny(t){return Er.fromProto(St.MsgSetWithdrawAddress.decode(t.value))}}class Br 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 Br(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 Br(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 Br(t.delegatorAddress,t.validatorAddress)}toProto(){const{delegator_address:t,validator_address:e}=this;return St.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t,validatorAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:St.MsgWithdrawDelegatorReward.encode(this.toProto()).finish()})}static unpackAny(t){return Br.fromProto(St.MsgWithdrawDelegatorReward.decode(t.value))}}class Or extends u{constructor(t){super(),this.validator_address=t}static fromAmino(t){const{value:{validator_address:e}}=t;return new Or(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 Or(e)}toData(){const{validator_address:t}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",validator_address:t}}static fromProto(t){return new Or(t.validatorAddress)}toProto(){const{validator_address:t}=this;return St.MsgWithdrawValidatorCommission.fromPartial({validatorAddress:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",value:St.MsgWithdrawValidatorCommission.encode(this.toProto()).finish()})}static unpackAny(t){return Or.fromProto(St.MsgWithdrawValidatorCommission.decode(t.value))}}class Nr 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 Nr(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 Nr(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 Nr(e.depositor,l.fromProto(e.amount))}toProto(){const{depositor:e,amount:r}=this;return St.MsgFundCommunityPool.fromPartial({amount:r.toProto(),depositor:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",value:St.MsgFundCommunityPool.encode(this.toProto()).finish()})}static unpackAny(e){return Nr.fromProto(St.MsgFundCommunityPool.decode(e.value))}}class ys extends u{constructor(t,e){super(),this.denom=t,this.weight=e}static fromAmino(t){const{denom:e,weight:r}=t;return new ys(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 ys(e,r)}toData(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromProto(t){return new ys(t.denom,t.weight)}toProto(){const{denom:t,weight:e}=this;return bu.RewardWeight.fromPartial({denom:t,weight:e})}}class zn 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 zn(e,r,o.map(ys.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 zn(e,r,o.map(ys.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 zn(t.communityTax,t.withdrawAddrEnabled,t.rewardWeights.map(ys.fromProto))}toProto(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return bu.Params.fromPartial({communityTax:t,withdrawAddrEnabled:e,rewardWeights:r.map(o=>o.toProto())})}}class Tr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Tr(e,zn.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 Tr(e,zn.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 Tr(t.authority,zn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ti.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgUpdateParams",value:Ti.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Tr.fromProto(Ti.MsgUpdateParams.decode(t.value))}}class Fr 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 Fr(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 Fr(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 Fr(e.authority,e.recipient,l.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return St.MsgCommunityPoolSpend.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",value:St.MsgCommunityPoolSpend.encode(this.toProto()).finish()})}static unpackAny(e){return Fr.fromProto(St.MsgCommunityPoolSpend.decode(e.value))}}class Rr 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 Rr(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 Rr(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 Rr(e.depositor,e.validatorAddress,e.denom,l.fromProto(e.amount))}toProto(){const{depositor:e,validator_address:r,denom:o,amount:n}=this;return Ti.MsgDepositValidatorRewardsPool.fromPartial({depositor:e,validatorAddress:r,denom:o,amount:n.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgDepositValidatorRewardsPool",value:Ti.MsgDepositValidatorRewardsPool.encode(this.toProto()).finish()})}static unpackAny(e){return Rr.fromProto(Ti.MsgDepositValidatorRewardsPool.decode(e.value))}}class qr 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 qr(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 qr(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 qr(Number(t.height),t.time,Number(t.power),t.consensusAddress)}toProto(){const{height:t,time:e,power:r,consensus_address:o}=this;return wc.Equivocation.fromPartial({height:BigInt(t),time:e,power:BigInt(r),consensusAddress:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.Equivocation",value:wc.Equivocation.encode(this.toProto()).finish()})}static unpackAny(t){return qr.fromProto(wc.Equivocation.decode(t.value))}}exports.Evidence=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/Equivocation":return qr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.evidence.v1beta1.Equivocation":return qr.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.evidence.v1beta1.Equivocation":return qr.unpackAny(o)}throw new Error(`Evidence type ${n} not recognized`)}i.fromProto=r})(exports.Evidence||(exports.Evidence={}));class $r extends u{constructor(t,e){super(),this.submitter=t,this.evidence=e}static fromAmino(t){const{value:{submitter:e,evidence:r}}=t;return new $r(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 $r(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 $r(t.submitter,exports.Evidence.fromProto(t.evidence))}toProto(){const{submitter:t,evidence:e}=this;return vc.MsgSubmitEvidence.fromPartial({submitter:t,evidence:e.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.MsgSubmitEvidence",value:vc.MsgSubmitEvidence.encode(this.toProto()).finish()})}static unpackAny(t){return $r.fromProto(vc.MsgSubmitEvidence.decode(t.value))}}class Lr extends u{constructor(t,e,r){super(),this.sender=t,this.code=e,this.value=r}static fromAmino(t){const{value:{sender:e,code:r,value:o}}=t;return new Lr(e,r,o)}toAmino(){const{sender:t,code:e,value:r}=this;return{type:"evm/MsgCreate",value:{sender:t,code:e,value:r}}}static fromData(t){const{sender:e,code:r,value:o}=t;return new Lr(e,r,o)}toData(){const{sender:t,code:e,value:r}=this;return{"@type":"/minievm.evm.v1.MsgCreate",sender:t,code:e,value:r}}static fromProto(t){return new Lr(t.sender,t.code,t.value)}toProto(){const{sender:t,code:e,value:r}=this;return Yt.MsgCreate.fromPartial({sender:t,code:e,value:r})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate",value:Yt.MsgCreate.encode(this.toProto()).finish()})}static unpackAny(t){return Lr.fromProto(Yt.MsgCreate.decode(t.value))}}class Hr extends u{constructor(t,e,r,o){super(),this.sender=t,this.code=e,this.salt=r,this.value=o}static fromAmino(t){const{value:{sender:e,code:r,salt:o,value:n}}=t;return new Hr(e,r,parseInt(o),n)}toAmino(){const{sender:t,code:e,salt:r,value:o}=this;return{type:"evm/MsgCreate2",value:{sender:t,code:e,salt:r.toFixed(),value:o}}}static fromData(t){const{sender:e,code:r,salt:o,value:n}=t;return new Hr(e,r,parseInt(o),n)}toData(){const{sender:t,code:e,salt:r,value:o}=this;return{"@type":"/minievm.evm.v1.MsgCreate2",sender:t,code:e,salt:r.toFixed(),value:o}}static fromProto(t){return new Hr(t.sender,t.code,Number(t.salt),t.value)}toProto(){const{sender:t,code:e,salt:r,value:o}=this;return Yt.MsgCreate2.fromPartial({sender:t,code:e,salt:BigInt(r),value:o})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate2",value:Yt.MsgCreate2.encode(this.toProto()).finish()})}static unpackAny(t){return Hr.fromProto(Yt.MsgCreate2.decode(t.value))}}class zr extends u{constructor(t,e,r,o){super(),this.sender=t,this.contract_addr=e,this.input=r,this.value=o}static fromAmino(t){const{value:{sender:e,contract_addr:r,input:o,value:n}}=t;return new zr(e,r,o,n)}toAmino(){const{sender:t,contract_addr:e,input:r,value:o}=this;return{type:"evm/MsgCall",value:{sender:t,contract_addr:e,input:r,value:o}}}static fromData(t){const{sender:e,contract_addr:r,input:o,value:n}=t;return new zr(e,r,o,n)}toData(){const{sender:t,contract_addr:e,input:r,value:o}=this;return{"@type":"/minievm.evm.v1.MsgCall",sender:t,contract_addr:e,input:r,value:o}}static fromProto(t){return new zr(t.sender,t.contractAddr,t.input,t.value)}toProto(){const{sender:t,contract_addr:e,input:r,value:o}=this;return Yt.MsgCall.fromPartial({sender:t,contractAddr:e,input:r,value:o})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCall",value:Yt.MsgCall.encode(this.toProto()).finish()})}static unpackAny(t){return zr.fromProto(Yt.MsgCall.decode(t.value))}}class Vn extends u{constructor(t,e,r,o,n){super(),this.extra_eips=t,this.allowed_publishers=e,this.allow_custom_erc20=r,this.allowed_custom_erc20s=o,this.fee_denom=n}static fromAmino(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:n,fee_denom:s}=t;return new Vn(e.map(parseInt),r,o,n,s)}toAmino(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}=this;return{extra_eips:t.map(s=>s.toFixed()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}}static fromData(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:n,fee_denom:s}=t;return new Vn(e.map(parseInt),r,o,n,s)}toData(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}=this;return{extra_eips:t.map(s=>s.toFixed()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}}static fromProto(t){return new Vn(t.extraEips.map(e=>Number(e)),t.allowedPublishers,t.allowCustomErc20,t.allowedCustomErc20s,t.feeDenom)}toProto(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}=this;return od.Params.fromPartial({extraEips:t.map(s=>BigInt(s)),allowedPublishers:e,allowCustomErc20:r,allowedCustomErc20s:o,feeDenom:n})}}class Vr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Vr(e,Vn.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 Vr(e,Vn.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 Vr(t.authority,Vn.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:"/minievm.evm.v1.MsgUpdateParams",value:Yt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vr.fromProto(Yt.MsgUpdateParams.decode(t.value))}}class It 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 It(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 It(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 It(l.fromProto(e.spendLimit),e.expiration)}toProto(){const{spend_limit:e,expiration:r}=this;return Tn.BasicAllowance.fromPartial({expiration:r,spendLimit:e==null?void 0:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",value:Tn.BasicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return It.fromProto(Tn.BasicAllowance.decode(e.value))}}class Jt 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:a}}=e;return new Jt(It.fromAmino(r),q.fromAmino(o),l.fromAmino(n),l.fromAmino(s),new Date(a))}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:a}=e;return new Jt(It.fromData(r),q.fromData(o),l.fromData(n),l.fromData(s),new Date(a))}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 Jt(It.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 Tn.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:Tn.PeriodicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return Jt.fromProto(Tn.PeriodicAllowance.decode(e.value))}}class Kr 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 Kr(e.type==="cosmos-sdk/BasicAllowance"?It.fromAmino(e):Jt.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 Kr(e["@type"]==="/cosmos.feegrant.v1beta1.BasicAllowance"?It.fromData(e):Jt.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 Kr((e==null?void 0:e.typeUrl)==="/cosmos.feegrant.v1beta1.BasicAllowance"?It.unpackAny(e):Jt.unpackAny(e),t.allowedMessages)}toProto(){const{allowance:t,allowed_messages:e}=this;return Tn.AllowedMsgAllowance.fromPartial({allowance:t.packAny(),allowedMessages:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",value:Tn.AllowedMsgAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Kr.fromProto(Tn.AllowedMsgAllowance.decode(t.value))}}exports.Allowance=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/BasicAllowance":return It.fromAmino(o);case"cosmos-sdk/PeriodicAllowance":return Jt.fromAmino(o);case"cosmos-sdk/AllowedMsgAllowance":return Kr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return Jt.fromData(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return It.fromData(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return Kr.fromData(o)}}i.fromData=e;function r(o){switch(o.typeUrl){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return Jt.unpackAny(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return It.unpackAny(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return Kr.unpackAny(o)}throw new Error(`not supported allowance ${o.typeUrl}`)}i.fromProto=r})(exports.Allowance||(exports.Allowance={}));class Gr 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 Gr(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 Gr(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 Gr(t.granter,t.grantee,exports.Allowance.fromProto(t.allowance))}toProto(){const{granter:t,grantee:e,allowance:r}=this;return Fi.MsgGrantAllowance.fromPartial({allowance:r.packAny(),grantee:e,granter:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",value:Fi.MsgGrantAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Gr.fromProto(Fi.MsgGrantAllowance.decode(t.value))}}class Wr extends u{constructor(t,e){super(),this.granter=t,this.grantee=e}static fromAmino(t){const{value:{granter:e,grantee:r}}=t;return new Wr(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 Wr(e,r)}toData(){const{granter:t,grantee:e}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",granter:t,grantee:e}}static fromProto(t){return new Wr(t.granter,t.grantee)}toProto(){const{granter:t,grantee:e}=this;return Fi.MsgRevokeAllowance.fromPartial({grantee:e,granter:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",value:Fi.MsgRevokeAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Wr.fromProto(Fi.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 Ri.MsgRegisterAccount.fromPartial({signer:t,recipient:e,channel:r})}packAny(){return f.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgRegisterAccount",value:Ri.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return jr.fromProto(Ri.MsgRegisterAccount.decode(t.value))}}class Jr extends u{constructor(t,e){super(),this.signer=t,this.address=e}static fromAmino(t){const{value:{signer:e,address:r}}=t;return new Jr(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 Jr(e,r)}toData(){const{signer:t,address:e}=this;return{"@type":"/noble.forwarding.v1.MsgClearAccount",signer:t,address:e}}static fromProto(t){return new Jr(t.signer,t.address)}toProto(){const{signer:t,address:e}=this;return Ri.MsgClearAccount.fromPartial({signer:t,address:e})}packAny(){return f.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgClearAccount",value:Ri.MsgClearAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Jr.fromProto(Ri.MsgClearAccount.decode(t.value))}}class Zr 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 Zr(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 Zr(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 Zr(Number(t.proposalId),t.proposer)}toProto(){const{proposal_id:t,proposer:e}=this;return Ut.MsgCancelProposal.fromPartial({proposalId:BigInt(t),proposer:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgCancelProposal",value:Ut.MsgCancelProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Zr.fromProto(Ut.MsgCancelProposal.decode(t.value))}}class Yr 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 Yr(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 Yr(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 Yr(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Xt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",value:Xt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Yr.fromProto(Xt.MsgDeposit.decode(e.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/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 Xr(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 Xr(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Ut.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgDeposit",value:Ut.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Xr.fromProto(Ut.MsgDeposit.decode(e.value))}}class Qr extends u{constructor(t){super(),this.paramChanges=t}static fromAmino(t){return new Qr((t??[]).map(_s.fromAmino))}toAmino(){return this.paramChanges.map(t=>t.toAmino())}static fromData(t){return new Qr((t??[]).map(_s.fromData))}toData(){return this.paramChanges.map(t=>t.toData())}static fromProto(t){return new Qr((t??[]).map(_s.fromProto))}toProto(){return this.paramChanges.map(t=>t.toProto())}}class _s 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 _s(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 _s(e,r,o)}toData(){const{subspace:t,key:e,value:r}=this;return{subspace:t,key:e,value:r}}static fromProto(t){return new _s(t.subspace,t.key,t.value)}toProto(){const{subspace:t,key:e,value:r}=this;return $a.ParamChange.fromPartial({key:e,subspace:t,value:r})}}class to extends u{constructor(e,r,o){super();_(this,"changes");this.title=e,this.description=r,Array.isArray(o)?this.changes=Qr.fromData(o):this.changes=o}static fromAmino(e){const{value:{title:r,description:o,changes:n}}=e;return new to(r,o,Qr.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 to(r,o,Qr.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 to(e.title,e.description,Qr.fromProto(e.changes))}toProto(){const{title:e,description:r,changes:o}=this;return $a.ParameterChangeProposal.fromPartial({changes:o.toProto(),description:r,title:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:$a.ParameterChangeProposal.encode(this.toProto()).finish()})}static unpackAny(e){return to.fromProto($a.ParameterChangeProposal.decode(e.value))}}class eo extends u{constructor(t,e){super(),this.title=t,this.description=e}static fromAmino(t){const{value:{title:e,description:r}}=t;return new eo(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 eo(e,r)}toData(){const{title:t,description:e}=this;return{"@type":"/cosmos.gov.v1beta1.TextProposal",title:t,description:e}}static fromProto(t){return new eo(t.title,t.description)}toProto(){const{title:t,description:e}=this;return La.TextProposal.fromPartial({description:e,title:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:La.TextProposal.encode(this.toProto()).finish()})}static unpackAny(t){return eo.fromProto(La.TextProposal.decode(t.value))}}exports.Content=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/TextProposal":return eo.fromAmino(o);case"cosmos-sdk/ParameterChangeProposal":return to.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.gov.v1beta1.TextProposal":return eo.fromData(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return to.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.gov.v1beta1.TextProposal":return eo.unpackAny(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return to.unpackAny(o)}throw new Error(`Proposal content ${n} not recognized`)}i.fromProto=r})(exports.Content||(exports.Content={}));class Kn 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 Kn(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 Kn(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 Kn(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 Xa.TallyResult.fromPartial({tallyHeight:BigInt(t),totalStakingPower:e,totalVestingPower:r,v1TallyResult:ue.TallyResult.fromPartial({yesCount:o.yes_count,abstainCount:o.abstain_count,noCount:o.no_count,noWithVetoCount:o.no_with_veto_count})})}}class Ne extends u{constructor(e,r,o,n,s,a,c,d,g,v,b,k,E,N,K,Y,tt,S){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=a,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=E,this.summary=N,this.proposer=K,this.expedited=Y,this.emergency=tt,this.failed_reason=S,this.total_deposit=new l(c)}static fromAmino(e){const{id:r,messages:o,status:n,final_tally_result:s,submit_time:a,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:E,title:N,summary:K,proposer:Y,expedited:tt,emergency:S,failed_reason:ot}=e;return new Ne(parseInt(r),o.map(exports.Msg.fromAmino),ue.proposalStatusFromJSON(n),Kn.fromAmino(s),new Date(a),new Date(c),l.fromAmino(d),new Date(g),new Date(v),new Date(b),new Date(k),E,N,K,Y,tt,S,ot)}toAmino(){const{id:e,messages:r,status:o,final_tally_result:n,submit_time:s,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}=this;return{id:e.toFixed(),messages:r.map(ot=>ot.toAmino()),status:ue.proposalStatusToJSON(o),final_tally_result:n.toAmino(),submit_time:s.toISOString(),deposit_end_time:a.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:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}}static fromData(e){const{id:r,messages:o,status:n,final_tally_result:s,submit_time:a,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:E,title:N,summary:K,proposer:Y,expedited:tt,emergency:S,failed_reason:ot}=e;return new Ne(parseInt(r),o.map(exports.Msg.fromData),ue.proposalStatusFromJSON(n),Kn.fromData(s),new Date(a),new Date(c),l.fromData(d),new Date(g),new Date(v),new Date(b),new Date(k),E,N,K,Y,tt,S,ot)}toData(){const{id:e,messages:r,status:o,final_tally_result:n,submit_time:s,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}=this;return{id:e.toFixed(),messages:r.map(ot=>ot.toData()),status:ue.proposalStatusToJSON(o),final_tally_result:n.toData(),submit_time:s.toISOString(),deposit_end_time:a.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:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}}static fromProto(e){return new Ne(Number(e.id),e.messages.map(exports.Msg.fromProto),e.status,Kn.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:a,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}=this;return Xa.Proposal.fromPartial({id:BigInt(e),messages:r.map(ot=>ot.packAny()),status:o,finalTallyResult:n.toProto(),submitTime:s,depositEndTime:a,totalDeposit:c.toProto(),votingStartTime:d,votingEndTime:g,emergencyStartTime:v,emergencyNextTallyTime:b,metadata:k,title:E,summary:N,proposer:K,expedited:Y,emergency:tt,failedReason:S})}}(i=>{i.Status=ue.ProposalStatus})(Ne||(Ne={}));class ro 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 ro(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 ro(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 ro(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 Xt.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:Xt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return ro.fromProto(Xt.MsgSubmitProposal.decode(e.value))}}class oo extends u{constructor(e,r,o,n,s,a,c){super();_(this,"initial_deposit");this.messages=e,this.proposer=o,this.metadata=n,this.title=s,this.summary=a,this.expedited=c,this.initial_deposit=new l(r)}static fromAmino(e){const{value:{messages:r,initial_deposit:o,proposer:n,metadata:s,title:a,summary:c,expedited:d}}=e;return new oo(r.map(exports.Msg.fromAmino),l.fromAmino(o),n,s??"",a,c,d)}toAmino(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:a,expedited:c}=this;return{type:"cosmos-sdk/v1/MsgSubmitProposal",value:{messages:e.map(d=>d.toAmino()),initial_deposit:r.toAmino(),proposer:o,metadata:n&&n!==""?n:void 0,title:s,summary:a,expedited:c}}}static fromData(e){const{messages:r,initial_deposit:o,proposer:n,metadata:s,title:a,summary:c,expedited:d}=e;return new oo(r.map(exports.Msg.fromData),l.fromData(o),n,s,a,c,d)}toData(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:a,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:a,expedited:c}}static fromProto(e){return new oo(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:a,expedited:c}=this;return Ut.MsgSubmitProposal.fromPartial({messages:e.map(d=>d.packAny()),initialDeposit:r.toProto(),proposer:o,metadata:n,title:s,summary:a,expedited:c})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",value:Ut.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return oo.fromProto(Ut.MsgSubmitProposal.decode(e.value))}}class de 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 de(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 de(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 de(Number(t.proposalId),t.voter,t.option)}toProto(){const{proposal_id:t,voter:e,option:r}=this;return Xt.MsgVote.fromPartial({option:r,proposalId:BigInt(t),voter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVote",value:Xt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return de.fromProto(Xt.MsgVote.decode(t.value))}}(i=>{i.Option=La.VoteOption})(de||(de={}));class le 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 le(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 le(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 le(Number(t.proposalId),t.voter,t.option,t.metadata)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return Ut.MsgVote.fromPartial({proposalId:BigInt(t),voter:e,option:r,metadata:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVote",value:Ut.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return le.fromProto(Ut.MsgVote.decode(t.value))}}(i=>{i.Option=ue.VoteOption})(le||(le={}));class vs 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 vs(parseInt(e),r,o.map(s=>Tt.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 vs(parseInt(e),r,o.map(s=>Tt.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 vs(Number(t.proposalId),t.voter,t.options.map(e=>Tt.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return ue.Vote.fromPartial({options:r.map(n=>n.toProto()),proposalId:BigInt(t),voter:e,metadata:o})}}(i=>{i.Option=ue.VoteOption})(vs||(vs={}));class Tt extends u{constructor(t,e){super(),this.option=t,this.weight=e}static fromAmino(t){const{option:e,weight:r}=t;return new Tt(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 Tt(e,parseFloat(r))}toData(){const{option:t,weight:e}=this;return{option:t,weight:e.toString()}}static fromProto(t){return new Tt(t.option,parseFloat(t.weight))}toProto(){const{option:t,weight:e}=this;return ue.WeightedVoteOption.fromPartial({option:t,weight:e.toString()})}}class no 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 no(parseInt(e),r,o.map(n=>Tt.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 no(parseInt(e),r,o.map(n=>Tt.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 no(Number(t.proposalId),t.voter,t.options.map(e=>Tt.fromProto(e)))}toProto(){const{proposal_id:t,voter:e,options:r}=this;return Xt.MsgVoteWeighted.fromPartial({options:r.map(o=>o.toProto()),proposalId:BigInt(t),voter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",value:Xt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return no.fromProto(Xt.MsgVoteWeighted.decode(t.value))}}class so 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 so(parseInt(e),r,o.map(s=>Tt.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 so(parseInt(e),r,o.map(s=>Tt.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 so(Number(t.proposalId),t.voter,t.options.map(e=>Tt.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return Ut.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:Ut.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return so.fromProto(Ut.MsgVoteWeighted.decode(t.value))}}class Gs 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 Gs(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 Gs(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 Gs(t.moduleAddr,t.moduleName,t.creatorAddr)}toProto(){const{module_addr:t,module_name:e,creator_addr:r}=this;return Xa.Vesting.fromPartial({moduleAddr:t,moduleName:e,creatorAddr:r})}}class Gn extends u{constructor(e,r,o,n,s,a,c,d,g,v,b,k,E,N,K,Y,tt,S,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=a,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=E,this.burn_proposal_deposit_prevote=N,this.burn_vote_veto=K,this.min_deposit_ratio=Y,this.emergency_tally_interval=S,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:a,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:E,burn_vote_quorum:N,burn_proposal_deposit_prevote:K,burn_vote_veto:Y,min_deposit_ratio:tt,emergency_min_deposit:S,emergency_tally_interval:ot,low_threshold_functions:ut,vesting:L}=e;return new Gn(l.fromAmino(r),q.fromAmino(o),q.fromAmino(n),s,a,c,d,g,v,q.fromAmino(b),k,l.fromAmino(E),N,K,Y,tt,l.fromAmino(S),q.fromAmino(ot),ut,L?Gs.fromAmino(L):void 0)}toAmino(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:S,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:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt.toAmino(),emergency_tally_interval:S.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:a,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:E,burn_vote_quorum:N,burn_proposal_deposit_prevote:K,burn_vote_veto:Y,min_deposit_ratio:tt,emergency_min_deposit:S,emergency_tally_interval:ot,low_threshold_functions:ut,vesting:L}=e;return new Gn(l.fromData(r),q.fromData(o),q.fromData(n),s,a,c,d,g,v,q.fromData(b),k,l.fromData(E),N,K,Y,tt,l.fromData(S),q.fromData(ot),ut,L?Gs.fromData(L):void 0)}toData(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:S,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:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt.toData(),emergency_tally_interval:S.toData(),low_threshold_functions:ot,vesting:ut==null?void 0:ut.toData()}}static fromProto(e){return new Gn(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?Gs.fromProto(e.vesting):void 0)}toProto(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:S,low_threshold_functions:ot,vesting:ut}=this;return Xa.Params.fromPartial({minDeposit:e.toProto(),maxDepositPeriod:r.toProto(),votingPeriod:o.toProto(),quorum:n,threshold:s,vetoThreshold:a,minInitialDepositRatio:c,proposalCancelRatio:d,proposalCancelDest:g,expeditedVotingPeriod:v.toProto(),expeditedThreshold:b,expeditedMinDeposit:k.toProto(),burnVoteQuorum:E,burnProposalDepositPrevote:N,burnVoteVeto:K,minDepositRatio:Y,emergencyMinDeposit:tt.toProto(),emergencyTallyInterval:S.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,Gn.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,Gn.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,Gn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ac.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.gov.v1.MsgUpdateParams",value:Ac.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return io.fromProto(Ac.MsgUpdateParams.decode(t.value))}}class Gi 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 Gi(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 Gi(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 Gi(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return ue.Deposit.fromPartial({proposalId:BigInt(e),depositor:r,amount:o.toProto()})}}class Wi 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 Wi(parseInt(e),ws.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 Wi(parseInt(e),ws.fromData(r))}toData(){const{group_id:t,member:e}=this;return{group_id:t.toFixed(),member:e.toData()}}static fromProto(t){return new Wi(Number(t.groupId),ws.fromProto(t.member))}toProto(){const{group_id:t,member:e}=this;return V.GroupMember.fromPartial({groupId:BigInt(t),member:e.toProto()})}}class ws 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 ws(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 ws(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 ws(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 Ft 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 Ft(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 Ft(e,r,o)}toData(){const{address:t,weight:e,metadata:r}=this;return{address:t,weight:e,metadata:r}}static fromProto(t){return new Ft(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 ao 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 ao(e,r.map(Ft.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 ao(e,r.map(Ft.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 ao(t.admin,t.members.map(Ft.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 ao.fromProto(R.MsgCreateGroup.decode(t.value))}}class De 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 De(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 De(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 De(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 co extends u{constructor(t,e){super(),this.threshold=t,this.windows=e}static fromAmino(t){const{value:{threshold:e,windows:r}}=t;return new co(e,De.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 co(e,De.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 co(t.threshold,De.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 co.fromProto(V.ThresholdDecisionPolicy.decode(t.value))}}class uo extends u{constructor(t,e){super(),this.percentage=t,this.windows=e}static fromAmino(t){const{value:{percentage:e,windows:r}}=t;return new uo(e,De.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 uo(e,De.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 uo(t.percentage,De.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 uo.fromProto(V.PercentageDecisionPolicy.decode(t.value))}}exports.DecisionPolicy=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/ThresholdDecisionPolicy":return co.fromAmino(o);case"cosmos-sdk/PercentageDecisionPolicy":return uo.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.group.v1.ThresholdDecisionPolicy":return co.fromData(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return uo.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.group.v1.ThresholdDecisionPolicy":return co.unpackAny(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return uo.unpackAny(o)}throw new Error(`DecisionPolicy type ${n} not recognized`)}i.fromProto=r})(exports.DecisionPolicy||(exports.DecisionPolicy={}));class mo 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 mo(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 mo(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 mo(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 mo.fromProto(R.MsgCreateGroupPolicy.decode(t.value))}}class lo 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:a}}=t;return new lo(e,r.map(Ft.fromAmino),o,n,s,exports.DecisionPolicy.fromAmino(a))}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(a=>a.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:a}=t;return new lo(e,r.map(Ft.fromData),o,n,s,exports.DecisionPolicy.fromData(a))}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(a=>a.toData()),group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s.toData()}}static fromProto(t){return new lo(t.admin,t.members.map(Ft.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(a=>a.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 lo.fromProto(R.MsgCreateGroupWithPolicy.decode(t.value))}}class po 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 po(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 po(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 po(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 po.fromProto(R.MsgExec.decode(t.value))}}class pe 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 pe(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 pe(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 pe(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 pe.fromProto(R.MsgVote.decode(t.value))}}(i=>{i.Option=V.VoteOption,i.Exec=R.Exec})(pe||(pe={}));class ho 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 ho(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 ho(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 ho(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 ho.fromProto(R.MsgLeaveGroup.decode(t.value))}}class he extends u{constructor(t,e,r,o,n,s,a){super(),this.group_policy_address=t,this.proposers=e,this.metadata=r,this.messages=o,this.exec=n,this.title=s,this.summary=a}static fromAmino(t){const{value:{group_policy_address:e,proposers:r,metadata:o,messages:n,exec:s,title:a,summary:c}}=t;return new he(e,r,o,n.map(exports.Msg.fromAmino),R.execFromJSON(s),a,c)}toAmino(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:n,title:s,summary:a}=this;return{type:"cosmos-sdk/group/MsgSubmitProposal",value:{group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toAmino()),exec:R.execToJSON(n),title:s,summary:a}}}static fromData(t){const{group_policy_address:e,proposers:r,metadata:o,messages:n,exec:s,title:a,summary:c}=t;return new he(e,r,o,n.map(exports.Msg.fromData),R.execFromJSON(s),a,c)}toData(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:n,title:s,summary:a}=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:a}}static fromProto(t){return new he(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:a}=this;return R.MsgSubmitProposal.fromPartial({groupPolicyAddress:t,proposers:e,metadata:r,messages:o.map(c=>c.packAny()),exec:n,title:s,summary:a})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgSubmitProposal",value:R.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(t){return he.fromProto(R.MsgSubmitProposal.decode(t.value))}}(i=>{i.Exec=R.Exec})(he||(he={}));class fo 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 fo(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 fo(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 fo(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 fo.fromProto(R.MsgUpdateGroupAdmin.decode(t.value))}}class go 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 go(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 go(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 go(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 go.fromProto(R.MsgUpdateGroupPolicyDecisionPolicy.decode(t.value))}}class yo 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 yo(e,parseInt(r),o.map(Ft.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 yo(e,parseInt(r),o.map(Ft.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 yo(t.admin,Number(t.groupId),t.memberUpdates.map(Ft.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 yo.fromProto(R.MsgUpdateGroupMembers.decode(t.value))}}class _o 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 _o(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 _o(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 _o(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 _o.fromProto(R.MsgUpdateGroupMetadata.decode(t.value))}}class vo 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 vo(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 vo(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 vo(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 vo.fromProto(R.MsgUpdateGroupPolicyAdmin.decode(t.value))}}class wo 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 wo(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 wo(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 wo(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 wo.fromProto(R.MsgUpdateGroupPolicyMetadata.decode(t.value))}}class Ao 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:a}=t;return new Ao(parseInt(e),r,o,parseInt(n),s,new Date(a))}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:a}=t;return new Ao(parseInt(e),r,o,parseInt(n),s,new Date(a))}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 Ao(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 As extends u{constructor(t,e,r,o,n,s,a){super(),this.address=t,this.group_id=e,this.admin=r,this.metadata=o,this.version=n,this.decision_policy=s,this.created_at=a}static fromAmino(t){const{address:e,group_id:r,admin:o,metadata:n,version:s,decision_policy:a,created_at:c}=t;return new As(e,parseInt(r),o,n,parseInt(s),exports.DecisionPolicy.fromAmino(a),new Date(c))}toAmino(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:a}=this;return{address:t,group_id:e.toFixed(),admin:r,metadata:o,version:n.toFixed(),decision_policy:s.toAmino(),created_at:a.toISOString()}}static fromData(t){const{address:e,group_id:r,admin:o,metadata:n,version:s,decision_policy:a,created_at:c}=t;return new As(e,parseInt(r),o,n,parseInt(s),exports.DecisionPolicy.fromData(a),new Date(c))}toData(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:a}=this;return{address:t,group_id:e.toFixed(),admin:r,metadata:o,version:n.toFixed(),decision_policy:s.toData(),created_at:a.toISOString()}}static fromProto(t){return new As(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:a}=this;return V.GroupPolicyInfo.fromPartial({address:t,groupId:BigInt(e),admin:r,metadata:o,version:BigInt(n),decisionPolicy:s.packAny(),createdAt:a})}}class Wn extends u{constructor(t,e,r,o,n,s,a,c,d,g,v,b,k,E){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=a,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=E}static fromAmino(t){const{id:e,group_policy_address:r,metadata:o,proposers:n,submit_time:s,group_version:a,group_policy_version:c,status:d,final_tally_result:g,voting_period_end:v,executor_result:b,messages:k,title:E,summary:N}=t;return new Wn(parseInt(e),r,o,n,new Date(s),parseInt(a),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),E,N)}toAmino(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:E}=this;return{id:t.toFixed(),group_policy_address:e,metadata:r,proposers:o,submit_time:n.toISOString(),group_version:s.toFixed(),group_policy_version:a.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:E}}static fromData(t){const{id:e,group_policy_address:r,metadata:o,proposers:n,submit_time:s,group_version:a,group_policy_version:c,status:d,final_tally_result:g,voting_period_end:v,executor_result:b,messages:k,title:E,summary:N}=t;return new Wn(parseInt(e),r,o,n,new Date(s),parseInt(a),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),E,N)}toData(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:E}=this;return{id:t.toFixed(),group_policy_address:e,metadata:r,proposers:o,submit_time:n.toISOString(),group_version:s.toFixed(),group_policy_version:a.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:E}}static fromProto(t){var e,r,o,n;return new Wn(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:a,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:E}=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(a),status:c,finalTallyResult:N,votingPeriodEnd:g,executorResult:v,messages:b.map(K=>K.packAny()),title:k,summary:E})}}(i=>{i.Status=V.ProposalStatus,i.ExecutorResult=V.ProposalExecutorResult})(Wn||(Wn={}));class Te 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 Te(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 Te(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 Te(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})}}(i=>{i.Option=V.VoteOption})(Te||(Te={}));class Fe 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 Fe(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 Fe(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 Fe(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 Du.Fee.fromPartial({recvFee:e.toProto(),ackFee:r.toProto(),timeoutFee:o.toProto()})}}class Ws 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 Ws(e?Fe.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 Ws(t.fee?Fe.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 Qt.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:Qt.MsgPayPacketFee.encode(this.toProto()).finish()})}static unpackAny(t){return Ws.fromProto(Qt.MsgPayPacketFee.decode(t.value))}}class Re 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 Re(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 Re(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 Re(t.portId,t.channelId,Number(t.sequence))}toProto(){const{port_id:t,channel_id:e,sequence:r}=this;return ca.PacketId.fromPartial({portId:t,channelId:e,sequence:BigInt(r)})}}class qe 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 qe(e?Fe.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 qe(e?Fe.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 qe(t.fee?Fe.fromProto(t.fee):void 0,t.refundAddress,t.relayers)}toProto(){const{fee:t,refund_address:e,relayers:r}=this;return Du.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?Re.fromData(e):void 0,r?qe.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?Re.fromProto(t.packetId):void 0,t.packetFee?qe.fromProto(t.packetFee):void 0)}toProto(){const{packet_id:t,packet_fee:e}=this;return Qt.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:Qt.MsgPayPacketFeeAsync.encode(this.toProto()).finish()})}static unpackAny(t){return js.fromProto(Qt.MsgPayPacketFeeAsync.decode(t.value))}}class Js 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 Js(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 Js(t.portId,t.channelId,t.relayer,t.payee)}toProto(){const{port_id:t,channel_id:e,relayer:r,payee:o}=this;return Qt.MsgRegisterPayee.fromPartial({portId:t,channelId:e,relayer:r,payee:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterPayee",value:Qt.MsgRegisterPayee.encode(this.toProto()).finish()})}static unpackAny(t){return Js.fromProto(Qt.MsgRegisterPayee.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.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 Zs(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 Zs(t.portId,t.channelId,t.relayer,t.counterpartyPayee)}toProto(){const{port_id:t,channel_id:e,relayer:r,counterparty_payee:o}=this;return Qt.MsgRegisterCounterpartyPayee.fromPartial({portId:t,channelId:e,relayer:r,counterpartyPayee:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",value:Qt.MsgRegisterCounterpartyPayee.encode(this.toProto()).finish()})}static unpackAny(t){return Zs.fromProto(Qt.MsgRegisterCounterpartyPayee.decode(t.value))}}class Aa 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 Aa(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 Aa(e,r)}toData(){const{fee_version:t,app_version:e}=this;return{fee_version:t,app_version:e}}static fromProto(t){return new Aa(t.feeVersion,t.appVersion)}toProto(){const{fee_version:t,app_version:e}=this;return nd.Metadata.fromPartial({feeVersion:t,appVersion:e})}}class Pa 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 Pa(e?Re.fromAmino(e):void 0,r.map(o=>qe.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 Pa(e?Re.fromData(e):void 0,r.map(o=>qe.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 Pa(t.packetId?Re.fromProto(t.packetId):void 0,t.packetFees.map(e=>qe.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 Po 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 Po(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 Po(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 Po(t.authority,t.address,t.allowed)}toProto(){const{authority:t,address:e,allowed:r}=this;return qi.MsgUpdateACL.fromPartial({authority:t,address:e,allowed:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateACL",value:qi.MsgUpdateACL.encode(this.toProto()).finish()})}static unpackAny(t){return Po.fromProto(qi.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 ku.Params.fromPartial({defaultAllowed:this.default_allowed})}}class bo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new bo(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 bo(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 bo(t.authority,jn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return qi.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateParams",value:qi.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return bo.fromProto(qi.MsgUpdateParams.decode(t.value))}}class Ys extends u{constructor(t,e){super(),this.address=t,this.allowed=e}static fromAmino(t){const{address:e,allowed:r}=t;return new Ys(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 Ys(e,r)}toData(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromProto(t){return new Ys(t.address,t.allowed)}toProto(){const{address:t,allowed:e}=this;return ku.ACL.fromPartial({address:t,allowed:e})}}class Do extends u{constructor(e,r,o,n,s,a,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=a,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:a,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 Do(r,o,n,s,a,c,d?C.fromAmino(d):void 0,g,v)}toAmino(){const{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:a,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:a,timeout_height:(c==null?void 0:c.toAmino())??{},timeout_timestamp:d,memo:g}}}static fromData(e){const{source_port:r,source_channel:o,class_id:n,token_ids:s,sender:a,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 Do(r,o,n,s,a,c,g?C.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:a,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:a,timeout_height:c?c.toData():new C(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 Do(e.sourcePort,e.sourceChannel,e.classId,e.tokenIds,e.sender,e.receiver,e.timeoutHeight?C.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:a,timeout_height:c,timeout_timestamp:d,memo:g}=this;return $i.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,classId:o,tokenIds:n,sender:s,receiver:a,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:$i.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Do.fromProto($i.MsgTransfer.decode(e.value))}}class Jn 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 Jn(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 Jn(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 Jn(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return xu.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class ko extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new ko(e,Jn.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 ko(e,Jn.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 ko(t.authority,Jn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return $i.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgUpdateParams",value:$i.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ko.fromProto($i.MsgUpdateParams.decode(t.value))}}class ba extends u{constructor(t,e,r,o,n,s,a,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=a,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:a,sender:c,receiver:d,memo:g}=t;return new ba(e,r,o,n,s,a,c,d,g)}toAmino(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:a,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:a,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:a,sender:c,receiver:d,memo:g}=t;return new ba(e,r,o,n,s,a,c,d,g)}toData(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:a,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:a,receiver:c,memo:d}}static fromProto(t){return new ba(t.classId,t.classUri,t.classData,t.tokenIds,t.tokenUris,t.tokenData,t.sender,t.receiver,t.memo)}toProto(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:a,receiver:c,memo:d}=this;return sd.NonFungibleTokenPacketData.fromPartial({classId:t,classUri:e,classData:r,tokenIds:o,tokenUris:n,tokenData:s,sender:a,receiver:c,memo:d})}}class Xs 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 Xs(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 Xs(e,r)}toData(){const{path:t,base_class_id:e}=this;return{path:t,base_class_id:e}}static fromProto(t){return new Xs(t.path,t.baseClassId)}toProto(){const{path:t,base_class_id:e}=this;return xu.ClassTrace.fromPartial({path:t,baseClassId:e})}}class xo 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 xo(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 xo(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 xo(t.authority,t.channelId,t.portId,t.admin)}toProto(){const{authority:t,channel_id:e,port_id:r,admin:o}=this;return Li.MsgUpdateAdmin.fromPartial({authority:t,channelId:e,portId:r,admin:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdateAdmin",value:Li.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return xo.fromProto(Li.MsgUpdateAdmin.decode(t.value))}}class Mo 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 Mo(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 Mo(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 Mo(t.authority,t.channelId,t.portId,t.relayers)}toProto(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return Li.MsgUpdatePermissionedRelayers.fromPartial({authority:t,channelId:e,portId:r,relayers:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers",value:Li.MsgUpdatePermissionedRelayers.encode(this.toProto()).finish()})}static unpackAny(t){return Mo.fromProto(Li.MsgUpdatePermissionedRelayers.decode(t.value))}}class Ps 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 Ps(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 Ps(e,r)}toData(){const{port_id:t,channel_id:e}=this;return{port_id:t,channel_id:e}}static fromProto(t){return new Ps(t.portId,t.channelId)}toProto(){const{port_id:t,channel_id:e}=this;return ca.Counterparty.fromPartial({portId:t,channelId:e})}}class te 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 te(e,r,o?Ps.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 te(e,r,o?Ps.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 te(t.state,t.ordering,t.counterparty?Ps.fromProto(t.counterparty):void 0,t.connectionHops,t.version)}toProto(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:n}=this;return ca.Channel.fromPartial({state:t,ordering:e,counterparty:r==null?void 0:r.toProto(),connectionHops:o,version:n})}}class Qs 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 Qs(e,r?te.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 Qs(t.portId,t.channel?te.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 Qs.fromProto(J.MsgChannelOpenInit.decode(t.value))}}class ti 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 ti(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 ti(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 ti.fromProto(ft.MsgCreateClient.decode(e.value))}}class ei 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 ei(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 ei(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 ei.fromProto(ft.MsgUpdateClient.decode(t.value))}}class ri 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:a}=t;return new ri(e,r,o,n,s,a)}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 ri(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 ri.fromProto(ft.MsgUpgradeClient.decode(t.value))}}class oi 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 oi(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 oi(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 oi.fromProto(ft.MsgSubmitMisbehaviour.decode(t.value))}}class ni 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 ni(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 ni(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 ni.fromProto(ft.MsgRecoverClient.decode(t.value))}}class ke 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 ke(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 ke(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 ke(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,ke.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,ke.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,ke.fromProto(t.plan))}toProto(){const{authority:t,plan:e}=this;return Hi.MsgSoftwareUpgrade.fromPartial({authority:t,plan:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",value:Hi.MsgSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Io.fromProto(Hi.MsgSoftwareUpgrade.decode(t.value))}}class So extends u{constructor(t){super(),this.authority=t}static fromAmino(t){const{value:{authority:e}}=t;return new So(e)}toAmino(){const{authority:t}=this;return{type:"cosmos-sdk/MsgCancelUpgrade",value:{authority:t}}}static fromData(t){const{authority:e}=t;return new So(e)}toData(){const{authority:t}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",authority:t}}static fromProto(t){return new So(t.authority)}toProto(){const{authority:t}=this;return Hi.MsgCancelUpgrade.fromPartial({authority:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",value:Hi.MsgCancelUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return So.fromProto(Hi.MsgCancelUpgrade.decode(t.value))}}class si 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 si(ke.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 si(ke.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 si.fromProto(ft.MsgIBCSoftwareUpgrade.decode(t.value))}}class bs extends u{constructor(t){super(),this.allowed_clients=t}static fromAmino(t){const{allowed_clients:e}=t;return new bs(e)}toAmino(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromData(t){const{allowed_clients:e}=t;return new bs(e)}toData(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromProto(t){return new bs(t.allowedClients)}toProto(){const{allowed_clients:t}=this;return Ia.Params.fromPartial({allowedClients:t})}}class ii 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 ii(e,bs.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 ii(t.signer,bs.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 ii.fromProto(ft.MsgUpdateParams.decode(t.value))}}class Ds 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 Ds(r?C.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 Ds(r?C.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 Ds(e.height?C.fromProto(e.height):void 0,e.consensusState)}toProto(){const{height:e,consensus_state:r}=this;return Ia.ConsensusStateWithHeight.fromPartial({height:e==null?void 0:e.toProto(),consensusState:r})}}class Da 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 Da(e,r.map(o=>Ds.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 Da(e,r.map(o=>Ds.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 Da(t.clientId,t.consensusStates.map(e=>Ds.fromProto(e)))}toProto(){const{client_id:t,consensus_states:e}=this;return Ia.ClientConsensusStates.fromPartial({clientId:t,consensusStates:e.map(r=>r.toProto())})}}class ji 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 ji(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 ji(e,r)}toData(){const{client_id:t,client_state:e}=this;return{client_id:t,client_state:e}}static fromProto(t){return new ji(t.clientId,t.clientState)}toProto(){const{client_id:t,client_state:e}=this;return Ia.IdentifiedClientState.fromPartial({clientId:t,clientState:e})}}class ks extends u{constructor(t,e){super(),this.height=t,this.timestamp=e}static fromAmino(t){const{height:e,timestamp:r}=t;return new ks(C.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 ks(C.fromData(e),parseInt(r))}toData(){const{height:t,timestamp:e}=this;return{height:t.toData(),timestamp:e.toFixed()}}static fromProto(t){return new ks(C.fromProto(t.height),Number(t.timestamp))}toProto(){const{height:t,timestamp:e}=this;return ca.Timeout.fromPartial({height:t.toProto(),timestamp:BigInt(e)})}}class ai extends u{constructor(t){super(),this.upgrade_timeout=t}static fromAmino(t){return new ai(ks.fromAmino(t.upgrade_timeout))}toAmino(){return{upgrade_timeout:this.upgrade_timeout.toAmino()}}static fromData(t){return new ai(ks.fromData(t.upgrade_timeout))}toData(){return{upgrade_timeout:this.upgrade_timeout.toData()}}static fromProto(t){return new ai(ks.fromProto(t.upgradeTimeout))}toProto(){return ca.Params.fromPartial({upgradeTimeout:this.upgrade_timeout.toProto()})}}class zt extends u{constructor(t,e,r,o,n,s,a,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=a,this.timeout_timestamp=c}static fromAmino(t){const{sequence:e,source_port:r,source_channel:o,destination_port:n,destination_channel:s,data:a,timeout_height:c,timeout_timestamp:d}=t;return new zt(e,r,o,n,s,a,c?C.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:a,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:a==null?void 0:a.toAmino(),timeout_timestamp:c}}static fromData(t){const{sequence:e,source_port:r,source_channel:o,destination_port:n,destination_channel:s,data:a,timeout_height:c,timeout_timestamp:d}=t;return new zt(e,r,o,n,s,a,c?C.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:a,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:a==null?void 0:a.toData(),timeout_timestamp:c}}static fromProto(t){return new zt(Number(t.sequence),t.sourcePort,t.sourceChannel,t.destinationPort,t.destinationChannel,Buffer.from(t.data).toString("base64"),t.timeoutHeight?C.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:a,timeout_timestamp:c}=this;return ca.Packet.fromPartial({sequence:BigInt(t),sourcePort:e,sourceChannel:r,destinationPort:o,destinationChannel:n,data:Buffer.from(s,"base64"),timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:BigInt(c)})}}class xs extends u{constructor(t){super(),this.key_prefix=t}static fromAmino(t){const{key_prefix:e}=t;return new xs(e)}toAmino(){const{key_prefix:t}=this;return{key_prefix:t}}static fromData(t){const{key_prefix:e}=t;return new xs(e)}toData(){const{key_prefix:t}=this;return{key_prefix:t}}static fromProto(t){return new xs(Buffer.from(t.keyPrefix).toString("base64"))}toProto(){const{key_prefix:t}=this;return Mu.MerklePrefix.fromPartial({keyPrefix:Buffer.from(t,"base64")})}}class ja 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 ja(t.hash)}toData(){return{hash:this.hash}}static fromProto(t){return new ja(Buffer.from(t.hash).toString("base64"))}toProto(){return Mu.MerkleRoot.fromPartial({hash:Buffer.from(this.hash,"base64")})}}class ee 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 ee(e,r,o?xs.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 ee(e,r,o?xs.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 ee(t.clientId,t.connectionId,t.prefix?xs.fromProto(t.prefix):void 0)}toProto(){const{client_id:t,connection_id:e,prefix:r}=this;return ce.Counterparty.fromPartial({clientId:t,connectionId:e,prefix:r==null?void 0:r.toProto()})}}class Rt extends u{constructor(t,e){super(),this.identifier=t,this.features=e}static fromAmino(t){const{identifier:e,features:r}=t;return new Rt(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 Rt(e,r)}toData(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromProto(t){return new Rt(t.identifier,t.features)}toProto(){const{identifier:t,features:e}=this;return ce.Version.fromPartial({identifier:t,features:e})}}class ci 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:a}=t;return new ci(e,r,o.map(Rt.fromAmino),ce.stateFromJSON(n),s?ee.fromAmino(s):void 0,parseInt(a))}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(a=>a.toAmino()),state:ce.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:a}=t;return new ci(e,r,o.map(Rt.fromData),ce.stateFromJSON(n),s?ee.fromData(s):void 0,parseInt(a))}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(a=>a.toData()),state:ce.stateToJSON(o),counterparty:n==null?void 0:n.toData(),delay_period:s.toFixed()}}static fromProto(t){return new ci(t.id,t.clientId,t.versions.map(Rt.fromProto),t.state,t.counterparty?ee.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 ce.IdentifiedConnection.fromPartial({id:t,clientId:e,versions:r.map(a=>a.toProto()),state:o,counterparty:n==null?void 0:n.toProto(),delayPeriod:BigInt(s)})}}class ui 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 ui(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 ui(parseInt(e))}toData(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toFixed()}}static fromProto(t){return new ui(Number(t.maxExpectedTimePerBlock))}toProto(){const{max_expected_time_per_block:t}=this;return ce.Params.fromPartial({maxExpectedTimePerBlock:BigInt(t)})}}class mi extends u{constructor(t,e,r,o,n,s,a){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=a}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,previous_channel_id:r,channel:o,counterparty_version:n,proof_init:s,proof_height:a,signer:c}=t;return new mi(e,r,o?te.fromData(o):void 0,n,s,a?C.fromData(a):void 0,c)}toData(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:n,proof_height:s,signer:a}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenTry",port_id:t,previous_channel_id:e,channel:r==null?void 0:r.toData(),counterparty_version:o,proof_init:n,proof_height:s==null?void 0:s.toData(),signer:a}}static fromProto(t){return new mi(t.portId,t.previousChannelId,t.channel?te.fromProto(t.channel):void 0,t.counterpartyVersion,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?C.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:a}=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:a})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",value:J.MsgChannelOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return mi.fromProto(J.MsgChannelOpenTry.decode(t.value))}}class di 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 di(e,r,o,n?C.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 di(t.portId,t.channelId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?C.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 di.fromProto(J.MsgChannelOpenConfirm.decode(t.value))}}class li extends u{constructor(t,e,r,o,n,s,a){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=a}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel_id:r,counterparty_channel_id:o,counterparty_version:n,proof_try:s,proof_height:a,signer:c}=t;return new li(e,r,o,n,s,a?C.fromData(a):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:a}=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:a}}static fromProto(t){return new li(t.portId,t.channelId,t.counterpartyChannelId,t.counterpartyVersion,Buffer.from(t.proofTry).toString("base64"),t.proofHeight?C.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:a}=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:a})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",value:J.MsgChannelOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return li.fromProto(J.MsgChannelOpenAck.decode(t.value))}}class pi 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 pi(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 pi(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 pi.fromProto(J.MsgChannelCloseInit.decode(t.value))}}class hi 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 hi(e,r,o,n?C.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 hi(t.portId,t.channelId,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?C.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 hi.fromProto(J.MsgChannelCloseConfirm.decode(t.value))}}class fi 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 fi(e?zt.fromData(e):void 0,r,o?C.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 fi(t.packet?zt.fromProto(t.packet):void 0,Buffer.from(t.proofCommitment).toString("base64"),t.proofHeight?C.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 fi.fromProto(J.MsgRecvPacket.decode(t.value))}}class gi 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 gi(e?zt.fromData(e):void 0,o,r,n?C.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 gi(t.packet?zt.fromProto(t.packet):void 0,Buffer.from(t.acknowledgement).toString("base64"),Buffer.from(t.proofAcked).toString("base64"),t.proofHeight?C.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 gi.fromProto(J.MsgAcknowledgement.decode(t.value))}}class yi 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 yi(e?zt.fromData(e):void 0,r,o?C.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 yi(t.packet?zt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),t.proofHeight?C.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 yi.fromProto(J.MsgTimeout.decode(t.value))}}class _i 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:a}=t;return new _i(e?zt.fromData(e):void 0,o,r,n?C.fromData(n):void 0,parseInt(s),a)}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 _i(t.packet?zt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),Buffer.from(t.proofClose).toString("base64"),t.proofHeight?C.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 _i.fromProto(J.MsgTimeoutOnClose.decode(t.value))}}class vi 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 vi(e,ai.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 vi(t.authority,ai.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 vi.fromProto(J.MsgUpdateParams.decode(t.value))}}class Ji 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 Ji(e,ee.fromData(r),o?Rt.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 Ji(t.clientId,ee.fromProto(t.counterparty),t.version?Rt.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 Ct.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:Ct.MsgConnectionOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return Ji.fromProto(Ct.MsgConnectionOpenInit.decode(t.value))}}class Zi extends u{constructor(t,e,r,o,n,s,a,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=a,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:a,proof_init:c,proof_client:d,proof_consensus:g,consensus_height:v,signer:b}=t;return new Zi(e,r,o?ee.fromData(o):void 0,parseInt(n),s.map(k=>Rt.fromData(k)),a?C.fromData(a):void 0,Buffer.from(c).toString("base64"),Buffer.from(d).toString("base64"),Buffer.from(g).toString("base64"),v?C.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:a,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:a,proof_client:c,proof_consensus:d,consensus_height:g==null?void 0:g.toData(),signer:v}}static fromProto(t){return new Zi(t.clientId,t.clientState,t.counterparty?ee.fromProto(t.counterparty):void 0,Number(t.delayPeriod),t.counterpartyVersions.map(e=>Rt.fromProto(e)),t.proofHeight?C.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?C.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:a,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=this;return Ct.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(a,"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:Ct.MsgConnectionOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return Zi.fromProto(Ct.MsgConnectionOpenTry.decode(t.value))}}class Yi 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 Yi(e,r,o?C.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 Yi(t.connectionId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?C.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{connection_id:t,proof_ack:e,proof_height:r,signer:o}=this;return Ct.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:Ct.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return Yi.fromProto(Ct.MsgConnectionOpenConfirm.decode(t.value))}}class Xi extends u{constructor(t,e,r,o,n,s,a,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=a,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:a,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=t;return new Xi(e,r,o?Rt.fromData(o):void 0,n,s?C.fromData(s):void 0,a,c,d,g?C.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:a,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:a,proof_consensus:c,consensus_height:d==null?void 0:d.toData(),signer:g}}static fromProto(t){return new Xi(t.connectionId,t.counterpartyConnectionId,t.version?Rt.fromProto(t.version):void 0,t.clientState,t.proofHeight?C.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?C.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:a,proof_consensus:c,consensus_height:d,signer:g}=this;return Ct.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(a,"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:Ct.MsgConnectionOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return Xi.fromProto(Ct.MsgConnectionOpenAck.decode(t.value))}}class Qi 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 Qi(e,ui.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 Qi(t.signer,ui.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Ct.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgUpdateParams",value:Ct.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Qi.fromProto(Ct.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 zi.MsgRegisterAccount.fromPartial({owner:t,connectionId:e,version:r,ordering:o})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgRegisterAccount",value:zi.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Uo.fromProto(zi.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 zi.MsgSubmitTx.fromPartial({owner:t,connectionId:e,msg:r==null?void 0:r.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgSubmitTx",value:zi.MsgSubmitTx.encode(this.toProto()).finish()})}static unpackAny(t){return Co.fromProto(zi.MsgSubmitTx.decode(t.value))}}class Bt extends u{constructor(t,e){super(),this.Base=t,this.Quote=e}toString(){return`${this.Base}/${this.Quote}`}static fromAmino(t){return new Bt(t.Base,t.Quote)}toAmino(){return{Base:this.Base,Quote:this.Quote}}static fromData(t){return new Bt(t.Base,t.Quote)}toData(){return{Base:this.Base,Quote:this.Quote}}static fromProto(t){return new Bt(t.Base,t.Quote)}toProto(){return ad.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(Bt.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(Bt.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(Bt.fromProto))}toProto(){const{authority:t,currency_pairs:e}=this;return Vi.MsgAddCurrencyPairs.fromPartial({authority:t,currencyPairs:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgAddCurrencyPairs",value:Vi.MsgAddCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Eo.fromProto(Vi.MsgAddCurrencyPairs.decode(t.value))}}class Bo 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 Bo(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 Bo(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 Bo(t.authority,t.currencyPairIds)}toProto(){const{authority:t,currency_pair_ids:e}=this;return Vi.MsgRemoveCurrencyPairs.fromPartial({authority:t,currencyPairIds:e})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgRemoveCurrencyPairs",value:Vi.MsgRemoveCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Bo.fromProto(Vi.MsgRemoveCurrencyPairs.decode(t.value))}}class ta 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 ta(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 ta(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 ta(t.price,t.blockTimestamp,Number(t.blockHeight))}toProto(){const{price:t,block_timestamp:e,block_height:r}=this;return cd.QuotePrice.fromPartial({price:t,blockTimestamp:e,blockHeight:BigInt(r)})}}class Ms 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 Ms(e,r,o?Bt.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 Ms(e,r,o?Bt.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 Ms(t.name,t.offChainTicker,t.normalizeByPair?Bt.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 Cc.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(Bt.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(Bt.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(Bt.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 Cc.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(Ms.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(Ms.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(Ms.fromProto))}toProto(){const{ticker:t,provider_configs:e}=this;return Cc.Market.fromPartial({ticker:t.toProto(),providerConfigs:e.map(r=>r.toProto())})}}class Oo 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 Oo(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 Oo(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 Oo(t.authority,t.createMarkets.map(kt.fromProto))}toProto(){const{authority:t,create_markets:e}=this;return Et.MsgCreateMarkets.fromPartial({authority:t,createMarkets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgCreateMarkets",value:Et.MsgCreateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return Oo.fromProto(Et.MsgCreateMarkets.decode(t.value))}}class No 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 No(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 No(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 No(t.authority,t.updateMarkets.map(kt.fromProto))}toProto(){const{authority:t,update_markets:e}=this;return Et.MsgUpdateMarkets.fromPartial({authority:t,updateMarkets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpdateMarkets",value:Et.MsgUpdateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return No.fromProto(Et.MsgUpdateMarkets.decode(t.value))}}class To extends u{constructor(t,e){super(),this.authority=t,this.markets=e}static fromAmino(t){const{value:{authority:e,markets:r}}=t;return new To(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 To(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 To(t.authority,t.markets.map(kt.fromProto))}toProto(){const{authority:t,markets:e}=this;return Et.MsgUpsertMarkets.fromPartial({authority:t,markets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpsertMarkets",value:Et.MsgUpsertMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return To.fromProto(Et.MsgUpsertMarkets.decode(t.value))}}class Fo 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 Fo(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 Fo(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 Fo(t.removeAddresses,t.admin)}toProto(){const{remove_addresses:t,admin:e}=this;return Et.MsgRemoveMarketAuthorities.fromPartial({removeAddresses:t,admin:e})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgRemoveMarketAuthorities",value:Et.MsgRemoveMarketAuthorities.encode(this.toProto()).finish()})}static unpackAny(t){return Fo.fromProto(Et.MsgRemoveMarketAuthorities.decode(t.value))}}class Zn extends u{constructor(t,e){super(),this.market_authorities=t,this.admin=e}static fromAmino(t){return new Zn(t.market_authorities,t.admin)}toAmino(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromData(t){return new Zn(t.market_authorities,t.admin)}toData(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromProto(t){return new Zn(t.marketAuthorities,t.admin)}toProto(){const{market_authorities:t,admin:e}=this;return ud.Params.fromPartial({marketAuthorities:t,admin:e})}}class Ro extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ro(e,Zn.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 Ro(e,Zn.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 Ro(t.authority,Zn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Et.MsgParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgParams",value:Et.MsgParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ro.fromProto(Et.MsgParams.decode(t.value))}}class fe 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 fe(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===Gt.UpgradePolicy.UNSPECIFIED?void 0:r}}}static fromData(t){const{sender:e,code_bytes:r,upgrade_policy:o}=t;return new fe(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 fe(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 fe.fromProto(H.MsgPublish.decode(t.value))}}(i=>{i.Policy=Gt.UpgradePolicy})(fe||(fe={}));class qo extends u{constructor(e,r,o,n,s=[],a=[]){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=a}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}}=e;return new qo(r,o,n,s,a??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}=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:a.length===0?void 0:a}}}static fromData(e){const{sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=e;return new qo(r,o,n,s,a,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}=this;return{"@type":"/initia.move.v1.MsgExecute",sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}}static fromProto(e){return new qo(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:a}=this;return H.MsgExecute.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:n,typeArgs:s,args:a.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 qo.fromProto(H.MsgExecute.decode(e.value))}}class $o extends u{constructor(e,r,o,n,s=[],a=[]){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=a}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}}=e;return new $o(r,o,n,s,a??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}=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:a.length===0?void 0:a}}}static fromData(e){const{sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=e;return new $o(r,o,n,s,a,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}=this;return{"@type":"/initia.move.v1.MsgExecuteJSON",sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}}static fromProto(e){return new $o(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:a}=this;return H.MsgExecuteJSON.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:n,typeArgs:s,args:a})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecuteJSON",value:H.MsgExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return $o.fromProto(H.MsgExecuteJSON.decode(e.value))}}class Lo 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 Lo(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 Lo(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 Lo(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 Lo.fromProto(H.MsgScript.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/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 Ho(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 Ho(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 Ho.fromProto(H.MsgScriptJSON.decode(e.value))}}class Yn 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 Yn(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 Yn(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 Yn(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 Gt.Params.fromPartial({baseDenom:t,baseMinGasPrice:e,contractSharedRevenueRatio:r,scriptEnabled:o,allowedPublishers:n})}}class zo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new zo(e,Yn.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 zo(e,Yn.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 zo(t.authority,Yn.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 zo.fromProto(H.MsgUpdateParams.decode(t.value))}}class Vo 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 Vo(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 Vo(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 Vo(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 Vo.fromProto(H.MsgWhitelist.decode(t.value))}}class Ko 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 Ko(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 Ko(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 Ko(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 Ko.fromProto(H.MsgDelist.decode(t.value))}}class Go extends u{constructor(e,r,o,n,s,a=[],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=a,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:n,module_name:s,function_name:a,type_args:c,args:d}}=e;return new Go(r,o,n,s,a,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=this;return{type:"move/MsgGovExecute",value:{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a.length===0?void 0:a,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:n,module_name:s,function_name:a,type_args:c,args:d}=e;return new Go(r,o,n,s,a,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecute",authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}}static fromProto(e){return new Go(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:a,args:c}=this;return H.MsgGovExecute.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:n,functionName:s,typeArgs:a,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 Go.fromProto(H.MsgGovExecute.decode(e.value))}}class Wo extends u{constructor(e,r,o,n,s,a=[],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=a,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:n,module_name:s,function_name:a,type_args:c,args:d}}=e;return new Wo(r,o,n,s,a,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=this;return{type:"move/MsgGovExecuteJSON",value:{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a.length===0?void 0:a,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:n,module_name:s,function_name:a,type_args:c,args:d}=e;return new Wo(r,o,n,s,a,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecuteJSON",authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}}static fromProto(e){return new Wo(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:a,args:c}=this;return H.MsgGovExecuteJSON.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:n,functionName:s,typeArgs:a,args:c})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecuteJSON",value:H.MsgGovExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return Wo.fromProto(H.MsgGovExecuteJSON.decode(e.value))}}class ge 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 ge(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===Gt.UpgradePolicy.UNSPECIFIED?void 0:o}}}static fromData(t){const{authority:e,sender:r,code_bytes:o,upgrade_policy:n}=t;return new ge(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 ge(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 ge.fromProto(H.MsgGovPublish.decode(t.value))}}(i=>{i.Policy=Gt.UpgradePolicy})(ge||(ge={}));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:a}}=e;return new jo(r,o,n,s??[],a??[])}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:a}=e;return new jo(r,o,n,s,a)}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(a=>Buffer.from(a,"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 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:a}}=e;return new Jo(r,o,n,s??[],a??[])}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:a}=e;return new Jo(r,o,n,s,a)}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 Jo(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 Jo.fromProto(H.MsgGovScriptJSON.decode(e.value))}}class Xn 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 Xn(e,r,o,n,Gt.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:Gt.upgradePolicyToJSON(n)}}static fromData(t){const{address:e,module_name:r,abi:o,raw_bytes:n,upgrade_policy:s}=t;return new Xn(e,r,o,n,Gt.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:Gt.upgradePolicyToJSON(n)}}static fromProto(t){return new Xn(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 Gt.Module.fromPartial({address:t,moduleName:e,abi:r,rawBytes:Buffer.from(o,"base64"),upgradePolicy:n})}}(i=>{i.Policy=Gt.UpgradePolicy})(Xn||(Xn={}));class Zo 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 Zo(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 Zo(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 Zo(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 Zo.fromProto(gt.MsgDelegate.decode(e.value))}}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/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 Yo(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 Yo(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 Yo.fromProto(gt.MsgUndelegate.decode(e.value))}}class Xo 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 Xo(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 Xo(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 Xo(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 Xo.fromProto(gt.MsgBeginRedelegate.decode(e.value))}}class dt extends u{constructor(e,r,o,n,s,a,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(a),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:a,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:a.toProto(),description:c.toProto(),unbondingHeight:BigInt(d),unbondingTime:g,commission:v.toProto(),votingPowers:b.toProto(),votingPower:k})}}(i=>{i.Status=Nt.BondStatus;class t extends u{constructor(n,s,a,c,d){super(),this.moniker=n,this.identity=s,this.website=a,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:a,details:c,security_contact:d}=this;return Nt.Description.fromPartial({details:c,identity:s,moniker:n,securityContact:d,website:a})}}i.Description=t;class e extends u{constructor(n,s,a){super(),this.rate=n,this.max_rate=s,this.max_change_rate=a}static fromAmino(n){const{rate:s,max_rate:a,max_change_rate:c}=n;return new e(s,a,c)}toAmino(){const{rate:n,max_rate:s,max_change_rate:a}=this;return{rate:n,max_rate:s,max_change_rate:a}}static fromData(n){const{rate:s,max_rate:a,max_change_rate:c}=n;return new e(s,a,c)}toData(){const{rate:n,max_rate:s,max_change_rate:a}=this;return{rate:n,max_rate:s,max_change_rate:a}}static fromProto(n){return new e(n.rate,n.maxRate,n.maxChangeRate)}toProto(){const{rate:n,max_rate:s,max_change_rate:a}=this;return Nt.CommissionRates.fromPartial({maxChangeRate:a,maxRate:s,rate:n})}}i.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})}}i.Commission=r})(dt||(dt={}));class Qo 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:a}}=e;return new Qo(r,dt.CommissionRates.fromAmino(o),n,_t.fromAmino(s),l.fromAmino(a))}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:a}=e;return new Qo(r,dt.CommissionRates.fromData(o),n,_t.fromData(s),l.fromData(a))}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 Qo(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 Qo.fromProto(gt.MsgCreateValidator.decode(e.value))}}class ye 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 ye(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 ye(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 ye(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 ye.fromProto(gt.MsgEditValidator.decode(t.value))}}(i=>{i.DESC_DO_NOT_MODIFY={moniker:"[do-not-modify]",website:"[do-not-modify]",identity:"[do-not-modify]",details:"[do-not-modify]",security_contact:"[do-not-modify]"}})(ye||(ye={}));class tn 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 tn(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 tn(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 tn(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 tn.fromProto(gt.MsgCancelUnbondingDelegation.decode(e.value))}}class Qn extends u{constructor(t,e,r,o,n,s,a){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=a}static fromAmino(t){const{value:{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:n,bond_denoms:s,min_voting_power:a,min_commission_rate:c}}=t;return new Qn(q.fromAmino(e),r,o,n,s,parseInt(a),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:a}=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:a}}}static fromData(t){const{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:n,bond_denoms:s,min_voting_power:a,min_commission_rate:c}=t;return new Qn(q.fromData(e),r,o,n,s,parseInt(a),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:a}=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:a}}static fromProto(t){return new Qn(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:a}=this;return Nt.Params.fromPartial({unbondingTime:t.toProto(),maxValidators:e,maxEntries:r,historicalEntries:o,bondDenoms:n,minVotingPower:BigInt(s),minCommissionRate:a})}}class en extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new en(e,Qn.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 en(e,Qn.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 en(t.authority,Qn.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 en.fromProto(gt.MsgUpdateParams.decode(t.value))}}class Ss 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 Ss(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 Ss(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 Ss(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 ae 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 ae(e,r,o,n.map(s=>ae.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 ae(e,r,o,n.map(s=>ae.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 ae(e.delegatorAddress,e.validatorDstAddress,e.validatorDstAddress,t.entries.map(r=>ae.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})})}}(i=>{class t extends u{constructor(o,n,s,a,c){super();_(this,"initial_balance");_(this,"shares_dst");_(this,"balance");this.creation_height=a,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:a,completion_time:c},balance:d}=o;return new t(l.fromAmino(n),l.fromAmino(d),l.fromAmino(s),a,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:a,completion_time:c},balance:d}=o;return new t(l.fromData(n),l.fromData(d),l.fromData(s),a,new Date(c))}toData(){return{redelegation_entry:{initial_balance:this.initial_balance.toData(),shares_dst:this.shares_dst.toData(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toData()}}static 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:a,completion_time:c}=this;return Nt.RedelegationEntryResponse.fromPartial({balance:n.toProto(),redelegationEntry:Nt.RedelegationEntry.fromPartial({completionTime:c,creationHeight:BigInt(a),initialBalance:o.toProto(),sharesDst:s.toProto()})})}}i.Entry=t})(ae||(ae={}));class Lt 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 Lt(e,r,o.map(n=>Lt.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 Lt(e,r,o.map(n=>Lt.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 Lt(t.delegatorAddress,t.validatorAddress,t.entries.map(e=>Lt.Entry.fromProto(e)))}}(i=>{class t extends u{constructor(o,n,s,a){super();_(this,"initial_balance");_(this,"balance");this.creation_height=s,this.completion_time=a,this.initial_balance=new l(o),this.balance=new l(n)}static fromAmino(o){const{initial_balance:n,balance:s,creation_height:a,completion_time:c}=o;return new t(l.fromAmino(n),l.fromAmino(s),parseInt(a),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:a,completion_time:c}=o;return new t(l.fromData(n),l.fromData(s),parseInt(a),new Date(c))}toData(){return{initial_balance:this.initial_balance.toData(),balance:this.balance.toData(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}}static 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:a}=this;return Nt.UnbondingDelegationEntry.fromPartial({balance:n.toProto(),completionTime:a,creationHeight:BigInt(s),initialBalance:o.toProto()})}}i.Entry=t})(Lt||(Lt={}));class rn 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 rn(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 rn(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 rn(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 rn.fromProto(st.MsgAddValidator.decode(t.value))}}class on 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 on(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 on(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 on(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 on.fromProto(st.MsgRemoveValidator.decode(t.value))}}class nn extends u{constructor(t,e,r,o,n,s,a,c){super(),this.sender=t,this.from=e,this.to=r,this.amount=o,this.sequence=n,this.height=s,this.base_denom=a,this.data=c}static fromAmino(t){const{value:{sender:e,from:r,to:o,amount:n,sequence:s,height:a,base_denom:c,data:d}}=t;return new nn(e,r,o,I.fromAmino(n),parseInt(s),parseInt(a),c,d)}toAmino(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:a,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:a,data:c}}}static fromData(t){const{sender:e,from:r,to:o,amount:n,sequence:s,height:a,base_denom:c,data:d}=t;return new nn(e,r,o,I.fromData(n),parseInt(s),parseInt(a),c,d)}toData(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:a,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:a,data:c}}static fromProto(t){return new nn(t.sender,t.from,t.to,I.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:a,data:c}=this;return st.MsgFinalizeTokenDeposit.fromPartial({sender:t,from:e,to:r,amount:o.toProto(),sequence:BigInt(n),height:BigInt(s),baseDenom:a,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 nn.fromProto(st.MsgFinalizeTokenDeposit.decode(t.value))}}class sn 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 sn(e,r,I.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 sn(e,r,I.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 sn(t.sender,t.to,I.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 sn.fromProto(st.MsgInitiateTokenWithdrawal.decode(t.value))}}class an extends u{constructor(t,e){super(),this.sender=t,this.messages=e}static fromAmino(t){const{value:{sender:e,messages:r}}=t;return new an(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 an(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 an(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 an.fromProto(st.MsgExecuteMessages.decode(t.value))}}class cn 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 cn(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 cn(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 cn(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 cn.fromProto(st.MsgSpendFeePool.decode(e.value))}}class un 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 un(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 un(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 un(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 un.fromProto(z.MsgRecordBatch.decode(t.value))}}class qt 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 qt(e,Le.batchInfo_ChainTypeFromJSON(r))}toAmino(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:Le.batchInfo_ChainTypeToJSON(e)}}static fromData(t){const{submitter:e,chain_type:r}=t;return new qt(e,Le.batchInfo_ChainTypeFromJSON(r))}toData(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:Le.batchInfo_ChainTypeToJSON(e)}}static fromProto(t){return new qt(t.submitter,t.chainType)}toProto(){const{submitter:t,chain_type:e}=this;return Le.BatchInfo.fromPartial({submitter:t,chainType:e})}}class xe extends u{constructor(t,e,r,o,n,s,a,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=a,this.metadata=c}static fromAmino(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:n,finalization_period:s,submission_start_height:a,oracle_enabled:c,metadata:d}=t;return new xe(e,r,qt.fromAmino(o),q.fromAmino(n),q.fromAmino(s),parseInt(a),c,d)}toAmino(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:a,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:a,metadata:c}}static fromData(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:n,finalization_period:s,submission_start_height:a,oracle_enabled:c,metadata:d}=t;return new xe(e,r,qt.fromData(o),q.fromData(n),q.fromData(s),parseInt(a),c,d)}toData(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:a,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:a,metadata:c}}static fromProto(t){return new xe(t.challenger,t.proposer,qt.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:a,metadata:c}=this;return Le.BridgeConfig.fromPartial({challenger:t,proposer:e,batchInfo:r.toProto(),submissionInterval:o.toProto(),finalizationPeriod:n.toProto(),submissionStartHeight:BigInt(s),oracleEnabled:a,metadata:c?Buffer.from(c,"base64"):void 0})}}class mn extends u{constructor(t,e){super(),this.creator=t,this.config=e}static fromAmino(t){const{value:{creator:e,config:r}}=t;return new mn(e,xe.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 mn(e,xe.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 mn(t.creator,xe.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 mn.fromProto(z.MsgCreateBridge.decode(t.value))}}class dn 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 dn(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 dn(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 dn(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 dn.fromProto(z.MsgProposeOutput.decode(t.value))}}class ln 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 ln(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 ln(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 ln(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 ln.fromProto(z.MsgDeleteOutput.decode(t.value))}}class pn 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 pn(e,parseInt(r),o,I.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 pn(e,parseInt(r),o,I.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 pn(t.sender,Number(t.bridgeId),t.to,I.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 pn.fromProto(z.MsgInitiateTokenDeposit.decode(t.value))}}class hn extends u{constructor(t,e,r,o,n,s,a,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=a,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:a,sequence:c,amount:d,version:g,storage_root:v,last_block_hash:b}}=t;return new hn(e,parseInt(r),parseInt(o),n,s,a,parseInt(c),I.fromAmino(d),g,v,b)}toAmino(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:n,to:s,sequence:a,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:a.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:a,sequence:c,amount:d,version:g,storage_root:v,last_block_hash:b}=t;return new hn(e,parseInt(r),parseInt(o),n,s,a,parseInt(c),I.fromData(d),g,v,b)}toData(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:n,to:s,sequence:a,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:a.toFixed(),amount:c.toData(),version:d,storage_root:g,last_block_hash:v}}static fromProto(t){return new hn(t.sender,Number(t.bridgeId),Number(t.outputIndex),t.withdrawalProofs.map(e=>Buffer.from(e).toString("base64")),t.from,t.to,Number(t.sequence),I.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:a,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(a),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 hn.fromProto(z.MsgFinalizeTokenWithdrawal.decode(t.value))}}class fn 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 fn(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 fn(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 fn(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 fn.fromProto(z.MsgUpdateProposer.decode(t.value))}}class gn 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 gn(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 gn(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 gn(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 gn.fromProto(z.MsgUpdateChallenger.decode(t.value))}}class yn 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 yn(e,parseInt(r),qt.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 yn(e,parseInt(r),qt.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 yn(t.authority,Number(t.bridgeId),qt.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 yn.fromProto(z.MsgUpdateBatchInfo.decode(t.value))}}class _n 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 _n(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 _n(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 _n(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 _n.fromProto(z.MsgUpdateOracleConfig.decode(t.value))}}class vn 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 vn(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 vn(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 vn(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 vn.fromProto(z.MsgUpdateMetadata.decode(t.value))}}class ts extends u{constructor(e){super();_(this,"registration_fee");this.registration_fee=new l(e)}static fromAmino(e){return new ts(l.fromAmino(e.value.registration_fee))}toAmino(){return{type:"ophost/Params",value:{registration_fee:this.registration_fee.toAmino()}}}static fromData(e){return new ts(l.fromData(e.registration_fee))}toData(){return{"@type":"/opinit.ophost.v1.Params",registration_fee:this.registration_fee.toData()}}static fromProto(e){return new ts(l.fromProto(e.registrationFee))}toProto(){return Le.Params.fromPartial({registrationFee:this.registration_fee.toProto()})}}class wn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new wn(e,ts.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 wn(e,ts.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 wn(t.authority,ts.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 wn.fromProto(z.MsgUpdateParams.decode(t.value))}}class Me 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 Me(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 Me(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 Me(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 Le.Output.fromPartial({outputRoot:Buffer.from(t,"base64"),l1BlockNumber:BigInt(e),l1BlockTime:r,l2BlockNumber:BigInt(o)})}}class ea 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 ea(qt.fromAmino(e),Me.fromAmino(r))}toAmino(){const{batch_info:t,output:e}=this;return{batch_info:t.toAmino(),output:e.toAmino()}}static fromData(t){const{batch_info:e,output:r}=t;return new ea(qt.fromData(e),Me.fromData(r))}toData(){const{batch_info:t,output:e}=this;return{batch_info:t.toData(),output:e.toData()}}static fromProto(t){return new ea(qt.fromProto(t.batchInfo),Me.fromProto(t.output))}toProto(){const{batch_info:t,output:e}=this;return Le.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,xe.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,xe.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,xe.fromProto(t.bridgeConfig))}toProto(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n}=this;return Ec.BridgeInfo.fromPartial({bridgeId:BigInt(t),bridgeAddr:e,l1ChainId:r,l1ClientId:o,bridgeConfig:n.toProto()})}}class An 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 An(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 An(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 An(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 An.fromProto(st.MsgSetBridgeInfo.decode(t.value))}}class Pn extends u{constructor(t,e,r){super(),this.sender=t,this.height=e,this.data=r}static fromAmino(t){return new Pn(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 Pn(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 Pn(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 Pn.fromProto(st.MsgUpdateOracle.decode(t.value))}}class es extends u{constructor(e,r,o,n,s,a){super();_(this,"min_gas_prices");this.max_validators=e,this.historical_entries=r,this.bridge_executors=n,this.admin=s,this.fee_whitelist=a,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:a,fee_whitelist:c}}=e;return new es(r,o,l.fromAmino(n),s,a,c)}toAmino(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:a}=this;return{type:"opchild/Params",value:{max_validators:e,historical_entries:r,min_gas_prices:o.toAmino(),bridge_executors:n,admin:s,fee_whitelist:a}}}static fromData(e){const{max_validators:r,historical_entries:o,min_gas_prices:n,bridge_executors:s,admin:a,fee_whitelist:c}=e;return new es(r,o,l.fromData(n),s,a,c)}toData(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:a}=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:a}}static fromProto(e){return new es(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:a}=this;return Ec.Params.fromPartial({maxValidators:e,historicalEntries:r,minGasPrices:o.toProto(),bridgeExecutors:n,admin:s,feeWhitelist:a})}}class bn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new bn(e,es.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 bn(e,es.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 bn(t.authority,es.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 bn.fromProto(st.MsgUpdateParams.decode(t.value))}}class wi 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 wi(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 wi(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 wi(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 Ec.Validator.fromPartial({moniker:t,operatorAddress:e,consensusPubkey:r.packAny(),consPower:BigInt(o)})}}class rs 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 rs(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 rs(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 rs(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 md.Params.fromPartial({rewardDenom:t,dilutionPeriod:e.toProto(),releaseRate:r,dilutionRate:o,releaseEnabled:n})}}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:"reward/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":"/initia.reward.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 Pc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.reward.v1.MsgUpdateParams",value:Pc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Dn.fromProto(Pc.MsgUpdateParams.decode(t.value))}}class kn extends u{constructor(t){super(),this.address=t}static fromAmino(t){const{value:{address:e}}=t;return new kn(e)}toAmino(){const{address:t}=this;return{type:"cosmos-sdk/MsgUnjail",value:{address:t}}}static fromData(t){const{address:e}=t;return new kn(e)}toData(){const{address:t}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:t}}static fromProto(t){return new kn(t.validatorAddr)}toProto(){const{address:t}=this;return Ki.MsgUnjail.fromPartial({validatorAddr:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:Ki.MsgUnjail.encode(this.toProto()).finish()})}static unpackAny(t){return kn.fromProto(Ki.MsgUnjail.decode(t.value))}}class os 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 os(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 os(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 os(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 Iu.Params.fromPartial({signedBlocksWindow:BigInt(t),minSignedPerWindow:Buffer.from(e),downtimeJailDuration:r.toProto(),slashFractionDoubleSign:Buffer.from(o),slashFractionDowntime:Buffer.from(n)})}}class xn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new xn(e,os.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 xn(e,os.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 xn(t.authority,os.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ki.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUpdateParams",value:Ki.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return xn.fromProto(Ki.MsgUpdateParams.decode(t.value))}}class Ai 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:a}=t;return new Ai(e,parseInt(r),parseInt(o),new Date(n),s,parseInt(a))}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:a}=t;return new Ai(e,parseInt(r),parseInt(o),new Date(n),s,parseInt(a))}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 Ai(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 Iu.ValidatorSigningInfo.fromPartial({address:t,startHeight:BigInt(e),indexOffset:BigInt(r),jailedUntil:o,tombstoned:n,missedBlocksCounter:BigInt(s)})}}class Mn extends u{constructor(t,e){super(),this.sender=t,this.subdenom=e}static fromAmino(t){const{value:{sender:e,subdenom:r}}=t;return new Mn(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 Mn(e,r)}toData(){const{sender:t,subdenom:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgCreateDenom",sender:t,subdenom:e}}static fromProto(t){return new Mn(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 Mn.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,I.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,I.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,I.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 Sn 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 Sn(e,I.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 Sn(e,I.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 Sn(t.sender,I.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 Sn.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,Ae.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,Ae.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,Ae.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 Bn 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 Bn(e,I.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 Bn(e,I.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 Bn(t.sender,I.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 Bn.fromProto(ct.MsgForceTransfer.decode(t.value))}}class ns 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 ns(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 ns(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 ns(l.fromProto(e.denomCreationFee),Number(e.denomCreationGasConsume))}toProto(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return dd.Params.fromPartial({denomCreationFee:e.toProto(),denomCreationGasConsume:BigInt(r)})}}class On extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new On(e,ns.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 On(e,ns.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 On(t.authority,ns.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 On.fromProto(ct.MsgUpdateParams.decode(t.value))}}exports.Msg=void 0;(i=>{function t(o){switch(o.type){case"block-sdk/x/auction/MsgAuctionBid":return He.fromAmino(o);case"block-sdk/x/auction/MsgUpdateParams":return ze.fromAmino(o);case"cosmos-sdk/x/auth/MsgUpdateParams":return Ve.fromAmino(o);case"cosmos-sdk/MsgGrant":return Pr.fromAmino(o);case"cosmos-sdk/MsgRevoke":return br.fromAmino(o);case"cosmos-sdk/MsgExec":return Dr.fromAmino(o);case"cosmos-sdk/MsgSend":return kr.fromAmino(o);case"cosmos-sdk/MsgMultiSend":return bt.fromAmino(o);case"cosmos-sdk/x/bank/MsgUpdateParams":return xr.fromAmino(o);case"cosmos-sdk/MsgSetSendEnabled":return Mr.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 Sr.fromAmino(o);case"cosmos-sdk/MsgModifyWithdrawAddress":return Er.fromAmino(o);case"cosmos-sdk/MsgWithdrawDelegationReward":return Br.fromAmino(o);case"cosmos-sdk/MsgWithdrawValidatorCommission":return Or.fromAmino(o);case"cosmos-sdk/MsgFundCommunityPool":return Nr.fromAmino(o);case"distribution/MsgUpdateParams":return Tr.fromAmino(o);case"cosmos-sdk/distr/MsgCommunityPoolSpend":return Fr.fromAmino(o);case"distr/MsgDepositValidatorRewardsPool":return Rr.fromAmino(o);case"cosmos-sdk/MsgSubmitEvidence":return $r.fromAmino(o);case"evm/MsgCreate":return Lr.fromAmino(o);case"evm/MsgCreate2":return Hr.fromAmino(o);case"evm/MsgCall":return zr.fromAmino(o);case"evm/MsgUpdateParams":return Vr.fromAmino(o);case"cosmos-sdk/MsgGrantAllowance":return Gr.fromAmino(o);case"cosmos-sdk/MsgRevokeAllowance":return Wr.fromAmino(o);case"noble/forwarding/RegisterAccount":return jr.fromAmino(o);case"noble/forwarding/ClearAccount":return Jr.fromAmino(o);case"cosmos-sdk/v1/MsgCancelProposal":return Zr.fromAmino(o);case"cosmos-sdk/MsgDeposit":return Yr.fromAmino(o);case"cosmos-sdk/v1/MsgDeposit":return Xr.fromAmino(o);case"cosmos-sdk/MsgSubmitProposal":return ro.fromAmino(o);case"cosmos-sdk/v1/MsgSubmitProposal":return oo.fromAmino(o);case"cosmos-sdk/MsgVote":return de.fromAmino(o);case"cosmos-sdk/v1/MsgVote":return le.fromAmino(o);case"cosmos-sdk/MsgVoteWeighted":return no.fromAmino(o);case"cosmos-sdk/v1/MsgVoteWeighted":return so.fromAmino(o);case"gov/MsgUpdateParams":return io.fromAmino(o);case"cosmos-sdk/MsgCreateGroup":return ao.fromAmino(o);case"cosmos-sdk/MsgCreateGroupPolicy":return mo.fromAmino(o);case"cosmos-sdk/MsgCreateGroupWithPolicy":return lo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupAdmin":return fo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupDecisionPolicy":return go.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMembers":return yo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMetadata":return _o.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyAdmin":return vo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyMetadata":return wo.fromAmino(o);case"cosmos-sdk/group/MsgExec":return po.fromAmino(o);case"cosmos-sdk/group/MsgLeaveGroup":return ho.fromAmino(o);case"cosmos-sdk/group/MsgSubmitProposal":return he.fromAmino(o);case"cosmos-sdk/group/MsgVote":return pe.fromAmino(o);case"ibchooks/MsgUpdateACL":return Po.fromAmino(o);case"ibchooks/MsgUpdateParams":return bo.fromAmino(o);case"nft-transfer/MsgTransfer":return Do.fromAmino(o);case"nft-transfer/MsgUpdateParams":return ko.fromAmino(o);case"ibc-perm/MsgUpdateAdmin":return xo.fromAmino(o);case"ibc-perm/MsgUpdatePermissionedRelayers":return Mo.fromAmino(o);case"cosmos-sdk/MsgTransfer":return Ar.fromAmino(o);case"intertx/MsgRegisterAccount":return Uo.fromAmino(o);case"intertx/MsgSubmitTx":return Co.fromAmino(o);case"connect/x/marketmap/MsgCreateMarkets":return Oo.fromAmino(o);case"connect/x/marketmap/MsgUpdateMarkets":return No.fromAmino(o);case"connect/x/marketmap/MsgUpsertMarkets":return To.fromAmino(o);case"connect/x/marketmap/MsgRemoveMarketAuthorities":return Fo.fromAmino(o);case"connect/x/marketmap/MsgParams":return Ro.fromAmino(o);case"move/MsgPublish":return fe.fromAmino(o);case"move/MsgExecute":return qo.fromAmino(o);case"move/MsgExecuteJSON":return $o.fromAmino(o);case"move/MsgScript":return Lo.fromAmino(o);case"move/MsgScriptJSON":return Ho.fromAmino(o);case"move/MsgUpdateParams":return zo.fromAmino(o);case"move/MsgWhitelist":return Vo.fromAmino(o);case"move/MsgDelist":return Ko.fromAmino(o);case"move/MsgGovExecute":return Go.fromAmino(o);case"move/MsgGovExecuteJSON":return Wo.fromAmino(o);case"move/MsgGovPublish":return ge.fromAmino(o);case"move/MsgGovScript":return jo.fromAmino(o);case"move/MsgGovScriptJSON":return Jo.fromAmino(o);case"mstaking/MsgDelegate":return Zo.fromAmino(o);case"mstaking/MsgUndelegate":return Yo.fromAmino(o);case"mstaking/MsgBeginRedelegate":return Xo.fromAmino(o);case"mstaking/MsgCreateValidator":return Qo.fromAmino(o);case"mstaking/MsgEditValidator":return ye.fromAmino(o);case"mstaking/MsgCancelUnbondingDelegation":return tn.fromAmino(o);case"mstaking/MsgUpdateParams":return en.fromAmino(o);case"opchild/MsgAddValidator":return rn.fromAmino(o);case"opchild/MsgRemoveValidator":return on.fromAmino(o);case"opchild/MsgFinalizeTokenDeposit":return nn.fromAmino(o);case"opchild/MsgInitiateTokenWithdrawal":return sn.fromAmino(o);case"opchild/MsgExecuteMessages":return an.fromAmino(o);case"opchild/MsgSpendFeePool":return cn.fromAmino(o);case"opchild/MsgSetBridgeInfo":return An.fromAmino(o);case"opchild/MsgUpdateOracle":return Pn.fromAmino(o);case"opchild/MsgUpdateParams":return bn.fromAmino(o);case"ophost/MsgRecordBatch":return un.fromAmino(o);case"ophost/MsgCreateBridge":return mn.fromAmino(o);case"ophost/MsgProposeOutput":return dn.fromAmino(o);case"ophost/MsgDeleteOutput":return ln.fromAmino(o);case"ophost/MsgInitiateTokenDeposit":return pn.fromAmino(o);case"ophost/MsgFinalizeTokenWithdrawal":return hn.fromAmino(o);case"ophost/MsgUpdateProposer":return fn.fromAmino(o);case"ophost/MsgUpdateChallenger":return gn.fromAmino(o);case"ophost/MsgUpdateBatchInfo":return yn.fromAmino(o);case"ophost/MsgUpdateOracleConfig":return _n.fromAmino(o);case"ophost/MsgUpdateMetadata":return vn.fromAmino(o);case"ophost/MsgUpdateParams":return wn.fromAmino(o);case"connect/x/oracle/MsgAddCurrencyPairs":return Eo.fromAmino(o);case"connect/x/oracle/MsgRemoveCurrencyPairs":return Bo.fromAmino(o);case"reward/MsgUpdateParams":return Dn.fromAmino(o);case"cosmos-sdk/MsgUnjail":return kn.fromAmino(o);case"cosmos-sdk/x/slashing/MsgUpdateParams":return xn.fromAmino(o);case"tokenfactory/MsgCreateDenom":return Mn.fromAmino(o);case"tokenfactory/MsgMint":return In.fromAmino(o);case"tokenfactory/MsgBurn":return Sn.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 Bn.fromAmino(o);case"tokenfactory/MsgUpdateParams":return On.fromAmino(o);case"cosmos-sdk/MsgSoftwareUpgrade":return Io.fromAmino(o);case"cosmos-sdk/MsgCancelUpgrade":return So.fromAmino(o);case"wasm/MsgStoreCode":return nr.fromAmino(o);case"wasm/MsgInstantiateContract":return sr.fromAmino(o);case"wasm/MsgInstantiateContract2":return ir.fromAmino(o);case"wasm/MsgExecuteContract":return ar.fromAmino(o);case"wasm/MsgMigrateContract":return cr.fromAmino(o);case"wasm/MsgUpdateAdmin":return ur.fromAmino(o);case"wasm/MsgClearAdmin":return mr.fromAmino(o);case"wasm/MsgUpdateInstantiateConfig":return dr.fromAmino(o);case"wasm/MsgUpdateParams":return lr.fromAmino(o);case"wasm/MsgSudoContract":return pr.fromAmino(o);case"wasm/MsgPinCodes":return hr.fromAmino(o);case"wasm/MsgUnpinCodes":return fr.fromAmino(o);case"wasm/MsgStoreAndInstantiateContract":return gr.fromAmino(o);case"wasm/MsgStoreAndMigrateContract":return yr.fromAmino(o);case"wasm/MsgAddCodeUploadParamsAddresses":return _r.fromAmino(o);case"wasm/MsgRemoveCodeUploadParamsAddresses":return vr.fromAmino(o);case"wasm/MsgUpdateContractLabel":return wr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/sdk.auction.v1.MsgAuctionBid":return He.fromData(o);case"/sdk.auction.v1.MsgUpdateParams":return ze.fromData(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return Ve.fromData(o);case"/cosmos.authz.v1beta1.MsgGrant":return Pr.fromData(o);case"/cosmos.authz.v1beta1.MsgRevoke":return br.fromData(o);case"/cosmos.authz.v1beta1.MsgExec":return Dr.fromData(o);case"/cosmos.bank.v1beta1.MsgSend":return kr.fromData(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return bt.fromData(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return xr.fromData(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Mr.fromData(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Ir.fromData(o);case"/celestia.blob.v1.MsgPayForBlobs":return Ks.fromData(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Sr.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 Br.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return Or.fromData(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return Nr.fromData(o);case"/initia.distribution.v1.MsgUpdateParams":return Tr.fromData(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return Fr.fromData(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return Rr.fromData(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return $r.fromData(o);case"/minievm.evm.v1.MsgCreate":return Lr.fromData(o);case"/minievm.evm.v1.MsgCreate2":return Hr.fromData(o);case"/minievm.evm.v1.MsgCall":return zr.fromData(o);case"/minievm.evm.v1.MsgUpdateParams":return Vr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return Gr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return Wr.fromData(o);case"/noble.forwarding.v1.MsgRegisterAccount":return jr.fromData(o);case"/noble.forwarding.v1.MsgClearAccount":return Jr.fromData(o);case"/cosmos.gov.v1.MsgCancelProposal":return Zr.fromData(o);case"/cosmos.gov.v1beta1.MsgDeposit":return Yr.fromData(o);case"/cosmos.gov.v1.MsgDeposit":return Xr.fromData(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return ro.fromData(o);case"/cosmos.gov.v1.MsgSubmitProposal":return oo.fromData(o);case"/cosmos.gov.v1beta1.MsgVote":return de.fromData(o);case"/cosmos.gov.v1.MsgVote":return le.fromData(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return no.fromData(o);case"/cosmos.gov.v1.MsgVoteWeighted":return so.fromData(o);case"/initia.gov.v1.MsgUpdateParams":return io.fromData(o);case"/cosmos.group.v1.MsgCreateGroup":return ao.fromData(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return mo.fromData(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return lo.fromData(o);case"/cosmos.group.v1.MsgExec":return po.fromData(o);case"/cosmos.group.v1.MsgLeaveGroup":return ho.fromData(o);case"/cosmos.group.v1.MsgSubmitProposal":return he.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return fo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return yo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return _o.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return vo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return go.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return wo.fromData(o);case"/cosmos.group.v1.MsgVote":return pe.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return Ws.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return js.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return Zs.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return Js.fromData(o);case"/initia.ibchooks.v1.MsgUpdateACL":return Po.fromData(o);case"/initia.ibchooks.v1.MsgUpdateParams":return bo.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Do.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return ko.fromData(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return xo.fromData(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return Mo.fromData(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Ar.fromData(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return zs.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return Qs.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return mi.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return di.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return li.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return pi.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return hi.fromData(o);case"/ibc.core.channel.v1.MsgRecvPacket":return fi.fromData(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return gi.fromData(o);case"/ibc.core.channel.v1.MsgTimeout":return yi.fromData(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return _i.fromData(o);case"/ibc.core.channel.v1.MsgUpdateParams":return vi.fromData(o);case"/ibc.core.client.v1.MsgCreateClient":return ti.fromData(o);case"/ibc.core.client.v1.MsgUpdateClient":return ei.fromData(o);case"/ibc.core.client.v1.MsgUpgradeClient":return ri.fromData(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return oi.fromData(o);case"/ibc.core.client.v1.MsgRecoverClient":return ni.fromData(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return si.fromData(o);case"/ibc.core.client.v1.MsgUpdateParams":return ii.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Ji.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Zi.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Yi.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Xi.fromData(o);case"/ibc.core.connection.v1.MsgUpdateParams":return Qi.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 Oo.fromData(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return No.fromData(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return To.fromData(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return Fo.fromData(o);case"/connect.marketmap.v2.MsgParams":return Ro.fromData(o);case"/initia.move.v1.MsgPublish":return fe.fromData(o);case"/initia.move.v1.MsgExecute":return qo.fromData(o);case"/initia.move.v1.MsgExecuteJSON":return $o.fromData(o);case"/initia.move.v1.MsgScript":return Lo.fromData(o);case"/initia.move.v1.MsgScriptJSON":return Ho.fromData(o);case"/initia.move.v1.MsgUpdateParams":return zo.fromData(o);case"/initia.move.v1.MsgWhitelist":return Vo.fromData(o);case"/initia.move.v1.MsgDelist":return Ko.fromData(o);case"/initia.move.v1.MsgGovExecute":return Go.fromData(o);case"/initia.move.v1.MsgGovExecuteJSON":return Wo.fromData(o);case"/initia.move.v1.MsgGovPublish":return ge.fromData(o);case"/initia.move.v1.MsgGovScript":return jo.fromData(o);case"/initia.move.v1.MsgGovScriptJSON":return Jo.fromData(o);case"/initia.mstaking.v1.MsgDelegate":return Zo.fromData(o);case"/initia.mstaking.v1.MsgUndelegate":return Yo.fromData(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return Xo.fromData(o);case"/initia.mstaking.v1.MsgCreateValidator":return Qo.fromData(o);case"/initia.mstaking.v1.MsgEditValidator":return ye.fromData(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return tn.fromData(o);case"/initia.mstaking.v1.MsgUpdateParams":return en.fromData(o);case"/opinit.opchild.v1.MsgAddValidator":return rn.fromData(o);case"/opinit.opchild.v1.MsgRemoveValidator":return on.fromData(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return nn.fromData(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return sn.fromData(o);case"/opinit.opchild.v1.MsgExecuteMessages":return an.fromData(o);case"/opinit.opchild.v1.MsgSpendFeePool":return cn.fromData(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return An.fromData(o);case"/opinit.opchild.v1.MsgUpdateOracle":return Pn.fromData(o);case"/opinit.opchild.v1.MsgUpdateParams":return bn.fromData(o);case"/opinit.ophost.v1.MsgRecordBatch":return un.fromData(o);case"/opinit.ophost.v1.MsgCreateBridge":return mn.fromData(o);case"/opinit.ophost.v1.MsgProposeOutput":return dn.fromData(o);case"/opinit.ophost.v1.MsgDeleteOutput":return ln.fromData(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return pn.fromData(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return hn.fromData(o);case"/opinit.ophost.v1.MsgUpdateProposer":return fn.fromData(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return gn.fromData(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return yn.fromData(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return _n.fromData(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return vn.fromData(o);case"/opinit.ophost.v1.MsgUpdateParams":return wn.fromData(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Eo.fromData(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Bo.fromData(o);case"/initia.reward.v1.MsgUpdateParams":return Dn.fromData(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return kn.fromData(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return xn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Mn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgMint":return In.fromData(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Sn.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 Bn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return On.fromData(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Io.fromData(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return So.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return nr.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return sr.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return ir.fromData(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return ar.fromData(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return cr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return ur.fromData(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return mr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return dr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return lr.fromData(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return pr.fromData(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return hr.fromData(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return fr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return gr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return yr.fromData(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return _r.fromData(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return vr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return wr.fromData(o)}}i.fromData=e;function r(o){switch(o.typeUrl){case"/sdk.auction.v1.MsgAuctionBid":return He.unpackAny(o);case"/sdk.auction.v1.MsgUpdateParams":return ze.unpackAny(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return Ve.unpackAny(o);case"/cosmos.authz.v1beta1.MsgGrant":return Pr.unpackAny(o);case"/cosmos.authz.v1beta1.MsgRevoke":return br.unpackAny(o);case"/cosmos.authz.v1beta1.MsgExec":return Dr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSend":return kr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return bt.unpackAny(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return xr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Mr.unpackAny(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Ir.unpackAny(o);case"/celestia.blob.v1.MsgPayForBlobs":return Ks.unpackAny(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Sr.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 Br.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return Or.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return Nr.unpackAny(o);case"/initia.distribution.v1.MsgUpdateParams":return Tr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return Fr.unpackAny(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return Rr.unpackAny(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return $r.unpackAny(o);case"/minievm.evm.v1.MsgCreate":return Lr.unpackAny(o);case"/minievm.evm.v1.MsgCreate2":return Hr.unpackAny(o);case"/minievm.evm.v1.MsgCall":return zr.unpackAny(o);case"/minievm.evm.v1.MsgUpdateParams":return Vr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return Gr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return Wr.unpackAny(o);case"/noble.forwarding.v1.MsgRegisterAccount":return jr.unpackAny(o);case"/noble.forwarding.v1.MsgClearAccount":return Jr.unpackAny(o);case"/cosmos.gov.v1.MsgCancelProposal":return Zr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgDeposit":return Yr.unpackAny(o);case"/cosmos.gov.v1.MsgDeposit":return Xr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return ro.unpackAny(o);case"/cosmos.gov.v1.MsgSubmitProposal":return oo.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVote":return de.unpackAny(o);case"/cosmos.gov.v1.MsgVote":return le.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return no.unpackAny(o);case"/cosmos.gov.v1.MsgVoteWeighted":return so.unpackAny(o);case"/initia.gov.v1.MsgUpdateParams":return io.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroup":return ao.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return mo.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return lo.unpackAny(o);case"/cosmos.group.v1.MsgExec":return po.unpackAny(o);case"/cosmos.group.v1.MsgLeaveGroup":return ho.unpackAny(o);case"/cosmos.group.v1.MsgSubmitProposal":return he.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return fo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return yo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return _o.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return vo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return go.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return wo.unpackAny(o);case"/cosmos.group.v1.MsgVote":return pe.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return Ws.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return js.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return Zs.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return Js.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateACL":return Po.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateParams":return bo.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Do.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return ko.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return xo.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return Mo.unpackAny(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Ar.unpackAny(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return zs.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return Qs.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return mi.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return di.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return li.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return pi.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return hi.unpackAny(o);case"/ibc.core.channel.v1.MsgRecvPacket":return fi.unpackAny(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return gi.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeout":return yi.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return _i.unpackAny(o);case"/ibc.core.channel.v1.MsgUpdateParams":return vi.unpackAny(o);case"/ibc.core.client.v1.MsgCreateClient":return ti.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateClient":return ei.unpackAny(o);case"/ibc.core.client.v1.MsgUpgradeClient":return ri.unpackAny(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return oi.unpackAny(o);case"/ibc.core.client.v1.MsgRecoverClient":return ni.unpackAny(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return si.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateParams":return ii.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Ji.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Zi.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Yi.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Xi.unpackAny(o);case"/ibc.core.connection.v1.MsgUpdateParams":return Qi.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 Oo.unpackAny(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return No.unpackAny(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return To.unpackAny(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return Fo.unpackAny(o);case"/connect.marketmap.v2.MsgParams":return Ro.unpackAny(o);case"/initia.move.v1.MsgPublish":return fe.unpackAny(o);case"/initia.move.v1.MsgExecute":return qo.unpackAny(o);case"/initia.move.v1.MsgExecuteJSON":return $o.unpackAny(o);case"/initia.move.v1.MsgScript":return Lo.unpackAny(o);case"/initia.move.v1.MsgScriptJSON":return Ho.unpackAny(o);case"/initia.move.v1.MsgUpdateParams":return zo.unpackAny(o);case"/initia.move.v1.MsgWhitelist":return Vo.unpackAny(o);case"/initia.move.v1.MsgDelist":return Ko.unpackAny(o);case"/initia.move.v1.MsgGovExecute":return Go.unpackAny(o);case"/initia.move.v1.MsgGovExecuteJSON":return Wo.unpackAny(o);case"/initia.move.v1.MsgGovPublish":return ge.unpackAny(o);case"/initia.move.v1.MsgGovScript":return jo.unpackAny(o);case"/initia.move.v1.MsgGovScriptJSON":return Jo.unpackAny(o);case"/initia.mstaking.v1.MsgDelegate":return Zo.unpackAny(o);case"/initia.mstaking.v1.MsgUndelegate":return Yo.unpackAny(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return Xo.unpackAny(o);case"/initia.mstaking.v1.MsgCreateValidator":return Qo.unpackAny(o);case"/initia.mstaking.v1.MsgEditValidator":return ye.unpackAny(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return tn.unpackAny(o);case"/initia.mstaking.v1.MsgUpdateParams":return en.unpackAny(o);case"/opinit.opchild.v1.MsgAddValidator":return rn.unpackAny(o);case"/opinit.opchild.v1.MsgRemoveValidator":return on.unpackAny(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return nn.unpackAny(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return sn.unpackAny(o);case"/opinit.opchild.v1.MsgExecuteMessages":return an.unpackAny(o);case"/opinit.opchild.v1.MsgSpendFeePool":return cn.unpackAny(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return An.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateOracle":return Pn.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateParams":return bn.unpackAny(o);case"/opinit.ophost.v1.MsgRecordBatch":return un.unpackAny(o);case"/opinit.ophost.v1.MsgCreateBridge":return mn.unpackAny(o);case"/opinit.ophost.v1.MsgProposeOutput":return dn.unpackAny(o);case"/opinit.ophost.v1.MsgDeleteOutput":return ln.unpackAny(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return pn.unpackAny(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return hn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateProposer":return fn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return gn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return yn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return _n.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return vn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateParams":return wn.unpackAny(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Eo.unpackAny(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Bo.unpackAny(o);case"/initia.reward.v1.MsgUpdateParams":return Dn.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return kn.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return xn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Mn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgMint":return In.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Sn.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 Bn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return On.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Io.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return So.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return nr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return sr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return ir.unpackAny(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return ar.unpackAny(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return cr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return ur.unpackAny(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return mr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return dr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return lr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return pr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return hr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return fr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return gr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return yr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return _r.unpackAny(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return vr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return wr.unpackAny(o);default:throw new Error(`not supported msg ${o.typeUrl}`)}}i.fromProto=r})(exports.Msg||(exports.Msg={}));function ia(i,t,e){try{return et.bech32.decode(t).prefix===i&&t.length==e}catch{return!1}}exports.AccAddress=void 0;(i=>{function t(s){return ia("init",s,43)||ia("init",s,63)}i.validate=t;function e(s){const a=et.bech32.decode(s);return et.bech32.encode("init",a.words)}i.fromValAddress=e;function r(s){const a=et.bech32.decode(s);return"0x"+Buffer.from(et.bech32.fromWords(a.words)).toString("hex")}i.toHex=r;function o(s){const a=s.replace(/^0x0+|^0x|^0+(?!x)/,"");return a.length<=40?et.bech32.encode("init",et.bech32.toWords(Buffer.from(a.padStart(40,"0"),"hex"))):et.bech32.encode("init",et.bech32.toWords(Buffer.from(a.padStart(64,"0"),"hex")))}i.fromHex=o;function n(s){const a=et.bech32.decode(s);return Buffer.from(et.bech32.fromWords(a.words))}i.toBuffer=n})(exports.AccAddress||(exports.AccAddress={}));exports.AccPubKey=void 0;(i=>{function t(r){return ia("initpub",r,46)}i.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initpub",o.words)}i.fromAccAddress=e})(exports.AccPubKey||(exports.AccPubKey={}));exports.ValAddress=void 0;(i=>{function t(r){return ia("initvaloper",r,50)}i.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initvaloper",o.words)}i.fromAccAddress=e})(exports.ValAddress||(exports.ValAddress={}));exports.ValPubKey=void 0;(i=>{function t(r){return ia("initvaloperpub",r,53)}i.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initvaloperpub",o.words)}i.fromValAddress=e})(exports.ValPubKey||(exports.ValPubKey={}));exports.ValConsAddress=void 0;(i=>{function t(e){return ia("initvalcons",e,50)}i.validate=t})(exports.ValConsAddress||(exports.ValConsAddress={}));class Ad{constructor(t){_(this,"bitarray");_(this,"signatures");this.multisig_pubkey=t;const e=t.pubkeys.length;this.bitarray=Ln.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 Nu 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:a}}=this;return{chain_id:t,account_number:e.toFixed(),sequence:r.toFixed(),timeout_height:s&&s!==0?s.toFixed():void 0,fee:a.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 aa{constructor(t,e,r,o,n,s,a,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=a,this.timestamp=c,this.events=d,this.code=g,this.codespace=v}static fromProto(t){return new aa(Number(t.height),t.txhash,t.rawLog,t.logs.map(e=>Pi.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 aa(parseInt(t.height),t.txhash,t.raw_log,t.logs.map(e=>Pi.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;(i=>{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}i.parse=t})(exports.EventsByType||(exports.EventsByType={}));class Pi{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 Pi(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 Pi(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 ld.ABCIMessageLog.fromPartial({msgIndex:t,log:e,events:r})}}class Tu 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 Oe.fromData(r)}async parameters(t={}){return this.c.get("/cosmos/auth/v1beta1/params",t).then(e=>Rn.fromData(e.params))}}class Fu 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(ve.fromData),n.pagination])}async granter(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/granter/${t}`,e).then(r=>[r.grants.map(o=>ve.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=>ve.fromData(o)),r.pagination])}}class Ru 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=>I.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=>$n.fromData(e.params))}}class qu 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=>zn.fromData(e.params))}}class $u 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 Lu 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 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=>Vn.fromData(e.params))}}class Hu 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 zu 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:I.fromData(r.total_forwarded)}))}}class Vu extends Q{async proposals(t={}){return this.c.get("/initia/gov/v1/proposals",t).then(e=>[e.proposals.map(Ne.fromData),e.pagination])}async proposal(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}`,e).then(r=>Ne.fromData(r.proposal))}async deposits(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/deposits`,e).then(r=>[r.deposits.map(o=>Gi.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=>vs.fromData(o)),r.pagination])}async tally(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}/tally`,e).then(r=>Kn.fromData(r.tally_result))}async parameters(t={}){return this.c.get("/initia/gov/v1/params",t).then(e=>Gn.fromData(e.params))}async emergencyProposals(t={}){return this.c.get("/initia/gov/v1/emergency_proposals",t).then(e=>[e.proposals.map(r=>Ne.fromData(r)),e.pagination])}}class Ku extends Q{async groupInfo(t){return this.c.get(`/cosmos/group/v1/group_info/${t}`).then(e=>Ao.fromData(e.info))}async groupPolicyInfo(t){return this.c.get(`/cosmos/group/v1/group_policy_info/${t}`).then(e=>As.fromData(e.info))}async groupMembers(t,e={}){return this.c.get(`/cosmos/group/v1/group_members/${t}`,e).then(r=>[r.members.map(Wi.fromData),r.pagination])}async groupsByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_admin/${t}`,e).then(r=>[r.groups.map(Ao.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(As.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(As.fromData),r.pagination])}async proposal(t){return this.c.get(`/cosmos/group/v1/proposal/${t}`).then(e=>Wn.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(Wn.fromData),r.pagination])}async voteByProposalVoter(t,e){return this.c.get(`/cosmos/group/v1/vote_by_proposal_voter/${t}/${e}`).then(r=>Te.fromData(r.vote))}async votesByProposal(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_proposal/${t}`,e).then(r=>[r.votes.map(Te.fromData),r.pagination])}async votesByVoter(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_voter/${t}`,e).then(r=>[r.votes.map(Te.fromData),r.pagination])}async groupsByMember(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_member/${t}`,e).then(r=>[r.groups.map(Ao.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(Ao.fromData),e.pagination])}}class Gu extends Q{async channels(t={}){return this.c.get("/ibc/core/channel/v1/channels",t).then(e=>[e.channels.map(te.fromData),e.pagination])}async port(t,e,r={}){return this.c.get(`/ibc/core/channel/v1/channels/${t}/ports/${e}`,r).then(o=>({channel:te.fromData(o.channel),proof:o.proof,proof_height:C.fromData(o.proof_height)}))}async connections(t={}){return this.c.get("/ibc/core/connection/v1/connections",t).then(e=>[e.connections.map(ci.fromData),e.pagination])}async connection(t,e={}){return this.c.get(`/ibc/core/connection/v1/connections/${t}`,e).then(r=>ci.fromData(r.connection))}async connectionChannels(t,e={}){return this.c.get(`/ibc/core/channel/v1/connections/${t}/channels`,e).then(r=>[r.channels.map(te.fromData),C.fromData(r.height),r.pagination])}async parameters(t={}){return this.c.get("/ibc/core/client/v1/params",t).then(e=>bs.fromData(e.params))}async clientStates(t={}){return this.c.get("/ibc/core/client/v1/client_states",t).then(e=>[e.client_states.map(ji.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:C.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(C.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 Wu extends Q{async acls(t={}){return this.c.get("/initia/ibchooks/v1/acls",t).then(e=>[e.acls.map(Ys.fromData),e.pagination])}async acl(t,e={}){return this.c.get(`/initia/ibchooks/v1/acls/${t}`,e).then(r=>Ys.fromData(r.acl))}async parameters(t={}){return this.c.get("/initia/ibchooks/v1/params",t).then(e=>jn.fromData(e.params))}}class ju extends Q{async classTrace(t){return this.c.get(`/ibc/apps/nft_transfer/v1/class_traces/${t}`).then(e=>Xs.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(Xs.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=>Jn.fromData(e.params))}}class Ju extends Q{async denomTrace(t){return this.c.get(`/ibc/apps/transfer/v1/denom_traces/${t}`).then(e=>Vs.fromData(e.denom_trace))}async denomTraces(t={}){return this.c.get("/ibc/apps/transfer/v1/denom_traces",t).then(e=>[e.denom_traces.map(Vs.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=>ds.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 Zu 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 Yu 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 Xu 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=>Zn.fromData(e.params))}}class Qu extends Q{async modules(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules`,e).then(r=>[r.modules.map(Xn.fromData),r.pagination])}async module(t,e,r={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules/${e}`,r).then(o=>Xn.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=>Yn.fromData(e.params))}}class tm 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=>[[Ss.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(Ss.fromData),o.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations`,r).then(o=>[o.delegation_responses.map(Ss.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=>[[Lt.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(Lt.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(Lt.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(ae.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=>Qn.fromData(e.params))}}class em extends Q{async validators(t={}){return this.c.get("/opinit/opchild/v1/validators",t).then(e=>[e.validators.map(wi.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/opinit/opchild/v1/validator/${t}`,e).then(r=>wi.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=>es.fromData(e.params))}}class rm 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:Me.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:Me.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:Me.fromData(o.output_proposal)}))}async withdrawalClaimed(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/withdrawals/claimed/by_hash`,{...r,withdrawal_hash:Buffer.from(e,"hex").toString("base64")}).then(o=>o.claimed)}async nextL1Sequence(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/next_l1_sequence`,e).then(r=>parseInt(r.next_l1_sequence))}async batchInfos(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/batch_infos`,e).then(r=>[r.batch_infos.map(o=>ea.fromData(o)),r.pagination])}async parameters(t={}){return this.c.get("/opinit/ophost/v1/params",t).then(e=>ts.fromData(e.params))}}class om extends Q{async currencyPairs(t={}){return this.c.get("/connect/oracle/v2/get_all_tickers",t).then(e=>e.currency_pairs.map(Bt.fromData))}async price(t,e={}){return this.c.get("/connect/oracle/v2/get_price",{...e,currency_pair:t.toString()}).then(r=>ta.fromData(r.price))}}class nm 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=>rs.fromData(e.params))}}class sm extends Q{async signingInfos(t={}){return this.c.get("/cosmos/slashing/v1beta1/signing_infos",t).then(e=>[e.info.map(Ai.fromData),e.pagination])}async signingInfo(t,e={}){return this.c.get(`/cosmos/slashing/v1beta1/signing_infos/${t}`,e).then(r=>Ai.fromData(r.val_signing_info))}async parameters(t={}){return this.c.get("/cosmos/slashing/v1beta1/params",t).then(e=>os.fromData(e.params))}}class im 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 am 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=>ns.fromData(e.params))}}const uu=i=>Ce.bcs.bytes(32,i).transform({input:t=>{if(t.startsWith("init1")&&(t=exports.AccAddress.toHex(t)),t.startsWith("0x")&&(t=t.slice(2).padStart(64,"0")),!t.match(/[0-9a-f]+$/i))throw new Error("invalid address");return Buffer.from(t,"hex")},output:t=>`0x${Buffer.from(t).toString("hex")}`}),Pd={address:uu,object:uu,fixed_point32:i=>Ce.bcs.u64(i).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:i=>Ce.bcs.u128(i).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:i=>Ce.bcs.u128(i).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:i=>Ce.bcs.u256(i).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:i=>Ce.bcs.vector(Ce.bcs.u8(i)).transform({input:t=>mu(BigInt(t)),output:t=>du(t)}),bigdecimal:i=>Ce.bcs.vector(Ce.bcs.u8(i)).transform({input:t=>{const r=F(t).times(new At.BigNumber("1000000000000000000")).toFixed(0,At.BigNumber.ROUND_DOWN);return mu(BigInt(r))},output:t=>{const e=du(t).toString();return F(e).div(new At.BigNumber("1000000000000000000")).toNumber()}})},bd={...Ce.bcs,...Pd};function mu(i){const t=[];for(;i>0;)t.push(Number(i%BigInt(256))),i=i/BigInt(256);return new Uint8Array(t)}function du(i){let t=0n;for(;i.length>0;)t=t*256n+BigInt(i.pop());return t}function Dd(i){return i.code!==void 0&&i.code!==0&&i.code!=="0"}class tc{constructor(t,e){this.gas_info=t,this.result=e}static fromData(t){return new tc({gas_wanted:parseInt(t.gas_info.gas_wanted),gas_used:parseInt(t.gas_info.gas_used)},t.result)}}class ra 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=>aa.fromData(r.tx_response))}async create(t,e){let{fee:r}=e;const{msgs:o,memo:n,timeoutHeight:s}=e,a=[];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())}a.push({sequenceNumber:d,publicKey:g})}return r===void 0&&(r=await this.rest.tx.estimateFee(a,e)),new Dt(new Hn(o,n??"",s??0),new be([],r),[])}async txInfosByHeight(t){const e=await this.rest.tendermint.blockInfo(t),{txs:r}=e.block.data;if(r){const o=r.map(s=>Ga(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,a;if(r&&(a=new l(r),n)){const b=a.filter(k=>n.includes(k.denom));b.toArray().length>0&&(a=b)}const c=new Hn(e.msgs,e.memo??""),d=new be([],new Pe(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=a?a.mul(s).toIntCeilCoins():"0uinit";return new Pe(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 be([],new Pe(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:ra.encode(o)}).then(s=>tc.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=ra.encode(t);return Ga(e)}async _broadcast(t,e){const r=t instanceof Dt?ra.encode(t):t;return await this.c.post("/cosmos/tx/v1beta1/txs",{tx_bytes:r,mode:e})}async broadcast(t,e=3e4){const{tx_response:o}=await this._broadcast(t,"BROADCAST_MODE_SYNC");if(o.code!=null&&o.code!=0)return{height: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(a=>setTimeout(a,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=>Pi.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??"=",a=n.key==="tx.height"?`${n.value}`:`'${n.value}'`,c=s==="EXISTS"?`${n.key} ${s}`:`${n.key} ${s} ${a}`;return o?`${o} AND ${c}`:c},"");return r&&e.append("query",r),delete t.query,Object.entries(t).forEach(o=>{e.append(o[0],o[1].toString())}),this.c.getRaw("/cosmos/tx/v1beta1/txs",e).then(o=>({txs:o.tx_responses.map(n=>aa.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}`,a=[{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 E=k.attributes.find(N=>N.key==="type_tag");return E&&E.value.startsWith(s)}),{txs:d,total:g}=await this.search({query:a}),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),E=await Promise.all(k.map(async N=>this.search({query:a,page:N}).then(K=>K.txs.flatMap(Y=>c(Y)))));n.push(...E.flat())}return n}}class cm 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?ke.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 um 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:$s.fromData(r.contract_info.created),ibc_port_id:r.contract_info.ibc_port_id,extension:r.contract_info.extension}))}async contractHistory(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/history`,e).then(r=>[r.entries.map(o=>({operation:Ht.contractCodeHistoryOperationTypeFromJSON(o.operation),code_id:parseInt(o.code_id),updated:$s.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:it.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:it.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=>qn.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 mm{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 kd={gasAdjustment:"1.75"},lu={default:{uinit:.15}};class dm{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={...kd,gasPrices:((e==null?void 0:e.chainId)&&lu[e.chainId])??lu.default,...e},this.apiRequester=r??new Uu(this.URL),this.auction=new Eu(this.apiRequester),this.auth=new Tu(this.apiRequester),this.authz=new Fu(this.apiRequester),this.bank=new Ru(this.apiRequester),this.distribution=new qu(this.apiRequester),this.evidence=new $u(this.apiRequester),this.evm=new Lu(this.apiRequester),this.feeGrant=new Hu(this.apiRequester),this.forwarding=new zu(this.apiRequester),this.gov=new Vu(this.apiRequester),this.group=new Ku(this.apiRequester),this.ibc=new Gu(this.apiRequester),this.ibcHooks=new Wu(this.apiRequester),this.ibcNft=new ju(this.apiRequester),this.ibcTransfer=new Ju(this.apiRequester),this.ibcPerm=new Zu(this.apiRequester),this.interTx=new Yu(this.apiRequester),this.marketmap=new Xu(this.apiRequester),this.move=new Qu(this.apiRequester),this.mstaking=new tm(this.apiRequester),this.opchild=new em(this.apiRequester),this.ophost=new rm(this.apiRequester),this.oracle=new om(this.apiRequester),this.reward=new nm(this.apiRequester),this.slashing=new sm(this.apiRequester),this.tendermint=new im(this.apiRequester),this.tokenfactory=new am(this.apiRequester),this.tx=new ra(this),this.upgrade=new cm(this.apiRequester),this.wasm=new um(this.apiRequester)}wallet(t){return new mm(this,t)}}class xd extends dm{}function Md(i){if(i.__esModule)return i;var t=i.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(i).forEach(function(r){var o=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return i[r]}})}),e}var Bc={exports:{}},oa=typeof Reflect=="object"?Reflect:null,pu=oa&&typeof oa.apply=="function"?oa.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Ha;oa&&typeof oa.ownKeys=="function"?Ha=oa.ownKeys:Object.getOwnPropertySymbols?Ha=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ha=function(t){return Object.getOwnPropertyNames(t)};function Id(i){console&&console.warn&&console.warn(i)}var lm=Number.isNaN||function(t){return t!==t};function nt(){nt.init.call(this)}Bc.exports=nt;Bc.exports.once=Ed;nt.EventEmitter=nt;nt.prototype._events=void 0;nt.prototype._eventsCount=0;nt.prototype._maxListeners=void 0;var hu=10;function ec(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(nt,"defaultMaxListeners",{enumerable:!0,get:function(){return hu},set:function(i){if(typeof i!="number"||i<0||lm(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");hu=i}});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||lm(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 pm(i){return i._maxListeners===void 0?nt.defaultMaxListeners:i._maxListeners}nt.prototype.getMaxListeners=function(){return pm(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 a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=n[t];if(c===void 0)return!1;if(typeof c=="function")pu(c,this,e);else for(var d=c.length,g=_m(c,d),r=0;r<d;++r)pu(g[r],this,e);return!0};function hm(i,t,e,r){var o,n,s;if(ec(e),n=i._events,n===void 0?(n=i._events=Object.create(null),i._eventsCount=0):(n.newListener!==void 0&&(i.emit("newListener",t,e.listener?e.listener:e),n=i._events),s=n[t]),s===void 0)s=n[t]=e,++i._eventsCount;else if(typeof s=="function"?s=n[t]=r?[e,s]:[s,e]:r?s.unshift(e):s.push(e),o=pm(i),o>0&&s.length>o&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=i,a.type=t,a.count=s.length,Id(a)}return i}nt.prototype.addListener=function(t,e){return hm(this,t,e,!1)};nt.prototype.on=nt.prototype.addListener;nt.prototype.prependListener=function(t,e){return hm(this,t,e,!0)};function Sd(){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 fm(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},o=Sd.bind(r);return o.listener=e,r.wrapFn=o,o}nt.prototype.once=function(t,e){return ec(e),this.on(t,fm(this,t,e)),this};nt.prototype.prependOnceListener=function(t,e){return ec(e),this.prependListener(t,fm(this,t,e)),this};nt.prototype.removeListener=function(t,e){var r,o,n,s,a;if(ec(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){a=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,a||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 gm(i,t,e){var r=i._events;if(r===void 0)return[];var o=r[t];return o===void 0?[]:typeof o=="function"?e?[o.listener||o]:[o]:e?Cd(o):_m(o,o.length)}nt.prototype.listeners=function(t){return gm(this,t,!0)};nt.prototype.rawListeners=function(t){return gm(this,t,!1)};nt.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):ym.call(i,t)};nt.prototype.listenerCount=ym;function ym(i){var t=this._events;if(t!==void 0){var e=t[i];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}nt.prototype.eventNames=function(){return this._eventsCount>0?Ha(this._events):[]};function _m(i,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=i[r];return e}function Ud(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function Cd(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function Ed(i,t){return new Promise(function(e,r){function o(s){i.removeListener(t,n),r(s)}function n(){typeof i.removeListener=="function"&&i.removeListener("error",o),e([].slice.call(arguments))}vm(i,t,n,{once:!0}),t!=="error"&&Bd(i,o,{once:!0})})}function Bd(i,t,e){typeof i.on=="function"&&vm(i,"error",t,e)}function vm(i,t,e,r){if(typeof i.on=="function")r.once?i.once(t,e):i.on(t,e);else if(typeof i.addEventListener=="function")i.addEventListener(t,function o(n){r.once&&i.removeEventListener(t,o),e(n)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}var Od=Bc.exports;const fu=i=>i.replace(/'/g,"\\'");function Nd(i){const t=[];for(const e of Object.keys(i)){let r;const o=i[e];if(Array.isArray(o))switch(o[0]){case">":case"<":case"<=":case">=":typeof o[1]!="number"?r=`${e}${o[0]}${o[1].toISOString()}`:r=`${e}${o[0]}${o[1]}`;break;case"CONTAINS":r=`${e} CONTAINS '${fu(o[1])}'`;break;case"EXISTS":r=`${e} EXISTS`;break}else switch(typeof o){case"number":r=`${e}=${o}`;break;case"string":r=`${e}='${fu(o)}'`;break;default:r=`${e}=${o.toISOString()}`}t.push(r)}return t.join(" AND ")}class Td extends Od.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 pd(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=Nd({"tm.event":e,...r}),this.callback=o}subscribeTx(e,r){const o=n=>(n.value.TxResult.txhash=Ga(n.value.TxResult.tx),r(n));this.subscribe("Tx",e,o)}}const Fd={},Rd=Object.freeze(Object.defineProperty({__proto__:null,default:Fd},Symbol.toStringTag,{value:"Module"})),ua=85,Ic=250,qd="CSM",ma={GET_VERSION:0,INS_PUBLIC_KEY_SECP256K1:1,SIGN_SECP256K1:2,GET_ADDR_SECP256K1:4},za={INIT:0,ADD:1,LAST:2},Oc={ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},bi={NoError:36864},Sc={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 Di(i){return i in Sc?Sc[i]:`Unknown Status Code: ${i}`}function $d(i){return typeof i=="object"&&i!==null&&!(i instanceof Array)&&!(i instanceof Date)}function Bs(i){if(i){if($d(i)){if(Object.prototype.hasOwnProperty.call(i,"statusCode"))return{return_code:i.statusCode,error_message:Di(i.statusCode)};if(Object.prototype.hasOwnProperty.call(i,"return_code")&&Object.prototype.hasOwnProperty.call(i,"error_message"))return i}return{return_code:65535,error_message:i.toString()}}return{return_code:65535,error_message:i.toString()}}function Va(i){if((i==null?void 0:i.length)!==5)throw new TypeError("Invalid path.");const t=Buffer.alloc(20);return t.writeUInt32LE(2147483648+i[0],0),t.writeUInt32LE(2147483648+i[1],4),t.writeUInt32LE(2147483648+i[2],8),t.writeUInt32LE(i[3],12),t.writeUInt32LE(i[4],16),t}async function Ld(i){return i.send(ua,ma.GET_VERSION,0,0).then(t=>{const e=t.slice(-2),r=e[0]*256+e[1];let o=0;return t.length>=9&&(o=(t[5]<<24)+(t[6]<<16)+(t[7]<<8)+(t[8]<<0)),{return_code:r,error_message:Di(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(Bs)}async function Hd(i){return i.send(176,1,0,0).then(t=>{const e=t.slice(-2);let r=e[0]*256+e[1],o,n="err",s="err",a=0,c=0;if(t[0]!==1)o="response format ID not recognized",r=36865;else{o="No errors";const d=t[1];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,a=b,c=t[g]}return{return_code:r,error_message:o,app_name:n,app_version:s,flag_len:a,flags_value:c,flag_recovery:(c&1)!==0,flag_signed_mcu_code:(c&2)!==0,flag_onboarded:(c&4)!==0,flag_pin_validated:(c&128)!==0}}).catch(Bs)}async function zd(i){return i.send(224,1,0,0,Buffer.from([]),[bi.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 a=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:Di(r),target_id:o,se_version:a,flag:d,mcu_version:b}}).catch(Bs)}async function Vd(i,t){return i.send(ua,ma.GET_ADDR_SECP256K1,0,0,t,[bi.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:Di(o)}}).catch(Bs)}async function Kd(i,t){return i.send(ua,ma.GET_ADDR_SECP256K1,Oc.ONLY_RETRIEVE,0,t,[bi.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:Di(o)}}).catch(Bs)}async function Gd(i,t){return i.send(ua,ma.GET_ADDR_SECP256K1,Oc.SHOW_ADDRESS_IN_DEVICE,0,t,[bi.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:Di(o)}}).catch(Bs)}function Wd(i,t){const e=Va(i),r=[];if(e instanceof Buffer){r.push(e);const o=Buffer.from(t);for(let n=0;n<o.length;n+=Ic){let s=n+Ic;n>o.length&&(s=o.length),r.push(o.slice(n,s))}}return r}async function gu(i,t,e,r){let o=za.ADD;return t===1&&(o=za.INIT),t===e&&(o=za.LAST),i.send(ua,ma.SIGN_SECP256K1,o,0,r,[bi.NoError,27012,27264]).then(n=>{const s=n.slice(-2),a=s[0]*256+s[1];let c=Di(a);(a===27264||a===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:a,error_message:c}}).catch(Bs)}async function jd(i,t,e){const r=Wd(t,e);return gu(i,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 gu(i,1+s,r.length,r[s]),n.return_code===bi.NoError);s+=1);return{return_code:n.return_code,error_message:n.error_message,signature:n.signature}}).catch(Bs)}const Jd="Initia",Zd="Cosmos";class ka{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 hd().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===Jd&&this.version.major===1||this.info.app_name===Zd&&this.version.major===2)return}return{return_code:25600,error_message:"App Version is not supported"}}async initialize(){return Hd(this.transport).then(t=>(this.info=t,Ld(this.transport))).then(t=>(this.version=t,this.validateCompatibility()))}getInfo(){return this.info}getVersion(){return this.version}getDeviceInfo(){return zd(this.transport)}getPublicKey(t){const e=Va(t),r=Buffer.concat([ka.serializeHRP("init"),e]);return Vd(this.transport,r)}getAddressAndPubKey(t,e){const r=Va(t),o=Buffer.concat([ka.serializeHRP(e),r]);return Kd(this.transport,o)}showAddressAndPubKey(t,e){const r=Va(t),o=Buffer.concat([ka.serializeHRP(e),r]);return Gd(this.transport,o)}sign(t,e){return jd(this.transport,t,e)}}class Nc{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
- `),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 be([],t.auth_info.fee),[]),o=new Nu(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={},wm={};const Yd=Md(Rd);(function(i){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(i,"__esModule",{value:!0}),i.utils=i.schnorr=i.verify=i.signSync=i.sign=i.getSharedSecret=i.recoverPublicKey=i.getPublicKey=i.Signature=i.Point=i.CURVE=void 0;const t=Yd,e=BigInt(0),r=BigInt(1),o=BigInt(2),n=BigInt(3),s=BigInt(8),a=Object.freeze({a:e,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:r,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});i.CURVE=a;const c=(h,m)=>(h+m/o)/m,d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(h){const{n:m}=a,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 U=x(h-M*p-T*w,m),$=x(-M*y-T*A,m);const G=U>D,W=$>D;if(G&&(U=m-U),W&&($=m-$),U>D||$>D)throw new Error("splitScalarEndo: Endomorphism failed, k="+h);return{k1neg:G,k1:U,k2neg:W,k2:$}}},g=32,v=32,b=32,k=g+1,E=2*g+1;function N(h){const{a:m,b:p}=a,y=x(h*h),w=x(y*h);return x(w+m*h+p)}const K=a.a===e;class Y extends Error{constructor(m){super(m)}}function tt(h){if(!(h instanceof S))throw new TypeError("JacobianPoint expected")}class S{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)?S.ZERO:new S(m.x,m.y,r)}static toAffineBatch(m){const p=Nm(m.map(y=>y.z));return m.map((y,w)=>y.toAffine(p[w]))}static normalizeZ(m){return S.toAffineBatch(m).map(S.fromAffine)}equals(m){tt(m);const{x:p,y,z:w}=this,{x:A,y:D,z:M}=m,T=x(w*w),U=x(M*M),$=x(p*U),G=x(A*T),W=x(x(y*M)*U),wt=x(x(D*w)*T);return $===G&&W===wt}negate(){return new S(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)),U=x(n*w),$=x(U*U),G=x($-o*T),W=x(U*(T-G)-s*D),wt=x(o*p*y);return new S(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),U=x(M*M),$=x(p*U),G=x(A*T),W=x(x(y*M)*U),wt=x(x(D*w)*T),yt=x(G-$),se=x(wt-W);if(yt===e)return se===e?this.double():S.ZERO;const Ui=x(yt*yt),Ci=x(yt*Ui),Ei=x($*Ui),Fa=x(se*se-Ci-o*Ei),uc=x(se*(Ei-Fa)-W*Ci),ha=x(w*M*yt);return new S(Fa,uc,ha)}subtract(m){return this.add(m.negate())}multiplyUnsafe(m){const p=S.ZERO;if(typeof m=="bigint"&&m===e)return p;let y=Gc(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,U=p,$=this;for(;A>e||M>e;)A&r&&(T=T.add($)),M&r&&(U=U.add($)),$=$.double(),A>>=r,M>>=r;return w&&(T=T.negate()),D&&(U=U.negate()),U=new S(x(U.x*d.beta),U.y,U.z),T.add(U)}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(S.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=S.normalizeZ(w),ut.set(p,w)));let A=S.ZERO,D=S.BASE;const M=1+(K?128/y:256/y),T=2**(y-1),U=BigInt(2**y-1),$=2**y,G=BigInt(y);for(let W=0;W<M;W++){const wt=W*T;let yt=Number(m&U);m>>=G,yt>T&&(yt-=$,m+=r);const se=wt,Ui=wt+Math.abs(yt)-1,Ci=W%2!==0,Ei=yt<0;yt===0?D=D.add(ot(Ci,w[se])):A=A.add(ot(Ei,w[Ui]))}return{p:A,f:D}}multiply(m,p){let y=Gc(m),w,A;if(K){const{k1neg:D,k1:M,k2neg:T,k2:U}=d.splitScalar(y);let{p:$,f:G}=this.wNAF(M,p),{p:W,f:wt}=this.wNAF(U,p);$=ot(D,$),W=ot(T,W),W=new S(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 S.normalizeZ([w,A])[0]}toAffine(m){const{x:p,y,z:w}=this,A=this.equals(S.ZERO);m==null&&(m=A?s:xi(w));const D=m,M=x(D*D),T=x(M*D),U=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(U,$)}}S.BASE=new S(a.Gx,a.Gy,r),S.ZERO=new S(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(!Oa(y))throw new Error("Point is not on curve");const w=N(y);let A=Om(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===E&&w===4)return this.fromUncompressedHex(p);throw new Error(`Point.fromHex: received invalid point. Expected 32-${k} compressed bytes or ${E} uncompressed bytes, not ${y}`)}static fromPrivateKey(m){return L.BASE.multiply(Fs(m))}static fromSignature(m,p,y){const{r:w,s:A}=Jc(p);if(![0,1,2,3].includes(y))throw new Error("Cannot recover: invalid recovery bit");const D=ac(Ue(m)),{n:M}=a,T=y===2||y===3?w+M:w,U=xi(T,M),$=x(-D*U,M),G=x(A*U,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 ne(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(!Oa(p)||!Oa(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 S.fromAffine(this).double().toAffine()}add(m){return S.fromAffine(this).add(S.fromAffine(m)).toAffine()}subtract(m){return this.add(m.negate())}multiply(m){return S.fromAffine(this).multiply(m,this).toAffine()}multiplyAndAddUnsafe(m,p,y){const w=S.fromAffine(this),A=p===e||p===r||this!==L.BASE?w.multiplyUnsafe(p):w.multiply(p),D=S.fromAffine(m).multiplyUnsafe(y),M=A.add(D);return M.equals(S.ZERO)?void 0:M.toAffine()}}i.Point=L,L.BASE=new L(a.Gx,a.Gy),L.ZERO=new L(e,e);function Ea(h){return Number.parseInt(h[0],16)>=8?"00"+h:h}function Ba(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}=Ba(h.subarray(2)),{data:y,left:w}=Ba(p);if(w.length)throw new Error(`Invalid signature: left bytes after parsing: ${O(w)}`);return{r:m,s:y}}class oe{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 oe(Ts(w.slice(0,64)),Ts(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:ne(m));return new oe(y,w)}static fromHex(m){return this.fromDER(m)}assertValidity(){const{r:m,s:p}=this;if(!Ii(m))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Ii(p))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const m=a.n>>r;return this.s>m}normalizeS(){return this.hasHighS()?new oe(this.r,x(-this.s,a.n)):this}toDERRawBytes(){return ne(this.toDERHex())}toDERHex(){const m=Ea(vt(this.s)),p=Ea(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 ne(this.toCompactHex())}toCompactHex(){return Z(this.r)+Z(this.s)}}i.Signature=oe;function Se(...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 at(h){const m=ne(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 Ts(h){if(typeof h!="string")throw new TypeError("hexToNumber: expected string, got "+typeof h);return BigInt(`0x${h}`)}function ne(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 Ts(O(h))}function Ue(h){return h instanceof Uint8Array?Uint8Array.from(h):ne(h)}function Gc(h){if(typeof h=="number"&&Number.isSafeInteger(h)&&h>0)return BigInt(h);if(typeof h=="bigint"&&Ii(h))return h;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function x(h,m=a.P){const p=h%m;return p>=e?p:m+p}function Vt(h,m){const{P:p}=a;let y=h;for(;m-- >e;)y*=y,y%=p;return y}function Om(h){const{P:m}=a,p=BigInt(6),y=BigInt(11),w=BigInt(22),A=BigInt(23),D=BigInt(44),M=BigInt(88),T=h*h*h%m,U=T*T*h%m,$=Vt(U,n)*U%m,G=Vt($,n)*U%m,W=Vt(G,o)*T%m,wt=Vt(W,y)*W%m,yt=Vt(wt,w)*wt%m,se=Vt(yt,D)*yt%m,Ui=Vt(se,M)*se%m,Ci=Vt(Ui,D)*yt%m,Ei=Vt(Ci,n)*U%m,Fa=Vt(Ei,A)*wt%m,uc=Vt(Fa,p)*T%m,ha=Vt(uc,o);if(ha*ha%m!==h)throw new Error("Cannot find square root");return ha}function xi(h,m=a.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,U=w-A*M;y=p,p=T,w=A,A=U}if(y!==r)throw new Error("invert: does not exist");return x(w,m)}function Nm(h,m=a.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=xi(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 Tm(h){const m=h.length*8-v*8,p=xt(h);return m>0?p>>BigInt(m):p}function ac(h,m=!1){const p=Tm(h);if(m)return p;const{n:y}=a;return p>=y?p-y:p}let Mi,pa;class Wc{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 i.utils.hmacSha256(this.k,...m)}hmacSync(...m){return pa(this.k,...m)}checkSync(){if(typeof pa!="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 Se(...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 Se(...p)}}function Ii(h){return e<h&&h<a.n}function Oa(h){return e<h&&h<a.P}function jc(h,m,p,y=!0){const{n:w}=a,A=ac(h,!0);if(!Ii(A))return;const D=xi(A,w),M=L.BASE.multiply(A),T=x(M.x,w);if(T===e)return;const U=x(D*x(m+p*T,w),w);if(U===e)return;let $=new oe(T,U),G=(M.x===$.r?0:2)|Number(M.y&r);return y&&$.hasHighS()&&($=$.normalizeS(),G^=1),{sig:$,recovery:G}}function Fs(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=Ts(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(!Ii(m))throw new Error("Expected private key: 0 < key < n");return m}function cc(h){return h instanceof L?(h.assertValidity(),h):L.fromHex(h)}function Jc(h){if(h instanceof oe)return h.assertValidity(),h;try{return oe.fromDER(h)}catch{return oe.fromCompact(h)}}function Fm(h,m=!1){return L.fromPrivateKey(h).toRawBytes(m)}i.getPublicKey=Fm;function Rm(h,m,p,y=!1){return L.fromSignature(h,m,p).toRawBytes(y)}i.recoverPublicKey=Rm;function Zc(h){const m=h instanceof Uint8Array,p=typeof h=="string",y=(m||p)&&h.length;return m?y===k||y===E:p?y===k*2||y===E*2:h instanceof L}function qm(h,m,p=!1){if(Zc(h))throw new TypeError("getSharedSecret: first arg must be private key");if(!Zc(m))throw new TypeError("getSharedSecret: second arg must be public key");const y=cc(m);return y.assertValidity(),y.multiply(Fs(h)).toRawBytes(p)}i.getSharedSecret=qm;function Yc(h){const m=h.length>g?h.slice(0,g):h;return xt(m)}function $m(h){const m=Yc(h),p=x(m,a.n);return Xc(p<e?m:p)}function Xc(h){return at(h)}function Qc(h,m,p){if(h==null)throw new Error(`sign: expected valid message hash, not "${h}"`);const y=Ue(h),w=Fs(m),A=[Xc(w),$m(y)];if(p!=null){p===!0&&(p=i.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=Se(...A),M=Yc(y);return{seed:D,m:M,d:w}}function tu(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 Lm(h,m,p={}){const{seed:y,m:w,d:A}=Qc(h,m,p.extraEntropy),D=new Wc(b,v);await D.reseed(y);let M;for(;!(M=jc(await D.generate(),w,A,p.canonical));)await D.reseed();return tu(M,p)}i.sign=Lm;function Hm(h,m,p={}){const{seed:y,m:w,d:A}=Qc(h,m,p.extraEntropy),D=new Wc(b,v);D.reseedSync(y);let M;for(;!(M=jc(D.generateSync(),w,A,p.canonical));)D.reseedSync();return tu(M,p)}i.signSync=Hm;const zm={strict:!0};function Vm(h,m,p,y=zm){let w;try{w=Jc(h),m=Ue(m)}catch{return!1}const{r:A,s:D}=w;if(y.strict&&w.hasHighS())return!1;const M=ac(m);let T;try{T=cc(p)}catch{return!1}const{n:U}=a,$=xi(D,U),G=x(M*$,U),W=x(A*$,U),wt=L.BASE.multiplyAndAddUnsafe(T,G,W);return wt?x(wt.x,U)===A:!1}i.verify=Vm;function Na(h){return x(xt(h),a.n)}class Si{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 Si(y,w)}assertValidity(){const{r:m,s:p}=this;if(!Oa(m)||!Ii(p))throw new Error("Invalid signature")}toHex(){return Z(this.r)+Z(this.s)}toRawBytes(){return ne(this.toHex())}}function Km(h){return L.fromPrivateKey(h).toRawX()}class eu{constructor(m,p,y=i.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(Fs(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:a.n-m;return{point:p,scalar:y,x:p.toRawX()}}initNonce(m,p){return at(m^xt(p))}finalizeNonce(m){const p=x(xt(m),a.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 Si(m.x,x(p+y*w,a.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m,d:p,px:y,rand:w}=this,A=i.utils.taggedHash,D=this.initNonce(p,await A(is.aux,w)),{R:M,rx:T,k:U}=this.finalizeNonce(await A(is.nonce,D,y,m)),$=Na(await A(is.challenge,T,y,m)),G=this.finalizeSig(M,U,$,p);return await nu(G,m,y)||this.error(),G}calcSync(){const{m,d:p,px:y,rand:w}=this,A=i.utils.taggedHashSync,D=this.initNonce(p,A(is.aux,w)),{R:M,rx:T,k:U}=this.finalizeNonce(A(is.nonce,D,y,m)),$=Na(A(is.challenge,T,y,m)),G=this.finalizeSig(M,U,$,p);return su(G,m,y)||this.error(),G}}async function Gm(h,m,p){return new eu(h,m,p).calc()}function Wm(h,m,p){return new eu(h,m,p).calcSync()}function ru(h,m,p){const y=h instanceof Si,w=y?h:Si.fromHex(h);return y&&w.assertValidity(),{...w,m:Ue(m),P:cc(p)}}function ou(h,m,p,y){const w=L.BASE.multiplyAndAddUnsafe(m,Fs(p),x(-y,a.n));return!(!w||!w.hasEvenY()||w.x!==h)}async function nu(h,m,p){try{const{r:y,s:w,m:A,P:D}=ru(h,m,p),M=Na(await i.utils.taggedHash(is.challenge,at(y),D.toRawX(),A));return ou(y,D,w,M)}catch{return!1}}function su(h,m,p){try{const{r:y,s:w,m:A,P:D}=ru(h,m,p),M=Na(i.utils.taggedHashSync(is.challenge,at(y),D.toRawX(),A));return ou(y,D,w,M)}catch(y){if(y instanceof Y)throw y;return!1}}i.schnorr={Signature:Si,getPublicKey:Km,sign:Gm,verify:nu,signSync:Wm,verifySync:su},L.BASE._setWindowSize(8);const $t={node:t,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},is={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Ta={};i.utils={bytesToHex:O,hexToBytes:ne,concatBytes:Se,mod:x,invert:xi,isValidPrivateKey(h){try{return Fs(h),!0}catch{return!1}},_bigintTo32Bytes:at,_normalizePrivateKey:Fs,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),a.n-r)+r;return at(p)},randomBytes:(h=32)=>{if($t.web)return $t.web.getRandomValues(new Uint8Array(h));if($t.node){const{randomBytes:m}=$t.node;return Uint8Array.from(m(h))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>i.utils.hashToPrivateKey(i.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($t.web){const m=await $t.web.subtle.digest("SHA-256",Se(...h));return new Uint8Array(m)}else if($t.node){const{createHash:m}=$t.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($t.web){const p=await $t.web.subtle.importKey("raw",h,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),y=Se(...m),w=await $t.web.subtle.sign("HMAC",p,y);return new Uint8Array(w)}else if($t.node){const{createHmac:p}=$t.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=Ta[h];if(p===void 0){const y=await i.utils.sha256(Uint8Array.from(h,w=>w.charCodeAt(0)));p=Se(y,y),Ta[h]=p}return i.utils.sha256(p,...m)},taggedHashSync:(h,...m)=>{if(typeof Mi!="function")throw new Y("sha256Sync is undefined, you need to set it");let p=Ta[h];if(p===void 0){const y=Mi(Uint8Array.from(h,w=>w.charCodeAt(0)));p=Se(y,y),Ta[h]=p}return Mi(p,...m)},_JacobianPoint:S},Object.defineProperties(i.utils,{sha256Sync:{configurable:!1,get(){return Mi},set(h){Mi||(Mi=h)}},hmacSha256Sync:{configurable:!1,get(){return pa},set(h){pa||(pa=h)}}})})(wm);var Am={},re={};Object.defineProperty(re,"__esModule",{value:!0});re.isBytes=bm;re.number=Ja;re.bool=Pm;re.bytes=Tc;re.hash=Dm;re.exists=km;re.output=xm;function Ja(i){if(!Number.isSafeInteger(i)||i<0)throw new Error(`positive integer expected, not ${i}`)}function Pm(i){if(typeof i!="boolean")throw new Error(`boolean expected, not ${i}`)}function bm(i){return i instanceof Uint8Array||i!=null&&typeof i=="object"&&i.constructor.name==="Uint8Array"}function Tc(i,...t){if(!bm(i))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(i.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${i.length}`)}function Dm(i){if(typeof i!="function"||typeof i.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ja(i.outputLen),Ja(i.blockLen)}function km(i,t=!0){if(i.destroyed)throw new Error("Hash instance has been destroyed");if(t&&i.finished)throw new Error("Hash#digest() has already been called")}function xm(i,t){Tc(i);const e=t.outputLen;if(i.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}const Xd={number:Ja,bool:Pm,bytes:Tc,hash:Dm,exists:km,output:xm};re.default=Xd;var rc={},oc={};Object.defineProperty(oc,"__esModule",{value:!0});oc.crypto=void 0;oc.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(i){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(i,"__esModule",{value:!0}),i.Hash=i.nextTick=i.byteSwapIfBE=i.byteSwap=i.isLE=i.rotl=i.rotr=i.createView=i.u32=i.u8=void 0,i.isBytes=r,i.byteSwap32=g,i.bytesToHex=b,i.hexToBytes=N,i.asyncLoop=Y,i.utf8ToBytes=tt,i.toBytes=S,i.concatBytes=ot,i.checkOpts=Ea,i.wrapConstructor=Ba,i.wrapConstructorWithOpts=ic,i.wrapXOFConstructorWithOpts=oe,i.randomBytes=Se;const t=oc,e=re;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);i.u8=o;const n=P=>new Uint32Array(P.buffer,P.byteOffset,Math.floor(P.byteLength/4));i.u32=n;const s=P=>new DataView(P.buffer,P.byteOffset,P.byteLength);i.createView=s;const a=(P,O)=>P<<32-O|P>>>O;i.rotr=a;const c=(P,O)=>P<<O|P>>>32-O>>>0;i.rotl=c,i.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const d=P=>P<<24&4278190080|P<<8&16711680|P>>>8&65280|P>>>24&255;i.byteSwap=d,i.byteSwapIfBE=i.isLE?P=>P:P=>(0,i.byteSwap)(P);function g(P){for(let O=0;O<P.length;O++)P[O]=(0,i.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 E(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 at=0,vt=0;at<mt;at++,vt+=2){const Ts=E(P.charCodeAt(vt)),ne=E(P.charCodeAt(vt+1));if(Ts===void 0||ne===void 0){const xt=P[vt]+P[vt+1];throw new Error('hex string expected, got non-hex character "'+xt+'" at index '+vt)}Z[at]=Ts*16+ne}return Z}const K=async()=>{};i.nextTick=K;async function Y(P,O,mt){let Z=Date.now();for(let at=0;at<P;at++){mt(at);const vt=Date.now()-Z;vt>=0&&vt<O||(await(0,i.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 S(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 at=P[Z];(0,e.bytes)(at),O+=at.length}const mt=new Uint8Array(O);for(let Z=0,at=0;Z<P.length;Z++){const vt=P[Z];mt.set(vt,at),at+=vt.length}return mt}class ut{clone(){return this._cloneInto()}}i.Hash=ut;const L={}.toString;function Ea(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 Ba(P){const O=Z=>P().update(S(Z)).digest(),mt=P();return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=()=>P(),O}function ic(P){const O=(Z,at)=>P(at).update(S(Z)).digest(),mt=P({});return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=Z=>P(Z),O}function oe(P){const O=(Z,at)=>P(at).update(S(Z)).digest(),mt=P({});return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=Z=>P(Z),O}function Se(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")}})(rc);(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.hmac=i.HMAC=void 0;const t=re,e=rc;class r extends e.Hash{constructor(s,a){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(s);const c=(0,e.toBytes)(a);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:a,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=a._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}i.HMAC=r;const o=(n,s,a)=>new r(n,s).update(a).digest();i.hmac=o,i.hmac.create=(n,s)=>new r(n,s)})(Am);var Us={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.HashMD=Cs.Maj=Cs.Chi=void 0;const bc=re,fa=rc;function Qd(i,t,e,r){if(typeof i.setBigUint64=="function")return i.setBigUint64(t,e,r);const o=BigInt(32),n=BigInt(4294967295),s=Number(e>>o&n),a=Number(e&n),c=r?4:0,d=r?0:4;i.setUint32(t+c,s,r),i.setUint32(t+d,a,r)}const tl=(i,t,e)=>i&t^~i&e;Cs.Chi=tl;const el=(i,t,e)=>i&t^i&e^t&e;Cs.Maj=el;class rl extends fa.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,fa.createView)(this.buffer)}update(t){(0,bc.exists)(this);const{view:e,buffer:r,blockLen:o}=this;t=(0,fa.toBytes)(t);const n=t.length;for(let s=0;s<n;){const a=Math.min(o-this.pos,n-s);if(a===o){const c=(0,fa.createView)(t);for(;o<=n-s;s+=o)this.process(c,s);continue}r.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,bc.exists)(this),(0,bc.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;Qd(r,o-8,BigInt(this.length*8),n),this.process(r,0);const a=(0,fa.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++)a.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:a}=this;return t.length=o,t.pos=a,t.finished=n,t.destroyed=s,o%e&&t.buffer.set(r),t}}Cs.HashMD=rl;Object.defineProperty(Us,"__esModule",{value:!0});Us.sha224=Us.sha256=Us.SHA256=void 0;const Dc=Cs,Kt=rc,ol=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]),as=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),cs=new Uint32Array(64);class Fc extends Dc.HashMD{constructor(){super(64,32,8,!1),this.A=as[0]|0,this.B=as[1]|0,this.C=as[2]|0,this.D=as[3]|0,this.E=as[4]|0,this.F=as[5]|0,this.G=as[6]|0,this.H=as[7]|0}get(){const{A:t,B:e,C:r,D:o,E:n,F:s,G:a,H:c}=this;return[t,e,r,o,n,s,a,c]}set(t,e,r,o,n,s,a,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=a|0,this.H=c|0}process(t,e){for(let v=0;v<16;v++,e+=4)cs[v]=t.getUint32(e,!1);for(let v=16;v<64;v++){const b=cs[v-15],k=cs[v-2],E=(0,Kt.rotr)(b,7)^(0,Kt.rotr)(b,18)^b>>>3,N=(0,Kt.rotr)(k,17)^(0,Kt.rotr)(k,19)^k>>>10;cs[v]=N+cs[v-7]+E+cs[v-16]|0}let{A:r,B:o,C:n,D:s,E:a,F:c,G:d,H:g}=this;for(let v=0;v<64;v++){const b=(0,Kt.rotr)(a,6)^(0,Kt.rotr)(a,11)^(0,Kt.rotr)(a,25),k=g+b+(0,Dc.Chi)(a,c,d)+ol[v]+cs[v]|0,N=((0,Kt.rotr)(r,2)^(0,Kt.rotr)(r,13)^(0,Kt.rotr)(r,22))+(0,Dc.Maj)(r,o,n)|0;g=d,d=c,c=a,a=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,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,g=g+this.H|0,this.set(r,o,n,s,a,c,d,g)}roundClean(){cs.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}Us.SHA256=Fc;class nl extends Fc{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,Kt.wrapConstructor)(()=>new Fc);Us.sha224=(0,Kt.wrapConstructor)(()=>new nl);var sl=wm,il=Am,Mm=Us;function al(i){var t=Object.create(null);return i&&Object.keys(i).forEach(function(e){if(e!=="default"){var r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return i[e]}})}}),t.default=i,Object.freeze(t)}var j=al(sl);const Os="Expected Private",Ns="Expected Point",Sa="Expected Tweak",cl="Expected Hash",Za="Expected Signature",Rc="Expected Extra Data (32 bytes)",Ua="Expected Scalar",ul="Bad Recovery Id";j.utils.hmacSha256Sync=(i,...t)=>il.hmac(Mm.sha256,i,j.utils.concatBytes(...t));j.utils.sha256Sync=(...i)=>Mm.sha256(j.utils.concatBytes(...i));const qc=j.utils._normalizePrivateKey,ml=32,dl=32,Uc=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]),ll=32,pl=new Uint8Array(32),hl=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 fl(i){return i instanceof Uint8Array}function Ma(i,t){for(let e=0;e<32;++e)if(i[e]!==t[e])return i[e]<t[e]?-1:1;return 0}function yu(i){return Ma(i,pl)===0}function Ca(i){return!(!(i instanceof Uint8Array)||i.length!==dl||Ma(i,Uc)>=0)}function $c(i){return i instanceof Uint8Array&&i.length===64&&Ma(i.subarray(0,32),Uc)<0&&Ma(i.subarray(32,64),Uc)<0}function gl(i){return fl(i)&&i.length===64&&Ma(i.subarray(0,32),hl)<0}function yl(i){return!(yu(i.subarray(0,32))||yu(i.subarray(32,64)))}function da(i){return i instanceof Uint8Array&&i.length===ml}function Lc(i){return i===void 0||i instanceof Uint8Array&&i.length===ll}function Im(i){if(typeof i!="string")throw new TypeError("hexToNumber: expected string, got "+typeof i);return BigInt(`0x${i}`)}function _l(i){return Im(j.utils.bytesToHex(i))}function Hc(i){let t;if(typeof i=="bigint")t=i;else if(typeof i=="number"&&Number.isSafeInteger(i)&&i>=0)t=BigInt(i);else if(typeof i=="string"){if(i.length!==64)throw new Error("Expected 32 bytes of private scalar");t=Im(i)}else if(i instanceof Uint8Array){if(i.length!==32)throw new Error("Expected 32 bytes of private scalar");t=_l(i)}else throw new TypeError("Expected valid private scalar");if(t<0)throw new Error("Expected private scalar >= 0");return t}const vl=(i,t)=>{const e=qc(i),r=Hc(t),o=j.utils._bigintTo32Bytes(j.utils.mod(e+r,j.CURVE.n));return j.utils.isValidPrivateKey(o)?o:null},wl=(i,t)=>{const e=qc(i),r=Hc(t),o=j.utils._bigintTo32Bytes(j.utils.mod(e-r,j.CURVE.n));return j.utils.isValidPrivateKey(o)?o:null},Al=i=>{const t=qc(i),e=j.utils._bigintTo32Bytes(j.CURVE.n-t);return j.utils.isValidPrivateKey(e)?e:null},Sm=(i,t,e)=>{const r=j.Point.fromHex(i),o=Hc(t),n=j.Point.BASE.multiplyAndAddUnsafe(r,o,BigInt(1));if(!n)throw new Error("Tweaked point at infinity");return n.toRawBytes(e)},Pl=(i,t,e)=>{const r=j.Point.fromHex(i),o=typeof t=="string"?t:j.utils.bytesToHex(t),n=BigInt(`0x${o}`);return r.multiply(n).toRawBytes(e)};function la(i,t){return i===void 0?t!==void 0?Um(t):!0:!!i}function ki(i){try{return i()}catch{return null}}function zc(i,t){if(i.length===32!==t)return!1;try{return!!j.Point.fromHex(i)}catch{return!1}}function Es(i){return zc(i,!1)}function Um(i){return zc(i,!1)&&i.length===33}function ss(i){return j.utils.isValidPrivateKey(i)}function nc(i){return zc(i,!0)}function bl(i,t){if(!nc(i))throw new Error(Ns);if(!Ca(t))throw new Error(Sa);return ki(()=>{const e=Sm(i,t,!0);return{parity:e[0]%2===1?1:0,xOnlyPubkey:e.slice(1)}})}function Cm(i){if(!Es(i))throw new Error(Ns);return i.slice(1,33)}function Em(i,t){if(!ss(i))throw new Error(Os);return ki(()=>j.getPublicKey(i,la(t)))}function Dl(i){if(!ss(i))throw new Error(Os);return Cm(Em(i))}function kl(i,t){if(!Es(i))throw new Error(Ns);return j.Point.fromHex(i).toRawBytes(la(t,i))}function xl(i,t,e){if(!Es(i))throw new Error(Ns);if(!Ca(t))throw new Error(Sa);return ki(()=>Pl(i,t,la(e,i)))}function Ml(i,t,e){if(!Es(i)||!Es(t))throw new Error(Ns);return ki(()=>{const r=j.Point.fromHex(i),o=j.Point.fromHex(t);return r.equals(o.negate())?null:r.add(o).toRawBytes(la(e,i))})}function Il(i,t,e){if(!Es(i))throw new Error(Ns);if(!Ca(t))throw new Error(Sa);return ki(()=>Sm(i,t,la(e,i)))}function Sl(i,t){if(ss(i)===!1)throw new Error(Os);if(Ca(t)===!1)throw new Error(Sa);return ki(()=>vl(i,t))}function Ul(i,t){if(ss(i)===!1)throw new Error(Os);if(Ca(t)===!1)throw new Error(Sa);return ki(()=>wl(i,t))}function Cl(i){if(ss(i)===!1)throw new Error(Os);return Al(i)}function El(i,t,e){if(!ss(t))throw new Error(Os);if(!da(i))throw new Error(Ua);if(!Lc(e))throw new Error(Rc);return j.signSync(i,t,{der:!1,extraEntropy:e})}function Bl(i,t,e){if(!ss(t))throw new Error(Os);if(!da(i))throw new Error(Ua);if(!Lc(e))throw new Error(Rc);const[r,o]=j.signSync(i,t,{der:!1,extraEntropy:e,recovered:!0});return{signature:r,recoveryId:o}}function Ol(i,t,e=Buffer.alloc(32,0)){if(!ss(t))throw new Error(Os);if(!da(i))throw new Error(Ua);if(!Lc(e))throw new Error(Rc);return j.schnorr.signSync(i,t,e)}function Nl(i,t,e,r){if(!da(i))throw new Error(cl);if(!$c(t)||!yl(t))throw new Error(Za);if(e&2&&!gl(t))throw new Error(ul);if(!nc(t.subarray(0,32)))throw new Error(Za);return j.recoverPublicKey(i,t,e,la(r))}function Tl(i,t,e,r){if(!Es(t))throw new Error(Ns);if(!$c(e))throw new Error(Za);if(!da(i))throw new Error(Ua);return j.verify(e,i,t,{strict:r})}function Fl(i,t,e){if(!nc(t))throw new Error(Ns);if(!$c(e))throw new Error(Za);if(!da(i))throw new Error(Ua);return j.schnorr.verifySync(e,i,t)}pt.isPoint=Es;pt.isPointCompressed=Um;pt.isPrivate=ss;pt.isXOnlyPoint=nc;pt.pointAdd=Ml;pt.pointAddScalar=Il;pt.pointCompress=kl;pt.pointFromScalar=Em;pt.pointMultiply=xl;pt.privateAdd=Sl;pt.privateNegate=Cl;pt.privateSub=Ul;pt.recover=Nl;pt.sign=El;pt.signRecoverable=Bl;pt.signSchnorr=Ol;pt.verify=Tl;pt.verifySchnorr=Fl;pt.xOnlyPointAddTweak=bl;pt.xOnlyPointFromPoint=Cm;pt.xOnlyPointFromScalar=Dl;class sc extends Nc{constructor(e,r=!1){var t=(...Wl)=>(super(...Wl),_(this,"privateKey"),_(this,"eth"),this);const o=ya.publicKeyCreate(new Uint8Array(e),!0);t(r?new Be(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 sc(Buffer.from(r,"hex"))}async sign(e){if(this.eth)return this.signWithKeccak256(e);const r=Buffer.from(Ka.SHA256.hash(new Ka.Word32Array(e)).toString(),"hex"),{signature:o}=ya.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}async signWithKeccak256(e){const r=Au(e),{signature:o}=ya.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}}const Rl=gd.BIP32Factory(pt),Vc=118,ql={account:0,index:0,coinType:Vc,eth:!1};class $l extends sc{constructor(e={}){const{account:r,index:o,coinType:n,eth:s}={...ql,...e};let{mnemonic:a}=e;a===void 0&&(a=au.generateMnemonic(256));const c=au.mnemonicToSeedSync(a),d=Rl.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=a}}const _u=120,Bm="1.0.0";class ht extends Error{constructor(t){super(t),this.name="LedgerError"}}class Kc extends Nc{constructor(e){super();_(this,"app");_(this,"path",[44,Vc,0,0,0]);this.transport=e,this.app=new ka(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 Vl());const o=new Kc(e);return r!=null&&(o.path[4]=r),e&&typeof e.on=="function"&&e.on("disconnect",()=>{o.transport=void 0}),await o.initialize().catch(Ll),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(),a=`${o}.${n}.${s}`;if(r==="Initia"&&yd.lt(a,Bm))throw new ht("Outdated version: Update Ledger Initia App to the latest version");kc(e),await this.loadAccountDetails()}async loadAccountDetails(){const e=await this.app.getAddressAndPubKey(this.path,"init");return kc(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 kc(r),Buffer.from(vu.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 Ll=i=>{const t=i.message.trim();if(!t.startsWith("The device is already open"))throw i.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 ${Bm} 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."):i},kc=i=>{if(!i)return;const{error_message:t,device_locked:e}=i;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)}},Hl=i=>i.indexOf("Win")>-1,zl=i=>{const t=i.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 Vl(){let i;if(zl(navigator.userAgent),Hl(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"));i=await t.create(_u*1e3)}else{const{default:t}=await Promise.resolve().then(()=>require("./TransportWebUSB-Bog8kAV9.js"));i=await t.create(_u*1e3)}return i}Object.defineProperty(exports,"State",{enumerable:!0,get:()=>ce.State});Object.defineProperty(exports,"stateFromJSON",{enumerable:!0,get:()=>ce.stateFromJSON});Object.defineProperty(exports,"stateToJSON",{enumerable:!0,get:()=>ce.stateToJSON});exports.ABCIParams=gs;exports.ACL=Ys;exports.APIRequester=Uu;exports.APP_KEY=qd;exports.AbsoluteTxPosition=$s;exports.AcceptedMessageKeysFilter=tr;exports.AcceptedMessagesFilter=er;exports.AccessConfig=it;exports.Allocation=Ls;exports.AllowAllMessagesFilter=Qe;exports.AllowedMsgAllowance=Kr;exports.AuctionAPI=Eu;exports.AuctionParams=Fn;exports.AuthAPI=Tu;exports.AuthInfo=be;exports.AuthParams=Rn;exports.AuthorizationGrant=ve;exports.AuthzAPI=Fu;exports.BankAPI=Ru;exports.BankParams=$n;exports.BaseAccount=Wt;exports.BasicAllowance=It;exports.BatchInfo=qt;exports.BatchInfoWithOutput=ea;exports.Blob=sa;exports.BlobTx=Wa;exports.BlockParams=ps;exports.BridgeConfig=xe;exports.BridgeInfo=Ie;exports.CHUNK_SIZE=Ic;exports.CLA=ua;exports.Channel=te;exports.ChannelCounterparty=Ps;exports.ClientConsensusStates=Da;exports.CodeGrant=ms;exports.Coin=I;exports.Coins=l;exports.CombinedLimit=Xe;exports.ConnectionCounterparty=ee;exports.ConsensusStateWithHeight=Ds;exports.ContractExecutionAuthorization=rr;exports.ContractGrant=_e;exports.ContractMigrationAuthorization=or;exports.CurrencyPair=Bt;exports.DecisionPolicyWindows=De;exports.Delegation=Ss;exports.DenomMetadata=Ae;exports.DenomTrace=Vs;exports.DenomUnit=ls;exports.Deposit=Gi;exports.DistributionAPI=qu;exports.DistributionParams=zn;exports.Duration=q;exports.ERROR_CODE=bi;exports.ERROR_DESCRIPTION=Sc;exports.Equivocation=qr;exports.EthPublicKey=Be;exports.EvidenceAPI=$u;exports.EvidenceParams=hs;exports.EvmAPI=Lu;exports.EvmParams=Vn;exports.ExecuteAuthorization=je;exports.ExecuteAuthorizationItem=us;exports.Fee=Pe;exports.FeeGrantAPI=Hu;exports.ForwardingAPI=zu;exports.FungibleTokenPacketData=wa;exports.GenericAuthorization=Ge;exports.GovAPI=Vu;exports.GovParams=Gn;exports.GroupAPI=Ku;exports.GroupInfo=Ao;exports.GroupMember=Wi;exports.GroupPolicyInfo=As;exports.GroupProposal=Wn;exports.GroupVote=Te;exports.Height=C;exports.INIT_COIN_TYPE=Vc;exports.INS=ma;exports.IbcAPI=Gu;exports.IbcChannelParams=ai;exports.IbcClientParams=bs;exports.IbcConnectionParams=ui;exports.IbcFee=Fe;exports.IbcHooksAPI=Wu;exports.IbcHooksParams=jn;exports.IbcNftAPI=ju;exports.IbcNftParams=Jn;exports.IbcPermAPI=Zu;exports.IbcTransferAPI=Ju;exports.IbcTransferParams=ds;exports.IbcVersion=Rt;exports.IdentifiedClientState=ji;exports.IdentifiedConnection=ci;exports.IdentifiedPacketFees=Pa;exports.InterTxAPI=Yu;exports.JSONSerializable=u;exports.Key=Nc;exports.LCDClient=xd;exports.LedgerError=ht;exports.LedgerKey=Kc;exports.LegacyAminoMultisigPublicKey=Ee;exports.Market=kt;exports.MarketmapAPI=Xu;exports.MarketmapParams=Zn;exports.MaxCallsLimit=Ze;exports.MaxFundsLimit=Ye;exports.Member=ws;exports.MemberRequest=Ft;exports.MerklePrefix=xs;exports.MerkleRoot=ja;exports.Metadata=Aa;exports.MnemonicKey=$l;exports.ModeInfo=X;exports.Module=Xn;exports.ModuleAccount=Oe;exports.MoveAPI=Qu;exports.MoveParams=Yn;exports.MsgAcknowledgement=gi;exports.MsgAddCodeUploadParamsAddresses=_r;exports.MsgAddCurrencyPairs=Eo;exports.MsgAddValidator=rn;exports.MsgAuctionBid=He;exports.MsgBeginRedelegate=Xo;exports.MsgBurn=Sn;exports.MsgCall=zr;exports.MsgCancelProposal=Zr;exports.MsgCancelUnbondingDelegation=tn;exports.MsgCancelUpgrade=So;exports.MsgChangeAdmin=Un;exports.MsgChannelCloseConfirm=hi;exports.MsgChannelCloseInit=pi;exports.MsgChannelOpenAck=li;exports.MsgChannelOpenConfirm=di;exports.MsgChannelOpenInit=Qs;exports.MsgChannelOpenTry=mi;exports.MsgClearAdmin=mr;exports.MsgClearForwardingAccount=Jr;exports.MsgCommunityPoolSpend=Fr;exports.MsgCreate=Lr;exports.MsgCreate2=Hr;exports.MsgCreateBridge=mn;exports.MsgCreateClient=ti;exports.MsgCreateDenom=Mn;exports.MsgCreateGroup=ao;exports.MsgCreateGroupPolicy=mo;exports.MsgCreateGroupWithPolicy=lo;exports.MsgCreateMarkets=Oo;exports.MsgCreateValidator=Qo;exports.MsgDelegate=Zo;exports.MsgDeleteOutput=ln;exports.MsgDelist=Ko;exports.MsgDeposit=Xr;exports.MsgDepositLegacy=Yr;exports.MsgDepositValidatorRewardsPool=Rr;exports.MsgEditValidator=ye;exports.MsgExecAuthorized=Dr;exports.MsgExecute=qo;exports.MsgExecuteContract=ar;exports.MsgExecuteJSON=$o;exports.MsgExecuteMessages=an;exports.MsgFinalizeTokenDeposit=nn;exports.MsgFinalizeTokenWithdrawal=hn;exports.MsgForceTransfer=Bn;exports.MsgFundCommunityPool=Nr;exports.MsgGovExecute=Go;exports.MsgGovExecuteJSON=Wo;exports.MsgGovPublish=ge;exports.MsgGovScript=jo;exports.MsgGovScriptJSON=Jo;exports.MsgGrantAllowance=Gr;exports.MsgGrantAuthorization=Pr;exports.MsgGroupExec=po;exports.MsgGroupVote=pe;exports.MsgIBCSoftwareUpgrade=si;exports.MsgInitiateTokenDeposit=pn;exports.MsgInitiateTokenWithdrawal=sn;exports.MsgInstantiateContract=sr;exports.MsgInstantiateContractV2=ir;exports.MsgLeaveGroup=ho;exports.MsgMigrateContract=cr;exports.MsgMint=In;exports.MsgMultiSend=bt;exports.MsgNftTransfer=Do;exports.MsgPayForBlobs=Ks;exports.MsgPayPacketFee=Ws;exports.MsgPayPacketFeeAsync=js;exports.MsgPinCodes=hr;exports.MsgProposeOutput=dn;exports.MsgPublish=fe;exports.MsgRecordBatch=un;exports.MsgRecoverClient=ni;exports.MsgRecvPacket=fi;exports.MsgRegisterAccount=Uo;exports.MsgRegisterCounterpartyPayee=Zs;exports.MsgRegisterForwardingAccount=jr;exports.MsgRegisterPayee=Js;exports.MsgRemoveCodeUploadParamsAddresses=vr;exports.MsgRemoveCurrencyPairs=Bo;exports.MsgRemoveMarketAuthorities=Fo;exports.MsgRemoveValidator=on;exports.MsgRevokeAllowance=Wr;exports.MsgRevokeAuthorization=br;exports.MsgScript=Lo;exports.MsgScriptJSON=Ho;exports.MsgSend=kr;exports.MsgSetBeforeSendHook=En;exports.MsgSetBridgeInfo=An;exports.MsgSetDenomMetadata=Ir;exports.MsgSetDenomMetadataWasm=Cn;exports.MsgSetSendEnabled=Mr;exports.MsgSetWithdrawAddress=Er;exports.MsgSoftwareUpgrade=Io;exports.MsgSpendFeePool=cn;exports.MsgStoreAndInstantiateContract=gr;exports.MsgStoreAndMigrateContract=yr;exports.MsgStoreCode=nr;exports.MsgSubmitEvidence=$r;exports.MsgSubmitGroupProposal=he;exports.MsgSubmitMisbehaviour=oi;exports.MsgSubmitProposal=oo;exports.MsgSubmitProposalLegacy=ro;exports.MsgSubmitTx=Co;exports.MsgSudoContract=pr;exports.MsgTimeout=yi;exports.MsgTimeoutOnClose=_i;exports.MsgTransfer=Ar;exports.MsgUndelegate=Yo;exports.MsgUnjail=kn;exports.MsgUnpinCodes=fr;exports.MsgUpdateACL=Po;exports.MsgUpdateAdmin=ur;exports.MsgUpdateAuctionParams=ze;exports.MsgUpdateAuthParams=Ve;exports.MsgUpdateBankParams=xr;exports.MsgUpdateBatchInfo=yn;exports.MsgUpdateChallenger=gn;exports.MsgUpdateClient=ei;exports.MsgUpdateConsensusParams=Sr;exports.MsgUpdateContractLabel=wr;exports.MsgUpdateCrisisParams=Cr;exports.MsgUpdateDistrParams=Tr;exports.MsgUpdateEvmParams=Vr;exports.MsgUpdateGovParams=io;exports.MsgUpdateGroupAdmin=fo;exports.MsgUpdateGroupDecisionPolicy=go;exports.MsgUpdateGroupMembers=yo;exports.MsgUpdateGroupMetadata=_o;exports.MsgUpdateGroupPolicyAdmin=vo;exports.MsgUpdateGroupPolicyMetadata=wo;exports.MsgUpdateIbcChannelParams=vi;exports.MsgUpdateIbcClientParams=ii;exports.MsgUpdateIbcHooksParams=bo;exports.MsgUpdateIbcNftParams=ko;exports.MsgUpdateIbcPermAdmin=xo;exports.MsgUpdateIbcTransferParams=zs;exports.MsgUpdateInstantiateConfig=dr;exports.MsgUpdateMarketmapParams=Ro;exports.MsgUpdateMarkets=No;exports.MsgUpdateMetadata=vn;exports.MsgUpdateMoveParams=zo;exports.MsgUpdateMstakingParams=en;exports.MsgUpdateOpchildParams=bn;exports.MsgUpdateOphostParams=wn;exports.MsgUpdateOracle=Pn;exports.MsgUpdateOracleConfig=_n;exports.MsgUpdatePermissionedRelayers=Mo;exports.MsgUpdateProposer=fn;exports.MsgUpdateRewardParams=Dn;exports.MsgUpdateSlashingParams=xn;exports.MsgUpdateTokenfactoryParams=On;exports.MsgUpdateWasmParams=lr;exports.MsgUpgradeClient=ri;exports.MsgUpsertMarkets=To;exports.MsgVerifyInvariant=Ur;exports.MsgVote=le;exports.MsgVoteLegacy=de;exports.MsgVoteWeighted=so;exports.MsgVoteWeightedLegacy=no;exports.MsgWhitelist=Vo;exports.MsgWithdrawDelegatorReward=Br;exports.MsgWithdrawValidatorCommission=Or;exports.MstakingAPI=tm;exports.MstakingParams=Qn;exports.MultiSignature=Ad;exports.NftClassTrace=Xs;exports.NonFungibleTokenPacketData=ba;exports.OpValidator=wi;exports.OpchildAPI=em;exports.OpchildParams=es;exports.OphostAPI=rm;exports.OphostParams=ts;exports.OracleAPI=om;exports.OrderBy=_d;exports.Output=Me;exports.P1_VALUES=Oc;exports.PAYLOAD_TYPE=za;exports.Packet=zt;exports.PacketFee=qe;exports.PacketId=Re;exports.ParamChange=_s;exports.ParamChanges=Qr;exports.ParameterChangeProposal=to;exports.PercentageDecisionPolicy=uo;exports.PeriodicAllowance=Jt;exports.Plan=ke;exports.Proposal=Ne;exports.ProviderConfig=Ms;exports.PublishAuthorization=We;exports.QuotePrice=ta;exports.RESTClient=dm;exports.RawKey=sc;exports.Redelegation=ae;exports.RewardAPI=nm;exports.RewardParams=rs;exports.RewardWeight=ys;exports.SendAuthorization=Ke;exports.SendEnabled=we;exports.SignDoc=Nu;exports.SignatureV2=lt;exports.SignerInfo=jt;exports.SimplePublicKey=Pt;exports.SimulateResponse=tc;exports.SlashingAPI=sm;exports.SlashingParams=os;exports.StakeAuthorization=me;exports.StakeAuthorizationValidators=ie;exports.StoreCodeAuthorization=Je;exports.TallyResult=Kn;exports.TendermintAPI=im;exports.TextProposal=eo;exports.ThresholdDecisionPolicy=co;exports.Ticker=Is;exports.Timeout=ks;exports.TokenfactoryAPI=am;exports.TokenfactoryParams=ns;exports.TransferAuthorization=Hs;exports.Tx=Dt;exports.TxAPI=ra;exports.TxBody=Hn;exports.TxInfo=aa;exports.TxLog=Pi;exports.UnbondingDelegation=Lt;exports.UpgradeAPI=cm;exports.ValConsPublicKey=_t;exports.Validator=dt;exports.ValidatorParams=fs;exports.ValidatorSigningInfo=Ai;exports.Vote=vs;exports.Wallet=mm;exports.WasmAPI=um;exports.WasmParams=qn;exports.WebSocketClient=Td;exports.WeightedVoteOption=Tt;exports.bcs=bd;exports.checkDecimal=Rs;exports.hashToHex=Ga;exports.isTxError=Dd;exports.keccak256=Bu;exports.num=F;exports.prepareSignBytes=xa;exports.removeNull=Cu;exports.ripemd160=Ou;exports.sha256=Qa;Object.keys(At).forEach(i=>{i!=="default"&&!Object.prototype.hasOwnProperty.call(exports,i)&&Object.defineProperty(exports,i,{enumerable:!0,get:()=>At[i]})});
1
+ "use strict";var jm=Object.defineProperty;var Jm=(i,t,e)=>t in i?jm(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var _=(i,t,e)=>Jm(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const cu=require("axios"),Zm=require("@initia/initia.proto/cosmos/tx/v1beta1/service"),At=require("bignumber.js"),Ym=require("@initia/initia.proto/cosmos/base/v1beta1/coin"),f=require("@initia/initia.proto/google/protobuf/any"),Bi=require("@initia/initia.proto/sdk/auction/v1/tx"),Xm=require("@initia/initia.proto/sdk/auction/v1/genesis"),Qm=require("@initia/initia.proto/google/protobuf/duration"),qs=require("@initia/initia.proto/cosmos/auth/v1beta1/auth"),mc=require("@initia/initia.proto/cosmos/auth/v1beta1/tx"),vu=require("secp256k1"),wu=require("jscrypto/SHA256"),td=require("jscrypto/RIPEMD160"),ed=require("jscrypto/Base64"),Ka=require("jscrypto"),Au=require("keccak256"),dc=require("@initia/initia.proto/cosmos/crypto/multisig/keys"),lc=require("@initia/initia.proto/cosmos/crypto/secp256k1/keys"),pc=require("@initia/initia.proto/cosmos/crypto/ed25519/keys"),hc=require("@initia/initia.proto/initia/crypto/v1beta1/ethsecp256k1/keys"),et=require("bech32"),$e=require("@initia/initia.proto/initia/mstaking/v1/authz"),fc=require("@initia/initia.proto/cosmos/bank/v1beta1/authz"),Ra=require("@initia/initia.proto/cosmos/authz/v1beta1/authz"),Oi=require("@initia/initia.proto/initia/move/v1/authz"),Gt=require("@initia/initia.proto/initia/move/v1/types"),rt=require("@initia/initia.proto/cosmwasm/wasm/v1/authz"),Ht=require("@initia/initia.proto/cosmwasm/wasm/v1/types"),B=require("@initia/initia.proto/cosmwasm/wasm/v1/tx"),qa=require("@initia/initia.proto/ibc/applications/transfer/v1/authz"),Ni=require("@initia/initia.proto/ibc/applications/transfer/v1/tx"),Ia=require("@initia/initia.proto/ibc/core/client/v1/client"),Pu=require("@initia/initia.proto/ibc/applications/transfer/v1/transfer"),rd=require("@initia/initia.proto/ibc/applications/transfer/v2/packet"),Nn=require("@initia/initia.proto/cosmos/authz/v1beta1/tx"),Zt=require("@initia/initia.proto/cosmos/bank/v1beta1/tx"),na=require("@initia/initia.proto/cosmos/bank/v1beta1/bank"),gc=require("@initia/initia.proto/initia/bank/v1/tx"),yc=require("@initia/initia.proto/celestia/blob/v1/tx"),xc=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"),Mc=require("@initia/initia.proto/cosmos/crypto/multisig/v1beta1/multisig"),Ya=require("@initia/initia.proto/tendermint/types/params"),_c=require("@initia/initia.proto/cosmos/consensus/v1/tx"),ga=require("@initia/initia.proto/cosmos/crisis/v1beta1/tx"),St=require("@initia/initia.proto/cosmos/distribution/v1beta1/tx"),bu=require("@initia/initia.proto/initia/distribution/v1/distribution"),Ti=require("@initia/initia.proto/initia/distribution/v1/tx"),vc=require("@initia/initia.proto/cosmos/evidence/v1beta1/tx"),wc=require("@initia/initia.proto/cosmos/evidence/v1beta1/evidence"),Yt=require("@initia/initia.proto/minievm/evm/v1/tx"),od=require("@initia/initia.proto/minievm/evm/v1/types"),Tn=require("@initia/initia.proto/cosmos/feegrant/v1beta1/feegrant"),Fi=require("@initia/initia.proto/cosmos/feegrant/v1beta1/tx"),Ri=require("@initia/initia.proto/noble/forwarding/v1/tx"),Ut=require("@initia/initia.proto/cosmos/gov/v1/tx"),Xt=require("@initia/initia.proto/cosmos/gov/v1beta1/tx"),$a=require("@initia/initia.proto/cosmos/params/v1beta1/params"),La=require("@initia/initia.proto/cosmos/gov/v1beta1/gov"),ue=require("@initia/initia.proto/cosmos/gov/v1/gov"),Xa=require("@initia/initia.proto/initia/gov/v1/gov"),Ac=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"),Qt=require("@initia/initia.proto/ibc/applications/fee/v1/tx"),Du=require("@initia/initia.proto/ibc/applications/fee/v1/fee"),ca=require("@initia/initia.proto/ibc/core/channel/v1/channel"),nd=require("@initia/initia.proto/ibc/applications/fee/v1/metadata"),qi=require("@initia/initia.proto/initia/ibchooks/v1/tx"),ku=require("@initia/initia.proto/initia/ibchooks/v1/types"),$i=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/tx"),xu=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/types"),sd=require("@initia/initia.proto/ibc/applications/nft_transfer/v1/packet"),Li=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"),Hi=require("@initia/initia.proto/cosmos/upgrade/v1beta1/tx"),Mu=require("@initia/initia.proto/ibc/core/commitment/v1/commitment"),ce=require("@initia/initia.proto/ibc/core/connection/v1/connection"),Ct=require("@initia/initia.proto/ibc/core/connection/v1/tx"),zi=require("@initia/initia.proto/initia/intertx/v1/tx"),Et=require("@initia/initia.proto/connect/marketmap/v2/tx"),Vi=require("@initia/initia.proto/connect/oracle/v2/tx"),ad=require("@initia/initia.proto/connect/types/v2/currency_pair"),cd=require("@initia/initia.proto/connect/oracle/v2/genesis"),Bc=require("@initia/initia.proto/connect/marketmap/v2/market"),ud=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"),Oc=require("@initia/opinit.proto/opinit/opchild/v1/types"),z=require("@initia/opinit.proto/opinit/ophost/v1/tx"),Le=require("@initia/opinit.proto/opinit/ophost/v1/types"),md=require("@initia/initia.proto/initia/reward/v1/types"),Pc=require("@initia/initia.proto/initia/reward/v1/tx"),Ki=require("@initia/initia.proto/cosmos/slashing/v1beta1/tx"),Iu=require("@initia/initia.proto/cosmos/slashing/v1beta1/slashing"),ct=require("@initia/initia.proto/miniwasm/tokenfactory/v1/tx"),dd=require("@initia/initia.proto/miniwasm/tokenfactory/v1/params"),ld=require("@initia/initia.proto/cosmos/base/abci/v1beta1/abci"),Ce=require("@mysten/bcs"),pd=require("ws"),hd=require("ripemd160"),fd=require("semver"),gd=require("bip32"),uu=require("bip39");function Su(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const ya=Su(vu),yd=Su(fd),_d=Zm.OrderBy;class Uu{constructor(t,e){_(this,"axios");_(this,"baseURL");this.baseURL=t;const r={headers:{Accept:"application/json"},timeout:3e4};this.axios=cu.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 cu.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 xa(i){if(Array.isArray(i))return i.map(xa);if(typeof i!="object"||i===null)return i;const t={};return Object.keys(i).sort().forEach(e=>{i[e]===void 0||i[e]===null||(t[e]=xa(i[e]))}),t}class u{toJSON(){return JSON.stringify(xa(this.toData()))}toAminoJSON(){return JSON.stringify(xa(this.toAmino()))}}function Cu(i){return i!==null&&typeof i=="object"?Object.entries(i).filter(([,t])=>t!=null).reduce((t,[e,r])=>({...t,[e]:r===Object(r)&&!Array.isArray(r)?Cu(r):r}),{}):i}function F(i){return new At.BigNumber(i)}function Rs(i){return typeof i=="string"?i.includes("."):!F(i).isInteger()}class I extends u{constructor(e,r){super();_(this,"amount");_(this,"isDecimal");this.denom=e,this.amount=F(r).toString(),this.isDecimal=Rs(r)}toIntCoin(){return new I(this.denom,F(this.amount).toFixed())}toIntCeilCoin(){return new I(this.denom,F(this.amount).toFixed(0,2))}toDecCoin(){return new I(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 I(n,o)}add(e){let r,o=this.isDecimal;if(e instanceof I){if(e.denom!==this.denom)throw new I.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||Rs(e);const n=F(this.amount).plus(r);return new I(this.denom,o&&n.isInteger()?n.toFixed(1):n.toFixed())}sub(e){let r,o=this.isDecimal;if(e instanceof I){if(e.denom!==this.denom)throw new I.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||Rs(e);const n=F(this.amount).minus(r);return new I(this.denom,o&&n.isInteger()?n.toFixed(1):n.toFixed())}mul(e){const r=this.isDecimal||Rs(e),o=F(this.amount).multipliedBy(e);return new I(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}div(e){const r=this.isDecimal||Rs(e),o=F(this.amount).dividedBy(e);return new I(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}mod(e){const r=this.isDecimal||Rs(e),o=F(this.amount).mod(e);return new I(this.denom,r&&o.isInteger()?o.toFixed(1):o.toFixed())}static fromAmino(e){const{denom:r,amount:o}=e;return new I(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 I(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 I(e.denom,e.amount)}toProto(){return Ym.Coin.fromPartial({denom:this.denom,amount:this.isDecimal?F(this.amount).toFixed(18):this.amount})}}(i=>{class t{constructor(r){this.message=r}}i.ArithmeticError=t})(I||(I={}));class He 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 He(e,I.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 He(e,I.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 He(t.bidder,I.fromProto(t.bid),t.transactions.map(e=>Buffer.from(e).toString("base64")))}toProto(){const{bidder:t,bid:e,transactions:r}=this;return Bi.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:Bi.MsgAuctionBid.encode(this.toProto()).finish()})}static unpackAny(t){return He.fromProto(Bi.MsgAuctionBid.decode(t.value))}}class Fn 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:a}}=t;return new Fn(parseInt(e),r,I.fromAmino(o),I.fromAmino(n),s,a)}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:a}=t;return new Fn(parseInt(e),r,I.fromData(o),I.fromData(n),s,a)}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 Fn(t.maxBundleSize,Buffer.from(t.escrowAccountAddress).toString("base64"),I.fromProto(t.reserveFee),I.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 Xm.Params.fromPartial({maxBundleSize:t,escrowAccountAddress:Buffer.from(e,"base64"),reserveFee:r.toProto(),minBidIncrement:o.toProto(),frontRunningProtection:n,proposerFee:s})}}class ze extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new ze(e,Fn.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 ze(e,Fn.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 ze(t.authority,Fn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Bi.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/sdk.auction.v1.MsgUpdateParams",value:Bi.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ze.fromProto(Bi.MsgUpdateParams.decode(t.value))}}class Q{constructor(t){this.c=t}}class Eu extends Q{async parameters(t={}){return this.c.get("/block-sdk/auction/v1/params",t).then(e=>Fn.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 I(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=>I.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 I){if(r.denom!=e)throw new Error(`Denoms must match when setting: ${e}, ${r.denom}`);o=r}else o=new I(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 I?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(I.fromAmino))}toAmino(){return this.toArray().map(e=>e.toAmino())}static fromData(e){return new l((e??[]).map(I.fromData))}toData(){return this.toArray().map(e=>e.toData())}static fromProto(e){return new l((e??[]).map(I.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 Qm.Duration.fromPartial({seconds:BigInt(this.seconds),nanos:this.nanos})}}class Rn 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 Rn(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 Rn(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 Rn(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 qs.Params.fromPartial({maxMemoCharacters:BigInt(t),txSigLimit:BigInt(e),txSizeCostPerByte:BigInt(r),sigVerifyCostEd25519:BigInt(o),sigVerifyCostSecp256k1:BigInt(n)})}}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:"cosmos-sdk/x/auth/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":"/cosmos.auth.v1beta1.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 mc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.MsgUpdateParams",value:mc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ve.fromProto(mc.MsgUpdateParams.decode(t.value))}}function Ga(i){return wu.SHA256.hash(ed.Base64.parse(i)).toString().toUpperCase()}function Qa(i){return wu.SHA256.hash(new Ka.Word32Array(i)).toUint8Array()}function Bu(i){return Au(Buffer.from(i))}function Ou(i){return td.RIPEMD160.hash(new Ka.Word32Array(i)).toUint8Array()}const vd=Buffer.from("eb5ae98721","hex"),wd=Buffer.from("22c1f7e2","hex"),mu=i=>{const t=parseInt(i.toString());if(t>127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]};exports.PublicKey=void 0;(i=>{function t(o){switch(o.type){case"tendermint/PubKeySecp256k1":return Pt.fromAmino(o);case"tendermint/PubKeyMultisigThreshold":return Ee.fromAmino(o);case"tendermint/PubKeyEd25519":return _t.fromAmino(o);case"initia/PubKeyEthSecp256k1":return Be.fromAmino(o)}}i.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 Be.fromData(o)}}i.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 Be.unpackAny(o);throw new Error(`Pubkey type ${n} not recognized`)}i.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 lc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:lc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Pt.fromProto(lc.PubKey.decode(t.value))}encodeAminoPubkey(){return Buffer.concat([vd,Buffer.from(this.key,"base64")])}rawAddress(){const t=Buffer.from(this.key,"base64");return Ou(Qa(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(wd);t.push(8),t.push(...mu(this.threshold));for(const e of this.pubkeys.map(r=>r.encodeAminoPubkey()))t.push(18),t.push(...mu(e.length)),t.push(...Array.from(e));return new Uint8Array(t)}rawAddress(){const t=this.encodeAminoPubkey();return Qa(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 dc.LegacyAminoPubKey.fromPartial({threshold:this.threshold,publicKeys:this.pubkeys.map(t=>t.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:dc.LegacyAminoPubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Ee.fromProto(dc.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 pc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:pc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return _t.fromProto(pc.PubKey.decode(t.value))}rawAddress(){const t=Buffer.from(this.key,"base64");return Qa(t).slice(0,20)}address(){return et.bech32.encode("initvalcons",et.bech32.toWords(this.rawAddress()))}}class Be extends u{constructor(t){super(),this.key=t}static fromAmino(t){return new Be(t.value)}toAmino(){return{type:"initia/PubKeyEthSecp256k1",value:this.key}}static fromData(t){return new Be(t.key)}toData(){return{"@type":"/initia.crypto.v1beta1.ethsecp256k1.PubKey",key:this.key}}static fromProto(t){return new Be(Buffer.from(t.key).toString("base64"))}toProto(){return hc.PubKey.fromPartial({key:Buffer.from(this.key,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.crypto.v1beta1.ethsecp256k1.PubKey",value:hc.PubKey.encode(this.toProto()).finish()})}static unpackAny(t){return Be.fromProto(hc.PubKey.decode(t.value))}rawAddress(){if(!ya.publicKeyVerify(Buffer.from(this.key,"base64")))throw new Error("Invalid public key");const e=ya.publicKeyConvert(Buffer.from(this.key,"base64"),!1);return Bu(e.slice(1)).slice(12)}address(){return et.bech32.encode("init",et.bech32.toWords(this.rawAddress()))}}class Wt 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 Wt(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 Wt(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 Wt(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 qs.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:qs.BaseAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Wt.fromProto(qs.BaseAccount.decode(t.value))}}class Oe 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 Oe(Wt.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 Oe(Wt.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 Oe(Wt.fromProto(t.baseAccount),t.name,t.permissions)}toProto(){const{base_account:t,name:e,permissions:r}=this;return qs.ModuleAccount.fromPartial({baseAccount:t.toProto(),name:e,permissions:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",value:qs.ModuleAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Oe.fromProto(qs.ModuleAccount.decode(t.value))}}exports.Account=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/BaseAccount":return Wt.fromAmino(o);case"cosmos-sdk/ModuleAccount":return Oe.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.auth.v1beta1.BaseAccount":return Wt.fromData(o);case"/cosmos.auth.v1beta1.ModuleAccount":return Oe.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;if(n==="/cosmos.auth.v1beta1.BaseAccount")return Wt.unpackAny(o);if(n==="/cosmos.auth.v1beta1.ModuleAccount")return Oe.unpackAny(o);throw new Error(`Account type ${n} not recognized`)}i.fromProto=r})(exports.Account||(exports.Account={}));class me 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 me(l.fromAmino(r),ie.fromAmino(o),ie.fromAmino(n),$e.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:$e.authorizationTypeToJSON(n)}}}static fromData(e){const{max_tokens:r,allow_list:o,deny_list:n,authorization_type:s}=e;return new me(l.fromData(r),ie.fromData(o),ie.fromData(n),$e.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:$e.authorizationTypeToJSON(n)}}static fromProto(e){return new me(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 $e.StakeAuthorization.fromPartial({maxTokens:e.toProto(),allowList:r.toProto(),denyList:o.toProto(),authorizationType:n})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.mstaking.v1.StakeAuthorization",value:$e.StakeAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return me.fromProto($e.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 $e.StakeAuthorization_Validators.fromPartial({address:this.address})}}(i=>{i.Type=$e.AuthorizationType})(me||(me={}));class Ke extends u{constructor(e,r){super();_(this,"spend_limit");this.allow_list=r,this.spend_limit=new l(e)}static fromAmino(e){return new Ke(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 Ke(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 Ke(l.fromProto(e.spendLimit),e.allowList)}toProto(){return fc.SendAuthorization.fromPartial({spendLimit:this.spend_limit.toProto(),allowList:this.allow_list})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.SendAuthorization",value:fc.SendAuthorization.encode(this.toProto()).finish()})}static unpackAny(e){return Ke.fromProto(fc.SendAuthorization.decode(e.value))}}class Ge extends u{constructor(t){super(),this.msg=t}static fromAmino(t){return new Ge(t.value.msg)}toAmino(){const{msg:t}=this;return{type:"cosmos-sdk/GenericAuthorization",value:{msg:t}}}static fromData(t){return new Ge(t.msg)}toData(){const{msg:t}=this;return{"@type":"/cosmos.authz.v1beta1.GenericAuthorization",msg:t}}static fromProto(t){return new Ge(t.msg)}toProto(){return Ra.GenericAuthorization.fromPartial({msg:this.msg})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",value:Ra.GenericAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Ge.fromProto(Ra.GenericAuthorization.decode(t.value))}}class We extends u{constructor(t){super(),this.module_names=t}static fromAmino(t){return new We(t.value.module_names)}toAmino(){return{type:"move/PublishAuthorization",value:{module_names:this.module_names}}}static fromData(t){return new We(t.module_names)}toData(){return{"@type":"/initia.move.v1.PublishAuthorization",module_names:this.module_names}}static fromProto(t){return new We(t.moduleNames)}toProto(){return Oi.PublishAuthorization.fromPartial({moduleNames:this.module_names})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.PublishAuthorization",value:Oi.PublishAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return We.fromProto(Oi.PublishAuthorization.decode(t.value))}}class je extends u{constructor(t){super(),this.items=t}static fromAmino(t){return new je(t.value.items.map(us.fromAmino))}toAmino(){return{type:"move/ExecuteAuthorization",value:{items:this.items.map(t=>t.toAmino())}}}static fromData(t){return new je(t.items.map(us.fromData))}toData(){return{"@type":"/initia.move.v1.ExecuteAuthorization",items:this.items.map(t=>t.toData())}}static fromProto(t){return new je(t.items.map(us.fromProto))}toProto(){return Oi.ExecuteAuthorization.fromPartial({items:this.items.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.ExecuteAuthorization",value:Oi.ExecuteAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return je.fromProto(Oi.ExecuteAuthorization.decode(t.value))}}class us 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 us(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 us(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 us(t.moduleAddress,t.moduleName,t.functionNames)}toProto(){return Gt.ExecuteAuthorizationItem.fromPartial({moduleAddress:this.module_address,moduleName:this.module_name,functionNames:this.function_names})}}class it extends u{constructor(t,e){super(),this.permission=t,this.addresses=e}static fromAmino(t){const{permission:e,addresses:r}=t;return new it(Ht.accessTypeFromJSON(e),r)}toAmino(){const{permission:t,addresses:e}=this;return{permission:Ht.accessTypeToJSON(t),addresses:e}}static fromData(t){const{permission:e,addresses:r}=t;return new it(Ht.accessTypeFromJSON(e),r)}toData(){const{permission:t,addresses:e}=this;return{permission:Ht.accessTypeToJSON(t),addresses:e}}static fromProto(t){return new it(t.permission,t.addresses)}toProto(){const{permission:t,addresses:e}=this;return Ht.AccessConfig.fromPartial({permission:t,addresses:e})}}(i=>{i.Type=Ht.AccessType})(it||(it={}));class ms 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 ms(e,r?it.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 ms(e,r?it.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 ms(Buffer.from(t.codeHash).toString("base64"),t.instantiatePermission?it.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 Je extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new Je(t.value.grants.map(ms.fromAmino))}toAmino(){return{type:"wasm/StoreCodeAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new Je(t.grants.map(ms.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.StoreCodeAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new Je(t.grants.map(ms.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 Je.fromProto(rt.StoreCodeAuthorization.decode(t.value))}}class Ze extends u{constructor(t){super(),this.remaining=t}static fromAmino(t){return new Ze(parseInt(t.value.remaining))}toAmino(){return{type:"wasm/MaxCallsLimit",value:{remaining:this.remaining.toFixed()}}}static fromData(t){return new Ze(parseInt(t.remaining))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxCallsLimit",remaining:this.remaining.toFixed()}}static fromProto(t){return new Ze(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 Ze.fromProto(rt.MaxCallsLimit.decode(t.value))}}class Ye extends u{constructor(e){super();_(this,"amounts");this.amounts=new l(e)}static fromAmino(e){return new Ye(l.fromAmino(e.value.amounts))}toAmino(){return{type:"wasm/MaxFundsLimit",value:{amounts:this.amounts.toAmino()}}}static fromData(e){return new Ye(l.fromData(e.amounts))}toData(){return{"@type":"/cosmwasm.wasm.v1.MaxFundsLimit",amounts:this.amounts.toData()}}static fromProto(e){return new Ye(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 Ye.fromProto(rt.MaxFundsLimit.decode(e.value))}}class Xe 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 Xe(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 Xe(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 Xe(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 Xe.fromProto(rt.CombinedLimit.decode(e.value))}}var _a;(i=>{function t(o){switch(o.type){case"wasm/MaxCallsLimit":return Ze.fromAmino(o);case"wasm/MaxFundsLimit":return Ye.fromAmino(o);case"wasm/CombinedLimit":return Xe.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.MaxCallsLimit":return Ze.fromData(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return Ye.fromData(o);case"/cosmwasm.wasm.v1.CombinedLimit":return Xe.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmwasm.wasm.v1.MaxCallsLimit":return Ze.unpackAny(o);case"/cosmwasm.wasm.v1.MaxFundsLimit":return Ye.unpackAny(o);case"/cosmwasm.wasm.v1.CombinedLimit":return Xe.unpackAny(o)}throw new Error(`ContractLimit type ${n} not recognized`)}i.fromProto=r})(_a||(_a={}));class Qe extends u{constructor(){super()}static fromAmino(t){return new Qe}toAmino(){return{type:"wasm/AllowAllMessagesFilter",value:{}}}static fromData(t){return new Qe}toData(){return{"@type":"/cosmwasm.wasm.v1.AllowAllMessagesFilter"}}static fromProto(t){return new Qe}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 Qe.fromProto(rt.AllowAllMessagesFilter.decode(t.value))}}class tr extends u{constructor(t){super(),this.keys=t}static fromAmino(t){return new tr(t.value.keys)}toAmino(){return{type:"wasm/AcceptedMessageKeysFilter",value:{keys:this.keys}}}static fromData(t){return new tr(t.keys)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter",keys:this.keys}}static fromProto(t){return new tr(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 tr.fromProto(rt.AcceptedMessageKeysFilter.decode(t.value))}}class er extends u{constructor(t){super(),this.messages=t}static fromAmino(t){return new er(t.value.messages)}toAmino(){return{type:"wasm/AcceptedMessagesFilter",value:{messages:this.messages}}}static fromData(t){return new er(t.messages)}toData(){return{"@type":"/cosmwasm.wasm.v1.AcceptedMessagesFilter",messages:this.messages}}static fromProto(t){return new er(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 er.fromProto(rt.AcceptedMessagesFilter.decode(t.value))}}var va;(i=>{function t(o){switch(o.type){case"wasm/AllowAllMessagesFilter":return Qe.fromAmino(o);case"wasm/AcceptedMessageKeysFilter":return tr.fromAmino(o);case"wasm/AcceptedMessagesFilter":return er.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return Qe.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return tr.fromData(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return er.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmwasm.wasm.v1.AllowAllMessagesFilter":return Qe.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessageKeysFilter":return tr.unpackAny(o);case"/cosmwasm.wasm.v1.AcceptedMessagesFilter":return er.unpackAny(o)}throw new Error(`ContractFilter type ${n} not recognized`)}i.fromProto=r})(va||(va={}));class _e 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 _e(e,_a.fromAmino(r),va.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 _e(e,_a.fromData(r),va.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 _e(t.contract,_a.fromProto(t.limit),va.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 rr extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new rr(t.value.grants.map(_e.fromAmino))}toAmino(){return{type:"wasm/ContractExecutionAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new rr(t.grants.map(_e.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractExecutionAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new rr(t.grants.map(_e.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 rr.fromProto(rt.ContractExecutionAuthorization.decode(t.value))}}class or extends u{constructor(t){super(),this.grants=t}static fromAmino(t){return new or(t.value.grants.map(_e.fromAmino))}toAmino(){return{type:"wasm/ContractMigrationAuthorization",value:{grants:this.grants.map(t=>t.toAmino())}}}static fromData(t){return new or(t.grants.map(_e.fromData))}toData(){return{"@type":"/cosmwasm.wasm.v1.ContractMigrationAuthorization",grants:this.grants.map(t=>t.toData())}}static fromProto(t){return new or(t.grants.map(_e.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 or.fromProto(rt.ContractMigrationAuthorization.decode(t.value))}}class nr 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 nr(e,r,o?it.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 nr(e,r,o?it.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 nr(t.sender,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?it.fromProto(t.instantiatePermission):void 0)}toProto(){const{sender:t,wasm_byte_code:e,instantiate_permission:r}=this;return B.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:B.MsgStoreCode.encode(this.toProto()).finish()})}static unpackAny(t){return nr.fromProto(B.MsgStoreCode.decode(t.value))}}class sr extends u{constructor(e,r,o,n,s,a){super();_(this,"funds");this.sender=e,this.admin=r,this.code_id=o,this.label=n,this.msg=s,this.funds=new l(a)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:n,label:s,msg:a,funds:c}}=e;return new sr(r,o,parseInt(n),s,a,l.fromAmino(c))}toAmino(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:a}=this;return{type:"wasm/MsgInstantiateContract",value:{sender:e,admin:r,code_id:o.toFixed(),label:n,msg:s,funds:a.toAmino()}}}static fromData(e){const{sender:r,admin:o,code_id:n,label:s,msg:a,funds:c}=e;return new sr(r,o,parseInt(n),s,a,l.fromData(c))}toData(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:a}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract",sender:e,admin:r,code_id:o.toFixed(),label:n,msg:s,funds:a.toData()}}static fromProto(e){return new sr(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:a}=this;return B.MsgInstantiateContract.fromPartial({sender:e,admin:r,codeId:BigInt(o),label:n,msg:Buffer.from(s,"base64"),funds:a.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:B.MsgInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return sr.fromProto(B.MsgInstantiateContract.decode(e.value))}}class ir extends u{constructor(e,r,o,n,s,a,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(a)}static fromAmino(e){const{value:{sender:r,admin:o,code_id:n,label:s,msg:a,funds:c,salt:d,fix_msg:g}}=e;return new ir(r,o,parseInt(n),s,a,l.fromAmino(c),d,g)}toAmino(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:a,salt:c,fix_msg:d}=this;return{type:"wasm/MsgInstantiateContract2",value:{sender:e,admin:r,code_id:o.toFixed(),label:n,msg:s,funds:a.toAmino(),salt:c,fix_msg:d}}}static fromData(e){const{sender:r,admin:o,code_id:n,label:s,msg:a,funds:c,salt:d,fix_msg:g}=e;return new ir(r,o,parseInt(n),s,a,l.fromData(c),d,g)}toData(){const{sender:e,admin:r,code_id:o,label:n,msg:s,funds:a,salt:c,fix_msg:d}=this;return{"@type":"/cosmwasm.wasm.v1.MsgInstantiateContract2",sender:e,admin:r,code_id:o.toFixed(),label:n,msg:s,funds:a.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:a,salt:c,fix_msg:d}=this;return B.MsgInstantiateContract2.fromPartial({sender:e,admin:r,codeId:BigInt(o),label:n,msg:Buffer.from(s,"base64"),funds:a.toProto(),salt:Buffer.from(c,"base64"),fixMsg:d})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:B.MsgInstantiateContract2.encode(this.toProto()).finish()})}static unpackAny(e){return ir.fromProto(B.MsgInstantiateContract2.decode(e.value))}}class ar 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 ar(r,o,n,l.fromAmino(s))}toAmino(){const{sender:e,contract:r,msg:o,funds:n}=this;return{type:"wasm/MsgExecuteContract",value:{sender:e,contract:r,msg:o,funds:n.toAmino()}}}static fromData(e){const{sender:r,contract:o,msg:n,funds:s}=e;return new ar(r,o,n,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:o,funds:n.toData()}}static fromProto(e){return new ar(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 B.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:B.MsgExecuteContract.encode(this.toProto()).finish()})}static unpackAny(e){return ar.fromProto(B.MsgExecuteContract.decode(e.value))}}class cr 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 cr(e,r,parseInt(o),n)}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:o}}}static fromData(t){const{sender:e,contract:r,code_id:o,msg:n}=t;return new cr(e,r,parseInt(o),n)}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:o}}static fromProto(t){return new cr(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 B.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:B.MsgMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return cr.fromProto(B.MsgMigrateContract.decode(t.value))}}class ur 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 ur(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 ur(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 ur(t.sender,t.newAdmin,t.contract)}toProto(){const{sender:t,new_admin:e,contract:r}=this;return B.MsgUpdateAdmin.fromPartial({sender:t,newAdmin:e,contract:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:B.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return ur.fromProto(B.MsgUpdateAdmin.decode(t.value))}}class mr extends u{constructor(t,e){super(),this.sender=t,this.contract=e}static fromAmino(t){const{value:{sender:e,contract:r}}=t;return new mr(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 mr(e,r)}toData(){const{sender:t,contract:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgClearAdmin",sender:t,contract:e}}static fromProto(t){return new mr(t.sender,t.contract)}toProto(){const{sender:t,contract:e}=this;return B.MsgClearAdmin.fromPartial({sender:t,contract:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:B.MsgClearAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return mr.fromProto(B.MsgClearAdmin.decode(t.value))}}class dr 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 dr(e,parseInt(r),it.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 dr(e,parseInt(r),it.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 dr(t.sender,Number(t.codeId),it.fromProto(t.newInstantiatePermission))}toProto(){const{sender:t,code_id:e,new_instantiate_permission:r}=this;return B.MsgUpdateInstantiateConfig.fromPartial({sender:t,codeId:BigInt(e),newInstantiatePermission:r.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",value:B.MsgUpdateInstantiateConfig.encode(this.toProto()).finish()})}static unpackAny(t){return dr.fromProto(B.MsgUpdateInstantiateConfig.decode(t.value))}}class qn 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 qn(it.fromAmino(e),Ht.accessTypeFromJSON(r))}toAmino(){const{code_upload_access:t,instantiate_default_permission:e}=this;return{type:"wasm/Params",value:{code_upload_access:t.toAmino(),instantiate_default_permission:Ht.accessTypeToJSON(e)}}}static fromData(t){const{code_upload_access:e,instantiate_default_permission:r}=t;return new qn(it.fromData(e),Ht.accessTypeFromJSON(r))}toData(){const{code_upload_access:t,instantiate_default_permission:e}=this;return{"@type":"/cosmwasm.wasm.v1.Params",code_upload_access:t.toData(),instantiate_default_permission:Ht.accessTypeToJSON(e)}}static fromProto(t){return new qn(it.fromProto(t.codeUploadAccess),t.instantiateDefaultPermission)}toProto(){const{code_upload_access:t,instantiate_default_permission:e}=this;return Ht.Params.fromPartial({codeUploadAccess:t.toProto(),instantiateDefaultPermission:e})}}class lr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new lr(e,qn.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 lr(e,qn.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 lr(t.authority,qn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return B.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",value:B.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return lr.fromProto(B.MsgUpdateParams.decode(t.value))}}class pr 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 pr(e,r,o)}toAmino(){const{authority:t,contract:e,msg:r}=this;return{type:"wasm/MsgSudoContract",value:{authority:t,contract:e,msg:r}}}static fromData(t){const{authority:e,contract:r,msg:o}=t;return new pr(e,r,o)}toData(){const{authority:t,contract:e,msg:r}=this;return{"@type":"/cosmwasm.wasm.v1.MsgSudoContract",authority:t,contract:e,msg:r}}static fromProto(t){return new pr(t.authority,t.contract,Buffer.from(t.msg).toString("base64"))}toProto(){const{authority:t,contract:e,msg:r}=this;return B.MsgSudoContract.fromPartial({authority:t,contract:e,msg:Buffer.from(r,"base64")})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",value:B.MsgSudoContract.encode(this.toProto()).finish()})}static unpackAny(t){return pr.fromProto(B.MsgSudoContract.decode(t.value))}}class hr 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 hr(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 hr(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 hr(t.authority,t.codeIds.map(e=>Number(e)))}toProto(){const{authority:t,code_ids:e}=this;return B.MsgPinCodes.fromPartial({authority:t,codeIds:e.map(r=>BigInt(r))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",value:B.MsgPinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return hr.fromProto(B.MsgPinCodes.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/MsgUnpinCodes",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.MsgUnpinCodes",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 B.MsgUnpinCodes.fromPartial({authority:t,codeIds:e.map(r=>BigInt(r))})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",value:B.MsgUnpinCodes.encode(this.toProto()).finish()})}static unpackAny(t){return fr.fromProto(B.MsgUnpinCodes.decode(t.value))}}class gr extends u{constructor(e,r,o,n,s,a,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=a,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:a,label:c,msg:d,funds:g,source:v,builder:b,code_hash:k}}=e;return new gr(r,o,n?it.fromAmino(n):void 0,s,a,c,d,l.fromAmino(g),v,b,k)}toAmino(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:n,admin:s,label:a,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:a,msg:c,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:a,label:c,msg:d,funds:g,source:v,builder:b,code_hash:k}=e;return new gr(r,o,n?it.fromData(n):void 0,s,a,c,d,l.fromData(g),v,b,k)}toData(){const{authority:e,wasm_byte_code:r,instantiate_permission:o,unpin_code:n,admin:s,label:a,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:a,msg:c,funds:d.toData(),source:g,builder:v,code_hash:b}}static fromProto(e){return new gr(e.authority,Buffer.from(e.wasmByteCode).toString("base64"),e.instantiatePermission?it.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:a,msg:c,funds:d,source:g,builder:v,code_hash:b}=this;return B.MsgStoreAndInstantiateContract.fromPartial({authority:e,wasmByteCode:Buffer.from(r,"base64"),instantiatePermission:o==null?void 0:o.toProto(),unpinCode:n,admin:s,label:a,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:B.MsgStoreAndInstantiateContract.encode(this.toProto()).finish()})}static unpackAny(e){return gr.fromProto(B.MsgStoreAndInstantiateContract.decode(e.value))}}class yr 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 yr(e,r,o?it.fromAmino(o):void 0,n,s)}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:n}}}static fromData(t){const{authority:e,wasm_byte_code:r,instantiate_permission:o,contract:n,msg:s}=t;return new yr(e,r,o?it.fromData(o):void 0,n,s)}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:n}}static fromProto(t){return new yr(t.authority,Buffer.from(t.wasmByteCode).toString("base64"),t.instantiatePermission?it.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 B.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:B.MsgStoreAndMigrateContract.encode(this.toProto()).finish()})}static unpackAny(t){return yr.fromProto(B.MsgStoreAndMigrateContract.decode(t.value))}}class _r extends u{constructor(t,e){super(),this.authority=t,this.addresses=e}static fromAmino(t){const{value:{authority:e,addresses:r}}=t;return new _r(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 _r(e,r)}toData(){const{authority:t,addresses:e}=this;return{"@type":"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new _r(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return B.MsgAddCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",value:B.MsgAddCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return _r.fromProto(B.MsgAddCodeUploadParamsAddresses.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/MsgRemoveCodeUploadParamsAddresses",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.MsgRemoveCodeUploadParamsAddresses",authority:t,addresses:e}}static fromProto(t){return new vr(t.authority,t.addresses)}toProto(){const{authority:t,addresses:e}=this;return B.MsgRemoveCodeUploadParamsAddresses.fromPartial({authority:t,addresses:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",value:B.MsgRemoveCodeUploadParamsAddresses.encode(this.toProto()).finish()})}static unpackAny(t){return vr.fromProto(B.MsgRemoveCodeUploadParamsAddresses.decode(t.value))}}class wr 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 wr(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 wr(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 wr(t.sender,t.newLabel,t.contract)}toProto(){const{sender:t,new_label:e,contract:r}=this;return B.MsgUpdateContractLabel.fromPartial({sender:t,newLabel:e,contract:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",value:B.MsgUpdateContractLabel.encode(this.toProto()).finish()})}static unpackAny(t){return wr.fromProto(B.MsgUpdateContractLabel.decode(t.value))}}class $s 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 $s(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 $s(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 $s(Number(t.blockHeight),Number(t.txIndex))}toProto(){const{block_height:t,tx_index:e}=this;return Ht.AbsoluteTxPosition.fromPartial({blockHeight:BigInt(t),txIndex:BigInt(e)})}}class Ls 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:a}=e;return new Ls(r,o,l.fromAmino(n),s,a)}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:a}=e;return new Ls(r,o,l.fromData(n),s,a)}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 Ls(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 qa.Allocation.fromPartial({sourcePort:e,sourceChannel:r,spendLimit:o.toProto(),allowList:n,allowedPacketData:s})}}class Hs 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 Hs(t.allocations.map(Ls.fromData))}toData(){return{"@type":"/ibc.applications.transfer.v1.TransferAuthorization",allocations:this.allocations.map(t=>t.toData())}}static fromProto(t){return new Hs(t.allocations.map(Ls.fromProto))}toProto(){return qa.TransferAuthorization.fromPartial({allocations:this.allocations.map(t=>t.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.TransferAuthorization",value:qa.TransferAuthorization.encode(this.toProto()).finish()})}static unpackAny(t){return Hs.fromProto(qa.TransferAuthorization.decode(t.value))}}class C 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 C(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 C(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 C(Number(t.revisionNumber),Number(t.revisionHeight))}toProto(){const{revision_number:t,revision_height:e}=this;return Ia.Height.fromPartial({revisionNumber:BigInt(t),revisionHeight:BigInt(e)})}}class Ar extends u{constructor(e,r,o,n,s,a,c,d){super();_(this,"source_port");_(this,"source_channel");_(this,"token");_(this,"sender");_(this,"receiver");_(this,"timeout_height");_(this,"timeout_timestamp");_(this,"memo");if(!a&&!c)throw new Error("both of timeout_height and timeout_timestamp are undefined");this.source_port=e,this.source_channel=r,this.token=o,this.sender=n,this.receiver=s,this.timeout_height=a,this.timeout_timestamp=c,this.memo=d}static fromAmino(e){const{value:{source_port:r,source_channel:o,token:n,sender:s,receiver:a,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 Ar(r,o,n?I.fromAmino(n):void 0,s,a,c?C.fromAmino(c):void 0,d,g)}toAmino(){const{source_port:e,source_channel:r,token:o,sender:n,receiver:s,timeout_height:a,timeout_timestamp:c,memo:d}=this;return{type:"cosmos-sdk/MsgTransfer",value:{source_port:e,source_channel:r,token:o==null?void 0:o.toAmino(),sender:n,receiver:s,timeout_height:a==null?void 0:a.toAmino(),timeout_timestamp:c,memo:d}}}static fromData(e){const{source_port:r,source_channel:o,token:n,sender:s,receiver:a,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 Ar(r,o,n?I.fromData(n):void 0,s,a,d?C.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:a,timeout_timestamp:c,memo:d}=this;return{"@type":"/ibc.applications.transfer.v1.MsgTransfer",source_port:e,source_channel:r,token:o==null?void 0:o.toData(),sender:n,receiver:s,timeout_height:a?a.toData():new C(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 Ar(e.sourcePort,e.sourceChannel,e.token?I.fromProto(e.token):void 0,e.sender,e.receiver,e.timeoutHeight?C.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:a,timeout_timestamp:c,memo:d}=this;return Ni.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,token:o==null?void 0:o.toProto(),sender:n,receiver:s,timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:c?BigInt(c):void 0,memo:d})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:Ni.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Ar.fromProto(Ni.MsgTransfer.decode(e.value))}}class ds 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 ds(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 ds(e,r)}toData(){const{send_enabled:t,receive_enabled:e}=this;return{send_enabled:t,receive_enabled:e}}static fromProto(t){return new ds(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return Pu.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class zs 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 zs(e,ds.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 zs(t.signer,ds.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Ni.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.transfer.v1.MsgUpdateParams",value:Ni.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return zs.fromProto(Ni.MsgUpdateParams.decode(t.value))}}class Vs 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 Vs(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 Vs(e,r)}toData(){const{path:t,base_denom:e}=this;return{path:t,base_denom:e}}static fromProto(t){return new Vs(t.path,t.baseDenom)}toProto(){const{path:t,base_denom:e}=this;return Pu.DenomTrace.fromPartial({path:t,baseDenom:e})}}class wa 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 wa(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 wa(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 wa(t.denom,t.amount,t.sender,t.receiver,t.memo)}toProto(){const{denom:t,amount:e,sender:r,receiver:o,memo:n}=this;return rd.FungibleTokenPacketData.fromPartial({denom:t,amount:e,sender:r,receiver:o,memo:n})}}class ve extends u{constructor(t,e){super(),this.authorization=t,this.expiration=e}static fromAmino(t){const{authorization:e,expiration:r}=t;return new ve(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 ve(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 ve(exports.Authorization.fromProto(t.authorization),t.expiration)}toProto(){const{authorization:t,expiration:e}=this;return Ra.Grant.fromPartial({authorization:t.packAny(),expiration:e})}}exports.Authorization=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/SendAuthorization":return Ke.fromAmino(o);case"cosmos-sdk/GenericAuthorization":return Ge.fromAmino(o);case"mstake/StakeAuthorization":return me.fromAmino(o);case"move/ExecuteAuthorization":return je.fromAmino(o);case"move/PublishAuthorization":return We.fromAmino(o);case"wasm/StoreCodeAuthorization":return Je.fromAmino(o);case"wasm/ContractExecutionAuthorization":return rr.fromAmino(o);case"wasm/ContractMigrationAuthorization":return or.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.authz.v1beta1.GenericAuthorization":return Ge.fromData(o);case"/cosmos.bank.v1beta1.SendAuthorization":return Ke.fromData(o);case"/initia.mstaking.v1.StakeAuthorization":return me.fromData(o);case"/initia.move.v1.PublishAuthorization":return We.fromData(o);case"/initia.move.v1.ExecuteAuthorization":return je.fromData(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Je.fromData(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return rr.fromData(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return or.fromData(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return Hs.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.authz.v1beta1.GenericAuthorization":return Ge.unpackAny(o);case"/cosmos.bank.v1beta1.SendAuthorization":return Ke.unpackAny(o);case"/initia.mstaking.v1.StakeAuthorization":return me.unpackAny(o);case"/initia.move.v1.PublishAuthorization":return We.unpackAny(o);case"/initia.move.v1.ExecuteAuthorization":return je.unpackAny(o);case"/cosmwasm.wasm.v1.StoreCodeAuthorization":return Je.unpackAny(o);case"/cosmwasm.wasm.v1.ContractExecutionAuthorization":return rr.unpackAny(o);case"/cosmwasm.wasm.v1.ContractMigrationAuthorization":return or.unpackAny(o);case"/ibc.applications.transfer.v1.TransferAuthorization":return Hs.unpackAny(o)}throw new Error(`Authorization type ${n} not recognized`)}i.fromProto=r})(exports.Authorization||(exports.Authorization={}));class Pr 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 Pr(e,r,ve.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 Pr(e,r,ve.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 Pr(t.granter,t.grantee,ve.fromProto(t.grant))}toProto(){const{grant:t,granter:e,grantee:r}=this;return Nn.MsgGrant.fromPartial({grant:t.toProto(),grantee:r,granter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgGrant",value:Nn.MsgGrant.encode(this.toProto()).finish()})}static unpackAny(t){return Pr.fromProto(Nn.MsgGrant.decode(t.value))}}class br 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 br(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 br(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 br(t.granter,t.grantee,t.msgTypeUrl)}toProto(){const{granter:t,grantee:e,msg_type_url:r}=this;return Nn.MsgRevoke.fromPartial({grantee:e,granter:t,msgTypeUrl:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",value:Nn.MsgRevoke.encode(this.toProto()).finish()})}static unpackAny(t){return br.fromProto(Nn.MsgRevoke.decode(t.value))}}class Dr extends u{constructor(t,e){super(),this.grantee=t,this.msgs=e}static fromAmino(t){const{value:{grantee:e,msgs:r}}=t;return new Dr(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 Dr(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 Dr(t.grantee,t.msgs.map(e=>exports.Msg.fromProto(e)))}toProto(){const{grantee:t,msgs:e}=this;return Nn.MsgExec.fromPartial({grantee:t,msgs:e.map(r=>r.packAny())})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:Nn.MsgExec.encode(this.toProto()).finish()})}static unpackAny(t){return Dr.fromProto(Nn.MsgExec.decode(t.value))}}class kr 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 kr(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 kr(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 kr(e.fromAddress,e.toAddress,l.fromProto(e.amount))}toProto(){const{from_address:e,to_address:r,amount:o}=this;return Zt.MsgSend.fromPartial({fromAddress:e,toAddress:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:Zt.MsgSend.encode(this.toProto()).finish()})}static unpackAny(e){return kr.fromProto(Zt.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 Zt.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:Zt.MsgMultiSend.encode(this.toProto()).finish()})}static unpackAny(t){return bt.fromProto(Zt.MsgMultiSend.decode(t.value))}}(i=>{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:a}=n;return new t(s,l.fromAmino(a))}toAmino(){const{address:n,coins:s}=this;return{address:n,coins:s.toAmino()}}static fromData(n){const{address:s,coins:a}=n;return new t(s,l.fromData(a))}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 na.Input.fromPartial({address:n,coins:s.toProto()})}}i.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:a}=n;return new e(s,l.fromAmino(a))}toAmino(){const{address:n,coins:s}=this;return{address:n,coins:s.toAmino()}}static fromData(n){const{address:s,coins:a}=n;return new e(s,l.fromData(a))}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 na.Output.fromPartial({address:n,coins:s.toProto()})}}i.Output=e})(bt||(bt={}));class we extends u{constructor(t,e){super(),this.denom=t,this.enabled=e}static fromAmino(t){const{denom:e,enabled:r}=t;return new we(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 we(e,r)}toData(){const{denom:t,enabled:e}=this;return{denom:t,enabled:e}}static fromProto(t){return new we(t.denom,t.enabled)}toProto(){const{denom:t,enabled:e}=this;return na.SendEnabled.fromPartial({denom:t,enabled:e})}}class $n 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 $n(e.map(we.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 $n(e.map(we.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 $n(t.sendEnabled.map(we.fromProto),t.defaultSendEnabled)}toProto(){const{send_enabled:t,default_send_enabled:e}=this;return na.Params.fromPartial({sendEnabled:t.map(r=>r.toProto()),defaultSendEnabled:e})}}class xr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new xr(e,$n.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 xr(e,$n.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 xr(t.authority,$n.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Zt.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",value:Zt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return xr.fromProto(Zt.MsgUpdateParams.decode(t.value))}}class Mr 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 Mr(e,r.map(we.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 Mr(e,r.map(we.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 Mr(t.authority,t.sendEnabled.map(we.fromProto),t.useDefaultFor)}toProto(){const{authority:t,send_enabled:e,use_default_for:r}=this;return Zt.MsgSetSendEnabled.fromPartial({authority:t,sendEnabled:e.map(o=>o.toProto()),useDefaultFor:r})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",value:Zt.MsgSetSendEnabled.encode(this.toProto()).finish()})}static unpackAny(t){return Mr.fromProto(Zt.MsgSetSendEnabled.decode(t.value))}}class ls 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 ls(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 ls(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 ls(t.denom,t.exponent,t.aliases)}toProto(){const{denom:t,exponent:e,aliases:r}=this;return na.DenomUnit.fromPartial({denom:t,exponent:e,aliases:r})}}class Ae extends u{constructor(t,e,r,o,n,s,a,c){super(),this.description=t,this.denom_units=e,this.base=r,this.display=o,this.name=n,this.symbol=s,this.uri=a,this.uri_hash=c}static fromAmino(t){const{description:e,denom_units:r,base:o,display:n,name:s,symbol:a,uri:c,uri_hash:d}=t;return new Ae(e,r.map(ls.fromAmino),o,n,s,a,c,d)}toAmino(){const{description:t,denom_units:e,base:r,display:o,name:n,symbol:s,uri:a,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toAmino()),base:r,display:o,name:n,symbol:s,uri:a,uri_hash:c}}static fromData(t){const{description:e,denom_units:r,base:o,display:n,name:s,symbol:a,uri:c,uri_hash:d}=t;return new Ae(e,r.map(ls.fromData),o,n,s,a,c,d)}toData(){const{description:t,denom_units:e,base:r,display:o,name:n,symbol:s,uri:a,uri_hash:c}=this;return{description:t,denom_units:e.map(d=>d.toData()),base:r,display:o,name:n,symbol:s,uri:a,uri_hash:c}}static fromProto(t){return new Ae(t.description,t.denomUnits.map(ls.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:a,uri_hash:c}=this;return na.Metadata.fromPartial({description:t,denomUnits:e.map(d=>d.toProto()),base:r,display:o,name:n,symbol:s,uri:a,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,Ae.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,Ae.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,Ae.fromProto(t.metadata))}toProto(){const{authority:t,metadata:e}=this;return gc.MsgSetDenomMetadata.fromPartial({authority:t,metadata:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.bank.v1.MsgSetDenomMetadata",value:gc.MsgSetDenomMetadata.encode(this.toProto()).finish()})}static unpackAny(t){return Ir.fromProto(gc.MsgSetDenomMetadata.decode(t.value))}}class Ks 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 Ks(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 Ks(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 yc.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:yc.MsgPayForBlobs.encode(this.toProto()).finish()})}static unpackAny(t){return Ks.fromProto(yc.MsgPayForBlobs.decode(t.value))}}class sa 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 sa(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 sa(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 xc.Blob.fromPartial({namespaceId:Buffer.from(t,"base64"),data:Buffer.from(e,"base64"),shareVersion:r,namespaceVersion:o})}}class Ln{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 Ln(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 Ln(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 Ln(t.extraBitsStored,Buffer.from(t.elems))}toProto(){return Mc.CompactBitArray.fromPartial({elems:this.elems,extraBitsStored:this.extra_bits_stored})}}class Pe 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 Pe(parseInt(r),l.fromAmino(o),"","")}toAmino(){return{gas:F(this.gas_limit).toFixed(),amount:this.amount.toAmino()}}static fromData(e){return new Pe(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 Pe(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()}}}(i=>{i.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 a of r.signatures){const[c,d]=a.toModeInfoAndSignature();o.push(c),n.push(d)}const s=Mc.MultiSignature.encode(Mc.MultiSignature.fromPartial({signatures:n})).finish();return[new X(new X.Multi(r.bitarray,o)),s]}throw new Error("invalid signature descriptor")}}i.Descriptor=t,(e=>{class r{constructor(s,a){this.mode=s,this.signature=a}static fromData(s){return new r(Ot.signModeFromJSON(s.mode),s.signature)}toData(){const{mode:s,signature:a}=this;return{mode:Ot.signModeToJSON(s),signature:a}}}e.Single=r;class o{constructor(s,a){this.bitarray=s,this.signatures=a}static fromData(s){return new o(Ln.fromData(s.bitarray),s.signatures.map(a=>e.fromData(a)))}toData(){return{bitarray:this.bitarray.toData(),signatures:this.signatures.map(s=>s.toData())}}}e.Multi=o})(t=i.Descriptor||(i.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 Hn(t.value.msg.map(r=>exports.Msg.fromAmino(r)),t.value.memo,parseInt(t.value.timeout_height)),new be([],Pe.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(Hn.fromData(t.body),be.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(Hn.fromProto(t.body),be.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(Ln.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 Hn{constructor(t,e,r){this.messages=t,this.memo=e,this.timeout_height=r}static fromData(t){return new Hn(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 Hn(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 be{constructor(t,e){this.signer_infos=t,this.fee=e}static fromData(t){return new be(t.signer_infos.map(e=>jt.fromData(e)),Pe.fromData(t.fee))}toData(){return{fee:this.fee.toData(),signer_infos:this.signer_infos.map(t=>t.toData())}}static fromProto(t){return new be(t.signerInfos.map(e=>jt.fromProto(e)),Pe.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()})}}(i=>{i.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})}}i.Single=t;class e{constructor(o,n){this.bitarray=o,this.modeInfos=n}static fromData(o){return new e(Ln.fromData(o.bitarray),o.mode_infos.map(n=>i.fromData(n)))}toData(){return{bitarray:this.bitarray.toData(),mode_infos:this.modeInfos.map(o=>o.toData())}}static fromProto(o){return new e(Ln.fromProto(o.bitarray),o.modeInfos.map(n=>i.fromProto(n)))}toProto(){return Mt.ModeInfo_Multi.fromPartial({bitarray:this.bitarray.toProto(),modeInfos:this.modeInfos.map(o=>o.toProto())})}}i.Multi=e})(X||(X={}));class Wa 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 Wa(Dt.fromData(e),r.map(sa.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 Wa(Dt.fromBuffer(Buffer.from(t.tx)),t.blobs.map(sa.fromProto),t.typeId)}toProto(){const{tx:t,blobs:e,type_id:r}=this;return xc.BlobTx.fromPartial({tx:t.toBytes(),blobs:e.map(o=>o.toProto()),typeId:r})}toBytes(){return xc.BlobTx.encode(this.toProto()).finish()}}class ps 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 ps(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 ps(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 ps(Number(t.maxBytes),Number(t.maxGas))}toProto(){const{max_bytes:t,max_gas:e}=this;return Ya.BlockParams.fromPartial({maxBytes:BigInt(t),maxGas:BigInt(e)})}}class hs 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 hs(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 hs(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 hs(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 Ya.EvidenceParams.fromPartial({maxAgeNumBlocks:BigInt(t),maxAgeDuration:e.toProto(),maxBytes:BigInt(r)})}}class fs extends u{constructor(t){super(),this.pub_key_types=t}static fromAmino(t){return new fs(t.pub_key_types)}toAmino(){return{pub_key_types:this.pub_key_types}}static fromData(t){return new fs(t.pub_key_types)}toData(){return{pub_key_types:this.pub_key_types}}static fromProto(t){return new fs(t.pubKeyTypes)}toProto(){return Ya.ValidatorParams.fromPartial({pubKeyTypes:this.pub_key_types})}}class gs extends u{constructor(t){super(),this.vote_extensions_enable_height=t}static fromAmino(t){return new gs(parseInt(t.vote_extensions_enable_height))}toAmino(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromData(t){return new gs(parseInt(t.vote_extensions_enable_height))}toData(){return{vote_extensions_enable_height:this.vote_extensions_enable_height.toFixed()}}static fromProto(t){return new gs(Number(t.voteExtensionsEnableHeight))}toProto(){return Ya.ABCIParams.fromPartial({voteExtensionsEnableHeight:BigInt(this.vote_extensions_enable_height)})}}class Sr 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 Sr(e,r?ps.fromAmino(r):void 0,o?hs.fromAmino(o):void 0,n?fs.fromAmino(n):void 0,s?gs.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 Sr(e,r?ps.fromData(r):void 0,o?hs.fromData(o):void 0,n?fs.fromData(n):void 0,s?gs.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 Sr(t.authority,ps.fromProto(t.block),hs.fromProto(t.evidence),fs.fromProto(t.validator),gs.fromProto(t.abci))}toProto(){const{authority:t,block:e,evidence:r,validator:o,abci:n}=this;return _c.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:_c.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Sr.fromProto(_c.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:ga.MsgVerifyInvariant.encode(this.toProto()).finish()})}static unpackAny(t){return Ur.fromProto(ga.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,I.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,I.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,I.fromProto(t.constantFee))}toProto(){const{authority:t,constant_fee:e}=this;return ga.MsgUpdateParams.fromPartial({authority:t,constantFee:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.crisis.v1beta1.MsgUpdateParams",value:ga.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Cr.fromProto(ga.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 St.MsgSetWithdrawAddress.fromPartial({delegatorAddress:t,withdrawAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",value:St.MsgSetWithdrawAddress.encode(this.toProto()).finish()})}static unpackAny(t){return Er.fromProto(St.MsgSetWithdrawAddress.decode(t.value))}}class Br 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 Br(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 Br(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 Br(t.delegatorAddress,t.validatorAddress)}toProto(){const{delegator_address:t,validator_address:e}=this;return St.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t,validatorAddress:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:St.MsgWithdrawDelegatorReward.encode(this.toProto()).finish()})}static unpackAny(t){return Br.fromProto(St.MsgWithdrawDelegatorReward.decode(t.value))}}class Or extends u{constructor(t){super(),this.validator_address=t}static fromAmino(t){const{value:{validator_address:e}}=t;return new Or(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 Or(e)}toData(){const{validator_address:t}=this;return{"@type":"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",validator_address:t}}static fromProto(t){return new Or(t.validatorAddress)}toProto(){const{validator_address:t}=this;return St.MsgWithdrawValidatorCommission.fromPartial({validatorAddress:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",value:St.MsgWithdrawValidatorCommission.encode(this.toProto()).finish()})}static unpackAny(t){return Or.fromProto(St.MsgWithdrawValidatorCommission.decode(t.value))}}class Nr 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 Nr(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 Nr(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 Nr(e.depositor,l.fromProto(e.amount))}toProto(){const{depositor:e,amount:r}=this;return St.MsgFundCommunityPool.fromPartial({amount:r.toProto(),depositor:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",value:St.MsgFundCommunityPool.encode(this.toProto()).finish()})}static unpackAny(e){return Nr.fromProto(St.MsgFundCommunityPool.decode(e.value))}}class ys extends u{constructor(t,e){super(),this.denom=t,this.weight=e}static fromAmino(t){const{denom:e,weight:r}=t;return new ys(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 ys(e,r)}toData(){const{denom:t,weight:e}=this;return{denom:t,weight:e}}static fromProto(t){return new ys(t.denom,t.weight)}toProto(){const{denom:t,weight:e}=this;return bu.RewardWeight.fromPartial({denom:t,weight:e})}}class zn 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 zn(e,r,o.map(ys.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 zn(e,r,o.map(ys.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 zn(t.communityTax,t.withdrawAddrEnabled,t.rewardWeights.map(ys.fromProto))}toProto(){const{community_tax:t,withdraw_addr_enabled:e,reward_weights:r}=this;return bu.Params.fromPartial({communityTax:t,withdrawAddrEnabled:e,rewardWeights:r.map(o=>o.toProto())})}}class Tr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Tr(e,zn.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 Tr(e,zn.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 Tr(t.authority,zn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ti.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgUpdateParams",value:Ti.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Tr.fromProto(Ti.MsgUpdateParams.decode(t.value))}}class Fr 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 Fr(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 Fr(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 Fr(e.authority,e.recipient,l.fromProto(e.amount))}toProto(){const{authority:e,recipient:r,amount:o}=this;return St.MsgCommunityPoolSpend.fromPartial({authority:e,recipient:r,amount:o.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",value:St.MsgCommunityPoolSpend.encode(this.toProto()).finish()})}static unpackAny(e){return Fr.fromProto(St.MsgCommunityPoolSpend.decode(e.value))}}class Rr 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 Rr(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 Rr(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 Rr(e.depositor,e.validatorAddress,e.denom,l.fromProto(e.amount))}toProto(){const{depositor:e,validator_address:r,denom:o,amount:n}=this;return Ti.MsgDepositValidatorRewardsPool.fromPartial({depositor:e,validatorAddress:r,denom:o,amount:n.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.distribution.v1.MsgDepositValidatorRewardsPool",value:Ti.MsgDepositValidatorRewardsPool.encode(this.toProto()).finish()})}static unpackAny(e){return Rr.fromProto(Ti.MsgDepositValidatorRewardsPool.decode(e.value))}}class qr 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 qr(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 qr(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 qr(Number(t.height),t.time,Number(t.power),t.consensusAddress)}toProto(){const{height:t,time:e,power:r,consensus_address:o}=this;return wc.Equivocation.fromPartial({height:BigInt(t),time:e,power:BigInt(r),consensusAddress:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.Equivocation",value:wc.Equivocation.encode(this.toProto()).finish()})}static unpackAny(t){return qr.fromProto(wc.Equivocation.decode(t.value))}}exports.Evidence=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/Equivocation":return qr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.evidence.v1beta1.Equivocation":return qr.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.evidence.v1beta1.Equivocation":return qr.unpackAny(o)}throw new Error(`Evidence type ${n} not recognized`)}i.fromProto=r})(exports.Evidence||(exports.Evidence={}));class $r extends u{constructor(t,e){super(),this.submitter=t,this.evidence=e}static fromAmino(t){const{value:{submitter:e,evidence:r}}=t;return new $r(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 $r(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 $r(t.submitter,exports.Evidence.fromProto(t.evidence))}toProto(){const{submitter:t,evidence:e}=this;return vc.MsgSubmitEvidence.fromPartial({submitter:t,evidence:e.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.evidence.v1beta1.MsgSubmitEvidence",value:vc.MsgSubmitEvidence.encode(this.toProto()).finish()})}static unpackAny(t){return $r.fromProto(vc.MsgSubmitEvidence.decode(t.value))}}class Lr extends u{constructor(t,e,r){super(),this.sender=t,this.code=e,this.value=r}static fromAmino(t){const{value:{sender:e,code:r,value:o}}=t;return new Lr(e,r,o)}toAmino(){const{sender:t,code:e,value:r}=this;return{type:"evm/MsgCreate",value:{sender:t,code:e,value:r}}}static fromData(t){const{sender:e,code:r,value:o}=t;return new Lr(e,r,o)}toData(){const{sender:t,code:e,value:r}=this;return{"@type":"/minievm.evm.v1.MsgCreate",sender:t,code:e,value:r}}static fromProto(t){return new Lr(t.sender,t.code,t.value)}toProto(){const{sender:t,code:e,value:r}=this;return Yt.MsgCreate.fromPartial({sender:t,code:e,value:r})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate",value:Yt.MsgCreate.encode(this.toProto()).finish()})}static unpackAny(t){return Lr.fromProto(Yt.MsgCreate.decode(t.value))}}class Hr extends u{constructor(t,e,r,o){super(),this.sender=t,this.code=e,this.salt=r,this.value=o}static fromAmino(t){const{value:{sender:e,code:r,salt:o,value:n}}=t;return new Hr(e,r,parseInt(o),n)}toAmino(){const{sender:t,code:e,salt:r,value:o}=this;return{type:"evm/MsgCreate2",value:{sender:t,code:e,salt:r.toFixed(),value:o}}}static fromData(t){const{sender:e,code:r,salt:o,value:n}=t;return new Hr(e,r,parseInt(o),n)}toData(){const{sender:t,code:e,salt:r,value:o}=this;return{"@type":"/minievm.evm.v1.MsgCreate2",sender:t,code:e,salt:r.toFixed(),value:o}}static fromProto(t){return new Hr(t.sender,t.code,Number(t.salt),t.value)}toProto(){const{sender:t,code:e,salt:r,value:o}=this;return Yt.MsgCreate2.fromPartial({sender:t,code:e,salt:BigInt(r),value:o})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCreate2",value:Yt.MsgCreate2.encode(this.toProto()).finish()})}static unpackAny(t){return Hr.fromProto(Yt.MsgCreate2.decode(t.value))}}class zr extends u{constructor(t,e,r,o){super(),this.sender=t,this.contract_addr=e,this.input=r,this.value=o}static fromAmino(t){const{value:{sender:e,contract_addr:r,input:o,value:n}}=t;return new zr(e,r,o,n)}toAmino(){const{sender:t,contract_addr:e,input:r,value:o}=this;return{type:"evm/MsgCall",value:{sender:t,contract_addr:e,input:r,value:o}}}static fromData(t){const{sender:e,contract_addr:r,input:o,value:n}=t;return new zr(e,r,o,n)}toData(){const{sender:t,contract_addr:e,input:r,value:o}=this;return{"@type":"/minievm.evm.v1.MsgCall",sender:t,contract_addr:e,input:r,value:o}}static fromProto(t){return new zr(t.sender,t.contractAddr,t.input,t.value)}toProto(){const{sender:t,contract_addr:e,input:r,value:o}=this;return Yt.MsgCall.fromPartial({sender:t,contractAddr:e,input:r,value:o})}packAny(){return f.Any.fromPartial({typeUrl:"/minievm.evm.v1.MsgCall",value:Yt.MsgCall.encode(this.toProto()).finish()})}static unpackAny(t){return zr.fromProto(Yt.MsgCall.decode(t.value))}}class Vn extends u{constructor(t,e,r,o,n){super(),this.extra_eips=t,this.allowed_publishers=e,this.allow_custom_erc20=r,this.allowed_custom_erc20s=o,this.fee_denom=n}static fromAmino(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:n,fee_denom:s}=t;return new Vn(e.map(parseInt),r,o,n,s)}toAmino(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}=this;return{extra_eips:t.map(s=>s.toFixed()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}}static fromData(t){const{extra_eips:e,allowed_publishers:r,allow_custom_erc20:o,allowed_custom_erc20s:n,fee_denom:s}=t;return new Vn(e.map(parseInt),r,o,n,s)}toData(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}=this;return{extra_eips:t.map(s=>s.toFixed()),allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}}static fromProto(t){return new Vn(t.extraEips.map(e=>Number(e)),t.allowedPublishers,t.allowCustomErc20,t.allowedCustomErc20s,t.feeDenom)}toProto(){const{extra_eips:t,allowed_publishers:e,allow_custom_erc20:r,allowed_custom_erc20s:o,fee_denom:n}=this;return od.Params.fromPartial({extraEips:t.map(s=>BigInt(s)),allowedPublishers:e,allowCustomErc20:r,allowedCustomErc20s:o,feeDenom:n})}}class Vr extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Vr(e,Vn.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 Vr(e,Vn.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 Vr(t.authority,Vn.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:"/minievm.evm.v1.MsgUpdateParams",value:Yt.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Vr.fromProto(Yt.MsgUpdateParams.decode(t.value))}}class It 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 It(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 It(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 It(l.fromProto(e.spendLimit),e.expiration)}toProto(){const{spend_limit:e,expiration:r}=this;return Tn.BasicAllowance.fromPartial({expiration:r,spendLimit:e==null?void 0:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",value:Tn.BasicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return It.fromProto(Tn.BasicAllowance.decode(e.value))}}class Jt 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:a}}=e;return new Jt(It.fromAmino(r),q.fromAmino(o),l.fromAmino(n),l.fromAmino(s),new Date(a))}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:a}=e;return new Jt(It.fromData(r),q.fromData(o),l.fromData(n),l.fromData(s),new Date(a))}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 Jt(It.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 Tn.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:Tn.PeriodicAllowance.encode(this.toProto()).finish()})}static unpackAny(e){return Jt.fromProto(Tn.PeriodicAllowance.decode(e.value))}}class Kr 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 Kr(e.type==="cosmos-sdk/BasicAllowance"?It.fromAmino(e):Jt.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 Kr(e["@type"]==="/cosmos.feegrant.v1beta1.BasicAllowance"?It.fromData(e):Jt.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 Kr((e==null?void 0:e.typeUrl)==="/cosmos.feegrant.v1beta1.BasicAllowance"?It.unpackAny(e):Jt.unpackAny(e),t.allowedMessages)}toProto(){const{allowance:t,allowed_messages:e}=this;return Tn.AllowedMsgAllowance.fromPartial({allowance:t.packAny(),allowedMessages:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",value:Tn.AllowedMsgAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Kr.fromProto(Tn.AllowedMsgAllowance.decode(t.value))}}exports.Allowance=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/BasicAllowance":return It.fromAmino(o);case"cosmos-sdk/PeriodicAllowance":return Jt.fromAmino(o);case"cosmos-sdk/AllowedMsgAllowance":return Kr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return Jt.fromData(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return It.fromData(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return Kr.fromData(o)}}i.fromData=e;function r(o){switch(o.typeUrl){case"/cosmos.feegrant.v1beta1.PeriodicAllowance":return Jt.unpackAny(o);case"/cosmos.feegrant.v1beta1.BasicAllowance":return It.unpackAny(o);case"/cosmos.feegrant.v1beta1.AllowedMsgAllowance":return Kr.unpackAny(o)}throw new Error(`not supported allowance ${o.typeUrl}`)}i.fromProto=r})(exports.Allowance||(exports.Allowance={}));class Gr 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 Gr(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 Gr(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 Gr(t.granter,t.grantee,exports.Allowance.fromProto(t.allowance))}toProto(){const{granter:t,grantee:e,allowance:r}=this;return Fi.MsgGrantAllowance.fromPartial({allowance:r.packAny(),grantee:e,granter:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",value:Fi.MsgGrantAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Gr.fromProto(Fi.MsgGrantAllowance.decode(t.value))}}class Wr extends u{constructor(t,e){super(),this.granter=t,this.grantee=e}static fromAmino(t){const{value:{granter:e,grantee:r}}=t;return new Wr(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 Wr(e,r)}toData(){const{granter:t,grantee:e}=this;return{"@type":"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",granter:t,grantee:e}}static fromProto(t){return new Wr(t.granter,t.grantee)}toProto(){const{granter:t,grantee:e}=this;return Fi.MsgRevokeAllowance.fromPartial({grantee:e,granter:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",value:Fi.MsgRevokeAllowance.encode(this.toProto()).finish()})}static unpackAny(t){return Wr.fromProto(Fi.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 Ri.MsgRegisterAccount.fromPartial({signer:t,recipient:e,channel:r})}packAny(){return f.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgRegisterAccount",value:Ri.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return jr.fromProto(Ri.MsgRegisterAccount.decode(t.value))}}class Jr extends u{constructor(t,e){super(),this.signer=t,this.address=e}static fromAmino(t){const{value:{signer:e,address:r}}=t;return new Jr(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 Jr(e,r)}toData(){const{signer:t,address:e}=this;return{"@type":"/noble.forwarding.v1.MsgClearAccount",signer:t,address:e}}static fromProto(t){return new Jr(t.signer,t.address)}toProto(){const{signer:t,address:e}=this;return Ri.MsgClearAccount.fromPartial({signer:t,address:e})}packAny(){return f.Any.fromPartial({typeUrl:"/noble.forwarding.v1.MsgClearAccount",value:Ri.MsgClearAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Jr.fromProto(Ri.MsgClearAccount.decode(t.value))}}class Zr 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 Zr(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 Zr(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 Zr(Number(t.proposalId),t.proposer)}toProto(){const{proposal_id:t,proposer:e}=this;return Ut.MsgCancelProposal.fromPartial({proposalId:BigInt(t),proposer:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgCancelProposal",value:Ut.MsgCancelProposal.encode(this.toProto()).finish()})}static unpackAny(t){return Zr.fromProto(Ut.MsgCancelProposal.decode(t.value))}}class Yr 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 Yr(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 Yr(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 Yr(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Xt.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",value:Xt.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Yr.fromProto(Xt.MsgDeposit.decode(e.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/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 Xr(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 Xr(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return Ut.MsgDeposit.fromPartial({amount:o.toProto(),depositor:r,proposalId:BigInt(e)})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgDeposit",value:Ut.MsgDeposit.encode(this.toProto()).finish()})}static unpackAny(e){return Xr.fromProto(Ut.MsgDeposit.decode(e.value))}}class Qr extends u{constructor(t){super(),this.paramChanges=t}static fromAmino(t){return new Qr((t??[]).map(_s.fromAmino))}toAmino(){return this.paramChanges.map(t=>t.toAmino())}static fromData(t){return new Qr((t??[]).map(_s.fromData))}toData(){return this.paramChanges.map(t=>t.toData())}static fromProto(t){return new Qr((t??[]).map(_s.fromProto))}toProto(){return this.paramChanges.map(t=>t.toProto())}}class _s 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 _s(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 _s(e,r,o)}toData(){const{subspace:t,key:e,value:r}=this;return{subspace:t,key:e,value:r}}static fromProto(t){return new _s(t.subspace,t.key,t.value)}toProto(){const{subspace:t,key:e,value:r}=this;return $a.ParamChange.fromPartial({key:e,subspace:t,value:r})}}class to extends u{constructor(e,r,o){super();_(this,"changes");this.title=e,this.description=r,Array.isArray(o)?this.changes=Qr.fromData(o):this.changes=o}static fromAmino(e){const{value:{title:r,description:o,changes:n}}=e;return new to(r,o,Qr.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 to(r,o,Qr.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 to(e.title,e.description,Qr.fromProto(e.changes))}toProto(){const{title:e,description:r,changes:o}=this;return $a.ParameterChangeProposal.fromPartial({changes:o.toProto(),description:r,title:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.params.v1beta1.ParameterChangeProposal",value:$a.ParameterChangeProposal.encode(this.toProto()).finish()})}static unpackAny(e){return to.fromProto($a.ParameterChangeProposal.decode(e.value))}}class eo extends u{constructor(t,e){super(),this.title=t,this.description=e}static fromAmino(t){const{value:{title:e,description:r}}=t;return new eo(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 eo(e,r)}toData(){const{title:t,description:e}=this;return{"@type":"/cosmos.gov.v1beta1.TextProposal",title:t,description:e}}static fromProto(t){return new eo(t.title,t.description)}toProto(){const{title:t,description:e}=this;return La.TextProposal.fromPartial({description:e,title:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:La.TextProposal.encode(this.toProto()).finish()})}static unpackAny(t){return eo.fromProto(La.TextProposal.decode(t.value))}}exports.Content=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/TextProposal":return eo.fromAmino(o);case"cosmos-sdk/ParameterChangeProposal":return to.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.gov.v1beta1.TextProposal":return eo.fromData(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return to.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.gov.v1beta1.TextProposal":return eo.unpackAny(o);case"/cosmos.params.v1beta1.ParameterChangeProposal":return to.unpackAny(o)}throw new Error(`Proposal content ${n} not recognized`)}i.fromProto=r})(exports.Content||(exports.Content={}));class Kn 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 Kn(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 Kn(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 Kn(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 Xa.TallyResult.fromPartial({tallyHeight:BigInt(t),totalStakingPower:e,totalVestingPower:r,v1TallyResult:ue.TallyResult.fromPartial({yesCount:o.yes_count,abstainCount:o.abstain_count,noCount:o.no_count,noWithVetoCount:o.no_with_veto_count})})}}class Ne extends u{constructor(e,r,o,n,s,a,c,d,g,v,b,k,E,N,K,Y,tt,S){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=a,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=E,this.summary=N,this.proposer=K,this.expedited=Y,this.emergency=tt,this.failed_reason=S,this.total_deposit=new l(c)}static fromAmino(e){const{id:r,messages:o,status:n,final_tally_result:s,submit_time:a,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:E,title:N,summary:K,proposer:Y,expedited:tt,emergency:S,failed_reason:ot}=e;return new Ne(parseInt(r),o.map(exports.Msg.fromAmino),ue.proposalStatusFromJSON(n),Kn.fromAmino(s),new Date(a),new Date(c),l.fromAmino(d),new Date(g),new Date(v),new Date(b),new Date(k),E,N,K,Y,tt,S,ot)}toAmino(){const{id:e,messages:r,status:o,final_tally_result:n,submit_time:s,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}=this;return{id:e.toFixed(),messages:r.map(ot=>ot.toAmino()),status:ue.proposalStatusToJSON(o),final_tally_result:n.toAmino(),submit_time:s.toISOString(),deposit_end_time:a.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:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}}static fromData(e){const{id:r,messages:o,status:n,final_tally_result:s,submit_time:a,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:E,title:N,summary:K,proposer:Y,expedited:tt,emergency:S,failed_reason:ot}=e;return new Ne(parseInt(r),o.map(exports.Msg.fromData),ue.proposalStatusFromJSON(n),Kn.fromData(s),new Date(a),new Date(c),l.fromData(d),new Date(g),new Date(v),new Date(b),new Date(k),E,N,K,Y,tt,S,ot)}toData(){const{id:e,messages:r,status:o,final_tally_result:n,submit_time:s,deposit_end_time:a,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}=this;return{id:e.toFixed(),messages:r.map(ot=>ot.toData()),status:ue.proposalStatusToJSON(o),final_tally_result:n.toData(),submit_time:s.toISOString(),deposit_end_time:a.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:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}}static fromProto(e){return new Ne(Number(e.id),e.messages.map(exports.Msg.fromProto),e.status,Kn.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:a,total_deposit:c,voting_start_time:d,voting_end_time:g,emergency_start_time:v,emergency_next_tally_time:b,metadata:k,title:E,summary:N,proposer:K,expedited:Y,emergency:tt,failed_reason:S}=this;return Xa.Proposal.fromPartial({id:BigInt(e),messages:r.map(ot=>ot.packAny()),status:o,finalTallyResult:n.toProto(),submitTime:s,depositEndTime:a,totalDeposit:c.toProto(),votingStartTime:d,votingEndTime:g,emergencyStartTime:v,emergencyNextTallyTime:b,metadata:k,title:E,summary:N,proposer:K,expedited:Y,emergency:tt,failedReason:S})}}(i=>{i.Status=ue.ProposalStatus})(Ne||(Ne={}));class ro 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 ro(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 ro(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 ro(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 Xt.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:Xt.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return ro.fromProto(Xt.MsgSubmitProposal.decode(e.value))}}class oo extends u{constructor(e,r,o,n,s,a,c){super();_(this,"initial_deposit");this.messages=e,this.proposer=o,this.metadata=n,this.title=s,this.summary=a,this.expedited=c,this.initial_deposit=new l(r)}static fromAmino(e){const{value:{messages:r,initial_deposit:o,proposer:n,metadata:s,title:a,summary:c,expedited:d}}=e;return new oo(r.map(exports.Msg.fromAmino),l.fromAmino(o),n,s??"",a,c,d)}toAmino(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:a,expedited:c}=this;return{type:"cosmos-sdk/v1/MsgSubmitProposal",value:{messages:e.map(d=>d.toAmino()),initial_deposit:r.toAmino(),proposer:o,metadata:n&&n!==""?n:void 0,title:s,summary:a,expedited:c}}}static fromData(e){const{messages:r,initial_deposit:o,proposer:n,metadata:s,title:a,summary:c,expedited:d}=e;return new oo(r.map(exports.Msg.fromData),l.fromData(o),n,s,a,c,d)}toData(){const{messages:e,initial_deposit:r,proposer:o,metadata:n,title:s,summary:a,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:a,expedited:c}}static fromProto(e){return new oo(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:a,expedited:c}=this;return Ut.MsgSubmitProposal.fromPartial({messages:e.map(d=>d.packAny()),initialDeposit:r.toProto(),proposer:o,metadata:n,title:s,summary:a,expedited:c})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",value:Ut.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(e){return oo.fromProto(Ut.MsgSubmitProposal.decode(e.value))}}class de 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 de(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 de(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 de(Number(t.proposalId),t.voter,t.option)}toProto(){const{proposal_id:t,voter:e,option:r}=this;return Xt.MsgVote.fromPartial({option:r,proposalId:BigInt(t),voter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVote",value:Xt.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return de.fromProto(Xt.MsgVote.decode(t.value))}}(i=>{i.Option=La.VoteOption})(de||(de={}));class le 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 le(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 le(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 le(Number(t.proposalId),t.voter,t.option,t.metadata)}toProto(){const{proposal_id:t,voter:e,option:r,metadata:o}=this;return Ut.MsgVote.fromPartial({proposalId:BigInt(t),voter:e,option:r,metadata:o})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1.MsgVote",value:Ut.MsgVote.encode(this.toProto()).finish()})}static unpackAny(t){return le.fromProto(Ut.MsgVote.decode(t.value))}}(i=>{i.Option=ue.VoteOption})(le||(le={}));class vs 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 vs(parseInt(e),r,o.map(s=>Tt.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 vs(parseInt(e),r,o.map(s=>Tt.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 vs(Number(t.proposalId),t.voter,t.options.map(e=>Tt.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return ue.Vote.fromPartial({options:r.map(n=>n.toProto()),proposalId:BigInt(t),voter:e,metadata:o})}}(i=>{i.Option=ue.VoteOption})(vs||(vs={}));class Tt extends u{constructor(t,e){super(),this.option=t,this.weight=e}static fromAmino(t){const{option:e,weight:r}=t;return new Tt(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 Tt(e,parseFloat(r))}toData(){const{option:t,weight:e}=this;return{option:t,weight:e.toString()}}static fromProto(t){return new Tt(t.option,parseFloat(t.weight))}toProto(){const{option:t,weight:e}=this;return ue.WeightedVoteOption.fromPartial({option:t,weight:e.toString()})}}class no 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 no(parseInt(e),r,o.map(n=>Tt.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 no(parseInt(e),r,o.map(n=>Tt.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 no(Number(t.proposalId),t.voter,t.options.map(e=>Tt.fromProto(e)))}toProto(){const{proposal_id:t,voter:e,options:r}=this;return Xt.MsgVoteWeighted.fromPartial({options:r.map(o=>o.toProto()),proposalId:BigInt(t),voter:e})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",value:Xt.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return no.fromProto(Xt.MsgVoteWeighted.decode(t.value))}}class so 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 so(parseInt(e),r,o.map(s=>Tt.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 so(parseInt(e),r,o.map(s=>Tt.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 so(Number(t.proposalId),t.voter,t.options.map(e=>Tt.fromProto(e)),t.metadata)}toProto(){const{proposal_id:t,voter:e,options:r,metadata:o}=this;return Ut.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:Ut.MsgVoteWeighted.encode(this.toProto()).finish()})}static unpackAny(t){return so.fromProto(Ut.MsgVoteWeighted.decode(t.value))}}class Gs 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 Gs(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 Gs(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 Gs(t.moduleAddr,t.moduleName,t.creatorAddr)}toProto(){const{module_addr:t,module_name:e,creator_addr:r}=this;return Xa.Vesting.fromPartial({moduleAddr:t,moduleName:e,creatorAddr:r})}}class Gn extends u{constructor(e,r,o,n,s,a,c,d,g,v,b,k,E,N,K,Y,tt,S,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=a,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=E,this.burn_proposal_deposit_prevote=N,this.burn_vote_veto=K,this.min_deposit_ratio=Y,this.emergency_tally_interval=S,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:a,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:E,burn_vote_quorum:N,burn_proposal_deposit_prevote:K,burn_vote_veto:Y,min_deposit_ratio:tt,emergency_min_deposit:S,emergency_tally_interval:ot,low_threshold_functions:ut,vesting:L}=e;return new Gn(l.fromAmino(r),q.fromAmino(o),q.fromAmino(n),s,a,c,d,g,v,q.fromAmino(b),k,l.fromAmino(E),N,K,Y,tt,l.fromAmino(S),q.fromAmino(ot),ut,L?Gs.fromAmino(L):void 0)}toAmino(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:S,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:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt.toAmino(),emergency_tally_interval:S.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:a,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:E,burn_vote_quorum:N,burn_proposal_deposit_prevote:K,burn_vote_veto:Y,min_deposit_ratio:tt,emergency_min_deposit:S,emergency_tally_interval:ot,low_threshold_functions:ut,vesting:L}=e;return new Gn(l.fromData(r),q.fromData(o),q.fromData(n),s,a,c,d,g,v,q.fromData(b),k,l.fromData(E),N,K,Y,tt,l.fromData(S),q.fromData(ot),ut,L?Gs.fromData(L):void 0)}toData(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:S,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:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt.toData(),emergency_tally_interval:S.toData(),low_threshold_functions:ot,vesting:ut==null?void 0:ut.toData()}}static fromProto(e){return new Gn(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?Gs.fromProto(e.vesting):void 0)}toProto(){const{min_deposit:e,max_deposit_period:r,voting_period:o,quorum:n,threshold:s,veto_threshold:a,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:E,burn_proposal_deposit_prevote:N,burn_vote_veto:K,min_deposit_ratio:Y,emergency_min_deposit:tt,emergency_tally_interval:S,low_threshold_functions:ot,vesting:ut}=this;return Xa.Params.fromPartial({minDeposit:e.toProto(),maxDepositPeriod:r.toProto(),votingPeriod:o.toProto(),quorum:n,threshold:s,vetoThreshold:a,minInitialDepositRatio:c,proposalCancelRatio:d,proposalCancelDest:g,expeditedVotingPeriod:v.toProto(),expeditedThreshold:b,expeditedMinDeposit:k.toProto(),burnVoteQuorum:E,burnProposalDepositPrevote:N,burnVoteVeto:K,minDepositRatio:Y,emergencyMinDeposit:tt.toProto(),emergencyTallyInterval:S.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,Gn.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,Gn.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,Gn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ac.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.gov.v1.MsgUpdateParams",value:Ac.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return io.fromProto(Ac.MsgUpdateParams.decode(t.value))}}class Gi 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 Gi(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 Gi(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 Gi(Number(e.proposalId),e.depositor,l.fromProto(e.amount))}toProto(){const{proposal_id:e,depositor:r,amount:o}=this;return ue.Deposit.fromPartial({proposalId:BigInt(e),depositor:r,amount:o.toProto()})}}class Wi 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 Wi(parseInt(e),ws.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 Wi(parseInt(e),ws.fromData(r))}toData(){const{group_id:t,member:e}=this;return{group_id:t.toFixed(),member:e.toData()}}static fromProto(t){return new Wi(Number(t.groupId),ws.fromProto(t.member))}toProto(){const{group_id:t,member:e}=this;return V.GroupMember.fromPartial({groupId:BigInt(t),member:e.toProto()})}}class ws 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 ws(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 ws(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 ws(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 Ft 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 Ft(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 Ft(e,r,o)}toData(){const{address:t,weight:e,metadata:r}=this;return{address:t,weight:e,metadata:r}}static fromProto(t){return new Ft(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 ao 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 ao(e,r.map(Ft.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 ao(e,r.map(Ft.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 ao(t.admin,t.members.map(Ft.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 ao.fromProto(R.MsgCreateGroup.decode(t.value))}}class De 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 De(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 De(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 De(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 co extends u{constructor(t,e){super(),this.threshold=t,this.windows=e}static fromAmino(t){const{value:{threshold:e,windows:r}}=t;return new co(e,De.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 co(e,De.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 co(t.threshold,De.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 co.fromProto(V.ThresholdDecisionPolicy.decode(t.value))}}class uo extends u{constructor(t,e){super(),this.percentage=t,this.windows=e}static fromAmino(t){const{value:{percentage:e,windows:r}}=t;return new uo(e,De.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 uo(e,De.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 uo(t.percentage,De.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 uo.fromProto(V.PercentageDecisionPolicy.decode(t.value))}}exports.DecisionPolicy=void 0;(i=>{function t(o){switch(o.type){case"cosmos-sdk/ThresholdDecisionPolicy":return co.fromAmino(o);case"cosmos-sdk/PercentageDecisionPolicy":return uo.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/cosmos.group.v1.ThresholdDecisionPolicy":return co.fromData(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return uo.fromData(o)}}i.fromData=e;function r(o){const n=o.typeUrl;switch(n){case"/cosmos.group.v1.ThresholdDecisionPolicy":return co.unpackAny(o);case"/cosmos.group.v1.PercentageDecisionPolicy":return uo.unpackAny(o)}throw new Error(`DecisionPolicy type ${n} not recognized`)}i.fromProto=r})(exports.DecisionPolicy||(exports.DecisionPolicy={}));class mo 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 mo(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 mo(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 mo(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 mo.fromProto(R.MsgCreateGroupPolicy.decode(t.value))}}class lo 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:a}}=t;return new lo(e,r.map(Ft.fromAmino),o,n,s,exports.DecisionPolicy.fromAmino(a))}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(a=>a.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:a}=t;return new lo(e,r.map(Ft.fromData),o,n,s,exports.DecisionPolicy.fromData(a))}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(a=>a.toData()),group_metadata:r,group_policy_metadata:o,group_policy_as_admin:n,decision_policy:s.toData()}}static fromProto(t){return new lo(t.admin,t.members.map(Ft.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(a=>a.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 lo.fromProto(R.MsgCreateGroupWithPolicy.decode(t.value))}}class po 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 po(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 po(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 po(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 po.fromProto(R.MsgExec.decode(t.value))}}class pe 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 pe(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 pe(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 pe(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 pe.fromProto(R.MsgVote.decode(t.value))}}(i=>{i.Option=V.VoteOption,i.Exec=R.Exec})(pe||(pe={}));class ho 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 ho(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 ho(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 ho(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 ho.fromProto(R.MsgLeaveGroup.decode(t.value))}}class he extends u{constructor(t,e,r,o,n,s,a){super(),this.group_policy_address=t,this.proposers=e,this.metadata=r,this.messages=o,this.exec=n,this.title=s,this.summary=a}static fromAmino(t){const{value:{group_policy_address:e,proposers:r,metadata:o,messages:n,exec:s,title:a,summary:c}}=t;return new he(e,r,o,n.map(exports.Msg.fromAmino),R.execFromJSON(s),a,c)}toAmino(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:n,title:s,summary:a}=this;return{type:"cosmos-sdk/group/MsgSubmitProposal",value:{group_policy_address:t,proposers:e,metadata:r,messages:o.map(c=>c.toAmino()),exec:R.execToJSON(n),title:s,summary:a}}}static fromData(t){const{group_policy_address:e,proposers:r,metadata:o,messages:n,exec:s,title:a,summary:c}=t;return new he(e,r,o,n.map(exports.Msg.fromData),R.execFromJSON(s),a,c)}toData(){const{group_policy_address:t,proposers:e,metadata:r,messages:o,exec:n,title:s,summary:a}=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:a}}static fromProto(t){return new he(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:a}=this;return R.MsgSubmitProposal.fromPartial({groupPolicyAddress:t,proposers:e,metadata:r,messages:o.map(c=>c.packAny()),exec:n,title:s,summary:a})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.group.v1.MsgSubmitProposal",value:R.MsgSubmitProposal.encode(this.toProto()).finish()})}static unpackAny(t){return he.fromProto(R.MsgSubmitProposal.decode(t.value))}}(i=>{i.Exec=R.Exec})(he||(he={}));class fo 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 fo(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 fo(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 fo(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 fo.fromProto(R.MsgUpdateGroupAdmin.decode(t.value))}}class go 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 go(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 go(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 go(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 go.fromProto(R.MsgUpdateGroupPolicyDecisionPolicy.decode(t.value))}}class yo 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 yo(e,parseInt(r),o.map(Ft.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 yo(e,parseInt(r),o.map(Ft.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 yo(t.admin,Number(t.groupId),t.memberUpdates.map(Ft.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 yo.fromProto(R.MsgUpdateGroupMembers.decode(t.value))}}class _o 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 _o(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 _o(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 _o(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 _o.fromProto(R.MsgUpdateGroupMetadata.decode(t.value))}}class vo 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 vo(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 vo(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 vo(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 vo.fromProto(R.MsgUpdateGroupPolicyAdmin.decode(t.value))}}class wo 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 wo(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 wo(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 wo(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 wo.fromProto(R.MsgUpdateGroupPolicyMetadata.decode(t.value))}}class Ao 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:a}=t;return new Ao(parseInt(e),r,o,parseInt(n),s,new Date(a))}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:a}=t;return new Ao(parseInt(e),r,o,parseInt(n),s,new Date(a))}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 Ao(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 As extends u{constructor(t,e,r,o,n,s,a){super(),this.address=t,this.group_id=e,this.admin=r,this.metadata=o,this.version=n,this.decision_policy=s,this.created_at=a}static fromAmino(t){const{address:e,group_id:r,admin:o,metadata:n,version:s,decision_policy:a,created_at:c}=t;return new As(e,parseInt(r),o,n,parseInt(s),exports.DecisionPolicy.fromAmino(a),new Date(c))}toAmino(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:a}=this;return{address:t,group_id:e.toFixed(),admin:r,metadata:o,version:n.toFixed(),decision_policy:s.toAmino(),created_at:a.toISOString()}}static fromData(t){const{address:e,group_id:r,admin:o,metadata:n,version:s,decision_policy:a,created_at:c}=t;return new As(e,parseInt(r),o,n,parseInt(s),exports.DecisionPolicy.fromData(a),new Date(c))}toData(){const{address:t,group_id:e,admin:r,metadata:o,version:n,decision_policy:s,created_at:a}=this;return{address:t,group_id:e.toFixed(),admin:r,metadata:o,version:n.toFixed(),decision_policy:s.toData(),created_at:a.toISOString()}}static fromProto(t){return new As(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:a}=this;return V.GroupPolicyInfo.fromPartial({address:t,groupId:BigInt(e),admin:r,metadata:o,version:BigInt(n),decisionPolicy:s.packAny(),createdAt:a})}}class Wn extends u{constructor(t,e,r,o,n,s,a,c,d,g,v,b,k,E){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=a,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=E}static fromAmino(t){const{id:e,group_policy_address:r,metadata:o,proposers:n,submit_time:s,group_version:a,group_policy_version:c,status:d,final_tally_result:g,voting_period_end:v,executor_result:b,messages:k,title:E,summary:N}=t;return new Wn(parseInt(e),r,o,n,new Date(s),parseInt(a),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),E,N)}toAmino(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:E}=this;return{id:t.toFixed(),group_policy_address:e,metadata:r,proposers:o,submit_time:n.toISOString(),group_version:s.toFixed(),group_policy_version:a.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:E}}static fromData(t){const{id:e,group_policy_address:r,metadata:o,proposers:n,submit_time:s,group_version:a,group_policy_version:c,status:d,final_tally_result:g,voting_period_end:v,executor_result:b,messages:k,title:E,summary:N}=t;return new Wn(parseInt(e),r,o,n,new Date(s),parseInt(a),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),E,N)}toData(){const{id:t,group_policy_address:e,metadata:r,proposers:o,submit_time:n,group_version:s,group_policy_version:a,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:E}=this;return{id:t.toFixed(),group_policy_address:e,metadata:r,proposers:o,submit_time:n.toISOString(),group_version:s.toFixed(),group_policy_version:a.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:E}}static fromProto(t){var e,r,o,n;return new Wn(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:a,status:c,final_tally_result:d,voting_period_end:g,executor_result:v,messages:b,title:k,summary:E}=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(a),status:c,finalTallyResult:N,votingPeriodEnd:g,executorResult:v,messages:b.map(K=>K.packAny()),title:k,summary:E})}}(i=>{i.Status=V.ProposalStatus,i.ExecutorResult=V.ProposalExecutorResult})(Wn||(Wn={}));class Te 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 Te(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 Te(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 Te(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})}}(i=>{i.Option=V.VoteOption})(Te||(Te={}));class Fe 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 Fe(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 Fe(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 Fe(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 Du.Fee.fromPartial({recvFee:e.toProto(),ackFee:r.toProto(),timeoutFee:o.toProto()})}}class Ws 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 Ws(e?Fe.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 Ws(t.fee?Fe.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 Qt.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:Qt.MsgPayPacketFee.encode(this.toProto()).finish()})}static unpackAny(t){return Ws.fromProto(Qt.MsgPayPacketFee.decode(t.value))}}class Re 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 Re(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 Re(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 Re(t.portId,t.channelId,Number(t.sequence))}toProto(){const{port_id:t,channel_id:e,sequence:r}=this;return ca.PacketId.fromPartial({portId:t,channelId:e,sequence:BigInt(r)})}}class qe 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 qe(e?Fe.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 qe(e?Fe.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 qe(t.fee?Fe.fromProto(t.fee):void 0,t.refundAddress,t.relayers)}toProto(){const{fee:t,refund_address:e,relayers:r}=this;return Du.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?Re.fromData(e):void 0,r?qe.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?Re.fromProto(t.packetId):void 0,t.packetFee?qe.fromProto(t.packetFee):void 0)}toProto(){const{packet_id:t,packet_fee:e}=this;return Qt.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:Qt.MsgPayPacketFeeAsync.encode(this.toProto()).finish()})}static unpackAny(t){return js.fromProto(Qt.MsgPayPacketFeeAsync.decode(t.value))}}class Js 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 Js(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 Js(t.portId,t.channelId,t.relayer,t.payee)}toProto(){const{port_id:t,channel_id:e,relayer:r,payee:o}=this;return Qt.MsgRegisterPayee.fromPartial({portId:t,channelId:e,relayer:r,payee:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterPayee",value:Qt.MsgRegisterPayee.encode(this.toProto()).finish()})}static unpackAny(t){return Js.fromProto(Qt.MsgRegisterPayee.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.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 Zs(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 Zs(t.portId,t.channelId,t.relayer,t.counterpartyPayee)}toProto(){const{port_id:t,channel_id:e,relayer:r,counterparty_payee:o}=this;return Qt.MsgRegisterCounterpartyPayee.fromPartial({portId:t,channelId:e,relayer:r,counterpartyPayee:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",value:Qt.MsgRegisterCounterpartyPayee.encode(this.toProto()).finish()})}static unpackAny(t){return Zs.fromProto(Qt.MsgRegisterCounterpartyPayee.decode(t.value))}}class Aa 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 Aa(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 Aa(e,r)}toData(){const{fee_version:t,app_version:e}=this;return{fee_version:t,app_version:e}}static fromProto(t){return new Aa(t.feeVersion,t.appVersion)}toProto(){const{fee_version:t,app_version:e}=this;return nd.Metadata.fromPartial({feeVersion:t,appVersion:e})}}class Pa 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 Pa(e?Re.fromAmino(e):void 0,r.map(o=>qe.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 Pa(e?Re.fromData(e):void 0,r.map(o=>qe.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 Pa(t.packetId?Re.fromProto(t.packetId):void 0,t.packetFees.map(e=>qe.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 Po 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 Po(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 Po(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 Po(t.authority,t.address,t.allowed)}toProto(){const{authority:t,address:e,allowed:r}=this;return qi.MsgUpdateACL.fromPartial({authority:t,address:e,allowed:r})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateACL",value:qi.MsgUpdateACL.encode(this.toProto()).finish()})}static unpackAny(t){return Po.fromProto(qi.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 ku.Params.fromPartial({defaultAllowed:this.default_allowed})}}class bo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new bo(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 bo(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 bo(t.authority,jn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return qi.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.ibchooks.v1.MsgUpdateParams",value:qi.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return bo.fromProto(qi.MsgUpdateParams.decode(t.value))}}class Ys extends u{constructor(t,e){super(),this.address=t,this.allowed=e}static fromAmino(t){const{address:e,allowed:r}=t;return new Ys(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 Ys(e,r)}toData(){const{address:t,allowed:e}=this;return{address:t,allowed:e}}static fromProto(t){return new Ys(t.address,t.allowed)}toProto(){const{address:t,allowed:e}=this;return ku.ACL.fromPartial({address:t,allowed:e})}}class Do extends u{constructor(e,r,o,n,s,a,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=a,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:a,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 Do(r,o,n,s,a,c,d?C.fromAmino(d):void 0,g,v)}toAmino(){const{source_port:e,source_channel:r,class_id:o,token_ids:n,sender:s,receiver:a,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:a,timeout_height:c==null?void 0:c.toAmino(),timeout_timestamp:d,memo:g}}}static fromData(e){const{source_port:r,source_channel:o,class_id:n,token_ids:s,sender:a,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 Do(r,o,n,s,a,c,g?C.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:a,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:a,timeout_height:c?c.toData():new C(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 Do(e.sourcePort,e.sourceChannel,e.classId,e.tokenIds,e.sender,e.receiver,e.timeoutHeight?C.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:a,timeout_height:c,timeout_timestamp:d,memo:g}=this;return $i.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:r,classId:o,tokenIds:n,sender:s,receiver:a,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:$i.MsgTransfer.encode(this.toProto()).finish()})}static unpackAny(e){return Do.fromProto($i.MsgTransfer.decode(e.value))}}class Jn 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 Jn(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 Jn(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 Jn(t.sendEnabled,t.receiveEnabled)}toProto(){const{send_enabled:t,receive_enabled:e}=this;return xu.Params.fromPartial({sendEnabled:t,receiveEnabled:e})}}class ko extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new ko(e,Jn.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 ko(e,Jn.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 ko(t.authority,Jn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return $i.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.nft_transfer.v1.MsgUpdateParams",value:$i.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return ko.fromProto($i.MsgUpdateParams.decode(t.value))}}class ba extends u{constructor(t,e,r,o,n,s,a,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=a,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:a,sender:c,receiver:d,memo:g}=t;return new ba(e,r,o,n,s,a,c,d,g)}toAmino(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:a,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:a,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:a,sender:c,receiver:d,memo:g}=t;return new ba(e,r,o,n,s,a,c,d,g)}toData(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:a,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:a,receiver:c,memo:d}}static fromProto(t){return new ba(t.classId,t.classUri,t.classData,t.tokenIds,t.tokenUris,t.tokenData,t.sender,t.receiver,t.memo)}toProto(){const{class_id:t,class_uri:e,class_data:r,token_ids:o,token_uris:n,token_data:s,sender:a,receiver:c,memo:d}=this;return sd.NonFungibleTokenPacketData.fromPartial({classId:t,classUri:e,classData:r,tokenIds:o,tokenUris:n,tokenData:s,sender:a,receiver:c,memo:d})}}class Xs 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 Xs(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 Xs(e,r)}toData(){const{path:t,base_class_id:e}=this;return{path:t,base_class_id:e}}static fromProto(t){return new Xs(t.path,t.baseClassId)}toProto(){const{path:t,base_class_id:e}=this;return xu.ClassTrace.fromPartial({path:t,baseClassId:e})}}class xo 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 xo(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 xo(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 xo(t.authority,t.channelId,t.portId,t.admin)}toProto(){const{authority:t,channel_id:e,port_id:r,admin:o}=this;return Li.MsgUpdateAdmin.fromPartial({authority:t,channelId:e,portId:r,admin:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdateAdmin",value:Li.MsgUpdateAdmin.encode(this.toProto()).finish()})}static unpackAny(t){return xo.fromProto(Li.MsgUpdateAdmin.decode(t.value))}}class Mo 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 Mo(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 Mo(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 Mo(t.authority,t.channelId,t.portId,t.relayers)}toProto(){const{authority:t,channel_id:e,port_id:r,relayers:o}=this;return Li.MsgUpdatePermissionedRelayers.fromPartial({authority:t,channelId:e,portId:r,relayers:o})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers",value:Li.MsgUpdatePermissionedRelayers.encode(this.toProto()).finish()})}static unpackAny(t){return Mo.fromProto(Li.MsgUpdatePermissionedRelayers.decode(t.value))}}class Ps 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 Ps(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 Ps(e,r)}toData(){const{port_id:t,channel_id:e}=this;return{port_id:t,channel_id:e}}static fromProto(t){return new Ps(t.portId,t.channelId)}toProto(){const{port_id:t,channel_id:e}=this;return ca.Counterparty.fromPartial({portId:t,channelId:e})}}class te 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 te(e,r,o?Ps.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 te(e,r,o?Ps.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 te(t.state,t.ordering,t.counterparty?Ps.fromProto(t.counterparty):void 0,t.connectionHops,t.version)}toProto(){const{state:t,ordering:e,counterparty:r,connection_hops:o,version:n}=this;return ca.Channel.fromPartial({state:t,ordering:e,counterparty:r==null?void 0:r.toProto(),connectionHops:o,version:n})}}class Qs 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 Qs(e,r?te.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 Qs(t.portId,t.channel?te.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 Qs.fromProto(J.MsgChannelOpenInit.decode(t.value))}}class ti 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 ti(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 ti(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 ti.fromProto(ft.MsgCreateClient.decode(e.value))}}class ei 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 ei(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 ei(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 ei.fromProto(ft.MsgUpdateClient.decode(t.value))}}class ri 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:a}=t;return new ri(e,r,o,n,s,a)}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 ri(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 ri.fromProto(ft.MsgUpgradeClient.decode(t.value))}}class oi 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 oi(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 oi(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 oi.fromProto(ft.MsgSubmitMisbehaviour.decode(t.value))}}class ni 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 ni(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 ni(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 ni.fromProto(ft.MsgRecoverClient.decode(t.value))}}class ke 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 ke(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 ke(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 ke(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,ke.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,ke.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,ke.fromProto(t.plan))}toProto(){const{authority:t,plan:e}=this;return Hi.MsgSoftwareUpgrade.fromPartial({authority:t,plan:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",value:Hi.MsgSoftwareUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return Io.fromProto(Hi.MsgSoftwareUpgrade.decode(t.value))}}class So extends u{constructor(t){super(),this.authority=t}static fromAmino(t){const{value:{authority:e}}=t;return new So(e)}toAmino(){const{authority:t}=this;return{type:"cosmos-sdk/MsgCancelUpgrade",value:{authority:t}}}static fromData(t){const{authority:e}=t;return new So(e)}toData(){const{authority:t}=this;return{"@type":"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",authority:t}}static fromProto(t){return new So(t.authority)}toProto(){const{authority:t}=this;return Hi.MsgCancelUpgrade.fromPartial({authority:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.upgrade.v1beta1.MsgCancelUpgrade",value:Hi.MsgCancelUpgrade.encode(this.toProto()).finish()})}static unpackAny(t){return So.fromProto(Hi.MsgCancelUpgrade.decode(t.value))}}class si 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 si(ke.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 si(ke.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 si.fromProto(ft.MsgIBCSoftwareUpgrade.decode(t.value))}}class bs extends u{constructor(t){super(),this.allowed_clients=t}static fromAmino(t){const{allowed_clients:e}=t;return new bs(e)}toAmino(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromData(t){const{allowed_clients:e}=t;return new bs(e)}toData(){const{allowed_clients:t}=this;return{allowed_clients:t}}static fromProto(t){return new bs(t.allowedClients)}toProto(){const{allowed_clients:t}=this;return Ia.Params.fromPartial({allowedClients:t})}}class ii 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 ii(e,bs.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 ii(t.signer,bs.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 ii.fromProto(ft.MsgUpdateParams.decode(t.value))}}class Ds 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 Ds(r?C.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 Ds(r?C.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 Ds(e.height?C.fromProto(e.height):void 0,e.consensusState)}toProto(){const{height:e,consensus_state:r}=this;return Ia.ConsensusStateWithHeight.fromPartial({height:e==null?void 0:e.toProto(),consensusState:r})}}class Da 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 Da(e,r.map(o=>Ds.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 Da(e,r.map(o=>Ds.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 Da(t.clientId,t.consensusStates.map(e=>Ds.fromProto(e)))}toProto(){const{client_id:t,consensus_states:e}=this;return Ia.ClientConsensusStates.fromPartial({clientId:t,consensusStates:e.map(r=>r.toProto())})}}class ji 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 ji(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 ji(e,r)}toData(){const{client_id:t,client_state:e}=this;return{client_id:t,client_state:e}}static fromProto(t){return new ji(t.clientId,t.clientState)}toProto(){const{client_id:t,client_state:e}=this;return Ia.IdentifiedClientState.fromPartial({clientId:t,clientState:e})}}class ks extends u{constructor(t,e){super(),this.height=t,this.timestamp=e}static fromAmino(t){const{height:e,timestamp:r}=t;return new ks(C.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 ks(C.fromData(e),parseInt(r))}toData(){const{height:t,timestamp:e}=this;return{height:t.toData(),timestamp:e.toFixed()}}static fromProto(t){return new ks(C.fromProto(t.height),Number(t.timestamp))}toProto(){const{height:t,timestamp:e}=this;return ca.Timeout.fromPartial({height:t.toProto(),timestamp:BigInt(e)})}}class ai extends u{constructor(t){super(),this.upgrade_timeout=t}static fromAmino(t){return new ai(ks.fromAmino(t.upgrade_timeout))}toAmino(){return{upgrade_timeout:this.upgrade_timeout.toAmino()}}static fromData(t){return new ai(ks.fromData(t.upgrade_timeout))}toData(){return{upgrade_timeout:this.upgrade_timeout.toData()}}static fromProto(t){return new ai(ks.fromProto(t.upgradeTimeout))}toProto(){return ca.Params.fromPartial({upgradeTimeout:this.upgrade_timeout.toProto()})}}class zt extends u{constructor(t,e,r,o,n,s,a,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=a,this.timeout_timestamp=c}static fromAmino(t){const{sequence:e,source_port:r,source_channel:o,destination_port:n,destination_channel:s,data:a,timeout_height:c,timeout_timestamp:d}=t;return new zt(e,r,o,n,s,a,c?C.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:a,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:a==null?void 0:a.toAmino(),timeout_timestamp:c}}static fromData(t){const{sequence:e,source_port:r,source_channel:o,destination_port:n,destination_channel:s,data:a,timeout_height:c,timeout_timestamp:d}=t;return new zt(e,r,o,n,s,a,c?C.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:a,timeout_timestamp:c}=this;return{sequence:t,source_port:e,source_channel:r,destination_port:o,destination_channel:n,data:s,timeout_height:a==null?void 0:a.toData(),timeout_timestamp:c}}static fromProto(t){return new zt(Number(t.sequence),t.sourcePort,t.sourceChannel,t.destinationPort,t.destinationChannel,Buffer.from(t.data).toString("base64"),t.timeoutHeight?C.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:a,timeout_timestamp:c}=this;return ca.Packet.fromPartial({sequence:BigInt(t),sourcePort:e,sourceChannel:r,destinationPort:o,destinationChannel:n,data:Buffer.from(s,"base64"),timeoutHeight:a==null?void 0:a.toProto(),timeoutTimestamp:BigInt(c)})}}class xs extends u{constructor(t){super(),this.key_prefix=t}static fromAmino(t){const{key_prefix:e}=t;return new xs(e)}toAmino(){const{key_prefix:t}=this;return{key_prefix:t}}static fromData(t){const{key_prefix:e}=t;return new xs(e)}toData(){const{key_prefix:t}=this;return{key_prefix:t}}static fromProto(t){return new xs(Buffer.from(t.keyPrefix).toString("base64"))}toProto(){const{key_prefix:t}=this;return Mu.MerklePrefix.fromPartial({keyPrefix:Buffer.from(t,"base64")})}}class ja 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 ja(t.hash)}toData(){return{hash:this.hash}}static fromProto(t){return new ja(Buffer.from(t.hash).toString("base64"))}toProto(){return Mu.MerkleRoot.fromPartial({hash:Buffer.from(this.hash,"base64")})}}class ee 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 ee(e,r,o?xs.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 ee(e,r,o?xs.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 ee(t.clientId,t.connectionId,t.prefix?xs.fromProto(t.prefix):void 0)}toProto(){const{client_id:t,connection_id:e,prefix:r}=this;return ce.Counterparty.fromPartial({clientId:t,connectionId:e,prefix:r==null?void 0:r.toProto()})}}class Rt extends u{constructor(t,e){super(),this.identifier=t,this.features=e}static fromAmino(t){const{identifier:e,features:r}=t;return new Rt(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 Rt(e,r)}toData(){const{identifier:t,features:e}=this;return{identifier:t,features:e}}static fromProto(t){return new Rt(t.identifier,t.features)}toProto(){const{identifier:t,features:e}=this;return ce.Version.fromPartial({identifier:t,features:e})}}class ci 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:a}=t;return new ci(e,r,o.map(Rt.fromAmino),ce.stateFromJSON(n),s?ee.fromAmino(s):void 0,parseInt(a))}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(a=>a.toAmino()),state:ce.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:a}=t;return new ci(e,r,o.map(Rt.fromData),ce.stateFromJSON(n),s?ee.fromData(s):void 0,parseInt(a))}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(a=>a.toData()),state:ce.stateToJSON(o),counterparty:n==null?void 0:n.toData(),delay_period:s.toFixed()}}static fromProto(t){return new ci(t.id,t.clientId,t.versions.map(Rt.fromProto),t.state,t.counterparty?ee.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 ce.IdentifiedConnection.fromPartial({id:t,clientId:e,versions:r.map(a=>a.toProto()),state:o,counterparty:n==null?void 0:n.toProto(),delayPeriod:BigInt(s)})}}class ui 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 ui(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 ui(parseInt(e))}toData(){const{max_expected_time_per_block:t}=this;return{max_expected_time_per_block:t.toFixed()}}static fromProto(t){return new ui(Number(t.maxExpectedTimePerBlock))}toProto(){const{max_expected_time_per_block:t}=this;return ce.Params.fromPartial({maxExpectedTimePerBlock:BigInt(t)})}}class mi extends u{constructor(t,e,r,o,n,s,a){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=a}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,previous_channel_id:r,channel:o,counterparty_version:n,proof_init:s,proof_height:a,signer:c}=t;return new mi(e,r,o?te.fromData(o):void 0,n,s,a?C.fromData(a):void 0,c)}toData(){const{port_id:t,previous_channel_id:e,channel:r,counterparty_version:o,proof_init:n,proof_height:s,signer:a}=this;return{"@type":"/ibc.core.channel.v1.MsgChannelOpenTry",port_id:t,previous_channel_id:e,channel:r==null?void 0:r.toData(),counterparty_version:o,proof_init:n,proof_height:s==null?void 0:s.toData(),signer:a}}static fromProto(t){return new mi(t.portId,t.previousChannelId,t.channel?te.fromProto(t.channel):void 0,t.counterpartyVersion,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?C.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:a}=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:a})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",value:J.MsgChannelOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return mi.fromProto(J.MsgChannelOpenTry.decode(t.value))}}class di 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 di(e,r,o,n?C.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 di(t.portId,t.channelId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?C.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 di.fromProto(J.MsgChannelOpenConfirm.decode(t.value))}}class li extends u{constructor(t,e,r,o,n,s,a){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=a}static fromAmino(t){throw new Error("Amino not supported")}toAmino(){throw new Error("Amino not supported")}static fromData(t){const{port_id:e,channel_id:r,counterparty_channel_id:o,counterparty_version:n,proof_try:s,proof_height:a,signer:c}=t;return new li(e,r,o,n,s,a?C.fromData(a):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:a}=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:a}}static fromProto(t){return new li(t.portId,t.channelId,t.counterpartyChannelId,t.counterpartyVersion,Buffer.from(t.proofTry).toString("base64"),t.proofHeight?C.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:a}=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:a})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",value:J.MsgChannelOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return li.fromProto(J.MsgChannelOpenAck.decode(t.value))}}class pi 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 pi(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 pi(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 pi.fromProto(J.MsgChannelCloseInit.decode(t.value))}}class hi 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 hi(e,r,o,n?C.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 hi(t.portId,t.channelId,Buffer.from(t.proofInit).toString("base64"),t.proofHeight?C.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 hi.fromProto(J.MsgChannelCloseConfirm.decode(t.value))}}class fi 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 fi(e?zt.fromData(e):void 0,r,o?C.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 fi(t.packet?zt.fromProto(t.packet):void 0,Buffer.from(t.proofCommitment).toString("base64"),t.proofHeight?C.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 fi.fromProto(J.MsgRecvPacket.decode(t.value))}}class gi 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 gi(e?zt.fromData(e):void 0,o,r,n?C.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 gi(t.packet?zt.fromProto(t.packet):void 0,Buffer.from(t.acknowledgement).toString("base64"),Buffer.from(t.proofAcked).toString("base64"),t.proofHeight?C.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 gi.fromProto(J.MsgAcknowledgement.decode(t.value))}}class yi 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 yi(e?zt.fromData(e):void 0,r,o?C.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 yi(t.packet?zt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),t.proofHeight?C.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 yi.fromProto(J.MsgTimeout.decode(t.value))}}class _i 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:a}=t;return new _i(e?zt.fromData(e):void 0,o,r,n?C.fromData(n):void 0,parseInt(s),a)}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 _i(t.packet?zt.fromProto(t.packet):void 0,Buffer.from(t.proofUnreceived).toString("base64"),Buffer.from(t.proofClose).toString("base64"),t.proofHeight?C.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 _i.fromProto(J.MsgTimeoutOnClose.decode(t.value))}}class vi 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 vi(e,ai.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 vi(t.authority,ai.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 vi.fromProto(J.MsgUpdateParams.decode(t.value))}}class Ji 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 Ji(e,ee.fromData(r),o?Rt.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 Ji(t.clientId,ee.fromProto(t.counterparty),t.version?Rt.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 Ct.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:Ct.MsgConnectionOpenInit.encode(this.toProto()).finish()})}static unpackAny(t){return Ji.fromProto(Ct.MsgConnectionOpenInit.decode(t.value))}}class Zi extends u{constructor(t,e,r,o,n,s,a,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=a,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:a,proof_init:c,proof_client:d,proof_consensus:g,consensus_height:v,signer:b}=t;return new Zi(e,r,o?ee.fromData(o):void 0,parseInt(n),s.map(k=>Rt.fromData(k)),a?C.fromData(a):void 0,Buffer.from(c).toString("base64"),Buffer.from(d).toString("base64"),Buffer.from(g).toString("base64"),v?C.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:a,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:a,proof_client:c,proof_consensus:d,consensus_height:g==null?void 0:g.toData(),signer:v}}static fromProto(t){return new Zi(t.clientId,t.clientState,t.counterparty?ee.fromProto(t.counterparty):void 0,Number(t.delayPeriod),t.counterpartyVersions.map(e=>Rt.fromProto(e)),t.proofHeight?C.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?C.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:a,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=this;return Ct.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(a,"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:Ct.MsgConnectionOpenTry.encode(this.toProto()).finish()})}static unpackAny(t){return Zi.fromProto(Ct.MsgConnectionOpenTry.decode(t.value))}}class Yi 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 Yi(e,r,o?C.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 Yi(t.connectionId,Buffer.from(t.proofAck).toString("base64"),t.proofHeight?C.fromProto(t.proofHeight):void 0,t.signer)}toProto(){const{connection_id:t,proof_ack:e,proof_height:r,signer:o}=this;return Ct.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:Ct.MsgConnectionOpenConfirm.encode(this.toProto()).finish()})}static unpackAny(t){return Yi.fromProto(Ct.MsgConnectionOpenConfirm.decode(t.value))}}class Xi extends u{constructor(t,e,r,o,n,s,a,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=a,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:a,proof_client:c,proof_consensus:d,consensus_height:g,signer:v}=t;return new Xi(e,r,o?Rt.fromData(o):void 0,n,s?C.fromData(s):void 0,a,c,d,g?C.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:a,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:a,proof_consensus:c,consensus_height:d==null?void 0:d.toData(),signer:g}}static fromProto(t){return new Xi(t.connectionId,t.counterpartyConnectionId,t.version?Rt.fromProto(t.version):void 0,t.clientState,t.proofHeight?C.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?C.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:a,proof_consensus:c,consensus_height:d,signer:g}=this;return Ct.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(a,"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:Ct.MsgConnectionOpenAck.encode(this.toProto()).finish()})}static unpackAny(t){return Xi.fromProto(Ct.MsgConnectionOpenAck.decode(t.value))}}class Qi 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 Qi(e,ui.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 Qi(t.signer,ui.fromProto(t.params))}toProto(){const{signer:t,params:e}=this;return Ct.MsgUpdateParams.fromPartial({signer:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/ibc.core.connection.v1.MsgUpdateParams",value:Ct.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Qi.fromProto(Ct.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 zi.MsgRegisterAccount.fromPartial({owner:t,connectionId:e,version:r,ordering:o})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgRegisterAccount",value:zi.MsgRegisterAccount.encode(this.toProto()).finish()})}static unpackAny(t){return Uo.fromProto(zi.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 zi.MsgSubmitTx.fromPartial({owner:t,connectionId:e,msg:r==null?void 0:r.packAny()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.intertx.v1.MsgSubmitTx",value:zi.MsgSubmitTx.encode(this.toProto()).finish()})}static unpackAny(t){return Co.fromProto(zi.MsgSubmitTx.decode(t.value))}}class Bt extends u{constructor(t,e){super(),this.Base=t,this.Quote=e}toString(){return`${this.Base}/${this.Quote}`}static fromAmino(t){return new Bt(t.Base,t.Quote)}toAmino(){return{Base:this.Base,Quote:this.Quote}}static fromData(t){return new Bt(t.Base,t.Quote)}toData(){return{Base:this.Base,Quote:this.Quote}}static fromProto(t){return new Bt(t.Base,t.Quote)}toProto(){return ad.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(Bt.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(Bt.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(Bt.fromProto))}toProto(){const{authority:t,currency_pairs:e}=this;return Vi.MsgAddCurrencyPairs.fromPartial({authority:t,currencyPairs:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgAddCurrencyPairs",value:Vi.MsgAddCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Eo.fromProto(Vi.MsgAddCurrencyPairs.decode(t.value))}}class Bo 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 Bo(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 Bo(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 Bo(t.authority,t.currencyPairIds)}toProto(){const{authority:t,currency_pair_ids:e}=this;return Vi.MsgRemoveCurrencyPairs.fromPartial({authority:t,currencyPairIds:e})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.oracle.v2.MsgRemoveCurrencyPairs",value:Vi.MsgRemoveCurrencyPairs.encode(this.toProto()).finish()})}static unpackAny(t){return Bo.fromProto(Vi.MsgRemoveCurrencyPairs.decode(t.value))}}class ta 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 ta(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 ta(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 ta(t.price,t.blockTimestamp,Number(t.blockHeight))}toProto(){const{price:t,block_timestamp:e,block_height:r}=this;return cd.QuotePrice.fromPartial({price:t,blockTimestamp:e,blockHeight:BigInt(r)})}}class Ms 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 Ms(e,r,o?Bt.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 Ms(e,r,o?Bt.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 Ms(t.name,t.offChainTicker,t.normalizeByPair?Bt.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 Bc.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(Bt.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(Bt.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(Bt.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 Bc.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(Ms.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(Ms.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(Ms.fromProto))}toProto(){const{ticker:t,provider_configs:e}=this;return Bc.Market.fromPartial({ticker:t.toProto(),providerConfigs:e.map(r=>r.toProto())})}}class Oo 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 Oo(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 Oo(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 Oo(t.authority,t.createMarkets.map(kt.fromProto))}toProto(){const{authority:t,create_markets:e}=this;return Et.MsgCreateMarkets.fromPartial({authority:t,createMarkets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgCreateMarkets",value:Et.MsgCreateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return Oo.fromProto(Et.MsgCreateMarkets.decode(t.value))}}class No 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 No(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 No(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 No(t.authority,t.updateMarkets.map(kt.fromProto))}toProto(){const{authority:t,update_markets:e}=this;return Et.MsgUpdateMarkets.fromPartial({authority:t,updateMarkets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpdateMarkets",value:Et.MsgUpdateMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return No.fromProto(Et.MsgUpdateMarkets.decode(t.value))}}class To extends u{constructor(t,e){super(),this.authority=t,this.markets=e}static fromAmino(t){const{value:{authority:e,markets:r}}=t;return new To(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 To(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 To(t.authority,t.markets.map(kt.fromProto))}toProto(){const{authority:t,markets:e}=this;return Et.MsgUpsertMarkets.fromPartial({authority:t,markets:e.map(r=>r.toProto())})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgUpsertMarkets",value:Et.MsgUpsertMarkets.encode(this.toProto()).finish()})}static unpackAny(t){return To.fromProto(Et.MsgUpsertMarkets.decode(t.value))}}class Fo 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 Fo(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 Fo(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 Fo(t.removeAddresses,t.admin)}toProto(){const{remove_addresses:t,admin:e}=this;return Et.MsgRemoveMarketAuthorities.fromPartial({removeAddresses:t,admin:e})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgRemoveMarketAuthorities",value:Et.MsgRemoveMarketAuthorities.encode(this.toProto()).finish()})}static unpackAny(t){return Fo.fromProto(Et.MsgRemoveMarketAuthorities.decode(t.value))}}class Zn extends u{constructor(t,e){super(),this.market_authorities=t,this.admin=e}static fromAmino(t){return new Zn(t.market_authorities,t.admin)}toAmino(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromData(t){return new Zn(t.market_authorities,t.admin)}toData(){const{market_authorities:t,admin:e}=this;return{market_authorities:t,admin:e}}static fromProto(t){return new Zn(t.marketAuthorities,t.admin)}toProto(){const{market_authorities:t,admin:e}=this;return ud.Params.fromPartial({marketAuthorities:t,admin:e})}}class Ro extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new Ro(e,Zn.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 Ro(e,Zn.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 Ro(t.authority,Zn.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Et.MsgParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/connect.marketmap.v2.MsgParams",value:Et.MsgParams.encode(this.toProto()).finish()})}static unpackAny(t){return Ro.fromProto(Et.MsgParams.decode(t.value))}}class fe 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 fe(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===Gt.UpgradePolicy.UNSPECIFIED?void 0:r}}}static fromData(t){const{sender:e,code_bytes:r,upgrade_policy:o}=t;return new fe(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 fe(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 fe.fromProto(H.MsgPublish.decode(t.value))}}(i=>{i.Policy=Gt.UpgradePolicy})(fe||(fe={}));class qo extends u{constructor(e,r,o,n,s=[],a=[]){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=a}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}}=e;return new qo(r,o,n,s,a??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}=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:a.length===0?void 0:a}}}static fromData(e){const{sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=e;return new qo(r,o,n,s,a,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}=this;return{"@type":"/initia.move.v1.MsgExecute",sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}}static fromProto(e){return new qo(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:a}=this;return H.MsgExecute.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:n,typeArgs:s,args:a.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 qo.fromProto(H.MsgExecute.decode(e.value))}}class $o extends u{constructor(e,r,o,n,s=[],a=[]){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=a}static fromAmino(e){const{value:{sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}}=e;return new $o(r,o,n,s,a??[],c??[])}toAmino(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}=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:a.length===0?void 0:a}}}static fromData(e){const{sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=e;return new $o(r,o,n,s,a,c)}toData(){const{sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}=this;return{"@type":"/initia.move.v1.MsgExecuteJSON",sender:e,module_address:r,module_name:o,function_name:n,type_args:s,args:a}}static fromProto(e){return new $o(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:a}=this;return H.MsgExecuteJSON.fromPartial({sender:e,moduleAddress:r,moduleName:o,functionName:n,typeArgs:s,args:a})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgExecuteJSON",value:H.MsgExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return $o.fromProto(H.MsgExecuteJSON.decode(e.value))}}class Lo 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 Lo(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 Lo(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 Lo(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 Lo.fromProto(H.MsgScript.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/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 Ho(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 Ho(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 Ho.fromProto(H.MsgScriptJSON.decode(e.value))}}class Yn 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 Yn(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 Yn(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 Yn(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 Gt.Params.fromPartial({baseDenom:t,baseMinGasPrice:e,contractSharedRevenueRatio:r,scriptEnabled:o,allowedPublishers:n})}}class zo extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new zo(e,Yn.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 zo(e,Yn.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 zo(t.authority,Yn.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 zo.fromProto(H.MsgUpdateParams.decode(t.value))}}class Vo 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 Vo(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 Vo(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 Vo(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 Vo.fromProto(H.MsgWhitelist.decode(t.value))}}class Ko 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 Ko(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 Ko(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 Ko(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 Ko.fromProto(H.MsgDelist.decode(t.value))}}class Go extends u{constructor(e,r,o,n,s,a=[],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=a,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:n,module_name:s,function_name:a,type_args:c,args:d}}=e;return new Go(r,o,n,s,a,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=this;return{type:"move/MsgGovExecute",value:{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a.length===0?void 0:a,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:n,module_name:s,function_name:a,type_args:c,args:d}=e;return new Go(r,o,n,s,a,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecute",authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}}static fromProto(e){return new Go(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:a,args:c}=this;return H.MsgGovExecute.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:n,functionName:s,typeArgs:a,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 Go.fromProto(H.MsgGovExecute.decode(e.value))}}class Wo extends u{constructor(e,r,o,n,s,a=[],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=a,this.args=c}static fromAmino(e){const{value:{authority:r,sender:o,module_address:n,module_name:s,function_name:a,type_args:c,args:d}}=e;return new Wo(r,o,n,s,a,c??[],d??[])}toAmino(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=this;return{type:"move/MsgGovExecuteJSON",value:{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a.length===0?void 0:a,args:c.length===0?void 0:c}}}static fromData(e){const{authority:r,sender:o,module_address:n,module_name:s,function_name:a,type_args:c,args:d}=e;return new Wo(r,o,n,s,a,c,d)}toData(){const{authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}=this;return{"@type":"/initia.move.v1.MsgGovExecuteJSON",authority:e,sender:r,module_address:o,module_name:n,function_name:s,type_args:a,args:c}}static fromProto(e){return new Wo(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:a,args:c}=this;return H.MsgGovExecuteJSON.fromPartial({authority:e,sender:r,moduleAddress:o,moduleName:n,functionName:s,typeArgs:a,args:c})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.move.v1.MsgGovExecuteJSON",value:H.MsgGovExecuteJSON.encode(this.toProto()).finish()})}static unpackAny(e){return Wo.fromProto(H.MsgGovExecuteJSON.decode(e.value))}}class ge 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 ge(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===Gt.UpgradePolicy.UNSPECIFIED?void 0:o}}}static fromData(t){const{authority:e,sender:r,code_bytes:o,upgrade_policy:n}=t;return new ge(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 ge(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 ge.fromProto(H.MsgGovPublish.decode(t.value))}}(i=>{i.Policy=Gt.UpgradePolicy})(ge||(ge={}));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:a}}=e;return new jo(r,o,n,s??[],a??[])}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:a}=e;return new jo(r,o,n,s,a)}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(a=>Buffer.from(a,"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 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:a}}=e;return new Jo(r,o,n,s??[],a??[])}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:a}=e;return new Jo(r,o,n,s,a)}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 Jo(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 Jo.fromProto(H.MsgGovScriptJSON.decode(e.value))}}class Xn 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 Xn(e,r,o,n,Gt.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:Gt.upgradePolicyToJSON(n)}}static fromData(t){const{address:e,module_name:r,abi:o,raw_bytes:n,upgrade_policy:s}=t;return new Xn(e,r,o,n,Gt.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:Gt.upgradePolicyToJSON(n)}}static fromProto(t){return new Xn(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 Gt.Module.fromPartial({address:t,moduleName:e,abi:r,rawBytes:Buffer.from(o,"base64"),upgradePolicy:n})}}(i=>{i.Policy=Gt.UpgradePolicy})(Xn||(Xn={}));class Zo 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 Zo(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 Zo(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 Zo(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 Zo.fromProto(gt.MsgDelegate.decode(e.value))}}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/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 Yo(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 Yo(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 Yo.fromProto(gt.MsgUndelegate.decode(e.value))}}class Xo 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 Xo(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 Xo(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 Xo(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 Xo.fromProto(gt.MsgBeginRedelegate.decode(e.value))}}class dt extends u{constructor(e,r,o,n,s,a,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(a),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:a,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:a.toProto(),description:c.toProto(),unbondingHeight:BigInt(d),unbondingTime:g,commission:v.toProto(),votingPowers:b.toProto(),votingPower:k})}}(i=>{i.Status=Nt.BondStatus;class t extends u{constructor(n,s,a,c,d){super(),this.moniker=n,this.identity=s,this.website=a,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:a,details:c,security_contact:d}=this;return Nt.Description.fromPartial({details:c,identity:s,moniker:n,securityContact:d,website:a})}}i.Description=t;class e extends u{constructor(n,s,a){super(),this.rate=n,this.max_rate=s,this.max_change_rate=a}static fromAmino(n){const{rate:s,max_rate:a,max_change_rate:c}=n;return new e(s,a,c)}toAmino(){const{rate:n,max_rate:s,max_change_rate:a}=this;return{rate:n,max_rate:s,max_change_rate:a}}static fromData(n){const{rate:s,max_rate:a,max_change_rate:c}=n;return new e(s,a,c)}toData(){const{rate:n,max_rate:s,max_change_rate:a}=this;return{rate:n,max_rate:s,max_change_rate:a}}static fromProto(n){return new e(n.rate,n.maxRate,n.maxChangeRate)}toProto(){const{rate:n,max_rate:s,max_change_rate:a}=this;return Nt.CommissionRates.fromPartial({maxChangeRate:a,maxRate:s,rate:n})}}i.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})}}i.Commission=r})(dt||(dt={}));class Qo 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:a}}=e;return new Qo(r,dt.CommissionRates.fromAmino(o),n,_t.fromAmino(s),l.fromAmino(a))}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:a}=e;return new Qo(r,dt.CommissionRates.fromData(o),n,_t.fromData(s),l.fromData(a))}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 Qo(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 Qo.fromProto(gt.MsgCreateValidator.decode(e.value))}}class ye 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 ye(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 ye(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 ye(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 ye.fromProto(gt.MsgEditValidator.decode(t.value))}}(i=>{i.DESC_DO_NOT_MODIFY={moniker:"[do-not-modify]",website:"[do-not-modify]",identity:"[do-not-modify]",details:"[do-not-modify]",security_contact:"[do-not-modify]"}})(ye||(ye={}));class tn 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 tn(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 tn(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 tn(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 tn.fromProto(gt.MsgCancelUnbondingDelegation.decode(e.value))}}class Qn extends u{constructor(t,e,r,o,n,s,a){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=a}static fromAmino(t){const{value:{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:n,bond_denoms:s,min_voting_power:a,min_commission_rate:c}}=t;return new Qn(q.fromAmino(e),r,o,n,s,parseInt(a),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:a}=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:a}}}static fromData(t){const{unbonding_time:e,max_validators:r,max_entries:o,historical_entries:n,bond_denoms:s,min_voting_power:a,min_commission_rate:c}=t;return new Qn(q.fromData(e),r,o,n,s,parseInt(a),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:a}=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:a}}static fromProto(t){return new Qn(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:a}=this;return Nt.Params.fromPartial({unbondingTime:t.toProto(),maxValidators:e,maxEntries:r,historicalEntries:o,bondDenoms:n,minVotingPower:BigInt(s),minCommissionRate:a})}}class en extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new en(e,Qn.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 en(e,Qn.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 en(t.authority,Qn.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 en.fromProto(gt.MsgUpdateParams.decode(t.value))}}class Ss 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 Ss(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 Ss(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 Ss(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 ae 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 ae(e,r,o,n.map(s=>ae.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 ae(e,r,o,n.map(s=>ae.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 ae(e.delegatorAddress,e.validatorDstAddress,e.validatorDstAddress,t.entries.map(r=>ae.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})})}}(i=>{class t extends u{constructor(o,n,s,a,c){super();_(this,"initial_balance");_(this,"shares_dst");_(this,"balance");this.creation_height=a,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:a,completion_time:c},balance:d}=o;return new t(l.fromAmino(n),l.fromAmino(d),l.fromAmino(s),a,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:a,completion_time:c},balance:d}=o;return new t(l.fromData(n),l.fromData(d),l.fromData(s),a,new Date(c))}toData(){return{redelegation_entry:{initial_balance:this.initial_balance.toData(),shares_dst:this.shares_dst.toData(),creation_height:this.creation_height,completion_time:this.completion_time.toISOString()},balance:this.balance.toData()}}static 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:a,completion_time:c}=this;return Nt.RedelegationEntryResponse.fromPartial({balance:n.toProto(),redelegationEntry:Nt.RedelegationEntry.fromPartial({completionTime:c,creationHeight:BigInt(a),initialBalance:o.toProto(),sharesDst:s.toProto()})})}}i.Entry=t})(ae||(ae={}));class Lt 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 Lt(e,r,o.map(n=>Lt.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 Lt(e,r,o.map(n=>Lt.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 Lt(t.delegatorAddress,t.validatorAddress,t.entries.map(e=>Lt.Entry.fromProto(e)))}}(i=>{class t extends u{constructor(o,n,s,a){super();_(this,"initial_balance");_(this,"balance");this.creation_height=s,this.completion_time=a,this.initial_balance=new l(o),this.balance=new l(n)}static fromAmino(o){const{initial_balance:n,balance:s,creation_height:a,completion_time:c}=o;return new t(l.fromAmino(n),l.fromAmino(s),parseInt(a),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:a,completion_time:c}=o;return new t(l.fromData(n),l.fromData(s),parseInt(a),new Date(c))}toData(){return{initial_balance:this.initial_balance.toData(),balance:this.balance.toData(),creation_height:this.creation_height.toFixed(),completion_time:this.completion_time.toISOString()}}static 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:a}=this;return Nt.UnbondingDelegationEntry.fromPartial({balance:n.toProto(),completionTime:a,creationHeight:BigInt(s),initialBalance:o.toProto()})}}i.Entry=t})(Lt||(Lt={}));class rn 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 rn(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 rn(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 rn(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 rn.fromProto(st.MsgAddValidator.decode(t.value))}}class on 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 on(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 on(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 on(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 on.fromProto(st.MsgRemoveValidator.decode(t.value))}}class nn extends u{constructor(t,e,r,o,n,s,a,c){super(),this.sender=t,this.from=e,this.to=r,this.amount=o,this.sequence=n,this.height=s,this.base_denom=a,this.data=c}static fromAmino(t){const{value:{sender:e,from:r,to:o,amount:n,sequence:s,height:a,base_denom:c,data:d}}=t;return new nn(e,r,o,I.fromAmino(n),parseInt(s),parseInt(a),c,d)}toAmino(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:a,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:a,data:c}}}static fromData(t){const{sender:e,from:r,to:o,amount:n,sequence:s,height:a,base_denom:c,data:d}=t;return new nn(e,r,o,I.fromData(n),parseInt(s),parseInt(a),c,d)}toData(){const{sender:t,from:e,to:r,amount:o,sequence:n,height:s,base_denom:a,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:a,data:c}}static fromProto(t){return new nn(t.sender,t.from,t.to,I.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:a,data:c}=this;return st.MsgFinalizeTokenDeposit.fromPartial({sender:t,from:e,to:r,amount:o.toProto(),sequence:BigInt(n),height:BigInt(s),baseDenom:a,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 nn.fromProto(st.MsgFinalizeTokenDeposit.decode(t.value))}}class sn 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 sn(e,r,I.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 sn(e,r,I.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 sn(t.sender,t.to,I.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 sn.fromProto(st.MsgInitiateTokenWithdrawal.decode(t.value))}}class an extends u{constructor(t,e){super(),this.sender=t,this.messages=e}static fromAmino(t){const{value:{sender:e,messages:r}}=t;return new an(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 an(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 an(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 an.fromProto(st.MsgExecuteMessages.decode(t.value))}}class cn 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 cn(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 cn(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 cn(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 cn.fromProto(st.MsgSpendFeePool.decode(e.value))}}class un 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 un(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 un(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 un(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 un.fromProto(z.MsgRecordBatch.decode(t.value))}}class qt 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 qt(e,Le.batchInfo_ChainTypeFromJSON(r))}toAmino(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:Le.batchInfo_ChainTypeToJSON(e)}}static fromData(t){const{submitter:e,chain_type:r}=t;return new qt(e,Le.batchInfo_ChainTypeFromJSON(r))}toData(){const{submitter:t,chain_type:e}=this;return{submitter:t,chain_type:Le.batchInfo_ChainTypeToJSON(e)}}static fromProto(t){return new qt(t.submitter,t.chainType)}toProto(){const{submitter:t,chain_type:e}=this;return Le.BatchInfo.fromPartial({submitter:t,chainType:e})}}class xe extends u{constructor(t,e,r,o,n,s,a,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=a,this.metadata=c}static fromAmino(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:n,finalization_period:s,submission_start_height:a,oracle_enabled:c,metadata:d}=t;return new xe(e,r,qt.fromAmino(o),q.fromAmino(n),q.fromAmino(s),parseInt(a),c,d)}toAmino(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:a,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:a,metadata:c}}static fromData(t){const{challenger:e,proposer:r,batch_info:o,submission_interval:n,finalization_period:s,submission_start_height:a,oracle_enabled:c,metadata:d}=t;return new xe(e,r,qt.fromData(o),q.fromData(n),q.fromData(s),parseInt(a),c,d)}toData(){const{challenger:t,proposer:e,batch_info:r,submission_interval:o,finalization_period:n,submission_start_height:s,oracle_enabled:a,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:a,metadata:c}}static fromProto(t){return new xe(t.challenger,t.proposer,qt.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:a,metadata:c}=this;return Le.BridgeConfig.fromPartial({challenger:t,proposer:e,batchInfo:r.toProto(),submissionInterval:o.toProto(),finalizationPeriod:n.toProto(),submissionStartHeight:BigInt(s),oracleEnabled:a,metadata:c?Buffer.from(c,"base64"):void 0})}}class mn extends u{constructor(t,e){super(),this.creator=t,this.config=e}static fromAmino(t){const{value:{creator:e,config:r}}=t;return new mn(e,xe.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 mn(e,xe.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 mn(t.creator,xe.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 mn.fromProto(z.MsgCreateBridge.decode(t.value))}}class dn 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 dn(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 dn(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 dn(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 dn.fromProto(z.MsgProposeOutput.decode(t.value))}}class ln 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 ln(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 ln(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 ln(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 ln.fromProto(z.MsgDeleteOutput.decode(t.value))}}class pn 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 pn(e,parseInt(r),o,I.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 pn(e,parseInt(r),o,I.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 pn(t.sender,Number(t.bridgeId),t.to,I.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 pn.fromProto(z.MsgInitiateTokenDeposit.decode(t.value))}}class hn extends u{constructor(t,e,r,o,n,s,a,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=a,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:a,sequence:c,amount:d,version:g,storage_root:v,last_block_hash:b}}=t;return new hn(e,parseInt(r),parseInt(o),n,s,a,parseInt(c),I.fromAmino(d),g,v,b)}toAmino(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:n,to:s,sequence:a,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:a.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:a,sequence:c,amount:d,version:g,storage_root:v,last_block_hash:b}=t;return new hn(e,parseInt(r),parseInt(o),n,s,a,parseInt(c),I.fromData(d),g,v,b)}toData(){const{sender:t,bridge_id:e,output_index:r,withdrawal_proofs:o,from:n,to:s,sequence:a,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:a.toFixed(),amount:c.toData(),version:d,storage_root:g,last_block_hash:v}}static fromProto(t){return new hn(t.sender,Number(t.bridgeId),Number(t.outputIndex),t.withdrawalProofs.map(e=>Buffer.from(e).toString("base64")),t.from,t.to,Number(t.sequence),I.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:a,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(a),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 hn.fromProto(z.MsgFinalizeTokenWithdrawal.decode(t.value))}}class fn 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 fn(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 fn(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 fn(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 fn.fromProto(z.MsgUpdateProposer.decode(t.value))}}class gn 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 gn(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 gn(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 gn(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 gn.fromProto(z.MsgUpdateChallenger.decode(t.value))}}class yn 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 yn(e,parseInt(r),qt.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 yn(e,parseInt(r),qt.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 yn(t.authority,Number(t.bridgeId),qt.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 yn.fromProto(z.MsgUpdateBatchInfo.decode(t.value))}}class _n 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 _n(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 _n(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 _n(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 _n.fromProto(z.MsgUpdateOracleConfig.decode(t.value))}}class vn 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 vn(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 vn(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 vn(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 vn.fromProto(z.MsgUpdateMetadata.decode(t.value))}}class ts extends u{constructor(e){super();_(this,"registration_fee");this.registration_fee=new l(e)}static fromAmino(e){return new ts(l.fromAmino(e.value.registration_fee))}toAmino(){return{type:"ophost/Params",value:{registration_fee:this.registration_fee.toAmino()}}}static fromData(e){return new ts(l.fromData(e.registration_fee))}toData(){return{"@type":"/opinit.ophost.v1.Params",registration_fee:this.registration_fee.toData()}}static fromProto(e){return new ts(l.fromProto(e.registrationFee))}toProto(){return Le.Params.fromPartial({registrationFee:this.registration_fee.toProto()})}}class wn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new wn(e,ts.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 wn(e,ts.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 wn(t.authority,ts.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 wn.fromProto(z.MsgUpdateParams.decode(t.value))}}class Me 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 Me(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 Me(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 Me(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 Le.Output.fromPartial({outputRoot:Buffer.from(t,"base64"),l1BlockNumber:BigInt(e),l1BlockTime:r,l2BlockNumber:BigInt(o)})}}class ea 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 ea(qt.fromAmino(e),Me.fromAmino(r))}toAmino(){const{batch_info:t,output:e}=this;return{batch_info:t.toAmino(),output:e.toAmino()}}static fromData(t){const{batch_info:e,output:r}=t;return new ea(qt.fromData(e),Me.fromData(r))}toData(){const{batch_info:t,output:e}=this;return{batch_info:t.toData(),output:e.toData()}}static fromProto(t){return new ea(qt.fromProto(t.batchInfo),Me.fromProto(t.output))}toProto(){const{batch_info:t,output:e}=this;return Le.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,xe.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,xe.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,xe.fromProto(t.bridgeConfig))}toProto(){const{bridge_id:t,bridge_addr:e,l1_chain_id:r,l1_client_id:o,bridge_config:n}=this;return Oc.BridgeInfo.fromPartial({bridgeId:BigInt(t),bridgeAddr:e,l1ChainId:r,l1ClientId:o,bridgeConfig:n.toProto()})}}class An 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 An(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 An(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 An(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 An.fromProto(st.MsgSetBridgeInfo.decode(t.value))}}class Pn extends u{constructor(t,e,r){super(),this.sender=t,this.height=e,this.data=r}static fromAmino(t){return new Pn(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 Pn(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 Pn(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 Pn.fromProto(st.MsgUpdateOracle.decode(t.value))}}class es extends u{constructor(e,r,o,n,s,a){super();_(this,"min_gas_prices");this.max_validators=e,this.historical_entries=r,this.bridge_executors=n,this.admin=s,this.fee_whitelist=a,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:a,fee_whitelist:c}}=e;return new es(r,o,l.fromAmino(n),s,a,c)}toAmino(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:a}=this;return{type:"opchild/Params",value:{max_validators:e,historical_entries:r,min_gas_prices:o.toAmino(),bridge_executors:n,admin:s,fee_whitelist:a}}}static fromData(e){const{max_validators:r,historical_entries:o,min_gas_prices:n,bridge_executors:s,admin:a,fee_whitelist:c}=e;return new es(r,o,l.fromData(n),s,a,c)}toData(){const{max_validators:e,historical_entries:r,min_gas_prices:o,bridge_executors:n,admin:s,fee_whitelist:a}=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:a}}static fromProto(e){return new es(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:a}=this;return Oc.Params.fromPartial({maxValidators:e,historicalEntries:r,minGasPrices:o.toProto(),bridgeExecutors:n,admin:s,feeWhitelist:a})}}class bn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new bn(e,es.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 bn(e,es.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 bn(t.authority,es.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 bn.fromProto(st.MsgUpdateParams.decode(t.value))}}class wi 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 wi(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 wi(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 wi(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 Oc.Validator.fromPartial({moniker:t,operatorAddress:e,consensusPubkey:r.packAny(),consPower:BigInt(o)})}}class rs 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 rs(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 rs(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 rs(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 md.Params.fromPartial({rewardDenom:t,dilutionPeriod:e.toProto(),releaseRate:r,dilutionRate:o,releaseEnabled:n})}}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:"reward/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":"/initia.reward.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 Pc.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/initia.reward.v1.MsgUpdateParams",value:Pc.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return Dn.fromProto(Pc.MsgUpdateParams.decode(t.value))}}class kn extends u{constructor(t){super(),this.address=t}static fromAmino(t){const{value:{address:e}}=t;return new kn(e)}toAmino(){const{address:t}=this;return{type:"cosmos-sdk/MsgUnjail",value:{address:t}}}static fromData(t){const{address:e}=t;return new kn(e)}toData(){const{address:t}=this;return{"@type":"/cosmos.slashing.v1beta1.MsgUnjail",address:t}}static fromProto(t){return new kn(t.validatorAddr)}toProto(){const{address:t}=this;return Ki.MsgUnjail.fromPartial({validatorAddr:t})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUnjail",value:Ki.MsgUnjail.encode(this.toProto()).finish()})}static unpackAny(t){return kn.fromProto(Ki.MsgUnjail.decode(t.value))}}class os 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 os(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 os(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 os(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 Iu.Params.fromPartial({signedBlocksWindow:BigInt(t),minSignedPerWindow:Buffer.from(e),downtimeJailDuration:r.toProto(),slashFractionDoubleSign:Buffer.from(o),slashFractionDowntime:Buffer.from(n)})}}class xn extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new xn(e,os.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 xn(e,os.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 xn(t.authority,os.fromProto(t.params))}toProto(){const{authority:t,params:e}=this;return Ki.MsgUpdateParams.fromPartial({authority:t,params:e.toProto()})}packAny(){return f.Any.fromPartial({typeUrl:"/cosmos.slashing.v1beta1.MsgUpdateParams",value:Ki.MsgUpdateParams.encode(this.toProto()).finish()})}static unpackAny(t){return xn.fromProto(Ki.MsgUpdateParams.decode(t.value))}}class Ai 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:a}=t;return new Ai(e,parseInt(r),parseInt(o),new Date(n),s,parseInt(a))}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:a}=t;return new Ai(e,parseInt(r),parseInt(o),new Date(n),s,parseInt(a))}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 Ai(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 Iu.ValidatorSigningInfo.fromPartial({address:t,startHeight:BigInt(e),indexOffset:BigInt(r),jailedUntil:o,tombstoned:n,missedBlocksCounter:BigInt(s)})}}class Mn extends u{constructor(t,e){super(),this.sender=t,this.subdenom=e}static fromAmino(t){const{value:{sender:e,subdenom:r}}=t;return new Mn(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 Mn(e,r)}toData(){const{sender:t,subdenom:e}=this;return{"@type":"/miniwasm.tokenfactory.v1.MsgCreateDenom",sender:t,subdenom:e}}static fromProto(t){return new Mn(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 Mn.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,I.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,I.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,I.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 Sn 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 Sn(e,I.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 Sn(e,I.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 Sn(t.sender,I.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 Sn.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,Ae.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,Ae.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,Ae.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 Bn 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 Bn(e,I.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 Bn(e,I.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 Bn(t.sender,I.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 Bn.fromProto(ct.MsgForceTransfer.decode(t.value))}}class ns 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 ns(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 ns(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 ns(l.fromProto(e.denomCreationFee),Number(e.denomCreationGasConsume))}toProto(){const{denom_creation_fee:e,denom_creation_gas_consume:r}=this;return dd.Params.fromPartial({denomCreationFee:e.toProto(),denomCreationGasConsume:BigInt(r)})}}class On extends u{constructor(t,e){super(),this.authority=t,this.params=e}static fromAmino(t){const{value:{authority:e,params:r}}=t;return new On(e,ns.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 On(e,ns.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 On(t.authority,ns.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 On.fromProto(ct.MsgUpdateParams.decode(t.value))}}exports.Msg=void 0;(i=>{function t(o){switch(o.type){case"block-sdk/x/auction/MsgAuctionBid":return He.fromAmino(o);case"block-sdk/x/auction/MsgUpdateParams":return ze.fromAmino(o);case"cosmos-sdk/x/auth/MsgUpdateParams":return Ve.fromAmino(o);case"cosmos-sdk/MsgGrant":return Pr.fromAmino(o);case"cosmos-sdk/MsgRevoke":return br.fromAmino(o);case"cosmos-sdk/MsgExec":return Dr.fromAmino(o);case"cosmos-sdk/MsgSend":return kr.fromAmino(o);case"cosmos-sdk/MsgMultiSend":return bt.fromAmino(o);case"cosmos-sdk/x/bank/MsgUpdateParams":return xr.fromAmino(o);case"cosmos-sdk/MsgSetSendEnabled":return Mr.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 Sr.fromAmino(o);case"cosmos-sdk/MsgModifyWithdrawAddress":return Er.fromAmino(o);case"cosmos-sdk/MsgWithdrawDelegationReward":return Br.fromAmino(o);case"cosmos-sdk/MsgWithdrawValidatorCommission":return Or.fromAmino(o);case"cosmos-sdk/MsgFundCommunityPool":return Nr.fromAmino(o);case"distribution/MsgUpdateParams":return Tr.fromAmino(o);case"cosmos-sdk/distr/MsgCommunityPoolSpend":return Fr.fromAmino(o);case"distr/MsgDepositValidatorRewardsPool":return Rr.fromAmino(o);case"cosmos-sdk/MsgSubmitEvidence":return $r.fromAmino(o);case"evm/MsgCreate":return Lr.fromAmino(o);case"evm/MsgCreate2":return Hr.fromAmino(o);case"evm/MsgCall":return zr.fromAmino(o);case"evm/MsgUpdateParams":return Vr.fromAmino(o);case"cosmos-sdk/MsgGrantAllowance":return Gr.fromAmino(o);case"cosmos-sdk/MsgRevokeAllowance":return Wr.fromAmino(o);case"noble/forwarding/RegisterAccount":return jr.fromAmino(o);case"noble/forwarding/ClearAccount":return Jr.fromAmino(o);case"cosmos-sdk/v1/MsgCancelProposal":return Zr.fromAmino(o);case"cosmos-sdk/MsgDeposit":return Yr.fromAmino(o);case"cosmos-sdk/v1/MsgDeposit":return Xr.fromAmino(o);case"cosmos-sdk/MsgSubmitProposal":return ro.fromAmino(o);case"cosmos-sdk/v1/MsgSubmitProposal":return oo.fromAmino(o);case"cosmos-sdk/MsgVote":return de.fromAmino(o);case"cosmos-sdk/v1/MsgVote":return le.fromAmino(o);case"cosmos-sdk/MsgVoteWeighted":return no.fromAmino(o);case"cosmos-sdk/v1/MsgVoteWeighted":return so.fromAmino(o);case"gov/MsgUpdateParams":return io.fromAmino(o);case"cosmos-sdk/MsgCreateGroup":return ao.fromAmino(o);case"cosmos-sdk/MsgCreateGroupPolicy":return mo.fromAmino(o);case"cosmos-sdk/MsgCreateGroupWithPolicy":return lo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupAdmin":return fo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupDecisionPolicy":return go.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMembers":return yo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupMetadata":return _o.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyAdmin":return vo.fromAmino(o);case"cosmos-sdk/MsgUpdateGroupPolicyMetadata":return wo.fromAmino(o);case"cosmos-sdk/group/MsgExec":return po.fromAmino(o);case"cosmos-sdk/group/MsgLeaveGroup":return ho.fromAmino(o);case"cosmos-sdk/group/MsgSubmitProposal":return he.fromAmino(o);case"cosmos-sdk/group/MsgVote":return pe.fromAmino(o);case"ibchooks/MsgUpdateACL":return Po.fromAmino(o);case"ibchooks/MsgUpdateParams":return bo.fromAmino(o);case"nft-transfer/MsgTransfer":return Do.fromAmino(o);case"nft-transfer/MsgUpdateParams":return ko.fromAmino(o);case"ibc-perm/MsgUpdateAdmin":return xo.fromAmino(o);case"ibc-perm/MsgUpdatePermissionedRelayers":return Mo.fromAmino(o);case"cosmos-sdk/MsgTransfer":return Ar.fromAmino(o);case"intertx/MsgRegisterAccount":return Uo.fromAmino(o);case"intertx/MsgSubmitTx":return Co.fromAmino(o);case"connect/x/marketmap/MsgCreateMarkets":return Oo.fromAmino(o);case"connect/x/marketmap/MsgUpdateMarkets":return No.fromAmino(o);case"connect/x/marketmap/MsgUpsertMarkets":return To.fromAmino(o);case"connect/x/marketmap/MsgRemoveMarketAuthorities":return Fo.fromAmino(o);case"connect/x/marketmap/MsgParams":return Ro.fromAmino(o);case"move/MsgPublish":return fe.fromAmino(o);case"move/MsgExecute":return qo.fromAmino(o);case"move/MsgExecuteJSON":return $o.fromAmino(o);case"move/MsgScript":return Lo.fromAmino(o);case"move/MsgScriptJSON":return Ho.fromAmino(o);case"move/MsgUpdateParams":return zo.fromAmino(o);case"move/MsgWhitelist":return Vo.fromAmino(o);case"move/MsgDelist":return Ko.fromAmino(o);case"move/MsgGovExecute":return Go.fromAmino(o);case"move/MsgGovExecuteJSON":return Wo.fromAmino(o);case"move/MsgGovPublish":return ge.fromAmino(o);case"move/MsgGovScript":return jo.fromAmino(o);case"move/MsgGovScriptJSON":return Jo.fromAmino(o);case"mstaking/MsgDelegate":return Zo.fromAmino(o);case"mstaking/MsgUndelegate":return Yo.fromAmino(o);case"mstaking/MsgBeginRedelegate":return Xo.fromAmino(o);case"mstaking/MsgCreateValidator":return Qo.fromAmino(o);case"mstaking/MsgEditValidator":return ye.fromAmino(o);case"mstaking/MsgCancelUnbondingDelegation":return tn.fromAmino(o);case"mstaking/MsgUpdateParams":return en.fromAmino(o);case"opchild/MsgAddValidator":return rn.fromAmino(o);case"opchild/MsgRemoveValidator":return on.fromAmino(o);case"opchild/MsgFinalizeTokenDeposit":return nn.fromAmino(o);case"opchild/MsgInitiateTokenWithdrawal":return sn.fromAmino(o);case"opchild/MsgExecuteMessages":return an.fromAmino(o);case"opchild/MsgSpendFeePool":return cn.fromAmino(o);case"opchild/MsgSetBridgeInfo":return An.fromAmino(o);case"opchild/MsgUpdateOracle":return Pn.fromAmino(o);case"opchild/MsgUpdateParams":return bn.fromAmino(o);case"ophost/MsgRecordBatch":return un.fromAmino(o);case"ophost/MsgCreateBridge":return mn.fromAmino(o);case"ophost/MsgProposeOutput":return dn.fromAmino(o);case"ophost/MsgDeleteOutput":return ln.fromAmino(o);case"ophost/MsgInitiateTokenDeposit":return pn.fromAmino(o);case"ophost/MsgFinalizeTokenWithdrawal":return hn.fromAmino(o);case"ophost/MsgUpdateProposer":return fn.fromAmino(o);case"ophost/MsgUpdateChallenger":return gn.fromAmino(o);case"ophost/MsgUpdateBatchInfo":return yn.fromAmino(o);case"ophost/MsgUpdateOracleConfig":return _n.fromAmino(o);case"ophost/MsgUpdateMetadata":return vn.fromAmino(o);case"ophost/MsgUpdateParams":return wn.fromAmino(o);case"connect/x/oracle/MsgAddCurrencyPairs":return Eo.fromAmino(o);case"connect/x/oracle/MsgRemoveCurrencyPairs":return Bo.fromAmino(o);case"reward/MsgUpdateParams":return Dn.fromAmino(o);case"cosmos-sdk/MsgUnjail":return kn.fromAmino(o);case"cosmos-sdk/x/slashing/MsgUpdateParams":return xn.fromAmino(o);case"tokenfactory/MsgCreateDenom":return Mn.fromAmino(o);case"tokenfactory/MsgMint":return In.fromAmino(o);case"tokenfactory/MsgBurn":return Sn.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 Bn.fromAmino(o);case"tokenfactory/MsgUpdateParams":return On.fromAmino(o);case"cosmos-sdk/MsgSoftwareUpgrade":return Io.fromAmino(o);case"cosmos-sdk/MsgCancelUpgrade":return So.fromAmino(o);case"wasm/MsgStoreCode":return nr.fromAmino(o);case"wasm/MsgInstantiateContract":return sr.fromAmino(o);case"wasm/MsgInstantiateContract2":return ir.fromAmino(o);case"wasm/MsgExecuteContract":return ar.fromAmino(o);case"wasm/MsgMigrateContract":return cr.fromAmino(o);case"wasm/MsgUpdateAdmin":return ur.fromAmino(o);case"wasm/MsgClearAdmin":return mr.fromAmino(o);case"wasm/MsgUpdateInstantiateConfig":return dr.fromAmino(o);case"wasm/MsgUpdateParams":return lr.fromAmino(o);case"wasm/MsgSudoContract":return pr.fromAmino(o);case"wasm/MsgPinCodes":return hr.fromAmino(o);case"wasm/MsgUnpinCodes":return fr.fromAmino(o);case"wasm/MsgStoreAndInstantiateContract":return gr.fromAmino(o);case"wasm/MsgStoreAndMigrateContract":return yr.fromAmino(o);case"wasm/MsgAddCodeUploadParamsAddresses":return _r.fromAmino(o);case"wasm/MsgRemoveCodeUploadParamsAddresses":return vr.fromAmino(o);case"wasm/MsgUpdateContractLabel":return wr.fromAmino(o)}}i.fromAmino=t;function e(o){switch(o["@type"]){case"/sdk.auction.v1.MsgAuctionBid":return He.fromData(o);case"/sdk.auction.v1.MsgUpdateParams":return ze.fromData(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return Ve.fromData(o);case"/cosmos.authz.v1beta1.MsgGrant":return Pr.fromData(o);case"/cosmos.authz.v1beta1.MsgRevoke":return br.fromData(o);case"/cosmos.authz.v1beta1.MsgExec":return Dr.fromData(o);case"/cosmos.bank.v1beta1.MsgSend":return kr.fromData(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return bt.fromData(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return xr.fromData(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Mr.fromData(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Ir.fromData(o);case"/celestia.blob.v1.MsgPayForBlobs":return Ks.fromData(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Sr.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 Br.fromData(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return Or.fromData(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return Nr.fromData(o);case"/initia.distribution.v1.MsgUpdateParams":return Tr.fromData(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return Fr.fromData(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return Rr.fromData(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return $r.fromData(o);case"/minievm.evm.v1.MsgCreate":return Lr.fromData(o);case"/minievm.evm.v1.MsgCreate2":return Hr.fromData(o);case"/minievm.evm.v1.MsgCall":return zr.fromData(o);case"/minievm.evm.v1.MsgUpdateParams":return Vr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return Gr.fromData(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return Wr.fromData(o);case"/noble.forwarding.v1.MsgRegisterAccount":return jr.fromData(o);case"/noble.forwarding.v1.MsgClearAccount":return Jr.fromData(o);case"/cosmos.gov.v1.MsgCancelProposal":return Zr.fromData(o);case"/cosmos.gov.v1beta1.MsgDeposit":return Yr.fromData(o);case"/cosmos.gov.v1.MsgDeposit":return Xr.fromData(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return ro.fromData(o);case"/cosmos.gov.v1.MsgSubmitProposal":return oo.fromData(o);case"/cosmos.gov.v1beta1.MsgVote":return de.fromData(o);case"/cosmos.gov.v1.MsgVote":return le.fromData(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return no.fromData(o);case"/cosmos.gov.v1.MsgVoteWeighted":return so.fromData(o);case"/initia.gov.v1.MsgUpdateParams":return io.fromData(o);case"/cosmos.group.v1.MsgCreateGroup":return ao.fromData(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return mo.fromData(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return lo.fromData(o);case"/cosmos.group.v1.MsgExec":return po.fromData(o);case"/cosmos.group.v1.MsgLeaveGroup":return ho.fromData(o);case"/cosmos.group.v1.MsgSubmitProposal":return he.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return fo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return yo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return _o.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return vo.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return go.fromData(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return wo.fromData(o);case"/cosmos.group.v1.MsgVote":return pe.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return Ws.fromData(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return js.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return Zs.fromData(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return Js.fromData(o);case"/initia.ibchooks.v1.MsgUpdateACL":return Po.fromData(o);case"/initia.ibchooks.v1.MsgUpdateParams":return bo.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Do.fromData(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return ko.fromData(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return xo.fromData(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return Mo.fromData(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Ar.fromData(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return zs.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return Qs.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return mi.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return di.fromData(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return li.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return pi.fromData(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return hi.fromData(o);case"/ibc.core.channel.v1.MsgRecvPacket":return fi.fromData(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return gi.fromData(o);case"/ibc.core.channel.v1.MsgTimeout":return yi.fromData(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return _i.fromData(o);case"/ibc.core.channel.v1.MsgUpdateParams":return vi.fromData(o);case"/ibc.core.client.v1.MsgCreateClient":return ti.fromData(o);case"/ibc.core.client.v1.MsgUpdateClient":return ei.fromData(o);case"/ibc.core.client.v1.MsgUpgradeClient":return ri.fromData(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return oi.fromData(o);case"/ibc.core.client.v1.MsgRecoverClient":return ni.fromData(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return si.fromData(o);case"/ibc.core.client.v1.MsgUpdateParams":return ii.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Ji.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Zi.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Yi.fromData(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Xi.fromData(o);case"/ibc.core.connection.v1.MsgUpdateParams":return Qi.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 Oo.fromData(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return No.fromData(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return To.fromData(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return Fo.fromData(o);case"/connect.marketmap.v2.MsgParams":return Ro.fromData(o);case"/initia.move.v1.MsgPublish":return fe.fromData(o);case"/initia.move.v1.MsgExecute":return qo.fromData(o);case"/initia.move.v1.MsgExecuteJSON":return $o.fromData(o);case"/initia.move.v1.MsgScript":return Lo.fromData(o);case"/initia.move.v1.MsgScriptJSON":return Ho.fromData(o);case"/initia.move.v1.MsgUpdateParams":return zo.fromData(o);case"/initia.move.v1.MsgWhitelist":return Vo.fromData(o);case"/initia.move.v1.MsgDelist":return Ko.fromData(o);case"/initia.move.v1.MsgGovExecute":return Go.fromData(o);case"/initia.move.v1.MsgGovExecuteJSON":return Wo.fromData(o);case"/initia.move.v1.MsgGovPublish":return ge.fromData(o);case"/initia.move.v1.MsgGovScript":return jo.fromData(o);case"/initia.move.v1.MsgGovScriptJSON":return Jo.fromData(o);case"/initia.mstaking.v1.MsgDelegate":return Zo.fromData(o);case"/initia.mstaking.v1.MsgUndelegate":return Yo.fromData(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return Xo.fromData(o);case"/initia.mstaking.v1.MsgCreateValidator":return Qo.fromData(o);case"/initia.mstaking.v1.MsgEditValidator":return ye.fromData(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return tn.fromData(o);case"/initia.mstaking.v1.MsgUpdateParams":return en.fromData(o);case"/opinit.opchild.v1.MsgAddValidator":return rn.fromData(o);case"/opinit.opchild.v1.MsgRemoveValidator":return on.fromData(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return nn.fromData(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return sn.fromData(o);case"/opinit.opchild.v1.MsgExecuteMessages":return an.fromData(o);case"/opinit.opchild.v1.MsgSpendFeePool":return cn.fromData(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return An.fromData(o);case"/opinit.opchild.v1.MsgUpdateOracle":return Pn.fromData(o);case"/opinit.opchild.v1.MsgUpdateParams":return bn.fromData(o);case"/opinit.ophost.v1.MsgRecordBatch":return un.fromData(o);case"/opinit.ophost.v1.MsgCreateBridge":return mn.fromData(o);case"/opinit.ophost.v1.MsgProposeOutput":return dn.fromData(o);case"/opinit.ophost.v1.MsgDeleteOutput":return ln.fromData(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return pn.fromData(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return hn.fromData(o);case"/opinit.ophost.v1.MsgUpdateProposer":return fn.fromData(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return gn.fromData(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return yn.fromData(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return _n.fromData(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return vn.fromData(o);case"/opinit.ophost.v1.MsgUpdateParams":return wn.fromData(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Eo.fromData(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Bo.fromData(o);case"/initia.reward.v1.MsgUpdateParams":return Dn.fromData(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return kn.fromData(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return xn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Mn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgMint":return In.fromData(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Sn.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 Bn.fromData(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return On.fromData(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Io.fromData(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return So.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return nr.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return sr.fromData(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return ir.fromData(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return ar.fromData(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return cr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return ur.fromData(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return mr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return dr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return lr.fromData(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return pr.fromData(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return hr.fromData(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return fr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return gr.fromData(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return yr.fromData(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return _r.fromData(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return vr.fromData(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return wr.fromData(o)}}i.fromData=e;function r(o){switch(o.typeUrl){case"/sdk.auction.v1.MsgAuctionBid":return He.unpackAny(o);case"/sdk.auction.v1.MsgUpdateParams":return ze.unpackAny(o);case"/cosmos.auth.v1beta1.MsgUpdateParams":return Ve.unpackAny(o);case"/cosmos.authz.v1beta1.MsgGrant":return Pr.unpackAny(o);case"/cosmos.authz.v1beta1.MsgRevoke":return br.unpackAny(o);case"/cosmos.authz.v1beta1.MsgExec":return Dr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSend":return kr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgMultiSend":return bt.unpackAny(o);case"/cosmos.bank.v1beta1.MsgUpdateParams":return xr.unpackAny(o);case"/cosmos.bank.v1beta1.MsgSetSendEnabled":return Mr.unpackAny(o);case"/initia.bank.v1.MsgSetDenomMetadata":return Ir.unpackAny(o);case"/celestia.blob.v1.MsgPayForBlobs":return Ks.unpackAny(o);case"/cosmos.consensus.v1.MsgUpdateParams":return Sr.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 Br.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":return Or.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgFundCommunityPool":return Nr.unpackAny(o);case"/initia.distribution.v1.MsgUpdateParams":return Tr.unpackAny(o);case"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend":return Fr.unpackAny(o);case"/initia.distribution.v1.MsgDepositValidatorRewardsPool":return Rr.unpackAny(o);case"/cosmos.evidence.v1beta1.MsgSubmitEvidence":return $r.unpackAny(o);case"/minievm.evm.v1.MsgCreate":return Lr.unpackAny(o);case"/minievm.evm.v1.MsgCreate2":return Hr.unpackAny(o);case"/minievm.evm.v1.MsgCall":return zr.unpackAny(o);case"/minievm.evm.v1.MsgUpdateParams":return Vr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgGrantAllowance":return Gr.unpackAny(o);case"/cosmos.feegrant.v1beta1.MsgRevokeAllowance":return Wr.unpackAny(o);case"/noble.forwarding.v1.MsgRegisterAccount":return jr.unpackAny(o);case"/noble.forwarding.v1.MsgClearAccount":return Jr.unpackAny(o);case"/cosmos.gov.v1.MsgCancelProposal":return Zr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgDeposit":return Yr.unpackAny(o);case"/cosmos.gov.v1.MsgDeposit":return Xr.unpackAny(o);case"/cosmos.gov.v1beta1.MsgSubmitProposal":return ro.unpackAny(o);case"/cosmos.gov.v1.MsgSubmitProposal":return oo.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVote":return de.unpackAny(o);case"/cosmos.gov.v1.MsgVote":return le.unpackAny(o);case"/cosmos.gov.v1beta1.MsgVoteWeighted":return no.unpackAny(o);case"/cosmos.gov.v1.MsgVoteWeighted":return so.unpackAny(o);case"/initia.gov.v1.MsgUpdateParams":return io.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroup":return ao.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupPolicy":return mo.unpackAny(o);case"/cosmos.group.v1.MsgCreateGroupWithPolicy":return lo.unpackAny(o);case"/cosmos.group.v1.MsgExec":return po.unpackAny(o);case"/cosmos.group.v1.MsgLeaveGroup":return ho.unpackAny(o);case"/cosmos.group.v1.MsgSubmitProposal":return he.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupAdmin":return fo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMembers":return yo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupMetadata":return _o.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin":return vo.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy":return go.unpackAny(o);case"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata":return wo.unpackAny(o);case"/cosmos.group.v1.MsgVote":return pe.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFee":return Ws.unpackAny(o);case"/ibc.applications.fee.v1.MsgPayPacketFeeAsync":return js.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee":return Zs.unpackAny(o);case"/ibc.applications.fee.v1.MsgRegisterPayee":return Js.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateACL":return Po.unpackAny(o);case"/initia.ibchooks.v1.MsgUpdateParams":return bo.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgTransfer":return Do.unpackAny(o);case"/ibc.applications.nft_transfer.v1.MsgUpdateParams":return ko.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdateAdmin":return xo.unpackAny(o);case"/ibc.applications.perm.v1.MsgUpdatePermissionedRelayers":return Mo.unpackAny(o);case"/ibc.applications.transfer.v1.MsgTransfer":return Ar.unpackAny(o);case"/ibc.applications.transfer.v1.MsgUpdateParams":return zs.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenInit":return Qs.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenTry":return mi.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenConfirm":return di.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelOpenAck":return li.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseInit":return pi.unpackAny(o);case"/ibc.core.channel.v1.MsgChannelCloseConfirm":return hi.unpackAny(o);case"/ibc.core.channel.v1.MsgRecvPacket":return fi.unpackAny(o);case"/ibc.core.channel.v1.MsgAcknowledgement":return gi.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeout":return yi.unpackAny(o);case"/ibc.core.channel.v1.MsgTimeoutOnClose":return _i.unpackAny(o);case"/ibc.core.channel.v1.MsgUpdateParams":return vi.unpackAny(o);case"/ibc.core.client.v1.MsgCreateClient":return ti.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateClient":return ei.unpackAny(o);case"/ibc.core.client.v1.MsgUpgradeClient":return ri.unpackAny(o);case"/ibc.core.client.v1.MsgSubmitMisbehaviour":return oi.unpackAny(o);case"/ibc.core.client.v1.MsgRecoverClient":return ni.unpackAny(o);case"/ibc.core.client.v1.MsgIBCSoftwareUpgrade":return si.unpackAny(o);case"/ibc.core.client.v1.MsgUpdateParams":return ii.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenInit":return Ji.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenTry":return Zi.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenConfirm":return Yi.unpackAny(o);case"/ibc.core.connection.v1.MsgConnectionOpenAck":return Xi.unpackAny(o);case"/ibc.core.connection.v1.MsgUpdateParams":return Qi.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 Oo.unpackAny(o);case"/connect.marketmap.v2.MsgUpdateMarkets":return No.unpackAny(o);case"/connect.marketmap.v2.MsgUpsertMarkets":return To.unpackAny(o);case"/connect.marketmap.v2.MsgRemoveMarketAuthorities":return Fo.unpackAny(o);case"/connect.marketmap.v2.MsgParams":return Ro.unpackAny(o);case"/initia.move.v1.MsgPublish":return fe.unpackAny(o);case"/initia.move.v1.MsgExecute":return qo.unpackAny(o);case"/initia.move.v1.MsgExecuteJSON":return $o.unpackAny(o);case"/initia.move.v1.MsgScript":return Lo.unpackAny(o);case"/initia.move.v1.MsgScriptJSON":return Ho.unpackAny(o);case"/initia.move.v1.MsgUpdateParams":return zo.unpackAny(o);case"/initia.move.v1.MsgWhitelist":return Vo.unpackAny(o);case"/initia.move.v1.MsgDelist":return Ko.unpackAny(o);case"/initia.move.v1.MsgGovExecute":return Go.unpackAny(o);case"/initia.move.v1.MsgGovExecuteJSON":return Wo.unpackAny(o);case"/initia.move.v1.MsgGovPublish":return ge.unpackAny(o);case"/initia.move.v1.MsgGovScript":return jo.unpackAny(o);case"/initia.move.v1.MsgGovScriptJSON":return Jo.unpackAny(o);case"/initia.mstaking.v1.MsgDelegate":return Zo.unpackAny(o);case"/initia.mstaking.v1.MsgUndelegate":return Yo.unpackAny(o);case"/initia.mstaking.v1.MsgBeginRedelegate":return Xo.unpackAny(o);case"/initia.mstaking.v1.MsgCreateValidator":return Qo.unpackAny(o);case"/initia.mstaking.v1.MsgEditValidator":return ye.unpackAny(o);case"/initia.mstaking.v1.MsgCancelUnbondingDelegation":return tn.unpackAny(o);case"/initia.mstaking.v1.MsgUpdateParams":return en.unpackAny(o);case"/opinit.opchild.v1.MsgAddValidator":return rn.unpackAny(o);case"/opinit.opchild.v1.MsgRemoveValidator":return on.unpackAny(o);case"/opinit.opchild.v1.MsgFinalizeTokenDeposit":return nn.unpackAny(o);case"/opinit.opchild.v1.MsgInitiateTokenWithdrawal":return sn.unpackAny(o);case"/opinit.opchild.v1.MsgExecuteMessages":return an.unpackAny(o);case"/opinit.opchild.v1.MsgSpendFeePool":return cn.unpackAny(o);case"/opinit.opchild.v1.MsgSetBridgeInfo":return An.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateOracle":return Pn.unpackAny(o);case"/opinit.opchild.v1.MsgUpdateParams":return bn.unpackAny(o);case"/opinit.ophost.v1.MsgRecordBatch":return un.unpackAny(o);case"/opinit.ophost.v1.MsgCreateBridge":return mn.unpackAny(o);case"/opinit.ophost.v1.MsgProposeOutput":return dn.unpackAny(o);case"/opinit.ophost.v1.MsgDeleteOutput":return ln.unpackAny(o);case"/opinit.ophost.v1.MsgInitiateTokenDeposit":return pn.unpackAny(o);case"/opinit.ophost.v1.MsgFinalizeTokenWithdrawal":return hn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateProposer":return fn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateChallenger":return gn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateBatchInfo":return yn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateOracleConfig":return _n.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateMetadata":return vn.unpackAny(o);case"/opinit.ophost.v1.MsgUpdateParams":return wn.unpackAny(o);case"/connect.oracle.v2.MsgAddCurrencyPairs":return Eo.unpackAny(o);case"/connect.oracle.v2.MsgRemoveCurrencyPairs":return Bo.unpackAny(o);case"/initia.reward.v1.MsgUpdateParams":return Dn.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUnjail":return kn.unpackAny(o);case"/cosmos.slashing.v1beta1.MsgUpdateParams":return xn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgCreateDenom":return Mn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgMint":return In.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgBurn":return Sn.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 Bn.unpackAny(o);case"/miniwasm.tokenfactory.v1.MsgUpdateParams":return On.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":return Io.unpackAny(o);case"/cosmos.upgrade.v1beta1.MsgCancelUpgrade":return So.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreCode":return nr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract":return sr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgInstantiateContract2":return ir.unpackAny(o);case"/cosmwasm.wasm.v1.MsgExecuteContract":return ar.unpackAny(o);case"/cosmwasm.wasm.v1.MsgMigrateContract":return cr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateAdmin":return ur.unpackAny(o);case"/cosmwasm.wasm.v1.MsgClearAdmin":return mr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":return dr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateParams":return lr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgSudoContract":return pr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgPinCodes":return hr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUnpinCodes":return fr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":return gr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":return yr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":return _r.unpackAny(o);case"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":return vr.unpackAny(o);case"/cosmwasm.wasm.v1.MsgUpdateContractLabel":return wr.unpackAny(o);default:throw new Error(`not supported msg ${o.typeUrl}`)}}i.fromProto=r})(exports.Msg||(exports.Msg={}));function ia(i,t,e){try{return et.bech32.decode(t).prefix===i&&t.length==e}catch{return!1}}exports.AccAddress=void 0;(i=>{function t(s){return ia("init",s,43)||ia("init",s,63)}i.validate=t;function e(s){const a=et.bech32.decode(s);return et.bech32.encode("init",a.words)}i.fromValAddress=e;function r(s){const a=et.bech32.decode(s);return"0x"+Buffer.from(et.bech32.fromWords(a.words)).toString("hex")}i.toHex=r;function o(s){const a=s.replace(/^0x0+|^0x|^0+(?!x)/,"");return a.length<=40?et.bech32.encode("init",et.bech32.toWords(Buffer.from(a.padStart(40,"0"),"hex"))):et.bech32.encode("init",et.bech32.toWords(Buffer.from(a.padStart(64,"0"),"hex")))}i.fromHex=o;function n(s){const a=et.bech32.decode(s);return Buffer.from(et.bech32.fromWords(a.words))}i.toBuffer=n})(exports.AccAddress||(exports.AccAddress={}));exports.AccPubKey=void 0;(i=>{function t(r){return ia("initpub",r,46)}i.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initpub",o.words)}i.fromAccAddress=e})(exports.AccPubKey||(exports.AccPubKey={}));exports.ValAddress=void 0;(i=>{function t(r){return ia("initvaloper",r,50)}i.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initvaloper",o.words)}i.fromAccAddress=e})(exports.ValAddress||(exports.ValAddress={}));exports.ValPubKey=void 0;(i=>{function t(r){return ia("initvaloperpub",r,53)}i.validate=t;function e(r){const o=et.bech32.decode(r);return et.bech32.encode("initvaloperpub",o.words)}i.fromValAddress=e})(exports.ValPubKey||(exports.ValPubKey={}));exports.ValConsAddress=void 0;(i=>{function t(e){return ia("initvalcons",e,50)}i.validate=t})(exports.ValConsAddress||(exports.ValConsAddress={}));class Ad{constructor(t){_(this,"bitarray");_(this,"signatures");this.multisig_pubkey=t;const e=t.pubkeys.length;this.bitarray=Ln.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 Nu 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:a}}=this;return{chain_id:t,account_number:e.toFixed(),sequence:r.toFixed(),timeout_height:s&&s!==0?s.toFixed():void 0,fee:a.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 aa{constructor(t,e,r,o,n,s,a,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=a,this.timestamp=c,this.events=d,this.code=g,this.codespace=v}static fromProto(t){return new aa(Number(t.height),t.txhash,t.rawLog,t.logs.map(e=>Pi.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 aa(parseInt(t.height),t.txhash,t.raw_log,t.logs.map(e=>Pi.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;(i=>{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}i.parse=t})(exports.EventsByType||(exports.EventsByType={}));class Pi{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 Pi(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 Pi(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 ld.ABCIMessageLog.fromPartial({msgIndex:t,log:e,events:r})}}class Tu 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 Oe.fromData(r)}async parameters(t={}){return this.c.get("/cosmos/auth/v1beta1/params",t).then(e=>Rn.fromData(e.params))}}class Fu 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(ve.fromData),n.pagination])}async granter(t,e={}){return this.c.get(`/cosmos/authz/v1beta1/grants/granter/${t}`,e).then(r=>[r.grants.map(o=>ve.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=>ve.fromData(o)),r.pagination])}}class Ru 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=>I.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=>$n.fromData(e.params))}}class qu 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=>zn.fromData(e.params))}}class $u 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 Lu 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 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=>Vn.fromData(e.params))}}class Hu 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 zu 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:I.fromData(r.total_forwarded)}))}}class Vu extends Q{async proposals(t={}){return this.c.get("/initia/gov/v1/proposals",t).then(e=>[e.proposals.map(Ne.fromData),e.pagination])}async proposal(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}`,e).then(r=>Ne.fromData(r.proposal))}async deposits(t,e={}){return this.c.get(`/cosmos/gov/v1/proposals/${t}/deposits`,e).then(r=>[r.deposits.map(o=>Gi.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=>vs.fromData(o)),r.pagination])}async tally(t,e={}){return this.c.get(`/initia/gov/v1/proposals/${t}/tally`,e).then(r=>Kn.fromData(r.tally_result))}async parameters(t={}){return this.c.get("/initia/gov/v1/params",t).then(e=>Gn.fromData(e.params))}async emergencyProposals(t={}){return this.c.get("/initia/gov/v1/emergency_proposals",t).then(e=>[e.proposals.map(r=>Ne.fromData(r)),e.pagination])}}class Ku extends Q{async groupInfo(t){return this.c.get(`/cosmos/group/v1/group_info/${t}`).then(e=>Ao.fromData(e.info))}async groupPolicyInfo(t){return this.c.get(`/cosmos/group/v1/group_policy_info/${t}`).then(e=>As.fromData(e.info))}async groupMembers(t,e={}){return this.c.get(`/cosmos/group/v1/group_members/${t}`,e).then(r=>[r.members.map(Wi.fromData),r.pagination])}async groupsByAdmin(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_admin/${t}`,e).then(r=>[r.groups.map(Ao.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(As.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(As.fromData),r.pagination])}async proposal(t){return this.c.get(`/cosmos/group/v1/proposal/${t}`).then(e=>Wn.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(Wn.fromData),r.pagination])}async voteByProposalVoter(t,e){return this.c.get(`/cosmos/group/v1/vote_by_proposal_voter/${t}/${e}`).then(r=>Te.fromData(r.vote))}async votesByProposal(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_proposal/${t}`,e).then(r=>[r.votes.map(Te.fromData),r.pagination])}async votesByVoter(t,e={}){return this.c.get(`/cosmos/group/v1/votes_by_voter/${t}`,e).then(r=>[r.votes.map(Te.fromData),r.pagination])}async groupsByMember(t,e={}){return this.c.get(`/cosmos/group/v1/groups_by_member/${t}`,e).then(r=>[r.groups.map(Ao.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(Ao.fromData),e.pagination])}}class Gu extends Q{async channels(t={}){return this.c.get("/ibc/core/channel/v1/channels",t).then(e=>[e.channels.map(te.fromData),e.pagination])}async port(t,e,r={}){return this.c.get(`/ibc/core/channel/v1/channels/${t}/ports/${e}`,r).then(o=>({channel:te.fromData(o.channel),proof:o.proof,proof_height:C.fromData(o.proof_height)}))}async connections(t={}){return this.c.get("/ibc/core/connection/v1/connections",t).then(e=>[e.connections.map(ci.fromData),e.pagination])}async connection(t,e={}){return this.c.get(`/ibc/core/connection/v1/connections/${t}`,e).then(r=>ci.fromData(r.connection))}async connectionChannels(t,e={}){return this.c.get(`/ibc/core/channel/v1/connections/${t}/channels`,e).then(r=>[r.channels.map(te.fromData),C.fromData(r.height),r.pagination])}async parameters(t={}){return this.c.get("/ibc/core/client/v1/params",t).then(e=>bs.fromData(e.params))}async clientStates(t={}){return this.c.get("/ibc/core/client/v1/client_states",t).then(e=>[e.client_states.map(ji.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:C.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(C.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 Wu extends Q{async acls(t={}){return this.c.get("/initia/ibchooks/v1/acls",t).then(e=>[e.acls.map(Ys.fromData),e.pagination])}async acl(t,e={}){return this.c.get(`/initia/ibchooks/v1/acls/${t}`,e).then(r=>Ys.fromData(r.acl))}async parameters(t={}){return this.c.get("/initia/ibchooks/v1/params",t).then(e=>jn.fromData(e.params))}}class ju extends Q{async classTrace(t){return this.c.get(`/ibc/apps/nft_transfer/v1/class_traces/${t}`).then(e=>Xs.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(Xs.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=>Jn.fromData(e.params))}}class Ju extends Q{async denomTrace(t){return this.c.get(`/ibc/apps/transfer/v1/denom_traces/${t}`).then(e=>Vs.fromData(e.denom_trace))}async denomTraces(t={}){return this.c.get("/ibc/apps/transfer/v1/denom_traces",t).then(e=>[e.denom_traces.map(Vs.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=>ds.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 Zu 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 Yu 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 Xu 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=>Zn.fromData(e.params))}}class Qu extends Q{async modules(t,e={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules`,e).then(r=>[r.modules.map(Xn.fromData),r.pagination])}async module(t,e,r={}){return this.c.get(`/initia/move/v1/accounts/${t}/modules/${e}`,r).then(o=>Xn.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=>Yn.fromData(e.params))}}class tm 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=>[[Ss.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(Ss.fromData),o.pagination]);if(e!==void 0)return this.c.get(`/initia/mstaking/v1/validators/${e}/delegations`,r).then(o=>[o.delegation_responses.map(Ss.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=>[[Lt.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(Lt.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(Lt.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(ae.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=>Qn.fromData(e.params))}}class em extends Q{async validators(t={}){return this.c.get("/opinit/opchild/v1/validators",t).then(e=>[e.validators.map(wi.fromData),e.pagination])}async validator(t,e={}){return this.c.get(`/opinit/opchild/v1/validator/${t}`,e).then(r=>wi.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=>es.fromData(e.params))}}class rm 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:Me.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:Me.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:Me.fromData(o.output_proposal)}))}async withdrawalClaimed(t,e,r={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/withdrawals/claimed/by_hash`,{...r,withdrawal_hash:Buffer.from(e,"hex").toString("base64")}).then(o=>o.claimed)}async nextL1Sequence(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/next_l1_sequence`,e).then(r=>parseInt(r.next_l1_sequence))}async batchInfos(t,e={}){return this.c.get(`/opinit/ophost/v1/bridges/${t}/batch_infos`,e).then(r=>[r.batch_infos.map(o=>ea.fromData(o)),r.pagination])}async parameters(t={}){return this.c.get("/opinit/ophost/v1/params",t).then(e=>ts.fromData(e.params))}}class om extends Q{async currencyPairs(t={}){return this.c.get("/connect/oracle/v2/get_all_tickers",t).then(e=>e.currency_pairs.map(Bt.fromData))}async price(t,e={}){return this.c.get("/connect/oracle/v2/get_price",{...e,currency_pair:t.toString()}).then(r=>ta.fromData(r.price))}}class nm 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=>rs.fromData(e.params))}}class sm extends Q{async signingInfos(t={}){return this.c.get("/cosmos/slashing/v1beta1/signing_infos",t).then(e=>[e.info.map(Ai.fromData),e.pagination])}async signingInfo(t,e={}){return this.c.get(`/cosmos/slashing/v1beta1/signing_infos/${t}`,e).then(r=>Ai.fromData(r.val_signing_info))}async parameters(t={}){return this.c.get("/cosmos/slashing/v1beta1/params",t).then(e=>os.fromData(e.params))}}class im 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 am 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=>ns.fromData(e.params))}}const du=i=>Ce.bcs.bytes(32,i).transform({input:t=>{if(t.startsWith("init1")&&(t=exports.AccAddress.toHex(t)),t.startsWith("0x")&&(t=t.slice(2).padStart(64,"0")),!t.match(/[0-9a-f]+$/i))throw new Error("invalid address");return Buffer.from(t,"hex")},output:t=>`0x${Buffer.from(t).toString("hex")}`}),Pd={address:du,object:du,fixed_point32:i=>Ce.bcs.u64(i).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:i=>Ce.bcs.u128(i).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:i=>Ce.bcs.u128(i).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:i=>Ce.bcs.u256(i).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:i=>Ce.bcs.vector(Ce.bcs.u8(i)).transform({input:t=>Ic(BigInt(t)),output:t=>Sc(t)}),bigdecimal:i=>Ce.bcs.vector(Ce.bcs.u8(i)).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=Sc(t).toString();return F(e).div(new At.BigNumber("1000000000000000000")).toNumber()}})},bd={...Ce.bcs,...Pd};function Ic(i){const t=[];for(;i>0;)t.push(Number(i%BigInt(256))),i=i/BigInt(256);return new Uint8Array(t)}function Sc(i){let t=0n;for(;i.length>0;)t=t*256n+BigInt(i.pop());return t}function Dd(i){return i.code!==void 0&&i.code!==0&&i.code!=="0"}class tc{constructor(t,e){this.gas_info=t,this.result=e}static fromData(t){return new tc({gas_wanted:parseInt(t.gas_info.gas_wanted),gas_used:parseInt(t.gas_info.gas_used)},t.result)}}class ra 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=>aa.fromData(r.tx_response))}async create(t,e){let{fee:r}=e;const{msgs:o,memo:n,timeoutHeight:s}=e,a=[];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())}a.push({sequenceNumber:d,publicKey:g})}return r===void 0&&(r=await this.rest.tx.estimateFee(a,e)),new Dt(new Hn(o,n??"",s??0),new be([],r),[])}async txInfosByHeight(t){const e=await this.rest.tendermint.blockInfo(t),{txs:r}=e.block.data;if(r){const o=r.map(s=>Ga(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,a;if(r&&(a=new l(r),n)){const b=a.filter(k=>n.includes(k.denom));b.toArray().length>0&&(a=b)}const c=new Hn(e.msgs,e.memo??""),d=new be([],new Pe(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=a?a.mul(s).toIntCeilCoins():"0uinit";return new Pe(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 be([],new Pe(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:ra.encode(o)}).then(s=>tc.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=ra.encode(t);return Ga(e)}async _broadcast(t,e){const r=t instanceof Dt?ra.encode(t):t;return await this.c.post("/cosmos/tx/v1beta1/txs",{tx_bytes:r,mode:e})}async broadcast(t,e=3e4){const{tx_response:o}=await this._broadcast(t,"BROADCAST_MODE_SYNC");if(o.code!=null&&o.code!=0)return{height: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(a=>setTimeout(a,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=>Pi.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??"=",a=n.key==="tx.height"?`${n.value}`:`'${n.value}'`,c=s==="EXISTS"?`${n.key} ${s}`:`${n.key} ${s} ${a}`;return o?`${o} AND ${c}`:c},"");return r&&e.append("query",r),delete t.query,Object.entries(t).forEach(o=>{e.append(o[0],o[1].toString())}),this.c.getRaw("/cosmos/tx/v1beta1/txs",e).then(o=>({txs:o.tx_responses.map(n=>aa.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}`,a=[{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 E=k.attributes.find(N=>N.key==="type_tag");return E&&E.value.startsWith(s)}),{txs:d,total:g}=await this.search({query:a}),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),E=await Promise.all(k.map(async N=>this.search({query:a,page:N}).then(K=>K.txs.flatMap(Y=>c(Y)))));n.push(...E.flat())}return n}}class cm 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?ke.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 um 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:$s.fromData(r.contract_info.created),ibc_port_id:r.contract_info.ibc_port_id,extension:r.contract_info.extension}))}async contractHistory(t,e={}){return this.c.get(`/cosmwasm/wasm/v1/contract/${t}/history`,e).then(r=>[r.entries.map(o=>({operation:Ht.contractCodeHistoryOperationTypeFromJSON(o.operation),code_id:parseInt(o.code_id),updated:$s.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:it.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:it.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=>qn.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 mm{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 kd={gasAdjustment:"1.75"},lu={default:{uinit:.15}};class dm{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={...kd,gasPrices:((e==null?void 0:e.chainId)&&lu[e.chainId])??lu.default,...e},this.apiRequester=r??new Uu(this.URL),this.auction=new Eu(this.apiRequester),this.auth=new Tu(this.apiRequester),this.authz=new Fu(this.apiRequester),this.bank=new Ru(this.apiRequester),this.distribution=new qu(this.apiRequester),this.evidence=new $u(this.apiRequester),this.evm=new Lu(this.apiRequester),this.feeGrant=new Hu(this.apiRequester),this.forwarding=new zu(this.apiRequester),this.gov=new Vu(this.apiRequester),this.group=new Ku(this.apiRequester),this.ibc=new Gu(this.apiRequester),this.ibcHooks=new Wu(this.apiRequester),this.ibcNft=new ju(this.apiRequester),this.ibcTransfer=new Ju(this.apiRequester),this.ibcPerm=new Zu(this.apiRequester),this.interTx=new Yu(this.apiRequester),this.marketmap=new Xu(this.apiRequester),this.move=new Qu(this.apiRequester),this.mstaking=new tm(this.apiRequester),this.opchild=new em(this.apiRequester),this.ophost=new rm(this.apiRequester),this.oracle=new om(this.apiRequester),this.reward=new nm(this.apiRequester),this.slashing=new sm(this.apiRequester),this.tendermint=new im(this.apiRequester),this.tokenfactory=new am(this.apiRequester),this.tx=new ra(this),this.upgrade=new cm(this.apiRequester),this.wasm=new um(this.apiRequester)}wallet(t){return new mm(this,t)}}class xd extends dm{}function Md(i){if(i.__esModule)return i;var t=i.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(i).forEach(function(r){var o=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return i[r]}})}),e}var Nc={exports:{}},oa=typeof Reflect=="object"?Reflect:null,pu=oa&&typeof oa.apply=="function"?oa.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Ha;oa&&typeof oa.ownKeys=="function"?Ha=oa.ownKeys:Object.getOwnPropertySymbols?Ha=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ha=function(t){return Object.getOwnPropertyNames(t)};function Id(i){console&&console.warn&&console.warn(i)}var lm=Number.isNaN||function(t){return t!==t};function nt(){nt.init.call(this)}Nc.exports=nt;Nc.exports.once=Ed;nt.EventEmitter=nt;nt.prototype._events=void 0;nt.prototype._eventsCount=0;nt.prototype._maxListeners=void 0;var hu=10;function ec(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(nt,"defaultMaxListeners",{enumerable:!0,get:function(){return hu},set:function(i){if(typeof i!="number"||i<0||lm(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");hu=i}});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||lm(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 pm(i){return i._maxListeners===void 0?nt.defaultMaxListeners:i._maxListeners}nt.prototype.getMaxListeners=function(){return pm(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 a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=n[t];if(c===void 0)return!1;if(typeof c=="function")pu(c,this,e);else for(var d=c.length,g=_m(c,d),r=0;r<d;++r)pu(g[r],this,e);return!0};function hm(i,t,e,r){var o,n,s;if(ec(e),n=i._events,n===void 0?(n=i._events=Object.create(null),i._eventsCount=0):(n.newListener!==void 0&&(i.emit("newListener",t,e.listener?e.listener:e),n=i._events),s=n[t]),s===void 0)s=n[t]=e,++i._eventsCount;else if(typeof s=="function"?s=n[t]=r?[e,s]:[s,e]:r?s.unshift(e):s.push(e),o=pm(i),o>0&&s.length>o&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=i,a.type=t,a.count=s.length,Id(a)}return i}nt.prototype.addListener=function(t,e){return hm(this,t,e,!1)};nt.prototype.on=nt.prototype.addListener;nt.prototype.prependListener=function(t,e){return hm(this,t,e,!0)};function Sd(){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 fm(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},o=Sd.bind(r);return o.listener=e,r.wrapFn=o,o}nt.prototype.once=function(t,e){return ec(e),this.on(t,fm(this,t,e)),this};nt.prototype.prependOnceListener=function(t,e){return ec(e),this.prependListener(t,fm(this,t,e)),this};nt.prototype.removeListener=function(t,e){var r,o,n,s,a;if(ec(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){a=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,a||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 gm(i,t,e){var r=i._events;if(r===void 0)return[];var o=r[t];return o===void 0?[]:typeof o=="function"?e?[o.listener||o]:[o]:e?Cd(o):_m(o,o.length)}nt.prototype.listeners=function(t){return gm(this,t,!0)};nt.prototype.rawListeners=function(t){return gm(this,t,!1)};nt.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):ym.call(i,t)};nt.prototype.listenerCount=ym;function ym(i){var t=this._events;if(t!==void 0){var e=t[i];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}nt.prototype.eventNames=function(){return this._eventsCount>0?Ha(this._events):[]};function _m(i,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=i[r];return e}function Ud(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function Cd(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function Ed(i,t){return new Promise(function(e,r){function o(s){i.removeListener(t,n),r(s)}function n(){typeof i.removeListener=="function"&&i.removeListener("error",o),e([].slice.call(arguments))}vm(i,t,n,{once:!0}),t!=="error"&&Bd(i,o,{once:!0})})}function Bd(i,t,e){typeof i.on=="function"&&vm(i,"error",t,e)}function vm(i,t,e,r){if(typeof i.on=="function")r.once?i.once(t,e):i.on(t,e);else if(typeof i.addEventListener=="function")i.addEventListener(t,function o(n){r.once&&i.removeEventListener(t,o),e(n)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}var Od=Nc.exports;const fu=i=>i.replace(/'/g,"\\'");function Nd(i){const t=[];for(const e of Object.keys(i)){let r;const o=i[e];if(Array.isArray(o))switch(o[0]){case">":case"<":case"<=":case">=":typeof o[1]!="number"?r=`${e}${o[0]}${o[1].toISOString()}`:r=`${e}${o[0]}${o[1]}`;break;case"CONTAINS":r=`${e} CONTAINS '${fu(o[1])}'`;break;case"EXISTS":r=`${e} EXISTS`;break}else switch(typeof o){case"number":r=`${e}=${o}`;break;case"string":r=`${e}='${fu(o)}'`;break;default:r=`${e}=${o.toISOString()}`}t.push(r)}return t.join(" AND ")}class Td extends Od.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 pd(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=Nd({"tm.event":e,...r}),this.callback=o}subscribeTx(e,r){const o=n=>(n.value.TxResult.txhash=Ga(n.value.TxResult.tx),r(n));this.subscribe("Tx",e,o)}}const Fd={},Rd=Object.freeze(Object.defineProperty({__proto__:null,default:Fd},Symbol.toStringTag,{value:"Module"})),ua=85,Uc=250,qd="CSM",ma={GET_VERSION:0,INS_PUBLIC_KEY_SECP256K1:1,SIGN_SECP256K1:2,GET_ADDR_SECP256K1:4},za={INIT:0,ADD:1,LAST:2},Tc={ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},bi={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 Di(i){return i in Cc?Cc[i]:`Unknown Status Code: ${i}`}function $d(i){return typeof i=="object"&&i!==null&&!(i instanceof Array)&&!(i instanceof Date)}function Bs(i){if(i){if($d(i)){if(Object.prototype.hasOwnProperty.call(i,"statusCode"))return{return_code:i.statusCode,error_message:Di(i.statusCode)};if(Object.prototype.hasOwnProperty.call(i,"return_code")&&Object.prototype.hasOwnProperty.call(i,"error_message"))return i}return{return_code:65535,error_message:i.toString()}}return{return_code:65535,error_message:i.toString()}}function Va(i){if((i==null?void 0:i.length)!==5)throw new TypeError("Invalid path.");const t=Buffer.alloc(20);return t.writeUInt32LE(2147483648+i[0],0),t.writeUInt32LE(2147483648+i[1],4),t.writeUInt32LE(2147483648+i[2],8),t.writeUInt32LE(i[3],12),t.writeUInt32LE(i[4],16),t}async function Ld(i){return i.send(ua,ma.GET_VERSION,0,0).then(t=>{const e=t.slice(-2),r=e[0]*256+e[1];let o=0;return t.length>=9&&(o=(t[5]<<24)+(t[6]<<16)+(t[7]<<8)+(t[8]<<0)),{return_code:r,error_message:Di(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(Bs)}async function Hd(i){return i.send(176,1,0,0).then(t=>{const e=t.slice(-2);let r=e[0]*256+e[1],o,n="err",s="err",a=0,c=0;if(t[0]!==1)o="response format ID not recognized",r=36865;else{o="No errors";const d=t[1];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,a=b,c=t[g]}return{return_code:r,error_message:o,app_name:n,app_version:s,flag_len:a,flags_value:c,flag_recovery:(c&1)!==0,flag_signed_mcu_code:(c&2)!==0,flag_onboarded:(c&4)!==0,flag_pin_validated:(c&128)!==0}}).catch(Bs)}async function zd(i){return i.send(224,1,0,0,Buffer.from([]),[bi.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 a=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:Di(r),target_id:o,se_version:a,flag:d,mcu_version:b}}).catch(Bs)}async function Vd(i,t){return i.send(ua,ma.GET_ADDR_SECP256K1,0,0,t,[bi.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:Di(o)}}).catch(Bs)}async function Kd(i,t){return i.send(ua,ma.GET_ADDR_SECP256K1,Tc.ONLY_RETRIEVE,0,t,[bi.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:Di(o)}}).catch(Bs)}async function Gd(i,t){return i.send(ua,ma.GET_ADDR_SECP256K1,Tc.SHOW_ADDRESS_IN_DEVICE,0,t,[bi.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:Di(o)}}).catch(Bs)}function Wd(i,t){const e=Va(i),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 gu(i,t,e,r){let o=za.ADD;return t===1&&(o=za.INIT),t===e&&(o=za.LAST),i.send(ua,ma.SIGN_SECP256K1,o,0,r,[bi.NoError,27012,27264]).then(n=>{const s=n.slice(-2),a=s[0]*256+s[1];let c=Di(a);(a===27264||a===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:a,error_message:c}}).catch(Bs)}async function jd(i,t,e){const r=Wd(t,e);return gu(i,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 gu(i,1+s,r.length,r[s]),n.return_code===bi.NoError);s+=1);return{return_code:n.return_code,error_message:n.error_message,signature:n.signature}}).catch(Bs)}const Jd="Initia",Zd="Cosmos";class ka{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 hd().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===Jd&&this.version.major===1||this.info.app_name===Zd&&this.version.major===2)return}return{return_code:25600,error_message:"App Version is not supported"}}async initialize(){return Hd(this.transport).then(t=>(this.info=t,Ld(this.transport))).then(t=>(this.version=t,this.validateCompatibility()))}getInfo(){return this.info}getVersion(){return this.version}getDeviceInfo(){return zd(this.transport)}getPublicKey(t){const e=Va(t),r=Buffer.concat([ka.serializeHRP("init"),e]);return Vd(this.transport,r)}getAddressAndPubKey(t,e){const r=Va(t),o=Buffer.concat([ka.serializeHRP(e),r]);return Kd(this.transport,o)}showAddressAndPubKey(t,e){const r=Va(t),o=Buffer.concat([ka.serializeHRP(e),r]);return Gd(this.transport,o)}sign(t,e){return jd(this.transport,t,e)}}class Fc{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
+ `),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 be([],t.auth_info.fee),[]),o=new Nu(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={},wm={};const Yd=Md(Rd);(function(i){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(i,"__esModule",{value:!0}),i.utils=i.schnorr=i.verify=i.signSync=i.sign=i.getSharedSecret=i.recoverPublicKey=i.getPublicKey=i.Signature=i.Point=i.CURVE=void 0;const t=Yd,e=BigInt(0),r=BigInt(1),o=BigInt(2),n=BigInt(3),s=BigInt(8),a=Object.freeze({a:e,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:r,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});i.CURVE=a;const c=(h,m)=>(h+m/o)/m,d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(h){const{n:m}=a,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 U=x(h-M*p-T*w,m),$=x(-M*y-T*A,m);const G=U>D,W=$>D;if(G&&(U=m-U),W&&($=m-$),U>D||$>D)throw new Error("splitScalarEndo: Endomorphism failed, k="+h);return{k1neg:G,k1:U,k2neg:W,k2:$}}},g=32,v=32,b=32,k=g+1,E=2*g+1;function N(h){const{a:m,b:p}=a,y=x(h*h),w=x(y*h);return x(w+m*h+p)}const K=a.a===e;class Y extends Error{constructor(m){super(m)}}function tt(h){if(!(h instanceof S))throw new TypeError("JacobianPoint expected")}class S{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)?S.ZERO:new S(m.x,m.y,r)}static toAffineBatch(m){const p=Nm(m.map(y=>y.z));return m.map((y,w)=>y.toAffine(p[w]))}static normalizeZ(m){return S.toAffineBatch(m).map(S.fromAffine)}equals(m){tt(m);const{x:p,y,z:w}=this,{x:A,y:D,z:M}=m,T=x(w*w),U=x(M*M),$=x(p*U),G=x(A*T),W=x(x(y*M)*U),wt=x(x(D*w)*T);return $===G&&W===wt}negate(){return new S(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)),U=x(n*w),$=x(U*U),G=x($-o*T),W=x(U*(T-G)-s*D),wt=x(o*p*y);return new S(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),U=x(M*M),$=x(p*U),G=x(A*T),W=x(x(y*M)*U),wt=x(x(D*w)*T),yt=x(G-$),se=x(wt-W);if(yt===e)return se===e?this.double():S.ZERO;const Ui=x(yt*yt),Ci=x(yt*Ui),Ei=x($*Ui),Fa=x(se*se-Ci-o*Ei),uc=x(se*(Ei-Fa)-W*Ci),ha=x(w*M*yt);return new S(Fa,uc,ha)}subtract(m){return this.add(m.negate())}multiplyUnsafe(m){const p=S.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,U=p,$=this;for(;A>e||M>e;)A&r&&(T=T.add($)),M&r&&(U=U.add($)),$=$.double(),A>>=r,M>>=r;return w&&(T=T.negate()),D&&(U=U.negate()),U=new S(x(U.x*d.beta),U.y,U.z),T.add(U)}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(S.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=S.normalizeZ(w),ut.set(p,w)));let A=S.ZERO,D=S.BASE;const M=1+(K?128/y:256/y),T=2**(y-1),U=BigInt(2**y-1),$=2**y,G=BigInt(y);for(let W=0;W<M;W++){const wt=W*T;let yt=Number(m&U);m>>=G,yt>T&&(yt-=$,m+=r);const se=wt,Ui=wt+Math.abs(yt)-1,Ci=W%2!==0,Ei=yt<0;yt===0?D=D.add(ot(Ci,w[se])):A=A.add(ot(Ei,w[Ui]))}return{p:A,f:D}}multiply(m,p){let y=jc(m),w,A;if(K){const{k1neg:D,k1:M,k2neg:T,k2:U}=d.splitScalar(y);let{p:$,f:G}=this.wNAF(M,p),{p:W,f:wt}=this.wNAF(U,p);$=ot(D,$),W=ot(T,W),W=new S(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 S.normalizeZ([w,A])[0]}toAffine(m){const{x:p,y,z:w}=this,A=this.equals(S.ZERO);m==null&&(m=A?s:xi(w));const D=m,M=x(D*D),T=x(M*D),U=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(U,$)}}S.BASE=new S(a.Gx,a.Gy,r),S.ZERO=new S(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(!Oa(y))throw new Error("Point is not on curve");const w=N(y);let A=Om(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===E&&w===4)return this.fromUncompressedHex(p);throw new Error(`Point.fromHex: received invalid point. Expected 32-${k} compressed bytes or ${E} uncompressed bytes, not ${y}`)}static fromPrivateKey(m){return L.BASE.multiply(Fs(m))}static fromSignature(m,p,y){const{r:w,s:A}=Yc(p);if(![0,1,2,3].includes(y))throw new Error("Cannot recover: invalid recovery bit");const D=ac(Ue(m)),{n:M}=a,T=y===2||y===3?w+M:w,U=xi(T,M),$=x(-D*U,M),G=x(A*U,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 ne(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(!Oa(p)||!Oa(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 S.fromAffine(this).double().toAffine()}add(m){return S.fromAffine(this).add(S.fromAffine(m)).toAffine()}subtract(m){return this.add(m.negate())}multiply(m){return S.fromAffine(this).multiply(m,this).toAffine()}multiplyAndAddUnsafe(m,p,y){const w=S.fromAffine(this),A=p===e||p===r||this!==L.BASE?w.multiplyUnsafe(p):w.multiply(p),D=S.fromAffine(m).multiplyUnsafe(y),M=A.add(D);return M.equals(S.ZERO)?void 0:M.toAffine()}}i.Point=L,L.BASE=new L(a.Gx,a.Gy),L.ZERO=new L(e,e);function Ea(h){return Number.parseInt(h[0],16)>=8?"00"+h:h}function Ba(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}=Ba(h.subarray(2)),{data:y,left:w}=Ba(p);if(w.length)throw new Error(`Invalid signature: left bytes after parsing: ${O(w)}`);return{r:m,s:y}}class oe{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 oe(Ts(w.slice(0,64)),Ts(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:ne(m));return new oe(y,w)}static fromHex(m){return this.fromDER(m)}assertValidity(){const{r:m,s:p}=this;if(!Ii(m))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Ii(p))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const m=a.n>>r;return this.s>m}normalizeS(){return this.hasHighS()?new oe(this.r,x(-this.s,a.n)):this}toDERRawBytes(){return ne(this.toDERHex())}toDERHex(){const m=Ea(vt(this.s)),p=Ea(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 ne(this.toCompactHex())}toCompactHex(){return Z(this.r)+Z(this.s)}}i.Signature=oe;function Se(...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 at(h){const m=ne(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 Ts(h){if(typeof h!="string")throw new TypeError("hexToNumber: expected string, got "+typeof h);return BigInt(`0x${h}`)}function ne(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 Ts(O(h))}function Ue(h){return h instanceof Uint8Array?Uint8Array.from(h):ne(h)}function jc(h){if(typeof h=="number"&&Number.isSafeInteger(h)&&h>0)return BigInt(h);if(typeof h=="bigint"&&Ii(h))return h;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function x(h,m=a.P){const p=h%m;return p>=e?p:m+p}function Vt(h,m){const{P:p}=a;let y=h;for(;m-- >e;)y*=y,y%=p;return y}function Om(h){const{P:m}=a,p=BigInt(6),y=BigInt(11),w=BigInt(22),A=BigInt(23),D=BigInt(44),M=BigInt(88),T=h*h*h%m,U=T*T*h%m,$=Vt(U,n)*U%m,G=Vt($,n)*U%m,W=Vt(G,o)*T%m,wt=Vt(W,y)*W%m,yt=Vt(wt,w)*wt%m,se=Vt(yt,D)*yt%m,Ui=Vt(se,M)*se%m,Ci=Vt(Ui,D)*yt%m,Ei=Vt(Ci,n)*U%m,Fa=Vt(Ei,A)*wt%m,uc=Vt(Fa,p)*T%m,ha=Vt(uc,o);if(ha*ha%m!==h)throw new Error("Cannot find square root");return ha}function xi(h,m=a.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,U=w-A*M;y=p,p=T,w=A,A=U}if(y!==r)throw new Error("invert: does not exist");return x(w,m)}function Nm(h,m=a.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=xi(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 Tm(h){const m=h.length*8-v*8,p=xt(h);return m>0?p>>BigInt(m):p}function ac(h,m=!1){const p=Tm(h);if(m)return p;const{n:y}=a;return p>=y?p-y:p}let Mi,pa;class Jc{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 i.utils.hmacSha256(this.k,...m)}hmacSync(...m){return pa(this.k,...m)}checkSync(){if(typeof pa!="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 Se(...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 Se(...p)}}function Ii(h){return e<h&&h<a.n}function Oa(h){return e<h&&h<a.P}function Zc(h,m,p,y=!0){const{n:w}=a,A=ac(h,!0);if(!Ii(A))return;const D=xi(A,w),M=L.BASE.multiply(A),T=x(M.x,w);if(T===e)return;const U=x(D*x(m+p*T,w),w);if(U===e)return;let $=new oe(T,U),G=(M.x===$.r?0:2)|Number(M.y&r);return y&&$.hasHighS()&&($=$.normalizeS(),G^=1),{sig:$,recovery:G}}function Fs(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=Ts(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(!Ii(m))throw new Error("Expected private key: 0 < key < n");return m}function cc(h){return h instanceof L?(h.assertValidity(),h):L.fromHex(h)}function Yc(h){if(h instanceof oe)return h.assertValidity(),h;try{return oe.fromDER(h)}catch{return oe.fromCompact(h)}}function Fm(h,m=!1){return L.fromPrivateKey(h).toRawBytes(m)}i.getPublicKey=Fm;function Rm(h,m,p,y=!1){return L.fromSignature(h,m,p).toRawBytes(y)}i.recoverPublicKey=Rm;function Xc(h){const m=h instanceof Uint8Array,p=typeof h=="string",y=(m||p)&&h.length;return m?y===k||y===E:p?y===k*2||y===E*2:h instanceof L}function qm(h,m,p=!1){if(Xc(h))throw new TypeError("getSharedSecret: first arg must be private key");if(!Xc(m))throw new TypeError("getSharedSecret: second arg must be public key");const y=cc(m);return y.assertValidity(),y.multiply(Fs(h)).toRawBytes(p)}i.getSharedSecret=qm;function Qc(h){const m=h.length>g?h.slice(0,g):h;return xt(m)}function $m(h){const m=Qc(h),p=x(m,a.n);return tu(p<e?m:p)}function tu(h){return at(h)}function eu(h,m,p){if(h==null)throw new Error(`sign: expected valid message hash, not "${h}"`);const y=Ue(h),w=Fs(m),A=[tu(w),$m(y)];if(p!=null){p===!0&&(p=i.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=Se(...A),M=Qc(y);return{seed:D,m:M,d:w}}function ru(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 Lm(h,m,p={}){const{seed:y,m:w,d:A}=eu(h,m,p.extraEntropy),D=new Jc(b,v);await D.reseed(y);let M;for(;!(M=Zc(await D.generate(),w,A,p.canonical));)await D.reseed();return ru(M,p)}i.sign=Lm;function Hm(h,m,p={}){const{seed:y,m:w,d:A}=eu(h,m,p.extraEntropy),D=new Jc(b,v);D.reseedSync(y);let M;for(;!(M=Zc(D.generateSync(),w,A,p.canonical));)D.reseedSync();return ru(M,p)}i.signSync=Hm;const zm={strict:!0};function Vm(h,m,p,y=zm){let w;try{w=Yc(h),m=Ue(m)}catch{return!1}const{r:A,s:D}=w;if(y.strict&&w.hasHighS())return!1;const M=ac(m);let T;try{T=cc(p)}catch{return!1}const{n:U}=a,$=xi(D,U),G=x(M*$,U),W=x(A*$,U),wt=L.BASE.multiplyAndAddUnsafe(T,G,W);return wt?x(wt.x,U)===A:!1}i.verify=Vm;function Na(h){return x(xt(h),a.n)}class Si{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 Si(y,w)}assertValidity(){const{r:m,s:p}=this;if(!Oa(m)||!Ii(p))throw new Error("Invalid signature")}toHex(){return Z(this.r)+Z(this.s)}toRawBytes(){return ne(this.toHex())}}function Km(h){return L.fromPrivateKey(h).toRawX()}class ou{constructor(m,p,y=i.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(Fs(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:a.n-m;return{point:p,scalar:y,x:p.toRawX()}}initNonce(m,p){return at(m^xt(p))}finalizeNonce(m){const p=x(xt(m),a.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 Si(m.x,x(p+y*w,a.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m,d:p,px:y,rand:w}=this,A=i.utils.taggedHash,D=this.initNonce(p,await A(is.aux,w)),{R:M,rx:T,k:U}=this.finalizeNonce(await A(is.nonce,D,y,m)),$=Na(await A(is.challenge,T,y,m)),G=this.finalizeSig(M,U,$,p);return await iu(G,m,y)||this.error(),G}calcSync(){const{m,d:p,px:y,rand:w}=this,A=i.utils.taggedHashSync,D=this.initNonce(p,A(is.aux,w)),{R:M,rx:T,k:U}=this.finalizeNonce(A(is.nonce,D,y,m)),$=Na(A(is.challenge,T,y,m)),G=this.finalizeSig(M,U,$,p);return au(G,m,y)||this.error(),G}}async function Gm(h,m,p){return new ou(h,m,p).calc()}function Wm(h,m,p){return new ou(h,m,p).calcSync()}function nu(h,m,p){const y=h instanceof Si,w=y?h:Si.fromHex(h);return y&&w.assertValidity(),{...w,m:Ue(m),P:cc(p)}}function su(h,m,p,y){const w=L.BASE.multiplyAndAddUnsafe(m,Fs(p),x(-y,a.n));return!(!w||!w.hasEvenY()||w.x!==h)}async function iu(h,m,p){try{const{r:y,s:w,m:A,P:D}=nu(h,m,p),M=Na(await i.utils.taggedHash(is.challenge,at(y),D.toRawX(),A));return su(y,D,w,M)}catch{return!1}}function au(h,m,p){try{const{r:y,s:w,m:A,P:D}=nu(h,m,p),M=Na(i.utils.taggedHashSync(is.challenge,at(y),D.toRawX(),A));return su(y,D,w,M)}catch(y){if(y instanceof Y)throw y;return!1}}i.schnorr={Signature:Si,getPublicKey:Km,sign:Gm,verify:iu,signSync:Wm,verifySync:au},L.BASE._setWindowSize(8);const $t={node:t,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},is={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Ta={};i.utils={bytesToHex:O,hexToBytes:ne,concatBytes:Se,mod:x,invert:xi,isValidPrivateKey(h){try{return Fs(h),!0}catch{return!1}},_bigintTo32Bytes:at,_normalizePrivateKey:Fs,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),a.n-r)+r;return at(p)},randomBytes:(h=32)=>{if($t.web)return $t.web.getRandomValues(new Uint8Array(h));if($t.node){const{randomBytes:m}=$t.node;return Uint8Array.from(m(h))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>i.utils.hashToPrivateKey(i.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($t.web){const m=await $t.web.subtle.digest("SHA-256",Se(...h));return new Uint8Array(m)}else if($t.node){const{createHash:m}=$t.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($t.web){const p=await $t.web.subtle.importKey("raw",h,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),y=Se(...m),w=await $t.web.subtle.sign("HMAC",p,y);return new Uint8Array(w)}else if($t.node){const{createHmac:p}=$t.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=Ta[h];if(p===void 0){const y=await i.utils.sha256(Uint8Array.from(h,w=>w.charCodeAt(0)));p=Se(y,y),Ta[h]=p}return i.utils.sha256(p,...m)},taggedHashSync:(h,...m)=>{if(typeof Mi!="function")throw new Y("sha256Sync is undefined, you need to set it");let p=Ta[h];if(p===void 0){const y=Mi(Uint8Array.from(h,w=>w.charCodeAt(0)));p=Se(y,y),Ta[h]=p}return Mi(p,...m)},_JacobianPoint:S},Object.defineProperties(i.utils,{sha256Sync:{configurable:!1,get(){return Mi},set(h){Mi||(Mi=h)}},hmacSha256Sync:{configurable:!1,get(){return pa},set(h){pa||(pa=h)}}})})(wm);var Am={},re={};Object.defineProperty(re,"__esModule",{value:!0});re.isBytes=bm;re.number=Ja;re.bool=Pm;re.bytes=Rc;re.hash=Dm;re.exists=km;re.output=xm;function Ja(i){if(!Number.isSafeInteger(i)||i<0)throw new Error(`positive integer expected, not ${i}`)}function Pm(i){if(typeof i!="boolean")throw new Error(`boolean expected, not ${i}`)}function bm(i){return i instanceof Uint8Array||i!=null&&typeof i=="object"&&i.constructor.name==="Uint8Array"}function Rc(i,...t){if(!bm(i))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(i.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${i.length}`)}function Dm(i){if(typeof i!="function"||typeof i.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ja(i.outputLen),Ja(i.blockLen)}function km(i,t=!0){if(i.destroyed)throw new Error("Hash instance has been destroyed");if(t&&i.finished)throw new Error("Hash#digest() has already been called")}function xm(i,t){Rc(i);const e=t.outputLen;if(i.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}const Xd={number:Ja,bool:Pm,bytes:Rc,hash:Dm,exists:km,output:xm};re.default=Xd;var rc={},oc={};Object.defineProperty(oc,"__esModule",{value:!0});oc.crypto=void 0;oc.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(i){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(i,"__esModule",{value:!0}),i.Hash=i.nextTick=i.byteSwapIfBE=i.byteSwap=i.isLE=i.rotl=i.rotr=i.createView=i.u32=i.u8=void 0,i.isBytes=r,i.byteSwap32=g,i.bytesToHex=b,i.hexToBytes=N,i.asyncLoop=Y,i.utf8ToBytes=tt,i.toBytes=S,i.concatBytes=ot,i.checkOpts=Ea,i.wrapConstructor=Ba,i.wrapConstructorWithOpts=ic,i.wrapXOFConstructorWithOpts=oe,i.randomBytes=Se;const t=oc,e=re;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);i.u8=o;const n=P=>new Uint32Array(P.buffer,P.byteOffset,Math.floor(P.byteLength/4));i.u32=n;const s=P=>new DataView(P.buffer,P.byteOffset,P.byteLength);i.createView=s;const a=(P,O)=>P<<32-O|P>>>O;i.rotr=a;const c=(P,O)=>P<<O|P>>>32-O>>>0;i.rotl=c,i.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const d=P=>P<<24&4278190080|P<<8&16711680|P>>>8&65280|P>>>24&255;i.byteSwap=d,i.byteSwapIfBE=i.isLE?P=>P:P=>(0,i.byteSwap)(P);function g(P){for(let O=0;O<P.length;O++)P[O]=(0,i.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 E(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 at=0,vt=0;at<mt;at++,vt+=2){const Ts=E(P.charCodeAt(vt)),ne=E(P.charCodeAt(vt+1));if(Ts===void 0||ne===void 0){const xt=P[vt]+P[vt+1];throw new Error('hex string expected, got non-hex character "'+xt+'" at index '+vt)}Z[at]=Ts*16+ne}return Z}const K=async()=>{};i.nextTick=K;async function Y(P,O,mt){let Z=Date.now();for(let at=0;at<P;at++){mt(at);const vt=Date.now()-Z;vt>=0&&vt<O||(await(0,i.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 S(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 at=P[Z];(0,e.bytes)(at),O+=at.length}const mt=new Uint8Array(O);for(let Z=0,at=0;Z<P.length;Z++){const vt=P[Z];mt.set(vt,at),at+=vt.length}return mt}class ut{clone(){return this._cloneInto()}}i.Hash=ut;const L={}.toString;function Ea(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 Ba(P){const O=Z=>P().update(S(Z)).digest(),mt=P();return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=()=>P(),O}function ic(P){const O=(Z,at)=>P(at).update(S(Z)).digest(),mt=P({});return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=Z=>P(Z),O}function oe(P){const O=(Z,at)=>P(at).update(S(Z)).digest(),mt=P({});return O.outputLen=mt.outputLen,O.blockLen=mt.blockLen,O.create=Z=>P(Z),O}function Se(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")}})(rc);(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.hmac=i.HMAC=void 0;const t=re,e=rc;class r extends e.Hash{constructor(s,a){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(s);const c=(0,e.toBytes)(a);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:a,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=a._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}i.HMAC=r;const o=(n,s,a)=>new r(n,s).update(a).digest();i.hmac=o,i.hmac.create=(n,s)=>new r(n,s)})(Am);var Us={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.HashMD=Cs.Maj=Cs.Chi=void 0;const bc=re,fa=rc;function Qd(i,t,e,r){if(typeof i.setBigUint64=="function")return i.setBigUint64(t,e,r);const o=BigInt(32),n=BigInt(4294967295),s=Number(e>>o&n),a=Number(e&n),c=r?4:0,d=r?0:4;i.setUint32(t+c,s,r),i.setUint32(t+d,a,r)}const tl=(i,t,e)=>i&t^~i&e;Cs.Chi=tl;const el=(i,t,e)=>i&t^i&e^t&e;Cs.Maj=el;class rl extends fa.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,fa.createView)(this.buffer)}update(t){(0,bc.exists)(this);const{view:e,buffer:r,blockLen:o}=this;t=(0,fa.toBytes)(t);const n=t.length;for(let s=0;s<n;){const a=Math.min(o-this.pos,n-s);if(a===o){const c=(0,fa.createView)(t);for(;o<=n-s;s+=o)this.process(c,s);continue}r.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,bc.exists)(this),(0,bc.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;Qd(r,o-8,BigInt(this.length*8),n),this.process(r,0);const a=(0,fa.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++)a.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:a}=this;return t.length=o,t.pos=a,t.finished=n,t.destroyed=s,o%e&&t.buffer.set(r),t}}Cs.HashMD=rl;Object.defineProperty(Us,"__esModule",{value:!0});Us.sha224=Us.sha256=Us.SHA256=void 0;const Dc=Cs,Kt=rc,ol=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]),as=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),cs=new Uint32Array(64);class qc extends Dc.HashMD{constructor(){super(64,32,8,!1),this.A=as[0]|0,this.B=as[1]|0,this.C=as[2]|0,this.D=as[3]|0,this.E=as[4]|0,this.F=as[5]|0,this.G=as[6]|0,this.H=as[7]|0}get(){const{A:t,B:e,C:r,D:o,E:n,F:s,G:a,H:c}=this;return[t,e,r,o,n,s,a,c]}set(t,e,r,o,n,s,a,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=a|0,this.H=c|0}process(t,e){for(let v=0;v<16;v++,e+=4)cs[v]=t.getUint32(e,!1);for(let v=16;v<64;v++){const b=cs[v-15],k=cs[v-2],E=(0,Kt.rotr)(b,7)^(0,Kt.rotr)(b,18)^b>>>3,N=(0,Kt.rotr)(k,17)^(0,Kt.rotr)(k,19)^k>>>10;cs[v]=N+cs[v-7]+E+cs[v-16]|0}let{A:r,B:o,C:n,D:s,E:a,F:c,G:d,H:g}=this;for(let v=0;v<64;v++){const b=(0,Kt.rotr)(a,6)^(0,Kt.rotr)(a,11)^(0,Kt.rotr)(a,25),k=g+b+(0,Dc.Chi)(a,c,d)+ol[v]+cs[v]|0,N=((0,Kt.rotr)(r,2)^(0,Kt.rotr)(r,13)^(0,Kt.rotr)(r,22))+(0,Dc.Maj)(r,o,n)|0;g=d,d=c,c=a,a=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,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,g=g+this.H|0,this.set(r,o,n,s,a,c,d,g)}roundClean(){cs.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}Us.SHA256=qc;class nl extends qc{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,Kt.wrapConstructor)(()=>new qc);Us.sha224=(0,Kt.wrapConstructor)(()=>new nl);var sl=wm,il=Am,Mm=Us;function al(i){var t=Object.create(null);return i&&Object.keys(i).forEach(function(e){if(e!=="default"){var r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return i[e]}})}}),t.default=i,Object.freeze(t)}var j=al(sl);const Os="Expected Private",Ns="Expected Point",Sa="Expected Tweak",cl="Expected Hash",Za="Expected Signature",$c="Expected Extra Data (32 bytes)",Ua="Expected Scalar",ul="Bad Recovery Id";j.utils.hmacSha256Sync=(i,...t)=>il.hmac(Mm.sha256,i,j.utils.concatBytes(...t));j.utils.sha256Sync=(...i)=>Mm.sha256(j.utils.concatBytes(...i));const Lc=j.utils._normalizePrivateKey,ml=32,dl=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]),ll=32,pl=new Uint8Array(32),hl=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 fl(i){return i instanceof Uint8Array}function Ma(i,t){for(let e=0;e<32;++e)if(i[e]!==t[e])return i[e]<t[e]?-1:1;return 0}function yu(i){return Ma(i,pl)===0}function Ca(i){return!(!(i instanceof Uint8Array)||i.length!==dl||Ma(i,Ec)>=0)}function Hc(i){return i instanceof Uint8Array&&i.length===64&&Ma(i.subarray(0,32),Ec)<0&&Ma(i.subarray(32,64),Ec)<0}function gl(i){return fl(i)&&i.length===64&&Ma(i.subarray(0,32),hl)<0}function yl(i){return!(yu(i.subarray(0,32))||yu(i.subarray(32,64)))}function da(i){return i instanceof Uint8Array&&i.length===ml}function zc(i){return i===void 0||i instanceof Uint8Array&&i.length===ll}function Im(i){if(typeof i!="string")throw new TypeError("hexToNumber: expected string, got "+typeof i);return BigInt(`0x${i}`)}function _l(i){return Im(j.utils.bytesToHex(i))}function Vc(i){let t;if(typeof i=="bigint")t=i;else if(typeof i=="number"&&Number.isSafeInteger(i)&&i>=0)t=BigInt(i);else if(typeof i=="string"){if(i.length!==64)throw new Error("Expected 32 bytes of private scalar");t=Im(i)}else if(i instanceof Uint8Array){if(i.length!==32)throw new Error("Expected 32 bytes of private scalar");t=_l(i)}else throw new TypeError("Expected valid private scalar");if(t<0)throw new Error("Expected private scalar >= 0");return t}const vl=(i,t)=>{const e=Lc(i),r=Vc(t),o=j.utils._bigintTo32Bytes(j.utils.mod(e+r,j.CURVE.n));return j.utils.isValidPrivateKey(o)?o:null},wl=(i,t)=>{const e=Lc(i),r=Vc(t),o=j.utils._bigintTo32Bytes(j.utils.mod(e-r,j.CURVE.n));return j.utils.isValidPrivateKey(o)?o:null},Al=i=>{const t=Lc(i),e=j.utils._bigintTo32Bytes(j.CURVE.n-t);return j.utils.isValidPrivateKey(e)?e:null},Sm=(i,t,e)=>{const r=j.Point.fromHex(i),o=Vc(t),n=j.Point.BASE.multiplyAndAddUnsafe(r,o,BigInt(1));if(!n)throw new Error("Tweaked point at infinity");return n.toRawBytes(e)},Pl=(i,t,e)=>{const r=j.Point.fromHex(i),o=typeof t=="string"?t:j.utils.bytesToHex(t),n=BigInt(`0x${o}`);return r.multiply(n).toRawBytes(e)};function la(i,t){return i===void 0?t!==void 0?Um(t):!0:!!i}function ki(i){try{return i()}catch{return null}}function Kc(i,t){if(i.length===32!==t)return!1;try{return!!j.Point.fromHex(i)}catch{return!1}}function Es(i){return Kc(i,!1)}function Um(i){return Kc(i,!1)&&i.length===33}function ss(i){return j.utils.isValidPrivateKey(i)}function nc(i){return Kc(i,!0)}function bl(i,t){if(!nc(i))throw new Error(Ns);if(!Ca(t))throw new Error(Sa);return ki(()=>{const e=Sm(i,t,!0);return{parity:e[0]%2===1?1:0,xOnlyPubkey:e.slice(1)}})}function Cm(i){if(!Es(i))throw new Error(Ns);return i.slice(1,33)}function Em(i,t){if(!ss(i))throw new Error(Os);return ki(()=>j.getPublicKey(i,la(t)))}function Dl(i){if(!ss(i))throw new Error(Os);return Cm(Em(i))}function kl(i,t){if(!Es(i))throw new Error(Ns);return j.Point.fromHex(i).toRawBytes(la(t,i))}function xl(i,t,e){if(!Es(i))throw new Error(Ns);if(!Ca(t))throw new Error(Sa);return ki(()=>Pl(i,t,la(e,i)))}function Ml(i,t,e){if(!Es(i)||!Es(t))throw new Error(Ns);return ki(()=>{const r=j.Point.fromHex(i),o=j.Point.fromHex(t);return r.equals(o.negate())?null:r.add(o).toRawBytes(la(e,i))})}function Il(i,t,e){if(!Es(i))throw new Error(Ns);if(!Ca(t))throw new Error(Sa);return ki(()=>Sm(i,t,la(e,i)))}function Sl(i,t){if(ss(i)===!1)throw new Error(Os);if(Ca(t)===!1)throw new Error(Sa);return ki(()=>vl(i,t))}function Ul(i,t){if(ss(i)===!1)throw new Error(Os);if(Ca(t)===!1)throw new Error(Sa);return ki(()=>wl(i,t))}function Cl(i){if(ss(i)===!1)throw new Error(Os);return Al(i)}function El(i,t,e){if(!ss(t))throw new Error(Os);if(!da(i))throw new Error(Ua);if(!zc(e))throw new Error($c);return j.signSync(i,t,{der:!1,extraEntropy:e})}function Bl(i,t,e){if(!ss(t))throw new Error(Os);if(!da(i))throw new Error(Ua);if(!zc(e))throw new Error($c);const[r,o]=j.signSync(i,t,{der:!1,extraEntropy:e,recovered:!0});return{signature:r,recoveryId:o}}function Ol(i,t,e=Buffer.alloc(32,0)){if(!ss(t))throw new Error(Os);if(!da(i))throw new Error(Ua);if(!zc(e))throw new Error($c);return j.schnorr.signSync(i,t,e)}function Nl(i,t,e,r){if(!da(i))throw new Error(cl);if(!Hc(t)||!yl(t))throw new Error(Za);if(e&2&&!gl(t))throw new Error(ul);if(!nc(t.subarray(0,32)))throw new Error(Za);return j.recoverPublicKey(i,t,e,la(r))}function Tl(i,t,e,r){if(!Es(t))throw new Error(Ns);if(!Hc(e))throw new Error(Za);if(!da(i))throw new Error(Ua);return j.verify(e,i,t,{strict:r})}function Fl(i,t,e){if(!nc(t))throw new Error(Ns);if(!Hc(e))throw new Error(Za);if(!da(i))throw new Error(Ua);return j.schnorr.verifySync(e,i,t)}pt.isPoint=Es;pt.isPointCompressed=Um;pt.isPrivate=ss;pt.isXOnlyPoint=nc;pt.pointAdd=Ml;pt.pointAddScalar=Il;pt.pointCompress=kl;pt.pointFromScalar=Em;pt.pointMultiply=xl;pt.privateAdd=Sl;pt.privateNegate=Cl;pt.privateSub=Ul;pt.recover=Nl;pt.sign=El;pt.signRecoverable=Bl;pt.signSchnorr=Ol;pt.verify=Tl;pt.verifySchnorr=Fl;pt.xOnlyPointAddTweak=bl;pt.xOnlyPointFromPoint=Cm;pt.xOnlyPointFromScalar=Dl;class sc extends Fc{constructor(e,r=!1){var t=(...Wl)=>(super(...Wl),_(this,"privateKey"),_(this,"eth"),this);const o=ya.publicKeyCreate(new Uint8Array(e),!0);t(r?new Be(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 sc(Buffer.from(r,"hex"))}async sign(e){if(this.eth)return this.signWithKeccak256(e);const r=Buffer.from(Ka.SHA256.hash(new Ka.Word32Array(e)).toString(),"hex"),{signature:o}=ya.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}async signWithKeccak256(e){const r=Au(e),{signature:o}=ya.ecdsaSign(Uint8Array.from(r),Uint8Array.from(this.privateKey));return Buffer.from(o)}}const Rl=gd.BIP32Factory(pt),Gc=118,ql={account:0,index:0,coinType:Gc,eth:!1};class $l extends sc{constructor(e={}){const{account:r,index:o,coinType:n,eth:s}={...ql,...e};let{mnemonic:a}=e;a===void 0&&(a=uu.generateMnemonic(256));const c=uu.mnemonicToSeedSync(a),d=Rl.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=a}}const _u=120,Bm="1.0.0";class ht extends Error{constructor(t){super(t),this.name="LedgerError"}}class Wc extends Fc{constructor(e){super();_(this,"app");_(this,"path",[44,Gc,0,0,0]);this.transport=e,this.app=new ka(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 Vl());const o=new Wc(e);return r!=null&&(o.path[4]=r),e&&typeof e.on=="function"&&e.on("disconnect",()=>{o.transport=void 0}),await o.initialize().catch(Ll),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(),a=`${o}.${n}.${s}`;if(r==="Initia"&&yd.lt(a,Bm))throw new ht("Outdated version: Update Ledger Initia App to the latest version");kc(e),await this.loadAccountDetails()}async loadAccountDetails(){const e=await this.app.getAddressAndPubKey(this.path,"init");return kc(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 kc(r),Buffer.from(vu.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 Ll=i=>{const t=i.message.trim();if(!t.startsWith("The device is already open"))throw i.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 ${Bm} 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."):i},kc=i=>{if(!i)return;const{error_message:t,device_locked:e}=i;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)}},Hl=i=>i.indexOf("Win")>-1,zl=i=>{const t=i.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 Vl(){let i;if(zl(navigator.userAgent),Hl(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"));i=await t.create(_u*1e3)}else{const{default:t}=await Promise.resolve().then(()=>require("./TransportWebUSB-Bog8kAV9.js"));i=await t.create(_u*1e3)}return i}Object.defineProperty(exports,"State",{enumerable:!0,get:()=>ce.State});Object.defineProperty(exports,"stateFromJSON",{enumerable:!0,get:()=>ce.stateFromJSON});Object.defineProperty(exports,"stateToJSON",{enumerable:!0,get:()=>ce.stateToJSON});exports.ABCIParams=gs;exports.ACL=Ys;exports.APIRequester=Uu;exports.APP_KEY=qd;exports.AbsoluteTxPosition=$s;exports.AcceptedMessageKeysFilter=tr;exports.AcceptedMessagesFilter=er;exports.AccessConfig=it;exports.Allocation=Ls;exports.AllowAllMessagesFilter=Qe;exports.AllowedMsgAllowance=Kr;exports.AuctionAPI=Eu;exports.AuctionParams=Fn;exports.AuthAPI=Tu;exports.AuthInfo=be;exports.AuthParams=Rn;exports.AuthorizationGrant=ve;exports.AuthzAPI=Fu;exports.BankAPI=Ru;exports.BankParams=$n;exports.BaseAccount=Wt;exports.BasicAllowance=It;exports.BatchInfo=qt;exports.BatchInfoWithOutput=ea;exports.Blob=sa;exports.BlobTx=Wa;exports.BlockParams=ps;exports.BridgeConfig=xe;exports.BridgeInfo=Ie;exports.CHUNK_SIZE=Uc;exports.CLA=ua;exports.Channel=te;exports.ChannelCounterparty=Ps;exports.ClientConsensusStates=Da;exports.CodeGrant=ms;exports.Coin=I;exports.Coins=l;exports.CombinedLimit=Xe;exports.ConnectionCounterparty=ee;exports.ConsensusStateWithHeight=Ds;exports.ContractExecutionAuthorization=rr;exports.ContractGrant=_e;exports.ContractMigrationAuthorization=or;exports.CurrencyPair=Bt;exports.DecisionPolicyWindows=De;exports.Delegation=Ss;exports.DenomMetadata=Ae;exports.DenomTrace=Vs;exports.DenomUnit=ls;exports.Deposit=Gi;exports.DistributionAPI=qu;exports.DistributionParams=zn;exports.Duration=q;exports.ERROR_CODE=bi;exports.ERROR_DESCRIPTION=Cc;exports.Equivocation=qr;exports.EthPublicKey=Be;exports.EvidenceAPI=$u;exports.EvidenceParams=hs;exports.EvmAPI=Lu;exports.EvmParams=Vn;exports.ExecuteAuthorization=je;exports.ExecuteAuthorizationItem=us;exports.Fee=Pe;exports.FeeGrantAPI=Hu;exports.ForwardingAPI=zu;exports.FungibleTokenPacketData=wa;exports.GenericAuthorization=Ge;exports.GovAPI=Vu;exports.GovParams=Gn;exports.GroupAPI=Ku;exports.GroupInfo=Ao;exports.GroupMember=Wi;exports.GroupPolicyInfo=As;exports.GroupProposal=Wn;exports.GroupVote=Te;exports.Height=C;exports.INIT_COIN_TYPE=Gc;exports.INS=ma;exports.IbcAPI=Gu;exports.IbcChannelParams=ai;exports.IbcClientParams=bs;exports.IbcConnectionParams=ui;exports.IbcFee=Fe;exports.IbcHooksAPI=Wu;exports.IbcHooksParams=jn;exports.IbcNftAPI=ju;exports.IbcNftParams=Jn;exports.IbcPermAPI=Zu;exports.IbcTransferAPI=Ju;exports.IbcTransferParams=ds;exports.IbcVersion=Rt;exports.IdentifiedClientState=ji;exports.IdentifiedConnection=ci;exports.IdentifiedPacketFees=Pa;exports.InterTxAPI=Yu;exports.JSONSerializable=u;exports.Key=Fc;exports.LCDClient=xd;exports.LedgerError=ht;exports.LedgerKey=Wc;exports.LegacyAminoMultisigPublicKey=Ee;exports.Market=kt;exports.MarketmapAPI=Xu;exports.MarketmapParams=Zn;exports.MaxCallsLimit=Ze;exports.MaxFundsLimit=Ye;exports.Member=ws;exports.MemberRequest=Ft;exports.MerklePrefix=xs;exports.MerkleRoot=ja;exports.Metadata=Aa;exports.MnemonicKey=$l;exports.ModeInfo=X;exports.Module=Xn;exports.ModuleAccount=Oe;exports.MoveAPI=Qu;exports.MoveParams=Yn;exports.MsgAcknowledgement=gi;exports.MsgAddCodeUploadParamsAddresses=_r;exports.MsgAddCurrencyPairs=Eo;exports.MsgAddValidator=rn;exports.MsgAuctionBid=He;exports.MsgBeginRedelegate=Xo;exports.MsgBurn=Sn;exports.MsgCall=zr;exports.MsgCancelProposal=Zr;exports.MsgCancelUnbondingDelegation=tn;exports.MsgCancelUpgrade=So;exports.MsgChangeAdmin=Un;exports.MsgChannelCloseConfirm=hi;exports.MsgChannelCloseInit=pi;exports.MsgChannelOpenAck=li;exports.MsgChannelOpenConfirm=di;exports.MsgChannelOpenInit=Qs;exports.MsgChannelOpenTry=mi;exports.MsgClearAdmin=mr;exports.MsgClearForwardingAccount=Jr;exports.MsgCommunityPoolSpend=Fr;exports.MsgCreate=Lr;exports.MsgCreate2=Hr;exports.MsgCreateBridge=mn;exports.MsgCreateClient=ti;exports.MsgCreateDenom=Mn;exports.MsgCreateGroup=ao;exports.MsgCreateGroupPolicy=mo;exports.MsgCreateGroupWithPolicy=lo;exports.MsgCreateMarkets=Oo;exports.MsgCreateValidator=Qo;exports.MsgDelegate=Zo;exports.MsgDeleteOutput=ln;exports.MsgDelist=Ko;exports.MsgDeposit=Xr;exports.MsgDepositLegacy=Yr;exports.MsgDepositValidatorRewardsPool=Rr;exports.MsgEditValidator=ye;exports.MsgExecAuthorized=Dr;exports.MsgExecute=qo;exports.MsgExecuteContract=ar;exports.MsgExecuteJSON=$o;exports.MsgExecuteMessages=an;exports.MsgFinalizeTokenDeposit=nn;exports.MsgFinalizeTokenWithdrawal=hn;exports.MsgForceTransfer=Bn;exports.MsgFundCommunityPool=Nr;exports.MsgGovExecute=Go;exports.MsgGovExecuteJSON=Wo;exports.MsgGovPublish=ge;exports.MsgGovScript=jo;exports.MsgGovScriptJSON=Jo;exports.MsgGrantAllowance=Gr;exports.MsgGrantAuthorization=Pr;exports.MsgGroupExec=po;exports.MsgGroupVote=pe;exports.MsgIBCSoftwareUpgrade=si;exports.MsgInitiateTokenDeposit=pn;exports.MsgInitiateTokenWithdrawal=sn;exports.MsgInstantiateContract=sr;exports.MsgInstantiateContractV2=ir;exports.MsgLeaveGroup=ho;exports.MsgMigrateContract=cr;exports.MsgMint=In;exports.MsgMultiSend=bt;exports.MsgNftTransfer=Do;exports.MsgPayForBlobs=Ks;exports.MsgPayPacketFee=Ws;exports.MsgPayPacketFeeAsync=js;exports.MsgPinCodes=hr;exports.MsgProposeOutput=dn;exports.MsgPublish=fe;exports.MsgRecordBatch=un;exports.MsgRecoverClient=ni;exports.MsgRecvPacket=fi;exports.MsgRegisterAccount=Uo;exports.MsgRegisterCounterpartyPayee=Zs;exports.MsgRegisterForwardingAccount=jr;exports.MsgRegisterPayee=Js;exports.MsgRemoveCodeUploadParamsAddresses=vr;exports.MsgRemoveCurrencyPairs=Bo;exports.MsgRemoveMarketAuthorities=Fo;exports.MsgRemoveValidator=on;exports.MsgRevokeAllowance=Wr;exports.MsgRevokeAuthorization=br;exports.MsgScript=Lo;exports.MsgScriptJSON=Ho;exports.MsgSend=kr;exports.MsgSetBeforeSendHook=En;exports.MsgSetBridgeInfo=An;exports.MsgSetDenomMetadata=Ir;exports.MsgSetDenomMetadataWasm=Cn;exports.MsgSetSendEnabled=Mr;exports.MsgSetWithdrawAddress=Er;exports.MsgSoftwareUpgrade=Io;exports.MsgSpendFeePool=cn;exports.MsgStoreAndInstantiateContract=gr;exports.MsgStoreAndMigrateContract=yr;exports.MsgStoreCode=nr;exports.MsgSubmitEvidence=$r;exports.MsgSubmitGroupProposal=he;exports.MsgSubmitMisbehaviour=oi;exports.MsgSubmitProposal=oo;exports.MsgSubmitProposalLegacy=ro;exports.MsgSubmitTx=Co;exports.MsgSudoContract=pr;exports.MsgTimeout=yi;exports.MsgTimeoutOnClose=_i;exports.MsgTransfer=Ar;exports.MsgUndelegate=Yo;exports.MsgUnjail=kn;exports.MsgUnpinCodes=fr;exports.MsgUpdateACL=Po;exports.MsgUpdateAdmin=ur;exports.MsgUpdateAuctionParams=ze;exports.MsgUpdateAuthParams=Ve;exports.MsgUpdateBankParams=xr;exports.MsgUpdateBatchInfo=yn;exports.MsgUpdateChallenger=gn;exports.MsgUpdateClient=ei;exports.MsgUpdateConsensusParams=Sr;exports.MsgUpdateContractLabel=wr;exports.MsgUpdateCrisisParams=Cr;exports.MsgUpdateDistrParams=Tr;exports.MsgUpdateEvmParams=Vr;exports.MsgUpdateGovParams=io;exports.MsgUpdateGroupAdmin=fo;exports.MsgUpdateGroupDecisionPolicy=go;exports.MsgUpdateGroupMembers=yo;exports.MsgUpdateGroupMetadata=_o;exports.MsgUpdateGroupPolicyAdmin=vo;exports.MsgUpdateGroupPolicyMetadata=wo;exports.MsgUpdateIbcChannelParams=vi;exports.MsgUpdateIbcClientParams=ii;exports.MsgUpdateIbcHooksParams=bo;exports.MsgUpdateIbcNftParams=ko;exports.MsgUpdateIbcPermAdmin=xo;exports.MsgUpdateIbcTransferParams=zs;exports.MsgUpdateInstantiateConfig=dr;exports.MsgUpdateMarketmapParams=Ro;exports.MsgUpdateMarkets=No;exports.MsgUpdateMetadata=vn;exports.MsgUpdateMoveParams=zo;exports.MsgUpdateMstakingParams=en;exports.MsgUpdateOpchildParams=bn;exports.MsgUpdateOphostParams=wn;exports.MsgUpdateOracle=Pn;exports.MsgUpdateOracleConfig=_n;exports.MsgUpdatePermissionedRelayers=Mo;exports.MsgUpdateProposer=fn;exports.MsgUpdateRewardParams=Dn;exports.MsgUpdateSlashingParams=xn;exports.MsgUpdateTokenfactoryParams=On;exports.MsgUpdateWasmParams=lr;exports.MsgUpgradeClient=ri;exports.MsgUpsertMarkets=To;exports.MsgVerifyInvariant=Ur;exports.MsgVote=le;exports.MsgVoteLegacy=de;exports.MsgVoteWeighted=so;exports.MsgVoteWeightedLegacy=no;exports.MsgWhitelist=Vo;exports.MsgWithdrawDelegatorReward=Br;exports.MsgWithdrawValidatorCommission=Or;exports.MstakingAPI=tm;exports.MstakingParams=Qn;exports.MultiSignature=Ad;exports.NftClassTrace=Xs;exports.NonFungibleTokenPacketData=ba;exports.OpValidator=wi;exports.OpchildAPI=em;exports.OpchildParams=es;exports.OphostAPI=rm;exports.OphostParams=ts;exports.OracleAPI=om;exports.OrderBy=_d;exports.Output=Me;exports.P1_VALUES=Tc;exports.PAYLOAD_TYPE=za;exports.Packet=zt;exports.PacketFee=qe;exports.PacketId=Re;exports.ParamChange=_s;exports.ParamChanges=Qr;exports.ParameterChangeProposal=to;exports.PercentageDecisionPolicy=uo;exports.PeriodicAllowance=Jt;exports.Plan=ke;exports.Proposal=Ne;exports.ProviderConfig=Ms;exports.PublishAuthorization=We;exports.QuotePrice=ta;exports.RESTClient=dm;exports.RawKey=sc;exports.Redelegation=ae;exports.RewardAPI=nm;exports.RewardParams=rs;exports.RewardWeight=ys;exports.SendAuthorization=Ke;exports.SendEnabled=we;exports.SignDoc=Nu;exports.SignatureV2=lt;exports.SignerInfo=jt;exports.SimplePublicKey=Pt;exports.SimulateResponse=tc;exports.SlashingAPI=sm;exports.SlashingParams=os;exports.StakeAuthorization=me;exports.StakeAuthorizationValidators=ie;exports.StoreCodeAuthorization=Je;exports.TallyResult=Kn;exports.TendermintAPI=im;exports.TextProposal=eo;exports.ThresholdDecisionPolicy=co;exports.Ticker=Is;exports.Timeout=ks;exports.TokenfactoryAPI=am;exports.TokenfactoryParams=ns;exports.TransferAuthorization=Hs;exports.Tx=Dt;exports.TxAPI=ra;exports.TxBody=Hn;exports.TxInfo=aa;exports.TxLog=Pi;exports.UnbondingDelegation=Lt;exports.UpgradeAPI=cm;exports.ValConsPublicKey=_t;exports.Validator=dt;exports.ValidatorParams=fs;exports.ValidatorSigningInfo=Ai;exports.Vote=vs;exports.Wallet=mm;exports.WasmAPI=um;exports.WasmParams=qn;exports.WebSocketClient=Td;exports.WeightedVoteOption=Tt;exports.bcs=bd;exports.checkDecimal=Rs;exports.fromLittleEndian=Sc;exports.hashToHex=Ga;exports.isTxError=Dd;exports.keccak256=Bu;exports.num=F;exports.prepareSignBytes=xa;exports.removeNull=Cu;exports.ripemd160=Ou;exports.sha256=Qa;exports.toLittleEndian=Ic;Object.keys(At).forEach(i=>{i!=="default"&&!Object.prototype.hasOwnProperty.call(exports,i)&&Object.defineProperty(exports,i,{enumerable:!0,get:()=>At[i]})});