1import{y as re,cg as Ho,O as Pe,cB as fn,d as Hc,z as an,G as qc,o as Te,l as De,p as $,t as ne,s as ie,m as Oe,W as Sp,k as kp,a2 as Pp,i as pn,cC as Rp,j as Bp,ai as vp,cD as Op,r as bp,bF as Ap,w as dt,f as rr,Q as Ne,K as Zi,E as Hu,F as ir,q as or,B as _n,P as wt,L as ar,ac as Ip,cE as Tp,cF as qu,Y as Np,Z as Cp,U as wp}from"./index-69f8b8fe.js";import{x as Qt,b as _p,a as Ep}from"./browser-7359b482.js";import{A as Jp}from"./vue3-apexcharts.common-28429a76.js";import{_ as Vu}from"./PaginationBar.vue_vue_type_script_setup_true_lang-5e0d969d.js";import"./index-b141d71c.js";var Vc={},Ji={},Cn={},qo={},Up=re&&re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qo,"__esModule",{value:!0});qo.Decimal=void 0;const En=Up(Ho),Qu=100;let Dp=class Ee{static fromUserInput(n,t){Ee.verifyFractionalDigits(t);const i=n.match(/[^0-9.]/);if(i)throw new Error(`Invalid character at position ${i.index+1}`);let u,R;if(n==="")u="0",R="";else if(n.search(/\./)===-1)u=n,R="";else{const E=n.split(".");switch(E.length){case 0:case 1:throw new Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!E[1])throw new Error("Fractional part missing");u=E[0],R=E[1].replace(/0+$/,"");break;default:throw new Error("More than one separator found")}}if(R.length>t)throw new Error("Got more fractional digits than supported");const v=`${u}${R.padEnd(t,"0")}`;return new Ee(v,t)}static fromAtomics(n,t){return Ee.verifyFractionalDigits(t),new Ee(n,t)}static zero(n){return Ee.verifyFractionalDigits(n),new Ee("0",n)}static one(n){return Ee.verifyFractionalDigits(n),new Ee("1"+"0".repeat(n),n)}static verifyFractionalDigits(n){if(!Number.isInteger(n))throw new Error("Fractional digits is not an integer");if(n<0)throw new Error("Fractional digits must not be negative");if(n>Qu)throw new Error(`Fractional digits must not exceed ${Qu}`)}static compare(n,t){if(n.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");return n.data.atomics.cmp(new En.default(t.atomics))}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}constructor(n,t){if(!n.match(/^[0-9]+$/))throw new Error("Invalid string format. Only non-negative integers in decimal representation supported.");this.data={atomics:new En.default(n),fractionalDigits:t}}clone(){return new Ee(this.atomics,this.fractionalDigits)}floor(){const n=new En.default(10).pow(new En.default(this.data.fractionalDigits)),t=this.data.atomics.div(n);return this.data.atomics.mod(n).isZero()?this.clone():Ee.fromAtomics(t.mul(n).toString(),this.fractionalDigits)}ceil(){const n=new En.default(10).pow(new En.default(this.data.fractionalDigits)),t=this.data.atomics.div(n);return this.data.atomics.mod(n).isZero()?this.clone():Ee.fromAtomics(t.addn(1).mul(n).toString(),this.fractionalDigits)}toString(){const n=new En.default(10).pow(new En.default(this.data.fractionalDigits)),t=this.data.atomics.div(n),i=this.data.atomics.mod(n);if(i.isZero())return t.toString();{const R=i.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return`${t.toString()}.${R}`}}toFloatApproximation(){const n=Number(this.toString());if(Number.isNaN(n))throw new Error("Conversion to number failed");return n}plus(n){if(this.fractionalDigits!==n.fractionalDigits)throw new Error("Fractional digits do not match");const t=this.data.atomics.add(new En.default(n.atomics));return new Ee(t.toString(),this.fractionalDigits)}minus(n){if(this.fractionalDigits!==n.fractionalDigits)throw new Error("Fractional digits do not match");const t=this.data.atomics.sub(new En.default(n.atomics));if(t.ltn(0))throw new Error("Difference must not be negative");return new Ee(t.toString(),this.fractionalDigits)}multiply(n){const t=this.data.atomics.mul(new En.default(n.toString()));return new Ee(t.toString(),this.fractionalDigits)}equals(n){return Ee.compare(this,n)===0}isLessThan(n){return Ee.compare(this,n)<0}isLessThanOrEqual(n){return Ee.compare(this,n)<=0}isGreaterThan(n){return Ee.compare(this,n)>0}isGreaterThanOrEqual(n){return Ee.compare(this,n)>=0}};qo.Decimal=Dp;var Fn={}
1,Mp=re&&re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.Uint64=Fn.Uint53=Fn.Int53=Fn.Uint32=void 0;const yo=Mp(Ho),Hp=new yo.default("18446744073709551615",10,"be");let qp=class ho{static fromBigEndianBytes(n){return ho.fromBytes(n)}static fromBytes(n,t="be"){if(n.length!==4)throw new Error("Invalid input length. Expected 4 bytes.");for(let u=0;u<n.length;++u)if(!Number.isInteger(n[u])||n[u]>255||n[u]<0)throw new Error("Invalid value in byte. Found: "+n[u]);const i=t==="be"?n:Array.from(n).reverse();return new ho(i[0]*2**24+i[1]*2**16+i[2]*2**8+i[3])}static fromString(n){if(!n.match(/^[0-9]+$/))throw new Error("Invalid string format");return new ho(Number.parseInt(n,10))}constructor(n){if(Number.isNaN(n))throw new Error("Input is not a number");if(!Number.isInteger(n))throw new Error("Input is not an integer");if(n<0||n>4294967295)throw new Error("Input not in uint32 range: "+n.toString());this.data=n}toBytesBigEndian(){return new Uint8Array([Math.floor(this.data/2**24)&255,Math.floor(this.data/2**16)&255,Math.floor(this.data/2**8)&255,Math.floor(this.data/2**0)&255])}toBytesLittleEndian(){return new Uint8Array([Math.floor(this.data/2**0)&255,Math.floor(this.data/2**8)&255,Math.floor(this.data/2**16)&255,Math.floor(this.data/2**24)&255])}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}};Fn.Uint32=qp;let yd=class Qc{static fromString(n){if(!n.match(/^-?[0-9]+$/))throw new Error("Invalid string format");return new Qc(Number.parseInt(n,10))}constructor(n){if(Number.isNaN(n))throw new Error("Input is not a number");if(!Number.isInteger(n))throw new Error("Input is not an integer");if(n<Number.MIN_SAFE_INTEGER||n>Number.MAX_SAFE_INTEGER)throw new Error("Input not in int53 range: "+n.toString());this.data=n}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}};Fn.Int53=yd;let Vp=class Wc{static fromString(n){const t=yd.fromString(n);return new Wc(t.toNumber())}constructor(n){const t=new yd(n);if(t.toNumber()<0)throw new Error("Input is negative");this.data=t}toNumber(){return this.data.toNumber()}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}};Fn.Uint53=Vp;let Qp=class Bi{static fromBytesBigEndian(n){return Bi.fromBytes(n)}static fromBytes(n,t="be"){if(n.length!==8)throw new Error("Invalid input length. Expected 8 bytes.");for(let u=0;u<n.length;++u)if(!Number.isInteger(n[u])||n[u]>255||n[u]<0)throw new Error("Invalid value in byte. Found: "+n[u]);const i=t==="be"?Array.from(n):Array.from(n).reverse();return new Bi(new yo.default(i))}static fromString(n){if(!n.match(/^[0-9]+$/))throw new Error("Invalid string format");return new Bi(new yo.default(n,10,"be"))}static fromNumber(n){if(Number.isNaN(n))throw new Error("Input is not a number");if(!Number.isInteger(n))throw new Error("Input is not an integer");let t;try{t=new yo.default(n)}catch{throw new Error("Input is not a safe integer")}return new Bi(t)}constructor(n){if(n.isNeg())throw new Error("Input is negative");if(n.gt(Hp))throw new Error("Input exceeds uint64 range");this.data=n}toBytesBigEndian(){return Uint8Array.from(this.data.toArray("be",8))}toBytesLittleEndian(){return Uint8Array.from(this.data.toArray("le",8))}toString(){return this.data.toString(10)}toBigInt(){return BigInt(this.toString())}toNumber(){return this.data.toNumber()}};Fn.Uint64=Qp;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Uint64=e.Uint53=e.Uint32=e.Int53=e.Decimal=void 0;var n=qo;Object.defineProperty(e,"Decimal",{enumerable:!0,get:function(){return n.Decimal}});var t=Fn;Object.defineProperty(e,"Int53",{enumerable:!0,get:function(){return t.Int53}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return t.Uint32}}),Object.defineProperty(e,"Uint53",{enumerable:!0,get:function(){return t.Uint53}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return t.Uint64}})})(Cn);var Ct={},Vo={},it={},Re={},te={},pt={};
1Object.defineProperty(pt,"__esModule",{value:!0});pt.utf8Write=pt.utf8Read=pt.utf8Length=void 0;function Wp(e){let n=0,t=0;for(let i=0;i<e.length;++i)t=e.charCodeAt(i),t<128?n+=1:t<2048?n+=2:(t&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320?(++i,n+=4):n+=3;return n}pt.utf8Length=Wp;function Fp(e,n,t){if(t-n<1)return"";const u=[];let R=[],v=0,E;for(;n<t;)E=e[n++],E<128?u[v++]=E:E>191&&E<224?u[v++]=(E&31)<<6|e[n++]&63:E>239&&E<365?(E=((E&7)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,u[v++]=55296+(E>>10),u[v++]=56320+(E&1023)):u[v++]=(E&15)<<12|(e[n++]&63)<<6|e[n++]&63,v>8191&&((R||(R=[])).push(String.fromCharCode(...u)),v=0);return R?(v&&R.push(String.fromCharCode(...u.slice(0,v))),R.join("")):String.fromCharCode(...u.slice(0,v))}pt.utf8Read=Fp;function Gp(e,n,t){const i=t;let u,R;for(let v=0;v<e.length;++v)u=e.charCodeAt(v),u<128?n[t++]=u:u<2048?(n[t++]=u>>6|192,n[t++]=u&63|128):(u&64512)===55296&&((R=e.charCodeAt(v+1))&64512)===56320?(u=65536+((u&1023)<<10)+(R&1023),++v,n[t++]=u>>18|240,n[t++]=u>>12&63|128,n[t++]=u>>6&63|128,n[t++]=u&63|128):(n[t++]=u>>12|224,n[t++]=u>>6&63|128,n[t++]=u&63|128);return t-i}pt.utf8Write=Gp;var he={};Object.defineProperty(he,"__esModule",{value:!0});he.writeByte=he.writeFixed32=he.int64Length=he.writeVarint64=he.writeVarint32=he.readInt32=he.readUInt32=he.zzDecode=he.zzEncode=he.varint32read=he.varint32write=he.uInt64ToString=he.int64ToString=he.int64FromString=he.varint64write=he.varint64read=void 0;function Lp(){let e=0,n=0;for(let i=0;i<28;i+=7){let u=this.buf[this.pos++];if(e|=(u&127)<<i,!(u&128))return this.assertBounds(),[e,n]}let t=this.buf[this.pos++];if(e|=(t&15)<<28,n=(t&112)>>4,!(t&128))return this.assertBounds(),[e,n];for(let i=3;i<=31;i+=7){let u=this.buf[this.pos++];if(n|=(u&127)<<i,!(u&128))return this.assertBounds(),[e,n]}throw new Error("invalid varint")}he.varint64read=Lp;function $p(e,n,t){for(let R=0;R<28;R=R+7){const v=e>>>R,E=!(!(v>>>7)&&n==0),C=(E?v|128:v)&255;if(t.push(C),!E)return}const i=e>>>28&15|(n&7)<<4,u=!!(n>>3);if(t.push((u?i|128:i)&255),!!u){for(let R=3;R<31;R=R+7){const v=n>>>R,E=!!(v>>>7),C=(E?v|128:v)&255;if(t.push(C),!E)return}t.push(n>>>31&1)}}he.varint64write=$p;const go=4294967296;function Kp(e){const n=e[0]==="-";n&&(e=e.slice(1));const t=1e6;let i=0,u=0;function R(v,E){const C=Number(e.slice(v,E));u*=t,i=i*t+C,i>=go&&(u=u+(i/go|0),i=i%go)}return R(-24,-18),R(-18,-12),R(-12,-6),R(-6),n?Gc(i,u):Gd(i,u)}he.int64FromString=Kp;function zp(e,n){let t=Gd(e,n);const i=t.hi&2147483648;i&&(t=Gc(t.lo,t.hi));const u=Fc(t.lo,t.hi);return i?"-"+u:u}he.int64ToString=zp;function Fc(e,n){if({lo:e,hi:n}=Zp(e,n),n<=2097151)return String(go*n+e);const t=e&16777215,i=(e>>>24|n<<8)&16777215,u=n>>16&65535;let R=t+i*6777216+u*6710656,v=i+u*8147497,E=u*2;const C=1e7;return R>=C&&(v+=Math.floor(R/C),R%=C),v>=C&&(E+=Math.floor(v/C),v%=C),E.toString()+Wu(v)+Wu(R)}he.uInt64ToString=Fc;function Zp(e,n){return{lo:e>>>0,hi:n>>>0}}function Gd(e,n){return{lo:e|0,hi:n|0}}function Gc(e,n){return n=~n,e?e=~e+1:n+=1,Gd(e,n)}const Wu=e=>{const n=String(e);return"0000000".slice(n.length)+n};function Yp(e,n){if(e>=0){for(;e>127;)n.push(e&127|128),e=e>>>7;n.push(e)}else{for(let t=0;t<9;t++)n.push(e&127|128),e=e>>7;n.push(1)}}he.varint32write=Yp;function Xp(){let e=this.buf[this.pos++],n=e&127;if(!(e&128))return this.assertBounds(),n;if(e=this.buf[this.pos++],n|=(e&127)<<7,!(e&128))return this.assertBounds(),n;if(e=this.buf[this.pos++],n|=(e&127)<<14,!(e&128))return this.assertBounds(),n;if(e=this.buf[this.pos++],n|=(e&127)<<21,!(e&128))return this.assertBounds(),n;e=this.buf[this.pos++],n|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),n>>>0}he.varint32read=Xp;function xp(e,n){let t=n>>31;return n=((n<<1|e>>>31)^t)>>>0,e=(e<<1^t)>>>0,[e,n]}he.zzEncode=xp;function jp(e,n){let t=-(e&1);return e=((e>>>1|n<<31)^t)>>>0,n=(n>>>1^t)>>>0,[e,n]}he.zzDecode=jp;function em(e,n){return(e[n]|e[n+1]<<8|e[n+2]<<16)+e[n+3]*16777216}he.readUInt32=em;function nm(e,n){return(e[n]|e[n+1]<<8|e[n+2]<<16)+(e[n+3]<<24)}he.readInt32=nm;function tm(e,n,t){for(;e>127;)n[t++]=e&127|128,e>>>=7;n[t]=e}he.writeVarint32=tm;function rm(e,n,t){for(;e.hi;)n[t++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)n[t++]=e.lo&127|128,e.lo=e.lo>>>7;n[t++]=e.lo}he.writeVarint64=rm;function im(e,n){let t=e,i=(e>>>28|n<<4)>>>0,u=n>>>24;return u===0?i===0?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:u<128?9:10}he.int64Length=im;function om(e,n,t){n[t]=e&255,n[t+1]=e>>>8&255,n[t+2]=e>>>16&255,n[t+3]=e>>>24}he.writeFixed32=om;function am(e,n,t){n[t]=e&255}he.writeByte=am;
1Object.defineProperty(te,"__esModule",{value:!0});te.BinaryWriter=te.BinaryReader=te.WireType=void 0;const hd=pt,Be=he;var fr;(function(e){e[e.Varint=0]="Varint",e[e.Fixed64=1]="Fixed64",e[e.Bytes=2]="Bytes",e[e.Fixed32=5]="Fixed32"})(fr||(te.WireType=fr={}));class sm{assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}constructor(n){this.buf=n?new Uint8Array(n):new Uint8Array(0),this.pos=0,this.type=0,this.len=this.buf.length}tag(){const n=this.uint32(),t=n>>>3,i=n&7;if(t<=0||i<0||i>5)throw new Error("illegal tag: field no "+t+" wire type "+i);return[t,i,n]}skip(n){if(typeof n=="number"){if(this.pos+n>this.len)throw Fu(this,n);this.pos+=n}else do if(this.pos>=this.len)throw Fu(this);while(this.buf[this.pos++]&128);return this}skipType(n){switch(n){case fr.Varint:this.skip();break;case fr.Fixed64:this.skip(8);break;case fr.Bytes:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n);break;case fr.Fixed32:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this}uint32(){return Be.varint32read.bind(this)()}int32(){return this.uint32()|0}sint32(){const n=this.uint32();return n%2===1?(n+1)/-2:n/2}fixed32(){const n=(0,Be.readUInt32)(this.buf,this.pos);return this.pos+=4,n}sfixed32(){const n=(0,Be.readInt32)(this.buf,this.pos);return this.pos+=4,n}int64(){const[n,t]=Be.varint64read.bind(this)();return BigInt((0,Be.int64ToString)(n,t))}uint64(){const[n,t]=Be.varint64read.bind(this)();return BigInt((0,Be.uInt64ToString)(n,t))}sint64(){let[n,t]=Be.varint64read.bind(this)();return[n,t]=(0,Be.zzDecode)(n,t),BigInt((0,Be.int64ToString)(n,t))}fixed64(){const n=this.sfixed32(),t=this.sfixed32();return BigInt((0,Be.uInt64ToString)(n,t))}sfixed64(){const n=this.sfixed32(),t=this.sfixed32();return BigInt((0,Be.int64ToString)(n,t))}float(){throw new Error("float not supported")}double(){throw new Error("double not supported")}bool(){const[n,t]=Be.varint64read.bind(this)();return n!==0||t!==0}bytes(){const n=this.uint32(),t=this.pos;return this.pos+=n,this.assertBounds(),this.buf.subarray(t,t+n)}string(){const n=this.bytes();return(0,hd.utf8Read)(n,0,n.length)}}te.BinaryReader=sm;class oi{constructor(n,t,i){this.fn=n,this.len=t,this.val=i}proceed(n,t){this.fn&&this.fn(this.val,n,t)}}class dm{constructor(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}}class Ut{constructor(){this.len=0,this.uint64=Ut.prototype.int64,this.sfixed64=Ut.prototype.fixed64,this.sfixed32=Ut.prototype.fixed32,this.head=new oi(null,0,0),this.tail=this.head,this.states=null}static create(){return new Ut}static alloc(n){return typeof Uint8Array<"u"?cm(t=>new Uint8Array(t),Uint8Array.prototype.subarray)(n):new Array(n)}_push(n,t,i){return this.tail=this.tail.next=new oi(n,t,i),this.len+=t,this}finish(){let n=this.head.next,t=0;const i=Ut.alloc(this.len);for(;n;)n.proceed(i,t),t+=n.len,n=n.next;return i}fork(){return this.states=new dm(this),this.head=this.tail=new oi(null,0,0),this.len=0,this}reset(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new oi(null,0,0),this.len=0),this}ldelim(){const n=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=n.next,this.tail=t,this.len+=i),this}tag(n,t){return this.uint32((n<<3|t)>>>0)}uint32(n){return this.len+=(this.tail=this.tail.next=new oi(Be.writeVarint32,(n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this}
1int32(n){return n<0?this._push(Be.writeVarint64,10,(0,Be.int64FromString)(n.toString())):this.uint32(n)}sint32(n){return this.uint32((n<<1^n>>31)>>>0)}int64(n){const{lo:t,hi:i}=(0,Be.int64FromString)(n.toString());return this._push(Be.writeVarint64,(0,Be.int64Length)(t,i),{lo:t,hi:i})}sint64(n){let{lo:t,hi:i}=(0,Be.int64FromString)(n.toString());return[t,i]=(0,Be.zzEncode)(t,i),this._push(Be.writeVarint64,(0,Be.int64Length)(t,i),{lo:t,hi:i})}fixed64(n){const{lo:t,hi:i}=(0,Be.int64FromString)(n.toString());return this._push(Be.writeFixed32,4,t)._push(Be.writeFixed32,4,i)}bool(n){return this._push(Be.writeByte,1,n?1:0)}fixed32(n){return this._push(Be.writeFixed32,4,n>>>0)}float(n){throw new Error("float not supported"+n)}double(n){throw new Error("double not supported"+n)}bytes(n){const t=n.length>>>0;return t?this.uint32(t)._push(um,t,n):this._push(Be.writeByte,1,0)}string(n){const t=(0,hd.utf8Length)(n);return t?this.uint32(t)._push(hd.utf8Write,t,n):this._push(Be.writeByte,1,0)}}te.BinaryWriter=Ut;function um(e,n,t){if(typeof Uint8Array<"u")n.set(e,t);else for(let i=0;i<e.length;++i)n[t+i]=e[i]}function cm(e,n,t){const i=t||8192,u=i>>>1;let R=null,v=i;return function(C){if(C<1||C>u)return e(C);v+C>i&&(R=e(i),v=0);const D=n.call(R,v,v+=C);return v&7&&(v=(v|7)+1),D}}function Fu(e,n){return RangeError("index out of range: "+e.pos+" + "+(n||1)+" > "+e.len)}var ee={};
1Object.defineProperty(ee,"__esModule",{value:!0});ee.fromJsonTimestamp=ee.fromTimestamp=ee.toTimestamp=ee.setPaginationParams=ee.isObject=ee.isSet=ee.fromDuration=ee.toDuration=ee.omitDefault=ee.base64FromBytes=ee.bytesFromBase64=void 0;var Nr=(()=>{if(typeof Nr<"u")return Nr;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof re<"u")return re;throw"Unable to locate global object"})();const lm=Nr.atob||(e=>Nr.Buffer.from(e,"base64").toString("binary"));function fm(e){const n=lm(e),t=new Uint8Array(n.length);for(let i=0;i<n.length;++i)t[i]=n.charCodeAt(i);return t}ee.bytesFromBase64=fm;const pm=Nr.btoa||(e=>Nr.Buffer.from(e,"binary").toString("base64"));function mm(e){const n=[];return e.forEach(t=>{n.push(String.fromCharCode(t))}),pm(n.join(""))}ee.base64FromBytes=mm;function ym(e){if(typeof e=="string")return e===""?void 0:e;if(typeof e=="number")return e===0?void 0:e;if(typeof e=="bigint")return e===BigInt(0)?void 0:e;throw new Error(`Got unsupported type ${typeof e}`)}ee.omitDefault=ym;function hm(e){return{seconds:BigInt(Math.floor(parseInt(e)/1e9)),nanos:parseInt(e)%1e9}}ee.toDuration=hm;function gm(e){return(parseInt(e.seconds.toString())*1e9+e.nanos).toString()}ee.fromDuration=gm;function gd(e){return e!=null}ee.isSet=gd;function Sm(e){return typeof e=="object"&&e!==null}ee.isObject=Sm;const km=(e,n)=>(n&&(typeof(n==null?void 0:n.countTotal)<"u"&&(e.params["pagination.count_total"]=n.countTotal),typeof(n==null?void 0:n.key)<"u"&&(e.params["pagination.key"]=Buffer.from(n.key).toString("base64")),typeof(n==null?void 0:n.limit)<"u"&&(e.params["pagination.limit"]=n.limit.toString()),typeof(n==null?void 0:n.offset)<"u"&&(e.params["pagination.offset"]=n.offset.toString()),typeof(n==null?void 0:n.reverse)<"u"&&(e.params["pagination.reverse"]=n.reverse)),e);ee.setPaginationParams=km;function Sd(e){const n=vm(e.getTime()/1e3),t=e.getTime()%1e3*1e6;return{seconds:n,nanos:t}}ee.toTimestamp=Sd;function Pm(e){let n=Number(e.seconds)*1e3;return n+=e.nanos/1e6,new Date(n)}ee.fromTimestamp=Pm;const Rm=e=>({seconds:gd(e.seconds)?BigInt(e.seconds.toString()):BigInt(0),nanos:gd(e.nanos)?Number(e.nanos):0});function Bm(e){return e instanceof Date?Sd(e):typeof e=="string"?Sd(new Date(e)):Rm(e)}ee.fromJsonTimestamp=Bm;function vm(e){return BigInt(Math.trunc(e))}Object.defineProperty(Re,"__esModule",{value:!0});Re.Any=Re.protobufPackage=void 0;const ls=te,Yi=ee;Re.protobufPackage="google.protobuf";function fs(){return{typeUrl:"",value:new Uint8Array}}Re.Any={typeUrl:"/google.protobuf.Any",encode(e,n=ls.BinaryWriter.create()){return e.typeUrl!==""&&n.uint32(10).string(e.typeUrl),e.value.length!==0&&n.uint32(18).bytes(e.value),n},decode(e,n){const t=e instanceof ls.BinaryReader?e:new ls.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=fs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.typeUrl=t.string();break;case 2:u.value=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=fs();return(0,Yi.isSet)(e.typeUrl)&&(n.typeUrl=String(e.typeUrl)),(0,Yi.isSet)(e.value)&&(n.value=(0,Yi.bytesFromBase64)(e.value)),n},toJSON(e){const n={};return e.typeUrl!==void 0&&(n.typeUrl=e.typeUrl),e.value!==void 0&&(n.value=(0,Yi.base64FromBytes)(e.value!==void 0?e.value:new Uint8Array)),n},fromPartial(e){const n=fs();return n.typeUrl=e.typeUrl??"",n.value=e.value??new Uint8Array,n}};var ri={},Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.CompactBitArray=Xn.MultiSignature=Xn.protobufPackage=void 0;const gr=te,pr=ee;Xn.protobufPackage="cosmos.crypto.multisig.v1beta1";function ps(){return{signatures:[]}}Xn.MultiSignature={typeUrl:"/cosmos.crypto.multisig.v1beta1.MultiSignature",encode(e,n=gr.BinaryWriter.create()){for(const t of e.signatures)n.uint32(10).bytes(t);return n},decode(e,n){const t=e instanceof gr.BinaryReader?e:new gr.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=ps();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.signatures.push(t.bytes());break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=ps();return Array.isArray(e==null?void 0:e.signatures)&&(n.signatures=e.signatures.map(t=>(0,pr.bytesFromBase64)(t))),n},toJSON(e){const n={};return e.signatures?n.signatures=e.signatures.map(t=>
1(0,pr.base64FromBytes)(t!==void 0?t:new Uint8Array)):n.signatures=[],n},fromPartial(e){var t;const n=ps();return n.signatures=((t=e.signatures)==null?void 0:t.map(i=>i))||[],n}};function ms(){return{extraBitsStored:0,elems:new Uint8Array}}Xn.CompactBitArray={typeUrl:"/cosmos.crypto.multisig.v1beta1.CompactBitArray",encode(e,n=gr.BinaryWriter.create()){return e.extraBitsStored!==0&&n.uint32(8).uint32(e.extraBitsStored),e.elems.length!==0&&n.uint32(18).bytes(e.elems),n},decode(e,n){const t=e instanceof gr.BinaryReader?e:new gr.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=ms();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.extraBitsStored=t.uint32();break;case 2:u.elems=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=ms();return(0,pr.isSet)(e.extraBitsStored)&&(n.extraBitsStored=Number(e.extraBitsStored)),(0,pr.isSet)(e.elems)&&(n.elems=(0,pr.bytesFromBase64)(e.elems)),n},toJSON(e){const n={};return e.extraBitsStored!==void 0&&(n.extraBitsStored=Math.round(e.extraBitsStored)),e.elems!==void 0&&(n.elems=(0,pr.base64FromBytes)(e.elems!==void 0?e.elems:new Uint8Array)),n},fromPartial(e){const n=ms();return n.extraBitsStored=e.extraBitsStored??0,n.elems=e.elems??new Uint8Array,n}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SignatureDescriptor_Data_Multi=e.SignatureDescriptor_Data_Single=e.SignatureDescriptor_Data=e.SignatureDescriptor=e.SignatureDescriptors=e.signModeToJSON=e.signModeFromJSON=e.SignMode=e.protobufPackage=void 0;const n=Xn,t=Re,i=te,u=ee;e.protobufPackage="cosmos.tx.signing.v1beta1";var R;(function(p){p[p.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",p[p.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",p[p.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",p[p.SIGN_MODE_DIRECT_AUX=3]="SIGN_MODE_DIRECT_AUX",p[p.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",p[p.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",p[p.UNRECOGNIZED=-1]="UNRECOGNIZED"})(R||(e.SignMode=R={}));function v(p){switch(p){case 0:case"SIGN_MODE_UNSPECIFIED":return R.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return R.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return R.SIGN_MODE_TEXTUAL;case 3:case"SIGN_MODE_DIRECT_AUX":return R.SIGN_MODE_DIRECT_AUX;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return R.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return R.SIGN_MODE_EIP_191;case-1:case"UNRECOGNIZED":default:return R.UNRECOGNIZED}}e.signModeFromJSON=v;function E(p){switch(p){case R.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case R.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case R.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case R.SIGN_MODE_DIRECT_AUX:return"SIGN_MODE_DIRECT_AUX";case R.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case R.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";case R.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.signModeToJSON=E;function C(){return{signatures:[]}}e.SignatureDescriptors={typeUrl:"/cosmos.tx.signing.v1beta1.SignatureDescriptors",encode(p,k=i.BinaryWriter.create()){for(const o of p.signatures)e.SignatureDescriptor.encode(o,k.uint32(10).fork()).ldelim();return k},decode(p,k){const o=p instanceof i.BinaryReader?p:new i.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=C();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.signatures.push(e.SignatureDescriptor.decode(o,o.uint32()));break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=C();return Array.isArray(p==null?void 0:p.signatures)&&(k.signatures=p.signatures.map(o=>e.SignatureDescriptor.fromJSON(o))),k},toJSON(p){const k={};return p.signatures?k.signatures=p.signatures.map(o=>o?e.SignatureDescriptor.toJSON(o):void 0):k.signatures=[],k},fromPartial(p){var o;const k=C();return k.signatures=((o=p.signatures)==null?void 0:o.map(s=>e.SignatureDescriptor.fromPartial(s)))||[],k}};function D(){return{publicKey:void 0,data:void 0,sequence:BigInt(0)}}e.SignatureDescriptor={typeUrl:"/cosmos.tx.signing.v1beta1.SignatureDescriptor",encode(p,k=i.BinaryWriter.create()){return p.publicKey!==void 0&&t.Any.encode(p.publicKey,k.uint32(10).fork()).ldelim(),p.data!==void 0&&e.SignatureDescriptor_Data.encode(p.data,k.uint32(18).fork()).ldelim(),p.sequence!==BigInt(0)&&k.uint32(24).uint64(p.sequence),k},decode(p,k){const o=p instanceof i.BinaryReader?p:new i.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=D();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.publicKey=t.Any.decode(o,o.uint32());break;case 2:y.data=e.SignatureDescriptor_Data.decode(o,o.uint32());break;case 3:y.sequence=o.uint64();break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=D();return(0,u.isSet)(p.publicKey)&&(k.publicKey=t.Any.fromJSON(p.publicKey)),(0,u.
1isSet)(p.data)&&(k.data=e.SignatureDescriptor_Data.fromJSON(p.data)),(0,u.isSet)(p.sequence)&&(k.sequence=BigInt(p.sequence.toString())),k},toJSON(p){const k={};return p.publicKey!==void 0&&(k.publicKey=p.publicKey?t.Any.toJSON(p.publicKey):void 0),p.data!==void 0&&(k.data=p.data?e.SignatureDescriptor_Data.toJSON(p.data):void 0),p.sequence!==void 0&&(k.sequence=(p.sequence||BigInt(0)).toString()),k},fromPartial(p){const k=D();return p.publicKey!==void 0&&p.publicKey!==null&&(k.publicKey=t.Any.fromPartial(p.publicKey)),p.data!==void 0&&p.data!==null&&(k.data=e.SignatureDescriptor_Data.fromPartial(p.data)),p.sequence!==void 0&&p.sequence!==null&&(k.sequence=BigInt(p.sequence.toString())),k}};function _(){return{single:void 0,multi:void 0}}e.SignatureDescriptor_Data={typeUrl:"/cosmos.tx.signing.v1beta1.Data",encode(p,k=i.BinaryWriter.create()){return p.single!==void 0&&e.SignatureDescriptor_Data_Single.encode(p.single,k.uint32(10).fork()).ldelim(),p.multi!==void 0&&e.SignatureDescriptor_Data_Multi.encode(p.multi,k.uint32(18).fork()).ldelim(),k},decode(p,k){const o=p instanceof i.BinaryReader?p:new i.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=_();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.single=e.SignatureDescriptor_Data_Single.decode(o,o.uint32());break;case 2:y.multi=e.SignatureDescriptor_Data_Multi.decode(o,o.uint32());break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=_();return(0,u.isSet)(p.single)&&(k.single=e.SignatureDescriptor_Data_Single.fromJSON(p.single)),(0,u.isSet)(p.multi)&&(k.multi=e.SignatureDescriptor_Data_Multi.fromJSON(p.multi)),k},toJSON(p){const k={};return p.single!==void 0&&(k.single=p.single?e.SignatureDescriptor_Data_Single.toJSON(p.single):void 0),p.multi!==void 0&&(k.multi=p.multi?e.SignatureDescriptor_Data_Multi.toJSON(p.multi):void 0),k},fromPartial(p){const k=_();return p.single!==void 0&&p.single!==null&&(k.single=e.SignatureDescriptor_Data_Single.fromPartial(p.single)),p.multi!==void 0&&p.multi!==null&&(k.multi=e.SignatureDescriptor_Data_Multi.fromPartial(p.multi)),k}};function b(){return{mode:0,signature:new Uint8Array}}e.SignatureDescriptor_Data_Single={typeUrl:"/cosmos.tx.signing.v1beta1.Single",encode(p,k=i.BinaryWriter.create()){return p.mode!==0&&k.uint32(8).int32(p.mode),p.signature.length!==0&&k.uint32(18).bytes(p.signature),k},decode(p,k){const o=p instanceof i.BinaryReader?p:new i.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=b();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.mode=o.int32();break;case 2:y.signature=o.bytes();break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=b();return(0,u.isSet)(p.mode)&&(k.mode=v(p.mode)),(0,u.isSet)(p.signature)&&(k.signature=(0,u.bytesFromBase64)(p.signature)),k},toJSON(p){const k={};return p.mode!==void 0&&(k.mode=E(p.mode)),p.signature!==void 0&&(k.signature=(0,u.base64FromBytes)(p.signature!==void 0?p.signature:new Uint8Array)),k},fromPartial(p){const k=b();return k.mode=p.mode??0,k.signature=p.signature??new Uint8Array,k}};function f(){return{bitarray:void 0,signatures:[]}}e.SignatureDescriptor_Data_Multi={typeUrl:"/cosmos.tx.signing.v1beta1.Multi",encode(p,k=i.BinaryWriter.create()){p.bitarray!==void 0&&n.CompactBitArray.encode(p.bitarray,k.uint32(10).fork()).ldelim();for(const o of p.signatures)e.SignatureDescriptor_Data.encode(o,k.uint32(18).fork()).ldelim();return k},decode(p,k){const o=p instanceof i.BinaryReader?p:new i.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=f();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.bitarray=n.CompactBitArray.decode(o,o.uint32());break;case 2:y.signatures.push(e.SignatureDescriptor_Data.decode(o,o.uint32()));break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=f();return(0,u.isSet)(p.bitarray)&&(k.bitarray=n.CompactBitArray.fromJSON(p.bitarray)),Array.isArray(p==null?void 0:p.signatures)&&(k.signatures=p.signatures.map(o=>e.SignatureDescriptor_Data.fromJSON(o))),k},toJSON(p){const k={};return p.bitarray!==void 0&&(k.bitarray=p.bitarray?n.CompactBitArray.toJSON(p.bitarray):void 0),p.signatures?k.signatures=p.signatures.map(o=>o?e.SignatureDescriptor_Data.toJSON(o):void 0):k.signatures=[],k},fromPartial(p){var o;const k=f();return p.bitarray!==void 0&&p.bitarray!==null&&(k.bitarray=n.CompactBitArray.fromPartial(p.bitarray)),k.signatures=((o=p.signatures)==null?void 0:o.map(s=>e.SignatureDescriptor_Data.fromPartial(s)))||[],k}}})(ri);var ve={};
1Object.defineProperty(ve,"__esModule",{value:!0});ve.DecProto=ve.IntProto=ve.DecCoin=ve.Coin=ve.protobufPackage=void 0;const An=te,Cr=ee;ve.protobufPackage="cosmos.base.v1beta1";function ys(){return{denom:"",amount:""}}ve.Coin={typeUrl:"/cosmos.base.v1beta1.Coin",encode(e,n=An.BinaryWriter.create()){return e.denom!==""&&n.uint32(10).string(e.denom),e.amount!==""&&n.uint32(18).string(e.amount),n},decode(e,n){const t=e instanceof An.BinaryReader?e:new An.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=ys();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.denom=t.string();break;case 2:u.amount=t.string();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=ys();return(0,Cr.isSet)(e.denom)&&(n.denom=String(e.denom)),(0,Cr.isSet)(e.amount)&&(n.amount=String(e.amount)),n},toJSON(e){const n={};return e.denom!==void 0&&(n.denom=e.denom),e.amount!==void 0&&(n.amount=e.amount),n},fromPartial(e){const n=ys();return n.denom=e.denom??"",n.amount=e.amount??"",n}};function hs(){return{denom:"",amount:""}}ve.DecCoin={typeUrl:"/cosmos.base.v1beta1.DecCoin",encode(e,n=An.BinaryWriter.create()){return e.denom!==""&&n.uint32(10).string(e.denom),e.amount!==""&&n.uint32(18).string(e.amount),n},decode(e,n){const t=e instanceof An.BinaryReader?e:new An.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=hs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.denom=t.string();break;case 2:u.amount=t.string();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=hs();return(0,Cr.isSet)(e.denom)&&(n.denom=String(e.denom)),(0,Cr.isSet)(e.amount)&&(n.amount=String(e.amount)),n},toJSON(e){const n={};return e.denom!==void 0&&(n.denom=e.denom),e.amount!==void 0&&(n.amount=e.amount),n},fromPartial(e){const n=hs();return n.denom=e.denom??"",n.amount=e.amount??"",n}};function gs(){return{int:""}}ve.IntProto={typeUrl:"/cosmos.base.v1beta1.IntProto",encode(e,n=An.BinaryWriter.create()){return e.int!==""&&n.uint32(10).string(e.int),n},decode(e,n){const t=e instanceof An.BinaryReader?e:new An.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=gs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.int=t.string();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=gs();return(0,Cr.isSet)(e.int)&&(n.int=String(e.int)),n},toJSON(e){const n={};return e.int!==void 0&&(n.int=e.int),n},fromPartial(e){const n=gs();return n.int=e.int??"",n}};function Ss(){return{dec:""}}ve.DecProto={typeUrl:"/cosmos.base.v1beta1.DecProto",encode(e,n=An.BinaryWriter.create()){return e.dec!==""&&n.uint32(10).string(e.dec),n},decode(e,n){const t=e instanceof An.BinaryReader?e:new An.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Ss();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.dec=t.string();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Ss();return(0,Cr.isSet)(e.dec)&&(n.dec=String(e.dec)),n},toJSON(e){const n={};return e.dec!==void 0&&(n.dec=e.dec),n},fromPartial(e){const n=Ss();return n.dec=e.dec??"",n}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuxSignerData=e.Tip=e.Fee=e.ModeInfo_Multi=e.ModeInfo_Single=e.ModeInfo=e.SignerInfo=e.AuthInfo=e.TxBody=e.SignDocDirectAux=e.SignDoc=e.TxRaw=e.Tx=e.protobufPackage=void 0;const n=Re,t=ri,i=Xn,u=ve,R=te,v=ee;e.protobufPackage="cosmos.tx.v1beta1";function E(){return{body:void 0,authInfo:void 0,signatures:[]}}e.Tx={typeUrl:"/cosmos.tx.v1beta1.Tx",encode(P,U=R.BinaryWriter.create()){P.body!==void 0&&e.TxBody.encode(P.body,U.uint32(10).fork()).ldelim(),P.authInfo!==void 0&&e.AuthInfo.encode(P.authInfo,U.uint32(18).fork()).ldelim();for(const r of P.signatures)U.uint32(26).bytes(r);return U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=E();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.body=e.TxBody.decode(r,r.uint32());break;case 2:N.authInfo=e.AuthInfo.decode(r,r.uint32());break;case 3:N.signatures.push(r.bytes());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=E();return(0,v.isSet)(P.body)&&(U.body=e.TxBody.fromJSON(P.body)),(0,v.isSet)(P.authInfo)&&(U.authInfo=e.AuthInfo.fromJSON(P.authInfo)),Array.isArray(P==null?void 0:P.signatures)&&(U.signatures=P.signatures.map(r=>(0,v.bytesFromBase64)(r))),U},toJSON(P){const U={};return P.body!==void 0&&(U.body=P.body?e.TxBody.toJSON(P.body):void 0),P.authInfo!==void 0&&(U.authInfo=P.authInfo?e.AuthInfo.toJSON(P.authInfo):void 0),P.signatures?U.signatures=P.signatures.map(r=>(0,v.base64FromBytes)(r!==void 0?r:new Uint8Array)):U.signatures=[],U},fromPartial(P){var r;const U=E();return P.body!==void 0&&P.body!==null&&(U.body=e.TxBody.fromPartial(P.body)),P.authInfo!==void 0&&P.authInfo!==null&&(U.authInfo=e.AuthInfo.fromPartial(P.authInfo)),U.signatures=((r=P.signatures)==null?void 0:r.map(m=>m))||[],U}};function C(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}e.TxRaw={typeUrl:"/cosmos.tx.v1beta1.TxRaw",encode(P,U=R.BinaryWriter.create()){P.bodyBytes.length!==0&&U.uint32(10).bytes(P.bodyBytes),P.authInfoBytes.length!==0&&U.uint32(18).bytes(P.authInfoBytes);for(const r of P.signatures)U.uint32(26).bytes(r);return U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=C();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.bodyBytes=r.bytes();break;case 2:N.authInfoBytes=r.bytes();break;case 3:N.signatures.push(r.bytes());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=C();return(0,v.isSet)(P.bodyBytes)&&(U.bodyBytes=(0,v.bytesFromBase64)(P.bodyBytes)),(0,v.isSet)(P.authInfoBytes)&&(U.authInfoBytes=(0,v.bytesFromBase64)(P.authInfoBytes)),Array.isArray(P==null?void 0:P.signatures)&&(U.signatures=P.signatures.map(r=>(0,v.bytesFromBase64)(r))),U},toJSON(P){const U={};return P.bodyBytes!==void 0&&(U.bodyBytes=(0,v.base64FromBytes)(P.bodyBytes!==void 0?P.bodyBytes:new Uint8Array)),P.authInfoBytes!==void 0&&(U.authInfoBytes=(0,v.base64FromBytes)(P.authInfoBytes!==void 0?P.authInfoBytes:new Uint8Array)),P.signatures?U.signatures=P.signatures.map(r=>(0,v.base64FromBytes)(r!==void 0?r:new Uint8Array)):U.signatures=[],U},fromPartial(P){var r;const U=C();return U.bodyBytes=P.bodyBytes??new Uint8Array,U.authInfoBytes=P.authInfoBytes??new Uint8Array,U.signatures=((r=P.signatures)==null?void 0:r.map(m=>m))||[],U}};function D(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:BigInt(0)}}e.SignDoc={typeUrl:"/cosmos.tx.v1beta1.SignDoc",encode(P,U=R.BinaryWriter.create()){return P.bodyBytes.length!==0&&U.uint32(10).bytes(P.bodyBytes),P.authInfoBytes.length!==0&&U.uint32(18).bytes(P.authInfoBytes),P.chainId!==""&&U.uint32(26).string(P.chainId),P.accountNumber!==BigInt(0)&&U.uint32(32).uint64(P.accountNumber),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=D();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.bodyBytes=r.bytes();break;case 2:N.authInfoBytes=r.bytes();break;case 3:N.chainId=r.string();break;case 4:N.accountNumber=r.uint64();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=D();return(0,v.isSet)(P.bodyBytes)&&(U.bodyBytes=(0,v.bytesFromBase64)(P.bodyBytes)),(0,v.isSet)(P.authInfoBytes)&&(U.authInfoBytes=(0,v.bytesFromBase64)(P.authInfoBytes)),(0,v.isSet)(P.chainId)&&(U.chainId=String(P.chainId)),(0,v.isSet)(P.accountNumber)&&(U.accountNumber=BigInt(P.accountNumber.toString())),U},toJSON(P){const U={};return P.bodyBytes!==void 0&&(U.bodyBytes=(0,v.base64FromBytes)(P.bodyBytes!==void 0?P.bodyBytes:new Uint8Array)),P.authInfoBytes!==void 0&&(U.authInfoBytes=(0,v.base64FromBytes)(P.authInfoBytes!==void 0?P.authInfoBytes:new Uint8Array)),P.chainId!==void 0&&(U.chainId=P.chainId),P.accountNumber!==void 0&&(U.accountNumber=(P.accountNumber||BigInt(0)).toString()),U},fromPartial(P){const U=D();return U.bodyBytes=P.bodyBytes??new Uint8Array,U.authInfoBytes=P.authInfoBytes??new Uint8Array,U.chainId=P.chainId??"",P.accountNumber!==void 0&&P.accountNumber!==null&&(U.accountNumber=BigInt(P.accountNumber.toString())),U}};function _(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:"",accountNumber:BigInt(0),sequence:BigInt(0),tip:void 0}}e.SignDocDirectAux={typeUrl:"/cosmos.tx.v1beta1.SignDocDirectAux",encode(P,U=R.BinaryWriter.create()){return P.bodyBytes.length!==0&&U.uint32(10).bytes(P.bodyBytes),P.publicKey!==void 0&&n.Any.encode(P.publicKey,U.uint32(18).fork()).ldelim(),P.chainId!==""&&U.uint32(26).string(P.chainId),P.accountNumber!==BigInt(0)&&U.uint32(32).uint64(P.accountNumber),P.sequence!==BigInt(0)&&U.uint32(40).uint64(P.sequence),P.tip!==void 0&&e.Tip.encode(P.tip,U.uint32(50).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=_();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.bodyBytes=r.bytes();break;case 2:N.publicKey=n.Any.decode(r,r.uint32());break;case 3:N.chainId=r.string();break;case 4:N.accountNumber=r.uint64();break;case 5:N.sequence=r.uint64();break;case 6:N.tip=e.Tip.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=_();return(0,v.isSet)(P.bodyBytes)&&(U.bodyBytes=(0,v.bytesFromBase64)(P.bodyBytes)),(0,v.isSet)(P.publicKey)&&(U.publicKey=n.Any.fromJSON(P.publicKey)),(0,v.isSet)(P.chainId)&&(U.chainId=String(P.chainId)),(0,v.isSet)(P.accountNumber)&&(U.accountNumber=BigInt(P.accountNumber.toString())),(0,v.isSet)(P.sequence)&&(U.sequence=BigInt(P.sequence.toString())),(0,v.isSet)(P.tip)&&(U.tip=e.Tip.fromJSON(P.tip)),U},toJSON(P){const U={};return P.bodyBytes!==void 0&&(U.bodyBytes=(0,v.base64FromBytes)(P.bodyBytes!==void 0?P.bodyBytes:new Uint8Array)),P.publicKey!==void 0&&(U.publicKey=P.publicKey?n.Any.toJSON(P.publicKey):void 0),P.chainId!==void 0&&(U.chainId=P.chainId),P.accountNumber!==void 0&&(U.accountNumber=(P.accountNumber||BigInt(0)).toString()),P.sequence!==void 0&&(U.sequence=(P.sequence||BigInt(0)).toString()),P.tip!==void 0&&(U.tip=P.tip?e.Tip.toJSON(P.tip):void 0),U},fromPartial(P){const U=_();return U.bodyBytes=P.bodyBytes??new Uint8Array,P.publicKey!==void 0&&P.publicKey!==null&&(U.publicKey=n.Any.fromPartial(P.publicKey)),U.chainId=P.chainId??"",P.accountNumber!==void 0&&P.accountNumber!==null&&(U.accountNumber=BigInt(P.accountNumber.toString())),P.sequence!==void 0&&P.sequence!==null&&(U.sequence=BigInt(P.sequence.toString())),P.tip!==void 0&&P.tip!==null&&(U.tip=e.Tip.fromPartial(P.tip)),U}};function b(){return{messages:[],memo:"",timeoutHeight:BigInt(0),extensionOptions:[],nonCriticalExtensionOptions:[]}}e.TxBody={typeUrl:"/cosmos.tx.v1beta1.TxBody",encode(P,U=R.BinaryWriter.create()){for(const r of P.messages)n.Any.encode(r,U.uint32(10).fork()).ldelim();P.memo!==""&&U.uint32(18).string(P.memo),P.timeoutHeight!==BigInt(0)&&U.uint32(24).uint64(P.timeoutHeight);for(const r of P.extensionOptions)n.Any.encode(r,U.uint32(8186).fork()).ldelim();for(const r of P.nonCriticalExtensionOptions)n.Any.encode(r,U.uint32(16378).fork()).ldelim();return U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=b();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.messages.push(n.Any.decode(r,r.uint32()));break;case 2:N.memo=r.string();break;case 3:N.timeoutHeight=r.uint64();break;case 1023:N.extensionOptions.push(n.Any.decode(r,r.uint32()));break;case 2047:N.nonCriticalExtensionOptions.push(n.Any.decode(r,r.uint32()));break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=b();return Array.isArray(P==null?void 0:P.messages)&&(U.messages=P.messages.map(r=>n.Any.fromJSON(r))),(0,v.isSet)(P.memo)&&(U.memo=String(P.memo)),(0,v.isSet)(P.timeoutHeight)&&(U.timeoutHeight=BigInt(P.timeoutHeight.toString())),Array.isArray(P==null?void 0:P.extensionOptions)&&(U.extensionOptions=P.extensionOptions.map(r=>n.Any.fromJSON(r))),Array.isArray(P==null?void 0:P.nonCriticalExtensionOptions)&&(U.nonCriticalExtensionOptions=P.nonCriticalExtensionOptions.map(r=>n.Any.fromJSON(r))),U},toJSON(P){const U={};return P.messages?U.messages=P.messages.map(r=>r?n.Any.toJSON(r):void 0):U.messages=[],P.memo!==void 0&&(U.memo=P.memo),P.timeoutHeight!==void 0&&(U.timeoutHeight=(P.timeoutHeight||BigInt(0)).toString()),P.extensionOptions?U.extensionOptions=P.extensionOptions.map(r=>r?n.Any.toJSON(r):void 0):U.extensionOptions=[],P.nonCriticalExtensionOptions?U.nonCriticalExtensionOptions=P.nonCriticalExtensionOptions.map(r=>r?n.Any.toJSON(r):void 0):U.nonCriticalExtensionOptions=[],U},fromPartial(P){var r,m,N;const U=b();return U.messages=((r=P.messages)==null?void 0:r.map(V=>n.Any.fromPartial(V)))||[],U.memo=P.memo??"",P.timeoutHeight!==void 0&&P.timeoutHeight!==null&&(U.timeoutHeight=BigInt(P.timeoutHeight.toString())),U.extensionOptions=((m=P.extensionOptions)==null?void 0:m.map(V=>n.Any.fromPartial(V)))||[],U.nonCriticalExtensionOptions=((N=P.nonCriticalExtensionOptions)==null?void 0:N.map(V=>n.Any.fromPartial(V)))||[],U}};function f(){return{signerInfos:[],fee:void 0,tip:void 0}}e.AuthInfo={typeUrl:"/cosmos.tx.v1beta1.AuthInfo",encode(P,U=R.BinaryWriter.create()){for(const r of P.signerInfos)e.SignerInfo.encode(r,U.uint32(10).fork()).ldelim();return P.fee!==void 0&&e.Fee.encode(P.fee,U.uint32(18).fork()).ldelim(),P.tip!==void 0&&e.Tip.encode(P.tip,U.uint32(26).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=f();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.signerInfos.push(e.SignerInfo.decode(r,r.uint32()));break;case 2:N.fee=e.Fee.decode(r,r.uint32());break;case 3:N.tip=e.Tip.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N}
1,fromJSON(P){const U=f();return Array.isArray(P==null?void 0:P.signerInfos)&&(U.signerInfos=P.signerInfos.map(r=>e.SignerInfo.fromJSON(r))),(0,v.isSet)(P.fee)&&(U.fee=e.Fee.fromJSON(P.fee)),(0,v.isSet)(P.tip)&&(U.tip=e.Tip.fromJSON(P.tip)),U},toJSON(P){const U={};return P.signerInfos?U.signerInfos=P.signerInfos.map(r=>r?e.SignerInfo.toJSON(r):void 0):U.signerInfos=[],P.fee!==void 0&&(U.fee=P.fee?e.Fee.toJSON(P.fee):void 0),P.tip!==void 0&&(U.tip=P.tip?e.Tip.toJSON(P.tip):void 0),U},fromPartial(P){var r;const U=f();return U.signerInfos=((r=P.signerInfos)==null?void 0:r.map(m=>e.SignerInfo.fromPartial(m)))||[],P.fee!==void 0&&P.fee!==null&&(U.fee=e.Fee.fromPartial(P.fee)),P.tip!==void 0&&P.tip!==null&&(U.tip=e.Tip.fromPartial(P.tip)),U}};function p(){return{publicKey:void 0,modeInfo:void 0,sequence:BigInt(0)}}e.SignerInfo={typeUrl:"/cosmos.tx.v1beta1.SignerInfo",encode(P,U=R.BinaryWriter.create()){return P.publicKey!==void 0&&n.Any.encode(P.publicKey,U.uint32(10).fork()).ldelim(),P.modeInfo!==void 0&&e.ModeInfo.encode(P.modeInfo,U.uint32(18).fork()).ldelim(),P.sequence!==BigInt(0)&&U.uint32(24).uint64(P.sequence),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=p();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.publicKey=n.Any.decode(r,r.uint32());break;case 2:N.modeInfo=e.ModeInfo.decode(r,r.uint32());break;case 3:N.sequence=r.uint64();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=p();return(0,v.isSet)(P.publicKey)&&(U.publicKey=n.Any.fromJSON(P.publicKey)),(0,v.isSet)(P.modeInfo)&&(U.modeInfo=e.ModeInfo.fromJSON(P.modeInfo)),(0,v.isSet)(P.sequence)&&(U.sequence=BigInt(P.sequence.toString())),U},toJSON(P){const U={};return P.publicKey!==void 0&&(U.publicKey=P.publicKey?n.Any.toJSON(P.publicKey):void 0),P.modeInfo!==void 0&&(U.modeInfo=P.modeInfo?e.ModeInfo.toJSON(P.modeInfo):void 0),P.sequence!==void 0&&(U.sequence=(P.sequence||BigInt(0)).toString()),U},fromPartial(P){const U=p();return P.publicKey!==void 0&&P.publicKey!==null&&(U.publicKey=n.Any.fromPartial(P.publicKey)),P.modeInfo!==void 0&&P.modeInfo!==null&&(U.modeInfo=e.ModeInfo.fromPartial(P.modeInfo)),P.sequence!==void 0&&P.sequence!==null&&(U.sequence=BigInt(P.sequence.toString())),U}};function k(){return{single:void 0,multi:void 0}}e.ModeInfo={typeUrl:"/cosmos.tx.v1beta1.ModeInfo",encode(P,U=R.BinaryWriter.create()){return P.single!==void 0&&e.ModeInfo_Single.encode(P.single,U.uint32(10).fork()).ldelim(),P.multi!==void 0&&e.ModeInfo_Multi.encode(P.multi,U.uint32(18).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=k();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.single=e.ModeInfo_Single.decode(r,r.uint32());break;case 2:N.multi=e.ModeInfo_Multi.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=k();return(0,v.isSet)(P.single)&&(U.single=e.ModeInfo_Single.fromJSON(P.single)),(0,v.isSet)(P.multi)&&(U.multi=e.ModeInfo_Multi.fromJSON(P.multi)),U},toJSON(P){const U={};return P.single!==void 0&&(U.single=P.single?e.ModeInfo_Single.toJSON(P.single):void 0),P.multi!==void 0&&(U.multi=P.multi?e.ModeInfo_Multi.toJSON(P.multi):void 0),U},fromPartial(P){const U=k();return P.single!==void 0&&P.single!==null&&(U.single=e.ModeInfo_Single.fromPartial(P.single)),P.multi!==void 0&&P.multi!==null&&(U.multi=e.ModeInfo_Multi.fromPartial(P.multi)),U}};function o(){return{mode:0}}e.ModeInfo_Single={typeUrl:"/cosmos.tx.v1beta1.Single",encode(P,U=R.BinaryWriter.create()){return P.mode!==0&&U.uint32(8).int32(P.mode),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=o();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.mode=r.int32();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=o();return(0,v.isSet)(P.mode)&&(U.mode=(0,t.signModeFromJSON)(P.mode)),U},toJSON(P){const U={};return P.mode!==void 0&&(U.mode=(0,t.signModeToJSON)(P.mode)),U},fromPartial(P){const U=o();return U.mode=P.mode??0,U}};function s(){return{bitarray:void 0,modeInfos:[]}}e.ModeInfo_Multi={typeUrl:"/cosmos.tx.v1beta1.Multi",encode(P,U=R.BinaryWriter.create()){P.b
1itarray!==void 0&&i.CompactBitArray.encode(P.bitarray,U.uint32(10).fork()).ldelim();for(const r of P.modeInfos)e.ModeInfo.encode(r,U.uint32(18).fork()).ldelim();return U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=s();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.bitarray=i.CompactBitArray.decode(r,r.uint32());break;case 2:N.modeInfos.push(e.ModeInfo.decode(r,r.uint32()));break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=s();return(0,v.isSet)(P.bitarray)&&(U.bitarray=i.CompactBitArray.fromJSON(P.bitarray)),Array.isArray(P==null?void 0:P.modeInfos)&&(U.modeInfos=P.modeInfos.map(r=>e.ModeInfo.fromJSON(r))),U},toJSON(P){const U={};return P.bitarray!==void 0&&(U.bitarray=P.bitarray?i.CompactBitArray.toJSON(P.bitarray):void 0),P.modeInfos?U.modeInfos=P.modeInfos.map(r=>r?e.ModeInfo.toJSON(r):void 0):U.modeInfos=[],U},fromPartial(P){var r;const U=s();return P.bitarray!==void 0&&P.bitarray!==null&&(U.bitarray=i.CompactBitArray.fromPartial(P.bitarray)),U.modeInfos=((r=P.modeInfos)==null?void 0:r.map(m=>e.ModeInfo.fromPartial(m)))||[],U}};function y(){return{amount:[],gasLimit:BigInt(0),payer:"",granter:""}}e.Fee={typeUrl:"/cosmos.tx.v1beta1.Fee",encode(P,U=R.BinaryWriter.create()){for(const r of P.amount)u.Coin.encode(r,U.uint32(10).fork()).ldelim();return P.gasLimit!==BigInt(0)&&U.uint32(16).uint64(P.gasLimit),P.payer!==""&&U.uint32(26).string(P.payer),P.granter!==""&&U.uint32(34).string(P.granter),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=y();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.amount.push(u.Coin.decode(r,r.uint32()));break;case 2:N.gasLimit=r.uint64();break;case 3:N.payer=r.string();break;case 4:N.granter=r.string();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=y();return Array.isArray(P==null?void 0:P.amount)&&(U.amount=P.amount.map(r=>u.Coin.fromJSON(r))),(0,v.isSet)(P.gasLimit)&&(U.gasLimit=BigInt(P.gasLimit.toString())),(0,v.isSet)(P.payer)&&(U.payer=String(P.payer)),(0,v.isSet)(P.granter)&&(U.granter=String(P.granter)),U},toJSON(P){const U={};return P.amount?U.amount=P.amount.map(r=>r?u.Coin.toJSON(r):void 0):U.amount=[],P.gasLimit!==void 0&&(U.gasLimit=(P.gasLimit||BigInt(0)).toString()),P.payer!==void 0&&(U.payer=P.payer),P.granter!==void 0&&(U.granter=P.granter),U},fromPartial(P){var r;const U=y();return U.amount=((r=P.amount)==null?void 0:r.map(m=>u.Coin.fromPartial(m)))||[],P.gasLimit!==void 0&&P.gasLimit!==null&&(U.gasLimit=BigInt(P.gasLimit.toString())),U.payer=P.payer??"",U.granter=P.granter??"",U}};function w(){return{amount:[],tipper:""}}e.Tip={typeUrl:"/cosmos.tx.v1beta1.Tip",encode(P,U=R.BinaryWriter.create()){for(const r of P.amount)u.Coin.encode(r,U.uint32(10).fork()).ldelim();return P.tipper!==""&&U.uint32(18).string(P.tipper),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=w();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.amount.push(u.Coin.decode(r,r.uint32()));break;case 2:N.tipper=r.string();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=w();return Array.isArray(P==null?void 0:P.amount)&&(U.amount=P.amount.map(r=>u.Coin.fromJSON(r))),(0,v.isSet)(P.tipper)&&(U.tipper=String(P.tipper)),U},toJSON(P){const U={};return P.amount?U.amount=P.amount.map(r=>r?u.Coin.toJSON(r):void 0):U.amount=[],P.tipper!==void 0&&(U.tipper=P.tipper),U},fromPartial(P){var r;const U=w();return U.amount=((r=P.amount)==null?void 0:r.map(m=>u.Coin.fromPartial(m)))||[],U.tipper=P.tipper??"",U}};function J(){return{address:"",signDoc:void 0,mode:0,sig:new Uint8Array}}e.AuxSignerData={typeUrl:"/cosmos.tx.v1beta1.AuxSignerData",encode(P,U=R.BinaryWriter.create()){return P.address!==""&&U.uint32(10).string(P.address),P.signDoc!==void 0&&e.SignDocDirectAux.encode(P.signDoc,U.uint32(18).fork()).ldelim(),P.mode!==0&&U.uint32(24).int32(P.mode),P.sig.length!==0&&U.uint32(34).bytes(P.sig),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=J();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.address=r.string();break;case 2:N.signDoc=e.SignDocDirectAux.decode(r,r.uint32());break;case 3:N.mode=r.int32();break;case 4:N.sig=r.bytes();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=J();return(0,v.isSet)(P.address)&&(U.address=String(P.address)),(0,v.isSet)(P.signDoc)&&(U.signDoc=e.SignDocDirectAux.fromJSON(P.signDoc)),(0,v.isSet)(P.mode)&&(U.mode=(0,t.sign
1ModeFromJSON)(P.mode)),(0,v.isSet)(P.sig)&&(U.sig=(0,v.bytesFromBase64)(P.sig)),U},toJSON(P){const U={};return P.address!==void 0&&(U.address=P.address),P.signDoc!==void 0&&(U.signDoc=P.signDoc?e.SignDocDirectAux.toJSON(P.signDoc):void 0),P.mode!==void 0&&(U.mode=(0,t.signModeToJSON)(P.mode)),P.sig!==void 0&&(U.sig=(0,v.base64FromBytes)(P.sig!==void 0?P.sig:new Uint8Array)),U},fromPartial(P){const U=J();return U.address=P.address??"",P.signDoc!==void 0&&P.signDoc!==null&&(U.signDoc=e.SignDocDirectAux.fromPartial(P.signDoc)),U.mode=P.mode??0,U.sig=P.sig??new Uint8Array,U}}})(it);Object.defineProperty(Vo,"__esModule",{value:!0});Vo.decodeTxRaw=void 0;const ks=it;function Om(e){const n=ks.TxRaw.decode(e);return{authInfo:ks.AuthInfo.decode(n.authInfoBytes),body:ks.TxBody.decode(n.bodyBytes),signatures:n.signatures}}Vo.decodeTxRaw=Om;var wr={},ot={},un={},Ge={},Ui={},Qo={},bm=re&&re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.Decimal=void 0;const Jn=bm(Ho),Gu=100;class we{static fromUserInput(n,t){we.verifyFractionalDigits(t);const i=n.match(/[^0-9.]/);if(i)throw new Error(`Invalid character at position ${i.index+1}`);let u,R;if(n==="")u="0",R="";else if(n.search(/\./)===-1)u=n,R="";else{const E=n.split(".");switch(E.length){case 0:case 1:throw new Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!E[1])throw new Error("Fractional part missing");u=E[0],R=E[1].replace(/0+$/,"");break;default:throw new Error("More than one separator found")}}if(R.length>t)throw new Error("Got more fractional digits than supported");const v=`${u}${R.padEnd(t,"0")}`;return new we(v,t)}static fromAtomics(n,t){return we.verifyFractionalDigits(t),new we(n,t)}static zero(n){return we.verifyFractionalDigits(n),new we("0",n)}static one(n){return we.verifyFractionalDigits(n),new we("1"+"0".repeat(n),n)}static verifyFractionalDigits(n){if(!Number.isInteger(n))throw new Error("Fractional digits is not an integer");if(n<0)throw new Error("Fractional digits must not be negative");if(n>Gu)throw new Error(`Fractional digits must not exceed ${Gu}`)}static compare(n,t){if(n.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");return n.data.atomics.cmp(new Jn.default(t.atomics))}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}constructor(n,t){if(!n.match(/^[0-9]+$/))throw new Error("Invalid string format. Only non-negative integers in decimal representation supported.");this.data={atomics:new Jn.default(n),fractionalDigits:t}}clone(){return new we(this.atomics,this.fractionalDigits)}floor(){const n=new Jn.default(10).pow(new Jn.default(this.data.fractionalDigits)),t=this.data.atomics.div(n);return this.data.atomics.mod(n).isZero()?this.clone():we.fromAtomics(t.mul(n).toString(),this.fractionalDigits)}ceil(){const n=new Jn.default(10).pow(new Jn.default(this.data.fractionalDigits)),t=this.data.atomics.div(n);return this.data.atomics.mod(n).isZero()?this.clone():we.fromAtomics(t.addn(1).mul(n).toString(),this.fractionalDigits)}toString(){const n=new Jn.default(10).pow(new Jn.default(this.data.fractionalDigits)),t=this.data.atomics.div(n),i=this.data.atomics.mod(n);if(i.isZero())return t.toString();{const R=i.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return`${t.toString()}.${R}`}}toFloatApproximation(){const n=Number(this.toString());if(Number.isNaN(n))throw new Error("Conversion to number failed");return n}plus(n){if(this.fractionalDigits!==n.fractionalDigits)throw new Error("Fractional digits do not match");const t=this.data.atomics.add(new Jn.default(n.atomics));return new we(t.toString(),this.fractionalDigits)}minus(n){if(this.fractionalDigits!==n.fractionalDigits)throw new Error("Fractional digits do not match");const t=this.data.atomics.sub(new Jn.default(n.atomics));if(t.ltn(0))throw new Error("Difference must not be negative");return new we(t.toString(),this.fractionalDigits)}multiply(n){const t=this.data.atomics.mul(new Jn.default(n.toString()));return new we(t.toString(),this.fractionalDigits)}equals(n){return we.compare(this,n)===0}isLessThan(n){return we.compare(this,n)<0}isLessThanOrEqual(n){return we.compare(this,n)<=0}isGreaterThan(n){return we.compare(this,n)>0}isGreaterThanOrEqual(n){return we.compare(this,n)>=0}}Qo.Decimal=we;var Gn={}
1,Am=re&&re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.Uint64=Gn.Uint53=Gn.Int53=Gn.Uint32=void 0;const So=Am(Ho),Im=new So.default("18446744073709551615",10,"be");class bi{static fromBigEndianBytes(n){return bi.fromBytes(n)}static fromBytes(n,t="be"){if(n.length!==4)throw new Error("Invalid input length. Expected 4 bytes.");for(let u=0;u<n.length;++u)if(!Number.isInteger(n[u])||n[u]>255||n[u]<0)throw new Error("Invalid value in byte. Found: "+n[u]);const i=t==="be"?n:Array.from(n).reverse();return new bi(i[0]*2**24+i[1]*2**16+i[2]*2**8+i[3])}static fromString(n){if(!n.match(/^[0-9]+$/))throw new Error("Invalid string format");return new bi(Number.parseInt(n,10))}constructor(n){if(Number.isNaN(n))throw new Error("Input is not a number");if(!Number.isInteger(n))throw new Error("Input is not an integer");if(n<0||n>4294967295)throw new Error("Input not in uint32 range: "+n.toString());this.data=n}toBytesBigEndian(){return new Uint8Array([Math.floor(this.data/2**24)&255,Math.floor(this.data/2**16)&255,Math.floor(this.data/2**8)&255,Math.floor(this.data/2**0)&255])}toBytesLittleEndian(){return new Uint8Array([Math.floor(this.data/2**0)&255,Math.floor(this.data/2**8)&255,Math.floor(this.data/2**16)&255,Math.floor(this.data/2**24)&255])}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}}Gn.Uint32=bi;class Ti{static fromString(n){if(!n.match(/^-?[0-9]+$/))throw new Error("Invalid string format");return new Ti(Number.parseInt(n,10))}constructor(n){if(Number.isNaN(n))throw new Error("Input is not a number");if(!Number.isInteger(n))throw new Error("Input is not an integer");if(n<Number.MIN_SAFE_INTEGER||n>Number.MAX_SAFE_INTEGER)throw new Error("Input not in int53 range: "+n.toString());this.data=n}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}}Gn.Int53=Ti;class Ld{static fromString(n){const t=Ti.fromString(n);return new Ld(t.toNumber())}constructor(n){const t=new Ti(n);if(t.toNumber()<0)throw new Error("Input is negative");this.data=t}toNumber(){return this.data.toNumber()}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}}Gn.Uint53=Ld;class mr{static fromBytesBigEndian(n){return mr.fromBytes(n)}static fromBytes(n,t="be"){if(n.length!==8)throw new Error("Invalid input length. Expected 8 bytes.");for(let u=0;u<n.length;++u)if(!Number.isInteger(n[u])||n[u]>255||n[u]<0)throw new Error("Invalid value in byte. Found: "+n[u]);const i=t==="be"?Array.from(n):Array.from(n).reverse();return new mr(new So.default(i))}static fromString(n){if(!n.match(/^[0-9]+$/))throw new Error("Invalid string format");return new mr(new So.default(n,10,"be"))}static fromNumber(n){if(Number.isNaN(n))throw new Error("Input is not a number");if(!Number.isInteger(n))throw new Error("Input is not an integer");let t;try{t=new So.default(n)}catch{throw new Error("Input is not a safe integer")}return new mr(t)}constructor(n){if(n.isNeg())throw new Error("Input is negative");if(n.gt(Im))throw new Error("Input exceeds uint64 range");this.data=n}toBytesBigEndian(){return Uint8Array.from(this.data.toArray("be",8))}toBytesLittleEndian(){return Uint8Array.from(this.data.toArray("le",8))}toString(){return this.data.toString(10)}toBigInt(){return BigInt(this.toString())}toNumber(){return this.data.toNumber()}}Gn.Uint64=mr;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Uint64=e.Uint53=e.Uint32=e.Int53=e.Decimal=void 0;var n=Qo;Object.defineProperty(e,"Decimal",{enumerable:!0,get:function(){return n.Decimal}});var t=Gn;Object.defineProperty(e,"Int53",{enumerable:!0,get:function(){return t.Int53}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return t.Uint32}}),Object.defineProperty(e,"Uint53",{enumerable:!0,get:function(){return t.Uint53}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return t.Uint64}})})(Ui);var $d={},_r={};Object.defineProperty(_r,"__esModule",{value:!0});_r.arrayContentStartsWith=_r.arrayContentEquals=void 0;function Tm(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;++t)if(e[t]!==n[t])return!1;return!0}_r.arrayContentEquals=Tm;function Nm(e,n){if(e.length<n.length)return!1;for(let t=0;t<n.length;++t)if(e[t]!==n[t])return!1;return!0}_r.arrayContentStartsWith=Nm;var mt={};
1Object.defineProperty(mt,"__esModule",{value:!0});mt.assertDefinedAndNotNull=mt.assertDefined=mt.assert=void 0;function Cm(e,n){if(!e)throw new Error(n||"condition is not truthy")}mt.assert=Cm;function wm(e,n){if(e===void 0)throw new Error(n??"value is undefined")}mt.assertDefined=wm;function _m(e,n){if(e==null)throw new Error(n??"value is undefined or null")}mt.assertDefinedAndNotNull=_m;var Wo={};Object.defineProperty(Wo,"__esModule",{value:!0});Wo.sleep=void 0;async function Em(e){return new Promise(n=>setTimeout(n,e))}Wo.sleep=Em;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});yt.isDefined=yt.isUint8Array=yt.isNonNullObject=void 0;function Lc(e){return typeof e=="object"&&e!==null}yt.isNonNullObject=Lc;function Jm(e){return!(!Lc(e)||Object.prototype.toString.call(e)!=="[object Uint8Array]"||typeof Buffer<"u"&&typeof Buffer.isBuffer<"u"&&Buffer.isBuffer(e))}yt.isUint8Array=Jm;function Um(e){return e!==void 0}yt.isDefined=Um;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isUint8Array=e.isNonNullObject=e.isDefined=e.sleep=e.assertDefinedAndNotNull=e.assertDefined=e.assert=e.arrayContentStartsWith=e.arrayContentEquals=void 0;var n=_r;Object.defineProperty(e,"arrayContentEquals",{enumerable:!0,get:function(){return n.arrayContentEquals}}),Object.defineProperty(e,"arrayContentStartsWith",{enumerable:!0,get:function(){return n.arrayContentStartsWith}});var t=mt;Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return t.assert}}),Object.defineProperty(e,"assertDefined",{enumerable:!0,get:function(){return t.assertDefined}}),Object.defineProperty(e,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return t.assertDefinedAndNotNull}});var i=Wo;Object.defineProperty(e,"sleep",{enumerable:!0,get:function(){return i.sleep}});var u=yt;Object.defineProperty(e,"isDefined",{enumerable:!0,get:function(){return u.isDefined}}),Object.defineProperty(e,"isNonNullObject",{enumerable:!0,get:function(){return u.isNonNullObject}}),Object.defineProperty(e,"isUint8Array",{enumerable:!0,get:function(){return u.isUint8Array}})})($d);var Di={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isMultisigThresholdPubkey=e.isSinglePubkey=e.pubkeyType=e.isSecp256k1Pubkey=e.isEd25519Pubkey=void 0;function n(R){return R.type==="tendermint/PubKeyEd25519"}e.isEd25519Pubkey=n;function t(R){return R.type==="tendermint/PubKeySecp256k1"}e.isSecp256k1Pubkey=t,e.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"};function i(R){return[e.pubkeyType.ed25519,e.pubkeyType.secp256k1,e.pubkeyType.sr25519].includes(R.type)}e.isSinglePubkey=i;function u(R){return R.type==="tendermint/PubKeyMultisigThreshold"}e.isMultisigThresholdPubkey=u})(Di);Object.defineProperty(Ge,"__esModule",{value:!0});Ge.encodeBech32Pubkey=Ge.encodeAminoPubkey=Ge.decodeBech32Pubkey=Ge.decodeAminoPubkey=Ge.encodeEd25519Pubkey=Ge.encodeSecp256k1Pubkey=void 0;const nn=Pe,Dm=Ui,vi=$d,et=Di;function Mm(e){if(e.length!==33||e[0]!==2&&e[0]!==3)throw new Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:et.pubkeyType.secp256k1,value:(0,nn.toBase64)(e)}}Ge.encodeSecp256k1Pubkey=Mm;function Hm(e){if(e.length!==32)throw new Error("Ed25519 public key must be 32 bytes long");return{type:et.pubkeyType.ed25519,value:(0,nn.toBase64)(e)}}Ge.encodeEd25519Pubkey=Hm;const kd=(0,nn.fromHex)("eb5ae98721"),Pd=(0,nn.fromHex)("1624de6420"),Lu=(0,nn.fromHex)("0dfb100520"),bo=(0,nn.fromHex)("22c1f7e2");function Kd(e){if((0,vi.arrayContentStartsWith)(e,kd)){const n=e.slice(kd.length);if(n.length!==33)throw new Error("Invalid rest data length. Expected 33 bytes (compressed secp256k1 pubkey).");return{type:et.pubkeyType.secp256k1,value:(0,nn.toBase64)(n)}}else if((0,vi.arrayContentStartsWith)(e,Pd)){const n=e.slice(Pd.length);if(n.length!==32)throw new Error("Invalid rest data length. Expected 32 bytes (Ed25519 pubkey).");return{type:et.pubkeyType.ed25519,value:(0,nn.toBase64)(n)}}else if((0,vi.arrayContentStartsWith)(e,Lu)){const n=e.slice(Lu.length);if(n.length!==32)throw new Error("Invalid rest data length. Expected 32 bytes (Sr25519 pubkey).");return{type:et.pubkeyType.sr25519,value:(0,nn.toBase64)(n)}}else{if((0,vi.arrayContentStartsWith)(e,bo))return Vm(e);throw new Error("Unsupported public key type. Amino data starts with: "+(0,nn.to
1Hex)(e.slice(0,5)))}}Ge.decodeAminoPubkey=Kd;function qm(e){const{data:n}=(0,nn.fromBech32)(e);return Kd(n)}Ge.decodeBech32Pubkey=qm;function $u(e){if(e.length<1)throw new Error("Can't decode varint. EOF");if(e[0]>127)throw new Error("Decoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.Varint implementation from the Go standard library and write some tests.");return[e[0],1]}function Vm(e){const n=Array.from(e),t=n.splice(0,bo.length);if(!(0,vi.arrayContentStartsWith)(t,bo))throw new Error("Invalid multisig prefix.");if(n.shift()!=8)throw new Error("Invalid multisig data. Expecting 0x08 prefix before threshold.");const[i,u]=$u(n);n.splice(0,u);const R=[];for(;n.length>0;){if(n.shift()!=18)throw new Error("Invalid multisig data. Expecting 0x12 prefix before participant pubkey length.");const[v,E]=$u(n);if(n.splice(0,E),n.length<v)throw new Error("Invalid multisig data length.");const C=n.splice(0,v),D=Kd(Uint8Array.from(C));R.push(D)}return{type:et.pubkeyType.multisigThreshold,value:{threshold:i.toString(),pubkeys:R}}}function Ku(e){const n=Dm.Uint53.fromString(e.toString()).toNumber();if(n>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[n]}function zd(e){if((0,et.isMultisigThresholdPubkey)(e)){const n=Array.from(bo);n.push(8),n.push(...Ku(e.value.threshold));for(const t of e.value.pubkeys.map(i=>zd(i)))n.push(18),n.push(...Ku(t.length)),n.push(...t);return new Uint8Array(n)}else{if((0,et.isEd25519Pubkey)(e))return new Uint8Array([...Pd,...(0,nn.fromBase64)(e.value)]);if((0,et.isSecp256k1Pubkey)(e))return new Uint8Array([...kd,...(0,nn.fromBase64)(e.value)]);throw new Error("Unsupported pubkey type")}}Ge.encodeAminoPubkey=zd;function Qm(e,n){return(0,nn.toBech32)(n,zd(e))}Ge.encodeBech32Pubkey=Qm;Object.defineProperty(un,"__esModule",{value:!0});un.pubkeyToAddress=un.pubkeyToRawAddress=un.rawSecp256k1PubkeyToRawAddress=un.rawEd25519PubkeyToRawAddress=void 0;const Ao=fn,Rd=Pe,Wm=Ge,Ps=Di;function $c(e){if(e.length!==32)throw new Error(`Invalid Ed25519 pubkey length: ${e.length}`);return(0,Ao.sha256)(e).slice(0,20)}un.rawEd25519PubkeyToRawAddress=$c;function Kc(e){if(e.length!==33)throw new Error(`Invalid Secp256k1 pubkey length (compressed): ${e.length}`);return(0,Ao.ripemd160)((0,Ao.sha256)(e))}un.rawSecp256k1PubkeyToRawAddress=Kc;function zc(e){if((0,Ps.isSecp256k1Pubkey)(e)){const n=(0,Rd.fromBase64)(e.value);return Kc(n)}else if((0,Ps.isEd25519Pubkey)(e)){const n=(0,Rd.fromBase64)(e.value);return $c(n)}else if((0,Ps.isMultisigThresholdPubkey)(e)){const n=(0,Wm.encodeAminoPubkey)(e);return(0,Ao.sha256)(n).slice(0,20)}else throw new Error("Unsupported public key type")}un.pubkeyToRawAddress=zc;function Fm(e,n){return(0,Rd.toBech32)(n,zc(e))}un.pubkeyToAddress=Fm;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.addCoins=Ln.parseCoins=Ln.coins=Ln.coin=void 0;const Bd=Ui;function Zc(e,n){let t;if(typeof e=="number")try{t=new Bd.Uint53(e).toString()}catch{throw new Error("Given amount is not a safe integer. Consider using a string instead to overcome the limitations of JS numbers.")}else{if(!e.match(/^[0-9]+$/))throw new Error("Invalid unsigned integer string format");t=e.replace(/^0*/,"")||"0"}return{amount:t,denom:n}}Ln.coin=Zc;function Gm(e,n){return[Zc(e,n)]}Ln.coins=Gm;function Lm(e){return e.replace(/\s/g,"").split(",").filter(Boolean).map(n=>{const t=n.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/]{2,127})$/);if(!t)throw new Error("Got an invalid coin string");return{amount:t[1].replace(/^0+/,"")||"0",denom:t[2]}})}Ln.parseCoins=Lm;function $m(e,n){if(e.denom!==n.denom)throw new Error("Trying to add two coins with different denoms");return{amount:Bd.Decimal.fromAtomics(e.amount,0).plus(Bd.Decimal.fromAtomics(n.amount,0)).atomics,denom:e.denom}}Ln.addCoins=$m;var Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.createMultisigThresholdPubkey=Er.compareArrays=void 0;const zu=Pe,Km=Ui,Zu=un;function Yc(e,n){const t=(0,zu.toHex)(e),i=(0,zu.toHex)(n);return t===i?0:t<i?-1:1}Er.compareArrays=Yc;function zm(e,n,t=!1){const i=new Km.Uint53(n);if(i.toNumber()>e.length)throw new Error(`Threshold k = ${i.toNumber()} exceeds number of keys n = ${e.length}`);const u=t?e:Array.from(e).sort((R,v)=>{const E=(0,Zu.pubkeyToRawAddress)(R),C=(0,Zu.pubkeyToRawAddress)(v);return Yc(E,C)});return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:i.toString(),pubkeys:u}}}Er.createMultisigThresholdPubkey=zm;var Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});Fo.omitDefault=void 0;function Zm(e){switch(typeof e){case"string":return e===""?void 0:e;case"number":return e===0?void 0:e;case"bigint":return e===BigInt(0)?void 0:e;case"boolean":return e||void 0;default:throw new Error(`Got unsupported type '${typeof e}'`)}}Fo.omitDefault=Zm;var Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.makeCosmoshubPath=void 0;const ai=fn;function Ym(e){return[ai.Slip10RawIndex.hardened(44),ai.Slip10RawIndex.hardened(118),ai.Slip10RawIndex.hardened(0),ai.Slip10RawIndex.normal(0),ai.Slip10RawIndex.normal(e)]}Mi.makeCosmoshubPath=Ym;var Jr={},Nt={};
1Object.defineProperty(Nt,"__esModule",{value:!0});Nt.decodeSignature=Nt.encodeSecp256k1Signature=void 0;const vd=Pe,Xm=Ge,xm=Di;function jm(e,n){if(n.length!==64)throw new Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return{pub_key:(0,Xm.encodeSecp256k1Pubkey)(e),signature:(0,vd.toBase64)(n)}}Nt.encodeSecp256k1Signature=jm;function ey(e){switch(e.pub_key.type){case xm.pubkeyType.secp256k1:return{pubkey:(0,vd.fromBase64)(e.pub_key.value),signature:(0,vd.fromBase64)(e.signature)};default:throw new Error("Unsupported pubkey type")}}Nt.decodeSignature=ey;var bn={};Object.defineProperty(bn,"__esModule",{value:!0});bn.serializeSignDoc=bn.escapeCharacters=bn.makeSignDoc=bn.sortedJsonStringify=void 0;const ny=Pe,Yu=Ui;function Od(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(Od);const n=Object.keys(e).sort(),t={};return n.forEach(i=>{t[i]=Od(e[i])}),t}function Xc(e){return JSON.stringify(Od(e))}bn.sortedJsonStringify=Xc;function ty(e,n,t,i,u,R,v){return{chain_id:t,account_number:Yu.Uint53.fromString(u.toString()).toString(),sequence:Yu.Uint53.fromString(R.toString()).toString(),fee:n,msgs:e,memo:i||"",...v&&{timeout_height:v.toString()}}}bn.makeSignDoc=ty;function xc(e){const n=/&/g,t=/</g,i=/>/g;return e.replace(n,"\\u0026").replace(t,"\\u003c").replace(i,"\\u003e")}bn.escapeCharacters=xc;function ry(e){const n=xc(Xc(e));return(0,ny.toUtf8)(n)}bn.serializeSignDoc=ry;var Zd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=e.supportedAlgorithms=e.executeKdf=e.cosmjsSalt=void 0;const n=fn,t=Pe;e.cosmjsSalt=(0,t.toAscii)("The CosmJS salt.");async function i(v,E){switch(E.algorithm){case"argon2id":{const C=E.params;if(!(0,n.isArgon2idOptions)(C))throw new Error("Invalid format of argon2id params");return n.Argon2id.execute(v,e.cosmjsSalt,C)}default:throw new Error("Unsupported KDF algorithm")}}e.executeKdf=i,e.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"};async function u(v,E,C){switch(C.algorithm){case e.supportedAlgorithms.xchacha20poly1305Ietf:{const D=n.Random.getBytes(n.xchacha20NonceLength);return new Uint8Array([...D,...await n.Xchacha20poly1305Ietf.encrypt(v,E,D)])}default:throw new Error(`Unsupported encryption algorithm: '${C.algorithm}'`)}}e.encrypt=u;async function R(v,E,C){switch(C.algorithm){case e.supportedAlgorithms.xchacha20poly1305Ietf:{const D=v.slice(0,n.xchacha20NonceLength);return n.Xchacha20poly1305Ietf.decrypt(v.slice(n.xchacha20NonceLength),E,D)}default:throw new Error(`Unsupported encryption algorithm: '${C.algorithm}'`)}}e.decrypt=R})(Zd);Object.defineProperty(Jr,"__esModule",{value:!0});Jr.Secp256k1HdWallet=Jr.extractKdfConfiguration=void 0;const mn=fn,si=Pe,yr=$d,iy=un,oy=Mi,ay=Nt,sy=bn,di=Zd,ko="secp256k1wallet-v1",dy={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12*1024}};function uy(e){return!(!(0,yr.isNonNullObject)(e)||typeof e.hdPath!="string"||typeof e.prefix!="string")}function cy(e){return e.kdf}function ly(e){const n=JSON.parse(e);if(!(0,yr.isNonNullObject)(n))throw new Error("Root document is not an object.");switch(n.type){case ko:return cy(n);default:throw new Error("Unsupported serialization type")}}Jr.extractKdfConfiguration=ly;const Xu={bip39Password:"",hdPaths:[(0,oy.makeCosmoshubPath)(0)],prefix:"cosmos"};class Dt{static async fromMnemonic(n,t={}){const i=new mn.EnglishMnemonic(n),u=await mn.Bip39.mnemonicToSeed(i,t.bip39Password);return new Dt(i,{...t,seed:u})}static async generate(n=12,t={}){const i=4*Math.floor(11*n/33),u=mn.Random.getBytes(i),R=mn.Bip39.encode(u);return Dt.fromMnemonic(R.toString(),t)}static async deserialize(n,t){const i=JSON.parse(n);if(!(0,yr.isNonNullObject)(i))throw new Error("Root document is not an object.");switch(i.type){case ko:return Dt.deserializeTypeV1(n,t);default:throw new Error("Unsupported serialization type")}}static async deserializeWithEncryptionKey(n,t){const i=JSON.parse(n);if(!(0,yr.isNonNullObject)(i))throw new Error("Root document is not an object.");const u=i;switch(u.type){case ko:{const R=await(0,di.decrypt)((0,si.fromBase64)(u.data),t,u.encryption),v=JSON.parse((0,si.fromUtf8)(R)),{mnemonic:E,accounts:C}=v;if((0,yr.assert)(typeof E=="string"),!Array.isArray(C))throw new Error("Property 'accounts' is not an array");if(!C.every(b=>uy(b)))throw new Error("Account is not in the correct format.");const D=C[0].prefix;if(!C.every(({prefix:b})=>b===D))throw new Error("Accounts do not all have the same prefix");const _=C.map(({hdPath:b})=>(0,mn.stringToPath)(b));return Dt.fromMnemonic(E,{hdPaths:_,prefix:D})}default:throw new Error("Unsupported serialization type")}}static async deserializeTypeV1(n,t){const i=JSON.parse(n);if(!(0,yr.isNonNullObject)(i))throw new Error("Root document is not an object.");const u=await(0,di.executeKdf)(t,i.kdf);return Dt.deserializeWithEncryptionKey(n,u)}constructor(n,t){const i=t.hdPaths??Xu.hdPaths,u=t.prefix??Xu.prefix;this.secret=n,this.seed=t.seed,this.accounts=i.map(R=>({hdPath:R,prefix:u}))}get mnemonic(){return this.secret.toString()}async getAccounts(){return(await this.getAccountsWithPrivkeys()).map(({algo:t,pubkey:i,address:u})=>({algo:t,pubkey:i,address:u}))}async signAmino(n,t){const u=(await this.getAccountsWithPrivkeys()).find(({address:_})=>_===n);if(u===void 0)throw new Error(`Address ${n} not found in wallet`);const{privkey:R,pubkey:v}
1=u,E=(0,mn.sha256)((0,sy.serializeSignDoc)(t)),C=await mn.Secp256k1.createSignature(E,R),D=new Uint8Array([...C.r(32),...C.s(32)]);return{signed:t,signature:(0,ay.encodeSecp256k1Signature)(v,D)}}async serialize(n){const t=dy,i=await(0,di.executeKdf)(n,t);return this.serializeWithEncryptionKey(i,t)}async serializeWithEncryptionKey(n,t){const i={mnemonic:this.mnemonic,accounts:this.accounts.map(({hdPath:C,prefix:D})=>({hdPath:(0,mn.pathToString)(C),prefix:D}))},u=(0,si.toUtf8)(JSON.stringify(i)),R={algorithm:di.supportedAlgorithms.xchacha20poly1305Ietf},v=await(0,di.encrypt)(u,n,R),E={type:ko,kdf:t,encryption:R,data:(0,si.toBase64)(v)};return JSON.stringify(E)}async getKeyPair(n){const{privkey:t}=mn.Slip10.derivePath(mn.Slip10Curve.Secp256k1,this.seed,n),{pubkey:i}=await mn.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:mn.Secp256k1.compressPubkey(i)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map(async({hdPath:n,prefix:t})=>{const{privkey:i,pubkey:u}=await this.getKeyPair(n),R=(0,si.toBech32)(t,(0,iy.rawSecp256k1PubkeyToRawAddress)(u));return{algo:"secp256k1",privkey:i,pubkey:u,address:R}}))}}Jr.Secp256k1HdWallet=Dt;var Go={};Object.defineProperty(Go,"__esModule",{value:!0});Go.Secp256k1Wallet=void 0;const Xi=fn,fy=Pe,py=un,my=Nt,yy=bn;class Yd{static async fromKey(n,t="cosmos"){const i=(await Xi.Secp256k1.makeKeypair(n)).pubkey;return new Yd(n,Xi.Secp256k1.compressPubkey(i),t)}constructor(n,t,i){this.privkey=n,this.pubkey=t,this.prefix=i}get address(){return(0,fy.toBech32)(this.prefix,(0,py.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}async getAccounts(){return[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]}async signAmino(n,t){if(n!==this.address)throw new Error(`Address ${n} not found in wallet`);
1const i=new Xi.Sha256((0,yy.serializeSignDoc)(t)).digest(),u=await Xi.Secp256k1.createSignature(i,this.privkey),R=new Uint8Array([...u.r(32),...u.s(32)]);return{signed:t,signature:(0,my.encodeSecp256k1Signature)(this.pubkey,R)}}}Go.Secp256k1Wallet=Yd;var Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.makeStdTx=Ur.isStdTx=void 0;function hy(e){const{memo:n,msg:t,fee:i,signatures:u}=e;return typeof n=="string"&&Array.isArray(t)&&typeof i=="object"&&Array.isArray(u)}Ur.isStdTx=hy;function gy(e,n){return{msg:e.msgs,fee:e.fee,memo:e.memo,signatures:Array.isArray(n)?n:[n]}}Ur.makeStdTx=gy;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.executeKdf=e.makeStdTx=e.isStdTx=e.serializeSignDoc=e.makeSignDoc=e.encodeSecp256k1Signature=e.decodeSignature=e.Secp256k1Wallet=e.Secp256k1HdWallet=e.extractKdfConfiguration=e.pubkeyType=e.isSinglePubkey=e.isSecp256k1Pubkey=e.isMultisigThresholdPubkey=e.isEd25519Pubkey=e.makeCosmoshubPath=e.omitDefault=e.createMultisigThresholdPubkey=e.encodeSecp256k1Pubkey=e.encodeEd25519Pubkey=e.encodeBech32Pubkey=e.encodeAminoPubkey=e.decodeBech32Pubkey=e.decodeAminoPubkey=e.parseCoins=e.coins=e.coin=e.addCoins=e.rawSecp256k1PubkeyToRawAddress=e.rawEd25519PubkeyToRawAddress=e.pubkeyToRawAddress=e.pubkeyToAddress=void 0;var n=un;Object.defineProperty(e,"pubkeyToAddress",{enumerable:!0,get:function(){return n.pubkeyToAddress}}),Object.defineProperty(e,"pubkeyToRawAddress",{enumerable:!0,get:function(){return n.pubkeyToRawAddress}}),Object.defineProperty(e,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return n.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(e,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return n.rawSecp256k1PubkeyToRawAddress}});var t=Ln;Object.defineProperty(e,"addCoins",{enumerable:!0,get:function(){return t.addCoins}}),Object.defineProperty(e,"coin",{enumerable:!0,get:function(){return t.coin}}),Object.defineProperty(e,"coins",{enumerable:!0,get:function(){return t.coins}}),Object.defineProperty(e,"parseCoins",{enumerable:!0,get:function(){return t.parseCoins}});var i=Ge;Object.defineProperty(e,"decodeAminoPubkey",{enumerable:!0,get:function(){return i.decodeAminoPubkey}}),Object.defineProperty(e,"decodeBech32Pubkey",{enumerable:!0,get:function(){return i.decodeBech32Pubkey}}),Object.defineProperty(e,"encodeAminoPubkey",{enumerable:!0,get:function(){return i.encodeAminoPubkey}}),Object.defineProperty(e,"encodeBech32Pubkey",{enumerable:!0,get:function(){return i.encodeBech32Pubkey}}),Object.defineProperty(e,"encodeEd25519Pubkey",{enumerable:!0,get:function(){return i.encodeEd25519Pubkey}}),Object.defineProperty(e,"encodeSecp256k1Pubkey",{enumerable:!0,get:function(){return i.encodeSecp256k1Pubkey}});var u=Er;Object.defineProperty(e,"createMultisigThresholdPubkey",{enumerable:!0,get:function(){return u.createMultisigThresholdPubkey}});var R=Fo;Object.defineProperty(e,"omitDefault",{enumerable:!0,get:function(){return R.omitDefault}});var v=Mi;Object.defineProperty(e,"makeCosmoshubPath",{enumerable:!0,get:function(){return v.makeCosmoshubPath}});var E=Di;Object.defineProperty(e,"isEd25519Pubkey",{enumerable:!0,get:function(){return E.isEd25519Pubkey}}),Object.defineProperty(e,"isMultisigThresholdPubkey",{enumerable:!0,get:function(){return E.isMultisigThresholdPubkey}}),Object.defineProperty(e,"isSecp256k1Pubkey",{enumerable:!0,get:function(){return E.isSecp256k1Pubkey}}),Object.defineProperty(e,"isSinglePubkey",{enumerable:!0,get:function(){return E.isSinglePubkey}}),Object.defineProperty(e,"pubkeyType",{enumerable:!0,get:function(){return E.pubkeyType}});var C=Jr;Object.defineProperty(e,"extractKdfConfiguration",{enumerable:!0,get:function(){return C.extractKdfConfiguration}}),Object.defineProperty(e,"Secp256k1HdWallet",{enumerable:!0,get:function(){return C.Secp256k1HdWallet}});var D=Go;Object.defineProperty(e,"Secp256k1Wallet",{enumerable:!0,get:function(){return D.Secp256k1Wallet}});var _=Nt;Object.defineProperty(e,"decodeSignature",{enumerable:!0,get:function(){return _.decodeSignature}}),Object.defineProperty(e,"encodeSecp256k1Signature",{enumerable:!0,get:function(){return _.encodeSecp256k1Signature}});var b=bn;Object.defineProperty(e,"makeSignDoc",{enumerable:!0,get:function(){return b.makeSignDoc}}),Object.defineProperty(e,"serializeSignDoc",{enumerable:!0,get:function(){return b.serializeSignDoc}});var f=Ur;Object.defineProperty(e,"isStdTx",{enumerable:!0,get:function(){return f.isStdTx}}),Object.defineProperty(e,"makeStdTx",{enumerable:!0,get:function(){return f.makeStdTx}});var p=Zd;Object.defineProperty(e,"executeKdf",{enumerable:!0,get:function(){return p.executeKdf}})})(ot);var $e={},Dr={};
1Object.defineProperty(Dr,"__esModule",{value:!0});Dr.arrayContentStartsWith=Dr.arrayContentEquals=void 0;function Sy(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;++t)if(e[t]!==n[t])return!1;return!0}Dr.arrayContentEquals=Sy;function ky(e,n){if(e.length<n.length)return!1;for(let t=0;t<n.length;++t)if(e[t]!==n[t])return!1;return!0}Dr.arrayContentStartsWith=ky;var ht={};Object.defineProperty(ht,"__esModule",{value:!0});ht.assertDefinedAndNotNull=ht.assertDefined=ht.assert=void 0;function Py(e,n){if(!e)throw new Error(n||"condition is not truthy")}ht.assert=Py;function Ry(e,n){if(e===void 0)throw new Error(n??"value is undefined")}ht.assertDefined=Ry;function By(e,n){if(e==null)throw new Error(n??"value is undefined or null")}ht.assertDefinedAndNotNull=By;var Lo={};Object.defineProperty(Lo,"__esModule",{value:!0});Lo.sleep=void 0;async function vy(e){return new Promise(n=>setTimeout(n,e))}Lo.sleep=vy;var gt={};Object.defineProperty(gt,"__esModule",{value:!0});gt.isDefined=gt.isUint8Array=gt.isNonNullObject=void 0;function jc(e){return typeof e=="object"&&e!==null}gt.isNonNullObject=jc;function Oy(e){return!(!jc(e)||Object.prototype.toString.call(e)!=="[object Uint8Array]"||typeof Buffer<"u"&&typeof Buffer.isBuffer<"u"&&Buffer.isBuffer(e))}gt.isUint8Array=Oy;function by(e){return e!==void 0}gt.isDefined=by;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isUint8Array=e.isNonNullObject=e.isDefined=e.sleep=e.assertDefinedAndNotNull=e.assertDefined=e.assert=e.arrayContentStartsWith=e.arrayContentEquals=void 0;var n=Dr;Object.defineProperty(e,"arrayContentEquals",{enumerable:!0,get:function(){return n.arrayContentEquals}}),Object.defineProperty(e,"arrayContentStartsWith",{enumerable:!0,get:function(){return n.arrayContentStartsWith}});var t=ht;Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return t.assert}}),Object.defineProperty(e,"assertDefined",{enumerable:!0,get:function(){return t.assertDefined}}),Object.defineProperty(e,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return t.assertDefinedAndNotNull}});var i=Lo;Object.defineProperty(e,"sleep",{enumerable:!0,get:function(){return i.sleep}});var u=gt;Object.defineProperty(e,"isDefined",{enumerable:!0,get:function(){return u.isDefined}}),Object.defineProperty(e,"isNonNullObject",{enumerable:!0,get:function(){return u.isNonNullObject}}),Object.defineProperty(e,"isUint8Array",{enumerable:!0,get:function(){return u.isUint8Array}})})($e);var xn={};Object.defineProperty(xn,"__esModule",{value:!0});xn.makeSignBytes=xn.makeSignDoc=xn.makeAuthInfoBytes=void 0;const xu=$e,Ay=ri,Io=it;function Iy(e,n){return e.map(({pubkey:t,sequence:i})=>({publicKey:t,modeInfo:{single:{mode:n}},sequence:BigInt(i)}))}function Ty(e,n,t,i,u,R=Ay.SignMode.SIGN_MODE_DIRECT){(0,xu.assert)(i===void 0||typeof i=="string","feeGranter must be undefined or string"),(0,xu.assert)(u===void 0||typeof u=="string","feePayer must be undefined or string");const v=Io.AuthInfo.fromPartial({signerInfos:Iy(e,R),fee:{amount:[...n],gasLimit:BigInt(t),granter:i,payer:u}});return Io.AuthInfo.encode(v).finish()}xn.makeAuthInfoBytes=Ty;function Ny(e,n,t,i){return{bodyBytes:e,authInfoBytes:n,chainId:t,accountNumber:BigInt(i)}}xn.makeSignDoc=Ny;function Cy({accountNumber:e,authInfoBytes:n,bodyBytes:t,chainId:i}){const u=Io.SignDoc.fromPartial({accountNumber:e,authInfoBytes:n,bodyBytes:t,chainId:i});return Io.SignDoc.encode(u).finish()}xn.makeSignBytes=Cy;var Xd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=e.supportedAlgorithms=e.executeKdf=e.cosmjsSalt=void 0;const n=fn,t=Pe;e.cosmjsSalt=(0,t.toAscii)("The CosmJS salt.");async function i(v,E){switch(E.algorithm){case"argon2id":{const C=E.params;if(!(0,n.isArgon2idOptions)(C))throw new Error("Invalid format of argon2id params");return n.Argon2id.execute(v,e.cosmjsSalt,C)}default:throw new Error("Unsupported KDF algorithm")}}e.executeKdf=i,e.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"};async function u(v,E,C){switch(C.algorithm){case e.supportedAlgorithms.xchacha20poly1305Ietf:{const D=n.Random.getBytes(n.xchacha20NonceLength);return new Uint8Array([...D,...await n.Xchacha20poly1305Ietf.encrypt(v,E,D)])}default:throw new Error(`Unsupported encryption algorithm: '${C.algorithm}'`)}}e.encrypt=u;async function R(v,E,C){switch(C.algorithm){case e.supportedAlgorithms.xchacha20poly1305Ietf:{const D=v.slice(0,n.xchacha20NonceLength);return n.Xchacha20poly1305Ietf.decrypt(v.slice(n.xchacha20NonceLength),E,D)}default:throw new Error(`Unsupported encryption algorithm: '${C.algorithm}'`)}}e.decrypt=R})(Xd);
1Object.defineProperty(wr,"__esModule",{value:!0});wr.DirectSecp256k1HdWallet=wr.extractKdfConfiguration=void 0;const bd=ot,yn=fn,ui=Pe,hr=$e,wy=xn,ci=Xd,Po="directsecp256k1hdwallet-v1",_y={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12*1024}};function Ey(e){return!(!(0,hr.isNonNullObject)(e)||typeof e.hdPath!="string"||typeof e.prefix!="string")}function Jy(e){return e.kdf}function Uy(e){const n=JSON.parse(e);if(!(0,hr.isNonNullObject)(n))throw new Error("Root document is not an object.");switch(n.type){case Po:return Jy(n);default:throw new Error("Unsupported serialization type")}}wr.extractKdfConfiguration=Uy;const ju={bip39Password:"",hdPaths:[(0,bd.makeCosmoshubPath)(0)],prefix:"cosmos"};class Mt{static async fromMnemonic(n,t={}){const i=new yn.EnglishMnemonic(n),u=await yn.Bip39.mnemonicToSeed(i,t.bip39Password);return new Mt(i,{...t,seed:u})}static async generate(n=12,t={}){const i=4*Math.floor(11*n/33),u=yn.Random.getBytes(i),R=yn.Bip39.encode(u);return Mt.fromMnemonic(R.toString(),t)}static async deserialize(n,t){const i=JSON.parse(n);if(!(0,hr.isNonNullObject)(i))throw new Error("Root document is not an object.");switch(i.type){case Po:return Mt.deserializeTypeV1(n,t);default:throw new Error("Unsupported serialization type")}}static async deserializeWithEncryptionKey(n,t){const i=JSON.parse(n);if(!(0,hr.isNonNullObject)(i))throw new Error("Root document is not an object.");const u=i;switch(u.type){case Po:{const R=await(0,ci.decrypt)((0,ui.fromBase64)(u.data),t,u.encryption),v=JSON.parse((0,ui.fromUtf8)(R)),{mnemonic:E,accounts:C}=v;if((0,hr.assert)(typeof E=="string"),!Array.isArray(C))throw new Error("Property 'accounts' is not an array");if(!C.every(b=>Ey(b)))throw new Error("Account is not in the correct format.");const D=C[0].prefix;if(!C.every(({prefix:b})=>b===D))throw new Error("Accounts do not all have the same prefix");const _=C.map(({hdPath:b})=>(0,yn.stringToPath)(b));return Mt.fromMnemonic(E,{hdPaths:_,prefix:D})}default:throw new Error("Unsupported serialization type")}}static async deserializeTypeV1(n,t){const i=JSON.parse(n);if(!(0,hr.isNonNullObject)(i))throw new Error("Root document is not an object.");const u=await(0,ci.executeKdf)(t,i.kdf);return Mt.deserializeWithEncryptionKey(n,u)}constructor(n,t){const i=t.prefix??ju.prefix,u=t.hdPaths??ju.hdPaths;this.secret=n,this.seed=t.seed,this.accounts=u.map(R=>({hdPath:R,prefix:i}))}get mnemonic(){return this.secret.toString()}async getAccounts(){return(await this.getAccountsWithPrivkeys()).map(({algo:t,pubkey:i,address:u})=>({algo:t,pubkey:i,address:u}))}async signDirect(n,t){const u=(await this.getAccountsWithPrivkeys()).find(({address:f})=>f===n);if(u===void 0)throw new Error(`Address ${n} not found in wallet`);const{privkey:R,pubkey:v}=u,E=(0,wy.makeSignBytes)(t),C=(0,yn.sha256)(E),D=await yn.Secp256k1.createSignature(C,R),_=new Uint8Array([...D.r(32),...D.s(32)]),b=(0,bd.encodeSecp256k1Signature)(v,_);return{signed:t,signature:b}}async serialize(n){const t=_y,i=await(0,ci.executeKdf)(n,t);return this.serializeWithEncryptionKey(i,t)}async serializeWithEncryptionKey(n,t){const i={mnemonic:this.mnemonic,accounts:this.accounts.map(({hdPath:C,prefix:D})=>({hdPath:(0,yn.pathToString)(C),prefix:D}))},u=(0,ui.toUtf8)(JSON.stringify(i)),R={algorithm:ci.supportedAlgorithms.xchacha20poly1305Ietf},v=await(0,ci.encrypt)(u,n,R),E={type:Po,kdf:t,encryption:R,data:(0,ui.toBase64)(v)};return JSON.stringify(E)}async getKeyPair(n){const{privkey:t}=yn.Slip10.derivePath(yn.Slip10Curve.Secp256k1,this.seed,n),{pubkey:i}=await yn.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:yn.Secp256k1.compressPubkey(i)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map(async({hdPath:n,prefix:t})=>{const{privkey:i,pubkey:u}=await this.getKeyPair(n),R=(0,ui.toBech32)(t,(0,bd.rawSecp256k1PubkeyToRawAddress)(u));return{algo:"secp256k1",privkey:i,pubkey:u,address:R}}))}}wr.DirectSecp256k1HdWallet=Mt;var $o={};Object.defineProperty($o,"__esModule",{value:!0});$o.DirectSecp256k1Wallet=void 0;const ec=ot,xi=fn,Dy=Pe,My=xn;class xd{static async fromKey(n,t="cosmos"){const i=(await xi.Secp256k1.makeKeypair(n)).pubkey;return new xd(n,xi.Secp256k1.compressPubkey(i),t)}constructor(n,t,i){this.privkey=n,this.pubkey=t,this.prefix=i}get address(){return(0,Dy.toBech32)(this.prefix,(0,ec.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}async getAccounts(){return[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]}async signDirect(n,t){const i=(0,My.makeSignBytes)(t);if(n!==this.address)throw new Error(`Address ${n} not found in wallet`);const u=(0,xi.sha256)(i),R=await xi.Secp256k1.createSignature(u,this.privkey),v=new Uint8Array([...R.r(32),...R.s(32)]),E=(0,ec.encodeSecp256k1Signature)(this.pubkey,v);return{signed:t,signature:E}}}$o.DirectSecp256k1Wallet=xd;var Ko={};Object.defineProperty(Ko,"__esModule",{value:!0});Ko.makeCosmoshubPath=void 0;const li=fn;function Hy(e){return[li.Slip10RawIndex.hardened(44),li.Slip10RawIndex.hardened(118),li.Slip10RawIndex.hardened(0),li.Slip10RawIndex.normal(0),li.Slip10RawIndex.normal(e)]}Ko.makeCosmoshubPath=Hy;var $n={},St={};
1Object.defineProperty(St,"__esModule",{value:!0});St.PrivKey=St.PubKey=St.protobufPackage=void 0;const Sr=te,kr=ee;St.protobufPackage="cosmos.crypto.ed25519";function Rs(){return{key:new Uint8Array}}St.PubKey={typeUrl:"/cosmos.crypto.ed25519.PubKey",encode(e,n=Sr.BinaryWriter.create()){return e.key.length!==0&&n.uint32(10).bytes(e.key),n},decode(e,n){const t=e instanceof Sr.BinaryReader?e:new Sr.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Rs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.key=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Rs();return(0,kr.isSet)(e.key)&&(n.key=(0,kr.bytesFromBase64)(e.key)),n},toJSON(e){const n={};return e.key!==void 0&&(n.key=(0,kr.base64FromBytes)(e.key!==void 0?e.key:new Uint8Array)),n},fromPartial(e){const n=Rs();return n.key=e.key??new Uint8Array,n}};function Bs(){return{key:new Uint8Array}}St.PrivKey={typeUrl:"/cosmos.crypto.ed25519.PrivKey",encode(e,n=Sr.BinaryWriter.create()){return e.key.length!==0&&n.uint32(10).bytes(e.key),n},decode(e,n){const t=e instanceof Sr.BinaryReader?e:new Sr.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Bs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.key=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Bs();return(0,kr.isSet)(e.key)&&(n.key=(0,kr.bytesFromBase64)(e.key)),n},toJSON(e){const n={};return e.key!==void 0&&(n.key=(0,kr.base64FromBytes)(e.key!==void 0?e.key:new Uint8Array)),n},fromPartial(e){const n=Bs();return n.key=e.key??new Uint8Array,n}};var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.LegacyAminoPubKey=Mr.protobufPackage=void 0;const fi=Re,vs=te,qy=ee;Mr.protobufPackage="cosmos.crypto.multisig";function Os(){return{threshold:0,publicKeys:[]}}Mr.LegacyAminoPubKey={typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",encode(e,n=vs.BinaryWriter.create()){e.threshold!==0&&n.uint32(8).uint32(e.threshold);for(const t of e.publicKeys)fi.Any.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e,n){const t=e instanceof vs.BinaryReader?e:new vs.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Os();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.threshold=t.uint32();break;case 2:u.publicKeys.push(fi.Any.decode(t,t.uint32()));break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Os();return(0,qy.isSet)(e.threshold)&&(n.threshold=Number(e.threshold)),Array.isArray(e==null?void 0:e.publicKeys)&&(n.publicKeys=e.publicKeys.map(t=>fi.Any.fromJSON(t))),n},toJSON(e){const n={};return e.threshold!==void 0&&(n.threshold=Math.round(e.threshold)),e.publicKeys?n.publicKeys=e.publicKeys.map(t=>t?fi.Any.toJSON(t):void 0):n.publicKeys=[],n},fromPartial(e){var t;const n=Os();return n.threshold=e.threshold??0,n.publicKeys=((t=e.publicKeys)==null?void 0:t.map(i=>fi.Any.fromPartial(i)))||[],n}};var kt={};Object.defineProperty(kt,"__esModule",{value:!0});kt.PrivKey=kt.PubKey=kt.protobufPackage=void 0;const Pr=te,Rr=ee;kt.protobufPackage="cosmos.crypto.secp256k1";function bs(){return{key:new Uint8Array}}kt.PubKey={typeUrl:"/cosmos.crypto.secp256k1.PubKey",encode(e,n=Pr.BinaryWriter.create()){return e.key.length!==0&&n.uint32(10).bytes(e.key),n},decode(e,n){const t=e instanceof Pr.BinaryReader?e:new Pr.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=bs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.key=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=bs();return(0,Rr.isSet)(e.key)&&(n.key=(0,Rr.bytesFromBase64)(e.key)),n},toJSON(e){const n={};return e.key!==void 0&&(n.key=(0,Rr.base64FromBytes)(e.key!==void 0?e.key:new Uint8Array)),n},fromPartial(e){const n=bs();return n.key=e.key??new Uint8Array,n}};function As(){return{key:new Uint8Array}}kt.PrivKey={typeUrl:"/cosmos.crypto.secp256k1.PrivKey",encode(e,n=Pr.BinaryWriter.create()){return e.key.length!==0&&n.uint32(10).bytes(e.key),n},decode(e,n){const t=e instanceof Pr.BinaryReader?e:new Pr.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=As();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.key=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=As();
1return(0,Rr.isSet)(e.key)&&(n.key=(0,Rr.bytesFromBase64)(e.key)),n},toJSON(e){const n={};return e.key!==void 0&&(n.key=(0,Rr.base64FromBytes)(e.key!==void 0?e.key:new Uint8Array)),n},fromPartial(e){const n=As();return n.key=e.key??new Uint8Array,n}};Object.defineProperty($n,"__esModule",{value:!0});$n.decodeOptionalPubkey=$n.decodePubkey=$n.anyToSinglePubkey=$n.encodePubkey=void 0;const Ai=ot,nc=Pe,Vy=Cn,Ad=St,Id=Mr,Td=kt,Is=Re;function el(e){if((0,Ai.isSecp256k1Pubkey)(e)){const n=Td.PubKey.fromPartial({key:(0,nc.fromBase64)(e.value)});return Is.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:Uint8Array.from(Td.PubKey.encode(n).finish())})}else if((0,Ai.isEd25519Pubkey)(e)){const n=Ad.PubKey.fromPartial({key:(0,nc.fromBase64)(e.value)});return Is.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:Uint8Array.from(Ad.PubKey.encode(n).finish())})}else if((0,Ai.isMultisigThresholdPubkey)(e)){const n=Id.LegacyAminoPubKey.fromPartial({threshold:Vy.Uint53.fromString(e.value.threshold).toNumber(),publicKeys:e.value.pubkeys.map(el)});return Is.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:Uint8Array.from(Id.LegacyAminoPubKey.encode(n).finish())})}else throw new Error(`Pubkey type ${e.type} not recognized`)}$n.encodePubkey=el;function Nd(e){switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":{const{key:n}=Td.PubKey.decode(e.value);return(0,Ai.encodeSecp256k1Pubkey)(n)}case"/cosmos.crypto.ed25519.PubKey":{const{key:n}=Ad.PubKey.decode(e.value);return(0,Ai.encodeEd25519Pubkey)(n)}default:throw new Error(`Pubkey type_url ${e.typeUrl} not recognized as single public key type`)}}$n.anyToSinglePubkey=Nd;function nl(e){switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":case"/cosmos.crypto.ed25519.PubKey":return Nd(e);case"/cosmos.crypto.multisig.LegacyAminoPubKey":{const{threshold:n,publicKeys:t}=Id.LegacyAminoPubKey.decode(e.value);return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:n.toString(),pubkeys:t.map(Nd)}}}default:throw new Error(`Pubkey type URL '${e.typeUrl}' not recognized`)}}$n.decodePubkey=nl;function Qy(e){if(!e)return null;if(e.typeUrl){if(e.value.length)return nl(e);throw new Error(`Pubkey is an Any with type URL '${e.typeUrl}' but an empty value`)}else{if(e.value.length)throw new Error("Pubkey is an Any with an empty type URL but a value set");return null}}$n.decodeOptionalPubkey=Qy;var hn={},jd={},eu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=e.DenomUnit=e.Supply=e.Output=e.Input=e.SendEnabled=e.Params=e.protobufPackage=void 0;const n=ve,t=te,i=ee;e.protobufPackage="cosmos.bank.v1beta1";function u(){return{sendEnabled:[],defaultSendEnabled:!1}}e.Params={typeUrl:"/cosmos.bank.v1beta1.Params",encode(b,f=t.BinaryWriter.create()){for(const p of b.sendEnabled)e.SendEnabled.encode(p,f.uint32(10).fork()).ldelim();return b.defaultSendEnabled===!0&&f.uint32(16).bool(b.defaultSendEnabled),f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=u();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.sendEnabled.push(e.SendEnabled.decode(p,p.uint32()));break;case 2:o.defaultSendEnabled=p.bool();break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=u();return Array.isArray(b==null?void 0:b.sendEnabled)&&(f.sendEnabled=b.sendEnabled.map(p=>e.SendEnabled.fromJSON(p))),(0,i.isSet)(b.defaultSendEnabled)&&(f.defaultSendEnabled=!!b.defaultSendEnabled),f},toJSON(b){const f={};return b.sendEnabled?f.sendEnabled=b.sendEnabled.map(p=>p?e.SendEnabled.toJSON(p):void 0):f.sendEnabled=[],b.defaultSendEnabled!==void 0&&(f.defaultSendEnabled=b.defaultSendEnabled),f},fromPartial(b){var p;const f=u();return f.sendEnabled=((p=b.sendEnabled)==null?void 0:p.map(k=>e.SendEnabled.fromPartial(k)))||[],f.defaultSendEnabled=b.defaultSendEnabled??!1,f}};function R(){return{denom:"",enabled:!1}}e.SendEnabled={typeUrl:"/cosmos.bank.v1beta1.SendEnabled",encode(b,f=t.BinaryWriter.create()){return b.denom!==""&&f.uint32(10).string(b.denom),b.enabled===!0&&f.uint32(16).bool(b.enabled),f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=R();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.denom=p.string();break;case 2:o.enabled=p.bool();break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=R();return(0,i.isSet)(b.denom)&&(f.denom=String(b.denom)),(0,i.isSet)(b.enabled)&&(f.enabled=!!b.enabled),f},toJSON(b){const f={};return b.denom!==void 0&&(f.denom=b.denom),b.enabled!==void 0&&(f.enabled=b.enabled),f},fromPartial(b){const f=R();return f.denom=b.denom??"",f.enabled=b.enabled??!1,f}};function v(){return{address:"",coins:[]}}e.Input={typeUrl:"/cosmos.bank.v1beta1.Input",encode(b,f=t.BinaryWriter.create()){b.address!==""&&f.uint32(10).string(b.address);for(const p of b.coins)n.Coin.encode(p,f.uint32(18).fork()).ldelim();return f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=v();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.address=p.string();break;case 2:o.coins.push(n.Coin.decode(p,p.uint32()));break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=v();return(0,i.isSet)(b.address)&&(f.address=String(b.address)),Array.isArray(b==null?void 0:b.coins)&&(f.coins=b.coins.map(p=>n.Coin.fromJSON(p))),f},toJSON(b){const f={};return b.address!==void 0&&(f.address=b.address),b.coins?f.coins=b.coins.map(p=>p?n.Coin.toJSON(p):void 0):f.coins=[],f},fromPartial(b){var p;const f=v();return f.address=b.address??"",f.coins=((p=b.coins)==null?void 0:p.map(k=>n.Coin.fromPartial(k)))||[],f}}
1;function E(){return{address:"",coins:[]}}e.Output={typeUrl:"/cosmos.bank.v1beta1.Output",encode(b,f=t.BinaryWriter.create()){b.address!==""&&f.uint32(10).string(b.address);for(const p of b.coins)n.Coin.encode(p,f.uint32(18).fork()).ldelim();return f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=E();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.address=p.string();break;case 2:o.coins.push(n.Coin.decode(p,p.uint32()));break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=E();return(0,i.isSet)(b.address)&&(f.address=String(b.address)),Array.isArray(b==null?void 0:b.coins)&&(f.coins=b.coins.map(p=>n.Coin.fromJSON(p))),f},toJSON(b){const f={};return b.address!==void 0&&(f.address=b.address),b.coins?f.coins=b.coins.map(p=>p?n.Coin.toJSON(p):void 0):f.coins=[],f},fromPartial(b){var p;const f=E();return f.address=b.address??"",f.coins=((p=b.coins)==null?void 0:p.map(k=>n.Coin.fromPartial(k)))||[],f}};function C(){return{total:[]}}e.Supply={typeUrl:"/cosmos.bank.v1beta1.Supply",encode(b,f=t.BinaryWriter.create()){for(const p of b.total)n.Coin.encode(p,f.uint32(10).fork()).ldelim();return f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=C();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.total.push(n.Coin.decode(p,p.uint32()));break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=C();return Array.isArray(b==null?void 0:b.total)&&(f.total=b.total.map(p=>n.Coin.fromJSON(p))),f},toJSON(b){const f={};return b.total?f.total=b.total.map(p=>p?n.Coin.toJSON(p):void 0):f.total=[],f},fromPartial(b){var p;const f=C();return f.total=((p=b.total)==null?void 0:p.map(k=>n.Coin.fromPartial(k)))||[],f}};function D(){return{denom:"",exponent:0,aliases:[]}}e.DenomUnit={typeUrl:"/cosmos.bank.v1beta1.DenomUnit",encode(b,f=t.BinaryWriter.create()){b.denom!==""&&f.uint32(10).string(b.denom),b.exponent!==0&&f.uint32(16).uint32(b.exponent);for(const p of b.aliases)f.uint32(26).string(p);return f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=D();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.denom=p.string();break;case 2:o.exponent=p.uint32();break;case 3:o.aliases.push(p.string());break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=D();return(0,i.isSet)(b.denom)&&(f.denom=String(b.denom)),(0,i.isSet)(b.exponent)&&(f.exponent=Number(b.exponent)),Array.isArray(b==null?void 0:b.aliases)&&(f.aliases=b.aliases.map(p=>String(p))),f},toJSON(b){const f={};return b.denom!==void 0&&(f.denom=b.denom),b.exponent!==void 0&&(f.exponent=Math.round(b.exponent)),b.aliases?f.aliases=b.aliases.map(p=>p):f.aliases=[],f},fromPartial(b){var p;const f=D();return f.denom=b.denom??"",f.exponent=b.exponent??0,f.aliases=((p=b.aliases)==null?void 0:p.map(k=>k))||[],f}};function _(){return{description:"",denomUnits:[],base:"",display:"",name:"",symbol:"",uri:"",uriHash:""}}e.Metadata={typeUrl:"/cosmos.bank.v1beta1.Metadata",encode(b,f=t.BinaryWriter.create()){b.description!==""&&f.uint32(10).string(b.description);for(const p of b.denomUnits)e.DenomUnit.encode(p,f.uint32(18).fork()).ldelim();return b.base!==""&&f.uint32(26).string(b.base),b.display!==""&&f.uint32(34).string(b.display),b.name!==""&&f.uint32(42).string(b.name),b.symbol!==""&&f.uint32(50).string(b.symbol),b.uri!==""&&f.uint32(58).string(b.uri),b.uriHash!==""&&f.uint32(66).string(b.uriHash),f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=_();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.description=p.string();break;case 2:o.denomUnits.push(e.DenomUnit.decode(p,p.uint32()));break;case 3:o.base=p.string();break;case 4:o.display=p.string();break;case 5:o.name=p.string();break;case 6:o.symbol=p.string();break;case 7:o.uri=p.string();break;case 8:o.uriHash=p.string();break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=_();return(0,i.isSet)(b.description)&&(f.description=String(b.description)),Array.isArray(b==null?void 0:b.de
1nomUnits)&&(f.denomUnits=b.denomUnits.map(p=>e.DenomUnit.fromJSON(p))),(0,i.isSet)(b.base)&&(f.base=String(b.base)),(0,i.isSet)(b.display)&&(f.display=String(b.display)),(0,i.isSet)(b.name)&&(f.name=String(b.name)),(0,i.isSet)(b.symbol)&&(f.symbol=String(b.symbol)),(0,i.isSet)(b.uri)&&(f.uri=String(b.uri)),(0,i.isSet)(b.uriHash)&&(f.uriHash=String(b.uriHash)),f},toJSON(b){const f={};return b.description!==void 0&&(f.description=b.description),b.denomUnits?f.denomUnits=b.denomUnits.map(p=>p?e.DenomUnit.toJSON(p):void 0):f.denomUnits=[],b.base!==void 0&&(f.base=b.base),b.display!==void 0&&(f.display=b.display),b.name!==void 0&&(f.name=b.name),b.symbol!==void 0&&(f.symbol=b.symbol),b.uri!==void 0&&(f.uri=b.uri),b.uriHash!==void 0&&(f.uriHash=b.uriHash),f},fromPartial(b){var p;const f=_();return f.description=b.description??"",f.denomUnits=((p=b.denomUnits)==null?void 0:p.map(k=>e.DenomUnit.fromPartial(k)))||[],f.base=b.base??"",f.display=b.display??"",f.name=b.name??"",f.symbol=b.symbol??"",f.uri=b.uri??"",f.uriHash=b.uriHash??"",f}}})(eu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgSetSendEnabledResponse=e.MsgSetSendEnabled=e.MsgUpdateParamsResponse=e.MsgUpdateParams=e.MsgMultiSendResponse=e.MsgMultiSend=e.MsgSendResponse=e.MsgSend=e.protobufPackage=void 0;const n=ve,t=eu,i=te,u=ee;e.protobufPackage="cosmos.bank.v1beta1";function R(){return{fromAddress:"",toAddress:"",amount:[]}}e.MsgSend={typeUrl:"/cosmos.bank.v1beta1.MsgSend",encode(k,o=i.BinaryWriter.create()){k.fromAddress!==""&&o.uint32(10).string(k.fromAddress),k.toAddress!==""&&o.uint32(18).string(k.toAddress);for(const s of k.amount)n.Coin.encode(s,o.uint32(26).fork()).ldelim();return o},decode(k,o){const s=k instanceof i.BinaryReader?k:new i.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=R();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.fromAddress=s.string();break;case 2:w.toAddress=s.string();break;case 3:w.amount.push(n.Coin.decode(s,s.uint32()));break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=R();return(0,u.isSet)(k.fromAddress)&&(o.fromAddress=String(k.fromAddress)),(0,u.isSet)(k.toAddress)&&(o.toAddress=String(k.toAddress)),Array.isArray(k==null?void 0:k.amount)&&(o.amount=k.amount.map(s=>n.Coin.fromJSON(s))),o},toJSON(k){const o={};return k.fromAddress!==void 0&&(o.fromAddress=k.fromAddress),k.toAddress!==void 0&&(o.toAddress=k.toAddress),k.amount?o.amount=k.amount.map(s=>s?n.Coin.toJSON(s):void 0):o.amount=[],o},fromPartial(k){var s;const o=R();return o.fromAddress=k.fromAddress??"",o.toAddress=k.toAddress??"",o.amount=((s=k.amount)==null?void 0:s.map(y=>n.Coin.fromPartial(y)))||[],o}
1};function v(){return{}}e.MsgSendResponse={typeUrl:"/cosmos.bank.v1beta1.MsgSendResponse",encode(k,o=i.BinaryWriter.create()){return o},decode(k,o){const s=k instanceof i.BinaryReader?k:new i.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=v();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){default:s.skipType(J&7);break}}return w},fromJSON(k){return v()},toJSON(k){return{}},fromPartial(k){return v()}};function E(){return{inputs:[],outputs:[]}}e.MsgMultiSend={typeUrl:"/cosmos.bank.v1beta1.MsgMultiSend",encode(k,o=i.BinaryWriter.create()){for(const s of k.inputs)t.Input.encode(s,o.uint32(10).fork()).ldelim();for(const s of k.outputs)t.Output.encode(s,o.uint32(18).fork()).ldelim();return o},decode(k,o){const s=k instanceof i.BinaryReader?k:new i.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=E();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.inputs.push(t.Input.decode(s,s.uint32()));break;case 2:w.outputs.push(t.Output.decode(s,s.uint32()));break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=E();return Array.isArray(k==null?void 0:k.inputs)&&(o.inputs=k.inputs.map(s=>t.Input.fromJSON(s))),Array.isArray(k==null?void 0:k.outputs)&&(o.outputs=k.outputs.map(s=>t.Output.fromJSON(s))),o},toJSON(k){const o={};return k.inputs?o.inputs=k.inputs.map(s=>s?t.Input.toJSON(s):void 0):o.inputs=[],k.outputs?o.outputs=k.outputs.map(s=>s?t.Output.toJSON(s):void 0):o.outputs=[],o},fromPartial(k){var s,y;const o=E();return o.inputs=((s=k.inputs)==null?void 0:s.map(w=>t.Input.fromPartial(w)))||[],o.outputs=((y=k.outputs)==null?void 0:y.map(w=>t.Output.fromPartial(w)))||[],o}};function C(){return{}}e.MsgMultiSendResponse={typeUrl:"/cosmos.bank.v1beta1.MsgMultiSendResponse",encode(k,o=i.BinaryWriter.create()){return o},decode(k,o){const s=k instanceof i.BinaryReader?k:new i.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=C();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){default:s.skipType(J&7);break}}return w},fromJSON(k){return C()},toJSON(k){return{}},fromPartial(k){return C()}};function D(){return{authority:"",params:t.Params.fromPartial({})}}e.MsgUpdateParams={typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",encode(k,o=i.BinaryWriter.create()){return k.authority!==""&&o.uint32(10).string(k.authority),k.params!==void 0&&t.Params.encode(k.params,o.uint32(18).fork()).ldelim(),o},decode(k,o){const s=k instanceof i.BinaryReader?k:new i.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=D();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.authority=s.string();break;case 2:w.params=t.Params.decode(s,s.uint32());break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=D();return(0,u.isSet)(k.authority)&&(o.authority=String(k.authority)),(0,u.isSet)(k.params)&&(o.params=t.Params.fromJSON(k.params)),o},toJSON(k){const o={};return k.authority!==void 0&&(o.authority=k.authority),k.params!==void 0&&(o.params=k.params?t.Params.toJSON(k.params):void 0),o},fromPartial(k){const o=D();return o.authority=k.authority??"",k.params!==void 0&&k.params!==null&&(o.params=t.Params.fromPartial(k.params)),o}};function _(){return{}}e.MsgUpdateParamsResponse={typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParamsResponse",encode(k,o=i.BinaryWriter.create()){return o},decode(k,o){const s=k instanceof i.BinaryReader?k:new i.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=_();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){default:s.skipType(J&7);break}}return w},fromJSON(k){return _()},toJSON(k){return{}},fromPartial(k){return _()}};function b(){return{authority:"",sendEnabled:[],useDefaultFor:[]}}e.MsgSetSendEnabled={typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",encode(k,o=i.BinaryWriter.create()){k.authority!==""&&o.uint32(10).string(k.authority);for(const s of k.sendEnabled)t.SendEnabled.encode(s,o.uint32(18).fork()).ldelim();for(const s of k.useDefaultFor)o.uint32(26).string(s);return o},decode(k,o){const s=k instanceof i.BinaryReader?k:new i.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=b();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.authority=s.string();break;case 2:w.sendEnabled.push(t.SendEnabled.decode(s,s.uint32()));break;case 3:w.useDefaultFor.push(s.string());break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=b();return(0,u.isSet)(k.authority)&&(o.authority=String(k.authority)),Array.isArray(k==null?void 0:k.sendEnabled)&&(o.sendEnabled=k.sendEnabled.map(s=>t.SendEnabled.fromJSON(s))),Array.isArray(k==null?void 0:k.useDefaultFor)&&(o.useDefaultFor=k.useDefaultFor.map(s=>String(s))),o},toJSON(k){const o={};return k.authority!==void 0&&(o.authority=k.authority),k.sendEnabled?o.sendEnabled=k.sendEnabled.map(s=>s?t.SendEnabled.toJSON(s):void 0):o.sendEnabled=[],k.useDefaultFor?o.useDefaultFor=k.useDefaultFor.map(s=>s):o.useDefaultFor=[],o},fromPartial(k){var s,y;const o=b();return o.authority=k.authority??"",o.sendEnabled=((s=k.sendEnabled)==null?void 0:s.map(w=>t.SendEnabled.fromPartial(w)))||[],o.useDefaultFor=((y=k.useDefaultFor)==null?void 0:y.map(w=>w))||[],o}
1};function f(){return{}}e.MsgSetSendEnabledResponse={typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabledResponse",encode(k,o=i.BinaryWriter.create()){return o},decode(k,o){const s=k instanceof i.BinaryReader?k:new i.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=f();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){default:s.skipType(J&7);break}}return w},fromJSON(k){return f()},toJSON(k){return{}},fromPartial(k){return f()}};class p{constructor(o){this.rpc=o,this.Send=this.Send.bind(this),this.MultiSend=this.MultiSend.bind(this),this.UpdateParams=this.UpdateParams.bind(this),this.SetSendEnabled=this.SetSendEnabled.bind(this)}Send(o){const s=e.MsgSend.encode(o).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","Send",s).then(w=>e.MsgSendResponse.decode(new i.BinaryReader(w)))}MultiSend(o){const s=e.MsgMultiSend.encode(o).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","MultiSend",s).then(w=>e.MsgMultiSendResponse.decode(new i.BinaryReader(w)))}UpdateParams(o){const s=e.MsgUpdateParams.encode(o).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","UpdateParams",s).then(w=>e.MsgUpdateParamsResponse.decode(new i.BinaryReader(w)))}SetSendEnabled(o){const s=e.MsgSetSendEnabled.encode(o).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","SetSendEnabled",s).then(w=>e.MsgSetSendEnabledResponse.decode(new i.BinaryReader(w)))}}e.MsgClientImpl=p})(jd);Object.defineProperty(hn,"__esModule",{value:!0});hn.Registry=hn.isTxBodyEncodeObject=hn.isPbjsGeneratedType=hn.isTsProtoGeneratedType=hn.isTelescopeGeneratedType=void 0;const Wy=jd,Fy=ve,Ts=it,Gy=Re;function tl(e){const n=e;return typeof n.fromPartial=="function"&&typeof n.typeUrl=="string"}hn.isTelescopeGeneratedType=tl;function nu(e){return typeof e.fromPartial=="function"}hn.isTsProtoGeneratedType=nu;function Ly(e){return!nu(e)}hn.isPbjsGeneratedType=Ly;const tc={cosmosCoin:"/cosmos.base.v1beta1.Coin",cosmosMsgSend:"/cosmos.bank.v1beta1.MsgSend",cosmosTxBody:"/cosmos.tx.v1beta1.TxBody",googleAny:"/google.protobuf.Any"};function rl(e){return e.typeUrl==="/cosmos.tx.v1beta1.TxBody"}hn.isTxBodyEncodeObject=rl;class $y{constructor(n){const{cosmosCoin:t,cosmosMsgSend:i}=tc;this.types=n?new Map([...n]):new Map([[t,Fy.Coin],[i,Wy.MsgSend]])}register(n,t){this.types.set(n,t)}lookupType(n){return this.types.get(n)}lookupTypeWithError(n){const t=this.lookupType(n);if(!t)throw new Error(`Unregistered type url: ${n}`);return t}encode(n){const{value:t,typeUrl:i}=n;if(rl(n))return this.encodeTxBody(t);const u=this.lookupTypeWithError(i),R=tl(u)||nu(u)?u.fromPartial(t):u.create(t);return u.encode(R).finish()}encodeAsAny(n){const t=this.encode(n);return Gy.Any.fromPartial({typeUrl:n.typeUrl,value:t})}encodeTxBody(n){var u;const t=n.messages.map(R=>this.encodeAsAny(R)),i=Ts.TxBody.fromPartial({...n,timeoutHeight:BigInt(((u=n.timeoutHeight)==null?void 0:u.toString())??"0"),messages:t});return Ts.TxBody.encode(i).finish()}decode({typeUrl:n,value:t}){if(n===tc.cosmosTxBody)return this.decodeTxBody(t);const u=this.lookupTypeWithError(n).decode(t);return Object.entries(u).forEach(([R,v])=>{typeof Buffer<"u"&&typeof Buffer.isBuffer<"u"&&Buffer.isBuffer(v)&&(u[R]=Uint8Array.from(v))}),u}decodeTxBody(n){const t=Ts.TxBody.decode(n);return{...t,messages:t.messages.map(({typeUrl:i,value:u})=>{if(!i)throw new Error("Missing type_url in Any");if(!u)throw new Error("Missing value in Any");return this.decode({typeUrl:i,value:u})})}}}hn.Registry=$y;var zo={};Object.defineProperty(zo,"__esModule",{value:!0});zo.isOfflineDirectSigner=void 0;function Ky(e){return e.signDirect!==void 0}zo.isOfflineDirectSigner=Ky;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseCoins=e.coins=e.coin=e.executeKdf=e.makeSignDoc=e.makeSignBytes=e.makeAuthInfoBytes=e.isOfflineDirectSigner=e.Registry=e.isTxBodyEncodeObject=e.isTsProtoGeneratedType=e.isPbjsGeneratedType=e.encodePubkey=e.decodePubkey=e.decodeOptionalPubkey=e.anyToSinglePubkey=e.makeCosmoshubPath=e.DirectSecp256k1Wallet=e.extractKdfConfiguration=e.DirectSecp256k1HdWallet=e.decodeTxRaw=void 0;var n=Vo;Object.defineProperty(e,"decodeTxRaw",{enumerable:!0,get:function(){return n.decodeTxRaw}});var t=wr;Object.defineProperty(e,"DirectSecp256k1HdWallet",{enumerable:!0,get:function(){return t.DirectSecp256k1HdWallet}}),Object.defineProperty(e,"extractKdfConfiguration",{enumerable:!0,get:function(){return t.extractKdfConfiguration}});var i=$o;Object.defineProperty(e,"DirectSecp256k1Wallet",{enumerable:!0,get:function(){return i.DirectSecp256k1Wallet}});var u=Ko;Object.defineProperty(e,"makeCosmoshubPath",{enumerable:!0,get:function(){return u.makeCosmoshubPath}});var R=$n;Object.defineProperty(e,"anyToSinglePubkey",{enumerable:!0,get:function(){return R.anyToSinglePubkey}}),Object.defineProperty(e,"decodeOptionalPubkey",{enumerable:!0,get:function(){return R.decodeOptionalPubkey}}),Object.defineProperty(e,"decodePubkey",{enumerable:!0,get:function(){return R.decodePubkey}}),Object.defineProperty(e,"encodePubkey",{enumerable:!0,get:function(){return R.encodePubkey}});var v=hn;Object.defineProperty(e,"isPbjsGeneratedType",{enumerable:!0,get:function(){return v.isPbjsGeneratedType}}),Object.defineProperty(e,"isTsProtoGeneratedType",{enumerable:!0,get:function(){return v.isTsProtoGeneratedType}}),Object.defineProperty(e,"isTxBodyEncodeObject",{enumerable:!0,get:function(){return v.isTxBodyEncodeObject}}),Object.defineProperty(e,"Registry",{enumerable:!0,get:function(){return v.Registry}});var E=zo;Object.defineProperty(e,"isOfflineDirectSigner",{enumerable:!0,get:function(){return E.isOfflineDirectSigner}});var C=xn;Object.defineProperty(e,"makeAuthInfoBytes",{enumerable:!0,get:function(){return C.makeAuthInfoBytes}}),Object.defineProperty(e,"makeSignBytes",{enumerable:!0,get:function(){return C.makeSignBytes}}),Object.defineProperty(e,"makeSignDoc",{enumerable:!0,get:function(){return C.makeSignDoc}});var D=Xd;Object.defineProperty(e,"executeKdf",{enumerable:!0,get:function(){return D.executeKdf}});var _=ot;Object.defineProperty(e,"coin",{enumerable:!0,get:function(){return _.coin}}),Object.defineProperty(e,"coins",{enumerable:!0,get:function(){return _.coins}}),Object.defineProperty(e,"parseCoins",{enumerable:!0,get:function(){return _.parseCoins}})})(Ct);var Zo={};
1(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Params=e.ModuleCredential=e.ModuleAccount=e.BaseAccount=e.protobufPackage=void 0;const n=Re,t=te,i=ee;e.protobufPackage="cosmos.auth.v1beta1";function u(){return{address:"",pubKey:void 0,accountNumber:BigInt(0),sequence:BigInt(0)}}e.BaseAccount={typeUrl:"/cosmos.auth.v1beta1.BaseAccount",encode(C,D=t.BinaryWriter.create()){return C.address!==""&&D.uint32(10).string(C.address),C.pubKey!==void 0&&n.Any.encode(C.pubKey,D.uint32(18).fork()).ldelim(),C.accountNumber!==BigInt(0)&&D.uint32(24).uint64(C.accountNumber),C.sequence!==BigInt(0)&&D.uint32(32).uint64(C.sequence),D},decode(C,D){const _=C instanceof t.BinaryReader?C:new t.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=u();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.address=_.string();break;case 2:f.pubKey=n.Any.decode(_,_.uint32());break;case 3:f.accountNumber=_.uint64();break;case 4:f.sequence=_.uint64();break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=u();return(0,i.isSet)(C.address)&&(D.address=String(C.address)),(0,i.isSet)(C.pubKey)&&(D.pubKey=n.Any.fromJSON(C.pubKey)),(0,i.isSet)(C.accountNumber)&&(D.accountNumber=BigInt(C.accountNumber.toString())),(0,i.isSet)(C.sequence)&&(D.sequence=BigInt(C.sequence.toString())),D},toJSON(C){const D={};return C.address!==void 0&&(D.address=C.address),C.pubKey!==void 0&&(D.pubKey=C.pubKey?n.Any.toJSON(C.pubKey):void 0),C.accountNumber!==void 0&&(D.accountNumber=(C.accountNumber||BigInt(0)).toString()),C.sequence!==void 0&&(D.sequence=(C.sequence||BigInt(0)).toString()),D},fromPartial(C){const D=u();return D.address=C.address??"",C.pubKey!==void 0&&C.pubKey!==null&&(D.pubKey=n.Any.fromPartial(C.pubKey)),C.accountNumber!==void 0&&C.accountNumber!==null&&(D.accountNumber=BigInt(C.accountNumber.toString())),C.sequence!==void 0&&C.sequence!==null&&(D.sequence=BigInt(C.sequence.toString())),D}};function R(){return{baseAccount:void 0,name:"",permissions:[]}}e.ModuleAccount={typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",encode(C,D=t.BinaryWriter.create()){C.baseAccount!==void 0&&e.BaseAccount.encode(C.baseAccount,D.uint32(10).fork()).ldelim(),C.name!==""&&D.uint32(18).string(C.name);for(const _ of C.permissions)D.uint32(26).string(_);return D},decode(C,D){const _=C instanceof t.BinaryReader?C:new t.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=R();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.baseAccount=e.BaseAccount.decode(_,_.uint32());break;case 2:f.name=_.string();break;case 3:f.permissions.push(_.string());break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=R();return(0,i.isSet)(C.baseAccount)&&(D.baseAccount=e.BaseAccount.fromJSON(C.baseAccount)),(0,i.isSet)(C.name)&&(D.name=String(C.name)),Array.isArray(C==null?void 0:C.permissions)&&(D.permissions=C.permissions.map(_=>String(_))),D},toJSON(C){const D={};return C.baseAccount!==void 0&&(D.baseAccount=C.baseAccount?e.BaseAccount.toJSON(C.baseAccount):void 0),C.name!==void 0&&(D.name=C.name),C.permissions?D.permissions=C.permissions.map(_=>_):D.permissions=[],D},fromPartial(C){var _;const D=R();return C.baseAccount!==void 0&&C.baseAccount!==null&&(D.baseAccount=e.BaseAccount.fromPartial(C.baseAccount)),D.name=C.name??"",D.permissions=((_=C.permissions)==null?void 0:_.map(b=>b))||[],D}};function v(){return{moduleName:"",derivationKeys:[]}}e.ModuleCredential={typeUrl:"/cosmos.auth.v1beta1.ModuleCredential",encode(C,D=t.BinaryWriter.create()){C.moduleName!==""&&D.uint32(10).string(C.moduleName);for(const _ of C.derivationKeys)D.uint32(18).bytes(_);return D},decode(C,D){const _=C instanceof t.BinaryReader?C:new t.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=v();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.moduleName=_.string();break;case 2:f.derivationKeys.push(_.bytes());break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=v();return(0,i.isSet)(C.moduleName)&&(D.moduleName=String(C.moduleName)),Array.isArray(C==null?void 0:C.derivationKeys)&&(D.derivationKeys=C.derivationKeys.map(_=>(0,i.bytesFromBase64)(_))),D},toJSON(C){const D={};return C.moduleName!==void 0&&(D.moduleName=C.moduleName),C.derivationKeys?D.derivationKeys=C.derivationKeys.map(_=>(0,i.base64FromBytes)(_!==void 0?_:new Uint8Array)):D.derivationKeys=[],D},fromPartial(C){var _;const D=v();return D.moduleName=C.moduleName??"",D.derivationKeys=((_=C.derivationKeys)==null?void 0:_.map(b=>b))||[],D}};function E(){return{maxMemoCharacters:BigInt(0),txSigLimit:BigInt(0),txSizeCostPerByte:BigInt(0),sigVerifyCostEd25519:BigInt(0),sigVerifyCostSecp256k1:BigInt(0)}}
1e.Params={typeUrl:"/cosmos.auth.v1beta1.Params",encode(C,D=t.BinaryWriter.create()){return C.maxMemoCharacters!==BigInt(0)&&D.uint32(8).uint64(C.maxMemoCharacters),C.txSigLimit!==BigInt(0)&&D.uint32(16).uint64(C.txSigLimit),C.txSizeCostPerByte!==BigInt(0)&&D.uint32(24).uint64(C.txSizeCostPerByte),C.sigVerifyCostEd25519!==BigInt(0)&&D.uint32(32).uint64(C.sigVerifyCostEd25519),C.sigVerifyCostSecp256k1!==BigInt(0)&&D.uint32(40).uint64(C.sigVerifyCostSecp256k1),D},decode(C,D){const _=C instanceof t.BinaryReader?C:new t.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=E();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.maxMemoCharacters=_.uint64();break;case 2:f.txSigLimit=_.uint64();break;case 3:f.txSizeCostPerByte=_.uint64();break;case 4:f.sigVerifyCostEd25519=_.uint64();break;case 5:f.sigVerifyCostSecp256k1=_.uint64();break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=E();return(0,i.isSet)(C.maxMemoCharacters)&&(D.maxMemoCharacters=BigInt(C.maxMemoCharacters.toString())),(0,i.isSet)(C.txSigLimit)&&(D.txSigLimit=BigInt(C.txSigLimit.toString())),(0,i.isSet)(C.txSizeCostPerByte)&&(D.txSizeCostPerByte=BigInt(C.txSizeCostPerByte.toString())),(0,i.isSet)(C.sigVerifyCostEd25519)&&(D.sigVerifyCostEd25519=BigInt(C.sigVerifyCostEd25519.toString())),(0,i.isSet)(C.sigVerifyCostSecp256k1)&&(D.sigVerifyCostSecp256k1=BigInt(C.sigVerifyCostSecp256k1.toString())),D},toJSON(C){const D={};return C.maxMemoCharacters!==void 0&&(D.maxMemoCharacters=(C.maxMemoCharacters||BigInt(0)).toString()),C.txSigLimit!==void 0&&(D.txSigLimit=(C.txSigLimit||BigInt(0)).toString()),C.txSizeCostPerByte!==void 0&&(D.txSizeCostPerByte=(C.txSizeCostPerByte||BigInt(0)).toString()),C.sigVerifyCostEd25519!==void 0&&(D.sigVerifyCostEd25519=(C.sigVerifyCostEd25519||BigInt(0)).toString()),C.sigVerifyCostSecp256k1!==void 0&&(D.sigVerifyCostSecp256k1=(C.sigVerifyCostSecp256k1||BigInt(0)).toString()),D},fromPartial(C){const D=E();return C.maxMemoCharacters!==void 0&&C.maxMemoCharacters!==null&&(D.maxMemoCharacters=BigInt(C.maxMemoCharacters.toString())),C.txSigLimit!==void 0&&C.txSigLimit!==null&&(D.txSigLimit=BigInt(C.txSigLimit.toString())),C.txSizeCostPerByte!==void 0&&C.txSizeCostPerByte!==null&&(D.txSizeCostPerByte=BigInt(C.txSizeCostPerByte.toString())),C.sigVerifyCostEd25519!==void 0&&C.sigVerifyCostEd25519!==null&&(D.sigVerifyCostEd25519=BigInt(C.sigVerifyCostEd25519.toString())),C.sigVerifyCostSecp256k1!==void 0&&C.sigVerifyCostSecp256k1!==null&&(D.sigVerifyCostSecp256k1=BigInt(C.sigVerifyCostSecp256k1.toString())),D}}})(Zo);var tu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PermanentLockedAccount=e.PeriodicVestingAccount=e.Period=e.DelayedVestingAccount=e.ContinuousVestingAccount=e.BaseVestingAccount=e.protobufPackage=void 0;const n=Zo,t=ve,i=te,u=ee;e.protobufPackage="cosmos.vesting.v1beta1";function R(){return{baseAccount:void 0,originalVesting:[],delegatedFree:[],delegatedVesting:[],endTime:BigInt(0)}}e.BaseVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.BaseVestingAccount",encode(b,f=i.BinaryWriter.create()){b.baseAccount!==void 0&&n.BaseAccount.encode(b.baseAccount,f.uint32(10).fork()).ldelim();for(const p of b.originalVesting)t.Coin.encode(p,f.uint32(18).fork()).ldelim();for(const p of b.delegatedFree)t.Coin.encode(p,f.uint32(26).fork()).ldelim();for(const p of b.delegatedVesting)t.Coin.encode(p,f.uint32(34).fork()).ldelim();return b.endTime!==BigInt(0)&&f.uint32(40).int64(b.endTime),f},decode(b,f){const p=b instanceof i.BinaryReader?b:new i.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=R();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.baseAccount=n.BaseAccount.decode(p,p.uint32());break;case 2:o.originalVesting.push(t.Coin.decode(p,p.uint32()));break;case 3:o.delegatedFree.push(t.Coin.decode(p,p.uint32()));break;case 4:o.delegatedVesting.push(t.Coin.decode(p,p.uint32()));break;case 5:o.endTime=p.int64();break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=R();return(0,u.isSet)(b.baseAccount)&&(f.baseAccount=n.BaseAccount.fromJSON(b.baseAccount)),Array.isArray(b==null?void 0:b.originalVesting)&&(f.originalVesting=b.originalVesting.map(p=>t.Coin.fromJSON(p))),Array.isArray(b==null?void 0:b.delegatedFree)&&(f.delegatedFree=b.delegatedFree.map(p=>t.Coin.fromJSON(p))),Array.isArray(b==null?void 0:b.delegatedVesting)&&(f.delegatedVesting=b.delegatedVesting.map(p=>
1t.Coin.fromJSON(p))),(0,u.isSet)(b.endTime)&&(f.endTime=BigInt(b.endTime.toString())),f},toJSON(b){const f={};return b.baseAccount!==void 0&&(f.baseAccount=b.baseAccount?n.BaseAccount.toJSON(b.baseAccount):void 0),b.originalVesting?f.originalVesting=b.originalVesting.map(p=>p?t.Coin.toJSON(p):void 0):f.originalVesting=[],b.delegatedFree?f.delegatedFree=b.delegatedFree.map(p=>p?t.Coin.toJSON(p):void 0):f.delegatedFree=[],b.delegatedVesting?f.delegatedVesting=b.delegatedVesting.map(p=>p?t.Coin.toJSON(p):void 0):f.delegatedVesting=[],b.endTime!==void 0&&(f.endTime=(b.endTime||BigInt(0)).toString()),f},fromPartial(b){var p,k,o;const f=R();return b.baseAccount!==void 0&&b.baseAccount!==null&&(f.baseAccount=n.BaseAccount.fromPartial(b.baseAccount)),f.originalVesting=((p=b.originalVesting)==null?void 0:p.map(s=>t.Coin.fromPartial(s)))||[],f.delegatedFree=((k=b.delegatedFree)==null?void 0:k.map(s=>t.Coin.fromPartial(s)))||[],f.delegatedVesting=((o=b.delegatedVesting)==null?void 0:o.map(s=>t.Coin.fromPartial(s)))||[],b.endTime!==void 0&&b.endTime!==null&&(f.endTime=BigInt(b.endTime.toString())),f}};function v(){return{baseVestingAccount:void 0,startTime:BigInt(0)}}e.ContinuousVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.ContinuousVestingAccount",encode(b,f=i.BinaryWriter.create()){return b.baseVestingAccount!==void 0&&e.BaseVestingAccount.encode(b.baseVestingAccount,f.uint32(10).fork()).ldelim(),b.startTime!==BigInt(0)&&f.uint32(16).int64(b.startTime),f},decode(b,f){const p=b instanceof i.BinaryReader?b:new i.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=v();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.baseVestingAccount=e.BaseVestingAccount.decode(p,p.uint32());break;case 2:o.startTime=p.int64();break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=v();return(0,u.isSet)(b.baseVestingAccount)&&(f.baseVestingAccount=e.BaseVestingAccount.fromJSON(b.baseVestingAccount)),(0,u.isSet)(b.startTime)&&(f.startTime=BigInt(b.startTime.toString())),f},toJSON(b){const f={};return b.baseVestingAccount!==void 0&&(f.baseVestingAccount=b.baseVestingAccount?e.BaseVestingAccount.toJSON(b.baseVestingAccount):void 0),b.startTime!==void 0&&(f.startTime=(b.startTime||BigInt(0)).toString()),f},fromPartial(b){const f=v();return b.baseVestingAccount!==void 0&&b.baseVestingAccount!==null&&(f.baseVestingAccount=e.BaseVestingAccount.fromPartial(b.baseVestingAccount)),b.startTime!==void 0&&b.startTime!==null&&(f.startTime=BigInt(b.startTime.toString())),f}};function E(){return{baseVestingAccount:void 0}}e.DelayedVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.DelayedVestingAccount",encode(b,f=i.BinaryWriter.create()){return b.baseVestingAccount!==void 0&&e.BaseVestingAccount.encode(b.baseVestingAccount,f.uint32(10).fork()).ldelim(),f},decode(b,f){const p=b instanceof i.BinaryReader?b:new i.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=E();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.baseVestingAccount=e.BaseVestingAccount.decode(p,p.uint32());break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=E();return(0,u.isSet)(b.baseVestingAccount)&&(f.baseVestingAccount=e.BaseVestingAccount.fromJSON(b.baseVestingAccount)),f},toJSON(b){const f={};return b.baseVestingAccount!==void 0&&(f.baseVestingAccount=b.baseVestingAccount?e.BaseVestingAccount.toJSON(b.baseVestingAccount):void 0),f},fromPartial(b){const f=E();return b.baseVestingAccount!==void 0&&b.baseVestingAccount!==null&&(f.baseVestingAccount=e.BaseVestingAccount.fromPartial(b.baseVestingAccount)),f}};function C(){return{length:BigInt(0),amount:[]}}e.Period={typeUrl:"/cosmos.vesting.v1beta1.Period",encode(b,f=i.BinaryWriter.create()){b.length!==BigInt(0)&&f.uint32(8).int64(b.length);for(const p of b.amount)t.Coin.encode(p,f.uint32(18).fork()).ldelim();return f},decode(b,f){const p=b instanceof i.BinaryReader?b:new i.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=C();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.length=p.int64();break;case 2:o.amount.push(t.Coin.decode(p,p.uint32()));break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=C();return(0,u.isSet)(b.length)&&(f.length=BigInt(b.length.toString())),Array.isArray(b==null?void 0:b.amount)&&(f.amount=b.amount.map(p=>t.Coin.fromJSON(p))),f},toJSON(b){const f={};return b.length!==void 0&&(f.length=(b.length||BigInt(0)).toString()),b.amount?f.amount=b.amount.map(p=>p?t.Coin.toJSON(p):void 0):f.amount=[],f},fromPartial(b){var p;const f=C();return b.length!==void 0&&b.length!==null&&(f.length=BigInt(b.length.toString())),f.amount=((p=b.amount)==null?void 0:p.map(k=>t.Coin.fromPartial(k)))||[],f}}
1;function D(){return{baseVestingAccount:void 0,startTime:BigInt(0),vestingPeriods:[]}}e.PeriodicVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.PeriodicVestingAccount",encode(b,f=i.BinaryWriter.create()){b.baseVestingAccount!==void 0&&e.BaseVestingAccount.encode(b.baseVestingAccount,f.uint32(10).fork()).ldelim(),b.startTime!==BigInt(0)&&f.uint32(16).int64(b.startTime);for(const p of b.vestingPeriods)e.Period.encode(p,f.uint32(26).fork()).ldelim();return f},decode(b,f){const p=b instanceof i.BinaryReader?b:new i.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=D();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.baseVestingAccount=e.BaseVestingAccount.decode(p,p.uint32());break;case 2:o.startTime=p.int64();break;case 3:o.vestingPeriods.push(e.Period.decode(p,p.uint32()));break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=D();return(0,u.isSet)(b.baseVestingAccount)&&(f.baseVestingAccount=e.BaseVestingAccount.fromJSON(b.baseVestingAccount)),(0,u.isSet)(b.startTime)&&(f.startTime=BigInt(b.startTime.toString())),Array.isArray(b==null?void 0:b.vestingPeriods)&&(f.vestingPeriods=b.vestingPeriods.map(p=>e.Period.fromJSON(p))),f},toJSON(b){const f={};return b.baseVestingAccount!==void 0&&(f.baseVestingAccount=b.baseVestingAccount?e.BaseVestingAccount.toJSON(b.baseVestingAccount):void 0),b.startTime!==void 0&&(f.startTime=(b.startTime||BigInt(0)).toString()),b.vestingPeriods?f.vestingPeriods=b.vestingPeriods.map(p=>p?e.Period.toJSON(p):void 0):f.vestingPeriods=[],f},fromPartial(b){var p;const f=D();return b.baseVestingAccount!==void 0&&b.baseVestingAccount!==null&&(f.baseVestingAccount=e.BaseVestingAccount.fromPartial(b.baseVestingAccount)),b.startTime!==void 0&&b.startTime!==null&&(f.startTime=BigInt(b.startTime.toString())),f.vestingPeriods=((p=b.vestingPeriods)==null?void 0:p.map(k=>e.Period.fromPartial(k)))||[],f}};function _(){return{baseVestingAccount:void 0}}e.PermanentLockedAccount={typeUrl:"/cosmos.vesting.v1beta1.PermanentLockedAccount",encode(b,f=i.BinaryWriter.create()){return b.baseVestingAccount!==void 0&&e.BaseVestingAccount.encode(b.baseVestingAccount,f.uint32(10).fork()).ldelim(),f},decode(b,f){const p=b instanceof i.BinaryReader?b:new i.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=_();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.baseVestingAccount=e.BaseVestingAccount.decode(p,p.uint32());break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=_();return(0,u.isSet)(b.baseVestingAccount)&&(f.baseVestingAccount=e.BaseVestingAccount.fromJSON(b.baseVestingAccount)),f},toJSON(b){const f={};return b.baseVestingAccount!==void 0&&(f.baseVestingAccount=b.baseVestingAccount?e.BaseVestingAccount.toJSON(b.baseVestingAccount):void 0),f},fromPartial(b){const f=_();return b.baseVestingAccount!==void 0&&b.baseVestingAccount!==null&&(f.baseVestingAccount=e.BaseVestingAccount.fromPartial(b.baseVestingAccount)),f}}})(tu);Object.defineProperty(Ji,"__esModule",{value:!0});Ji.accountFromAny=void 0;const zy=Cn,Zy=Ct,pi=$e,rc=Zo,ji=tu;function ic(e){return zy.Uint64.fromString(e.toString())}function sr(e){const{address:n,pubKey:t,accountNumber:i,sequence:u}=e,R=(0,Zy.decodeOptionalPubkey)(t);return{address:n,pubkey:R,accountNumber:ic(i).toNumber(),sequence:ic(u).toNumber()}}function Yy(e){var i,u,R,v,E,C,D;const{typeUrl:n,value:t}=e;switch(n){case"/cosmos.auth.v1beta1.BaseAccount":return sr(rc.BaseAccount.decode(t));case"/cosmos.auth.v1beta1.ModuleAccount":{const _=rc.ModuleAccount.decode(t).baseAccount;return(0,pi.assert)(_),sr(_)}case"/cosmos.vesting.v1beta1.BaseVestingAccount":{const _=(i=ji.BaseVestingAccount.decode(t))==null?void 0:i.baseAccount;return(0,pi.assert)(_),sr(_)}case"/cosmos.vesting.v1beta1.ContinuousVestingAccount":{const _=(R=(u=ji.ContinuousVestingAccount.decode(t))==null?void 0:u.baseVestingAccount)==null?void 0:R.baseAccount;return(0,pi.assert)(_),sr(_)}case"/cosmos.vesting.v1beta1.DelayedVestingAccount":{const _=(E=(v=ji.DelayedVestingAccount.decode(t))==null?void 0:v.baseVestingAccount)==null?void 0:E.baseAccount;return(0,pi.assert)(_),sr(_)}case"/cosmos.vesting.v1beta1.PeriodicVestingAccount":{const _=(D=(C=ji.PeriodicVestingAccount.decode(t))==null?void 0:C.baseVestingAccount)==null?void 0:D.baseAccount;return(0,pi.assert)(_),sr(_)}default:throw new Error(`Unsupported type: '${n}'`)}}Ji.accountFromAny=Yy;var Hi={};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.AminoTypes=void 0;class Xy{constructor(n){this.register=n}toAmino({typeUrl:n,value:t}){const i=this.register[n];if(!i)throw new Error(`Type URL '${n}' does not exist in the Amino message type register. If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.`);return{type:i.aminoType,value:i.toAmino(t)}}fromAmino({type:n,value:t}){const i=Object.entries(this.register).filter(([u,{aminoType:R}])=>R===n);switch(i.length){case 0:throw new Error(`Amino type identifier '${n}' does not exist in the Amino message type register. If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.`);case 1:{const[u,R]=i[0];return{typeUrl:u,value:R.fromAmino(t)}}default:throw new Error(`Multiple types are registered with Amino type identifier '${n}': '`+i.map(([u,R])=>u).sort().join("', '")+"'. Thus fromAmino cannot be performed.")}}}Hi.AminoTypes=Xy;var qi={};Object.defineProperty(qi,"__esModule",{value:!0});qi.fromTendermintEvent=void 0;const oc=Pe;function xy(e){return{type:e.type,attributes:e.attributes.map(n=>({key:typeof n.key=="string"?n.key:(0,oc.fromUtf8)(n.key,!0),value:typeof n.value=="string"?n.value:(0,oc.fromUtf8)(n.value,!0)}))}}qi.fromTendermintEvent=xy;var qt={};
1Object.defineProperty(qt,"__esModule",{value:!0});qt.calculateFee=qt.GasPrice=void 0;const il=Cn,jy=Ct;function eh(e){if(e.length<3||e.length>128)throw new Error("Denom must be between 3 and 128 characters")}class Yo{constructor(n,t){this.amount=n,this.denom=t}static fromString(n){const t=n.match(/^([0-9.]+)([a-zA-Z][a-zA-Z0-9/:._-]*)$/);if(!t)throw new Error("Invalid gas price string");const[i,u,R]=t;eh(R);const v=18,E=il.Decimal.fromUserInput(u,v);return new Yo(E,R)}toString(){return this.amount.toString()+this.denom}}qt.GasPrice=Yo;function nh(e,n){const t=typeof n=="string"?Yo.fromString(n):n,{denom:i,amount:u}=t,R=u.multiply(new il.Uint53(e)).ceil().toString();return{amount:(0,jy.coins)(R,i),gas:e.toString()}}qt.calculateFee=nh;var je={};Object.defineProperty(je,"__esModule",{value:!0});je.findAttribute=je.parseRawLog=je.parseLogs=je.parseLog=je.parseEvent=je.parseAttribute=void 0;const ru=$e;function ol(e){if(!(0,ru.isNonNullObject)(e))throw new Error("Attribute must be a non-null object");const{key:n,value:t}=e;if(typeof n!="string"||!n)throw new Error("Attribute's key must be a non-empty string");if(typeof t!="string"&&typeof t<"u")throw new Error("Attribute's value must be a string or unset");return{key:n,value:t||""}}je.parseAttribute=ol;function al(e){if(!(0,ru.isNonNullObject)(e))throw new Error("Event must be a non-null object");const{type:n,attributes:t}=e;if(typeof n!="string"||n==="")throw new Error("Event type must be a non-empty string");if(!Array.isArray(t))throw new Error("Event's attributes must be an array");return{type:n,attributes:t.map(ol)}}je.parseEvent=al;function sl(e){if(!(0,ru.isNonNullObject)(e))throw new Error("Log must be a non-null object");const{msg_index:n,log:t,events:i}=e;if(typeof n!="number")throw new Error("Log's msg_index must be a number");if(typeof t!="string")throw new Error("Log's log must be a string");if(!Array.isArray(i))throw new Error("Log's events must be an array");return{msg_index:n,log:t,events:i.map(al)}}je.parseLog=sl;function dl(e){if(!Array.isArray(e))throw new Error("Logs must be an array");return e.map(sl)}je.parseLogs=dl;function th(e){if(!e)return[];const n=JSON.parse(e).map(({events:t},i)=>({msg_index:i,events:t,log:""}));return dl(n)}je.parseRawLog=th;function rh(e,n,t){var R;const i=e.find(()=>!0),u=(R=i==null?void 0:i.events.find(v=>v.type===n))==null?void 0:R.attributes.find(v=>v.key===t);if(!u)throw new Error(`Could not find attribute '${t}' in first event of type '${n}' in first log.`);return u}je.findAttribute=rh;var Ni={},Xo={},ul={},_e={};
1Object.defineProperty(_e,"__esModule",{value:!0});_e.PageResponse=_e.PageRequest=_e.protobufPackage=void 0;const Br=te,Un=ee;_e.protobufPackage="cosmos.base.query.v1beta1";function Ns(){return{key:new Uint8Array,offset:BigInt(0),limit:BigInt(0),countTotal:!1,reverse:!1}}_e.PageRequest={typeUrl:"/cosmos.base.query.v1beta1.PageRequest",encode(e,n=Br.BinaryWriter.create()){return e.key.length!==0&&n.uint32(10).bytes(e.key),e.offset!==BigInt(0)&&n.uint32(16).uint64(e.offset),e.limit!==BigInt(0)&&n.uint32(24).uint64(e.limit),e.countTotal===!0&&n.uint32(32).bool(e.countTotal),e.reverse===!0&&n.uint32(40).bool(e.reverse),n},decode(e,n){const t=e instanceof Br.BinaryReader?e:new Br.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Ns();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.key=t.bytes();break;case 2:u.offset=t.uint64();break;case 3:u.limit=t.uint64();break;case 4:u.countTotal=t.bool();break;case 5:u.reverse=t.bool();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Ns();return(0,Un.isSet)(e.key)&&(n.key=(0,Un.bytesFromBase64)(e.key)),(0,Un.isSet)(e.offset)&&(n.offset=BigInt(e.offset.toString())),(0,Un.isSet)(e.limit)&&(n.limit=BigInt(e.limit.toString())),(0,Un.isSet)(e.countTotal)&&(n.countTotal=!!e.countTotal),(0,Un.isSet)(e.reverse)&&(n.reverse=!!e.reverse),n},toJSON(e){const n={};return e.key!==void 0&&(n.key=(0,Un.base64FromBytes)(e.key!==void 0?e.key:new Uint8Array)),e.offset!==void 0&&(n.offset=(e.offset||BigInt(0)).toString()),e.limit!==void 0&&(n.limit=(e.limit||BigInt(0)).toString()),e.countTotal!==void 0&&(n.countTotal=e.countTotal),e.reverse!==void 0&&(n.reverse=e.reverse),n},fromPartial(e){const n=Ns();return n.key=e.key??new Uint8Array,e.offset!==void 0&&e.offset!==null&&(n.offset=BigInt(e.offset.toString())),e.limit!==void 0&&e.limit!==null&&(n.limit=BigInt(e.limit.toString())),n.countTotal=e.countTotal??!1,n.reverse=e.reverse??!1,n}};function Cs(){return{nextKey:new Uint8Array,total:BigInt(0)}}_e.PageResponse={typeUrl:"/cosmos.base.query.v1beta1.PageResponse",encode(e,n=Br.BinaryWriter.create()){return e.nextKey.length!==0&&n.uint32(10).bytes(e.nextKey),e.total!==BigInt(0)&&n.uint32(16).uint64(e.total),n},decode(e,n){const t=e instanceof Br.BinaryReader?e:new Br.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Cs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.nextKey=t.bytes();break;case 2:u.total=t.uint64();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Cs();return(0,Un.isSet)(e.nextKey)&&(n.nextKey=(0,Un.bytesFromBase64)(e.nextKey)),(0,Un.isSet)(e.total)&&(n.total=BigInt(e.total.toString())),n},toJSON(e){const n={};return e.nextKey!==void 0&&(n.nextKey=(0,Un.base64FromBytes)(e.nextKey!==void 0?e.nextKey:new Uint8Array)),e.total!==void 0&&(n.total=(e.total||BigInt(0)).toString()),n},fromPartial(e){const n=Cs();return n.nextKey=e.nextKey??new Uint8Array,e.total!==void 0&&e.total!==null&&(n.total=BigInt(e.total.toString())),n}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryAccountInfoResponse=e.QueryAccountInfoRequest=e.QueryAccountAddressByIDResponse=e.QueryAccountAddressByIDRequest=e.AddressStringToBytesResponse=e.AddressStringToBytesRequest=e.AddressBytesToStringResponse=e.AddressBytesToStringRequest=e.Bech32PrefixResponse=e.Bech32PrefixRequest=e.QueryModuleAccountByNameResponse=e.QueryModuleAccountByNameRequest=e.QueryModuleAccountsResponse=e.QueryModuleAccountsRequest=e.QueryParamsResponse=e.QueryParamsRequest=e.QueryAccountResponse=e.QueryAccountRequest=e.QueryAccountsResponse=e.QueryAccountsRequest=e.protobufPackage=void 0;const n=_e,t=Re,i=Zo,u=te,R=ee;e.protobufPackage="cosmos.auth.v1beta1";function v(){return{pagination:void 0}}e.QueryAccountsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountsRequest",encode(l,T=u.BinaryWriter.create()){return l.pagination!==void 0&&n.PageRequest.encode(l.pagination,T.uint32(10).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=v();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.pagination=n.PageRequest.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=v();return(0,R.isSet)(l.pagination)&&(T.pagination=n.PageRequest.fromJSON(l.pagination)),T},toJSON(l){const T={};return l.pagination!==void 0&&(T.pagination=l.pagination?n.PageRequest.toJSON(l.pagination):void 0),T},fromPartial(l){const T=v();return l.pagination!==void 0&&l.pagination!==null&&(T.pagination=n.PageRequest.fromPartial(l.pagination)),T}};function E(){return{accounts:[],pagination:void 0}}e.QueryAccountsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountsResponse",encode(l,T=u.BinaryWriter.create()){for(const O of l.accounts)t.Any.encode(O,T.uint32(10).fork()).ldelim();return l.pagination!==void 0&&n.PageResponse.encode(l.pagination,T.uint32(18).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=E();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.accounts.push(t.Any.decode(O,O.uint32()));break;case 2:M.pagination=n.PageResponse.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=E();return Array.isArray(l==null?void 0:l.accounts)&&(T.accounts=l.accounts.map(O=>t.Any.fromJSON(O))),(0,R.isSet)(l.pagination)&&(T.pagination=n.PageResponse.fromJSON(l.pagination)),T},toJSON(l){const T={};return l.accounts?T.accounts=l.accounts.map(O=>O?t.Any.toJSON(O):void 0):T.accounts=[],l.pagination!==void 0&&(T.pagination=l.pagination?n.PageResponse.toJSON(l.pagination):void 0),T},fromPartial(l){var O;const T=E();return T.accounts=((O=l.accounts)==null?void 0:O.map(B=>t.Any.fromPartial(B)))||[],l.pagination!==void 0&&l.pagination!==null&&(T.pagination=n.PageResponse.fromPartial(l.pagination)),T}};function C(){return{address:""}}e.QueryAccountRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountRequest",encode(l,T=u.BinaryWriter.create()){return l.address!==""&&T.uint32(10).string(l.address),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=C();for(;O.pos<B;){const W=O.uint32();switch(W>>>
13){case 1:M.address=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=C();return(0,R.isSet)(l.address)&&(T.address=String(l.address)),T},toJSON(l){const T={};return l.address!==void 0&&(T.address=l.address),T},fromPartial(l){const T=C();return T.address=l.address??"",T}};function D(){return{account:void 0}}e.QueryAccountResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountResponse",encode(l,T=u.BinaryWriter.create()){return l.account!==void 0&&t.Any.encode(l.account,T.uint32(10).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=D();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.account=t.Any.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=D();return(0,R.isSet)(l.account)&&(T.account=t.Any.fromJSON(l.account)),T},toJSON(l){const T={};return l.account!==void 0&&(T.account=l.account?t.Any.toJSON(l.account):void 0),T},fromPartial(l){const T=D();return l.account!==void 0&&l.account!==null&&(T.account=t.Any.fromPartial(l.account)),T}};function _(){return{}}e.QueryParamsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryParamsRequest",encode(l,T=u.BinaryWriter.create()){return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=_();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){default:O.skipType(W&7);break}}return M},fromJSON(l){return _()},toJSON(l){return{}},fromPartial(l){return _()}};function b(){return{params:i.Params.fromPartial({})}}e.QueryParamsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryParamsResponse",encode(l,T=u.BinaryWriter.create()){return l.params!==void 0&&i.Params.encode(l.params,T.uint32(10).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=b();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.params=i.Params.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=b();return(0,R.isSet)(l.params)&&(T.params=i.Params.fromJSON(l.params)),T},toJSON(l){const T={};return l.params!==void 0&&(T.params=l.params?i.Params.toJSON(l.params):void 0),T},fromPartial(l){const T=b();return l.params!==void 0&&l.params!==null&&(T.params=i.Params.fromPartial(l.params)),T}};function f(){return{}}e.QueryModuleAccountsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountsRequest",encode(l,T=u.BinaryWriter.create()){return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=f();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){default:O.skipType(W&7);break}}return M},fromJSON(l){return f()},toJSON(l){return{}},fromPartial(l){return f()}};function p(){return{accounts:[]}}e.QueryModuleAccountsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountsResponse",encode(l,T=u.BinaryWriter.create()){for(const O of l.accounts)t.Any.encode(O,T.uint32(10).fork()).ldelim();return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=p();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.accounts.push(t.Any.decode(O,O.uint32()));break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=p();return Array.isArray(l==null?void 0:l.accounts)&&(T.accounts=l.accounts.map(O=>t.Any.fromJSON(O))),T},toJSON(l){const T={};return l.accounts?T.accounts=l.accounts.map(O=>O?t.Any.toJSON(O):void 0):T.accounts=[],T},fromPartial(l){var O;const T=p();return T.accounts=((O=l.accounts)==null?void 0:O.map(B=>t.Any.fromPartial(B)))||[],T}};function k(){return{name:""}}e.QueryModuleAccountByNameRequest={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest",encode(l,T=u.BinaryWriter.create()){return l.name!==""&&T.uint32(10).string(l.name),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=k();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.name=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=k();return(0,R.isSet)(l.name)&&(T.name=String(l.name)),T},toJSON(l){const T={};return l.name!==void 0&&(T.name=l.name),T},fromPartial(l){const T=k();return T.name=l.name??"",T}};function o(){return{account:void 0}}e.QueryModuleAccountByNameResponse={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse",encode(l,T=u.BinaryWriter.create()){return l.account!==void 0&&t.Any.encode(l.account,T.uint32(10).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=o();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.account=t.Any.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=o();return(0,R.isSet)(l.account)&&(T.account=t.Any.fromJSON(l.account)),T},toJSON(l){const T={};return l.account!==void 0&&(T.account=l.account?t.Any.toJSON(l.account):void 0),T},fromPartial(l){const T=o();return l.account!==void 0&&l.account!==null&&(T.account=t.Any.fromPartial(l.account)),T}};function s(){return{}}e.Bech32PrefixRequest={typeUrl:"/cosmos.auth.v1beta1.Bech32PrefixRequest",encode(l,T=u.BinaryWriter.create()){return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=s();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){default:O.skipType(W&7);break}}return M},fromJSON(l){return s()},toJSON(l){return{}},fromPartial(l){return s()}};function y(){return{bech32Prefix:""}}e.Bech32PrefixResponse={typeUrl:"/cosmos.auth.v1beta1.Bech32PrefixResponse",encode(l,T=u.BinaryWriter.create()){return l.bech32Prefix!==""&&T.uint32(10).string(l.bech32Prefix),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=y();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.bech32Prefix=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=y();return(0,R.isSet)(l.bech32Prefix)&&(T.bech32Prefix=String(l.bech32Prefix)),T},toJSON(l){const T={};return l.bech32Prefix!==void 0&&(T.bech32Prefix=l.bech32Prefix),T},fromPartial(l){const T=y();return T.bech32Prefix=l.bech32Prefix??"",T}};function w(){return{addressBytes:new Uint8Array}}e.AddressBytesToStringRequest={typeUrl:"/cosmos.auth.v1beta1.AddressBytesToStringRequest",encode(l,T=u.BinaryWriter.create()){return l.addressBytes.length!==0&&T.uint32(10).bytes(l.addressBytes),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=w();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.addressBytes=O.bytes();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=w();return(0,R.isSet)(l.addressBytes)&&(T.addressBytes=(0,R.bytesFromBase64)(l.addressBytes)),T},toJSON(l){const T={};return l.addressBytes!==void 0&&(T.addressBytes=(0,R.base64FromBytes)(l.addressBytes!==void 0?l.addressBytes:new Uint8Array)),T},fromPartial(l){const T=w();return T.addressBytes=l.addressBytes??new Uint8Array,T}};function J(){return{addressString:""}}e.AddressBytesToStringResponse={typeUrl:"/cosmos.auth.v1beta1.AddressBytesToStringResponse",encode(l,T=u.BinaryWriter.create()){return l.addressString!==""&&T.uint32(10).string(l.addressString),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=J();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.addressString=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=J();return(0,R.isSet)(l.addressString)&&(T.addressString=String(l.addressString)),T},toJSON(l){const T={};return l.addressString!==void 0&&(T.addressString=l.addressString),T},fromPartial(l){const T=J();return T.addressString=l.addressString??"",T}};function P(){return{addressString:""}}e.AddressStringToBytesRequest={typeUrl:"/cosmos.auth.v1beta1.AddressStringToBytesRequest",encode(l,T=u.BinaryWriter.create()){return l.addressString!==""&&T.uint32(10).string(l.addressString),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=P();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.addressString=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=P();return(0,R.isSet)(l.addressString)&&(T.addressString=String(l.addressString)),T},toJSON(l){const T={};return l.addressString!==void 0&&(T.addressString=l.addressString),T},fromPartial(l){const T=P();return T.addressString=l.addressString??"",T}};function U(){return{addressBytes:new Uint8Array}}e.AddressStringToBytesResponse={typeUrl:"/cosmos.auth.v1beta1.AddressStringToBytesResponse",encode(l,T=u.BinaryWriter.create()){return l.addressBytes.length!==0&&T.uint32(10).bytes(l.addressBytes),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=U();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.addressBytes=O.bytes();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=U();return(0,R.isSet)(l.addressBytes)&&(T.addressBytes=(0,R.bytesFromBase64)(l.addressBytes)),T},toJSON(l){const T={};return l.addressBytes!==void 0&&(T.addressBytes=(0,R.base64FromBytes)(l.addressBytes!==void 0?l.addressBytes:new Uint8Array)),T},fromPartial(l){const T=U();return T.addressBytes=l.addressBytes??new Uint8Array,T}};function r(){return{id:BigInt(0),accountId:BigInt(0)}}e.QueryAccountAddressByIDRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest",encode(l,T=u.BinaryWriter.create()){return l.id!==BigInt(0)&&T.uint32(8).int64(l.id),l.accountId!==BigInt(0)&&T.uint32(16).uint64(l.accountId),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=r();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.id=O.int64();break;case 2:M.accountId=O.uint64();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=r();return(0,R.isSet)(l.id)&&(T.id=BigInt(l.id.toString())),(0,R.isSet)(l.accountId)&&(T.accountId=BigInt(l.accountId.toString())),T},toJSON(l){const T={};return l.id!==void 0&&(T.id=(l.id||BigInt(0)).toString()),l.accountId!==void 0&&(T.accountId=(l.accountId||BigInt(0)).toString()),T},fromPartial(l){const T=r();return l.id!==void 0&&l.id!==null&&(T.id=BigInt(l.id.toString())),l.accountId!==void 0&&l.accountId!==null&&(T.accountId=BigInt(l.accountId.toString())),T}};function m(){return{accountAddress:""}}e.QueryAccountAddressByIDResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse",encode(l,T=u.BinaryWriter.create()){return l.accountAddress!==""&&T.uint32(10).string(l.accountAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=m();for(;O.pos<B;){const W=O.uint32();switch(W>>>
13){case 1:M.accountAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=m();return(0,R.isSet)(l.accountAddress)&&(T.accountAddress=String(l.accountAddress)),T},toJSON(l){const T={};return l.accountAddress!==void 0&&(T.accountAddress=l.accountAddress),T},fromPartial(l){const T=m();return T.accountAddress=l.accountAddress??"",T}};function N(){return{address:""}}e.QueryAccountInfoRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountInfoRequest",encode(l,T=u.BinaryWriter.create()){return l.address!==""&&T.uint32(10).string(l.address),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=N();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.address=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=N();return(0,R.isSet)(l.address)&&(T.address=String(l.address)),T},toJSON(l){const T={};return l.address!==void 0&&(T.address=l.address),T},fromPartial(l){const T=N();return T.address=l.address??"",T}};function V(){return{info:void 0}}e.QueryAccountInfoResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountInfoResponse",encode(l,T=u.BinaryWriter.create()){return l.info!==void 0&&i.BaseAccount.encode(l.info,T.uint32(10).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=V();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.info=i.BaseAccount.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=V();return(0,R.isSet)(l.info)&&(T.info=i.BaseAccount.fromJSON(l.info)),T},toJSON(l){const T={};return l.info!==void 0&&(T.info=l.info?i.BaseAccount.toJSON(l.info):void 0),T},fromPartial(l){const T=V();return l.info!==void 0&&l.info!==null&&(T.info=i.BaseAccount.fromPartial(l.info)),T}};class d{constructor(T){this.rpc=T,this.Accounts=this.Accounts.bind(this),this.Account=this.Account.bind(this),this.AccountAddressByID=this.AccountAddressByID.bind(this),this.Params=this.Params.bind(this),this.ModuleAccounts=this.ModuleAccounts.bind(this),this.ModuleAccountByName=this.ModuleAccountByName.bind(this),this.Bech32Prefix=this.Bech32Prefix.bind(this),this.AddressBytesToString=this.AddressBytesToString.bind(this),this.AddressStringToBytes=this.AddressStringToBytes.bind(this),this.AccountInfo=this.AccountInfo.bind(this)}Accounts(T={pagination:n.PageRequest.fromPartial({})}){const O=e.QueryAccountsRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Accounts",O).then(M=>e.QueryAccountsResponse.decode(new u.BinaryReader(M)))}Account(T){const O=e.QueryAccountRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Account",O).then(M=>e.QueryAccountResponse.decode(new u.BinaryReader(M)))}AccountAddressByID(T){const O=e.QueryAccountAddressByIDRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AccountAddressByID",O).then(M=>e.QueryAccountAddressByIDResponse.decode(new u.BinaryReader(M)))}Params(T={}){const O=e.QueryParamsRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Params",O).then(M=>e.QueryParamsResponse.decode(new u.BinaryReader(M)))}ModuleAccounts(T={}){const O=e.QueryModuleAccountsRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","ModuleAccounts",O).then(M=>e.QueryModuleAccountsResponse.decode(new u.BinaryReader(M)))}ModuleAccountByName(T){const O=e.QueryModuleAccountByNameRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","ModuleAccountByName",O).then(M=>e.QueryModuleAccountByNameResponse.decode(new u.BinaryReader(M)))}Bech32Prefix(T={}){const O=e.Bech32PrefixRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Bech32Prefix",O).then(M=>e.Bech32PrefixResponse.decode(new u.BinaryReader(M)))}AddressBytesToString(T){const O=e.AddressBytesToStringRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AddressBytesToString",O).then(M=>e.AddressBytesToStringResponse.decode(new u.BinaryReader(M)))}AddressStringToBytes(T){const O=e.AddressStringToBytesRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AddressStringToBytes",O).then(M=>e.AddressStringToBytesResponse.decode(new u.BinaryReader(M)))}AccountInfo(T){const O=e.QueryAccountInfoRequest.encode(T).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AccountInfo",O).then(M=>e.QueryAccountInfoResponse.decode(new u.BinaryReader(M)))}}
1e.QueryClientImpl=d})(ul);var Ke={},xo={},Vi={},jo={};Object.defineProperty(jo,"__esModule",{value:!0});jo.concat=void 0;const ih=Qt;function oh(...e){const n=new Array,t=new Array,i=new Set;let u=0;function R(){for(;n.length>0;)n.shift().unsubscribe();t.length=0,i.clear(),u=0}const v={start:E=>{e.forEach(_=>t.push([]));function C(_){for(;;){const b=t[_].shift();if(b===void 0)return;E.next(b)}}function D(){return u>=e.length}if(D()){E.complete();return}e.forEach((_,b)=>{n.push(_.subscribe({next:f=>{b===u?E.next(f):t[b].push(f)},complete:()=>{for(i.add(b);i.has(u);)C(u),u++;D()?E.complete():C(u)},error:f=>{E.error(f),R()}}))})},stop:()=>{R()}};return ih.Stream.create(v)}jo.concat=oh;var ea={};Object.defineProperty(ea,"__esModule",{value:!0});ea.DefaultValueProducer=void 0;class ah{get value(){return this.internalValue}constructor(n,t){this.callbacks=t,this.internalValue=n}update(n){this.internalValue=n,this.listener&&this.listener.next(n)}error(n){this.listener&&this.listener.error(n)}start(n){this.listener=n,n.next(this.internalValue),this.callbacks&&this.callbacks.onStarted()}stop(){this.callbacks&&this.callbacks.onStop(),this.listener=void 0}}ea.DefaultValueProducer=ah;var na={};Object.defineProperty(na,"__esModule",{value:!0});na.dropDuplicates=void 0;function sh(e){return t=>{const i=new Set;return t.filter(R=>!i.has(e(R))).debug(R=>i.add(e(R)))}}na.dropDuplicates=sh;var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.firstEvent=Pt.toListPromise=Pt.fromListPromise=void 0;const dh=Qt;function uh(e){const n={start:t=>{e.then(i=>{for(const u of i)t.next(u);t.complete()}).catch(i=>t.error(i))},stop:()=>{}};return dh.Stream.create(n)}Pt.fromListPromise=uh;async function cl(e,n){return new Promise((t,i)=>{if(n===0){t([]);return}const u=new Array;e.take(n).subscribe({next:R=>{u.push(R),u.length===n&&t(u)},complete:()=>{i(`Stream completed before all events could be collected. Collected ${u.length}, expected ${n}`)},error:R=>i(R)})})}Pt.toListPromise=cl;async function ch(e){return(await cl(e,1))[0]}Pt.firstEvent=ch;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.lastValue=Kn.asArray=Kn.countStream=Kn.Reducer=void 0;class ta{constructor(n,t,i){this.stream=n,this.reducer=t,this.state=i,this.completed=new Promise((u,R)=>{const v=this.stream.subscribe({next:E=>{this.state=this.reducer(this.state,E)},complete:()=>{u(),v.unsubscribe()},error:E=>{R(E),v.unsubscribe()}})})}value(){return this.state}async finished(){return this.completed}}Kn.Reducer=ta;function lh(e,n){return e+1}function fh(e){return new ta(e,lh,0)}Kn.countStream=fh;function ph(e,n){return[...e,n]}function mh(e){return new ta(e,ph,[])}Kn.asArray=mh;function yh(e,n){return n}function hh(e){return new ta(e,yh,void 0)}Kn.lastValue=hh;var ra={};Object.defineProperty(ra,"__esModule",{value:!0});ra.ValueAndUpdates=void 0;const gh=Qt;class Sh{get value(){return this.producer.value}constructor(n){this.producer=n,this.updates=gh.MemoryStream.createWithMemory(this.producer)}async waitFor(n){const t=typeof n=="function"?n:i=>i===n;return new Promise((i,u)=>{const R=this.updates.subscribe({next:v=>{t(v)&&(i(v),setTimeout(()=>R.unsubscribe(),0))},complete:()=>{R.unsubscribe(),u("Update stream completed without expected value")},error:v=>{u(v)}})})}}ra.ValueAndUpdates=Sh;(function(e){var n=re&&re.__createBinding||(Object.create?function(C,D,_,b){b===void 0&&(b=_);var f=Object.getOwnPropertyDescriptor(D,_);(!f||("get"in f?!D.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return D[_]}}),Object.defineProperty(C,b,f)}:function(C,D,_,b){b===void 0&&(b=_),C[b]=D[_]}),t=re&&re.__exportStar||function(C,D){for(var _ in C)_!=="default"&&!Object.prototype.hasOwnProperty.call(D,_)&&n(D,C,_)};Object.defineProperty(e,"__esModule",{value:!0}),e.ValueAndUpdates=e.toListPromise=e.fromListPromise=e.firstEvent=e.dropDuplicates=e.DefaultValueProducer=e.concat=void 0;var i=jo;Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return i.concat}});var u=ea;Object.defineProperty(e,"DefaultValueProducer",{enumerable:!0,get:function(){return u.DefaultValueProducer}});var R=na;Object.defineProperty(e,"dropDuplicates",{enumerable:!0,get:function(){return R.dropDuplicates}});var v=Pt;Object.defineProperty(e,"firstEvent",{enumerable:!0,get:function(){return v.firstEvent}}),Object.defineProperty(e,"fromListPromise",{enumerable:!0,get:function(){return v.fromListPromise}}),Object.defineProperty(e,"toListPromise",{enumerable:!0,get:function(){return v.toListPromise}}),t(Kn,e);var E=ra;Object.defineProperty(e,"ValueAndUpdates",{enumerable:!0,get:function(){return E.ValueAndUpdates}})})(Vi);Object.defineProperty(xo,"__esModule",{value:!0});xo.QueryClient=void 0;const Jt=_p,Ht=Pe,kh=Vi,xe=$e;function eo(e,n,t){if(e.type!==n)throw new Error(`Op expected to be ${n}, got "${e.type}`);if(!(0,xe.arrayContentEquals)(t,e.key))throw new Error(`Proven key different than queried key. 2Query: ${(0,Ht.toHex)(t)} 3Proven: ${(0,Ht.toHex)(e.key)}`);return Jt.ics23.CommitmentProof.decode(e.data)}class iu{static withExtensions(n,...t){const i=new iu(n),u=t.map(R=>R(i));for(const R of u){(0,xe.assert)((0,xe.isNonNullObject)(R),"Extension must be a non-null object");for(const[v,E]of Object.entries(R)){(0,xe.assert)((0,xe.isNonNullObject)(E),`Module must be a non-null object. Found type ${typeof E} for module "${v}".`);const C=i[v]||{};i[v]={...C,...E}}}return i}constructor(n){this.cometClient=n}async queryStoreVerified(n,t,i){const{height:u,proof:R,key:v,value:E}=await this.queryRawProof(n,t,i),C=eo(R.ops[0],"ics23:iavl",t),D=eo(R.ops[1],"ics23:simple",(0,Ht.toAscii)(n));(0,xe.assert)(D.exist),(0,xe.assert)(D.exist.value),!E||E.length===0?((0,xe.assert)(C.nonexist),(0,Jt.verifyNonExistence)(C.nonexist,Jt.iavlSpec,D.exist.value,t)):((0,xe.assert)(C.exist),(0,xe.assert)(C.exist.value),(0,Jt.verifyExistence)(C.exist,Jt.iavlSpec,D.exist.value,t,E));const _=await this.getNextHeader(u);return(0,Jt.verifyExistence)(D.exist,Jt.tendermintSpec,_.appHash,(0,Ht.toAscii)(n),D.exist.value),{key:v,value:E,height:u}}async queryRawProof(n,t,i){const{key:u,value:R,height:v,proof:E,code:C,log:D}=await this.cometClient.abciQuery({path:`/store/${n}/key`,data:t,prove:!0,height:i});if(C)throw new Error(`Query failed with (${C}): ${D}`);if(!(0,xe.arrayContentEquals)(t,u))throw new Error(`Response key ${(0,Ht.toHex)(u)} doesn't match query key ${(0,Ht.toHex)(t)}`);if(!v)throw new Error("No query height returned");
3if(!E||E.ops.length!==2)throw new Error(`Expected 2 proof ops, got ${(E==null?void 0:E.ops.length)??0}. Are you using stargate?`);return eo(E.ops[0],"ics23:iavl",u),eo(E.ops[1],"ics23:simple",(0,Ht.toAscii)(n)),{key:u,value:R,height:v,proof:{ops:[...E.ops]}}}async queryAbci(n,t,i){const u=await this.cometClient.abciQuery({path:n,data:t,prove:!1,height:i});if(u.code)throw new Error(`Query failed with (${u.code}): ${u.log}`);if(!u.height)throw new Error("No query height returned");return{value:u.value,height:u.height}}async getNextHeader(n){if((0,xe.assertDefined)(n),n===0)throw new Error("Query returned height 0, cannot prove it");const t=n+1;let i,u;try{u=this.cometClient.subscribeNewBlockHeader()}catch{}if(u){const R=await(0,kh.firstEvent)(u);R.height===t&&(i=R)}for(;!i;){const R=(await this.cometClient.blockchain(n,t)).blockMetas.map(v=>v.header).find(v=>v.height===t);R?i=R:await(0,xe.sleep)(1e3)}return(0,xe.assert)(i.height===t,"Got wrong header. This is a bug in the logic above."),i}}xo.QueryClient=iu;var gn={};Object.defineProperty(gn,"__esModule",{value:!0});gn.decodeCosmosSdkDecFromProto=gn.longify=gn.createProtobufRpcClient=gn.createPagination=gn.toAccAddress=void 0;const ll=Pe,fl=Cn,ac=_e;function Ph(e){return(0,ll.fromBech32)(e).data}gn.toAccAddress=Ph;function Rh(e){return e?ac.PageRequest.fromPartial({key:e}):ac.PageRequest.fromPartial({})}gn.createPagination=Rh;function Bh(e){return{request:async(n,t,i)=>{const u=`/${n}/${t}`;return(await e.queryAbci(u,i,void 0)).value}}}gn.createProtobufRpcClient=Bh;function vh(e){const n=fl.Uint64.fromString(e.toString());return BigInt(n.toString())}gn.longify=vh;function Oh(e){const n=typeof e=="string"?e:(0,ll.fromAscii)(e);return fl.Decimal.fromAtomics(n,18)}gn.decodeCosmosSdkDecFromProto=Oh;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.longify=e.decodeCosmosSdkDecFromProto=e.createProtobufRpcClient=e.createPagination=e.QueryClient=void 0;var n=xo;Object.defineProperty(e,"QueryClient",{enumerable:!0,get:function(){return n.QueryClient}});var t=gn;Object.defineProperty(e,"createPagination",{enumerable:!0,get:function(){return t.createPagination}}),Object.defineProperty(e,"createProtobufRpcClient",{enumerable:!0,get:function(){return t.createProtobufRpcClient}}),Object.defineProperty(e,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return t.decodeCosmosSdkDecFromProto}}),Object.defineProperty(e,"longify",{enumerable:!0,get:function(){return t.longify}})})(Ke);Object.defineProperty(Xo,"__esModule",{value:!0});Xo.setupAuthExtension=void 0;const bh=ul,Ah=Ke;function Ih(e){const n=(0,Ah.createProtobufRpcClient)(e),t=new bh.QueryClientImpl(n);return{auth:{account:async i=>{const{account:u}=await t.Account({address:i});return u??null}}}}Xo.setupAuthExtension=Ih;var ia={};Object.defineProperty(ia,"__esModule",{value:!0});ia.createAuthzAminoConverters=void 0;function Th(){return{}}ia.createAuthzAminoConverters=Th;var oa={},pl={},sn={},Me={};Object.defineProperty(Me,"__esModule",{value:!0});Me.Timestamp=Me.protobufPackage=void 0;const ws=te,sc=ee;Me.protobufPackage="google.protobuf";function _s(){return{seconds:BigInt(0),nanos:0}}Me.Timestamp={typeUrl:"/google.protobuf.Timestamp",encode(e,n=ws.BinaryWriter.create()){return e.seconds!==BigInt(0)&&n.uint32(8).int64(e.seconds),e.nanos!==0&&n.uint32(16).int32(e.nanos),n},decode(e,n){const t=e instanceof ws.BinaryReader?e:new ws.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=_s();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.seconds=t.int64();break;case 2:u.nanos=t.int32();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=_s();return(0,sc.isSet)(e.seconds)&&(n.seconds=BigInt(e.seconds.toString())),(0,sc.isSet)(e.nanos)&&(n.nanos=Number(e.nanos)),n},toJSON(e){const n={};return e.seconds!==void 0&&(n.seconds=(e.seconds||BigInt(0)).toString()),e.nanos!==void 0&&(n.nanos=Math.round(e.nanos)),n},fromPartial(e){const n=_s();return e.seconds!==void 0&&e.seconds!==null&&(n.seconds=BigInt(e.seconds.toString())),n.nanos=e.nanos??0,n}};Object.defineProperty(sn,"__esModule",{value:!0});sn.GrantQueueItem=sn.GrantAuthorization=sn.Grant=sn.GenericAuthorization=sn.protobufPackage=void 0;const Wn=Re,vr=Me,In=te,Dn=ee;sn.protobufPackage="cosmos.authz.v1beta1";function Es(){return{msg:""}}sn.GenericAuthorization={typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",encode(e,n=In.BinaryWriter.create()){return e.msg!==""&&n.uint32(10).string(e.msg),n},decode(e,n){const t=e instanceof In.BinaryReader?e:new In.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Es();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.msg=t.string();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Es();return(0,Dn.isSet)(e.msg)&&(n.msg=String(e.msg)),n},toJSON(e){const n={};return e.msg!==void 0&&(n.msg=e.msg),n},fromPartial(e){const n=Es();return n.msg=e.msg??"",n}};function Js(){return{authorization:void 0,expiration:void 0}}sn.Grant={typeUrl:"/cosmos.authz.v1beta1.Grant",encode(e,n=In.BinaryWriter.create()){return e.authorization!==void 0&&Wn.Any.encode(e.authorization,n.uint32(10).fork()).ldelim(),e.expiration!==void 0&&vr.Timestamp.encode(e.expiration,n.uint32(18).fork()).ldelim(),n},decode(e,n){const t=e instanceof In.BinaryReader?e:new In.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Js();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.authorization=Wn.Any.decode(t,t.uint32());break;case 2:u.expiration=vr.Timestamp.decode(t,t.uint32());break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Js();return(0,Dn.isSet)(e.authorization)&&(n.authorization=Wn.Any.fromJSON(e.authorization)),(0,Dn.isSet)(e.expiration)&&(n.expiration=(0,Dn.fromJsonTimestamp)(e.expiration)),n},toJSON(e){const n={};return e.authorization!==void 0&&(n.authorization=e.authorization?Wn.Any.toJSON(e.authorization):void 0),e.expiration!==void 0&&(n.expiration=(0,Dn.fromTimestamp)(e.expiration).toISOString()),n},fromPartial(e){const n=Js();return e.authorization!==void 0&&e.authorization!==null&&(n.authorization=Wn.Any.fromPartial(e.authorization)),e.expiration!==void 0&&e.expiration!==null&&(n.expiration=vr.Timestamp.fromPartial(e.expiration)),n}};function Us(){return{granter:"",grantee:"",authorization:void 0,expiration:void 0}}sn.GrantAuthorization={typeUrl:"/cosmos.authz.v1beta1.GrantAuthorization",encode(e,n=In.BinaryWriter.create()){return e.granter!==""&&n.uint32(10).string(e.granter),e.grantee!==""&&n.uint32(18).string(e.grantee),e.authorization!==void 0&&Wn.Any.encode(e.authorization,n.uint32(26).fork()).ldelim(),e.expiration!==void 0&&vr.Timestamp.encode(e.expiration,n.uint32(34).fork()).ldelim(),n},decode(e,n){const t=e instanceof In.BinaryReader?e:new In.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Us();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.granter=t.string();break;case 2:u.grantee=t.string();break;case 3:u.authorization=Wn.Any.decode(t,t.uint32());break;case 4:u.expiration=vr.Timestamp.decode(t,t.uint32());break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Us();return(0,Dn.isSet)(e.granter)&&(n.granter=String(e.granter)),(0,Dn.isSet)(e.grantee)&&(n.grantee=String(e.grantee)),(0,Dn.isSet)(e.authorization)&&(n.authorization=Wn.Any.fromJSON(e.authorization)),(0,Dn.isSet)(e.expiration)&&(n.expiration=(0,Dn.fromJsonTimestamp)(e.expiration)),n},toJSON(e){const n={};return e.granter!==void 0&&(n.granter=e.granter),e.grantee!==void 0&&(n.grantee=e.grantee),e.authorization!==void 0&&(n.authorization=e.authorization?Wn.Any.toJSON(e.authorization):void 0),e.expiration!==void 0&&(n.expiration=(0,Dn.fromTimestamp)(e.expiration).toISOString()),n},fromPartial(e){const n=Us();return n.granter=e.granter??"",n.grantee=e.grantee??"",e.authorization!==void 0&&e.authorization!==null&&(n.authorization=Wn.Any.fromPartial(e.authorization)),e.expiration!==void 0&&e.expiration!==null&&(n.expiration=vr.Timestamp.fromPartial(e.expiration)),n}};function Ds(){return{msgTypeUrls:[]}}sn.GrantQueueItem={typeUrl:"/cosmos.authz.v1beta1.GrantQueueItem",encode(e,n=In.BinaryWriter.create()){for(const t of e.msgTypeUrls)n.uint32(10).string(t);return n},decode(e,n){const t=e instanceof In.BinaryReader?e:new In.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Ds();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.msgTypeUrls.push(t.string());break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Ds();return Array.isArray(e==null?void 0:e.msgTypeUrls)&&(n.msgTypeUrls=e.msgTypeUrls.map(t=>String(t))),n},toJSON(e){const n={};return e.msgTypeUrls?n.msgTypeUrls=e.msgTypeUrls.map(t=>t):n.msgTypeUrls=[],n},fromPartial(e){var t;const n=Ds();return n.msgTypeUrls=((t=e.msgTypeUrls)==null?void 0:t.map(i=>i))||[],n}};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgRevokeResponse=e.MsgRevoke=e.MsgGrantResponse=e.MsgExec=e.MsgExecResponse=e.MsgGrant=e.protobufPackage=void 0;const n=sn,t=Re,i=te,u=ee;e.protobufPackage="cosmos.authz.v1beta1";function R(){return{granter:"",grantee:"",grant:n.Grant.fromPartial({})}}e.MsgGrant={typeUrl:"/cosmos.authz.v1beta1.MsgGrant",encode(f,p=i.BinaryWriter.create()){return f.granter!==""&&p.uint32(10).string(f.granter),f.grantee!==""&&p.uint32(18).string(f.grantee),f.grant!==void 0&&n.Grant.encode(f.grant,p.uint32(26).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=R();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.granter=k.string();break;case 2:s.grantee=k.string();break;case 3:s.grant=n.Grant.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=R();return(0,u.isSet)(f.granter)&&(p.granter=String(f.granter)),(0,u.isSet)(f.grantee)&&(p.grantee=String(f.grantee)),(0,u.isSet)(f.grant)&&(p.grant=n.Grant.fromJSON(f.grant)),p},toJSON(f){const p={};return f.granter!==void 0&&(p.granter=f.granter),f.grantee!==void 0&&(p.grantee=f.grantee),f.grant!==void 0&&(p.grant=f.grant?n.Grant.toJSON(f.grant):void 0),p},fromPartial(f){const p=R();return p.granter=f.granter??"",p.grantee=f.grantee??"",f.grant!==void 0&&f.grant!==null&&(p.grant=n.Grant.fromPartial(f.grant)),p}};function v(){return{results:[]}}e.MsgExecResponse={typeUrl:"/cosmos.authz.v1beta1.MsgExecResponse",encode(f,p=i.BinaryWriter.create()){for(const k of f.results)p.uint32(10).bytes(k);return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=v();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.results.push(k.bytes());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=v();return Array.isArray(f==null?void 0:f.results)&&(p.results=f.results.map(k=>(0,u.bytesFromBase64)(k))),p},toJSON(f){const p={};return f.results?p.results=f.results.map(k=>(0,u.base64FromBytes)(k!==void 0?k:new Uint8Array)):p.results=[],p},fromPartial(f){var k;const p=v();return p.results=((k=f.results)==null?void 0:k.map(o=>o))||[],p}};function E(){return{grantee:"",msgs:[]}}e.MsgExec={typeUrl:"/cosmos.authz.v1beta1.MsgExec",encode(f,p=i.BinaryWriter.create()){f.grantee!==""&&p.uint32(10).string(f.grantee);for(const k of f.msgs)t.Any.encode(k,p.uint32(18).fork()).ldelim();return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=E();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.grantee=k.string();break;case 2:s.msgs.push(t.Any.decode(k,k.uint32()));break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=E();return(0,u.isSet)(f.grantee)&&(p.grantee=String(f.grantee)),Array.isArray(f==null?void 0:f.msgs)&&(p.msgs=f.msgs.map(k=>t.Any.fromJSON(k))),p},toJSON(f){const p={};return f.grantee!==void 0&&(p.grantee=f.grantee),f.msgs?p.msgs=f.msgs.map(k=>k?t.Any.toJSON(k):void 0):p.msgs=[],p},fromPartial(f){var k;const p=E();return p.grantee=f.grantee??"",p.msgs=((k=f.msgs)==null?void 0:k.map(o=>t.Any.fromPartial(o)))||[],p}};function C(){return{}}e.MsgGrantResponse={typeUrl:"/cosmos.authz.v1beta1.MsgGrantResponse",encode(f,p=i.BinaryWriter.create()){return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=C();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){default:k.skipType(y&7);break}}return s},fromJSON(f){return C()},toJSON(f){return{}},fromPartial(f){return C()}};function D(){return{granter:"",grantee:"",msgTypeUrl:""}}e.MsgRevoke={typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",encode(f,p=i.BinaryWriter.create()){return f.granter!==""&&p.uint32(10).string(f.granter),f.grantee!==""&&p.uint32(18).string(f.grantee),f.msgTypeUrl!==""&&p.uint32(26).string(f.msgTypeUrl),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=D();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.granter=k.string();break;case 2:s.grantee=k.string();break;case 3:s.msgTypeUrl=k.string();break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=D();return(0,u.isSet)(f.granter)&&(p.granter=String(f.granter)),(0,u.isSet)(f.grantee)&&(p.grantee=String(f.grantee)),(0,u.isSet)(f.msgTypeUrl)&&(p.msgTypeUrl=String(f.msgTypeUrl)),p},toJSON(f){const p={};return f.granter!==void 0&&(p.granter=f.granter),f.grantee!==void 0&&(p.grantee=f.grantee),f.msgTypeUrl!==void 0&&(p.msgTypeUrl=f.msgTypeUrl),p},fromPartial(f){const p=D();return p.granter=f.granter??"",p.grantee=f.grantee??"",p.msgTypeUrl=f.msgTypeUrl??"",p}};function _(){return{}}e.MsgRevokeResponse={typeUrl:"/cosmos.authz.v1beta1.MsgRevokeResponse",encode(f,p=i.BinaryWriter.create()){return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=_();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){default:k.skipType(y&7);break}}return s},fromJSON(f){return _()},toJSON(f){return{}},fromPartial(f){return _()}};class b{constructor(p){this.rpc=p,this.Grant=this.Grant.bind(this),this.Exec=this.Exec.bind(this),this.Revoke=this.Revoke.b
3ind(this)}Grant(p){const k=e.MsgGrant.encode(p).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Grant",k).then(s=>e.MsgGrantResponse.decode(new i.BinaryReader(s)))}Exec(p){const k=e.MsgExec.encode(p).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Exec",k).then(s=>e.MsgExecResponse.decode(new i.BinaryReader(s)))}Revoke(p){const k=e.MsgRevoke.encode(p).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Revoke",k).then(s=>e.MsgRevokeResponse.decode(new i.BinaryReader(s)))}}e.MsgClientImpl=b})(pl);Object.defineProperty(oa,"__esModule",{value:!0});oa.authzTypes=void 0;const Ms=pl;oa.authzTypes=[["/cosmos.authz.v1beta1.MsgExec",Ms.MsgExec],["/cosmos.authz.v1beta1.MsgGrant",Ms.MsgGrant],["/cosmos.authz.v1beta1.MsgRevoke",Ms.MsgRevoke]];var aa={},ml={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryGranteeGrantsResponse=e.QueryGranteeGrantsRequest=e.QueryGranterGrantsResponse=e.QueryGranterGrantsRequest=e.QueryGrantsResponse=e.QueryGrantsRequest=e.protobufPackage=void 0;const n=_e,t=sn,i=te,u=ee;e.protobufPackage="cosmos.authz.v1beta1";function R(){return{granter:"",grantee:"",msgTypeUrl:"",pagination:void 0}}e.QueryGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGrantsRequest",encode(f,p=i.BinaryWriter.create()){return f.granter!==""&&p.uint32(10).string(f.granter),f.grantee!==""&&p.uint32(18).string(f.grantee),f.msgTypeUrl!==""&&p.uint32(26).string(f.msgTypeUrl),f.pagination!==void 0&&n.PageRequest.encode(f.pagination,p.uint32(34).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=R();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.granter=k.string();break;case 2:s.grantee=k.string();break;case 3:s.msgTypeUrl=k.string();break;case 4:s.pagination=n.PageRequest.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=R();return(0,u.isSet)(f.granter)&&(p.granter=String(f.granter)),(0,u.isSet)(f.grantee)&&(p.grantee=String(f.grantee)),(0,u.isSet)(f.msgTypeUrl)&&(p.msgTypeUrl=String(f.msgTypeUrl)),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageRequest.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.granter!==void 0&&(p.granter=f.granter),f.grantee!==void 0&&(p.grantee=f.grantee),f.msgTypeUrl!==void 0&&(p.msgTypeUrl=f.msgTypeUrl),f.pagination!==void 0&&(p.pagination=f.pagination?n.PageRequest.toJSON(f.pagination):void 0),p},fromPartial(f){const p=R();return p.granter=f.granter??"",p.grantee=f.grantee??"",p.msgTypeUrl=f.msgTypeUrl??"",f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageRequest.fromPartial(f.pagination)),p}};function v(){return{grants:[],pagination:void 0}}e.QueryGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGrantsResponse",encode(f,p=i.BinaryWriter.create()){for(const k of f.grants)t.Grant.encode(k,p.uint32(10).fork()).ldelim();return f.pagination!==void 0&&n.PageResponse.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=v();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.grants.push(t.Grant.decode(k,k.uint32()));break;case 2:s.pagination=n.PageResponse.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=v();return Array.isArray(f==null?void 0:f.grants)&&(p.grants=f.grants.map(k=>t.Grant.fromJSON(k))),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageResponse.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.grants?p.grants=f.grants.map(k=>k?t.Grant.toJSON(k):void 0):p.grants=[],f.pagination!==void 0&&(p.pagination=f.pagination?n.PageResponse.toJSON(f.pagination):void 0),p},fromPartial(f){var k;const p=v();return p.grants=((k=f.grants)==null?void 0:k.map(o=>t.Grant.fromPartial(o)))||[],f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageResponse.fromPartial(f.pagination)),p}};function E(){return{granter:"",pagination:void 0}}e.QueryGranterGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGranterGrantsRequest",encode(f,p=i.BinaryWriter.create()){return f.granter!==""&&p.uint32(10).string(f.granter),f.pagination!==void 0&&n.PageRequest.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=E();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.granter=k.string();break;case 2:s.pagination=n.PageRequest.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=E();return(0,u.isSet)(f.granter)&&(p.granter=String(f.granter)),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageRequest.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.granter!==void 0&&(p.granter=f.granter),f.pagination!==void 0&&(p.pagination=f.pagination?n.PageRequest.toJSON(f.pagination):void 0),p},fromPartial(f){const p=E();return p.granter=f.granter??"",f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageRequest.fromPartial(f.pagination)),p}};function C(){return{grants:[],pagination:void 0}}e.QueryGranterGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGranterGrantsResponse",encode(f,p=i.BinaryWriter.create()){for(const k of f.grants)t.GrantAuthorization.encode(k,p.uint32(10).fork()).ldelim();return f.pagination!==void 0&&n.PageResponse.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=C();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.grants.push(t.GrantAuthorization.decode(k,k.uint32()));break;case 2:s.pagination=n.PageResponse.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=C();return Array.isArray(f==null?void 0:f.grants)&&(p.grants=f.grants.map(k=>
3t.GrantAuthorization.fromJSON(k))),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageResponse.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.grants?p.grants=f.grants.map(k=>k?t.GrantAuthorization.toJSON(k):void 0):p.grants=[],f.pagination!==void 0&&(p.pagination=f.pagination?n.PageResponse.toJSON(f.pagination):void 0),p},fromPartial(f){var k;const p=C();return p.grants=((k=f.grants)==null?void 0:k.map(o=>t.GrantAuthorization.fromPartial(o)))||[],f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageResponse.fromPartial(f.pagination)),p}};function D(){return{grantee:"",pagination:void 0}}e.QueryGranteeGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGranteeGrantsRequest",encode(f,p=i.BinaryWriter.create()){return f.grantee!==""&&p.uint32(10).string(f.grantee),f.pagination!==void 0&&n.PageRequest.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=D();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.grantee=k.string();break;case 2:s.pagination=n.PageRequest.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=D();return(0,u.isSet)(f.grantee)&&(p.grantee=String(f.grantee)),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageRequest.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.grantee!==void 0&&(p.grantee=f.grantee),f.pagination!==void 0&&(p.pagination=f.pagination?n.PageRequest.toJSON(f.pagination):void 0),p},fromPartial(f){const p=D();return p.grantee=f.grantee??"",f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageRequest.fromPartial(f.pagination)),p}};function _(){return{grants:[],pagination:void 0}}e.QueryGranteeGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGranteeGrantsResponse",encode(f,p=i.BinaryWriter.create()){for(const k of f.grants)t.GrantAuthorization.encode(k,p.uint32(10).fork()).ldelim();return f.pagination!==void 0&&n.PageResponse.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=_();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.grants.push(t.GrantAuthorization.decode(k,k.uint32()));break;case 2:s.pagination=n.PageResponse.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=_();return Array.isArray(f==null?void 0:f.grants)&&(p.grants=f.grants.map(k=>t.GrantAuthorization.fromJSON(k))),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageResponse.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.grants?p.grants=f.grants.map(k=>k?t.GrantAuthorization.toJSON(k):void 0):p.grants=[],f.pagination!==void 0&&(p.pagination=f.pagination?n.PageResponse.toJSON(f.pagination):void 0),p},fromPartial(f){var k;const p=_();return p.grants=((k=f.grants)==null?void 0:k.map(o=>t.GrantAuthorization.fromPartial(o)))||[],f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageResponse.fromPartial(f.pagination)),p}};class b{constructor(p){this.rpc=p,this.Grants=this.Grants.bind(this),this.GranterGrants=this.GranterGrants.bind(this),this.GranteeGrants=this.GranteeGrants.bind(this)}Grants(p){const k=e.QueryGrantsRequest.encode(p).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","Grants",k).then(s=>e.QueryGrantsResponse.decode(new i.BinaryReader(s)))}GranterGrants(p){const k=e.QueryGranterGrantsRequest.encode(p).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","GranterGrants",k).then(s=>e.QueryGranterGrantsResponse.decode(new i.BinaryReader(s)))}GranteeGrants(p){const k=e.QueryGranteeGrantsRequest.encode(p).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","GranteeGrants",k).then(s=>e.QueryGranteeGrantsResponse.decode(new i.BinaryReader(s)))}}e.QueryClientImpl=b})(ml);Object.defineProperty(aa,"__esModule",{value:!0});aa.setupAuthzExtension=void 0;const Nh=ml,no=Ke;function Ch(e){const n=(0,no.createProtobufRpcClient)(e),t=new Nh.QueryClientImpl(n);return{authz:{grants:async(i,u,R,v)=>await t.Grants({granter:i,grantee:u,msgTypeUrl:R,pagination:(0,no.createPagination)(v)}),granteeGrants:async(i,u)=>await t.GranteeGrants({grantee:i,pagination:(0,no.createPagination)(u)}),granterGrants:async(i,u)=>await t.GranterGrants({granter:i,pagination:(0,no.createPagination)(u)})}}}aa.setupAuthzExtension=Ch;var Rt={};
3Object.defineProperty(Rt,"__esModule",{value:!0});Rt.createBankAminoConverters=Rt.isAminoMsgMultiSend=Rt.isAminoMsgSend=void 0;function wh(e){return e.type==="cosmos-sdk/MsgSend"}Rt.isAminoMsgSend=wh;function _h(e){return e.type==="cosmos-sdk/MsgMultiSend"}Rt.isAminoMsgMultiSend=_h;function Eh(){return{"/cosmos.bank.v1beta1.MsgSend":{aminoType:"cosmos-sdk/MsgSend",toAmino:({fromAddress:e,toAddress:n,amount:t})=>({from_address:e,to_address:n,amount:[...t]}),fromAmino:({from_address:e,to_address:n,amount:t})=>({fromAddress:e,toAddress:n,amount:[...t]})},"/cosmos.bank.v1beta1.MsgMultiSend":{aminoType:"cosmos-sdk/MsgMultiSend",toAmino:({inputs:e,outputs:n})=>({inputs:e.map(t=>({address:t.address,coins:[...t.coins]})),outputs:n.map(t=>({address:t.address,coins:[...t.coins]}))}),fromAmino:({inputs:e,outputs:n})=>({inputs:e.map(t=>({address:t.address,coins:[...t.coins]})),outputs:n.map(t=>({address:t.address,coins:[...t.coins]}))})}}}Rt.createBankAminoConverters=Eh;var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.isMsgSendEncodeObject=Hr.bankTypes=void 0;const dc=jd;Hr.bankTypes=[["/cosmos.bank.v1beta1.MsgMultiSend",dc.MsgMultiSend],["/cosmos.bank.v1beta1.MsgSend",dc.MsgSend]];function Jh(e){return e.typeUrl==="/cosmos.bank.v1beta1.MsgSend"}Hr.isMsgSendEncodeObject=Jh;var sa={},yl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QuerySendEnabledResponse=e.QuerySendEnabledRequest=e.QueryDenomOwnersResponse=e.DenomOwner=e.QueryDenomOwnersRequest=e.QueryDenomMetadataResponse=e.QueryDenomMetadataRequest=e.QueryDenomsMetadataResponse=e.QueryDenomsMetadataRequest=e.QueryParamsResponse=e.QueryParamsRequest=e.QuerySupplyOfResponse=e.QuerySupplyOfRequest=e.QueryTotalSupplyResponse=e.QueryTotalSupplyRequest=e.QuerySpendableBalanceByDenomResponse=e.QuerySpendableBalanceByDenomRequest=e.QuerySpendableBalancesResponse=e.QuerySpendableBalancesRequest=e.QueryAllBalancesResponse=e.QueryAllBalancesRequest=e.QueryBalanceResponse=e.QueryBalanceRequest=e.protobufPackage=void 0;const n=_e,t=ve,i=eu,u=te,R=ee;e.protobufPackage="cosmos.bank.v1beta1";function v(){return{address:"",denom:""}}e.QueryBalanceRequest={typeUrl:"/cosmos.bank.v1beta1.QueryBalanceRequest",encode(B,M=u.BinaryWriter.create()){return B.address!==""&&M.uint32(10).string(B.address),B.denom!==""&&M.uint32(18).string(B.denom),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=v();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.address=W.string();break;case 2:a.denom=W.string();break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=v();return(0,R.isSet)(B.address)&&(M.address=String(B.address)),(0,R.isSet)(B.denom)&&(M.denom=String(B.denom)),M},toJSON(B){const M={};return B.address!==void 0&&(M.address=B.address),B.denom!==void 0&&(M.denom=B.denom),M},fromPartial(B){const M=v();return M.address=B.address??"",M.denom=B.denom??"",M}};function E(){return{balance:void 0}}e.QueryBalanceResponse={typeUrl:"/cosmos.bank.v1beta1.QueryBalanceResponse",encode(B,M=u.BinaryWriter.create()){return B.balance!==void 0&&t.Coin.encode(B.balance,M.uint32(10).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=E();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.balance=t.Coin.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=E();return(0,R.isSet)(B.balance)&&(M.balance=t.Coin.fromJSON(B.balance)),M},toJSON(B){const M={};return B.balance!==void 0&&(M.balance=B.balance?t.Coin.toJSON(B.balance):void 0),M},fromPartial(B){const M=E();return B.balance!==void 0&&B.balance!==null&&(M.balance=t.Coin.fromPartial(B.balance)),M}};function C(){return{address:"",pagination:void 0}}e.QueryAllBalancesRequest={typeUrl:"/cosmos.bank.v1beta1.QueryAllBalancesRequest",encode(B,M=u.BinaryWriter.create()){return B.address!==""&&M.uint32(10).string(B.address),B.pagination!==void 0&&n.PageRequest.encode(B.pagination,M.uint32(18).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=C();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.address=W.string();break;case 2:a.pagination=n.PageRequest.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=C();return(0,R.isSet)(B.address)&&(M.address=String(B.address)),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageRequest.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.address!==void 0&&(M.address=B.address),B.pagination!==void 0&&(M.pagination=B.pagination?n.PageRequest.toJSON(B.pagination):void 0),M},fromPartial(B){const M=C();return M.address=B.address??"",B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageRequest.fromPartial(B.pagination)),M}};function D(){return{balances:[],pagination:void 0}}e.QueryAllBalancesResponse={typeUrl:"/cosmos.bank.v1beta1.QueryAllBalancesResponse",encode(B,M=u.BinaryWriter.create()){for(const W of B.balances)t.Coin.encode(W,M.uint32(10).fork()).ldelim();return B.pagination!==void 0&&n.PageResponse.encode(B.pagination,M.uint32(18).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=D();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.balances.push(t.Coin.decode(W,W.uint32()));break;case 2:a.pagination=n.PageResponse.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=D();return Array.isArray(B==null?void 0:B.balances)&&(M.balances=B.balances.map(W=>t.Coin.fromJSON(W))),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageResponse.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.balances?M.balances=B.balances.map(W=>W?t.Coin.toJSON(W):void 0):M.balances=[],B.pagination!==void 0&&(M.pagination=B.pagination?n.PageResponse.toJSON(B.pagination):void 0),M},fromPartial(B){var W;const M=D();return M.balances=((W=B.balances)==null?void 0:W.map(H=>t.Coin.fromPartial(H)))||[],B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageResponse.fromPartial(B.pagination)),M}};function _(){return{address:"",pagination:void 0}}e.QuerySpendableBalancesRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalancesRequest",encode(B,M=u.BinaryWriter.create()){return B.address!==""&&M.uint32(10).string(B.address),B.pagination!==void 0&&n.PageRequest.encode(B.pagination,M.uint32(18).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=_();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.address=W.string();break;case 2:a.pagination=n.PageRequest.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=_();return(0,R.isSet)(B.address)&&(M.address=String(B.address)),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageRequest.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.address!==void 0&&(M.address=B.address),B.pagination!==void 0&&(M.pagination=B.pagination?n.PageRequest.toJSON(B.pagination):void 0),M},fromPartial(B){const M=_();return M.address=B.address??"",B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageRequest.fromPartial(B.pagination)),M}};function b(){return{balances:[],pagination:void 0}}e.QuerySpendableBalancesResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalancesResponse",encode(B,M=u.BinaryWriter.create()){for(const W of B.balances)t.Coin.encode(W,M.uint32(10).fork()).ldelim();return B.pagination!==void 0&&n.PageResponse.encode(B.pagination,M.uint32(18).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=b();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.balances.push(t.Coin.decode(W,W.uint32()));break;case 2:a.pagination=n.PageResponse.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=b();return Array.isArray(B==null?void 0:B.balances)&&(M.balances=B.balances.map(W=>t.Coin.fromJSON(W))),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageResponse.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.balances?M.balances=B.balances.map(W=>W?t.Coin.toJSON(W):void 0):M.balances=[],B.pagination!==void 0&&(M.pagination=B.pagination?n.PageResponse.toJSON(B.pagination):void 0),M},fromPartial(B){var W;const M=b();return M.balances=((W=B.balances)==null?void 0:W.map(H=>t.Coin.fromPartial(H)))||[],B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageResponse.fromPartial(B.pagination)),M}};function f(){return{address:"",denom:""}}e.QuerySpendableBalanceByDenomRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest",encode(B,M=u.BinaryWriter.create()){return B.address!==""&&M.uint32(10).string(B.address),B.denom!==""&&M.uint32(18).string(B.denom),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=f();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.address=W.string();break;case 2:a.denom=W.string();break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=f();return(0,R.isSet)(B.address)&&(M.address=String(B.address)),(0,R.isSet)(B.denom)&&(M.denom=String(B.denom)),M},toJSON(B){const M={};return B.address!==void 0&&(M.address=B.address),B.denom!==void 0&&(M.denom=B.denom),M},fromPartial(B){const M=f();return M.address=B.address??"",M.denom=B.denom??"",M}};function p(){return{balance:void 0}}e.QuerySpendableBalanceByDenomResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse",encode(B,M=u.BinaryWriter.create()){return B.balance!==void 0&&t.Coin.encode(B.balance,M.uint32(10).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=p();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.balance=t.Coin.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=p();return(0,R.isSet)(B.balance)&&(M.balance=t.Coin.fromJSON(B.balance)),M},toJSON(B){const M={};return B.balance!==void 0&&(M.balance=B.balance?t.Coin.toJSON(B.balance):void 0),M},fromPartial(B){const M=p();return B.balance!==void 0&&B.balance!==null&&(M.balance=t.Coin.fromPartial(B.balance)),M}};function k(){return{pagination:void 0}}e.QueryTotalSupplyRequest={typeUrl:"/cosmos.bank.v1beta1.QueryTotalSupplyRequest",encode(B,M=u.BinaryWriter.create()){return B.pagination!==void 0&&n.PageRequest.encode(B.pagination,M.uint32(10).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=k();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.pagination=n.PageRequest.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=k();return(0,R.isSet)(B.pagination)&&(M.pagination=n.PageRequest.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.pagination!==void 0&&(M.pagination=B.pagination?n.PageRequest.toJSON(B.pagination):void 0),M},fromPartial(B){const M=k();return B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageRequest.fromPartial(B.pagination)),M}};function o(){return{supply:[],pagination:void 0}}e.QueryTotalSupplyResponse={typeUrl:"/cosmos.bank.v1beta1.QueryTotalSupplyResponse",encode(B,M=u.BinaryWriter.create()){for(const W of B.supply)t.Coin.encode(W,M.uint32(10).fork()).ldelim();return B.pagination!==void 0&&n.PageResponse.encode(B.pagination,M.uint32(18).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=o();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.supply.push(t.Coin.decode(W,W.uint32()));break;case 2:a.pagination=n.PageResponse.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=o();return Array.isArray(B==null?void 0:B.supply)&&(M.supply=B.supply.map(W=>t.Coin.fromJSON(W))),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageResponse.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.supply?M.supply=B.supply.map(W=>W?t.Coin.toJSON(W):void 0):M.supply=[],B.pagination!==void 0&&(M.pagination=B.pagination?n.PageResponse.toJSON(B.pagination):void 0),M},fromPartial(B){var W;const M=o();return M.supply=((W=B.supply)==null?void 0:W.map(H=>t.Coin.fromPartial(H)))||[],B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageResponse.fromPartial(B.pagination)),M}};function s(){return{denom:""}}e.QuerySupplyOfRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySupplyOfRequest",encode(B,M=u.BinaryWriter.create()){return B.denom!==""&&M.uint32(10).string(B.denom),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=s();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.denom=W.string();break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=s();return(0,R.isSet)(B.denom)&&(M.denom=String(B.denom)),M},toJSON(B){const M={};return B.denom!==void 0&&(M.denom=B.denom),M},fromPartial(B){const M=s();return M.denom=B.denom??"",M}};function y(){return{amount:t.Coin.fromPartial({})}}e.QuerySupplyOfResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySupplyOfResponse",encode(B,M=u.BinaryWriter.create()){return B.amount!==void 0&&t.Coin.encode(B.amount,M.uint32(10).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=y();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.amount=t.Coin.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=y();return(0,R.isSet)(B.amount)&&(M.amount=t.Coin.fromJSON(B.amount)),M},toJSON(B){const M={};return B.amount!==void 0&&(M.amount=B.amount?t.Coin.toJSON(B.amount):void 0),M},fromPartial(B){const M=y();return B.amount!==void 0&&B.amount!==null&&(M.amount=t.Coin.fromPartial(B.amount)),M}};function w(){return{}}e.QueryParamsRequest={typeUrl:"/cosmos.bank.v1beta1.QueryParamsRequest",encode(B,M=u.BinaryWriter.create()){return M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=w();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){default:W.skipType(g&7);break}}return a},fromJSON(B){return w()},toJSON(B){return{}},fromPartial(B){return w()}};function J(){return{params:i.Params.fromPartial({})}}e.QueryParamsResponse={typeUrl:"/cosmos.bank.v1beta1.QueryParamsResponse",encode(B,M=u.BinaryWriter.create()){return B.params!==void 0&&i.Params.encode(B.params,M.uint32(10).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=J();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.params=i.Params.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=J();return(0,R.isSet)(B.params)&&(M.params=i.Params.fromJSON(B.params)),M},toJSON(B){const M={};return B.params!==void 0&&(M.params=B.params?i.Params.toJSON(B.params):void 0),M},fromPartial(B){const M=J();return B.params!==void 0&&B.params!==null&&(M.params=i.Params.fromPartial(B.params)),M}};function P(){return{pagination:void 0}}e.QueryDenomsMetadataRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomsMetadataRequest",encode(B,M=u.BinaryWriter.create()){return B.pagination!==void 0&&n.PageRequest.encode(B.pagination,M.uint32(10).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=P();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.pagination=n.PageRequest.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=P();return(0,R.isSet)(B.pagination)&&(M.pagination=n.PageRequest.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.pagination!==void 0&&(M.pagination=B.pagination?n.PageRequest.toJSON(B.pagination):void 0),M},fromPartial(B){const M=P();return B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageRequest.fromPartial(B.pagination)),M}};function U(){return{metadatas:[],pagination:void 0}}e.QueryDenomsMetadataResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomsMetadataResponse",encode(B,M=u.BinaryWriter.create()){for(const W of B.metadatas)i.Metadata.encode(W,M.uint32(10).fork()).ldelim();return B.pagination!==void 0&&n.PageResponse.encode(B.pagination,M.uint32(18).f
3ork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=U();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.metadatas.push(i.Metadata.decode(W,W.uint32()));break;case 2:a.pagination=n.PageResponse.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=U();return Array.isArray(B==null?void 0:B.metadatas)&&(M.metadatas=B.metadatas.map(W=>i.Metadata.fromJSON(W))),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageResponse.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.metadatas?M.metadatas=B.metadatas.map(W=>W?i.Metadata.toJSON(W):void 0):M.metadatas=[],B.pagination!==void 0&&(M.pagination=B.pagination?n.PageResponse.toJSON(B.pagination):void 0),M},fromPartial(B){var W;const M=U();return M.metadatas=((W=B.metadatas)==null?void 0:W.map(H=>i.Metadata.fromPartial(H)))||[],B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageResponse.fromPartial(B.pagination)),M}};function r(){return{denom:""}}e.QueryDenomMetadataRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomMetadataRequest",encode(B,M=u.BinaryWriter.create()){return B.denom!==""&&M.uint32(10).string(B.denom),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=r();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.denom=W.string();break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=r();return(0,R.isSet)(B.denom)&&(M.denom=String(B.denom)),M},toJSON(B){const M={};return B.denom!==void 0&&(M.denom=B.denom),M},fromPartial(B){const M=r();return M.denom=B.denom??"",M}};function m(){return{metadata:i.Metadata.fromPartial({})}}e.QueryDenomMetadataResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomMetadataResponse",encode(B,M=u.BinaryWriter.create()){return B.metadata!==void 0&&i.Metadata.encode(B.metadata,M.uint32(10).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=m();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.metadata=i.Metadata.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=m();return(0,R.isSet)(B.metadata)&&(M.metadata=i.Metadata.fromJSON(B.metadata)),M},toJSON(B){const M={};return B.metadata!==void 0&&(M.metadata=B.metadata?i.Metadata.toJSON(B.metadata):void 0),M},fromPartial(B){const M=m();return B.metadata!==void 0&&B.metadata!==null&&(M.metadata=i.Metadata.fromPartial(B.metadata)),M}};function N(){return{denom:"",pagination:void 0}}e.QueryDenomOwnersRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomOwnersRequest",encode(B,M=u.BinaryWriter.create()){return B.denom!==""&&M.uint32(10).string(B.denom),B.pagination!==void 0&&n.PageRequest.encode(B.pagination,M.uint32(18).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=N();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.denom=W.string();break;case 2:a.pagination=n.PageRequest.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=N();return(0,R.isSet)(B.denom)&&(M.denom=String(B.denom)),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageRequest.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.denom!==void 0&&(M.denom=B.denom),B.pagination!==void 0&&(M.pagination=B.pagination?n.PageRequest.toJSON(B.pagination):void 0),M},fromPartial(B){const M=N();return M.denom=B.denom??"",B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageRequest.fromPartial(B.pagination)),M}};function V(){return{address:"",balance:t.Coin.fromPartial({})}}e.DenomOwner={typeUrl:"/cosmos.bank.v1beta1.DenomOwner",encode(B,M=u.BinaryWriter.create()){return B.address!==""&&M.uint32(10).string(B.address),B.balance!==void 0&&t.Coin.encode(B.balance,M.uint32(18).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=V();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.address=W.string();break;case 2:a.balance=t.Coin.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=V();return(0,R.isSet)(B.address)&&(M.address=String(B.address)),(0,R.isSet)(B.balance)&&(M.balance=t.Coin.fromJSON(B.balance)),M},toJSON(B){const M={};return B.address!==void 0&&(M.address=B.address),B.balance!==void 0&&(M.balance=B.balance?t.Coin.toJSON(B.balance):void 0),M},fromPartial(B){const M=V();return M.address=B.address??"",B.balance!==void 0&&B.balance!==null&&(M.balance=t.Coin.fromPartial(B.balance)),M}};function d(){return{denomOwners:[],pagination:void 0}}e.QueryDenomOwnersResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomOwnersResponse",encode(B,M=u.BinaryWriter.create()){for(const W of B.denomOwners)e.DenomOwner.encode(W,M.uint32(10).fork()).ldelim();return B.pagination!==void 0&&n.PageResponse.encode(B.pagination,M.uint32(18).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=d();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.denomOwners.push(e.DenomOwner.decode(W,W.uint32()));break;case 2:a.pagination=n.PageResponse.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=d();return Array.isArray(B==null?void 0:B.denomOwners)&&(M.denomOwners=B.denomOwners.map(W=>e.DenomOwner.fromJSON(W))),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageResponse.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.denomOwners?M.denomOwners=B.denomOwners.map(W=>W?e.DenomOwner.toJSON(W):void 0):M.denomOwners=[],B.pagination!==void 0&&(M.pagination=B.pagination?n.PageResponse.toJSON(B.pagination):void 0),M},fromPartial(B){var W;const M=d();return M.denomOwners=((W=B.denomOwners)==null?void 0:W.map(H=>e.DenomOwner.fromPartial(H)))||[],B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageResponse.fromPartial(B.pagination)),M}};function l(){return{denoms:[],pagination:void 0}}e.QuerySendEnabledRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySendEnabledRequest",encode(B,M=u.BinaryWriter.create()){for(const W of B.denoms)M.uint32(10).string(W);return B.pagination!==void 0&&n.PageRequest.encode(B.pagination,M.uint32(794).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=l();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.denoms.push(W.string());break;case 99:a.pagination=n.PageRequest.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=l();return Array.isArray(B==null?void 0:B.denoms)&&(M.denoms=B.denoms.map(W=>String(W))),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageRequest.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.denoms?M.denoms=B.denoms.map(W=>W):M.denoms=[],B.pagination!==void 0&&(M.pagination=B.pagination?n.PageRequest.toJSON(B.pagination):void 0),M},fromPartial(B){var W;const M=l();return M.denoms=((W=B.denoms)==null?void 0:W.map(H=>H))||[],B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageRequest.fromPartial(B.pagination)),M}};function T(){return{sendEnabled:[],pagination:void 0}}e.QuerySendEnabledResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySendEnabledResponse",encode(B,M=u.BinaryWriter.create()){for(const W of B.sendEnabled)i.SendEnabled.encode(W,M.uint32(10).fork()).ldelim();return B.pagination!==void 0&&n.PageResponse.encode(B.pagination,M.uint32(794).fork()).ldelim(),M},decode(B,M){const W=B instanceof u.BinaryReader?B:new u.BinaryReader(B);let H=M===void 0?W.len:W.pos+M;const a=T();for(;W.pos<H;){const g=W.uint32();switch(g>>>3){case 1:a.sendEnabled.push(i.SendEnabled.decode(W,W.uint32()));break;case 99:a.pagination=n.PageResponse.decode(W,W.uint32());break;default:W.skipType(g&7);break}}return a},fromJSON(B){const M=T();return Array.isArray(B==null?void 0:B.sendEnabled)&&(M.sendEnabled=B.sendEnabled.map(W=>i.SendEnabled.fromJSON(W))),(0,R.isSet)(B.pagination)&&(M.pagination=n.PageResponse.fromJSON(B.pagination)),M},toJSON(B){const M={};return B.sendEnabled?M.sendEnabled=B.sendEnabled.map(W=>W?i.SendEnabled.toJSON(W):void 0):M.sendEnabled=[],B.pagination!==void 0&&(M.pagination=B.pagination?n.PageResponse.toJSON(B.pagination):void 0),M},fromPartial(B){var W;const M=T();return M.sendEnabled=((W=B.sendEnabled)==null?void 0:W.map(H=>i.SendEnabled.fromPartial(H)))||[],B.pagination!==void 0&&B.pagination!==null&&(M.pagination=n.PageResponse.fromPartial(B.pagination)),M}};
3class O{constructor(M){this.rpc=M,this.Balance=this.Balance.bind(this),this.AllBalances=this.AllBalances.bind(this),this.SpendableBalances=this.SpendableBalances.bind(this),this.SpendableBalanceByDenom=this.SpendableBalanceByDenom.bind(this),this.TotalSupply=this.TotalSupply.bind(this),this.SupplyOf=this.SupplyOf.bind(this),this.Params=this.Params.bind(this),this.DenomMetadata=this.DenomMetadata.bind(this),this.DenomsMetadata=this.DenomsMetadata.bind(this),this.DenomOwners=this.DenomOwners.bind(this),this.SendEnabled=this.SendEnabled.bind(this)}Balance(M){const W=e.QueryBalanceRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","Balance",W).then(a=>e.QueryBalanceResponse.decode(new u.BinaryReader(a)))}AllBalances(M){const W=e.QueryAllBalancesRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","AllBalances",W).then(a=>e.QueryAllBalancesResponse.decode(new u.BinaryReader(a)))}SpendableBalances(M){const W=e.QuerySpendableBalancesRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SpendableBalances",W).then(a=>e.QuerySpendableBalancesResponse.decode(new u.BinaryReader(a)))}SpendableBalanceByDenom(M){const W=e.QuerySpendableBalanceByDenomRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SpendableBalanceByDenom",W).then(a=>e.QuerySpendableBalanceByDenomResponse.decode(new u.BinaryReader(a)))}TotalSupply(M={pagination:n.PageRequest.fromPartial({})}){const W=e.QueryTotalSupplyRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","TotalSupply",W).then(a=>e.QueryTotalSupplyResponse.decode(new u.BinaryReader(a)))}SupplyOf(M){const W=e.QuerySupplyOfRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SupplyOf",W).then(a=>e.QuerySupplyOfResponse.decode(new u.BinaryReader(a)))}Params(M={}){const W=e.QueryParamsRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","Params",W).then(a=>e.QueryParamsResponse.decode(new u.BinaryReader(a)))}DenomMetadata(M){const W=e.QueryDenomMetadataRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomMetadata",W).then(a=>e.QueryDenomMetadataResponse.decode(new u.BinaryReader(a)))}DenomsMetadata(M={pagination:n.PageRequest.fromPartial({})}){const W=e.QueryDenomsMetadataRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomsMetadata",W).then(a=>e.QueryDenomsMetadataResponse.decode(new u.BinaryReader(a)))}DenomOwners(M){const W=e.QueryDenomOwnersRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomOwners",W).then(a=>e.QueryDenomOwnersResponse.decode(new u.BinaryReader(a)))}SendEnabled(M){const W=e.QuerySendEnabledRequest.encode(M).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SendEnabled",W).then(a=>e.QuerySendEnabledResponse.decode(new u.BinaryReader(a)))}}e.QueryClientImpl=O})(yl);Object.defineProperty(sa,"__esModule",{value:!0});sa.setupBankExtension=void 0;const Hs=$e,qs=yl,uc=Ke;function Uh(e){const n=(0,uc.createProtobufRpcClient)(e),t=new qs.QueryClientImpl(n);return{bank:{balance:async(i,u)=>{const{balance:R}=await t.Balance({address:i,denom:u});return(0,Hs.assert)(R),R},allBalances:async i=>{const{balances:u}=await t.AllBalances(qs.QueryAllBalancesRequest.fromPartial({address:i}));return u},totalSupply:async i=>await t.TotalSupply({pagination:(0,uc.createPagination)(i)}),supplyOf:async i=>{const{amount:u}=await t.SupplyOf({denom:i});return(0,Hs.assert)(u),u},denomMetadata:async i=>{const{metadata:u}=await t.DenomMetadata({denom:i});return(0,Hs.assert)(u),u},denomsMetadata:async()=>{const{metadatas:i}=await t.DenomsMetadata(qs.QueryDenomsMetadataRequest.fromPartial({pagination:void 0}));return i}}}}sa.setupBankExtension=Uh;var qr={};Object.defineProperty(qr,"__esModule",{value:!0});qr.createCrysisAminoConverters=qr.isAminoMsgVerifyInvariant=void 0;function Dh(e){return e.type==="cosmos-sdk/MsgVerifyInvariant"}qr.isAminoMsgVerifyInvariant=Dh;function Mh(){throw new Error("Not implemented")}qr.createCrysisAminoConverters=Mh;var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.createDistributionAminoConverters=Sn.isAminoMsgFundCommunityPool=Sn.isAminoMsgWithdrawValidatorCommission=Sn.isAminoMsgWithdrawDelegatorReward=Sn.isAminoMsgSetWithdrawAddress=void 0;function Hh(e){return e.type==="cosmos-sdk/MsgModifyWithdrawAddress"}Sn.isAminoMsgSetWithdrawAddress=Hh;function qh(e){return e.type==="cosmos-sdk/MsgWithdrawDelegationReward"}Sn.isAminoMsgWithdrawDelegatorReward=qh;function Vh(e){return e.type==="cosmos-sdk/MsgWithdrawValidatorCommission"}Sn.isAminoMsgWithdrawValidatorCommission=Vh;function Qh(e){return e.type==="cosmos-sdk/MsgFundCommunityPool"}Sn.isAminoMsgFundCommunityPool=Qh;function Wh(){return{"/cosmos.distribution.v1beta1.MsgFundCommunityPool":{aminoType:"cosmos-sdk/MsgFundCommunityPool",toAmino:({amount:e,depositor:n})=>({amount:[...e],depositor:n}),fromAmino:({amount:e,depositor:n})=>({amount:[...e],depositor:n})},"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":{aminoType:"cosmos-sdk/MsgModifyWithdrawAddress",toAmino:({delegatorAddress:e,withdrawAddress:n})=>({delegator_address:e,withdraw_address:n}),fromAmino:({delegator_address:e,withdraw_address:n})=>({delegatorAddress:e,withdrawAddress:n})},"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":{aminoType:"cosmos-sdk/MsgWithdrawDelegationReward",toAmino:({delegatorAddress:e,validatorAddress:n})=>({delegator_address:e,validator_address:n}),fromAmino:({delegator_address:e,validator_address:n})=>({delegatorAddress:e,validatorAddress:n})},"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":{aminoType:"cosmos-sdk/MsgWithdrawValidatorCommission",toAmino:({validatorAddress:e})=>({validator_address:e}),fromAmino:({validator_address:e})=>({validatorAddress:e})}}}Sn.createDistributionAminoConverters=Wh;var Vr={},ou={},au={};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityPoolSpendProposalWithDeposit=e.DelegationDelegatorReward=e.DelegatorStartingInfo=e.CommunityPoolSpendProposal=e.FeePool=e.ValidatorSlashEvents=e.ValidatorSlashEvent=e.ValidatorOutstandingRewards=e.ValidatorAccumulatedCommission=e.ValidatorCurrentRewards=e.ValidatorHistoricalRewards=e.Params=e.protobufPackage=void 0;const n=ve,t=te,i=ee;e.protobufPackage="cosmos.distribution.v1beta1";function u(){return{communityTax:"",baseProposerReward:"",bonusProposerReward:"",withdrawAddrEnabled:!1}}e.Params={typeUrl:"/cosmos.distribution.v1beta1.Params",encode(s,y=t.BinaryWriter.create()){return s.communityTax!==""&&y.uint32(10).string(s.communityTax),s.baseProposerReward!==""&&y.uint32(18).string(s.baseProposerReward),s.bonusProposerReward!==""&&y.uint32(26).string(s.bonusProposerReward),s.withdrawAddrEnabled===!0&&y.uint32(32).bool(s.withdrawAddrEnabled),y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=u();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.communityTax=w.string();break;case 2:P.baseProposerReward=w.string();break;case 3:P.bonusProposerReward=w.string();break;case 4:P.withdrawAddrEnabled=w.bool();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=u();return(0,i.isSet)(s.communityTax)&&(y.communityTax=String(s.communityTax)),(0,i.isSet)(s.baseProposerReward)&&(y.baseProposerReward=String(s.baseProposerReward)),(0,i.isSet)(s.bonusProposerReward)&&(y.bonusProposerReward=String(s.bonusProposerReward)),(0,i.isSet)(s.withdrawAddrEnabled)&&(y.withdrawAddrEnabled=!!s.withdrawAddrEnabled),y},toJSON(s){const y={};return s.communityTax!==void 0&&(y.communityTax=s.communityTax),s.baseProposerReward!==void 0&&(y.baseProposerReward=s.baseProposerReward),s.bonusProposerReward!==void 0&&(y.bonusProposerReward=s.bonusProposerReward),s.withdrawAddrEnabled!==void 0&&(y.withdrawAddrEnabled=s.withdrawAddrEnabled),y},fromPartial(s){const y=u();return y.communityTax=s.communityTax??"",y.baseProposerReward=s.baseProposerReward??"",y.bonusProposerReward=s.bonusProposerReward??"",y.withdrawAddrEnabled=s.withdrawAddrEnabled??!1,y}};function R(){return{cumulativeRewardRatio:[],referenceCount:0}}e.ValidatorHistoricalRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorHistoricalRewards",encode(s,y=t.BinaryWriter.create()){for(const w of s.cumulativeRewardRatio)n.DecCoin.encode(w,y.uint32(10).fork()).ldelim();return s.referenceCount!==0&&y.uint32(16).uint32(s.referenceCount),y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=R();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.cumulativeRewardRatio.push(n.DecCoin.decode(w,w.uint32()));break;case 2:P.referenceCount=w.uint32();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=R();return Array.isArray(s==null?void 0:s.cumulativeRewardRatio)&&(y.cumulativeRewardRatio=s.cumulativeRewardRatio.map(w=>n.DecCoin.fromJSON(w))),(0,i.isSet)(s.referenceCount)&&(y.referenceCount=Number(s.referenceCount)),y},toJSON(s){const y={};return s.cumulativeRewardRatio?y.cumulativeRewardRatio=s.cumulativeRewardRatio.map(w=>w?n.DecCoin.toJSON(w):void 0):y.cumulativeRewardRatio=[],s.referenceCount!==void 0&&(y.referenceCount=Math.round(s.referenceCount)),y},fromPartial(s){var w;const y=R();return y.cumulativeRewardRatio=((w=s.cumulativeRewardRatio)==null?void 0:w.map(J=>n.DecCoin.fromPartial(J)))||[],y.referenceCount=s.referenceCount??0,y}};
3function v(){return{rewards:[],period:BigInt(0)}}e.ValidatorCurrentRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorCurrentRewards",encode(s,y=t.BinaryWriter.create()){for(const w of s.rewards)n.DecCoin.encode(w,y.uint32(10).fork()).ldelim();return s.period!==BigInt(0)&&y.uint32(16).uint64(s.period),y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=v();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.rewards.push(n.DecCoin.decode(w,w.uint32()));break;case 2:P.period=w.uint64();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=v();return Array.isArray(s==null?void 0:s.rewards)&&(y.rewards=s.rewards.map(w=>n.DecCoin.fromJSON(w))),(0,i.isSet)(s.period)&&(y.period=BigInt(s.period.toString())),y},toJSON(s){const y={};return s.rewards?y.rewards=s.rewards.map(w=>w?n.DecCoin.toJSON(w):void 0):y.rewards=[],s.period!==void 0&&(y.period=(s.period||BigInt(0)).toString()),y},fromPartial(s){var w;const y=v();return y.rewards=((w=s.rewards)==null?void 0:w.map(J=>n.DecCoin.fromPartial(J)))||[],s.period!==void 0&&s.period!==null&&(y.period=BigInt(s.period.toString())),y}};function E(){return{commission:[]}}e.ValidatorAccumulatedCommission={typeUrl:"/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission",encode(s,y=t.BinaryWriter.create()){for(const w of s.commission)n.DecCoin.encode(w,y.uint32(10).fork()).ldelim();return y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=E();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.commission.push(n.DecCoin.decode(w,w.uint32()));break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=E();return Array.isArray(s==null?void 0:s.commission)&&(y.commission=s.commission.map(w=>n.DecCoin.fromJSON(w))),y},toJSON(s){const y={};return s.commission?y.commission=s.commission.map(w=>w?n.DecCoin.toJSON(w):void 0):y.commission=[],y},fromPartial(s){var w;const y=E();return y.commission=((w=s.commission)==null?void 0:w.map(J=>n.DecCoin.fromPartial(J)))||[],y}};function C(){return{rewards:[]}}e.ValidatorOutstandingRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorOutstandingRewards",encode(s,y=t.BinaryWriter.create()){for(const w of s.rewards)n.DecCoin.encode(w,y.uint32(10).fork()).ldelim();return y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=C();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.rewards.push(n.DecCoin.decode(w,w.uint32()));break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=C();return Array.isArray(s==null?void 0:s.rewards)&&(y.rewards=s.rewards.map(w=>n.DecCoin.fromJSON(w))),y},toJSON(s){const y={};return s.rewards?y.rewards=s.rewards.map(w=>w?n.DecCoin.toJSON(w):void 0):y.rewards=[],y},fromPartial(s){var w;const y=C();return y.rewards=((w=s.rewards)==null?void 0:w.map(J=>n.DecCoin.fromPartial(J)))||[],y}};function D(){return{validatorPeriod:BigInt(0),fraction:""}}e.ValidatorSlashEvent={typeUrl:"/cosmos.distribution.v1beta1.ValidatorSlashEvent",encode(s,y=t.BinaryWriter.create()){return s.validatorPeriod!==BigInt(0)&&y.uint32(8).uint64(s.validatorPeriod),s.fraction!==""&&y.uint32(18).string(s.fraction),y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=D();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.validatorPeriod=w.uint64();break;case 2:P.fraction=w.string();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=D();return(0,i.isSet)(s.validatorPeriod)&&(y.validatorPeriod=BigInt(s.validatorPeriod.toString())),(0,i.isSet)(s.fraction)&&(y.fraction=String(s.fraction)),y},toJSON(s){const y={};return s.validatorPeriod!==void 0&&(y.validatorPeriod=(s.validatorPeriod||BigInt(0)).toString()),s.fraction!==void 0&&(y.fraction=s.fraction),y},fromPartial(s){const y=D();return s.validatorPeriod!==void 0&&s.validatorPeriod!==null&&(y.validatorPeriod=BigInt(s.validatorPeriod.toString())),y.fraction=s.fraction??"",y}};function _(){return{validatorSlashEvents:[]}}e.ValidatorSlashEvents={typeUrl:"/cosmos.distribution.v1beta1.ValidatorSlashEvents",encode(s,y=t.BinaryWriter.create()){for(const w of s.validatorSlashEvents)e.ValidatorSlashEvent.encode(w,y.uint32(10).fork()).ldelim();return y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=_();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.validatorSlashEvents.push(e.ValidatorSlashEvent.decode(w,w.uint32()));break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=_();return Array.isArray(s==null?void 0:s.validatorSlashEvents)&&(y.validatorSlashEvents=s.validatorSlashEvents.map(w=>e.ValidatorSlashEvent.fromJSON(w))),y},toJSON(s){const y={};return s.validatorSlashEvents?y.validatorSlashEvents=s.validatorSlashEvents.map(w=>w?e.ValidatorSlashEvent.toJSON(w):void 0):y.validatorSlashEvents=[],y},fromPartial(s){var w;const y=_();return y.validatorSlashEvents=((w=s.validatorSlashEvents)==null?void 0:w.map(J=>e.ValidatorSlashEvent.fromPartial(J)))||[],y}};function b(){return{communityPool:[]}}e.FeePool={typeUrl:"/cosmos.distribution.v1beta1.FeePool",encode(s,y=t.BinaryWriter.create()){for(const w of s.communityPool)n.DecCoin.encode(w,y.uint32(10).fork()).ldelim();return y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=b();for(;w.pos<J;){const U=w.uint32();switch(U>>>
33){case 1:P.communityPool.push(n.DecCoin.decode(w,w.uint32()));break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=b();return Array.isArray(s==null?void 0:s.communityPool)&&(y.communityPool=s.communityPool.map(w=>n.DecCoin.fromJSON(w))),y},toJSON(s){const y={};return s.communityPool?y.communityPool=s.communityPool.map(w=>w?n.DecCoin.toJSON(w):void 0):y.communityPool=[],y},fromPartial(s){var w;const y=b();return y.communityPool=((w=s.communityPool)==null?void 0:w.map(J=>n.DecCoin.fromPartial(J)))||[],y}};function f(){return{title:"",description:"",recipient:"",amount:[]}}e.CommunityPoolSpendProposal={typeUrl:"/cosmos.distribution.v1beta1.CommunityPoolSpendProposal",encode(s,y=t.BinaryWriter.create()){s.title!==""&&y.uint32(10).string(s.title),s.description!==""&&y.uint32(18).string(s.description),s.recipient!==""&&y.uint32(26).string(s.recipient);for(const w of s.amount)n.Coin.encode(w,y.uint32(34).fork()).ldelim();return y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=f();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.title=w.string();break;case 2:P.description=w.string();break;case 3:P.recipient=w.string();break;case 4:P.amount.push(n.Coin.decode(w,w.uint32()));break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=f();return(0,i.isSet)(s.title)&&(y.title=String(s.title)),(0,i.isSet)(s.description)&&(y.description=String(s.description)),(0,i.isSet)(s.recipient)&&(y.recipient=String(s.recipient)),Array.isArray(s==null?void 0:s.amount)&&(y.amount=s.amount.map(w=>n.Coin.fromJSON(w))),y},toJSON(s){const y={};return s.title!==void 0&&(y.title=s.title),s.description!==void 0&&(y.description=s.description),s.recipient!==void 0&&(y.recipient=s.recipient),s.amount?y.amount=s.amount.map(w=>w?n.Coin.toJSON(w):void 0):y.amount=[],y},fromPartial(s){var w;const y=f();return y.title=s.title??"",y.description=s.description??"",y.recipient=s.recipient??"",y.amount=((w=s.amount)==null?void 0:w.map(J=>n.Coin.fromPartial(J)))||[],y}};function p(){return{previousPeriod:BigInt(0),stake:"",height:BigInt(0)}}e.DelegatorStartingInfo={typeUrl:"/cosmos.distribution.v1beta1.DelegatorStartingInfo",encode(s,y=t.BinaryWriter.create()){return s.previousPeriod!==BigInt(0)&&y.uint32(8).uint64(s.previousPeriod),s.stake!==""&&y.uint32(18).string(s.stake),s.height!==BigInt(0)&&y.uint32(24).uint64(s.height),y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=p();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.previousPeriod=w.uint64();break;case 2:P.stake=w.string();break;case 3:P.height=w.uint64();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=p();return(0,i.isSet)(s.previousPeriod)&&(y.previousPeriod=BigInt(s.previousPeriod.toString())),(0,i.isSet)(s.stake)&&(y.stake=String(s.stake)),(0,i.isSet)(s.height)&&(y.height=BigInt(s.height.toString())),y},toJSON(s){const y={};return s.previousPeriod!==void 0&&(y.previousPeriod=(s.previousPeriod||BigInt(0)).toString()),s.stake!==void 0&&(y.stake=s.stake),s.height!==void 0&&(y.height=(s.height||BigInt(0)).toString()),y},fromPartial(s){const y=p();return s.previousPeriod!==void 0&&s.previousPeriod!==null&&(y.previousPeriod=BigInt(s.previousPeriod.toString())),y.stake=s.stake??"",s.height!==void 0&&s.height!==null&&(y.height=BigInt(s.height.toString())),y}};function k(){return{validatorAddress:"",reward:[]}}e.DelegationDelegatorReward={typeUrl:"/cosmos.distribution.v1beta1.DelegationDelegatorReward",encode(s,y=t.BinaryWriter.create()){s.validatorAddress!==""&&y.uint32(10).string(s.validatorAddress);for(const w of s.reward)n.DecCoin.encode(w,y.uint32(18).fork()).ldelim();return y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=k();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.validatorAddress=w.string();break;case 2:P.reward.push(n.DecCoin.decode(w,w.uint32()));break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=k();return(0,i.isSet)(s.validatorAddress)&&(y.validatorAddress=String(s.validatorAddress)),Array.isArray(s==null?void 0:s.reward)&&(y.reward=s.reward.map(w=>n.DecCoin.fromJSON(w))),y},toJSON(s){const y={};return s.validatorAddress!==void 0&&(y.validatorAddress=s.validatorAddress),s.reward?y.reward=s.reward.map(w=>w?n.DecCoin.toJSON(w):void 0):y.reward=[],y},fromPartial(s){var w;const y=k();return y.validatorAddress=s.validatorAddress??"",y.reward=((w=s.reward)==null?void 0:w.map(J=>n.DecCoin.fromPartial(J)))||[],y}};function o(){return{title:"",description:"",recipient:"",amount:"",deposit:""}}e.CommunityPoolSpendProposalWithDeposit={typeUrl:"/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit",encode(s,y=t.BinaryWriter.create()){return s.title!==""&&y.uint32(10).string(s.title),s.description!==""&&y.uint32(18).string(s.description),s.recipient!==""&&y.uint32(26).string(s.recipient),s.amount!==""&&y.uint32(34).string(s.amount),s.deposit!==""&&y.uint32(42).string(s.deposit),y},decode(s,y){const w=s instanceof t.BinaryReader?s:new t.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=o();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.title=w.string();break;case 2:P.description=w.string();break;case 3:P.recipient=w.string();break;case 4:P.amount=w.string();break;case 5:P.deposit=w.string();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=o();return(0,i.isSet)(s.title)&&(y.title=String(s.title)),(0,i.isSet)(s.description)&&(y.description=String(s.description)),(0,i.isSet)(s.recipient)&&(y.recipient=String(s.recipient)),(0,i.isSet)(s.amount)&&(y.amount=String(s.amount)),(0,i.isSet)(s.deposit)&&(y.deposit=String(s.deposit)),y},toJSON(s){const y={};return s.title!==void 0&&(y.title=s.title),s.description!==void 0&&(y.description=s.description),s.recipient!==void 0&&(y.recipient=s.recipient),s.amount!==void 0&&(y.amount=s.amount),s.deposit!==void 0&&(y.deposit=s.deposit),y},fromPartial(s){const y=o();return y.title=s.title??"",y.description=s.description??"",y.recipient=s.recipient??"",y.amount=s.amount??"",y.deposit=s.deposit??"",y}}})(au);
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgCommunityPoolSpendResponse=e.MsgCommunityPoolSpend=e.MsgUpdateParamsResponse=e.MsgUpdateParams=e.MsgFundCommunityPoolResponse=e.MsgFundCommunityPool=e.MsgWithdrawValidatorCommissionResponse=e.MsgWithdrawValidatorCommission=e.MsgWithdrawDelegatorRewardResponse=e.MsgWithdrawDelegatorReward=e.MsgSetWithdrawAddressResponse=e.MsgSetWithdrawAddress=e.protobufPackage=void 0;const n=ve,t=au,i=te,u=ee;e.protobufPackage="cosmos.distribution.v1beta1";function R(){return{delegatorAddress:"",withdrawAddress:""}}e.MsgSetWithdrawAddress={typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",encode(w,J=i.BinaryWriter.create()){return w.delegatorAddress!==""&&J.uint32(10).string(w.delegatorAddress),w.withdrawAddress!==""&&J.uint32(18).string(w.withdrawAddress),J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=R();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){case 1:r.delegatorAddress=P.string();break;case 2:r.withdrawAddress=P.string();break;default:P.skipType(m&7);break}}return r},fromJSON(w){const J=R();return(0,u.isSet)(w.delegatorAddress)&&(J.delegatorAddress=String(w.delegatorAddress)),(0,u.isSet)(w.withdrawAddress)&&(J.withdrawAddress=String(w.withdrawAddress)),J},toJSON(w){const J={};return w.delegatorAddress!==void 0&&(J.delegatorAddress=w.delegatorAddress),w.withdrawAddress!==void 0&&(J.withdrawAddress=w.withdrawAddress),J},fromPartial(w){const J=R();return J.delegatorAddress=w.delegatorAddress??"",J.withdrawAddress=w.withdrawAddress??"",J}};function v(){return{}}e.MsgSetWithdrawAddressResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse",encode(w,J=i.BinaryWriter.create()){return J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=v();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){default:P.skipType(m&7);break}}return r},fromJSON(w){return v()},toJSON(w){return{}},fromPartial(w){return v()}};function E(){return{delegatorAddress:"",validatorAddress:""}}e.MsgWithdrawDelegatorReward={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",encode(w,J=i.BinaryWriter.create()){return w.delegatorAddress!==""&&J.uint32(10).string(w.delegatorAddress),w.validatorAddress!==""&&J.uint32(18).string(w.validatorAddress),J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=E();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){case 1:r.delegatorAddress=P.string();break;case 2:r.validatorAddress=P.string();break;default:P.skipType(m&7);break}}return r},fromJSON(w){const J=E();return(0,u.isSet)(w.delegatorAddress)&&(J.delegatorAddress=String(w.delegatorAddress)),(0,u.isSet)(w.validatorAddress)&&(J.validatorAddress=String(w.validatorAddress)),J},toJSON(w){const J={};return w.delegatorAddress!==void 0&&(J.delegatorAddress=w.delegatorAddress),w.validatorAddress!==void 0&&(J.validatorAddress=w.validatorAddress),J},fromPartial(w){const J=E();return J.delegatorAddress=w.delegatorAddress??"",J.validatorAddress=w.validatorAddress??"",J}};function C(){return{amount:[]}}e.MsgWithdrawDelegatorRewardResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse",encode(w,J=i.BinaryWriter.create()){for(const P of w.amount)n.Coin.encode(P,J.uint32(10).fork()).ldelim();return J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=C();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){case 1:r.amount.push(n.Coin.decode(P,P.uint32()));break;default:P.skipType(m&7);break}}return r},fromJSON(w){const J=C();return Array.isArray(w==null?void 0:w.amount)&&(J.amount=w.amount.map(P=>n.Coin.fromJSON(P))),J},toJSON(w){const J={};return w.amount?J.amount=w.amount.map(P=>P?n.Coin.toJSON(P):void 0):J.amount=[],J},fromPartial(w){var P;const J=C();return J.amount=((P=w.amount)==null?void 0:P.map(U=>n.Coin.fromPartial(U)))||[],J}};function D(){return{validatorAddress:""}}e.MsgWithdrawValidatorCommission={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",encode(w,J=i.BinaryWriter.create()){return w.validatorAddress!==""&&J.uint32(10).string(w.validatorAddress),J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=D();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){case 1:r.validatorAddress=P.string();break;default:P.skipType(m&7);break}}return r},fromJSON(w){const J=D();return(0,u.isSet)(w.validatorAddress)&&(J.validatorAddress=String(w.validatorAddress)),J},toJSON(w){const J={};return w.validatorAddress!==void 0&&(J.validatorAddress=w.validatorAddress),J},fromPartial(w){const J=D();return J.validatorAddress=w.validatorAddress??"",J}};function _(){return{amount:[]}}e.MsgWithdrawValidatorCommissionResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse",encode(w,J=i.BinaryWriter.create()){for(const P of w.amount)n.Coin.encode(P,J.uint32(10).fork()).ldelim();return J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=_();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){case 1:r.amount.push(n.Coin.decode(P,P.uint32()));break;default:P.skipType(m&7);break}}return r},fromJSON(w){const J=_();return Array.isArray(w==null?void 0:w.amount)&&(J.amount=w.amount.map(P=>n.Coin.fromJSON(P))),J},toJSON(w){const J={};return w.amount?J.amount=w.amount.map(P=>P?n.Coin.toJSON(P):void 0):J.amount=[],J},fromPartial(w){var P;const J=_();return J.amount=((P=w.amount)==null?void 0:P.map(U=>n.Coin.fromPartial(U)))||[],J}};function b(){return{amount:[],depositor:""}}e.MsgFundCommunityPool={typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",encode(w,J=i.BinaryWriter.create()){for(const P of w.amount)n.Coin.encode(P,J.uint32(10).fork()).ldelim();return w.depositor!==""&&J.uint32(18).string(w.depositor),J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=b();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){case 1:r.amount.push(n.Coin.decode(P,P.uint32()));break;case 2:r.depositor=P.string();break;default:P.skipType(m&7);break}}return r},fromJSON(w){const J=b();return Array.isArray(w==null?void 0:w.amount)&&(J.amount=w.amount.map(P=>
3n.Coin.fromJSON(P))),(0,u.isSet)(w.depositor)&&(J.depositor=String(w.depositor)),J},toJSON(w){const J={};return w.amount?J.amount=w.amount.map(P=>P?n.Coin.toJSON(P):void 0):J.amount=[],w.depositor!==void 0&&(J.depositor=w.depositor),J},fromPartial(w){var P;const J=b();return J.amount=((P=w.amount)==null?void 0:P.map(U=>n.Coin.fromPartial(U)))||[],J.depositor=w.depositor??"",J}};function f(){return{}}e.MsgFundCommunityPoolResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse",encode(w,J=i.BinaryWriter.create()){return J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=f();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){default:P.skipType(m&7);break}}return r},fromJSON(w){return f()},toJSON(w){return{}},fromPartial(w){return f()}};function p(){return{authority:"",params:t.Params.fromPartial({})}}e.MsgUpdateParams={typeUrl:"/cosmos.distribution.v1beta1.MsgUpdateParams",encode(w,J=i.BinaryWriter.create()){return w.authority!==""&&J.uint32(10).string(w.authority),w.params!==void 0&&t.Params.encode(w.params,J.uint32(18).fork()).ldelim(),J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=p();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){case 1:r.authority=P.string();break;case 2:r.params=t.Params.decode(P,P.uint32());break;default:P.skipType(m&7);break}}return r},fromJSON(w){const J=p();return(0,u.isSet)(w.authority)&&(J.authority=String(w.authority)),(0,u.isSet)(w.params)&&(J.params=t.Params.fromJSON(w.params)),J},toJSON(w){const J={};return w.authority!==void 0&&(J.authority=w.authority),w.params!==void 0&&(J.params=w.params?t.Params.toJSON(w.params):void 0),J},fromPartial(w){const J=p();return J.authority=w.authority??"",w.params!==void 0&&w.params!==null&&(J.params=t.Params.fromPartial(w.params)),J}};function k(){return{}}e.MsgUpdateParamsResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgUpdateParamsResponse",encode(w,J=i.BinaryWriter.create()){return J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=k();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){default:P.skipType(m&7);break}}return r},fromJSON(w){return k()},toJSON(w){return{}},fromPartial(w){return k()}};function o(){return{authority:"",recipient:"",amount:[]}}e.MsgCommunityPoolSpend={typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",encode(w,J=i.BinaryWriter.create()){w.authority!==""&&J.uint32(10).string(w.authority),w.recipient!==""&&J.uint32(18).string(w.recipient);for(const P of w.amount)n.Coin.encode(P,J.uint32(26).fork()).ldelim();return J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=o();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){case 1:r.authority=P.string();break;case 2:r.recipient=P.string();break;case 3:r.amount.push(n.Coin.decode(P,P.uint32()));break;default:P.skipType(m&7);break}}return r},fromJSON(w){const J=o();return(0,u.isSet)(w.authority)&&(J.authority=String(w.authority)),(0,u.isSet)(w.recipient)&&(J.recipient=String(w.recipient)),Array.isArray(w==null?void 0:w.amount)&&(J.amount=w.amount.map(P=>n.Coin.fromJSON(P))),J},toJSON(w){const J={};return w.authority!==void 0&&(J.authority=w.authority),w.recipient!==void 0&&(J.recipient=w.recipient),w.amount?J.amount=w.amount.map(P=>P?n.Coin.toJSON(P):void 0):J.amount=[],J},fromPartial(w){var P;const J=o();return J.authority=w.authority??"",J.recipient=w.recipient??"",J.amount=((P=w.amount)==null?void 0:P.map(U=>n.Coin.fromPartial(U)))||[],J}};function s(){return{}}e.MsgCommunityPoolSpendResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse",encode(w,J=i.BinaryWriter.create()){return J},decode(w,J){const P=w instanceof i.BinaryReader?w:new i.BinaryReader(w);let U=J===void 0?P.len:P.pos+J;const r=s();for(;P.pos<U;){const m=P.uint32();switch(m>>>3){default:P.skipType(m&7);break}}return r},fromJSON(w){return s()},toJSON(w){return{}},fromPartial(w){return s()}};class y{constructor(J){this.rpc=J,this.SetWithdrawAddress=this.SetWithdrawAddress.bind(this),this.WithdrawDelegatorReward=this.WithdrawDelegatorReward.bind(this),this.WithdrawValidatorCommission=this.WithdrawValidatorCommission.bind(this),this.FundCommunityPool=this.FundCommunityPool.bind(this),this.UpdateParams=this.UpdateParams.bind(this),this.CommunityPoolSpend=this.CommunityPoolSpend.bind(this)}SetWithdrawAddress(J){const P=e.MsgSetWithdrawAddress.encode(J).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","SetWithdrawAddress",P).then(r=>e.MsgSetWithdrawAddressResponse.decode(new i.BinaryReader(r)))}WithdrawDelegatorReward(J){const P=e.MsgWithdrawDelegatorReward.encode(J).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawDelegatorReward",P).then(r=>e.MsgWithdrawDelegatorRewardResponse.decode(new i.BinaryReader(r)))}WithdrawValidatorCommission(J){const P=e.MsgWithdrawValidatorCommission.encode(J).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawValidatorCommission",P).then(r=>e.MsgWithdrawValidatorCommissionResponse.decode(new i.BinaryReader(r)))}FundCommunityPool(J){const P=e.MsgFundCommunityPool.encode(J).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","FundCommunityPool",P).then(r=>e.MsgFundCommunityPoolResponse.decode(new i.BinaryReader(r)))}UpdateParams(J){const P=e.MsgUpdateParams.encode(J).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","UpdateParams",P).then(r=>e.MsgUpdateParamsResponse.decode(new i.BinaryReader(r)))}CommunityPoolSpend(J){const P=e.MsgCommunityPoolSpend.encode(J).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","CommunityPoolSpend",P).then(r=>
3e.MsgCommunityPoolSpendResponse.decode(new i.BinaryReader(r)))}}e.MsgClientImpl=y})(ou);Object.defineProperty(Vr,"__esModule",{value:!0});Vr.isMsgWithdrawDelegatorRewardEncodeObject=Vr.distributionTypes=void 0;const to=ou;Vr.distributionTypes=[["/cosmos.distribution.v1beta1.MsgFundCommunityPool",to.MsgFundCommunityPool],["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",to.MsgSetWithdrawAddress],["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",to.MsgWithdrawDelegatorReward],["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",to.MsgWithdrawValidatorCommission]];function Fh(e){return e.typeUrl==="/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"}Vr.isMsgWithdrawDelegatorRewardEncodeObject=Fh;var da={},hl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryCommunityPoolResponse=e.QueryCommunityPoolRequest=e.QueryDelegatorWithdrawAddressResponse=e.QueryDelegatorWithdrawAddressRequest=e.QueryDelegatorValidatorsResponse=e.QueryDelegatorValidatorsRequest=e.QueryDelegationTotalRewardsResponse=e.QueryDelegationTotalRewardsRequest=e.QueryDelegationRewardsResponse=e.QueryDelegationRewardsRequest=e.QueryValidatorSlashesResponse=e.QueryValidatorSlashesRequest=e.QueryValidatorCommissionResponse=e.QueryValidatorCommissionRequest=e.QueryValidatorOutstandingRewardsResponse=e.QueryValidatorOutstandingRewardsRequest=e.QueryValidatorDistributionInfoResponse=e.QueryValidatorDistributionInfoRequest=e.QueryParamsResponse=e.QueryParamsRequest=e.protobufPackage=void 0;const n=_e,t=au,i=ve,u=te,R=ee;e.protobufPackage="cosmos.distribution.v1beta1";function v(){return{}}e.QueryParamsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryParamsRequest",encode(l,T=u.BinaryWriter.create()){return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=v();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){default:O.skipType(W&7);break}}return M},fromJSON(l){return v()},toJSON(l){return{}},fromPartial(l){return v()}};function E(){return{params:t.Params.fromPartial({})}}e.QueryParamsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryParamsResponse",encode(l,T=u.BinaryWriter.create()){return l.params!==void 0&&t.Params.encode(l.params,T.uint32(10).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=E();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.params=t.Params.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=E();return(0,R.isSet)(l.params)&&(T.params=t.Params.fromJSON(l.params)),T},toJSON(l){const T={};return l.params!==void 0&&(T.params=l.params?t.Params.toJSON(l.params):void 0),T},fromPartial(l){const T=E();return l.params!==void 0&&l.params!==null&&(T.params=t.Params.fromPartial(l.params)),T}};function C(){return{validatorAddress:""}}e.QueryValidatorDistributionInfoRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest",encode(l,T=u.BinaryWriter.create()){return l.validatorAddress!==""&&T.uint32(10).string(l.validatorAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=C();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.validatorAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=C();return(0,R.isSet)(l.validatorAddress)&&(T.validatorAddress=String(l.validatorAddress)),T},toJSON(l){const T={};return l.validatorAddress!==void 0&&(T.validatorAddress=l.validatorAddress),T},fromPartial(l){const T=C();return T.validatorAddress=l.validatorAddress??"",T}};function D(){return{operatorAddress:"",selfBondRewards:[],commission:[]}}e.QueryValidatorDistributionInfoResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse",encode(l,T=u.BinaryWriter.create()){l.operatorAddress!==""&&T.uint32(10).string(l.operatorAddress);for(const O of l.selfBondRewards)i.DecCoin.encode(O,T.uint32(18).fork()).ldelim();for(const O of l.commission)i.DecCoin.encode(O,T.uint32(26).fork()).ldelim();return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=D();for(;O.pos<B;){const W=O.uint32();switch(W>>>
33){case 1:M.operatorAddress=O.string();break;case 2:M.selfBondRewards.push(i.DecCoin.decode(O,O.uint32()));break;case 3:M.commission.push(i.DecCoin.decode(O,O.uint32()));break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=D();return(0,R.isSet)(l.operatorAddress)&&(T.operatorAddress=String(l.operatorAddress)),Array.isArray(l==null?void 0:l.selfBondRewards)&&(T.selfBondRewards=l.selfBondRewards.map(O=>i.DecCoin.fromJSON(O))),Array.isArray(l==null?void 0:l.commission)&&(T.commission=l.commission.map(O=>i.DecCoin.fromJSON(O))),T},toJSON(l){const T={};return l.operatorAddress!==void 0&&(T.operatorAddress=l.operatorAddress),l.selfBondRewards?T.selfBondRewards=l.selfBondRewards.map(O=>O?i.DecCoin.toJSON(O):void 0):T.selfBondRewards=[],l.commission?T.commission=l.commission.map(O=>O?i.DecCoin.toJSON(O):void 0):T.commission=[],T},fromPartial(l){var O,B;const T=D();return T.operatorAddress=l.operatorAddress??"",T.selfBondRewards=((O=l.selfBondRewards)==null?void 0:O.map(M=>i.DecCoin.fromPartial(M)))||[],T.commission=((B=l.commission)==null?void 0:B.map(M=>i.DecCoin.fromPartial(M)))||[],T}};function _(){return{validatorAddress:""}}e.QueryValidatorOutstandingRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest",encode(l,T=u.BinaryWriter.create()){return l.validatorAddress!==""&&T.uint32(10).string(l.validatorAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=_();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.validatorAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=_();return(0,R.isSet)(l.validatorAddress)&&(T.validatorAddress=String(l.validatorAddress)),T},toJSON(l){const T={};return l.validatorAddress!==void 0&&(T.validatorAddress=l.validatorAddress),T},fromPartial(l){const T=_();return T.validatorAddress=l.validatorAddress??"",T}};function b(){return{rewards:t.ValidatorOutstandingRewards.fromPartial({})}}e.QueryValidatorOutstandingRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse",encode(l,T=u.BinaryWriter.create()){return l.rewards!==void 0&&t.ValidatorOutstandingRewards.encode(l.rewards,T.uint32(10).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=b();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.rewards=t.ValidatorOutstandingRewards.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=b();return(0,R.isSet)(l.rewards)&&(T.rewards=t.ValidatorOutstandingRewards.fromJSON(l.rewards)),T},toJSON(l){const T={};return l.rewards!==void 0&&(T.rewards=l.rewards?t.ValidatorOutstandingRewards.toJSON(l.rewards):void 0),T},fromPartial(l){const T=b();return l.rewards!==void 0&&l.rewards!==null&&(T.rewards=t.ValidatorOutstandingRewards.fromPartial(l.rewards)),T}};function f(){return{validatorAddress:""}}e.QueryValidatorCommissionRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest",encode(l,T=u.BinaryWriter.create()){return l.validatorAddress!==""&&T.uint32(10).string(l.validatorAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=f();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.validatorAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=f();return(0,R.isSet)(l.validatorAddress)&&(T.validatorAddress=String(l.validatorAddress)),T},toJSON(l){const T={};return l.validatorAddress!==void 0&&(T.validatorAddress=l.validatorAddress),T},fromPartial(l){const T=f();return T.validatorAddress=l.validatorAddress??"",T}};function p(){return{commission:t.ValidatorAccumulatedCommission.fromPartial({})}}e.QueryValidatorCommissionResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse",encode(l,T=u.BinaryWriter.create()){return l.commission!==void 0&&t.ValidatorAccumulatedCommission.encode(l.commission,T.uint32(10).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=p();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.commission=t.ValidatorAccumulatedCommission.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=p();return(0,R.isSet)(l.commission)&&(T.commission=t.ValidatorAccumulatedCommission.fromJSON(l.commission)),T},toJSON(l){const T={};return l.commission!==void 0&&(T.commission=l.commission?t.ValidatorAccumulatedCommission.toJSON(l.commission):void 0),T},fromPartial(l){const T=p();return l.commission!==void 0&&l.commission!==null&&(T.commission=t.ValidatorAccumulatedCommission.fromPartial(l.commission)),T}};function k(){return{validatorAddress:"",startingHeight:BigInt(0),endingHeight:BigInt(0),pagination:void 0}}e.QueryValidatorSlashesRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest",encode(l,T=u.BinaryWriter.create()){return l.validatorAddress!==""&&T.uint32(10).string(l.validatorAddress),l.startingHeight!==BigInt(0)&&T.uint32(16).uint64(l.startingHeight),l.endingHeight!==BigInt(0)&&T.uint32(24).uint64(l.endingHeight),l.pagination!==void 0&&n.PageRequest.encode(l.pagination,T.uint32(34).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=k();for(;O.pos<B;){const W=O.uint32();switch(W>>>
33){case 1:M.validatorAddress=O.string();break;case 2:M.startingHeight=O.uint64();break;case 3:M.endingHeight=O.uint64();break;case 4:M.pagination=n.PageRequest.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=k();return(0,R.isSet)(l.validatorAddress)&&(T.validatorAddress=String(l.validatorAddress)),(0,R.isSet)(l.startingHeight)&&(T.startingHeight=BigInt(l.startingHeight.toString())),(0,R.isSet)(l.endingHeight)&&(T.endingHeight=BigInt(l.endingHeight.toString())),(0,R.isSet)(l.pagination)&&(T.pagination=n.PageRequest.fromJSON(l.pagination)),T},toJSON(l){const T={};return l.validatorAddress!==void 0&&(T.validatorAddress=l.validatorAddress),l.startingHeight!==void 0&&(T.startingHeight=(l.startingHeight||BigInt(0)).toString()),l.endingHeight!==void 0&&(T.endingHeight=(l.endingHeight||BigInt(0)).toString()),l.pagination!==void 0&&(T.pagination=l.pagination?n.PageRequest.toJSON(l.pagination):void 0),T},fromPartial(l){const T=k();return T.validatorAddress=l.validatorAddress??"",l.startingHeight!==void 0&&l.startingHeight!==null&&(T.startingHeight=BigInt(l.startingHeight.toString())),l.endingHeight!==void 0&&l.endingHeight!==null&&(T.endingHeight=BigInt(l.endingHeight.toString())),l.pagination!==void 0&&l.pagination!==null&&(T.pagination=n.PageRequest.fromPartial(l.pagination)),T}};function o(){return{slashes:[],pagination:void 0}}e.QueryValidatorSlashesResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse",encode(l,T=u.BinaryWriter.create()){for(const O of l.slashes)t.ValidatorSlashEvent.encode(O,T.uint32(10).fork()).ldelim();return l.pagination!==void 0&&n.PageResponse.encode(l.pagination,T.uint32(18).fork()).ldelim(),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=o();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.slashes.push(t.ValidatorSlashEvent.decode(O,O.uint32()));break;case 2:M.pagination=n.PageResponse.decode(O,O.uint32());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=o();return Array.isArray(l==null?void 0:l.slashes)&&(T.slashes=l.slashes.map(O=>t.ValidatorSlashEvent.fromJSON(O))),(0,R.isSet)(l.pagination)&&(T.pagination=n.PageResponse.fromJSON(l.pagination)),T},toJSON(l){const T={};return l.slashes?T.slashes=l.slashes.map(O=>O?t.ValidatorSlashEvent.toJSON(O):void 0):T.slashes=[],l.pagination!==void 0&&(T.pagination=l.pagination?n.PageResponse.toJSON(l.pagination):void 0),T},fromPartial(l){var O;const T=o();return T.slashes=((O=l.slashes)==null?void 0:O.map(B=>t.ValidatorSlashEvent.fromPartial(B)))||[],l.pagination!==void 0&&l.pagination!==null&&(T.pagination=n.PageResponse.fromPartial(l.pagination)),T}};function s(){return{delegatorAddress:"",validatorAddress:""}}e.QueryDelegationRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest",encode(l,T=u.BinaryWriter.create()){return l.delegatorAddress!==""&&T.uint32(10).string(l.delegatorAddress),l.validatorAddress!==""&&T.uint32(18).string(l.validatorAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=s();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.delegatorAddress=O.string();break;case 2:M.validatorAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=s();return(0,R.isSet)(l.delegatorAddress)&&(T.delegatorAddress=String(l.delegatorAddress)),(0,R.isSet)(l.validatorAddress)&&(T.validatorAddress=String(l.validatorAddress)),T},toJSON(l){const T={};return l.delegatorAddress!==void 0&&(T.delegatorAddress=l.delegatorAddress),l.validatorAddress!==void 0&&(T.validatorAddress=l.validatorAddress),T},fromPartial(l){const T=s();return T.delegatorAddress=l.delegatorAddress??"",T.validatorAddress=l.validatorAddress??"",T}};function y(){return{rewards:[]}}e.QueryDelegationRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse",encode(l,T=u.BinaryWriter.create()){for(const O of l.rewards)i.DecCoin.encode(O,T.uint32(10).fork()).ldelim();return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=y();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.rewards.push(i.DecCoin.decode(O,O.uint32()));break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=y();return Array.isArray(l==null?void 0:l.rewards)&&(T.rewards=l.rewards.map(O=>i.DecCoin.fromJSON(O))),T},toJSON(l){const T={};return l.rewards?T.rewards=l.rewards.map(O=>O?i.DecCoin.toJSON(O):void 0):T.rewards=[],T},fromPartial(l){var O;const T=y();return T.rewards=((O=l.rewards)==null?void 0:O.map(B=>i.DecCoin.fromPartial(B)))||[],T}};function w(){return{delegatorAddress:""}}e.QueryDelegationTotalRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest",encode(l,T=u.BinaryWriter.create()){return l.delegatorAddress!==""&&T.uint32(10).string(l.delegatorAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=w();for(;O.pos<B;){const W=O.uint32();switch(W>>>
33){case 1:M.delegatorAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=w();return(0,R.isSet)(l.delegatorAddress)&&(T.delegatorAddress=String(l.delegatorAddress)),T},toJSON(l){const T={};return l.delegatorAddress!==void 0&&(T.delegatorAddress=l.delegatorAddress),T},fromPartial(l){const T=w();return T.delegatorAddress=l.delegatorAddress??"",T}};function J(){return{rewards:[],total:[]}}e.QueryDelegationTotalRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse",encode(l,T=u.BinaryWriter.create()){for(const O of l.rewards)t.DelegationDelegatorReward.encode(O,T.uint32(10).fork()).ldelim();for(const O of l.total)i.DecCoin.encode(O,T.uint32(18).fork()).ldelim();return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=J();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.rewards.push(t.DelegationDelegatorReward.decode(O,O.uint32()));break;case 2:M.total.push(i.DecCoin.decode(O,O.uint32()));break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=J();return Array.isArray(l==null?void 0:l.rewards)&&(T.rewards=l.rewards.map(O=>t.DelegationDelegatorReward.fromJSON(O))),Array.isArray(l==null?void 0:l.total)&&(T.total=l.total.map(O=>i.DecCoin.fromJSON(O))),T},toJSON(l){const T={};return l.rewards?T.rewards=l.rewards.map(O=>O?t.DelegationDelegatorReward.toJSON(O):void 0):T.rewards=[],l.total?T.total=l.total.map(O=>O?i.DecCoin.toJSON(O):void 0):T.total=[],T},fromPartial(l){var O,B;const T=J();return T.rewards=((O=l.rewards)==null?void 0:O.map(M=>t.DelegationDelegatorReward.fromPartial(M)))||[],T.total=((B=l.total)==null?void 0:B.map(M=>i.DecCoin.fromPartial(M)))||[],T}};function P(){return{delegatorAddress:""}}e.QueryDelegatorValidatorsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest",encode(l,T=u.BinaryWriter.create()){return l.delegatorAddress!==""&&T.uint32(10).string(l.delegatorAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=P();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.delegatorAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=P();return(0,R.isSet)(l.delegatorAddress)&&(T.delegatorAddress=String(l.delegatorAddress)),T},toJSON(l){const T={};return l.delegatorAddress!==void 0&&(T.delegatorAddress=l.delegatorAddress),T},fromPartial(l){const T=P();return T.delegatorAddress=l.delegatorAddress??"",T}};function U(){return{validators:[]}}e.QueryDelegatorValidatorsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse",encode(l,T=u.BinaryWriter.create()){for(const O of l.validators)T.uint32(10).string(O);return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=U();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.validators.push(O.string());break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=U();return Array.isArray(l==null?void 0:l.validators)&&(T.validators=l.validators.map(O=>String(O))),T},toJSON(l){const T={};return l.validators?T.validators=l.validators.map(O=>O):T.validators=[],T},fromPartial(l){var O;const T=U();return T.validators=((O=l.validators)==null?void 0:O.map(B=>B))||[],T}};function r(){return{delegatorAddress:""}}e.QueryDelegatorWithdrawAddressRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest",encode(l,T=u.BinaryWriter.create()){return l.delegatorAddress!==""&&T.uint32(10).string(l.delegatorAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=r();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.delegatorAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=r();return(0,R.isSet)(l.delegatorAddress)&&(T.delegatorAddress=String(l.delegatorAddress)),T},toJSON(l){const T={};return l.delegatorAddress!==void 0&&(T.delegatorAddress=l.delegatorAddress),T},fromPartial(l){const T=r();return T.delegatorAddress=l.delegatorAddress??"",T}};function m(){return{withdrawAddress:""}}e.QueryDelegatorWithdrawAddressResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse",encode(l,T=u.BinaryWriter.create()){return l.withdrawAddress!==""&&T.uint32(10).string(l.withdrawAddress),T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=m();for(;O.pos<B;){const W=O.uint32();switch(W>>>
33){case 1:M.withdrawAddress=O.string();break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=m();return(0,R.isSet)(l.withdrawAddress)&&(T.withdrawAddress=String(l.withdrawAddress)),T},toJSON(l){const T={};return l.withdrawAddress!==void 0&&(T.withdrawAddress=l.withdrawAddress),T},fromPartial(l){const T=m();return T.withdrawAddress=l.withdrawAddress??"",T}};function N(){return{}}e.QueryCommunityPoolRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryCommunityPoolRequest",encode(l,T=u.BinaryWriter.create()){return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=N();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){default:O.skipType(W&7);break}}return M},fromJSON(l){return N()},toJSON(l){return{}},fromPartial(l){return N()}};function V(){return{pool:[]}}e.QueryCommunityPoolResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryCommunityPoolResponse",encode(l,T=u.BinaryWriter.create()){for(const O of l.pool)i.DecCoin.encode(O,T.uint32(10).fork()).ldelim();return T},decode(l,T){const O=l instanceof u.BinaryReader?l:new u.BinaryReader(l);let B=T===void 0?O.len:O.pos+T;const M=V();for(;O.pos<B;){const W=O.uint32();switch(W>>>3){case 1:M.pool.push(i.DecCoin.decode(O,O.uint32()));break;default:O.skipType(W&7);break}}return M},fromJSON(l){const T=V();return Array.isArray(l==null?void 0:l.pool)&&(T.pool=l.pool.map(O=>i.DecCoin.fromJSON(O))),T},toJSON(l){const T={};return l.pool?T.pool=l.pool.map(O=>O?i.DecCoin.toJSON(O):void 0):T.pool=[],T},fromPartial(l){var O;const T=V();return T.pool=((O=l.pool)==null?void 0:O.map(B=>i.DecCoin.fromPartial(B)))||[],T}};class d{constructor(T){this.rpc=T,this.Params=this.Params.bind(this),this.ValidatorDistributionInfo=this.ValidatorDistributionInfo.bind(this),this.ValidatorOutstandingRewards=this.ValidatorOutstandingRewards.bind(this),this.ValidatorCommission=this.ValidatorCommission.bind(this),this.ValidatorSlashes=this.ValidatorSlashes.bind(this),this.DelegationRewards=this.DelegationRewards.bind(this),this.DelegationTotalRewards=this.DelegationTotalRewards.bind(this),this.DelegatorValidators=this.DelegatorValidators.bind(this),this.DelegatorWithdrawAddress=this.DelegatorWithdrawAddress.bind(this),this.CommunityPool=this.CommunityPool.bind(this)}Params(T={}){const O=e.QueryParamsRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","Params",O).then(M=>e.QueryParamsResponse.decode(new u.BinaryReader(M)))}ValidatorDistributionInfo(T){const O=e.QueryValidatorDistributionInfoRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorDistributionInfo",O).then(M=>e.QueryValidatorDistributionInfoResponse.decode(new u.BinaryReader(M)))}ValidatorOutstandingRewards(T){const O=e.QueryValidatorOutstandingRewardsRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorOutstandingRewards",O).then(M=>e.QueryValidatorOutstandingRewardsResponse.decode(new u.BinaryReader(M)))}ValidatorCommission(T){const O=e.QueryValidatorCommissionRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorCommission",O).then(M=>e.QueryValidatorCommissionResponse.decode(new u.BinaryReader(M)))}ValidatorSlashes(T){const O=e.QueryValidatorSlashesRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorSlashes",O).then(M=>e.QueryValidatorSlashesResponse.decode(new u.BinaryReader(M)))}DelegationRewards(T){const O=e.QueryDelegationRewardsRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegationRewards",O).then(M=>e.QueryDelegationRewardsResponse.decode(new u.BinaryReader(M)))}DelegationTotalRewards(T){const O=e.QueryDelegationTotalRewardsRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegationTotalRewards",O).then(M=>e.QueryDelegationTotalRewardsResponse.decode(new u.BinaryReader(M)))}DelegatorValidators(T){const O=e.QueryDelegatorValidatorsRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegatorValidators",O).then(M=>e.QueryDelegatorValidatorsResponse.decode(new u.BinaryReader(M)))}DelegatorWithdrawAddress(T){const O=e.QueryDelegatorWithdrawAddressRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegatorWithdrawAddress",O).then(M=>e.QueryDelegatorWithdrawAddressResponse.decode(new u.BinaryReader(M)))}CommunityPool(T={}){const O=e.QueryCommunityPoolRequest.encode(T).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","CommunityPool",O).then(M=>e.QueryCommunityPoolResponse.decode(new u.BinaryReader(M)))}}
3e.QueryClientImpl=d})(hl);Object.defineProperty(da,"__esModule",{value:!0});da.setupDistributionExtension=void 0;const Gh=hl,cc=Ke;function Lh(e){const n=(0,cc.createProtobufRpcClient)(e),t=new Gh.QueryClientImpl(n);return{distribution:{communityPool:async()=>await t.CommunityPool({}),delegationRewards:async(i,u)=>await t.DelegationRewards({delegatorAddress:i,validatorAddress:u}),delegationTotalRewards:async i=>await t.DelegationTotalRewards({delegatorAddress:i}),delegatorValidators:async i=>await t.DelegatorValidators({delegatorAddress:i}),delegatorWithdrawAddress:async i=>await t.DelegatorWithdrawAddress({delegatorAddress:i}),params:async()=>await t.Params({}),validatorCommission:async i=>await t.ValidatorCommission({validatorAddress:i}),validatorOutstandingRewards:async i=>await t.ValidatorOutstandingRewards({validatorAddress:i}),validatorSlashes:async(i,u,R,v)=>await t.ValidatorSlashes({validatorAddress:i,startingHeight:BigInt(u),endingHeight:BigInt(R),pagination:(0,cc.createPagination)(v)})}}}da.setupDistributionExtension=Lh;var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.createEvidenceAminoConverters=Qr.isAminoMsgSubmitEvidence=void 0;function $h(e){return e.type==="cosmos-sdk/MsgSubmitEvidence"}Qr.isAminoMsgSubmitEvidence=$h;function Kh(){throw new Error("Not implemented")}Qr.createEvidenceAminoConverters=Kh;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});ua.createFeegrantAminoConverters=void 0;function zh(){return{}}ua.createFeegrantAminoConverters=zh;var ca={},gl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgRevokeAllowanceResponse=e.MsgRevokeAllowance=e.MsgGrantAllowanceResponse=e.MsgGrantAllowance=e.protobufPackage=void 0;const n=Re,t=te,i=ee;e.protobufPackage="cosmos.feegrant.v1beta1";function u(){return{granter:"",grantee:"",allowance:void 0}}e.MsgGrantAllowance={typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",encode(D,_=t.BinaryWriter.create()){return D.granter!==""&&_.uint32(10).string(D.granter),D.grantee!==""&&_.uint32(18).string(D.grantee),D.allowance!==void 0&&n.Any.encode(D.allowance,_.uint32(26).fork()).ldelim(),_},decode(D,_){const b=D instanceof t.BinaryReader?D:new t.BinaryReader(D);let f=_===void 0?b.len:b.pos+_;const p=u();for(;b.pos<f;){const k=b.uint32();switch(k>>>3){case 1:p.granter=b.string();break;case 2:p.grantee=b.string();break;case 3:p.allowance=n.Any.decode(b,b.uint32());break;default:b.skipType(k&7);break}}return p},fromJSON(D){const _=u();return(0,i.isSet)(D.granter)&&(_.granter=String(D.granter)),(0,i.isSet)(D.grantee)&&(_.grantee=String(D.grantee)),(0,i.isSet)(D.allowance)&&(_.allowance=n.Any.fromJSON(D.allowance)),_},toJSON(D){const _={};return D.granter!==void 0&&(_.granter=D.granter),D.grantee!==void 0&&(_.grantee=D.grantee),D.allowance!==void 0&&(_.allowance=D.allowance?n.Any.toJSON(D.allowance):void 0),_},fromPartial(D){const _=u();return _.granter=D.granter??"",_.grantee=D.grantee??"",D.allowance!==void 0&&D.allowance!==null&&(_.allowance=n.Any.fromPartial(D.allowance)),_}};function R(){return{}}e.MsgGrantAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse",encode(D,_=t.BinaryWriter.create()){return _},decode(D,_){const b=D instanceof t.BinaryReader?D:new t.BinaryReader(D);let f=_===void 0?b.len:b.pos+_;const p=R();for(;b.pos<f;){const k=b.uint32();switch(k>>>3){default:b.skipType(k&7);break}}return p},fromJSON(D){return R()},toJSON(D){return{}},fromPartial(D){return R()}};function v(){return{granter:"",grantee:""}}e.MsgRevokeAllowance={typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",encode(D,_=t.BinaryWriter.create()){return D.granter!==""&&_.uint32(10).string(D.granter),D.grantee!==""&&_.uint32(18).string(D.grantee),_},decode(D,_){const b=D instanceof t.BinaryReader?D:new t.BinaryReader(D);let f=_===void 0?b.len:b.pos+_;const p=v();for(;b.pos<f;){const k=b.uint32();switch(k>>>3){case 1:p.granter=b.string();break;case 2:p.grantee=b.string();break;default:b.skipType(k&7);break}}return p},fromJSON(D){const _=v();return(0,i.isSet)(D.granter)&&(_.granter=String(D.granter)),(0,i.isSet)(D.grantee)&&(_.grantee=String(D.grantee)),_},toJSON(D){const _={};return D.granter!==void 0&&(_.granter=D.granter),D.grantee!==void 0&&(_.grantee=D.grantee),_},fromPartial(D){const _=v();return _.granter=D.granter??"",_.grantee=D.grantee??"",_}};function E(){return{}}e.MsgRevokeAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse",encode(D,_=t.BinaryWriter.create()){return _},decode(D,_){const b=D instanceof t.BinaryReader?D:new t.BinaryReader(D);let f=_===void 0?b.len:b.pos+_;const p=E();for(;b.pos<f;){const k=b.uint32();switch(k>>>3){default:b.skipType(k&7);break}}return p},fromJSON(D){return E()},toJSON(D){return{}},fromPartial(D){return E()}};class C{constructor(_){this.rpc=_,this.GrantAllowance=this.GrantAllowance.bind(this),this.RevokeAllowance=this.RevokeAllowance.bind(this)}GrantAllowance(_){const b=e.MsgGrantAllowance.encode(_).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Msg","GrantAllowance",b).then(p=>e.MsgGrantAllowanceResponse.decode(new t.BinaryReader(p)))}RevokeAllowance(_){const b=e.MsgRevokeAllowance.encode(_).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Msg","RevokeAllowance",b).then(p=>e.MsgRevokeAllowanceResponse.decode(new t.BinaryReader(p)))}}e.MsgClientImpl=C})(gl);Object.defineProperty(ca,"__esModule",{value:!0});ca.feegrantTypes=void 0;const lc=gl;ca.feegrantTypes=[["/cosmos.feegrant.v1beta1.MsgGrantAllowance",lc.MsgGrantAllowance],["/cosmos.feegrant.v1beta1.MsgRevokeAllowance",lc.MsgRevokeAllowance]];var la={},Sl={},kl={},ln={};Object.defineProperty(ln,"__esModule",{value:!0});ln.Duration=ln.protobufPackage=void 0;const Vs=te,fc=ee;ln.protobufPackage="google.protobuf";function Qs(){return{seconds:BigInt(0),nanos:0}}ln.Duration={typeUrl:"/google.protobuf.Duration",encode(e,n=Vs.BinaryWriter.create()){return e.seconds!==BigInt(0)&&n.uint32(8).int64(e.seconds),e.nanos!==0&&n.uint32(16).int32(e.nanos),n},decode(e,n){const t=e instanceof Vs.BinaryReader?e:new Vs.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Qs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.seconds=t.int64();break;case 2:u.nanos=t.int32();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Qs();return(0,fc.isSet)(e.seconds)&&(n.seconds=BigInt(e.seconds.toString())),(0,fc.isSet)(e.nanos)&&(n.nanos=Number(e.nanos)),n},toJSON(e){const n={};return e.seconds!==void 0&&(n.seconds=(e.seconds||BigInt(0)).toString()),e.nanos!==void 0&&(n.nanos=Math.round(e.nanos)),n},fromPartial(e){const n=Qs();return e.seconds!==void 0&&e.seconds!==null&&(n.seconds=BigInt(e.seconds.toString())),n.nanos=e.nanos??0,n}};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Grant=e.AllowedMsgAllowance=e.PeriodicAllowance=e.BasicAllowance=e.protobufPackage=void 0;const n=ve,t=Me,i=ln,u=Re,R=te,v=ee;e.protobufPackage="cosmos.feegrant.v1beta1";function E(){return{spendLimit:[],expiration:void 0}}e.BasicAllowance={typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",encode(b,f=R.BinaryWriter.create()){for(const p of b.spendLimit)n.Coin.encode(p,f.uint32(10).fork()).ldelim();return b.expiration!==void 0&&t.Timestamp.encode(b.expiration,f.uint32(18).fork()).ldelim(),f},decode(b,f){const p=b instanceof R.BinaryReader?b:new R.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=E();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.spendLimit.push(n.Coin.decode(p,p.uint32()));break;case 2:o.expiration=t.Timestamp.decode(p,p.uint32());break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=E();return Array.isArray(b==null?void 0:b.spendLimit)&&(f.spendLimit=b.spendLimit.map(p=>n.Coin.fromJSON(p))),(0,v.isSet)(b.expiration)&&(f.expiration=(0,v.fromJsonTimestamp)(b.expiration)),f},toJSON(b){const f={};return b.spendLimit?f.spendLimit=b.spendLimit.map(p=>p?n.Coin.toJSON(p):void 0):f.spendLimit=[],b.expiration!==void 0&&(f.expiration=(0,v.fromTimestamp)(b.expiration).toISOString()),f},fromPartial(b){var p;const f=E();return f.spendLimit=((p=b.spendLimit)==null?void 0:p.map(k=>n.Coin.fromPartial(k)))||[],b.expiration!==void 0&&b.expiration!==null&&(f.expiration=t.Timestamp.fromPartial(b.expiration)),f}};function C(){return{basic:e.BasicAllowance.fromPartial({}),period:i.Duration.fromPartial({}),periodSpendLimit:[],periodCanSpend:[],periodReset:t.Timestamp.fromPartial({})}}e.PeriodicAllowance={typeUrl:"/cosmos.feegrant.v1beta1.PeriodicAllowance",encode(b,f=R.BinaryWriter.create()){b.basic!==void 0&&e.BasicAllowance.encode(b.basic,f.uint32(10).fork()).ldelim(),b.period!==void 0&&i.Duration.encode(b.period,f.uint32(18).fork()).ldelim();for(const p of b.periodSpendLimit)n.Coin.encode(p,f.uint32(26).fork()).ldelim();for(const p of b.periodCanSpend)n.Coin.encode(p,f.uint32(34).fork()).ldelim();return b.periodReset!==void 0&&t.Timestamp.encode(b.periodReset,f.uint32(42).fork()).ldelim(),f},decode(b,f){const p=b instanceof R.BinaryReader?b:new R.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=C();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.basic=e.BasicAllowance.decode(p,p.uint32());break;case 2:o.period=i.Duration.decode(p,p.uint32());break;case 3:o.periodSpendLimit.push(n.Coin.decode(p,p.uint32()));break;case 4:o.periodCanSpend.push(n.Coin.decode(p,p.uint32()));break;case 5:o.periodReset=t.Timestamp.decode(p,p.uint32());break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=C();return(0,v.isSet)(b.basic)&&(f.basic=e.BasicAllowance.fromJSON(b.basic)),(0,v.isSet)(b.period)&&(f.period=i.Duration.fromJSON(b.period)),Array.isArray(b==null?void 0:b.periodSpendLimit)&&(f.periodSpendLimit=b.periodSpendLimit.map(p=>n.Coin.fromJSON(p))),Array.isArray(b==null?void 0:b.periodCanSpend)&&(f.periodCanSpend=b.periodCanSpend.map(p=>n.Coin.fromJSON(p))),(0,v.isSet)(b.periodReset)&&(f.periodReset=(0,v.fromJsonTimestamp)(b.periodReset)),f},toJSON(b){const f={};return b.basic!==void 0&&(f.basic=b.basic?e.BasicAllowance.toJSON(b.basic):void 0),b.period!==void 0&&(f.period=b.period?i.Duration.toJSON(b.period):void 0),b.periodSpendLimit?f.periodSpendLimit=b.periodSpendLimit.map(p=>p?n.Coin.toJSON(p):void 0):f.periodSpendLimit=[],b.periodCanSpend?f.periodCanSpend=b.periodCanSpend.map(p=>p?n.Coin.toJSON(p):void 0):f.periodCanSpend=[],b.periodReset!==void 0&&(f.periodReset=(0,v.fromTimestamp)(b.periodReset).toISOString()),f},fromPartial(b){var p,k;const f=C();return b.basic!==void 0&&b.basic!==null&&(f.basic=e.BasicAllowance.fromPartial(b.basic)),b.period!==void 0&&b.period!==null&&(f.period=i.Duration.fromPartial(b.period)),f.periodSpendLimit=((p=b.periodSpendLimit)==null?void 0:p.map(o=>n.Coin.fromPartial(o)))||[],f.periodCanSpend=((k=b.periodCanSpend)==null?void 0:k.map(o=>n.Coin.fromPartial(o)))||[],b.periodReset!==void 0&&b.periodReset!==null&&(f.periodReset=t.Timestamp.fromPartial(b.periodReset)),f}};function D(){return{allowance:void 0,allowedMessages:[]}}e.AllowedMsgAllowance={typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",encode(b,f=R.BinaryWriter.create()){b.allowance!==void 0&&u.Any.encode(b.allowance,f.uint32(10).fork()).ldelim();for(const p of b.allowedMessages)f.uint32(18).string(p);return f},decode(b,f){const p=b instanceof R.BinaryReader?b:new R.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=D();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.allowance=u.Any.decode(p,p.uint32());break;case 2:o.allowedMessages.push(p.string());break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=D();return(0,v.isSet)(b.allowance)&&(f.allowance=u.Any.fromJSON(b.allowance)),Array.isArray(b==null?void 0:b.allowedMessages)&&(f.allowedMessages=b.allowedMessages.map(p=>String(p))),f},toJSON(b){const f={};return b.allowance!==void 0&&(f.allowance=b.allowance?u.Any.toJSON(b.allowance):void 0),b.allowedMessages?f.allowedMessages=b.allowedMessages.map(p=>p):f.allowedMessages=[],f},fromPartial(b){var p;const f=D();return b.allowance!==void 0&&b.allowance!==null&&(f.allowance=u.Any.fromPartial(b.allowance)),f.allowedMessages=((p=b.allowedMessages)==null?void 0:p.map(k=>k))||[],f}}
3;function _(){return{granter:"",grantee:"",allowance:void 0}}e.Grant={typeUrl:"/cosmos.feegrant.v1beta1.Grant",encode(b,f=R.BinaryWriter.create()){return b.granter!==""&&f.uint32(10).string(b.granter),b.grantee!==""&&f.uint32(18).string(b.grantee),b.allowance!==void 0&&u.Any.encode(b.allowance,f.uint32(26).fork()).ldelim(),f},decode(b,f){const p=b instanceof R.BinaryReader?b:new R.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=_();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.granter=p.string();break;case 2:o.grantee=p.string();break;case 3:o.allowance=u.Any.decode(p,p.uint32());break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=_();return(0,v.isSet)(b.granter)&&(f.granter=String(b.granter)),(0,v.isSet)(b.grantee)&&(f.grantee=String(b.grantee)),(0,v.isSet)(b.allowance)&&(f.allowance=u.Any.fromJSON(b.allowance)),f},toJSON(b){const f={};return b.granter!==void 0&&(f.granter=b.granter),b.grantee!==void 0&&(f.grantee=b.grantee),b.allowance!==void 0&&(f.allowance=b.allowance?u.Any.toJSON(b.allowance):void 0),f},fromPartial(b){const f=_();return f.granter=b.granter??"",f.grantee=b.grantee??"",b.allowance!==void 0&&b.allowance!==null&&(f.allowance=u.Any.fromPartial(b.allowance)),f}}})(kl);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryAllowancesByGranterResponse=e.QueryAllowancesByGranterRequest=e.QueryAllowancesResponse=e.QueryAllowancesRequest=e.QueryAllowanceResponse=e.QueryAllowanceRequest=e.protobufPackage=void 0;const n=_e,t=kl,i=te,u=ee;e.protobufPackage="cosmos.feegrant.v1beta1";function R(){return{granter:"",grantee:""}}e.QueryAllowanceRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowanceRequest",encode(f,p=i.BinaryWriter.create()){return f.granter!==""&&p.uint32(10).string(f.granter),f.grantee!==""&&p.uint32(18).string(f.grantee),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=R();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.granter=k.string();break;case 2:s.grantee=k.string();break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=R();return(0,u.isSet)(f.granter)&&(p.granter=String(f.granter)),(0,u.isSet)(f.grantee)&&(p.grantee=String(f.grantee)),p},toJSON(f){const p={};return f.granter!==void 0&&(p.granter=f.granter),f.grantee!==void 0&&(p.grantee=f.grantee),p},fromPartial(f){const p=R();return p.granter=f.granter??"",p.grantee=f.grantee??"",p}};function v(){return{allowance:void 0}}e.QueryAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowanceResponse",encode(f,p=i.BinaryWriter.create()){return f.allowance!==void 0&&t.Grant.encode(f.allowance,p.uint32(10).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=v();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.allowance=t.Grant.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=v();return(0,u.isSet)(f.allowance)&&(p.allowance=t.Grant.fromJSON(f.allowance)),p},toJSON(f){const p={};return f.allowance!==void 0&&(p.allowance=f.allowance?t.Grant.toJSON(f.allowance):void 0),p},fromPartial(f){const p=v();return f.allowance!==void 0&&f.allowance!==null&&(p.allowance=t.Grant.fromPartial(f.allowance)),p}};function E(){return{grantee:"",pagination:void 0}}e.QueryAllowancesRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesRequest",encode(f,p=i.BinaryWriter.create()){return f.grantee!==""&&p.uint32(10).string(f.grantee),f.pagination!==void 0&&n.PageRequest.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=E();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.grantee=k.string();break;case 2:s.pagination=n.PageRequest.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=E();return(0,u.isSet)(f.grantee)&&(p.grantee=String(f.grantee)),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageRequest.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.grantee!==void 0&&(p.grantee=f.grantee),f.pagination!==void 0&&(p.pagination=f.pagination?n.PageRequest.toJSON(f.pagination):void 0),p},fromPartial(f){const p=E();return p.grantee=f.grantee??"",f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageRequest.fromPartial(f.pagination)),p}};function C(){return{allowances:[],pagination:void 0}}e.QueryAllowancesResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesResponse",encode(f,p=i.BinaryWriter.create()){for(const k of f.allowances)t.Grant.encode(k,p.uint32(10).fork()).ldelim();return f.pagination!==void 0&&n.PageResponse.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=C();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.allowances.push(t.Grant.decode(k,k.uint32()));break;case 2:s.pagination=n.PageResponse.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=C();return Array.isArray(f==null?void 0:f.allowances)&&(p.allowances=f.allowances.map(k=>
3t.Grant.fromJSON(k))),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageResponse.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.allowances?p.allowances=f.allowances.map(k=>k?t.Grant.toJSON(k):void 0):p.allowances=[],f.pagination!==void 0&&(p.pagination=f.pagination?n.PageResponse.toJSON(f.pagination):void 0),p},fromPartial(f){var k;const p=C();return p.allowances=((k=f.allowances)==null?void 0:k.map(o=>t.Grant.fromPartial(o)))||[],f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageResponse.fromPartial(f.pagination)),p}};function D(){return{granter:"",pagination:void 0}}e.QueryAllowancesByGranterRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest",encode(f,p=i.BinaryWriter.create()){return f.granter!==""&&p.uint32(10).string(f.granter),f.pagination!==void 0&&n.PageRequest.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=D();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.granter=k.string();break;case 2:s.pagination=n.PageRequest.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=D();return(0,u.isSet)(f.granter)&&(p.granter=String(f.granter)),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageRequest.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.granter!==void 0&&(p.granter=f.granter),f.pagination!==void 0&&(p.pagination=f.pagination?n.PageRequest.toJSON(f.pagination):void 0),p},fromPartial(f){const p=D();return p.granter=f.granter??"",f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageRequest.fromPartial(f.pagination)),p}};function _(){return{allowances:[],pagination:void 0}}e.QueryAllowancesByGranterResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse",encode(f,p=i.BinaryWriter.create()){for(const k of f.allowances)t.Grant.encode(k,p.uint32(10).fork()).ldelim();return f.pagination!==void 0&&n.PageResponse.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=_();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.allowances.push(t.Grant.decode(k,k.uint32()));break;case 2:s.pagination=n.PageResponse.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=_();return Array.isArray(f==null?void 0:f.allowances)&&(p.allowances=f.allowances.map(k=>t.Grant.fromJSON(k))),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageResponse.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.allowances?p.allowances=f.allowances.map(k=>k?t.Grant.toJSON(k):void 0):p.allowances=[],f.pagination!==void 0&&(p.pagination=f.pagination?n.PageResponse.toJSON(f.pagination):void 0),p},fromPartial(f){var k;const p=_();return p.allowances=((k=f.allowances)==null?void 0:k.map(o=>t.Grant.fromPartial(o)))||[],f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageResponse.fromPartial(f.pagination)),p}};class b{constructor(p){this.rpc=p,this.Allowance=this.Allowance.bind(this),this.Allowances=this.Allowances.bind(this),this.AllowancesByGranter=this.AllowancesByGranter.bind(this)}Allowance(p){const k=e.QueryAllowanceRequest.encode(p).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","Allowance",k).then(s=>e.QueryAllowanceResponse.decode(new i.BinaryReader(s)))}Allowances(p){const k=e.QueryAllowancesRequest.encode(p).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","Allowances",k).then(s=>e.QueryAllowancesResponse.decode(new i.BinaryReader(s)))}AllowancesByGranter(p){const k=e.QueryAllowancesByGranterRequest.encode(p).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","AllowancesByGranter",k).then(s=>e.QueryAllowancesByGranterResponse.decode(new i.BinaryReader(s)))}}e.QueryClientImpl=b})(Sl);Object.defineProperty(la,"__esModule",{value:!0});la.setupFeegrantExtension=void 0;const Zh=Sl,pc=Ke;function Yh(e){const n=(0,pc.createProtobufRpcClient)(e),t=new Zh.QueryClientImpl(n);return{feegrant:{allowance:async(i,u)=>await t.Allowance({granter:i,grantee:u}),allowances:async(i,u)=>await t.Allowances({grantee:i,pagination:(0,pc.createPagination)(u)})}}}la.setupFeegrantExtension=Yh;var kn={},fa={};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TallyParams=e.VotingParams=e.DepositParams=e.Vote=e.TallyResult=e.Proposal=e.Deposit=e.TextProposal=e.WeightedVoteOption=e.proposalStatusToJSON=e.proposalStatusFromJSON=e.ProposalStatus=e.voteOptionToJSON=e.voteOptionFromJSON=e.VoteOption=e.protobufPackage=void 0;const n=ve,t=Re,i=Me,u=ln,R=te,v=ee;e.protobufPackage="cosmos.gov.v1beta1";var E;(function(r){r[r.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",r[r.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",r[r.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",r[r.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",r[r.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",r[r.UNRECOGNIZED=-1]="UNRECOGNIZED"})(E||(e.VoteOption=E={}));function C(r){switch(r){case 0:case"VOTE_OPTION_UNSPECIFIED":return E.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return E.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return E.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return E.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return E.VOTE_OPTION_NO_WITH_VETO;case-1:case"UNRECOGNIZED":default:return E.UNRECOGNIZED}}e.voteOptionFromJSON=C;function D(r){switch(r){case E.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case E.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case E.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case E.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case E.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case E.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.voteOptionToJSON=D;var _;(function(r){r[r.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",r[r.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",r[r.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",r[r.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",r[r.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",r[r.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",r[r.UNRECOGNIZED=-1]="UNRECOGNIZED"})(_||(e.ProposalStatus=_={}));function b(r){switch(r){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return _.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return _.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return _.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return _.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return _.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return _.PROPOSAL_STATUS_FAILED;case-1:case"UNRECOGNIZED":default:return _.UNRECOGNIZED}}e.proposalStatusFromJSON=b;function f(r){switch(r){case _.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case _.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case _.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case _.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case _.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case _.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";case _.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.proposalStatusToJSON=f;function p(){return{option:0,weight:""}}e.WeightedVoteOption={typeUrl:"/cosmos.gov.v1beta1.WeightedVoteOption",encode(r,m=R.BinaryWriter.create()){return r.option!==0&&m.uint32(8).int32(r.option),r.weight!==""&&m.uint32(18).string(r.weight),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=p();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.option=N.int32();break;case 2:d.weight=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=p();return(0,v.isSet)(r.option)&&(m.option=C(r.option)),(0,v.isSet)(r.weight)&&(m.weight=String(r.weight)),m},toJSON(r){const m={};return r.option!==void 0&&(m.option=D(r.option)),r.weight!==void 0&&(m.weight=r.weight),m},fromPartial(r){const m=p();return m.option=r.option??0,m.weight=r.weight??"",m}};function k(){return{title:"",description:""}}e.TextProposal={typeUrl:"/cosmos.gov.v1beta1.TextProposal",encode(r,m=R.BinaryWriter.create()){return r.title!==""&&m.uint32(10).string(r.title),r.description!==""&&m.uint32(18).string(r.description),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=k();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.title=N.string();break;case 2:d.description=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=k();return(0,v.isSet)(r.title)&&(m.title=String(r.title)),(0,v.isSet)(r.description)&&(m.description=String(r.description)),m},toJSON(r){const m={};return r.title!==void 0&&(m.title=r.title),r.description!==void 0&&(m.description=r.description),m},fromPartial(r){const m=k();return m.title=r.title??"",m.description=r.description??"",m}};function o(){return{proposalId:BigInt(0),depositor:"",amount:[]}}e.Deposit={typeUrl:"/cosmos.gov.v1beta1.Deposit",encode(r,m=R.BinaryWriter.create()){r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.depositor!==""&&m.uint32(18).string(r.depositor);for(const N of r.amount)n.Coin.encode(N,m.uint32(26).fork()).ldelim();return m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=o();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.depositor=N.string();break;case 3:d.amount.push(n.Coin.decode(N,N.uint32()));break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=o();return(0,v.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,v.isSet)(r.depositor)&&(m.depositor=String(r.depositor)),Array.isArray(r==null?void 0:r.amount)&&(m.amount=r.amount.map(N=>n.Coin.fromJSON(N))),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.depositor!==void 0&&(m.depositor=r.depositor),r.amount?m.amount=r.amount.map(N=>N?n.Coin.toJSON(N):void 0):m.amount=[],m},fromPartial(r){var N;const m=o();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),m.depositor=r.depositor??"",m.amount=((N=r.amount)==null?void 0:N.map(V=>n.Coin.fromPartial(V)))||[],m}};function s(){return{proposalId:BigInt(0),content:void 0,status:0,finalTallyResult:e.TallyResult.fromPartial({}),submitTime:i.Timestamp.fromPartial({}),depositEndTime:i.Timestamp.fromPartial({}),totalDeposit:[],votingStartTime:i.Timestamp.fromPartial({}),votingEndTime:i.Timestamp.fromPartial({})}}e.Proposal={typeUrl:"/cosmos.gov.v1beta1.Proposal",encode(r,m=R.BinaryWriter.create()){r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.content!==void 0&&t.Any.encode(r.content,m.uint32(18).fork()).ldelim(),r.status!==0&&m.uint32(24).int32(r.status),r.finalTallyResult!==void 0&&e.TallyResult.encode(r.finalTallyResult,m.uint32(34).fork()).ldelim(),r.submitTime!==void 0&&i.Timestamp.encode(r.submitTime,m.uint32(42).fork()).ldelim(),r.depositEndTime!==void 0&&i.Timestamp.encode(r.depositEndTime,m.uint32(50).fork()).ldelim();for(const N of r.totalDeposit)n.Coin.encode(N,m.uint32(58).fork()).ldelim();return r.votingStartTime!==void 0&&i.Timestamp.encode(r.votingStartTime,m.uint32(66).fork()).ldelim(),r.votingEndTime!==void 0&&i.Timestamp.encode(r.votingEndTime,m.uint32(74).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=s();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.content=t.Any.decode(N,N.uint32());break;case 3:d.status=N.int32();break;case 4:d.finalTallyResult=e.TallyResult.decode(N,N.uint32());break;case 5:d.submitTime=i.Timestamp.decode(N,N.uint32());break;case 6:d.depositEndTime=i.Timestamp.decode(N,N.uint32());break;case 7:d.totalDeposit.push(n.Coin.decode(N,N.uint32()));break;case 8:d.votingStartTime=i.Timestamp.decode(N,N.uint32());break;case 9:d.votingEndTime=i.Timestamp.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=s();return(0,v.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,v.isSet)(r.content)&&(m.content=t.Any.fromJSON(r.content)),(0,v.isSet)(r.status)&&(m.status=b(r.status)),(0,v.isSet)(r.finalTallyResult)&&(m.finalTallyResult=e.TallyResult.fromJSON(r.finalTallyResult)),(0,v.isSet)(r.submitTime)&&(m.submitTime=(0,v.fromJsonTimestamp)(r.submitTime)),(0,v.isSet)(r.depositEndTime)&&(m.depositEndTime=(0,v.fromJsonTimestamp)(r.depositEndTime)),Array.isArray(r==null?void 0:r.totalDeposit)&&(m.totalDeposit=r.totalDeposit.map(N=>n.Coin.fromJSON(N))),(0,v.isSet)(r.votingStartTime)&&(m.votingStartTime=(0,v.fromJsonTimestamp)(r.votingStartTime)),(0,v.isSet)(r.votingEndTime)&&(m.votingEndTime=(0,v.fromJsonTimestamp)(r.votingEndTime)),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.content!==void 0&&(m.content=r.content?t.Any.toJSON(r.content):void 0),r.status!==void 0&&(m.status=f(r.status)),r.finalTallyResult!==void 0&&(m.finalTallyResult=r.finalTallyResult?e.TallyResult.toJSON(r.finalTallyResult):void 0),r.submitTime!==void 0&&(m.submitTime=(0,v.fromTimestamp)(r.submitTime).toISOString()),r.depositEndTime!==void 0&&(m.depositEndTime=(0,v.fromTimestamp)(r.depositEndTime).toISOString()),r.totalDeposit?m.totalDeposit=r.totalDeposit.map(N=>N?n.Coin.toJSON(N):void 0):m.totalDeposit=[],r.votingStartTime!==void 0&&(m.votingStartTime=(0,v.fromTimestamp)(r.votingStartTime).toISOString()),r.votingEndTime!==void 0&&(m.votingEndTime=(0,v.fromTimestamp)(r.votingEndTime).toISOString()),m},fromPartial(r){var N;const m=s();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),r.content!==void 0&&r.content!==null&&(m.content=t.Any.fromPartial(r.content)),m.status=r.status??0,r.finalTallyResult!==void 0&&r.finalTallyResult!==null&&(m.finalTallyResult=e.TallyResult.fromPartial(r.finalTallyResult)),r.submitTime!==void 0&&r.submitTime!==null&&(m.submitTime=i.Timestamp.fromPartial(r.submitTime)),r.depositEndTime!==void 0&&r.depositEndTime!==null&&(m.depositEndTime=i.Timestamp.fromPartial(r.depositEndTime)),m.totalDeposit=((N=r.totalDeposit)==null?void 0:N.map(V=>n.Coin.fromPartial(V)))||[],r.votingStartTime!==void 0&&r.votingStartTime!==null&&(m.votingStartTime=i.Timestamp.fromPartial(r.votingStartTime)),r.votingEndTime!==void 0&&r.votingEndTime!==null&&(m.votingEndTime=i.Timestamp.fromPartial(r.votingEndTime)),m}};function y(){return{yes:"",abstain:"",no:"",noWithVeto:""}}e.TallyResult={typeUrl:"/cosmos.gov.v1beta1.TallyResult",encode(r,m=R.BinaryWriter.create()){return r.yes!==""&&m.uint32(10).string(r.yes),r.abstain!==""&&m.uint32(18).string(r.abstain),r.no!==""&&m.uint32(26).string(r.no),r.noWithVeto!==""&&m.uint32(34).string(r.noWithVeto),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=y();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.yes=N.string();break;case 2:d.abstain=N.string();break;case 3:d.no=N.string();break;case 4:d.noWithVeto=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=y();return(0,v.isSet)(r.yes)&&(m.yes=String(r.yes)),(0,v.isSet)(r.abstain)&&(m.abstain=String(r.abstain)),(0,v.isSet)(r.no)&&(m.no=String(r.no)),(0,v.isSet)(r.noWithVeto)&&(m.noWithVeto=String(r.noWithVeto)),m},toJSON(r){const m={};return r.yes!==void 0&&(m.yes=r.yes),r.abstain!==void 0&&(m.abstain=r.abstain),r.no!==void 0&&(m.no=r.no),r.noWithVeto!==void 0&&(m.noWithVeto=r.noWithVeto),m},fromPartial(r){const m=y();
3return m.yes=r.yes??"",m.abstain=r.abstain??"",m.no=r.no??"",m.noWithVeto=r.noWithVeto??"",m}};function w(){return{proposalId:BigInt(0),voter:"",option:0,options:[]}}e.Vote={typeUrl:"/cosmos.gov.v1beta1.Vote",encode(r,m=R.BinaryWriter.create()){r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.voter!==""&&m.uint32(18).string(r.voter),r.option!==0&&m.uint32(24).int32(r.option);for(const N of r.options)e.WeightedVoteOption.encode(N,m.uint32(34).fork()).ldelim();return m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=w();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.voter=N.string();break;case 3:d.option=N.int32();break;case 4:d.options.push(e.WeightedVoteOption.decode(N,N.uint32()));break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=w();return(0,v.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,v.isSet)(r.voter)&&(m.voter=String(r.voter)),(0,v.isSet)(r.option)&&(m.option=C(r.option)),Array.isArray(r==null?void 0:r.options)&&(m.options=r.options.map(N=>e.WeightedVoteOption.fromJSON(N))),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.voter!==void 0&&(m.voter=r.voter),r.option!==void 0&&(m.option=D(r.option)),r.options?m.options=r.options.map(N=>N?e.WeightedVoteOption.toJSON(N):void 0):m.options=[],m},fromPartial(r){var N;const m=w();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),m.voter=r.voter??"",m.option=r.option??0,m.options=((N=r.options)==null?void 0:N.map(V=>e.WeightedVoteOption.fromPartial(V)))||[],m}};function J(){return{minDeposit:[],maxDepositPeriod:u.Duration.fromPartial({})}}e.DepositParams={typeUrl:"/cosmos.gov.v1beta1.DepositParams",encode(r,m=R.BinaryWriter.create()){for(const N of r.minDeposit)n.Coin.encode(N,m.uint32(10).fork()).ldelim();return r.maxDepositPeriod!==void 0&&u.Duration.encode(r.maxDepositPeriod,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=J();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.minDeposit.push(n.Coin.decode(N,N.uint32()));break;case 2:d.maxDepositPeriod=u.Duration.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=J();return Array.isArray(r==null?void 0:r.minDeposit)&&(m.minDeposit=r.minDeposit.map(N=>n.Coin.fromJSON(N))),(0,v.isSet)(r.maxDepositPeriod)&&(m.maxDepositPeriod=u.Duration.fromJSON(r.maxDepositPeriod)),m},toJSON(r){const m={};return r.minDeposit?m.minDeposit=r.minDeposit.map(N=>N?n.Coin.toJSON(N):void 0):m.minDeposit=[],r.maxDepositPeriod!==void 0&&(m.maxDepositPeriod=r.maxDepositPeriod?u.Duration.toJSON(r.maxDepositPeriod):void 0),m},fromPartial(r){var N;const m=J();return m.minDeposit=((N=r.minDeposit)==null?void 0:N.map(V=>n.Coin.fromPartial(V)))||[],r.maxDepositPeriod!==void 0&&r.maxDepositPeriod!==null&&(m.maxDepositPeriod=u.Duration.fromPartial(r.maxDepositPeriod)),m}};function P(){return{votingPeriod:u.Duration.fromPartial({})}}e.VotingParams={typeUrl:"/cosmos.gov.v1beta1.VotingParams",encode(r,m=R.BinaryWriter.create()){return r.votingPeriod!==void 0&&u.Duration.encode(r.votingPeriod,m.uint32(10).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=P();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.votingPeriod=u.Duration.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=P();return(0,v.isSet)(r.votingPeriod)&&(m.votingPeriod=u.Duration.fromJSON(r.votingPeriod)),m},toJSON(r){const m={};return r.votingPeriod!==void 0&&(m.votingPeriod=r.votingPeriod?u.Duration.toJSON(r.votingPeriod):void 0),m},fromPartial(r){const m=P();return r.votingPeriod!==void 0&&r.votingPeriod!==null&&(m.votingPeriod=u.Duration.fromPartial(r.votingPeriod)),m}};function U(){return{quorum:new Uint8Array,threshold:new Uint8Array,vetoThreshold:new Uint8Array}}e.TallyParams={typeUrl:"/cosmos.gov.v1beta1.TallyParams",encode(r,m=R.BinaryWriter.create()){return r.quorum.length!==0&&m.uint32(10).bytes(r.quorum),r.threshold.length!==0&&m.uint32(18).bytes(r.threshold),r.vetoThreshold.length!==0&&m.uint32(26).bytes(r.vetoThreshold),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=U();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.quorum=N.bytes();break;case 2:d.threshold=N.bytes();break;case 3:d.vetoThreshold=N.bytes();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=U();return(0,v.isSet)(r.quorum)&&(m.quorum=(0,v.bytesFromBase64)(r.quorum)),(0,v.isSet)(r.threshold)&&(m.threshold=(0,v.bytesFromBase64)(r.threshold)),(0,v.isSet)(r.vetoThreshold)&&(m.vetoThreshold=(0,v.bytesFromBase64)(r.vetoThreshold)),m},toJSON(r){const m={};return r.quorum!==void 0&&(m.quorum=(0,v.base64FromBytes)(r.quorum!==void 0?r.quorum:new Uint8Array)),r.threshold!==void 0&&(m.threshold=(0,v.base64FromBytes)(r.threshold!==void 0?r.threshold:new Uint8Array)),r.vetoThreshold!==void 0&&(m.vetoThreshold=(0,v.base64FromBytes)(r.vetoThreshold!==void 0?r.vetoThreshold:new Uint8Array)),m},fromPartial(r){const m=U();return m.quorum=r.quorum??new Uint8Array,m.threshold=r.threshold??new Uint8Array,m.vetoThreshold=r.vetoThreshold??new Uint8Array,m}}})(fa);Object.defineProperty(kn,"__esModule",{value:!0});kn.createGovAminoConverters=kn.isAminoMsgDeposit=kn.isAminoMsgVoteWeighted=kn.isAminoMsgVote=kn.isAminoMsgSubmitProposal=void 0;const Xh=Cn,mi=$e,yi=fa,xh=Re,jh=Ke;function eg(e){return e.type==="cosmos-sdk/MsgSubmitProposal"}kn.isAminoMsgSubmitProposal=eg;function ng(e){return e.type==="cosmos-sdk/MsgVote"}kn.isAminoMsgVote=ng;function tg(e){return e.type==="cosmos-sdk/MsgVoteWeighted"}kn.isAminoMsgVoteWeighted=tg;function rg(e){return e.type==="cosmos-sdk/MsgDeposit"}kn.isAminoMsgDeposit=rg;function ig(){return{"/cosmos.gov.v1beta1.MsgDeposit":{aminoType:"cosmos-sdk/MsgDeposit",toAmino:({amount:e,depositor:n,proposalId:t})=>({amount:e,depositor:n,proposal_id:t.toString()}),fromAmino:({amount:e,depositor:n,proposal_id:t})=>({amount:Array.from(e),depositor:n,proposalId:BigInt(t)})},"/cosmos.gov.v1beta1.MsgVote":{aminoType:"cosmos-sdk/MsgVote",toAmino:({option:e,proposalId:n,voter:t})=>({option:e,proposal_id:n.toString(),voter:t}),fromAmino:({option:e,proposal_id:n,voter:t})=>({option:(0,yi.voteOptionFromJSON)(e),proposalId:BigInt(n),voter:t})},"/cosmos.gov.v1beta1.MsgVoteWeighted":{aminoType:"cosmos-sdk/MsgVoteWeighted",toAmino:({options:e,proposalId:n,voter:t})=>({options:e.map(i=>({option:i.option,weight:(0,jh.decodeCosmosSdkDecFromProto)(i.weight).toString().padEnd(20,"0")})),proposal_id:n.toString(),voter:t}),fromAmino:({options:e,proposal_id:n,voter:t})=>({proposalId:BigInt(n),voter:t,options:e.map(i=>({option:(0,yi.voteOptionFromJSON)(i.option),weight:Xh.Decimal.fromUserInput(i.weight,18).atomics}))})},"/cosmos.gov.v1beta1.MsgSubmitProposal":{aminoType:"cosmos-sdk/MsgSubmitProposal",toAmino:({initialDeposit:e,proposer:n,content:t})=>{(0,mi.assertDefinedAndNotNull)(t);let i;switch(t.typeUrl){case"/cosmos.gov.v1beta1.TextProposal":{const u=yi.TextProposal.decode(t.value);i={type:"cosmos-sdk/TextProposal",value:{description:u.description,title:u.title}};break}default:throw new Error(`Unsupported proposal type: '${t.typeUrl}'`)}return{initial_deposit:e,proposer:n,content:i}},fromAmino:({initial_deposit:e,proposer:n,content:t})=>{let i;switch(t.type){case"cosmos-sdk/TextProposal":{const{value:u}=t;(0,mi.assert)((0,mi.isNonNullObject)(u));const{title:R,description:v}=u;
3(0,mi.assert)(typeof R=="string"),(0,mi.assert)(typeof v=="string"),i=xh.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:yi.TextProposal.encode(yi.TextProposal.fromPartial({title:R,description:v})).finish()});break}default:throw new Error(`Unsupported proposal type: '${t.type}'`)}return{initialDeposit:Array.from(e),proposer:n,content:i}}}}}kn.createGovAminoConverters=ig;var Pn={},Pl={},Rl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Params=e.TallyParams=e.VotingParams=e.DepositParams=e.Vote=e.TallyResult=e.Proposal=e.Deposit=e.WeightedVoteOption=e.proposalStatusToJSON=e.proposalStatusFromJSON=e.ProposalStatus=e.voteOptionToJSON=e.voteOptionFromJSON=e.VoteOption=e.protobufPackage=void 0;const n=ve,t=Re,i=Me,u=ln,R=te,v=ee;e.protobufPackage="cosmos.gov.v1";var E;(function(r){r[r.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",r[r.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",r[r.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",r[r.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",r[r.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",r[r.UNRECOGNIZED=-1]="UNRECOGNIZED"})(E||(e.VoteOption=E={}));function C(r){switch(r){case 0:case"VOTE_OPTION_UNSPECIFIED":return E.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return E.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return E.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return E.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return E.VOTE_OPTION_NO_WITH_VETO;case-1:case"UNRECOGNIZED":default:return E.UNRECOGNIZED}}e.voteOptionFromJSON=C;function D(r){switch(r){case E.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case E.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case E.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case E.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case E.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case E.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.voteOptionToJSON=D;var _;(function(r){r[r.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",r[r.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",r[r.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",r[r.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",r[r.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",r[r.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",r[r.UNRECOGNIZED=-1]="UNRECOGNIZED"})(_||(e.ProposalStatus=_={}));function b(r){switch(r){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return _.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return _.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return _.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return _.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return _.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return _.PROPOSAL_STATUS_FAILED;case-1:case"UNRECOGNIZED":default:return _.UNRECOGNIZED}}e.proposalStatusFromJSON=b;function f(r){switch(r){case _.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case _.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case _.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case _.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case _.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case _.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";case _.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.proposalStatusToJSON=f;function p(){return{option:0,weight:""}}e.WeightedVoteOption={typeUrl:"/cosmos.gov.v1.WeightedVoteOption",encode(r,m=R.BinaryWriter.create()){return r.option!==0&&m.uint32(8).int32(r.option),r.weight!==""&&m.uint32(18).string(r.weight),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=p();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.option=N.int32();break;case 2:d.weight=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=p();return(0,v.isSet)(r.option)&&(m.option=C(r.option)),(0,v.isSet)(r.weight)&&(m.weight=String(r.weight)),m},toJSON(r){const m={};return r.option!==void 0&&(m.option=D(r.option)),r.weight!==void 0&&(m.weight=r.weight),m},fromPartial(r){const m=p();return m.option=r.option??0,m.weight=r.weight??"",m}};function k(){return{proposalId:BigInt(0),depositor:"",amount:[]}}e.Deposit={typeUrl:"/cosmos.gov.v1.Deposit",encode(r,m=R.BinaryWriter.create()){r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.depositor!==""&&m.uint32(18).string(r.depositor);for(const N of r.amount)n.Coin.encode(N,m.uint32(26).fork()).ldelim();return m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=k();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.depositor=N.string();break;case 3:d.amount.push(n.Coin.decode(N,N.uint32()));break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=k();return(0,v.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,v.isSet)(r.depositor)&&(m.depositor=String(r.depositor)),Array.isArray(r==null?void 0:r.amount)&&(m.amount=r.amount.map(N=>n.Coin.fromJSON(N))),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.depositor!==void 0&&(m.depositor=r.depositor),r.amount?m.amount=r.amount.map(N=>N?n.Coin.toJSON(N):void 0):m.amount=[],m},fromPartial(r){var N;const m=k();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),m.depositor=r.depositor??"",m.amount=((N=r.amount)==null?void 0:N.map(V=>n.Coin.fromPartial(V)))||[],m}};function o(){return{id:BigInt(0),messages:[],status:0,finalTallyResult:void 0,submitTime:void 0,depositEndTime:void 0,totalDeposit:[],votingStartTime:void 0,votingEndTime:void 0,metadata:"",title:"",summary:"",proposer:""}}e.Proposal={typeUrl:"/cosmos.gov.v1.Proposal",encode(r,m=R.BinaryWriter.create()){r.id!==BigInt(0)&&m.uint32(8).uint64(r.id);for(const N of r.messages)t.Any.encode(N,m.uint32(18).fork()).ldelim();r.status!==0&&m.uint32(24).int32(r.status),r.finalTallyResult!==void 0&&e.TallyResult.encode(r.finalTallyResult,m.uint32(34).fork()).ldelim(),r.submitTime!==void 0&&i.Timestamp.encode(r.submitTime,m.uint32(42).fork()).ldelim(),r.depositEndTime!==void 0&&i.Timestamp.encode(r.depositEndTime,m.uint32(50).fork()).ldelim();for(const N of r.totalDeposit)n.Coin.encode(N,m.uint32(58).fork()).ldelim();return r.votingStartTime!==void 0&&i.Timestamp.encode(r.votingStartTime,m.uint32(66).fork()).ldelim(),r.votingEndTime!==void 0&&i.Timestamp.encode(r.votingEndTime,m.uint32(74).fork()).ldelim(),r.metadata!==""&&m.uint32(82).string(r.metadata),r.title!==""&&m.uint32(90).string(r.title),r.summary!==""&&m.uint32(98).string(r.summary),r.proposer!==""&&m.uint32(106).string(r.proposer),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=o();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.id=N.uint64();break;case 2:d.messages.push(t.Any.decode(N,N.uint32()));break;case 3:d.status=N.int32();break;case 4:d.finalTallyResult=e.TallyResult.decode(N,N.uint32());break;case 5:d.submitTime=i.Timestamp.decode(N,N.uint32());break;case 6:d.depositEndTime=i.Timestamp.decode(N,N.uint32());break;case 7:d.totalDeposit.push(n.Coin.decode(N,N.uint32()));break;case 8:d.votingStartTime=i.Timestamp.decode(N,N.uint32());break;case 9:d.votingEndTime=i.Timestamp.decode(N,N.uint32());break;case 10:d.metadata=N.string();break;case 11:d.title=N.string();break;case 12:d.summary=N.string();break;case 13:d.proposer=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=o();
3return(0,v.isSet)(r.id)&&(m.id=BigInt(r.id.toString())),Array.isArray(r==null?void 0:r.messages)&&(m.messages=r.messages.map(N=>t.Any.fromJSON(N))),(0,v.isSet)(r.status)&&(m.status=b(r.status)),(0,v.isSet)(r.finalTallyResult)&&(m.finalTallyResult=e.TallyResult.fromJSON(r.finalTallyResult)),(0,v.isSet)(r.submitTime)&&(m.submitTime=(0,v.fromJsonTimestamp)(r.submitTime)),(0,v.isSet)(r.depositEndTime)&&(m.depositEndTime=(0,v.fromJsonTimestamp)(r.depositEndTime)),Array.isArray(r==null?void 0:r.totalDeposit)&&(m.totalDeposit=r.totalDeposit.map(N=>n.Coin.fromJSON(N))),(0,v.isSet)(r.votingStartTime)&&(m.votingStartTime=(0,v.fromJsonTimestamp)(r.votingStartTime)),(0,v.isSet)(r.votingEndTime)&&(m.votingEndTime=(0,v.fromJsonTimestamp)(r.votingEndTime)),(0,v.isSet)(r.metadata)&&(m.metadata=String(r.metadata)),(0,v.isSet)(r.title)&&(m.title=String(r.title)),(0,v.isSet)(r.summary)&&(m.summary=String(r.summary)),(0,v.isSet)(r.proposer)&&(m.proposer=String(r.proposer)),m},toJSON(r){const m={};return r.id!==void 0&&(m.id=(r.id||BigInt(0)).toString()),r.messages?m.messages=r.messages.map(N=>N?t.Any.toJSON(N):void 0):m.messages=[],r.status!==void 0&&(m.status=f(r.status)),r.finalTallyResult!==void 0&&(m.finalTallyResult=r.finalTallyResult?e.TallyResult.toJSON(r.finalTallyResult):void 0),r.submitTime!==void 0&&(m.submitTime=(0,v.fromTimestamp)(r.submitTime).toISOString()),r.depositEndTime!==void 0&&(m.depositEndTime=(0,v.fromTimestamp)(r.depositEndTime).toISOString()),r.totalDeposit?m.totalDeposit=r.totalDeposit.map(N=>N?n.Coin.toJSON(N):void 0):m.totalDeposit=[],r.votingStartTime!==void 0&&(m.votingStartTime=(0,v.fromTimestamp)(r.votingStartTime).toISOString()),r.votingEndTime!==void 0&&(m.votingEndTime=(0,v.fromTimestamp)(r.votingEndTime).toISOString()),r.metadata!==void 0&&(m.metadata=r.metadata),r.title!==void 0&&(m.title=r.title),r.summary!==void 0&&(m.summary=r.summary),r.proposer!==void 0&&(m.proposer=r.proposer),m},fromPartial(r){var N,V;const m=o();return r.id!==void 0&&r.id!==null&&(m.id=BigInt(r.id.toString())),m.messages=((N=r.messages)==null?void 0:N.map(d=>t.Any.fromPartial(d)))||[],m.status=r.status??0,r.finalTallyResult!==void 0&&r.finalTallyResult!==null&&(m.finalTallyResult=e.TallyResult.fromPartial(r.finalTallyResult)),r.submitTime!==void 0&&r.submitTime!==null&&(m.submitTime=i.Timestamp.fromPartial(r.submitTime)),r.depositEndTime!==void 0&&r.depositEndTime!==null&&(m.depositEndTime=i.Timestamp.fromPartial(r.depositEndTime)),m.totalDeposit=((V=r.totalDeposit)==null?void 0:V.map(d=>n.Coin.fromPartial(d)))||[],r.votingStartTime!==void 0&&r.votingStartTime!==null&&(m.votingStartTime=i.Timestamp.fromPartial(r.votingStartTime)),r.votingEndTime!==void 0&&r.votingEndTime!==null&&(m.votingEndTime=i.Timestamp.fromPartial(r.votingEndTime)),m.metadata=r.metadata??"",m.title=r.title??"",m.summary=r.summary??"",m.proposer=r.proposer??"",m}};function s(){return{yesCount:"",abstainCount:"",noCount:"",noWithVetoCount:""}}e.TallyResult={typeUrl:"/cosmos.gov.v1.TallyResult",encode(r,m=R.BinaryWriter.create()){return r.yesCount!==""&&m.uint32(10).string(r.yesCount),r.abstainCount!==""&&m.uint32(18).string(r.abstainCount),r.noCount!==""&&m.uint32(26).string(r.noCount),r.noWithVetoCount!==""&&m.uint32(34).string(r.noWithVetoCount),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=s();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.yesCount=N.string();break;case 2:d.abstainCount=N.string();break;case 3:d.noCount=N.string();break;case 4:d.noWithVetoCount=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=s();return(0,v.isSet)(r.yesCount)&&(m.yesCount=String(r.yesCount)),(0,v.isSet)(r.abstainCount)&&(m.abstainCount=String(r.abstainCount)),(0,v.isSet)(r.noCount)&&(m.noCount=String(r.noCount)),(0,v.isSet)(r.noWithVetoCount)&&(m.noWithVetoCount=String(r.noWithVetoCount)),m},toJSON(r){const m={};return r.yesCount!==void 0&&(m.yesCount=r.yesCount),r.abstainCount!==void 0&&(m.abstainCount=r.abstainCount),r.noCount!==void 0&&(m.noCount=r.noCount),r.noWithVetoCount!==void 0&&(m.noWithVetoCount=r.noWithVetoCount),m},fromPartial(r){const m=s();return m.yesCount=r.yesCount??"",m.abstainCount=r.abstainCount??"",m.noCount=r.noCount??"",m.noWithVetoCount=r.noWithVetoCount??"",m}};function y(){return{proposalId:BigInt(0),voter:"",options:[],metadata:""}}e.Vote={typeUrl:"/cosmos.gov.v1.Vote",encode(r,m=R.BinaryWriter.create()){r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.voter!==""&&m.uint32(18).string(r.voter);for(const N of r.options)e.WeightedVoteOption.encode(N,m.uint32(34).fork()).ldelim();return r.metadata!==""&&m.uint32(42).string(r.metadata),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=y();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.voter=N.string();break;case 4:d.options.push(e.WeightedVoteOption.decode(N,N.uint32()));break;case 5:d.metadata=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=y();return(0,v.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,v.isSet)(r.voter)&&(m.voter=String(r.voter)),Array.isArray(r==null?void 0:r.options)&&(m.options=r.options.map(N=>e.WeightedVoteOption.fromJSON(N))),(0,v.isSet)(r.metadata)&&(m.metadata=String(r.metadata)),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.voter!==void 0&&(m.voter=r.voter),r.options?m.options=r.options.map(N=>N?e.WeightedVoteOption.toJSON(N):void 0):m.options=[],r.metadata!==void 0&&(m.metadata=r.metadata),m},fromPartial(r){var N;const m=y();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),m.voter=r.voter??"",m.options=((N=r.options)==null?void 0:N.map(V=>e.WeightedVoteOption.fromPartial(V)))||[],m.metadata=r.metadata??"",m}};function w(){return{minDeposit:[],maxDepositPeriod:void 0}}e.DepositParams={typeUrl:"/cosmos.gov.v1.DepositParams",encode(r,m=R.BinaryWriter.create()){for(const N of r.minDeposit)n.Coin.encode(N,m.uint32(10).fork()).ldelim();return r.maxDepositPeriod!==void 0&&u.Duration.encode(r.maxDepositPeriod,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=w();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.minDeposit.push(n.Coin.decode(N,N.uint32()));break;case 2:d.maxDepositPeriod=u.Duration.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=w();return Array.isArray(r==null?void 0:r.minDeposit)&&(m.minDeposit=r.minDeposit.map(N=>
3n.Coin.fromJSON(N))),(0,v.isSet)(r.maxDepositPeriod)&&(m.maxDepositPeriod=u.Duration.fromJSON(r.maxDepositPeriod)),m},toJSON(r){const m={};return r.minDeposit?m.minDeposit=r.minDeposit.map(N=>N?n.Coin.toJSON(N):void 0):m.minDeposit=[],r.maxDepositPeriod!==void 0&&(m.maxDepositPeriod=r.maxDepositPeriod?u.Duration.toJSON(r.maxDepositPeriod):void 0),m},fromPartial(r){var N;const m=w();return m.minDeposit=((N=r.minDeposit)==null?void 0:N.map(V=>n.Coin.fromPartial(V)))||[],r.maxDepositPeriod!==void 0&&r.maxDepositPeriod!==null&&(m.maxDepositPeriod=u.Duration.fromPartial(r.maxDepositPeriod)),m}};function J(){return{votingPeriod:void 0}}e.VotingParams={typeUrl:"/cosmos.gov.v1.VotingParams",encode(r,m=R.BinaryWriter.create()){return r.votingPeriod!==void 0&&u.Duration.encode(r.votingPeriod,m.uint32(10).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=J();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.votingPeriod=u.Duration.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=J();return(0,v.isSet)(r.votingPeriod)&&(m.votingPeriod=u.Duration.fromJSON(r.votingPeriod)),m},toJSON(r){const m={};return r.votingPeriod!==void 0&&(m.votingPeriod=r.votingPeriod?u.Duration.toJSON(r.votingPeriod):void 0),m},fromPartial(r){const m=J();return r.votingPeriod!==void 0&&r.votingPeriod!==null&&(m.votingPeriod=u.Duration.fromPartial(r.votingPeriod)),m}};function P(){return{quorum:"",threshold:"",vetoThreshold:""}}e.TallyParams={typeUrl:"/cosmos.gov.v1.TallyParams",encode(r,m=R.BinaryWriter.create()){return r.quorum!==""&&m.uint32(10).string(r.quorum),r.threshold!==""&&m.uint32(18).string(r.threshold),r.vetoThreshold!==""&&m.uint32(26).string(r.vetoThreshold),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=P();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.quorum=N.string();break;case 2:d.threshold=N.string();break;case 3:d.vetoThreshold=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=P();return(0,v.isSet)(r.quorum)&&(m.quorum=String(r.quorum)),(0,v.isSet)(r.threshold)&&(m.threshold=String(r.threshold)),(0,v.isSet)(r.vetoThreshold)&&(m.vetoThreshold=String(r.vetoThreshold)),m},toJSON(r){const m={};return r.quorum!==void 0&&(m.quorum=r.quorum),r.threshold!==void 0&&(m.threshold=r.threshold),r.vetoThreshold!==void 0&&(m.vetoThreshold=r.vetoThreshold),m},fromPartial(r){const m=P();return m.quorum=r.quorum??"",m.threshold=r.threshold??"",m.vetoThreshold=r.vetoThreshold??"",m}};function U(){return{minDeposit:[],maxDepositPeriod:void 0,votingPeriod:void 0,quorum:"",threshold:"",vetoThreshold:"",minInitialDepositRatio:"",burnVoteQuorum:!1,burnProposalDepositPrevote:!1,burnVoteVeto:!1}}e.Params={typeUrl:"/cosmos.gov.v1.Params",encode(r,m=R.BinaryWriter.create()){for(const N of r.minDeposit)n.Coin.encode(N,m.uint32(10).fork()).ldelim();return r.maxDepositPeriod!==void 0&&u.Duration.encode(r.maxDepositPeriod,m.uint32(18).fork()).ldelim(),r.votingPeriod!==void 0&&u.Duration.encode(r.votingPeriod,m.uint32(26).fork()).ldelim(),r.quorum!==""&&m.uint32(34).string(r.quorum),r.threshold!==""&&m.uint32(42).string(r.threshold),r.vetoThreshold!==""&&m.uint32(50).string(r.vetoThreshold),r.minInitialDepositRatio!==""&&m.uint32(58).string(r.minInitialDepositRatio),r.burnVoteQuorum===!0&&m.uint32(104).bool(r.burnVoteQuorum),r.burnProposalDepositPrevote===!0&&m.uint32(112).bool(r.burnProposalDepositPrevote),r.burnVoteVeto===!0&&m.uint32(120).bool(r.burnVoteVeto),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=U();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.minDeposit.push(n.Coin.decode(N,N.uint32()));break;case 2:d.maxDepositPeriod=u.Duration.decode(N,N.uint32());break;case 3:d.votingPeriod=u.Duration.decode(N,N.uint32());break;case 4:d.quorum=N.string();break;case 5:d.threshold=N.string();break;case 6:d.vetoThreshold=N.string();break;case 7:d.minInitialDepositRatio=N.string();break;case 13:d.burnVoteQuorum=N.bool();break;case 14:d.burnProposalDepositPrevote=N.bool();break;case 15:d.burnVoteVeto=N.bool();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=U();return Array.isArray(r==null?void 0:r.minDeposit)&&(m.minDeposit=r.minDeposit.map(N=>
3n.Coin.fromJSON(N))),(0,v.isSet)(r.maxDepositPeriod)&&(m.maxDepositPeriod=u.Duration.fromJSON(r.maxDepositPeriod)),(0,v.isSet)(r.votingPeriod)&&(m.votingPeriod=u.Duration.fromJSON(r.votingPeriod)),(0,v.isSet)(r.quorum)&&(m.quorum=String(r.quorum)),(0,v.isSet)(r.threshold)&&(m.threshold=String(r.threshold)),(0,v.isSet)(r.vetoThreshold)&&(m.vetoThreshold=String(r.vetoThreshold)),(0,v.isSet)(r.minInitialDepositRatio)&&(m.minInitialDepositRatio=String(r.minInitialDepositRatio)),(0,v.isSet)(r.burnVoteQuorum)&&(m.burnVoteQuorum=!!r.burnVoteQuorum),(0,v.isSet)(r.burnProposalDepositPrevote)&&(m.burnProposalDepositPrevote=!!r.burnProposalDepositPrevote),(0,v.isSet)(r.burnVoteVeto)&&(m.burnVoteVeto=!!r.burnVoteVeto),m},toJSON(r){const m={};return r.minDeposit?m.minDeposit=r.minDeposit.map(N=>N?n.Coin.toJSON(N):void 0):m.minDeposit=[],r.maxDepositPeriod!==void 0&&(m.maxDepositPeriod=r.maxDepositPeriod?u.Duration.toJSON(r.maxDepositPeriod):void 0),r.votingPeriod!==void 0&&(m.votingPeriod=r.votingPeriod?u.Duration.toJSON(r.votingPeriod):void 0),r.quorum!==void 0&&(m.quorum=r.quorum),r.threshold!==void 0&&(m.threshold=r.threshold),r.vetoThreshold!==void 0&&(m.vetoThreshold=r.vetoThreshold),r.minInitialDepositRatio!==void 0&&(m.minInitialDepositRatio=r.minInitialDepositRatio),r.burnVoteQuorum!==void 0&&(m.burnVoteQuorum=r.burnVoteQuorum),r.burnProposalDepositPrevote!==void 0&&(m.burnProposalDepositPrevote=r.burnProposalDepositPrevote),r.burnVoteVeto!==void 0&&(m.burnVoteVeto=r.burnVoteVeto),m},fromPartial(r){var N;const m=U();return m.minDeposit=((N=r.minDeposit)==null?void 0:N.map(V=>n.Coin.fromPartial(V)))||[],r.maxDepositPeriod!==void 0&&r.maxDepositPeriod!==null&&(m.maxDepositPeriod=u.Duration.fromPartial(r.maxDepositPeriod)),r.votingPeriod!==void 0&&r.votingPeriod!==null&&(m.votingPeriod=u.Duration.fromPartial(r.votingPeriod)),m.quorum=r.quorum??"",m.threshold=r.threshold??"",m.vetoThreshold=r.vetoThreshold??"",m.minInitialDepositRatio=r.minInitialDepositRatio??"",m.burnVoteQuorum=r.burnVoteQuorum??!1,m.burnProposalDepositPrevote=r.burnProposalDepositPrevote??!1,m.burnVoteVeto=r.burnVoteVeto??!1,m}}})(Rl);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgUpdateParamsResponse=e.MsgUpdateParams=e.MsgDepositResponse=e.MsgDeposit=e.MsgVoteWeightedResponse=e.MsgVoteWeighted=e.MsgVoteResponse=e.MsgVote=e.MsgExecLegacyContentResponse=e.MsgExecLegacyContent=e.MsgSubmitProposalResponse=e.MsgSubmitProposal=e.protobufPackage=void 0;const n=Re,t=ve,i=Rl,u=te,R=ee;e.protobufPackage="cosmos.gov.v1";function v(){return{messages:[],initialDeposit:[],proposer:"",metadata:"",title:"",summary:""}}e.MsgSubmitProposal={typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",encode(J,P=u.BinaryWriter.create()){for(const U of J.messages)n.Any.encode(U,P.uint32(10).fork()).ldelim();for(const U of J.initialDeposit)t.Coin.encode(U,P.uint32(18).fork()).ldelim();return J.proposer!==""&&P.uint32(26).string(J.proposer),J.metadata!==""&&P.uint32(34).string(J.metadata),J.title!==""&&P.uint32(42).string(J.title),J.summary!==""&&P.uint32(50).string(J.summary),P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=v();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){case 1:m.messages.push(n.Any.decode(U,U.uint32()));break;case 2:m.initialDeposit.push(t.Coin.decode(U,U.uint32()));break;case 3:m.proposer=U.string();break;case 4:m.metadata=U.string();break;case 5:m.title=U.string();break;case 6:m.summary=U.string();break;default:U.skipType(N&7);break}}return m},fromJSON(J){const P=v();return Array.isArray(J==null?void 0:J.messages)&&(P.messages=J.messages.map(U=>n.Any.fromJSON(U))),Array.isArray(J==null?void 0:J.initialDeposit)&&(P.initialDeposit=J.initialDeposit.map(U=>t.Coin.fromJSON(U))),(0,R.isSet)(J.proposer)&&(P.proposer=String(J.proposer)),(0,R.isSet)(J.metadata)&&(P.metadata=String(J.metadata)),(0,R.isSet)(J.title)&&(P.title=String(J.title)),(0,R.isSet)(J.summary)&&(P.summary=String(J.summary)),P},toJSON(J){const P={};return J.messages?P.messages=J.messages.map(U=>U?n.Any.toJSON(U):void 0):P.messages=[],J.initialDeposit?P.initialDeposit=J.initialDeposit.map(U=>U?t.Coin.toJSON(U):void 0):P.initialDeposit=[],J.proposer!==void 0&&(P.proposer=J.proposer),J.metadata!==void 0&&(P.metadata=J.metadata),J.title!==void 0&&(P.title=J.title),J.summary!==void 0&&(P.summary=J.summary),P},fromPartial(J){var U,r;const P=v();return P.messages=((U=J.messages)==null?void 0:U.map(m=>n.Any.fromPartial(m)))||[],P.initialDeposit=((r=J.initialDeposit)==null?void 0:r.map(m=>t.Coin.fromPartial(m)))||[],P.proposer=J.proposer??"",P.metadata=J.metadata??"",P.title=J.title??"",P.summary=J.summary??"",P}};function E(){return{proposalId:BigInt(0)}}e.MsgSubmitProposalResponse={typeUrl:"/cosmos.gov.v1.MsgSubmitProposalResponse",encode(J,P=u.BinaryWriter.create()){return J.proposalId!==BigInt(0)&&P.uint32(8).uint64(J.proposalId),P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=E();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){case 1:m.proposalId=U.uint64();break;default:U.skipType(N&7);break}}return m},fromJSON(J){const P=E();return(0,R.isSet)(J.proposalId)&&(P.proposalId=BigInt(J.proposalId.toString())),P},toJSON(J){const P={};return J.proposalId!==void 0&&(P.proposalId=(J.proposalId||BigInt(0)).toString()),P},fromPartial(J){const P=E();return J.proposalId!==void 0&&J.proposalId!==null&&(P.proposalId=BigInt(J.proposalId.toString())),P}};function C(){return{content:void 0,authority:""}}e.MsgExecLegacyContent={typeUrl:"/cosmos.gov.v1.MsgExecLegacyContent",encode(J,P=u.BinaryWriter.create()){return J.content!==void 0&&n.Any.encode(J.content,P.uint32(10).fork()).ldelim(),J.authority!==""&&P.uint32(18).string(J.authority),P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=C();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){case 1:m.content=n.Any.decode(U,U.uint32());break;case 2:m.authority=U.string();break;default:U.skipType(N&7);break}}return m},fromJSON(J){const P=C();return(0,R.isSet)(J.content)&&(P.content=n.Any.fromJSON(J.content)),(0,R.isSet)(J.authority)&&(P.authority=String(J.authority)),P},toJSON(J){const P={};return J.content!==void 0&&(P.content=J.content?n.Any.toJSON(J.content):void 0),J.authority!==void 0&&(P.authority=J.authority),P},fromPartial(J){const P=C();return J.content!==void 0&&J.content!==null&&(P.content=n.Any.fromPartial(J.content)),P.authority=J.authority??"",P}};function D(){return{}}e.MsgExecLegacyContentResponse={typeUrl:"/cosmos.gov.v1.MsgExecLegacyContentResponse",encode(J,P=u.BinaryWriter.create()){return P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=D();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){default:U.skipType(N&7);break}}return m},fromJSON(J){return D()},toJSON(J){return{}},fromPartial(J){return D()}};function _(){return{proposalId:BigInt(0),voter:"",option:0,metadata:""}}e.MsgVote={typeUrl:"/cosmos.gov.v1.MsgVote",encode(J,P=u.BinaryWriter.create()){return J.proposalId!==BigInt(0)&&P.uint32(8).uint64(J.proposalId),J.voter!==""&&P.uint32(18).string(J.voter),J.option!==0&&P.uint32(24).int32(J.option),J.metadata!==""&&P.uint32(34).string(J.metadata),P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=_();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){case 1:m.proposalId=U.uint64();break;case 2:m.voter=U.string();break;case 3:m.option=U.int32();break;case 4:m.metadata=U.string();break;default:U.skipType(N&7);break}}return m},fromJSON(J){const P=_();return(0,R.isSet)(J.proposalId)&&(P.proposalId=BigInt(J.proposalId.toString())),(0,R.isSet)(J.voter)&&(P.voter=String(J.voter)),(0,R.isSet)(J.option)&&(P.option=(0,i.voteOptionFromJSON)(J.option)),(0,R.isSet)(J.metadata)&&(P.metadata=String(J.metadata)),P},toJSON(J){const P={};return J.proposalId!==void 0&&(P.proposalId=(J.proposalId||BigInt(0)).toString()),J.voter!==void 0&&(P.voter=J.voter),J.option!==void 0&&(P.option=(0,i.voteOptionToJSON)(J.option)),J.metadata!==void 0&&(P.metadata=J.metadata),P},fromPartial(J){const P=_();return J.proposalId!==void 0&&J.proposalId!==null&&(P.proposalId=BigInt(J.proposalId.toString())),P.voter=J.voter??"",P.option=J.option??0,P.metadata=J.metadata??"",P}};function b(){return{}}e.MsgVoteResponse={typeUrl:"/cosmos.gov.v1.MsgVoteResponse",encode(J,P=u.BinaryWriter.create()){return P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=b();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){default:U.skipType(N&7);break}}return m},fromJSON(J){return b()},toJSON(J){return{}},fromPartial(J){return b()}};function f(){return{proposalId:BigInt(0),voter:"",options:[],metadata:""}}e.MsgVoteWeighted={typeUrl:"/cosmos.gov.v1.MsgVoteWeighted",encode(J,P=u.BinaryWriter.create()){J.proposalId!==BigInt(0)&&P.uint32(8).uint64(J.proposalId),J.voter!==""&&P.uint32(18).string(J.voter);for(const U of J.options)i.WeightedVoteOption.encode(U,P.uint32(26).fork()).ldelim();return J.metadata!==""&&P.uint32(34).string(J.metadata),P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=f();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){case 1:m.proposalId=U.uint64();break;case 2:m.voter=U.string();break;case 3:m.options.push(i.WeightedVoteOption.decode(U,U.uint32()));break;case 4:m.metadata=U.string();break;default:U.skipType(N&7);break}}return m},fromJSON(J){const P=f();return(0,R.isSet)(J.proposalId)&&(P.proposalId=BigInt(J.proposalId.toString())),(0,R.isSet)(J.voter)&&(P.voter=String(J.voter)),Array.isArray(J==null?void 0:J.options)&&(P.options=J.options.map(U=>i.WeightedVoteOption.fromJSON(U))),(0,R.isSet)(J.metadata)&&(P.metadata=String(J.metadata)),P},toJSON(J){const P={};return J.proposalId!==void 0&&(P.proposalId=(J.proposalId||BigInt(0)).toString()),J.voter!==void 0&&(P.voter=J.voter),J.options?P.options=J.options.map(U=>
3U?i.WeightedVoteOption.toJSON(U):void 0):P.options=[],J.metadata!==void 0&&(P.metadata=J.metadata),P},fromPartial(J){var U;const P=f();return J.proposalId!==void 0&&J.proposalId!==null&&(P.proposalId=BigInt(J.proposalId.toString())),P.voter=J.voter??"",P.options=((U=J.options)==null?void 0:U.map(r=>i.WeightedVoteOption.fromPartial(r)))||[],P.metadata=J.metadata??"",P}};function p(){return{}}e.MsgVoteWeightedResponse={typeUrl:"/cosmos.gov.v1.MsgVoteWeightedResponse",encode(J,P=u.BinaryWriter.create()){return P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=p();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){default:U.skipType(N&7);break}}return m},fromJSON(J){return p()},toJSON(J){return{}},fromPartial(J){return p()}};function k(){return{proposalId:BigInt(0),depositor:"",amount:[]}}e.MsgDeposit={typeUrl:"/cosmos.gov.v1.MsgDeposit",encode(J,P=u.BinaryWriter.create()){J.proposalId!==BigInt(0)&&P.uint32(8).uint64(J.proposalId),J.depositor!==""&&P.uint32(18).string(J.depositor);for(const U of J.amount)t.Coin.encode(U,P.uint32(26).fork()).ldelim();return P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=k();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){case 1:m.proposalId=U.uint64();break;case 2:m.depositor=U.string();break;case 3:m.amount.push(t.Coin.decode(U,U.uint32()));break;default:U.skipType(N&7);break}}return m},fromJSON(J){const P=k();return(0,R.isSet)(J.proposalId)&&(P.proposalId=BigInt(J.proposalId.toString())),(0,R.isSet)(J.depositor)&&(P.depositor=String(J.depositor)),Array.isArray(J==null?void 0:J.amount)&&(P.amount=J.amount.map(U=>t.Coin.fromJSON(U))),P},toJSON(J){const P={};return J.proposalId!==void 0&&(P.proposalId=(J.proposalId||BigInt(0)).toString()),J.depositor!==void 0&&(P.depositor=J.depositor),J.amount?P.amount=J.amount.map(U=>U?t.Coin.toJSON(U):void 0):P.amount=[],P},fromPartial(J){var U;const P=k();return J.proposalId!==void 0&&J.proposalId!==null&&(P.proposalId=BigInt(J.proposalId.toString())),P.depositor=J.depositor??"",P.amount=((U=J.amount)==null?void 0:U.map(r=>t.Coin.fromPartial(r)))||[],P}};function o(){return{}}e.MsgDepositResponse={typeUrl:"/cosmos.gov.v1.MsgDepositResponse",encode(J,P=u.BinaryWriter.create()){return P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=o();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){default:U.skipType(N&7);break}}return m},fromJSON(J){return o()},toJSON(J){return{}},fromPartial(J){return o()}};function s(){return{authority:"",params:i.Params.fromPartial({})}}e.MsgUpdateParams={typeUrl:"/cosmos.gov.v1.MsgUpdateParams",encode(J,P=u.BinaryWriter.create()){return J.authority!==""&&P.uint32(10).string(J.authority),J.params!==void 0&&i.Params.encode(J.params,P.uint32(18).fork()).ldelim(),P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=s();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){case 1:m.authority=U.string();break;case 2:m.params=i.Params.decode(U,U.uint32());break;default:U.skipType(N&7);break}}return m},fromJSON(J){const P=s();return(0,R.isSet)(J.authority)&&(P.authority=String(J.authority)),(0,R.isSet)(J.params)&&(P.params=i.Params.fromJSON(J.params)),P},toJSON(J){const P={};return J.authority!==void 0&&(P.authority=J.authority),J.params!==void 0&&(P.params=J.params?i.Params.toJSON(J.params):void 0),P},fromPartial(J){const P=s();return P.authority=J.authority??"",J.params!==void 0&&J.params!==null&&(P.params=i.Params.fromPartial(J.params)),P}};function y(){return{}}e.MsgUpdateParamsResponse={typeUrl:"/cosmos.gov.v1.MsgUpdateParamsResponse",encode(J,P=u.BinaryWriter.create()){return P},decode(J,P){const U=J instanceof u.BinaryReader?J:new u.BinaryReader(J);let r=P===void 0?U.len:U.pos+P;const m=y();for(;U.pos<r;){const N=U.uint32();switch(N>>>3){default:U.skipType(N&7);break}}return m},fromJSON(J){return y()},toJSON(J){return{}},fromPartial(J){return y()}};class w{constructor(P){this.rpc=P,this.SubmitProposal=this.SubmitProposal.bind(this),this.ExecLegacyContent=this.ExecLegacyContent.bind(this),this.Vote=this.Vote.bind(this),this.VoteWeighted=this.VoteWeighted.bind(this),this.Deposit=this.Deposit.bind(this),this.UpdateParams=this.UpdateParams.bind(this)}SubmitProposal(P){const U=e.MsgSubmitProposal.encode(P).finish();return this.rpc.request("cosmos.gov.v1.Msg","SubmitProposal",U).then(m=>e.MsgSubmitProposalResponse.decode(new u.BinaryReader(m)))}ExecLegacyContent(P){const U=e.MsgExecLegacyContent.encode(P).finish();return this.rpc.request("cosmos.gov.v1.Msg","ExecLegacyContent",U).then(m=>e.MsgExecLegacyContentResponse.decode(new u.BinaryReader(m)))}Vote(P){const U=e.MsgVote.encode(P).finish();return this.rpc.request("cosmos.gov.v1.Msg","Vote",U).then(m=>e.MsgVoteResponse.decode(new u.BinaryReader(m)))}VoteWeighted(P){const U=e.MsgVoteWeighted.encode(P).finish();return this.rpc.request("cosmos.gov.v1.Msg","VoteWeighted",U).then(m=>e.MsgVoteWeightedResponse.decode(new u.BinaryReader(m)))}Deposit(P){const U=e.MsgDeposit.encode(P).finish();return this.rpc.request("cosmos.gov.v1.Msg","Deposit",U).then(m=>e.MsgDepositResponse.decode(new u.BinaryReader(m)))}UpdateParams(P){const U=e.MsgUpdateParams.encode(P).finish();return this.rpc.request("cosmos.gov.v1.Msg","UpdateParams",U).then(m=>e.MsgUpdateParamsResponse.decode(new u.BinaryReader(m)))}}e.MsgClientImpl=w})(Pl);var Bl={};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgDepositResponse=e.MsgDeposit=e.MsgVoteWeightedResponse=e.MsgVoteWeighted=e.MsgVoteResponse=e.MsgVote=e.MsgSubmitProposalResponse=e.MsgSubmitProposal=e.protobufPackage=void 0;const n=Re,t=ve,i=fa,u=te,R=ee;e.protobufPackage="cosmos.gov.v1beta1";function v(){return{content:void 0,initialDeposit:[],proposer:""}}e.MsgSubmitProposal={typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposal",encode(o,s=u.BinaryWriter.create()){o.content!==void 0&&n.Any.encode(o.content,s.uint32(10).fork()).ldelim();for(const y of o.initialDeposit)t.Coin.encode(y,s.uint32(18).fork()).ldelim();return o.proposer!==""&&s.uint32(26).string(o.proposer),s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=v();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.content=n.Any.decode(y,y.uint32());break;case 2:J.initialDeposit.push(t.Coin.decode(y,y.uint32()));break;case 3:J.proposer=y.string();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=v();return(0,R.isSet)(o.content)&&(s.content=n.Any.fromJSON(o.content)),Array.isArray(o==null?void 0:o.initialDeposit)&&(s.initialDeposit=o.initialDeposit.map(y=>t.Coin.fromJSON(y))),(0,R.isSet)(o.proposer)&&(s.proposer=String(o.proposer)),s},toJSON(o){const s={};return o.content!==void 0&&(s.content=o.content?n.Any.toJSON(o.content):void 0),o.initialDeposit?s.initialDeposit=o.initialDeposit.map(y=>y?t.Coin.toJSON(y):void 0):s.initialDeposit=[],o.proposer!==void 0&&(s.proposer=o.proposer),s},fromPartial(o){var y;const s=v();return o.content!==void 0&&o.content!==null&&(s.content=n.Any.fromPartial(o.content)),s.initialDeposit=((y=o.initialDeposit)==null?void 0:y.map(w=>t.Coin.fromPartial(w)))||[],s.proposer=o.proposer??"",s}};function E(){return{proposalId:BigInt(0)}}e.MsgSubmitProposalResponse={typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposalResponse",encode(o,s=u.BinaryWriter.create()){return o.proposalId!==BigInt(0)&&s.uint32(8).uint64(o.proposalId),s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=E();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.proposalId=y.uint64();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=E();return(0,R.isSet)(o.proposalId)&&(s.proposalId=BigInt(o.proposalId.toString())),s},toJSON(o){const s={};return o.proposalId!==void 0&&(s.proposalId=(o.proposalId||BigInt(0)).toString()),s},fromPartial(o){const s=E();return o.proposalId!==void 0&&o.proposalId!==null&&(s.proposalId=BigInt(o.proposalId.toString())),s}};function C(){return{proposalId:BigInt(0),voter:"",option:0}}e.MsgVote={typeUrl:"/cosmos.gov.v1beta1.MsgVote",encode(o,s=u.BinaryWriter.create()){return o.proposalId!==BigInt(0)&&s.uint32(8).uint64(o.proposalId),o.voter!==""&&s.uint32(18).string(o.voter),o.option!==0&&s.uint32(24).int32(o.option),s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=C();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.proposalId=y.uint64();break;case 2:J.voter=y.string();break;case 3:J.option=y.int32();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=C();return(0,R.isSet)(o.proposalId)&&(s.proposalId=BigInt(o.proposalId.toString())),(0,R.isSet)(o.voter)&&(s.voter=String(o.voter)),(0,R.isSet)(o.option)&&(s.option=(0,i.voteOptionFromJSON)(o.option)),s},toJSON(o){const s={};return o.proposalId!==void 0&&(s.proposalId=(o.proposalId||BigInt(0)).toString()),o.voter!==void 0&&(s.voter=o.voter),o.option!==void 0&&(s.option=(0,i.voteOptionToJSON)(o.option)),s},fromPartial(o){const s=C();return o.proposalId!==void 0&&o.proposalId!==null&&(s.proposalId=BigInt(o.proposalId.toString())),s.voter=o.voter??"",s.option=o.option??0,s}};function D(){return{}}e.MsgVoteResponse={typeUrl:"/cosmos.gov.v1beta1.MsgVoteResponse",encode(o,s=u.BinaryWriter.create()){return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=D();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){default:y.skipType(P&7);break}}return J},fromJSON(o){return D()},toJSON(o){return{}},fromPartial(o){return D()}};function _(){return{proposalId:BigInt(0),voter:"",options:[]}}e.MsgVoteWeighted={typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",encode(o,s=u.BinaryWriter.create()){o.proposalId!==BigInt(0)&&s.uint32(8).uint64(o.proposalId),o.voter!==""&&s.uint32(18).string(o.voter);for(const y of o.options)i.WeightedVoteOption.encode(y,s.uint32(26).fork()).ldelim();return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=_();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.proposalId=y.uint64();break;case 2:J.voter=y.string();break;case 3:J.options.push(i.WeightedVoteOption.decode(y,y.uint32()));break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=_();return(0,R.isSet)(o.proposalId)&&(s.proposalId=BigInt(o.proposalId.toString())),(0,R.isSet)(o.voter)&&(s.voter=String(o.voter)),Array.isArray(o==null?void 0:o.options)&&(s.options=o.options.map(y=>
3i.WeightedVoteOption.fromJSON(y))),s},toJSON(o){const s={};return o.proposalId!==void 0&&(s.proposalId=(o.proposalId||BigInt(0)).toString()),o.voter!==void 0&&(s.voter=o.voter),o.options?s.options=o.options.map(y=>y?i.WeightedVoteOption.toJSON(y):void 0):s.options=[],s},fromPartial(o){var y;const s=_();return o.proposalId!==void 0&&o.proposalId!==null&&(s.proposalId=BigInt(o.proposalId.toString())),s.voter=o.voter??"",s.options=((y=o.options)==null?void 0:y.map(w=>i.WeightedVoteOption.fromPartial(w)))||[],s}};function b(){return{}}e.MsgVoteWeightedResponse={typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeightedResponse",encode(o,s=u.BinaryWriter.create()){return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=b();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){default:y.skipType(P&7);break}}return J},fromJSON(o){return b()},toJSON(o){return{}},fromPartial(o){return b()}};function f(){return{proposalId:BigInt(0),depositor:"",amount:[]}}e.MsgDeposit={typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",encode(o,s=u.BinaryWriter.create()){o.proposalId!==BigInt(0)&&s.uint32(8).uint64(o.proposalId),o.depositor!==""&&s.uint32(18).string(o.depositor);for(const y of o.amount)t.Coin.encode(y,s.uint32(26).fork()).ldelim();return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=f();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.proposalId=y.uint64();break;case 2:J.depositor=y.string();break;case 3:J.amount.push(t.Coin.decode(y,y.uint32()));break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=f();return(0,R.isSet)(o.proposalId)&&(s.proposalId=BigInt(o.proposalId.toString())),(0,R.isSet)(o.depositor)&&(s.depositor=String(o.depositor)),Array.isArray(o==null?void 0:o.amount)&&(s.amount=o.amount.map(y=>t.Coin.fromJSON(y))),s},toJSON(o){const s={};return o.proposalId!==void 0&&(s.proposalId=(o.proposalId||BigInt(0)).toString()),o.depositor!==void 0&&(s.depositor=o.depositor),o.amount?s.amount=o.amount.map(y=>y?t.Coin.toJSON(y):void 0):s.amount=[],s},fromPartial(o){var y;const s=f();return o.proposalId!==void 0&&o.proposalId!==null&&(s.proposalId=BigInt(o.proposalId.toString())),s.depositor=o.depositor??"",s.amount=((y=o.amount)==null?void 0:y.map(w=>t.Coin.fromPartial(w)))||[],s}};function p(){return{}}e.MsgDepositResponse={typeUrl:"/cosmos.gov.v1beta1.MsgDepositResponse",encode(o,s=u.BinaryWriter.create()){return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=p();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){default:y.skipType(P&7);break}}return J},fromJSON(o){return p()},toJSON(o){return{}},fromPartial(o){return p()}};class k{constructor(s){this.rpc=s,this.SubmitProposal=this.SubmitProposal.bind(this),this.Vote=this.Vote.bind(this),this.VoteWeighted=this.VoteWeighted.bind(this),this.Deposit=this.Deposit.bind(this)}SubmitProposal(s){const y=e.MsgSubmitProposal.encode(s).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","SubmitProposal",y).then(J=>e.MsgSubmitProposalResponse.decode(new u.BinaryReader(J)))}Vote(s){const y=e.MsgVote.encode(s).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","Vote",y).then(J=>e.MsgVoteResponse.decode(new u.BinaryReader(J)))}VoteWeighted(s){const y=e.MsgVoteWeighted.encode(s).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","VoteWeighted",y).then(J=>e.MsgVoteWeightedResponse.decode(new u.BinaryReader(J)))}Deposit(s){const y=e.MsgDeposit.encode(s).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","Deposit",y).then(J=>e.MsgDepositResponse.decode(new u.BinaryReader(J)))}}e.MsgClientImpl=k})(Bl);Object.defineProperty(Pn,"__esModule",{value:!0});Pn.isMsgVoteWeightedEncodeObject=Pn.isMsgVoteEncodeObject=Pn.isMsgSubmitProposalEncodeObject=Pn.isMsgDepositEncodeObject=Pn.govTypes=void 0;const hi=Pl,ro=Bl;Pn.govTypes=[["/cosmos.gov.v1.MsgDeposit",hi.MsgDeposit],["/cosmos.gov.v1.MsgSubmitProposal",hi.MsgSubmitProposal],["/cosmos.gov.v1.MsgUpdateParams",hi.MsgUpdateParams],["/cosmos.gov.v1.MsgVote",hi.MsgVote],["/cosmos.gov.v1.MsgVoteWeighted",hi.MsgVoteWeighted],["/cosmos.gov.v1beta1.MsgDeposit",ro.MsgDeposit],["/cosmos.gov.v1beta1.MsgSubmitProposal",ro.MsgSubmitProposal],["/cosmos.gov.v1beta1.MsgVote",ro.MsgVote],["/cosmos.gov.v1beta1.MsgVoteWeighted",ro.MsgVoteWeighted]];function og(e){return e.typeUrl==="/cosmos.gov.v1beta1.MsgDeposit"}Pn.isMsgDepositEncodeObject=og;function ag(e){return e.typeUrl==="/cosmos.gov.v1beta1.MsgSubmitProposal"}Pn.isMsgSubmitProposalEncodeObject=ag;function sg(e){return e.typeUrl==="/cosmos.gov.v1beta1.MsgVote"}Pn.isMsgVoteEncodeObject=sg;function dg(e){return e.typeUrl==="/cosmos.gov.v1beta1.MsgVoteWeighted"}Pn.isMsgVoteWeightedEncodeObject=dg;var pa={},vl={};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryTallyResultResponse=e.QueryTallyResultRequest=e.QueryDepositsResponse=e.QueryDepositsRequest=e.QueryDepositResponse=e.QueryDepositRequest=e.QueryParamsResponse=e.QueryParamsRequest=e.QueryVotesResponse=e.QueryVotesRequest=e.QueryVoteResponse=e.QueryVoteRequest=e.QueryProposalsResponse=e.QueryProposalsRequest=e.QueryProposalResponse=e.QueryProposalRequest=e.protobufPackage=void 0;const n=fa,t=_e,i=te,u=ee;e.protobufPackage="cosmos.gov.v1beta1";function R(){return{proposalId:BigInt(0)}}e.QueryProposalRequest={typeUrl:"/cosmos.gov.v1beta1.QueryProposalRequest",encode(r,m=i.BinaryWriter.create()){return r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=R();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=R();return(0,u.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),m},fromPartial(r){const m=R();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),m}};function v(){return{proposal:n.Proposal.fromPartial({})}}e.QueryProposalResponse={typeUrl:"/cosmos.gov.v1beta1.QueryProposalResponse",encode(r,m=i.BinaryWriter.create()){return r.proposal!==void 0&&n.Proposal.encode(r.proposal,m.uint32(10).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=v();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposal=n.Proposal.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=v();return(0,u.isSet)(r.proposal)&&(m.proposal=n.Proposal.fromJSON(r.proposal)),m},toJSON(r){const m={};return r.proposal!==void 0&&(m.proposal=r.proposal?n.Proposal.toJSON(r.proposal):void 0),m},fromPartial(r){const m=v();return r.proposal!==void 0&&r.proposal!==null&&(m.proposal=n.Proposal.fromPartial(r.proposal)),m}};function E(){return{proposalStatus:0,voter:"",depositor:"",pagination:void 0}}e.QueryProposalsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryProposalsRequest",encode(r,m=i.BinaryWriter.create()){return r.proposalStatus!==0&&m.uint32(8).int32(r.proposalStatus),r.voter!==""&&m.uint32(18).string(r.voter),r.depositor!==""&&m.uint32(26).string(r.depositor),r.pagination!==void 0&&t.PageRequest.encode(r.pagination,m.uint32(34).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=E();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalStatus=N.int32();break;case 2:d.voter=N.string();break;case 3:d.depositor=N.string();break;case 4:d.pagination=t.PageRequest.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=E();return(0,u.isSet)(r.proposalStatus)&&(m.proposalStatus=(0,n.proposalStatusFromJSON)(r.proposalStatus)),(0,u.isSet)(r.voter)&&(m.voter=String(r.voter)),(0,u.isSet)(r.depositor)&&(m.depositor=String(r.depositor)),(0,u.isSet)(r.pagination)&&(m.pagination=t.PageRequest.fromJSON(r.pagination)),m},toJSON(r){const m={};return r.proposalStatus!==void 0&&(m.proposalStatus=(0,n.proposalStatusToJSON)(r.proposalStatus)),r.voter!==void 0&&(m.voter=r.voter),r.depositor!==void 0&&(m.depositor=r.depositor),r.pagination!==void 0&&(m.pagination=r.pagination?t.PageRequest.toJSON(r.pagination):void 0),m},fromPartial(r){const m=E();return m.proposalStatus=r.proposalStatus??0,m.voter=r.voter??"",m.depositor=r.depositor??"",r.pagination!==void 0&&r.pagination!==null&&(m.pagination=t.PageRequest.fromPartial(r.pagination)),m}};function C(){return{proposals:[],pagination:void 0}}e.QueryProposalsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryProposalsResponse",encode(r,m=i.BinaryWriter.create()){for(const N of r.proposals)n.Proposal.encode(N,m.uint32(10).fork()).ldelim();return r.pagination!==void 0&&t.PageResponse.encode(r.pagination,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=C();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposals.push(n.Proposal.decode(N,N.uint32()));break;case 2:d.pagination=t.PageResponse.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=C();return Array.isArray(r==null?void 0:r.proposals)&&(m.proposals=r.proposals.map(N=>
3n.Proposal.fromJSON(N))),(0,u.isSet)(r.pagination)&&(m.pagination=t.PageResponse.fromJSON(r.pagination)),m},toJSON(r){const m={};return r.proposals?m.proposals=r.proposals.map(N=>N?n.Proposal.toJSON(N):void 0):m.proposals=[],r.pagination!==void 0&&(m.pagination=r.pagination?t.PageResponse.toJSON(r.pagination):void 0),m},fromPartial(r){var N;const m=C();return m.proposals=((N=r.proposals)==null?void 0:N.map(V=>n.Proposal.fromPartial(V)))||[],r.pagination!==void 0&&r.pagination!==null&&(m.pagination=t.PageResponse.fromPartial(r.pagination)),m}};function D(){return{proposalId:BigInt(0),voter:""}}e.QueryVoteRequest={typeUrl:"/cosmos.gov.v1beta1.QueryVoteRequest",encode(r,m=i.BinaryWriter.create()){return r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.voter!==""&&m.uint32(18).string(r.voter),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=D();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.voter=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=D();return(0,u.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,u.isSet)(r.voter)&&(m.voter=String(r.voter)),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.voter!==void 0&&(m.voter=r.voter),m},fromPartial(r){const m=D();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),m.voter=r.voter??"",m}};function _(){return{vote:n.Vote.fromPartial({})}}e.QueryVoteResponse={typeUrl:"/cosmos.gov.v1beta1.QueryVoteResponse",encode(r,m=i.BinaryWriter.create()){return r.vote!==void 0&&n.Vote.encode(r.vote,m.uint32(10).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=_();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.vote=n.Vote.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=_();return(0,u.isSet)(r.vote)&&(m.vote=n.Vote.fromJSON(r.vote)),m},toJSON(r){const m={};return r.vote!==void 0&&(m.vote=r.vote?n.Vote.toJSON(r.vote):void 0),m},fromPartial(r){const m=_();return r.vote!==void 0&&r.vote!==null&&(m.vote=n.Vote.fromPartial(r.vote)),m}};function b(){return{proposalId:BigInt(0),pagination:void 0}}e.QueryVotesRequest={typeUrl:"/cosmos.gov.v1beta1.QueryVotesRequest",encode(r,m=i.BinaryWriter.create()){return r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.pagination!==void 0&&t.PageRequest.encode(r.pagination,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=b();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.pagination=t.PageRequest.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=b();return(0,u.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,u.isSet)(r.pagination)&&(m.pagination=t.PageRequest.fromJSON(r.pagination)),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.pagination!==void 0&&(m.pagination=r.pagination?t.PageRequest.toJSON(r.pagination):void 0),m},fromPartial(r){const m=b();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),r.pagination!==void 0&&r.pagination!==null&&(m.pagination=t.PageRequest.fromPartial(r.pagination)),m}};function f(){return{votes:[],pagination:void 0}}e.QueryVotesResponse={typeUrl:"/cosmos.gov.v1beta1.QueryVotesResponse",encode(r,m=i.BinaryWriter.create()){for(const N of r.votes)n.Vote.encode(N,m.uint32(10).fork()).ldelim();return r.pagination!==void 0&&t.PageResponse.encode(r.pagination,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=f();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.votes.push(n.Vote.decode(N,N.uint32()));break;case 2:d.pagination=t.PageResponse.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=f();return Array.isArray(r==null?void 0:r.votes)&&(m.votes=r.votes.map(N=>
3n.Vote.fromJSON(N))),(0,u.isSet)(r.pagination)&&(m.pagination=t.PageResponse.fromJSON(r.pagination)),m},toJSON(r){const m={};return r.votes?m.votes=r.votes.map(N=>N?n.Vote.toJSON(N):void 0):m.votes=[],r.pagination!==void 0&&(m.pagination=r.pagination?t.PageResponse.toJSON(r.pagination):void 0),m},fromPartial(r){var N;const m=f();return m.votes=((N=r.votes)==null?void 0:N.map(V=>n.Vote.fromPartial(V)))||[],r.pagination!==void 0&&r.pagination!==null&&(m.pagination=t.PageResponse.fromPartial(r.pagination)),m}};function p(){return{paramsType:""}}e.QueryParamsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryParamsRequest",encode(r,m=i.BinaryWriter.create()){return r.paramsType!==""&&m.uint32(10).string(r.paramsType),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=p();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.paramsType=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=p();return(0,u.isSet)(r.paramsType)&&(m.paramsType=String(r.paramsType)),m},toJSON(r){const m={};return r.paramsType!==void 0&&(m.paramsType=r.paramsType),m},fromPartial(r){const m=p();return m.paramsType=r.paramsType??"",m}};function k(){return{votingParams:n.VotingParams.fromPartial({}),depositParams:n.DepositParams.fromPartial({}),tallyParams:n.TallyParams.fromPartial({})}}e.QueryParamsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryParamsResponse",encode(r,m=i.BinaryWriter.create()){return r.votingParams!==void 0&&n.VotingParams.encode(r.votingParams,m.uint32(10).fork()).ldelim(),r.depositParams!==void 0&&n.DepositParams.encode(r.depositParams,m.uint32(18).fork()).ldelim(),r.tallyParams!==void 0&&n.TallyParams.encode(r.tallyParams,m.uint32(26).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=k();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.votingParams=n.VotingParams.decode(N,N.uint32());break;case 2:d.depositParams=n.DepositParams.decode(N,N.uint32());break;case 3:d.tallyParams=n.TallyParams.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=k();return(0,u.isSet)(r.votingParams)&&(m.votingParams=n.VotingParams.fromJSON(r.votingParams)),(0,u.isSet)(r.depositParams)&&(m.depositParams=n.DepositParams.fromJSON(r.depositParams)),(0,u.isSet)(r.tallyParams)&&(m.tallyParams=n.TallyParams.fromJSON(r.tallyParams)),m},toJSON(r){const m={};return r.votingParams!==void 0&&(m.votingParams=r.votingParams?n.VotingParams.toJSON(r.votingParams):void 0),r.depositParams!==void 0&&(m.depositParams=r.depositParams?n.DepositParams.toJSON(r.depositParams):void 0),r.tallyParams!==void 0&&(m.tallyParams=r.tallyParams?n.TallyParams.toJSON(r.tallyParams):void 0),m},fromPartial(r){const m=k();return r.votingParams!==void 0&&r.votingParams!==null&&(m.votingParams=n.VotingParams.fromPartial(r.votingParams)),r.depositParams!==void 0&&r.depositParams!==null&&(m.depositParams=n.DepositParams.fromPartial(r.depositParams)),r.tallyParams!==void 0&&r.tallyParams!==null&&(m.tallyParams=n.TallyParams.fromPartial(r.tallyParams)),m}};function o(){return{proposalId:BigInt(0),depositor:""}}e.QueryDepositRequest={typeUrl:"/cosmos.gov.v1beta1.QueryDepositRequest",encode(r,m=i.BinaryWriter.create()){return r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.depositor!==""&&m.uint32(18).string(r.depositor),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=o();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.depositor=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=o();return(0,u.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,u.isSet)(r.depositor)&&(m.depositor=String(r.depositor)),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.depositor!==void 0&&(m.depositor=r.depositor),m},fromPartial(r){const m=o();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),m.depositor=r.depositor??"",m}};function s(){return{deposit:n.Deposit.fromPartial({})}}e.QueryDepositResponse={typeUrl:"/cosmos.gov.v1beta1.QueryDepositResponse",encode(r,m=i.BinaryWriter.create()){return r.deposit!==void 0&&n.Deposit.encode(r.deposit,m.uint32(10).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=s();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.deposit=n.Deposit.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=s();return(0,u.isSet)(r.deposit)&&(m.deposit=n.Deposit.fromJSON(r.deposit)),m},toJSON(r){const m={};return r.deposit!==void 0&&(m.deposit=r.deposit?n.Deposit.toJSON(r.deposit):void 0),m},fromPartial(r){const m=s();return r.deposit!==void 0&&r.deposit!==null&&(m.deposit=n.Deposit.fromPartial(r.deposit)),m}};function y(){return{proposalId:BigInt(0),pagination:void 0}}e.QueryDepositsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryDepositsRequest",encode(r,m=i.BinaryWriter.create()){return r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),r.pagination!==void 0&&t.PageRequest.encode(r.pagination,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=y();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;case 2:d.pagination=t.PageRequest.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=y();return(0,u.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),(0,u.
3isSet)(r.pagination)&&(m.pagination=t.PageRequest.fromJSON(r.pagination)),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),r.pagination!==void 0&&(m.pagination=r.pagination?t.PageRequest.toJSON(r.pagination):void 0),m},fromPartial(r){const m=y();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),r.pagination!==void 0&&r.pagination!==null&&(m.pagination=t.PageRequest.fromPartial(r.pagination)),m}};function w(){return{deposits:[],pagination:void 0}}e.QueryDepositsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryDepositsResponse",encode(r,m=i.BinaryWriter.create()){for(const N of r.deposits)n.Deposit.encode(N,m.uint32(10).fork()).ldelim();return r.pagination!==void 0&&t.PageResponse.encode(r.pagination,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=w();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.deposits.push(n.Deposit.decode(N,N.uint32()));break;case 2:d.pagination=t.PageResponse.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=w();return Array.isArray(r==null?void 0:r.deposits)&&(m.deposits=r.deposits.map(N=>n.Deposit.fromJSON(N))),(0,u.isSet)(r.pagination)&&(m.pagination=t.PageResponse.fromJSON(r.pagination)),m},toJSON(r){const m={};return r.deposits?m.deposits=r.deposits.map(N=>N?n.Deposit.toJSON(N):void 0):m.deposits=[],r.pagination!==void 0&&(m.pagination=r.pagination?t.PageResponse.toJSON(r.pagination):void 0),m},fromPartial(r){var N;const m=w();return m.deposits=((N=r.deposits)==null?void 0:N.map(V=>n.Deposit.fromPartial(V)))||[],r.pagination!==void 0&&r.pagination!==null&&(m.pagination=t.PageResponse.fromPartial(r.pagination)),m}};function J(){return{proposalId:BigInt(0)}}e.QueryTallyResultRequest={typeUrl:"/cosmos.gov.v1beta1.QueryTallyResultRequest",encode(r,m=i.BinaryWriter.create()){return r.proposalId!==BigInt(0)&&m.uint32(8).uint64(r.proposalId),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=J();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.proposalId=N.uint64();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=J();return(0,u.isSet)(r.proposalId)&&(m.proposalId=BigInt(r.proposalId.toString())),m},toJSON(r){const m={};return r.proposalId!==void 0&&(m.proposalId=(r.proposalId||BigInt(0)).toString()),m},fromPartial(r){const m=J();return r.proposalId!==void 0&&r.proposalId!==null&&(m.proposalId=BigInt(r.proposalId.toString())),m}};function P(){return{tally:n.TallyResult.fromPartial({})}}e.QueryTallyResultResponse={typeUrl:"/cosmos.gov.v1beta1.QueryTallyResultResponse",encode(r,m=i.BinaryWriter.create()){return r.tally!==void 0&&n.TallyResult.encode(r.tally,m.uint32(10).fork()).ldelim(),m},decode(r,m){const N=r instanceof i.BinaryReader?r:new i.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=P();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.tally=n.TallyResult.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=P();return(0,u.isSet)(r.tally)&&(m.tally=n.TallyResult.fromJSON(r.tally)),m},toJSON(r){const m={};return r.tally!==void 0&&(m.tally=r.tally?n.TallyResult.toJSON(r.tally):void 0),m},fromPartial(r){const m=P();return r.tally!==void 0&&r.tally!==null&&(m.tally=n.TallyResult.fromPartial(r.tally)),m}};class U{constructor(m){this.rpc=m,this.Proposal=this.Proposal.bind(this),this.Proposals=this.Proposals.bind(this),this.Vote=this.Vote.bind(this),this.Votes=this.Votes.bind(this),this.Params=this.Params.bind(this),this.Deposit=this.Deposit.bind(this),this.Deposits=this.Deposits.bind(this),this.TallyResult=this.TallyResult.bind(this)}Proposal(m){const N=e.QueryProposalRequest.encode(m).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Proposal",N).then(d=>e.QueryProposalResponse.decode(new i.BinaryReader(d)))}Proposals(m){const N=e.QueryProposalsRequest.encode(m).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Proposals",N).then(d=>e.QueryProposalsResponse.decode(new i.BinaryReader(d)))}Vote(m){const N=e.QueryVoteRequest.encode(m).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Vote",N).then(d=>e.QueryVoteResponse.decode(new i.BinaryReader(d)))}Votes(m){const N=e.QueryVotesRequest.encode(m).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Votes",N).then(d=>e.QueryVotesResponse.decode(new i.BinaryReader(d)))}Params(m){const N=e.QueryParamsRequest.encode(m).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Params",N).then(d=>e.QueryParamsResponse.decode(new i.BinaryReader(d)))}Deposit(m){const N=e.QueryDepositRequest.encode(m).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Deposit",N).then(d=>e.QueryDepositResponse.decode(new i.BinaryReader(d)))}Deposits(m){const N=e.QueryDepositsRequest.encode(m).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Deposits",N).then(d=>e.QueryDepositsResponse.decode(new i.BinaryReader(d)))}TallyResult(m){const N=e.QueryTallyResultRequest.encode(m).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","TallyResult",N).then(d=>e.QueryTallyResultResponse.decode(new i.BinaryReader(d)))}}e.QueryClientImpl=U})(vl);Object.defineProperty(pa,"__esModule",{value:!0});pa.setupGovExtension=void 0;const ug=vl,Vn=Ke;function cg(e){const n=(0,Vn.createProtobufRpcClient)(e),t=new ug.QueryClientImpl(n);return{gov:{params:async i=>await t.Params({paramsType:i}),proposals:async(i,u,R,v)=>await t.Proposals({proposalStatus:i,depositor:u,voter:R,pagination:(0,Vn.createPagination)(v)}),proposal:async i=>await t.Proposal({proposalId:(0,Vn.longify)(i)}),deposits:async(i,u)=>await t.Deposits({proposalId:(0,Vn.longify)(i),pagination:(0,Vn.createPagination)(u)}),deposit:async(i,u)=>await t.Deposit({proposalId:(0,Vn.longify)(i),depositor:u}),tally:async i=>await t.TallyResult({proposalId:(0,Vn.longify)(i)}),votes:async(i,u)=>await t.Votes({proposalId:(0,Vn.longify)(i),pagination:(0,Vn.createPagination)(u)}),vote:async(i,u)=>await t.Vote({proposalId:(0,Vn.longify)(i),voter:u})}}}pa.setupGovExtension=cg;var ma={};Object.defineProperty(ma,"__esModule",{value:!0});ma.createGroupAminoConverters=void 0;function lg(){return{}}ma.createGroupAminoConverters=lg;var ya={},Ol={},bl={};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Vote=e.TallyResult=e.Proposal=e.GroupPolicyInfo=e.GroupMember=e.GroupInfo=e.DecisionPolicyWindows=e.PercentageDecisionPolicy=e.ThresholdDecisionPolicy=e.MemberRequest=e.Member=e.proposalExecutorResultToJSON=e.proposalExecutorResultFromJSON=e.ProposalExecutorResult=e.proposalStatusToJSON=e.proposalStatusFromJSON=e.ProposalStatus=e.voteOptionToJSON=e.voteOptionFromJSON=e.VoteOption=e.protobufPackage=void 0;const n=Me,t=ln,i=Re,u=te,R=ee;e.protobufPackage="cosmos.group.v1";var v;(function(d){d[d.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",d[d.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",d[d.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",d[d.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",d[d.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",d[d.UNRECOGNIZED=-1]="UNRECOGNIZED"})(v||(e.VoteOption=v={}));function E(d){switch(d){case 0:case"VOTE_OPTION_UNSPECIFIED":return v.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return v.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return v.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return v.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return v.VOTE_OPTION_NO_WITH_VETO;case-1:case"UNRECOGNIZED":default:return v.UNRECOGNIZED}}e.voteOptionFromJSON=E;function C(d){switch(d){case v.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case v.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case v.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case v.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case v.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case v.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.voteOptionToJSON=C;var D;(function(d){d[d.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",d[d.PROPOSAL_STATUS_SUBMITTED=1]="PROPOSAL_STATUS_SUBMITTED",d[d.PROPOSAL_STATUS_ACCEPTED=2]="PROPOSAL_STATUS_ACCEPTED",d[d.PROPOSAL_STATUS_REJECTED=3]="PROPOSAL_STATUS_REJECTED",d[d.PROPOSAL_STATUS_ABORTED=4]="PROPOSAL_STATUS_ABORTED",d[d.PROPOSAL_STATUS_WITHDRAWN=5]="PROPOSAL_STATUS_WITHDRAWN",d[d.UNRECOGNIZED=-1]="UNRECOGNIZED"})(D||(e.ProposalStatus=D={}));function _(d){switch(d){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return D.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_SUBMITTED":return D.PROPOSAL_STATUS_SUBMITTED;case 2:case"PROPOSAL_STATUS_ACCEPTED":return D.PROPOSAL_STATUS_ACCEPTED;case 3:case"PROPOSAL_STATUS_REJECTED":return D.PROPOSAL_STATUS_REJECTED;case 4:case"PROPOSAL_STATUS_ABORTED":return D.PROPOSAL_STATUS_ABORTED;case 5:case"PROPOSAL_STATUS_WITHDRAWN":return D.PROPOSAL_STATUS_WITHDRAWN;case-1:case"UNRECOGNIZED":default:return D.UNRECOGNIZED}}e.proposalStatusFromJSON=_;function b(d){switch(d){case D.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case D.PROPOSAL_STATUS_SUBMITTED:return"PROPOSAL_STATUS_SUBMITTED";case D.PROPOSAL_STATUS_ACCEPTED:return"PROPOSAL_STATUS_ACCEPTED";case D.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case D.PROPOSAL_STATUS_ABORTED:return"PROPOSAL_STATUS_ABORTED";case D.PROPOSAL_STATUS_WITHDRAWN:return"PROPOSAL_STATUS_WITHDRAWN";case D.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.proposalStatusToJSON=b;var f;(function(d){d[d.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED=0]="PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED",d[d.PROPOSAL_EXECUTOR_RESULT_NOT_RUN=1]="PROPOSAL_EXECUTOR_RESULT_NOT_RUN",d[d.PROPOSAL_EXECUTOR_RESULT_SUCCESS=2]="PROPOSAL_EXECUTOR_RESULT_SUCCESS",d[d.PROPOSAL_EXECUTOR_RESULT_FAILURE=3]="PROPOSAL_EXECUTOR_RESULT_FAILURE",d[d.UNRECOGNIZED=-1]="UNRECOGNIZED"})(f||(e.ProposalExecutorResult=f={}));function p(d){switch(d){case 0:case"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED":return f.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED;case 1:case"PROPOSAL_EXECUTOR_RESULT_NOT_RUN":return f.PROPOSAL_EXECUTOR_RESULT_NOT_RUN;case 2:case"PROPOSAL_EXECUTOR_RESULT_SUCCESS":return f.PROPOSAL_EXECUTOR_RESULT_SUCCESS;case 3:case"PROPOSAL_EXECUTOR_RESULT_FAILURE":return f.PROPOSAL_EXECUTOR_RESULT_FAILURE;case-1:case"UNRECOGNIZED":default:return f.UNRECOGNIZED}}e.proposalExecutorResultFromJSON=p;function k(d){switch(d){case f.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED:return"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED";case f.PROPOSAL_EXECUTOR_RESULT_NOT_RUN:return"PROPOSAL_EXECUTOR_RESULT_NOT_RUN";case f.PROPOSAL_EXECUTOR_RESULT_SUCCESS:return"PROPOSAL_EXECUTOR_RESULT_SUCCESS";case f.PROPOSAL_EXECUTOR_RESULT_FAILURE:return"PROPOSAL_EXECUTOR_RESULT_FAILURE";case f.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.proposalExecutorResultToJSON=k;function o(){return{address:"",weight:"",metadata:"",addedAt:n.Timestamp.fromPartial({})}}e.Member={typeUrl:"/cosmos.group.v1.Member",encode(d,l=u.BinaryWriter.create()){return d.address!==""&&l.uint32(10).string(d.address),d.weight!==""&&l.uint32(18).string(d.weight),d.metadata!==""&&l.uint32(26).string(d.metadata),d.addedAt!==void 0&&n.Timestamp.encode(d.addedAt,l.uint32(34).fork()).ldelim(),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=o();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.address=T.string();break;case 2:B.weight=T.string();break;case 3:B.metadata=T.string();break;case 4:B.addedAt=n.Timestamp.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=o();return(0,R.isSet)(d.address)&&(l.address=String(d.address)),(0,R.isSet)(d.weight)&&(l.weight=String(d.weight)),(0,R.isSet)(d.metadata)&&(l.metadata=String(d.metadata)),(0,R.isSet)(d.addedAt)&&(l.addedAt=(0,R.fromJsonTimestamp)(d.addedAt)),l},toJSON(d){const l={};return d.address!==void 0&&(l.address=d.address),d.weight!==void 0&&(l.weight=d.weight),d.metadata!==void 0&&(l.metadata=d.metadata),d.addedAt!==void 0&&(l.addedAt=(0,R.fromTimestamp)(d.addedAt).toISOString()),l}
3,fromPartial(d){const l=o();return l.address=d.address??"",l.weight=d.weight??"",l.metadata=d.metadata??"",d.addedAt!==void 0&&d.addedAt!==null&&(l.addedAt=n.Timestamp.fromPartial(d.addedAt)),l}};function s(){return{address:"",weight:"",metadata:""}}e.MemberRequest={typeUrl:"/cosmos.group.v1.MemberRequest",encode(d,l=u.BinaryWriter.create()){return d.address!==""&&l.uint32(10).string(d.address),d.weight!==""&&l.uint32(18).string(d.weight),d.metadata!==""&&l.uint32(26).string(d.metadata),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=s();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.address=T.string();break;case 2:B.weight=T.string();break;case 3:B.metadata=T.string();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=s();return(0,R.isSet)(d.address)&&(l.address=String(d.address)),(0,R.isSet)(d.weight)&&(l.weight=String(d.weight)),(0,R.isSet)(d.metadata)&&(l.metadata=String(d.metadata)),l},toJSON(d){const l={};return d.address!==void 0&&(l.address=d.address),d.weight!==void 0&&(l.weight=d.weight),d.metadata!==void 0&&(l.metadata=d.metadata),l},fromPartial(d){const l=s();return l.address=d.address??"",l.weight=d.weight??"",l.metadata=d.metadata??"",l}};function y(){return{threshold:"",windows:void 0}}e.ThresholdDecisionPolicy={typeUrl:"/cosmos.group.v1.ThresholdDecisionPolicy",encode(d,l=u.BinaryWriter.create()){return d.threshold!==""&&l.uint32(10).string(d.threshold),d.windows!==void 0&&e.DecisionPolicyWindows.encode(d.windows,l.uint32(18).fork()).ldelim(),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=y();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.threshold=T.string();break;case 2:B.windows=e.DecisionPolicyWindows.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=y();return(0,R.isSet)(d.threshold)&&(l.threshold=String(d.threshold)),(0,R.isSet)(d.windows)&&(l.windows=e.DecisionPolicyWindows.fromJSON(d.windows)),l},toJSON(d){const l={};return d.threshold!==void 0&&(l.threshold=d.threshold),d.windows!==void 0&&(l.windows=d.windows?e.DecisionPolicyWindows.toJSON(d.windows):void 0),l},fromPartial(d){const l=y();return l.threshold=d.threshold??"",d.windows!==void 0&&d.windows!==null&&(l.windows=e.DecisionPolicyWindows.fromPartial(d.windows)),l}};function w(){return{percentage:"",windows:void 0}}e.PercentageDecisionPolicy={typeUrl:"/cosmos.group.v1.PercentageDecisionPolicy",encode(d,l=u.BinaryWriter.create()){return d.percentage!==""&&l.uint32(10).string(d.percentage),d.windows!==void 0&&e.DecisionPolicyWindows.encode(d.windows,l.uint32(18).fork()).ldelim(),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=w();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.percentage=T.string();break;case 2:B.windows=e.DecisionPolicyWindows.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=w();return(0,R.isSet)(d.percentage)&&(l.percentage=String(d.percentage)),(0,R.isSet)(d.windows)&&(l.windows=e.DecisionPolicyWindows.fromJSON(d.windows)),l},toJSON(d){const l={};return d.percentage!==void 0&&(l.percentage=d.percentage),d.windows!==void 0&&(l.windows=d.windows?e.DecisionPolicyWindows.toJSON(d.windows):void 0),l},fromPartial(d){const l=w();return l.percentage=d.percentage??"",d.windows!==void 0&&d.windows!==null&&(l.windows=e.DecisionPolicyWindows.fromPartial(d.windows)),l}};function J(){return{votingPeriod:t.Duration.fromPartial({}),minExecutionPeriod:t.Duration.fromPartial({})}}e.DecisionPolicyWindows={typeUrl:"/cosmos.group.v1.DecisionPolicyWindows",encode(d,l=u.BinaryWriter.create()){return d.votingPeriod!==void 0&&t.Duration.encode(d.votingPeriod,l.uint32(10).fork()).ldelim(),d.minExecutionPeriod!==void 0&&t.Duration.encode(d.minExecutionPeriod,l.uint32(18).fork()).ldelim(),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=J();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.votingPeriod=t.Duration.decode(T,T.uint32());break;case 2:B.minExecutionPeriod=t.Duration.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=J();
3return(0,R.isSet)(d.votingPeriod)&&(l.votingPeriod=t.Duration.fromJSON(d.votingPeriod)),(0,R.isSet)(d.minExecutionPeriod)&&(l.minExecutionPeriod=t.Duration.fromJSON(d.minExecutionPeriod)),l},toJSON(d){const l={};return d.votingPeriod!==void 0&&(l.votingPeriod=d.votingPeriod?t.Duration.toJSON(d.votingPeriod):void 0),d.minExecutionPeriod!==void 0&&(l.minExecutionPeriod=d.minExecutionPeriod?t.Duration.toJSON(d.minExecutionPeriod):void 0),l},fromPartial(d){const l=J();return d.votingPeriod!==void 0&&d.votingPeriod!==null&&(l.votingPeriod=t.Duration.fromPartial(d.votingPeriod)),d.minExecutionPeriod!==void 0&&d.minExecutionPeriod!==null&&(l.minExecutionPeriod=t.Duration.fromPartial(d.minExecutionPeriod)),l}};function P(){return{id:BigInt(0),admin:"",metadata:"",version:BigInt(0),totalWeight:"",createdAt:n.Timestamp.fromPartial({})}}e.GroupInfo={typeUrl:"/cosmos.group.v1.GroupInfo",encode(d,l=u.BinaryWriter.create()){return d.id!==BigInt(0)&&l.uint32(8).uint64(d.id),d.admin!==""&&l.uint32(18).string(d.admin),d.metadata!==""&&l.uint32(26).string(d.metadata),d.version!==BigInt(0)&&l.uint32(32).uint64(d.version),d.totalWeight!==""&&l.uint32(42).string(d.totalWeight),d.createdAt!==void 0&&n.Timestamp.encode(d.createdAt,l.uint32(50).fork()).ldelim(),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=P();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.id=T.uint64();break;case 2:B.admin=T.string();break;case 3:B.metadata=T.string();break;case 4:B.version=T.uint64();break;case 5:B.totalWeight=T.string();break;case 6:B.createdAt=n.Timestamp.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=P();return(0,R.isSet)(d.id)&&(l.id=BigInt(d.id.toString())),(0,R.isSet)(d.admin)&&(l.admin=String(d.admin)),(0,R.isSet)(d.metadata)&&(l.metadata=String(d.metadata)),(0,R.isSet)(d.version)&&(l.version=BigInt(d.version.toString())),(0,R.isSet)(d.totalWeight)&&(l.totalWeight=String(d.totalWeight)),(0,R.isSet)(d.createdAt)&&(l.createdAt=(0,R.fromJsonTimestamp)(d.createdAt)),l},toJSON(d){const l={};return d.id!==void 0&&(l.id=(d.id||BigInt(0)).toString()),d.admin!==void 0&&(l.admin=d.admin),d.metadata!==void 0&&(l.metadata=d.metadata),d.version!==void 0&&(l.version=(d.version||BigInt(0)).toString()),d.totalWeight!==void 0&&(l.totalWeight=d.totalWeight),d.createdAt!==void 0&&(l.createdAt=(0,R.fromTimestamp)(d.createdAt).toISOString()),l},fromPartial(d){const l=P();return d.id!==void 0&&d.id!==null&&(l.id=BigInt(d.id.toString())),l.admin=d.admin??"",l.metadata=d.metadata??"",d.version!==void 0&&d.version!==null&&(l.version=BigInt(d.version.toString())),l.totalWeight=d.totalWeight??"",d.createdAt!==void 0&&d.createdAt!==null&&(l.createdAt=n.Timestamp.fromPartial(d.createdAt)),l}};function U(){return{groupId:BigInt(0),member:void 0}}e.GroupMember={typeUrl:"/cosmos.group.v1.GroupMember",encode(d,l=u.BinaryWriter.create()){return d.groupId!==BigInt(0)&&l.uint32(8).uint64(d.groupId),d.member!==void 0&&e.Member.encode(d.member,l.uint32(18).fork()).ldelim(),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=U();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.groupId=T.uint64();break;case 2:B.member=e.Member.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=U();return(0,R.isSet)(d.groupId)&&(l.groupId=BigInt(d.groupId.toString())),(0,R.isSet)(d.member)&&(l.member=e.Member.fromJSON(d.member)),l},toJSON(d){const l={};return d.groupId!==void 0&&(l.groupId=(d.groupId||BigInt(0)).toString()),d.member!==void 0&&(l.member=d.member?e.Member.toJSON(d.member):void 0),l},fromPartial(d){const l=U();return d.groupId!==void 0&&d.groupId!==null&&(l.groupId=BigInt(d.groupId.toString())),d.member!==void 0&&d.member!==null&&(l.member=e.Member.fromPartial(d.member)),l}};function r(){return{address:"",groupId:BigInt(0),admin:"",metadata:"",version:BigInt(0),decisionPolicy:void 0,createdAt:n.Timestamp.fromPartial({})}}e.GroupPolicyInfo={typeUrl:"/cosmos.group.v1.GroupPolicyInfo",encode(d,l=u.BinaryWriter.create()){return d.address!==""&&l.uint32(10).string(d.address),d.groupId!==BigInt(0)&&l.uint32(16).uint64(d.groupId),d.admin!==""&&l.uint32(26).string(d.admin),d.metadata!==""&&l.uint32(34).string(d.metadata),d.version!==BigInt(0)&&l.uint32(40).uint64(d.version),d.decisionPolicy!==void 0&&i.Any.encode(d.decisionPolicy,l.uint32(50).fork()).ldelim(),d.createdAt!==void 0&&n.Timestamp.encode(d.createdAt,l.uint32(58).fork()).ldelim(),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=r();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.address=T.string();break;case 2:B.groupId=T.uint64();break;case 3:B.admin=T.string();break;case 4:B.metadata=T.string();break;case 5:B.version=T.uint64();break;case 6:B.decisionPolicy=i.Any.decode(T,T.uint32());break;case 7:B.createdAt=n.Timestamp.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=r();return(0,R.isSet)(d.address)&&(l.address=String(d.address)),(0,R.isSet)(d.groupId)&&(l.groupId=BigInt(d.groupId.toString())),(0,R.isSet)(d.admin)&&(l.admin=String(d.admin)),(0,R.isSet)(d.metadata)&&(l.metadata=String(d.metadata)),(0,R.isSet)(d.version)&&(l.version=BigInt(d.version.toString())),(0,R.isSet)(d.decisionPolicy)&&(l.decisionPolicy=i.Any.fromJSON(d.decisionPolicy)),(0,R.isSet)(d.createdAt)&&(l.createdAt=(0,R.fromJsonTimestamp)(d.createdAt)),l},toJSON(d){const l={};return d.address!==void 0&&(l.address=d.address),d.groupId!==void 0&&(l.groupId=(d.groupId||BigInt(0)).toString()),d.admin!==void 0&&(l.admin=d.admin),d.metadata!==void 0&&(l.metadata=d.metadata),d.version!==void 0&&(l.version=(d.version||BigInt(0)).toString()),d.decisionPolicy!==void 0&&(l.decisionPolicy=d.decisionPolicy?i.Any.toJSON(d.decisionPolicy):void 0),d.createdAt!==void 0&&(l.createdAt=(0,R.fromTimestamp)(d.createdAt).toISOString()),l}
3,fromPartial(d){const l=r();return l.address=d.address??"",d.groupId!==void 0&&d.groupId!==null&&(l.groupId=BigInt(d.groupId.toString())),l.admin=d.admin??"",l.metadata=d.metadata??"",d.version!==void 0&&d.version!==null&&(l.version=BigInt(d.version.toString())),d.decisionPolicy!==void 0&&d.decisionPolicy!==null&&(l.decisionPolicy=i.Any.fromPartial(d.decisionPolicy)),d.createdAt!==void 0&&d.createdAt!==null&&(l.createdAt=n.Timestamp.fromPartial(d.createdAt)),l}};function m(){return{id:BigInt(0),groupPolicyAddress:"",metadata:"",proposers:[],submitTime:n.Timestamp.fromPartial({}),groupVersion:BigInt(0),groupPolicyVersion:BigInt(0),status:0,finalTallyResult:e.TallyResult.fromPartial({}),votingPeriodEnd:n.Timestamp.fromPartial({}),executorResult:0,messages:[],title:"",summary:""}}e.Proposal={typeUrl:"/cosmos.group.v1.Proposal",encode(d,l=u.BinaryWriter.create()){d.id!==BigInt(0)&&l.uint32(8).uint64(d.id),d.groupPolicyAddress!==""&&l.uint32(18).string(d.groupPolicyAddress),d.metadata!==""&&l.uint32(26).string(d.metadata);for(const T of d.proposers)l.uint32(34).string(T);d.submitTime!==void 0&&n.Timestamp.encode(d.submitTime,l.uint32(42).fork()).ldelim(),d.groupVersion!==BigInt(0)&&l.uint32(48).uint64(d.groupVersion),d.groupPolicyVersion!==BigInt(0)&&l.uint32(56).uint64(d.groupPolicyVersion),d.status!==0&&l.uint32(64).int32(d.status),d.finalTallyResult!==void 0&&e.TallyResult.encode(d.finalTallyResult,l.uint32(74).fork()).ldelim(),d.votingPeriodEnd!==void 0&&n.Timestamp.encode(d.votingPeriodEnd,l.uint32(82).fork()).ldelim(),d.executorResult!==0&&l.uint32(88).int32(d.executorResult);for(const T of d.messages)i.Any.encode(T,l.uint32(98).fork()).ldelim();return d.title!==""&&l.uint32(106).string(d.title),d.summary!==""&&l.uint32(114).string(d.summary),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=m();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.id=T.uint64();break;case 2:B.groupPolicyAddress=T.string();break;case 3:B.metadata=T.string();break;case 4:B.proposers.push(T.string());break;case 5:B.submitTime=n.Timestamp.decode(T,T.uint32());break;case 6:B.groupVersion=T.uint64();break;case 7:B.groupPolicyVersion=T.uint64();break;case 8:B.status=T.int32();break;case 9:B.finalTallyResult=e.TallyResult.decode(T,T.uint32());break;case 10:B.votingPeriodEnd=n.Timestamp.decode(T,T.uint32());break;case 11:B.executorResult=T.int32();break;case 12:B.messages.push(i.Any.decode(T,T.uint32()));break;case 13:B.title=T.string();break;case 14:B.summary=T.string();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=m();return(0,R.isSet)(d.id)&&(l.id=BigInt(d.id.toString())),(0,R.isSet)(d.groupPolicyAddress)&&(l.groupPolicyAddress=String(d.groupPolicyAddress)),(0,R.isSet)(d.metadata)&&(l.metadata=String(d.metadata)),Array.isArray(d==null?void 0:d.proposers)&&(l.proposers=d.proposers.map(T=>String(T))),(0,R.isSet)(d.submitTime)&&(l.submitTime=(0,R.fromJsonTimestamp)(d.submitTime)),(0,R.isSet)(d.groupVersion)&&(l.groupVersion=BigInt(d.groupVersion.toString())),(0,R.isSet)(d.groupPolicyVersion)&&(l.groupPolicyVersion=BigInt(d.groupPolicyVersion.toString())),(0,R.isSet)(d.status)&&(l.status=_(d.status)),(0,R.isSet)(d.finalTallyResult)&&(l.finalTallyResult=e.TallyResult.fromJSON(d.finalTallyResult)),(0,R.isSet)(d.votingPeriodEnd)&&(l.votingPeriodEnd=(0,R.fromJsonTimestamp)(d.votingPeriodEnd)),(0,R.isSet)(d.executorResult)&&(l.executorResult=p(d.executorResult)),Array.isArray(d==null?void 0:d.messages)&&(l.messages=d.messages.map(T=>i.Any.fromJSON(T))),(0,R.isSet)(d.title)&&(l.title=String(d.title)),(0,R.isSet)(d.summary)&&(l.summary=String(d.summary)),l},toJSON(d){const l={};return d.id!==void 0&&(l.id=(d.id||BigInt(0)).toString()),d.groupPolicyAddress!==void 0&&(l.groupPolicyAddress=d.groupPolicyAddress),d.metadata!==void 0&&(l.metadata=d.metadata),d.proposers?l.proposers=d.proposers.map(T=>T):l.proposers=[],d.submitTime!==void 0&&(l.submitTime=(0,R.fromTimestamp)(d.submitTime).toISOString()),d.groupVersion!==void 0&&(l.groupVersion=(d.groupVersion||BigInt(0)).toString()),d.groupPolicyVersion!==void 0&&(l.groupPolicyVersion=(d.groupPolicyVersion||BigInt(0)).toString()),d.status!==void 0&&(l.status=b(d.status)),d.finalTallyResult!==void 0&&(l.finalTallyResult=d.finalTallyResult?e.TallyResult.toJSON(d.finalTallyResult):void 0),d.votingPeriodEnd!==void 0&&(l.votingPeriodEnd=(0,R.fromTimestamp)(d.votingPeriodEnd).toISOString()),d.executorResult!==void 0&&(l.executorResult=k(d.executorResult)),d.messages?l.messages=d.messages.map(T=>T?i.Any.toJSON(T):void 0):l.messages=[],d.title!==void 0&&(l.title=d.title),d.summary!==void 0&&(l.summary=d.summary),l}
3,fromPartial(d){var T,O;const l=m();return d.id!==void 0&&d.id!==null&&(l.id=BigInt(d.id.toString())),l.groupPolicyAddress=d.groupPolicyAddress??"",l.metadata=d.metadata??"",l.proposers=((T=d.proposers)==null?void 0:T.map(B=>B))||[],d.submitTime!==void 0&&d.submitTime!==null&&(l.submitTime=n.Timestamp.fromPartial(d.submitTime)),d.groupVersion!==void 0&&d.groupVersion!==null&&(l.groupVersion=BigInt(d.groupVersion.toString())),d.groupPolicyVersion!==void 0&&d.groupPolicyVersion!==null&&(l.groupPolicyVersion=BigInt(d.groupPolicyVersion.toString())),l.status=d.status??0,d.finalTallyResult!==void 0&&d.finalTallyResult!==null&&(l.finalTallyResult=e.TallyResult.fromPartial(d.finalTallyResult)),d.votingPeriodEnd!==void 0&&d.votingPeriodEnd!==null&&(l.votingPeriodEnd=n.Timestamp.fromPartial(d.votingPeriodEnd)),l.executorResult=d.executorResult??0,l.messages=((O=d.messages)==null?void 0:O.map(B=>i.Any.fromPartial(B)))||[],l.title=d.title??"",l.summary=d.summary??"",l}};function N(){return{yesCount:"",abstainCount:"",noCount:"",noWithVetoCount:""}}e.TallyResult={typeUrl:"/cosmos.group.v1.TallyResult",encode(d,l=u.BinaryWriter.create()){return d.yesCount!==""&&l.uint32(10).string(d.yesCount),d.abstainCount!==""&&l.uint32(18).string(d.abstainCount),d.noCount!==""&&l.uint32(26).string(d.noCount),d.noWithVetoCount!==""&&l.uint32(34).string(d.noWithVetoCount),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=N();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.yesCount=T.string();break;case 2:B.abstainCount=T.string();break;case 3:B.noCount=T.string();break;case 4:B.noWithVetoCount=T.string();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=N();return(0,R.isSet)(d.yesCount)&&(l.yesCount=String(d.yesCount)),(0,R.isSet)(d.abstainCount)&&(l.abstainCount=String(d.abstainCount)),(0,R.isSet)(d.noCount)&&(l.noCount=String(d.noCount)),(0,R.isSet)(d.noWithVetoCount)&&(l.noWithVetoCount=String(d.noWithVetoCount)),l},toJSON(d){const l={};return d.yesCount!==void 0&&(l.yesCount=d.yesCount),d.abstainCount!==void 0&&(l.abstainCount=d.abstainCount),d.noCount!==void 0&&(l.noCount=d.noCount),d.noWithVetoCount!==void 0&&(l.noWithVetoCount=d.noWithVetoCount),l},fromPartial(d){const l=N();return l.yesCount=d.yesCount??"",l.abstainCount=d.abstainCount??"",l.noCount=d.noCount??"",l.noWithVetoCount=d.noWithVetoCount??"",l}};function V(){return{proposalId:BigInt(0),voter:"",option:0,metadata:"",submitTime:n.Timestamp.fromPartial({})}}e.Vote={typeUrl:"/cosmos.group.v1.Vote",encode(d,l=u.BinaryWriter.create()){return d.proposalId!==BigInt(0)&&l.uint32(8).uint64(d.proposalId),d.voter!==""&&l.uint32(18).string(d.voter),d.option!==0&&l.uint32(24).int32(d.option),d.metadata!==""&&l.uint32(34).string(d.metadata),d.submitTime!==void 0&&n.Timestamp.encode(d.submitTime,l.uint32(42).fork()).ldelim(),l},decode(d,l){const T=d instanceof u.BinaryReader?d:new u.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=V();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.proposalId=T.uint64();break;case 2:B.voter=T.string();break;case 3:B.option=T.int32();break;case 4:B.metadata=T.string();break;case 5:B.submitTime=n.Timestamp.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=V();return(0,R.isSet)(d.proposalId)&&(l.proposalId=BigInt(d.proposalId.toString())),(0,R.isSet)(d.voter)&&(l.voter=String(d.voter)),(0,R.isSet)(d.option)&&(l.option=E(d.option)),(0,R.isSet)(d.metadata)&&(l.metadata=String(d.metadata)),(0,R.isSet)(d.submitTime)&&(l.submitTime=(0,R.fromJsonTimestamp)(d.submitTime)),l},toJSON(d){const l={};return d.proposalId!==void 0&&(l.proposalId=(d.proposalId||BigInt(0)).toString()),d.voter!==void 0&&(l.voter=d.voter),d.option!==void 0&&(l.option=C(d.option)),d.metadata!==void 0&&(l.metadata=d.metadata),d.submitTime!==void 0&&(l.submitTime=(0,R.fromTimestamp)(d.submitTime).toISOString()),l},fromPartial(d){const l=V();return d.proposalId!==void 0&&d.proposalId!==null&&(l.proposalId=BigInt(d.proposalId.toString())),l.voter=d.voter??"",l.option=d.option??0,l.metadata=d.metadata??"",d.submitTime!==void 0&&d.submitTime!==null&&(l.submitTime=n.Timestamp.fromPartial(d.submitTime)),l}}})(bl);
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgLeaveGroupResponse=e.MsgLeaveGroup=e.MsgExecResponse=e.MsgExec=e.MsgVoteResponse=e.MsgVote=e.MsgWithdrawProposalResponse=e.MsgWithdrawProposal=e.MsgSubmitProposalResponse=e.MsgSubmitProposal=e.MsgUpdateGroupPolicyMetadataResponse=e.MsgUpdateGroupPolicyMetadata=e.MsgUpdateGroupPolicyDecisionPolicyResponse=e.MsgUpdateGroupPolicyDecisionPolicy=e.MsgCreateGroupWithPolicyResponse=e.MsgCreateGroupWithPolicy=e.MsgUpdateGroupPolicyAdminResponse=e.MsgUpdateGroupPolicyAdmin=e.MsgCreateGroupPolicyResponse=e.MsgCreateGroupPolicy=e.MsgUpdateGroupMetadataResponse=e.MsgUpdateGroupMetadata=e.MsgUpdateGroupAdminResponse=e.MsgUpdateGroupAdmin=e.MsgUpdateGroupMembersResponse=e.MsgUpdateGroupMembers=e.MsgCreateGroupResponse=e.MsgCreateGroup=e.execToJSON=e.execFromJSON=e.Exec=e.protobufPackage=void 0;const n=bl,t=Re,i=te,u=ee;e.protobufPackage="cosmos.group.v1";var R;(function(S){S[S.EXEC_UNSPECIFIED=0]="EXEC_UNSPECIFIED",S[S.EXEC_TRY=1]="EXEC_TRY",S[S.UNRECOGNIZED=-1]="UNRECOGNIZED"})(R||(e.Exec=R={}));function v(S){switch(S){case 0:case"EXEC_UNSPECIFIED":return R.EXEC_UNSPECIFIED;case 1:case"EXEC_TRY":return R.EXEC_TRY;case-1:case"UNRECOGNIZED":default:return R.UNRECOGNIZED}}e.execFromJSON=v;function E(S){switch(S){case R.EXEC_UNSPECIFIED:return"EXEC_UNSPECIFIED";case R.EXEC_TRY:return"EXEC_TRY";case R.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.execToJSON=E;function C(){return{admin:"",members:[],metadata:""}}e.MsgCreateGroup={typeUrl:"/cosmos.group.v1.MsgCreateGroup",encode(S,A=i.BinaryWriter.create()){S.admin!==""&&A.uint32(10).string(S.admin);for(const Q of S.members)n.MemberRequest.encode(Q,A.uint32(18).fork()).ldelim();return S.metadata!==""&&A.uint32(26).string(S.metadata),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=C();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.members.push(n.MemberRequest.decode(Q,Q.uint32()));break;case 3:G.metadata=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=C();return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),Array.isArray(S==null?void 0:S.members)&&(A.members=S.members.map(Q=>n.MemberRequest.fromJSON(Q))),(0,u.isSet)(S.metadata)&&(A.metadata=String(S.metadata)),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.members?A.members=S.members.map(Q=>Q?n.MemberRequest.toJSON(Q):void 0):A.members=[],S.metadata!==void 0&&(A.metadata=S.metadata),A},fromPartial(S){var Q;const A=C();return A.admin=S.admin??"",A.members=((Q=S.members)==null?void 0:Q.map(L=>n.MemberRequest.fromPartial(L)))||[],A.metadata=S.metadata??"",A}};function D(){return{groupId:BigInt(0)}}e.MsgCreateGroupResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupResponse",encode(S,A=i.BinaryWriter.create()){return S.groupId!==BigInt(0)&&A.uint32(8).uint64(S.groupId),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=D();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.groupId=Q.uint64();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=D();return(0,u.isSet)(S.groupId)&&(A.groupId=BigInt(S.groupId.toString())),A},toJSON(S){const A={};return S.groupId!==void 0&&(A.groupId=(S.groupId||BigInt(0)).toString()),A},fromPartial(S){const A=D();return S.groupId!==void 0&&S.groupId!==null&&(A.groupId=BigInt(S.groupId.toString())),A}};function _(){return{admin:"",groupId:BigInt(0),memberUpdates:[]}}e.MsgUpdateGroupMembers={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembers",encode(S,A=i.BinaryWriter.create()){S.admin!==""&&A.uint32(10).string(S.admin),S.groupId!==BigInt(0)&&A.uint32(16).uint64(S.groupId);for(const Q of S.memberUpdates)n.MemberRequest.encode(Q,A.uint32(26).fork()).ldelim();return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=_();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.groupId=Q.uint64();break;case 3:G.memberUpdates.push(n.MemberRequest.decode(Q,Q.uint32()));break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=_();
3return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),(0,u.isSet)(S.groupId)&&(A.groupId=BigInt(S.groupId.toString())),Array.isArray(S==null?void 0:S.memberUpdates)&&(A.memberUpdates=S.memberUpdates.map(Q=>n.MemberRequest.fromJSON(Q))),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.groupId!==void 0&&(A.groupId=(S.groupId||BigInt(0)).toString()),S.memberUpdates?A.memberUpdates=S.memberUpdates.map(Q=>Q?n.MemberRequest.toJSON(Q):void 0):A.memberUpdates=[],A},fromPartial(S){var Q;const A=_();return A.admin=S.admin??"",S.groupId!==void 0&&S.groupId!==null&&(A.groupId=BigInt(S.groupId.toString())),A.memberUpdates=((Q=S.memberUpdates)==null?void 0:Q.map(L=>n.MemberRequest.fromPartial(L)))||[],A}};function b(){return{}}e.MsgUpdateGroupMembersResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembersResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=b();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return b()},toJSON(S){return{}},fromPartial(S){return b()}};function f(){return{admin:"",groupId:BigInt(0),newAdmin:""}}e.MsgUpdateGroupAdmin={typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdmin",encode(S,A=i.BinaryWriter.create()){return S.admin!==""&&A.uint32(10).string(S.admin),S.groupId!==BigInt(0)&&A.uint32(16).uint64(S.groupId),S.newAdmin!==""&&A.uint32(26).string(S.newAdmin),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=f();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.groupId=Q.uint64();break;case 3:G.newAdmin=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=f();return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),(0,u.isSet)(S.groupId)&&(A.groupId=BigInt(S.groupId.toString())),(0,u.isSet)(S.newAdmin)&&(A.newAdmin=String(S.newAdmin)),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.groupId!==void 0&&(A.groupId=(S.groupId||BigInt(0)).toString()),S.newAdmin!==void 0&&(A.newAdmin=S.newAdmin),A},fromPartial(S){const A=f();return A.admin=S.admin??"",S.groupId!==void 0&&S.groupId!==null&&(A.groupId=BigInt(S.groupId.toString())),A.newAdmin=S.newAdmin??"",A}};function p(){return{}}e.MsgUpdateGroupAdminResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdminResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=p();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return p()},toJSON(S){return{}},fromPartial(S){return p()}};function k(){return{admin:"",groupId:BigInt(0),metadata:""}}e.MsgUpdateGroupMetadata={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadata",encode(S,A=i.BinaryWriter.create()){return S.admin!==""&&A.uint32(10).string(S.admin),S.groupId!==BigInt(0)&&A.uint32(16).uint64(S.groupId),S.metadata!==""&&A.uint32(26).string(S.metadata),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=k();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.groupId=Q.uint64();break;case 3:G.metadata=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=k();return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),(0,u.isSet)(S.groupId)&&(A.groupId=BigInt(S.groupId.toString())),(0,u.isSet)(S.metadata)&&(A.metadata=String(S.metadata)),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.groupId!==void 0&&(A.groupId=(S.groupId||BigInt(0)).toString()),S.metadata!==void 0&&(A.metadata=S.metadata),A},fromPartial(S){const A=k();return A.admin=S.admin??"",S.groupId!==void 0&&S.groupId!==null&&(A.groupId=BigInt(S.groupId.toString())),A.metadata=S.metadata??"",A}};function o(){return{}}e.MsgUpdateGroupMetadataResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadataResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);
3let L=A===void 0?Q.len:Q.pos+A;const G=o();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return o()},toJSON(S){return{}},fromPartial(S){return o()}};function s(){return{admin:"",groupId:BigInt(0),metadata:"",decisionPolicy:void 0}}e.MsgCreateGroupPolicy={typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicy",encode(S,A=i.BinaryWriter.create()){return S.admin!==""&&A.uint32(10).string(S.admin),S.groupId!==BigInt(0)&&A.uint32(16).uint64(S.groupId),S.metadata!==""&&A.uint32(26).string(S.metadata),S.decisionPolicy!==void 0&&t.Any.encode(S.decisionPolicy,A.uint32(34).fork()).ldelim(),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=s();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.groupId=Q.uint64();break;case 3:G.metadata=Q.string();break;case 4:G.decisionPolicy=t.Any.decode(Q,Q.uint32());break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=s();return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),(0,u.isSet)(S.groupId)&&(A.groupId=BigInt(S.groupId.toString())),(0,u.isSet)(S.metadata)&&(A.metadata=String(S.metadata)),(0,u.isSet)(S.decisionPolicy)&&(A.decisionPolicy=t.Any.fromJSON(S.decisionPolicy)),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.groupId!==void 0&&(A.groupId=(S.groupId||BigInt(0)).toString()),S.metadata!==void 0&&(A.metadata=S.metadata),S.decisionPolicy!==void 0&&(A.decisionPolicy=S.decisionPolicy?t.Any.toJSON(S.decisionPolicy):void 0),A},fromPartial(S){const A=s();return A.admin=S.admin??"",S.groupId!==void 0&&S.groupId!==null&&(A.groupId=BigInt(S.groupId.toString())),A.metadata=S.metadata??"",S.decisionPolicy!==void 0&&S.decisionPolicy!==null&&(A.decisionPolicy=t.Any.fromPartial(S.decisionPolicy)),A}};function y(){return{address:""}}e.MsgCreateGroupPolicyResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicyResponse",encode(S,A=i.BinaryWriter.create()){return S.address!==""&&A.uint32(10).string(S.address),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=y();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.address=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=y();return(0,u.isSet)(S.address)&&(A.address=String(S.address)),A},toJSON(S){const A={};return S.address!==void 0&&(A.address=S.address),A},fromPartial(S){const A=y();return A.address=S.address??"",A}};function w(){return{admin:"",groupPolicyAddress:"",newAdmin:""}}e.MsgUpdateGroupPolicyAdmin={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",encode(S,A=i.BinaryWriter.create()){return S.admin!==""&&A.uint32(10).string(S.admin),S.groupPolicyAddress!==""&&A.uint32(18).string(S.groupPolicyAddress),S.newAdmin!==""&&A.uint32(26).string(S.newAdmin),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=w();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.groupPolicyAddress=Q.string();break;case 3:G.newAdmin=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=w();return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),(0,u.isSet)(S.groupPolicyAddress)&&(A.groupPolicyAddress=String(S.groupPolicyAddress)),(0,u.isSet)(S.newAdmin)&&(A.newAdmin=String(S.newAdmin)),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.groupPolicyAddress!==void 0&&(A.groupPolicyAddress=S.groupPolicyAddress),S.newAdmin!==void 0&&(A.newAdmin=S.newAdmin),A},fromPartial(S){const A=w();return A.admin=S.admin??"",A.groupPolicyAddress=S.groupPolicyAddress??"",A.newAdmin=S.newAdmin??"",A}};function J(){return{}}e.MsgUpdateGroupPolicyAdminResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=J();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return J()},toJSON(S){return{}},fromPartial(S){return J()}};function P(){return{admin:"",members:[],groupMetadata:"",groupPolicyMetadata:"",groupPolicyAsAdmin:!1,decisionPolicy:void 0}}e.MsgCreateGroupWithPolicy={typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicy",encode(S,A=i.BinaryWriter.create()){S.admin!==""&&A.uint32(10).string(S.admin);for(const Q of S.members)n.MemberRequest.encode(Q,A.uint32(18).fork()).ldelim();return S.groupMetadata!==""&&A.uint32(26).string(S.groupMetadata),S.groupPolicyMetadata!==""&&A.uint32(34).string(S.groupPolicyMetadata),S.groupPolicyAsAdmin===!0&&A.uint32(40).bool(S.groupPolicyAsAdmin),S.decisionPolicy!==void 0&&t.Any.encode(S.decisionPolicy,A.uint32(50).fork()).ldelim(),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);
3let L=A===void 0?Q.len:Q.pos+A;const G=P();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.members.push(n.MemberRequest.decode(Q,Q.uint32()));break;case 3:G.groupMetadata=Q.string();break;case 4:G.groupPolicyMetadata=Q.string();break;case 5:G.groupPolicyAsAdmin=Q.bool();break;case 6:G.decisionPolicy=t.Any.decode(Q,Q.uint32());break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=P();return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),Array.isArray(S==null?void 0:S.members)&&(A.members=S.members.map(Q=>n.MemberRequest.fromJSON(Q))),(0,u.isSet)(S.groupMetadata)&&(A.groupMetadata=String(S.groupMetadata)),(0,u.isSet)(S.groupPolicyMetadata)&&(A.groupPolicyMetadata=String(S.groupPolicyMetadata)),(0,u.isSet)(S.groupPolicyAsAdmin)&&(A.groupPolicyAsAdmin=!!S.groupPolicyAsAdmin),(0,u.isSet)(S.decisionPolicy)&&(A.decisionPolicy=t.Any.fromJSON(S.decisionPolicy)),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.members?A.members=S.members.map(Q=>Q?n.MemberRequest.toJSON(Q):void 0):A.members=[],S.groupMetadata!==void 0&&(A.groupMetadata=S.groupMetadata),S.groupPolicyMetadata!==void 0&&(A.groupPolicyMetadata=S.groupPolicyMetadata),S.groupPolicyAsAdmin!==void 0&&(A.groupPolicyAsAdmin=S.groupPolicyAsAdmin),S.decisionPolicy!==void 0&&(A.decisionPolicy=S.decisionPolicy?t.Any.toJSON(S.decisionPolicy):void 0),A},fromPartial(S){var Q;const A=P();return A.admin=S.admin??"",A.members=((Q=S.members)==null?void 0:Q.map(L=>n.MemberRequest.fromPartial(L)))||[],A.groupMetadata=S.groupMetadata??"",A.groupPolicyMetadata=S.groupPolicyMetadata??"",A.groupPolicyAsAdmin=S.groupPolicyAsAdmin??!1,S.decisionPolicy!==void 0&&S.decisionPolicy!==null&&(A.decisionPolicy=t.Any.fromPartial(S.decisionPolicy)),A}};function U(){return{groupId:BigInt(0),groupPolicyAddress:""}}e.MsgCreateGroupWithPolicyResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicyResponse",encode(S,A=i.BinaryWriter.create()){return S.groupId!==BigInt(0)&&A.uint32(8).uint64(S.groupId),S.groupPolicyAddress!==""&&A.uint32(18).string(S.groupPolicyAddress),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=U();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.groupId=Q.uint64();break;case 2:G.groupPolicyAddress=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=U();return(0,u.isSet)(S.groupId)&&(A.groupId=BigInt(S.groupId.toString())),(0,u.isSet)(S.groupPolicyAddress)&&(A.groupPolicyAddress=String(S.groupPolicyAddress)),A},toJSON(S){const A={};return S.groupId!==void 0&&(A.groupId=(S.groupId||BigInt(0)).toString()),S.groupPolicyAddress!==void 0&&(A.groupPolicyAddress=S.groupPolicyAddress),A},fromPartial(S){const A=U();return S.groupId!==void 0&&S.groupId!==null&&(A.groupId=BigInt(S.groupId.toString())),A.groupPolicyAddress=S.groupPolicyAddress??"",A}};function r(){return{admin:"",groupPolicyAddress:"",decisionPolicy:void 0}}e.MsgUpdateGroupPolicyDecisionPolicy={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",encode(S,A=i.BinaryWriter.create()){return S.admin!==""&&A.uint32(10).string(S.admin),S.groupPolicyAddress!==""&&A.uint32(18).string(S.groupPolicyAddress),S.decisionPolicy!==void 0&&t.Any.encode(S.decisionPolicy,A.uint32(26).fork()).ldelim(),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=r();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.groupPolicyAddress=Q.string();break;case 3:G.decisionPolicy=t.Any.decode(Q,Q.uint32());break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=r();return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),(0,u.isSet)(S.groupPolicyAddress)&&(A.groupPolicyAddress=String(S.groupPolicyAddress)),(0,u.isSet)(S.decisionPolicy)&&(A.decisionPolicy=t.Any.fromJSON(S.decisionPolicy)),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.groupPolicyAddress!==void 0&&(A.groupPolicyAddress=S.groupPolicyAddress),S.decisionPolicy!==void 0&&(A.decisionPolicy=S.decisionPolicy?t.Any.toJSON(S.decisionPolicy):void 0),A},fromPartial(S){const A=r();return A.admin=S.admin??"",A.groupPolicyAddress=S.groupPolicyAddress??"",S.decisionPolicy!==void 0&&S.decisionPolicy!==null&&(A.decisionPolicy=t.Any.fromPartial(S.decisionPolicy)),A}};function m(){return{}}e.MsgUpdateGroupPolicyDecisionPolicyResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);
3let L=A===void 0?Q.len:Q.pos+A;const G=m();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return m()},toJSON(S){return{}},fromPartial(S){return m()}};function N(){return{admin:"",groupPolicyAddress:"",metadata:""}}e.MsgUpdateGroupPolicyMetadata={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",encode(S,A=i.BinaryWriter.create()){return S.admin!==""&&A.uint32(10).string(S.admin),S.groupPolicyAddress!==""&&A.uint32(18).string(S.groupPolicyAddress),S.metadata!==""&&A.uint32(26).string(S.metadata),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=N();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.admin=Q.string();break;case 2:G.groupPolicyAddress=Q.string();break;case 3:G.metadata=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=N();return(0,u.isSet)(S.admin)&&(A.admin=String(S.admin)),(0,u.isSet)(S.groupPolicyAddress)&&(A.groupPolicyAddress=String(S.groupPolicyAddress)),(0,u.isSet)(S.metadata)&&(A.metadata=String(S.metadata)),A},toJSON(S){const A={};return S.admin!==void 0&&(A.admin=S.admin),S.groupPolicyAddress!==void 0&&(A.groupPolicyAddress=S.groupPolicyAddress),S.metadata!==void 0&&(A.metadata=S.metadata),A},fromPartial(S){const A=N();return A.admin=S.admin??"",A.groupPolicyAddress=S.groupPolicyAddress??"",A.metadata=S.metadata??"",A}};function V(){return{}}e.MsgUpdateGroupPolicyMetadataResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=V();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return V()},toJSON(S){return{}},fromPartial(S){return V()}};function d(){return{groupPolicyAddress:"",proposers:[],metadata:"",messages:[],exec:0,title:"",summary:""}}e.MsgSubmitProposal={typeUrl:"/cosmos.group.v1.MsgSubmitProposal",encode(S,A=i.BinaryWriter.create()){S.groupPolicyAddress!==""&&A.uint32(10).string(S.groupPolicyAddress);for(const Q of S.proposers)A.uint32(18).string(Q);S.metadata!==""&&A.uint32(26).string(S.metadata);for(const Q of S.messages)t.Any.encode(Q,A.uint32(34).fork()).ldelim();return S.exec!==0&&A.uint32(40).int32(S.exec),S.title!==""&&A.uint32(50).string(S.title),S.summary!==""&&A.uint32(58).string(S.summary),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=d();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.groupPolicyAddress=Q.string();break;case 2:G.proposers.push(Q.string());break;case 3:G.metadata=Q.string();break;case 4:G.messages.push(t.Any.decode(Q,Q.uint32()));break;case 5:G.exec=Q.int32();break;case 6:G.title=Q.string();break;case 7:G.summary=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=d();return(0,u.isSet)(S.groupPolicyAddress)&&(A.groupPolicyAddress=String(S.groupPolicyAddress)),Array.isArray(S==null?void 0:S.proposers)&&(A.proposers=S.proposers.map(Q=>String(Q))),(0,u.isSet)(S.metadata)&&(A.metadata=String(S.metadata)),Array.isArray(S==null?void 0:S.messages)&&(A.messages=S.messages.map(Q=>t.Any.fromJSON(Q))),(0,u.isSet)(S.exec)&&(A.exec=v(S.exec)),(0,u.isSet)(S.title)&&(A.title=String(S.title)),(0,u.isSet)(S.summary)&&(A.summary=String(S.summary)),A},toJSON(S){const A={};return S.groupPolicyAddress!==void 0&&(A.groupPolicyAddress=S.groupPolicyAddress),S.proposers?A.proposers=S.proposers.map(Q=>Q):A.proposers=[],S.metadata!==void 0&&(A.metadata=S.metadata),S.messages?A.messages=S.messages.map(Q=>Q?t.Any.toJSON(Q):void 0):A.messages=[],S.exec!==void 0&&(A.exec=E(S.exec)),S.title!==void 0&&(A.title=S.title),S.summary!==void 0&&(A.summary=S.summary),A},fromPartial(S){var Q,L;const A=d();return A.groupPolicyAddress=S.groupPolicyAddress??"",A.proposers=((Q=S.proposers)==null?void 0:Q.map(G=>G))||[],A.metadata=S.metadata??"",A.messages=((L=S.messages)==null?void 0:L.map(G=>t.Any.fromPartial(G)))||[],A.exec=S.exec??0,A.title=S.title??"",A.summary=S.summary??"",A}};function l(){return{proposalId:BigInt(0)}}e.MsgSubmitProposalResponse={typeUrl:"/cosmos.group.v1.MsgSubmitProposalResponse",encode(S,A=i.BinaryWriter.create()){return S.proposalId!==BigInt(0)&&A.uint32(8).uint64(S.proposalId),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);
3let L=A===void 0?Q.len:Q.pos+A;const G=l();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.proposalId=Q.uint64();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=l();return(0,u.isSet)(S.proposalId)&&(A.proposalId=BigInt(S.proposalId.toString())),A},toJSON(S){const A={};return S.proposalId!==void 0&&(A.proposalId=(S.proposalId||BigInt(0)).toString()),A},fromPartial(S){const A=l();return S.proposalId!==void 0&&S.proposalId!==null&&(A.proposalId=BigInt(S.proposalId.toString())),A}};function T(){return{proposalId:BigInt(0),address:""}}e.MsgWithdrawProposal={typeUrl:"/cosmos.group.v1.MsgWithdrawProposal",encode(S,A=i.BinaryWriter.create()){return S.proposalId!==BigInt(0)&&A.uint32(8).uint64(S.proposalId),S.address!==""&&A.uint32(18).string(S.address),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=T();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.proposalId=Q.uint64();break;case 2:G.address=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=T();return(0,u.isSet)(S.proposalId)&&(A.proposalId=BigInt(S.proposalId.toString())),(0,u.isSet)(S.address)&&(A.address=String(S.address)),A},toJSON(S){const A={};return S.proposalId!==void 0&&(A.proposalId=(S.proposalId||BigInt(0)).toString()),S.address!==void 0&&(A.address=S.address),A},fromPartial(S){const A=T();return S.proposalId!==void 0&&S.proposalId!==null&&(A.proposalId=BigInt(S.proposalId.toString())),A.address=S.address??"",A}};function O(){return{}}e.MsgWithdrawProposalResponse={typeUrl:"/cosmos.group.v1.MsgWithdrawProposalResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=O();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return O()},toJSON(S){return{}},fromPartial(S){return O()}};function B(){return{proposalId:BigInt(0),voter:"",option:0,metadata:"",exec:0}}e.MsgVote={typeUrl:"/cosmos.group.v1.MsgVote",encode(S,A=i.BinaryWriter.create()){return S.proposalId!==BigInt(0)&&A.uint32(8).uint64(S.proposalId),S.voter!==""&&A.uint32(18).string(S.voter),S.option!==0&&A.uint32(24).int32(S.option),S.metadata!==""&&A.uint32(34).string(S.metadata),S.exec!==0&&A.uint32(40).int32(S.exec),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=B();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.proposalId=Q.uint64();break;case 2:G.voter=Q.string();break;case 3:G.option=Q.int32();break;case 4:G.metadata=Q.string();break;case 5:G.exec=Q.int32();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=B();return(0,u.isSet)(S.proposalId)&&(A.proposalId=BigInt(S.proposalId.toString())),(0,u.isSet)(S.voter)&&(A.voter=String(S.voter)),(0,u.isSet)(S.option)&&(A.option=(0,n.voteOptionFromJSON)(S.option)),(0,u.isSet)(S.metadata)&&(A.metadata=String(S.metadata)),(0,u.isSet)(S.exec)&&(A.exec=v(S.exec)),A},toJSON(S){const A={};return S.proposalId!==void 0&&(A.proposalId=(S.proposalId||BigInt(0)).toString()),S.voter!==void 0&&(A.voter=S.voter),S.option!==void 0&&(A.option=(0,n.voteOptionToJSON)(S.option)),S.metadata!==void 0&&(A.metadata=S.metadata),S.exec!==void 0&&(A.exec=E(S.exec)),A},fromPartial(S){const A=B();return S.proposalId!==void 0&&S.proposalId!==null&&(A.proposalId=BigInt(S.proposalId.toString())),A.voter=S.voter??"",A.option=S.option??0,A.metadata=S.metadata??"",A.exec=S.exec??0,A}};function M(){return{}}e.MsgVoteResponse={typeUrl:"/cosmos.group.v1.MsgVoteResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=M();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return M()},toJSON(S){return{}},fromPartial(S){return M()}};function W(){return{proposalId:BigInt(0),executor:""}}e.MsgExec={typeUrl:"/cosmos.group.v1.MsgExec",encode(S,A=i.BinaryWriter.create()){return S.proposalId!==BigInt(0)&&A.uint32(8).uint64(S.proposalId),S.executor!==""&&A.uint32(18).string(S.executor),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);
3let L=A===void 0?Q.len:Q.pos+A;const G=W();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.proposalId=Q.uint64();break;case 2:G.executor=Q.string();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=W();return(0,u.isSet)(S.proposalId)&&(A.proposalId=BigInt(S.proposalId.toString())),(0,u.isSet)(S.executor)&&(A.executor=String(S.executor)),A},toJSON(S){const A={};return S.proposalId!==void 0&&(A.proposalId=(S.proposalId||BigInt(0)).toString()),S.executor!==void 0&&(A.executor=S.executor),A},fromPartial(S){const A=W();return S.proposalId!==void 0&&S.proposalId!==null&&(A.proposalId=BigInt(S.proposalId.toString())),A.executor=S.executor??"",A}};function H(){return{result:0}}e.MsgExecResponse={typeUrl:"/cosmos.group.v1.MsgExecResponse",encode(S,A=i.BinaryWriter.create()){return S.result!==0&&A.uint32(16).int32(S.result),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=H();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 2:G.result=Q.int32();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=H();return(0,u.isSet)(S.result)&&(A.result=(0,n.proposalExecutorResultFromJSON)(S.result)),A},toJSON(S){const A={};return S.result!==void 0&&(A.result=(0,n.proposalExecutorResultToJSON)(S.result)),A},fromPartial(S){const A=H();return A.result=S.result??0,A}};function a(){return{address:"",groupId:BigInt(0)}}e.MsgLeaveGroup={typeUrl:"/cosmos.group.v1.MsgLeaveGroup",encode(S,A=i.BinaryWriter.create()){return S.address!==""&&A.uint32(10).string(S.address),S.groupId!==BigInt(0)&&A.uint32(16).uint64(S.groupId),A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=a();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){case 1:G.address=Q.string();break;case 2:G.groupId=Q.uint64();break;default:Q.skipType(j&7);break}}return G},fromJSON(S){const A=a();return(0,u.isSet)(S.address)&&(A.address=String(S.address)),(0,u.isSet)(S.groupId)&&(A.groupId=BigInt(S.groupId.toString())),A},toJSON(S){const A={};return S.address!==void 0&&(A.address=S.address),S.groupId!==void 0&&(A.groupId=(S.groupId||BigInt(0)).toString()),A},fromPartial(S){const A=a();return A.address=S.address??"",S.groupId!==void 0&&S.groupId!==null&&(A.groupId=BigInt(S.groupId.toString())),A}};function g(){return{}}e.MsgLeaveGroupResponse={typeUrl:"/cosmos.group.v1.MsgLeaveGroupResponse",encode(S,A=i.BinaryWriter.create()){return A},decode(S,A){const Q=S instanceof i.BinaryReader?S:new i.BinaryReader(S);let L=A===void 0?Q.len:Q.pos+A;const G=g();for(;Q.pos<L;){const j=Q.uint32();switch(j>>>3){default:Q.skipType(j&7);break}}return G},fromJSON(S){return g()},toJSON(S){return{}},fromPartial(S){return g()}};class h{constructor(A){this.rpc=A,this.CreateGroup=this.CreateGroup.bind(this),this.UpdateGroupMembers=this.UpdateGroupMembers.bind(this),this.UpdateGroupAdmin=this.UpdateGroupAdmin.bind(this),this.UpdateGroupMetadata=this.UpdateGroupMetadata.bind(this),this.CreateGroupPolicy=this.CreateGroupPolicy.bind(this),this.CreateGroupWithPolicy=this.CreateGroupWithPolicy.bind(this),this.UpdateGroupPolicyAdmin=this.UpdateGroupPolicyAdmin.bind(this),this.UpdateGroupPolicyDecisionPolicy=this.UpdateGroupPolicyDecisionPolicy.bind(this),this.UpdateGroupPolicyMetadata=this.UpdateGroupPolicyMetadata.bind(this),this.SubmitProposal=this.SubmitProposal.bind(this),this.WithdrawProposal=this.WithdrawProposal.bind(this),this.Vote=this.Vote.bind(this),this.Exec=this.Exec.bind(this),this.LeaveGroup=this.LeaveGroup.bind(this)}CreateGroup(A){const Q=e.MsgCreateGroup.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroup",Q).then(G=>e.MsgCreateGroupResponse.decode(new i.BinaryReader(G)))}UpdateGroupMembers(A){const Q=e.MsgUpdateGroupMembers.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupMembers",Q).then(G=>e.MsgUpdateGroupMembersResponse.decode(new i.BinaryReader(G)))}UpdateGroupAdmin(A){const Q=e.MsgUpdateGroupAdmin.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupAdmin",Q).then(G=>e.MsgUpdateGroupAdminResponse.decode(new i.BinaryReader(G)))}UpdateGroupMetadata(A){const Q=e.MsgUpdateGroupMetadata.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupMetadata",Q).then(G=>e.MsgUpdateGroupMetadataResponse.decode(new i.BinaryReader(G)))}CreateGroupPolicy(A){const Q=e.MsgCreateGroupPolicy.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroupPolicy",Q).then(G=>e.MsgCreateGroupPolicyResponse.decode(new i.BinaryReader(G)))}CreateGroupWithPolicy(A){const Q=e.MsgCreateGroupWithPolicy.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroupWithPolicy",Q).then(G=>e.MsgCreateGroupWithPolicyResponse.decode(new i.BinaryReader(G)))}UpdateGroupPolicyAdmin(A){const Q=e.MsgUpdateGroupPolicyAdmin.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyAdmin",Q).then(G=>e.MsgUpdateGroupPolicyAdminResponse.decode(new i.BinaryReader(G)))}UpdateGroupPolicyDecisionPolicy(A){const Q=e.MsgUpdateGroupPolicyDecisionPolicy.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyDecisionPolicy",Q).then(G=>e.MsgUpdateGroupPolicyDecisionPolicyResponse.decode(new i.BinaryReader(G)))}UpdateGroupPolicyMetadata(A){const Q=e.MsgUpdateGroupPolicyMetadata.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyMetadata",Q).then(G=>e.MsgUpdateGroupPolicyMetadataResponse.decode(new i.BinaryReader(G)))}SubmitProposal(A){const Q=e.MsgSubmitProposal.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","SubmitProposal",Q).then(G=>e.MsgSubmitProposalResponse.decode(new i.BinaryReader(G)))}WithdrawProposal(A){const Q=e.MsgWithdrawProposal.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","WithdrawProposal",Q).then(G=>e.MsgWithdrawProposalResponse.decode(new i.BinaryReader(G)))}
3Vote(A){const Q=e.MsgVote.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","Vote",Q).then(G=>e.MsgVoteResponse.decode(new i.BinaryReader(G)))}Exec(A){const Q=e.MsgExec.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","Exec",Q).then(G=>e.MsgExecResponse.decode(new i.BinaryReader(G)))}LeaveGroup(A){const Q=e.MsgLeaveGroup.encode(A).finish();return this.rpc.request("cosmos.group.v1.Msg","LeaveGroup",Q).then(G=>e.MsgLeaveGroupResponse.decode(new i.BinaryReader(G)))}}e.MsgClientImpl=h})(Ol);Object.defineProperty(ya,"__esModule",{value:!0});ya.groupTypes=void 0;const ze=Ol;ya.groupTypes=[["/cosmos.group.v1.MsgCreateGroup",ze.MsgCreateGroup],["/cosmos.group.v1.MsgCreateGroupPolicy",ze.MsgCreateGroupPolicy],["/cosmos.group.v1.MsgCreateGroupWithPolicy",ze.MsgCreateGroupWithPolicy],["/cosmos.group.v1.MsgExec",ze.MsgExec],["/cosmos.group.v1.MsgLeaveGroup",ze.MsgLeaveGroup],["/cosmos.group.v1.MsgSubmitProposal",ze.MsgSubmitProposal],["/cosmos.group.v1.MsgUpdateGroupAdmin",ze.MsgUpdateGroupAdmin],["/cosmos.group.v1.MsgUpdateGroupMembers",ze.MsgUpdateGroupMembers],["/cosmos.group.v1.MsgUpdateGroupMetadata",ze.MsgUpdateGroupMetadata],["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",ze.MsgUpdateGroupPolicyAdmin],["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",ze.MsgUpdateGroupPolicyDecisionPolicy],["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",ze.MsgUpdateGroupPolicyMetadata],["/cosmos.group.v1.MsgVote",ze.MsgVote],["/cosmos.group.v1.MsgWithdrawProposal",ze.MsgWithdrawProposal]];var Wr={},ha={},at={},Al={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ModuleVersion=e.CancelSoftwareUpgradeProposal=e.SoftwareUpgradeProposal=e.Plan=e.protobufPackage=void 0;const n=Me,t=Re,i=te,u=ee;e.protobufPackage="cosmos.upgrade.v1beta1";function R(){return{name:"",time:n.Timestamp.fromPartial({}),height:BigInt(0),info:"",upgradedClientState:void 0}}e.Plan={typeUrl:"/cosmos.upgrade.v1beta1.Plan",encode(D,_=i.BinaryWriter.create()){return D.name!==""&&_.uint32(10).string(D.name),D.time!==void 0&&n.Timestamp.encode(D.time,_.uint32(18).fork()).ldelim(),D.height!==BigInt(0)&&_.uint32(24).int64(D.height),D.info!==""&&_.uint32(34).string(D.info),D.upgradedClientState!==void 0&&t.Any.encode(D.upgradedClientState,_.uint32(42).fork()).ldelim(),_},decode(D,_){const b=D instanceof i.BinaryReader?D:new i.BinaryReader(D);let f=_===void 0?b.len:b.pos+_;const p=R();for(;b.pos<f;){const k=b.uint32();switch(k>>>3){case 1:p.name=b.string();break;case 2:p.time=n.Timestamp.decode(b,b.uint32());break;case 3:p.height=b.int64();break;case 4:p.info=b.string();break;case 5:p.upgradedClientState=t.Any.decode(b,b.uint32());break;default:b.skipType(k&7);break}}return p},fromJSON(D){const _=R();return(0,u.isSet)(D.name)&&(_.name=String(D.name)),(0,u.isSet)(D.time)&&(_.time=(0,u.fromJsonTimestamp)(D.time)),(0,u.isSet)(D.height)&&(_.height=BigInt(D.height.toString())),(0,u.isSet)(D.info)&&(_.info=String(D.info)),(0,u.isSet)(D.upgradedClientState)&&(_.upgradedClientState=t.Any.fromJSON(D.upgradedClientState)),_},toJSON(D){const _={};return D.name!==void 0&&(_.name=D.name),D.time!==void 0&&(_.time=(0,u.fromTimestamp)(D.time).toISOString()),D.height!==void 0&&(_.height=(D.height||BigInt(0)).toString()),D.info!==void 0&&(_.info=D.info),D.upgradedClientState!==void 0&&(_.upgradedClientState=D.upgradedClientState?t.Any.toJSON(D.upgradedClientState):void 0),_},fromPartial(D){const _=R();return _.name=D.name??"",D.time!==void 0&&D.time!==null&&(_.time=n.Timestamp.fromPartial(D.time)),D.height!==void 0&&D.height!==null&&(_.height=BigInt(D.height.toString())),_.info=D.info??"",D.upgradedClientState!==void 0&&D.upgradedClientState!==null&&(_.upgradedClientState=t.Any.fromPartial(D.upgradedClientState)),_}};function v(){return{title:"",description:"",plan:e.Plan.fromPartial({})}}e.SoftwareUpgradeProposal={typeUrl:"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",encode(D,_=i.BinaryWriter.create()){return D.title!==""&&_.uint32(10).string(D.title),D.description!==""&&_.uint32(18).string(D.description),D.plan!==void 0&&e.Plan.encode(D.plan,_.uint32(26).fork()).ldelim(),_},decode(D,_){const b=D instanceof i.BinaryReader?D:new i.BinaryReader(D);let f=_===void 0?b.len:b.pos+_;const p=v();for(;b.pos<f;){const k=b.uint32();switch(k>>>3){case 1:p.title=b.string();break;case 2:p.description=b.string();break;case 3:p.plan=e.Plan.decode(b,b.uint32());break;default:b.skipType(k&7);break}}return p},fromJSON(D){const _=v();return(0,u.isSet)(D.title)&&(_.title=String(D.title)),(0,u.isSet)(D.description)&&(_.description=String(D.description)),(0,u.
3isSet)(D.plan)&&(_.plan=e.Plan.fromJSON(D.plan)),_},toJSON(D){const _={};return D.title!==void 0&&(_.title=D.title),D.description!==void 0&&(_.description=D.description),D.plan!==void 0&&(_.plan=D.plan?e.Plan.toJSON(D.plan):void 0),_},fromPartial(D){const _=v();return _.title=D.title??"",_.description=D.description??"",D.plan!==void 0&&D.plan!==null&&(_.plan=e.Plan.fromPartial(D.plan)),_}};function E(){return{title:"",description:""}}e.CancelSoftwareUpgradeProposal={typeUrl:"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",encode(D,_=i.BinaryWriter.create()){return D.title!==""&&_.uint32(10).string(D.title),D.description!==""&&_.uint32(18).string(D.description),_},decode(D,_){const b=D instanceof i.BinaryReader?D:new i.BinaryReader(D);let f=_===void 0?b.len:b.pos+_;const p=E();for(;b.pos<f;){const k=b.uint32();switch(k>>>3){case 1:p.title=b.string();break;case 2:p.description=b.string();break;default:b.skipType(k&7);break}}return p},fromJSON(D){const _=E();return(0,u.isSet)(D.title)&&(_.title=String(D.title)),(0,u.isSet)(D.description)&&(_.description=String(D.description)),_},toJSON(D){const _={};return D.title!==void 0&&(_.title=D.title),D.description!==void 0&&(_.description=D.description),_},fromPartial(D){const _=E();return _.title=D.title??"",_.description=D.description??"",_}};function C(){return{name:"",version:BigInt(0)}}e.ModuleVersion={typeUrl:"/cosmos.upgrade.v1beta1.ModuleVersion",encode(D,_=i.BinaryWriter.create()){return D.name!==""&&_.uint32(10).string(D.name),D.version!==BigInt(0)&&_.uint32(16).uint64(D.version),_},decode(D,_){const b=D instanceof i.BinaryReader?D:new i.BinaryReader(D);let f=_===void 0?b.len:b.pos+_;const p=C();for(;b.pos<f;){const k=b.uint32();switch(k>>>3){case 1:p.name=b.string();break;case 2:p.version=b.uint64();break;default:b.skipType(k&7);break}}return p},fromJSON(D){const _=C();return(0,u.isSet)(D.name)&&(_.name=String(D.name)),(0,u.isSet)(D.version)&&(_.version=BigInt(D.version.toString())),_},toJSON(D){const _={};return D.name!==void 0&&(_.name=D.name),D.version!==void 0&&(_.version=(D.version||BigInt(0)).toString()),_},fromPartial(D){const _=C();return _.name=D.name??"",D.version!==void 0&&D.version!==null&&(_.version=BigInt(D.version.toString())),_}}})(Al);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Params=e.Height=e.UpgradeProposal=e.ClientUpdateProposal=e.ClientConsensusStates=e.ConsensusStateWithHeight=e.IdentifiedClientState=e.protobufPackage=void 0;const n=Re,t=Al,i=te,u=ee;e.protobufPackage="ibc.core.client.v1";function R(){return{clientId:"",clientState:void 0}}e.IdentifiedClientState={typeUrl:"/ibc.core.client.v1.IdentifiedClientState",encode(f,p=i.BinaryWriter.create()){return f.clientId!==""&&p.uint32(10).string(f.clientId),f.clientState!==void 0&&n.Any.encode(f.clientState,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=R();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.clientId=k.string();break;case 2:s.clientState=n.Any.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=R();return(0,u.isSet)(f.clientId)&&(p.clientId=String(f.clientId)),(0,u.isSet)(f.clientState)&&(p.clientState=n.Any.fromJSON(f.clientState)),p},toJSON(f){const p={};return f.clientId!==void 0&&(p.clientId=f.clientId),f.clientState!==void 0&&(p.clientState=f.clientState?n.Any.toJSON(f.clientState):void 0),p},fromPartial(f){const p=R();return p.clientId=f.clientId??"",f.clientState!==void 0&&f.clientState!==null&&(p.clientState=n.Any.fromPartial(f.clientState)),p}};function v(){return{height:e.Height.fromPartial({}),consensusState:void 0}}e.ConsensusStateWithHeight={typeUrl:"/ibc.core.client.v1.ConsensusStateWithHeight",encode(f,p=i.BinaryWriter.create()){return f.height!==void 0&&e.Height.encode(f.height,p.uint32(10).fork()).ldelim(),f.consensusState!==void 0&&n.Any.encode(f.consensusState,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=v();for(;k.pos<o;){const y=k.uint32();switch(y>>>
33){case 1:s.height=e.Height.decode(k,k.uint32());break;case 2:s.consensusState=n.Any.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=v();return(0,u.isSet)(f.height)&&(p.height=e.Height.fromJSON(f.height)),(0,u.isSet)(f.consensusState)&&(p.consensusState=n.Any.fromJSON(f.consensusState)),p},toJSON(f){const p={};return f.height!==void 0&&(p.height=f.height?e.Height.toJSON(f.height):void 0),f.consensusState!==void 0&&(p.consensusState=f.consensusState?n.Any.toJSON(f.consensusState):void 0),p},fromPartial(f){const p=v();return f.height!==void 0&&f.height!==null&&(p.height=e.Height.fromPartial(f.height)),f.consensusState!==void 0&&f.consensusState!==null&&(p.consensusState=n.Any.fromPartial(f.consensusState)),p}};function E(){return{clientId:"",consensusStates:[]}}e.ClientConsensusStates={typeUrl:"/ibc.core.client.v1.ClientConsensusStates",encode(f,p=i.BinaryWriter.create()){f.clientId!==""&&p.uint32(10).string(f.clientId);for(const k of f.consensusStates)e.ConsensusStateWithHeight.encode(k,p.uint32(18).fork()).ldelim();return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=E();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.clientId=k.string();break;case 2:s.consensusStates.push(e.ConsensusStateWithHeight.decode(k,k.uint32()));break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=E();return(0,u.isSet)(f.clientId)&&(p.clientId=String(f.clientId)),Array.isArray(f==null?void 0:f.consensusStates)&&(p.consensusStates=f.consensusStates.map(k=>e.ConsensusStateWithHeight.fromJSON(k))),p},toJSON(f){const p={};return f.clientId!==void 0&&(p.clientId=f.clientId),f.consensusStates?p.consensusStates=f.consensusStates.map(k=>k?e.ConsensusStateWithHeight.toJSON(k):void 0):p.consensusStates=[],p},fromPartial(f){var k;const p=E();return p.clientId=f.clientId??"",p.consensusStates=((k=f.consensusStates)==null?void 0:k.map(o=>e.ConsensusStateWithHeight.fromPartial(o)))||[],p}};function C(){return{title:"",description:"",subjectClientId:"",substituteClientId:""}}e.ClientUpdateProposal={typeUrl:"/ibc.core.client.v1.ClientUpdateProposal",encode(f,p=i.BinaryWriter.create()){return f.title!==""&&p.uint32(10).string(f.title),f.description!==""&&p.uint32(18).string(f.description),f.subjectClientId!==""&&p.uint32(26).string(f.subjectClientId),f.substituteClientId!==""&&p.uint32(34).string(f.substituteClientId),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=C();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.title=k.string();break;case 2:s.description=k.string();break;case 3:s.subjectClientId=k.string();break;case 4:s.substituteClientId=k.string();break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=C();return(0,u.isSet)(f.title)&&(p.title=String(f.title)),(0,u.isSet)(f.description)&&(p.description=String(f.description)),(0,u.isSet)(f.subjectClientId)&&(p.subjectClientId=String(f.subjectClientId)),(0,u.isSet)(f.substituteClientId)&&(p.substituteClientId=String(f.substituteClientId)),p},toJSON(f){const p={};return f.title!==void 0&&(p.title=f.title),f.description!==void 0&&(p.description=f.description),f.subjectClientId!==void 0&&(p.subjectClientId=f.subjectClientId),f.substituteClientId!==void 0&&(p.substituteClientId=f.substituteClientId),p},fromPartial(f){const p=C();return p.title=f.title??"",p.description=f.description??"",p.subjectClientId=f.subjectClientId??"",p.substituteClientId=f.substituteClientId??"",p}};function D(){return{title:"",description:"",plan:t.Plan.fromPartial({}),upgradedClientState:void 0}}e.UpgradeProposal={typeUrl:"/ibc.core.client.v1.UpgradeProposal",encode(f,p=i.BinaryWriter.create()){return f.title!==""&&p.uint32(10).string(f.title),f.description!==""&&p.uint32(18).string(f.description),f.plan!==void 0&&t.Plan.encode(f.plan,p.uint32(26).fork()).ldelim(),f.upgradedClientState!==void 0&&n.Any.encode(f.upgradedClientState,p.uint32(34).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=D();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.title=k.string();break;case 2:s.description=k.string();break;case 3:s.plan=t.Plan.decode(k,k.uint32());break;case 4:s.upgradedClientState=n.Any.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=D();return(0,u.isSet)(f.title)&&(p.title=String(f.title)),(0,u.isSet)(f.description)&&(p.description=String(f.description)),(0,u.
3isSet)(f.plan)&&(p.plan=t.Plan.fromJSON(f.plan)),(0,u.isSet)(f.upgradedClientState)&&(p.upgradedClientState=n.Any.fromJSON(f.upgradedClientState)),p},toJSON(f){const p={};return f.title!==void 0&&(p.title=f.title),f.description!==void 0&&(p.description=f.description),f.plan!==void 0&&(p.plan=f.plan?t.Plan.toJSON(f.plan):void 0),f.upgradedClientState!==void 0&&(p.upgradedClientState=f.upgradedClientState?n.Any.toJSON(f.upgradedClientState):void 0),p},fromPartial(f){const p=D();return p.title=f.title??"",p.description=f.description??"",f.plan!==void 0&&f.plan!==null&&(p.plan=t.Plan.fromPartial(f.plan)),f.upgradedClientState!==void 0&&f.upgradedClientState!==null&&(p.upgradedClientState=n.Any.fromPartial(f.upgradedClientState)),p}};function _(){return{revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}e.Height={typeUrl:"/ibc.core.client.v1.Height",encode(f,p=i.BinaryWriter.create()){return f.revisionNumber!==BigInt(0)&&p.uint32(8).uint64(f.revisionNumber),f.revisionHeight!==BigInt(0)&&p.uint32(16).uint64(f.revisionHeight),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=_();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.revisionNumber=k.uint64();break;case 2:s.revisionHeight=k.uint64();break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=_();return(0,u.isSet)(f.revisionNumber)&&(p.revisionNumber=BigInt(f.revisionNumber.toString())),(0,u.isSet)(f.revisionHeight)&&(p.revisionHeight=BigInt(f.revisionHeight.toString())),p},toJSON(f){const p={};return f.revisionNumber!==void 0&&(p.revisionNumber=(f.revisionNumber||BigInt(0)).toString()),f.revisionHeight!==void 0&&(p.revisionHeight=(f.revisionHeight||BigInt(0)).toString()),p},fromPartial(f){const p=_();return f.revisionNumber!==void 0&&f.revisionNumber!==null&&(p.revisionNumber=BigInt(f.revisionNumber.toString())),f.revisionHeight!==void 0&&f.revisionHeight!==null&&(p.revisionHeight=BigInt(f.revisionHeight.toString())),p}};function b(){return{allowedClients:[]}}e.Params={typeUrl:"/ibc.core.client.v1.Params",encode(f,p=i.BinaryWriter.create()){for(const k of f.allowedClients)p.uint32(10).string(k);return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=b();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.allowedClients.push(k.string());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=b();return Array.isArray(f==null?void 0:f.allowedClients)&&(p.allowedClients=f.allowedClients.map(k=>String(k))),p},toJSON(f){const p={};return f.allowedClients?p.allowedClients=f.allowedClients.map(k=>k):p.allowedClients=[],p},fromPartial(f){var k;const p=b();return p.allowedClients=((k=f.allowedClients)==null?void 0:k.map(o=>o))||[],p}}})(at);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgTransferResponse=e.MsgTransfer=e.protobufPackage=void 0;const n=ve,t=at,i=te,u=ee;e.protobufPackage="ibc.applications.transfer.v1";function R(){return{sourcePort:"",sourceChannel:"",token:n.Coin.fromPartial({}),sender:"",receiver:"",timeoutHeight:t.Height.fromPartial({}),timeoutTimestamp:BigInt(0),memo:""}}e.MsgTransfer={typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",encode(C,D=i.BinaryWriter.create()){return C.sourcePort!==""&&D.uint32(10).string(C.sourcePort),C.sourceChannel!==""&&D.uint32(18).string(C.sourceChannel),C.token!==void 0&&n.Coin.encode(C.token,D.uint32(26).fork()).ldelim(),C.sender!==""&&D.uint32(34).string(C.sender),C.receiver!==""&&D.uint32(42).string(C.receiver),C.timeoutHeight!==void 0&&t.Height.encode(C.timeoutHeight,D.uint32(50).fork()).ldelim(),C.timeoutTimestamp!==BigInt(0)&&D.uint32(56).uint64(C.timeoutTimestamp),C.memo!==""&&D.uint32(66).string(C.memo),D},decode(C,D){const _=C instanceof i.BinaryReader?C:new i.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=R();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.sourcePort=_.string();break;case 2:f.sourceChannel=_.string();break;case 3:f.token=n.Coin.decode(_,_.uint32());break;case 4:f.sender=_.string();break;case 5:f.receiver=_.string();break;case 6:f.timeoutHeight=t.Height.decode(_,_.uint32());break;case 7:f.timeoutTimestamp=_.uint64();break;case 8:f.memo=_.string();break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=R();return(0,u.isSet)(C.sourcePort)&&(D.sourcePort=String(C.sourcePort)),(0,u.isSet)(C.sourceChannel)&&(D.sourceChannel=String(C.sourceChannel)),(0,u.isSet)(C.token)&&(D.token=n.Coin.fromJSON(C.token)),(0,u.
3isSet)(C.sender)&&(D.sender=String(C.sender)),(0,u.isSet)(C.receiver)&&(D.receiver=String(C.receiver)),(0,u.isSet)(C.timeoutHeight)&&(D.timeoutHeight=t.Height.fromJSON(C.timeoutHeight)),(0,u.isSet)(C.timeoutTimestamp)&&(D.timeoutTimestamp=BigInt(C.timeoutTimestamp.toString())),(0,u.isSet)(C.memo)&&(D.memo=String(C.memo)),D},toJSON(C){const D={};return C.sourcePort!==void 0&&(D.sourcePort=C.sourcePort),C.sourceChannel!==void 0&&(D.sourceChannel=C.sourceChannel),C.token!==void 0&&(D.token=C.token?n.Coin.toJSON(C.token):void 0),C.sender!==void 0&&(D.sender=C.sender),C.receiver!==void 0&&(D.receiver=C.receiver),C.timeoutHeight!==void 0&&(D.timeoutHeight=C.timeoutHeight?t.Height.toJSON(C.timeoutHeight):void 0),C.timeoutTimestamp!==void 0&&(D.timeoutTimestamp=(C.timeoutTimestamp||BigInt(0)).toString()),C.memo!==void 0&&(D.memo=C.memo),D},fromPartial(C){const D=R();return D.sourcePort=C.sourcePort??"",D.sourceChannel=C.sourceChannel??"",C.token!==void 0&&C.token!==null&&(D.token=n.Coin.fromPartial(C.token)),D.sender=C.sender??"",D.receiver=C.receiver??"",C.timeoutHeight!==void 0&&C.timeoutHeight!==null&&(D.timeoutHeight=t.Height.fromPartial(C.timeoutHeight)),C.timeoutTimestamp!==void 0&&C.timeoutTimestamp!==null&&(D.timeoutTimestamp=BigInt(C.timeoutTimestamp.toString())),D.memo=C.memo??"",D}};function v(){return{sequence:BigInt(0)}}e.MsgTransferResponse={typeUrl:"/ibc.applications.transfer.v1.MsgTransferResponse",encode(C,D=i.BinaryWriter.create()){return C.sequence!==BigInt(0)&&D.uint32(8).uint64(C.sequence),D},decode(C,D){const _=C instanceof i.BinaryReader?C:new i.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=v();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.sequence=_.uint64();break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=v();return(0,u.isSet)(C.sequence)&&(D.sequence=BigInt(C.sequence.toString())),D},toJSON(C){const D={};return C.sequence!==void 0&&(D.sequence=(C.sequence||BigInt(0)).toString()),D},fromPartial(C){const D=v();return C.sequence!==void 0&&C.sequence!==null&&(D.sequence=BigInt(C.sequence.toString())),D}};class E{constructor(D){this.rpc=D,this.Transfer=this.Transfer.bind(this)}Transfer(D){const _=e.MsgTransfer.encode(D).finish();return this.rpc.request("ibc.applications.transfer.v1.Msg","Transfer",_).then(f=>e.MsgTransferResponse.decode(new i.BinaryReader(f)))}}e.MsgClientImpl=E})(ha);Object.defineProperty(Wr,"__esModule",{value:!0});Wr.createIbcAminoConverters=Wr.isAminoMsgTransfer=void 0;const io=ot,fg=ha;function pg(e){return e.type==="cosmos-sdk/MsgTransfer"}Wr.isAminoMsgTransfer=pg;function mg(){return{"/ibc.applications.transfer.v1.MsgTransfer":{aminoType:"cosmos-sdk/MsgTransfer",toAmino:({sourcePort:e,sourceChannel:n,token:t,sender:i,receiver:u,timeoutHeight:R,timeoutTimestamp:v,memo:E})=>{var C,D,_;return{source_port:e,source_channel:n,token:t,sender:i,receiver:u,timeout_height:R?{revision_height:(C=(0,io.omitDefault)(R.revisionHeight))==null?void 0:C.toString(),revision_number:(D=(0,io.omitDefault)(R.revisionNumber))==null?void 0:D.toString()}:{},timeout_timestamp:(_=(0,io.omitDefault)(v))==null?void 0:_.toString(),memo:(0,io.omitDefault)(E)}},fromAmino:({source_port:e,source_channel:n,token:t,sender:i,receiver:u,timeout_height:R,timeout_timestamp:v,memo:E})=>fg.MsgTransfer.fromPartial({sourcePort:e,sourceChannel:n,token:t,sender:i,receiver:u,timeoutHeight:R?{revisionHeight:BigInt(R.revision_height||"0"),revisionNumber:BigInt(R.revision_number||"0")}:void 0,timeoutTimestamp:BigInt(v||"0"),memo:E??""})}}}Wr.createIbcAminoConverters=mg;var Fr={},Il={},ga={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Acknowledgement=e.PacketId=e.PacketState=e.Packet=e.Counterparty=e.IdentifiedChannel=e.Channel=e.orderToJSON=e.orderFromJSON=e.Order=e.stateToJSON=e.stateFromJSON=e.State=e.protobufPackage=void 0;const n=at,t=te,i=ee;e.protobufPackage="ibc.core.channel.v1";var u;(function(y){y[y.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",y[y.STATE_INIT=1]="STATE_INIT",y[y.STATE_TRYOPEN=2]="STATE_TRYOPEN",y[y.STATE_OPEN=3]="STATE_OPEN",y[y.STATE_CLOSED=4]="STATE_CLOSED",y[y.UNRECOGNIZED=-1]="UNRECOGNIZED"})(u||(e.State=u={}));function R(y){switch(y){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return u.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return u.STATE_INIT;case 2:case"STATE_TRYOPEN":return u.STATE_TRYOPEN;case 3:case"STATE_OPEN":return u.STATE_OPEN;case 4:case"STATE_CLOSED":return u.STATE_CLOSED;case-1:case"UNRECOGNIZED":default:return u.UNRECOGNIZED}}e.stateFromJSON=R;function v(y){switch(y){case u.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case u.STATE_INIT:return"STATE_INIT";case u.STATE_TRYOPEN:return"STATE_TRYOPEN";case u.STATE_OPEN:return"STATE_OPEN";case u.STATE_CLOSED:return"STATE_CLOSED";case u.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.stateToJSON=v;var E;(function(y){y[y.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",y[y.ORDER_UNORDERED=1]="ORDER_UNORDERED",y[y.ORDER_ORDERED=2]="ORDER_ORDERED",y[y.UNRECOGNIZED=-1]="UNRECOGNIZED"})(E||(e.Order=E={}));function C(y){switch(y){case 0:case"ORDER_NONE_UNSPECIFIED":return E.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return E.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return E.ORDER_ORDERED;case-1:case"UNRECOGNIZED":default:return E.UNRECOGNIZED}}e.orderFromJSON=C;function D(y){switch(y){case E.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case E.ORDER_UNORDERED:return"ORDER_UNORDERED";case E.ORDER_ORDERED:return"ORDER_ORDERED";case E.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.orderToJSON=D;function _(){return{state:0,ordering:0,counterparty:e.Counterparty.fromPartial({}),connectionHops:[],version:""}}e.Channel={typeUrl:"/ibc.core.channel.v1.Channel",encode(y,w=t.BinaryWriter.create()){y.state!==0&&w.uint32(8).int32(y.state),y.ordering!==0&&w.uint32(16).int32(y.ordering),y.counterparty!==void 0&&e.Counterparty.encode(y.counterparty,w.uint32(26).fork()).ldelim();for(const J of y.connectionHops)w.uint32(34).string(J);return y.version!==""&&w.uint32(42).string(y.version),w},decode(y,w){const J=y instanceof t.BinaryReader?y:new t.BinaryReader(y);let P=w===void 0?J.len:J.pos+w;const U=_();for(;J.pos<P;){const r=J.uint32();switch(r>>>3){case 1:U.state=J.int32();break;case 2:U.ordering=J.int32();break;case 3:U.counterparty=e.Counterparty.decode(J,J.uint32());break;case 4:U.connectionHops.push(J.string());break;case 5:U.version=J.string();break;default:J.skipType(r&7);break}}return U},fromJSON(y){const w=_();return(0,i.isSet)(y.state)&&(w.state=R(y.state)),(0,i.isSet)(y.ordering)&&(w.ordering=C(y.ordering)),(0,i.isSet)(y.counterparty)&&(w.counterparty=e.Counterparty.fromJSON(y.counterparty)),Array.isArray(y==null?void 0:y.connectionHops)&&(w.connectionHops=y.connectionHops.map(J=>String(J))),(0,i.isSet)(y.version)&&(w.version=String(y.version)),w},toJSON(y){const w={};return y.state!==void 0&&(w.state=v(y.state)),y.ordering!==void 0&&(w.ordering=D(y.ordering)),y.counterparty!==void 0&&(w.counterparty=y.counterparty?e.Counterparty.toJSON(y.counterparty):void 0),y.c
3onnectionHops?w.connectionHops=y.connectionHops.map(J=>J):w.connectionHops=[],y.version!==void 0&&(w.version=y.version),w},fromPartial(y){var J;const w=_();return w.state=y.state??0,w.ordering=y.ordering??0,y.counterparty!==void 0&&y.counterparty!==null&&(w.counterparty=e.Counterparty.fromPartial(y.counterparty)),w.connectionHops=((J=y.connectionHops)==null?void 0:J.map(P=>P))||[],w.version=y.version??"",w}};function b(){return{state:0,ordering:0,counterparty:e.Counterparty.fromPartial({}),connectionHops:[],version:"",portId:"",channelId:""}}e.IdentifiedChannel={typeUrl:"/ibc.core.channel.v1.IdentifiedChannel",encode(y,w=t.BinaryWriter.create()){y.state!==0&&w.uint32(8).int32(y.state),y.ordering!==0&&w.uint32(16).int32(y.ordering),y.counterparty!==void 0&&e.Counterparty.encode(y.counterparty,w.uint32(26).fork()).ldelim();for(const J of y.connectionHops)w.uint32(34).string(J);return y.version!==""&&w.uint32(42).string(y.version),y.portId!==""&&w.uint32(50).string(y.portId),y.channelId!==""&&w.uint32(58).string(y.channelId),w},decode(y,w){const J=y instanceof t.BinaryReader?y:new t.BinaryReader(y);let P=w===void 0?J.len:J.pos+w;const U=b();for(;J.pos<P;){const r=J.uint32();switch(r>>>3){case 1:U.state=J.int32();break;case 2:U.ordering=J.int32();break;case 3:U.counterparty=e.Counterparty.decode(J,J.uint32());break;case 4:U.connectionHops.push(J.string());break;case 5:U.version=J.string();break;case 6:U.portId=J.string();break;case 7:U.channelId=J.string();break;default:J.skipType(r&7);break}}return U},fromJSON(y){const w=b();return(0,i.isSet)(y.state)&&(w.state=R(y.state)),(0,i.isSet)(y.ordering)&&(w.ordering=C(y.ordering)),(0,i.isSet)(y.counterparty)&&(w.counterparty=e.Counterparty.fromJSON(y.counterparty)),Array.isArray(y==null?void 0:y.connectionHops)&&(w.connectionHops=y.connectionHops.map(J=>String(J))),(0,i.isSet)(y.version)&&(w.version=String(y.version)),(0,i.isSet)(y.portId)&&(w.portId=String(y.portId)),(0,i.isSet)(y.channelId)&&(w.channelId=String(y.channelId)),w},toJSON(y){const w={};return y.state!==void 0&&(w.state=v(y.state)),y.ordering!==void 0&&(w.ordering=D(y.ordering)),y.counterparty!==void 0&&(w.counterparty=y.counterparty?e.Counterparty.toJSON(y.counterparty):void 0),y.connectionHops?w.connectionHops=y.connectionHops.map(J=>J):w.connectionHops=[],y.version!==void 0&&(w.version=y.version),y.portId!==void 0&&(w.portId=y.portId),y.channelId!==void 0&&(w.channelId=y.channelId),w},fromPartial(y){var J;const w=b();return w.state=y.state??0,w.ordering=y.ordering??0,y.counterparty!==void 0&&y.counterparty!==null&&(w.counterparty=e.Counterparty.fromPartial(y.counterparty)),w.connectionHops=((J=y.connectionHops)==null?void 0:J.map(P=>P))||[],w.version=y.version??"",w.portId=y.portId??"",w.channelId=y.channelId??"",w}};function f(){return{portId:"",channelId:""}}e.Counterparty={typeUrl:"/ibc.core.channel.v1.Counterparty",encode(y,w=t.BinaryWriter.create()){return y.portId!==""&&w.uint32(10).string(y.portId),y.channelId!==""&&w.uint32(18).string(y.channelId),w},decode(y,w){const J=y instanceof t.BinaryReader?y:new t.BinaryReader(y);let P=w===void 0?J.len:J.pos+w;const U=f();for(;J.pos<P;){const r=J.uint32();switch(r>>>3){case 1:U.portId=J.string();break;case 2:U.channelId=J.string();break;default:J.skipType(r&7);break}}return U},fromJSON(y){const w=f();return(0,i.isSet)(y.portId)&&(w.portId=String(y.portId)),(0,i.isSet)(y.channelId)&&(w.channelId=String(y.channelId)),w},toJSON(y){const w={};return y.portId!==void 0&&(w.portId=y.portId),y.channelId!==void 0&&(w.channelId=y.channelId),w},fromPartial(y){const w=f();return w.portId=y.portId??"",w.channelId=y.channelId??"",w}};function p(){return{sequence:BigInt(0),sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",data:new Uint8Array,timeoutHeight:n.Height.fromPartial({}),timeoutTimestamp:BigInt(0)}}e.Packet={typeUrl:"/ibc.core.channel.v1.Packet",encode(y,w=t.BinaryWriter.create()){return y.sequence!==BigInt(0)&&w.uint32(8).uint64(y.sequence),y.sourcePort!==""&&w.uint32(18).string(y.sourcePort),y.sourceChannel!==""&&w.uint32(26).string(y.sourceChannel),y.destinationPort!==""&&w.uint32(34).string(y.destinationPort),y.destinationChannel!==""&&w.uint32(42).string(y.destinationChannel),y.data.length!==0&&w.uint32(50).bytes(y.data),y.timeoutHeight!==void 0&&n.Height.encode(y.timeoutHeight,w.uint32(58).fork()).ldelim(),y.timeoutTimestamp!==BigInt(0)&&w.uint32(64).uint64(y.timeoutTimestamp),w},decode(y,w){const J=y instanceof t.BinaryReader?y:new t.BinaryReader(y);let P=w===void 0?J.len:J.pos+w;const U=p();for(;J.pos<P;){const r=J.uint32();switch(r>>>3){case 1:U.sequence=J.uint64();break;case 2:U.sourcePort=J.string();break;case 3:U.sourceChannel=J.string();break;case 4:U.destinationPort=J.string();break;case 5:U.destinationChannel=J.string();break;case 6:U.data=J.bytes();break;case 7:U.timeoutHeight=n.Height.decode(J,J.uint32());break;case 8:U.timeoutTimestamp=J.uint64();break;default:J.skipType(r&7);break}}return U},fromJSON(y){const w=p();return(0,i.isSet)(y.sequence)&&(w.sequence=BigInt(y.sequence.toString())),(0,i.isSet)(y.sourcePort)&&(w.sourcePort=String(y.sourcePort)),(0,i.isSet)(y.sourceChannel)&&(w.sourceChannel=String(y.sourceChannel)),(0,i.isSet)(y.destinationPort)&&(w.destinationPort=String(y.destinationPort)),(0,i.isSet)(y.destinationChannel)&&(w.destinationChannel=String(y.destinationChannel)),(0,i.isSet)(y.data)&&(w.data=(0,i.bytesFromBase64)(y.data)),(0,i.isSet)(y.timeoutHeight)&&(w.timeoutHeight=n.Height.fromJSON(y.timeoutHeight)),(0,i.isSet)(y.timeoutTimestamp)&&(w.timeoutTimestamp=BigInt(y.timeoutTimestamp.toString())),w},toJSON(y){const w={};return y.sequence!==void 0&&(w.sequence=(y.sequence||BigInt(0)).toString()),y.sourcePort!==void 0&&(w.sourcePort=y.sourcePort),y.sourceChannel!==void 0&&(w.sourceChannel=y.sourceChannel),y.destinationPort!==void 0&&(w.destinationPort=y.destinationPort),y.destinationChannel!==void 0&&(w.destinationChannel=y.destinationChannel),y.data!==void 0&&(w.data=(0,i.base64FromBytes)(y.data!==void 0?y.data:new Uint8Array)),y.timeoutHeight!==void 0&&(w.timeoutHeight=y.timeoutHeight?n.Height.toJSON(y.timeoutHeight):void 0),y.timeoutTimestamp!==void 0&&(w.timeoutTimestamp=(y.timeoutTimestamp||BigInt(0)).toString()),w},fromPartial(y){const w=p();return y.sequence!==void 0&&y.sequence!==null&&(w.sequence=BigInt(y.sequence.toString())),w.sourcePort=y.sourcePort??"",w.sourceChannel=y.sourceChannel??"",w.destinationPort=y.destinationPort??"",w.destinationChannel=y.destinationChannel??"",w.data=y.data??new Uint8Array,y.timeoutHeight!==void 0&&y.timeoutHeight!==null&&(w.timeoutHeight=n.Height.fromPartial(y.timeoutHeight)),y.timeoutTimestamp!==void 0&&y.timeoutTimestamp!==null&&(w.timeoutTimestamp=BigInt(y.timeoutTimestamp.toString())),w}};function k(){return{portId:"",channelId:"",sequence:BigInt(0),data:new Uint8Array}}e.PacketState={typeUrl:"/ibc.core.channel.v1.PacketState",encode(y,w=t.BinaryWriter.create()){return y.portId!==""&&w.uint32(10).string(y.portId),y.channelId!==""&&w.uint32(18).string(y.channelId),y.sequence!==BigInt(0)&&w.uint32(24).uint64(y.sequence),y.data.length!==0&&w.uint32(34).bytes(y.data),w},decode(y,w){const J=y instanceof t.BinaryReader?y:new t.BinaryReader(y);let P=w===void 0?J.len:J.pos+w;const U=k();for(;J.pos<P;){const r=J.uint32();switch(r>>>3){case 1:U.portId=J.string();break;case 2:U.channelId=J.string();break;case 3:U.sequence=J.uint64();break;case 4:U.data=J.bytes();break;default:J.skipType(r&7);break}}return U},fromJSON(y){const w=k();return(0,i.isSet)(y.portId)&&(w.portId=String(y.portId)),(0,i.isSet)(y.channelId)&&(w.channelId=String(y.channelId)),(0,i.isSet)(y.sequence)&&(w.sequence=BigInt(y.sequence.toString())),(0,i.isSet)(y.data)&&(w.data=(0,i.bytesFromBase64)(y.data)),w},toJSON(y){const w={};return y.portId!==void 0&&(w.portId=y.portId),y.channelId!==void 0&&(w.channelId=y.channelId),y.sequence!==void 0&&(w.sequence=(y.sequence||BigInt(0)).toString()),y.data!==void 0&&(w.data=(0,i.base64FromBytes)(y.data!==void 0?y.data:new Uint8Array)),w},fromPartial(y){const w=k();return w.portId=y.portId??"",w.channelId=y.channelId??"",y.sequence!==void 0&&y.sequence!==null&&(w.sequence=BigInt(y.sequence.toString())),w.data=y.data??new Uint8Array,w}};function o(){return{portId:"",channelId:"",sequence:BigInt(0)}}e.PacketId={typeUrl:"/ibc.core.channel.v1.PacketId",encode(y,w=t.BinaryWriter.create()){return y.portId!==""&&w.uint32(10).string(y.portId),y.channelId!==""&&w.uint32(18).string(y.channelId),y.sequence!==BigInt(0)&&w.uint32(24).uint64(y.sequence),w},decode(y,w){const J=y instanceof t.BinaryReader?y:new t.BinaryReader(y);let P=w===void 0?J.len:J.pos+w;const U=o();for(;J.pos<P;){const r=J.uint32();switch(r>>>3){case 1:U.portId=J.string();break;case 2:U.channelId=J.string();break;case 3:U.sequence=J.uint64();break;default:J.skipType(r&7);break}}return U},fromJSON(y){const w=o();return(0,i.isSet)(y.portId)&&(w.portId=String(y.portId)),(0,i.isSet)(y.channelId)&&(w.channelId=String(y.channelId)),(0,i.isSet)(y.sequence)&&(w.sequence=BigInt(y.sequence.toString())),w},toJSON(y){const w={};return y.portId!==void 0&&(w.portId=y.portId),y.channelId!==void 0&&(w.channelId=y.channelId),y.sequence!==void 0&&(w.sequence=(y.sequence||BigInt(0)).toString()),w},fromPartial(y){const w=o();return w.portId=y.portId??"",w.channelId=y.channelId??"",y.sequence!==void 0&&y.sequence!==null&&(w.sequence=BigInt(y.sequence.toString())),w}};function s(){return{result:void 0,error:void 0}}e.Acknowledgement={typeUrl:"/ibc.core.channel.v1.Acknowledgement",encode(y,w=t.BinaryWriter.create()){return y.result!==void 0&&w.uint32(170).bytes(y.result),y.error!==void 0&&w.uint32(178).string(y.error),w},decode(y,w){const J=y instanceof t.BinaryReader?y:new t.BinaryReader(y);let P=w===void 0?J.len:J.pos+w;const U=s();for(;J.pos<P;){const r=J.uint32();switch(r>>>3){case 21:U.result=J.bytes();break;case 22:U.error=J.string();break;default:J.skipType(r&7);break}}return U},fromJSON(y){const w=s();return(0,i.isSet)(y.result)&&(w.result=(0,i.bytesFromBase64)(y.result)),(0,i.isSet)(y.error)&&(w.error=String(y.error)),w},toJSON(y){const w={};return y.result!==void 0&&(w.result=y.result!==void 0?(0,i.base64FromBytes)(y.result):void 0),y.error!==void 0&&(w.error=y.error),w},fromPartial(y){const w=s();return w.result=y.result??void 0,w.error=y.error??void 0,w}}})(ga);
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgAcknowledgementResponse=e.MsgAcknowledgement=e.MsgTimeoutOnCloseResponse=e.MsgTimeoutOnClose=e.MsgTimeoutResponse=e.MsgTimeout=e.MsgRecvPacketResponse=e.MsgRecvPacket=e.MsgChannelCloseConfirmResponse=e.MsgChannelCloseConfirm=e.MsgChannelCloseInitResponse=e.MsgChannelCloseInit=e.MsgChannelOpenConfirmResponse=e.MsgChannelOpenConfirm=e.MsgChannelOpenAckResponse=e.MsgChannelOpenAck=e.MsgChannelOpenTryResponse=e.MsgChannelOpenTry=e.MsgChannelOpenInitResponse=e.MsgChannelOpenInit=e.responseResultTypeToJSON=e.responseResultTypeFromJSON=e.ResponseResultType=e.protobufPackage=void 0;const n=ga,t=at,i=te,u=ee;e.protobufPackage="ibc.core.channel.v1";var R;(function(O){O[O.RESPONSE_RESULT_TYPE_UNSPECIFIED=0]="RESPONSE_RESULT_TYPE_UNSPECIFIED",O[O.RESPONSE_RESULT_TYPE_NOOP=1]="RESPONSE_RESULT_TYPE_NOOP",O[O.RESPONSE_RESULT_TYPE_SUCCESS=2]="RESPONSE_RESULT_TYPE_SUCCESS",O[O.UNRECOGNIZED=-1]="UNRECOGNIZED"})(R||(e.ResponseResultType=R={}));function v(O){switch(O){case 0:case"RESPONSE_RESULT_TYPE_UNSPECIFIED":return R.RESPONSE_RESULT_TYPE_UNSPECIFIED;case 1:case"RESPONSE_RESULT_TYPE_NOOP":return R.RESPONSE_RESULT_TYPE_NOOP;case 2:case"RESPONSE_RESULT_TYPE_SUCCESS":return R.RESPONSE_RESULT_TYPE_SUCCESS;case-1:case"UNRECOGNIZED":default:return R.UNRECOGNIZED}}e.responseResultTypeFromJSON=v;function E(O){switch(O){case R.RESPONSE_RESULT_TYPE_UNSPECIFIED:return"RESPONSE_RESULT_TYPE_UNSPECIFIED";case R.RESPONSE_RESULT_TYPE_NOOP:return"RESPONSE_RESULT_TYPE_NOOP";case R.RESPONSE_RESULT_TYPE_SUCCESS:return"RESPONSE_RESULT_TYPE_SUCCESS";case R.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.responseResultTypeToJSON=E;function C(){return{portId:"",channel:n.Channel.fromPartial({}),signer:""}}e.MsgChannelOpenInit={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",encode(O,B=i.BinaryWriter.create()){return O.portId!==""&&B.uint32(10).string(O.portId),O.channel!==void 0&&n.Channel.encode(O.channel,B.uint32(18).fork()).ldelim(),O.signer!==""&&B.uint32(26).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=C();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.portId=M.string();break;case 2:H.channel=n.Channel.decode(M,M.uint32());break;case 3:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=C();return(0,u.isSet)(O.portId)&&(B.portId=String(O.portId)),(0,u.isSet)(O.channel)&&(B.channel=n.Channel.fromJSON(O.channel)),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.portId!==void 0&&(B.portId=O.portId),O.channel!==void 0&&(B.channel=O.channel?n.Channel.toJSON(O.channel):void 0),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=C();return B.portId=O.portId??"",O.channel!==void 0&&O.channel!==null&&(B.channel=n.Channel.fromPartial(O.channel)),B.signer=O.signer??"",B}};function D(){return{channelId:"",version:""}}e.MsgChannelOpenInitResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInitResponse",encode(O,B=i.BinaryWriter.create()){return O.channelId!==""&&B.uint32(10).string(O.channelId),O.version!==""&&B.uint32(18).string(O.version),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=D();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.channelId=M.string();break;case 2:H.version=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=D();return(0,u.isSet)(O.channelId)&&(B.channelId=String(O.channelId)),(0,u.isSet)(O.version)&&(B.version=String(O.version)),B},toJSON(O){const B={};return O.channelId!==void 0&&(B.channelId=O.channelId),O.version!==void 0&&(B.version=O.version),B},fromPartial(O){const B=D();return B.channelId=O.channelId??"",B.version=O.version??"",B}};function _(){return{portId:"",previousChannelId:"",channel:n.Channel.fromPartial({}),counterpartyVersion:"",proofInit:new Uint8Array,proofHeight:t.Height.fromPartial({}),signer:""}}e.MsgChannelOpenTry={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",encode(O,B=i.BinaryWriter.create()){return O.portId!==""&&B.uint32(10).string(O.portId),O.previousChannelId!==""&&B.uint32(18).string(O.previousChannelId),O.channel!==void 0&&n.Channel.encode(O.channel,B.uint32(26).fork()).ldelim(),O.counterpartyVersion!==""&&B.uint32(34).string(O.counterpartyVersion),O.proofInit.length!==0&&B.uint32(42).bytes(O.proofInit),O.proofHeight!==void 0&&t.Height.encode(O.proofHeight,B.uint32(50).fork()).ldelim(),O.signer!==""&&B.uint32(58).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=_();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.portId=M.string();break;case 2:H.previousChannelId=M.string();break;case 3:H.channel=n.Channel.decode(M,M.uint32());break;case 4:H.counterpartyVersion=M.string();break;case 5:H.proofInit=M.bytes();break;case 6:H.proofHeight=t.Height.decode(M,M.uint32());break;case 7:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=_();
3return(0,u.isSet)(O.portId)&&(B.portId=String(O.portId)),(0,u.isSet)(O.previousChannelId)&&(B.previousChannelId=String(O.previousChannelId)),(0,u.isSet)(O.channel)&&(B.channel=n.Channel.fromJSON(O.channel)),(0,u.isSet)(O.counterpartyVersion)&&(B.counterpartyVersion=String(O.counterpartyVersion)),(0,u.isSet)(O.proofInit)&&(B.proofInit=(0,u.bytesFromBase64)(O.proofInit)),(0,u.isSet)(O.proofHeight)&&(B.proofHeight=t.Height.fromJSON(O.proofHeight)),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.portId!==void 0&&(B.portId=O.portId),O.previousChannelId!==void 0&&(B.previousChannelId=O.previousChannelId),O.channel!==void 0&&(B.channel=O.channel?n.Channel.toJSON(O.channel):void 0),O.counterpartyVersion!==void 0&&(B.counterpartyVersion=O.counterpartyVersion),O.proofInit!==void 0&&(B.proofInit=(0,u.base64FromBytes)(O.proofInit!==void 0?O.proofInit:new Uint8Array)),O.proofHeight!==void 0&&(B.proofHeight=O.proofHeight?t.Height.toJSON(O.proofHeight):void 0),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=_();return B.portId=O.portId??"",B.previousChannelId=O.previousChannelId??"",O.channel!==void 0&&O.channel!==null&&(B.channel=n.Channel.fromPartial(O.channel)),B.counterpartyVersion=O.counterpartyVersion??"",B.proofInit=O.proofInit??new Uint8Array,O.proofHeight!==void 0&&O.proofHeight!==null&&(B.proofHeight=t.Height.fromPartial(O.proofHeight)),B.signer=O.signer??"",B}};function b(){return{version:""}}e.MsgChannelOpenTryResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTryResponse",encode(O,B=i.BinaryWriter.create()){return O.version!==""&&B.uint32(10).string(O.version),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=b();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.version=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=b();return(0,u.isSet)(O.version)&&(B.version=String(O.version)),B},toJSON(O){const B={};return O.version!==void 0&&(B.version=O.version),B},fromPartial(O){const B=b();return B.version=O.version??"",B}};function f(){return{portId:"",channelId:"",counterpartyChannelId:"",counterpartyVersion:"",proofTry:new Uint8Array,proofHeight:t.Height.fromPartial({}),signer:""}}e.MsgChannelOpenAck={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",encode(O,B=i.BinaryWriter.create()){return O.portId!==""&&B.uint32(10).string(O.portId),O.channelId!==""&&B.uint32(18).string(O.channelId),O.counterpartyChannelId!==""&&B.uint32(26).string(O.counterpartyChannelId),O.counterpartyVersion!==""&&B.uint32(34).string(O.counterpartyVersion),O.proofTry.length!==0&&B.uint32(42).bytes(O.proofTry),O.proofHeight!==void 0&&t.Height.encode(O.proofHeight,B.uint32(50).fork()).ldelim(),O.signer!==""&&B.uint32(58).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=f();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.portId=M.string();break;case 2:H.channelId=M.string();break;case 3:H.counterpartyChannelId=M.string();break;case 4:H.counterpartyVersion=M.string();break;case 5:H.proofTry=M.bytes();break;case 6:H.proofHeight=t.Height.decode(M,M.uint32());break;case 7:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=f();return(0,u.isSet)(O.portId)&&(B.portId=String(O.portId)),(0,u.isSet)(O.channelId)&&(B.channelId=String(O.channelId)),(0,u.isSet)(O.counterpartyChannelId)&&(B.counterpartyChannelId=String(O.counterpartyChannelId)),(0,u.isSet)(O.counterpartyVersion)&&(B.counterpartyVersion=String(O.counterpartyVersion)),(0,u.isSet)(O.proofTry)&&(B.proofTry=(0,u.bytesFromBase64)(O.proofTry)),(0,u.isSet)(O.proofHeight)&&(B.proofHeight=t.Height.fromJSON(O.proofHeight)),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.portId!==void 0&&(B.portId=O.portId),O.channelId!==void 0&&(B.channelId=O.channelId),O.counterpartyChannelId!==void 0&&(B.counterpartyChannelId=O.counterpartyChannelId),O.counterpartyVersion!==void 0&&(B.counterpartyVersion=O.counterpartyVersion),O.proofTry!==void 0&&(B.proofTry=(0,u.base64FromBytes)(O.proofTry!==void 0?O.proofTry:new Uint8Array)),O.proofHeight!==void 0&&(B.proofHeight=O.proofHeight?t.Height.toJSON(O.proofHeight):void 0),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=f();return B.portId=O.portId??"",B.channelId=O.channelId??"",B.counterpartyChannelId=O.counterpartyChannelId??"",B.counterpartyVersion=O.counterpartyVersion??"",B.proofTry=O.proofTry??new Uint8Array,O.proofHeight!==void 0&&O.proofHeight!==null&&(B.proofHeight=t.Height.fromPartial(O.proofHeight)),B.signer=O.signer??"",B}};function p(){return{}}e.MsgChannelOpenAckResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAckResponse",encode(O,B=i.BinaryWriter.create()){return B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=p();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){default:M.skipType(a&7);break}}return H},fromJSON(O){return p()},toJSON(O){return{}},fromPartial(O){return p()}};function k(){return{portId:"",channelId:"",proofAck:new Uint8Array,proofHeight:t.Height.fromPartial({}),signer:""}}e.MsgChannelOpenConfirm={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",encode(O,B=i.BinaryWriter.create()){return O.portId!==""&&B.uint32(10).string(O.portId),O.channelId!==""&&B.uint32(18).string(O.channelId),O.proofAck.length!==0&&B.uint32(26).bytes(O.proofAck),O.proofHeight!==void 0&&t.Height.encode(O.proofHeight,B.uint32(34).fork()).ldelim(),O.signer!==""&&B.uint32(42).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=k();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.portId=M.string();break;case 2:H.channelId=M.string();break;case 3:H.proofAck=M.bytes();break;case 4:H.proofHeight=t.Height.decode(M,M.uint32());break;case 5:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=k();
3return(0,u.isSet)(O.portId)&&(B.portId=String(O.portId)),(0,u.isSet)(O.channelId)&&(B.channelId=String(O.channelId)),(0,u.isSet)(O.proofAck)&&(B.proofAck=(0,u.bytesFromBase64)(O.proofAck)),(0,u.isSet)(O.proofHeight)&&(B.proofHeight=t.Height.fromJSON(O.proofHeight)),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.portId!==void 0&&(B.portId=O.portId),O.channelId!==void 0&&(B.channelId=O.channelId),O.proofAck!==void 0&&(B.proofAck=(0,u.base64FromBytes)(O.proofAck!==void 0?O.proofAck:new Uint8Array)),O.proofHeight!==void 0&&(B.proofHeight=O.proofHeight?t.Height.toJSON(O.proofHeight):void 0),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=k();return B.portId=O.portId??"",B.channelId=O.channelId??"",B.proofAck=O.proofAck??new Uint8Array,O.proofHeight!==void 0&&O.proofHeight!==null&&(B.proofHeight=t.Height.fromPartial(O.proofHeight)),B.signer=O.signer??"",B}};function o(){return{}}e.MsgChannelOpenConfirmResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirmResponse",encode(O,B=i.BinaryWriter.create()){return B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=o();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){default:M.skipType(a&7);break}}return H},fromJSON(O){return o()},toJSON(O){return{}},fromPartial(O){return o()}};function s(){return{portId:"",channelId:"",signer:""}}e.MsgChannelCloseInit={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",encode(O,B=i.BinaryWriter.create()){return O.portId!==""&&B.uint32(10).string(O.portId),O.channelId!==""&&B.uint32(18).string(O.channelId),O.signer!==""&&B.uint32(26).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=s();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.portId=M.string();break;case 2:H.channelId=M.string();break;case 3:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=s();return(0,u.isSet)(O.portId)&&(B.portId=String(O.portId)),(0,u.isSet)(O.channelId)&&(B.channelId=String(O.channelId)),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.portId!==void 0&&(B.portId=O.portId),O.channelId!==void 0&&(B.channelId=O.channelId),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=s();return B.portId=O.portId??"",B.channelId=O.channelId??"",B.signer=O.signer??"",B}};function y(){return{}}e.MsgChannelCloseInitResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInitResponse",encode(O,B=i.BinaryWriter.create()){return B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=y();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){default:M.skipType(a&7);break}}return H},fromJSON(O){return y()},toJSON(O){return{}},fromPartial(O){return y()}};function w(){return{portId:"",channelId:"",proofInit:new Uint8Array,proofHeight:t.Height.fromPartial({}),signer:""}}e.MsgChannelCloseConfirm={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",encode(O,B=i.BinaryWriter.create()){return O.portId!==""&&B.uint32(10).string(O.portId),O.channelId!==""&&B.uint32(18).string(O.channelId),O.proofInit.length!==0&&B.uint32(26).bytes(O.proofInit),O.proofHeight!==void 0&&t.Height.encode(O.proofHeight,B.uint32(34).fork()).ldelim(),O.signer!==""&&B.uint32(42).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=w();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.portId=M.string();break;case 2:H.channelId=M.string();break;case 3:H.proofInit=M.bytes();break;case 4:H.proofHeight=t.Height.decode(M,M.uint32());break;case 5:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=w();return(0,u.isSet)(O.portId)&&(B.portId=String(O.portId)),(0,u.isSet)(O.channelId)&&(B.channelId=String(O.channelId)),(0,u.isSet)(O.proofInit)&&(B.proofInit=(0,u.bytesFromBase64)(O.proofInit)),(0,u.isSet)(O.proofHeight)&&(B.proofHeight=t.Height.fromJSON(O.proofHeight)),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.portId!==void 0&&(B.portId=O.portId),O.channelId!==void 0&&(B.channelId=O.channelId),O.proofInit!==void 0&&(B.proofInit=(0,u.base64FromBytes)(O.proofInit!==void 0?O.proofInit:new Uint8Array)),O.proofHeight!==void 0&&(B.proofHeight=O.proofHeight?t.Height.toJSON(O.proofHeight):void 0),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=w();return B.portId=O.portId??"",B.channelId=O.channelId??"",B.proofInit=O.proofInit??new Uint8Array,O.proofHeight!==void 0&&O.proofHeight!==null&&(B.proofHeight=t.Height.fromPartial(O.proofHeight)),B.signer=O.signer??"",B}};function J(){return{}}e.MsgChannelCloseConfirmResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirmResponse",encode(O,B=i.BinaryWriter.create()){return B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=J();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){default:M.skipType(a&7);break}}return H},fromJSON(O){return J()},toJSON(O){return{}},fromPartial(O){return J()}};function P(){return{packet:n.Packet.fromPartial({}),proofCommitment:new Uint8Array,proofHeight:t.Height.fromPartial({}),signer:""}}e.MsgRecvPacket={typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",encode(O,B=i.BinaryWriter.create()){return O.packet!==void 0&&n.Packet.encode(O.packet,B.uint32(10).fork()).ldelim(),O.proofCommitment.length!==0&&B.uint32(18).bytes(O.proofCommitment),O.proofHeight!==void 0&&t.Height.encode(O.proofHeight,B.uint32(26).fork()).ldelim(),O.signer!==""&&B.uint32(34).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=P();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.packet=n.Packet.decode(M,M.uint32());break;case 2:H.proofCommitment=M.bytes();break;case 3:H.proofHeight=t.Height.decode(M,M.uint32());break;case 4:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=P();return(0,u.isSet)(O.packet)&&(B.packet=n.Packet.fromJSON(O.packet)),(0,u.isSet)(O.proofCommitment)&&(B.proofCommitment=(0,u.bytesFromBase64)(O.proofCommitment)),(0,u.isSet)(O.proofHeight)&&(B.proofHeight=t.Height.fromJSON(O.proofHeight)),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.packet!==void 0&&(B.packet=O.packet?n.Packet.toJSON(O.packet):void 0),O.proofCommitment!==void 0&&(B.proofCommitment=(0,u.base64FromBytes)(O.proofCommitment!==void 0?O.proofCommitment:new Uint8Array)),O.proofHeight!==void 0&&(B.proofHeight=O.proofHeight?t.Height.toJSON(O.proofHeight):void 0),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=P();return O.packet!==void 0&&O.packet!==null&&(B.packet=n.Packet.fromPartial(O.packet)),B.proofCommitment=O.proofCommitment??new Uint8Array,O.proofHeight!==void 0&&O.proofHeight!==null&&(B.proofHeight=t.Height.fromPartial(O.proofHeight)),B.signer=O.signer??"",B}};function U(){return{result:0}}e.MsgRecvPacketResponse={typeUrl:"/ibc.core.channel.v1.MsgRecvPacketResponse",encode(O,B=i.BinaryWriter.create()){return O.result!==0&&B.uint32(8).int32(O.result),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=U();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.result=M.int32();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=U();return(0,u.isSet)(O.result)&&(B.result=v(O.result)),B},toJSON(O){const B={};return O.result!==void 0&&(B.result=E(O.result)),B},fromPartial(O){const B=U();return B.result=O.result??0,B}};function r(){return{packet:n.Packet.fromPartial({}),proofUnreceived:new Uint8Array,proofHeight:t.Height.fromPartial({}),nextSequenceRecv:BigInt(0),signer:""}}e.MsgTimeout={typeUrl:"/ibc.core.channel.v1.MsgTimeout",encode(O,B=i.BinaryWriter.create()){return O.packet!==void 0&&n.Packet.encode(O.packet,B.uint32(10).fork()).ldelim(),O.proofUnreceived.length!==0&&B.uint32(18).bytes(O.proofUnreceived),O.proofHeight!==void 0&&t.Height.encode(O.proofHeight,B.uint32(26).fork()).ldelim(),O.nextSequenceRecv!==BigInt(0)&&B.uint32(32).uint64(O.nextSequenceRecv),O.signer!==""&&B.uint32(42).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=r();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.packet=n.Packet.decode(M,M.uint32());break;case 2:H.proofUnreceived=M.bytes();break;case 3:H.proofHeight=t.Height.decode(M,M.uint32());break;case 4:H.nextSequenceRecv=M.uint64();break;case 5:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=r();return(0,u.isSet)(O.packet)&&(B.packet=n.Packet.fromJSON(O.packet)),(0,u.isSet)(O.proofUnreceived)&&(B.proofUnreceived=(0,u.bytesFromBase64)(O.proofUnreceived)),(0,u.
3isSet)(O.proofHeight)&&(B.proofHeight=t.Height.fromJSON(O.proofHeight)),(0,u.isSet)(O.nextSequenceRecv)&&(B.nextSequenceRecv=BigInt(O.nextSequenceRecv.toString())),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.packet!==void 0&&(B.packet=O.packet?n.Packet.toJSON(O.packet):void 0),O.proofUnreceived!==void 0&&(B.proofUnreceived=(0,u.base64FromBytes)(O.proofUnreceived!==void 0?O.proofUnreceived:new Uint8Array)),O.proofHeight!==void 0&&(B.proofHeight=O.proofHeight?t.Height.toJSON(O.proofHeight):void 0),O.nextSequenceRecv!==void 0&&(B.nextSequenceRecv=(O.nextSequenceRecv||BigInt(0)).toString()),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=r();return O.packet!==void 0&&O.packet!==null&&(B.packet=n.Packet.fromPartial(O.packet)),B.proofUnreceived=O.proofUnreceived??new Uint8Array,O.proofHeight!==void 0&&O.proofHeight!==null&&(B.proofHeight=t.Height.fromPartial(O.proofHeight)),O.nextSequenceRecv!==void 0&&O.nextSequenceRecv!==null&&(B.nextSequenceRecv=BigInt(O.nextSequenceRecv.toString())),B.signer=O.signer??"",B}};function m(){return{result:0}}e.MsgTimeoutResponse={typeUrl:"/ibc.core.channel.v1.MsgTimeoutResponse",encode(O,B=i.BinaryWriter.create()){return O.result!==0&&B.uint32(8).int32(O.result),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=m();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.result=M.int32();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=m();return(0,u.isSet)(O.result)&&(B.result=v(O.result)),B},toJSON(O){const B={};return O.result!==void 0&&(B.result=E(O.result)),B},fromPartial(O){const B=m();return B.result=O.result??0,B}};function N(){return{packet:n.Packet.fromPartial({}),proofUnreceived:new Uint8Array,proofClose:new Uint8Array,proofHeight:t.Height.fromPartial({}),nextSequenceRecv:BigInt(0),signer:""}}e.MsgTimeoutOnClose={typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",encode(O,B=i.BinaryWriter.create()){return O.packet!==void 0&&n.Packet.encode(O.packet,B.uint32(10).fork()).ldelim(),O.proofUnreceived.length!==0&&B.uint32(18).bytes(O.proofUnreceived),O.proofClose.length!==0&&B.uint32(26).bytes(O.proofClose),O.proofHeight!==void 0&&t.Height.encode(O.proofHeight,B.uint32(34).fork()).ldelim(),O.nextSequenceRecv!==BigInt(0)&&B.uint32(40).uint64(O.nextSequenceRecv),O.signer!==""&&B.uint32(50).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=N();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.packet=n.Packet.decode(M,M.uint32());break;case 2:H.proofUnreceived=M.bytes();break;case 3:H.proofClose=M.bytes();break;case 4:H.proofHeight=t.Height.decode(M,M.uint32());break;case 5:H.nextSequenceRecv=M.uint64();break;case 6:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=N();return(0,u.isSet)(O.packet)&&(B.packet=n.Packet.fromJSON(O.packet)),(0,u.isSet)(O.proofUnreceived)&&(B.proofUnreceived=(0,u.bytesFromBase64)(O.proofUnreceived)),(0,u.isSet)(O.proofClose)&&(B.proofClose=(0,u.bytesFromBase64)(O.proofClose)),(0,u.isSet)(O.proofHeight)&&(B.proofHeight=t.Height.fromJSON(O.proofHeight)),(0,u.isSet)(O.nextSequenceRecv)&&(B.nextSequenceRecv=BigInt(O.nextSequenceRecv.toString())),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.packet!==void 0&&(B.packet=O.packet?n.Packet.toJSON(O.packet):void 0),O.proofUnreceived!==void 0&&(B.proofUnreceived=(0,u.base64FromBytes)(O.proofUnreceived!==void 0?O.proofUnreceived:new Uint8Array)),O.proofClose!==void 0&&(B.proofClose=(0,u.base64FromBytes)(O.proofClose!==void 0?O.proofClose:new Uint8Array)),O.proofHeight!==void 0&&(B.proofHeight=O.proofHeight?t.Height.toJSON(O.proofHeight):void 0),O.nextSequenceRecv!==void 0&&(B.nextSequenceRecv=(O.nextSequenceRecv||BigInt(0)).toString()),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=N();return O.packet!==void 0&&O.packet!==null&&(B.packet=n.Packet.fromPartial(O.packet)),B.proofUnreceived=O.proofUnreceived??new Uint8Array,B.proofClose=O.proofClose??new Uint8Array,O.proofHeight!==void 0&&O.proofHeight!==null&&(B.proofHeight=t.Height.fromPartial(O.proofHeight)),O.nextSequenceRecv!==void 0&&O.nextSequenceRecv!==null&&(B.nextSequenceRecv=BigInt(O.nextSequenceRecv.toString())),B.signer=O.signer??"",B}};function V(){return{result:0}}e.MsgTimeoutOnCloseResponse={typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnCloseResponse",encode(O,B=i.BinaryWriter.create()){return O.result!==0&&B.uint32(8).int32(O.result),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=V();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.result=M.int32();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=V();return(0,u.isSet)(O.result)&&(B.result=v(O.result)),B},toJSON(O){const B={};return O.result!==void 0&&(B.result=E(O.result)),B},fromPartial(O){const B=V();return B.result=O.result??0,B}};function d(){return{packet:n.Packet.fromPartial({}),acknowledgement:new Uint8Array,proofAcked:new Uint8Array,proofHeight:t.Height.fromPartial({}),signer:""}}e.MsgAcknowledgement={typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",encode(O,B=i.BinaryWriter.create()){return O.packet!==void 0&&n.Packet.encode(O.packet,B.uint32(10).fork()).ldelim(),O.acknowledgement.length!==0&&B.uint32(18).bytes(O.acknowledgement),O.proofAcked.length!==0&&B.uint32(26).bytes(O.proofAcked),O.proofHeight!==void 0&&t.Height.encode(O.proofHeight,B.uint32(34).fork()).ldelim(),O.signer!==""&&B.uint32(42).string(O.signer),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=d();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.packet=n.Packet.decode(M,M.uint32());break;case 2:H.acknowledgement=M.bytes();break;case 3:H.proofAcked=M.bytes();break;case 4:H.proofHeight=t.Height.decode(M,M.uint32());break;case 5:H.signer=M.string();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=d();return(0,u.isSet)(O.packet)&&(B.packet=n.Packet.fromJSON(O.packet)),(0,u.isSet)(O.acknowledgement)&&(B.acknowledgement=(0,u.bytesFromBase64)(O.acknowledgement)),(0,u.isSet)(O.proofAcked)&&(B.proofAcked=(0,u.bytesFromBase64)(O.proofAcked)),(0,u.
3isSet)(O.proofHeight)&&(B.proofHeight=t.Height.fromJSON(O.proofHeight)),(0,u.isSet)(O.signer)&&(B.signer=String(O.signer)),B},toJSON(O){const B={};return O.packet!==void 0&&(B.packet=O.packet?n.Packet.toJSON(O.packet):void 0),O.acknowledgement!==void 0&&(B.acknowledgement=(0,u.base64FromBytes)(O.acknowledgement!==void 0?O.acknowledgement:new Uint8Array)),O.proofAcked!==void 0&&(B.proofAcked=(0,u.base64FromBytes)(O.proofAcked!==void 0?O.proofAcked:new Uint8Array)),O.proofHeight!==void 0&&(B.proofHeight=O.proofHeight?t.Height.toJSON(O.proofHeight):void 0),O.signer!==void 0&&(B.signer=O.signer),B},fromPartial(O){const B=d();return O.packet!==void 0&&O.packet!==null&&(B.packet=n.Packet.fromPartial(O.packet)),B.acknowledgement=O.acknowledgement??new Uint8Array,B.proofAcked=O.proofAcked??new Uint8Array,O.proofHeight!==void 0&&O.proofHeight!==null&&(B.proofHeight=t.Height.fromPartial(O.proofHeight)),B.signer=O.signer??"",B}};function l(){return{result:0}}e.MsgAcknowledgementResponse={typeUrl:"/ibc.core.channel.v1.MsgAcknowledgementResponse",encode(O,B=i.BinaryWriter.create()){return O.result!==0&&B.uint32(8).int32(O.result),B},decode(O,B){const M=O instanceof i.BinaryReader?O:new i.BinaryReader(O);let W=B===void 0?M.len:M.pos+B;const H=l();for(;M.pos<W;){const a=M.uint32();switch(a>>>3){case 1:H.result=M.int32();break;default:M.skipType(a&7);break}}return H},fromJSON(O){const B=l();return(0,u.isSet)(O.result)&&(B.result=v(O.result)),B},toJSON(O){const B={};return O.result!==void 0&&(B.result=E(O.result)),B},fromPartial(O){const B=l();return B.result=O.result??0,B}};class T{constructor(B){this.rpc=B,this.ChannelOpenInit=this.ChannelOpenInit.bind(this),this.ChannelOpenTry=this.ChannelOpenTry.bind(this),this.ChannelOpenAck=this.ChannelOpenAck.bind(this),this.ChannelOpenConfirm=this.ChannelOpenConfirm.bind(this),this.ChannelCloseInit=this.ChannelCloseInit.bind(this),this.ChannelCloseConfirm=this.ChannelCloseConfirm.bind(this),this.RecvPacket=this.RecvPacket.bind(this),this.Timeout=this.Timeout.bind(this),this.TimeoutOnClose=this.TimeoutOnClose.bind(this),this.Acknowledgement=this.Acknowledgement.bind(this)}ChannelOpenInit(B){const M=e.MsgChannelOpenInit.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenInit",M).then(H=>e.MsgChannelOpenInitResponse.decode(new i.BinaryReader(H)))}ChannelOpenTry(B){const M=e.MsgChannelOpenTry.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenTry",M).then(H=>e.MsgChannelOpenTryResponse.decode(new i.BinaryReader(H)))}ChannelOpenAck(B){const M=e.MsgChannelOpenAck.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenAck",M).then(H=>e.MsgChannelOpenAckResponse.decode(new i.BinaryReader(H)))}ChannelOpenConfirm(B){const M=e.MsgChannelOpenConfirm.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenConfirm",M).then(H=>e.MsgChannelOpenConfirmResponse.decode(new i.BinaryReader(H)))}ChannelCloseInit(B){const M=e.MsgChannelCloseInit.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelCloseInit",M).then(H=>e.MsgChannelCloseInitResponse.decode(new i.BinaryReader(H)))}ChannelCloseConfirm(B){const M=e.MsgChannelCloseConfirm.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelCloseConfirm",M).then(H=>e.MsgChannelCloseConfirmResponse.decode(new i.BinaryReader(H)))}RecvPacket(B){const M=e.MsgRecvPacket.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","RecvPacket",M).then(H=>e.MsgRecvPacketResponse.decode(new i.BinaryReader(H)))}Timeout(B){const M=e.MsgTimeout.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","Timeout",M).then(H=>e.MsgTimeoutResponse.decode(new i.BinaryReader(H)))}TimeoutOnClose(B){const M=e.MsgTimeoutOnClose.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","TimeoutOnClose",M).then(H=>e.MsgTimeoutOnCloseResponse.decode(new i.BinaryReader(H)))}Acknowledgement(B){const M=e.MsgAcknowledgement.encode(B).finish();return this.rpc.request("ibc.core.channel.v1.Msg","Acknowledgement",M).then(H=>
3e.MsgAcknowledgementResponse.decode(new i.BinaryReader(H)))}}e.MsgClientImpl=T})(Il);var Tl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgSubmitMisbehaviourResponse=e.MsgSubmitMisbehaviour=e.MsgUpgradeClientResponse=e.MsgUpgradeClient=e.MsgUpdateClientResponse=e.MsgUpdateClient=e.MsgCreateClientResponse=e.MsgCreateClient=e.protobufPackage=void 0;const n=Re,t=te,i=ee;e.protobufPackage="ibc.core.client.v1";function u(){return{clientState:void 0,consensusState:void 0,signer:""}}e.MsgCreateClient={typeUrl:"/ibc.core.client.v1.MsgCreateClient",encode(p,k=t.BinaryWriter.create()){return p.clientState!==void 0&&n.Any.encode(p.clientState,k.uint32(10).fork()).ldelim(),p.consensusState!==void 0&&n.Any.encode(p.consensusState,k.uint32(18).fork()).ldelim(),p.signer!==""&&k.uint32(26).string(p.signer),k},decode(p,k){const o=p instanceof t.BinaryReader?p:new t.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=u();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.clientState=n.Any.decode(o,o.uint32());break;case 2:y.consensusState=n.Any.decode(o,o.uint32());break;case 3:y.signer=o.string();break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=u();return(0,i.isSet)(p.clientState)&&(k.clientState=n.Any.fromJSON(p.clientState)),(0,i.isSet)(p.consensusState)&&(k.consensusState=n.Any.fromJSON(p.consensusState)),(0,i.isSet)(p.signer)&&(k.signer=String(p.signer)),k},toJSON(p){const k={};return p.clientState!==void 0&&(k.clientState=p.clientState?n.Any.toJSON(p.clientState):void 0),p.consensusState!==void 0&&(k.consensusState=p.consensusState?n.Any.toJSON(p.consensusState):void 0),p.signer!==void 0&&(k.signer=p.signer),k},fromPartial(p){const k=u();return p.clientState!==void 0&&p.clientState!==null&&(k.clientState=n.Any.fromPartial(p.clientState)),p.consensusState!==void 0&&p.consensusState!==null&&(k.consensusState=n.Any.fromPartial(p.consensusState)),k.signer=p.signer??"",k}};function R(){return{}}e.MsgCreateClientResponse={typeUrl:"/ibc.core.client.v1.MsgCreateClientResponse",encode(p,k=t.BinaryWriter.create()){return k},decode(p,k){const o=p instanceof t.BinaryReader?p:new t.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=R();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){default:o.skipType(w&7);break}}return y},fromJSON(p){return R()},toJSON(p){return{}},fromPartial(p){return R()}};function v(){return{clientId:"",clientMessage:void 0,signer:""}}e.MsgUpdateClient={typeUrl:"/ibc.core.client.v1.MsgUpdateClient",encode(p,k=t.BinaryWriter.create()){return p.clientId!==""&&k.uint32(10).string(p.clientId),p.clientMessage!==void 0&&n.Any.encode(p.clientMessage,k.uint32(18).fork()).ldelim(),p.signer!==""&&k.uint32(26).string(p.signer),k},decode(p,k){const o=p instanceof t.BinaryReader?p:new t.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=v();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.clientId=o.string();break;case 2:y.clientMessage=n.Any.decode(o,o.uint32());break;case 3:y.signer=o.string();break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=v();return(0,i.isSet)(p.clientId)&&(k.clientId=String(p.clientId)),(0,i.isSet)(p.clientMessage)&&(k.
3clientMessage=n.Any.fromJSON(p.clientMessage)),(0,i.isSet)(p.signer)&&(k.signer=String(p.signer)),k},toJSON(p){const k={};return p.clientId!==void 0&&(k.clientId=p.clientId),p.clientMessage!==void 0&&(k.clientMessage=p.clientMessage?n.Any.toJSON(p.clientMessage):void 0),p.signer!==void 0&&(k.signer=p.signer),k},fromPartial(p){const k=v();return k.clientId=p.clientId??"",p.clientMessage!==void 0&&p.clientMessage!==null&&(k.clientMessage=n.Any.fromPartial(p.clientMessage)),k.signer=p.signer??"",k}};function E(){return{}}e.MsgUpdateClientResponse={typeUrl:"/ibc.core.client.v1.MsgUpdateClientResponse",encode(p,k=t.BinaryWriter.create()){return k},decode(p,k){const o=p instanceof t.BinaryReader?p:new t.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=E();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){default:o.skipType(w&7);break}}return y},fromJSON(p){return E()},toJSON(p){return{}},fromPartial(p){return E()}};function C(){return{clientId:"",clientState:void 0,consensusState:void 0,proofUpgradeClient:new Uint8Array,proofUpgradeConsensusState:new Uint8Array,signer:""}}e.MsgUpgradeClient={typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",encode(p,k=t.BinaryWriter.create()){return p.clientId!==""&&k.uint32(10).string(p.clientId),p.clientState!==void 0&&n.Any.encode(p.clientState,k.uint32(18).fork()).ldelim(),p.consensusState!==void 0&&n.Any.encode(p.consensusState,k.uint32(26).fork()).ldelim(),p.proofUpgradeClient.length!==0&&k.uint32(34).bytes(p.proofUpgradeClient),p.proofUpgradeConsensusState.length!==0&&k.uint32(42).bytes(p.proofUpgradeConsensusState),p.signer!==""&&k.uint32(50).string(p.signer),k},decode(p,k){const o=p instanceof t.BinaryReader?p:new t.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=C();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.clientId=o.string();break;case 2:y.clientState=n.Any.decode(o,o.uint32());break;case 3:y.consensusState=n.Any.decode(o,o.uint32());break;case 4:y.proofUpgradeClient=o.bytes();break;case 5:y.proofUpgradeConsensusState=o.bytes();break;case 6:y.signer=o.string();break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=C();return(0,i.isSet)(p.clientId)&&(k.clientId=String(p.clientId)),(0,i.isSet)(p.clientState)&&(k.clientState=n.Any.fromJSON(p.clientState)),(0,i.isSet)(p.consensusState)&&(k.consensusState=n.Any.fromJSON(p.consensusState)),(0,i.isSet)(p.proofUpgradeClient)&&(k.proofUpgradeClient=(0,i.bytesFromBase64)(p.proofUpgradeClient)),(0,i.isSet)(p.proofUpgradeConsensusState)&&(k.proofUpgradeConsensusState=(0,i.bytesFromBase64)(p.proofUpgradeConsensusState)),(0,i.isSet)(p.signer)&&(k.signer=String(p.signer)),k},toJSON(p){const k={};return p.clientId!==void 0&&(k.clientId=p.clientId),p.clientState!==void 0&&(k.clientState=p.clientState?n.Any.toJSON(p.clientState):void 0),p.consensusState!==void 0&&(k.consensusState=p.consensusState?n.Any.toJSON(p.consensusState):void 0),p.proofUpgradeClient!==void 0&&(k.proofUpgradeClient=(0,i.base64FromBytes)(p.proofUpgradeClient!==void 0?p.proofUpgradeClient:new Uint8Array)),p.proofUpgradeConsensusState!==void 0&&(k.proofUpgradeConsensusState=(0,i.base64FromBytes)(p.proofUpgradeConsensusState!==void 0?p.proofUpgradeConsensusState:new Uint8Array)),p.signer!==void 0&&(k.signer=p.signer),k},fromPartial(p){const k=C();return k.clientId=p.clientId??"",p.clientState!==void 0&&p.clientState!==null&&(k.clientState=n.Any.fromPartial(p.clientState)),p.consensusState!==void 0&&p.consensusState!==null&&(k.consensusState=n.Any.fromPartial(p.consensusState)),k.proofUpgradeClient=p.proofUpgradeClient??new Uint8Array,k.proofUpgradeConsensusState=p.proofUpgradeConsensusState??new Uint8Array,k.signer=p.signer??"",k}};function D(){return{}}e.MsgUpgradeClientResponse={typeUrl:"/ibc.core.client.v1.MsgUpgradeClientResponse",encode(p,k=t.BinaryWriter.create()){return k},decode(p,k){const o=p instanceof t.BinaryReader?p:new t.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=D();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){default:o.skipType(w&7);break}}return y},fromJSON(p){return D()},toJSON(p){return{}},fromPartial(p){return D()}};function _(){return{clientId:"",misbehaviour:void 0,signer:""}}e.MsgSubmitMisbehaviour={typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",encode(p,k=t.BinaryWriter.create()){return p.clientId!==""&&k.uint32(10).string(p.clientId),p.misbehaviour!==void 0&&n.Any.encode(p.misbehaviour,k.uint32(18).fork()).ldelim(),p.signer!==""&&k.uint32(26).string(p.signer),k},decode(p,k){const o=p instanceof t.BinaryReader?p:new t.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=_();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){case 1:y.clientId=o.string();break;case 2:y.misbehaviour=n.Any.decode(o,o.uint32());break;
3case 3:y.signer=o.string();break;default:o.skipType(w&7);break}}return y},fromJSON(p){const k=_();return(0,i.isSet)(p.clientId)&&(k.clientId=String(p.clientId)),(0,i.isSet)(p.misbehaviour)&&(k.misbehaviour=n.Any.fromJSON(p.misbehaviour)),(0,i.isSet)(p.signer)&&(k.signer=String(p.signer)),k},toJSON(p){const k={};return p.clientId!==void 0&&(k.clientId=p.clientId),p.misbehaviour!==void 0&&(k.misbehaviour=p.misbehaviour?n.Any.toJSON(p.misbehaviour):void 0),p.signer!==void 0&&(k.signer=p.signer),k},fromPartial(p){const k=_();return k.clientId=p.clientId??"",p.misbehaviour!==void 0&&p.misbehaviour!==null&&(k.misbehaviour=n.Any.fromPartial(p.misbehaviour)),k.signer=p.signer??"",k}};function b(){return{}}e.MsgSubmitMisbehaviourResponse={typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviourResponse",encode(p,k=t.BinaryWriter.create()){return k},decode(p,k){const o=p instanceof t.BinaryReader?p:new t.BinaryReader(p);let s=k===void 0?o.len:o.pos+k;const y=b();for(;o.pos<s;){const w=o.uint32();switch(w>>>3){default:o.skipType(w&7);break}}return y},fromJSON(p){return b()},toJSON(p){return{}},fromPartial(p){return b()}};class f{constructor(k){this.rpc=k,this.CreateClient=this.CreateClient.bind(this),this.UpdateClient=this.UpdateClient.bind(this),this.UpgradeClient=this.UpgradeClient.bind(this),this.SubmitMisbehaviour=this.SubmitMisbehaviour.bind(this)}CreateClient(k){const o=e.MsgCreateClient.encode(k).finish();return this.rpc.request("ibc.core.client.v1.Msg","CreateClient",o).then(y=>e.MsgCreateClientResponse.decode(new t.BinaryReader(y)))}UpdateClient(k){const o=e.MsgUpdateClient.encode(k).finish();return this.rpc.request("ibc.core.client.v1.Msg","UpdateClient",o).then(y=>e.MsgUpdateClientResponse.decode(new t.BinaryReader(y)))}UpgradeClient(k){const o=e.MsgUpgradeClient.encode(k).finish();return this.rpc.request("ibc.core.client.v1.Msg","UpgradeClient",o).then(y=>e.MsgUpgradeClientResponse.decode(new t.BinaryReader(y)))}SubmitMisbehaviour(k){const o=e.MsgSubmitMisbehaviour.encode(k).finish();return this.rpc.request("ibc.core.client.v1.Msg","SubmitMisbehaviour",o).then(y=>e.MsgSubmitMisbehaviourResponse.decode(new t.BinaryReader(y)))}}e.MsgClientImpl=f})(Tl);var Nl={},su={},dn={},du={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CompressedNonExistenceProof=e.CompressedExistenceProof=e.CompressedBatchEntry=e.CompressedBatchProof=e.BatchEntry=e.BatchProof=e.InnerSpec=e.ProofSpec=e.InnerOp=e.LeafOp=e.CommitmentProof=e.NonExistenceProof=e.ExistenceProof=e.lengthOpToJSON=e.lengthOpFromJSON=e.LengthOp=e.hashOpToJSON=e.hashOpFromJSON=e.HashOp=e.protobufPackage=void 0;const n=te,t=ee;e.protobufPackage="cosmos.ics23.v1";var i;(function(r){r[r.NO_HASH=0]="NO_HASH",r[r.SHA256=1]="SHA256",r[r.SHA512=2]="SHA512",r[r.KECCAK=3]="KECCAK",r[r.RIPEMD160=4]="RIPEMD160",r[r.BITCOIN=5]="BITCOIN",r[r.SHA512_256=6]="SHA512_256",r[r.UNRECOGNIZED=-1]="UNRECOGNIZED"})(i||(e.HashOp=i={}));function u(r){switch(r){case 0:case"NO_HASH":return i.NO_HASH;case 1:case"SHA256":return i.SHA256;case 2:case"SHA512":return i.SHA512;case 3:case"KECCAK":return i.KECCAK;case 4:case"RIPEMD160":return i.RIPEMD160;case 5:case"BITCOIN":return i.BITCOIN;case 6:case"SHA512_256":return i.SHA512_256;case-1:case"UNRECOGNIZED":default:return i.UNRECOGNIZED}}e.hashOpFromJSON=u;function R(r){switch(r){case i.NO_HASH:return"NO_HASH";case i.SHA256:return"SHA256";case i.SHA512:return"SHA512";case i.KECCAK:return"KECCAK";case i.RIPEMD160:return"RIPEMD160";case i.BITCOIN:return"BITCOIN";case i.SHA512_256:return"SHA512_256";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.hashOpToJSON=R;var v;(function(r){r[r.NO_PREFIX=0]="NO_PREFIX",r[r.VAR_PROTO=1]="VAR_PROTO",r[r.VAR_RLP=2]="VAR_RLP",r[r.FIXED32_BIG=3]="FIXED32_BIG",r[r.FIXED32_LITTLE=4]="FIXED32_LITTLE",r[r.FIXED64_BIG=5]="FIXED64_BIG",r[r.FIXED64_LITTLE=6]="FIXED64_LITTLE",r[r.REQUIRE_32_BYTES=7]="REQUIRE_32_BYTES",r[r.REQUIRE_64_BYTES=8]="REQUIRE_64_BYTES",r[r.UNRECOGNIZED=-1]="UNRECOGNIZED"})(v||(e.LengthOp=v={}));function E(r){switch(r){case 0:case"NO_PREFIX":return v.NO_PREFIX;case 1:case"VAR_PROTO":return v.VAR_PROTO;case 2:case"VAR_RLP":return v.VAR_RLP;case 3:case"FIXED32_BIG":return v.FIXED32_BIG;case 4:case"FIXED32_LITTLE":return v.FIXED32_LITTLE;case 5:case"FIXED64_BIG":return v.FIXED64_BIG;case 6:case"FIXED64_LITTLE":return v.FIXED64_LITTLE;case 7:case"REQUIRE_32_BYTES":return v.REQUIRE_32_BYTES;case 8:case"REQUIRE_64_BYTES":return v.REQUIRE_64_BYTES;case-1:case"UNRECOGNIZED":default:return v.UNRECOGNIZED}}e.lengthOpFromJSON=E;function C(r){switch(r){case v.NO_PREFIX:return"NO_PREFIX";case v.VAR_PROTO:return"VAR_PROTO";case v.VAR_RLP:return"VAR_RLP";case v.FIXED32_BIG:return"FIXED32_BIG";case v.FIXED32_LITTLE:return"FIXED32_LITTLE";case v.FIXED64_BIG:return"FIXED64_BIG";
3case v.FIXED64_LITTLE:return"FIXED64_LITTLE";case v.REQUIRE_32_BYTES:return"REQUIRE_32_BYTES";case v.REQUIRE_64_BYTES:return"REQUIRE_64_BYTES";case v.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.lengthOpToJSON=C;function D(){return{key:new Uint8Array,value:new Uint8Array,leaf:void 0,path:[]}}e.ExistenceProof={typeUrl:"/cosmos.ics23.v1.ExistenceProof",encode(r,m=n.BinaryWriter.create()){r.key.length!==0&&m.uint32(10).bytes(r.key),r.value.length!==0&&m.uint32(18).bytes(r.value),r.leaf!==void 0&&e.LeafOp.encode(r.leaf,m.uint32(26).fork()).ldelim();for(const N of r.path)e.InnerOp.encode(N,m.uint32(34).fork()).ldelim();return m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=D();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.key=N.bytes();break;case 2:d.value=N.bytes();break;case 3:d.leaf=e.LeafOp.decode(N,N.uint32());break;case 4:d.path.push(e.InnerOp.decode(N,N.uint32()));break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=D();return(0,t.isSet)(r.key)&&(m.key=(0,t.bytesFromBase64)(r.key)),(0,t.isSet)(r.value)&&(m.value=(0,t.bytesFromBase64)(r.value)),(0,t.isSet)(r.leaf)&&(m.leaf=e.LeafOp.fromJSON(r.leaf)),Array.isArray(r==null?void 0:r.path)&&(m.path=r.path.map(N=>e.InnerOp.fromJSON(N))),m},toJSON(r){const m={};return r.key!==void 0&&(m.key=(0,t.base64FromBytes)(r.key!==void 0?r.key:new Uint8Array)),r.value!==void 0&&(m.value=(0,t.base64FromBytes)(r.value!==void 0?r.value:new Uint8Array)),r.leaf!==void 0&&(m.leaf=r.leaf?e.LeafOp.toJSON(r.leaf):void 0),r.path?m.path=r.path.map(N=>N?e.InnerOp.toJSON(N):void 0):m.path=[],m},fromPartial(r){var N;const m=D();return m.key=r.key??new Uint8Array,m.value=r.value??new Uint8Array,r.leaf!==void 0&&r.leaf!==null&&(m.leaf=e.LeafOp.fromPartial(r.leaf)),m.path=((N=r.path)==null?void 0:N.map(V=>e.InnerOp.fromPartial(V)))||[],m}};function _(){return{key:new Uint8Array,left:void 0,right:void 0}}e.NonExistenceProof={typeUrl:"/cosmos.ics23.v1.NonExistenceProof",encode(r,m=n.BinaryWriter.create()){return r.key.length!==0&&m.uint32(10).bytes(r.key),r.left!==void 0&&e.ExistenceProof.encode(r.left,m.uint32(18).fork()).ldelim(),r.right!==void 0&&e.ExistenceProof.encode(r.right,m.uint32(26).fork()).ldelim(),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=_();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.key=N.bytes();break;case 2:d.left=e.ExistenceProof.decode(N,N.uint32());break;case 3:d.right=e.ExistenceProof.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=_();return(0,t.isSet)(r.key)&&(m.key=(0,t.bytesFromBase64)(r.key)),(0,t.isSet)(r.left)&&(m.left=e.ExistenceProof.fromJSON(r.left)),(0,t.isSet)(r.right)&&(m.right=e.ExistenceProof.fromJSON(r.right)),m},toJSON(r){const m={};return r.key!==void 0&&(m.key=(0,t.base64FromBytes)(r.key!==void 0?r.key:new Uint8Array)),r.left!==void 0&&(m.left=r.left?e.ExistenceProof.toJSON(r.left):void 0),r.right!==void 0&&(m.right=r.right?e.ExistenceProof.toJSON(r.right):void 0),m},fromPartial(r){const m=_();return m.key=r.key??new Uint8Array,r.left!==void 0&&r.left!==null&&(m.left=e.ExistenceProof.fromPartial(r.left)),r.right!==void 0&&r.right!==null&&(m.right=e.ExistenceProof.fromPartial(r.right)),m}};function b(){return{exist:void 0,nonexist:void 0,batch:void 0,compressed:void 0}}e.CommitmentProof={typeUrl:"/cosmos.ics23.v1.CommitmentProof",encode(r,m=n.BinaryWriter.create()){return r.exist!==void 0&&e.ExistenceProof.encode(r.exist,m.uint32(10).fork()).ldelim(),r.nonexist!==void 0&&e.NonExistenceProof.encode(r.nonexist,m.uint32(18).fork()).ldelim(),r.batch!==void 0&&e.BatchProof.encode(r.batch,m.uint32(26).fork()).ldelim(),r.compressed!==void 0&&e.CompressedBatchProof.encode(r.compressed,m.uint32(34).fork()).ldelim(),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=b();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.exist=e.ExistenceProof.decode(N,N.uint32());break;case 2:d.nonexist=e.NonExistenceProof.decode(N,N.uint32());break;case 3:d.batch=e.BatchProof.decode(N,N.uint32());break;case 4:d.compressed=e.CompressedBatchProof.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=b();return(0,t.isSet)(r.exist)&&(m.exist=e.ExistenceProof.fromJSON(r.exist)),(0,t.isSet)(r.nonexist)&&(m.nonexist=e.NonExistenceProof.fromJSON(r.nonexist)),(0,t.isSet)(r.batch)&&(m.batch=e.BatchProof.fromJSON(r.batch)),(0,t.isSet)(r.compressed)&&(m.compressed=e.CompressedBatchProof.fromJSON(r.compressed)),m},toJSON(r){const m={};return r.exist!==void 0&&(m.exist=r.exist?e.ExistenceProof.toJSON(r.exist):void 0),r.nonexist!==void 0&&(m.nonexist=r.nonexist?e.NonExistenceProof.toJSON(r.nonexist):void 0),r.batch!==void 0&&(m.batch=r.batch?e.BatchProof.toJSON(r.batch):void 0),r.compressed!==void 0&&(m.compressed=r.compressed?e.CompressedBatchProof.toJSON(r.compressed):void 0),m},fromPartial(r){const m=b();return r.exist!==void 0&&r.exist!==null&&(m.exist=e.ExistenceProof.fromPartial(r.exist)),r.nonexist!==void 0&&r.nonexist!==null&&(m.nonexist=e.NonExistenceProof.fromPartial(r.nonexist)),r.batch!==void 0&&r.batch!==null&&(m.batch=e.BatchProof.fromPartial(r.batch)),r.compressed!==void 0&&r.compressed!==null&&(m.compressed=e.CompressedBatchProof.fromPartial(r.compressed)),m}};function f(){return{hash:0,prehashKey:0,prehashValue:0,length:0,prefix:new Uint8Array}}e.LeafOp={typeUrl:"/cosmos.ics23.v1.LeafOp",encode(r,m=n.BinaryWriter.create()){return r.hash!==0&&m.uint32(8).int32(r.hash),r.prehashKey!==0&&m.uint32(16).int32(r.prehashKey),r.prehashValue!==0&&m.uint32(24).int32(r.prehashValue),r.length!==0&&m.uint32(32).int32(r.length),r.prefix.length!==0&&m.uint32(42).bytes(r.prefix),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=f();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.hash=N.int32();break;case 2:d.prehashKey=N.int32();break;case 3:d.prehashValue=N.int32();break;case 4:d.length=N.int32();break;case 5:d.prefix=N.bytes();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=f();return(0,t.isSet)(r.hash)&&(m.hash=u(r.hash)),(0,t.isSet)(r.prehashKey)&&(m.prehashKey=u(r.prehashKey)),(0,t.isSet)(r.prehashValue)&&(m.prehashValue=u(r.prehashValue)),(0,t.isSet)(r.length)&&(m.length=E(r.length)),(0,t.isSet)(r.prefix)&&(m.prefix=(0,t.bytesFromBase64)(r.prefix)),m},toJSON(r){const m={};return r.hash!==void 0&&(m.hash=R(r.hash)),r.prehashKey!==void 0&&(m.prehashKey=R(r.prehashKey)),r.prehashValue!==void 0&&(m.prehashValue=R(r.prehashValue)),r.length!==void 0&&(m.length=C(r.length)),r.prefix!==void 0&&(m.prefix=(0,t.base64FromBytes)(r.prefix!==void 0?r.prefix:new Uint8Array)),m},fromPartial(r){const m=f();return m.hash=r.hash??0,m.prehashKey=r.prehashKey??0,m.prehashValue=r.prehashValue??0,m.length=r.length??0,m.prefix=r.prefix??new Uint8Array,m}};function p(){return{hash:0,prefix:new Uint8Array,suffix:new Uint8Array}}e.InnerOp={typeUrl:"/cosmos.ics23.v1.InnerOp",encode(r,m=n.BinaryWriter.create()){return r.hash!==0&&m.uint32(8).int32(r.hash),r.prefix.length!==0&&m.uint32(18).bytes(r.prefix),r.suffix.length!==0&&m.uint32(26).bytes(r.suffix),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=p();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.hash=N.int32();break;case 2:d.prefix=N.bytes();break;case 3:d.suffix=N.bytes();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=p();return(0,t.isSet)(r.hash)&&(m.hash=u(r.hash)),(0,t.isSet)(r.prefix)&&(m.prefix=(0,t.bytesFromBase64)(r.prefix)),(0,t.isSet)(r.suffix)&&(m.suffix=(0,t.bytesFromBase64)(r.suffix)),m},toJSON(r){const m={};return r.hash!==void 0&&(m.hash=R(r.hash)),r.prefix!==void 0&&(m.prefix=(0,t.base64FromBytes)(r.prefix!==void 0?r.prefix:new Uint8Array)),r.suffix!==void 0&&(m.suffix=(0,t.base64FromBytes)(r.suffix!==void 0?r.suffix:new Uint8Array)),m},fromPartial(r){const m=p();return m.hash=r.hash??0,m.prefix=r.prefix??new Uint8Array,m.suffix=r.suffix??new Uint8Array,m}};function k(){return{leafSpec:void 0,innerSpec:void 0,maxDepth:0,minDepth:0}}e.ProofSpec={typeUrl:"/cosmos.ics23.v1.ProofSpec",encode(r,m=n.BinaryWriter.create()){return r.leafSpec!==void 0&&e.LeafOp.encode(r.leafSpec,m.uint32(10).fork()).ldelim(),r.innerSpec!==void 0&&e.InnerSpec.encode(r.innerSpec,m.uint32(18).fork()).ldelim(),r.maxDepth!==0&&m.uint32(24).int32(r.maxDepth),r.minDepth!==0&&m.uint32(32).int32(r.minDepth),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=k();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.leafSpec=e.LeafOp.decode(N,N.uint32());break;case 2:d.innerSpec=e.InnerSpec.decode(N,N.uint32());break;case 3:d.maxDepth=N.int32();break;case 4:d.minDepth=N.int32();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=k();return(0,t.isSet)(r.leafSpec)&&(m.leafSpec=e.LeafOp.fromJSON(r.leafSpec)),(0,t.isSet)(r.innerSpec)&&(m.innerSpec=e.InnerSpec.fromJSON(r.innerSpec)),(0,t.isSet)(r.maxDepth)&&(m.maxDepth=Number(r.maxDepth)),(0,t.isSet)(r.minDepth)&&(m.minDepth=Number(r.minDepth)),m},toJSON(r){const m={};return r.leafSpec!==void 0&&(m.leafSpec=r.leafSpec?e.LeafOp.toJSON(r.leafSpec):void 0),r.innerSpec!==void 0&&(m.innerSpec=r.innerSpec?e.InnerSpec.toJSON(r.innerSpec):void 0),r.maxDepth!==void 0&&(m.maxDepth=Math.round(r.maxDepth)),r.minDepth!==void 0&&(m.minDepth=Math.round(r.minDepth)),m},fromPartial(r){const m=k();return r.leafSpec!==void 0&&r.leafSpec!==null&&(m.leafSpec=e.LeafOp.fromPartial(r.leafSpec)),r.innerSpec!==void 0&&r.innerSpec!==null&&(m.innerSpec=e.InnerSpec.fromPartial(r.innerSpec)),m.maxDepth=r.maxDepth??0,m.minDepth=r.minDepth??0,m}};function o(){return{childOrder:[],childSize:0,minPrefixLength:0,maxPrefixLength:0,emptyChild:new Uint8Array,hash:0}}e.InnerSpec={typeUrl:"/cosmos.ics23.v1.InnerSpec",encode(r,m=n.BinaryWriter.create()){m.uint32(10).fork();for(const N of r.childOrder)m.int32(N);return m.ldelim(),r.childSize!==0&&m.uint32(16).int32(r.childSize),r.minPrefixLength!==0&&m.uint32(24).int32(r.minPrefixLength),r.maxPrefixLength!==0&&m.uint32(32).int32(r.maxPrefixLength),r.emptyChild.length!==0&&m.uint32(42).bytes(r.emptyChild),r.hash!==0&&m.uint32(48).int32(r.hash),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=o();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:if((l&7)===2){const T=N.uint32()+N.pos;for(;N.pos<T;)d.childOrder.push(N.int32())}else d.childOrder.push(N.int32());break;case 2:d.childSize=N.int32();break;case 3:d.minPrefixLength=N.int32();break;case 4:d.maxPrefixLength=N.int32();break;case 5:d.emptyChild=N.bytes();break;case 6:d.hash=N.int32();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=o();return Array.isArray(r==null?void 0:r.childOrder)&&(m.childOrder=r.childOrder.map(N=>Number(N))),(0,t.isSet)(r.childSize)&&(m.childSize=Number(r.childSize)),(0,t.isSet)(r.minPrefixLength)&&(m.minPrefixLength=Number(r.minPrefixLength)),(0,t.isSet)(r.maxPrefixLength)&&(m.maxPrefixLength=Number(r.maxPrefixLength)),(0,t.isSet)(r.emptyChild)&&(m.emptyChild=(0,t.bytesFromBase64)(r.emptyChild)),(0,t.isSet)(r.hash)&&(m.hash=u(r.hash)),m},toJSON(r){const m={};return r.childOrder?m.childOrder=r.childOrder.map(N=>Math.round(N)):m.childOrder=[],r.childSize!==void 0&&(m.childSize=Math.round(r.childSize)),r.minPrefixLength!==void 0&&(m.minPrefixLength=Math.round(r.minPrefixLength)),r.maxPrefixLength!==void 0&&(m.maxPrefixLength=Math.round(r.maxPrefixLength)),r.emptyChild!==void 0&&(m.emptyChild=(0,t.base64FromBytes)(r.emptyChild!==void 0?r.emptyChild:new Uint8Array)),r.hash!==void 0&&(m.hash=R(r.hash)),m},fromPartial(r){var N;const m=o();return m.childOrder=((N=r.childOrder)==null?void 0:N.map(V=>V))||[],m.childSize=r.childSize??0,m.minPrefixLength=r.minPrefixLength??0,m.maxPrefixLength=r.maxPrefixLength??0,m.emptyChild=r.emptyChild??new Uint8Array,m.hash=r.hash??0,m}};function s(){return{entries:[]}}e.BatchProof={typeUrl:"/cosmos.ics23.v1.BatchProof",encode(r,m=n.BinaryWriter.create()){for(const N of r.entries)e.BatchEntry.encode(N,m.uint32(10).fork()).ldelim();return m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=s();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.entries.push(e.BatchEntry.decode(N,N.uint32()));break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=s();return Array.isArray(r==null?void 0:r.entries)&&(m.entries=r.entries.map(N=>e.BatchEntry.fromJSON(N))),m},toJSON(r){const m={};return r.entries?m.entries=r.entries.map(N=>N?e.BatchEntry.toJSON(N):void 0):m.entries=[],m},fromPartial(r){var N;const m=s();return m.entries=((N=r.entries)==null?void 0:N.map(V=>e.BatchEntry.fromPartial(V)))||[],m}};function y(){return{exist:void 0,nonexist:void 0}}e.BatchEntry={typeUrl:"/cosmos.ics23.v1.BatchEntry",encode(r,m=n.BinaryWriter.create()){return r.exist!==void 0&&e.ExistenceProof.encode(r.exist,m.uint32(10).fork()).ldelim(),r.nonexist!==void 0&&e.NonExistenceProof.encode(r.nonexist,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=y();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.exist=e.ExistenceProof.decode(N,N.uint32());break;case 2:d.nonexist=e.NonExistenceProof.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=y();return(0,t.isSet)(r.exist)&&(m.exist=e.ExistenceProof.fromJSON(r.exist)),(0,t.isSet)(r.nonexist)&&(m.nonexist=e.NonExistenceProof.fromJSON(r.nonexist)),m},toJSON(r){const m={};return r.exist!==void 0&&(m.exist=r.exist?e.ExistenceProof.toJSON(r.exist):void 0),r.nonexist!==void 0&&(m.nonexist=r.nonexist?e.NonExistenceProof.toJSON(r.nonexist):void 0),m},fromPartial(r){const m=y();return r.exist!==void 0&&r.exist!==null&&(m.exist=e.ExistenceProof.fromPartial(r.exist)),r.nonexist!==void 0&&r.nonexist!==null&&(m.nonexist=e.NonExistenceProof.fromPartial(r.nonexist)),m}};function w(){return{entries:[],lookupInners:[]}}e.CompressedBatchProof={typeUrl:"/cosmos.ics23.v1.CompressedBatchProof",encode(r,m=n.BinaryWriter.create()){for(const N of r.entries)e.CompressedBatchEntry.encode(N,m.uint32(10).fork()).ldelim();for(const N of r.lookupInners)e.InnerOp.encode(N,m.uint32(18).fork()).ldelim();return m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=w();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.entries.push(e.CompressedBatchEntry.decode(N,N.uint32()));break;case 2:d.lookupInners.push(e.InnerOp.decode(N,N.uint32()));break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=w();return Array.isArray(r==null?void 0:r.entries)&&(m.entries=r.entries.map(N=>e.CompressedBatchEntry.fromJSON(N))),Array.isArray(r==null?void 0:r.lookupInners)&&(m.lookupInners=r.lookupInners.map(N=>e.InnerOp.fromJSON(N))),m},toJSON(r){const m={};return r.entries?m.entries=r.entries.map(N=>N?e.CompressedBatchEntry.toJSON(N):void 0):m.entries=[],r.lookupInners?m.lookupInners=r.lookupInners.map(N=>N?e.InnerOp.toJSON(N):void 0):m.lookupInners=[],m},fromPartial(r){var N,V;const m=w();return m.entries=((N=r.entries)==null?void 0:N.map(d=>
3e.CompressedBatchEntry.fromPartial(d)))||[],m.lookupInners=((V=r.lookupInners)==null?void 0:V.map(d=>e.InnerOp.fromPartial(d)))||[],m}};function J(){return{exist:void 0,nonexist:void 0}}e.CompressedBatchEntry={typeUrl:"/cosmos.ics23.v1.CompressedBatchEntry",encode(r,m=n.BinaryWriter.create()){return r.exist!==void 0&&e.CompressedExistenceProof.encode(r.exist,m.uint32(10).fork()).ldelim(),r.nonexist!==void 0&&e.CompressedNonExistenceProof.encode(r.nonexist,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=J();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.exist=e.CompressedExistenceProof.decode(N,N.uint32());break;case 2:d.nonexist=e.CompressedNonExistenceProof.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=J();return(0,t.isSet)(r.exist)&&(m.exist=e.CompressedExistenceProof.fromJSON(r.exist)),(0,t.isSet)(r.nonexist)&&(m.nonexist=e.CompressedNonExistenceProof.fromJSON(r.nonexist)),m},toJSON(r){const m={};return r.exist!==void 0&&(m.exist=r.exist?e.CompressedExistenceProof.toJSON(r.exist):void 0),r.nonexist!==void 0&&(m.nonexist=r.nonexist?e.CompressedNonExistenceProof.toJSON(r.nonexist):void 0),m},fromPartial(r){const m=J();return r.exist!==void 0&&r.exist!==null&&(m.exist=e.CompressedExistenceProof.fromPartial(r.exist)),r.nonexist!==void 0&&r.nonexist!==null&&(m.nonexist=e.CompressedNonExistenceProof.fromPartial(r.nonexist)),m}};function P(){return{key:new Uint8Array,value:new Uint8Array,leaf:void 0,path:[]}}e.CompressedExistenceProof={typeUrl:"/cosmos.ics23.v1.CompressedExistenceProof",encode(r,m=n.BinaryWriter.create()){r.key.length!==0&&m.uint32(10).bytes(r.key),r.value.length!==0&&m.uint32(18).bytes(r.value),r.leaf!==void 0&&e.LeafOp.encode(r.leaf,m.uint32(26).fork()).ldelim(),m.uint32(34).fork();for(const N of r.path)m.int32(N);return m.ldelim(),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=P();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.key=N.bytes();break;case 2:d.value=N.bytes();break;case 3:d.leaf=e.LeafOp.decode(N,N.uint32());break;case 4:if((l&7)===2){const T=N.uint32()+N.pos;for(;N.pos<T;)d.path.push(N.int32())}else d.path.push(N.int32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=P();return(0,t.isSet)(r.key)&&(m.key=(0,t.bytesFromBase64)(r.key)),(0,t.isSet)(r.value)&&(m.value=(0,t.bytesFromBase64)(r.value)),(0,t.isSet)(r.leaf)&&(m.leaf=e.LeafOp.fromJSON(r.leaf)),Array.isArray(r==null?void 0:r.path)&&(m.path=r.path.map(N=>Number(N))),m},toJSON(r){const m={};return r.key!==void 0&&(m.key=(0,t.base64FromBytes)(r.key!==void 0?r.key:new Uint8Array)),r.value!==void 0&&(m.value=(0,t.base64FromBytes)(r.value!==void 0?r.value:new Uint8Array)),r.leaf!==void 0&&(m.leaf=r.leaf?e.LeafOp.toJSON(r.leaf):void 0),r.path?m.path=r.path.map(N=>Math.round(N)):m.path=[],m},fromPartial(r){var N;const m=P();return m.key=r.key??new Uint8Array,m.value=r.value??new Uint8Array,r.leaf!==void 0&&r.leaf!==null&&(m.leaf=e.LeafOp.fromPartial(r.leaf)),m.path=((N=r.path)==null?void 0:N.map(V=>V))||[],m}};function U(){return{key:new Uint8Array,left:void 0,right:void 0}}e.CompressedNonExistenceProof={typeUrl:"/cosmos.ics23.v1.CompressedNonExistenceProof",encode(r,m=n.BinaryWriter.create()){return r.key.length!==0&&m.uint32(10).bytes(r.key),r.left!==void 0&&e.CompressedExistenceProof.encode(r.left,m.uint32(18).fork()).ldelim(),r.right!==void 0&&e.CompressedExistenceProof.encode(r.right,m.uint32(26).fork()).ldelim(),m},decode(r,m){const N=r instanceof n.BinaryReader?r:new n.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=U();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.key=N.bytes();break;case 2:d.left=e.CompressedExistenceProof.decode(N,N.uint32());break;case 3:d.right=e.CompressedExistenceProof.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=U();return(0,t.isSet)(r.key)&&(m.key=(0,t.bytesFromBase64)(r.key)),(0,t.isSet)(r.left)&&(m.left=e.CompressedExistenceProof.fromJSON(r.left)),(0,t.isSet)(r.right)&&(m.right=e.CompressedExistenceProof.fromJSON(r.right)),m},toJSON(r){const m={};return r.key!==void 0&&(m.key=(0,t.base64FromBytes)(r.key!==void 0?r.key:new Uint8Array)),r.left!==void 0&&(m.left=r.left?e.CompressedExistenceProof.toJSON(r.left):void 0),r.right!==void 0&&(m.right=r.right?e.CompressedExistenceProof.toJSON(r.right):void 0),m},fromPartial(r){const m=U();return m.key=r.key??new Uint8Array,r.left!==void 0&&r.left!==null&&(m.left=e.CompressedExistenceProof.fromPartial(r.left)),r.right!==void 0&&r.right!==null&&(m.right=e.CompressedExistenceProof.fromPartial(r.right)),m}}})(du);Object.defineProperty(dn,"__esModule",{value:!0});dn.MerkleProof=dn.MerklePath=dn.MerklePrefix=dn.MerkleRoot=dn.protobufPackage=void 0;const gi=du,Tn=te,Or=ee;
3dn.protobufPackage="ibc.core.commitment.v1";function Ws(){return{hash:new Uint8Array}}dn.MerkleRoot={typeUrl:"/ibc.core.commitment.v1.MerkleRoot",encode(e,n=Tn.BinaryWriter.create()){return e.hash.length!==0&&n.uint32(10).bytes(e.hash),n},decode(e,n){const t=e instanceof Tn.BinaryReader?e:new Tn.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Ws();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.hash=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Ws();return(0,Or.isSet)(e.hash)&&(n.hash=(0,Or.bytesFromBase64)(e.hash)),n},toJSON(e){const n={};return e.hash!==void 0&&(n.hash=(0,Or.base64FromBytes)(e.hash!==void 0?e.hash:new Uint8Array)),n},fromPartial(e){const n=Ws();return n.hash=e.hash??new Uint8Array,n}};function Fs(){return{keyPrefix:new Uint8Array}}dn.MerklePrefix={typeUrl:"/ibc.core.commitment.v1.MerklePrefix",encode(e,n=Tn.BinaryWriter.create()){return e.keyPrefix.length!==0&&n.uint32(10).bytes(e.keyPrefix),n},decode(e,n){const t=e instanceof Tn.BinaryReader?e:new Tn.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Fs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.keyPrefix=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Fs();return(0,Or.isSet)(e.keyPrefix)&&(n.keyPrefix=(0,Or.bytesFromBase64)(e.keyPrefix)),n},toJSON(e){const n={};return e.keyPrefix!==void 0&&(n.keyPrefix=(0,Or.base64FromBytes)(e.keyPrefix!==void 0?e.keyPrefix:new Uint8Array)),n},fromPartial(e){const n=Fs();return n.keyPrefix=e.keyPrefix??new Uint8Array,n}};function Gs(){return{keyPath:[]}}dn.MerklePath={typeUrl:"/ibc.core.commitment.v1.MerklePath",encode(e,n=Tn.BinaryWriter.create()){for(const t of e.keyPath)n.uint32(10).string(t);return n},decode(e,n){const t=e instanceof Tn.BinaryReader?e:new Tn.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Gs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.keyPath.push(t.string());break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Gs();return Array.isArray(e==null?void 0:e.keyPath)&&(n.keyPath=e.keyPath.map(t=>String(t))),n},toJSON(e){const n={};return e.keyPath?n.keyPath=e.keyPath.map(t=>t):n.keyPath=[],n},fromPartial(e){var t;const n=Gs();return n.keyPath=((t=e.keyPath)==null?void 0:t.map(i=>i))||[],n}};function Ls(){return{proofs:[]}}dn.MerkleProof={typeUrl:"/ibc.core.commitment.v1.MerkleProof",encode(e,n=Tn.BinaryWriter.create()){for(const t of e.proofs)gi.CommitmentProof.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){const t=e instanceof Tn.BinaryReader?e:new Tn.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Ls();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.proofs.push(gi.CommitmentProof.decode(t,t.uint32()));break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Ls();return Array.isArray(e==null?void 0:e.proofs)&&(n.proofs=e.proofs.map(t=>gi.CommitmentProof.fromJSON(t))),n},toJSON(e){const n={};return e.proofs?n.proofs=e.proofs.map(t=>t?gi.CommitmentProof.toJSON(t):void 0):n.proofs=[],n},fromPartial(e){var t;const n=Ls();return n.proofs=((t=e.proofs)==null?void 0:t.map(i=>gi.CommitmentProof.fromPartial(i)))||[],n}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Params=e.Version=e.ConnectionPaths=e.ClientPaths=e.Counterparty=e.IdentifiedConnection=e.ConnectionEnd=e.stateToJSON=e.stateFromJSON=e.State=e.protobufPackage=void 0;const n=dn,t=te,i=ee;e.protobufPackage="ibc.core.connection.v1";var u;(function(k){k[k.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",k[k.STATE_INIT=1]="STATE_INIT",k[k.STATE_TRYOPEN=2]="STATE_TRYOPEN",k[k.STATE_OPEN=3]="STATE_OPEN",k[k.UNRECOGNIZED=-1]="UNRECOGNIZED"})(u||(e.State=u={}));function R(k){switch(k){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return u.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return u.STATE_INIT;case 2:case"STATE_TRYOPEN":return u.STATE_TRYOPEN;case 3:case"STATE_OPEN":return u.STATE_OPEN;case-1:case"UNRECOGNIZED":default:return u.UNRECOGNIZED}}e.stateFromJSON=R;function v(k){switch(k){case u.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case u.STATE_INIT:return"STATE_INIT";case u.STATE_TRYOPEN:return"STATE_TRYOPEN";case u.STATE_OPEN:return"STATE_OPEN";case u.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.stateToJSON=v;function E(){return{clientId:"",versions:[],state:0,counterparty:e.Counterparty.fromPartial({}),delayPeriod:BigInt(0)}}e.ConnectionEnd={typeUrl:"/ibc.core.connection.v1.ConnectionEnd",encode(k,o=t.BinaryWriter.create()){k.clientId!==""&&o.uint32(10).string(k.clientId);for(const s of k.versions)e.Version.encode(s,o.uint32(18).fork()).ldelim();return k.state!==0&&o.uint32(24).int32(k.state),k.counterparty!==void 0&&e.Counterparty.encode(k.counterparty,o.uint32(34).fork()).ldelim(),k.delayPeriod!==BigInt(0)&&o.uint32(40).uint64(k.delayPeriod),o},decode(k,o){const s=k instanceof t.BinaryReader?k:new t.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=E();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.clientId=s.string();break;case 2:w.versions.push(e.Version.decode(s,s.uint32()));break;case 3:w.state=s.int32();break;case 4:w.counterparty=e.Counterparty.decode(s,s.uint32());break;case 5:w.delayPeriod=s.uint64();break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=E();return(0,i.isSet)(k.clientId)&&(o.clientId=String(k.clientId)),Array.isArray(k==null?void 0:k.versions)&&(o.versions=k.versions.map(s=>e.Version.fromJSON(s))),(0,i.isSet)(k.state)&&(o.state=R(k.state)),(0,i.isSet)(k.counterparty)&&(o.counterparty=e.Counterparty.fromJSON(k.counterparty)),(0,i.isSet)(k.delayPeriod)&&
3(o.delayPeriod=BigInt(k.delayPeriod.toString())),o},toJSON(k){const o={};return k.clientId!==void 0&&(o.clientId=k.clientId),k.versions?o.versions=k.versions.map(s=>s?e.Version.toJSON(s):void 0):o.versions=[],k.state!==void 0&&(o.state=v(k.state)),k.counterparty!==void 0&&(o.counterparty=k.counterparty?e.Counterparty.toJSON(k.counterparty):void 0),k.delayPeriod!==void 0&&(o.delayPeriod=(k.delayPeriod||BigInt(0)).toString()),o},fromPartial(k){var s;const o=E();return o.clientId=k.clientId??"",o.versions=((s=k.versions)==null?void 0:s.map(y=>e.Version.fromPartial(y)))||[],o.state=k.state??0,k.counterparty!==void 0&&k.counterparty!==null&&(o.counterparty=e.Counterparty.fromPartial(k.counterparty)),k.delayPeriod!==void 0&&k.delayPeriod!==null&&(o.delayPeriod=BigInt(k.delayPeriod.toString())),o}};function C(){return{id:"",clientId:"",versions:[],state:0,counterparty:e.Counterparty.fromPartial({}),delayPeriod:BigInt(0)}}e.IdentifiedConnection={typeUrl:"/ibc.core.connection.v1.IdentifiedConnection",encode(k,o=t.BinaryWriter.create()){k.id!==""&&o.uint32(10).string(k.id),k.clientId!==""&&o.uint32(18).string(k.clientId);for(const s of k.versions)e.Version.encode(s,o.uint32(26).fork()).ldelim();return k.state!==0&&o.uint32(32).int32(k.state),k.counterparty!==void 0&&e.Counterparty.encode(k.counterparty,o.uint32(42).fork()).ldelim(),k.delayPeriod!==BigInt(0)&&o.uint32(48).uint64(k.delayPeriod),o},decode(k,o){const s=k instanceof t.BinaryReader?k:new t.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=C();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.id=s.string();break;case 2:w.clientId=s.string();break;case 3:w.versions.push(e.Version.decode(s,s.uint32()));break;case 4:w.state=s.int32();break;case 5:w.counterparty=e.Counterparty.decode(s,s.uint32());break;case 6:w.delayPeriod=s.uint64();break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=C();return(0,i.isSet)(k.id)&&(o.id=String(k.id)),(0,i.isSet)(k.clientId)&&(o.clientId=String(k.clientId)),Array.isArray(k==null?void 0:k.versions)&&(o.versions=k.versions.map(s=>e.Version.fromJSON(s))),(0,i.isSet)(k.state)&&(o.state=R(k.state)),(0,i.isSet)(k.counterparty)&&(o.counterparty=e.Counterparty.fromJSON(k.counterparty)),(0,i.isSet)(k.delayPeriod)&&
3(o.delayPeriod=BigInt(k.delayPeriod.toString())),o},toJSON(k){const o={};return k.id!==void 0&&(o.id=k.id),k.clientId!==void 0&&(o.clientId=k.clientId),k.versions?o.versions=k.versions.map(s=>s?e.Version.toJSON(s):void 0):o.versions=[],k.state!==void 0&&(o.state=v(k.state)),k.counterparty!==void 0&&(o.counterparty=k.counterparty?e.Counterparty.toJSON(k.counterparty):void 0),k.delayPeriod!==void 0&&(o.delayPeriod=(k.delayPeriod||BigInt(0)).toString()),o},fromPartial(k){var s;const o=C();return o.id=k.id??"",o.clientId=k.clientId??"",o.versions=((s=k.versions)==null?void 0:s.map(y=>e.Version.fromPartial(y)))||[],o.state=k.state??0,k.counterparty!==void 0&&k.counterparty!==null&&(o.counterparty=e.Counterparty.fromPartial(k.counterparty)),k.delayPeriod!==void 0&&k.delayPeriod!==null&&(o.delayPeriod=BigInt(k.delayPeriod.toString())),o}};function D(){return{clientId:"",connectionId:"",prefix:n.MerklePrefix.fromPartial({})}}e.Counterparty={typeUrl:"/ibc.core.connection.v1.Counterparty",encode(k,o=t.BinaryWriter.create()){return k.clientId!==""&&o.uint32(10).string(k.clientId),k.connectionId!==""&&o.uint32(18).string(k.connectionId),k.prefix!==void 0&&n.MerklePrefix.encode(k.prefix,o.uint32(26).fork()).ldelim(),o},decode(k,o){const s=k instanceof t.BinaryReader?k:new t.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=D();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.clientId=s.string();break;case 2:w.connectionId=s.string();break;case 3:w.prefix=n.MerklePrefix.decode(s,s.uint32());break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=D();return(0,i.isSet)(k.clientId)&&(o.clientId=String(k.clientId)),(0,i.isSet)(k.connectionId)&&(o.connectionId=String(k.connectionId)),(0,i.isSet)(k.prefix)&&(o.prefix=n.MerklePrefix.fromJSON(k.prefix)),o},toJSON(k){const o={};return k.clientId!==void 0&&(o.clientId=k.clientId),k.connectionId!==void 0&&(o.connectionId=k.connectionId),k.prefix!==void 0&&(o.prefix=k.prefix?n.MerklePrefix.toJSON(k.prefix):void 0),o},fromPartial(k){const o=D();return o.clientId=k.clientId??"",o.connectionId=k.connectionId??"",k.prefix!==void 0&&k.prefix!==null&&(o.prefix=n.MerklePrefix.fromPartial(k.prefix)),o}};function _(){return{paths:[]}}e.ClientPaths={typeUrl:"/ibc.core.connection.v1.ClientPaths",encode(k,o=t.BinaryWriter.create()){for(const s of k.paths)o.uint32(10).string(s);return o},decode(k,o){const s=k instanceof t.BinaryReader?k:new t.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=_();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.paths.push(s.string());break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=_();return Array.isArray(k==null?void 0:k.paths)&&(o.paths=k.paths.map(s=>String(s))),o},toJSON(k){const o={};return k.paths?o.paths=k.paths.map(s=>s):o.paths=[],o},fromPartial(k){var s;const o=_();return o.paths=((s=k.paths)==null?void 0:s.map(y=>y))||[],o}};function b(){return{clientId:"",paths:[]}}e.ConnectionPaths={typeUrl:"/ibc.core.connection.v1.ConnectionPaths",encode(k,o=t.BinaryWriter.create()){k.clientId!==""&&o.uint32(10).string(k.clientId);for(const s of k.paths)o.uint32(18).string(s);return o},decode(k,o){const s=k instanceof t.BinaryReader?k:new t.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=b();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.clientId=s.string();break;case 2:w.paths.push(s.string());break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=b();return(0,i.isSet)(k.clientId)&&(o.clientId=String(k.clientId)),Array.isArray(k==null?void 0:k.paths)&&(o.paths=k.paths.map(s=>String(s))),o},toJSON(k){const o={};return k.clientId!==void 0&&(o.clientId=k.clientId),k.paths?o.paths=k.paths.map(s=>s):o.paths=[],o},fromPartial(k){var s;const o=b();return o.clientId=k.clientId??"",o.paths=((s=k.paths)==null?void 0:s.map(y=>y))||[],o}};function f(){return{identifier:"",features:[]}}e.Version={typeUrl:"/ibc.core.connection.v1.Version",encode(k,o=t.BinaryWriter.create()){k.identifier!==""&&o.uint32(10).string(k.identifier);for(const s of k.features)o.uint32(18).string(s);return o},decode(k,o){const s=k instanceof t.BinaryReader?k:new t.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=f();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.identifier=s.string();break;case 2:w.features.push(s.string());break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=f();return(0,i.isSet)(k.identifier)&&(o.identifier=String(k.identifier)),Array.isArray(k==null?void 0:k.features)&&(o.features=k.features.map(s=>String(s))),o},toJSON(k){const o={};return k.identifier!==void 0&&(o.identifier=k.identifier),k.features?o.features=k.features.map(s=>s):o.features=[],o},fromPartial(k){var s;const o=f();return o.identifier=k.identifier??"",o.features=((s=k.features)==null?void 0:s.map(y=>y))||[],o}
3};function p(){return{maxExpectedTimePerBlock:BigInt(0)}}e.Params={typeUrl:"/ibc.core.connection.v1.Params",encode(k,o=t.BinaryWriter.create()){return k.maxExpectedTimePerBlock!==BigInt(0)&&o.uint32(8).uint64(k.maxExpectedTimePerBlock),o},decode(k,o){const s=k instanceof t.BinaryReader?k:new t.BinaryReader(k);let y=o===void 0?s.len:s.pos+o;const w=p();for(;s.pos<y;){const J=s.uint32();switch(J>>>3){case 1:w.maxExpectedTimePerBlock=s.uint64();break;default:s.skipType(J&7);break}}return w},fromJSON(k){const o=p();return(0,i.isSet)(k.maxExpectedTimePerBlock)&&(o.maxExpectedTimePerBlock=BigInt(k.maxExpectedTimePerBlock.toString())),o},toJSON(k){const o={};return k.maxExpectedTimePerBlock!==void 0&&(o.maxExpectedTimePerBlock=(k.maxExpectedTimePerBlock||BigInt(0)).toString()),o},fromPartial(k){const o=p();return k.maxExpectedTimePerBlock!==void 0&&k.maxExpectedTimePerBlock!==null&&(o.maxExpectedTimePerBlock=BigInt(k.maxExpectedTimePerBlock.toString())),o}}})(su);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgConnectionOpenConfirmResponse=e.MsgConnectionOpenConfirm=e.MsgConnectionOpenAckResponse=e.MsgConnectionOpenAck=e.MsgConnectionOpenTryResponse=e.MsgConnectionOpenTry=e.MsgConnectionOpenInitResponse=e.MsgConnectionOpenInit=e.protobufPackage=void 0;const n=su,t=Re,i=at,u=te,R=ee;e.protobufPackage="ibc.core.connection.v1";function v(){return{clientId:"",counterparty:n.Counterparty.fromPartial({}),version:void 0,delayPeriod:BigInt(0),signer:""}}e.MsgConnectionOpenInit={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",encode(o,s=u.BinaryWriter.create()){return o.clientId!==""&&s.uint32(10).string(o.clientId),o.counterparty!==void 0&&n.Counterparty.encode(o.counterparty,s.uint32(18).fork()).ldelim(),o.version!==void 0&&n.Version.encode(o.version,s.uint32(26).fork()).ldelim(),o.delayPeriod!==BigInt(0)&&s.uint32(32).uint64(o.delayPeriod),o.signer!==""&&s.uint32(42).string(o.signer),s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=v();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.clientId=y.string();break;case 2:J.counterparty=n.Counterparty.decode(y,y.uint32());break;case 3:J.version=n.Version.decode(y,y.uint32());break;case 4:J.delayPeriod=y.uint64();break;case 5:J.signer=y.string();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=v();return(0,R.isSet)(o.clientId)&&(s.clientId=String(o.clientId)),(0,R.isSet)(o.counterparty)&&(s.counterparty=n.Counterparty.fromJSON(o.counterparty)),(0,R.isSet)(o.version)&&(s.version=n.Version.fromJSON(o.version)),(0,R.isSet)(o.delayPeriod)&&
3(s.delayPeriod=BigInt(o.delayPeriod.toString())),(0,R.isSet)(o.signer)&&(s.signer=String(o.signer)),s},toJSON(o){const s={};return o.clientId!==void 0&&(s.clientId=o.clientId),o.counterparty!==void 0&&(s.counterparty=o.counterparty?n.Counterparty.toJSON(o.counterparty):void 0),o.version!==void 0&&(s.version=o.version?n.Version.toJSON(o.version):void 0),o.delayPeriod!==void 0&&(s.delayPeriod=(o.delayPeriod||BigInt(0)).toString()),o.signer!==void 0&&(s.signer=o.signer),s},fromPartial(o){const s=v();return s.clientId=o.clientId??"",o.counterparty!==void 0&&o.counterparty!==null&&(s.counterparty=n.Counterparty.fromPartial(o.counterparty)),o.version!==void 0&&o.version!==null&&(s.version=n.Version.fromPartial(o.version)),o.delayPeriod!==void 0&&o.delayPeriod!==null&&(s.delayPeriod=BigInt(o.delayPeriod.toString())),s.signer=o.signer??"",s}};function E(){return{}}e.MsgConnectionOpenInitResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInitResponse",encode(o,s=u.BinaryWriter.create()){return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=E();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){default:y.skipType(P&7);break}}return J},fromJSON(o){return E()},toJSON(o){return{}},fromPartial(o){return E()}};function C(){return{clientId:"",previousConnectionId:"",clientState:void 0,counterparty:n.Counterparty.fromPartial({}),delayPeriod:BigInt(0),counterpartyVersions:[],proofHeight:i.Height.fromPartial({}),proofInit:new Uint8Array,proofClient:new Uint8Array,proofConsensus:new Uint8Array,consensusHeight:i.Height.fromPartial({}),signer:"",hostConsensusStateProof:new Uint8Array}}e.MsgConnectionOpenTry={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",encode(o,s=u.BinaryWriter.create()){o.clientId!==""&&s.uint32(10).string(o.clientId),o.previousConnectionId!==""&&s.uint32(18).string(o.previousConnectionId),o.clientState!==void 0&&t.Any.encode(o.clientState,s.uint32(26).fork()).ldelim(),o.counterparty!==void 0&&n.Counterparty.encode(o.counterparty,s.uint32(34).fork()).ldelim(),o.delayPeriod!==BigInt(0)&&s.uint32(40).uint64(o.delayPeriod);for(const y of o.counterpartyVersions)n.Version.encode(y,s.uint32(50).fork()).ldelim();return o.proofHeight!==void 0&&i.Height.encode(o.proofHeight,s.uint32(58).fork()).ldelim(),o.proofInit.length!==0&&s.uint32(66).bytes(o.proofInit),o.proofClient.length!==0&&s.uint32(74).bytes(o.proofClient),o.proofConsensus.length!==0&&s.uint32(82).bytes(o.proofConsensus),o.consensusHeight!==void 0&&i.Height.encode(o.consensusHeight,s.uint32(90).fork()).ldelim(),o.signer!==""&&s.uint32(98).string(o.signer),o.hostConsensusStateProof.length!==0&&s.uint32(106).bytes(o.hostConsensusStateProof),s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=C();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.clientId=y.string();break;case 2:J.previousConnectionId=y.string();break;case 3:J.clientState=t.Any.decode(y,y.uint32());break;case 4:J.counterparty=n.Counterparty.decode(y,y.uint32());break;case 5:J.delayPeriod=y.uint64();break;case 6:J.counterpartyVersions.push(n.Version.decode(y,y.uint32()));break;case 7:J.proofHeight=i.Height.decode(y,y.uint32());break;case 8:J.proofInit=y.bytes();break;case 9:J.proofClient=y.bytes();break;case 10:J.proofConsensus=y.bytes();break;case 11:J.consensusHeight=i.Height.decode(y,y.uint32());break;case 12:J.signer=y.string();break;case 13:J.hostConsensusStateProof=y.bytes();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=C();return(0,R.isSet)(o.clientId)&&(s.clientId=String(o.clientId)),(0,R.isSet)(o.previousConnectionId)&&(s.previousConnectionId=String(o.previousConnectionId)),(0,R.isSet)(o.clientState)&&(s.clientState=t.Any.fromJSON(o.clientState)),(0,R.isSet)(o.counterparty)&&(s.counterparty=n.Counterparty.fromJSON(o.counterparty)),(0,R.isSet)(o.delayPeriod)&&
3(s.delayPeriod=BigInt(o.delayPeriod.toString())),Array.isArray(o==null?void 0:o.counterpartyVersions)&&(s.counterpartyVersions=o.counterpartyVersions.map(y=>n.Version.fromJSON(y))),(0,R.isSet)(o.proofHeight)&&(s.proofHeight=i.Height.fromJSON(o.proofHeight)),(0,R.isSet)(o.proofInit)&&(s.proofInit=(0,R.bytesFromBase64)(o.proofInit)),(0,R.isSet)(o.proofClient)&&(s.proofClient=(0,R.bytesFromBase64)(o.proofClient)),(0,R.isSet)(o.proofConsensus)&&(s.proofConsensus=(0,R.bytesFromBase64)(o.proofConsensus)),(0,R.isSet)(o.consensusHeight)&&(s.consensusHeight=i.Height.fromJSON(o.consensusHeight)),(0,R.isSet)(o.signer)&&(s.signer=String(o.signer)),(0,R.isSet)(o.hostConsensusStateProof)&&(s.hostConsensusStateProof=(0,R.bytesFromBase64)(o.hostConsensusStateProof)),s},toJSON(o){const s={};return o.clientId!==void 0&&(s.clientId=o.clientId),o.previousConnectionId!==void 0&&(s.previousConnectionId=o.previousConnectionId),o.clientState!==void 0&&(s.clientState=o.clientState?t.Any.toJSON(o.clientState):void 0),o.counterparty!==void 0&&(s.counterparty=o.counterparty?n.Counterparty.toJSON(o.counterparty):void 0),o.delayPeriod!==void 0&&(s.delayPeriod=(o.delayPeriod||BigInt(0)).toString()),o.counterpartyVersions?s.counterpartyVersions=o.counterpartyVersions.map(y=>y?n.Version.toJSON(y):void 0):s.counterpartyVersions=[],o.proofHeight!==void 0&&(s.proofHeight=o.proofHeight?i.Height.toJSON(o.proofHeight):void 0),o.proofInit!==void 0&&(s.proofInit=(0,R.base64FromBytes)(o.proofInit!==void 0?o.proofInit:new Uint8Array)),o.proofClient!==void 0&&(s.proofClient=(0,R.base64FromBytes)(o.proofClient!==void 0?o.proofClient:new Uint8Array)),o.proofConsensus!==void 0&&(s.proofConsensus=(0,R.base64FromBytes)(o.proofConsensus!==void 0?o.proofConsensus:new Uint8Array)),o.consensusHeight!==void 0&&(s.consensusHeight=o.consensusHeight?i.Height.toJSON(o.consensusHeight):void 0),o.signer!==void 0&&(s.signer=o.signer),o.hostConsensusStateProof!==void 0&&(s.hostConsensusStateProof=(0,R.base64FromBytes)(o.hostConsensusStateProof!==void 0?o.hostConsensusStateProof:new Uint8Array)),s},fromPartial(o){var y;const s=C();return s.clientId=o.clientId??"",s.previousConnectionId=o.previousConnectionId??"",o.clientState!==void 0&&o.clientState!==null&&(s.clientState=t.Any.fromPartial(o.clientState)),o.counterparty!==void 0&&o.counterparty!==null&&(s.counterparty=n.Counterparty.fromPartial(o.counterparty)),o.delayPeriod!==void 0&&o.delayPeriod!==null&&(s.delayPeriod=BigInt(o.delayPeriod.toString())),s.counterpartyVersions=((y=o.counterpartyVersions)==null?void 0:y.map(w=>n.Version.fromPartial(w)))||[],o.proofHeight!==void 0&&o.proofHeight!==null&&(s.proofHeight=i.Height.fromPartial(o.proofHeight)),s.proofInit=o.proofInit??new Uint8Array,s.proofClient=o.proofClient??new Uint8Array,s.proofConsensus=o.proofConsensus??new Uint8Array,o.consensusHeight!==void 0&&o.consensusHeight!==null&&(s.consensusHeight=i.Height.fromPartial(o.consensusHeight)),s.signer=o.signer??"",s.hostConsensusStateProof=o.hostConsensusStateProof??new Uint8Array,s}};function D(){return{}}e.MsgConnectionOpenTryResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTryResponse",encode(o,s=u.BinaryWriter.create()){return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=D();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){default:y.skipType(P&7);break}}return J},fromJSON(o){return D()},toJSON(o){return{}},fromPartial(o){return D()}};function _(){return{connectionId:"",counterpartyConnectionId:"",version:void 0,clientState:void 0,proofHeight:i.Height.fromPartial({}),proofTry:new Uint8Array,proofClient:new Uint8Array,proofConsensus:new Uint8Array,consensusHeight:i.Height.fromPartial({}),signer:"",hostConsensusStateProof:new Uint8Array}}e.MsgConnectionOpenAck={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",encode(o,s=u.BinaryWriter.create()){return o.connectionId!==""&&s.uint32(10).string(o.connectionId),o.counterpartyConnectionId!==""&&s.uint32(18).string(o.counterpartyConnectionId),o.version!==void 0&&n.Version.encode(o.version,s.uint32(26).fork()).ldelim(),o.clientState!==void 0&&t.Any.encode(o.clientState,s.uint32(34).fork()).ldelim(),o.proofHeight!==void 0&&i.Height.encode(o.proofHeight,s.uint32(42).fork()).ldelim(),o.proofTry.length!==0&&s.uint32(50).bytes(o.proofTry
3),o.proofClient.length!==0&&s.uint32(58).bytes(o.proofClient),o.proofConsensus.length!==0&&s.uint32(66).bytes(o.proofConsensus),o.consensusHeight!==void 0&&i.Height.encode(o.consensusHeight,s.uint32(74).fork()).ldelim(),o.signer!==""&&s.uint32(82).string(o.signer),o.hostConsensusStateProof.length!==0&&s.uint32(90).bytes(o.hostConsensusStateProof),s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=_();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.connectionId=y.string();break;case 2:J.counterpartyConnectionId=y.string();break;case 3:J.version=n.Version.decode(y,y.uint32());break;case 4:J.clientState=t.Any.decode(y,y.uint32());break;case 5:J.proofHeight=i.Height.decode(y,y.uint32());break;case 6:J.proofTry=y.bytes();break;case 7:J.proofClient=y.bytes();break;case 8:J.proofConsensus=y.bytes();break;case 9:J.consensusHeight=i.Height.decode(y,y.uint32());break;case 10:J.signer=y.string();break;case 11:J.hostConsensusStateProof=y.bytes();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=_();return(0,R.isSet)(o.connectionId)&&(s.connectionId=String(o.connectionId)),(0,R.isSet)(o.counterpartyConnectionId)&&(s.counterpartyConnectionId=String(o.counterpartyConnectionId)),(0,R.isSet)(o.version)&&(s.version=n.Version.fromJSON(o.version)),(0,R.isSet)(o.clientState)&&(s.clientState=t.Any.fromJSON(o.clientState)),(0,R.isSet)(o.proofHeight)&&(s.proofHeight=i.Height.fromJSON(o.proofHeight)),(0,R.isSet)(o.proofTry)&&(s.proofTry=(0,R.bytesFromBase64)(o.proofTry)),(0,R.isSet)(o.proofClient)&&(s.proofClient=(0,R.bytesFromBase64)(o.proofClient)),(0,R.isSet)(o.proofConsensus)&&(s.proofConsensus=(0,R.bytesFromBase64)(o.proofConsensus)),(0,R.isSet)(o.consensusHeight)&&(s.consensusHeight=i.Height.fromJSON(o.consensusHeight)),(0,R.isSet)(o.signer)&&(s.signer=String(o.signer)),(0,R.isSet)(o.hostConsensusStateProof)&&(s.hostConsensusStateProof=(0,R.bytesFromBase64)(o.hostConsensusStateProof)),s},toJSON(o){const s={};return o.connectionId!==void 0&&(s.connectionId=o.connectionId),o.counterpartyConnectionId!==void 0&&(s.counterpartyConnectionId=o.counterpartyConnectionId),o.version!==void 0&&(s.version=o.version?n.Version.toJSON(o.version):void 0),o.clientState!==void 0&&(s.clientState=o.clientState?t.Any.toJSON(o.clientState):void 0),o.proofHeight!==void 0&&(s.proofHeight=o.proofHeight?i.Height.toJSON(o.proofHeight):void 0),o.proofTry!==void 0&&(s.proofTry=(0,R.base64FromBytes)(o.proofTry!==void 0?o.proofTry:new Uint8Array)),o.proofClient!==void 0&&(s.proofClient=(0,R.base64FromBytes)(o.proofClient!==void 0?o.proofClient:new Uint8Array)),o.proofConsensus!==void 0&&(s.proofConsensus=(0,R.base64FromBytes)(o.proofConsensus!==void 0?o.proofConsensus:new Uint8Array)),o.consensusHeight!==void 0&&(s.consensusHeight=o.consensusHeight?i.Height.toJSON(o.consensusHeight):void 0),o.signer!==void 0&&(s.signer=o.signer),o.hostConsensusStateProof!==void 0&&(s.hostConsensusStateProof=(0,R.base64FromBytes)(o.hostConsensusStateProof!==void 0?o.hostConsensusStateProof:new Uint8Array)),s},fromPartial(o){const s=_();return s.connectionId=o.connectionId??"",s.counterpartyConnectionId=o.counterpartyConnectionId??"",o.version!==void 0&&o.version!==null&&(s.version=n.Version.fromPartial(o.version)),o.clientState!==void 0&&o.clientState!==null&&(s.clientState=t.Any.fromPartial(o.clientState)),o.proofHeight!==void 0&&o.proofHeight!==null&&(s.proofHeight=i.Height.fromPartial(o.proofHeight)),s.proofTry=o.proofTry??new Uint8Array,s.proofClient=o.proofClient??new Uint8Array,s.proofConsensus=o.proofConsensus??new Uint8Array,o.consensusHeight!==void 0&&o.consensusHeight!==null&&(s.consensusHeight=i.Height.fromPartial(o.consensusHeight)),s.signer=o.signer??"",s.hostConsensusStateProof=o.hostConsensusStateProof??new Uint8Array,s}};function b(){return{}}e.MsgConnectionOpenAckResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAckResponse",encode(o,s=u.BinaryWriter.create()){return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=b();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){default:y.skipType(P&7);break}}return J},fromJSON(o){return b()},toJSON(o){return{}},fromPartial(o){return b()}};function f(){return{connectionId:"",proofAck:new Uint8Array,proofHeight:i.Height.fromPartial({}),signer:""}}e.MsgConnectionOpenConfirm={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",encode(o,s=u.BinaryWriter.create()){return o.connectionId!==""&&s.uint32(10).string(o.connectionId),o.proofAck.length!==0&&s.uint32(18).bytes(o.proofAck),o.proofHeight!==void 0&&i.Height.encode(o.proofHeight,s.uint32(26).fork()).ldelim(),o.signer!==""&&s.uint32(34).string(o.signer),s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=f();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.connectionId=y.string();break;case 2:J.proofAck=y.bytes();break;case 3:J.proofHeight=i.Height.decode(y,y.uint32());break;case 4:J.signer=y.string();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=f();return(0,R.isSet)(o.connectionId)&&(s.connectionId=String(o.connectionId)),(0,R.isSet)(o.proofAck)&&(s.proofAck=(0,R.bytesFromBase64)(o.proofAck)),(0,R.isSet)(o.proofHeight)&&(s.proofHeight=i.Height.fromJSON(o.proofHeight)),(0,R.isSet)(o.signer)&&(s.signer=String(o.signer)),s},toJSON(o){const s={};return o.connectionId!==void 0&&(s.connectionId=o.connectionId),o.proofAck!==void 0&&(s.proofAck=(0,R.base64FromBytes)(o.proofAck!==void 0?o.proofAck:new Uint8Array)),o.proofHeight!==void 0&&(s.proofHeight=o.proofHeight?i.Height.toJSON(o.proofHeight):void 0),o.signer!==void 0&&(s.signer=o.signer),s},fromPartial(o){const s=f();return s.connectionId=o.connectionId??"",s.proofAck=o.proofAck??new Uint8Array,o.proofHeight!==void 0&&o.proofHeight!==null&&(s.proofHeight=i.Height.fromPartial(o.proofHeight)),s.signer=o.signer??"",s}};function p(){return{}}e.MsgConnectionOpenConfirmResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse",encode(o,s=u.BinaryWriter.create()){return s},decode(o,s){const y=o instanceof u.BinaryReader?o:new u.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=p();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){default:y.skipType(P&7);break}}return J},fromJSON(o){return p()},toJSON(o){return{}},fromPartial(o){return p()}};class k{constructor(s){this.rpc=s,this.ConnectionOpenInit=this.ConnectionOpenInit.bind(this),this.ConnectionOpenTry=this.ConnectionOpenTry.bind(this),this.ConnectionOpenAck=this.ConnectionOpenAck.bind(this),this.ConnectionOpenConfirm=this.ConnectionOpenConfirm.bind(this)}ConnectionOpenInit(s){const y=e.MsgConnectionOpenInit.encode(s).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenInit",y).then(J=>e.MsgConnectionOpenInitResponse.decode(new u.BinaryReader(J)))}ConnectionOpenTry(s){const y=e.MsgConnectionOpenTry.encode(s).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenTry",y).then(J=>e.MsgConnectionOpenTryResponse.decode(new u.BinaryReader(J)))}ConnectionOpenAck(s){const y=e.MsgConnectionOpenAck.encode(s).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenAck",y
3).then(J=>e.MsgConnectionOpenAckResponse.decode(new u.BinaryReader(J)))}ConnectionOpenConfirm(s){const y=e.MsgConnectionOpenConfirm.encode(s).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenConfirm",y).then(J=>e.MsgConnectionOpenConfirmResponse.decode(new u.BinaryReader(J)))}}e.MsgClientImpl=k})(Nl);Object.defineProperty(Fr,"__esModule",{value:!0});Fr.isMsgTransferEncodeObject=Fr.ibcTypes=void 0;const yg=ha,Qn=Il,oo=Tl,ao=Nl;Fr.ibcTypes=[["/ibc.applications.transfer.v1.MsgTransfer",yg.MsgTransfer],["/ibc.core.channel.v1.MsgAcknowledgement",Qn.MsgAcknowledgement],["/ibc.core.channel.v1.MsgChannelCloseConfirm",Qn.MsgChannelCloseConfirm],["/ibc.core.channel.v1.MsgChannelCloseInit",Qn.MsgChannelCloseInit],["/ibc.core.channel.v1.MsgChannelOpenAck",Qn.MsgChannelOpenAck],["/ibc.core.channel.v1.MsgChannelOpenConfirm",Qn.MsgChannelOpenConfirm],["/ibc.core.channel.v1.MsgChannelOpenInit",Qn.MsgChannelOpenInit],["/ibc.core.channel.v1.MsgChannelOpenTry",Qn.MsgChannelOpenTry],["/ibc.core.channel.v1.MsgRecvPacket",Qn.MsgRecvPacket],["/ibc.core.channel.v1.MsgTimeout",Qn.MsgTimeout],["/ibc.core.channel.v1.MsgTimeoutOnClose",Qn.MsgTimeoutOnClose],["/ibc.core.client.v1.MsgCreateClient",oo.MsgCreateClient],["/ibc.core.client.v1.MsgSubmitMisbehaviour",oo.MsgSubmitMisbehaviour],["/ibc.core.client.v1.MsgUpdateClient",oo.MsgUpdateClient],["/ibc.core.client.v1.MsgUpgradeClient",oo.MsgUpgradeClient],["/ibc.core.connection.v1.MsgConnectionOpenAck",ao.MsgConnectionOpenAck],["/ibc.core.connection.v1.MsgConnectionOpenConfirm",ao.MsgConnectionOpenConfirm],["/ibc.core.connection.v1.MsgConnectionOpenInit",ao.MsgConnectionOpenInit],["/ibc.core.connection.v1.MsgConnectionOpenTry",ao.MsgConnectionOpenTry]];function hg(e){return e.typeUrl==="/ibc.applications.transfer.v1.MsgTransfer"}Fr.isMsgTransferEncodeObject=hg;var Sa={},Cl={},Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.Params=Bt.DenomTrace=Bt.protobufPackage=void 0;const br=te,To=ee;Bt.protobufPackage="ibc.applications.transfer.v1";function $s(){return{path:"",baseDenom:""}}Bt.DenomTrace={typeUrl:"/ibc.applications.transfer.v1.DenomTrace",encode(e,n=br.BinaryWriter.create()){return e.path!==""&&n.uint32(10).string(e.path),e.baseDenom!==""&&n.uint32(18).string(e.baseDenom),n},decode(e,n){const t=e instanceof br.BinaryReader?e:new br.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=$s();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.path=t.string();break;case 2:u.baseDenom=t.string();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=$s();return(0,To.isSet)(e.path)&&(n.path=String(e.path)),(0,To.isSet)(e.baseDenom)&&(n.baseDenom=String(e.baseDenom)),n},toJSON(e){const n={};return e.path!==void 0&&(n.path=e.path),e.baseDenom!==void 0&&(n.baseDenom=e.baseDenom),n},fromPartial(e){const n=$s();return n.path=e.path??"",n.baseDenom=e.baseDenom??"",n}};function Ks(){return{sendEnabled:!1,receiveEnabled:!1}}Bt.Params={typeUrl:"/ibc.applications.transfer.v1.Params",encode(e,n=br.BinaryWriter.create()){return e.sendEnabled===!0&&n.uint32(8).bool(e.sendEnabled),e.receiveEnabled===!0&&n.uint32(16).bool(e.receiveEnabled),n},decode(e,n){const t=e instanceof br.BinaryReader?e:new br.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Ks();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.sendEnabled=t.bool();break;case 2:u.receiveEnabled=t.bool();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Ks();return(0,To.isSet)(e.sendEnabled)&&(n.sendEnabled=!!e.sendEnabled),(0,To.isSet)(e.receiveEnabled)&&(n.receiveEnabled=!!e.receiveEnabled),n},toJSON(e){const n={};return e.sendEnabled!==void 0&&(n.sendEnabled=e.sendEnabled),e.receiveEnabled!==void 0&&(n.receiveEnabled=e.receiveEnabled),n},fromPartial(e){const n=Ks();return n.sendEnabled=e.sendEnabled??!1,n.receiveEnabled=e.receiveEnabled??!1,n}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryEscrowAddressResponse=e.QueryEscrowAddressRequest=e.QueryDenomHashResponse=e.QueryDenomHashRequest=e.QueryParamsResponse=e.QueryParamsRequest=e.QueryDenomTracesResponse=e.QueryDenomTracesRequest=e.QueryDenomTraceResponse=e.QueryDenomTraceRequest=e.protobufPackage=void 0;const n=_e,t=Bt,i=te,u=ee;
3e.protobufPackage="ibc.applications.transfer.v1";function R(){return{hash:""}}e.QueryDenomTraceRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTraceRequest",encode(s,y=i.BinaryWriter.create()){return s.hash!==""&&y.uint32(10).string(s.hash),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=R();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.hash=w.string();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=R();return(0,u.isSet)(s.hash)&&(y.hash=String(s.hash)),y},toJSON(s){const y={};return s.hash!==void 0&&(y.hash=s.hash),y},fromPartial(s){const y=R();return y.hash=s.hash??"",y}};function v(){return{denomTrace:void 0}}e.QueryDenomTraceResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTraceResponse",encode(s,y=i.BinaryWriter.create()){return s.denomTrace!==void 0&&t.DenomTrace.encode(s.denomTrace,y.uint32(10).fork()).ldelim(),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=v();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.denomTrace=t.DenomTrace.decode(w,w.uint32());break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=v();return(0,u.isSet)(s.denomTrace)&&(y.denomTrace=t.DenomTrace.fromJSON(s.denomTrace)),y},toJSON(s){const y={};return s.denomTrace!==void 0&&(y.denomTrace=s.denomTrace?t.DenomTrace.toJSON(s.denomTrace):void 0),y},fromPartial(s){const y=v();return s.denomTrace!==void 0&&s.denomTrace!==null&&(y.denomTrace=t.DenomTrace.fromPartial(s.denomTrace)),y}};function E(){return{pagination:void 0}}e.QueryDenomTracesRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTracesRequest",encode(s,y=i.BinaryWriter.create()){return s.pagination!==void 0&&n.PageRequest.encode(s.pagination,y.uint32(10).fork()).ldelim(),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=E();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.pagination=n.PageRequest.decode(w,w.uint32());break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=E();return(0,u.isSet)(s.pagination)&&(y.pagination=n.PageRequest.fromJSON(s.pagination)),y},toJSON(s){const y={};return s.pagination!==void 0&&(y.pagination=s.pagination?n.PageRequest.toJSON(s.pagination):void 0),y},fromPartial(s){const y=E();return s.pagination!==void 0&&s.pagination!==null&&(y.pagination=n.PageRequest.fromPartial(s.pagination)),y}};function C(){return{denomTraces:[],pagination:void 0}}e.QueryDenomTracesResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTracesResponse",encode(s,y=i.BinaryWriter.create()){for(const w of s.denomTraces)t.DenomTrace.encode(w,y.uint32(10).fork()).ldelim();return s.pagination!==void 0&&n.PageResponse.encode(s.pagination,y.uint32(18).fork()).ldelim(),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=C();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.denomTraces.push(t.DenomTrace.decode(w,w.uint32()));break;case 2:P.pagination=n.PageResponse.decode(w,w.uint32());break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=C();return Array.isArray(s==null?void 0:s.denomTraces)&&(y.denomTraces=s.denomTraces.map(w=>t.DenomTrace.fromJSON(w))),(0,u.isSet)(s.pagination)&&(y.pagination=n.PageResponse.fromJSON(s.pagination)),y},toJSON(s){const y={};return s.denomTraces?y.denomTraces=s.denomTraces.map(w=>w?t.DenomTrace.toJSON(w):void 0):y.denomTraces=[],s.pagination!==void 0&&(y.pagination=s.pagination?n.PageResponse.toJSON(s.pagination):void 0),y},fromPartial(s){var w;const y=C();return y.denomTraces=((w=s.denomTraces)==null?void 0:w.map(J=>t.DenomTrace.fromPartial(J)))||[],s.pagination!==void 0&&s.pagination!==null&&(y.pagination=n.PageResponse.fromPartial(s.pagination)),y}};function D(){return{}}e.QueryParamsRequest={typeUrl:"/ibc.applications.transfer.v1.QueryParamsRequest",encode(s,y=i.BinaryWriter.create()){return y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=D();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){default:w.skipType(U&7);break}}return P},fromJSON(s){return D()},toJSON(s){return{}},fromPartial(s){return D()}};function _(){return{params:void 0}}e.QueryParamsResponse={typeUrl:"/ibc.applications.transfer.v1.QueryParamsResponse",encode(s,y=i.BinaryWriter.create()){return s.params!==void 0&&t.Params.encode(s.params,y.uint32(10).fork()).ldelim(),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=_();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.params=t.Params.decode(w,w.uint32());break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=_();return(0,u.isSet)(s.params)&&(y.params=t.Params.fromJSON(s.params)),y},toJSON(s){const y={};return s.params!==void 0&&(y.params=s.params?t.Params.toJSON(s.params):void 0),y},fromPartial(s){const y=_();return s.params!==void 0&&s.params!==null&&(y.params=t.Params.fromPartial(s.params)),y}};function b(){return{trace:""}}e.QueryDenomHashRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomHashRequest",encode(s,y=i.BinaryWriter.create()){return s.trace!==""&&y.uint32(10).string(s.trace),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=b();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.trace=w.string();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=b();return(0,u.isSet)(s.trace)&&(y.trace=String(s.trace)),y},toJSON(s){const y={};return s.trace!==void 0&&(y.trace=s.trace),y},fromPartial(s){const y=b();return y.trace=s.trace??"",y}};function f(){return{hash:""}}e.QueryDenomHashResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomHashResponse",encode(s,y=i.BinaryWriter.create()){return s.hash!==""&&y.uint32(10).string(s.hash),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=f();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.hash=w.string();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=f();return(0,u.isSet)(s.hash)&&(y.hash=String(s.hash)),y},toJSON(s){const y={};return s.hash!==void 0&&(y.hash=s.hash),y},fromPartial(s){const y=f();return y.hash=s.hash??"",y}};function p(){return{portId:"",channelId:""}}e.QueryEscrowAddressRequest={typeUrl:"/ibc.applications.transfer.v1.QueryEscrowAddressRequest",encode(s,y=i.BinaryWriter.create()){return s.portId!==""&&y.uint32(10).string(s.portId),s.channelId!==""&&y.uint32(18).string(s.channelId),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=p();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.portId=w.string();break;case 2:P.channelId=w.string();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=p();
3return(0,u.isSet)(s.portId)&&(y.portId=String(s.portId)),(0,u.isSet)(s.channelId)&&(y.channelId=String(s.channelId)),y},toJSON(s){const y={};return s.portId!==void 0&&(y.portId=s.portId),s.channelId!==void 0&&(y.channelId=s.channelId),y},fromPartial(s){const y=p();return y.portId=s.portId??"",y.channelId=s.channelId??"",y}};function k(){return{escrowAddress:""}}e.QueryEscrowAddressResponse={typeUrl:"/ibc.applications.transfer.v1.QueryEscrowAddressResponse",encode(s,y=i.BinaryWriter.create()){return s.escrowAddress!==""&&y.uint32(10).string(s.escrowAddress),y},decode(s,y){const w=s instanceof i.BinaryReader?s:new i.BinaryReader(s);let J=y===void 0?w.len:w.pos+y;const P=k();for(;w.pos<J;){const U=w.uint32();switch(U>>>3){case 1:P.escrowAddress=w.string();break;default:w.skipType(U&7);break}}return P},fromJSON(s){const y=k();return(0,u.isSet)(s.escrowAddress)&&(y.escrowAddress=String(s.escrowAddress)),y},toJSON(s){const y={};return s.escrowAddress!==void 0&&(y.escrowAddress=s.escrowAddress),y},fromPartial(s){const y=k();return y.escrowAddress=s.escrowAddress??"",y}};class o{constructor(y){this.rpc=y,this.DenomTrace=this.DenomTrace.bind(this),this.DenomTraces=this.DenomTraces.bind(this),this.Params=this.Params.bind(this),this.DenomHash=this.DenomHash.bind(this),this.EscrowAddress=this.EscrowAddress.bind(this)}DenomTrace(y){const w=e.QueryDenomTraceRequest.encode(y).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomTrace",w).then(P=>e.QueryDenomTraceResponse.decode(new i.BinaryReader(P)))}DenomTraces(y={pagination:n.PageRequest.fromPartial({})}){const w=e.QueryDenomTracesRequest.encode(y).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomTraces",w).then(P=>e.QueryDenomTracesResponse.decode(new i.BinaryReader(P)))}Params(y={}){const w=e.QueryParamsRequest.encode(y).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","Params",w).then(P=>e.QueryParamsResponse.decode(new i.BinaryReader(P)))}DenomHash(y){const w=e.QueryDenomHashRequest.encode(y).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomHash",w).then(P=>e.QueryDenomHashResponse.decode(new i.BinaryReader(P)))}EscrowAddress(y){const w=e.QueryEscrowAddressRequest.encode(y).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","EscrowAddress",w).then(P=>e.QueryEscrowAddressResponse.decode(new i.BinaryReader(P)))}}e.QueryClientImpl=o})(Cl);var wl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryNextSequenceReceiveResponse=e.QueryNextSequenceReceiveRequest=e.QueryUnreceivedAcksResponse=e.QueryUnreceivedAcksRequest=e.QueryUnreceivedPacketsResponse=e.QueryUnreceivedPacketsRequest=e.QueryPacketAcknowledgementsResponse=e.QueryPacketAcknowledgementsRequest=e.QueryPacketAcknowledgementResponse=e.QueryPacketAcknowledgementRequest=e.QueryPacketReceiptResponse=e.QueryPacketReceiptRequest=e.QueryPacketCommitmentsResponse=e.QueryPacketCommitmentsRequest=e.QueryPacketCommitmentResponse=e.QueryPacketCommitmentRequest=e.QueryChannelConsensusStateResponse=e.QueryChannelConsensusStateRequest=e.QueryChannelClientStateResponse=e.QueryChannelClientStateRequest=e.QueryConnectionChannelsResponse=e.QueryConnectionChannelsRequest=e.QueryChannelsResponse=e.QueryChannelsRequest=e.QueryChannelResponse=e.QueryChannelRequest=e.protobufPackage=void 0;const n=_e,t=ga,i=at,u=Re,R=te,v=ee;e.protobufPackage="ibc.core.channel.v1";function E(){return{portId:"",channelId:""}}e.QueryChannelRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelRequest",encode(a,g=R.BinaryWriter.create()){return a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=E();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=E();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),g},fromPartial(a){const g=E();return g.portId=a.portId??"",g.channelId=a.channelId??"",g}};function C(){return{channel:void 0,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryChannelResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelResponse",encode(a,g=R.BinaryWriter.create()){return a.channel!==void 0&&t.Channel.encode(a.channel,g.uint32(10).fork()).ldelim(),a.proof.length!==0&&g.uint32(18).bytes(a.proof),a.proofHeight!==void 0&&i.Height.encode(a.proofHeight,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=C();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.channel=t.Channel.decode(h,h.uint32());break;case 2:A.proof=h.bytes();break;case 3:A.proofHeight=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=C();return(0,v.isSet)(a.channel)&&(g.channel=t.Channel.fromJSON(a.channel)),(0,v.isSet)(a.proof)&&(g.proof=(0,v.bytesFromBase64)(a.proof)),(0,v.isSet)(a.proofHeight)&&(g.proofHeight=i.Height.fromJSON(a.proofHeight)),g},toJSON(a){const g={};return a.channel!==void 0&&(g.channel=a.channel?t.Channel.toJSON(a.channel):void 0),a.proof!==void 0&&(g.proof=(0,v.base64FromBytes)(a.proof!==void 0?a.proof:new Uint8Array)),a.proofHeight!==void 0&&(g.proofHeight=a.proofHeight?i.Height.toJSON(a.proofHeight):void 0),g},fromPartial(a){const g=C();return a.channel!==void 0&&a.channel!==null&&(g.channel=t.Channel.fromPartial(a.channel)),g.proof=a.proof??new Uint8Array,a.proofHeight!==void 0&&a.proofHeight!==null&&(g.proofHeight=i.Height.fromPartial(a.proofHeight)),g}};function D(){return{pagination:void 0}}e.QueryChannelsRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelsRequest",encode(a,g=R.BinaryWriter.create()){return a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(10).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=D();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=D();return(0,v.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=D();return a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function _(){return{channels:[],pagination:void 0,height:i.Height.fromPartial({})}}e.QueryChannelsResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelsResponse",encode(a,g=R.BinaryWriter.create()){for(const h of a.channels)t.IdentifiedChannel.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),a.height!==void 0&&i.Height.encode(a.height,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=_();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.channels.push(t.IdentifiedChannel.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;case 3:A.height=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=_();return Array.isArray(a==null?void 0:a.channels)&&(g.channels=a.channels.map(h=>t.IdentifiedChannel.fromJSON(h))),(0,v.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),(0,v.isSet)(a.height)&&(g.height=i.Height.fromJSON(a.height)),g},toJSON(a){const g={};return a.channels?g.channels=a.channels.map(h=>h?t.IdentifiedChannel.toJSON(h):void 0):g.channels=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),a.height!==void 0&&(g.height=a.height?i.Height.toJSON(a.height):void 0),g},fromPartial(a){var h;const g=_();return g.channels=((h=a.channels)==null?void 0:h.map(S=>t.IdentifiedChannel.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),a.height!==void 0&&a.height!==null&&(g.height=i.Height.fromPartial(a.height)),g}};function b(){return{connection:"",pagination:void 0}}e.QueryConnectionChannelsRequest={typeUrl:"/ibc.core.channel.v1.QueryConnectionChannelsRequest",encode(a,g=R.BinaryWriter.create()){return a.connection!==""&&g.uint32(10).string(a.connection),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=b();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.connection=h.string();break;case 2:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=b();return(0,v.isSet)(a.connection)&&(g.connection=String(a.connection)),(0,v.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.connection!==void 0&&(g.connection=a.connection),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=b();return g.connection=a.connection??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function f(){return{channels:[],pagination:void 0,height:i.Height.fromPartial({})}}e.QueryConnectionChannelsResponse={typeUrl:"/ibc.core.channel.v1.QueryConnectionChannelsResponse",encode(a,g=R.BinaryWriter.create()){for(const h of a.channels)t.IdentifiedChannel.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),a.height!==void 0&&i.Height.encode(a.height,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=f();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.channels.push(t.IdentifiedChannel.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;case 3:A.height=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=f();return Array.isArray(a==null?void 0:a.channels)&&(g.channels=a.channels.map(h=>t.IdentifiedChannel.fromJSON(h))),(0,v.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),(0,v.isSet)(a.height)&&(g.height=i.Height.fromJSON(a.height)),g},toJSON(a){const g={};return a.channels?g.channels=a.channels.map(h=>h?t.IdentifiedChannel.toJSON(h):void 0):g.channels=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),a.height!==void 0&&(g.height=a.height?i.Height.toJSON(a.height):void 0),g},fromPartial(a){var h;const g=f();return g.channels=((h=a.channels)==null?void 0:h.map(S=>t.IdentifiedChannel.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),a.height!==void 0&&a.height!==null&&(g.height=i.Height.fromPartial(a.height)),g}};function p(){return{portId:"",channelId:""}}e.QueryChannelClientStateRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelClientStateRequest",encode(a,g=R.BinaryWriter.create()){return a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=p();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=p();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),g},fromPartial(a){const g=p();return g.portId=a.portId??"",g.channelId=a.channelId??"",g}};function k(){return{identifiedClientState:void 0,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryChannelClientStateResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelClientStateResponse",encode(a,g=R.BinaryWriter.create()){return a.identifiedClientState!==void 0&&i.IdentifiedClientState.encode(a.identifiedClientState,g.uint32(10).fork()).ldelim(),a.proof.length!==0&&g.uint32(18).bytes(a.proof),a.proofHeight!==void 0&&i.Height.encode(a.proofHeight,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=k();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.identifiedClientState=i.IdentifiedClientState.decode(h,h.uint32());break;case 2:A.proof=h.bytes();break;case 3:A.proofHeight=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=k();return(0,v.isSet)(a.identifiedClientState)&&(g.identifiedClientState=i.IdentifiedClientState.fromJSON(a.identifiedClientState)),(0,v.isSet)(a.proof)&&(g.proof=(0,v.bytesFromBase64)(a.proof)),(0,v.isSet)(a.proofHeight)&&(g.proofHeight=i.Height.fromJSON(a.proofHeight)),g},toJSON(a){const g={};return a.identifiedClientState!==void 0&&(g.identifiedClientState=a.identifiedClientState?i.IdentifiedClientState.toJSON(a.identifiedClientState):void 0),a.proof!==void 0&&(g.proof=(0,v.base64FromBytes)(a.proof!==void 0?a.proof:new Uint8Array)),a.proofHeight!==void 0&&(g.proofHeight=a.proofHeight?i.Height.toJSON(a.proofHeight):void 0),g},fromPartial(a){const g=k();return a.identifiedClientState!==void 0&&a.identifiedClientState!==null&&(g.identifiedClientState=i.IdentifiedClientState.fromPartial(a.identifiedClientState)),g.proof=a.proof??new Uint8Array,a.proofHeight!==void 0&&a.proofHeight!==null&&(g.proofHeight=i.Height.fromPartial(a.proofHeight)),g}};function o(){return{portId:"",channelId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}e.QueryChannelConsensusStateRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelConsensusStateRequest",encode(a,g=R.BinaryWriter.create()){return a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),a.revisionNumber!==BigInt(0)&&g.uint32(24).uint64(a.revisionNumber),a.revisionHeight!==BigInt(0)&&g.uint32(32).uint64(a.revisionHeight),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=o();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;case 3:A.revisionNumber=h.uint64();break;case 4:A.revisionHeight=h.uint64();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=o();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),(0,v.isSet)(a.revisionNumber)&&(g.revisionNumber=BigInt(
3a.revisionNumber.toString())),(0,v.isSet)(a.revisionHeight)&&(g.revisionHeight=BigInt(a.revisionHeight.toString())),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),a.revisionNumber!==void 0&&(g.revisionNumber=(a.revisionNumber||BigInt(0)).toString()),a.revisionHeight!==void 0&&(g.revisionHeight=(a.revisionHeight||BigInt(0)).toString()),g},fromPartial(a){const g=o();return g.portId=a.portId??"",g.channelId=a.channelId??"",a.revisionNumber!==void 0&&a.revisionNumber!==null&&(g.revisionNumber=BigInt(a.revisionNumber.toString())),a.revisionHeight!==void 0&&a.revisionHeight!==null&&(g.revisionHeight=BigInt(a.revisionHeight.toString())),g}};function s(){return{consensusState:void 0,clientId:"",proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryChannelConsensusStateResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelConsensusStateResponse",encode(a,g=R.BinaryWriter.create()){return a.consensusState!==void 0&&u.Any.encode(a.consensusState,g.uint32(10).fork()).ldelim(),a.clientId!==""&&g.uint32(18).string(a.clientId),a.proof.length!==0&&g.uint32(26).bytes(a.proof),a.proofHeight!==void 0&&i.Height.encode(a.proofHeight,g.uint32(34).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=s();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.consensusState=u.Any.decode(h,h.uint32());break;case 2:A.clientId=h.string();break;case 3:A.proof=h.bytes();break;case 4:A.proofHeight=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=s();return(0,v.isSet)(a.consensusState)&&(g.consensusState=u.Any.fromJSON(a.consensusState)),(0,v.isSet)(a.clientId)&&(g.clientId=String(a.clientId)),(0,v.isSet)(a.proof)&&(g.proof=(0,v.bytesFromBase64)(a.proof)),(0,v.isSet)(a.proofHeight)&&(g.proofHeight=i.Height.fromJSON(a.proofHeight)),g},toJSON(a){const g={};return a.consensusState!==void 0&&(g.consensusState=a.consensusState?u.Any.toJSON(a.consensusState):void 0),a.clientId!==void 0&&(g.clientId=a.clientId),a.proof!==void 0&&(g.proof=(0,v.base64FromBytes)(a.proof!==void 0?a.proof:new Uint8Array)),a.proofHeight!==void 0&&(g.proofHeight=a.proofHeight?i.Height.toJSON(a.proofHeight):void 0),g},fromPartial(a){const g=s();return a.consensusState!==void 0&&a.consensusState!==null&&(g.consensusState=u.Any.fromPartial(a.consensusState)),g.clientId=a.clientId??"",g.proof=a.proof??new Uint8Array,a.proofHeight!==void 0&&a.proofHeight!==null&&(g.proofHeight=i.Height.fromPartial(a.proofHeight)),g}};function y(){return{portId:"",channelId:"",sequence:BigInt(0)}}e.QueryPacketCommitmentRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentRequest",encode(a,g=R.BinaryWriter.create()){return a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),a.sequence!==BigInt(0)&&g.uint32(24).uint64(a.sequence),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=y();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;case 3:A.sequence=h.uint64();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=y();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),(0,v.isSet)(a.sequence)&&(g.sequence=BigInt(a.sequence.toString())),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),a.sequence!==void 0&&(g.sequence=(a.sequence||BigInt(0)).toString()),g},fromPartial(a){const g=y();return g.portId=a.portId??"",g.channelId=a.channelId??"",a.sequence!==void 0&&a.sequence!==null&&(g.sequence=BigInt(a.sequence.toString())),g}};function w(){return{commitment:new Uint8Array,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryPacketCommitmentResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentResponse",encode(a,g=R.BinaryWriter.create()){return a.commitment.length!==0&&g.uint32(10).bytes(a.commitment),a.proof.length!==0&&g.uint32(18).bytes(a.proof),a.proofHeight!==void 0&&i.Height.encode(a.proofHeight,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=w();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.commitment=h.bytes();break;case 2:A.proof=h.bytes();break;case 3:A.proofHeight=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=w();return(0,v.isSet)(a.commitment)&&(g.commitment=(0,v.bytesFromBase64)(a.commitment)),(0,v.isSet)(a.proof)&&(g.proof=(0,v.bytesFromBase64)(a.proof)),(0,v.isSet)(a.proofHeight)&&(g.proofHeight=i.Height.fromJSON(a.proofHeight)),g},toJSON(a){const g={};return a.commitment!==void 0&&(g.commitment=(0,v.base64FromBytes)(a.commitment!==void 0?a.commitment:new Uint8Array)),a.proof!==void 0&&(g.proof=(0,v.base64FromBytes)(a.proof!==void 0?a.proof:new Uint8Array)),a.proofHeight!==void 0&&(g.proofHeight=a.proofHeight?i.Height.toJSON(a.proofHeight):void 0),g},fromPartial(a){const g=w();return g.commitment=a.commitment??new Uint8Array,g.proof=a.proof??new Uint8Array,a.proofHeight!==void 0&&a.proofHeight!==null&&(g.proofHeight=i.Height.fromPartial(a.proofHeight)),g}};function J(){return{portId:"",channelId:"",pagination:void 0}}e.QueryPacketCommitmentsRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentsRequest",encode(a,g=R.BinaryWriter.create()){return a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=J();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;case 3:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=J();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),(0,v.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=J();return g.portId=a.portId??"",g.channelId=a.channelId??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function P(){return{commitments:[],pagination:void 0,height:i.Height.fromPartial({})}}e.QueryPacketCommitmentsResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentsResponse",encode(a,g=R.BinaryWriter.create()){for(const h of a.commitments)t.PacketState.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),a.height!==void 0&&i.Height.encode(a.height,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=P();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.commitments.push(t.PacketState.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;case 3:A.height=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=P();return Array.isArray(a==null?void 0:a.commitments)&&(g.commitments=a.commitments.map(h=>t.PacketState.fromJSON(h))),(0,v.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),(0,v.isSet)(a.height)&&(g.height=i.Height.fromJSON(a.height)),g},toJSON(a){const g={};return a.commitments?g.commitments=a.commitments.map(h=>h?t.PacketState.toJSON(h):void 0):g.commitments=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),a.height!==void 0&&(g.height=a.height?i.Height.toJSON(a.height):void 0),g},fromPartial(a){var h;const g=P();
3return g.commitments=((h=a.commitments)==null?void 0:h.map(S=>t.PacketState.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),a.height!==void 0&&a.height!==null&&(g.height=i.Height.fromPartial(a.height)),g}};function U(){return{portId:"",channelId:"",sequence:BigInt(0)}}e.QueryPacketReceiptRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketReceiptRequest",encode(a,g=R.BinaryWriter.create()){return a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),a.sequence!==BigInt(0)&&g.uint32(24).uint64(a.sequence),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=U();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;case 3:A.sequence=h.uint64();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=U();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),(0,v.isSet)(a.sequence)&&(g.sequence=BigInt(a.sequence.toString())),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),a.sequence!==void 0&&(g.sequence=(a.sequence||BigInt(0)).toString()),g},fromPartial(a){const g=U();return g.portId=a.portId??"",g.channelId=a.channelId??"",a.sequence!==void 0&&a.sequence!==null&&(g.sequence=BigInt(a.sequence.toString())),g}};function r(){return{received:!1,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryPacketReceiptResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketReceiptResponse",encode(a,g=R.BinaryWriter.create()){return a.received===!0&&g.uint32(16).bool(a.received),a.proof.length!==0&&g.uint32(26).bytes(a.proof),a.proofHeight!==void 0&&i.Height.encode(a.proofHeight,g.uint32(34).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=r();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 2:A.received=h.bool();break;case 3:A.proof=h.bytes();break;case 4:A.proofHeight=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=r();return(0,v.isSet)(a.received)&&(g.received=!!a.received),(0,v.isSet)(a.proof)&&(g.proof=(0,v.bytesFromBase64)(a.proof)),(0,v.isSet)(a.proofHeight)&&(g.proofHeight=i.Height.fromJSON(a.proofHeight)),g},toJSON(a){const g={};return a.received!==void 0&&(g.received=a.received),a.proof!==void 0&&(g.proof=(0,v.base64FromBytes)(a.proof!==void 0?a.proof:new Uint8Array)),a.proofHeight!==void 0&&(g.proofHeight=a.proofHeight?i.Height.toJSON(a.proofHeight):void 0),g},fromPartial(a){const g=r();return g.received=a.received??!1,g.proof=a.proof??new Uint8Array,a.proofHeight!==void 0&&a.proofHeight!==null&&(g.proofHeight=i.Height.fromPartial(a.proofHeight)),g}};function m(){return{portId:"",channelId:"",sequence:BigInt(0)}}e.QueryPacketAcknowledgementRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementRequest",encode(a,g=R.BinaryWriter.create()){return a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),a.sequence!==BigInt(0)&&g.uint32(24).uint64(a.sequence),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=m();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;case 3:A.sequence=h.uint64();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=m();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),(0,v.isSet)(a.sequence)&&(g.sequence=BigInt(a.sequence.toString())),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),a.sequence!==void 0&&(g.sequence=(a.sequence||BigInt(0)).toString()),g},fromPartial(a){const g=m();return g.portId=a.portId??"",g.channelId=a.channelId??"",a.sequence!==void 0&&a.sequence!==null&&(g.sequence=BigInt(
3a.sequence.toString())),g}};function N(){return{acknowledgement:new Uint8Array,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryPacketAcknowledgementResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementResponse",encode(a,g=R.BinaryWriter.create()){return a.acknowledgement.length!==0&&g.uint32(10).bytes(a.acknowledgement),a.proof.length!==0&&g.uint32(18).bytes(a.proof),a.proofHeight!==void 0&&i.Height.encode(a.proofHeight,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=N();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.acknowledgement=h.bytes();break;case 2:A.proof=h.bytes();break;case 3:A.proofHeight=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=N();return(0,v.isSet)(a.acknowledgement)&&(g.acknowledgement=(0,v.bytesFromBase64)(a.acknowledgement)),(0,v.isSet)(a.proof)&&(g.proof=(0,v.bytesFromBase64)(a.proof)),(0,v.isSet)(a.proofHeight)&&(g.proofHeight=i.Height.fromJSON(a.proofHeight)),g},toJSON(a){const g={};return a.acknowledgement!==void 0&&(g.acknowledgement=(0,v.base64FromBytes)(a.acknowledgement!==void 0?a.acknowledgement:new Uint8Array)),a.proof!==void 0&&(g.proof=(0,v.base64FromBytes)(a.proof!==void 0?a.proof:new Uint8Array)),a.proofHeight!==void 0&&(g.proofHeight=a.proofHeight?i.Height.toJSON(a.proofHeight):void 0),g},fromPartial(a){const g=N();return g.acknowledgement=a.acknowledgement??new Uint8Array,g.proof=a.proof??new Uint8Array,a.proofHeight!==void 0&&a.proofHeight!==null&&(g.proofHeight=i.Height.fromPartial(a.proofHeight)),g}};function V(){return{portId:"",channelId:"",pagination:void 0,packetCommitmentSequences:[]}}e.QueryPacketAcknowledgementsRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementsRequest",encode(a,g=R.BinaryWriter.create()){a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(26).fork()).ldelim(),g.uint32(34).fork();for(const h of a.packetCommitmentSequences)g.uint64(h);return g.ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=V();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;case 3:A.pagination=n.PageRequest.decode(h,h.uint32());break;case 4:if((Q&7)===2){const L=h.uint32()+h.pos;for(;h.pos<L;)A.packetCommitmentSequences.push(h.uint64())}else A.packetCommitmentSequences.push(h.uint64());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=V();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),(0,v.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),Array.isArray(a==null?void 0:a.packetCommitmentSequences)&&(g.packetCommitmentSequences=a.packetCommitmentSequences.map(h=>BigInt(h.toString()))),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),a.packetCommitmentSequences?g.packetCommitmentSequences=a.packetCommitmentSequences.map(h=>(h||BigInt(0)).toString()):g.packetCommitmentSequences=[],g},fromPartial(a){var h;const g=V();return g.portId=a.portId??"",g.channelId=a.channelId??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g.packetCommitmentSequences=((h=a.packetCommitmentSequences)==null?void 0:h.map(S=>BigInt(S.toString())))||[],g}};function d(){return{acknowledgements:[],pagination:void 0,height:i.Height.fromPartial({})}}e.QueryPacketAcknowledgementsResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse",encode(a,g=R.BinaryWriter.create()){for(const h of a.acknowledgements)t.PacketState.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),a.height!==void 0&&i.Height.encode(a.height,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=d();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.acknowledgements.push(t.PacketState.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;case 3:A.height=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=d();return Array.isArray(a==null?void 0:a.acknowledgements)&&(g.acknowledgements=a.acknowledgements.map(h=>t.PacketState.fromJSON(h))),(0,v.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),(0,v.isSet)(a.height)&&(g.height=i.Height.fromJSON(a.height)),g},toJSON(a){const g={};return a.acknowledgements?g.acknowledgements=a.acknowledgements.map(h=>h?t.PacketState.toJSON(h):void 0):g.acknowledgements=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),a.height!==void 0&&(g.height=a.height?i.Height.toJSON(a.height):void 0),g},fromPartial(a){var h;const g=d();return g.acknowledgements=((h=a.acknowledgements)==null?void 0:h.map(S=>t.PacketState.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),a.height!==void 0&&a.height!==null&&(g.height=i.Height.fromPartial(a.height)),g}};function l(){return{portId:"",channelId:"",packetCommitmentSequences:[]}}e.QueryUnreceivedPacketsRequest={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedPacketsRequest",encode(a,g=R.BinaryWriter.create()){a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),g.uint32(26).fork();for(const h of a.packetCommitmentSequences)g.uint64(h);return g.ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=l();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;case 3:if((Q&7)===2){const L=h.uint32()+h.pos;for(;h.pos<L;)A.packetCommitmentSequences.push(h.uint64())}else A.packetCommitmentSequences.push(h.uint64());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=l();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),Array.isArray(a==null?void 0:a.packetCommitmentSequences)&&(g.packetCommitmentSequences=a.packetCommitmentSequences.map(h=>BigInt(h.toString()))),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),a.packetCommitmentSequences?g.packetCommitmentSequences=a.packetCommitmentSequences.map(h=>(h||BigInt(0)).toString()):g.packetCommitmentSequences=[],g},fromPartial(a){var h;const g=l();return g.portId=a.portId??"",g.channelId=a.channelId??"",g.packetCommitmentSequences=((h=a.packetCommitmentSequences)==null?void 0:h.map(S=>BigInt(S.toString())))||[],g}};function T(){return{sequences:[],height:i.Height.fromPartial({})}}e.QueryUnreceivedPacketsResponse={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedPacketsResponse",encode(a,g=R.BinaryWriter.create()){g.uint32(10).fork();for(const h of a.sequences)g.uint64(h);return g.ldelim(),a.height!==void 0&&i.Height.encode(a.height,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=T();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:if((Q&7)===2){const L=h.uint32()+h.pos;for(;h.pos<L;)A.sequences.push(h.uint64())}else A.sequences.push(h.uint64());break;case 2:A.height=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=T();return Array.isArray(a==null?void 0:a.sequences)&&(g.sequences=a.sequences.map(h=>BigInt(h.toString()))),(0,v.isSet)(a.height)&&(g.height=i.Height.fromJSON(a.height)),g},toJSON(a){const g={};return a.sequences?g.sequences=a.sequences.map(h=>(h||BigInt(0)).toString()):g.sequences=[],a.height!==void 0&&(g.height=a.height?i.Height.toJSON(a.height):void 0),g},fromPartial(a){var h;const g=T();return g.sequences=((h=a.sequences)==null?void 0:h.map(S=>BigInt(S.toString())))||[],a.height!==void 0&&a.height!==null&&(g.height=i.Height.fromPartial(a.height)),g}};function O(){return{portId:"",channelId:"",packetAckSequences:[]}}e.QueryUnreceivedAcksRequest={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedAcksRequest",encode(a,g=R.BinaryWriter.create()){a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),g.uint32(26).fork();for(const h of a.packetAckSequences)g.uint64(h);return g.ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=O();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;case 3:if((Q&7)===2){const L=h.uint32()+h.pos;for(;h.pos<L;)A.packetAckSequences.push(h.uint64())}else A.packetAckSequences.push(h.uint64());break;default:h.skipType(Q&7);break}}return A}
3,fromJSON(a){const g=O();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),Array.isArray(a==null?void 0:a.packetAckSequences)&&(g.packetAckSequences=a.packetAckSequences.map(h=>BigInt(h.toString()))),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),a.packetAckSequences?g.packetAckSequences=a.packetAckSequences.map(h=>(h||BigInt(0)).toString()):g.packetAckSequences=[],g},fromPartial(a){var h;const g=O();return g.portId=a.portId??"",g.channelId=a.channelId??"",g.packetAckSequences=((h=a.packetAckSequences)==null?void 0:h.map(S=>BigInt(S.toString())))||[],g}};function B(){return{sequences:[],height:i.Height.fromPartial({})}}e.QueryUnreceivedAcksResponse={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedAcksResponse",encode(a,g=R.BinaryWriter.create()){g.uint32(10).fork();for(const h of a.sequences)g.uint64(h);return g.ldelim(),a.height!==void 0&&i.Height.encode(a.height,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=B();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:if((Q&7)===2){const L=h.uint32()+h.pos;for(;h.pos<L;)A.sequences.push(h.uint64())}else A.sequences.push(h.uint64());break;case 2:A.height=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=B();return Array.isArray(a==null?void 0:a.sequences)&&(g.sequences=a.sequences.map(h=>BigInt(h.toString()))),(0,v.isSet)(a.height)&&(g.height=i.Height.fromJSON(a.height)),g},toJSON(a){const g={};return a.sequences?g.sequences=a.sequences.map(h=>(h||BigInt(0)).toString()):g.sequences=[],a.height!==void 0&&(g.height=a.height?i.Height.toJSON(a.height):void 0),g},fromPartial(a){var h;const g=B();return g.sequences=((h=a.sequences)==null?void 0:h.map(S=>BigInt(S.toString())))||[],a.height!==void 0&&a.height!==null&&(g.height=i.Height.fromPartial(a.height)),g}};function M(){return{portId:"",channelId:""}}e.QueryNextSequenceReceiveRequest={typeUrl:"/ibc.core.channel.v1.QueryNextSequenceReceiveRequest",encode(a,g=R.BinaryWriter.create()){return a.portId!==""&&g.uint32(10).string(a.portId),a.channelId!==""&&g.uint32(18).string(a.channelId),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=M();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.portId=h.string();break;case 2:A.channelId=h.string();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=M();return(0,v.isSet)(a.portId)&&(g.portId=String(a.portId)),(0,v.isSet)(a.channelId)&&(g.channelId=String(a.channelId)),g},toJSON(a){const g={};return a.portId!==void 0&&(g.portId=a.portId),a.channelId!==void 0&&(g.channelId=a.channelId),g},fromPartial(a){const g=M();return g.portId=a.portId??"",g.channelId=a.channelId??"",g}};function W(){return{nextSequenceReceive:BigInt(0),proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryNextSequenceReceiveResponse={typeUrl:"/ibc.core.channel.v1.QueryNextSequenceReceiveResponse",encode(a,g=R.BinaryWriter.create()){return a.nextSequenceReceive!==BigInt(0)&&g.uint32(8).uint64(a.nextSequenceReceive),a.proof.length!==0&&g.uint32(18).bytes(a.proof),a.proofHeight!==void 0&&i.Height.encode(a.proofHeight,g.uint32(26).fork()).ldelim(),g},decode(a,g){const h=a instanceof R.BinaryReader?a:new R.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=W();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.nextSequenceReceive=h.uint64();break;case 2:A.proof=h.bytes();break;case 3:A.proofHeight=i.Height.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=W();return(0,v.isSet)(a.nextSequenceReceive)&&(g.nextSequenceReceive=BigInt(a.nextSequenceReceive.toString())),(0,v.isSet)(a.proof)&&(g.proof=(0,v.bytesFromBase64)(a.proof)),(0,v.isSet)(a.proofHeight)&&(g.proofHeight=i.Height.fromJSON(a.proofHeight)),g},toJSON(a){const g={};return a.nextSequenceReceive!==void 0&&(g.nextSequenceReceive=(a.nextSequenceReceive||BigInt(0)).toString()),a.proof!==void 0&&(g.proof=(0,v.base64FromBytes)(a.proof!==void 0?a.proof:new Uint8Array)),a.proofHeight!==void 0&&(g.proofHeight=a.proofHeight?i.Height.toJSON(a.proofHeight):void 0),g},fromPartial(a){const g=W();return a.nextSequenceReceive!==void 0&&a.nextSequenceReceive!==null&&(g.nextSequenceReceive=BigInt(
3a.nextSequenceReceive.toString())),g.proof=a.proof??new Uint8Array,a.proofHeight!==void 0&&a.proofHeight!==null&&(g.proofHeight=i.Height.fromPartial(a.proofHeight)),g}};class H{constructor(g){this.rpc=g,this.Channel=this.Channel.bind(this),this.Channels=this.Channels.bind(this),this.ConnectionChannels=this.ConnectionChannels.bind(this),this.ChannelClientState=this.ChannelClientState.bind(this),this.ChannelConsensusState=this.ChannelConsensusState.bind(this),this.PacketCommitment=this.PacketCommitment.bind(this),this.PacketCommitments=this.PacketCommitments.bind(this),this.PacketReceipt=this.PacketReceipt.bind(this),this.PacketAcknowledgement=this.PacketAcknowledgement.bind(this),this.PacketAcknowledgements=this.PacketAcknowledgements.bind(this),this.UnreceivedPackets=this.UnreceivedPackets.bind(this),this.UnreceivedAcks=this.UnreceivedAcks.bind(this),this.NextSequenceReceive=this.NextSequenceReceive.bind(this)}Channel(g){const h=e.QueryChannelRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","Channel",h).then(A=>e.QueryChannelResponse.decode(new R.BinaryReader(A)))}Channels(g={pagination:n.PageRequest.fromPartial({})}){const h=e.QueryChannelsRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","Channels",h).then(A=>e.QueryChannelsResponse.decode(new R.BinaryReader(A)))}ConnectionChannels(g){const h=e.QueryConnectionChannelsRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","ConnectionChannels",h).then(A=>e.QueryConnectionChannelsResponse.decode(new R.BinaryReader(A)))}ChannelClientState(g){const h=e.QueryChannelClientStateRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","ChannelClientState",h).then(A=>e.QueryChannelClientStateResponse.decode(new R.BinaryReader(A)))}ChannelConsensusState(g){const h=e.QueryChannelConsensusStateRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","ChannelConsensusState",h).then(A=>e.QueryChannelConsensusStateResponse.decode(new R.BinaryReader(A)))}PacketCommitment(g){const h=e.QueryPacketCommitmentRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketCommitment",h).then(A=>e.QueryPacketCommitmentResponse.decode(new R.BinaryReader(A)))}PacketCommitments(g){const h=e.QueryPacketCommitmentsRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketCommitments",h).then(A=>e.QueryPacketCommitmentsResponse.decode(new R.BinaryReader(A)))}PacketReceipt(g){const h=e.QueryPacketReceiptRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketReceipt",h).then(A=>e.QueryPacketReceiptResponse.decode(new R.BinaryReader(A)))}PacketAcknowledgement(g){const h=e.QueryPacketAcknowledgementRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketAcknowledgement",h).then(A=>e.QueryPacketAcknowledgementResponse.decode(new R.BinaryReader(A)))}PacketAcknowledgements(g){const h=e.QueryPacketAcknowledgementsRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketAcknowledgements",h).then(A=>e.QueryPacketAcknowledgementsResponse.decode(new R.BinaryReader(A)))}UnreceivedPackets(g){const h=e.QueryUnreceivedPacketsRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","UnreceivedPackets",h).then(A=>e.QueryUnreceivedPacketsResponse.decode(new R.BinaryReader(A)))}UnreceivedAcks(g){const h=e.QueryUnreceivedAcksRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","UnreceivedAcks",h).then(A=>e.QueryUnreceivedAcksResponse.decode(new R.BinaryReader(A)))}NextSequenceReceive(g){const h=e.QueryNextSequenceReceiveRequest.encode(g).finish();return this.rpc.request("ibc.core.channel.v1.Query","NextSequenceReceive",h).then(A=>e.QueryNextSequenceReceiveResponse.decode(new R.BinaryReader(A)))}}e.QueryClientImpl=H})(wl);var _l={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryUpgradedConsensusStateResponse=e.QueryUpgradedConsensusStateRequest=e.QueryUpgradedClientStateResponse=e.QueryUpgradedClientStateRequest=e.QueryClientParamsResponse=e.QueryClientParamsRequest=e.QueryClientStatusResponse=e.QueryClientStatusRequest=e.QueryConsensusStateHeightsResponse=e.QueryConsensusStateHeightsRequest=e.QueryConsensusStatesResponse=e.QueryConsensusStatesRequest=e.QueryConsensusStateResponse=e.QueryConsensusStateRequest=e.QueryClientStatesResponse=e.QueryClientStatesRequest=e.QueryClientStateResponse=e.QueryClientStateRequest=e.protobufPackage=void 0;const n=_e,t=Re,i=at,u=te,R=ee;
3e.protobufPackage="ibc.core.client.v1";function v(){return{clientId:""}}e.QueryClientStateRequest={typeUrl:"/ibc.core.client.v1.QueryClientStateRequest",encode(V,d=u.BinaryWriter.create()){return V.clientId!==""&&d.uint32(10).string(V.clientId),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=v();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.clientId=l.string();break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=v();return(0,R.isSet)(V.clientId)&&(d.clientId=String(V.clientId)),d},toJSON(V){const d={};return V.clientId!==void 0&&(d.clientId=V.clientId),d},fromPartial(V){const d=v();return d.clientId=V.clientId??"",d}};function E(){return{clientState:void 0,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryClientStateResponse={typeUrl:"/ibc.core.client.v1.QueryClientStateResponse",encode(V,d=u.BinaryWriter.create()){return V.clientState!==void 0&&t.Any.encode(V.clientState,d.uint32(10).fork()).ldelim(),V.proof.length!==0&&d.uint32(18).bytes(V.proof),V.proofHeight!==void 0&&i.Height.encode(V.proofHeight,d.uint32(26).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=E();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.clientState=t.Any.decode(l,l.uint32());break;case 2:O.proof=l.bytes();break;case 3:O.proofHeight=i.Height.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=E();return(0,R.isSet)(V.clientState)&&(d.clientState=t.Any.fromJSON(V.clientState)),(0,R.isSet)(V.proof)&&(d.proof=(0,R.bytesFromBase64)(V.proof)),(0,R.isSet)(V.proofHeight)&&(d.proofHeight=i.Height.fromJSON(V.proofHeight)),d},toJSON(V){const d={};return V.clientState!==void 0&&(d.clientState=V.clientState?t.Any.toJSON(V.clientState):void 0),V.proof!==void 0&&(d.proof=(0,R.base64FromBytes)(V.proof!==void 0?V.proof:new Uint8Array)),V.proofHeight!==void 0&&(d.proofHeight=V.proofHeight?i.Height.toJSON(V.proofHeight):void 0),d},fromPartial(V){const d=E();return V.clientState!==void 0&&V.clientState!==null&&(d.clientState=t.Any.fromPartial(V.clientState)),d.proof=V.proof??new Uint8Array,V.proofHeight!==void 0&&V.proofHeight!==null&&(d.proofHeight=i.Height.fromPartial(V.proofHeight)),d}};function C(){return{pagination:void 0}}e.QueryClientStatesRequest={typeUrl:"/ibc.core.client.v1.QueryClientStatesRequest",encode(V,d=u.BinaryWriter.create()){return V.pagination!==void 0&&n.PageRequest.encode(V.pagination,d.uint32(10).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=C();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.pagination=n.PageRequest.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=C();return(0,R.isSet)(V.pagination)&&(d.pagination=n.PageRequest.fromJSON(V.pagination)),d},toJSON(V){const d={};return V.pagination!==void 0&&(d.pagination=V.pagination?n.PageRequest.toJSON(V.pagination):void 0),d},fromPartial(V){const d=C();return V.pagination!==void 0&&V.pagination!==null&&(d.pagination=n.PageRequest.fromPartial(V.pagination)),d}};function D(){return{clientStates:[],pagination:void 0}}e.QueryClientStatesResponse={typeUrl:"/ibc.core.client.v1.QueryClientStatesResponse",encode(V,d=u.BinaryWriter.create()){for(const l of V.clientStates)i.IdentifiedClientState.encode(l,d.uint32(10).fork()).ldelim();return V.pagination!==void 0&&n.PageResponse.encode(V.pagination,d.uint32(18).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=D();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.clientStates.push(i.IdentifiedClientState.decode(l,l.uint32()));break;case 2:O.pagination=n.PageResponse.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=D();return Array.isArray(V==null?void 0:V.clientStates)&&(d.clientStates=V.clientStates.map(l=>i.IdentifiedClientState.fromJSON(l))),(0,R.isSet)(V.pagination)&&(d.pagination=n.PageResponse.fromJSON(V.pagination)),d},toJSON(V){const d={};
3return V.clientStates?d.clientStates=V.clientStates.map(l=>l?i.IdentifiedClientState.toJSON(l):void 0):d.clientStates=[],V.pagination!==void 0&&(d.pagination=V.pagination?n.PageResponse.toJSON(V.pagination):void 0),d},fromPartial(V){var l;const d=D();return d.clientStates=((l=V.clientStates)==null?void 0:l.map(T=>i.IdentifiedClientState.fromPartial(T)))||[],V.pagination!==void 0&&V.pagination!==null&&(d.pagination=n.PageResponse.fromPartial(V.pagination)),d}};function _(){return{clientId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0),latestHeight:!1}}e.QueryConsensusStateRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStateRequest",encode(V,d=u.BinaryWriter.create()){return V.clientId!==""&&d.uint32(10).string(V.clientId),V.revisionNumber!==BigInt(0)&&d.uint32(16).uint64(V.revisionNumber),V.revisionHeight!==BigInt(0)&&d.uint32(24).uint64(V.revisionHeight),V.latestHeight===!0&&d.uint32(32).bool(V.latestHeight),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=_();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.clientId=l.string();break;case 2:O.revisionNumber=l.uint64();break;case 3:O.revisionHeight=l.uint64();break;case 4:O.latestHeight=l.bool();break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=_();return(0,R.isSet)(V.clientId)&&(d.clientId=String(V.clientId)),(0,R.isSet)(V.revisionNumber)&&(d.revisionNumber=BigInt(V.revisionNumber.toString())),(0,R.isSet)(V.revisionHeight)&&(d.revisionHeight=BigInt(V.revisionHeight.toString())),(0,R.isSet)(V.latestHeight)&&(d.latestHeight=!!V.latestHeight),d},toJSON(V){const d={};return V.clientId!==void 0&&(d.clientId=V.clientId),V.revisionNumber!==void 0&&(d.revisionNumber=(V.revisionNumber||BigInt(0)).toString()),V.revisionHeight!==void 0&&(d.revisionHeight=(V.revisionHeight||BigInt(0)).toString()),V.latestHeight!==void 0&&(d.latestHeight=V.latestHeight),d},fromPartial(V){const d=_();return d.clientId=V.clientId??"",V.revisionNumber!==void 0&&V.revisionNumber!==null&&(d.revisionNumber=BigInt(V.revisionNumber.toString())),V.revisionHeight!==void 0&&V.revisionHeight!==null&&(d.revisionHeight=BigInt(V.revisionHeight.toString())),d.latestHeight=V.latestHeight??!1,d}};function b(){return{consensusState:void 0,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryConsensusStateResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStateResponse",encode(V,d=u.BinaryWriter.create()){return V.consensusState!==void 0&&t.Any.encode(V.consensusState,d.uint32(10).fork()).ldelim(),V.proof.length!==0&&d.uint32(18).bytes(V.proof),V.proofHeight!==void 0&&i.Height.encode(V.proofHeight,d.uint32(26).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=b();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.consensusState=t.Any.decode(l,l.uint32());break;case 2:O.proof=l.bytes();break;case 3:O.proofHeight=i.Height.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=b();return(0,R.isSet)(V.consensusState)&&(d.consensusState=t.Any.fromJSON(V.consensusState)),(0,R.isSet)(V.proof)&&(d.proof=(0,R.bytesFromBase64)(V.proof)),(0,R.isSet)(V.proofHeight)&&(d.proofHeight=i.Height.fromJSON(V.proofHeight)),d},toJSON(V){const d={};return V.consensusState!==void 0&&(d.consensusState=V.consensusState?t.Any.toJSON(V.consensusState):void 0),V.proof!==void 0&&(d.proof=(0,R.base64FromBytes)(V.proof!==void 0?V.proof:new Uint8Array)),V.proofHeight!==void 0&&(d.proofHeight=V.proofHeight?i.Height.toJSON(V.proofHeight):void 0),d},fromPartial(V){const d=b();return V.consensusState!==void 0&&V.consensusState!==null&&(d.consensusState=t.Any.fromPartial(V.consensusState)),d.proof=V.proof??new Uint8Array,V.proofHeight!==void 0&&V.proofHeight!==null&&(d.proofHeight=i.Height.fromPartial(V.proofHeight)),d}};function f(){return{clientId:"",pagination:void 0}}e.QueryConsensusStatesRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStatesRequest",encode(V,d=u.BinaryWriter.create()){return V.clientId!==""&&d.uint32(10).string(V.clientId),V.pagination!==void 0&&n.PageRequest.encode(V.pagination,d.uint32(18).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=f();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.clientId=l.string();break;case 2:O.pagination=n.PageRequest.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=f();return(0,R.isSet)(V.clientId)&&(d.clientId=String(V.clientId)),(0,R.isSet)(V.pagination)&&(d.pagination=n.PageRequest.fromJSON(V.pagination)),d},toJSON(V){const d={};return V.clientId!==void 0&&(d.clientId=V.clientId),V.pagination!==void 0&&(d.pagination=V.pagination?n.PageRequest.toJSON(V.pagination):void 0),d},fromPartial(V){const d=f();return d.clientId=V.clientId??"",V.pagination!==void 0&&V.pagination!==null&&(d.pagination=n.PageRequest.fromPartial(V.pagination)),d}};function p(){return{consensusStates:[],pagination:void 0}}e.QueryConsensusStatesResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStatesResponse",encode(V,d=u.BinaryWriter.create()){for(const l of V.consensusStates)i.ConsensusStateWithHeight.encode(l,d.uint32(10).fork()).ldelim();return V.pagination!==void 0&&n.PageResponse.encode(V.pagination,d.uint32(18).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=p();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.consensusStates.push(i.ConsensusStateWithHeight.decode(l,l.uint32()));break;case 2:O.pagination=n.PageResponse.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=p();return Array.isArray(V==null?void 0:V.consensusStates)&&(d.consensusStates=V.consensusStates.map(l
3=>i.ConsensusStateWithHeight.fromJSON(l))),(0,R.isSet)(V.pagination)&&(d.pagination=n.PageResponse.fromJSON(V.pagination)),d},toJSON(V){const d={};return V.consensusStates?d.consensusStates=V.consensusStates.map(l=>l?i.ConsensusStateWithHeight.toJSON(l):void 0):d.consensusStates=[],V.pagination!==void 0&&(d.pagination=V.pagination?n.PageResponse.toJSON(V.pagination):void 0),d},fromPartial(V){var l;const d=p();return d.consensusStates=((l=V.consensusStates)==null?void 0:l.map(T=>i.ConsensusStateWithHeight.fromPartial(T)))||[],V.pagination!==void 0&&V.pagination!==null&&(d.pagination=n.PageResponse.fromPartial(V.pagination)),d}};function k(){return{clientId:"",pagination:void 0}}e.QueryConsensusStateHeightsRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStateHeightsRequest",encode(V,d=u.BinaryWriter.create()){return V.clientId!==""&&d.uint32(10).string(V.clientId),V.pagination!==void 0&&n.PageRequest.encode(V.pagination,d.uint32(18).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=k();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.clientId=l.string();break;case 2:O.pagination=n.PageRequest.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=k();return(0,R.isSet)(V.clientId)&&(d.clientId=String(V.clientId)),(0,R.isSet)(V.pagination)&&(d.pagination=n.PageRequest.fromJSON(V.pagination)),d},toJSON(V){const d={};return V.clientId!==void 0&&(d.clientId=V.clientId),V.pagination!==void 0&&(d.pagination=V.pagination?n.PageRequest.toJSON(V.pagination):void 0),d},fromPartial(V){const d=k();return d.clientId=V.clientId??"",V.pagination!==void 0&&V.pagination!==null&&(d.pagination=n.PageRequest.fromPartial(V.pagination)),d}};function o(){return{consensusStateHeights:[],pagination:void 0}}e.QueryConsensusStateHeightsResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStateHeightsResponse",encode(V,d=u.BinaryWriter.create()){for(const l of V.consensusStateHeights)i.Height.encode(l,d.uint32(10).fork()).ldelim();return V.pagination!==void 0&&n.PageResponse.encode(V.pagination,d.uint32(18).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=o();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.consensusStateHeights.push(i.Height.decode(l,l.uint32()));break;case 2:O.pagination=n.PageResponse.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=o();return Array.isArray(V==null?void 0:V.consensusStateHeights)&&(d.consensusStateHeights=V.consensusStateHeights.map(l=>i.Height.fromJSON(l))),(0,R.isSet)(V.pagination)&&(d.pagination=n.PageResponse.fromJSON(V.pagination)),d},toJSON(V){const d={};return V.consensusStateHeights?d.consensusStateHeights=V.consensusStateHeights.map(l=>l?i.Height.toJSON(l):void 0):d.consensusStateHeights=[],V.pagination!==void 0&&(d.pagination=V.pagination?n.PageResponse.toJSON(V.pagination):void 0),d},fromPartial(V){var l;const d=o();return d.consensusStateHeights=((l=V.consensusStateHeights)==null?void 0:l.map(T=>i.Height.fromPartial(T)))||[],V.pagination!==void 0&&V.pagination!==null&&(d.pagination=n.PageResponse.fromPartial(V.pagination)),d}};function s(){return{clientId:""}}e.QueryClientStatusRequest={typeUrl:"/ibc.core.client.v1.QueryClientStatusRequest",encode(V,d=u.BinaryWriter.create()){return V.clientId!==""&&d.uint32(10).string(V.clientId),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=s();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.clientId=l.string();break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=s();return(0,R.isSet)(V.clientId)&&(d.clientId=String(V.clientId)),d},toJSON(V){const d={};return V.clientId!==void 0&&(d.clientId=V.clientId),d},fromPartial(V){const d=s();return d.clientId=V.clientId??"",d}};function y(){return{status:""}}e.QueryClientStatusResponse={typeUrl:"/ibc.core.client.v1.QueryClientStatusResponse",encode(V,d=u.BinaryWriter.create()){return V.status!==""&&d.uint32(10).string(V.status),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=y();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.status=l.string();break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=y();return(0,R.isSet)(V.status)&&(d.status=String(V.status)),d},toJSON(V){const d={};return V.status!==void 0&&(d.status=V.status),d},fromPartial(V){const d=y();return d.status=V.status??"",d}};function w(){return{}}e.QueryClientParamsRequest={typeUrl:"/ibc.core.client.v1.QueryClientParamsRequest",encode(V,d=u.BinaryWriter.create()){return d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=w();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){default:l.skipType(B&7);break}}return O},fromJSON(V){return w()},toJSON(V){return{}},fromPartial(V){return w()}};function J(){return{params:void 0}}e.QueryClientParamsResponse={typeUrl:"/ibc.core.client.v1.QueryClientParamsResponse",encode(V,d=u.BinaryWriter.create()){return V.params!==void 0&&i.Params.encode(V.params,d.uint32(10).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=J();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.params=i.Params.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=J();return(0,R.isSet)(V.params)&&(d.params=i.Params.fromJSON(V.params)),d},toJSON(V){const d={};return V.params!==void 0&&(d.params=V.params?i.Params.toJSON(V.params):void 0),d},fromPartial(V){const d=J();return V.params!==void 0&&V.params!==null&&(d.params=i.Params.fromPartial(V.params)),d}};function P(){return{}}e.QueryUpgradedClientStateRequest={typeUrl:"/ibc.core.client.v1.QueryUpgradedClientStateRequest",encode(V,d=u.BinaryWriter.create()){return d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=P();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){default:l.skipType(B&7);break}}return O},fromJSON(V){return P()},toJSON(V){return{}},fromPartial(V){return P()}};function U(){return{upgradedClientState:void 0}}e.QueryUpgradedClientStateResponse={typeUrl:"/ibc.core.client.v1.QueryUpgradedClientStateResponse",encode(V,d=u.BinaryWriter.create()){return V.upgradedClientState!==void 0&&t.Any.encode(V.upgradedClientState,d.uint32(10).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=U();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.upgradedClientState=t.Any.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=U();return(0,R.isSet)(V.upgradedClientState)&&(d.upgradedClientState=t.Any.fromJSON(V.upgradedClientState)),d},toJSON(V){const d={};return V.upgradedClientState!==void 0&&(d.upgradedClientState=V.upgradedClientState?t.Any.toJSON(V.upgradedClientState):void 0),d},fromPartial(V){const d=U();return V.upgradedClientState!==void 0&&V.upgradedClientState!==null&&(d.upgradedClientState=t.Any.fromPartial(V.upgradedClientState)),d}};function r(){return{}}e.QueryUpgradedConsensusStateRequest={typeUrl:"/ibc.core.client.v1.QueryUpgradedConsensusStateRequest",encode(V,d=u.BinaryWriter.create()){return d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;
3const O=r();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){default:l.skipType(B&7);break}}return O},fromJSON(V){return r()},toJSON(V){return{}},fromPartial(V){return r()}};function m(){return{upgradedConsensusState:void 0}}e.QueryUpgradedConsensusStateResponse={typeUrl:"/ibc.core.client.v1.QueryUpgradedConsensusStateResponse",encode(V,d=u.BinaryWriter.create()){return V.upgradedConsensusState!==void 0&&t.Any.encode(V.upgradedConsensusState,d.uint32(10).fork()).ldelim(),d},decode(V,d){const l=V instanceof u.BinaryReader?V:new u.BinaryReader(V);let T=d===void 0?l.len:l.pos+d;const O=m();for(;l.pos<T;){const B=l.uint32();switch(B>>>3){case 1:O.upgradedConsensusState=t.Any.decode(l,l.uint32());break;default:l.skipType(B&7);break}}return O},fromJSON(V){const d=m();return(0,R.isSet)(V.upgradedConsensusState)&&(d.upgradedConsensusState=t.Any.fromJSON(V.upgradedConsensusState)),d},toJSON(V){const d={};return V.upgradedConsensusState!==void 0&&(d.upgradedConsensusState=V.upgradedConsensusState?t.Any.toJSON(V.upgradedConsensusState):void 0),d},fromPartial(V){const d=m();return V.upgradedConsensusState!==void 0&&V.upgradedConsensusState!==null&&(d.upgradedConsensusState=t.Any.fromPartial(V.upgradedConsensusState)),d}};class N{constructor(d){this.rpc=d,this.ClientState=this.ClientState.bind(this),this.ClientStates=this.ClientStates.bind(this),this.ConsensusState=this.ConsensusState.bind(this),this.ConsensusStates=this.ConsensusStates.bind(this),this.ConsensusStateHeights=this.ConsensusStateHeights.bind(this),this.ClientStatus=this.ClientStatus.bind(this),this.ClientParams=this.ClientParams.bind(this),this.UpgradedClientState=this.UpgradedClientState.bind(this),this.UpgradedConsensusState=this.UpgradedConsensusState.bind(this)}ClientState(d){const l=e.QueryClientStateRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientState",l).then(O=>e.QueryClientStateResponse.decode(new u.BinaryReader(O)))}ClientStates(d={pagination:n.PageRequest.fromPartial({})}){const l=e.QueryClientStatesRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientStates",l).then(O=>e.QueryClientStatesResponse.decode(new u.BinaryReader(O)))}ConsensusState(d){const l=e.QueryConsensusStateRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusState",l).then(O=>e.QueryConsensusStateResponse.decode(new u.BinaryReader(O)))}ConsensusStates(d){const l=e.QueryConsensusStatesRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusStates",l).then(O=>e.QueryConsensusStatesResponse.decode(new u.BinaryReader(O)))}ConsensusStateHeights(d){const l=e.QueryConsensusStateHeightsRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusStateHeights",l).then(O=>e.QueryConsensusStateHeightsResponse.decode(new u.BinaryReader(O)))}ClientStatus(d){const l=e.QueryClientStatusRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientStatus",l).then(O=>e.QueryClientStatusResponse.decode(new u.BinaryReader(O)))}ClientParams(d={}){const l=e.QueryClientParamsRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientParams",l).then(O=>e.QueryClientParamsResponse.decode(new u.BinaryReader(O)))}UpgradedClientState(d={}){const l=e.QueryUpgradedClientStateRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","UpgradedClientState",l).then(O=>e.QueryUpgradedClientStateResponse.decode(new u.BinaryReader(O)))}UpgradedConsensusState(d={}){const l=e.QueryUpgradedConsensusStateRequest.encode(d).finish();return this.rpc.request("ibc.core.client.v1.Query","UpgradedConsensusState",l).then(O=>e.QueryUpgradedConsensusStateResponse.decode(new u.BinaryReader(O)))}}e.QueryClientImpl=N})(_l);var El={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryConnectionParamsResponse=e.QueryConnectionParamsRequest=e.QueryConnectionConsensusStateResponse=e.QueryConnectionConsensusStateRequest=e.QueryConnectionClientStateResponse=e.QueryConnectionClientStateRequest=e.QueryClientConnectionsResponse=e.QueryClientConnectionsRequest=e.QueryConnectionsResponse=e.QueryConnectionsRequest=e.QueryConnectionResponse=e.QueryConnectionRequest=e.protobufPackage=void 0;const n=_e,t=su,i=at,u=Re,R=te,v=ee;
3e.protobufPackage="ibc.core.connection.v1";function E(){return{connectionId:""}}e.QueryConnectionRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionRequest",encode(P,U=R.BinaryWriter.create()){return P.connectionId!==""&&U.uint32(10).string(P.connectionId),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=E();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.connectionId=r.string();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=E();return(0,v.isSet)(P.connectionId)&&(U.connectionId=String(P.connectionId)),U},toJSON(P){const U={};return P.connectionId!==void 0&&(U.connectionId=P.connectionId),U},fromPartial(P){const U=E();return U.connectionId=P.connectionId??"",U}};function C(){return{connection:void 0,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryConnectionResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionResponse",encode(P,U=R.BinaryWriter.create()){return P.connection!==void 0&&t.ConnectionEnd.encode(P.connection,U.uint32(10).fork()).ldelim(),P.proof.length!==0&&U.uint32(18).bytes(P.proof),P.proofHeight!==void 0&&i.Height.encode(P.proofHeight,U.uint32(26).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=C();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.connection=t.ConnectionEnd.decode(r,r.uint32());break;case 2:N.proof=r.bytes();break;case 3:N.proofHeight=i.Height.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=C();return(0,v.isSet)(P.connection)&&(U.connection=t.ConnectionEnd.fromJSON(P.connection)),(0,v.isSet)(P.proof)&&(U.proof=(0,v.bytesFromBase64)(P.proof)),(0,v.isSet)(P.proofHeight)&&(U.proofHeight=i.Height.fromJSON(P.proofHeight)),U},toJSON(P){const U={};return P.connection!==void 0&&(U.connection=P.connection?t.ConnectionEnd.toJSON(P.connection):void 0),P.proof!==void 0&&(U.proof=(0,v.base64FromBytes)(P.proof!==void 0?P.proof:new Uint8Array)),P.proofHeight!==void 0&&(U.proofHeight=P.proofHeight?i.Height.toJSON(P.proofHeight):void 0),U},fromPartial(P){const U=C();return P.connection!==void 0&&P.connection!==null&&(U.connection=t.ConnectionEnd.fromPartial(P.connection)),U.proof=P.proof??new Uint8Array,P.proofHeight!==void 0&&P.proofHeight!==null&&(U.proofHeight=i.Height.fromPartial(P.proofHeight)),U}};function D(){return{pagination:void 0}}e.QueryConnectionsRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionsRequest",encode(P,U=R.BinaryWriter.create()){return P.pagination!==void 0&&n.PageRequest.encode(P.pagination,U.uint32(10).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=D();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=D();return(0,v.isSet)(P.pagination)&&(U.pagination=n.PageRequest.fromJSON(P.pagination)),U},toJSON(P){const U={};return P.pagination!==void 0&&(U.pagination=P.pagination?n.PageRequest.toJSON(P.pagination):void 0),U},fromPartial(P){const U=D();return P.pagination!==void 0&&P.pagination!==null&&(U.pagination=n.PageRequest.fromPartial(P.pagination)),U}};function _(){return{connections:[],pagination:void 0,height:i.Height.fromPartial({})}}e.QueryConnectionsResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionsResponse",encode(P,U=R.BinaryWriter.create()){for(const r of P.connections)t.IdentifiedConnection.encode(r,U.uint32(10).fork()).ldelim();return P.pagination!==void 0&&n.PageResponse.encode(P.pagination,U.uint32(18).fork()).ldelim(),P.height!==void 0&&i.Height.encode(P.height,U.uint32(26).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=_();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.connections.push(t.IdentifiedConnection.decode(r,r.uint32()));break;case 2:N.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:N.height=i.Height.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=_();return Array.isArray(P==null?void 0:P.connections)&&(U.connections=P.connections.map(r=>t.IdentifiedConnection.fromJSON(r))),(0,v.isSet)(P.pagination)&&(U.pagination=n.PageResponse.fromJSON(P.pagination)),(0,v.isSet)(P.height)&&(U.height=i.Height.fromJSON(P.height)),U},toJSON(P){const U={};return P.connections?U.connections=P.connections.map(r=>r?t.IdentifiedConnection.toJSON(r):void 0):U.connections=[],P.pagination!==void 0&&(U.pagination=P.pagination?n.PageResponse.toJSON(P.pagination):void 0),P.height!==void 0&&(U.height=P.height?i.Height.toJSON(P.height):void 0),U},fromPartial(P){var r;const U=_();return U.connections=((r=P.connections)==null?void 0:r.map(m=>t.IdentifiedConnection.fromPartial(m)))||[],P.pagination!==void 0&&P.pagination!==null&&(U.pagination=n.PageResponse.fromPartial(P.pagination)),P.height!==void 0&&P.height!==null&&(U.height=i.Height.fromPartial(P.height)),U}};function b(){return{clientId:""}}e.QueryClientConnectionsRequest={typeUrl:"/ibc.core.connection.v1.QueryClientConnectionsRequest",encode(P,U=R.BinaryWriter.create()){return P.clientId!==""&&U.uint32(10).string(P.clientId),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=b();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.clientId=r.string();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=b();return(0,v.isSet)(P.clientId)&&(U.clientId=String(P.clientId)),U},toJSON(P){const U={};return P.clientId!==void 0&&(U.clientId=P.clientId),U},fromPartial(P){const U=b();return U.clientId=P.clientId??"",U}};function f(){return{connectionPaths:[],proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryClientConnectionsResponse={typeUrl:"/ibc.core.connection.v1.QueryClientConnectionsResponse",encode(P,U=R.BinaryWriter.create()){for(const r of P.connectionPaths)U.uint32(10).string(r);return P.proof.length!==0&&U.uint32(18).bytes(P.proof),P.proofHeight!==void 0&&i.Height.encode(P.proofHeight,U.uint32(26).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=f();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.connectionPaths.push(r.string());break;case 2:N.proof=r.bytes();break;case 3:N.proofHeight=i.Height.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N}
3,fromJSON(P){const U=f();return Array.isArray(P==null?void 0:P.connectionPaths)&&(U.connectionPaths=P.connectionPaths.map(r=>String(r))),(0,v.isSet)(P.proof)&&(U.proof=(0,v.bytesFromBase64)(P.proof)),(0,v.isSet)(P.proofHeight)&&(U.proofHeight=i.Height.fromJSON(P.proofHeight)),U},toJSON(P){const U={};return P.connectionPaths?U.connectionPaths=P.connectionPaths.map(r=>r):U.connectionPaths=[],P.proof!==void 0&&(U.proof=(0,v.base64FromBytes)(P.proof!==void 0?P.proof:new Uint8Array)),P.proofHeight!==void 0&&(U.proofHeight=P.proofHeight?i.Height.toJSON(P.proofHeight):void 0),U},fromPartial(P){var r;const U=f();return U.connectionPaths=((r=P.connectionPaths)==null?void 0:r.map(m=>m))||[],U.proof=P.proof??new Uint8Array,P.proofHeight!==void 0&&P.proofHeight!==null&&(U.proofHeight=i.Height.fromPartial(P.proofHeight)),U}};function p(){return{connectionId:""}}e.QueryConnectionClientStateRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionClientStateRequest",encode(P,U=R.BinaryWriter.create()){return P.connectionId!==""&&U.uint32(10).string(P.connectionId),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=p();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.connectionId=r.string();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=p();return(0,v.isSet)(P.connectionId)&&(U.connectionId=String(P.connectionId)),U},toJSON(P){const U={};return P.connectionId!==void 0&&(U.connectionId=P.connectionId),U},fromPartial(P){const U=p();return U.connectionId=P.connectionId??"",U}};function k(){return{identifiedClientState:void 0,proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryConnectionClientStateResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionClientStateResponse",encode(P,U=R.BinaryWriter.create()){return P.identifiedClientState!==void 0&&i.IdentifiedClientState.encode(P.identifiedClientState,U.uint32(10).fork()).ldelim(),P.proof.length!==0&&U.uint32(18).bytes(P.proof),P.proofHeight!==void 0&&i.Height.encode(P.proofHeight,U.uint32(26).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=k();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.identifiedClientState=i.IdentifiedClientState.decode(r,r.uint32());break;case 2:N.proof=r.bytes();break;case 3:N.proofHeight=i.Height.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=k();return(0,v.isSet)(P.identifiedClientState)&&(U.identifiedClientState=i.IdentifiedClientState.fromJSON(P.identifiedClientState)),(0,v.isSet)(P.proof)&&(U.proof=(0,v.bytesFromBase64)(P.proof)),(0,v.isSet)(P.proofHeight)&&(U.proofHeight=i.Height.fromJSON(P.proofHeight)),U},toJSON(P){const U={};return P.identifiedClientState!==void 0&&(U.identifiedClientState=P.identifiedClientState?i.IdentifiedClientState.toJSON(P.identifiedClientState):void 0),P.proof!==void 0&&(U.proof=(0,v.base64FromBytes)(P.proof!==void 0?P.proof:new Uint8Array)),P.proofHeight!==void 0&&(U.proofHeight=P.proofHeight?i.Height.toJSON(P.proofHeight):void 0),U},fromPartial(P){const U=k();return P.identifiedClientState!==void 0&&P.identifiedClientState!==null&&(U.identifiedClientState=i.IdentifiedClientState.fromPartial(P.identifiedClientState)),U.proof=P.proof??new Uint8Array,P.proofHeight!==void 0&&P.proofHeight!==null&&(U.proofHeight=i.Height.fromPartial(P.proofHeight)),U}};function o(){return{connectionId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}e.QueryConnectionConsensusStateRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionConsensusStateRequest",encode(P,U=R.BinaryWriter.create()){return P.connectionId!==""&&U.uint32(10).string(P.connectionId),P.revisionNumber!==BigInt(0)&&U.uint32(16).uint64(P.revisionNumber),P.revisionHeight!==BigInt(0)&&U.uint32(24).uint64(P.revisionHeight),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=o();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.connectionId=r.string();break;case 2:N.revisionNumber=r.uint64();break;case 3:N.revisionHeight=r.uint64();break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=o();return(0,v.isSet)(P.connectionId)&&(U.connectionId=String(P.connectionId)),(0,v.isSet)(P.revisionNumber)&&(U.revisionNumber=BigInt(P.revisionNumber.toString())),(0,v.isSet)(P.revisionHeight)&&(U.revisionHeight=BigInt(P.revisionHeight.toString())),U},toJSON(P){const U={};return P.connectionId!==void 0&&(U.connectionId=P.connectionId),P.revisionNumber!==void 0&&(U.revisionNumber=(P.revisionNumber||BigInt(0)).toString()),P.revisionHeight!==void 0&&(U.revisionHeight=(P.revisionHeight||BigInt(0)).toString()),U},fromPartial(P){const U=o();return U.connectionId=P.connectionId??"",P.revisionNumber!==void 0&&P.revisionNumber!==null&&(U.revisionNumber=BigInt(P.revisionNumber.toString())),P.revisionHeight!==void 0&&P.revisionHeight!==null&&(U.revisionHeight=BigInt(P.revisionHeight.toString())),U}};function s(){return{consensusState:void 0,clientId:"",proof:new Uint8Array,proofHeight:i.Height.fromPartial({})}}e.QueryConnectionConsensusStateResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionConsensusStateResponse",encode(P,U=R.BinaryWriter.create()){return P.consensusState!==void 0&&u.Any.encode(P.consensusState,U.uint32(10).fork()).ldelim(),P.clientId!==""&&U.uint32(18).string(P.clientId),P.proof.length!==0&&U.uint32(26).bytes(P.proof),P.proofHeight!==void 0&&i.Height.encode(P.proofHeight,U.uint32(34).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=s();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.consensusState=u.Any.decode(r,r.uint32());break;case 2:N.clientId=r.string();break;case 3:N.proof=r.bytes();break;case 4:N.proofHeight=i.Height.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=s();return(0,v.isSet)(P.consensusState)&&(U.consensusState=u.Any.fromJSON(P.consensusState)),(0,v.isSet)(P.clientId)&&(U.clientId=String(P.clientId)),(0,v.isSet)(P.proof)&&(U.proof=(0,v.bytesFromBase64)(P.proof)),(0,v.isSet)(P.proofHeight)&&(U.proofHeight=i.Height.fromJSON(P.proofHeight)),U},toJSON(P){const U={};return P.consensusState!==void 0&&(U.consensusState=P.consensusState?u.Any.toJSON(P.consensusState):void 0),P.clientId!==void 0&&(U.clientId=P.clientId),P.proof!==void 0&&(U.proof=(0,v.base64FromBytes)(P.proof!==void 0?P.proof:new Uint8Array)),P.proofHeight!==void 0&&(U.proofHeight=P.proofHeight?i.Height.toJSON(P.proofHeight):void 0),U},fromPartial(P){const U=s();return P.consensusState!==void 0&&P.consensusState!==null&&(U.consensusState=u.Any.fromPartial(P.consensusState)),U.clientId=P.clientId??"",U.proof=P.proof??new Uint8Array,P.proofHeight!==void 0&&P.proofHeight!==null&&(U.proofHeight=i.Height.fromPartial(P.proofHeight)),U}};function y(){return{}}e.QueryConnectionParamsRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionParamsRequest",encode(P,U=R.BinaryWriter.create()){return U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=y();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){default:r.skipType(V&7);break}}return N},fromJSON(P){return y()},toJSON(P){return{}},fromPartial(P){return y()}};function w(){return{params:void 0}}e.QueryConnectionParamsResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionParamsResponse",encode(P,U=R.BinaryWriter.create()){return P.params!==void 0&&i.Params.encode(P.params,U.uint32(10).fork()).ldelim(),U},decode(P,U){const r=P instanceof R.BinaryReader?P:new R.BinaryReader(P);let m=U===void 0?r.len:r.pos+U;const N=w();for(;r.pos<m;){const V=r.uint32();switch(V>>>3){case 1:N.params=i.Params.decode(r,r.uint32());break;default:r.skipType(V&7);break}}return N},fromJSON(P){const U=w();return(0,v.isSet)(P.params)&&(U.params=i.Params.fromJSON(P.params)),U},toJSON(P){const U={};return P.params!==void 0&&(U.params=P.params?i.Params.toJSON(P.params):void 0),U},fromPartial(P){const U=w();return P.params!==void 0&&P.params!==null&&(U.params=i.Params.fromPartial(P.params)),U}};class J{constructor(U){this.rpc=U,this.Connection=this.Connection.bind(this),this.Connections=this.Connections.bind(this),this.ClientConnections=this.ClientConnections.bind(this),this.ConnectionClientState=this.ConnectionClientState.bind(this),this.ConnectionConsensusState=this.ConnectionConsensusState.bind(this),this.ConnectionParams=this.ConnectionParams.bind(this)}Connection(U){const r=e.QueryConnectionRequest.encode(U).finish();return this.rpc.request("ibc.core.connection.v1.Query","Connection",r).then(N=>e.QueryConnectionResponse.decode(new R.BinaryReader(N)))}Connections(U={pagination:n.PageRequest.fromPartial({})}){const r=e.QueryConnectionsRequest.encode(U).finish();return this.rpc.request("ibc.core.connection.v1.Query","Connections",r).then(N=>e.QueryConnectionsResponse.decode(new R.BinaryReader(N)))}ClientConnections(U){const r=e.QueryClientConnectionsRequest.encode(U).finish();return this.rpc.request("ibc.core.connection.v1.Query","ClientConnections",r).then(N=>e.QueryClientConnectionsResponse.decode(new R.BinaryReader(N)))}ConnectionClientState(U){const r=e.QueryConnectionClientStateRequest.encode(U).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionClientState",r).then(N=>e.QueryConnectionClientStateResponse.decode(new R.BinaryReader(N)))}ConnectionConsensusState(U){const r=e.QueryConnectionConsensusStateRequest.encode(U).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionConsensusState",r).then(N=>e.QueryConnectionConsensusStateResponse.decode(new R.BinaryReader(N)))}ConnectionParams(U={}){const r=e.QueryConnectionParamsRequest.encode(U).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionParams",r).then(N=>e.QueryConnectionParamsResponse.decode(new R.BinaryReader(N)))}}e.QueryClientImpl=J})(El);var Jl={},Wt={},uu={};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProofOps=e.ProofOp=e.DominoOp=e.ValueOp=e.Proof=e.protobufPackage=void 0;const n=te,t=ee;e.protobufPackage="tendermint.crypto";function i(){return{total:BigInt(0),index:BigInt(0),leafHash:new Uint8Array,aunts:[]}}e.Proof={typeUrl:"/tendermint.crypto.Proof",encode(C,D=n.BinaryWriter.create()){C.total!==BigInt(0)&&D.uint32(8).int64(C.total),C.index!==BigInt(0)&&D.uint32(16).int64(C.index),C.leafHash.length!==0&&D.uint32(26).bytes(C.leafHash);for(const _ of C.aunts)D.uint32(34).bytes(_);return D},decode(C,D){const _=C instanceof n.BinaryReader?C:new n.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=i();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.total=_.int64();break;case 2:f.index=_.int64();break;case 3:f.leafHash=_.bytes();break;case 4:f.aunts.push(_.bytes());break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=i();return(0,t.isSet)(C.total)&&(D.total=BigInt(C.total.toString())),(0,t.isSet)(C.index)&&(D.index=BigInt(C.index.toString())),(0,t.isSet)(C.leafHash)&&(D.leafHash=(0,t.bytesFromBase64)(C.leafHash)),Array.isArray(C==null?void 0:C.aunts)&&(D.aunts=C.aunts.map(_=>(0,t.bytesFromBase64)(_))),D},toJSON(C){const D={};return C.total!==void 0&&(D.total=(C.total||BigInt(0)).toString()),C.index!==void 0&&(D.index=(C.index||BigInt(0)).toString()),C.leafHash!==void 0&&(D.leafHash=(0,t.base64FromBytes)(C.leafHash!==void 0?C.leafHash:new Uint8Array)),C.aunts?D.aunts=C.aunts.map(_=>(0,t.base64FromBytes)(_!==void 0?_:new Uint8Array)):D.aunts=[],D},fromPartial(C){var _;const D=i();return C.total!==void 0&&C.total!==null&&(D.total=BigInt(C.total.toString())),C.index!==void 0&&C.index!==null&&(D.index=BigInt(C.index.toString())),D.leafHash=C.leafHash??new Uint8Array,D.aunts=((_=C.aunts)==null?void 0:_.map(b=>b))||[],D}};function u(){return{key:new Uint8Array,proof:void 0}}e.ValueOp={typeUrl:"/tendermint.crypto.ValueOp",encode(C,D=n.BinaryWriter.create()){return C.key.length!==0&&D.uint32(10).bytes(C.key),C.proof!==void 0&&e.Proof.encode(C.proof,D.uint32(18).fork()).ldelim(),D},decode(C,D){const _=C instanceof n.BinaryReader?C:new n.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=u();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.key=_.bytes();break;case 2:f.proof=e.Proof.decode(_,_.uint32());break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=u();return(0,t.isSet)(C.key)&&(D.key=(0,t.bytesFromBase64)(C.key)),(0,t.isSet)(C.proof)&&(D.proof=e.Proof.fromJSON(C.proof)),D},toJSON(C){const D={};return C.key!==void 0&&(D.key=(0,t.base64FromBytes)(C.key!==void 0?C.key:new Uint8Array)),C.proof!==void 0&&(D.proof=C.proof?e.Proof.toJSON(C.proof):void 0),D},fromPartial(C){const D=u();return D.key=C.key??new Uint8Array,C.proof!==void 0&&C.proof!==null&&(D.proof=e.Proof.fromPartial(C.proof)),D}};function R(){return{key:"",input:"",output:""}}e.DominoOp={typeUrl:"/tendermint.crypto.DominoOp",encode(C,D=n.BinaryWriter.create()){return C.key!==""&&D.uint32(10).string(C.key),C.input!==""&&D.uint32(18).string(C.input),C.output!==""&&D.uint32(26).string(C.output),D},decode(C,D){const _=C instanceof n.BinaryReader?C:new n.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=R();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.key=_.string();break;case 2:f.input=_.string();break;case 3:f.output=_.string();break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=R();return(0,t.isSet)(C.key)&&(D.key=String(C.key)),(0,t.isSet)(C.input)&&(D.input=String(C.input)),(0,t.isSet)(C.output)&&(D.output=String(C.output)),D},toJSON(C){const D={};return C.key!==void 0&&(D.key=C.key),C.input!==void 0&&(D.input=C.input),C.output!==void 0&&(D.output=C.output),D},fromPartial(C){const D=R();return D.key=C.key??"",D.input=C.input??"",D.output=C.output??"",D}};function v(){return{type:"",key:new Uint8Array,data:new Uint8Array}}e.ProofOp={typeUrl:"/tendermint.crypto.ProofOp",encode(C,D=n.BinaryWriter.create()){return C.type!==""&&D.uint32(10).string(C.type),C.key.length!==0&&D.uint32(18).bytes(C.key),C.data.length!==0&&D.uint32(26).bytes(C.data),D},decode(C,D){const _=C instanceof n.BinaryReader?C:new n.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=v();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.type=_.string();break;case 2:f.key=_.bytes();break;case 3:f.data=_.bytes();break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=v();return(0,t.isSet)(C.type)&&(D.type=String(C.type)),(0,t.isSet)(C.key)&&(D.key=(0,t.bytesFromBase64)(C.key)),(0,t.isSet)(C.data)&&(D.data=(0,t.bytesFromBase64)(C.data)),D}
3,toJSON(C){const D={};return C.type!==void 0&&(D.type=C.type),C.key!==void 0&&(D.key=(0,t.base64FromBytes)(C.key!==void 0?C.key:new Uint8Array)),C.data!==void 0&&(D.data=(0,t.base64FromBytes)(C.data!==void 0?C.data:new Uint8Array)),D},fromPartial(C){const D=v();return D.type=C.type??"",D.key=C.key??new Uint8Array,D.data=C.data??new Uint8Array,D}};function E(){return{ops:[]}}e.ProofOps={typeUrl:"/tendermint.crypto.ProofOps",encode(C,D=n.BinaryWriter.create()){for(const _ of C.ops)e.ProofOp.encode(_,D.uint32(10).fork()).ldelim();return D},decode(C,D){const _=C instanceof n.BinaryReader?C:new n.BinaryReader(C);let b=D===void 0?_.len:_.pos+D;const f=E();for(;_.pos<b;){const p=_.uint32();switch(p>>>3){case 1:f.ops.push(e.ProofOp.decode(_,_.uint32()));break;default:_.skipType(p&7);break}}return f},fromJSON(C){const D=E();return Array.isArray(C==null?void 0:C.ops)&&(D.ops=C.ops.map(_=>e.ProofOp.fromJSON(_))),D},toJSON(C){const D={};return C.ops?D.ops=C.ops.map(_=>_?e.ProofOp.toJSON(_):void 0):D.ops=[],D},fromPartial(C){var _;const D=E();return D.ops=((_=C.ops)==null?void 0:_.map(b=>e.ProofOp.fromPartial(b)))||[],D}}})(uu);var vt={};Object.defineProperty(vt,"__esModule",{value:!0});vt.Consensus=vt.App=vt.protobufPackage=void 0;const Ar=te,No=ee;vt.protobufPackage="tendermint.version";function zs(){return{protocol:BigInt(0),software:""}}vt.App={typeUrl:"/tendermint.version.App",encode(e,n=Ar.BinaryWriter.create()){return e.protocol!==BigInt(0)&&n.uint32(8).uint64(e.protocol),e.software!==""&&n.uint32(18).string(e.software),n},decode(e,n){const t=e instanceof Ar.BinaryReader?e:new Ar.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=zs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.protocol=t.uint64();break;case 2:u.software=t.string();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=zs();return(0,No.isSet)(e.protocol)&&(n.protocol=BigInt(e.protocol.toString())),(0,No.isSet)(e.software)&&(n.software=String(e.software)),n},toJSON(e){const n={};return e.protocol!==void 0&&(n.protocol=(e.protocol||BigInt(0)).toString()),e.software!==void 0&&(n.software=e.software),n},fromPartial(e){const n=zs();return e.protocol!==void 0&&e.protocol!==null&&(n.protocol=BigInt(e.protocol.toString())),n.software=e.software??"",n}};function Zs(){return{block:BigInt(0),app:BigInt(0)}}vt.Consensus={typeUrl:"/tendermint.version.Consensus",encode(e,n=Ar.BinaryWriter.create()){return e.block!==BigInt(0)&&n.uint32(8).uint64(e.block),e.app!==BigInt(0)&&n.uint32(16).uint64(e.app),n},decode(e,n){const t=e instanceof Ar.BinaryReader?e:new Ar.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Zs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.block=t.uint64();break;case 2:u.app=t.uint64();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Zs();return(0,No.isSet)(e.block)&&(n.block=BigInt(e.block.toString())),(0,No.isSet)(e.app)&&(n.app=BigInt(e.app.toString())),n},toJSON(e){const n={};return e.block!==void 0&&(n.block=(e.block||BigInt(0)).toString()),e.app!==void 0&&(n.app=(e.app||BigInt(0)).toString()),n},fromPartial(e){const n=Zs();return e.block!==void 0&&e.block!==null&&(n.block=BigInt(e.block.toString())),e.app!==void 0&&e.app!==null&&(n.app=BigInt(e.app.toString())),n}};var ka={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.PublicKey=Vt.protobufPackage=void 0;const Ys=te,dr=ee;Vt.protobufPackage="tendermint.crypto";function Xs(){return{ed25519:void 0,secp256k1:void 0}}Vt.PublicKey={typeUrl:"/tendermint.crypto.PublicKey",encode(e,n=Ys.BinaryWriter.create()){return e.ed25519!==void 0&&n.uint32(10).bytes(e.ed25519),e.secp256k1!==void 0&&n.uint32(18).bytes(e.secp256k1),n},decode(e,n){const t=e instanceof Ys.BinaryReader?e:new Ys.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=Xs();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.ed25519=t.bytes();break;case 2:u.secp256k1=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=Xs();return(0,dr.isSet)(e.ed25519)&&(n.ed25519=(0,dr.bytesFromBase64)(e.ed25519)),(0,dr.isSet)(e.secp256k1)&&(n.secp256k1=(0,dr.bytesFromBase64)(e.secp256k1)),n},toJSON(e){const n={};return e.ed25519!==void 0&&(n.ed25519=e.ed25519!==void 0?(0,dr.base64FromBytes)(e.ed25519):void 0),e.secp256k1!==void 0&&(n.secp256k1=e.secp256k1!==void 0?(0,dr.base64FromBytes)(e.secp256k1):void 0),n},fromPartial(e){const n=Xs();return n.ed25519=e.ed25519??void 0,n.secp256k1=e.secp256k1??void 0,n}};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleValidator=e.Validator=e.ValidatorSet=e.protobufPackage=void 0;const n=Vt,t=te,i=ee;e.protobufPackage="tendermint.types";function u(){return{validators:[],proposer:void 0,totalVotingPower:BigInt(0)}}e.ValidatorSet={typeUrl:"/tendermint.types.ValidatorSet",encode(E,C=t.BinaryWriter.create()){for(const D of E.validators)e.Validator.encode(D,C.uint32(10).fork()).ldelim();return E.proposer!==void 0&&e.Validator.encode(E.proposer,C.uint32(18).fork()).ldelim(),E.totalVotingPower!==BigInt(0)&&C.uint32(24).int64(E.totalVotingPower),C},decode(E,C){const D=E instanceof t.BinaryReader?E:new t.BinaryReader(E);let _=C===void 0?D.len:D.pos+C;const b=u();for(;D.pos<_;){const f=D.uint32();switch(f>>>3){case 1:b.validators.push(e.Validator.decode(D,D.uint32()));break;case 2:b.proposer=e.Validator.decode(D,D.uint32());break;case 3:b.totalVotingPower=D.int64();break;default:D.skipType(f&7);break}}return b},fromJSON(E){const C=u();return Array.isArray(E==null?void 0:E.validators)&&(C.validators=E.validators.map(D=>e.Validator.fromJSON(D))),(0,i.isSet)(E.proposer)&&(C.proposer=e.Validator.fromJSON(E.proposer)),(0,i.isSet)(E.totalVotingPower)&&(C.totalVotingPower=BigInt(E.totalVotingPower.toString())),C},toJSON(E){const C={};
3return E.validators?C.validators=E.validators.map(D=>D?e.Validator.toJSON(D):void 0):C.validators=[],E.proposer!==void 0&&(C.proposer=E.proposer?e.Validator.toJSON(E.proposer):void 0),E.totalVotingPower!==void 0&&(C.totalVotingPower=(E.totalVotingPower||BigInt(0)).toString()),C},fromPartial(E){var D;const C=u();return C.validators=((D=E.validators)==null?void 0:D.map(_=>e.Validator.fromPartial(_)))||[],E.proposer!==void 0&&E.proposer!==null&&(C.proposer=e.Validator.fromPartial(E.proposer)),E.totalVotingPower!==void 0&&E.totalVotingPower!==null&&(C.totalVotingPower=BigInt(E.totalVotingPower.toString())),C}};function R(){return{address:new Uint8Array,pubKey:n.PublicKey.fromPartial({}),votingPower:BigInt(0),proposerPriority:BigInt(0)}}e.Validator={typeUrl:"/tendermint.types.Validator",encode(E,C=t.BinaryWriter.create()){return E.address.length!==0&&C.uint32(10).bytes(E.address),E.pubKey!==void 0&&n.PublicKey.encode(E.pubKey,C.uint32(18).fork()).ldelim(),E.votingPower!==BigInt(0)&&C.uint32(24).int64(E.votingPower),E.proposerPriority!==BigInt(0)&&C.uint32(32).int64(E.proposerPriority),C},decode(E,C){const D=E instanceof t.BinaryReader?E:new t.BinaryReader(E);let _=C===void 0?D.len:D.pos+C;const b=R();for(;D.pos<_;){const f=D.uint32();switch(f>>>3){case 1:b.address=D.bytes();break;case 2:b.pubKey=n.PublicKey.decode(D,D.uint32());break;case 3:b.votingPower=D.int64();break;case 4:b.proposerPriority=D.int64();break;default:D.skipType(f&7);break}}return b},fromJSON(E){const C=R();return(0,i.isSet)(E.address)&&(C.address=(0,i.bytesFromBase64)(E.address)),(0,i.isSet)(E.pubKey)&&(C.pubKey=n.PublicKey.fromJSON(E.pubKey)),(0,i.isSet)(E.votingPower)&&(C.votingPower=BigInt(E.votingPower.toString())),(0,i.isSet)(E.proposerPriority)&&(C.proposerPriority=BigInt(E.proposerPriority.toString())),C},toJSON(E){const C={};return E.address!==void 0&&(C.address=(0,i.base64FromBytes)(E.address!==void 0?E.address:new Uint8Array)),E.pubKey!==void 0&&(C.pubKey=E.pubKey?n.PublicKey.toJSON(E.pubKey):void 0),E.votingPower!==void 0&&(C.votingPower=(E.votingPower||BigInt(0)).toString()),E.proposerPriority!==void 0&&(C.proposerPriority=(E.proposerPriority||BigInt(0)).toString()),C},fromPartial(E){const C=R();return C.address=E.address??new Uint8Array,E.pubKey!==void 0&&E.pubKey!==null&&(C.pubKey=n.PublicKey.fromPartial(E.pubKey)),E.votingPower!==void 0&&E.votingPower!==null&&(C.votingPower=BigInt(E.votingPower.toString())),E.proposerPriority!==void 0&&E.proposerPriority!==null&&(C.proposerPriority=BigInt(E.proposerPriority.toString())),C}};function v(){return{pubKey:void 0,votingPower:BigInt(0)}}e.SimpleValidator={typeUrl:"/tendermint.types.SimpleValidator",encode(E,C=t.BinaryWriter.create()){return E.pubKey!==void 0&&n.PublicKey.encode(E.pubKey,C.uint32(10).fork()).ldelim(),E.votingPower!==BigInt(0)&&C.uint32(16).int64(E.votingPower),C},decode(E,C){const D=E instanceof t.BinaryReader?E:new t.BinaryReader(E);let _=C===void 0?D.len:D.pos+C;const b=v();for(;D.pos<_;){const f=D.uint32();switch(f>>>3){case 1:b.pubKey=n.PublicKey.decode(D,D.uint32());break;case 2:b.votingPower=D.int64();break;default:D.skipType(f&7);break}}return b},fromJSON(E){const C=v();return(0,i.isSet)(E.pubKey)&&(C.pubKey=n.PublicKey.fromJSON(E.pubKey)),(0,i.isSet)(E.votingPower)&&(C.votingPower=BigInt(E.votingPower.toString())),C},toJSON(E){const C={};return E.pubKey!==void 0&&(C.pubKey=E.pubKey?n.PublicKey.toJSON(E.pubKey):void 0),E.votingPower!==void 0&&(C.votingPower=(E.votingPower||BigInt(0)).toString()),C},fromPartial(E){const C=v();return E.pubKey!==void 0&&E.pubKey!==null&&(C.pubKey=n.PublicKey.fromPartial(E.pubKey)),E.votingPower!==void 0&&E.votingPower!==null&&(C.votingPower=BigInt(E.votingPower.toString())),C}}})(ka);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TxProof=e.BlockMeta=e.LightBlock=e.SignedHeader=e.Proposal=e.CommitSig=e.Commit=e.Vote=e.Data=e.Header=e.BlockID=e.Part=e.PartSetHeader=e.signedMsgTypeToJSON=e.signedMsgTypeFromJSON=e.SignedMsgType=e.blockIDFlagToJSON=e.blockIDFlagFromJSON=e.BlockIDFlag=e.protobufPackage=void 0;const n=uu,t=vt,i=Me,u=ka,R=te,v=ee;e.protobufPackage="tendermint.types";var E;(function(d){d[d.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",d[d.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",d[d.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",d[d.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",d[d.UNRECOGNIZED=-1]="UNRECOGNIZED"})(E||(e.BlockIDFlag=E={}));function C(d){switch(d){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return E.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return E.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return E.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return E.BLOCK_ID_FLAG_NIL;case-1:case"UNRECOGNIZED":default:return E.UNRECOGNIZED}}e.blockIDFlagFromJSON=C;function D(d){switch(d){case E.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case E.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case E.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case E.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";case E.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.blockIDFlagToJSON=D;var _;(function(d){d[d.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",d[d.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",d[d.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",d[d.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",d[d.UNRECOGNIZED=-1]="UNRECOGNIZED"})(_||(e.SignedMsgType=_={}));function b(d){switch(d){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return _.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return _.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return _.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return _.SIGNED_MSG_TYPE_PROPOSAL;case-1:case"UNRECOGNIZED":default:return _.UNRECOGNIZED}}e.signedMsgTypeFromJSON=b;function f(d){switch(d){case _.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case _.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case _.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case _.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";case _.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.signedMsgTypeToJSON=f;function p(){return{total:0,hash:new Uint8Array}}e.PartSetHeader={typeUrl:"/tendermint.types.PartSetHeader",encode(d,l=R.BinaryWriter.create()){return d.total!==0&&l.uint32(8).uint32(d.total),d.hash.length!==0&&l.uint32(18).bytes(d.hash),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=p();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.total=T.uint32();break;case 2:B.hash=T.bytes();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=p();return(0,v.isSet)(d.total)&&(l.total=Number(d.total)),(0,v.isSet)(d.hash)&&(l.hash=(0,v.bytesFromBase64)(d.hash)),l},toJSON(d){const l={};return d.total!==void 0&&(l.total=Math.round(d.total)),d.hash!==void 0&&(l.hash=(0,v.base64FromBytes)(d.hash!==void 0?d.hash:new Uint8Array)),l}
3,fromPartial(d){const l=p();return l.total=d.total??0,l.hash=d.hash??new Uint8Array,l}};function k(){return{index:0,bytes:new Uint8Array,proof:n.Proof.fromPartial({})}}e.Part={typeUrl:"/tendermint.types.Part",encode(d,l=R.BinaryWriter.create()){return d.index!==0&&l.uint32(8).uint32(d.index),d.bytes.length!==0&&l.uint32(18).bytes(d.bytes),d.proof!==void 0&&n.Proof.encode(d.proof,l.uint32(26).fork()).ldelim(),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=k();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.index=T.uint32();break;case 2:B.bytes=T.bytes();break;case 3:B.proof=n.Proof.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=k();return(0,v.isSet)(d.index)&&(l.index=Number(d.index)),(0,v.isSet)(d.bytes)&&(l.bytes=(0,v.bytesFromBase64)(d.bytes)),(0,v.isSet)(d.proof)&&(l.proof=n.Proof.fromJSON(d.proof)),l},toJSON(d){const l={};return d.index!==void 0&&(l.index=Math.round(d.index)),d.bytes!==void 0&&(l.bytes=(0,v.base64FromBytes)(d.bytes!==void 0?d.bytes:new Uint8Array)),d.proof!==void 0&&(l.proof=d.proof?n.Proof.toJSON(d.proof):void 0),l},fromPartial(d){const l=k();return l.index=d.index??0,l.bytes=d.bytes??new Uint8Array,d.proof!==void 0&&d.proof!==null&&(l.proof=n.Proof.fromPartial(d.proof)),l}};function o(){return{hash:new Uint8Array,partSetHeader:e.PartSetHeader.fromPartial({})}}e.BlockID={typeUrl:"/tendermint.types.BlockID",encode(d,l=R.BinaryWriter.create()){return d.hash.length!==0&&l.uint32(10).bytes(d.hash),d.partSetHeader!==void 0&&e.PartSetHeader.encode(d.partSetHeader,l.uint32(18).fork()).ldelim(),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=o();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.hash=T.bytes();break;case 2:B.partSetHeader=e.PartSetHeader.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=o();return(0,v.isSet)(d.hash)&&(l.hash=(0,v.bytesFromBase64)(d.hash)),(0,v.isSet)(d.partSetHeader)&&(l.partSetHeader=e.PartSetHeader.fromJSON(d.partSetHeader)),l},toJSON(d){const l={};return d.hash!==void 0&&(l.hash=(0,v.base64FromBytes)(d.hash!==void 0?d.hash:new Uint8Array)),d.partSetHeader!==void 0&&(l.partSetHeader=d.partSetHeader?e.PartSetHeader.toJSON(d.partSetHeader):void 0),l},fromPartial(d){const l=o();return l.hash=d.hash??new Uint8Array,d.partSetHeader!==void 0&&d.partSetHeader!==null&&(l.partSetHeader=e.PartSetHeader.fromPartial(d.partSetHeader)),l}};function s(){return{version:t.Consensus.fromPartial({}),chainId:"",height:BigInt(0),time:i.Timestamp.fromPartial({}),lastBlockId:e.BlockID.fromPartial({}),lastCommitHash:new Uint8Array,dataHash:new Uint8Array,validatorsHash:new Uint8Array,nextValidatorsHash:new Uint8Array,consensusHash:new Uint8Array,appHash:new Uint8Array,lastResultsHash:new Uint8Array,evidenceHash:new Uint8Array,proposerAddress:new Uint8Array}}e.Header={typeUrl:"/tendermint.types.Header",encode(d,l=R.BinaryWriter.create()){return d.version!==void 0&&t.Consensus.encode(d.version,l.uint32(10).fork()).ldelim(),d.chainId!==""&&l.uint32(18).string(d.chainId),d.height!==BigInt(0)&&l.uint32(24).int64(d.height),d.time!==void 0&&i.Timestamp.encode(d.time,l.uint32(34).fork()).ldelim(),d.lastBlockId!==void 0&&e.BlockID.encode(d.lastBlockId,l.uint32(42).fork()).ldelim(),d.lastCommitHash.length!==0&&l.uint32(50).bytes(d.lastCommitHash),d.dataHash.length!==0&&l.uint32(58).bytes(d.dataHash),d.validatorsHash.length!==0&&l.uint32(66).bytes(d.validatorsHash),d.nextValidatorsHash.length!==0&&l.uint32(74).bytes(d.nextValidatorsHash),d.consensusHash.length!==0&&l.uint32(82).bytes(d.consensusHash),d.appHash.length!==0&&l.uint32(90).bytes(d.appHash),d.lastResultsHash.length!==0&&l.uint32(98).bytes(d.lastResultsHash),d.evidenceHash.length!==0&&l.uint32(106).bytes(d.evidenceHash),d.proposerAddress.length!==0&&l.uint32(114).bytes(d.proposerAddress),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=s();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.version=t.Consensus.decode(T,T.uint32());break;case 2:B.chainId=T.string();break;case 3:B.height=T.int64();break;case 4:B.time=i.Timestamp.decode(T,T.uint32());break;case 5:B.lastBlockId=e.BlockID.decode(T,T.uint32());break;case 6:B.lastCommitHash=T.bytes();break;case 7:B.dataHash=T.bytes();break;case 8:B.validatorsHash=T.bytes();break;case 9:B.nextValidatorsHash=T.bytes();break;case 10:B.consensusHash=T.bytes();break;case 11:B.appHash=T.bytes();break;case 12:B.lastResultsHash=T.bytes();break;case 13:B.evidenceHash=T.bytes();break;case 14:B.proposerAddress=T.bytes();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=s();return(0,v.isSet)(d.version)&&(l.version=t.Consensus.fromJSON(d.version)),(0,v.isSet)(d.chainId)&&(l.chainId=String(d.chainId)),(0,v.isSet)(d.height)&&(l.height=BigInt(d.height.toString())),(0,v.isSet)(d.time)&&(l.time=(0,v.fromJsonTimestamp)(d.time)),(0,v.isSet)(d.lastBlockId)&&(l.lastBlockId=e.BlockID.fromJSON(d.lastBlockId)),(0,v.isSet)(d.lastCommitHash)&&(l.lastCommitHash=(0,v.bytesFromBase64)(d.lastCommitHash)),(0,v.isSet)(d.dataHash)&&(l.dataHash=(0,v.bytesFromBase64)(d.dataHash)),(0,v.isSet)(d.validatorsHash
3)&&(l.validatorsHash=(0,v.bytesFromBase64)(d.validatorsHash)),(0,v.isSet)(d.nextValidatorsHash)&&(l.nextValidatorsHash=(0,v.bytesFromBase64)(d.nextValidatorsHash)),(0,v.isSet)(d.consensusHash)&&(l.consensusHash=(0,v.bytesFromBase64)(d.consensusHash)),(0,v.isSet)(d.appHash)&&(l.appHash=(0,v.bytesFromBase64)(d.appHash)),(0,v.isSet)(d.lastResultsHash)&&(l.lastResultsHash=(0,v.bytesFromBase64)(d.lastResultsHash)),(0,v.isSet)(d.evidenceHash)&&(l.evidenceHash=(0,v.bytesFromBase64)(d.evidenceHash)),(0,v.isSet)(d.proposerAddress)&&(l.proposerAddress=(0,v.bytesFromBase64)(d.proposerAddress)),l},toJSON(d){const l={};return d.version!==void 0&&(l.version=d.version?t.Consensus.toJSON(d.version):void 0),d.chainId!==void 0&&(l.chainId=d.chainId),d.height!==void 0&&(l.height=(d.height||BigInt(0)).toString()),d.time!==void 0&&(l.time=(0,v.fromTimestamp)(d.time).toISOString()),d.lastBlockId!==void 0&&(l.lastBlockId=d.lastBlockId?e.BlockID.toJSON(d.lastBlockId):void 0),d.lastCommitHash!==void 0&&(l.lastCommitHash=(0,v.base64FromBytes)(d.lastCommitHash!==void 0?d.lastCommitHash:new Uint8Array)),d.dataHash!==void 0&&(l.dataHash=(0,v.base64FromBytes)(d.dataHash!==void 0?d.dataHash:new Uint8Array)),d.validatorsHash!==void 0&&(l.validatorsHash=(0,v.base64FromBytes)(d.validatorsHash!==void 0?d.validatorsHash:new Uint8Array)),d.nextValidatorsHash!==void 0&&(l.nextValidatorsHash=(0,v.base64FromBytes)(d.nextValidatorsHash!==void 0?d.nextValidatorsHash:new Uint8Array)),d.consensusHash!==void 0&&(l.consensusHash=(0,v.base64FromBytes)(d.consensusHash!==void 0?d.consensusHash:new Uint8Array)),d.appHash!==void 0&&(l.appHash=(0,v.base64FromBytes)(d.appHash!==void 0?d.appHash:new Uint8Array)),d.lastResultsHash!==void 0&&(l.lastResultsHash=(0,v.base64FromBytes)(d.lastResultsHash!==void 0?d.lastResultsHash:new Uint8Array)),d.evidenceHash!==void 0&&(l.evidenceHash=(0,v.base64FromBytes)(d.evidenceHash!==void 0?d.evidenceHash:new Uint8Array)),d.proposerAddress!==void 0&&(l.proposerAddress=(0,v.base64FromBytes)(d.proposerAddress!==void 0?d.proposerAddress:new Uint8Array)),l},fromPartial(d){const l=s();return d.version!==void 0&&d.version!==null&&(l.version=t.Consensus.fromPartial(d.version)),l.chainId=d.chainId??"",d.height!==void 0&&d.height!==null&&(l.height=BigInt(d.height.toString())),d.time!==void 0&&d.time!==null&&(l.time=i.Timestamp.fromPartial(d.time)),d.lastBlockId!==void 0&&d.lastBlockId!==null&&(l.lastBlockId=e.BlockID.fromPartial(d.lastBlockId)),l.lastCommitHash=d.lastCommitHash??new Uint8Array,l.dataHash=d.dataHash??new Uint8Array,l.validatorsHash=d.validatorsHash??new Uint8Array,l.nextValidatorsHash=d.nextValidatorsHash??new Uint8Array,l.consensusHash=d.consensusHash??new Uint8Array,l.appHash=d.appHash??new Uint8Array,l.lastResultsHash=d.lastResultsHash??new Uint8Array,l.evidenceHash=d.evidenceHash??new Uint8Array,l.proposerAddress=d.proposerAddress??new Uint8Array,l}};function y(){return{txs:[]}}e.Data={typeUrl:"/tendermint.types.Data",encode(d,l=R.BinaryWriter.create()){for(const T of d.txs)l.uint32(10).bytes(T);return l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=y();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.txs.push(T.bytes());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=y();return Array.isArray(d==null?void 0:d.txs)&&(l.txs=d.txs.map(T=>(0,v.bytesFromBase64)(T))),l},toJSON(d){const l={};return d.txs?l.txs=d.txs.map(T=>(0,v.base64FromBytes)(T!==void 0?T:new Uint8Array)):l.txs=[],l},fromPartial(d){var T;const l=y();return l.txs=((T=d.txs)==null?void 0:T.map(O=>O))||[],l}};function w(){return{type:0,height:BigInt(0),round:0,blockId:e.BlockID.fromPartial({}),timestamp:i.Timestamp.fromPartial({}),validatorAddress:new Uint8Array,validatorIndex:0,signature:new Uint8Array}}e.Vote={typeUrl:"/tendermint.types.Vote",encode(d,l=R.BinaryWriter.create()){return d.type!==0&&l.uint32(8).int32(d.type),d.height!==BigInt(0)&&l.uint32(16).int64(d.height),d.round!==0&&l.uint32(24).int32(d.round),d.blockId!==void 0&&e.BlockID.encode(d.blockId,l.uint32(34).fork()).ldelim(),d.timestamp!==void 0&&i.Timestamp.encode(d.timestamp,l.uint32(42).fork()).ldelim(),d.validatorAddress.length!==0&&l.uint32(50).bytes(d.val
3idatorAddress),d.validatorIndex!==0&&l.uint32(56).int32(d.validatorIndex),d.signature.length!==0&&l.uint32(66).bytes(d.signature),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=w();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.type=T.int32();break;case 2:B.height=T.int64();break;case 3:B.round=T.int32();break;case 4:B.blockId=e.BlockID.decode(T,T.uint32());break;case 5:B.timestamp=i.Timestamp.decode(T,T.uint32());break;case 6:B.validatorAddress=T.bytes();break;case 7:B.validatorIndex=T.int32();break;case 8:B.signature=T.bytes();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=w();return(0,v.isSet)(d.type)&&(l.type=b(d.type)),(0,v.isSet)(d.height)&&(l.height=BigInt(d.height.toString())),(0,v.isSet)(d.round)&&(l.round=Number(d.round)),(0,v.isSet)(d.blockId)&&(l.blockId=e.BlockID.fromJSON(d.blockId)),(0,v.isSet)(d.timestamp)&&(l.timestamp=(0,v.fromJsonTimestamp)(d.timestamp)),(0,v.isSet)(d.validatorAddress)&&(l.validatorAddress=(0,v.bytesFromBase64)(d.validatorAddress)),(0,v.isSet)(d.validatorIndex)&&(l.validatorIndex=Number(d.validatorIndex)),(0,v.isSet)(d.signature)&&(l.signature=(0,v.bytesFromBase64)(d.signature)),l},toJSON(d){const l={};return d.type!==void 0&&(l.type=f(d.type)),d.height!==void 0&&(l.height=(d.height||BigInt(0)).toString()),d.round!==void 0&&(l.round=Math.round(d.round)),d.blockId!==void 0&&(l.blockId=d.blockId?e.BlockID.toJSON(d.blockId):void 0),d.timestamp!==void 0&&(l.timestamp=(0,v.fromTimestamp)(d.timestamp).toISOString()),d.validatorAddress!==void 0&&(l.validatorAddress=(0,v.base64FromBytes)(d.validatorAddress!==void 0?d.validatorAddress:new Uint8Array)),d.validatorIndex!==void 0&&(l.validatorIndex=Math.round(d.validatorIndex)),d.signature!==void 0&&(l.signature=(0,v.base64FromBytes)(d.signature!==void 0?d.signature:new Uint8Array)),l},fromPartial(d){const l=w();return l.type=d.type??0,d.height!==void 0&&d.height!==null&&(l.height=BigInt(d.height.toString())),l.round=d.round??0,d.blockId!==void 0&&d.blockId!==null&&(l.blockId=e.BlockID.fromPartial(d.blockId)),d.timestamp!==void 0&&d.timestamp!==null&&(l.timestamp=i.Timestamp.fromPartial(d.timestamp)),l.validatorAddress=d.validatorAddress??new Uint8Array,l.validatorIndex=d.validatorIndex??0,l.signature=d.signature??new Uint8Array,l}};function J(){return{height:BigInt(0),round:0,blockId:e.BlockID.fromPartial({}),signatures:[]}}e.Commit={typeUrl:"/tendermint.types.Commit",encode(d,l=R.BinaryWriter.create()){d.height!==BigInt(0)&&l.uint32(8).int64(d.height),d.round!==0&&l.uint32(16).int32(d.round),d.blockId!==void 0&&e.BlockID.encode(d.blockId,l.uint32(26).fork()).ldelim();for(const T of d.signatures)e.CommitSig.encode(T,l.uint32(34).fork()).ldelim();return l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=J();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.height=T.int64();break;case 2:B.round=T.int32();break;case 3:B.blockId=e.BlockID.decode(T,T.uint32());break;case 4:B.signatures.push(e.CommitSig.decode(T,T.uint32()));break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=J();return(0,v.isSet)(d.height)&&(l.height=BigInt(d.height.toString())),(0,v.isSet)(d.round)&&(l.round=Number(d.round)),(0,v.isSet)(d.blockId)&&(l.blockId=e.BlockID.fromJSON(d.blockId)),Array.isArray(d==null?void 0:d.signatures)&&(l.signatures=d.signatures.map(T=>e.CommitSig.fromJSON(T))),l},toJSON(d){const l={};return d.height!==void 0&&(l.height=(d.height||BigInt(0)).toString()),d.round!==void 0&&(l.round=Math.round(d.round)),d.blockId!==void 0&&(l.blockId=d.blockId?e.BlockID.toJSON(d.blockId):void 0),d.signatures?l.signatures=d.signatures.map(T=>T?e.CommitSig.toJSON(T):void 0):l.signatures=[],l},fromPartial(d){var T;const l=J();return d.height!==void 0&&d.height!==null&&(l.height=BigInt(d.height.toString())),l.round=d.round??0,d.blockId!==void 0&&d.blockId!==null&&(l.blockId=e.BlockID.fromPartial(d.blockId)),l.signatures=((T=d.signatures)==null?void 0:T.map(O=>e.CommitSig.fromPartial(O)))||[],l}};function P(){return{blockIdFlag:0,validatorAddress:new Uint8Array,timestamp:i.Timestamp.fromPartial({}),signature:new Uint8Array}}e.CommitSig={typeUrl:"/tendermint.types.CommitSig",encode(d,l=R.BinaryWriter.create()){return d.blockIdFlag!==0&&l.uint32(8).int32(d.blockIdFlag),d.validatorAddress.length!==0&&l.uint32(18).bytes(d.val
3idatorAddress),d.timestamp!==void 0&&i.Timestamp.encode(d.timestamp,l.uint32(26).fork()).ldelim(),d.signature.length!==0&&l.uint32(34).bytes(d.signature),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=P();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.blockIdFlag=T.int32();break;case 2:B.validatorAddress=T.bytes();break;case 3:B.timestamp=i.Timestamp.decode(T,T.uint32());break;case 4:B.signature=T.bytes();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=P();return(0,v.isSet)(d.blockIdFlag)&&(l.blockIdFlag=C(d.blockIdFlag)),(0,v.isSet)(d.validatorAddress)&&(l.validatorAddress=(0,v.bytesFromBase64)(d.validatorAddress)),(0,v.isSet)(d.timestamp)&&(l.timestamp=(0,v.fromJsonTimestamp)(d.timestamp)),(0,v.isSet)(d.signature)&&(l.signature=(0,v.bytesFromBase64)(d.signature)),l},toJSON(d){const l={};return d.blockIdFlag!==void 0&&(l.blockIdFlag=D(d.blockIdFlag)),d.validatorAddress!==void 0&&(l.validatorAddress=(0,v.base64FromBytes)(d.validatorAddress!==void 0?d.validatorAddress:new Uint8Array)),d.timestamp!==void 0&&(l.timestamp=(0,v.fromTimestamp)(d.timestamp).toISOString()),d.signature!==void 0&&(l.signature=(0,v.base64FromBytes)(d.signature!==void 0?d.signature:new Uint8Array)),l},fromPartial(d){const l=P();return l.blockIdFlag=d.blockIdFlag??0,l.validatorAddress=d.validatorAddress??new Uint8Array,d.timestamp!==void 0&&d.timestamp!==null&&(l.timestamp=i.Timestamp.fromPartial(d.timestamp)),l.signature=d.signature??new Uint8Array,l}};function U(){return{type:0,height:BigInt(0),round:0,polRound:0,blockId:e.BlockID.fromPartial({}),timestamp:i.Timestamp.fromPartial({}),signature:new Uint8Array}}e.Proposal={typeUrl:"/tendermint.types.Proposal",encode(d,l=R.BinaryWriter.create()){return d.type!==0&&l.uint32(8).int32(d.type),d.height!==BigInt(0)&&l.uint32(16).int64(d.height),d.round!==0&&l.uint32(24).int32(d.round),d.polRound!==0&&l.uint32(32).int32(d.polRound),d.blockId!==void 0&&e.BlockID.encode(d.blockId,l.uint32(42).fork()).ldelim(),d.timestamp!==void 0&&i.Timestamp.encode(d.timestamp,l.uint32(50).fork()).ldelim(),d.signature.length!==0&&l.uint32(58).bytes(d.signature),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=U();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.type=T.int32();break;case 2:B.height=T.int64();break;case 3:B.round=T.int32();break;case 4:B.polRound=T.int32();break;case 5:B.blockId=e.BlockID.decode(T,T.uint32());break;case 6:B.timestamp=i.Timestamp.decode(T,T.uint32());break;case 7:B.signature=T.bytes();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=U();return(0,v.isSet)(d.type)&&(l.type=b(d.type)),(0,v.isSet)(d.height)&&(l.height=BigInt(d.height.toString())),(0,v.isSet)(d.round)&&(l.round=Number(d.round)),(0,v.isSet)(d.polRound)&&(l.polRound=Number(d.polRound)),(0,v.isSet)(d.blockId)&&(l.blockId=e.BlockID.fromJSON(d.blockId)),(0,v.isSet)(d.timestamp)&&(l.timestamp=(0,v.fromJsonTimestamp)(d.timestamp)),(0,v.isSet)(d.signature)&&(l.signature=(0,v.bytesFromBase64)(d.signature)),l},toJSON(d){const l={};return d.type!==void 0&&(l.type=f(d.type)),d.height!==void 0&&(l.height=(d.height||BigInt(0)).toString()),d.round!==void 0&&(l.round=Math.round(d.round)),d.polRound!==void 0&&(l.polRound=Math.round(d.polRound)),d.blockId!==void 0&&(l.blockId=d.blockId?e.BlockID.toJSON(d.blockId):void 0),d.timestamp!==void 0&&(l.timestamp=(0,v.fromTimestamp)(d.timestamp).toISOString()),d.signature!==void 0&&(l.signature=(0,v.base64FromBytes)(d.signature!==void 0?d.signature:new Uint8Array)),l},fromPartial(d){const l=U();return l.type=d.type??0,d.height!==void 0&&d.height!==null&&(l.height=BigInt(d.height.toString())),l.round=d.round??0,l.polRound=d.polRound??0,d.blockId!==void 0&&d.blockId!==null&&(l.blockId=e.BlockID.fromPartial(d.blockId)),d.timestamp!==void 0&&d.timestamp!==null&&(l.timestamp=i.Timestamp.fromPartial(d.timestamp)),l.signature=d.signature??new Uint8Array,l}};function r(){return{header:void 0,commit:void 0}}e.SignedHeader={typeUrl:"/tendermint.types.SignedHeader",encode(d,l=R.BinaryWriter.create()){return d.header!==void 0&&e.Header.encode(d.header,l.uint32(10).fork()).ldelim(),d.commit!==void 0&&e.Commit.encode(d.commit,l.uint32(18).fork()).ldelim(),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=r();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.header=e.Header.decode(T,T.uint32());break;case 2:B.commit=e.Commit.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=r();return(0,v.isSet)(d.header)&&(l.header=e.Header.fromJSON(d.header)),(0,v.isSet)(d.c
3ommit)&&(l.commit=e.Commit.fromJSON(d.commit)),l},toJSON(d){const l={};return d.header!==void 0&&(l.header=d.header?e.Header.toJSON(d.header):void 0),d.commit!==void 0&&(l.commit=d.commit?e.Commit.toJSON(d.commit):void 0),l},fromPartial(d){const l=r();return d.header!==void 0&&d.header!==null&&(l.header=e.Header.fromPartial(d.header)),d.commit!==void 0&&d.commit!==null&&(l.commit=e.Commit.fromPartial(d.commit)),l}};function m(){return{signedHeader:void 0,validatorSet:void 0}}e.LightBlock={typeUrl:"/tendermint.types.LightBlock",encode(d,l=R.BinaryWriter.create()){return d.signedHeader!==void 0&&e.SignedHeader.encode(d.signedHeader,l.uint32(10).fork()).ldelim(),d.validatorSet!==void 0&&u.ValidatorSet.encode(d.validatorSet,l.uint32(18).fork()).ldelim(),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=m();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.signedHeader=e.SignedHeader.decode(T,T.uint32());break;case 2:B.validatorSet=u.ValidatorSet.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=m();return(0,v.isSet)(d.signedHeader)&&(l.signedHeader=e.SignedHeader.fromJSON(d.signedHeader)),(0,v.isSet)(d.validatorSet)&&(l.validatorSet=u.ValidatorSet.fromJSON(d.validatorSet)),l},toJSON(d){const l={};return d.signedHeader!==void 0&&(l.signedHeader=d.signedHeader?e.SignedHeader.toJSON(d.signedHeader):void 0),d.validatorSet!==void 0&&(l.validatorSet=d.validatorSet?u.ValidatorSet.toJSON(d.validatorSet):void 0),l},fromPartial(d){const l=m();return d.signedHeader!==void 0&&d.signedHeader!==null&&(l.signedHeader=e.SignedHeader.fromPartial(d.signedHeader)),d.validatorSet!==void 0&&d.validatorSet!==null&&(l.validatorSet=u.ValidatorSet.fromPartial(d.validatorSet)),l}};function N(){return{blockId:e.BlockID.fromPartial({}),blockSize:BigInt(0),header:e.Header.fromPartial({}),numTxs:BigInt(0)}}e.BlockMeta={typeUrl:"/tendermint.types.BlockMeta",encode(d,l=R.BinaryWriter.create()){return d.blockId!==void 0&&e.BlockID.encode(d.blockId,l.uint32(10).fork()).ldelim(),d.blockSize!==BigInt(0)&&l.uint32(16).int64(d.blockSize),d.header!==void 0&&e.Header.encode(d.header,l.uint32(26).fork()).ldelim(),d.numTxs!==BigInt(0)&&l.uint32(32).int64(d.numTxs),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=N();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.blockId=e.BlockID.decode(T,T.uint32());break;case 2:B.blockSize=T.int64();break;case 3:B.header=e.Header.decode(T,T.uint32());break;case 4:B.numTxs=T.int64();break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=N();return(0,v.isSet)(d.blockId)&&(l.blockId=e.BlockID.fromJSON(d.blockId)),(0,v.isSet)(d.blockSize)&&(l.blockSize=BigInt(d.blockSize.toString())),(0,v.isSet)(d.header)&&(l.header=e.Header.fromJSON(d.header)),(0,v.isSet)(d.numTxs)&&(l.numTxs=BigInt(d.numTxs.toString())),l},toJSON(d){const l={};return d.blockId!==void 0&&(l.blockId=d.blockId?e.BlockID.toJSON(d.blockId):void 0),d.blockSize!==void 0&&(l.blockSize=(d.blockSize||BigInt(0)).toString()),d.header!==void 0&&(l.header=d.header?e.Header.toJSON(d.header):void 0),d.numTxs!==void 0&&(l.numTxs=(d.numTxs||BigInt(0)).toString()),l},fromPartial(d){const l=N();return d.blockId!==void 0&&d.blockId!==null&&(l.blockId=e.BlockID.fromPartial(d.blockId)),d.blockSize!==void 0&&d.blockSize!==null&&(l.blockSize=BigInt(d.blockSize.toString())),d.header!==void 0&&d.header!==null&&(l.header=e.Header.fromPartial(d.header)),d.numTxs!==void 0&&d.numTxs!==null&&(l.numTxs=BigInt(d.numTxs.toString())),l}};function V(){return{rootHash:new Uint8Array,data:new Uint8Array,proof:void 0}}e.TxProof={typeUrl:"/tendermint.types.TxProof",encode(d,l=R.BinaryWriter.create()){return d.rootHash.length!==0&&l.uint32(10).bytes(d.rootHash),d.data.length!==0&&l.uint32(18).bytes(d.data),d.proof!==void 0&&n.Proof.encode(d.proof,l.uint32(26).fork()).ldelim(),l},decode(d,l){const T=d instanceof R.BinaryReader?d:new R.BinaryReader(d);let O=l===void 0?T.len:T.pos+l;const B=V();for(;T.pos<O;){const M=T.uint32();switch(M>>>3){case 1:B.rootHash=T.bytes();break;case 2:B.data=T.bytes();break;case 3:B.proof=n.Proof.decode(T,T.uint32());break;default:T.skipType(M&7);break}}return B},fromJSON(d){const l=V();return(0,v.isSet)(d.rootHash)&&(l.rootHash=(0,v.bytesFromBase64)(d.rootHash)),(0,v.isSet)(d.data)&&(l.data=(0,v.bytesFromBase64)(d.data)),(0,v.isSet)(d.proof)&&(l.proof=n.Proof.fromJSON(d.proof)),l},toJSON(d){const l={};return d.rootHash!==void 0&&(l.rootHash=(0,v.base64FromBytes)(d.rootHash!==void 0?d.rootHash:new Uint8Array)),d.data!==void 0&&(l.data=(0,v.base64FromBytes)(d.data!==void 0?d.data:new Uint8Array)),d.proof!==void 0&&(l.proof=d.proof?n.Proof.toJSON(d.proof):void 0),l}
3,fromPartial(d){const l=V();return l.rootHash=d.rootHash??new Uint8Array,l.data=d.data??new Uint8Array,d.proof!==void 0&&d.proof!==null&&(l.proof=n.Proof.fromPartial(d.proof)),l}}})(Wt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Fraction=e.Header=e.Misbehaviour=e.ConsensusState=e.ClientState=e.protobufPackage=void 0;const n=ln,t=at,i=du,u=Me,R=dn,v=Wt,E=ka,C=te,D=ee;e.protobufPackage="ibc.lightclients.tendermint.v1";function _(){return{chainId:"",trustLevel:e.Fraction.fromPartial({}),trustingPeriod:n.Duration.fromPartial({}),unbondingPeriod:n.Duration.fromPartial({}),maxClockDrift:n.Duration.fromPartial({}),frozenHeight:t.Height.fromPartial({}),latestHeight:t.Height.fromPartial({}),proofSpecs:[],upgradePath:[],allowUpdateAfterExpiry:!1,allowUpdateAfterMisbehaviour:!1}}e.ClientState={typeUrl:"/ibc.lightclients.tendermint.v1.ClientState",encode(o,s=C.BinaryWriter.create()){o.chainId!==""&&s.uint32(10).string(o.chainId),o.trustLevel!==void 0&&e.Fraction.encode(o.trustLevel,s.uint32(18).fork()).ldelim(),o.trustingPeriod!==void 0&&n.Duration.encode(o.trustingPeriod,s.uint32(26).fork()).ldelim(),o.unbondingPerio
3d!==void 0&&n.Duration.encode(o.unbondingPeriod,s.uint32(34).fork()).ldelim(),o.maxClockDrift!==void 0&&n.Duration.encode(o.maxClockDrift,s.uint32(42).fork()).ldelim(),o.frozenHeight!==void 0&&t.Height.encode(o.frozenHeight,s.uint32(50).fork()).ldelim(),o.latestHeight!==void 0&&t.Height.encode(o.latestHeight,s.uint32(58).fork()).ldelim();for(const y of o.proofSpecs)i.ProofSpec.encode(y,s.uint32(66).fork()).ldelim();for(const y of o.upgradePath)s.uint32(74).string(y);return o.allowUpdateAfterExpiry===!0&&s.uint32(80).bool(o.allowUpdateAfterExpiry),o.allowUpdateAfterMisbehaviour===!0&&s.uint32(88).bool(o.allowUpdateAfterMisbehaviour),s},decode(o,s){const y=o instanceof C.BinaryReader?o:new C.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=_();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.chainId=y.string();break;case 2:J.trustLevel=e.Fraction.decode(y,y.uint32());break;case 3:J.trustingPeriod=n.Duration.decode(y,y.uint32());break;case 4:J.unbondingPeriod=n.Duration.decode(y,y.uint32());break;case 5:J.maxClockDrift=n.Duration.decode(y,y.uint32());break;case 6:J.frozenHeight=t.Height.decode(y,y.uint32());break;case 7:J.latestHeight=t.Height.decode(y,y.uint32());break;case 8:J.proofSpecs.push(i.ProofSpec.decode(y,y.uint32()));break;case 9:J.upgradePath.push(y.string());break;case 10:J.allowUpdateAfterExpiry=y.bool();break;case 11:J.allowUpdateAfterMisbehaviour=y.bool();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=_();return(0,D.isSet)(o.chainId)&&(s.chainId=String(o.chainId)),(0,D.isSet)(o.trustLevel)&&(s.trustLevel=e.Fraction.fromJSON(o.trustLevel)),(0,D.isSet)(o.trustingPeriod)&&(s.trustingPeriod=n.Duration.fromJSON(o.trustingPeriod)),(0,D.isSet)(o.unbondingPerio
3d)&&(s.unbondingPeriod=n.Duration.fromJSON(o.unbondingPeriod)),(0,D.isSet)(o.maxClockDrift)&&(s.maxClockDrift=n.Duration.fromJSON(o.maxClockDrift)),(0,D.isSet)(o.frozenHeight)&&(s.frozenHeight=t.Height.fromJSON(o.frozenHeight)),(0,D.isSet)(o.latestHeight)&&(s.latestHeight=t.Height.fromJSON(o.latestHeight)),Array.isArray(o==null?void 0:o.proofSpecs)&&(s.proofSpecs=o.proofSpecs.map(y=>i.ProofSpec.fromJSON(y))),Array.isArray(o==null?void 0:o.upgradePath)&&(s.upgradePath=o.upgradePath.map(y=>String(y))),(0,D.isSet)(o.allowUpdateAfterExpiry)&&(s.allowUpdateAfterExpiry=!!o.allowUpdateAfterExpiry),(0,D.isSet)(o.allowUpdateAfterMisbehaviour)&&(s.allowUpdateAfterMisbehaviour=!!o.allowUpdateAfterMisbehaviour),s},toJSON(o){const s={};return o.chainId!==void 0&&(s.chainId=o.chainId),o.trustLevel!==void 0&&(s.trustLevel=o.trustLevel?e.Fraction.toJSON(o.trustLevel):void 0),o.trustingPeriod!==void 0&&(s.trustingPeriod=o.trustingPeriod?n.Duration.toJSON(o.trustingPeriod):void 0),o.unbondingPeriod!==void 0&&(s.unbondingPeriod=o.unbondingPerio
3d?n.Duration.toJSON(o.unbondingPeriod):void 0),o.maxClockDrift!==void 0&&(s.maxClockDrift=o.maxClockDrift?n.Duration.toJSON(o.maxClockDrift):void 0),o.frozenHeight!==void 0&&(s.frozenHeight=o.frozenHeight?t.Height.toJSON(o.frozenHeight):void 0),o.latestHeight!==void 0&&(s.latestHeight=o.latestHeight?t.Height.toJSON(o.latestHeight):void 0),o.proofSpecs?s.proofSpecs=o.proofSpecs.map(y=>y?i.ProofSpec.toJSON(y):void 0):s.proofSpecs=[],o.upgradePath?s.upgradePath=o.upgradePath.map(y=>y):s.upgradePath=[],o.allowUpdateAfterExpiry!==void 0&&(s.allowUpdateAfterExpiry=o.allowUpdateAfterExpiry),o.allowUpdateAfterMisbehaviour!==void 0&&(s.allowUpdateAfterMisbehaviour=o.allowUpdateAfterMisbehaviour),s},fromPartial(o){var y,w;const s=_();return s.chainId=o.chainId??"",o.trustLevel!==void 0&&o.trustLevel!==null&&(s.trustLevel=e.Fraction.fromPartial(o.trustLevel)),o.trustingPeriod!==void 0&&o.trustingPeriod!==null&&(s.trustingPeriod=n.Duration.fromPartial(o.trustingPeriod)),o.unbondingPeriod!==void 0&&o.unbondingPeriod!==null&&(s.unbondingPerio
3d=n.Duration.fromPartial(o.unbondingPeriod)),o.maxClockDrift!==void 0&&o.maxClockDrift!==null&&(s.maxClockDrift=n.Duration.fromPartial(o.maxClockDrift)),o.frozenHeight!==void 0&&o.frozenHeight!==null&&(s.frozenHeight=t.Height.fromPartial(o.frozenHeight)),o.latestHeight!==void 0&&o.latestHeight!==null&&(s.latestHeight=t.Height.fromPartial(o.latestHeight)),s.proofSpecs=((y=o.proofSpecs)==null?void 0:y.map(J=>i.ProofSpec.fromPartial(J)))||[],s.upgradePath=((w=o.upgradePath)==null?void 0:w.map(J=>J))||[],s.allowUpdateAfterExpiry=o.allowUpdateAfterExpiry??!1,s.allowUpdateAfterMisbehaviour=o.allowUpdateAfterMisbehaviour??!1,s}};function b(){return{timestamp:u.Timestamp.fromPartial({}),root:R.MerkleRoot.fromPartial({}),nextValidatorsHash:new Uint8Array}}e.ConsensusState={typeUrl:"/ibc.lightclients.tendermint.v1.ConsensusState",encode(o,s=C.BinaryWriter.create()){return o.timestamp!==void 0&&u.Timestamp.encode(o.timestamp,s.uint32(10).fork()).ldelim(),o.root!==void 0&&R.MerkleRoot.encode(o.root,s.uint32(18).fork()).ldelim(),o.nextValidatorsHash.length!==0&&s.uint32(26).bytes(o.nextValidatorsHash),s},decode(o,s){const y=o instanceof C.BinaryReader?o:new C.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=b();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.timestamp=u.Timestamp.decode(y,y.uint32());break;case 2:J.root=R.MerkleRoot.decode(y,y.uint32());break;case 3:J.nextValidatorsHash=y.bytes();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=b();return(0,D.isSet)(o.timestamp)&&(s.timestamp=(0,D.fromJsonTimestamp)(o.timestamp)),(0,D.isSet)(o.root)&&(s.root=R.MerkleRoot.fromJSON(o.root)),(0,D.isSet)(o.nextValidatorsHash)&&(s.nextValidatorsHash=(0,D.bytesFromBase64)(o.nextValidatorsHash)),s},toJSON(o){const s={};return o.timestamp!==void 0&&(s.timestamp=(0,D.fromTimestamp)(o.timestamp).toISOString()),o.root!==void 0&&(s.root=o.root?R.MerkleRoot.toJSON(o.root):void 0),o.nextValidatorsHash!==void 0&&(s.nextValidatorsHash=(0,D.base64FromBytes)(o.nextValidatorsHash!==void 0?o.nextValidatorsHash:new Uint8Array)),s},fromPartial(o){const s=b();return o.timestamp!==void 0&&o.timestamp!==null&&(s.timestamp=u.Timestamp.fromPartial(o.timestamp)),o.root!==void 0&&o.root!==null&&(s.root=R.MerkleRoot.fromPartial(o.root)),s.nextValidatorsHash=o.nextValidatorsHash??new Uint8Array,s}};function f(){return{clientId:"",header1:void 0,header2:void 0}}e.Misbehaviour={typeUrl:"/ibc.lightclients.tendermint.v1.Misbehaviour",encode(o,s=C.BinaryWriter.create()){return o.clientId!==""&&s.uint32(10).string(o.clientId),o.header1!==void 0&&e.Header.encode(o.header1,s.uint32(18).fork()).ldelim(),o.header2!==void 0&&e.Header.encode(o.header2,s.uint32(26).fork()).ldelim(),s},decode(o,s){const y=o instanceof C.BinaryReader?o:new C.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=f();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.clientId=y.string();break;case 2:J.header1=e.Header.decode(y,y.uint32());break;case 3:J.header2=e.Header.decode(y,y.uint32());break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=f();return(0,D.isSet)(o.clientId)&&(s.clientId=String(o.clientId)),(0,D.isSet)(o.header1)&&(s.header1=e.Header.fromJSON(o.header1)),(0,D.isSet)(o.header2)&&(s.header2=e.Header.fromJSON(o.header2)),s},toJSON(o){const s={};return o.clientId!==void 0&&(s.clientId=o.clientId),o.header1!==void 0&&(s.header1=o.header1?e.Header.toJSON(o.header1):void 0),o.header2!==void 0&&(s.header2=o.header2?e.Header.toJSON(o.header2):void 0),s},fromPartial(o){const s=f();return s.clientId=o.clientId??"",o.header1!==void 0&&o.header1!==null&&(s.header1=e.Header.fromPartial(o.header1)),o.header2!==void 0&&o.header2!==null&&(s.header2=e.Header.fromPartial(o.header2)),s}};function p(){return{signedHeader:void 0,validatorSet:void 0,trustedHeight:t.Height.fromPartial({}),trustedValidators:void 0}}e.Header={typeUrl:"/ibc.lightclients.tendermint.v1.Header",encode(o,s=C.BinaryWriter.create()){return o.signedHeader!==void 0&&v.SignedHeader.encode(o.signedHeader,s.uint32(10).fork()).ldelim(),o.validatorSet!==void 0&&E.ValidatorSet.encode(o.validatorSet,s.uint32(18).fork()).ldelim(),o.trustedHeight!==void 0&&t.Height.encode(o.trustedHeight,s.uint32(26).fork()).ldelim(),o.trustedValidators!==void 0&&E.ValidatorSet.encode(o.trustedValidators,s.uint32(34).fork()).ldelim(),s},decode(o,s){const y=o instanceof C.BinaryReader?o:new C.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=p();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.signedHeader=v.SignedHeader.decode(y,y.uint32());break;
3case 2:J.validatorSet=E.ValidatorSet.decode(y,y.uint32());break;case 3:J.trustedHeight=t.Height.decode(y,y.uint32());break;case 4:J.trustedValidators=E.ValidatorSet.decode(y,y.uint32());break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=p();return(0,D.isSet)(o.signedHeader)&&(s.signedHeader=v.SignedHeader.fromJSON(o.signedHeader)),(0,D.isSet)(o.validatorSet)&&(s.validatorSet=E.ValidatorSet.fromJSON(o.validatorSet)),(0,D.isSet)(o.trustedHeight)&&(s.trustedHeight=t.Height.fromJSON(o.trustedHeight)),(0,D.isSet)(o.trustedValidators)&&(s.trustedValidators=E.ValidatorSet.fromJSON(o.trustedValidators)),s},toJSON(o){const s={};return o.signedHeader!==void 0&&(s.signedHeader=o.signedHeader?v.SignedHeader.toJSON(o.signedHeader):void 0),o.validatorSet!==void 0&&(s.validatorSet=o.validatorSet?E.ValidatorSet.toJSON(o.validatorSet):void 0),o.trustedHeight!==void 0&&(s.trustedHeight=o.trustedHeight?t.Height.toJSON(o.trustedHeight):void 0),o.trustedValidators!==void 0&&(s.trustedValidators=o.trustedValidators?E.ValidatorSet.toJSON(o.trustedValidators):void 0),s},fromPartial(o){const s=p();return o.signedHeader!==void 0&&o.signedHeader!==null&&(s.signedHeader=v.SignedHeader.fromPartial(o.signedHeader)),o.validatorSet!==void 0&&o.validatorSet!==null&&(s.validatorSet=E.ValidatorSet.fromPartial(o.validatorSet)),o.trustedHeight!==void 0&&o.trustedHeight!==null&&(s.trustedHeight=t.Height.fromPartial(o.trustedHeight)),o.trustedValidators!==void 0&&o.trustedValidators!==null&&(s.trustedValidators=E.ValidatorSet.fromPartial(o.trustedValidators)),s}};function k(){return{numerator:BigInt(0),denominator:BigInt(0)}}e.Fraction={typeUrl:"/ibc.lightclients.tendermint.v1.Fraction",encode(o,s=C.BinaryWriter.create()){return o.numerator!==BigInt(0)&&s.uint32(8).uint64(o.numerator),o.denominator!==BigInt(0)&&s.uint32(16).uint64(o.denominator),s},decode(o,s){const y=o instanceof C.BinaryReader?o:new C.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=k();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.numerator=y.uint64();break;case 2:J.denominator=y.uint64();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=k();return(0,D.isSet)(o.numerator)&&(s.numerator=BigInt(o.numerator.toString())),(0,D.isSet)(o.denominator)&&(s.denominator=BigInt(o.denominator.toString())),s},toJSON(o){const s={};return o.numerator!==void 0&&(s.numerator=(o.numerator||BigInt(0)).toString()),o.denominator!==void 0&&(s.denominator=(o.denominator||BigInt(0)).toString()),s},fromPartial(o){const s=k();return o.numerator!==void 0&&o.numerator!==null&&(s.numerator=BigInt(o.numerator.toString())),o.denominator!==void 0&&o.denominator!==null&&(s.denominator=BigInt(o.denominator.toString())),s}}})(Jl);Object.defineProperty(Sa,"__esModule",{value:!0});Sa.setupIbcExtension=void 0;const so=Pe,gg=Cn,mc=Cl,Sg=ga,_t=wl,Si=_l,xs=El,Ul=Jl,Ce=Ke;function js(e){if((e==null?void 0:e.typeUrl)!=="/ibc.lightclients.tendermint.v1.ClientState")throw new Error(`Unexpected client state type: ${e==null?void 0:e.typeUrl}`);return Ul.ClientState.decode(e.value)}function kg(e){if((e==null?void 0:e.typeUrl)!=="/ibc.lightclients.tendermint.v1.ConsensusState")throw new Error(`Unexpected client state type: ${e==null?void 0:e.typeUrl}`);return Ul.ConsensusState.decode(e.value)}function Pg(e){const n=(0,Ce.createProtobufRpcClient)(e),t=new _t.QueryClientImpl(n),i=new Si.QueryClientImpl(n),u=new xs.QueryClientImpl(n),R=new mc.QueryClientImpl(n);return{ibc:{channel:{channel:async(v,E)=>t.Channel({portId:v,channelId:E}),channels:async v=>t.Channels({pagination:(0,Ce.createPagination)(v)}),allChannels:async()=>{var D;const v=[];let E,C;do E=await t.Channels({pagination:(0,Ce.createPagination)(C)}),v.push(...E.channels),C=(D=E.pagination)==null?void 0:D.nextKey;while(C&&C.length);return _t.QueryChannelsResponse.fromPartial({channels:v,height:E.height})},connectionChannels:async(v,E)=>t.ConnectionChannels({connection:v,pagination:(0,Ce.createPagination)(E)}),allConnectionChannels:async v=>{var _;const E=[];let C,D;do C=await t.ConnectionChannels({connection:v,pagination:(0,Ce.createPagination)(D)}),E.push(...C.channels),D=(_=C.pagination)==null?void 0:_.nextKey;while(D&&D.length);return _t.QueryConnectionChannelsResponse.fromPartial({channels:E,height:C.height})},clientState:async(v,E)=>t.ChannelClientState({portId:v,channelId:E}),consensusState:async(v,E,C,D)=>t.ChannelConsensusState({portId:v,channelId:E,revisionNumber:BigInt(C),revisionHeight:BigInt(D)}),packetCommitment:async(v,E,C)=>t.PacketCommitment({portId:v,channelId:E,sequence:(0,Ce.longify)(C)}),packetCommitments:async(v,E,C)=>t.PacketCommitments({channelId:E,portId:v,pagination:(0,Ce.createPagination)(C)}),allPacketCommitments:async(v,E)=>{var b;const C=[];let D,_;do D=await t.PacketCommitments({channelId:E,portId:v,pagination:(0,Ce.createPagination)(_)}),C.push(...D.commitments),_=(b=D.pagination)==null?void 0:b.nextKey;while(_&&_.length);return _t.QueryPacketCommitmentsResponse.fromPartial({commitments:C,height:D.height})},packetReceipt:async(v,E,C)=>t.PacketReceipt({portId:v,channelId:E,sequence:(0,Ce.longify)(C)}),packetAcknowledgement:async(v,E,C)=>t.PacketAcknowledgement({portId:v,channelId:E,sequence:(0,Ce.longify)(C)}),packetAcknowledgements:async(v,E,C)=>{const D=_t.QueryPacketAcknowledgementsRequest.fromPartial({portId:v,channelId:E,pagination:(0,Ce.createPagination)(C)});return t.PacketAcknowledgements(D)},allPacketAcknowledgements:async(v,E)=>{var b;const C=[];let D,_;do{const f=_t.QueryPacketAcknowledgementsRequest.fromPartial({channelId:E,portId:v,pagination:(0,Ce.createPagination)(_)});D=await t.PacketAcknowledgements(f),C.push(...D.acknowledgements),_=(b=D.pagination)==null?void 0:b.nextKey}while(_&&_.length);return _t.QueryPacketAcknowledgementsResponse.fromPartial({acknowledgements:C,height:D.height})},unreceivedPackets:async(v,E,C)=>t.UnreceivedPackets({portId:v,channelId:E,packetCommitmentSequences:C.map(D=>BigInt(D))}),unreceivedAcks:async(v,E,C)=>t.UnreceivedAcks({portId:v,channelId:E,packetAckSequences:C.map(D=>BigInt(D))}),nextSequenceReceive:async(v,E)=>t.NextSequenceReceive({portId:v,channelId:E})},client:{state:async v=>i.ClientState({clientId:v}),states:async v=>i.ClientStates({pagination:(0,Ce.createPagination)(v)}),allStates:async()=>{var D;const v=[];let E,C;do E=await i.ClientStates({pagination:(0,Ce.createPagination)(C)}),v.push(...E.clientStates),C=(D=E.pagination)==null?void 0:D.nextKey;while(C&&C.length);return Si.QueryClientStatesResponse.fromPartial({clientStates:v})},consensusState:async(v,E)=>i.ConsensusState(Si.QueryConsensusStateRequest.fromPartial({clientId:v,revisionHeight:E!==void 0?BigInt(E):void 0,latestHeight:E===void 0})),consensusStates:async(v,E)=>i.ConsensusStates({clientId:v,pagination:(0,Ce.createPagination)(E)}),allConsensusStates:async v=>{var _;const E=[];let C,D;do C=await i.ConsensusStates({clientId:v,pagination:(0,Ce.createPagination)(D)}),E.push(...C.consensusStates),D=(_=C.pagination)==null?void 0:_.nextKey;while(D&&D.length);return Si.QueryConsensusStatesResponse.fromPartial({consensusStates:E})},params:async()=>i.ClientParams({}),stateTm:async v=>{const E=await i.ClientState({clientId:v});return js(E.clientState)},statesTm:async v=>{const{clientStates:E}=await i.ClientStates({pagination:(0,Ce.createPagination)(v)});return E.map(({clientState:C})=>js(C))},allStatesTm:async()=>{var D;const v=[];let E,C;do E=await i.ClientStates({pagination:(0,Ce.createPagination)(C)}),v.push(...E.clientStates),C=(D=E.pagination)==null?void 0:D.nextKey;while(C&&C.length);return v.map(({clientState:_})=>js(_))},consensusStateTm:async(v,E)=>{const C=await i.ConsensusState(Si.QueryConsensusStateRequest.fromPartial({clientId:v,revisionHeight:E==null?void 0:E.revisionHeight,revisionNumber:E==null?void 0:E.revisionNumber,latestHeight:E===void 0}));return kg(C.consensusState)}},connection:{connection:async v=>u.Connection({connectionId:v}),connections:async v=>u.Connections({pagination:(0,Ce.createPagination)(v)}),allConnections:async()=>{var D;const v=[];let E,C;do E=await u.Connections({pagination:(0,Ce.createPagination)(C)}),v.push(...E.connections),C=(D=E.pagination)==null?void 0:D.nextKey;while(C&&C.length);return xs.QueryConnectionsResponse.fromPartial({connections:v,height:E.height})},clientConnections:async v=>u.ClientConnections({clientId:v}),clientState:async v=>u.ConnectionClientState({connectionId:v}),consensusState:async(v,E)=>u.ConnectionConsensusState(xs.QueryConnectionConsensusStateRequest.fromPartial({connectionId:v,revisionHeight:BigInt(E)}))},transfer:{denomTrace:async v=>R.DenomTrace({hash:v}),denomTraces:async v=>R.DenomTraces({pagination:(0,Ce.createPagination)(v)}),allDenomTraces:async()=>{var D;const v=[];let E,C;do E=await R.DenomTraces({pagination:(0,Ce.createPagination)(C)}),v.push(...E.denomTraces),C=(D=E.pagination)==null?void 0:D.nextKey;while(C&&C.length);return mc.QueryDenomTracesResponse.fromPartial({denomTraces:v})},params:async()=>R.Params({})},verified:{channel:{channel:async(v,E)=>{const C=(0,so.toAscii)(`channelEnds/ports/${v}/channels/${E}`),{value:D}=await e.queryStoreVerified("ibc",C);return D.length?Sg.Channel.decode(D):null},packetCommitment:async(v,E,C)=>{const D=(0,so.toAscii)(`commitments/ports/${v}/channels/${E}/packets/${C}`),{value:_}=await e.queryStoreVerified("ibc",D);return _},packetAcknowledgement:async(v,E,C)=>{const D=(0,so.toAscii)(`acks/ports/${v}/channels/${E}/acknowledgements/${C}`),{value:_}=await e.queryStoreVerified("ibc",D);return _},nextSequenceReceive:async(v,E)=>{const C=(0,so.toAscii)(`seqAcks/ports/${v}/channels/${E}/nextSequenceAck`),{value:D}=await e.queryStoreVerified("ibc",C);return D.length?gg.Uint64.fromBytes(D).toNumber():null}}}}}}Sa.setupIbcExtension=Pg;var Pa={},Dl={},Ot={};
3Object.defineProperty(Ot,"__esModule",{value:!0});Ot.Params=Ot.Minter=Ot.protobufPackage=void 0;const Ir=te,ft=ee;Ot.protobufPackage="cosmos.mint.v1beta1";function ed(){return{inflation:"",annualProvisions:""}}Ot.Minter={typeUrl:"/cosmos.mint.v1beta1.Minter",encode(e,n=Ir.BinaryWriter.create()){return e.inflation!==""&&n.uint32(10).string(e.inflation),e.annualProvisions!==""&&n.uint32(18).string(e.annualProvisions),n},decode(e,n){const t=e instanceof Ir.BinaryReader?e:new Ir.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=ed();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.inflation=t.string();break;case 2:u.annualProvisions=t.string();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=ed();return(0,ft.isSet)(e.inflation)&&(n.inflation=String(e.inflation)),(0,ft.isSet)(e.annualProvisions)&&(n.annualProvisions=String(e.annualProvisions)),n},toJSON(e){const n={};return e.inflation!==void 0&&(n.inflation=e.inflation),e.annualProvisions!==void 0&&(n.annualProvisions=e.annualProvisions),n},fromPartial(e){const n=ed();return n.inflation=e.inflation??"",n.annualProvisions=e.annualProvisions??"",n}};function nd(){return{mintDenom:"",inflationRateChange:"",inflationMax:"",inflationMin:"",goalBonded:"",blocksPerYear:BigInt(0)}}Ot.Params={typeUrl:"/cosmos.mint.v1beta1.Params",encode(e,n=Ir.BinaryWriter.create()){return e.mintDenom!==""&&n.uint32(10).string(e.mintDenom),e.inflationRateChange!==""&&n.uint32(18).string(e.inflationRateChange),e.inflationMax!==""&&n.uint32(26).string(e.inflationMax),e.inflationMin!==""&&n.uint32(34).string(e.inflationMin),e.goalBonded!==""&&n.uint32(42).string(e.goalBonded),e.blocksPerYear!==BigInt(0)&&n.uint32(48).uint64(e.blocksPerYear),n},decode(e,n){const t=e instanceof Ir.BinaryReader?e:new Ir.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=nd();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.mintDenom=t.string();break;case 2:u.inflationRateChange=t.string();break;case 3:u.inflationMax=t.string();break;case 4:u.inflationMin=t.string();break;case 5:u.goalBonded=t.string();break;case 6:u.blocksPerYear=t.uint64();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=nd();return(0,ft.isSet)(e.mintDenom)&&(n.mintDenom=String(e.mintDenom)),(0,ft.isSet)(e.inflationRateChange)&&(n.inflationRateChange=String(e.inflationRateChange)),(0,ft.isSet)(e.inflationMax)&&(n.inflationMax=String(e.inflationMax)),(0,ft.isSet)(e.inflationMin)&&(n.inflationMin=String(e.inflationMin)),(0,ft.isSet)(e.goalBonded)&&(n.goalBonded=String(e.goalBonded)),(0,ft.isSet)(e.blocksPerYear)&&(n.blocksPerYear=BigInt(e.blocksPerYear.toString())),n},toJSON(e){const n={};return e.mintDenom!==void 0&&(n.mintDenom=e.mintDenom),e.inflationRateChange!==void 0&&(n.inflationRateChange=e.inflationRateChange),e.inflationMax!==void 0&&(n.inflationMax=e.inflationMax),e.inflationMin!==void 0&&(n.inflationMin=e.inflationMin),e.goalBonded!==void 0&&(n.goalBonded=e.goalBonded),e.blocksPerYear!==void 0&&(n.blocksPerYear=(e.blocksPerYear||BigInt(0)).toString()),n},fromPartial(e){const n=nd();return n.mintDenom=e.mintDenom??"",n.inflationRateChange=e.inflationRateChange??"",n.inflationMax=e.inflationMax??"",n.inflationMin=e.inflationMin??"",n.goalBonded=e.goalBonded??"",e.blocksPerYear!==void 0&&e.blocksPerYear!==null&&(n.blocksPerYear=BigInt(e.blocksPerYear.toString())),n}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryAnnualProvisionsResponse=e.QueryAnnualProvisionsRequest=e.QueryInflationResponse=e.QueryInflationRequest=e.QueryParamsResponse=e.QueryParamsRequest=e.protobufPackage=void 0;const n=Ot,t=te,i=ee;e.protobufPackage="cosmos.mint.v1beta1";function u(){return{}}e.QueryParamsRequest={typeUrl:"/cosmos.mint.v1beta1.QueryParamsRequest",encode(b,f=t.BinaryWriter.create()){return f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=u();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){default:p.skipType(s&7);break}}return o},fromJSON(b){return u()},toJSON(b){return{}},fromPartial(b){return u()}};function R(){return{params:n.Params.fromPartial({})}}e.QueryParamsResponse={typeUrl:"/cosmos.mint.v1beta1.QueryParamsResponse",encode(b,f=t.BinaryWriter.create()){return b.params!==void 0&&n.Params.encode(b.params,f.uint32(10).fork()).ldelim(),f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=R();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.params=n.Params.decode(p,p.uint32());break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=R();return(0,i.isSet)(b.params)&&(f.params=n.Params.fromJSON(b.params)),f},toJSON(b){const f={};return b.params!==void 0&&(f.params=b.params?n.Params.toJSON(b.params):void 0),f},fromPartial(b){const f=R();return b.params!==void 0&&b.params!==null&&(f.params=n.Params.fromPartial(b.params)),f}};function v(){return{}}e.QueryInflationRequest={typeUrl:"/cosmos.mint.v1beta1.QueryInflationRequest",encode(b,f=t.BinaryWriter.create()){return f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=v();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){default:p.skipType(s&7);break}}return o},fromJSON(b){return v()},toJSON(b){return{}},fromPartial(b){return v()}};function E(){return{inflation:new Uint8Array}}e.QueryInflationResponse={typeUrl:"/cosmos.mint.v1beta1.QueryInflationResponse",encode(b,f=t.BinaryWriter.create()){return b.inflation.length!==0&&f.uint32(10).bytes(b.inflation),f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=E();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.inflation=p.bytes();break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=E();return(0,i.isSet)(b.inflation)&&(f.inflation=(0,i.bytesFromBase64)(b.inflation)),f},toJSON(b){const f={};return b.inflation!==void 0&&(f.inflation=(0,i.base64FromBytes)(b.inflation!==void 0?b.inflation:new Uint8Array)),f},fromPartial(b){const f=E();return f.inflation=b.inflation??new Uint8Array,f}};function C(){return{}}e.QueryAnnualProvisionsRequest={typeUrl:"/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest",encode(b,f=t.BinaryWriter.create()){return f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=C();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){default:p.skipType(s&7);break}}return o},fromJSON(b){return C()},toJSON(b){return{}},fromPartial(b){return C()}};function D(){return{annualProvisions:new Uint8Array}}e.QueryAnnualProvisionsResponse={typeUrl:"/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse",encode(b,f=t.BinaryWriter.create()){return b.annualProvisions.length!==0&&f.uint32(10).bytes(b.annualProvisions),f},decode(b,f){const p=b instanceof t.BinaryReader?b:new t.BinaryReader(b);let k=f===void 0?p.len:p.pos+f;const o=D();for(;p.pos<k;){const s=p.uint32();switch(s>>>3){case 1:o.annualProvisions=p.bytes();break;default:p.skipType(s&7);break}}return o},fromJSON(b){const f=D();return(0,i.isSet)(b.annualProvisions)&&(f.annualProvisions=(0,i.bytesFromBase64)(b.annualProvisions)),f},toJSON(b){const f={};return b.annualProvisions!==void 0&&(f.annualProvisions=(0,i.base64FromBytes)(b.annualProvisions!==void 0?b.annualProvisions:new Uint8Array)),f},fromPartial(b){const f=D();return f.annualProvisions=b.annualProvisions??new Uint8Array,f}};class _{constructor(f){this.rpc=f,this.Params=this.Params.bind(this),this.Inflation=this.Inflation.bind(this),this.AnnualProvisions=this.AnnualProvisions.bind(this)}Params(f={}){const p=e.QueryParamsRequest.encode(f).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","Params",p).then(o=>e.QueryParamsResponse.decode(new t.BinaryReader(o)))}Inflation(f={}){const p=e.QueryInflationRequest.encode(f).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","Inflation",p).then(o=>e.QueryInflationResponse.decode(new t.BinaryReader(o)))}AnnualProvisions(f={}){const p=e.QueryAnnualProvisionsRequest.encode(f).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","AnnualProvisions",p).then(o=>e.QueryAnnualProvisionsResponse.decode(new t.BinaryReader(o)))}}e.QueryClientImpl=_})(Dl);Object.defineProperty(Pa,"__esModule",{value:!0});Pa.setupMintExtension=void 0;const Rg=$e,Bg=Dl,Et=Ke;function vg(e){const n=(0,Et.createProtobufRpcClient)(e),t=new Bg.QueryClientImpl(n);return{mint:{params:async()=>{const{params:i}=await t.Params({});return(0,Rg.assert)(i),{blocksPerYear:i.blocksPerYear,goalBonded:(0,Et.decodeCosmosSdkDecFromProto)(i.goalBonded),inflationMin:(0,Et.decodeCosmosSdkDecFromProto)(i.inflationMin),inflationMax:(0,Et.decodeCosmosSdkDecFromProto)(i.inflationMax),inflationRateChange:(0,Et.decodeCosmosSdkDecFromProto)(i.inflationRateChange),mintDenom:i.mintDenom}},inflation:async()=>{const{inflation:i}=await t.Inflation({});return(0,Et.decodeCosmosSdkDecFromProto)(i)},annualProvisions:async()=>{const{annualProvisions:i}=await t.AnnualProvisions({});return(0,Et.decodeCosmosSdkDecFromProto)(i)}}}}Pa.setupMintExtension=vg;var Gr={};
3Object.defineProperty(Gr,"__esModule",{value:!0});Gr.createSlashingAminoConverters=Gr.isAminoMsgUnjail=void 0;function Og(e){return e.type==="cosmos-sdk/MsgUnjail"}Gr.isAminoMsgUnjail=Og;function bg(){throw new Error("Not implemented")}Gr.createSlashingAminoConverters=bg;var Ra={},Ml={},bt={};Object.defineProperty(bt,"__esModule",{value:!0});bt.Params=bt.ValidatorSigningInfo=bt.protobufPackage=void 0;const Ro=Me,cr=ln,Tr=te,Ue=ee;bt.protobufPackage="cosmos.slashing.v1beta1";function td(){return{address:"",startHeight:BigInt(0),indexOffset:BigInt(0),jailedUntil:Ro.Timestamp.fromPartial({}),tombstoned:!1,missedBlocksCounter:BigInt(0)}}bt.ValidatorSigningInfo={typeUrl:"/cosmos.slashing.v1beta1.ValidatorSigningInfo",encode(e,n=Tr.BinaryWriter.create()){return e.address!==""&&n.uint32(10).string(e.address),e.startHeight!==BigInt(0)&&n.uint32(16).int64(e.startHeight),e.indexOffset!==BigInt(0)&&n.uint32(24).int64(e.indexOffset),e.jailedUntil!==void 0&&Ro.Timestamp.encode(e.jailedUntil,n.uint32(34).fork()).ldelim(),e.tombstoned===!0&&n.uint32(40).bool(e.tombstoned),e.missedBlocksCounter!==BigInt(0)&&n.uint32(48).int64(e.missedBlocksCounter),n},decode(e,n){const t=e instanceof Tr.BinaryReader?e:new Tr.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=td();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.address=t.string();break;case 2:u.startHeight=t.int64();break;case 3:u.indexOffset=t.int64();break;case 4:u.jailedUntil=Ro.Timestamp.decode(t,t.uint32());break;case 5:u.tombstoned=t.bool();break;case 6:u.missedBlocksCounter=t.int64();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=td();return(0,Ue.isSet)(e.address)&&(n.address=String(e.address)),(0,Ue.isSet)(e.startHeight)&&(n.startHeight=BigInt(e.startHeight.toString())),(0,Ue.isSet)(e.indexOffset)&&(n.indexOffset=BigInt(e.indexOffset.toString())),(0,Ue.isSet)(e.jailedUntil)&&(n.jailedUntil=(0,Ue.fromJsonTimestamp)(e.jailedUntil)),(0,Ue.isSet)(e.tombstoned)&&(n.tombstoned=!!e.tombstoned),(0,Ue.isSet)(e.missedBlocksCounter)&&(n.missedBlocksCounter=BigInt(e.missedBlocksCounter.toString())),n},toJSON(e){const n={};return e.address!==void 0&&(n.address=e.address),e.startHeight!==void 0&&(n.startHeight=(e.startHeight||BigInt(0)).toString()),e.indexOffset!==void 0&&(n.indexOffset=(e.indexOffset||BigInt(0)).toString()),e.jailedUntil!==void 0&&(n.jailedUntil=(0,Ue.fromTimestamp)(e.jailedUntil).toISOString()),e.tombstoned!==void 0&&(n.tombstoned=e.tombstoned),e.missedBlocksCounter!==void 0&&(n.missedBlocksCounter=(e.missedBlocksCounter||BigInt(0)).toString()),n},fromPartial(e){const n=td();return n.address=e.address??"",e.startHeight!==void 0&&e.startHeight!==null&&(n.startHeight=BigInt(e.startHeight.toString())),e.indexOffset!==void 0&&e.indexOffset!==null&&(n.indexOffset=BigInt(e.indexOffset.toString())),e.jailedUntil!==void 0&&e.jailedUntil!==null&&(n.jailedUntil=Ro.Timestamp.fromPartial(e.jailedUntil)),n.tombstoned=e.tombstoned??!1,e.missedBlocksCounter!==void 0&&e.missedBlocksCounter!==null&&(n.missedBlocksCounter=BigInt(e.missedBlocksCounter.toString())),n}};function rd(){return{signedBlocksWindow:BigInt(0),minSignedPerWindow:new Uint8Array,downtimeJailDuration:cr.Duration.fromPartial({}),slashFractionDoubleSign:new Uint8Array,slashFractionDowntime:new Uint8Array}}bt.Params={typeUrl:"/cosmos.slashing.v1beta1.Params",encode(e,n=Tr.BinaryWriter.create()){return e.signedBlocksWindow!==BigInt(0)&&n.uint32(8).int64(e.signedBlocksWindow),e.minSignedPerWindow.length!==0&&n.uint32(18).bytes(e.minSignedPerWindow),e.downtimeJailDuration!==void 0&&cr.Duration.encode(e.downtimeJailDuration,n.uint32(26).fork()).ldelim(),e.slashFractionDoubleSign.length!==0&&n.uint32(34).bytes(e.slashFractionDoubleSign),e.slashFractionDowntime.length!==0&&n.uint32(42).bytes(e.slashFractionDowntime),n},decode(e,n){const t=e instanceof Tr.BinaryReader?e:new Tr.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=rd();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.signedBlocksWindow=t.int64();break;case 2:u.minSignedPerWindow=t.bytes();break;case 3:u.downtimeJailDuration=cr.Duration.decode(t,t.uint32());break;case 4:u.slashFractionDoubleSign=t.bytes();break;case 5:u.slashFractionDowntime=t.bytes();break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=rd();return(0,Ue.isSet)(e.signedBlocksWindow)&&(n.signedBlocksWindow=BigInt(e.signedBlocksWindow.toString())),(0,Ue.isSet)(e.minSignedPerWindow)&&(n.minSignedPerWindow=(0,Ue.bytesFromBase64)(e.minSignedPerWindow)),(0,Ue.isSet)(e.downtimeJailDuration)&&(n.downtimeJailDuration=cr.Duration.fromJSON(e.downtimeJailDuration)),(0,Ue.isSet)(e.slashFractionDoubleSign)&&(n.slashFractionDoubleSign=(0,Ue.bytesFromBase64)(e.slashFractionDoubleSign)),(0,Ue.isSet)(e.slashFractionDowntime)&&(n.slashFractionDowntime=(0,Ue.bytesFromBase64)(e.slashFractionDowntime)),n},toJSON(e){const n={};return e.signedBlocksWindow!==void 0&&(n.signedBlocksWindow=(e.signedBlocksWindow||BigInt(0)).toString()),e.minSignedPerWindow!==void 0&&(n.minSignedPerWindow=(0,Ue.base64FromBytes)(e.minSignedPerWindow!==void 0?e.minSignedPerWindow:new Uint8Array)),e.downtimeJailDuration!==void 0&&(n.downtimeJailDuration=e.downtimeJailDuration?cr.Duration.toJSON(e.downtimeJailDuration):void 0),e.slashFractionDoubleSign!==void 0&&(n.slashFractionDoubleSign=(0,Ue.base64FromBytes)(e.slashFractionDoubleSign!==void 0?e.slashFractionDoubleSign:new Uint8Array)),e.slashFractionDowntime!==void 0&&(n.slashFractionDowntime=(0,Ue.base64FromBytes)(e.slashFractionDowntime!==void 0?e.slashFractionDowntime:new Uint8Array)),n},fromPartial(e){const n=rd();return e.signedBlocksWindow!==void 0&&e.signedBlocksWindow!==null&&(n.signedBlocksWindow=BigInt(e.signedBlocksWindow.toString())),n.minSignedPerWindow=e.minSignedPerWindow??new Uint8Array,e.downtimeJailDuration!==void 0&&e.downtimeJailDuration!==null&&(n.downtimeJailDuration=cr.Duration.fromPartial(e.downtimeJailDuration)),n.slashFractionDoubleSign=e.slashFractionDoubleSign??new Uint8Array,n.slashFractionDowntime=e.slashFractionDowntime??new Uint8Array,n}};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QuerySigningInfosResponse=e.QuerySigningInfosRequest=e.QuerySigningInfoResponse=e.QuerySigningInfoRequest=e.QueryParamsResponse=e.QueryParamsRequest=e.protobufPackage=void 0;const n=_e,t=bt,i=te,u=ee;e.protobufPackage="cosmos.slashing.v1beta1";function R(){return{}}e.QueryParamsRequest={typeUrl:"/cosmos.slashing.v1beta1.QueryParamsRequest",encode(f,p=i.BinaryWriter.create()){return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=R();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){default:k.skipType(y&7);break}}return s},fromJSON(f){return R()},toJSON(f){return{}},fromPartial(f){return R()}};function v(){return{params:t.Params.fromPartial({})}}e.QueryParamsResponse={typeUrl:"/cosmos.slashing.v1beta1.QueryParamsResponse",encode(f,p=i.BinaryWriter.create()){return f.params!==void 0&&t.Params.encode(f.params,p.uint32(10).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=v();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.params=t.Params.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=v();return(0,u.isSet)(f.params)&&(p.params=t.Params.fromJSON(f.params)),p},toJSON(f){const p={};return f.params!==void 0&&(p.params=f.params?t.Params.toJSON(f.params):void 0),p},fromPartial(f){const p=v();return f.params!==void 0&&f.params!==null&&(p.params=t.Params.fromPartial(f.params)),p}};function E(){return{consAddress:""}}e.QuerySigningInfoRequest={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfoRequest",encode(f,p=i.BinaryWriter.create()){return f.consAddress!==""&&p.uint32(10).string(f.consAddress),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=E();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.consAddress=k.string();break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=E();return(0,u.isSet)(f.consAddress)&&(p.consAddress=String(f.consAddress)),p},toJSON(f){const p={};return f.consAddress!==void 0&&(p.consAddress=f.consAddress),p},fromPartial(f){const p=E();return p.consAddress=f.consAddress??"",p}};function C(){return{valSigningInfo:t.ValidatorSigningInfo.fromPartial({})}}e.QuerySigningInfoResponse={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfoResponse",encode(f,p=i.BinaryWriter.create()){return f.valSigningInfo!==void 0&&t.ValidatorSigningInfo.encode(f.valSigningInfo,p.uint32(10).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=C();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.valSigningInfo=t.ValidatorSigningInfo.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=C();return(0,u.isSet)(f.valSigningInfo)&&(p.valSigningInfo=t.ValidatorSigningInfo.fromJSON(f.valSigningInfo)),p},toJSON(f){const p={};return f.valSigningInfo!==void 0&&(p.valSigningInfo=f.valSigningInfo?t.ValidatorSigningInfo.toJSON(f.valSigningInfo):void 0),p},fromPartial(f){const p=C();return f.valSigningInfo!==void 0&&f.valSigningInfo!==null&&(p.valSigningInfo=t.ValidatorSigningInfo.fromPartial(f.valSigningInfo)),p}};function D(){return{pagination:void 0}}e.QuerySigningInfosRequest={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfosRequest",encode(f,p=i.BinaryWriter.create()){return f.pagination!==void 0&&n.PageRequest.encode(f.pagination,p.uint32(10).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=D();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.pagination=n.PageRequest.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=D();return(0,u.isSet)(f.pagination)&&(p.pagination=n.PageRequest.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.pagination!==void 0&&(p.pagination=f.pagination?n.PageRequest.toJSON(f.pagination):void 0),p},fromPartial(f){const p=D();return f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageRequest.fromPartial(f.pagination)),p}};function _(){return{info:[],pagination:void 0}}e.QuerySigningInfosResponse={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfosResponse",encode(f,p=i.BinaryWriter.create()){for(const k of f.info)t.ValidatorSigningInfo.encode(k,p.uint32(10).fork()).ldelim();return f.pagination!==void 0&&n.PageResponse.encode(f.pagination,p.uint32(18).fork()).ldelim(),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=_();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.info.push(t.ValidatorSigningInfo.decode(k,k.uint32()));break;case 2:s.pagination=n.PageResponse.decode(k,k.uint32());break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=_();return Array.isArray(f==null?void 0:f.info)&&(p.info=f.info.map(k=>
3t.ValidatorSigningInfo.fromJSON(k))),(0,u.isSet)(f.pagination)&&(p.pagination=n.PageResponse.fromJSON(f.pagination)),p},toJSON(f){const p={};return f.info?p.info=f.info.map(k=>k?t.ValidatorSigningInfo.toJSON(k):void 0):p.info=[],f.pagination!==void 0&&(p.pagination=f.pagination?n.PageResponse.toJSON(f.pagination):void 0),p},fromPartial(f){var k;const p=_();return p.info=((k=f.info)==null?void 0:k.map(o=>t.ValidatorSigningInfo.fromPartial(o)))||[],f.pagination!==void 0&&f.pagination!==null&&(p.pagination=n.PageResponse.fromPartial(f.pagination)),p}};class b{constructor(p){this.rpc=p,this.Params=this.Params.bind(this),this.SigningInfo=this.SigningInfo.bind(this),this.SigningInfos=this.SigningInfos.bind(this)}Params(p={}){const k=e.QueryParamsRequest.encode(p).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","Params",k).then(s=>e.QueryParamsResponse.decode(new i.BinaryReader(s)))}SigningInfo(p){const k=e.QuerySigningInfoRequest.encode(p).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","SigningInfo",k).then(s=>e.QuerySigningInfoResponse.decode(new i.BinaryReader(s)))}SigningInfos(p={pagination:n.PageRequest.fromPartial({})}){const k=e.QuerySigningInfosRequest.encode(p).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","SigningInfos",k).then(s=>e.QuerySigningInfosResponse.decode(new i.BinaryReader(s)))}}e.QueryClientImpl=b})(Ml);Object.defineProperty(Ra,"__esModule",{value:!0});Ra.setupSlashingExtension=void 0;const Ag=Ml,yc=Ke;function Ig(e){const n=(0,yc.createProtobufRpcClient)(e),t=new Ag.QueryClientImpl(n);return{slashing:{signingInfo:async i=>await t.SigningInfo({consAddress:i}),signingInfos:async i=>await t.SigningInfos({pagination:(0,yc.createPagination)(i)}),params:async()=>await t.Params({})}}}Ra.setupSlashingExtension=Ig;var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.createStakingAminoConverters=Fe.isAminoMsgUndelegate=Fe.isAminoMsgBeginRedelegate=Fe.isAminoMsgDelegate=Fe.isAminoMsgEditValidator=Fe.isAminoMsgCreateValidator=Fe.protoDecimalToJson=void 0;const Hl=Cn,hc=Ct,ut=$e;function Oi(e){const n=Hl.Decimal.fromAtomics(e,18),[t,i]=n.toString().split(".");return`${t}.${(i??"").padEnd(18,"0")}
3`}Fe.protoDecimalToJson=Oi;function uo(e){return Hl.Decimal.fromUserInput(e,18).atomics}function Tg(e){return e.type==="cosmos-sdk/MsgCreateValidator"}Fe.isAminoMsgCreateValidator=Tg;function Ng(e){return e.type==="cosmos-sdk/MsgEditValidator"}Fe.isAminoMsgEditValidator=Ng;function Cg(e){return e.type==="cosmos-sdk/MsgDelegate"}Fe.isAminoMsgDelegate=Cg;function wg(e){return e.type==="cosmos-sdk/MsgBeginRedelegate"}Fe.isAminoMsgBeginRedelegate=wg;function _g(e){return e.type==="cosmos-sdk/MsgUndelegate"}Fe.isAminoMsgUndelegate=_g;function Eg(){return{"/cosmos.staking.v1beta1.MsgBeginRedelegate":{aminoType:"cosmos-sdk/MsgBeginRedelegate",toAmino:({delegatorAddress:e,validatorSrcAddress:n,validatorDstAddress:t,amount:i})=>((0,ut.assertDefinedAndNotNull)(i,"missing amount"),{delegator_address:e,validator_src_address:n,validator_dst_address:t,amount:i}),fromAmino:({delegator_address:e,validator_src_address:n,validator_dst_address:t,amount:i})=>({delegatorAddress:e,validatorSrcAddress:n,validatorDstAddress:t,amount:i}
3)},"/cosmos.staking.v1beta1.MsgCreateValidator":{aminoType:"cosmos-sdk/MsgCreateValidator",toAmino:({description:e,commission:n,minSelfDelegation:t,delegatorAddress:i,validatorAddress:u,pubkey:R,value:v})=>((0,ut.assertDefinedAndNotNull)(e,"missing description"),(0,ut.assertDefinedAndNotNull)(n,"missing commission"),(0,ut.assertDefinedAndNotNull)(R,"missing pubkey"),(0,ut.assertDefinedAndNotNull)(v,"missing value"),{description:{moniker:e.moniker,identity:e.identity,website:e.website,security_contact:e.securityContact,details:e.details},commission:{rate:Oi(n.rate),max_rate:Oi(n.maxRate),max_change_rate:Oi(n.maxChangeRate)},min_self_delegation:t,delegator_address:i,validator_address:u,pubkey:(0,hc.decodePubkey)(R),value:v}),fromAmino:({description:e,commission:n,min_self_delegation:t,delegator_address:i,validator_address:u,pubkey:R,value:v})=>({description:{moniker:e.moniker,identity:e.identity,website:e.website,securityContact:e.security_contact,details:e.details},commission:{rate:uo(n.rate),maxRate:uo(n.max_rate),maxChangeRate:uo(n.max_change_rate)},minSelfDelegation:t,delegatorAddress:i,validatorAddress:u,pubkey:(0,hc.encodePubkey)(R),value:v})},"/cosmos.staking.v1beta1.MsgDelegate":{aminoType:"cosmos-sdk/MsgDelegate",toAmino:({delegatorAddress:e,validatorAddress:n,amount:t})=>((0,ut.assertDefinedAndNotNull)(t,"missing amount"),{delegator_address:e,validator_address:n,amount:t}),fromAmino:({delegator_address:e,validator_address:n,amount:t})=>({delegatorAddress:e,validatorAddress:n,amount:t})},"/cosmos.staking.v1beta1.MsgEditValidator":{aminoType:"cosmos-sdk/MsgEditValidator",toAmino:({description:e,commissionRate:n,minSelfDelegation:t,validatorAddress:i})=>((0,ut.assertDefinedAndNotNull)(e,"missing description"),{description:{moniker:e.moniker,identity:e.identity,website:e.website,security_contact:e.securityContact,details:e.details},commission_rate:n?Oi(n):void 0,min_self_delegation:t||void 0,validator_address:i}),fromAmino:({description:e,commission_rate:n,min_self_delegation:t,validator_address:i})=>({description:{moniker:e.moniker,identity:e.identity,website:e.website,securityContact:e.security_contact,details:e.details},commissionRate:n?uo(n):"",minSelfDelegation:t??"",validatorAddress:i})},"/cosmos.staking.v1beta1.MsgUndelegate":{aminoType:"cosmos-sdk/MsgUndelegate",toAmino:({delegatorAddress:e,validatorAddress:n,amount:t})=>((0,ut.assertDefinedAndNotNull)(t,"missing amount"),{delegator_address:e,validator_address:n,amount:t}),fromAmino:({delegator_address:e,validator_address:n,amount:t})=>({delegatorAddress:e,validatorAddress:n,amount:t})}}}Fe.createStakingAminoConverters=Eg;var en={},cu={},lu={},fu={},ql={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HashedParams=e.VersionParams=e.ValidatorParams=e.EvidenceParams=e.BlockParams=e.ConsensusParams=e.protobufPackage=void 0;const n=ln,t=te,i=ee;e.protobufPackage="tendermint.types";function u(){return{block:void 0,evidence:void 0,validator:void 0,version:void 0}}e.ConsensusParams={typeUrl:"/tendermint.types.ConsensusParams",encode(_,b=t.BinaryWriter.create()){return _.block!==void 0&&e.BlockParams.encode(_.block,b.uint32(10).fork()).ldelim(),_.evidence!==void 0&&e.EvidenceParams.encode(_.evidence,b.uint32(18).fork()).ldelim(),_.validator!==void 0&&e.ValidatorParams.encode(_.validator,b.uint32(26).fork()).ldelim(),_.version!==void 0&&e.VersionParams.encode(_.version,b.uint32(34).fork()).ldelim(),b},decode(_,b){const f=_ instanceof t.BinaryReader?_:new t.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;const k=u();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.block=e.BlockParams.decode(f,f.uint32());break;case 2:k.evidence=e.EvidenceParams.decode(f,f.uint32());break;case 3:k.validator=e.ValidatorParams.decode(f,f.uint32());break;case 4:k.version=e.VersionParams.decode(f,f.uint32());break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=u();return(0,i.isSet)(_.block)&&(b.block=e.BlockParams.fromJSON(_.block)),(0,i.isSet)(_.evidence)&&(b.evidence=e.EvidenceParams.fromJSON(_.evidence)),(0,i.isSet)(_.validator)&&(b.validator=e.ValidatorParams.fromJSON(_.validator)),(0,i.isSet)(_.version)&&(b.version=e.VersionParams.fromJSON(_.version)),b},toJSON(_){const b={};return _.block!==void 0&&(b.block=_.block?e.BlockParams.toJSON(_.block):void 0),_.evidence!==void 0&&(b.evidence=_.evidence?e.EvidenceParams.toJSON(_.evidence):void 0),_.validator!==void 0&&(b.validator=_.validator?e.ValidatorParams.toJSON(_.validator):void 0),_.version!==void 0&&(b.version=_.version?e.VersionParams.toJSON(_.version):void 0),b},fromPartial(_){const b=u();return _.block!==void 0&&_.block!==null&&(b.block=e.BlockParams.fromPartial(_.block)),_.evidence!==void 0&&_.evidence!==null&&(b.evidence=e.EvidenceParams.fromPartial(_.evidence)),_.validator!==void 0&&_.validator!==null&&(b.validator=e.ValidatorParams.fromPartial(_.validator)),_.ver
3sion!==void 0&&_.version!==null&&(b.version=e.VersionParams.fromPartial(_.version)),b}};function R(){return{maxBytes:BigInt(0),maxGas:BigInt(0)}}e.BlockParams={typeUrl:"/tendermint.types.BlockParams",encode(_,b=t.BinaryWriter.create()){return _.maxBytes!==BigInt(0)&&b.uint32(8).int64(_.maxBytes),_.maxGas!==BigInt(0)&&b.uint32(16).int64(_.maxGas),b},decode(_,b){const f=_ instanceof t.BinaryReader?_:new t.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;const k=R();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.maxBytes=f.int64();break;case 2:k.maxGas=f.int64();break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=R();return(0,i.isSet)(_.maxBytes)&&(b.maxBytes=BigInt(_.maxBytes.toString())),(0,i.isSet)(_.maxGas)&&(b.maxGas=BigInt(_.maxGas.toString())),b},toJSON(_){const b={};return _.maxBytes!==void 0&&(b.maxBytes=(_.maxBytes||BigInt(0)).toString()),_.maxGas!==void 0&&(b.maxGas=(_.maxGas||BigInt(0)).toString()),b},fromPartial(_){const b=R();return _.maxBytes!==void 0&&_.maxBytes!==null&&(b.maxBytes=BigInt(_.maxBytes.toString())),_.maxGas!==void 0&&_.maxGas!==null&&(b.maxGas=BigInt(_.maxGas.toString())),b}};function v(){return{maxAgeNumBlocks:BigInt(0),maxAgeDuration:n.Duration.fromPartial({}),maxBytes:BigInt(0)}}e.EvidenceParams={typeUrl:"/tendermint.types.EvidenceParams",encode(_,b=t.BinaryWriter.create()){return _.maxAgeNumBlocks!==BigInt(0)&&b.uint32(8).int64(_.maxAgeNumBlocks),_.maxAgeDuration!==void 0&&n.Duration.encode(_.maxAgeDuration,b.uint32(18).fork()).ldelim(),_.maxBytes!==BigInt(0)&&b.uint32(24).int64(_.maxBytes),b},decode(_,b){const f=_ instanceof t.BinaryReader?_:new t.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;const k=v();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.maxAgeNumBlocks=f.int64();break;case 2:k.maxAgeDuration=n.Duration.decode(f,f.uint32());break;case 3:k.maxBytes=f.int64();break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=v();return(0,i.isSet)(_.maxAgeNumBlocks)&&(b.maxAgeNumBlocks=BigInt(_.maxAgeNumBlocks.toString())),(0,i.isSet)(_.maxAgeDuration)&&(b.maxAgeDuration=n.Duration.fromJSON(_.maxAgeDuration)),(0,i.isSet)(_.maxBytes)&&(b.maxBytes=BigInt(_.maxBytes.toString())),b},toJSON(_){const b={};return _.maxAgeNumBlocks!==void 0&&(b.maxAgeNumBlocks=(_.maxAgeNumBlocks||BigInt(0)).toString()),_.maxAgeDuration!==void 0&&(b.maxAgeDuration=_.maxAgeDuration?n.Duration.toJSON(_.maxAgeDuration):void 0),_.maxBytes!==void 0&&(b.maxBytes=(_.maxBytes||BigInt(0)).toString()),b},fromPartial(_){const b=v();return _.maxAgeNumBlocks!==void 0&&_.maxAgeNumBlocks!==null&&(b.maxAgeNumBlocks=BigInt(_.maxAgeNumBlocks.toString())),_.maxAgeDuration!==void 0&&_.maxAgeDuration!==null&&(b.maxAgeDuration=n.Duration.fromPartial(_.maxAgeDuration)),_.maxBytes!==void 0&&_.maxBytes!==null&&(b.maxBytes=BigInt(_.maxBytes.toString())),b}};function E(){return{pubKeyTypes:[]}}e.ValidatorParams={typeUrl:"/tendermint.types.ValidatorParams",encode(_,b=t.BinaryWriter.create()){for(const f of _.pubKeyTypes)b.uint32(10).string(f);return b},decode(_,b){const f=_ instanceof t.BinaryReader?_:new t.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;const k=E();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.pubKeyTypes.push(f.string());break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=E();return Array.isArray(_==null?void 0:_.pubKeyTypes)&&(b.pubKeyTypes=_.pubKeyTypes.map(f=>String(f))),b},toJSON(_){const b={};return _.pubKeyTypes?b.pubKeyTypes=_.pubKeyTypes.map(f=>f):b.pubKeyTypes=[],b},fromPartial(_){var f;const b=E();return b.pubKeyTypes=((f=_.pubKeyTypes)==null?void 0:f.map(p=>p))||[],b}};function C(){return{app:BigInt(0)}}e.VersionParams={typeUrl:"/tendermint.types.VersionParams",encode(_,b=t.BinaryWriter.create()){return _.app!==BigInt(0)&&b.uint32(8).uint64(_.app),b},decode(_,b){const f=_ instanceof t.BinaryReader?_:new t.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;const k=C();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.app=f.uint64();break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=C();return(0,i.isSet)(_.app)&&(b.app=BigInt(_.app.toString())),b},toJSON(_){const b={};return _.app!==void 0&&(b.app=(_.app||BigInt(0)).toString()),b},fromPartial(_){const b=C();return _.app!==void 0&&_.app!==null&&(b.app=BigInt(_.app.toString())),b}};function D(){return{blockMaxBytes:BigInt(0),blockMaxGas:BigInt(0)}}e.HashedParams={typeUrl:"/tendermint.types.HashedParams",encode(_,b=t.BinaryWriter.create()){return _.blockMaxBytes!==BigInt(0)&&b.uint32(8).int64(_.blockMaxBytes),_.blockMaxGas!==BigInt(0)&&b.uint32(16).int64(_.blockMaxGas),b},decode(_,b){const f=_ instanceof t.BinaryReader?_:new t.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;
3const k=D();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.blockMaxBytes=f.int64();break;case 2:k.blockMaxGas=f.int64();break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=D();return(0,i.isSet)(_.blockMaxBytes)&&(b.blockMaxBytes=BigInt(_.blockMaxBytes.toString())),(0,i.isSet)(_.blockMaxGas)&&(b.blockMaxGas=BigInt(_.blockMaxGas.toString())),b},toJSON(_){const b={};return _.blockMaxBytes!==void 0&&(b.blockMaxBytes=(_.blockMaxBytes||BigInt(0)).toString()),_.blockMaxGas!==void 0&&(b.blockMaxGas=(_.blockMaxGas||BigInt(0)).toString()),b},fromPartial(_){const b=D();return _.blockMaxBytes!==void 0&&_.blockMaxBytes!==null&&(b.blockMaxBytes=BigInt(_.blockMaxBytes.toString())),_.blockMaxGas!==void 0&&_.blockMaxGas!==null&&(b.blockMaxGas=BigInt(_.blockMaxGas.toString())),b}}})(ql);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ResponsePrepareProposal=e.ResponseApplySnapshotChunk=e.ResponseLoadSnapshotChunk=e.ResponseOfferSnapshot=e.ResponseListSnapshots=e.ResponseCommit=e.ResponseEndBlock=e.ResponseDeliverTx=e.ResponseCheckTx=e.ResponseBeginBlock=e.ResponseQuery=e.ResponseInitChain=e.ResponseInfo=e.ResponseFlush=e.ResponseEcho=e.ResponseException=e.Response=e.RequestProcessProposal=e.RequestPrepareProposal=e.RequestApplySnapshotChunk=e.RequestLoadSnapshotChunk=e.RequestOfferSnapshot=e.RequestListSnapshots=e.RequestCommit=e.RequestEndBlock=e.RequestDeliverTx=e.RequestCheckTx=e.RequestBeginBlock=e.RequestQuery=e.RequestInitChain=e.RequestInfo=e.RequestFlush=e.RequestEcho=e.Request=e.misbehaviorTypeToJSON=e.misbehaviorTypeFromJSON=e.MisbehaviorType=e.responseProcessProposal_ProposalStatusToJSON=e.responseProcessProposal_ProposalStatusFromJSON=e.ResponseProcessProposal_ProposalStatus=e.responseApplySnapshotChunk_ResultToJSON=e.responseApplySnapshotChunk_ResultFromJSON=e.ResponseApplySnapshotChunk_Result=e.responseOfferSnapshot_ResultToJSON=e.responseOfferSnapshot_ResultFromJSON=e.ResponseOfferSnapshot_Result=e.checkTxTypeToJSON=e.checkTxTypeFromJSON=e.CheckTxType=e.protobufPackage=void 0,e.ABCIApplicationClientImpl=e.Snapshot=e.Misbehavior=e.ExtendedVoteInfo=e.VoteInfo=e.ValidatorUpdate=e.Validator=e.TxResult=e.EventAttribute=e.Event=e.ExtendedCommitInfo=e.CommitInfo=e.ResponseProcessProposal=void 0;const n=Me,t=ql,i=Wt,u=uu,R=Vt,v=te,E=ee;e.protobufPackage="tendermint.abci";var C;(function(c){c[c.NEW=0]="NEW",c[c.RECHECK=1]="RECHECK",c[c.UNRECOGNIZED=-1]="UNRECOGNIZED"})(C||(e.CheckTxType=C={}));function D(c){switch(c){case 0:case"NEW":return C.NEW;case 1:case"RECHECK":return C.RECHECK;case-1:case"UNRECOGNIZED":default:return C.UNRECOGNIZED}}e.checkTxTypeFromJSON=D;function _(c){switch(c){case C.NEW:return"NEW";case C.RECHECK:return"RECHECK";case C.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.checkTxTypeToJSON=_;var b;(function(c){c[c.UNKNOWN=0]="UNKNOWN",c[c.ACCEPT=1]="ACCEPT",c[c.ABORT=2]="ABORT",c[c.REJECT=3]="REJECT",c[c.REJECT_FORMAT=4]="REJECT_FORMAT",c[c.REJECT_SENDER=5]="REJECT_SENDER",c[c.UNRECOGNIZED=-1]="UNRECOGNIZED"})(b||(e.ResponseOfferSnapshot_Result=b={}));function f(c){switch(c){case 0:case"UNKNOWN":return b.UNKNOWN;case 1:case"ACCEPT":return b.ACCEPT;case 2:case"ABORT":return b.ABORT;case 3:case"REJECT":return b.REJECT;case 4:case"REJECT_FORMAT":return b.REJECT_FORMAT;case 5:case"REJECT_SENDER":return b.REJECT_SENDER;case-1:case"UNRECOGNIZED":default:return b.UNRECOGNIZED}}e.responseOfferSnapshot_ResultFromJSON=f;function p(c){switch(c){case b.UNKNOWN:return"UNKNOWN";case b.ACCEPT:return"ACCEPT";case b.ABORT:return"ABORT";case b.REJECT:return"REJECT";case b.REJECT_FORMAT:return"REJECT_FORMAT";case b.REJECT_SENDER:return"REJECT_SENDER";case b.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.responseOfferSnapshot_ResultToJSON=p;var k;(function(c){c[c.UNKNOWN=0]="UNKNOWN",c[c.ACCEPT=1]="ACCEPT",c[c.ABORT=2]="ABORT",c[c.RETRY=3]="RETRY",c[c.RETRY_SNAPSHOT=4]="RETRY_SNAPSHOT",c[c.REJECT_SNAPSHOT=5]="REJECT_SNAPSHOT",c[c.UNRECOGNIZED=-1]="UNRECOGNIZED"})(k||(e.ResponseApplySnapshotChunk_Result=k={}));function o(c){switch(c){case 0:case"UNKNOWN":return k.UNKNOWN;
3case 1:case"ACCEPT":return k.ACCEPT;case 2:case"ABORT":return k.ABORT;case 3:case"RETRY":return k.RETRY;case 4:case"RETRY_SNAPSHOT":return k.RETRY_SNAPSHOT;case 5:case"REJECT_SNAPSHOT":return k.REJECT_SNAPSHOT;case-1:case"UNRECOGNIZED":default:return k.UNRECOGNIZED}}e.responseApplySnapshotChunk_ResultFromJSON=o;function s(c){switch(c){case k.UNKNOWN:return"UNKNOWN";case k.ACCEPT:return"ACCEPT";case k.ABORT:return"ABORT";case k.RETRY:return"RETRY";case k.RETRY_SNAPSHOT:return"RETRY_SNAPSHOT";case k.REJECT_SNAPSHOT:return"REJECT_SNAPSHOT";case k.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.responseApplySnapshotChunk_ResultToJSON=s;var y;(function(c){c[c.UNKNOWN=0]="UNKNOWN",c[c.ACCEPT=1]="ACCEPT",c[c.REJECT=2]="REJECT",c[c.UNRECOGNIZED=-1]="UNRECOGNIZED"})(y||(e.ResponseProcessProposal_ProposalStatus=y={}));function w(c){switch(c){case 0:case"UNKNOWN":return y.UNKNOWN;case 1:case"ACCEPT":return y.ACCEPT;case 2:case"REJECT":return y.REJECT;case-1:case"UNRECOGNIZED":default:return y.UNRECOGNIZED}}e.responseProcessProposal_ProposalStatusFromJSON=w;function J(c){switch(c){case y.UNKNOWN:return"UNKNOWN";case y.ACCEPT:return"ACCEPT";case y.REJECT:return"REJECT";case y.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.responseProcessProposal_ProposalStatusToJSON=J;var P;(function(c){c[c.UNKNOWN=0]="UNKNOWN",c[c.DUPLICATE_VOTE=1]="DUPLICATE_VOTE",c[c.LIGHT_CLIENT_ATTACK=2]="LIGHT_CLIENT_ATTACK",c[c.UNRECOGNIZED=-1]="UNRECOGNIZED"})(P||(e.MisbehaviorType=P={}));function U(c){switch(c){case 0:case"UNKNOWN":return P.UNKNOWN;case 1:case"DUPLICATE_VOTE":return P.DUPLICATE_VOTE;case 2:case"LIGHT_CLIENT_ATTACK":return P.LIGHT_CLIENT_ATTACK;case-1:case"UNRECOGNIZED":default:return P.UNRECOGNIZED}}e.misbehaviorTypeFromJSON=U;function r(c){switch(c){case P.UNKNOWN:return"UNKNOWN";case P.DUPLICATE_VOTE:return"DUPLICATE_VOTE";case P.LIGHT_CLIENT_ATTACK:return"LIGHT_CLIENT_ATTACK";case P.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.misbehaviorTypeToJSON=r;function m(){return{echo:void 0,flush:void 0,info:void 0,initChain:void 0,query:void 0,beginBlock:void 0,checkTx:void 0,deliverTx:void 0,endBlock:void 0,commit:void 0,listSnapshots:void 0,offerSnapshot:void 0,loadSnapshotChunk:void 0,applySnapshotChunk:void 0,prepareProposal:void 0,processProposal:void 0}}e.Request={typeUrl:"/tendermint.abci.Request",encode(c,I=v.BinaryWriter.create()){return c.echo!==void 0&&e.RequestEcho.encode(c.echo,I.uint32(10).fork()).ldelim(),c.flush!==void 0&&e.RequestFlush.encode(c.flush,I.uint32(18).fork()).ldelim(),c.info!==void 0&&e.RequestInfo.encode(c.info,I.uint32(26).fork()).ldelim(),c.initChain!==void 0&&e.RequestInitChain.encode(c.initChain,I.uint32(42).fork()).ldelim(),c.query!==void 0&&e.RequestQuery.encode(c.query,I.uint32(50).fork()).ldelim(),c.beginBlock!==void 0&&e.RequestBeginBlock.encode(c.beginBlock,I.uint32(58).fork()).ldelim(),c.checkTx!==void 0&&e.RequestCheckTx.encode(c.checkTx,I.uint32(66).fork()).ldelim(),c.deliverTx!==void 0&&e.RequestDeliverTx.encode(c.deliverTx,I.uint32(74).fork()).ldelim(),c.endBlock!==void 0&&e.RequestEndBlock.encode(c.endBlock,I.uint32(82).fork()).ldelim(),c.commit!==void 0&&e.RequestCommit.encode(c.commit,I.uint32(90).fork()).ldelim(),c.listSnapshots!==void 0&&e.RequestListSnapshots.encode(c.listSnapshots,I.uint32(98).fork()).ldelim(),c.offerSnapshot!==void 0&&e.RequestOfferSnapshot.encode(c.offerSnapshot,I.uint32(106).fork()).ldelim(),c.loadSnapshotChunk!==void 0&&e.RequestLoadSnapshotChunk.encode(c.loadSnapshotChunk,I.uint32(114).fork()).ldelim(),c.applySnapshotChunk!==void 0&&e.RequestApplySnapshotChunk.encode(c.applySnapshotChunk,I.uint32(122).fork()).ldelim(),c.prepareProposal!==void 0&&e.RequestPrepareProposal.encode(c.prepareProposal,I.uint32(130).fork()).ldelim(),c.processProposal!==void 0&&e.RequestProcessProposal.encode(c.processProposal,I.uint32(138).fork()).ldelim(),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=m();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.echo=e.RequestEcho.decode(q,q.uint32());break;case 2:F.flush=e.RequestFlush.decode(q,q.uint32());break;case 3:F.info=e.RequestInfo.decode(q,q.uint32());break;
3case 5:F.initChain=e.RequestInitChain.decode(q,q.uint32());break;case 6:F.query=e.RequestQuery.decode(q,q.uint32());break;case 7:F.beginBlock=e.RequestBeginBlock.decode(q,q.uint32());break;case 8:F.checkTx=e.RequestCheckTx.decode(q,q.uint32());break;case 9:F.deliverTx=e.RequestDeliverTx.decode(q,q.uint32());break;case 10:F.endBlock=e.RequestEndBlock.decode(q,q.uint32());break;case 11:F.commit=e.RequestCommit.decode(q,q.uint32());break;case 12:F.listSnapshots=e.RequestListSnapshots.decode(q,q.uint32());break;case 13:F.offerSnapshot=e.RequestOfferSnapshot.decode(q,q.uint32());break;case 14:F.loadSnapshotChunk=e.RequestLoadSnapshotChunk.decode(q,q.uint32());break;case 15:F.applySnapshotChunk=e.RequestApplySnapshotChunk.decode(q,q.uint32());break;case 16:F.prepareProposal=e.RequestPrepareProposal.decode(q,q.uint32());break;case 17:F.processProposal=e.RequestProcessProposal.decode(q,q.uint32());break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=m();return(0,E.isSet)(c.echo)&&(I.echo=e.RequestEcho.fromJSON(c.echo)),(0,E.isSet)(c.flush)&&(I.flush=e.RequestFlush.fromJSON(c.flush)),(0,E.isSet)(c.info)&&(I.info=e.RequestInfo.fromJSON(c.info)),(0,E.isSet)(c.initChain)&&(I.initChain=e.RequestInitChain.fromJSON(c.initChain)),(0,E.isSet)(c.query)&&(I.query=e.RequestQuery.fromJSON(c.query)),(0,E.isSet)(c.beginBlock)&&(I.beginBlock=e.RequestBeginBlock.fromJSON(c.beginBlock)),(0,E.isSet)(c.checkTx)&&(I.checkTx=e.RequestCheckTx.fromJSON(c.checkTx)),(0,E.isSet)(c.deliverTx)&&(I.deliverTx=e.RequestDeliverTx.fromJSON(c.deliverTx)),(0,E.isSet)(c.endBlock)&&(I.endBlock=e.RequestEndBlock.fromJSON(c.endBlock)),(0,E.isSet)(c.commit)&&(I.commit=e.RequestCommit.fromJSON(c.commit)),(0,E.isSet)(c.listSnapshots)&&(I.listSnapshots=e.RequestListSnapshots.fromJSON(c.listSnapshots)),(0,E.isSet)(c.offerSnapshot)&&(I.offerSnapshot=e.RequestOfferSnapshot.fromJSON(c.offerSnapshot)),(0,E.isSet)(c.loadSnapshotChunk)&&(I.loadSnapshotChunk=e.RequestLoadSnapshotChunk.fromJSON(c.loadSnapshotChunk)),(0,E.isSet)(c.applySnapshotChunk)&&(I.applySnapshotChunk=e.RequestApplySnapshotChunk.fromJSON(c.applySnapshotChunk)),(0,E.isSet)(c.prepareProposal)&&(I.prepareProposal=e.RequestPrepareProposal.fromJSON(c.prepareProposal)),(0,E.isSet)(c.processProposal)&&(I.processProposal=e.RequestProcessProposal.fromJSON(c.processProposal)),I},toJSON(c){const I={};return c.echo!==void 0&&(I.echo=c.echo?e.RequestEcho.toJSON(c.echo):void 0),c.flush!==void 0&&(I.flush=c.flush?e.RequestFlush.toJSON(c.flush):void 0),c.info!==void 0&&(I.info=c.info?e.RequestInfo.toJSON(c.info):void 0),c.initChain!==void 0&&(I.initChain=c.initChain?e.RequestInitChain.toJSON(c.initChain):void 0),c.query!==void 0&&(I.query=c.query?e.RequestQuery.toJSON(c.query):void 0),c.beginBlock!==void 0&&(I.beginBlock=c.beginBlock?e.RequestBeginBlock.toJSON(c.beginBlock):void 0),c.checkTx!==void 0&&(I.checkTx=c.checkTx?e.RequestCheckTx.toJSON(c.checkTx):void 0),c.deliverTx!==void 0&&(I.deliverTx=c.deliverTx?e.RequestDeliverTx.toJSON(c.deliverTx):void 0),c.endBlock!==void 0&&(I.endBlock=c.endBlock?e.RequestEndBlock.toJSON(c.endBlock):void 0),c.commit!==void 0&&(I.commit=c.commit?e.RequestCommit.toJSON(c.commit):void 0),c.listSnapshots!==void 0&&(I.listSnapshots=c.listSnapshots?e.RequestListSnapshots.toJSON(c.listSnapshots):void 0),c.offerSnapshot!==void 0&&(I.offerSnapshot=c.offerSnapshot?e.RequestOfferSnapshot.toJSON(c.offerSnapshot):void 0),c.loadSnapshotChunk!==void 0&&(I.loadSnapshotChunk=c.loadSnapshotChunk?e.RequestLoadSnapshotChunk.toJSON(c.loadSnapshotChunk):void 0),c.applySnapshotChunk!==void 0&&(I.applySnapshotChunk=c.applySnapshotChunk?e.RequestApplySnapshotChunk.toJSON(c.applySnapshotChunk):void 0),c.prepareProposal!==void 0&&(I.prepareProposal=c.prepareProposal?e.RequestPrepareProposal.toJSON(c.prepareProposal):void 0),c.processProposal!==void 0&&(I.processProposal=c.processProposal?e.RequestProcessProposal.toJSON(c.processProposal):void 0),I},fromPartial(c){const I=m();return c.echo!==void 0&&c.echo!==null&&(I.echo=e.RequestEcho.fromPartial(c.echo)),c.flush!==void 0&&c.flush!==null&&(I.flush=e.RequestFlush.fromPartial(c.flush)),c.info!==void 0&&c.info!==null&&(I.info=e.RequestInfo.fromPartial(c.info)),c.init
3Chain!==void 0&&c.initChain!==null&&(I.initChain=e.RequestInitChain.fromPartial(c.initChain)),c.query!==void 0&&c.query!==null&&(I.query=e.RequestQuery.fromPartial(c.query)),c.beginBlock!==void 0&&c.beginBlock!==null&&(I.beginBlock=e.RequestBeginBlock.fromPartial(c.beginBlock)),c.checkTx!==void 0&&c.checkTx!==null&&(I.checkTx=e.RequestCheckTx.fromPartial(c.checkTx)),c.deliverTx!==void 0&&c.deliverTx!==null&&(I.deliverTx=e.RequestDeliverTx.fromPartial(c.deliverTx)),c.endBlock!==void 0&&c.endBlock!==null&&(I.endBlock=e.RequestEndBlock.fromPartial(c.endBlock)),c.commit!==void 0&&c.commit!==null&&(I.commit=e.RequestCommit.fromPartial(c.commit)),c.listSnapshots!==void 0&&c.listSnapshots!==null&&(I.listSnapshots=e.RequestListSnapshots.fromPartial(c.listSnapshots)),c.offerSnapshot!==void 0&&c.offerSnapshot!==null&&(I.offerSnapshot=e.RequestOfferSnapshot.fromPartial(c.offerSnapshot)),c.loadSnapshotChunk!==void 0&&c.loadSnapshotChunk!==null&&(I.loadSnapshotChunk=e.RequestLoadSnapshotChunk.fromPartial(c.loadSnapshotChunk)),c.applySnapshotChunk!==void 0&&c.applySnapshotChunk!==null&&(I.applySnapshotChunk=e.RequestApplySnapshotChunk.fromPartial(c.applySnapshotChunk)),c.prepareProposal!==void 0&&c.prepareProposal!==null&&(I.prepareProposal=e.RequestPrepareProposal.fromPartial(c.prepareProposal)),c.processProposal!==void 0&&c.processProposal!==null&&(I.processProposal=e.RequestProcessProposal.fromPartial(c.processProposal)),I}};function N(){return{message:""}}e.RequestEcho={typeUrl:"/tendermint.abci.RequestEcho",encode(c,I=v.BinaryWriter.create()){return c.message!==""&&I.uint32(10).string(c.message),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=N();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.message=q.string();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=N();return(0,E.isSet)(c.message)&&(I.message=String(c.message)),I},toJSON(c){const I={};return c.message!==void 0&&(I.message=c.message),I},fromPartial(c){const I=N();return I.message=c.message??"",I}};function V(){return{}}e.RequestFlush={typeUrl:"/tendermint.abci.RequestFlush",encode(c,I=v.BinaryWriter.create()){return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=V();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){default:q.skipType(z&7);break}}return F},fromJSON(c){return V()},toJSON(c){return{}},fromPartial(c){return V()}};function d(){return{version:"",blockVersion:BigInt(0),p2pVersion:BigInt(0),abciVersion:""}}e.RequestInfo={typeUrl:"/tendermint.abci.RequestInfo",encode(c,I=v.BinaryWriter.create()){return c.version!==""&&I.uint32(10).string(c.version),c.blockVersion!==BigInt(0)&&I.uint32(16).uint64(c.blockVersion),c.p2pVersion!==BigInt(0)&&I.uint32(24).uint64(c.p2pVersion),c.abciVersion!==""&&I.uint32(34).string(c.abciVersion),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=d();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.version=q.string();break;case 2:F.blockVersion=q.uint64();break;case 3:F.p2pVersion=q.uint64();break;case 4:F.abciVersion=q.string();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=d();return(0,E.isSet)(c.version)&&(I.version=String(c.version)),(0,E.isSet)(c.blockVersion)&&(I.blockVersion=BigInt(c.blockVersion.toString())),(0,E.isSet)(c.p2pVersion)&&(I.p2pVersion=BigInt(c.p2pVersion.toString())),(0,E.isSet)(c.abciVersion)&&(I.abciVersion=String(c.abciVersion)),I},toJSON(c){const I={};return c.version!==void 0&&(I.version=c.version),c.blockVersion!==void 0&&(I.blockVersion=(c.blockVersion||BigInt(0)).toString()),c.p2pVersion!==void 0&&(I.p2pVersion=(c.p2pVersion||BigInt(0)).toString()),c.abciVersion!==void 0&&(I.abciVersion=c.abciVersion),I},fromPartial(c){const I=d();return I.version=c.version??"",c.blockVersion!==void 0&&c.blockVersion!==null&&(I.blockVersion=BigInt(c.blockVersion.toString())),c.p2pVersion!==void 0&&c.p2pVersion!==null&&(I.p2pVersion=BigInt(c.p2pVersion.toString())),I.abciVersion=c.abciVersion??"",I}};function l(){return{time:n.Timestamp.fromPartial({}),chainId:"",consensusParams:void 0,validators:[],appStateBytes:new Uint8Array,initialHeight:BigInt(0)}}e.RequestInitChain={typeUrl:"/tendermint.abci.RequestInitChain",encode(c,I=v.BinaryWriter.create()){c.time!==void 0&&n.Timestamp.encode(c.time,I.uint32(10).fork()).ldelim(),c.chainId!==""&&I.uint32(18).string(c.chainId),c.consensusParams!==void 0&&t.ConsensusParams.encode(c.consensusParams,I.uint32(26).fork()).ldelim();for(const q of c.validators)e.ValidatorUpdate.encode(q,I.uint32(34).fork()).ldelim();return c.appStateBytes.length!==0&&I.uint32(42).bytes(c.appStateBytes),c.initialHeight!==BigInt(0)&&I.uint32(48).int64(c.initialHeight),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=l();for(;q.pos<K;){const z=q.uint32();switch(z>>
3>3){case 1:F.time=n.Timestamp.decode(q,q.uint32());break;case 2:F.chainId=q.string();break;case 3:F.consensusParams=t.ConsensusParams.decode(q,q.uint32());break;case 4:F.validators.push(e.ValidatorUpdate.decode(q,q.uint32()));break;case 5:F.appStateBytes=q.bytes();break;case 6:F.initialHeight=q.int64();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=l();return(0,E.isSet)(c.time)&&(I.time=(0,E.fromJsonTimestamp)(c.time)),(0,E.isSet)(c.chainId)&&(I.chainId=String(c.chainId)),(0,E.isSet)(c.consensusParams)&&(I.consensusParams=t.ConsensusParams.fromJSON(c.consensusParams)),Array.isArray(c==null?void 0:c.validators)&&(I.validators=c.validators.map(q=>e.ValidatorUpdate.fromJSON(q))),(0,E.isSet)(c.appStateBytes)&&(I.appStateBytes=(0,E.bytesFromBase64)(c.appStateBytes)),(0,E.isSet)(c.initialHeight)&&(I.initialHeight=BigInt(c.initialHeight.toString())),I},toJSON(c){const I={};return c.time!==void 0&&(I.time=(0,E.fromTimestamp)(c.time).toISOString()),c.chainId!==void 0&&(I.chainId=c.chainId),c.consensusParams!==void 0&&(I.consensusParams=c.consensusParams?t.ConsensusParams.toJSON(c.consensusParams):void 0),c.validators?I.validators=c.validators.map(q=>q?e.ValidatorUpdate.toJSON(q):void 0):I.validators=[],c.appStateBytes!==void 0&&(I.appStateBytes=(0,E.base64FromBytes)(c.appStateBytes!==void 0?c.appStateBytes:new Uint8Array)),c.initialHeight!==void 0&&(I.initialHeight=(c.initialHeight||BigInt(0)).toString()),I},fromPartial(c){var q;const I=l();return c.time!==void 0&&c.time!==null&&(I.time=n.Timestamp.fromPartial(c.time)),I.chainId=c.chainId??"",c.consensusParams!==void 0&&c.consensusParams!==null&&(I.consensusParams=t.ConsensusParams.fromPartial(c.consensusParams)),I.validators=((q=c.validators)==null?void 0:q.map(K=>e.ValidatorUpdate.fromPartial(K)))||[],I.appStateBytes=c.appStateBytes??new Uint8Array,c.initialHeight!==void 0&&c.initialHeight!==null&&(I.initialHeight=BigInt(c.initialHeight.toString())),I}};function T(){return{data:new Uint8Array,path:"",height:BigInt(0),prove:!1}}e.RequestQuery={typeUrl:"/tendermint.abci.RequestQuery",encode(c,I=v.BinaryWriter.create()){return c.data.length!==0&&I.uint32(10).bytes(c.data),c.path!==""&&I.uint32(18).string(c.path),c.height!==BigInt(0)&&I.uint32(24).int64(c.height),c.prove===!0&&I.uint32(32).bool(c.prove),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=T();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.data=q.bytes();break;case 2:F.path=q.string();break;case 3:F.height=q.int64();break;case 4:F.prove=q.bool();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=T();return(0,E.isSet)(c.data)&&(I.data=(0,E.bytesFromBase64)(c.data)),(0,E.isSet)(c.path)&&(I.path=String(c.path)),(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),(0,E.isSet)(c.prove)&&(I.prove=!!c.prove),I},toJSON(c){const I={};return c.data!==void 0&&(I.data=(0,E.base64FromBytes)(c.data!==void 0?c.data:new Uint8Array)),c.path!==void 0&&(I.path=c.path),c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),c.prove!==void 0&&(I.prove=c.prove),I},fromPartial(c){const I=T();return I.data=c.data??new Uint8Array,I.path=c.path??"",c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),I.prove=c.prove??!1,I}};function O(){return{hash:new Uint8Array,header:i.Header.fromPartial({}),lastCommitInfo:e.CommitInfo.fromPartial({}),byzantineValidators:[]}}e.RequestBeginBlock={typeUrl:"/tendermint.abci.RequestBeginBlock",encode(c,I=v.BinaryWriter.create()){c.hash.length!==0&&I.uint32(10).bytes(c.hash),c.header!==void 0&&i.Header.encode(c.header,I.uint32(18).fork()).ldelim(),c.lastCommitInfo!==void 0&&e.CommitInfo.encode(c.lastCommitInfo,I.uint32(26).fork()).ldelim();for(const q of c.byzantineValidators)e.Misbehavior.encode(q,I.uint32(34).fork()).ldelim();return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=O();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.hash=q.bytes();break;case 2:F.header=i.Header.decode(q,q.uint32());break;case 3:F.lastCommitInfo=e.CommitInfo.decode(q,q.uint32());break;case 4:F.byzantineValidators.push(e.Misbehavior.decode(q,q.uint32()));break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=O();return(0,E.isSet)(c.hash)&&(I.hash=(0,E.bytesFromBase64)(c.hash)),(0,E.isSet)(c.header)&&(I.header=i.Header.fromJSON(c.header)),(0,E.isSet)(c.lastCommitInfo)&&(I.lastCommitInfo=e.CommitInfo.fromJSON(c.lastCommitInfo)),Array.isArray(c==null?void 0:c.byzantineValidators)&&(I.byzantineValidators=c.byzantineValidators.map(q=>e.Misbehavior.fromJSON(q))),I},toJSON(c){const I={};return c.hash!==void 0&&(I.hash=(0,E.base64FromBytes)(c.hash!==void 0?c.hash:new Uint8Array)),c.header!==void 0&&(I.header=c.header?i.Header.toJSON(c.header):void 0),c.lastCommitInfo!==void 0&&(I.lastCommitInfo=c.lastCommitInfo?e.CommitInfo.toJSON(c.lastCommitInfo):void 0),c.b
3yzantineValidators?I.byzantineValidators=c.byzantineValidators.map(q=>q?e.Misbehavior.toJSON(q):void 0):I.byzantineValidators=[],I},fromPartial(c){var q;const I=O();return I.hash=c.hash??new Uint8Array,c.header!==void 0&&c.header!==null&&(I.header=i.Header.fromPartial(c.header)),c.lastCommitInfo!==void 0&&c.lastCommitInfo!==null&&(I.lastCommitInfo=e.CommitInfo.fromPartial(c.lastCommitInfo)),I.byzantineValidators=((q=c.byzantineValidators)==null?void 0:q.map(K=>e.Misbehavior.fromPartial(K)))||[],I}};function B(){return{tx:new Uint8Array,type:0}}e.RequestCheckTx={typeUrl:"/tendermint.abci.RequestCheckTx",encode(c,I=v.BinaryWriter.create()){return c.tx.length!==0&&I.uint32(10).bytes(c.tx),c.type!==0&&I.uint32(16).int32(c.type),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=B();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.tx=q.bytes();break;case 2:F.type=q.int32();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=B();return(0,E.isSet)(c.tx)&&(I.tx=(0,E.bytesFromBase64)(c.tx)),(0,E.isSet)(c.type)&&(I.type=D(c.type)),I},toJSON(c){const I={};return c.tx!==void 0&&(I.tx=(0,E.base64FromBytes)(c.tx!==void 0?c.tx:new Uint8Array)),c.type!==void 0&&(I.type=_(c.type)),I},fromPartial(c){const I=B();return I.tx=c.tx??new Uint8Array,I.type=c.type??0,I}};function M(){return{tx:new Uint8Array}}e.RequestDeliverTx={typeUrl:"/tendermint.abci.RequestDeliverTx",encode(c,I=v.BinaryWriter.create()){return c.tx.length!==0&&I.uint32(10).bytes(c.tx),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=M();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.tx=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=M();return(0,E.isSet)(c.tx)&&(I.tx=(0,E.bytesFromBase64)(c.tx)),I},toJSON(c){const I={};return c.tx!==void 0&&(I.tx=(0,E.base64FromBytes)(c.tx!==void 0?c.tx:new Uint8Array)),I},fromPartial(c){const I=M();return I.tx=c.tx??new Uint8Array,I}};function W(){return{height:BigInt(0)}}e.RequestEndBlock={typeUrl:"/tendermint.abci.RequestEndBlock",encode(c,I=v.BinaryWriter.create()){return c.height!==BigInt(0)&&I.uint32(8).int64(c.height),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=W();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.height=q.int64();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=W();return(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),I},toJSON(c){const I={};return c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),I},fromPartial(c){const I=W();return c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),I}};function H(){return{}}e.RequestCommit={typeUrl:"/tendermint.abci.RequestCommit",encode(c,I=v.BinaryWriter.create()){return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=H();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){default:q.skipType(z&7);break}}return F},fromJSON(c){return H()},toJSON(c){return{}},fromPartial(c){return H()}};function a(){return{}}e.RequestListSnapshots={typeUrl:"/tendermint.abci.RequestListSnapshots",encode(c,I=v.BinaryWriter.create()){return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=a();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){default:q.skipType(z&7);break}}return F},fromJSON(c){return a()},toJSON(c){return{}},fromPartial(c){return a()}};function g(){return{snapshot:void 0,appHash:new Uint8Array}}e.RequestOfferSnapshot={typeUrl:"/tendermint.abci.RequestOfferSnapshot",encode(c,I=v.BinaryWriter.create()){return c.snapshot!==void 0&&e.Snapshot.encode(c.snapshot,I.uint32(10).fork()).ldelim(),c.appHash.length!==0&&I.uint32(18).bytes(c.appHash),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=g();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.snapshot=e.Snapshot.decode(q,q.uint32());break;case 2:F.appHash=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=g();return(0,E.isSet)(c.snapshot)&&(I.snapshot=e.Snapshot.fromJSON(c.snapshot)),(0,E.isSet)(c.appHash
3)&&(I.appHash=(0,E.bytesFromBase64)(c.appHash)),I},toJSON(c){const I={};return c.snapshot!==void 0&&(I.snapshot=c.snapshot?e.Snapshot.toJSON(c.snapshot):void 0),c.appHash!==void 0&&(I.appHash=(0,E.base64FromBytes)(c.appHash!==void 0?c.appHash:new Uint8Array)),I},fromPartial(c){const I=g();return c.snapshot!==void 0&&c.snapshot!==null&&(I.snapshot=e.Snapshot.fromPartial(c.snapshot)),I.appHash=c.appHash??new Uint8Array,I}};function h(){return{height:BigInt(0),format:0,chunk:0}}e.RequestLoadSnapshotChunk={typeUrl:"/tendermint.abci.RequestLoadSnapshotChunk",encode(c,I=v.BinaryWriter.create()){return c.height!==BigInt(0)&&I.uint32(8).uint64(c.height),c.format!==0&&I.uint32(16).uint32(c.format),c.chunk!==0&&I.uint32(24).uint32(c.chunk),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=h();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.height=q.uint64();break;case 2:F.format=q.uint32();break;case 3:F.chunk=q.uint32();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=h();return(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),(0,E.isSet)(c.format)&&(I.format=Number(c.format)),(0,E.isSet)(c.chunk)&&(I.chunk=Number(c.chunk)),I},toJSON(c){const I={};return c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),c.format!==void 0&&(I.format=Math.round(c.format)),c.chunk!==void 0&&(I.chunk=Math.round(c.chunk)),I},fromPartial(c){const I=h();return c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),I.format=c.format??0,I.chunk=c.chunk??0,I}};function S(){return{index:0,chunk:new Uint8Array,sender:""}}e.RequestApplySnapshotChunk={typeUrl:"/tendermint.abci.RequestApplySnapshotChunk",encode(c,I=v.BinaryWriter.create()){return c.index!==0&&I.uint32(8).uint32(c.index),c.chunk.length!==0&&I.uint32(18).bytes(c.chunk),c.sender!==""&&I.uint32(26).string(c.sender),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=S();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.index=q.uint32();break;case 2:F.chunk=q.bytes();break;case 3:F.sender=q.string();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=S();return(0,E.isSet)(c.index)&&(I.index=Number(c.index)),(0,E.isSet)(c.chunk)&&(I.chunk=(0,E.bytesFromBase64)(c.chunk)),(0,E.isSet)(c.sender)&&(I.sender=String(c.sender)),I},toJSON(c){const I={};return c.index!==void 0&&(I.index=Math.round(c.index)),c.chunk!==void 0&&(I.chunk=(0,E.base64FromBytes)(c.chunk!==void 0?c.chunk:new Uint8Array)),c.sender!==void 0&&(I.sender=c.sender),I},fromPartial(c){const I=S();return I.index=c.index??0,I.chunk=c.chunk??new Uint8Array,I.sender=c.sender??"",I}};function A(){return{maxTxBytes:BigInt(0),txs:[],localLastCommit:e.ExtendedCommitInfo.fromPartial({}),misbehavior:[],height:BigInt(0),time:n.Timestamp.fromPartial({}),nextValidatorsHash:new Uint8Array,proposerAddress:new Uint8Array}}e.RequestPrepareProposal={typeUrl:"/tendermint.abci.RequestPrepareProposal",encode(c,I=v.BinaryWriter.create()){c.maxTxBytes!==BigInt(0)&&I.uint32(8).int64(c.maxTxBytes);for(const q of c.txs)I.uint32(18).bytes(q);c.localLastCommit!==void 0&&e.ExtendedCommitInfo.encode(c.localLastCommit,I.uint32(26).fork()).ldelim();for(const q of c.misbehavior)e.Misbehavior.encode(q,I.uint32(34).fork()).ldelim();return c.height!==BigInt(0)&&I.uint32(40).int64(c.height),c.time!==void 0&&n.Timestamp.encode(c.time,I.uint32(50).fork()).ldelim(),c.nextValidatorsHash.length!==0&&I.uint32(58).bytes(c.nextValidatorsHash),c.proposerAddress.length!==0&&I.uint32(66).bytes(c.proposerAddress),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=A();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.maxTxBytes=q.int64();break;case 2:F.txs.push(q.bytes());break;case 3:F.localLastCommit=e.ExtendedCommitInfo.decode(q,q.uint32());break;case 4:F.misbehavior.push(e.Misbehavior.decode(q,q.uint32()));break;case 5:F.height=q.int64();break;case 6:F.time=n.Timestamp.decode(q,q.uint32());break;case 7:F.nextValidatorsHash=q.bytes();break;case 8:F.proposerAddress=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=A();return(0,E.isSet)(c.maxTxBytes)&&(I.maxTxBytes=BigInt(c.maxTxBytes.toString())),Array.isArray(c==null?void 0:c.txs)&&(I.txs=c.txs.map(q=>(0,E.bytesFromBase64)(q))),(0,E.isSet)(c.localLastCommit)&&(I.localLastCommit=e.ExtendedCommitInfo.fromJSON(c.localLastCommit)),Array.isArray(c==null?void 0:c.misbehavior)&&(I.misbehavior=c.misbehavior.map(q=>e.Misbehavior.fromJSON(q))),(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),(0,E.isSet)(c.time)&&(I.time=(0,E.fromJsonTimestamp)(c.time)),(0,E.isSet)(c.nextValidatorsHash
3)&&(I.nextValidatorsHash=(0,E.bytesFromBase64)(c.nextValidatorsHash)),(0,E.isSet)(c.proposerAddress)&&(I.proposerAddress=(0,E.bytesFromBase64)(c.proposerAddress)),I},toJSON(c){const I={};return c.maxTxBytes!==void 0&&(I.maxTxBytes=(c.maxTxBytes||BigInt(0)).toString()),c.txs?I.txs=c.txs.map(q=>(0,E.base64FromBytes)(q!==void 0?q:new Uint8Array)):I.txs=[],c.localLastCommit!==void 0&&(I.localLastCommit=c.localLastCommit?e.ExtendedCommitInfo.toJSON(c.localLastCommit):void 0),c.misbehavior?I.misbehavior=c.misbehavior.map(q=>q?e.Misbehavior.toJSON(q):void 0):I.misbehavior=[],c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),c.time!==void 0&&(I.time=(0,E.fromTimestamp)(c.time).toISOString()),c.nextValidatorsHash!==void 0&&(I.nextValidatorsHash=(0,E.base64FromBytes)(c.nextValidatorsHash!==void 0?c.nextValidatorsHash:new Uint8Array)),c.proposerAddress!==void 0&&(I.proposerAddress=(0,E.base64FromBytes)(c.proposerAddress!==void 0?c.proposerAddress:new Uint8Array)),I},fromPartial(c){var q,K;const I=A();return c.maxTxBytes!==void 0&&c.maxTxBytes!==null&&(I.maxTxBytes=BigInt(c.maxTxBytes.toString())),I.txs=((q=c.txs)==null?void 0:q.map(F=>F))||[],c.localLastCommit!==void 0&&c.localLastCommit!==null&&(I.localLastCommit=e.ExtendedCommitInfo.fromPartial(c.localLastCommit)),I.misbehavior=((K=c.misbehavior)==null?void 0:K.map(F=>e.Misbehavior.fromPartial(F)))||[],c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),c.time!==void 0&&c.time!==null&&(I.time=n.Timestamp.fromPartial(c.time)),I.nextValidatorsHash=c.nextValidatorsHash??new Uint8Array,I.proposerAddress=c.proposerAddress??new Uint8Array,I}};function Q(){return{txs:[],proposedLastCommit:e.CommitInfo.fromPartial({}),misbehavior:[],hash:new Uint8Array,height:BigInt(0),time:n.Timestamp.fromPartial({}),nextValidatorsHash:new Uint8Array,proposerAddress:new Uint8Array}}e.RequestProcessProposal={typeUrl:"/tendermint.abci.RequestProcessProposal",encode(c,I=v.BinaryWriter.create()){for(const q of c.txs)I.uint32(10).bytes(q);c.proposedLastCommit!==void 0&&e.CommitInfo.encode(c.proposedLastCommit,I.uint32(18).fork()).ldelim();for(const q of c.misbehavior)e.Misbehavior.encode(q,I.uint32(26).fork()).ldelim();return c.hash.length!==0&&I.uint32(34).bytes(c.hash),c.height!==BigInt(0)&&I.uint32(40).int64(c.height),c.time!==void 0&&n.Timestamp.encode(c.time,I.uint32(50).fork()).ldelim(),c.nextValidatorsHash.length!==0&&I.uint32(58).bytes(c.nextValidatorsHash),c.proposerAddress.length!==0&&I.uint32(66).bytes(c.proposerAddress),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=Q();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.txs.push(q.bytes());break;case 2:F.proposedLastCommit=e.CommitInfo.decode(q,q.uint32());break;case 3:F.misbehavior.push(e.Misbehavior.decode(q,q.uint32()));break;case 4:F.hash=q.bytes();break;case 5:F.height=q.int64();break;case 6:F.time=n.Timestamp.decode(q,q.uint32());break;case 7:F.nextValidatorsHash=q.bytes();break;case 8:F.proposerAddress=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=Q();return Array.isArray(c==null?void 0:c.txs)&&(I.txs=c.txs.map(q=>(0,E.bytesFromBase64)(q))),(0,E.isSet)(c.proposedLastCommit)&&(I.proposedLastCommit=e.CommitInfo.fromJSON(c.proposedLastCommit)),Array.isArray(c==null?void 0:c.misbehavior)&&(I.misbehavior=c.misbehavior.map(q=>e.Misbehavior.fromJSON(q))),(0,E.isSet)(c.hash)&&(I.hash=(0,E.bytesFromBase64)(c.hash)),(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),(0,E.isSet)(c.time)&&(I.time=(0,E.fromJsonTimestamp)(c.time)),(0,E.isSet)(c.nextValidatorsHash)&&(I.nextValidatorsHash=(0,E.bytesFromBase64)(c.nextValidatorsHash)),(0,E.isSet)(c.proposerAddress)&&(I.proposerAddress=(0,E.bytesFromBase64)(c.proposerAddress)),I},toJSON(c){const I={};return c.txs?I.txs=c.txs.map(q=>(0,E.base64FromBytes)(q!==void 0?q:new Uint8Array)):I.txs=[],c.proposedLastCommit!==void 0&&(I.proposedLastCommit=c.proposedLastCommit?e.CommitInfo.toJSON(c.proposedLastCommit):void 0),c.misbehavior?I.misbehavior=c.misbehavior.map(q=>q?e.Misbehavior.toJSON(q):void 0):I.misbehavior=[],c.hash!==void 0&&(I.hash=(0,E.base64FromBytes)(c.hash!==void 0?c.hash:new Uint8Array)),c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),c.time!==void 0&&(I.time=(0,E.fromTimestamp)(c.time).toISOString()),c.nextValidatorsHash!==void 0&&(I.nextValidatorsHash=(0,E.base64FromBytes)(c.nextValidatorsHash!==void 0?c.nextValidatorsHash:new Uint8Array)),c.proposerAddress!==void 0&&(I.proposerAddress=(0,E.base64FromBytes)(c.proposerAddress!==void 0?c.proposerAddress:new Uint8Array)),I},fromPartial(c){var q,K;const I=Q();return I.txs=((q=c.txs)==null?void 0:q.map(F=>F))||[],c.proposedLastCommit!==void 0&&c.proposedLastCommit!==null&&(I.proposedLastCommit=e.CommitInfo.fromPartial(c.proposedLastCommit)),I.misbehavior=((K=c.misbehavior)==null?void 0:K.map(F=>e.Misbehavior.fromPartial(F)))||[],I.hash=c.hash??new Uint8Array,c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),c.time!==void 0&&c.time!==null&&(I.time=n.Timestamp.fromPartial(c.time)),I.nextValidatorsHash=c.nextValidatorsHash??new Uint8Array,I.proposerAddress=c.proposerAddress??new Uint8Array,I}};function L(){return{exception:void 0,echo:void 0,flush:void 0,info:void 0,initChain:void 0,query:void 0,beginBlock:void 0,checkTx:void 0,deliverTx:void 0,endBlock:void 0,commit:void 0,listSnapshots:void 0,offerSnapshot:void 0,loadSnapsh
3otChunk:void 0,applySnapshotChunk:void 0,prepareProposal:void 0,processProposal:void 0}}e.Response={typeUrl:"/tendermint.abci.Response",encode(c,I=v.BinaryWriter.create()){return c.exception!==void 0&&e.ResponseException.encode(c.exception,I.uint32(10).fork()).ldelim(),c.echo!==void 0&&e.ResponseEcho.encode(c.echo,I.uint32(18).fork()).ldelim(),c.flush!==void 0&&e.ResponseFlush.encode(c.flush,I.uint32(26).fork()).ldelim(),c.info!==void 0&&e.ResponseInfo.encode(c.info,I.uint32(34).fork()).ldelim(),c.initChain!==void 0&&e.ResponseInitChain.encode(c.initChain,I.uint32(50).fork()).ldelim(),c.query!==void 0&&e.ResponseQuery.encode(c.query,I.uint32(58).fork()).ldelim(),c.beginBlock!==void 0&&e.ResponseBeginBlock.encode(c.beginBlock,I.uint32(66).fork()).ldelim(),c.checkTx!==void 0&&e.ResponseCheckTx.encode(c.checkTx,I.uint32(74).fork()).ldelim(),c.deliverTx!==void 0&&e.ResponseDeliverTx.encode(c.deliverTx,I.uint32(82).fork()).ldelim(),c.endBlock!==void 0&&e.ResponseEndBlock.encode(c.endBlock,I.uint32(90).fork()).ldelim(),c.commit!==void 0&&e.ResponseCommit.encode(c.commit,I.uint32(98).fork()).ldelim(),c.listSnapshots!==void 0&&e.ResponseListSnapshots.encode(c.listSnapshots,I.uint32(106).fork()).ldelim(),c.offerSnapshot!==void 0&&e.ResponseOfferSnapshot.encode(c.offerSnapshot,I.uint32(114).fork()).ldelim(),c.loadSnapshotChunk!==void 0&&e.ResponseLoadSnapsh
3otChunk.encode(c.loadSnapshotChunk,I.uint32(122).fork()).ldelim(),c.applySnapshotChunk!==void 0&&e.ResponseApplySnapshotChunk.encode(c.applySnapshotChunk,I.uint32(130).fork()).ldelim(),c.prepareProposal!==void 0&&e.ResponsePrepareProposal.encode(c.prepareProposal,I.uint32(138).fork()).ldelim(),c.processProposal!==void 0&&e.ResponseProcessProposal.encode(c.processProposal,I.uint32(146).fork()).ldelim(),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=L();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.exception=e.ResponseException.decode(q,q.uint32());break;case 2:F.echo=e.ResponseEcho.decode(q,q.uint32());break;case 3:F.flush=e.ResponseFlush.decode(q,q.uint32());break;case 4:F.info=e.ResponseInfo.decode(q,q.uint32());break;case 6:F.initChain=e.ResponseInitChain.decode(q,q.uint32());break;case 7:F.query=e.ResponseQuery.decode(q,q.uint32());break;case 8:F.beginBlock=e.ResponseBeginBlock.decode(q,q.uint32());break;case 9:F.checkTx=e.ResponseCheckTx.decode(q,q.uint32());break;case 10:F.deliverTx=e.ResponseDeliverTx.decode(q,q.uint32());break;case 11:F.endBlock=e.ResponseEndBlock.decode(q,q.uint32());break;case 12:F.commit=e.ResponseCommit.decode(q,q.uint32());break;case 13:F.listSnapshots=e.ResponseListSnapshots.decode(q,q.uint32());break;case 14:F.offerSnapshot=e.ResponseOfferSnapshot.decode(q,q.uint32());break;
3case 15:F.loadSnapshotChunk=e.ResponseLoadSnapshotChunk.decode(q,q.uint32());break;case 16:F.applySnapshotChunk=e.ResponseApplySnapshotChunk.decode(q,q.uint32());break;case 17:F.prepareProposal=e.ResponsePrepareProposal.decode(q,q.uint32());break;case 18:F.processProposal=e.ResponseProcessProposal.decode(q,q.uint32());break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=L();return(0,E.isSet)(c.exception)&&(I.exception=e.ResponseException.fromJSON(c.exception)),(0,E.isSet)(c.echo)&&(I.echo=e.ResponseEcho.fromJSON(c.echo)),(0,E.isSet)(c.flush)&&(I.flush=e.ResponseFlush.fromJSON(c.flush)),(0,E.isSet)(c.info)&&(I.info=e.ResponseInfo.fromJSON(c.info)),(0,E.isSet)(c.initChain)&&(I.initChain=e.ResponseInitChain.fromJSON(c.initChain)),(0,E.isSet)(c.query)&&(I.query=e.ResponseQuery.fromJSON(c.query)),(0,E.isSet)(c.beginBlock)&&(I.beginBlock=e.ResponseBeginBlock.fromJSON(c.beginBlock)),(0,E.isSet)(c.checkTx)&&(I.checkTx=e.ResponseCheckTx.fromJSON(c.checkTx)),(0,E.isSet)(c.deliverTx)&&(I.deliverTx=e.ResponseDeliverTx.fromJSON(c.deliverTx)),(0,E.isSet)(c.endBlock)&&(I.endBlock=e.ResponseEndBlock.fromJSON(c.endBlock)),(0,E.isSet)(c.commit)&&(I.commit=e.ResponseCommit.fromJSON(c.commit)),(0,E.isSet)(c.listSnapshots)&&(I.listSnapshots=e.ResponseListSnapshots.fromJSON(c.listSnapshots)),(0,E.isSet)(c.offerSnapshot)&&(I.offerSnapshot=e.ResponseOfferSnapshot.fromJSON(c.offerSnapshot)),(0,E.isSet)(c.loadSnapshotChunk)&&(I.loadSnapshotChunk=e.ResponseLoadSnapsh
3otChunk.fromJSON(c.loadSnapshotChunk)),(0,E.isSet)(c.applySnapshotChunk)&&(I.applySnapshotChunk=e.ResponseApplySnapshotChunk.fromJSON(c.applySnapshotChunk)),(0,E.isSet)(c.prepareProposal)&&(I.prepareProposal=e.ResponsePrepareProposal.fromJSON(c.prepareProposal)),(0,E.isSet)(c.processProposal)&&(I.processProposal=e.ResponseProcessProposal.fromJSON(c.processProposal)),I},toJSON(c){const I={};return c.exception!==void 0&&(I.exception=c.exception?e.ResponseException.toJSON(c.exception):void 0),c.echo!==void 0&&(I.echo=c.echo?e.ResponseEcho.toJSON(c.echo):void 0),c.flush!==void 0&&(I.flush=c.flush?e.ResponseFlush.toJSON(c.flush):void 0),c.info!==void 0&&(I.info=c.info?e.ResponseInfo.toJSON(c.info):void 0),c.initChain!==void 0&&(I.initChain=c.initChain?e.ResponseInitChain.toJSON(c.initChain):void 0),c.query!==void 0&&(I.query=c.query?e.ResponseQuery.toJSON(c.query):void 0),c.beginBlock!==void 0&&(I.beginBlock=c.beginBlock?e.ResponseBeginBlock.toJSON(c.beginBlock):void 0),c.checkTx!==void 0&&(I.checkTx=c.checkTx?e.ResponseCheckTx.toJSON(c.checkTx):void 0),c.deliverTx!==void 0&&(I.deliverTx=c.deliverTx?e.ResponseDeliverTx.toJSON(c.deliverTx):void 0),c.endBlock!==void 0&&(I.endBlock=c.endBlock?e.ResponseEndBlock.toJSON(c.endBlock):void 0),c.commit!==void 0&&(I.commit=c.commit?e.ResponseCommit.toJSON(c.commit):void 0),c.listSnapshots!==void 0&&(I.listSnapshots=c.listSnapshots?e.ResponseListSnapshots.toJSON(c.listSnapshots):void 0),c.offerSnapshot!==void 0&&(I.offerSnapshot=c.offerSnapshot?e.ResponseOfferSnapshot.toJSON(c.offerSnapshot):void 0),c.loadSnapshotChunk!==void 0&&(I.loadSnapshotChunk=c.loadSnapshotChunk?e.ResponseLoadSnapsh
3otChunk.toJSON(c.loadSnapshotChunk):void 0),c.applySnapshotChunk!==void 0&&(I.applySnapshotChunk=c.applySnapshotChunk?e.ResponseApplySnapshotChunk.toJSON(c.applySnapshotChunk):void 0),c.prepareProposal!==void 0&&(I.prepareProposal=c.prepareProposal?e.ResponsePrepareProposal.toJSON(c.prepareProposal):void 0),c.processProposal!==void 0&&(I.processProposal=c.processProposal?e.ResponseProcessProposal.toJSON(c.processProposal):void 0),I},fromPartial(c){const I=L();return c.exception!==void 0&&c.exception!==null&&(I.exception=e.ResponseException.fromPartial(c.exception)),c.echo!==void 0&&c.echo!==null&&(I.echo=e.ResponseEcho.fromPartial(c.echo)),c.flush!==void 0&&c.flush!==null&&(I.flush=e.ResponseFlush.fromPartial(c.flush)),c.info!==void 0&&c.info!==null&&(I.info=e.ResponseInfo.fromPartial(c.info)),c.initChain!==void 0&&c.initChain!==null&&(I.initChain=e.ResponseInitChain.fromPartial(c.initChain)),c.query!==void 0&&c.query!==null&&(I.query=e.ResponseQuery.fromPartial(c.query)),c.beginBlock!==void 0&&c.beginBlock!==null&&(I.beginBlock=e.ResponseBeginBlock.fromPartial(c.beginBlock)),c.checkTx!==void 0&&c.checkTx!==null&&(I.checkTx=e.ResponseCheckTx.fromPartial(c.checkTx)),c.deliverTx!==void 0&&c.deliverTx!==null&&(I.deliverTx=e.ResponseDeliverTx.fromPartial(c.deliverTx)),c.endBlock!==void 0&&c.endBlock!==null&&(I.endBlock=e.ResponseEndBlock.fromPartial(c.endBlock)),c.commit!==void 0&&c.commit!==null&&(I.commit=e.ResponseCommit.fromPartial(c.commit)),c.listSnapshots!==void 0&&c.listSnapshots!==null&&(I.listSnapshots=e.ResponseListSnapshots.fromPartial(c.listSnapshots)),c.offerSnapshot!==void 0&&c.offerSnapshot!==null&&(I.offerSnapshot=e.ResponseOfferSnapshot.fromPartial(c.offerSnapshot)),c.loadSnapshotChunk!==void 0&&c.loadSnapshotChunk!==null&&(I.loadSnapshotChunk=e.ResponseLoadSnapsh
3otChunk.fromPartial(c.loadSnapshotChunk)),c.applySnapshotChunk!==void 0&&c.applySnapshotChunk!==null&&(I.applySnapshotChunk=e.ResponseApplySnapshotChunk.fromPartial(c.applySnapshotChunk)),c.prepareProposal!==void 0&&c.prepareProposal!==null&&(I.prepareProposal=e.ResponsePrepareProposal.fromPartial(c.prepareProposal)),c.processProposal!==void 0&&c.processProposal!==null&&(I.processProposal=e.ResponseProcessProposal.fromPartial(c.processProposal)),I}};function G(){return{error:""}}e.ResponseException={typeUrl:"/tendermint.abci.ResponseException",encode(c,I=v.BinaryWriter.create()){return c.error!==""&&I.uint32(10).string(c.error),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=G();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.error=q.string();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=G();return(0,E.isSet)(c.error)&&(I.error=String(c.error)),I},toJSON(c){const I={};return c.error!==void 0&&(I.error=c.error),I},fromPartial(c){const I=G();return I.error=c.error??"",I}};function j(){return{message:""}}e.ResponseEcho={typeUrl:"/tendermint.abci.ResponseEcho",encode(c,I=v.BinaryWriter.create()){return c.message!==""&&I.uint32(10).string(c.message),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=j();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.message=q.string();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=j();return(0,E.isSet)(c.message)&&(I.message=String(c.message)),I},toJSON(c){const I={};return c.message!==void 0&&(I.message=c.message),I},fromPartial(c){const I=j();return I.message=c.message??"",I}};function $t(){return{}}e.ResponseFlush={typeUrl:"/tendermint.abci.ResponseFlush",encode(c,I=v.BinaryWriter.create()){return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=$t();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){default:q.skipType(z&7);break}}return F},fromJSON(c){return $t()},toJSON(c){return{}},fromPartial(c){return $t()}};function Kt(){return{data:"",version:"",appVersion:BigInt(0),lastBlockHeight:BigInt(0),lastBlockAppHash:new Uint8Array}}e.ResponseInfo={typeUrl:"/tendermint.abci.ResponseInfo",encode(c,I=v.BinaryWriter.create()){return c.data!==""&&I.uint32(10).string(c.data),c.version!==""&&I.uint32(18).string(c.version),c.appVersion!==BigInt(0)&&I.uint32(24).uint64(c.appVersion),c.lastBlockHeight!==BigInt(0)&&I.uint32(32).int64(c.lastBlockHeight),c.lastBlockAppHash.length!==0&&I.uint32(42).bytes(c.lastBlockAppHash),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=Kt();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.data=q.string();break;case 2:F.version=q.string();break;case 3:F.appVersion=q.uint64();break;case 4:F.lastBlockHeight=q.int64();break;case 5:F.lastBlockAppHash=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=Kt();return(0,E.isSet)(c.data)&&(I.data=String(c.data)),(0,E.isSet)(c.version)&&(I.version=String(c.version)),(0,E.isSet)(c.appVersion)&&(I.appVersion=BigInt(c.appVersion.toString())),(0,E.isSet)(c.lastBlockHeight)&&(I.lastBlockHeight=BigInt(c.lastBlockHeight.toString())),(0,E.isSet)(c.lastBlockAppHash)&&(I.lastBlockAppHash=(0,E.bytesFromBase64)(c.lastBlockAppHash)),I},toJSON(c){const I={};return c.data!==void 0&&(I.data=c.data),c.version!==void 0&&(I.version=c.version),c.appVersion!==void 0&&(I.appVersion=(c.appVersion||BigInt(0)).toString()),c.lastBlockHeight!==void 0&&(I.lastBlockHeight=(c.lastBlockHeight||BigInt(0)).toString()),c.lastBlockAppHash!==void 0&&(I.lastBlockAppHash=(0,E.base64FromBytes)(c.lastBlockAppHash!==void 0?c.lastBlockAppHash:new Uint8Array)),I},fromPartial(c){const I=Kt();return I.data=c.data??"",I.version=c.version??"",c.appVersion!==void 0&&c.appVersion!==null&&(I.appVersion=BigInt(c.appVersion.toString())),c.lastBlockHeight!==void 0&&c.lastBlockHeight!==null&&(I.lastBlockHeight=BigInt(c.lastBlockHeight.toString())),I.lastBlockAppHash=c.lastBlockAppHash??new Uint8Array,I}};function zt(){return{consensusParams:void 0,validators:[],appHash:new Uint8Array}}e.ResponseInitChain={typeUrl:"/tendermint.abci.ResponseInitChain",encode(c,I=v.BinaryWriter.create()){c.consensusParams!==void 0&&t.ConsensusParams.encode(c.consensusParams,I.uint32(10).fork()).ldelim();for(const q of c.validators)e.ValidatorUpdate.encode(q,I.uint32(18).fork()).ldelim();
3return c.appHash.length!==0&&I.uint32(26).bytes(c.appHash),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=zt();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.consensusParams=t.ConsensusParams.decode(q,q.uint32());break;case 2:F.validators.push(e.ValidatorUpdate.decode(q,q.uint32()));break;case 3:F.appHash=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=zt();return(0,E.isSet)(c.consensusParams)&&(I.consensusParams=t.ConsensusParams.fromJSON(c.consensusParams)),Array.isArray(c==null?void 0:c.validators)&&(I.validators=c.validators.map(q=>e.ValidatorUpdate.fromJSON(q))),(0,E.isSet)(c.appHash)&&(I.appHash=(0,E.bytesFromBase64)(c.appHash)),I},toJSON(c){const I={};return c.consensusParams!==void 0&&(I.consensusParams=c.consensusParams?t.ConsensusParams.toJSON(c.consensusParams):void 0),c.validators?I.validators=c.validators.map(q=>q?e.ValidatorUpdate.toJSON(q):void 0):I.validators=[],c.appHash!==void 0&&(I.appHash=(0,E.base64FromBytes)(c.appHash!==void 0?c.appHash:new Uint8Array)),I},fromPartial(c){var q;const I=zt();return c.consensusParams!==void 0&&c.consensusParams!==null&&(I.consensusParams=t.ConsensusParams.fromPartial(c.consensusParams)),I.validators=((q=c.validators)==null?void 0:q.map(K=>e.ValidatorUpdate.fromPartial(K)))||[],I.appHash=c.appHash??new Uint8Array,I}};function Zt(){return{code:0,log:"",info:"",index:BigInt(0),key:new Uint8Array,value:new Uint8Array,proofOps:void 0,height:BigInt(0),codespace:""}}e.ResponseQuery={typeUrl:"/tendermint.abci.ResponseQuery",encode(c,I=v.BinaryWriter.create()){return c.code!==0&&I.uint32(8).uint32(c.code),c.log!==""&&I.uint32(26).string(c.log),c.info!==""&&I.uint32(34).string(c.info),c.index!==BigInt(0)&&I.uint32(40).int64(c.index),c.key.length!==0&&I.uint32(50).bytes(c.key),c.value.length!==0&&I.uint32(58).bytes(c.value),c.proofOps!==void 0&&u.ProofOps.encode(c.proofOps,I.uint32(66).fork()).ldelim(),c.height!==BigInt(0)&&I.uint32(72).int64(c.height),c.codespace!==""&&I.uint32(82).string(c.codespace),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=Zt();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.code=q.uint32();break;case 3:F.log=q.string();break;case 4:F.info=q.string();break;case 5:F.index=q.int64();break;case 6:F.key=q.bytes();break;case 7:F.value=q.bytes();break;case 8:F.proofOps=u.ProofOps.decode(q,q.uint32());break;case 9:F.height=q.int64();break;case 10:F.codespace=q.string();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=Zt();return(0,E.isSet)(c.code)&&(I.code=Number(c.code)),(0,E.isSet)(c.log)&&(I.log=String(c.log)),(0,E.isSet)(c.info)&&(I.info=String(c.info)),(0,E.isSet)(c.index)&&(I.index=BigInt(c.index.toString())),(0,E.isSet)(c.key)&&(I.key=(0,E.bytesFromBase64)(c.key)),(0,E.isSet)(c.value)&&(I.value=(0,E.bytesFromBase64)(c.value)),(0,E.isSet)(c.proofOps)&&(I.proofOps=u.ProofOps.fromJSON(c.proofOps)),(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),(0,E.isSet)(c.codespace)&&(I.codespace=String(c.codespace)),I},toJSON(c){const I={};return c.code!==void 0&&(I.code=Math.round(c.code)),c.log!==void 0&&(I.log=c.log),c.info!==void 0&&(I.info=c.info),c.index!==void 0&&(I.index=(c.index||BigInt(0)).toString()),c.key!==void 0&&(I.key=(0,E.base64FromBytes)(c.key!==void 0?c.key:new Uint8Array)),c.value!==void 0&&(I.value=(0,E.base64FromBytes)(c.value!==void 0?c.value:new Uint8Array)),c.proofOps!==void 0&&(I.proofOps=c.proofOps?u.ProofOps.toJSON(c.proofOps):void 0),c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),c.codespace!==void 0&&(I.codespace=c.codespace),I},fromPartial(c){const I=Zt();return I.code=c.code??0,I.log=c.log??"",I.info=c.info??"",c.index!==void 0&&c.index!==null&&(I.index=BigInt(c.index.toString())),I.key=c.key??new Uint8Array,I.value=c.value??new Uint8Array,c.proofOps!==void 0&&c.proofOps!==null&&(I.proofOps=u.ProofOps.fromPartial(c.proofOps)),c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),I.codespace=c.co
3despace??"",I}};function Yt(){return{events:[]}}e.ResponseBeginBlock={typeUrl:"/tendermint.abci.ResponseBeginBlock",encode(c,I=v.BinaryWriter.create()){for(const q of c.events)e.Event.encode(q,I.uint32(10).fork()).ldelim();return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=Yt();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.events.push(e.Event.decode(q,q.uint32()));break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=Yt();return Array.isArray(c==null?void 0:c.events)&&(I.events=c.events.map(q=>e.Event.fromJSON(q))),I},toJSON(c){const I={};return c.events?I.events=c.events.map(q=>q?e.Event.toJSON(q):void 0):I.events=[],I},fromPartial(c){var q;const I=Yt();return I.events=((q=c.events)==null?void 0:q.map(K=>e.Event.fromPartial(K)))||[],I}};function Xt(){return{code:0,data:new Uint8Array,log:"",info:"",gasWanted:BigInt(0),gasUsed:BigInt(0),events:[],codespace:"",sender:"",priority:BigInt(0),mempoolError:""}}e.ResponseCheckTx={typeUrl:"/tendermint.abci.ResponseCheckTx",encode(c,I=v.BinaryWriter.create()){c.code!==0&&I.uint32(8).uint32(c.code),c.data.length!==0&&I.uint32(18).bytes(c.data),c.log!==""&&I.uint32(26).string(c.log),c.info!==""&&I.uint32(34).string(c.info),c.gasWanted!==BigInt(0)&&I.uint32(40).int64(c.gasWanted),c.gasUsed!==BigInt(0)&&I.uint32(48).int64(c.gasUsed);for(const q of c.events)e.Event.encode(q,I.uint32(58).fork()).ldelim();return c.codespace!==""&&I.uint32(66).string(c.codespace),c.sender!==""&&I.uint32(74).string(c.sender),c.priority!==BigInt(0)&&I.uint32(80).int64(c.priority),c.mempoolError!==""&&I.uint32(90).string(c.mempoolError),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=Xt();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.code=q.uint32();break;case 2:F.data=q.bytes();break;case 3:F.log=q.string();break;case 4:F.info=q.string();break;case 5:F.gasWanted=q.int64();break;case 6:F.gasUsed=q.int64();break;case 7:F.events.push(e.Event.decode(q,q.uint32()));break;case 8:F.codespace=q.string();break;case 9:F.sender=q.string();break;case 10:F.priority=q.int64();break;case 11:F.mempoolError=q.string();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=Xt();return(0,E.isSet)(c.code)&&(I.code=Number(c.code)),(0,E.isSet)(c.data)&&(I.data=(0,E.bytesFromBase64)(c.data)),(0,E.isSet)(c.log)&&(I.log=String(c.log)),(0,E.isSet)(c.info)&&(I.info=String(c.info)),(0,E.isSet)(c.gas_wanted)&&(I.gasWanted=BigInt(c.gas_wanted.toString())),(0,E.isSet)(c.gas_used)&&(I.gasUsed=BigInt(c.gas_used.toString())),Array.isArray(c==null?void 0:c.events)&&(I.events=c.events.map(q=>e.Event.fromJSON(q))),(0,E.isSet)(c.codespace)&&(I.codespace=String(c.codespace)),(0,E.isSet)(c.sender)&&(I.sender=String(c.sender)),(0,E.isSet)(c.priority)&&(I.priority=BigInt(c.priority.toString())),(0,E.isSet)(c.mempoolError)&&(I.mempoolError=String(c.mempoolError)),I},toJSON(c){const I={};return c.code!==void 0&&(I.code=Math.round(c.code)),c.data!==void 0&&(I.data=(0,E.base64FromBytes)(c.data!==void 0?c.data:new Uint8Array)),c.log!==void 0&&(I.log=c.log),c.info!==void 0&&(I.info=c.info),c.gasWanted!==void 0&&(I.gas_wanted=(c.gasWanted||BigInt(0)).toString()),c.gasUsed!==void 0&&(I.gas_used=(c.gasUsed||BigInt(0)).toString()),c.events?I.events=c.events.map(q=>q?e.Event.toJSON(q):void 0):I.events=[],c.codespace!==void 0&&(I.codespace=c.codespace),c.sender!==void 0&&(I.sender=c.sender),c.priority!==void 0&&(I.priority=(c.priority||BigInt(0)).toString()),c.mempoolError!==void 0&&(I.mempoolError=c.mempoolError),I},fromPartial(c){var q;const I=Xt();return I.code=c.code??0,I.data=c.data??new Uint8Array,I.log=c.log??"",I.info=c.info??"",c.gasWanted!==void 0&&c.gasWanted!==null&&(I.gasWanted=BigInt(c.gasWanted.toString())),c.gasUsed!==void 0&&c.gasUsed!==null&&(I.gasUsed=BigInt(c.gasUsed.toString())),I.events=((q=c.events)==null?void 0:q.map(K=>e.Event.fromPartial(K)))||[],I.codespace=c.codespace??"",I.sender=c.sender??"",c.priority!==void 0&&c.priority!==null&&(I.priority=BigInt(c.priority.toString())),I.mempoolError=c.mempoolError??"",I}};
3function xt(){return{code:0,data:new Uint8Array,log:"",info:"",gasWanted:BigInt(0),gasUsed:BigInt(0),events:[],codespace:""}}e.ResponseDeliverTx={typeUrl:"/tendermint.abci.ResponseDeliverTx",encode(c,I=v.BinaryWriter.create()){c.code!==0&&I.uint32(8).uint32(c.code),c.data.length!==0&&I.uint32(18).bytes(c.data),c.log!==""&&I.uint32(26).string(c.log),c.info!==""&&I.uint32(34).string(c.info),c.gasWanted!==BigInt(0)&&I.uint32(40).int64(c.gasWanted),c.gasUsed!==BigInt(0)&&I.uint32(48).int64(c.gasUsed);for(const q of c.events)e.Event.encode(q,I.uint32(58).fork()).ldelim();return c.codespace!==""&&I.uint32(66).string(c.codespace),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=xt();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.code=q.uint32();break;case 2:F.data=q.bytes();break;case 3:F.log=q.string();break;case 4:F.info=q.string();break;case 5:F.gasWanted=q.int64();break;case 6:F.gasUsed=q.int64();break;case 7:F.events.push(e.Event.decode(q,q.uint32()));break;case 8:F.codespace=q.string();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=xt();return(0,E.isSet)(c.code)&&(I.code=Number(c.code)),(0,E.isSet)(c.data)&&(I.data=(0,E.bytesFromBase64)(c.data)),(0,E.isSet)(c.log)&&(I.log=String(c.log)),(0,E.isSet)(c.info)&&(I.info=String(c.info)),(0,E.isSet)(c.gas_wanted)&&(I.gasWanted=BigInt(c.gas_wanted.toString())),(0,E.isSet)(c.gas_used)&&(I.gasUsed=BigInt(c.gas_used.toString())),Array.isArray(c==null?void 0:c.events)&&(I.events=c.events.map(q=>e.Event.fromJSON(q))),(0,E.isSet)(c.codespace)&&(I.codespace=String(c.codespace)),I},toJSON(c){const I={};return c.code!==void 0&&(I.code=Math.round(c.code)),c.data!==void 0&&(I.data=(0,E.base64FromBytes)(c.data!==void 0?c.data:new Uint8Array)),c.log!==void 0&&(I.log=c.log),c.info!==void 0&&(I.info=c.info),c.gasWanted!==void 0&&(I.gas_wanted=(c.gasWanted||BigInt(0)).toString()),c.gasUsed!==void 0&&(I.gas_used=(c.gasUsed||BigInt(0)).toString()),c.events?I.events=c.events.map(q=>q?e.Event.toJSON(q):void 0):I.events=[],c.codespace!==void 0&&(I.codespace=c.codespace),I},fromPartial(c){var q;const I=xt();return I.code=c.code??0,I.data=c.data??new Uint8Array,I.log=c.log??"",I.info=c.info??"",c.gasWanted!==void 0&&c.gasWanted!==null&&(I.gasWanted=BigInt(c.gasWanted.toString())),c.gasUsed!==void 0&&c.gasUsed!==null&&(I.gasUsed=BigInt(c.gasUsed.toString())),I.events=((q=c.events)==null?void 0:q.map(K=>e.Event.fromPartial(K)))||[],I.codespace=c.codespace??"",I}};function jt(){return{validatorUpdates:[],consensusParamUpdates:void 0,events:[]}}e.ResponseEndBlock={typeUrl:"/tendermint.abci.ResponseEndBlock",encode(c,I=v.BinaryWriter.create()){for(const q of c.validatorUpdates)e.ValidatorUpdate.encode(q,I.uint32(10).fork()).ldelim();c.consensusParamUpdates!==void 0&&t.ConsensusParams.encode(c.consensusParamUpdates,I.uint32(18).fork()).ldelim();for(const q of c.events)e.Event.encode(q,I.uint32(26).fork()).ldelim();return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=jt();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.validatorUpdates.push(e.ValidatorUpdate.decode(q,q.uint32()));break;case 2:F.consensusParamUpdates=t.ConsensusParams.decode(q,q.uint32());break;case 3:F.events.push(e.Event.decode(q,q.uint32()));break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=jt();return Array.isArray(c==null?void 0:c.validatorUpdates)&&(I.validatorUpdates=c.validatorUpdates.map(q=>e.ValidatorUpdate.fromJSON(q))),(0,E.isSet)(c.consensusParamUpdates)&&(I.consensusParamUpdates=t.ConsensusParams.fromJSON(c.consensusParamUpdates)),Array.isArray(c==null?void 0:c.events)&&(I.events=c.events.map(q=>e.Event.fromJSON(q))),I},toJSON(c){const I={};return c.validatorUpdates?I.validatorUpdates=c.validatorUpdates.map(q=>q?e.ValidatorUpdate.toJSON(q):void 0):I.validatorUpdates=[],c.consensusParamUpdates!==void 0&&(I.consensusParamUpdates=c.consensusParamUpdates?t.ConsensusParams.toJSON(c.consensusParamUpdates):void 0),c.events?I.events=c.events.map(q=>q?e.Event.toJSON(q):void 0):I.events=[],I},fromPartial(c){var q,K;const I=jt();return I.validatorUpdates=((q=c.validatorUpdates)==null?void 0:q.map(F=>e.ValidatorUpdate.fromPartial(F)))||[],c.consensusParamUpdates!==void 0&&c.consensusParamUpdates!==null&&(I.consensusParamUpdates=t.ConsensusParams.fromPartial(c.consensusParamUpdates)),I.events=((K=c.events)==null?void 0:K.map(F=>e.Event.fromPartial(F)))||[],I}};function me(){return{data:new Uint8Array,retainHeight:BigInt(0)}}e.ResponseCommit={typeUrl:"/tendermint.abci.ResponseCommit",encode(c,I=v.BinaryWriter.create()){return c.data.length!==0&&I.uint32(18).bytes(c.data),c.retainHeight!==BigInt(0)&&I.uint32(24).int64(c.retainHeight),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=me();for(;q.pos<K;){const z=q.uint32();switch(z>>
3>3){case 2:F.data=q.bytes();break;case 3:F.retainHeight=q.int64();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=me();return(0,E.isSet)(c.data)&&(I.data=(0,E.bytesFromBase64)(c.data)),(0,E.isSet)(c.retainHeight)&&(I.retainHeight=BigInt(c.retainHeight.toString())),I},toJSON(c){const I={};return c.data!==void 0&&(I.data=(0,E.base64FromBytes)(c.data!==void 0?c.data:new Uint8Array)),c.retainHeight!==void 0&&(I.retainHeight=(c.retainHeight||BigInt(0)).toString()),I},fromPartial(c){const I=me();return I.data=c.data??new Uint8Array,c.retainHeight!==void 0&&c.retainHeight!==null&&(I.retainHeight=BigInt(c.retainHeight.toString())),I}};function wn(){return{snapshots:[]}}e.ResponseListSnapshots={typeUrl:"/tendermint.abci.ResponseListSnapshots",encode(c,I=v.BinaryWriter.create()){for(const q of c.snapshots)e.Snapshot.encode(q,I.uint32(10).fork()).ldelim();return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=wn();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.snapshots.push(e.Snapshot.decode(q,q.uint32()));break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=wn();return Array.isArray(c==null?void 0:c.snapshots)&&(I.snapshots=c.snapshots.map(q=>e.Snapshot.fromJSON(q))),I},toJSON(c){const I={};return c.snapshots?I.snapshots=c.snapshots.map(q=>q?e.Snapshot.toJSON(q):void 0):I.snapshots=[],I},fromPartial(c){var q;const I=wn();return I.snapshots=((q=c.snapshots)==null?void 0:q.map(K=>e.Snapshot.fromPartial(K)))||[],I}};function er(){return{result:0}}e.ResponseOfferSnapshot={typeUrl:"/tendermint.abci.ResponseOfferSnapshot",encode(c,I=v.BinaryWriter.create()){return c.result!==0&&I.uint32(8).int32(c.result),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=er();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.result=q.int32();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=er();return(0,E.isSet)(c.result)&&(I.result=f(c.result)),I},toJSON(c){const I={};return c.result!==void 0&&(I.result=p(c.result)),I},fromPartial(c){const I=er();return I.result=c.result??0,I}};function nr(){return{chunk:new Uint8Array}}
3e.ResponseLoadSnapshotChunk={typeUrl:"/tendermint.abci.ResponseLoadSnapshotChunk",encode(c,I=v.BinaryWriter.create()){return c.chunk.length!==0&&I.uint32(10).bytes(c.chunk),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=nr();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.chunk=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=nr();return(0,E.isSet)(c.chunk)&&(I.chunk=(0,E.bytesFromBase64)(c.chunk)),I},toJSON(c){const I={};return c.chunk!==void 0&&(I.chunk=(0,E.base64FromBytes)(c.chunk!==void 0?c.chunk:new Uint8Array)),I},fromPartial(c){const I=nr();return I.chunk=c.chunk??new Uint8Array,I}};function tr(){return{result:0,refetchChunks:[],rejectSenders:[]}}e.ResponseApplySnapshotChunk={typeUrl:"/tendermint.abci.ResponseApplySnapshotChunk",encode(c,I=v.BinaryWriter.create()){c.result!==0&&I.uint32(8).int32(c.result),I.uint32(18).fork();for(const q of c.refetchChunks)I.uint32(q);I.ldelim();for(const q of c.rejectSenders)I.uint32(26).string(q);return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=tr();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.result=q.int32();break;case 2:if((z&7)===2){const gp=q.uint32()+q.pos;for(;q.pos<gp;)F.refetchChunks.push(q.uint32())}else F.refetchChunks.push(q.uint32());break;case 3:F.rejectSenders.push(q.string());break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=tr();return(0,E.isSet)(c.result)&&(I.result=o(c.result)),Array.isArray(c==null?void 0:c.refetchChunks)&&(I.refetchChunks=c.refetchChunks.map(q=>Number(q))),Array.isArray(c==null?void 0:c.rejectSenders)&&(I.rejectSenders=c.rejectSenders.map(q=>String(q))),I},toJSON(c){const I={};return c.result!==void 0&&(I.result=s(c.result)),c.refetchChunks?I.refetchChunks=c.refetchChunks.map(q=>Math.round(q)):I.refetchChunks=[],c.rejectSenders?I.rejectSenders=c.rejectSenders.map(q=>q):I.rejectSenders=[],I},fromPartial(c){var q,K;const I=tr();return I.result=c.result??0,I.refetchChunks=((q=c.refetchChunks)==null?void 0:q.map(F=>F))||[],I.rejectSenders=((K=c.rejectSenders)==null?void 0:K.map(F=>F))||[],I}};function xa(){return{txs:[]}}e.ResponsePrepareProposal={typeUrl:"/tendermint.abci.ResponsePrepareProposal",encode(c,I=v.BinaryWriter.create()){for(const q of c.txs)I.uint32(10).bytes(q);return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=xa();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.txs.push(q.bytes());break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=xa();return Array.isArray(c==null?void 0:c.txs)&&(I.txs=c.txs.map(q=>(0,E.bytesFromBase64)(q))),I},toJSON(c){const I={};return c.txs?I.txs=c.txs.map(q=>(0,E.base64FromBytes)(q!==void 0?q:new Uint8Array)):I.txs=[],I},fromPartial(c){var q;const I=xa();return I.txs=((q=c.txs)==null?void 0:q.map(K=>K))||[],I}};function ja(){return{status:0}}e.ResponseProcessProposal={typeUrl:"/tendermint.abci.ResponseProcessProposal",encode(c,I=v.BinaryWriter.create()){return c.status!==0&&I.uint32(8).int32(c.status),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=ja();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.status=q.int32();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=ja();return(0,E.isSet)(c.status)&&(I.status=w(c.status)),I},toJSON(c){const I={};return c.status!==void 0&&(I.status=J(c.status)),I},fromPartial(c){const I=ja();return I.status=c.status??0,I}};function es(){return{round:0,votes:[]}}e.CommitInfo={typeUrl:"/tendermint.abci.CommitInfo",encode(c,I=v.BinaryWriter.create()){c.round!==0&&I.uint32(8).int32(c.round);for(const q of c.votes)e.VoteInfo.encode(q,I.uint32(18).fork()).ldelim();return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=es();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.round=q.int32();break;case 2:F.votes.push(e.VoteInfo.decode(q,q.uint32()));break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=es();
3return(0,E.isSet)(c.round)&&(I.round=Number(c.round)),Array.isArray(c==null?void 0:c.votes)&&(I.votes=c.votes.map(q=>e.VoteInfo.fromJSON(q))),I},toJSON(c){const I={};return c.round!==void 0&&(I.round=Math.round(c.round)),c.votes?I.votes=c.votes.map(q=>q?e.VoteInfo.toJSON(q):void 0):I.votes=[],I},fromPartial(c){var q;const I=es();return I.round=c.round??0,I.votes=((q=c.votes)==null?void 0:q.map(K=>e.VoteInfo.fromPartial(K)))||[],I}};function ns(){return{round:0,votes:[]}}e.ExtendedCommitInfo={typeUrl:"/tendermint.abci.ExtendedCommitInfo",encode(c,I=v.BinaryWriter.create()){c.round!==0&&I.uint32(8).int32(c.round);for(const q of c.votes)e.ExtendedVoteInfo.encode(q,I.uint32(18).fork()).ldelim();return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=ns();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.round=q.int32();break;case 2:F.votes.push(e.ExtendedVoteInfo.decode(q,q.uint32()));break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=ns();return(0,E.isSet)(c.round)&&(I.round=Number(c.round)),Array.isArray(c==null?void 0:c.votes)&&(I.votes=c.votes.map(q=>e.ExtendedVoteInfo.fromJSON(q))),I},toJSON(c){const I={};return c.round!==void 0&&(I.round=Math.round(c.round)),c.votes?I.votes=c.votes.map(q=>q?e.ExtendedVoteInfo.toJSON(q):void 0):I.votes=[],I},fromPartial(c){var q;const I=ns();return I.round=c.round??0,I.votes=((q=c.votes)==null?void 0:q.map(K=>e.ExtendedVoteInfo.fromPartial(K)))||[],I}};function ts(){return{type:"",attributes:[]}}e.Event={typeUrl:"/tendermint.abci.Event",encode(c,I=v.BinaryWriter.create()){c.type!==""&&I.uint32(10).string(c.type);for(const q of c.attributes)e.EventAttribute.encode(q,I.uint32(18).fork()).ldelim();return I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=ts();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.type=q.string();break;case 2:F.attributes.push(e.EventAttribute.decode(q,q.uint32()));break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=ts();return(0,E.isSet)(c.type)&&(I.type=String(c.type)),Array.isArray(c==null?void 0:c.attributes)&&(I.attributes=c.attributes.map(q=>e.EventAttribute.fromJSON(q))),I},toJSON(c){const I={};return c.type!==void 0&&(I.type=c.type),c.attributes?I.attributes=c.attributes.map(q=>q?e.EventAttribute.toJSON(q):void 0):I.attributes=[],I},fromPartial(c){var q;const I=ts();return I.type=c.type??"",I.attributes=((q=c.attributes)==null?void 0:q.map(K=>e.EventAttribute.fromPartial(K)))||[],I}};function rs(){return{key:"",value:"",index:!1}}e.EventAttribute={typeUrl:"/tendermint.abci.EventAttribute",encode(c,I=v.BinaryWriter.create()){return c.key!==""&&I.uint32(10).string(c.key),c.value!==""&&I.uint32(18).string(c.value),c.index===!0&&I.uint32(24).bool(c.index),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=rs();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.key=q.string();break;case 2:F.value=q.string();break;case 3:F.index=q.bool();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=rs();return(0,E.isSet)(c.key)&&(I.key=String(c.key)),(0,E.isSet)(c.value)&&(I.value=String(c.value)),(0,E.isSet)(c.index)&&(I.index=!!c.index),I},toJSON(c){const I={};return c.key!==void 0&&(I.key=c.key),c.value!==void 0&&(I.value=c.value),c.index!==void 0&&(I.index=c.index),I},fromPartial(c){const I=rs();return I.key=c.key??"",I.value=c.value??"",I.index=c.index??!1,I}};function is(){return{height:BigInt(0),index:0,tx:new Uint8Array,result:e.ResponseDeliverTx.fromPartial({})}}e.TxResult={typeUrl:"/tendermint.abci.TxResult",encode(c,I=v.BinaryWriter.create()){return c.height!==BigInt(0)&&I.uint32(8).int64(c.height),c.index!==0&&I.uint32(16).uint32(c.index),c.tx.length!==0&&I.uint32(26).bytes(c.tx),c.result!==void 0&&e.ResponseDeliverTx.encode(c.result,I.uint32(34).fork()).ldelim(),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=is();for(;q.pos<K;){const z=q.uint32();switch(z>>
3>3){case 1:F.height=q.int64();break;case 2:F.index=q.uint32();break;case 3:F.tx=q.bytes();break;case 4:F.result=e.ResponseDeliverTx.decode(q,q.uint32());break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=is();return(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),(0,E.isSet)(c.index)&&(I.index=Number(c.index)),(0,E.isSet)(c.tx)&&(I.tx=(0,E.bytesFromBase64)(c.tx)),(0,E.isSet)(c.result)&&(I.result=e.ResponseDeliverTx.fromJSON(c.result)),I},toJSON(c){const I={};return c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),c.index!==void 0&&(I.index=Math.round(c.index)),c.tx!==void 0&&(I.tx=(0,E.base64FromBytes)(c.tx!==void 0?c.tx:new Uint8Array)),c.result!==void 0&&(I.result=c.result?e.ResponseDeliverTx.toJSON(c.result):void 0),I},fromPartial(c){const I=is();return c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),I.index=c.index??0,I.tx=c.tx??new Uint8Array,c.result!==void 0&&c.result!==null&&(I.result=e.ResponseDeliverTx.fromPartial(c.result)),I}};function os(){return{address:new Uint8Array,power:BigInt(0)}}e.Validator={typeUrl:"/tendermint.abci.Validator",encode(c,I=v.BinaryWriter.create()){return c.address.length!==0&&I.uint32(10).bytes(c.address),c.power!==BigInt(0)&&I.uint32(24).int64(c.power),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=os();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.address=q.bytes();break;case 3:F.power=q.int64();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=os();return(0,E.isSet)(c.address)&&(I.address=(0,E.bytesFromBase64)(c.address)),(0,E.isSet)(c.power)&&(I.power=BigInt(c.power.toString())),I},toJSON(c){const I={};return c.address!==void 0&&(I.address=(0,E.base64FromBytes)(c.address!==void 0?c.address:new Uint8Array)),c.power!==void 0&&(I.power=(c.power||BigInt(0)).toString()),I},fromPartial(c){const I=os();return I.address=c.address??new Uint8Array,c.power!==void 0&&c.power!==null&&(I.power=BigInt(c.power.toString())),I}};function as(){return{pubKey:R.PublicKey.fromPartial({}),power:BigInt(0)}}e.ValidatorUpdate={typeUrl:"/tendermint.abci.ValidatorUpdate",encode(c,I=v.BinaryWriter.create()){return c.pubKey!==void 0&&R.PublicKey.encode(c.pubKey,I.uint32(10).fork()).ldelim(),c.power!==BigInt(0)&&I.uint32(16).int64(c.power),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=as();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.pubKey=R.PublicKey.decode(q,q.uint32());break;case 2:F.power=q.int64();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=as();return(0,E.isSet)(c.pubKey)&&(I.pubKey=R.PublicKey.fromJSON(c.pubKey)),(0,E.isSet)(c.power)&&(I.power=BigInt(c.power.toString())),I},toJSON(c){const I={};return c.pubKey!==void 0&&(I.pubKey=c.pubKey?R.PublicKey.toJSON(c.pubKey):void 0),c.power!==void 0&&(I.power=(c.power||BigInt(0)).toString()),I},fromPartial(c){const I=as();return c.pubKey!==void 0&&c.pubKey!==null&&(I.pubKey=R.PublicKey.fromPartial(c.pubKey)),c.power!==void 0&&c.power!==null&&(I.power=BigInt(c.power.toString())),I}};function ss(){return{validator:e.Validator.fromPartial({}),signedLastBlock:!1}}e.VoteInfo={typeUrl:"/tendermint.abci.VoteInfo",encode(c,I=v.BinaryWriter.create()){return c.validator!==void 0&&e.Validator.encode(c.validator,I.uint32(10).fork()).ldelim(),c.signedLastBlock===!0&&I.uint32(16).bool(c.signedLastBlock),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=ss();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.validator=e.Validator.decode(q,q.uint32());break;case 2:F.signedLastBlock=q.bool();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=ss();return(0,E.isSet)(c.validator)&&(I.validator=e.Validator.fromJSON(c.validator)),(0,E.isSet)(c.signedLastBlock)&&(I.signedLastBlock=!!c.signedLastBlock),I},toJSON(c){const I={};return c.validator!==void 0&&(I.validator=c.validator?e.Validator.toJSON(c.validator):void 0),c.signedLastBlock!==void 0&&(I.signedLastBlock=c.signedLastBlock),I},fromPartial(c){const I=ss();return c.validator!==void 0&&c.validator!==null&&(I.validator=e.Validator.fromPartial(c.validator)),I.signedLastBlock=c.signedLastBlock??!1,I}};function ds(){return{validator:e.Validator.fromPartial({}),signedLastBlock:!1,voteExtension:new Uint8Array}}e.ExtendedVoteInfo={typeUrl:"/tendermint.abci.ExtendedVoteInfo",encode(c,I=v.BinaryWriter.create()){return c.validator!==void 0&&e.Validator.encode(c.validator,I.uint32(10).fork()).ldelim(),c.signedLastBlock===!0&&I.uint32(16).bool(c.signedLastBlock),c.voteExtension.length!==0&&I.uint32(26).bytes(c.voteExtension),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=ds();for(;q.pos<K;){const z=q.uint32();switch(z>>
3>3){case 1:F.validator=e.Validator.decode(q,q.uint32());break;case 2:F.signedLastBlock=q.bool();break;case 3:F.voteExtension=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=ds();return(0,E.isSet)(c.validator)&&(I.validator=e.Validator.fromJSON(c.validator)),(0,E.isSet)(c.signedLastBlock)&&(I.signedLastBlock=!!c.signedLastBlock),(0,E.isSet)(c.voteExtension)&&(I.voteExtension=(0,E.bytesFromBase64)(c.voteExtension)),I},toJSON(c){const I={};return c.validator!==void 0&&(I.validator=c.validator?e.Validator.toJSON(c.validator):void 0),c.signedLastBlock!==void 0&&(I.signedLastBlock=c.signedLastBlock),c.voteExtension!==void 0&&(I.voteExtension=(0,E.base64FromBytes)(c.voteExtension!==void 0?c.voteExtension:new Uint8Array)),I},fromPartial(c){const I=ds();return c.validator!==void 0&&c.validator!==null&&(I.validator=e.Validator.fromPartial(c.validator)),I.signedLastBlock=c.signedLastBlock??!1,I.voteExtension=c.voteExtension??new Uint8Array,I}};function us(){return{type:0,validator:e.Validator.fromPartial({}),height:BigInt(0),time:n.Timestamp.fromPartial({}),totalVotingPower:BigInt(0)}}e.Misbehavior={typeUrl:"/tendermint.abci.Misbehavior",encode(c,I=v.BinaryWriter.create()){return c.type!==0&&I.uint32(8).int32(c.type),c.validator!==void 0&&e.Validator.encode(c.validator,I.uint32(18).fork()).ldelim(),c.height!==BigInt(0)&&I.uint32(24).int64(c.height),c.time!==void 0&&n.Timestamp.encode(c.time,I.uint32(34).fork()).ldelim(),c.totalVotingPower!==BigInt(0)&&I.uint32(40).int64(c.totalVotingPower),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=us();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.type=q.int32();break;case 2:F.validator=e.Validator.decode(q,q.uint32());break;case 3:F.height=q.int64();break;case 4:F.time=n.Timestamp.decode(q,q.uint32());break;case 5:F.totalVotingPower=q.int64();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=us();return(0,E.isSet)(c.type)&&(I.type=U(c.type)),(0,E.isSet)(c.validator)&&(I.validator=e.Validator.fromJSON(c.validator)),(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),(0,E.isSet)(c.time)&&(I.time=(0,E.fromJsonTimestamp)(c.time)),(0,E.isSet)(c.totalVotingPower)&&(I.totalVotingPower=BigInt(c.totalVotingPower.toString())),I},toJSON(c){const I={};return c.type!==void 0&&(I.type=r(c.type)),c.validator!==void 0&&(I.validator=c.validator?e.Validator.toJSON(c.validator):void 0),c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),c.time!==void 0&&(I.time=(0,E.fromTimestamp)(c.time).toISOString()),c.totalVotingPower!==void 0&&(I.totalVotingPower=(c.totalVotingPower||BigInt(0)).toString()),I},fromPartial(c){const I=us();return I.type=c.type??0,c.validator!==void 0&&c.validator!==null&&(I.validator=e.Validator.fromPartial(c.validator)),c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),c.time!==void 0&&c.time!==null&&(I.time=n.Timestamp.fromPartial(c.time)),c.totalVotingPower!==void 0&&c.totalVotingPower!==null&&(I.totalVotingPower=BigInt(c.totalVotingPower.toString())),I}};function cs(){return{height:BigInt(0),format:0,chunks:0,hash:new Uint8Array,metadata:new Uint8Array}}e.Snapshot={typeUrl:"/tendermint.abci.Snapshot",encode(c,I=v.BinaryWriter.create()){return c.height!==BigInt(0)&&I.uint32(8).uint64(c.height),c.format!==0&&I.uint32(16).uint32(c.format),c.chunks!==0&&I.uint32(24).uint32(c.chunks),c.hash.length!==0&&I.uint32(34).bytes(c.hash),c.metadata.length!==0&&I.uint32(42).bytes(c.metadata),I},decode(c,I){const q=c instanceof v.BinaryReader?c:new v.BinaryReader(c);let K=I===void 0?q.len:q.pos+I;const F=cs();for(;q.pos<K;){const z=q.uint32();switch(z>>>3){case 1:F.height=q.uint64();break;case 2:F.format=q.uint32();break;case 3:F.chunks=q.uint32();break;case 4:F.hash=q.bytes();break;case 5:F.metadata=q.bytes();break;default:q.skipType(z&7);break}}return F},fromJSON(c){const I=cs();return(0,E.isSet)(c.height)&&(I.height=BigInt(c.height.toString())),(0,E.isSet)(c.format)&&(I.format=Number(c.format)),(0,E.isSet)(c.chunks)&&(I.chunks=Number(c.chunks)),(0,E.isSet)(c.hash)&&(I.hash=(0,E.bytesFromBase64)(c.hash)),(0,E.isSet)(c.metadata)&&(I.metadata=(0,E.bytesFromBase64)(c.metadata)),I},toJSON(c){const I={};return c.height!==void 0&&(I.height=(c.height||BigInt(0)).toString()),c.format!==void 0&&(I.format=Math.round(c.format)),c.chunks!==void 0&&(I.chunks=Math.round(c.chunks)),c.hash!==void 0&&(I.hash=(0,E.base64FromBytes)(c.hash!==void 0?c.hash:new Uint8Array)),c.metadata!==void 0&&(I.metadata=(0,E.base64FromBytes)(c.metadata!==void 0?c.metadata:new Uint8Array)),I},fromPartial(c){const I=cs();return c.height!==void 0&&c.height!==null&&(I.height=BigInt(c.height.toString())),I.format=c.format??0,I.chunks=c.chunks??0,I.hash=c.hash??new Uint8Array,I.metadata=c.metadata??new Uint8Array,I}};class hp{constructor(I){this.rpc=I,this.Echo=this.Echo.bind(this),this.Flush=this.Flush.bind(this),this.Info=this.Info.bind(this),this.DeliverTx=this.DeliverTx.bind(this),this.CheckTx=this.CheckTx.bind(this),this.Query=this.Query.bind(this),this.Commit=this.Commit.bind(this),this.InitChain=this.InitChain.bind(this),this.BeginBlock=this.BeginBlock.bind(this),this.EndBlock=this.EndBlock.bind(this),this.ListSnapshots=this.ListSnapshots.bind(this),this.OfferSnapshot=this.OfferSnapshot.bind(this),this.LoadSnapsh
3otChunk=this.LoadSnapshotChunk.bind(this),this.ApplySnapshotChunk=this.ApplySnapshotChunk.bind(this),this.PrepareProposal=this.PrepareProposal.bind(this),this.ProcessProposal=this.ProcessProposal.bind(this)}Echo(I){const q=e.RequestEcho.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Echo",q).then(F=>e.ResponseEcho.decode(new v.BinaryReader(F)))}Flush(I={}){const q=e.RequestFlush.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Flush",q).then(F=>e.ResponseFlush.decode(new v.BinaryReader(F)))}Info(I){const q=e.RequestInfo.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Info",q).then(F=>e.ResponseInfo.decode(new v.BinaryReader(F)))}DeliverTx(I){const q=e.RequestDeliverTx.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","DeliverTx",q).then(F=>e.ResponseDeliverTx.decode(new v.BinaryReader(F)))}CheckTx(I){const q=e.RequestCheckTx.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","CheckTx",q).then(F=>e.ResponseCheckTx.decode(new v.BinaryReader(F)))}Query(I){const q=e.RequestQuery.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Query",q).then(F=>e.ResponseQuery.decode(new v.BinaryReader(F)))}Commit(I={}){const q=e.RequestCommit.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","Commit",q).then(F=>e.ResponseCommit.decode(new v.BinaryReader(F)))}InitChain(I){const q=e.RequestInitChain.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","InitChain",q).then(F=>e.ResponseInitChain.decode(new v.BinaryReader(F)))}BeginBlock(I){const q=e.RequestBeginBlock.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","BeginBlock",q).then(F=>e.ResponseBeginBlock.decode(new v.BinaryReader(F)))}EndBlock(I){const q=e.RequestEndBlock.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","EndBlock",q).then(F=>e.ResponseEndBlock.decode(new v.BinaryReader(F)))}ListSnapshots(I={}){const q=e.RequestListSnapshots.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","ListSnapshots",q).then(F=>e.ResponseListSnapshots.decode(new v.BinaryReader(F)))}OfferSnapshot(I){const q=e.RequestOfferSnapshot.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","OfferSnapshot",q).then(F=>e.ResponseOfferSnapshot.decode(new v.BinaryReader(F)))}LoadSnapshotChunk(I){const q=e.RequestLoadSnapshotChunk.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","LoadSnapsh
3otChunk",q).then(F=>e.ResponseLoadSnapshotChunk.decode(new v.BinaryReader(F)))}ApplySnapshotChunk(I){const q=e.RequestApplySnapshotChunk.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","ApplySnapshotChunk",q).then(F=>e.ResponseApplySnapshotChunk.decode(new v.BinaryReader(F)))}PrepareProposal(I){const q=e.RequestPrepareProposal.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","PrepareProposal",q).then(F=>e.ResponsePrepareProposal.decode(new v.BinaryReader(F)))}ProcessProposal(I){const q=e.RequestProcessProposal.encode(I).finish();return this.rpc.request("tendermint.abci.ABCIApplication","ProcessProposal",q).then(F=>e.ResponseProcessProposal.decode(new v.BinaryReader(F)))}}e.ABCIApplicationClientImpl=hp})(fu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValidatorUpdates=e.Pool=e.RedelegationResponse=e.RedelegationEntryResponse=e.DelegationResponse=e.Params=e.Redelegation=e.RedelegationEntry=e.UnbondingDelegationEntry=e.UnbondingDelegation=e.Delegation=e.DVVTriplets=e.DVVTriplet=e.DVPairs=e.DVPair=e.ValAddresses=e.Validator=e.Description=e.Commission=e.CommissionRates=e.HistoricalInfo=e.infractionToJSON=e.infractionFromJSON=e.Infraction=e.bondStatusToJSON=e.bondStatusFromJSON=e.BondStatus=e.protobufPackage=void 0;const n=Wt,t=Me,i=Re,u=ln,R=ve,v=fu,E=te,C=ee;e.protobufPackage="cosmos.staking.v1beta1";var D;(function(h){h[h.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",h[h.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",h[h.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",h[h.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",h[h.UNRECOGNIZED=-1]="UNRECOGNIZED"})(D||(e.BondStatus=D={}));function _(h){switch(h){case 0:case"BOND_STATUS_UNSPECIFIED":return D.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return D.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return D.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return D.BOND_STATUS_BONDED;case-1:case"UNRECOGNIZED":default:return D.UNRECOGNIZED}}e.bondStatusFromJSON=_;function b(h){switch(h){case D.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case D.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case D.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case D.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";case D.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.bondStatusToJSON=b;var f;(function(h){h[h.INFRACTION_UNSPECIFIED=0]="INFRACTION_UNSPECIFIED",h[h.INFRACTION_DOUBLE_SIGN=1]="INFRACTION_DOUBLE_SIGN",h[h.INFRACTION_DOWNTIME=2]="INFRACTION_DOWNTIME",h[h.UNRECOGNIZED=-1]="UNRECOGNIZED"})(f||(e.Infraction=f={}));function p(h){switch(h){case 0:case"INFRACTION_UNSPECIFIED":return f.INFRACTION_UNSPECIFIED;case 1:case"INFRACTION_DOUBLE_SIGN":return f.INFRACTION_DOUBLE_SIGN;case 2:case"INFRACTION_DOWNTIME":return f.INFRACTION_DOWNTIME;case-1:case"UNRECOGNIZED":default:return f.UNRECOGNIZED}}e.infractionFromJSON=p;function k(h){switch(h){case f.INFRACTION_UNSPECIFIED:return"INFRACTION_UNSPECIFIED";case f.INFRACTION_DOUBLE_SIGN:return"INFRACTION_DOUBLE_SIGN";case f.INFRACTION_DOWNTIME:return"INFRACTION_DOWNTIME";case f.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.infractionToJSON=k;function o(){return{header:n.Header.fromPartial({}),valset:[]}}e.HistoricalInfo={typeUrl:"/cosmos.staking.v1beta1.HistoricalInfo",encode(h,S=E.BinaryWriter.create()){h.header!==void 0&&n.Header.encode(h.header,S.uint32(10).fork()).ldelim();for(const A of h.valset)e.Validator.encode(A,S.uint32(18).fork()).ldelim();return S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=o();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.header=n.Header.decode(A,A.uint32());break;case 2:L.valset.push(e.Validator.decode(A,A.uint32()));break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=o();return(0,C.isSet)(h.header)&&(S.header=n.Header.fromJSON(h.header)),Array.isArray(h==null?void 0:h.valset)&&(S.valset=h.valset.map(A=>e.Validator.fromJSON(A))),S},toJSON(h){const S={};return h.header!==void 0&&(S.header=h.header?n.Header.toJSON(h.header):void 0),h.valset?S.valset=h.valset.map(A=>A?e.Validator.toJSON(A):void 0):S.valset=[],S},fromPartial(h){var A;const S=o();return h.header!==void 0&&h.header!==null&&(S.header=n.Header.fromPartial(h.header)),S.valset=((A=h.valset)==null?void 0:A.map(Q=>e.Validator.fromPartial(Q)))||[],S}};function s(){return{rate:"",maxRate:"",maxChangeRate:""}}e.CommissionRates={typeUrl:"/cosmos.staking.v1beta1.CommissionRates",encode(h,S=E.BinaryWriter.create()){return h.rate!==""&&S.uint32(10).string(h.rate),h.maxRate!==""&&S.uint32(18).string(h.maxRate),h.maxChangeRate!==""&&S.uint32(26).string(h.maxChangeRate),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=s();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.rate=A.string();break;case 2:L.maxRate=A.string();break;case 3:L.maxChangeRate=A.string();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=s();return(0,C.isSet)(h.rate)&&(S.rate=String(h.rate)),(0,C.isSet)(h.maxRate)&&(S.maxRate=String(h.maxRate)),(0,C.isSet)(h.maxChangeRate)&&(S.maxChangeRate=String(h.maxChangeRate)),S},toJSON(h){const S={};return h.rate!==void 0&&(S.rate=h.rate),h.maxRate!==void 0&&(S.maxRate=h.maxRate),h.maxChangeRate!==void 0&&(S.maxChangeRate=h.maxChangeRate),S},fromPartial(h){const S=s();return S.rate=h.rate??"",S.maxRate=h.maxRate??"",S.maxChangeRate=h.maxChangeRate??"",S}};function y(){return{commissionRates:e.CommissionRates.fromPartial({}),updateTime:t.Timestamp.fromPartial({})}}e.Commission={typeUrl:"/cosmos.staking.v1beta1.Commission",encode(h,S=E.BinaryWriter.create()){return h.commissionRates!==void 0&&e.CommissionRates.encode(h.commissionRates,S.uint32(10).fork()).ldelim(),h.updateTime!==void 0&&t.Timestamp.encode(h.updateTime,S.uint32(18).fork()).ldelim(),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=y();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.commissionRates=e.CommissionRates.decode(A,A.uint32());break;case 2:L.updateTime=t.Timestamp.decode(A,A.uint32());break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=y();return(0,C.isSet)(h.commissionRates)&&(S.commissionRates=e.CommissionRates.fromJSON(h.commissionRates)),(0,C.isSet)(h.updateTime)&&(S.updateTime=(0,C.fromJsonTimestamp)(h.updateTime)),S},toJSON(h){const S={};return h.commissionRates!==void 0&&(S.commissionRates=h.commissionRates?e.CommissionRates.toJSON(h.commissionRates):void 0),h.updateTime!==void 0&&(S.updateTime=(0,C.fromTimestamp)(h.updateTime).toISOString()),S},fromPartial(h){const S=y();return h.commissionRates!==void 0&&h.commissionRates!==null&&(S.commissionRates=e.CommissionRates.fromPartial(h.commissionRates)),h.updateTime!==void 0&&h.updateTime!==null&&(S.updateTime=t.Timestamp.fromPartial(h.updateTime)),S}};function w(){return{moniker:"",identity:"",website:"",securityContact:"",details:""}}e.Description={typeUrl:"/cosmos.staking.v1beta1.Description",encode(h,S=E.BinaryWriter.create()){return h.moniker!==""&&S.uint32(10).string(h.moniker),h.identity!==""&&S.uint32(18).string(h.identity),h.website!==""&&S.uint32(26).string(h.website),h.securityContact!==""&&S.uint32(34).string(h.securityContact),h.details!==""&&S.uint32(42).string(h.details),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=w();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.moniker=A.string();break;case 2:L.identity=A.string();break;case 3:L.website=A.string();break;case 4:L.securityContact=A.string();break;case 5:L.details=A.string();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=w();return(0,C.isSet)(h.moniker)&&(S.moniker=String(h.moniker)),(0,C.isSet)(h.identity)&&(S.identity=String(h.identity)),(0,C.isSet)(h.website)&&(S.website=String(h.website)),(0,C.isSet)(h.securityContact)&&(S.securityContact=String(h.securityContact)),(0,C.isSet)(h.details)&&
3(S.details=String(h.details)),S},toJSON(h){const S={};return h.moniker!==void 0&&(S.moniker=h.moniker),h.identity!==void 0&&(S.identity=h.identity),h.website!==void 0&&(S.website=h.website),h.securityContact!==void 0&&(S.securityContact=h.securityContact),h.details!==void 0&&(S.details=h.details),S},fromPartial(h){const S=w();return S.moniker=h.moniker??"",S.identity=h.identity??"",S.website=h.website??"",S.securityContact=h.securityContact??"",S.details=h.details??"",S}};function J(){return{operatorAddress:"",consensusPubkey:void 0,jailed:!1,status:0,tokens:"",delegatorShares:"",description:e.Description.fromPartial({}),unbondingHeight:BigInt(0),unbondingTime:t.Timestamp.fromPartial({}),commission:e.Commission.fromPartial({}),minSelfDelegation:"",unbondingOnHoldRefCount:BigInt(0),unbondingIds:[]}}e.Validator={typeUrl:"/cosmos.staking.v1beta1.Validator",encode(h,S=E.BinaryWriter.create()){h.operatorAddress!==""&&S.uint32(10).string(h.operatorAddress),h.consensusPubkey!==void 0&&i.Any.encode(h.consensusPubkey,S.uint32(18).fork()).ldelim(),h.jailed===!0&&S.uint32(24).bool(h.jailed),h.status!==0&&S.uint32(32).int32(h.status),h.tokens!==""&&S.uint32(42).string(h.tokens),h.delegatorShares!==""&&S.uint32(50).string(h.delegatorShares),h.description!==void 0&&e.Description.encode(h.description,S.uint32(58).fork()).ldelim(),h.unbondingHeight!==BigInt(0)&&S.uint32(64).int64(h.unbondingHeight),h.unbondingTime!==void 0&&t.Timestamp.encode(h.unbondingTime,S.uint32(74).fork()).ldelim(),h.commission!==void 0&&e.Commission.encode(h.commission,S.uint32(82).fork()).ldelim(),h.minSelfDelegation!==""&&S.uint32(90).string(h.minSelfDelegation),h.unbondingOnHoldRefCount!==BigInt(0)&&S.uint32(96).int64(h.unbondingOnHoldRefCount),S.uint32(106).fork();for(const A of h.unbondingIds)S.uint64(A);return S.ldelim(),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=J();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.operatorAddress=A.string();break;case 2:L.consensusPubkey=i.Any.decode(A,A.uint32());break;case 3:L.jailed=A.bool();break;case 4:L.status=A.int32();break;case 5:L.tokens=A.string();break;case 6:L.delegatorShares=A.string();break;case 7:L.description=e.Description.decode(A,A.uint32());break;case 8:L.unbondingHeight=A.int64();break;case 9:L.unbondingTime=t.Timestamp.decode(A,A.uint32());break;case 10:L.commission=e.Commission.decode(A,A.uint32());break;case 11:L.minSelfDelegation=A.string();break;case 12:L.unbondingOnHoldRefCount=A.int64();break;case 13:if((G&7)===2){const j=A.uint32()+A.pos;for(;A.pos<j;)L.unbondingIds.push(A.uint64())}else L.unbondingIds.push(A.uint64());break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=J();return(0,C.isSet)(h.operatorAddress)&&(S.operatorAddress=String(h.operatorAddress)),(0,C.isSet)(h.consensusPubkey)&&(S.consensusPubkey=i.Any.fromJSON(h.consensusPubkey)),(0,C.isSet)(h.jailed)&&(S.jailed=!!h.jailed),(0,C.isSet)(h.status)&&(S.status=_(h.status)),(0,C.isSet)(h.tokens)&&(S.tokens=String(h.tokens)),(0,C.isSet)(h.delegatorShares)&&(S.delegatorShares=String(h.delegatorShares)),(0,C.isSet)(h.description)&&(S.description=e.Description.fromJSON(h.description)),(0,C.isSet)(h.unbondingHeight)&&(S.unbondingHeight=BigInt(h.unbondingHeight.toString())),(0,C.isSet)(h.unbondingTime)&&(S.unbondingTime=(0,C.fromJsonTimestamp)(h.unbondingTime)),(0,C.isSet)(h.commission)&&(S.commission=e.Commission.fromJSON(h.commission)),(0,C.isSet)(h.minSelfDelegation)&&(S.minSelfDelegation=String(h.minSelfDelegation)),(0,C.isSet)(h.unbondingOnHoldRefCount)&&(S.unbondingOnHoldRefCount=BigInt(h.unbondingOnHoldRefCount.toString())),Array.isArray(h==null?void 0:h.unbondingIds)&&(S.unbondingIds=h.unbondingIds.map(A=>BigInt(A.toString()))),S},toJSON(h){const S={};return h.operatorAddress!==void 0&&(S.operatorAddress=h.operatorAddress),h.consensusPubkey!==void 0&&(S.consensusPubkey=h.consensusPubkey?i.Any.toJSON(h.consensusPubkey):void 0),h.jailed!==void 0&&(S.jailed=h.jailed),h.status!==void 0&&(S.status=b(h.status)),h.tokens!==void 0&&(S.tokens=h.tokens),h.delegatorShares!==void 0&&(S.delegatorShares=h.delegatorShares),h.description!==void 0&&(S.description=h.description?e.Description.toJSON(h.description):void 0),h.unbondingHeight!==void 0&&(S.unbondingHeight=(h.unbondingHeight||BigInt(0)).toString()),h.unbondingTime!==void 0&&(S.unbondingTime=(0,C.fromTimestamp)(h.unbondingTime).toISOString()),h.commission!==void 0&&(S.commission=h.commission?e.Commission.toJSON(h.commission):void 0),h.minSelfDelegation!==void 0&&(S.minSelfDelegation=h.minSelfDelegation),h.unbondingOnHoldRefCount!==void 0&&(S.unbondingOnHoldRefCount=(h.unbondingOnHoldRefCount||BigInt(0)).toString()),h.unbondingIds?S.unbondingIds=h.unbondingIds.map(A=>(A||BigInt(0)).toString()):S.unbondingIds=[],S},fromPartial(h){var A;const S=J();return S.operatorAddress=h.operatorAddress??"",h.consensusPubkey!==void 0&&h.consensusPubkey!==null&&(S.consensusPubkey=i.Any.fromPartial(h.consensusPubkey)),S.jailed=h.jailed??!1,S.status=h.status??0,S.tokens=h.tokens??"",S.delegatorShares=h.delegatorShares??"",h.description!==void 0&&h.description!==null&&(S.description=e.Description.fromPartial(h.description)),h.unbondingHeight!==void 0&&h.unbondingHeight!==null&&(S.unbondingHeight=BigInt(h.unbondingHeight.toString())),h.unbondingTime!==void 0&&h.unbondingTime!==null&&(S.unbondingTime=t.Timestamp.fromPartial(h.unbondingTime)),h.commission!==void 0&&h.commission!==null&&(S.commission=e.Commission.fromPartial(h.commission)),S.minSelfDelegation=h.minSelfDelegation??"",h.unbondingOnHoldRefCount!==void 0&&h.unbondingOnHoldRefCount!==null&&(S.unbondingOnHoldRefCount=BigInt(h.unbondingOnHoldRefCount.toString())),S.unbondingIds=((A=h.unbondingIds)==null?void 0:A.map(Q=>BigInt(Q.toString())))||[],S}};function P(){return{addresses:[]}}e.ValAddresses={typeUrl:"/cosmos.staking.v1beta1.ValAddresses",encode(h,S=E.BinaryWriter.create()){for(const A of h.addresses)S.uint32(10).string(A);return S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=P();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.addresses.push(A.string());break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=P();return Array.isArray(h==null?void 0:h.addresses)&&(S.addresses=h.addresses.map(A=>String(A))),S},toJSON(h){const S={};return h.addresses?S.addresses=h.addresses.map(A=>A):S.addresses=[],S},fromPartial(h){var A;const S=P();return S.addresses=((A=h.addresses)==null?void 0:A.map(Q=>Q))||[],S}};function U(){return{delegatorAddress:"",validatorAddress:""}}e.DVPair={typeUrl:"/cosmos.staking.v1beta1.DVPair",encode(h,S=E.BinaryWriter.create()){return h.delegatorAddress!==""&&S.uint32(10).string(h.delegatorAddress),h.validatorAddress!==""&&S.uint32(18).string(h.validatorAddress),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=U();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.delegatorAddress=A.string();break;case 2:L.validatorAddress=A.string();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=U();return(0,C.isSet)(h.delegatorAddress)&&(S.delegatorAddress=String(h.delegatorAddress)),(0,C.isSet)(h.validatorAddress)&&(S.validatorAddress=String(h.validatorAddress)),S},toJSON(h){const S={};return h.delegatorAddress!==void 0&&(S.delegatorAddress=h.delegatorAddress),h.validatorAddress!==void 0&&(S.validatorAddress=h.validatorAddress),S},fromPartial(h){const S=U();return S.delegatorAddress=h.delegatorAddress??"",S.validatorAddress=h.validatorAddress??"",S}};function r(){return{pairs:[]}}e.DVPairs={typeUrl:"/cosmos.staking.v1beta1.DVPairs",encode(h,S=E.BinaryWriter.create()){for(const A of h.pairs)e.DVPair.encode(A,S.uint32(10).fork()).ldelim();return S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=r();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.pairs.push(e.DVPair.decode(A,A.uint32()));break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=r();return Array.isArray(h==null?void 0:h.pairs)&&(S.pairs=h.pairs.map(A=>e.DVPair.fromJSON(A))),S},toJSON(h){const S={};return h.pairs?S.pairs=h.pairs.map(A=>A?e.DVPair.toJSON(A):void 0):S.pairs=[],S},fromPartial(h){var A;const S=r();return S.pairs=((A=h.pairs)==null?void 0:A.map(Q=>e.DVPair.fromPartial(Q)))||[],S}};function m(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""}}e.DVVTriplet={typeUrl:"/cosmos.staking.v1beta1.DVVTriplet",encode(h,S=E.BinaryWriter.create()){return h.delegatorAddress!==""&&S.uint32(10).string(h.delegatorAddress),h.validatorSrcAddress!==""&&S.uint32(18).string(h.validatorSrcAddress),h.validatorDstAddress!==""&&S.uint32(26).string(h.validatorDstAddress),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=m();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.delegatorAddress=A.string();break;case 2:L.validatorSrcAddress=A.string();break;case 3:L.validatorDstAddress=A.string();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=m();return(0,C.isSet)(h.delegatorAddress)&&(S.delegatorAddress=String(h.delegatorAddress)),(0,C.isSet)(h.validatorSrcAddress)&&(S.validatorSrcAddress=String(h.validatorSrcAddress)),(0,C.isSet)(h.validatorDstAddress)&&(S.validatorDstAddress=String(h.validatorDstAddress)),S},toJSON(h){const S={};return h.delegatorAddress!==void 0&&(S.delegatorAddress=h.delegatorAddress),h.validatorSrcAddress!==void 0&&(S.validatorSrcAddress=h.validatorSrcAddress),h.validatorDstAddress!==void 0&&(S.validatorDstAddress=h.validatorDstAddress),S},fromPartial(h){const S=m();return S.delegatorAddress=h.delegatorAddress??"",S.validatorSrcAddress=h.validatorSrcAddress??"",S.validatorDstAddress=h.validatorDstAddress??"",S}};function N(){return{triplets:[]}}e.DVVTriplets={typeUrl:"/cosmos.staking.v1beta1.DVVTriplets",encode(h,S=E.BinaryWriter.create()){for(const A of h.triplets)e.DVVTriplet.encode(A,S.uint32(10).fork()).ldelim();return S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=N();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.triplets.push(e.DVVTriplet.decode(A,A.uint32()));break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=N();return Array.isArray(h==null?void 0:h.triplets)&&(S.triplets=h.triplets.map(A=>e.DVVTriplet.fromJSON(A))),S},toJSON(h){const S={};return h.triplets?S.triplets=h.triplets.map(A=>A?e.DVVTriplet.toJSON(A):void 0):S.triplets=[],S},fromPartial(h){var A;const S=N();return S.triplets=((A=h.triplets)==null?void 0:A.map(Q=>e.DVVTriplet.fromPartial(Q)))||[],S}};function V(){return{delegatorAddress:"",validatorAddress:"",shares:""}}e.Delegation={typeUrl:"/cosmos.staking.v1beta1.Delegation",encode(h,S=E.BinaryWriter.create()){return h.delegatorAddress!==""&&S.uint32(10).string(h.delegatorAddress),h.validatorAddress!==""&&S.uint32(18).string(h.validatorAddress),h.shares!==""&&S.uint32(26).string(h.shares),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=V();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.delegatorAddress=A.string();break;case 2:L.validatorAddress=A.string();break;case 3:L.shares=A.string();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=V();return(0,C.isSet)(h.delegatorAddress)&&(S.delegatorAddress=String(h.delegatorAddress)),(0,C.isSet)(h.validatorAddress)&&(S.validatorAddress=String(h.validatorAddress)),(0,C.isSet)(h.shares)&&(S.shares=String(h.shares)),S},toJSON(h){const S={};return h.delegatorAddress!==void 0&&(S.delegatorAddress=h.delegatorAddress),h.validatorAddress!==void 0&&(S.validatorAddress=h.validatorAddress),h.shares!==void 0&&(S.shares=h.shares),S},fromPartial(h){const S=V();return S.delegatorAddress=h.delegatorAddress??"",S.validatorAddress=h.validatorAddress??"",S.shares=h.shares??"",S}};function d(){return{delegatorAddress:"",validatorAddress:"",entries:[]}}e.UnbondingDelegation={typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegation",encode(h,S=E.BinaryWriter.create()){h.delegatorAddress!==""&&S.uint32(10).string(h.delegatorAddress),h.validatorAddress!==""&&S.uint32(18).string(h.validatorAddress);for(const A of h.entries)e.UnbondingDelegationEntry.encode(A,S.uint32(26).fork()).ldelim();return S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=d();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.delegatorAddress=A.string();break;case 2:L.validatorAddress=A.string();break;case 3:L.entries.push(e.UnbondingDelegationEntry.decode(A,A.uint32()));break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=d();return(0,C.isSet)(h.delegatorAddress)&&(S.delegatorAddress=String(h.delegatorAddress)),(0,C.isSet)(h.validatorAddress)&&(S.validatorAddress=String(h.validatorAddress)),Array.isArray(h==null?void 0:h.entries)&&(S.entries=h.entries.map(A=>e.UnbondingDelegationEntry.fromJSON(A))),S},toJSON(h){const S={};return h.delegatorAddress!==void 0&&(S.delegatorAddress=h.delegatorAddress),h.validatorAddress!==void 0&&(S.validatorAddress=h.validatorAddress),h.entries?S.entr
3ies=h.entries.map(A=>A?e.UnbondingDelegationEntry.toJSON(A):void 0):S.entries=[],S},fromPartial(h){var A;const S=d();return S.delegatorAddress=h.delegatorAddress??"",S.validatorAddress=h.validatorAddress??"",S.entries=((A=h.entries)==null?void 0:A.map(Q=>e.UnbondingDelegationEntry.fromPartial(Q)))||[],S}};function l(){return{creationHeight:BigInt(0),completionTime:t.Timestamp.fromPartial({}),initialBalance:"",balance:"",unbondingId:BigInt(0),unbondingOnHoldRefCount:BigInt(0)}}e.UnbondingDelegationEntry={typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegationEntry",encode(h,S=E.BinaryWriter.create()){return h.creationHeight!==BigInt(0)&&S.uint32(8).int64(h.creationHeight),h.completionTime!==void 0&&t.Timestamp.encode(h.completionTime,S.uint32(18).fork()).ldelim(),h.initialBalance!==""&&S.uint32(26).string(h.initialBalance),h.balance!==""&&S.uint32(34).string(h.balance),h.unbondingId!==BigInt(0)&&S.uint32(40).uint64(h.unbondingId),h.unbondingOnHoldRefCount!==BigInt(0)&&S.uint32(48).int64(h.unbondingOnHoldRefCount),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=l();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.creationHeight=A.int64();break;case 2:L.completionTime=t.Timestamp.decode(A,A.uint32());break;case 3:L.initialBalance=A.string();break;case 4:L.balance=A.string();break;case 5:L.unbondingId=A.uint64();break;case 6:L.unbondingOnHoldRefCount=A.int64();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=l();return(0,C.isSet)(h.creationHeight)&&(S.creationHeight=BigInt(h.creationHeight.toString())),(0,C.isSet)(h.completionTime)&&(S.completionTime=(0,C.fromJsonTimestamp)(h.completionTime)),(0,C.isSet)(h.initialBalance)&&(S.initialBalance=String(h.initialBalance)),(0,C.isSet)(h.balance)&&(S.balance=String(h.balance)),(0,C.isSet)(h.unbondingId)&&(S.unbondingId=BigInt(h.unbondingId.toString())),(0,C.isSet)(h.unbondingOnHoldRefCount)&&(S.unbondingOnHoldRefCount=BigInt(h.unbondingOnHoldRefCount.toString())),S},toJSON(h){const S={};return h.creationHeight!==void 0&&(S.creationHeight=(h.creationHeight||BigInt(0)).toString()),h.completionTime!==void 0&&(S.completionTime=(0,C.fromTimestamp)(h.completionTime).toISOString()),h.initialBalance!==void 0&&(S.initialBalance=h.initialBalance),h.balance!==void 0&&(S.balance=h.balance),h.unbondingId!==void 0&&(S.unbondingId=(h.unbondingId||BigInt(0)).toString()),h.unbondingOnHoldRefCount!==void 0&&(S.unbondingOnHoldRefCount=(h.unbondingOnHoldRefCount||BigInt(0)).toString()),S},fromPartial(h){const S=l();return h.creationHeight!==void 0&&h.creationHeight!==null&&(S.creationHeight=BigInt(h.creationHeight.toString())),h.completionTime!==void 0&&h.completionTime!==null&&(S.completionTime=t.Timestamp.fromPartial(h.completionTime)),S.initialBalance=h.initialBalance??"",S.balance=h.balance??"",h.unbondingId!==void 0&&h.unbondingId!==null&&(S.unbondingId=BigInt(h.unbondingId.toString())),h.unbondingOnHoldRefCount!==void 0&&h.unbondingOnHoldRefCount!==null&&(S.unbondingOnHoldRefCount=BigInt(h.unbondingOnHoldRefCount.toString())),S}};function T(){return{creationHeight:BigInt(0),completionTime:t.Timestamp.fromPartial({}),initialBalance:"",sharesDst:"",unbondingId:BigInt(0),unbondingOnHoldRefCount:BigInt(0)}}e.RedelegationEntry={typeUrl:"/cosmos.staking.v1beta1.RedelegationEntry",encode(h,S=E.BinaryWriter.create()){return h.creationHeight!==BigInt(0)&&S.uint32(8).int64(h.creationHeight),h.completionTime!==void 0&&t.Timestamp.encode(h.completionTime,S.uint32(18).fork()).ldelim(),h.initialBalance!==""&&S.uint32(26).string(h.initialBalance),h.sharesDst!==""&&S.uint32(34).string(h.sharesDst),h.unbondingId!==BigInt(0)&&S.uint32(40).uint64(h.unbondingId),h.unbondingOnHoldRefCount!==BigInt(0)&&S.uint32(48).int64(h.unbondingOnHoldRefCount),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=T();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.creationHeight=A.int64();break;case 2:L.completionTime=t.Timestamp.decode(A,A.uint32());break;case 3:L.initialBalance=A.string();break;case 4:L.sharesDst=A.string();break;case 5:L.unbondingId=A.uint64();break;case 6:L.unbondingOnHoldRefCount=A.int64();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=T();return(0,C.isSet)(h.creationHeight)&&(S.creationHeight=BigInt(h.creationHeight.toString())),(0,C.isSet)(h.completionTime)&&(S.completionTime=(0,C.fromJsonTimestamp)(h.completionTime)),(0,C.isSet)(h.initialBalance)&&(S.initialBalance=String(h.initialBalance)),(0,C.isSet)(h.sharesDst)&&(S.sharesDst=String(h.sharesDst)),(0,C.isSet)(h.unbondingId)&&(S.unbondingId=BigInt(h.unbondingId.toString())),(0,C.isSet)(h.unbondingOnHoldRefCount)&&(S.unbondingOnHoldRefCount=BigInt(h.unbondingOnHoldRefCount.toString())),S},toJSON(h){const S={};return h.creationHeight!==void 0&&(S.creationHeight=(h.creationHeight||BigInt(0)).toString()),h.completionTime!==void 0&&(S.completionTime=(0,C.fromTimestamp)(h.completionTime).toISOString()),h.initialBalance!==void 0&&(S.initialBalance=h.initialBalance),h.sharesDst!==void 0&&(S.sharesDst=h.sharesDst),h.unbondingId!==void 0&&(S.unbondingId=(h.unbondingId||BigInt(0)).toString()),h.unbondingOnHoldRefCount!==void 0&&(S.unbondingOnHoldRefCount=(h.unbondingOnHoldRefCount||BigInt(0)).toString()),S},fromPartial(h){const S=T();return h.creationHeight!==void 0&&h.creationHeight!==null&&(S.creationHeight=BigInt(h.creationHeight.toString())),h.completionTime!==void 0&&h.completionTime!==null&&(S.completionTime=t.Timestamp.fromPartial(h.completionTime)),S.initialBalance=h.initialBalance??"",S.sharesDst=h.sharesDst??"",h.unbondingId!==void 0&&h.unbondingId!==null&&(S.unbondingId=BigInt(h.unbondingId.toString())),h.unbondingOnHoldRefCount!==void 0&&h.unbondingOnHoldRefCount!==null&&(S.unbondingOnHoldRefCount=BigInt(h.unbondingOnHoldRefCount.toString())),S}};function O(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",entries:[]}}e.Redelegation={typeUrl:"/cosmos.staking.v1beta1.Redelegation",encode(h,S=E.BinaryWriter.create()){h.delegatorAddress!==""&&S.uint32(10).string(h.delegatorAddress),h.validatorSrcAddress!==""&&S.uint32(18).string(h.validatorSrcAddress),h.validatorDstAddress!==""&&S.uint32(26).string(h.validatorDstAddress);for(const A of h.entries)e.RedelegationEntry.encode(A,S.uint32(34).fork()).ldelim();return S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=O();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.delegatorAddress=A.string();break;case 2:L.validatorSrcAddress=A.string();break;case 3:L.validatorDstAddress=A.string();break;case 4:L.entries.push(e.RedelegationEntry.decode(A,A.uint32()));break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=O();return(0,C.isSet)(h.delegatorAddress)&&(S.delegatorAddress=String(h.delegatorAddress)),(0,C.isSet)(h.validatorSrcAddress)&&(S.validatorSrcAddress=String(h.validatorSrcAddress)),(0,C.isSet)(h.validatorDstAddress)&&(S.validatorDstAddress=String(h.validatorDstAddress)),Array.isArray(h==null?void 0:h.entries)&&(S.entries=h.entries.map(A=>e.RedelegationEntry.fromJSON(A))),S},toJSON(h){const S={};return h.delegatorAddress!==void 0&&(S.delegatorAddress=h.delegatorAddress),h.validatorSrcAddress!==void 0&&(S.validatorSrcAddress=h.validatorSrcAddress),h.validatorDstAddress!==void 0&&(S.validatorDstAddress=h.validatorDstAddress),h.entries?S.entr
3ies=h.entries.map(A=>A?e.RedelegationEntry.toJSON(A):void 0):S.entries=[],S},fromPartial(h){var A;const S=O();return S.delegatorAddress=h.delegatorAddress??"",S.validatorSrcAddress=h.validatorSrcAddress??"",S.validatorDstAddress=h.validatorDstAddress??"",S.entries=((A=h.entries)==null?void 0:A.map(Q=>e.RedelegationEntry.fromPartial(Q)))||[],S}};function B(){return{unbondingTime:u.Duration.fromPartial({}),maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:"",minCommissionRate:""}}e.Params={typeUrl:"/cosmos.staking.v1beta1.Params",encode(h,S=E.BinaryWriter.create()){return h.unbondingTime!==void 0&&u.Duration.encode(h.unbondingTime,S.uint32(10).fork()).ldelim(),h.maxValidators!==0&&S.uint32(16).uint32(h.maxValidators),h.maxEntries!==0&&S.uint32(24).uint32(h.maxEntries),h.historicalEntries!==0&&S.uint32(32).uint32(h.historicalEntries),h.bondDenom!==""&&S.uint32(42).string(h.bondDenom),h.minCommissionRate!==""&&S.uint32(50).string(h.minCommissionRate),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=B();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.unbondingTime=u.Duration.decode(A,A.uint32());break;case 2:L.maxValidators=A.uint32();break;case 3:L.maxEntries=A.uint32();break;case 4:L.historicalEntries=A.uint32();break;case 5:L.bondDenom=A.string();break;case 6:L.minCommissionRate=A.string();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=B();return(0,C.isSet)(h.unbondingTime)&&(S.unbondingTime=u.Duration.fromJSON(h.unbondingTime)),(0,C.isSet)(h.maxValidators)&&(S.maxValidators=Number(h.maxValidators)),(0,C.isSet)(h.maxEntries)&&(S.maxEntries=Number(h.maxEntries)),(0,C.isSet)(h.historicalEntries)&&(S.historicalEntries=Number(h.historicalEntries)),(0,C.isSet)(h.bondDenom)&&(S.bondDenom=String(h.bondDenom)),(0,C.isSet)(h.minCommissionRate)&&(S.minCommissionRate=String(h.minCommissionRate)),S},toJSON(h){const S={};return h.unbondingTime!==void 0&&(S.unbondingTime=h.unbondingTime?u.Duration.toJSON(h.unbondingTime):void 0),h.maxValidators!==void 0&&(S.maxValidators=Math.round(h.maxValidators)),h.maxEntries!==void 0&&(S.maxEntries=Math.round(h.maxEntries)),h.historicalEntries!==void 0&&(S.historicalEntries=Math.round(h.historicalEntries)),h.bondDenom!==void 0&&(S.bondDenom=h.bondDenom),h.minCommissionRate!==void 0&&(S.minCommissionRate=h.minCommissionRate),S},fromPartial(h){const S=B();return h.unbondingTime!==void 0&&h.unbondingTime!==null&&(S.unbondingTime=u.Duration.fromPartial(h.unbondingTime)),S.maxValidators=h.maxValidators??0,S.maxEntries=h.maxEntries??0,S.historicalEntries=h.historicalEntries??0,S.bondDenom=h.bondDenom??"",S.minCommissionRate=h.minCommissionRate??"",S}};function M(){return{delegation:e.Delegation.fromPartial({}),balance:R.Coin.fromPartial({})}}e.DelegationResponse={typeUrl:"/cosmos.staking.v1beta1.DelegationResponse",encode(h,S=E.BinaryWriter.create()){return h.delegation!==void 0&&e.Delegation.encode(h.delegation,S.uint32(10).fork()).ldelim(),h.balance!==void 0&&R.Coin.encode(h.balance,S.uint32(18).fork()).ldelim(),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=M();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.delegation=e.Delegation.decode(A,A.uint32());break;case 2:L.balance=R.Coin.decode(A,A.uint32());break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=M();return(0,C.isSet)(h.delegation)&&(S.delegation=e.Delegation.fromJSON(h.delegation)),(0,C.isSet)(h.balance)&&(S.balance=R.Coin.fromJSON(h.balance)),S},toJSON(h){const S={};return h.delegation!==void 0&&(S.delegation=h.delegation?e.Delegation.toJSON(h.delegation):void 0),h.balance!==void 0&&(S.balance=h.balance?R.Coin.toJSON(h.balance):void 0),S},fromPartial(h){const S=M();return h.delegation!==void 0&&h.delegation!==null&&(S.delegation=e.Delegation.fromPartial(h.delegation)),h.balance!==void 0&&h.balance!==null&&(S.balance=R.Coin.fromPartial(h.balance)),S}};function W(){return{redelegationEntry:e.RedelegationEntry.fromPartial({}),balance:""}}e.RedelegationEntryResponse={typeUrl:"/cosmos.staking.v1beta1.RedelegationEntryResponse",encode(h,S=E.BinaryWriter.create()){return h.redelegationEntry!==void 0&&e.RedelegationEntry.encode(h.redelegationEntry,S.uint32(10).fork()).ldelim(),h.balance!==""&&S.uint32(34).string(h.balance),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=W();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.redelegationEntry=e.RedelegationEntry.decode(A,A.uint32());break;case 4:L.balance=A.string();break;default:A.skipType(G&7);break}}return L}
3,fromJSON(h){const S=W();return(0,C.isSet)(h.redelegationEntry)&&(S.redelegationEntry=e.RedelegationEntry.fromJSON(h.redelegationEntry)),(0,C.isSet)(h.balance)&&(S.balance=String(h.balance)),S},toJSON(h){const S={};return h.redelegationEntry!==void 0&&(S.redelegationEntry=h.redelegationEntry?e.RedelegationEntry.toJSON(h.redelegationEntry):void 0),h.balance!==void 0&&(S.balance=h.balance),S},fromPartial(h){const S=W();return h.redelegationEntry!==void 0&&h.redelegationEntry!==null&&(S.redelegationEntry=e.RedelegationEntry.fromPartial(h.redelegationEntry)),S.balance=h.balance??"",S}};function H(){return{redelegation:e.Redelegation.fromPartial({}),entries:[]}}e.RedelegationResponse={typeUrl:"/cosmos.staking.v1beta1.RedelegationResponse",encode(h,S=E.BinaryWriter.create()){h.redelegation!==void 0&&e.Redelegation.encode(h.redelegation,S.uint32(10).fork()).ldelim();for(const A of h.entries)e.RedelegationEntryResponse.encode(A,S.uint32(18).fork()).ldelim();return S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=H();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.redelegation=e.Redelegation.decode(A,A.uint32());break;case 2:L.entries.push(e.RedelegationEntryResponse.decode(A,A.uint32()));break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=H();return(0,C.isSet)(h.redelegation)&&(S.redelegation=e.Redelegation.fromJSON(h.redelegation)),Array.isArray(h==null?void 0:h.entries)&&(S.entries=h.entries.map(A=>e.RedelegationEntryResponse.fromJSON(A))),S},toJSON(h){const S={};return h.redelegation!==void 0&&(S.redelegation=h.redelegation?e.Redelegation.toJSON(h.redelegation):void 0),h.entries?S.entries=h.entries.map(A=>A?e.RedelegationEntryResponse.toJSON(A):void 0):S.entries=[],S},fromPartial(h){var A;const S=H();return h.redelegation!==void 0&&h.redelegation!==null&&(S.redelegation=e.Redelegation.fromPartial(h.redelegation)),S.entries=((A=h.entries)==null?void 0:A.map(Q=>e.RedelegationEntryResponse.fromPartial(Q)))||[],S}};function a(){return{notBondedTokens:"",bondedTokens:""}}e.Pool={typeUrl:"/cosmos.staking.v1beta1.Pool",encode(h,S=E.BinaryWriter.create()){return h.notBondedTokens!==""&&S.uint32(10).string(h.notBondedTokens),h.bondedTokens!==""&&S.uint32(18).string(h.bondedTokens),S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=a();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.notBondedTokens=A.string();break;case 2:L.bondedTokens=A.string();break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=a();return(0,C.isSet)(h.notBondedTokens)&&(S.notBondedTokens=String(h.notBondedTokens)),(0,C.isSet)(h.bondedTokens)&&(S.bondedTokens=String(h.bondedTokens)),S},toJSON(h){const S={};return h.notBondedTokens!==void 0&&(S.notBondedTokens=h.notBondedTokens),h.bondedTokens!==void 0&&(S.bondedTokens=h.bondedTokens),S},fromPartial(h){const S=a();return S.notBondedTokens=h.notBondedTokens??"",S.bondedTokens=h.bondedTokens??"",S}};function g(){return{updates:[]}}e.ValidatorUpdates={typeUrl:"/cosmos.staking.v1beta1.ValidatorUpdates",encode(h,S=E.BinaryWriter.create()){for(const A of h.updates)v.ValidatorUpdate.encode(A,S.uint32(10).fork()).ldelim();return S},decode(h,S){const A=h instanceof E.BinaryReader?h:new E.BinaryReader(h);let Q=S===void 0?A.len:A.pos+S;const L=g();for(;A.pos<Q;){const G=A.uint32();switch(G>>>3){case 1:L.updates.push(v.ValidatorUpdate.decode(A,A.uint32()));break;default:A.skipType(G&7);break}}return L},fromJSON(h){const S=g();return Array.isArray(h==null?void 0:h.updates)&&(S.updates=h.updates.map(A=>v.ValidatorUpdate.fromJSON(A))),S},toJSON(h){const S={};return h.updates?S.updates=h.updates.map(A=>A?v.ValidatorUpdate.toJSON(A):void 0):S.updates=[],S},fromPartial(h){var A;const S=g();return S.updates=((A=h.updates)==null?void 0:A.map(Q=>v.ValidatorUpdate.fromPartial(Q)))||[],S}}})(lu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgUpdateParamsResponse=e.MsgUpdateParams=e.MsgCancelUnbondingDelegationResponse=e.MsgCancelUnbondingDelegation=e.MsgUndelegateResponse=e.MsgUndelegate=e.MsgBeginRedelegateResponse=e.MsgBeginRedelegate=e.MsgDelegateResponse=e.MsgDelegate=e.MsgEditValidatorResponse=e.MsgEditValidator=e.MsgCreateValidatorResponse=e.MsgCreateValidator=e.protobufPackage=void 0;const n=lu,t=Re,i=ve,u=Me,R=te,v=ee;e.protobufPackage="cosmos.staking.v1beta1";function E(){return{description:n.Description.fromPartial({}),commission:n.CommissionRates.fromPartial({}),minSelfDelegation:"",delegatorAddress:"",validatorAddress:"",pubkey:void 0,value:i.Coin.fromPartial({})}}e.MsgCreateValidator={typeUrl:"/cosmos.staking.v1beta1.MsgCreateValidator",encode(r,m=R.BinaryWriter.create()){return r.description!==void 0&&n.Description.encode(r.description,m.uint32(10).fork()).ldelim(),r.commission!==void 0&&n.CommissionRates.encode(r.commission,m.uint32(18).fork()).ldelim(),r.minSelfDelegation!==""&&m.uint32(26).string(r.minSelfDelegation),r.delegatorAddress!==""&&m.uint32(34).string(r.delegatorAddress),r.validatorAddress!==""&&m.uint32(42).string(r.validatorAddress),r.pubkey!==void 0&&t.Any.encode(r.pubkey,m.uint32(50).fork()).ldelim(),r.value!==void 0&&i.Coin.encode(r.value,m.uint32(58).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=E();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.description=n.Description.decode(N,N.uint32());break;case 2:d.commission=n.CommissionRates.decode(N,N.uint32());break;case 3:d.minSelfDelegation=N.string();break;case 4:d.delegatorAddress=N.string();break;case 5:d.validatorAddress=N.string();break;case 6:d.pubkey=t.Any.decode(N,N.uint32());break;case 7:d.value=i.Coin.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=E();return(0,v.isSet)(r.description)&&(m.description=n.Description.fromJSON(r.description)),(0,v.isSet)(r.commission)&&(m.commission=n.CommissionRates.fromJSON(r.commission)),(0,v.isSet)(r.minSelfDelegation)&&(m.minSelfDelegation=String(r.minSelfDelegation)),(0,v.isSet)(r.delegatorAddress)&&(m.delegatorAddress=String(r.delegatorAddress)),(0,v.isSet)(r.validatorAddress)&&(m.validatorAddress=String(r.validatorAddress)),(0,v.isSet)(r.pubkey)&&(m.pubkey=t.Any.fromJSON(r.pubkey)),(0,v.isSet)(r.value)&&(m.value=i.Coin.fromJSON(r.value)),m},toJSON(r){const m={};return r.description!==void 0&&(m.description=r.description?n.Description.toJSON(r.description):void 0),r.commission!==void 0&&(m.commission=r.commission?n.CommissionRates.toJSON(r.commission):void 0),r.minSelfDelegation!==void 0&&(m.minSelfDelegation=r.minSelfDelegation),r.delegatorAddress!==void 0&&(m.delegatorAddress=r.delegatorAddress),r.validatorAddress!==void 0&&(m.validatorAddress=r.validatorAddress),r.pubkey!==void 0&&(m.pubkey=r.pubkey?t.Any.toJSON(r.pubkey):void 0),r.value!==void 0&&(m.value=r.value?i.Coin.toJSON(r.value):void 0),m},fromPartial(r){const m=E();return r.description!==void 0&&r.description!==null&&(m.description=n.Description.fromPartial(r.description)),r.commission!==void 0&&r.commission!==null&&(m.commission=n.CommissionRates.fromPartial(r.commission)),m.minSelfDelegation=r.minSelfDelegation??"",m.delegatorAddress=r.delegatorAddress??"",m.validatorAddress=r.validatorAddress??"",r.pubkey!==void 0&&r.pubkey!==null&&(m.pubkey=t.Any.fromPartial(r.pubkey)),r.value!==void 0&&r.value!==null&&(m.value=i.Coin.fromPartial(r.value)),m}};function C(){return{}}e.MsgCreateValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.MsgCreateValidatorResponse",encode(r,m=R.BinaryWriter.create()){return m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=C();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){default:N.skipType(l&7);break}}return d},fromJSON(r){return C()},toJSON(r){return{}},fromPartial(r){return C()}};function D(){return{description:n.Description.fromPartial({}),validatorAddress:"",commissionRate:"",minSelfDelegation:""}}e.MsgEditValidator={typeUrl:"/cosmos.staking.v1beta1.MsgEditValidator",encode(r,m=R.BinaryWriter.create()){return r.description!==void 0&&n.Description.encode(r.description,m.uint32(10).fork()).ldelim(),r.validatorAddress!==""&&m.uint32(18).string(r.validatorAddress),r.commissionRate!==""&&m.uint32(26).string(r.commissionRate),r.minSelfDelegation!==""&&m.uint32(34).string(r.minSelfDelegation),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=D();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.description=n.Description.decode(N,N.uint32());break;case 2:d.validatorAddress=N.string();break;case 3:d.commissionRate=N.string();break;case 4:d.minSelfDelegation=N.string();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=D();return(0,v.isSet)(r.description)&&(m.description=n.Description.fromJSON(r.description)),(0,v.isSet)(r.validatorAddress)&&(m.validatorAddress=String(r.validatorAddress)),(0,v.isSet)(r.commissionRate)&&(m.commissionRate=String(r.commissionRate)),(0,v.isSet)(r.minSelfDelegation)&&(m.minSelfDelegation=String(r.minSelfDelegation)),m},toJSON(r){const m={};return r.description!==void 0&&(m.description=r.description?n.Description.toJSON(r.description):void 0),r.validatorAddress!==void 0&&(m.validatorAddress=r.validatorAddress),r.commissionRate!==void 0&&(m.commissionRate=r.commissionRate),r.minSelfDelegation!==void 0&&(m.minSelfDelegation=r.minSelfDelegation),m},fromPartial(r){const m=D();return r.description!==void 0&&r.description!==null&&(m.description=n.Description.fromPartial(r.description)),m.validatorAddress=r.validatorAddress??"",m.commissionRate=r.commissionRate??"",m.minSelfDelegation=r.minSelfDelegation??"",m}};function _(){return{}}e.MsgEditValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.MsgEditValidatorResponse",encode(r,m=R.BinaryWriter.create()){return m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=_();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){default:N.skipType(l&7);break}}return d},fromJSON(r){return _()},toJSON(r){return{}},fromPartial(r){return _()}};function b(){return{delegatorAddress:"",validatorAddress:"",amount:i.Coin.fromPartial({})}}e.MsgDelegate={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",encode(r,m=R.BinaryWriter.create()){return r.delegatorAddress!==""&&m.uint32(10).string(r.delegatorAddress),r.validatorAddress!==""&&m.uint32(18).string(r.validatorAddress),r.amount!==void 0&&i.Coin.encode(r.amount,m.uint32(26).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=b();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.delegatorAddress=N.string();break;case 2:d.validatorAddress=N.string();break;case 3:d.amount=i.Coin.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=b();return(0,v.isSet)(r.delegatorAddress)&&(m.delegatorAddress=String(r.delegatorAddress)),(0,v.isSet)(r.validatorAddress)&&(m.validatorAddress=String(r.validatorAddress)),(0,v.isSet)(r.amount)&&(m.amount=i.Coin.fromJSON(r.amount)),m},toJSON(r){const m={};return r.delegatorAddress!==void 0&&(m.delegatorAddress=r.delegatorAddress),r.validatorAddress!==void 0&&(m.validatorAddress=r.validatorAddress),r.amount!==void 0&&(m.amount=r.amount?i.Coin.toJSON(r.amount):void 0),m},fromPartial(r){const m=b();return m.delegatorAddress=r.delegatorAddress??"",m.validatorAddress=r.validatorAddress??"",r.amount!==void 0&&r.amount!==null&&(m.amount=i.Coin.fromPartial(r.amount)),m}};function f(){return{}}e.MsgDelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgDelegateResponse",encode(r,m=R.BinaryWriter.create()){return m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=f();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){default:N.skipType(l&7);break}}return d},fromJSON(r){return f()},toJSON(r){return{}},fromPartial(r){return f()}};function p(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",amount:i.Coin.fromPartial({})}}e.MsgBeginRedelegate={typeUrl:"/cosmos.staking.v1beta1.MsgBeginRedelegate",encode(r,m=R.BinaryWriter.create()){return r.delegatorAddress!==""&&m.uint32(10).string(r.delegatorAddress),r.validatorSrcAddress!==""&&m.uint32(18).string(r.validatorSrcAddress),r.validatorDstAddress!==""&&m.uint32(26).string(r.validatorDstAddress),r.amount!==void 0&&i.Coin.encode(r.amount,m.uint32(34).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=p();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.delegatorAddress=N.string();break;case 2:d.validatorSrcAddress=N.string();break;case 3:d.validatorDstAddress=N.string();break;case 4:d.amount=i.Coin.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=p();return(0,v.isSet)(r.delegatorAddress)&&(m.delegatorAddress=String(r.delegatorAddress)),(0,v.isSet)(r.validatorSrcAddress)&&(m.validatorSrcAddress=String(r.validatorSrcAddress)),(0,v.isSet)(r.validatorDstAddress)&&(m.validatorDstAddress=String(r.validatorDstAddress)),(0,v.isSet)(r.amount)&&(m.amount=i.Coin.fromJSON(r.amount)),m},toJSON(r){const m={};return r.delegatorAddress!==void 0&&(m.delegatorAddress=r.delegatorAddress),r.validatorSrcAddress!==void 0&&(m.validatorSrcAddress=r.validatorSrcAddress),r.validatorDstAddress!==void 0&&(m.validatorDstAddress=r.validatorDstAddress),r.amount!==void 0&&(m.amount=r.amount?i.Coin.toJSON(r.amount):void 0),m},fromPartial(r){const m=p();return m.delegatorAddress=r.delegatorAddress??"",m.validatorSrcAddress=r.validatorSrcAddress??"",m.validatorDstAddress=r.validatorDstAddress??"",r.amount!==void 0&&r.amount!==null&&(m.amount=i.Coin.fromPartial(r.amount)),m}};function k(){return{completionTime:u.Timestamp.fromPartial({})}}e.MsgBeginRedelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgBeginRedelegateResponse",encode(r,m=R.BinaryWriter.create()){return r.completionTime!==void 0&&u.Timestamp.encode(r.completionTime,m.uint32(10).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=k();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.completionTime=u.Timestamp.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=k();return(0,v.isSet)(r.completionTime)&&(m.completionTime=(0,v.fromJsonTimestamp)(r.completionTime)),m},toJSON(r){const m={};return r.completionTime!==void 0&&(m.completionTime=(0,v.fromTimestamp)(r.completionTime).toISOString()),m},fromPartial(r){const m=k();return r.completionTime!==void 0&&r.completionTime!==null&&(m.completionTime=u.Timestamp.fromPartial(r.completionTime)),m}};function o(){return{delegatorAddress:"",validatorAddress:"",amount:i.Coin.fromPartial({})}}e.MsgUndelegate={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",encode(r,m=R.BinaryWriter.create()){return r.delegatorAddress!==""&&m.uint32(10).string(r.delegatorAddress),r.validatorAddress!==""&&m.uint32(18).string(r.validatorAddress),r.amount!==void 0&&i.Coin.encode(r.amount,m.uint32(26).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=o();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.delegatorAddress=N.string();break;case 2:d.validatorAddress=N.string();break;case 3:d.amount=i.Coin.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=o();return(0,v.isSet)(r.delegatorAddress)&&(m.delegatorAddress=String(r.delegatorAddress)),(0,v.isSet)(r.validatorAddress)&&(m.validatorAddress=String(r.validatorAddress)),(0,v.isSet)(r.amount)&&(m.amount=i.Coin.fromJSON(r.amount)),m},toJSON(r){const m={};return r.delegatorAddress!==void 0&&(m.delegatorAddress=r.delegatorAddress),r.validatorAddress!==void 0&&(m.validatorAddress=r.validatorAddress),r.amount!==void 0&&(m.amount=r.amount?i.Coin.toJSON(r.amount):void 0),m},fromPartial(r){const m=o();return m.delegatorAddress=r.delegatorAddress??"",m.validatorAddress=r.validatorAddress??"",r.amount!==void 0&&r.amount!==null&&(m.amount=i.Coin.fromPartial(r.amount)),m}};function s(){return{completionTime:u.Timestamp.fromPartial(
3{})}}e.MsgUndelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegateResponse",encode(r,m=R.BinaryWriter.create()){return r.completionTime!==void 0&&u.Timestamp.encode(r.completionTime,m.uint32(10).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=s();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.completionTime=u.Timestamp.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=s();return(0,v.isSet)(r.completionTime)&&(m.completionTime=(0,v.fromJsonTimestamp)(r.completionTime)),m},toJSON(r){const m={};return r.completionTime!==void 0&&(m.completionTime=(0,v.fromTimestamp)(r.completionTime).toISOString()),m},fromPartial(r){const m=s();return r.completionTime!==void 0&&r.completionTime!==null&&(m.completionTime=u.Timestamp.fromPartial(r.completionTime)),m}};function y(){return{delegatorAddress:"",validatorAddress:"",amount:i.Coin.fromPartial({}),creationHeight:BigInt(0)}}e.MsgCancelUnbondingDelegation={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation",encode(r,m=R.BinaryWriter.create()){return r.delegatorAddress!==""&&m.uint32(10).string(r.delegatorAddress),r.validatorAddress!==""&&m.uint32(18).string(r.validatorAddress),r.amount!==void 0&&i.Coin.encode(r.amount,m.uint32(26).fork()).ldelim(),r.creationHeight!==BigInt(0)&&m.uint32(32).int64(r.creationHeight),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=y();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.delegatorAddress=N.string();break;case 2:d.validatorAddress=N.string();break;case 3:d.amount=i.Coin.decode(N,N.uint32());break;case 4:d.creationHeight=N.int64();break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=y();return(0,v.isSet)(r.delegatorAddress)&&(m.delegatorAddress=String(r.delegatorAddress)),(0,v.isSet)(r.validatorAddress)&&(m.validatorAddress=String(r.validatorAddress)),(0,v.isSet)(r.amount)&&(m.amount=i.Coin.fromJSON(r.amount)),(0,v.isSet)(r.creationHeight)&&(m.creationHeight=BigInt(r.creationHeight.toString())),m},toJSON(r){const m={};return r.delegatorAddress!==void 0&&(m.delegatorAddress=r.delegatorAddress),r.validatorAddress!==void 0&&(m.validatorAddress=r.validatorAddress),r.amount!==void 0&&(m.amount=r.amount?i.Coin.toJSON(r.amount):void 0),r.creationHeight!==void 0&&(m.creationHeight=(r.creationHeight||BigInt(0)).toString()),m},fromPartial(r){const m=y();return m.delegatorAddress=r.delegatorAddress??"",m.validatorAddress=r.validatorAddress??"",r.amount!==void 0&&r.amount!==null&&(m.amount=i.Coin.fromPartial(r.amount)),r.creationHeight!==void 0&&r.creationHeight!==null&&(m.creationHeight=BigInt(r.creationHeight.toString())),m}};function w(){return{}}e.MsgCancelUnbondingDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse",encode(r,m=R.BinaryWriter.create()){return m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=w();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){default:N.skipType(l&7);break}}return d},fromJSON(r){return w()},toJSON(r){return{}},fromPartial(r){return w()}};function J(){return{authority:"",params:n.Params.fromPartial({})}}e.MsgUpdateParams={typeUrl:"/cosmos.staking.v1beta1.MsgUpdateParams",encode(r,m=R.BinaryWriter.create()){return r.authority!==""&&m.uint32(10).string(r.authority),r.params!==void 0&&n.Params.encode(r.params,m.uint32(18).fork()).ldelim(),m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=J();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){case 1:d.authority=N.string();break;case 2:d.params=n.Params.decode(N,N.uint32());break;default:N.skipType(l&7);break}}return d},fromJSON(r){const m=J();return(0,v.isSet)(r.authority)&&(m.authority=String(r.authority)),(0,v.isSet)(r.params)&&(m.params=n.Params.fromJSON(r.params)),m},toJSON(r){const m={};return r.authority!==void 0&&(m.authority=r.authority),r.params!==void 0&&(m.params=r.params?n.Params.toJSON(r.params):void 0),m},fromPartial(r){const m=J();return m.authority=r.authority??"",r.params!==void 0&&r.params!==null&&(m.params=n.Params.fromPartial(r.params)),m}};function P(){return{}}e.MsgUpdateParamsResponse={typeUrl:"/cosmos.staking.v1beta1.MsgUpdateParamsResponse",encode(r,m=R.BinaryWriter.create()){return m},decode(r,m){const N=r instanceof R.BinaryReader?r:new R.BinaryReader(r);let V=m===void 0?N.len:N.pos+m;const d=P();for(;N.pos<V;){const l=N.uint32();switch(l>>>3){default:N.skipType(l&7);break}}return d},fromJSON(r){return P()},toJSON(r){return{}},fromPartial(r){return P()}};class U{constructor(m){this.rpc=m,this.CreateValidator=this.CreateValidator.bind(this),this.EditValidator=this.EditValidator.bind(this),this.Delegate=this.Delegate.bind(this),this.BeginRedelegate=this.BeginRedelegate.bind(this),this.Undelegate=this.Undelegate.bind(this),this.CancelUnbondingDelegation=this.CancelUnbondingDelegation.bind(this),this.UpdateParams=this.UpdateParams.bind(this)}CreateValidator(m){const N=e.MsgCreateValidator.encode(m).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CreateValidator",N).then(d=>e.MsgCreateValidatorResponse.decode(new R.BinaryReader(d)))}EditValidator(m){const N=e.MsgEditValidator.encode(m).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","EditValidator",N).then(d=>e.MsgEditValidatorResponse.decode(new R.BinaryReader(d)))}Delegate(m){const N=e.MsgDelegate.encode(m).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Delegate",N).then(d=>e.MsgDelegateResponse.decode(new R.BinaryReader(d)))}BeginRedelegate(m){const N=e.MsgBeginRedelegate.encode(m).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","BeginRedelegate",N).then(d=>e.MsgBeginRedelegateResponse.decode(new R.BinaryReader(d)))}Undelegate(m){const N=e.MsgUndelegate.encode(m).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Undelegate",N).then(d=>e.MsgUndelegateResponse.decode(new R.BinaryReader(d)))}CancelUnbondingDelegation(m){const N=e.MsgCancelUnbondingDelegation.encode(m).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CancelUnbondingDelegation",N).then(d=>e.MsgCancelUnbondingDelegationResponse.decode(new R.BinaryReader(d)))}UpdateParams(m){const N=e.MsgUpdateParams.encode(m).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","UpdateParams",N).then(d=>e.MsgUpdateParamsResponse.decode(new R.BinaryReader(d)))}}e.MsgClientImpl=U})(cu);Object.defineProperty(en,"__esModule",{value:!0});en.isMsgUndelegateEncodeObject=en.isMsgEditValidatorEncodeObject=en.isMsgDelegateEncodeObject=en.isMsgCreateValidatorEncodeObject=en.isMsgBeginRedelegateEncodeObject=en.stakingTypes=void 0;const ki=cu;en.stakingTypes=[["/cosmos.staking.v1beta1.MsgBeginRedelegate",ki.MsgBeginRedelegate],["/cosmos.staking.v1beta1.MsgCreateValidator",ki.MsgCreateValidator],["/cosmos.staking.v1beta1.MsgDelegate",ki.MsgDelegate],["/cosmos.staking.v1beta1.MsgEditValidator",ki.MsgEditValidator],["/cosmos.staking.v1beta1.MsgUndelegate",ki.MsgUndelegate]];function Jg(e){return e.typeUrl==="/cosmos.staking.v1beta1.MsgBeginRedelegate"}en.isMsgBeginRedelegateEncodeObject=Jg;function Ug(e){return e.typeUrl==="/cosmos.staking.v1beta1.MsgCreateValidator"}en.isMsgCreateValidatorEncodeObject=Ug;function Dg(e){return e.typeUrl==="/cosmos.staking.v1beta1.MsgDelegate"}en.isMsgDelegateEncodeObject=Dg;function Mg(e){return e.typeUrl==="/cosmos.staking.v1beta1.MsgEditValidator"}en.isMsgEditValidatorEncodeObject=Mg;function Hg(e){return e.typeUrl==="/cosmos.staking.v1beta1.MsgUndelegate"}en.isMsgUndelegateEncodeObject=Hg;var Ba={},Vl={};
3(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueryClientImpl=e.QueryParamsResponse=e.QueryParamsRequest=e.QueryPoolResponse=e.QueryPoolRequest=e.QueryHistoricalInfoResponse=e.QueryHistoricalInfoRequest=e.QueryDelegatorValidatorResponse=e.QueryDelegatorValidatorRequest=e.QueryDelegatorValidatorsResponse=e.QueryDelegatorValidatorsRequest=e.QueryRedelegationsResponse=e.QueryRedelegationsRequest=e.QueryDelegatorUnbondingDelegationsResponse=e.QueryDelegatorUnbondingDelegationsRequest=e.QueryDelegatorDelegationsResponse=e.QueryDelegatorDelegationsRequest=e.QueryUnbondingDelegationResponse=e.QueryUnbondingDelegationRequest=e.QueryDelegationResponse=e.QueryDelegationRequest=e.QueryValidatorUnbondingDelegationsResponse=e.QueryValidatorUnbondingDelegationsRequest=e.QueryValidatorDelegationsResponse=e.QueryValidatorDelegationsRequest=e.QueryValidatorResponse=e.QueryValidatorRequest=e.QueryValidatorsResponse=e.QueryValidatorsRequest=e.protobufPackage=void 0;const n=_e,t=lu,i=te,u=ee;e.protobufPackage="cosmos.staking.v1beta1";function R(){return{status:"",pagination:void 0}}e.QueryValidatorsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorsRequest",encode(a,g=i.BinaryWriter.create()){return a.status!==""&&g.uint32(10).string(a.status),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=R();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.status=h.string();break;case 2:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=R();return(0,u.isSet)(a.status)&&(g.status=String(a.status)),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.status!==void 0&&(g.status=a.status),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=R();return g.status=a.status??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function v(){return{validators:[],pagination:void 0}}e.QueryValidatorsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorsResponse",encode(a,g=i.BinaryWriter.create()){for(const h of a.validators)t.Validator.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=v();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.validators.push(t.Validator.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=v();return Array.isArray(a==null?void 0:a.validators)&&(g.validators=a.validators.map(h=>t.Validator.fromJSON(h))),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.validators?g.validators=a.validators.map(h=>h?t.Validator.toJSON(h):void 0):g.validators=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),g},fromPartial(a){var h;const g=v();return g.validators=((h=a.validators)==null?void 0:h.map(S=>t.Validator.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),g}};function E(){return{validatorAddr:""}}e.QueryValidatorRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorRequest",encode(a,g=i.BinaryWriter.create()){return a.validatorAddr!==""&&g.uint32(10).string(a.validatorAddr),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=E();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.validatorAddr=h.string();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=E();return(0,u.isSet)(a.validatorAddr)&&(g.validatorAddr=String(a.validatorAddr)),g},toJSON(a){const g={};return a.validatorAddr!==void 0&&(g.validatorAddr=a.validatorAddr),g},fromPartial(a){const g=E();return g.validatorAddr=a.validatorAddr??"",g}};function C(){return{validator:t.Validator.fromPartial({})}}e.QueryValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorResponse",encode(a,g=i.BinaryWriter.create()){return a.validator!==void 0&&t.Validator.encode(a.validator,g.uint32(10).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=C();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.validator=t.Validator.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=C();return(0,u.isSet)(a.validator)&&(g.validator=t.Validator.fromJSON(a.validator)),g},toJSON(a){const g={};return a.validator!==void 0&&(g.validator=a.validator?t.Validator.toJSON(a.validator):void 0),g},fromPartial(a){const g=C();return a.validator!==void 0&&a.validator!==null&&(g.validator=t.Validator.fromPartial(a.validator)),g}};function D(){return{validatorAddr:"",pagination:void 0}}e.QueryValidatorDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest",encode(a,g=i.BinaryWriter.create()){return a.validatorAddr!==""&&g.uint32(10).string(a.validatorAddr),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=D();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.validatorAddr=h.string();break;case 2:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=D();return(0,u.isSet)(a.validatorAddr)&&(g.validatorAddr=String(a.validatorAddr)),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.validatorAddr!==void 0&&(g.validatorAddr=a.validatorAddr),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=D();return g.validatorAddr=a.validatorAddr??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function _(){return{delegationResponses:[],pagination:void 0}}e.QueryValidatorDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse",encode(a,g=i.BinaryWriter.create()){for(const h of a.delegationResponses)t.DelegationResponse.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=_();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegationResponses.push(t.DelegationResponse.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=_();return Array.isArray(a==null?void 0:a.delegationResponses)&&(g.delegationResponses=a.delegationResponses.map(h=>
3t.DelegationResponse.fromJSON(h))),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.delegationResponses?g.delegationResponses=a.delegationResponses.map(h=>h?t.DelegationResponse.toJSON(h):void 0):g.delegationResponses=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),g},fromPartial(a){var h;const g=_();return g.delegationResponses=((h=a.delegationResponses)==null?void 0:h.map(S=>t.DelegationResponse.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),g}};function b(){return{validatorAddr:"",pagination:void 0}}e.QueryValidatorUnbondingDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest",encode(a,g=i.BinaryWriter.create()){return a.validatorAddr!==""&&g.uint32(10).string(a.validatorAddr),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=b();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.validatorAddr=h.string();break;case 2:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=b();return(0,u.isSet)(a.validatorAddr)&&(g.validatorAddr=String(a.validatorAddr)),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.validatorAddr!==void 0&&(g.validatorAddr=a.validatorAddr),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=b();return g.validatorAddr=a.validatorAddr??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function f(){return{unbondingResponses:[],pagination:void 0}}e.QueryValidatorUnbondingDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse",encode(a,g=i.BinaryWriter.create()){for(const h of a.unbondingResponses)t.UnbondingDelegation.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=f();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.unbondingResponses.push(t.UnbondingDelegation.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=f();return Array.isArray(a==null?void 0:a.unbondingResponses)&&(g.unbondingResponses=a.unbondingResponses.map(h=>t.UnbondingDelegation.fromJSON(h))),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.unbondingResponses?g.unbondingResponses=a.unbondingResponses.map(h=>h?t.UnbondingDelegation.toJSON(h):void 0):g.unbondingResponses=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),g},fromPartial(a){var h;const g=f();return g.unbondingResponses=((h=a.unbondingResponses)==null?void 0:h.map(S=>t.UnbondingDelegation.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),g}};function p(){return{delegatorAddr:"",validatorAddr:""}}e.QueryDelegationRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegationRequest",encode(a,g=i.BinaryWriter.create()){return a.delegatorAddr!==""&&g.uint32(10).string(a.delegatorAddr),a.validatorAddr!==""&&g.uint32(18).string(a.validatorAddr),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=p();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegatorAddr=h.string();break;case 2:A.validatorAddr=h.string();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=p();return(0,u.isSet)(a.delegatorAddr)&&(g.delegatorAddr=String(a.delegatorAddr)),(0,u.isSet)(a.validatorAddr)&&(g.validatorAddr=String(a.validatorAddr)),g},toJSON(a){const g={};return a.delegatorAddr!==void 0&&(g.delegatorAddr=a.delegatorAddr),a.validatorAddr!==void 0&&(g.validatorAddr=a.validatorAddr),g},fromPartial(a){const g=p();return g.delegatorAddr=a.delegatorAddr??"",g.validatorAddr=a.validatorAddr??"",g}};function k(){return{delegationResponse:void 0}}e.QueryDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegationResponse",encode(a,g=i.BinaryWriter.create()){return a.delegationResponse!==void 0&&t.DelegationResponse.encode(a.delegationResponse,g.uint32(10).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=k();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegationResponse=t.DelegationResponse.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=k();return(0,u.isSet)(a.delegationResponse)&&(g.delegationResponse=t.DelegationResponse.fromJSON(a.delegationResponse)),g},toJSON(a){const g={};return a.delegationResponse!==void 0&&(g.delegationResponse=a.delegationResponse?t.DelegationResponse.toJSON(a.delegationResponse):void 0),g},fromPartial(a){const g=k();return a.delegationResponse!==void 0&&a.delegationResponse!==null&&(g.delegationResponse=t.DelegationResponse.fromPartial(a.delegationResponse)),g}};function o(){return{delegatorAddr:"",validatorAddr:""}}
3e.QueryUnbondingDelegationRequest={typeUrl:"/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest",encode(a,g=i.BinaryWriter.create()){return a.delegatorAddr!==""&&g.uint32(10).string(a.delegatorAddr),a.validatorAddr!==""&&g.uint32(18).string(a.validatorAddr),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=o();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegatorAddr=h.string();break;case 2:A.validatorAddr=h.string();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=o();return(0,u.isSet)(a.delegatorAddr)&&(g.delegatorAddr=String(a.delegatorAddr)),(0,u.isSet)(a.validatorAddr)&&(g.validatorAddr=String(a.validatorAddr)),g},toJSON(a){const g={};return a.delegatorAddr!==void 0&&(g.delegatorAddr=a.delegatorAddr),a.validatorAddr!==void 0&&(g.validatorAddr=a.validatorAddr),g},fromPartial(a){const g=o();return g.delegatorAddr=a.delegatorAddr??"",g.validatorAddr=a.validatorAddr??"",g}};function s(){return{unbond:t.UnbondingDelegation.fromPartial({})}}e.QueryUnbondingDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse",encode(a,g=i.BinaryWriter.create()){return a.unbond!==void 0&&t.UnbondingDelegation.encode(a.unbond,g.uint32(10).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=s();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.unbond=t.UnbondingDelegation.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=s();return(0,u.isSet)(a.unbond)&&(g.unbond=t.UnbondingDelegation.fromJSON(a.unbond)),g},toJSON(a){const g={};return a.unbond!==void 0&&(g.unbond=a.unbond?t.UnbondingDelegation.toJSON(a.unbond):void 0),g},fromPartial(a){const g=s();return a.unbond!==void 0&&a.unbond!==null&&(g.unbond=t.UnbondingDelegation.fromPartial(a.unbond)),g}};function y(){return{delegatorAddr:"",pagination:void 0}}e.QueryDelegatorDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest",encode(a,g=i.BinaryWriter.create()){return a.delegatorAddr!==""&&g.uint32(10).string(a.delegatorAddr),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=y();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegatorAddr=h.string();break;case 2:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=y();return(0,u.isSet)(a.delegatorAddr)&&(g.delegatorAddr=String(a.delegatorAddr)),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.delegatorAddr!==void 0&&(g.delegatorAddr=a.delegatorAddr),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=y();return g.delegatorAddr=a.delegatorAddr??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function w(){return{delegationResponses:[],pagination:void 0}}e.QueryDelegatorDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse",encode(a,g=i.BinaryWriter.create()){for(const h of a.delegationResponses)t.DelegationResponse.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=w();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegationResponses.push(t.DelegationResponse.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=w();return Array.isArray(a==null?void 0:a.delegationResponses)&&(g.delegationResponses=a.delegationResponses.map(h=>t.DelegationResponse.fromJSON(h))),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.delegationResponses?g.delegationResponses=a.delegationResponses.map(h=>h?t.DelegationResponse.toJSON(h):void 0):g.delegationResponses=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),g},fromPartial(a){var h;const g=w();return g.delegationResponses=((h=a.delegationResponses)==null?void 0:h.map(S=>t.DelegationResponse.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),g}};function J(){return{delegatorAddr:"",pagination:void 0}}e.QueryDelegatorUnbondingDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest",encode(a,g=i.BinaryWriter.create()){return a.delegatorAddr!==""&&g.uint32(10).string(a.delegatorAddr),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=J();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegatorAddr=h.string();break;case 2:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=J();return(0,u.isSet)(a.delegatorAddr)&&(g.delegatorAddr=String(a.delegatorAddr)),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.delegatorAddr!==void 0&&(g.delegatorAddr=a.delegatorAddr),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=J();return g.delegatorAddr=a.delegatorAddr??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function P(){return{unbondingResponses:[],pagination:void 0}}e.QueryDelegatorUnbondingDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse",encode(a,g=i.BinaryWriter.create()){for(const h of a.unbondingResponses)t.UnbondingDelegation.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=P();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.unbondingResponses.push(t.UnbondingDelegation.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=P();return Array.isArray(a==null?void 0:a.unbondingResponses)&&(g.unbondingResponses=a.unbondingResponses.map(h=>
3t.UnbondingDelegation.fromJSON(h))),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.unbondingResponses?g.unbondingResponses=a.unbondingResponses.map(h=>h?t.UnbondingDelegation.toJSON(h):void 0):g.unbondingResponses=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),g},fromPartial(a){var h;const g=P();return g.unbondingResponses=((h=a.unbondingResponses)==null?void 0:h.map(S=>t.UnbondingDelegation.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),g}};function U(){return{delegatorAddr:"",srcValidatorAddr:"",dstValidatorAddr:"",pagination:void 0}}e.QueryRedelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryRedelegationsRequest",encode(a,g=i.BinaryWriter.create()){return a.delegatorAddr!==""&&g.uint32(10).string(a.delegatorAddr),a.srcValidatorAddr!==""&&g.uint32(18).string(a.srcValidatorAddr),a.dstValidatorAddr!==""&&g.uint32(26).string(a.dstValidatorAddr),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(34).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=U();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegatorAddr=h.string();break;case 2:A.srcValidatorAddr=h.string();break;case 3:A.dstValidatorAddr=h.string();break;case 4:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=U();return(0,u.isSet)(a.delegatorAddr)&&(g.delegatorAddr=String(a.delegatorAddr)),(0,u.isSet)(a.srcValidatorAddr)&&(g.srcValidatorAddr=String(a.srcValidatorAddr)),(0,u.isSet)(a.dstValidatorAddr)&&(g.dstValidatorAddr=String(a.dstValidatorAddr)),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.delegatorAddr!==void 0&&(g.delegatorAddr=a.delegatorAddr),a.srcValidatorAddr!==void 0&&(g.srcValidatorAddr=a.srcValidatorAddr),a.dstValidatorAddr!==void 0&&(g.dstValidatorAddr=a.dstValidatorAddr),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=U();return g.delegatorAddr=a.delegatorAddr??"",g.srcValidatorAddr=a.srcValidatorAddr??"",g.dstValidatorAddr=a.dstValidatorAddr??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function r(){return{redelegationResponses:[],pagination:void 0}}e.QueryRedelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryRedelegationsResponse",encode(a,g=i.BinaryWriter.create()){for(const h of a.redelegationResponses)t.RedelegationResponse.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=r();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.redelegationResponses.push(t.RedelegationResponse.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=r();return Array.isArray(a==null?void 0:a.redelegationResponses)&&(g.redelegationResponses=a.redelegationResponses.map(h=>t.RedelegationResponse.fromJSON(h))),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.redelegationResponses?g.redelegationResponses=a.redelegationResponses.map(h=>h?t.RedelegationResponse.toJSON(h):void 0):g.redelegationResponses=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),g},fromPartial(a){var h;const g=r();return g.redelegationResponses=((h=a.redelegationResponses)==null?void 0:h.map(S=>t.RedelegationResponse.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),g}};function m(){return{delegatorAddr:"",pagination:void 0}}e.QueryDelegatorValidatorsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest",encode(a,g=i.BinaryWriter.create()){return a.delegatorAddr!==""&&g.uint32(10).string(a.delegatorAddr),a.pagination!==void 0&&n.PageRequest.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=m();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegatorAddr=h.string();break;case 2:A.pagination=n.PageRequest.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=m();return(0,u.isSet)(a.delegatorAddr)&&(g.delegatorAddr=String(a.delegatorAddr)),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageRequest.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.delegatorAddr!==void 0&&(g.delegatorAddr=a.delegatorAddr),a.pagination!==void 0&&(g.pagination=a.pagination?n.PageRequest.toJSON(a.pagination):void 0),g},fromPartial(a){const g=m();return g.delegatorAddr=a.delegatorAddr??"",a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageRequest.fromPartial(a.pagination)),g}};function N(){return{validators:[],pagination:void 0}}e.QueryDelegatorValidatorsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse",encode(a,g=i.BinaryWriter.create()){for(const h of a.validators)t.Validator.encode(h,g.uint32(10).fork()).ldelim();return a.pagination!==void 0&&n.PageResponse.encode(a.pagination,g.uint32(18).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=N();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.validators.push(t.Validator.decode(h,h.uint32()));break;case 2:A.pagination=n.PageResponse.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=N();return Array.isArray(a==null?void 0:a.validators)&&(g.validators=a.validators.map(h=>
3t.Validator.fromJSON(h))),(0,u.isSet)(a.pagination)&&(g.pagination=n.PageResponse.fromJSON(a.pagination)),g},toJSON(a){const g={};return a.validators?g.validators=a.validators.map(h=>h?t.Validator.toJSON(h):void 0):g.validators=[],a.pagination!==void 0&&(g.pagination=a.pagination?n.PageResponse.toJSON(a.pagination):void 0),g},fromPartial(a){var h;const g=N();return g.validators=((h=a.validators)==null?void 0:h.map(S=>t.Validator.fromPartial(S)))||[],a.pagination!==void 0&&a.pagination!==null&&(g.pagination=n.PageResponse.fromPartial(a.pagination)),g}};function V(){return{delegatorAddr:"",validatorAddr:""}}e.QueryDelegatorValidatorRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest",encode(a,g=i.BinaryWriter.create()){return a.delegatorAddr!==""&&g.uint32(10).string(a.delegatorAddr),a.validatorAddr!==""&&g.uint32(18).string(a.validatorAddr),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=V();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.delegatorAddr=h.string();break;case 2:A.validatorAddr=h.string();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=V();return(0,u.isSet)(a.delegatorAddr)&&(g.delegatorAddr=String(a.delegatorAddr)),(0,u.isSet)(a.validatorAddr)&&(g.validatorAddr=String(a.validatorAddr)),g},toJSON(a){const g={};return a.delegatorAddr!==void 0&&(g.delegatorAddr=a.delegatorAddr),a.validatorAddr!==void 0&&(g.validatorAddr=a.validatorAddr),g},fromPartial(a){const g=V();return g.delegatorAddr=a.delegatorAddr??"",g.validatorAddr=a.validatorAddr??"",g}};function d(){return{validator:t.Validator.fromPartial({})}}e.QueryDelegatorValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse",encode(a,g=i.BinaryWriter.create()){return a.validator!==void 0&&t.Validator.encode(a.validator,g.uint32(10).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=d();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.validator=t.Validator.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=d();return(0,u.isSet)(a.validator)&&(g.validator=t.Validator.fromJSON(a.validator)),g},toJSON(a){const g={};return a.validator!==void 0&&(g.validator=a.validator?t.Validator.toJSON(a.validator):void 0),g},fromPartial(a){const g=d();return a.validator!==void 0&&a.validator!==null&&(g.validator=t.Validator.fromPartial(a.validator)),g}};function l(){return{height:BigInt(0)}}e.QueryHistoricalInfoRequest={typeUrl:"/cosmos.staking.v1beta1.QueryHistoricalInfoRequest",encode(a,g=i.BinaryWriter.create()){return a.height!==BigInt(0)&&g.uint32(8).int64(a.height),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=l();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.height=h.int64();break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=l();return(0,u.isSet)(a.height)&&(g.height=BigInt(a.height.toString())),g},toJSON(a){const g={};return a.height!==void 0&&(g.height=(a.height||BigInt(0)).toString()),g},fromPartial(a){const g=l();return a.height!==void 0&&a.height!==null&&(g.height=BigInt(a.height.toString())),g}};function T(){return{hist:void 0}}e.QueryHistoricalInfoResponse={typeUrl:"/cosmos.staking.v1beta1.QueryHistoricalInfoResponse",encode(a,g=i.BinaryWriter.create()){return a.hist!==void 0&&t.HistoricalInfo.encode(a.hist,g.uint32(10).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=T();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.hist=t.HistoricalInfo.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=T();return(0,u.isSet)(a.hist)&&(g.hist=t.HistoricalInfo.fromJSON(a.hist)),g},toJSON(a){const g={};return a.hist!==void 0&&(g.hist=a.hist?t.HistoricalInfo.toJSON(a.hist):void 0),g},fromPartial(a){const g=T();return a.hist!==void 0&&a.hist!==null&&(g.hist=t.HistoricalInfo.fromPartial(a.hist)),g}};function O(){return{}}e.QueryPoolRequest={typeUrl:"/cosmos.staking.v1beta1.QueryPoolRequest",encode(a,g=i.BinaryWriter.create()){return g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=O();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){default:h.skipType(Q&7);break}}return A},fromJSON(a){return O()},toJSON(a){return{}},fromPartial(a){return O()}};function B(){return{pool:t.Pool.fromPartial({})}}e.QueryPoolResponse={typeUrl:"/cosmos.staking.v1beta1.QueryPoolResponse",encode(a,g=i.BinaryWriter.create()){return a.pool!==void 0&&t.Pool.encode(a.pool,g.uint32(10).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=B();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.pool=t.Pool.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=B();return(0,u.isSet)(a.pool)&&(g.pool=t.Pool.fromJSON(a.pool)),g},toJSON(a){const g={};return a.pool!==void 0&&(g.pool=a.pool?t.Pool.toJSON(a.pool):void 0),g},fromPartial(a){const g=B();return a.pool!==void 0&&a.pool!==null&&(g.pool=t.Pool.fromPartial(a.pool)),g}};function M(){return{}}e.QueryParamsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryParamsRequest",encode(a,g=i.BinaryWriter.create()){return g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=M();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){default:h.skipType(Q&7);break}}return A},fromJSON(a){return M()},toJSON(a){return{}},fromPartial(a){return M()}};function W(){return{params:t.Params.fromPartial({})}}e.QueryParamsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryParamsResponse",encode(a,g=i.BinaryWriter.create()){return a.params!==void 0&&t.Params.encode(a.params,g.uint32(10).fork()).ldelim(),g},decode(a,g){const h=a instanceof i.BinaryReader?a:new i.BinaryReader(a);let S=g===void 0?h.len:h.pos+g;const A=W();for(;h.pos<S;){const Q=h.uint32();switch(Q>>>3){case 1:A.params=t.Params.decode(h,h.uint32());break;default:h.skipType(Q&7);break}}return A},fromJSON(a){const g=W();return(0,u.isSet)(a.params)&&(g.params=t.Params.fromJSON(a.params)),g},toJSON(a){const g={};return a.params!==void 0&&(g.params=a.params?t.Params.toJSON(a.params):void 0),g},fromPartial(a){const g=W();return a.params!==void 0&&a.params!==null&&(g.params=t.Params.fromPartial(a.params)),g}};class H{constructor(g){this.rpc=g,this.Validators=this.Validators.bind(this),this.Validator=this.Validator.bind(this),this.ValidatorDelegations=this.ValidatorDelegations.bind(this),this.ValidatorUnbondingDelegations=this.ValidatorUnbondingDelegations.bind(this),this.Delegation=this.Delegation.bind(this),this.UnbondingDelegation=this.UnbondingDelegation.bind(this),this.DelegatorDelegations=this.DelegatorDelegations.bind(this),this.DelegatorUnbondingDelegations=this.DelegatorUnbondingDelegations.bind(this),this.Redelegations=this.Redelegations.bind(this),this.DelegatorValidators=this.DelegatorValidators.bind(this),this.DelegatorValidator=this.DelegatorValidator.bind(this),this.HistoricalInfo=this.HistoricalInfo.bind(this),this.Pool=this.Pool.bind(this),this.Params=this.Params.bind(this)}Validators(g){const h=e.QueryValidatorsRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Validators",h).then(A=>e.QueryValidatorsResponse.decode(new i.BinaryReader(A)))}Validator(g){const h=e.QueryValidatorRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Validator",h).then(A=>e.QueryValidatorResponse.decode(new i.BinaryReader(A)))}ValidatorDelegations(g){const h=e.QueryValidatorDelegationsRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","ValidatorDelegations",h).then(A=>e.QueryValidatorDelegationsResponse.decode(new i.BinaryReader(A)))}ValidatorUnbondingDelegations(g){const h=e.QueryValidatorUnbondingDelegationsRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","ValidatorUnbondingDelegations",h).then(A=>e.QueryValidatorUnbondingDelegationsResponse.decode(new i.BinaryReader(A)))}Delegation(g){const h=e.QueryDelegationRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Delegation",h).then(A=>e.QueryDelegationResponse.decode(new i.BinaryReader(A)))}UnbondingDelegation(g){const h=e.QueryUnbondingDelegationRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","UnbondingDelegation",h).then(A=>e.QueryUnbondingDelegationResponse.decode(new i.BinaryReader(A)))}DelegatorDelegations(g){const h=e.QueryDelegatorDelegationsRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorDelegations",h).then(A=>e.QueryDelegatorDelegationsResponse.decode(new i.BinaryReader(A)))}DelegatorUnbondingDelegations(g){const h=e.QueryDelegatorUnbondingDelegationsRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorUnbondingDelegations",h).then(A=>e.QueryDelegatorUnbondingDelegationsResponse.decode(new i.BinaryReader(A)))}Redelegations(g){const h=e.QueryRedelegationsRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Redelegations",h).then(A=>e.QueryRedelegationsResponse.decode(new i.BinaryReader(A)))}DelegatorValidators(g){const h=e.QueryDelegatorValidatorsRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorValidators",h).then(A=>e.QueryDelegatorValidatorsResponse.decode(new i.BinaryReader(A)))}DelegatorValidator(g){const h=e.QueryDelegatorValidatorRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorValidator",h).then(A=>e.QueryDelegatorValidatorResponse.decode(new i.BinaryReader(A)))}HistoricalInfo(g){const h=e.QueryHistoricalInfoRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","HistoricalInfo",h).then(A=>e.QueryHistoricalInfoResponse.decode(new i.BinaryReader(A)))}Pool(g={}){const h=e.QueryPoolRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Pool",h).then(A=>e.QueryPoolResponse.decode(new i.BinaryReader(A)))}Params(g={}){const h=e.QueryParamsRequest.encode(g).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Params",h).then(A=>e.QueryParamsResponse.decode(new i.BinaryReader(A)))}}e.QueryClientImpl=H})(Vl);Object.defineProperty(Ba,"__esModule",{value:!0});Ba.setupStakingExtension=void 0;const qg=Vl,ct=Ke;function Vg(e){const n=(0,ct.createProtobufRpcClient)(e),t=new qg.QueryClientImpl(n);return{staking:{delegation:async(i,u)=>await t.Delegation({delegatorAddr:i,validatorAddr:u}),delegatorDelegations:async(i,u)=>await t.DelegatorDelegations({delegatorAddr:i,pagination:(0,ct.createPagination)(u)}),delegatorUnbondingDelegations:async(i,u)=>await t.DelegatorUnbondingDelegations({delegatorAddr:i,pagination:(0,ct.createPagination)(u)}),delegatorValidator:async(i,u)=>await t.DelegatorValidator({delegatorAddr:i,validatorAddr:u}),delegatorValidators:async(i,u)=>await t.DelegatorValidators({delegatorAddr:i,pagination:(0,ct.createPagination)(u)}),historicalInfo:async i=>await t.HistoricalInfo({height:BigInt(i)}),params:async()=>await t.Params({}),pool:async()=>await t.Pool({}),redelegations:async(i,u,R,v)=>await t.Redelegations({delegatorAddr:i,srcValidatorAddr:u,dstValidatorAddr:R,pagination:(0,ct.createPagination)(v)}),unbondingDelegation:async(i,u)=>await t.UnbondingDelegation({delegatorAddr:i,validatorAddr:u}),validator:async i=>await t.Validator({validatorAddr:i}),validatorDelegations:async(i,u)=>await t.ValidatorDelegations({validatorAddr:i,pagination:(0,ct.createPagination)(u)}
3),validators:async(i,u)=>await t.Validators({status:i,pagination:(0,ct.createPagination)(u)}),validatorUnbondingDelegations:async(i,u)=>await t.ValidatorUnbondingDelegations({validatorAddr:i,pagination:(0,ct.createPagination)(u)})}}}Ba.setupStakingExtension=Vg;var va={},Ql={},pu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SearchTxsResult=e.TxMsgData=e.MsgData=e.SimulationResponse=e.Result=e.GasInfo=e.Attribute=e.StringEvent=e.ABCIMessageLog=e.TxResponse=e.protobufPackage=void 0;const n=Re,t=fu,i=te,u=ee;e.protobufPackage="cosmos.base.abci.v1beta1";function R(){return{height:BigInt(0),txhash:"",codespace:"",code:0,data:"",rawLog:"",logs:[],info:"",gasWanted:BigInt(0),gasUsed:BigInt(0),tx:void 0,timestamp:"",events:[]}}e.TxResponse={typeUrl:"/cosmos.base.abci.v1beta1.TxResponse",encode(o,s=i.BinaryWriter.create()){o.height!==BigInt(0)&&s.uint32(8).int64(o.height),o.txhash!==""&&s.uint32(18).string(o.txhash),o.codespace!==""&&s.uint32(26).string(o.codespace),o.code!==0&&s.uint32(32).uint32(o.code),o.data!==""&&s.uint32(42).string(o.data),o.rawLog!==""&&s.uint32(50).string(o.rawLog);for(const y of o.logs)e.ABCIMessageLog.encode(y,s.uint32(58).fork()).ldelim();o.info!==""&&s.uint32(66).string(o.info),o.gasWanted!==BigInt(0)&&s.uint32(72).int64(o.gasWanted),o.gasUsed!==BigInt(0)&&s.uint32(80).int64(o.gasUsed),o.tx!==void 0&&n.Any.encode(o.tx,s.uint32(90).fork()).ldelim(),o.timestamp!==""&&s.uint32(98).string(o.timestamp);for(const y of o.events)t.Event.encode(y,s.uint32(106).fork()).ldelim();return s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=R();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.height=y.int64();break;case 2:J.txhash=y.string();break;case 3:J.codespace=y.string();break;case 4:J.code=y.uint32();break;case 5:J.data=y.string();break;case 6:J.rawLog=y.string();break;case 7:J.logs.push(e.ABCIMessageLog.decode(y,y.uint32()));break;case 8:J.info=y.string();break;case 9:J.gasWanted=y.int64();break;case 10:J.gasUsed=y.int64();break;case 11:J.tx=n.Any.decode(y,y.uint32());break;case 12:J.timestamp=y.string();break;case 13:J.events.push(t.Event.decode(y,y.uint32()));break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=R();return(0,u.isSet)(o.height)&&(s.height=BigInt(o.height.toString())),(0,u.isSet)(o.txhash)&&(s.txhash=String(o.txhash)),(0,u.isSet)(o.codespace)&&(s.codespace=String(o.codespace)),(0,u.isSet)(o.code)&&(s.code=Number(o.code)),(0,u.isSet)(o.data)&&(s.data=String(o.data)),(0,u.isSet)(o.rawLog)&&(s.rawLog=String(o.rawLog)),Array.isArray(o==null?void 0:o.logs)&&(s.logs=o.logs.map(y=>e.ABCIMessageLog.fromJSON(y))),(0,u.isSet)(o.info)&&(s.info=String(o.info)),(0,u.isSet)(o.gasWanted)&&(s.gasWanted=BigInt(o.gasWanted.toString())),(0,u.isSet)(o.gasUsed)&&(s.gasUsed=BigInt(o.gasUsed.toString())),(0,u.isSet)(o.tx)&&(s.tx=n.Any.fromJSON(o.tx)),(0,u.isSet)(o.timestamp)&&(s.timestamp=String(o.timestamp)),Array.isArray(o==null?void 0:o.events)&&(s.events=o.events.map(y=>t.Event.fromJSON(y))),s},toJSON(o){const s={};return o.height!==void 0&&(s.height=(o.height||BigInt(0)).toString()),o.txhash!==void 0&&(s.txhash=o.txhash),o.codespace!==void 0&&(s.codespace=o.codespace),o.code!==void 0&&(s.code=Math.round(o.code)),o.data!==void 0&&(s.data=o.data),o.rawLog!==void 0&&(s.rawLog=o.rawLog),o.logs?s.logs=o.logs.map(y=>y?e.ABCIMessageLog.toJSON(y):void 0):s.logs=[],o.info!==void 0&&(s.info=o.info),o.gasWanted!==void 0&&(s.gasWanted=(o.gasWanted||BigInt(0)).toString()),o.gasUsed!==void 0&&(s.gasUsed=(o.gasUsed||BigInt(0)).toString()),o.tx!==void 0&&(s.tx=o.tx?n.Any.toJSON(o.tx):void 0),o.timestamp!==void 0&&(s.timestamp=o.timestamp),o.events?s.events=o.events.map(y=>y?t.Event.toJSON(y):void 0):s.events=[],s},fromPartial(o){var y,w;const s=R();return o.height!==void 0&&o.height!==null&&(s.height=BigInt(o.height.toString())),s.txhash=o.txhash??"",s.codespace=o.codespace??"",s.code=o.code??0,s.data=o.data??"",s.rawLog=o.rawLog??"",s.logs=((y=o.logs)==null?void 0:y.map(J=>e.ABCIMessageLog.fromPartial(J)))||[],s.info=o.info??"",o.gasWanted!==void 0&&o.gasWanted!==null&&(s.gasWanted=BigInt(o.gasWanted.toString())),o.gasUsed!==void 0&&o.gasUsed!==null&&(s.gasUsed=BigInt(o.gasUsed.toString())),o.tx!==void 0&&o.tx!==null&&(s.tx=n.Any.fromPartial(o.tx)),s.timestamp=o.timestamp??"",s.events=((w=o.events)==null?void 0:w.map(J=>t.Event.fromPartial(J)))||[],s}};function v(){return{msgIndex:0,log:"",events:[]}}e.ABCIMessageLog={typeUrl:"/cosmos.base.abci.v1beta1.ABCIMessageLog",encode(o,s=i.BinaryWriter.create()){o.msgIndex!==0&&s.uint32(8).uint32(o.msgIndex),o.log!==""&&s.uint32(18).string(o.log);for(const y of o.events)e.StringEvent.encode(y,s.uint32(26).fork()).ldelim();return s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=v();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.msgIndex=y.uint32();break;case 2:J.log=y.string();break;case 3:J.events.push(e.StringEvent.decode(y,y.uint32()));break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=v();return(0,u.isSet)(o.msgIndex)&&(s.msgIndex=Number(o.msgIndex)),(0,u.
3isSet)(o.log)&&(s.log=String(o.log)),Array.isArray(o==null?void 0:o.events)&&(s.events=o.events.map(y=>e.StringEvent.fromJSON(y))),s},toJSON(o){const s={};return o.msgIndex!==void 0&&(s.msgIndex=Math.round(o.msgIndex)),o.log!==void 0&&(s.log=o.log),o.events?s.events=o.events.map(y=>y?e.StringEvent.toJSON(y):void 0):s.events=[],s},fromPartial(o){var y;const s=v();return s.msgIndex=o.msgIndex??0,s.log=o.log??"",s.events=((y=o.events)==null?void 0:y.map(w=>e.StringEvent.fromPartial(w)))||[],s}};function E(){return{type:"",attributes:[]}}e.StringEvent={typeUrl:"/cosmos.base.abci.v1beta1.StringEvent",encode(o,s=i.BinaryWriter.create()){o.type!==""&&s.uint32(10).string(o.type);for(const y of o.attributes)e.Attribute.encode(y,s.uint32(18).fork()).ldelim();return s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=E();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.type=y.string();break;case 2:J.attributes.push(e.Attribute.decode(y,y.uint32()));break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=E();return(0,u.isSet)(o.type)&&(s.type=String(o.type)),Array.isArray(o==null?void 0:o.attributes)&&(s.attributes=o.attributes.map(y=>e.Attribute.fromJSON(y))),s},toJSON(o){const s={};return o.type!==void 0&&(s.type=o.type),o.attributes?s.attributes=o.attributes.map(y=>y?e.Attribute.toJSON(y):void 0):s.attributes=[],s},fromPartial(o){var y;const s=E();return s.type=o.type??"",s.attributes=((y=o.attributes)==null?void 0:y.map(w=>e.Attribute.fromPartial(w)))||[],s}};function C(){return{key:"",value:""}}e.Attribute={typeUrl:"/cosmos.base.abci.v1beta1.Attribute",encode(o,s=i.BinaryWriter.create()){return o.key!==""&&s.uint32(10).string(o.key),o.value!==""&&s.uint32(18).string(o.value),s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=C();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.key=y.string();break;case 2:J.value=y.string();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=C();return(0,u.isSet)(o.key)&&(s.key=String(o.key)),(0,u.isSet)(o.value)&&(s.value=String(o.value)),s},toJSON(o){const s={};return o.key!==void 0&&(s.key=o.key),o.value!==void 0&&(s.value=o.value),s},fromPartial(o){const s=C();return s.key=o.key??"",s.value=o.value??"",s}};function D(){return{gasWanted:BigInt(0),gasUsed:BigInt(0)}}e.GasInfo={typeUrl:"/cosmos.base.abci.v1beta1.GasInfo",encode(o,s=i.BinaryWriter.create()){return o.gasWanted!==BigInt(0)&&s.uint32(8).uint64(o.gasWanted),o.gasUsed!==BigInt(0)&&s.uint32(16).uint64(o.gasUsed),s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=D();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.gasWanted=y.uint64();break;case 2:J.gasUsed=y.uint64();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=D();return(0,u.isSet)(o.gasWanted)&&(s.gasWanted=BigInt(o.gasWanted.toString())),(0,u.isSet)(o.gasUsed)&&(s.gasUsed=BigInt(o.gasUsed.toString())),s},toJSON(o){const s={};return o.gasWanted!==void 0&&(s.gasWanted=(o.gasWanted||BigInt(0)).toString()),o.gasUsed!==void 0&&(s.gasUsed=(o.gasUsed||BigInt(0)).toString()),s},fromPartial(o){const s=D();return o.gasWanted!==void 0&&o.gasWanted!==null&&(s.gasWanted=BigInt(o.gasWanted.toString())),o.gasUsed!==void 0&&o.gasUsed!==null&&(s.gasUsed=BigInt(o.gasUsed.toString())),s}};function _(){return{data:new Uint8Array,log:"",events:[],msgResponses:[]}}e.Result={typeUrl:"/cosmos.base.abci.v1beta1.Result",encode(o,s=i.BinaryWriter.create()){o.data.length!==0&&s.uint32(10).bytes(o.data),o.log!==""&&s.uint32(18).string(o.log);for(const y of o.events)t.Event.encode(y,s.uint32(26).fork()).ldelim();for(const y of o.msgResponses)n.Any.encode(y,s.uint32(34).fork()).ldelim();return s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=_();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.data=y.bytes();break;case 2:J.log=y.string();break;case 3:J.events.push(t.Event.decode(y,y.uint32()));break;case 4:J.msgResponses.push(n.Any.decode(y,y.uint32()));break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=_();return(0,u.isSet)(o.data)&&(s.data=(0,u.bytesFromBase64)(o.data)),(0,u.
3isSet)(o.log)&&(s.log=String(o.log)),Array.isArray(o==null?void 0:o.events)&&(s.events=o.events.map(y=>t.Event.fromJSON(y))),Array.isArray(o==null?void 0:o.msgResponses)&&(s.msgResponses=o.msgResponses.map(y=>n.Any.fromJSON(y))),s},toJSON(o){const s={};return o.data!==void 0&&(s.data=(0,u.base64FromBytes)(o.data!==void 0?o.data:new Uint8Array)),o.log!==void 0&&(s.log=o.log),o.events?s.events=o.events.map(y=>y?t.Event.toJSON(y):void 0):s.events=[],o.msgResponses?s.msgResponses=o.msgResponses.map(y=>y?n.Any.toJSON(y):void 0):s.msgResponses=[],s},fromPartial(o){var y,w;const s=_();return s.data=o.data??new Uint8Array,s.log=o.log??"",s.events=((y=o.events)==null?void 0:y.map(J=>t.Event.fromPartial(J)))||[],s.msgResponses=((w=o.msgResponses)==null?void 0:w.map(J=>n.Any.fromPartial(J)))||[],s}};function b(){return{gasInfo:e.GasInfo.fromPartial({}),result:void 0}}e.SimulationResponse={typeUrl:"/cosmos.base.abci.v1beta1.SimulationResponse",encode(o,s=i.BinaryWriter.create()){return o.gasInfo!==void 0&&e.GasInfo.encode(o.gasInfo,s.uint32(10).fork()).ldelim(),o.result!==void 0&&e.Result.encode(o.result,s.uint32(18).fork()).ldelim(),s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=b();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.gasInfo=e.GasInfo.decode(y,y.uint32());break;case 2:J.result=e.Result.decode(y,y.uint32());break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=b();return(0,u.isSet)(o.gasInfo)&&(s.gasInfo=e.GasInfo.fromJSON(o.gasInfo)),(0,u.isSet)(o.result)&&(s.result=e.Result.fromJSON(o.result)),s},toJSON(o){const s={};return o.gasInfo!==void 0&&(s.gasInfo=o.gasInfo?e.GasInfo.toJSON(o.gasInfo):void 0),o.result!==void 0&&(s.result=o.result?e.Result.toJSON(o.result):void 0),s},fromPartial(o){const s=b();return o.gasInfo!==void 0&&o.gasInfo!==null&&(s.gasInfo=e.GasInfo.fromPartial(o.gasInfo)),o.result!==void 0&&o.result!==null&&(s.result=e.Result.fromPartial(o.result)),s}};function f(){return{msgType:"",data:new Uint8Array}}e.MsgData={typeUrl:"/cosmos.base.abci.v1beta1.MsgData",encode(o,s=i.BinaryWriter.create()){return o.msgType!==""&&s.uint32(10).string(o.msgType),o.data.length!==0&&s.uint32(18).bytes(o.data),s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=f();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.msgType=y.string();break;case 2:J.data=y.bytes();break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=f();return(0,u.isSet)(o.msgType)&&(s.msgType=String(o.msgType)),(0,u.isSet)(o.data)&&(s.data=(0,u.bytesFromBase64)(o.data)),s},toJSON(o){const s={};return o.msgType!==void 0&&(s.msgType=o.msgType),o.data!==void 0&&(s.data=(0,u.base64FromBytes)(o.data!==void 0?o.data:new Uint8Array)),s},fromPartial(o){const s=f();return s.msgType=o.msgType??"",s.data=o.data??new Uint8Array,s}};function p(){return{data:[],msgResponses:[]}}e.TxMsgData={typeUrl:"/cosmos.base.abci.v1beta1.TxMsgData",encode(o,s=i.BinaryWriter.create()){for(const y of o.data)e.MsgData.encode(y,s.uint32(10).fork()).ldelim();for(const y of o.msgResponses)n.Any.encode(y,s.uint32(18).fork()).ldelim();return s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=p();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.data.push(e.MsgData.decode(y,y.uint32()));break;case 2:J.msgResponses.push(n.Any.decode(y,y.uint32()));break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=p();return Array.isArray(o==null?void 0:o.data)&&(s.data=o.data.map(y=>e.MsgData.fromJSON(y))),Array.isArray(o==null?void 0:o.msgResponses)&&(s.msgResponses=o.msgResponses.map(y=>n.Any.fromJSON(y))),s},toJSON(o){const s={};return o.data?s.data=o.data.map(y=>y?e.MsgData.toJSON(y):void 0):s.data=[],o.msgResponses?s.msgResponses=o.msgResponses.map(y=>y?n.Any.toJSON(y):void 0):s.msgResponses=[],s},fromPartial(o){var y,w;const s=p();return s.data=((y=o.data)==null?void 0:y.map(J=>e.MsgData.fromPartial(J)))||[],s.msgResponses=((w=o.msgResponses)==null?void 0:w.map(J=>n.Any.fromPartial(J)))||[],s}};function k(){return{totalCount:BigInt(0),count:BigInt(0),pageNumber:BigInt(0),pageTotal:BigInt(0),limit:BigInt(0),txs:[]}}e.SearchTxsResult={typeUrl:"/cosmos.base.abci.v1beta1.SearchTxsResult",encode(o,s=i.BinaryWriter.create()){o.totalCount!==BigInt(0)&&s.uint32(8).uint64(o.totalCount),o.count!==BigInt(0)&&s.uint32(16).uint64(o.count),o.pageNumber!==BigInt(0)&&s.uint32(24).uint64(o.pageNumber),o.pageTotal!==BigInt(0)&&s.uint32(32).uint64(o.pageTotal),o.limit!==BigInt(0)&&s.uint32(40).uint64(o.limit);for(const y of o.txs)e.TxResponse.encode(y,s.uint32(50).fork()).ldelim();return s},decode(o,s){const y=o instanceof i.BinaryReader?o:new i.BinaryReader(o);let w=s===void 0?y.len:y.pos+s;const J=k();for(;y.pos<w;){const P=y.uint32();switch(P>>>3){case 1:J.totalCount=y.uint64();break;case 2:J.count=y.uint64();break;case 3:J.pageNumber=y.uint64();break;case 4:J.pageTotal=y.uint64();break;case 5:J.limit=y.uint64();break;case 6:J.txs.push(e.TxResponse.decode(y,y.uint32()));break;default:y.skipType(P&7);break}}return J},fromJSON(o){const s=k();return(0,u.isSet)(o.totalCount)&&(s.totalCount=BigInt(o.totalCount.toString())),(0,u.
3isSet)(o.count)&&(s.count=BigInt(o.count.toString())),(0,u.isSet)(o.pageNumber)&&(s.pageNumber=BigInt(o.pageNumber.toString())),(0,u.isSet)(o.pageTotal)&&(s.pageTotal=BigInt(o.pageTotal.toString())),(0,u.isSet)(o.limit)&&(s.limit=BigInt(o.limit.toString())),Array.isArray(o==null?void 0:o.txs)&&(s.txs=o.txs.map(y=>e.TxResponse.fromJSON(y))),s},toJSON(o){const s={};return o.totalCount!==void 0&&(s.totalCount=(o.totalCount||BigInt(0)).toString()),o.count!==void 0&&(s.count=(o.count||BigInt(0)).toString()),o.pageNumber!==void 0&&(s.pageNumber=(o.pageNumber||BigInt(0)).toString()),o.pageTotal!==void 0&&(s.pageTotal=(o.pageTotal||BigInt(0)).toString()),o.limit!==void 0&&(s.limit=(o.limit||BigInt(0)).toString()),o.txs?s.txs=o.txs.map(y=>y?e.TxResponse.toJSON(y):void 0):s.txs=[],s},fromPartial(o){var y;const s=k();return o.totalCount!==void 0&&o.totalCount!==null&&(s.totalCount=BigInt(o.totalCount.toString())),o.count!==void 0&&o.count!==null&&(s.count=BigInt(o.count.toString())),o.pageNumber!==void 0&&o.pageNumber!==null&&(s.pageNumber=BigInt(o.pageNumber.toString())),o.pageTotal!==void 0&&o.pageTotal!==null&&(s.pageTotal=BigInt(o.pageTotal.toString())),o.limit!==void 0&&o.limit!==null&&(s.limit=BigInt(o.limit.toString())),s.txs=((y=o.txs)==null?void 0:y.map(w=>e.TxResponse.fromPartial(w)))||[],s}}})(pu);var Lr={},Wl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EvidenceList=e.LightClientAttackEvidence=e.DuplicateVoteEvidence=e.Evidence=e.protobufPackage=void 0;const n=Wt,t=Me,i=ka,u=te,R=ee;e.protobufPackage="tendermint.types";function v(){return{duplicateVoteEvidence:void 0,lightClientAttackEvidence:void 0}}e.Evidence={typeUrl:"/tendermint.types.Evidence",encode(_,b=u.BinaryWriter.create()){return _.duplicateVoteEvidence!==void 0&&e.DuplicateVoteEvidence.encode(_.duplicateVoteEvidence,b.uint32(10).fork()).ldelim(),_.lightClientAttackEvidence!==void 0&&e.LightClientAttackEvidence.encode(_.lightClientAttackEvidence,b.uint32(18).fork()).ldelim(),b},decode(_,b){const f=_ instanceof u.BinaryReader?_:new u.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;const k=v();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.duplicateVoteEvidence=e.DuplicateVoteEvidence.decode(f,f.uint32());break;case 2:k.lightClientAttackEvidence=e.LightClientAttackEvidence.decode(f,f.uint32());break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=v();return(0,R.isSet)(_.duplicateVoteEvidence)&&(b.duplicateVoteEvidence=e.DuplicateVoteEvidence.fromJSON(_.duplicateVoteEvidence)),(0,R.isSet)(_.lightClientAttackEvidence)&&(b.lightClientAttackEvidence=e.LightClientAttackEvidence.fromJSON(_.lightClientAttackEvidence)),b},toJSON(_){const b={};return _.duplicateVoteEvidence!==void 0&&(b.duplicateVoteEvidence=_.duplicateVoteEvidence?e.DuplicateVoteEvidence.toJSON(_.duplicateVoteEvidence):void 0),_.lightClientAttackEvidence!==void 0&&(b.lightClientAttackEvidence=_.lightClientAttackEvidence?e.LightClientAttackEvidence.toJSON(_.lightClientAttackEvidence):void 0),b},fromPartial(_){const b=v();return _.duplicateVoteEvidence!==void 0&&_.duplicateVoteEvidence!==null&&(b.duplicateVoteEvidence=e.DuplicateVoteEvidence.fromPartial(_.duplicateVoteEvidence)),_.lightClientAttackEvidence!==void 0&&_.lightClientAttackEvidence!==null&&(b.lightClientAttackEvidence=e.LightClientAttackEvidence.fromPartial(_.lightClientAttackEvidence)),b}};function E(){return{voteA:void 0,voteB:void 0,totalVotingPower:BigInt(0),validatorPower:BigInt(0),timestamp:t.Timestamp.fromPartial({})}}e.DuplicateVoteEvidence={typeUrl:"/tendermint.types.DuplicateVoteEvidence",encode(_,b=u.BinaryWriter.create()){return _.voteA!==void 0&&n.Vote.encode(_.voteA,b.uint32(10).fork()).ldelim(),_.voteB!==void 0&&n.Vote.encode(_.voteB,b.uint32(18).fork()).ldelim(),_.totalVotingPower!==BigInt(0)&&b.uint32(24).int64(_.totalVotingPower),_.validatorPower!==BigInt(0)&&b.uint32(32).int64(_.validatorPower),_.timestamp!==void 0&&t.Timestamp.encode(_.timestamp,b.uint32(42).fork()).ldelim(),b},decode(_,b){const f=_ instanceof u.BinaryReader?_:new u.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;
3const k=E();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.voteA=n.Vote.decode(f,f.uint32());break;case 2:k.voteB=n.Vote.decode(f,f.uint32());break;case 3:k.totalVotingPower=f.int64();break;case 4:k.validatorPower=f.int64();break;case 5:k.timestamp=t.Timestamp.decode(f,f.uint32());break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=E();return(0,R.isSet)(_.voteA)&&(b.voteA=n.Vote.fromJSON(_.voteA)),(0,R.isSet)(_.voteB)&&(b.voteB=n.Vote.fromJSON(_.voteB)),(0,R.isSet)(_.totalVotingPower)&&(b.totalVotingPower=BigInt(_.totalVotingPower.toString())),(0,R.isSet)(_.validatorPower)&&(b.validatorPower=BigInt(_.validatorPower.toString())),(0,R.isSet)(_.timestamp)&&(b.timestamp=(0,R.fromJsonTimestamp)(_.timestamp)),b},toJSON(_){const b={};return _.voteA!==void 0&&(b.voteA=_.voteA?n.Vote.toJSON(_.voteA):void 0),_.voteB!==void 0&&(b.voteB=_.voteB?n.Vote.toJSON(_.voteB):void 0),_.totalVotingPower!==void 0&&(b.totalVotingPower=(_.totalVotingPower||BigInt(0)).toString()),_.validatorPower!==void 0&&(b.validatorPower=(_.validatorPower||BigInt(0)).toString()),_.timestamp!==void 0&&(b.timestamp=(0,R.fromTimestamp)(_.timestamp).toISOString()),b},fromPartial(_){const b=E();return _.voteA!==void 0&&_.voteA!==null&&(b.voteA=n.Vote.fromPartial(_.voteA)),_.voteB!==void 0&&_.voteB!==null&&(b.voteB=n.Vote.fromPartial(_.voteB)),_.totalVotingPower!==void 0&&_.totalVotingPower!==null&&(b.totalVotingPower=BigInt(_.totalVotingPower.toString())),_.validatorPower!==void 0&&_.validatorPower!==null&&(b.validatorPower=BigInt(_.validatorPower.toString())),_.timestamp!==void 0&&_.timestamp!==null&&(b.timestamp=t.Timestamp.fromPartial(_.timestamp)),b}};function C(){return{conflictingBlock:void 0,commonHeight:BigInt(0),byzantineValidators:[],totalVotingPower:BigInt(0),timestamp:t.Timestamp.fromPartial({})}}e.LightClientAttackEvidence={typeUrl:"/tendermint.types.LightClientAttackEvidence",encode(_,b=u.BinaryWriter.create()){_.conflictingBlock!==void 0&&n.LightBlock.encode(_.conflictingBlock,b.uint32(10).fork()).ldelim(),_.commonHeight!==BigInt(0)&&b.uint32(16).int64(_.commonHeight);for(const f of _.byzantineValidators)i.Validator.encode(f,b.uint32(26).fork()).ldelim();return _.totalVotingPower!==BigInt(0)&&b.uint32(32).int64(_.totalVotingPower),_.timestamp!==void 0&&t.Timestamp.encode(_.timestamp,b.uint32(42).fork()).ldelim(),b},decode(_,b){const f=_ instanceof u.BinaryReader?_:new u.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;const k=C();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.conflictingBlock=n.LightBlock.decode(f,f.uint32());break;case 2:k.commonHeight=f.int64();break;case 3:k.byzantineValidators.push(i.Validator.decode(f,f.uint32()));break;case 4:k.totalVotingPower=f.int64();break;case 5:k.timestamp=t.Timestamp.decode(f,f.uint32());break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=C();return(0,R.isSet)(_.conflictingBlock)&&(b.conflictingBlock=n.LightBlock.fromJSON(_.conflictingBlock)),(0,R.isSet)(_.commonHeight)&&(b.commonHeight=BigInt(_.commonHeight.toString())),Array.isArray(_==null?void 0:_.byzantineValidators)&&(b.byzantineValidators=_.byzantineValidators.map(f=>i.Validator.fromJSON(f))),(0,R.isSet)(_.totalVotingPower)&&(b.totalVotingPower=BigInt(_.totalVotingPower.toString())),(0,R.isSet)(_.timestamp)&&(b.timestamp=(0,R.fromJsonTimestamp)(_.timestamp)),b},toJSON(_){const b={};return _.conflictingBlock!==void 0&&(b.conflictingBlock=_.conflictingBlock?n.LightBlock.toJSON(_.conflictingBlock):void 0),_.commonHeight!==void 0&&(b.commonHeight=(_.commonHeight||BigInt(0)).toString()),_.byzantineValidators?b.byzantineValidators=_.byzantineValidators.map(f=>f?i.Validator.toJSON(f):void 0):b.byzantineValidators=[],_.totalVotingPower!==void 0&&(b.totalVotingPower=(_.totalVotingPower||BigInt(0)).toString()),_.timestamp!==void 0&&(b.timestamp=(0,R.fromTimestamp)(_.timestamp).toISOString()),b},fromPartial(_){var f;const b=C();return _.conflictingBlock!==void 0&&_.conflictingBlock!==null&&(b.conflictingBlock=n.LightBlock.fromPartial(_.conflictingBlock)),_.commonHeight!==void 0&&_.commonHeight!==null&&(b.commonHeight=BigInt(_.commonHeight.toString())),b.byzantineValidators=((f=_.byzantineValidators)==null?void 0:f.map(p=>i.Validator.fromPartial(p)))||[],_.totalVotingPower!==void 0&&_.totalVotingPower!==null&&(b.totalVotingPower=BigInt(_.totalVotingPower.toString())),_.timestamp!==void 0&&_.timestamp!==null&&(b.timestamp=t.Timestamp.fromPartial(_.timestamp)),b}};function D(){return{evidence:[]}}e.EvidenceList={typeUrl:"/tendermint.types.EvidenceList",encode(_,b=u.BinaryWriter.create()){for(const f of _.evidence)e.Evidence.encode(f,b.uint32(10).fork()).ldelim();return b},decode(_,b){const f=_ instanceof u.BinaryReader?_:new u.BinaryReader(_);let p=b===void 0?f.len:f.pos+b;
3const k=D();for(;f.pos<p;){const o=f.uint32();switch(o>>>3){case 1:k.evidence.push(e.Evidence.decode(f,f.uint32()));break;default:f.skipType(o&7);break}}return k},fromJSON(_){const b=D();return Array.isArray(_==null?void 0:_.evidence)&&(b.evidence=_.evidence.map(f=>e.Evidence.fromJSON(f))),b},toJSON(_){const b={};return _.evidence?b.evidence=_.evidence.map(f=>f?e.Evidence.toJSON(f):void 0):b.evidence=[],b},fromPartial(_){var f;const b=D();return b.evidence=((f=_.evidence)==null?void 0:f.map(p=>e.Evidence.fromPartial(p)))||[],b}}})(Wl);Object.defineProperty(Lr,"__esModule",{value:!0});Lr.Block=Lr.protobufPackage=void 0;const He=Wt,lr=Wl,id=te,co=ee;Lr.protobufPackage="tendermint.types";function od(){return{header:He.Header.fromPartial({}),data:He.Data.fromPartial({}),evidence:lr.EvidenceList.fromPartial({}),lastCommit:void 0}}Lr.Block={typeUrl:"/tendermint.types.Block",encode(e,n=id.BinaryWriter.create()){return e.header!==void 0&&He.Header.encode(e.header,n.uint32(10).fork()).ldelim(),e.data!==void 0&&He.Data.encode(e.data,n.uint32(18).fork()).ldelim(),e.evidence!==void 0&&lr.EvidenceList.encode(e.evidence,n.uint32(26).fork()).ldelim(),e.lastCommit!==void 0&&He.Commit.encode(e.lastCommit,n.uint32(34).fork()).ldelim(),n},decode(e,n){const t=e instanceof id.BinaryReader?e:new id.BinaryReader(e);let i=n===void 0?t.len:t.pos+n;const u=od();for(;t.pos<i;){const R=t.uint32();switch(R>>>3){case 1:u.header=He.Header.decode(t,t.uint32());break;case 2:u.data=He.Data.decode(t,t.uint32());break;case 3:u.evidence=lr.EvidenceList.decode(t,t.uint32());break;case 4:u.lastCommit=He.Commit.decode(t,t.uint32());break;default:t.skipType(R&7);break}}return u},fromJSON(e){const n=od();return(0,co.isSet)(e.header)&&(n.header=He.Header.fromJSON(e.header)),(0,co.isSet)(e.data)&&(n.data=He.Data.fromJSON(e.data)),(0,co.isSet)(e.evidence)&&(n.evidence=lr.EvidenceList.fromJSON(e.evidence)),(0,co.isSet)(e.lastCommit)&&(n.lastCommit=He.Commit.fromJSON(e.lastCommit)),n},toJSON(e){const n={};return e.header!==void 0&&(n.header=e.header?He.Header.toJSON(e.header):void 0),e.data!==void 0&&(n.data=e.data?He.Data.toJSON(e.data):void 0),e.evidence!==void 0&&(n.evidence=e.evidence?lr.EvidenceList.toJSON(e.evidence):void 0),e.lastCommit!==void 0&&(n.lastCommit=e.lastCommit?He.Commit.toJSON(e.lastCommit):void 0),n},fromPartial(e){const n=od();return e.header!==void 0&&e.header!==null&&(n.header=He.Header.fromPartial(e.header)),e.data!==void 0&&e.data!==null&&(n.data=He.Data.fromPartial(e.data)),e.evidence!==void 0&&e.evidence!==null&&(n.evidence=lr.EvidenceList.fromPartial(e.evidence)),e.lastCommit!==void 0&&e.lastCommit!==null&&(n.lastCommit=He.Commit.fromPartial(e.lastCommit)),n}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceClientImpl=e.TxDecodeAminoResponse=e.TxDecodeAminoRequest=e.TxEncodeAminoResponse=e.TxEncodeAminoRequest=e.TxEncodeResponse=e.TxEncodeRequest=e.TxDecodeResponse=e.TxDecodeRequest=e.GetBlockWithTxsResponse=e.GetBlockWithTxsRequest=e.GetTxResponse=e.GetTxRequest=e.SimulateResponse=e.SimulateRequest=e.BroadcastTxResponse=e.BroadcastTxRequest=e.GetTxsEventResponse=e.GetTxsEventRequest=e.broadcastModeToJSON=e.broadcastModeFromJSON=e.BroadcastMode=e.orderByToJSON=e.orderByFromJSON=e.OrderBy=e.protobufPackage=void 0;const n=it,t=_e,i=pu,u=Wt,R=Lr,v=te,E=ee;e.protobufPackage="cosmos.tx.v1beta1";var C;(function(H){H[H.ORDER_BY_UNSPECIFIED=0]="ORDER_BY_UNSPECIFIED",H[H.ORDER_BY_ASC=1]="ORDER_BY_ASC",H[H.ORDER_BY_DESC=2]="ORDER_BY_DESC",H[H.UNRECOGNIZED=-1]="UNRECOGNIZED"})(C||(e.OrderBy=C={}));function D(H){switch(H){case 0:case"ORDER_BY_UNSPECIFIED":return C.ORDER_BY_UNSPECIFIED;case 1:case"ORDER_BY_ASC":return C.ORDER_BY_ASC;case 2:case"ORDER_BY_DESC":return C.ORDER_BY_DESC;case-1:case"UNRECOGNIZED":default:return C.UNRECOGNIZED}}e.orderByFromJSON=D;function _(H){switch(H){case C.ORDER_BY_UNSPECIFIED:return"ORDER_BY_UNSPECIFIED";case C.ORDER_BY_ASC:return"ORDER_BY_ASC";case C.ORDER_BY_DESC:return"ORDER_BY_DESC";case C.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.orderByToJSON=_;var b;(function(H){H[H.BROADCAST_MODE_UNSPECIFIED=0]="BROADCAST_MODE_UNSPECIFIED",H[H.BROADCAST_MODE_BLOCK=1]="BROADCAST_MODE_BLOCK",H[H.BROADCAST_MODE_SYNC=2]="BROADCAST_MODE_SYNC",H[H.BROADCAST_MODE_ASYNC=3]="BROADCAST_MODE_ASYNC",H[H.UNRECOGNIZED=-1]="UNRECOGNIZED"})(b||(e.BroadcastMode=b={}));function f(H){switch(H){case 0:case"BROADCAST_MODE_UNSPECIFIED":return b.BROADCAST_MODE_UNSPECIFIED;case 1:case"BROADCAST_MODE_BLOCK":return b.BROADCAST_MODE_BLOCK;case 2:case"BROADCAST_MODE_SYNC":return b.BROADCAST_MODE_SYNC;case 3:case"BROADCAST_MODE_ASYNC":return b.BROADCAST_MODE_ASYNC;case-1:case"UNRECOGNIZED":default:return b.UNRECOGNIZED}}e.broadcastModeFromJSON=f;function p(H){switch(H){case b.BROADCAST_MODE_UNSPECIFIED:return"BROADCAST_MODE_UNSPECIFIED";case b.BROADCAST_MODE_BLOCK:return"BROADCAST_MODE_BLOCK";case b.BROADCAST_MODE_SYNC:return"BROADCAST_MODE_SYNC";
3case b.BROADCAST_MODE_ASYNC:return"BROADCAST_MODE_ASYNC";case b.UNRECOGNIZED:default:return"UNRECOGNIZED"}}e.broadcastModeToJSON=p;function k(){return{events:[],pagination:void 0,orderBy:0,page:BigInt(0),limit:BigInt(0)}}e.GetTxsEventRequest={typeUrl:"/cosmos.tx.v1beta1.GetTxsEventRequest",encode(H,a=v.BinaryWriter.create()){for(const g of H.events)a.uint32(10).string(g);return H.pagination!==void 0&&t.PageRequest.encode(H.pagination,a.uint32(18).fork()).ldelim(),H.orderBy!==0&&a.uint32(24).int32(H.orderBy),H.page!==BigInt(0)&&a.uint32(32).uint64(H.page),H.limit!==BigInt(0)&&a.uint32(40).uint64(H.limit),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=k();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.events.push(g.string());break;case 2:S.pagination=t.PageRequest.decode(g,g.uint32());break;case 3:S.orderBy=g.int32();break;case 4:S.page=g.uint64();break;case 5:S.limit=g.uint64();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=k();return Array.isArray(H==null?void 0:H.events)&&(a.events=H.events.map(g=>String(g))),(0,E.isSet)(H.pagination)&&(a.pagination=t.PageRequest.fromJSON(H.pagination)),(0,E.isSet)(H.orderBy)&&(a.orderBy=D(H.orderBy)),(0,E.isSet)(H.page)&&(a.page=BigInt(H.page.toString())),(0,E.isSet)(H.limit)&&(a.limit=BigInt(H.limit.toString())),a},toJSON(H){const a={};return H.events?a.events=H.events.map(g=>g):a.events=[],H.pagination!==void 0&&(a.pagination=H.pagination?t.PageRequest.toJSON(H.pagination):void 0),H.orderBy!==void 0&&(a.orderBy=_(H.orderBy)),H.page!==void 0&&(a.page=(H.page||BigInt(0)).toString()),H.limit!==void 0&&(a.limit=(H.limit||BigInt(0)).toString()),a},fromPartial(H){var g;const a=k();return a.events=((g=H.events)==null?void 0:g.map(h=>h))||[],H.pagination!==void 0&&H.pagination!==null&&(a.pagination=t.PageRequest.fromPartial(H.pagination)),a.orderBy=H.orderBy??0,H.page!==void 0&&H.page!==null&&(a.page=BigInt(H.page.toString())),H.limit!==void 0&&H.limit!==null&&(a.limit=BigInt(H.limit.toString())),a}};function o(){return{txs:[],txResponses:[],pagination:void 0,total:BigInt(0)}}e.GetTxsEventResponse={typeUrl:"/cosmos.tx.v1beta1.GetTxsEventResponse",encode(H,a=v.BinaryWriter.create()){for(const g of H.txs)n.Tx.encode(g,a.uint32(10).fork()).ldelim();for(const g of H.txResponses)i.TxResponse.encode(g,a.uint32(18).fork()).ldelim();return H.pagination!==void 0&&t.PageResponse.encode(H.pagination,a.uint32(26).fork()).ldelim(),H.total!==BigInt(0)&&a.uint32(32).uint64(H.total),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=o();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.txs.push(n.Tx.decode(g,g.uint32()));break;case 2:S.txResponses.push(i.TxResponse.decode(g,g.uint32()));break;case 3:S.pagination=t.PageResponse.decode(g,g.uint32());break;case 4:S.total=g.uint64();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=o();return Array.isArray(H==null?void 0:H.txs)&&(a.txs=H.txs.map(g=>n.Tx.fromJSON(g))),Array.isArray(H==null?void 0:H.txResponses)&&(a.txResponses=H.txResponses.map(g=>i.TxResponse.fromJSON(g))),(0,E.isSet)(H.pagination)&&(a.pagination=t.PageResponse.fromJSON(H.pagination)),(0,E.isSet)(H.total)&&(a.total=BigInt(H.total.toString())),a},toJSON(H){const a={};return H.txs?a.txs=H.txs.map(g=>g?n.Tx.toJSON(g):void 0):a.txs=[],H.txResponses?a.txResponses=H.txResponses.map(g=>g?i.TxResponse.toJSON(g):void 0):a.txResponses=[],H.pagination!==void 0&&(a.pagination=H.pagination?t.PageResponse.toJSON(H.pagination):void 0),H.total!==void 0&&(a.total=(H.total||BigInt(0)).toString()),a},fromPartial(H){var g,h;const a=o();return a.txs=((g=H.txs)==null?void 0:g.map(S=>n.Tx.fromPartial(S)))||[],a.txResponses=((h=H.txResponses)==null?void 0:h.map(S=>i.TxResponse.fromPartial(S)))||[],H.pagination!==void 0&&H.pagination!==null&&(a.pagination=t.PageResponse.fromPartial(H.pagination)),H.total!==void 0&&H.total!==null&&(a.total=BigInt(H.total.toString())),a}};function s(){return{txBytes:new Uint8Array,mode:0}}e.BroadcastTxRequest={typeUrl:"/cosmos.tx.v1beta1.BroadcastTxRequest",encode(H,a=v.BinaryWriter.create()){return H.txBytes.length!==0&&a.uint32(10).bytes(H.txBytes),H.mode!==0&&a.uint32(16).int32(H.mode),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=s();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.txBytes=g.bytes();break;case 2:S.mode=g.int32();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=s();return(0,E.isSet)(H.txBytes)&&(a.txBytes=(0,E.bytesFromBase64)(H.txBytes)),(0,E.isSet)(H.mode)&&(a.mode=f(H.mode)),a},toJSON(H){const a={};return H.txBytes!==void 0&&(a.txBytes=(0,E.base64FromBytes)(H.txBytes!==void 0?H.txBytes:new Uint8Array)),H.mode!==void 0&&(a.mode=p(H.mode)),a},fromPartial(H){const a=s();return a.txBytes=H.txBytes??new Uint8Array,a.mode=H.mode??0,a}};function y(){return{txResponse:void 0}}e.BroadcastTxResponse={typeUrl:"/cosmos.tx.v1beta1.BroadcastTxResponse",encode(H,a=v.BinaryWriter.create()){return H.txResponse!==void 0&&i.TxResponse.encode(H.txResponse,a.uint32(10).fork()).ldelim(),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=y();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.txResponse=i.TxResponse.decode(g,g.uint32());break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=y();return(0,E.isSet)(H.txResponse)&&(a.txResponse=i.TxResponse.fromJSON(H.txResponse)),a},toJSON(H){const a={};return H.txResponse!==void 0&&(a.txResponse=H.txResponse?i.TxResponse.toJSON(H.txResponse):void 0),a},fromPartial(H){const a=y();return H.txResponse!==void 0&&H.txResponse!==null&&(a.txResponse=i.TxResponse.fromPartial(H.txResponse)),a}};function w(){return{tx:void 0,txBytes:new Uint8Array}}e.SimulateRequest={typeUrl:"/cosmos.tx.v1beta1.SimulateRequest",encode(H,a=v.BinaryWriter.create()){return H.tx!==void 0&&n.Tx.encode(H.tx,a.uint32(10).fork()).ldelim(),H.txBytes.length!==0&&a.uint32(18).bytes(H.txBytes),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=w();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.tx=n.Tx.decode(g,g.uint32());break;case 2:S.txBytes=g.bytes();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=w();return(0,E.isSet)(H.tx)&&(a.tx=n.Tx.fromJSON(H.tx)),(0,E.isSet)(H.txBytes)&&(a.txBytes=(0,E.bytesFromBase64)(H.txBytes)),a},toJSON(H){const a={};return H.tx!==void 0&&(a.tx=H.tx?n.Tx.toJSON(H.tx):void 0),H.txBytes!==void 0&&(a.txBytes=(0,E.base64FromBytes)(H.txBytes!==void 0?H.txBytes:new Uint8Array)),a},fromPartial(H){const a=w();return H.tx!==void 0&&H.tx!==null&&(a.tx=n.Tx.fromPartial(H.tx)),a.txBytes=H.txBytes??new Uint8Array,a}};function J(){return{gasInfo:void 0,result:void 0}}e.SimulateResponse={typeUrl:"/cosmos.tx.v1beta1.SimulateResponse",encode(H,a=v.BinaryWriter.create()){return H.gasInfo!==void 0&&i.GasInfo.encode(H.gasInfo,a.uint32(10).fork()).ldelim(),H.result!==void 0&&i.Result.encode(H.result,a.uint32(18).fork()).ldelim(),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=J();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.gasInfo=i.GasInfo.decode(g,g.uint32());break;case 2:S.result=i.Result.decode(g,g.uint32());break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=J();return(0,E.isSet)(H.gasInfo)&&(a.gasInfo=i.GasInfo.fromJSON(H.gasInfo)),(0,E.isSet)(H.result)&&(a.result=i.Result.fromJSON(H.result)),a},toJSON(H){const a={};return H.gasInfo!==void 0&&(a.gasInfo=H.gasInfo?i.GasInfo.toJSON(H.gasInfo):void 0),H.result!==void 0&&(a.result=H.result?i.Result.toJSON(H.result):void 0),a},fromPartial(H){const a=J();return H.gasInfo!==void 0&&H.gasInfo!==null&&(a.gasInfo=i.GasInfo.fromPartial(H.gasInfo)),H.result!==void 0&&H.result!==null&&(a.result=i.Result.fromPartial(H.result)),a}};function P(){return{hash:""}}e.GetTxRequest={typeUrl:"/cosmos.tx.v1beta1.GetTxRequest",encode(H,a=v.BinaryWriter.create()){return H.hash!==""&&a.uint32(10).string(H.hash),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=P();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.hash=g.string();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=P();return(0,E.isSet)(H.hash)&&(a.hash=String(H.hash)),a},toJSON(H){const a={};return H.hash!==void 0&&(a.hash=H.hash),a},fromPartial(H){const a=P();return a.hash=H.hash??"",a}};function U(){return{tx:void 0,txResponse:void 0}}e.GetTxResponse={typeUrl:"/cosmos.tx.v1beta1.GetTxResponse",encode(H,a=v.BinaryWriter.create()){return H.tx!==void 0&&n.Tx.encode(H.tx,a.uint32(10).fork()).ldelim(),H.txResponse!==void 0&&i.TxResponse.encode(H.txResponse,a.uint32(18).fork()).ldelim(),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=U();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.tx=n.Tx.decode(g,g.uint32());break;case 2:S.txResponse=i.TxResponse.decode(g,g.uint32());break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=U();return(0,E.isSet)(H.tx)&&(a.tx=n.Tx.fromJSON(H.tx)),(0,E.isSet)(H.txResponse)&&(a.txResponse=i.TxResponse.fromJSON(H.txResponse)),a},toJSON(H){const a={};return H.tx!==void 0&&(a.tx=H.tx?n.Tx.toJSON(H.tx):void 0),H.txResponse!==void 0&&(a.txResponse=H.txResponse?i.TxResponse.toJSON(H.txResponse):void 0),a},fromPartial(H){const a=U();return H.tx!==void 0&&H.tx!==null&&(a.tx=n.Tx.fromPartial(H.tx)),H.txResponse!==void 0&&H.txResponse!==null&&(a.txResponse=i.TxResponse.fromPartial(H.txResponse)),a}};function r(){return{height:BigInt(0),pagination:void 0}}e.GetBlockWithTxsRequest={typeUrl:"/cosmos.tx.v1beta1.GetBlockWithTxsRequest",encode(H,a=v.BinaryWriter.create()){return H.height!==BigInt(0)&&a.uint32(8).int64(H.height),H.pagination!==void 0&&t.PageRequest.encode(H.pagination,a.uint32(18).fork()).ldelim(),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=r();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.height=g.int64();break;case 2:S.pagination=t.PageRequest.decode(g,g.uint32());break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=r();return(0,E.isSet)(H.height)&&(a.height=BigInt(H.height.toString())),(0,E.isSet)(H.pagination)&&(a.pagination=t.PageRequest.fromJSON(H.pagination)),a},toJSON(H){const a={};return H.height!==void 0&&(a.height=(H.height||BigInt(0)).toString()),H.pagination!==void 0&&(a.pagination=H.pagination?t.PageRequest.toJSON(H.pagination):void 0),a},fromPartial(H){const a=r();return H.height!==void 0&&H.height!==null&&(a.height=BigInt(H.height.toString())),H.pagination!==void 0&&H.pagination!==null&&(a.pagination=t.PageRequest.fromPartial(H.pagination)),a}};function m(){return{txs:[],blockId:void 0,block:void 0,pagination:void 0}}e.GetBlockWithTxsResponse={typeUrl:"/cosmos.tx.v1beta1.GetBlockWithTxsResponse",encode(H,a=v.BinaryWriter.create()){for(const g of H.txs)n.Tx.encode(g,a.uint32(10).fork()).ldelim();return H.blockId!==void 0&&u.BlockID.encode(H.blockId,a.uint32(18).fork()).ldelim(),H.block!==void 0&&R.Block.encode(H.block,a.uint32(26).fork()).ldelim(),H.pagination!==void 0&&t.PageResponse.encode(H.pagination,a.uint32(34).fork()).ldelim(),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=m();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.txs.push(n.Tx.decode(g,g.uint32()));break;case 2:S.blockId=u.BlockID.decode(g,g.uint32());break;case 3:S.block=R.Block.decode(g,g.uint32());break;case 4:S.pagination=t.PageResponse.decode(g,g.uint32());break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=m();return Array.isArray(H==null?void 0:H.txs)&&(a.txs=H.txs.map(g=>n.Tx.fromJSON(g))),(0,E.isSet)(H.blockId)&&(a.blockId=u.BlockID.fromJSON(H.blockId)),(0,E.isSet)(H.block)&&(a.block=R.Block.fromJSON(H.block)),(0,E.isSet)(H.pagination)&&(a.pagination=t.PageResponse.fromJSON(H.pagination)),a},toJSON(H){const a={};return H.txs?a.txs=H.txs.map(g=>g?n.Tx.toJSON(g):void 0):a.txs=[],H.blockId!==void 0&&(a.blockId=H.blockId?u.BlockID.toJSON(H.blockId):void 0),H.block!==void 0&&(a.block=H.block?R.Block.toJSON(H.block):void 0),H.pagination!==void 0&&(a.pagination=H.pagination?t.PageResponse.toJSON(H.pagination):void 0),a},fromPartial(H){var g;const a=m();return a.txs=((g=H.txs)==null?void 0:g.map(h=>n.Tx.fromPartial(h)))||[],H.blockId!==void 0&&H.blockId!==null&&(a.blockId=u.BlockID.fromPartial(H.blockId)),H.block!==void 0&&H.block!==null&&(a.block=R.Block.fromPartial(H.block)),H.pagination!==void 0&&H.pagination!==null&&(a.pagination=t.PageResponse.fromPartial(H.pagination)),a}};function N(){return{txBytes:new Uint8Array}}e.TxDecodeRequest={typeUrl:"/cosmos.tx.v1beta1.TxDecodeRequest",encode(H,a=v.BinaryWriter.create()){return H.txBytes.length!==0&&a.uint32(10).bytes(H.txBytes),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=N();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.txBytes=g.bytes();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=N();return(0,E.isSet)(H.txBytes)&&(a.txBytes=(0,E.bytesFromBase64)(H.txBytes)),a},toJSON(H){const a={};return H.txBytes!==void 0&&(a.txBytes=(0,E.base64FromBytes)(H.txBytes!==void 0?H.txBytes:new Uint8Array)),a},fromPartial(H){const a=N();return a.txBytes=H.txBytes??new Uint8Array,a}};function V(){return{tx:void 0}}e.TxDecodeResponse={typeUrl:"/cosmos.tx.v1beta1.TxDecodeResponse",encode(H,a=v.BinaryWriter.create()){return H.tx!==void 0&&n.Tx.encode(H.tx,a.uint32(10).fork()).ldelim(),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=V();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.tx=n.Tx.decode(g,g.uint32());break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=V();return(0,E.isSet)(H.tx)&&(a.tx=n.Tx.fromJSON(H.tx)),a},toJSON(H){const a={};return H.tx!==void 0&&(a.tx=H.tx?n.Tx.toJSON(H.tx):void 0),a},fromPartial(H){const a=V();return H.tx!==void 0&&H.tx!==null&&(a.tx=n.Tx.fromPartial(H.tx)),a}};function d(){return{tx:void 0}}e.TxEncodeRequest={typeUrl:"/cosmos.tx.v1beta1.TxEncodeRequest",encode(H,a=v.BinaryWriter.create()){return H.tx!==void 0&&n.Tx.encode(H.tx,a.uint32(10).fork()).ldelim(),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=d();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.tx=n.Tx.decode(g,g.uint32());break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=d();return(0,E.isSet)(H.tx)&&(a.tx=n.Tx.fromJSON(H.tx)),a},toJSON(H){const a={};return H.tx!==void 0&&(a.tx=H.tx?n.Tx.toJSON(H.tx):void 0),a},fromPartial(H){const a=d();return H.tx!==void 0&&H.tx!==null&&(a.tx=n.Tx.fromPartial(H.tx)),a}};function l(){return{txBytes:new Uint8Array}}e.TxEncodeResponse={typeUrl:"/cosmos.tx.v1beta1.TxEncodeResponse",encode(H,a=v.BinaryWriter.create()){return H.txBytes.length!==0&&a.uint32(10).bytes(H.txBytes),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=l();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.txBytes=g.bytes();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=l();return(0,E.isSet)(H.txBytes)&&(a.txBytes=(0,E.bytesFromBase64)(H.txBytes)),a},toJSON(H){const a={};return H.txBytes!==void 0&&(a.txBytes=(0,E.base64FromBytes)(H.txBytes!==void 0?H.txBytes:new Uint8Array)),a},fromPartial(H){const a=l();return a.txBytes=H.txBytes??new Uint8Array,a}};function T(){return{aminoJson:""}}e.TxEncodeAminoRequest={typeUrl:"/cosmos.tx.v1beta1.TxEncodeAminoRequest",encode(H,a=v.BinaryWriter.create()){return H.aminoJson!==""&&a.uint32(10).string(H.aminoJson),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=T();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.aminoJson=g.string();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=T();return(0,E.isSet)(H.aminoJson)&&(a.aminoJson=String(H.aminoJson)),a},toJSON(H){const a={};return H.aminoJson!==void 0&&(a.a
3minoJson=H.aminoJson),a},fromPartial(H){const a=T();return a.aminoJson=H.aminoJson??"",a}};function O(){return{aminoBinary:new Uint8Array}}e.TxEncodeAminoResponse={typeUrl:"/cosmos.tx.v1beta1.TxEncodeAminoResponse",encode(H,a=v.BinaryWriter.create()){return H.aminoBinary.length!==0&&a.uint32(10).bytes(H.aminoBinary),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=O();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.aminoBinary=g.bytes();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=O();return(0,E.isSet)(H.aminoBinary)&&(a.aminoBinary=(0,E.bytesFromBase64)(H.aminoBinary)),a},toJSON(H){const a={};return H.aminoBinary!==void 0&&(a.aminoBinary=(0,E.base64FromBytes)(H.aminoBinary!==void 0?H.aminoBinary:new Uint8Array)),a},fromPartial(H){const a=O();return a.aminoBinary=H.aminoBinary??new Uint8Array,a}};function B(){return{aminoBinary:new Uint8Array}}e.TxDecodeAminoRequest={typeUrl:"/cosmos.tx.v1beta1.TxDecodeAminoRequest",encode(H,a=v.BinaryWriter.create()){return H.aminoBinary.length!==0&&a.uint32(10).bytes(H.aminoBinary),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=B();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.aminoBinary=g.bytes();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=B();return(0,E.isSet)(H.aminoBinary)&&(a.aminoBinary=(0,E.bytesFromBase64)(H.aminoBinary)),a},toJSON(H){const a={};return H.aminoBinary!==void 0&&(a.aminoBinary=(0,E.base64FromBytes)(H.aminoBinary!==void 0?H.aminoBinary:new Uint8Array)),a},fromPartial(H){const a=B();return a.aminoBinary=H.aminoBinary??new Uint8Array,a}};function M(){return{aminoJson:""}}e.TxDecodeAminoResponse={typeUrl:"/cosmos.tx.v1beta1.TxDecodeAminoResponse",encode(H,a=v.BinaryWriter.create()){return H.aminoJson!==""&&a.uint32(10).string(H.aminoJson),a},decode(H,a){const g=H instanceof v.BinaryReader?H:new v.BinaryReader(H);let h=a===void 0?g.len:g.pos+a;const S=M();for(;g.pos<h;){const A=g.uint32();switch(A>>>3){case 1:S.aminoJson=g.string();break;default:g.skipType(A&7);break}}return S},fromJSON(H){const a=M();return(0,E.isSet)(H.aminoJson)&&(a.aminoJson=String(H.aminoJson)),a},toJSON(H){const a={};return H.aminoJson!==void 0&&(a.aminoJson=H.aminoJson),a},fromPartial(H){const a=M();return a.aminoJson=H.aminoJson??"",a}};class W{constructor(a){this.rpc=a,this.Simulate=this.Simulate.bind(this),this.GetTx=this.GetTx.bind(this),this.BroadcastTx=this.BroadcastTx.bind(this),this.GetTxsEvent=this.GetTxsEvent.bind(this),this.GetBlockWithTxs=this.GetBlockWithTxs.bind(this),this.TxDecode=this.TxDecode.bind(this),this.TxEncode=this.TxEncode.bind(this),this.TxEncodeAmino=this.TxEncodeAmino.bind(this),this.TxDecodeAmino=this.TxDecodeAmino.bind(this)}Simulate(a){const g=e.SimulateRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","Simulate",g).then(S=>e.SimulateResponse.decode(new v.BinaryReader(S)))}GetTx(a){const g=e.GetTxRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTx",g).then(S=>e.GetTxResponse.decode(new v.BinaryReader(S)))}BroadcastTx(a){const g=e.BroadcastTxRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","BroadcastTx",g).then(S=>e.BroadcastTxResponse.decode(new v.BinaryReader(S)))}GetTxsEvent(a){const g=e.GetTxsEventRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTxsEvent",g).then(S=>e.GetTxsEventResponse.decode(new v.BinaryReader(S)))}GetBlockWithTxs(a){const g=e.GetBlockWithTxsRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetBlockWithTxs",g).then(S=>e.GetBlockWithTxsResponse.decode(new v.BinaryReader(S)))}TxDecode(a){const g=e.TxDecodeRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxDecode",g).then(S=>e.TxDecodeResponse.decode(new v.BinaryReader(S)))}TxEncode(a){const g=e.TxEncodeRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxEncode",g).then(S=>e.TxEncodeResponse.decode(new v.BinaryReader(S)))}TxEncodeAmino(a){const g=e.TxEncodeAminoRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxEncodeAmino",g).then(S=>e.TxEncodeAminoResponse.decode(new v.BinaryReader(S)))}TxDecodeAmino(a){const g=e.TxDecodeAminoRequest.encode(a).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxDecodeAmino",g).then(S=>e.TxDecodeAminoResponse.decode(new v.BinaryReader(S)))}}e.ServiceClientImpl=W})(Ql);Object.defineProperty(va,"__esModule",{value:!0});va.setupTxExtension=void 0;
3const Qg=Ct,Wg=ri,gc=Ql,Pi=it,Fg=Ke;function Gg(e){const n=(0,Fg.createProtobufRpcClient)(e),t=new gc.ServiceClientImpl(n);return{tx:{getTx:async i=>{const u={hash:i};return await t.GetTx(u)},simulate:async(i,u,R,v)=>{const E=Pi.Tx.fromPartial({authInfo:Pi.AuthInfo.fromPartial({fee:Pi.Fee.fromPartial({}),signerInfos:[{publicKey:(0,Qg.encodePubkey)(R),sequence:BigInt(v),modeInfo:{single:{mode:Wg.SignMode.SIGN_MODE_UNSPECIFIED}}}]}),body:Pi.TxBody.fromPartial({messages:Array.from(i),memo:u}),signatures:[new Uint8Array]}),C=gc.SimulateRequest.fromPartial({txBytes:Pi.Tx.encode(E).finish()});return await t.Simulate(C)}}}}va.setupTxExtension=Gg;var $r={};Object.defineProperty($r,"__esModule",{value:!0});$r.createVestingAminoConverters=$r.isAminoMsgCreateVestingAccount=void 0;function Lg(e){return e.type==="cosmos-sdk/MsgCreateVestingAccount"}$r.isAminoMsgCreateVestingAccount=Lg;function $g(){return{"/cosmos.vesting.v1beta1.MsgCreateVestingAccount":{aminoType:"cosmos-sdk/MsgCreateVestingAccount",toAmino:({fromAddress:e,toAddress:n,amount:t,endTime:i,delayed:u})=>({from_address:e,to_address:n,amount:[...t],end_time:i.toString(),delayed:u}),fromAmino:({from_address:e,to_address:n,amount:t,end_time:i,delayed:u})=>({fromAddress:e,toAddress:n,amount:[...t],endTime:BigInt(i),delayed:u})}}}$r.createVestingAminoConverters=$g;var Oa={},Fl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MsgClientImpl=e.MsgCreatePeriodicVestingAccountResponse=e.MsgCreatePeriodicVestingAccount=e.MsgCreatePermanentLockedAccountResponse=e.MsgCreatePermanentLockedAccount=e.MsgCreateVestingAccountResponse=e.MsgCreateVestingAccount=e.protobufPackage=void 0;const n=ve,t=tu,i=te,u=ee;e.protobufPackage="cosmos.vesting.v1beta1";function R(){return{fromAddress:"",toAddress:"",amount:[],endTime:BigInt(0),delayed:!1}}e.MsgCreateVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",encode(f,p=i.BinaryWriter.create()){f.fromAddress!==""&&p.uint32(10).string(f.fromAddress),f.toAddress!==""&&p.uint32(18).string(f.toAddress);for(const k of f.amount)n.Coin.encode(k,p.uint32(26).fork()).ldelim();return f.endTime!==BigInt(0)&&p.uint32(32).int64(f.endTime),f.delayed===!0&&p.uint32(40).bool(f.delayed),p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=R();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.fromAddress=k.string();break;case 2:s.toAddress=k.string();break;case 3:s.amount.push(n.Coin.decode(k,k.uint32()));break;case 4:s.endTime=k.int64();break;case 5:s.delayed=k.bool();break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=R();return(0,u.isSet)(f.fromAddress)&&(p.fromAddress=String(f.fromAddress)),(0,u.isSet)(f.toAddress)&&(p.toAddress=String(f.toAddress)),Array.isArray(f==null?void 0:f.amount)&&(p.amount=f.amount.map(k=>n.Coin.fromJSON(k))),(0,u.isSet)(f.endTime)&&(p.endTime=BigInt(f.endTime.toString())),(0,u.isSet)(f.delayed)&&(p.delayed=!!f.delayed),p},toJSON(f){const p={};return f.fromAddress!==void 0&&(p.fromAddress=f.fromAddress),f.toAddress!==void 0&&(p.toAddress=f.toAddress),f.amount?p.amount=f.amount.map(k=>k?n.Coin.toJSON(k):void 0):p.amount=[],f.endTime!==void 0&&(p.endTime=(f.endTime||BigInt(0)).toString()),f.delayed!==void 0&&(p.delayed=f.delayed),p},fromPartial(f){var k;const p=R();return p.fromAddress=f.fromAddress??"",p.toAddress=f.toAddress??"",p.amount=((k=f.amount)==null?void 0:k.map(o=>n.Coin.fromPartial(o)))||[],f.endTime!==void 0&&f.endTime!==null&&(p.endTime=BigInt(f.endTime.toString())),p.delayed=f.delayed??!1,p}};function v(){return{}}e.MsgCreateVestingAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse",encode(f,p=i.BinaryWriter.create()){return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=v();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){default:k.skipType(y&7);break}}return s},fromJSON(f){return v()},toJSON(f){return{}},fromPartial(f){return v()}};function E(){return{fromAddress:"",toAddress:"",amount:[]}}e.MsgCreatePermanentLockedAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount",encode(f,p=i.BinaryWriter.create()){f.fromAddress!==""&&p.uint32(10).string(f.fromAddress),f.toAddress!==""&&p.uint32(18).string(f.toAddress);for(const k of f.amount)n.Coin.encode(k,p.uint32(26).fork()).ldelim();return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=E();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.fromAddress=k.string();break;case 2:s.toAddress=k.string();break;case 3:s.amount.push(n.Coin.decode(k,k.uint32()));break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=E();return(0,u.isSet)(f.fromAddress)&&(p.fromAddress=String(f.fromAddress)),(0,u.
3isSet)(f.toAddress)&&(p.toAddress=String(f.toAddress)),Array.isArray(f==null?void 0:f.amount)&&(p.amount=f.amount.map(k=>n.Coin.fromJSON(k))),p},toJSON(f){const p={};return f.fromAddress!==void 0&&(p.fromAddress=f.fromAddress),f.toAddress!==void 0&&(p.toAddress=f.toAddress),f.amount?p.amount=f.amount.map(k=>k?n.Coin.toJSON(k):void 0):p.amount=[],p},fromPartial(f){var k;const p=E();return p.fromAddress=f.fromAddress??"",p.toAddress=f.toAddress??"",p.amount=((k=f.amount)==null?void 0:k.map(o=>n.Coin.fromPartial(o)))||[],p}};function C(){return{}}e.MsgCreatePermanentLockedAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse",encode(f,p=i.BinaryWriter.create()){return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=C();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){default:k.skipType(y&7);break}}return s},fromJSON(f){return C()},toJSON(f){return{}},fromPartial(f){return C()}};function D(){return{fromAddress:"",toAddress:"",startTime:BigInt(0),vestingPeriods:[]}}e.MsgCreatePeriodicVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount",encode(f,p=i.BinaryWriter.create()){f.fromAddress!==""&&p.uint32(10).string(f.fromAddress),f.toAddress!==""&&p.uint32(18).string(f.toAddress),f.startTime!==BigInt(0)&&p.uint32(24).int64(f.startTime);for(const k of f.vestingPeriods)t.Period.encode(k,p.uint32(34).fork()).ldelim();return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=D();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){case 1:s.fromAddress=k.string();break;case 2:s.toAddress=k.string();break;case 3:s.startTime=k.int64();break;case 4:s.vestingPeriods.push(t.Period.decode(k,k.uint32()));break;default:k.skipType(y&7);break}}return s},fromJSON(f){const p=D();return(0,u.isSet)(f.fromAddress)&&(p.fromAddress=String(f.fromAddress)),(0,u.isSet)(f.toAddress)&&(p.toAddress=String(f.toAddress)),(0,u.isSet)(f.startTime)&&(p.startTime=BigInt(f.startTime.toString())),Array.isArray(f==null?void 0:f.vestingPeriods)&&(p.vestingPeriods=f.vestingPeriods.map(k=>t.Period.fromJSON(k))),p},toJSON(f){const p={};return f.fromAddress!==void 0&&(p.fromAddress=f.fromAddress),f.toAddress!==void 0&&(p.toAddress=f.toAddress),f.startTime!==void 0&&(p.startTime=(f.startTime||BigInt(0)).toString()),f.vestingPeriods?p.vestingPeriods=f.vestingPeriods.map(k=>k?t.Period.toJSON(k):void 0):p.vestingPeriods=[],p},fromPartial(f){var k;const p=D();return p.fromAddress=f.fromAddress??"",p.toAddress=f.toAddress??"",f.startTime!==void 0&&f.startTime!==null&&(p.startTime=BigInt(f.startTime.toString())),p.vestingPeriods=((k=f.vestingPeriods)==null?void 0:k.map(o=>t.Period.fromPartial(o)))||[],p}};function _(){return{}}e.MsgCreatePeriodicVestingAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse",encode(f,p=i.BinaryWriter.create()){return p},decode(f,p){const k=f instanceof i.BinaryReader?f:new i.BinaryReader(f);let o=p===void 0?k.len:k.pos+p;const s=_();for(;k.pos<o;){const y=k.uint32();switch(y>>>3){default:k.skipType(y&7);break}}return s},fromJSON(f){return _()},toJSON(f){return{}},fromPartial(f){return _()}};class b{constructor(p){this.rpc=p,this.CreateVestingAccount=this.CreateVestingAccount.bind(this),this.CreatePermanentLockedAccount=this.CreatePermanentLockedAccount.bind(this),this.CreatePeriodicVestingAccount=this.CreatePeriodicVestingAccount.bind(this)}CreateVestingAccount(p){const k=e.MsgCreateVestingAccount.encode(p).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreateVestingAccount",k).then(s=>e.MsgCreateVestingAccountResponse.decode(new i.BinaryReader(s)))}CreatePermanentLockedAccount(p){const k=e.MsgCreatePermanentLockedAccount.encode(p).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreatePermanentLockedAccount",k).then(s=>e.MsgCreatePermanentLockedAccountResponse.decode(new i.BinaryReader(s)))}CreatePeriodicVestingAccount(p){const k=e.MsgCreatePeriodicVestingAccount.encode(p).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreatePerio
3dicVestingAccount",k).then(s=>e.MsgCreatePeriodicVestingAccountResponse.decode(new i.BinaryReader(s)))}}e.MsgClientImpl=b})(Fl);Object.defineProperty(Oa,"__esModule",{value:!0});Oa.vestingTypes=void 0;const Kg=Fl;Oa.vestingTypes=[["/cosmos.vesting.v1beta1.MsgCreateVestingAccount",Kg.MsgCreateVestingAccount]];(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAminoMsgCreateValidator=e.isAminoMsgBeginRedelegate=e.createStakingAminoConverters=e.setupSlashingExtension=e.isAminoMsgUnjail=e.createSlashingAminoConverters=e.setupMintExtension=e.setupIbcExtension=e.isMsgTransferEncodeObject=e.ibcTypes=e.isAminoMsgTransfer=e.createIbcAminoConverters=e.groupTypes=e.createGroupAminoConverters=e.setupGovExtension=e.isMsgVoteWeightedEncodeObject=e.isMsgVoteEncodeObject=e.isMsgSubmitProposalEncodeObject=e.isMsgDepositEncodeObject=e.govTypes=e.isAminoMsgVoteWeighted=e.isAminoMsgVote=e.isAminoMsgSubmitProposal=e.isAminoMsgDeposit=e.createGovAminoConverters=e.setupFeegrantExtension=e.feegrantTypes=e.createFeegrantAminoConverters=e.isAminoMsgSubmitEvidence=e.createEvidenceAminoConverters=e.setupDistributionExtension=e.isMsgWithdrawDelegatorRewardEncodeObject=e.distributionTypes=e.isAminoMsgWithdrawValidatorCommission=e.isAminoMsgWithdrawDelegatorReward=e.isAminoMsgSetWithdrawAddress=e.isAminoMsgFundCommunityPool=e.createDistributionAminoConverters=e.isAminoMsgVerifyInvariant=e.createCrysisAminoConverters=e.setupBankExtension=e.isMsgSendEncodeObject=e.bankTypes=e.isAminoMsgSend=e.isAminoMsgMultiSend=e.createBankAminoConverters=e.setupAuthzExtension=e.authzTypes=e.createAuthzAminoConverters=e.setupAuthExtension=void 0,e.vestingTypes=e.isAminoMsgCreateVestingAccount=e.createVestingAminoConverters=e.setupTxExtension=e.setupStakingExtension=e.stakingTypes=e.isMsgUndelegateEncodeObject=e.isMsgEditValidatorEncodeObject=e.isMsgDelegateEncodeObject=e.isMsgCreateValidatorEncodeObject=e.isMsgBeginRedelegateEncodeObject=e.isAminoMsgUndelegate=e.isAminoMsgEditValidator=e.isAminoMsgDelegate=void 0;var n=Xo;Object.defineProperty(e,"setupAuthExtension",{enumerable:!0,get:function(){return n.setupAuthExtension}});var t=ia;Object.defineProperty(e,"createAuthzAminoConverters",{enumerable:!0,get:function(){return t.createAuthzAminoConverters}});var i=oa;Object.defineProperty(e,"authzTypes",{enumerable:!0,get:function(){return i.authzTypes}});var u=aa;Object.defineProperty(e,"setupAuthzExtension",{enumerable:!0,get:function(){return u.setupAuthzExtension}});var R=Rt;Object.defineProperty(e,"createBankAminoConverters",{enumerable:!0,get:function(){return R.createBankAminoConverters}}),Object.defineProperty(e,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return R.isAminoMsgMultiSend}}),Object.defineProperty(e,"isAminoMsgSend",{enumerable:!0,get:function(){return R.isAminoMsgSend}});var v=Hr;Object.defineProperty(e,"bankTypes",{enumerable:!0,get:function(){return v.bankTypes}}),Object.defineProperty(e,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return v.isMsgSendEncodeObject}});var E=sa;Object.defineProperty(e,"setupBankExtension",{enumerable:!0,get:function(){return E.setupBankExtension}});var C=qr;Object.defineProperty(e,"createCrysisAminoConverters",{enumerable:!0,get:function(){return C.createCrysisAminoConverters}}),Object.defineProperty(e,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return C.isAminoMsgVerifyInvariant}});var D=Sn;Object.defineProperty(e,"createDistributionAminoConverters",{enumerable:!0,get:function(){return D.createDistributionAminoConverters}}),Object.defineProperty(e,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return D.isAminoMsgFundCommunityPool}}),Object.defineProperty(e,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return D.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(e,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return D.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(e,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return D.isAminoMsgWithdrawValidatorCommission}});var _=Vr;Object.defineProperty(e,"distributionTypes",{enumerable:!0,get:function(){return _.distributionTypes}}),Object.defineProperty(e,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return _.isMsgWithdrawDelegatorRewardEncodeObject}});var b=da;Object.defineProperty(e,"setupDistributionExtension",{enumerable:!0,get:function(){return b.setupDistributionExtension}});var f=Qr;Object.defineProperty(e,"createEvidenceAminoConverters",{enumerable:!0,get:function(){return f.createEvidenceAminoConverters}}),Object.defineProperty(e,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return f.isAminoMsgSubmitEvidence}});var p=ua;Object.defineProperty(e,"createFeegrantAminoConverters",{enumerable:!0,get:function(){return p.createFeegrantAminoConverters}});var k=ca;Object.defineProperty(e,"feegrantTypes",{enumerable:!0,get:function(){return k.feegrantTypes}});var o=la;Object.defineProperty(e,"setupFeegrantExtension",{enumerable:!0,get:function(){return o.setupFeegrantExtension}});var s=kn;Object.defineProperty(e,"createGovAminoConverters",{enumerable:!0,get:function(){return s.createGovAminoConverters}}),Object.defineProperty(e,"isAminoMsgDeposit",{enumerable:!0,get:function(){return s.isAminoMsgDeposit}}),Object.defineProperty(e,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return s.isAminoMsgSubmitProposal}}),Object.defineProperty(e,"isAminoMsgVote",{enumerable:!0,get:function(){return s.isAminoMsgVote}}),Object.defineProperty(e,"isAminoMsgVoteWeighted",{enumerable:!0,get:function(){return s.isAminoMsgVoteWeighted}});var y=Pn;Object.defineProperty(e,"govTypes",{enumerable:!0,get:function(){return y.govTypes}}),Object.defineProperty(e,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return y.isMsgDepositEncodeObject}}),Object.defineProperty(e,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return y.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(e,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return y.isMsgVoteEncodeObject}}),Object.defineProperty(e,"isMsgVoteWeightedEncodeObject",{enumerable:!0,get:function(){return y.isMsgVoteWeightedEncodeObject}});var w=pa;Object.defineProperty(e,"setupGovExtension",{enumerable:!0,get:function(){return w.setupGovExtension}});var J=ma;Object.defineProperty(e,"createGroupAminoConverters",{enumerable:!0,get:function(){return J.createGroupAminoConverters}});var P=ya;Object.defineProperty(e,"groupTypes",{enumerable:!0,get:function(){return P.groupTypes}});var U=Wr;Object.defineProperty(e,"createIbcAminoConverters",{enumerable:!0,get:function(){return U.createIbcAminoConverters}}),Object.defineProperty(e,"isAminoMsgTransfer",{enumerable:!0,get:function(){return U.isAminoMsgTransfer}});var r=Fr;Object.defineProperty(e,"ibcTypes",{enumerable:!0,get:function(){return r.ibcTypes}}),Object.defineProperty(e,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return r.isMsgTransferEncodeObject}});var m=Sa;Object.defineProperty(e,"setupIbcExtension",{enumerable:!0,get:function(){return m.setupIbcExtension}});var N=Pa;Object.defineProperty(e,"setupMintExtension",{enumerable:!0,get:function(){return N.setupMintExtension}});var V=Gr;Object.defineProperty(e,"createSlashingAminoConverters",{enumerable:!0,get:function(){return V.createSlashingAminoConverters}}),Object.defineProperty(e,"isAminoMsgUnjail",{enumerable:!0,get:function(){return V.isAminoMsgUnjail}});var d=Ra;Object.defineProperty(e,"setupSlashingExtension",{enumerable:!0,get:function(){return d.setupSlashingExtension}});var l=Fe;Object.defineProperty(e,"createStakingAminoConverters",{enumerable:!0,get:function(){return l.createStakingAminoConverters}}),Object.defineProperty(e,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return l.isAminoMsgBeginRedelegate}}),Object.defineProperty(e,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return l.isAminoMsgCreateValidator}}),Object.defineProperty(e,"isAminoMsgDelegate",{enumerable:!0,get:function(){return l.isAminoMsgDelegate}}),Object.defineProperty(e,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return l.isAminoMsgEditValidator}}),Object.defineProperty(e,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return l.isAminoMsgUndelegate}});var T=en;Object.defineProperty(e,"isMsgBeginRedelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgBeginRedelegateEncodeObject}}),Object.defineProperty(e,"isMsgCreateValidatorEncodeObject",{enumerable:!0,get:function(){return T.isMsgCreateValidatorEncodeObject}}),Object.defineProperty(e,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgDelegateEncodeObject}}),Object.defineProperty(e,"isMsgEditValidatorEncodeObject",{enumerable:!0,get:function(){return T.isMsgEditValidatorEncodeObject}}),Object.defineProperty(e,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgUndelegateEncodeObject}}),Object.defineProperty(e,"stakingTypes",{enumerable:!0,get:function(){return T.
3stakingTypes}});var O=Ba;Object.defineProperty(e,"setupStakingExtension",{enumerable:!0,get:function(){return O.setupStakingExtension}});var B=va;Object.defineProperty(e,"setupTxExtension",{enumerable:!0,get:function(){return B.setupTxExtension}});var M=$r;Object.defineProperty(e,"createVestingAminoConverters",{enumerable:!0,get:function(){return M.createVestingAminoConverters}}),Object.defineProperty(e,"isAminoMsgCreateVestingAccount",{enumerable:!0,get:function(){return M.isAminoMsgCreateVestingAccount}});var W=Oa;Object.defineProperty(e,"vestingTypes",{enumerable:!0,get:function(){return W.vestingTypes}})})(Ni);var At={};Object.defineProperty(At,"__esModule",{value:!0});At.makeMultisignedTxBytes=At.makeMultisignedTx=At.makeCompactBitArray=void 0;const zg=ot,Zg=Pe,Yg=Ct,Cd=Xn,Xg=ri,Sc=it,Gl=it;function Ll(e){const n=Math.ceil(e.length/8),t=e.length-Math.floor(e.length/8)*8,i=new Uint8Array(n);return e.forEach((u,R)=>{const v=Math.floor(R/8),E=R%8;u&&(i[v]|=1<<8-1-E)}),Cd.CompactBitArray.fromPartial({elems:i,extraBitsStored:t})}At.makeCompactBitArray=Ll;function $l(e,n,t,i,u){const R=Array.from(u.keys()),v=(0,Zg.fromBech32)(R[0]).prefix,E=Array(e.value.pubkeys.length).fill(!1),C=new Array;for(let p=0;p<e.value.pubkeys.length;p++){const k=(0,zg.pubkeyToAddress)(e.value.pubkeys[p],v),o=u.get(k);o&&(E[p]=!0,C.push(o))}const D={publicKey:(0,Yg.encodePubkey)(e),modeInfo:{multi:{bitarray:Ll(E),modeInfos:C.map(p=>({single:{mode:Xg.SignMode.SIGN_MODE_LEGACY_AMINO_JSON}}))}},sequence:BigInt(n)},_=Sc.AuthInfo.fromPartial({signerInfos:[D],fee:{amount:[...t.amount],gasLimit:BigInt(t.gas)}}),b=Sc.AuthInfo.encode(_).finish();return Gl.TxRaw.fromPartial({bodyBytes:i,authInfoBytes:b,signatures:[Cd.MultiSignature.encode(Cd.MultiSignature.fromPartial({signatures:C})).finish()]})}At.makeMultisignedTx=$l;function xg(e,n,t,i,u){const R=$l(e,n,t,i,u);return Uint8Array.from(Gl.TxRaw.encode(R).finish())}At.makeMultisignedTxBytes=xg;var Qi={};Object.defineProperty(Qi,"__esModule",{value:!0});Qi.isSearchTxQueryArray=void 0;function jg(e){return Array.isArray(e)}Qi.isSearchTxQueryArray=jg;var Kl={},mu={},zn={};Object.defineProperty(zn,"__esModule",{value:!0});zn.pubkeyToAddress=zn.pubkeyToRawAddress=zn.rawSecp256k1PubkeyToRawAddress=zn.rawEd25519PubkeyToRawAddress=void 0;const wd=fn,eS=Pe;function zl(e){if(e.length!==32)throw new Error(`Invalid Ed25519 pubkey length: ${e.length}`);return(0,wd.sha256)(e).slice(0,20)}zn.rawEd25519PubkeyToRawAddress=zl;function Zl(e){if(e.length!==33)throw new Error(`Invalid Secp256k1 pubkey length (compressed): ${e.length}`);return(0,wd.ripemd160)((0,wd.sha256)(e))}zn.rawSecp256k1PubkeyToRawAddress=Zl;function Yl(e,n){switch(e){case"ed25519":return zl(n);case"secp256k1":return Zl(n);default:throw new Error(`Pubkey type ${e} not supported`)}}zn.pubkeyToRawAddress=Yl;function nS(e,n){return(0,eS.toHex)(Yl(e,n)).toUpperCase()}zn.pubkeyToAddress=nS;var Le={};Object.defineProperty(Le,"__esModule",{value:!0});Le.DateTime=Le.toSeconds=Le.fromSeconds=Le.toRfc3339WithNanoseconds=Le.fromRfc3339WithNanoseconds=void 0;const tS=Pe,rS=Cn;function Xl(e){const n=(0,tS.fromRfc3339)(e),t=e.match(/\.(\d+)Z$/),i=t?t[1].slice(3):"";return n.nanoseconds=parseInt(i.padEnd(6,"0"),10),n}Le.fromRfc3339WithNanoseconds=Xl;function xl(e){var i;const n=e.toISOString(),t=((i=e.nanoseconds)==null?void 0:i.toString())??"";return`${n.slice(0,-1)}${t.padStart(6,"0")}Z`}Le.toRfc3339WithNanoseconds=xl;function iS(e,n=0){const t=new rS.Uint32(n).toNumber();if(t>999999999)throw new Error("Nano seconds must not exceed 999999999");const i=new Date(e*1e3+Math.floor(t/1e6));return i.nanoseconds=t%1e6,i}Le.fromSeconds=iS;function oS(e){return{seconds:Math.floor(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6+(e.nanoseconds??0)}}Le.toSeconds=oS;class aS{static decode(n){return Xl(n)}static encode(n){return xl(n)}}Le.DateTime=aS;var Co={},ba={},st={};Object.defineProperty(st,"__esModule",{value:!0});st.createJsonRpcRequest=void 0;const kc="123456789";function sS(){return kc[Math.floor(Math.random()*kc.length)]}function dS(){return parseInt(Array.from({length:12}).map(()=>sS()).join(""),10)}function uS(e,n){const t=n?{...n}:{};return{jsonrpc:"2.0",id:dS(),method:e,params:t}}st.createJsonRpcRequest=uS;var Wi={},Aa={},Ia={},Ta={};Object.defineProperty(Ta,"__esModule",{value:!0});Ta.makeJsonRpcId=void 0;let cS=1e4;function lS(){return cS+=1}Ta.makeJsonRpcId=lS;var Na={},nt={};
3Object.defineProperty(nt,"__esModule",{value:!0});nt.jsonRpcCode=nt.isJsonRpcSuccessResponse=nt.isJsonRpcErrorResponse=void 0;function jl(e){return typeof e.error=="object"}nt.isJsonRpcErrorResponse=jl;function fS(e){return!jl(e)}nt.isJsonRpcSuccessResponse=fS;nt.jsonRpcCode={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:{default:-32e3}};Object.defineProperty(Na,"__esModule",{value:!0});Na.JsonRpcClient=void 0;const pS=Vi,mS=nt;class yS{constructor(n){this.connection=n}async run(n){const t=this.connection.responseStream.filter(R=>R.id===n.id),i=(0,pS.firstEvent)(t);this.connection.sendRequest(n);const u=await i;if((0,mS.isJsonRpcErrorResponse)(u)){const R=u.error;throw new Error(`JSON RPC error: code=${R.code}; message='${R.message}'`)}return u}}Na.JsonRpcClient=yS;var Rn={},It={};Object.defineProperty(It,"__esModule",{value:!0});It.isJsonCompatibleDictionary=It.isJsonCompatibleArray=It.isJsonCompatibleValue=void 0;function yu(e){return!!(typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||ef(e)||nf(e))}It.isJsonCompatibleValue=yu;function ef(e){if(!Array.isArray(e))return!1;for(const n of e)if(!yu(n))return!1;return!0}It.isJsonCompatibleArray=ef;function nf(e){return typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]"?!1:Object.values(e).every(yu)}It.isJsonCompatibleDictionary=nf;Object.defineProperty(Rn,"__esModule",{value:!0});Rn.parseJsonRpcResponse=Rn.parseJsonRpcSuccessResponse=Rn.parseJsonRpcErrorResponse=Rn.parseJsonRpcRequest=Rn.parseJsonRpcId=void 0;const Tt=It;function tf(e){if(!(0,Tt.isJsonCompatibleDictionary)(e))throw new Error("Data must be JSON compatible dictionary");const n=e.id;return typeof n!="number"&&typeof n!="string"?null:n}Rn.parseJsonRpcId=tf;function hS(e){if(!(0,Tt.isJsonCompatibleDictionary)(e))throw new Error("Data must be JSON compatible dictionary");if(e.jsonrpc!=="2.0")throw new Error(`Got unexpected jsonrpc version: ${e.jsonrpc}`);const n=tf(e);if(n===null)throw new Error("Invalid id field");const t=e.method;if(typeof t!="string")throw new Error("Invalid method field");if(!(0,Tt.isJsonCompatibleArray)(e.params)&&!(0,Tt.isJsonCompatibleDictionary)(e.params))throw new Error("Invalid params field");return{jsonrpc:"2.0",id:n,method:t,params:e.params}}Rn.parseJsonRpcRequest=hS;function gS(e){if(typeof e.code!="number")throw new Error("Error property 'code' is not a number");if(typeof e.message!="string")throw new Error("Error property 'message' is not a string");let n;if(e.data===void 0)n=void 0;else if((0,Tt.isJsonCompatibleValue)(e.data))n=e.data;else throw new Error("Error property 'data' is defined but not a JSON compatible value.");return{code:e.code,message:e.message,...n!==void 0?{data:n}:{}}}function rf(e){if(!(0,Tt.isJsonCompatibleDictionary)(e))throw new Error("Data must be JSON compatible dictionary");if(e.jsonrpc!=="2.0")throw new Error(`Got unexpected jsonrpc version: ${JSON.stringify(e)}`);const n=e.id;if(typeof n!="number"&&typeof n!="string"&&n!==null)throw new Error("Invalid id field");if(typeof e.error>"u"||!(0,Tt.isJsonCompatibleDictionary)(e.error))throw new Error("Invalid error field");return{jsonrpc:"2.0",id:n,error:gS(e.error)}}Rn.parseJsonRpcErrorResponse=rf;function of(e){if(!(0,Tt.isJsonCompatibleDictionary)(e))throw new Error("Data must be JSON compatible dictionary");if(e.jsonrpc!=="2.0")throw new Error(`Got unexpected jsonrpc version: ${JSON.stringify(e)}`);const n=e.id;if(typeof n!="number"&&typeof n!="string")throw new Error("Invalid id field");if(typeof e.result>"u")throw new Error("Invalid result field");const t=e.result;return{jsonrpc:"2.0",id:n,result:t}}Rn.parseJsonRpcSuccessResponse=of;function SS(e){let n;try{n=rf(e)}catch{n=of(e)}return n}Rn.parseJsonRpcResponse=SS;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.jsonRpcCode=e.isJsonRpcSuccessResponse=e.isJsonRpcErrorResponse=e.parseJsonRpcSuccessResponse=e.parseJsonRpcResponse=e.parseJsonRpcRequest=e.parseJsonRpcId=e.parseJsonRpcErrorResponse=e.JsonRpcClient=e.makeJsonRpcId=void 0;var n=Ta;Object.defineProperty(e,"makeJsonRpcId",{enumerable:!0,get:function(){return n.makeJsonRpcId}});var t=Na;Object.defineProperty(e,"JsonRpcClient",{enumerable:!0,get:function(){return t.JsonRpcClient}});var i=Rn;Object.defineProperty(e,"parseJsonRpcErrorResponse",{enumerable:!0,get:function(){return i.parseJsonRpcErrorResponse}}),Object.defineProperty(e,"parseJsonRpcId",{enumerable:!0,get:function(){return i.parseJsonRpcId}}),Object.defineProperty(e,"parseJsonRpcRequest",{enumerable:!0,get:function(){return i.parseJsonRpcRequest}}),Object.defineProperty(e,"parseJsonRpcResponse",{enumerable:!0,get:function(){return i.parseJsonRpcResponse}}),Object.defineProperty(e,"parseJsonRpcSuccessResponse",{enumerable:!0,get:function(){return i.parseJsonRpcSuccessResponse}});var u=nt;Object.defineProperty(e,"isJsonRpcErrorResponse",{enumerable:!0,get:function(){return u.isJsonRpcErrorResponse}}),Object.defineProperty(e,"isJsonRpcSuccessResponse",{enumerable:!0,get:function(){return u.isJsonRpcSuccessResponse}}),Object.defineProperty(e,"jsonRpcCode",{enumerable:!0,get:function(){return u.jsonRpcCode}})})(Ia);var Fi={};function af(e,n){return function(){return e.apply(n,arguments)}}const{toString:kS}=Object.prototype,{getPrototypeOf:hu}=Object,Ca=(e=>n=>{const t=kS.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),jn=e=>(e=e.toLowerCase(),n=>Ca(n)===e),wa=e=>n=>typeof n===e,{isArray:ii}=Array,Ci=wa("undefined");function PS(e){return e!==null&&!Ci(e)&&e.constructor!==null&&!Ci(e.constructor)&&Nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sf=jn("ArrayBuffer");function RS(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&sf(e.buffer),n}const BS=wa("string"),Nn=wa("function"),df=wa("number"),_a=e=>e!==null&&typeof e=="object",vS=e=>e===!0||e===!1,Bo=e=>{if(Ca(e)!=="object")return!1;const n=hu(e);
vendor: 8,312 bytes, line 3
3return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},OS=jn("Date"),bS=jn("File"),AS=jn("Blob"),IS=jn("FileList"),TS=e=>_a(e)&&Nn(e.pipe),NS=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||Nn(e.append)&&((n=Ca(e))==="formdata"||n==="object"&&Nn(e.toString)&&e.toString()==="[object FormData]"))},CS=jn("URLSearchParams"),wS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gi(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let i,u;if(typeof e!="object"&&(e=[e]),ii(e))for(i=0,u=e.length;i<u;i++)n.call(null,e[i],i,e);else{const R=t?Object.getOwnPropertyNames(e):Object.keys(e),v=R.length;let E;for(i=0;i<v;i++)E=R[i],n.call(null,e[E],E,e)}}function uf(e,n){n=n.toLowerCase();const t=Object.keys(e);let i=t.length,u;for(;i-- >0;)if(u=t[i],n===u.toLowerCase())return u;return null}const cf=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:re)(),lf=e=>!Ci(e)&&e!==cf;function _d(){const{caseless:e}=lf(this)&&this||{},n={},t=(i,u)=>{const R=e&&uf(n,u)||u;Bo(n[R])&&Bo(i)?n[R]=_d(n[R],i):Bo(i)?n[R]=_d({},i):ii(i)?n[R]=i.slice():n[R]=i};for(let i=0,u=arguments.length;i<u;i++)arguments[i]&&Gi(arguments[i],t);return n}const _S=(e,n,t,{allOwnKeys:i}={})=>(Gi(n,(u,R)=>{t&&Nn(u)?e[R]=af(u,t):e[R]=u},{allOwnKeys:i}),e),ES=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),JS=(e,n,t,i)=>{e.prototype=Object.create(n.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),t&&Object.assign(e.prototype,t)},US=(e,n,t,i)=>{let u,R,v;const E={};if(n=n||{},e==null)return n;do{for(u=Object.getOwnPropertyNames(e),R=u.length;R-- >0;)v=u[R],(!i||i(v,e,n))&&!E[v]&&(n[v]=e[v],E[v]=!0);e=t!==!1&&hu(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},DS=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const i=e.indexOf(n,t);return i!==-1&&i===t},MS=e=>{if(!e)return null;if(ii(e))return e;let n=e.length;if(!df(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},HS=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&hu(Uint8Array)),qS=(e,n)=>{const i=(e&&e[Symbol.iterator]).call(e);let u;for(;(u=i.next())&&!u.done;){const R=u.value;n.call(e,R[0],R[1])}},VS=(e,n)=>{let t;const i=[];for(;(t=e.exec(n))!==null;)i.push(t);return i},QS=jn("HTMLFormElement"),WS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,u){return i.toUpperCase()+u}),Pc=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),FS=jn("RegExp"),ff=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),i={};Gi(t,(u,R)=>{let v;(v=n(u,R,e))!==!1&&(i[R]=v||u)}),Object.defineProperties(e,i)},GS=e=>{ff(e,(n,t)=>{if(Nn(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=e[t];if(Nn(i)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},LS=(e,n)=>{const t={},i=u=>{u.forEach(R=>{t[R]=!0})};return ii(e)?i(e):i(String(e).split(n)),t},$S=()=>{},KS=(e,n)=>(e=+e,Number.isFinite(e)?e:n),ad="abcdefghijklmnopqrstuvwxyz",Rc="0123456789",pf={DIGIT:Rc,ALPHA:ad,ALPHA_DIGIT:ad+ad.toUpperCase()+Rc},zS=(e=16,n=pf.ALPHA_DIGIT)=>{let t="";const{length:i}=n;for(;e--;)t+=n[Math.random()*i|0];return t};function ZS(e){return!!(e&&Nn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const YS=e=>{const n=new Array(10),t=(i,u)=>{if(_a(i)){if(n.indexOf(i)>=0)return;if(!("toJSON"in i)){n[u]=i;const R=ii(i)?[]:{};return Gi(i,(v,E)=>{const C=t(v,u+1);!Ci(C)&&(R[E]=C)}),n[u]=void 0,R}}return i};return t(e,0)},XS=jn("AsyncFunction"),xS=e=>e&&(_a(e)||Nn(e))&&Nn(e.then)&&Nn(e.catch);var Z={isArray:ii,isArrayBuffer:sf,isBuffer:PS,isFormData:NS,isArrayBufferView:RS,isString:BS,isNumber:df,isBoolean:vS,isObject:_a,isPlainObject:Bo,isUndefined:Ci,isDate:OS,isFile:bS,isBlob:AS,isRegExp:FS,isFunction:Nn,isStream:TS,isURLSearchParams:CS,isTypedArray:HS,isFileList:IS,forEach:Gi,merge:_d,extend:_S,trim:wS,stripBOM:ES,inherits:JS,toFlatObject:US,kindOf:Ca,kindOfTest:jn,endsWith:DS,toArray:MS,forEachEntry:qS,matchAll:VS,isHTMLForm:QS,hasOwnProperty:Pc,hasOwnProp:Pc,reduceDescriptors:ff,freezeMethods:GS,toObjectSet:LS,toCamelCase:WS,noop:$S,toFiniteNumber:KS,findKey:uf,global:cf,isContextDefined:lf,ALPHABET:pf,generateString:zS,isSpecCompliantForm:ZS,toJSONObject:YS,isAsyncFn:XS,isThenable:xS};function ke(e,n,t,i,u){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),t&&(this.config=t),i&&(this.request=i),u&&(this.response=u)}Z.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const mf=ke.prototype,yf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{yf[e]={value:e}});Object.defineProperties(ke,yf);Object.defineProperty(mf,"isAxiosError",{value:!0});ke.from=(e,n,t,i,u,R)=>{const v=Object.create(mf);return Z.toFlatObject(e,v,function(C){return C!==Error.prototype},E=>E!=="isAxiosError"),ke.call(v,e.message,n,t,i,u),v.cause=e,v.name=e.name,R&&Object.assign(v,R),v};var jS=null;function Ed(e){return Z.isPlainObject(e)||Z.isArray(e)}function hf(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function Bc(e,n,t){return e?e.concat(n).map(function(u,R){return u=hf(u),!t&&R?"["+u+"]":u}).join(t?".":""):n}function ek(e){return Z.isArray(e)&&!e.some(Ed)}const nk=Z.toFlatObject(Z,{},null,function(n){return/^is[A-Z]/.test(n)});function Ea(e,n,t){if(!Z.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=Z.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(o,s){return!Z.isUndefined(s[o])});const i=t.metaTokens,u=t.visitor||_,R=t.dots,v=t.indexes,C=(t.Blob||typeof Blob<"u"&&Blob)&&Z.isSpecCompliantForm(n);if(!Z.isFunction(u))throw new TypeError("visitor must be a function");function D(k){if(k===null)return"";if(Z.isDate(k))return k.toISOString();if(!C&&Z.isBlob(k))throw new ke("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(k)||Z.isTypedArray(k)?C&&typeof Blob=="function"?new Blob([k]):Buffer.from(k):k}function _(k,o,s){let y=k;if(k&&!s&&typeof k=="object"){if(Z.endsWith(o,"{}"))o=i?o:o.slice(0,-2),k=JSON.stringify(k);else if(Z.isArray(k)&&ek(k)||(Z.isFileList(k)||Z.endsWith(o,"[]"))&&(y=Z.toArray(k)))return o=hf(o),y.forEach(function(J,P){!(Z.isUndefined(J)||J===null)&&n.append(v===!0?Bc([o],P,R):v===null?o:o+"[]",D(J))}),!1}return Ed(k)?!0:(n.append(Bc(s,o,R),D(k)),!1)}const b=[],f=Object.assign(nk,{defaultVisitor:_,convertValue:D,isVisitable:Ed});function p(k,o){if(!Z.isUndefined(k)){if(b.indexOf(k)!==-1)throw Error("Circular reference detected in "+o.join("."));b.push(k),Z.forEach(k,function(y,w){(!(Z.isUndefined(y)||y===null)&&u.call(n,y,Z.isString(w)?w.trim():w,o,f))===!0&&p(y,o?o.concat(w):[w])}),b.pop()}}if(!Z.isObject(e))throw new TypeError("data must be an object");return p(e),n}function vc(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return n[i]})}function gu(e,n){this._pairs=[],e&&Ea(e,this,n)}const gf=gu.prototype;gf.append=function(n,t){this._pairs.push([n,t])};gf.toString=function(n){const t=n?function(i){return n.call(this,i,vc)}:vc;return this._pairs.map(function(u){return t(u[0])+"="+t(u[1])},"").join("&")};function tk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sf(e,n,t){if(!n)return e;const i=t&&t.encode||tk,u=t&&t.serialize;let R;if(u?R=u(n,t):R=Z.isURLSearchParams(n)?n.toString():new gu(n,t).toString(i),R){const v=e.indexOf("#");v!==-1&&(e=e.slice(0,v)),e+=(e.indexOf("?")===-1?"?":"&")+R}return e}class rk{constructor(){this.handlers=[]}
3use(n,t,i){return this.handlers.push({fulfilled:n,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){Z.forEach(this.handlers,function(i){i!==null&&n(i)})}}var Oc=rk,kf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ik=typeof URLSearchParams<"u"?URLSearchParams:gu,ok=typeof FormData<"u"?FormData:null,ak=typeof Blob<"u"?Blob:null,sk={isBrowser:!0,classes:{URLSearchParams:ik,FormData:ok,Blob:ak},protocols:["http","https","file","blob","url","data"]};const Pf=typeof window<"u"&&typeof document<"u",dk=(e=>Pf&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),uk=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")();var ck=Object.freeze({__proto__:null,hasBrowserEnv:Pf,hasStandardBrowserWebWorkerEnv:uk,hasStandardBrowserEnv:dk}),Zn={...ck,...sk};function lk(e,n){return Ea(e,new Zn.classes.URLSearchParams,Object.assign({visitor:function(t,i,u,R){return Zn.isNode&&Z.isBuffer(t)?(this.append(i,t.toString("base64")),!1):R.defaultVisitor.apply(this,arguments)}},n))}function fk(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function pk(e){const n={},t=Object.keys(e);let i;const u=t.length;let R;for(i=0;i<u;i++)R=t[i],n[R]=e[R];return n}function Rf(e){function n(t,i,u,R){let v=t[R++];if(v==="__proto__")return!0;const E=Number.isFinite(+v),C=R>=t.length;return v=!v&&Z.isArray(u)?u.length:v,C?(Z.hasOwnProp(u,v)?u[v]=[u[v],i]:u[v]=i,!E):((!u[v]||!Z.isObject(u[v]))&&(u[v]=[]),n(t,i,u[v],R)&&Z.isArray(u[v])&&(u[v]=pk(u[v])),!E)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const t={};return Z.forEachEntry(e,(i,u)=>{n(fk(i),u,t,0)}),t}return null}function mk(e,n,t){if(Z.isString(e))try{return(n||JSON.parse)(e),Z.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(e)}const Su={transitional:kf,adapter:["xhr","http"],transformRequest:[function(n,t){const i=t.getContentType()||"",u=i.indexOf("application/json")>-1,R=Z.isObject(n);if(R&&Z.isHTMLForm(n)&&(n=new FormData(n)),Z.isFormData(n))return u?JSON.stringify(Rf(n)):n;if(Z.isArrayBuffer(n)||Z.isBuffer(n)||Z.isStream(n)||Z.isFile(n)||Z.isBlob(n))return n;if(Z.isArrayBufferView(n))return n.buffer;if(Z.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let E;if(R){if(i.indexOf("application/x-www-form-urlencoded")>-1)return lk(n,this.formSerializer).toString();if((E=Z.isFileList(n))||i.indexOf("multipart/form-data")>-1){const C=this.env&&this.env.FormData;return Ea(E?{"files[]":n}:n,C&&new C,this.formSerializer)}}return R||u?(t.setContentType("application/json",!1),mk(n)):n}],transformResponse:[function(n){const t=this.transitional||Su.transitional,i=t&&t.forcedJSONParsing,u=this.responseType==="json";if(n&&Z.isString(n)&&(i&&!this.responseType||u)){const v=!(t&&t.silentJSONParsing)&&u;try{return JSON.parse(n)}catch(E){if(v)throw E.name==="SyntaxError"?ke.from(E,ke.ERR_BAD_RESPONSE,this,null,this.response):E}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zn.classes.FormData,Blob:Zn.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],e=>{Su.headers[e]={}});var ku=Su;const yk=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var hk=e=>{const n={};let t,i,u;return e&&e.split(` 4`).forEach(function(v){u=v.indexOf(":"),t=v.substring(0,u).trim().toLowerCase(),i=v.substring(u+1).trim(),!(!t||n[t]&&yk[t])&&(t==="set-cookie"?n[t]?n[t].push(i):n[t]=[i]:n[t]=n[t]?n[t]+", "+i:i)}),n};const bc=Symbol("internals");function Ri(e){return e&&String(e).trim().toLowerCase()}function vo(e){return e===!1||e==null?e:Z.isArray(e)?e.map(vo):String(e)}function gk(e){const n=Object.create(null),t=/([^\s,;
4=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=t.exec(e);)n[i[1]]=i[2];return n}const Sk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sd(e,n,t,i,u){if(Z.isFunction(i))return i.call(this,n,t);if(u&&(n=t),!!Z.isString(n)){if(Z.isString(i))return n.indexOf(i)!==-1;if(Z.isRegExp(i))return i.test(n)}}function kk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,i)=>t.toUpperCase()+i)}function Pk(e,n){const t=Z.toCamelCase(" "+n);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+t,{value:function(u,R,v){return this[i].call(this,n,u,R,v)},configurable:!0})})}class Ja{constructor(n){n&&this.set(n)}set(n,t,i){const u=this;function R(E,C,D){const _=Ri(C);if(!_)throw new Error("header name must be a non-empty string");const b=Z.findKey(u,_);(!b||u[b]===void 0||D===!0||D===void 0&&u[b]!==!1)&&(u[b||C]=vo(E))}const v=(E,C)=>Z.forEach(E,(D,_)=>R(D,_,C));return Z.isPlainObject(n)||n instanceof this.constructor?v(n,t):Z.isString(n)&&(n=n.trim())&&!Sk(n)?v(hk(n),t):n!=null&&R(t,n,i),this}get(n,t){if(n=Ri(n),n){const i=Z.findKey(this,n);if(i){const u=this[i];if(!t)return u;if(t===!0)return gk(u);if(Z.isFunction(t))return t.call(this,u,i);if(Z.isRegExp(t))return t.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=Ri(n),n){const i=Z.findKey(this,n);return!!(i&&this[i]!==void 0&&(!t||sd(this,this[i],i,t)))}return!1}delete(n,t){const i=this;let u=!1;function R(v){if(v=Ri(v),v){const E=Z.findKey(i,v);E&&(!t||sd(i,i[E],E,t))&&(delete i[E],u=!0)}}return Z.isArray(n)?n.forEach(R):R(n),u}clear(n){const t=Object.keys(this);let i=t.length,u=!1;for(;i--;){const R=t[i];(!n||sd(this,this[R],R,n,!0))&&(delete this[R],u=!0)}return u}normalize(n){const t=this,i={};return Z.forEach(this,(u,R)=>{const v=Z.findKey(i,R);if(v){t[v]=vo(u),delete t[R];return}const E=n?kk(R):String(R).trim();E!==R&&delete t[R],t[E]=vo(u),i[E]=!0}),this}
4concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return Z.forEach(this,(i,u)=>{i!=null&&i!==!1&&(t[u]=n&&Z.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(` 5`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const i=new this(n);return t.forEach(u=>i.set(u)),i}static accessor(n){const i=(this[bc]=this[bc]={accessors:{}}).accessors,u=this.prototype;function R(v){const E=Ri(v);i[E]||(Pk(u,v),i[E]=!0)}return Z.isArray(n)?n.forEach(R):R(n),this}}Ja.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(Ja.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(i){this[t]=i}}});Z.freezeMethods(Ja);var tt=Ja;function dd(e,n){const t=this||ku,i=n||t,u=tt.from(i.headers);let R=i.data;return Z.forEach(e,function(E){R=E.call(t,R,u.normalize(),n?n.status:void 0)}),u.normalize(),R}function Bf(e){return!!(e&&e.__CANCEL__)}function Li(e,n,t){ke.call(this,e??"canceled",ke.ERR_CANCELED,n,t),this.name="CanceledError"}Z.inherits(Li,ke,{__CANCEL__:!0});function Rk(e,n,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?e(t):n(new ke("Request failed with status code "+t.status,[ke.ERR_BAD_REQUEST,ke.ER
5R_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}var Bk=Zn.hasStandardBrowserEnv?{write(e,n,t,i,u,R){const v=[e+"="+encodeURIComponent(n)];Z.isNumber(t)&&v.push("expires="+new Date(t).toGMTString()),Z.isString(i)&&v.push("path="+i),Z.isString(u)&&v.push("domain="+u),R===!0&&v.push("secure"),document.cookie=v.join("; ")},read(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ok(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function vf(e,n){return e&&!vk(n)?Ok(e,n):n}var bk=Zn.hasStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function u(R){let v=R;return n&&(t.setAttribute("href",v),v=t.href),t.setAttribute("href",v),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=u(window.location.href),function(v){const E=Z.isString(v)?u(v):v;return E.protocol===i.protocol&&E.host===i.host}}():function(){return function(){return!0}}();function Ak(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function Ik(e,n){e=e||10;const t=new Array(e),i=new Array(e);let u=0,R=0,v;return n=n!==void 0?n:1e3,function(C){const D=Date.now(),_=i[R];v||(v=D),t[u]=C,i[u]=D;let b=R,f=0;for(;b!==u;)f+=t[b++],b=b%e;if(u=(u+1)%e,u===R&&(R=(R+1)%e),D-v<n)return;const p=_&&D-_;return p?Math.round(f*1e3/p):void 0}}function Ac(e,n){let t=0;const i=Ik(50,250);return u=>{const R=u.loaded,v=u.lengthComputable?u.total:void 0,E=R-t,C=i(E),D=R<=v;t=R;const _={loaded:R,total:v,progress:v?R/v:void 0,bytes:E,rate:C||void 0,estimated:C&&v&&D?(v-R)/C:void 0,event:u};_[n?"download":"upload"]=!0,e(_)}}const Tk=typeof XMLHttpRequest<"u";var Nk=Tk&&function(e){return new Promise(function(t,i){let u=e.data;const R=tt.from(e.headers).normalize();let{responseType:v,withXSRFToken:E}=e,C;function D(){e.cancelToken&&e.cancelToken.unsubscribe(C),e.signal&&e.signal.removeEventListener("abort",C)}let _;if(Z.isFormData(u)){if(Zn.hasStandardBrowserEnv||Zn.hasStandardBrowserWebWorkerEnv)R.setContentType(!1);else if((_=R.getContentType())!==!1){const[o,...s]=_?_.split(";").map(y=>y.trim()).filter(Boolean):[];R.setContentType([o||"multipart/form-data",...s].join("; "))}}let b=new XMLHttpRequest;if(e.auth){const o=e.auth.username||"",s=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";R.set("Authorization","Basic "+btoa(o+":"+s))}const f=vf(e.baseURL,e.url);b.open(e.method.toUpperCase(),Sf(f,e.params,e.paramsSerializer),!0),b.timeout=e.timeout;function p(){if(!b)return;const o=tt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),y={data:!v||v==="text"||v==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:o,config:e,request:b};Rk(function(J){t(J),D()},function(J){i(J),D()},y),b=null}if("onloadend"in b?b.onloadend=p:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(p)},b.onabort=function(){b&&(i(new ke("Request aborted",ke.ECONNABORTED,e,b)),b=null)},b.onerror=function(){i(new ke("Network Error",ke.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let s=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||kf;e.timeoutErrorMessage&&(s=e.timeoutErrorMessage),i(new ke(s,y.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,b)),b=null},Zn.hasStandardBrowserEnv&&(E&&Z.isFunction(E)&&(E=E(e)),E||E!==!1&&bk(f))){const o=e.xsrfHeaderName&&e.xsrfCookieName&&Bk.read(e.xsrfCookieName);o&&R.set(e.xsrfHeaderName,o)}u===void 0&&R.setContentType(null),"setRequestHeader"in b&&Z.forEach(R.toJSON(),function(s,y){b.setRequestHeader(y,s)}),Z.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),v&&v!=="json"&&(b.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&b.addEventListener("progress",Ac(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",Ac(e.onUploadProgress)),(e.cancelToken||e.signal)&&(C=o=>{b&&(i(!o||o.type?new Li(null,e,b):o),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(C),e.signal&&(e.signal.aborted?C():e.signal.addEventListener("abort",C)));const k=Ak(f);if(k&&Zn.protocols.indexOf(k)===-1){i(new ke("Unsupported protocol "+k+":",ke.ERR_BAD_REQUEST,e));return}b.send(u||null)})};const Jd={http:jS,xhr:Nk};Z.forEach(Jd,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const Ic=e=>`- ${e}`,Ck=e=>Z.isFunction(e)||e===null||e===!1;
5var Of={getAdapter:e=>{e=Z.isArray(e)?e:[e];const{length:n}=e;let t,i;const u={};for(let R=0;R<n;R++){t=e[R];let v;if(i=t,!Ck(t)&&(i=Jd[(v=String(t)).toLowerCase()],i===void 0))throw new ke(`Unknown adapter '${v}'`);if(i)break;u[v||"#"+R]=i}if(!i){const R=Object.entries(u).map(([E,C])=>`adapter ${E} `+(C===!1?"is not supported by the environment":"is not available in the build"));let v=n?R.length>1?`since : 6`+R.map(Ic).join(` 7`):" "+Ic(R[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return i},adapters:Jd};function ud(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Li(null,e)}function Tc(e){return ud(e),e.headers=tt.from(e.headers),e.data=dd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Of.getAdapter(e.adapter||ku.adapter)(e).then(function(i){return ud(e),i.data=dd.call(e,e.transformResponse,i),i.headers=tt.from(i.headers),i},function(i){return Bf(i)||(ud(e),i&&i.response&&(i.response.data=dd.call(e,e.transformResponse,i.response),i.response.headers=tt.from(i.response.headers))),Promise.reject(i)})}const Nc=e=>e instanceof tt?{...e}:e;function Kr(e,n){n=n||{};const t={};function i(D,_,b){return Z.isPlainObject(D)&&Z.isPlainObject(_)?Z.merge.call({caseless:b},D,_):Z.isPlainObject(_)?Z.merge({},_):Z.isArray(_)?_.slice():_}function u(D,_,b){if(Z.isUndefined(_)){if(!Z.isUndefined(D))return i(void 0,D,b)}else return i(D,_,b)}function R(D,_){if(!Z.isUndefined(_))return i(void 0,_)}function v(D,_){if(Z.isUndefined(_)){if(!Z.isUndefined(D))return i(void 0,D)}else return i(void 0,_)}function E(D,_,b){if(b in n)return i(D,_);if(b in e)return i(void 0,D)}const C={url:R,method:R,data:R,baseURL:v,transformRequest:v,transformResponse:v,paramsSerializer:v,timeout:v,timeoutMessage:v,withCredentials:v,withXSRFToken:v,adapter:v,responseType:v,xsrfCookieName:v,xsrfHeaderName:v,onUploadProgress:v,onDownloadProgress:v,decompress:v,maxContentLength:v,maxBodyLength:v,beforeRedirect:v,transport:v,httpAgent:v,httpsAgent:v,cancelToken:v,socketPath:v,responseEncoding:v,validateStatus:E,headers:(D,_)=>u(Nc(D),Nc(_),!0)};return Z.forEach(Object.keys(Object.assign({},e,n)),function(_){const b=C[_]||u,f=b(e[_],n[_],_);Z.isUndefined(f)&&b!==E||(t[_]=f)}),t}const bf="1.6.8",Pu={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{Pu[e]=function(i){return typeof i===e||"a"+(n<1?"n ":" ")+e}});const Cc={};Pu.transitional=function(n,t,i){function u(R,v){return"[Axios v"+bf+"] Transitional option '"+R+"'"+v+(i?". "+i:"")}return(R,v,E)=>{if(n===!1)throw new ke(u(v," has been removed"+(t?" in "+t:"")),ke.ERR_DEPRECATED);return t&&!Cc[v]&&(Cc[v]=!0,console.warn(u(v," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(R,v,E):!0}};function wk(e,n,t){if(typeof e!="object")throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let u=i.length;for(;u-- >0;){const R=i[u],v=n[R];if(v){const E=e[R],C=E===void 0||v(E,R,e);if(C!==!0)throw new ke("option "+R+" must be "+C,ke.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ke("Unknown option "+R,ke.ERR_BAD_OPTION)}}var Ud={assertOptions:wk,validators:Pu};const lt=Ud.validators;class wo{constructor(n){this.defaults=n,this.interceptors={request:new Oc,response:new Oc}}async request(n,t){try{return await this._request(n,t)}catch(i){if(i instanceof Error){let u;Error.captureStackTrace?Error.captureStackTrace(u={}):u=new Error;const R=u.stack?u.stack.replace(/^.+\n/,""):"";i.stack?R&&!String(i.stack).endsWith(R.replace(/^.+\n.+\n/,""))&&(i.stack+=` 8`+R):i.stack=R}throw i}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=Kr(this.defaults,t);const{transitional:i,paramsSerializer:u,headers:R}=t;i!==void 0&&Ud.assertOptions(i,{silentJSONParsing:lt.transitional(lt.boolean),forcedJSONParsing:lt.transitional(lt.boolean),clarifyTimeoutError:lt.transitional(lt.boolean)},!1),u!=null&&(Z.isFunction(u)?t.paramsSerializer={serialize:u}:Ud.assertOptions(u,{encode:lt.function,serialize:lt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();
vendor: 2,425 bytes, line 8
8let v=R&&Z.merge(R.common,R[t.method]);R&&Z.forEach(["delete","get","head","post","put","patch","common"],k=>{delete R[k]}),t.headers=tt.concat(v,R);const E=[];let C=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(t)===!1||(C=C&&o.synchronous,E.unshift(o.fulfilled,o.rejected))});const D=[];this.interceptors.response.forEach(function(o){D.push(o.fulfilled,o.rejected)});let _,b=0,f;if(!C){const k=[Tc.bind(this),void 0];for(k.unshift.apply(k,E),k.push.apply(k,D),f=k.length,_=Promise.resolve(t);b<f;)_=_.then(k[b++],k[b++]);return _}f=E.length;let p=t;for(b=0;b<f;){const k=E[b++],o=E[b++];try{p=k(p)}catch(s){o.call(this,s);break}}try{_=Tc.call(this,p)}catch(k){return Promise.reject(k)}for(b=0,f=D.length;b<f;)_=_.then(D[b++],D[b++]);return _}getUri(n){n=Kr(this.defaults,n);const t=vf(n.baseURL,n.url);return Sf(t,n.params,n.paramsSerializer)}}Z.forEach(["delete","get","head","options"],function(n){wo.prototype[n]=function(t,i){return this.request(Kr(i||{},{method:n,url:t,data:(i||{}).data}))}});Z.forEach(["post","put","patch"],function(n){function t(i){return function(R,v,E){return this.request(Kr(E||{},{method:n,headers:i?{"Content-Type":"multipart/form-data"}:{},url:R,data:v}))}}wo.prototype[n]=t(),wo.prototype[n+"Form"]=t(!0)});var Oo=wo;class Ru{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(R){t=R});const i=this;this.promise.then(u=>{if(!i._listeners)return;let R=i._listeners.length;for(;R-- >0;)i._listeners[R](u);i._listeners=null}),this.promise.then=u=>{let R;const v=new Promise(E=>{i.subscribe(E),R=E}).then(u);return v.cancel=function(){i.unsubscribe(R)},v},n(function(R,v,E){i.reason||(i.reason=new Li(R,v,E),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}static source(){let n;return{token:new Ru(function(u){n=u}),cancel:n}}}var _k=Ru;function Ek(e){return function(t){return e.apply(null,t)}}function Jk(e){return Z.isObject(e)&&e.isAxiosError===!0}const Dd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
8alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dd).forEach(([e,n])=>{Dd[n]=e});var Uk=Dd;function Af(e){const n=new Oo(e),t=af(Oo.prototype.request,n);return Z.extend(t,Oo.prototype,n,{allOwnKeys:!0}),Z.extend(t,n,null,{allOwnKeys:!0}),t.create=function(u){return Af(Kr(e,u))},t}const Je=Af(ku);Je.Axios=Oo;Je.CanceledError=Li;Je.CancelToken=_k;Je.isCancel=Bf;Je.VERSION=bf;Je.toFormData=Ea;Je.AxiosError=ke;Je.Cancel=Je.CanceledError;Je.all=function(n){return Promise.all(n)};Je.spread=Ek;Je.isAxiosError=Jk;Je.mergeConfig=Kr;Je.AxiosHeaders=tt;Je.formToJSON=e=>Rf(Z.isHTMLForm(e)?new FormData(e):e);Je.getAdapter=Of.getAdapter;Je.HttpStatusCode=Uk;Je.default=Je;var Dk=Je,Mk=re&&re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.http=void 0;const Hk=Mk(Dk);function qk(e){if(e.status>=400)throw new Error(`Bad status on response: ${e.status}`);return e}function Vk(e){return e.toString().includes("emitExperimentalWarning")}async function Qk(e,n,t,i){if(typeof fetch=="function"&&!Vk(fetch)){const u={method:e,body:i?JSON.stringify(i):void 0,headers:{"Content-Type":"application/json",...t}};return fetch(n,u).then(qk).then(R=>R.json())}else return Hk.default.request({url:n,method:e,data:i,headers:t}).then(u=>u.data)}Fi.http=Qk;var rt={};Object.defineProperty(rt,"__esModule",{value:!0});rt.hasProtocol=rt.instanceOfRpcStreamingClient=void 0;function Wk(e){return typeof e.listen=="function"}rt.instanceOfRpcStreamingClient=Wk;function Fk(e){return e.search("://")!==-1}rt.hasProtocol=Fk;Object.defineProperty(Aa,"__esModule",{value:!0});Aa.HttpBatchClient=void 0;const wc=Ia,Gk=Fi,Lk=rt,_c={dispatchInterval:20,batchSizeLimit:20};class $k{constructor(n,t={}){if(this.queue=[],this.options={batchSizeLimit:t.batchSizeLimit??_c.batchSizeLimit,dispatchInterval:t.dispatchInterval??_c.dispatchInterval},typeof n=="string"){if(!(0,Lk.hasProtocol)(n))throw new Error("Endpoint URL is missing a protocol. Expected 'https://' or 'http://'.");this.url=n}else this.url=n.url,this.headers=n.headers;this.timer=setInterval(()=>this.tick(),t.dispatchInterval),this.validate()}disconnect(){this.timer&&clearInterval(this.timer),this.timer=void 0}async execute(n){return new Promise((t,i)=>{this.queue.push({request:n,resolve:t,reject:i}),this.queue.length>=this.options.batchSizeLimit&&this.tick()})}validate(){if(!this.options.batchSizeLimit||!Number.isSafeInteger(this.options.batchSizeLimit)||this.options.batchSizeLimit<1)throw new Error("batchSizeLimit must be a safe integer >= 1")}tick(){const n=this.queue.splice(0,this.options.batchSizeLimit);if(!n.length)return;const t=n.map(u=>u.request),i=t.map(u=>u.id);(0,Gk.http)("POST",this.url,this.headers,t).then(u=>{(Array.isArray(u)?u:[u]).forEach(v=>{const E=n.find(b=>b.request.id===v.id);if(!E)return;const{reject:C,resolve:D}=E,_=(0,wc.parseJsonRpcResponse)(v);(0,wc.isJsonRpcErrorResponse)(_)?C(new Error(JSON.stringify(_.error))):D(_)})},u=>{for(const R of i){const v=n.find(E=>E.request.id===R);if(!v)return;v.reject(u)}})}}Aa.HttpBatchClient=$k;var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0});Ua.HttpClient=void 0;const Ec=Ia,Kk=Fi,zk=rt;class Zk{constructor(n){if(typeof n=="string"){if(!(0,zk.hasProtocol)(n))throw new Error("Endpoint URL is missing a protocol. Expected 'https://' or 'http://'.");this.url=n}else this.url=n.url,this.headers=n.headers}disconnect(){}async execute(n){const t=(0,Ec.parseJsonRpcResponse)(await(0,Kk.http)("POST",this.url,this.headers,n));if((0,Ec.isJsonRpcErrorResponse)(t))throw new Error(JSON.stringify(t.error));return t}}Ua.HttpClient=Zk;var Da={},If={},Bu={},$i={},Ki={}
8,Yk=re&&re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.SocketWrapper=void 0;const ur=Yk(Ep);function Xk(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}class xk{constructor(n,t,i,u,R,v=1e4){this.closed=!1,this.connected=new Promise((E,C)=>{this.connectedResolver=E,this.connectedRejecter=C}),this.url=n,this.messageHandler=t,this.errorHandler=i,this.openHandler=u,this.closeHandler=R,this.timeout=v}connect(){const n=new ur.default(this.url);n.onerror=i=>{this.clearTimeout(),this.errorHandler&&this.errorHandler(i)},n.onmessage=i=>{this.messageHandler({type:i.type,data:i.data})},n.onopen=i=>{this.clearTimeout(),this.connectedResolver(),this.openHandler&&this.openHandler()},n.onclose=i=>{this.closed=!0,this.closeHandler&&this.closeHandler(i)};const t=Date.now();this.timeoutId=setTimeout(()=>{n.onmessage=()=>0,n.onerror=()=>0,n.onopen=()=>0,n.onclose=()=>0,n.close(),this.socket=void 0;const i=Math.floor(Date.now()-t);this.connectedRejecter(`Connection attempt timed out after ${i} ms`)},this.timeout),this.socket=n}disconnect(){if(!this.socket)throw new Error("Socket undefined. This must be called after connecting.");switch(this.clearTimeout(),this.socket.readyState){case ur.default.OPEN:this.socket.close(1e3);break;case ur.default.CLOSED:break;case ur.default.CONNECTING:this.socket.onopen=()=>0,this.socket.onclose=()=>0,this.socket.onerror=()=>0,this.socket.onmessage=()=>0,this.socket=void 0,this.closeHandler&&this.closeHandler({wasClean:!1,code:4001});break;case ur.default.CLOSING:break;default:throw new Error(`Unknown readyState: ${this.socket.readyState}`)}}async send(n){return new Promise((t,i)=>{if(!this.socket)throw new Error("Socket undefined. This must be called after connecting.");if(this.closed)throw new Error("Socket was closed, so no data can be sent anymore.");if(this.socket.readyState!==ur.default.OPEN)throw new Error("Websocket is not open");Xk()?this.socket.send(n,u=>u?i(u):t()):(this.socket.send(n),t())})}clearTimeout(){if(!this.timeoutId)throw new Error("Timeout ID not set. This should not happen and usually means connect() was not called.");clearTimeout(this.timeoutId)}}Ki.SocketWrapper=xk;Object.defineProperty($i,"__esModule",{value:!0});$i.StreamingSocket=void 0;const jk=Qt,eP=Ki;class nP{constructor(n,t=1e4){this.socket=new eP.SocketWrapper(n,u=>{this.eventProducerListener&&this.eventProducerListener.next(u)},u=>{this.eventProducerListener&&this.eventProducerListener.error(u)},()=>{},u=>{this.eventProducerListener&&(u.wasClean?this.eventProducerListener.complete():this.eventProducerListener.error("Socket was closed unclean"))},t),this.connected=this.socket.connected;const i={start:u=>this.eventProducerListener=u,stop:()=>this.eventProducerListener=void 0};this.events=jk.Stream.create(i)}connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}async send(n){return this.socket.send(n)}}$i.StreamingSocket=nP;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QueueingStreamingSocket=e.ConnectionStatus=void 0;
8const n=Vi,t=Qt,i=$i;var u;(function(v){v[v.Unconnected=0]="Unconnected",v[v.Connecting=1]="Connecting",v[v.Connected=2]="Connected",v[v.Disconnected=3]="Disconnected"})(u=e.ConnectionStatus||(e.ConnectionStatus={}));class R{constructor(E,C=1e4,D){this.queue=[],this.isProcessingQueue=!1,this.url=E,this.timeout=C,this.reconnectedHandler=D;const _={start:b=>this.eventProducerListener=b,stop:()=>this.eventProducerListener=void 0};this.events=t.Stream.create(_),this.connectionStatusProducer=new n.DefaultValueProducer(u.Unconnected),this.connectionStatus=new n.ValueAndUpdates(this.connectionStatusProducer),this.socket=new i.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:b=>{if(!this.eventProducerListener)throw new Error("No event producer listener set");this.eventProducerListener.next(b)},error:()=>this.connectionStatusProducer.update(u.Disconnected)})}connect(){this.connectionStatusProducer.update(u.Connecting),this.socket.connected.then(async()=>(this.connectionStatusProducer.update(u.Connected),this.processQueue()),()=>this.connectionStatusProducer.update(u.Disconnected)),this.socket.connect()}disconnect(){this.connectionStatusProducer.update(u.Disconnected),this.socket.disconnect()}reconnect(){this.socket=new i.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:E=>{if(!this.eventProducerListener)throw new Error("No event producer listener set");this.eventProducerListener.next(E)},error:()=>this.connectionStatusProducer.update(u.Disconnected)}),this.socket.connected.then(()=>{this.reconnectedHandler&&this.reconnectedHandler()}),this.connect()}getQueueLength(){return this.queue.length}queueRequest(E){this.queue.push(E),this.processQueue()}async processQueue(){if(this.isProcessingQueue||this.connectionStatus.value!==u.Connected)return;this.isProcessingQueue=!0;let E;for(;E=this.queue.shift();)try{await this.socket.send(E),this.isProcessingQueue=!1}catch{this.queue.unshift(E),this.isProcessingQueue=!1;return}}}e.QueueingStreamingSocket=R})(Bu);var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});Ma.ReconnectingSocket=void 0;const tP=Qt,cd=Bu;class vu{static calculateTimeout(n){return Math.min(2**n*100,5e3)}constructor(n,t=1e4,i){this.unconnected=!0,this.disconnected=!1,this.timeoutIndex=0,this.reconnectTimeout=null;const u={start:R=>this.eventProducerListener=R,stop:()=>this.eventProducerListener=void 0};this.events=tP.Stream.create(u),this.socket=new cd.QueueingStreamingSocket(n,t,i),this.socket.events.subscribe({next:R=>{this.eventProducerListener&&this.eventProducerListener.next(R)},error:R=>{this.eventProducerListener&&this.eventProducerListener.error(R)}}),this.connectionStatus=this.socket.connectionStatus,this.connectionStatus.updates.subscribe({next:R=>{R===cd.ConnectionStatus.Connected&&(this.timeoutIndex=0),R===cd.ConnectionStatus.Disconnected&&(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.reconnectTimeout=setTimeout(()=>this.socket.reconnect(),vu.calculateTimeout(this.timeoutIndex++)))}})}connect(){if(!this.unconnected)throw new Error("Cannot connect: socket has already connected");this.socket.connect(),this.unconnected=!1}disconnect(){if(this.unconnected)throw new Error("Cannot disconnect: socket has not yet connected");this.socket.disconnect(),this.eventProducerListener&&this.eventProducerListener.complete(),this.disconnected=!0}queueRequest(n){if(this.disconnected)throw new Error("Cannot queue request: socket has disconnected");this.socket.queueRequest(n)}}Ma.ReconnectingSocket=vu;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StreamingSocket=e.SocketWrapper=e.ReconnectingSocket=e.QueueingStreamingSocket=e.ConnectionStatus=void 0;var n=Bu;Object.defineProperty(e,"ConnectionStatus",{enumerable:!0,get:function(){return n.ConnectionStatus}}),Object.defineProperty(e,"QueueingStreamingSocket",{enumerable:!0,get:function(){return n.QueueingStreamingSocket}});var t=Ma;Object.defineProperty(e,"ReconnectingSocket",{enumerable:!0,get:function(){return t.ReconnectingSocket}});var i=Ki;Object.defineProperty(e,"SocketWrapper",{enumerable:!0,get:function(){return i.SocketWrapper}});var u=$i;Object.defineProperty(e,"StreamingSocket",{enumerable:!0,get:function(){return u.StreamingSocket}})})(If);Object.defineProperty(Da,"__esModule",{value:!0});Da.WebsocketClient=void 0;const _o=Ia,Jc=If,rP=Vi,iP=Qt,oP=rt;function aP(e){throw e}function Tf(e){if(e.type!=="message")throw new Error(`Unexcepted message type on websocket: ${e.type}`);return(0,_o.parseJsonRpcResponse)(JSON.parse(e.data))}class sP{constructor(n,t){this.running=!1,this.subscriptions=[],this.request=n,this.socket=t}start(n){if(this.running)throw Error("Already started. Please stop first before restarting.");this.running=!0,this.connectToClient(n),this.socket.queueRequest(JSON.stringify(this.request))}stop(){this.running=!1;const n={...this.request,method:"unsubscribe"};try{this.socket.queueRequest(JSON.stringify(n))}catch(t){if(!(t instanceof Error&&t.message.match(/socket has disconnected/i)))throw t}}connectToClient(n){const t=this.socket.events.map(Tf),i=t.filter(v=>v.id===this.request.id).subscribe({next:v=>{(0,_o.isJsonRpcErrorResponse)(v)&&(this.closeSubscriptions(),n.error(JSON.stringify(v.error))),i.unsubscribe()}}),u=t.filter(v=>v.id===this.request.id).subscribe({next:v=>{(0,_o.isJsonRpcErrorResponse)(v)?(this.closeSubscriptions(),n.error(JSON.stringify(v.error))):n.next(v.result)}}),R=t.subscribe({error:v=>{this.closeSubscriptions(),n.error(v)},complete:()=>{this.closeSubscriptions(),n.complete()}});this.subscriptions.push(i,u,R)}closeSubscriptions(){for(const n of this.subscriptions)n.unsubscribe();this.subscriptions=[]}}
8class dP{constructor(n,t=aP){if(this.subscriptionStreams=new Map,!(0,oP.hasProtocol)(n))throw new Error("Base URL is missing a protocol. Expected 'ws://' or 'wss://'.");const i=n.endsWith("/")?"websocket":"/websocket";this.url=n+i,this.socket=new Jc.ReconnectingSocket(this.url);const u=this.socket.events.subscribe({error:R=>{t(R),u.unsubscribe()}});this.jsonRpcResponseStream=this.socket.events.map(Tf),this.socket.connect()}async execute(n){const t=this.responseForRequestId(n.id);this.socket.queueRequest(JSON.stringify(n));const i=await t;if((0,_o.isJsonRpcErrorResponse)(i))throw new Error(JSON.stringify(i.error));return i}listen(n){if(n.method!=="subscribe")throw new Error('Request method must be "subscribe" to start event listening');const t=n.params.query;if(typeof t!="string")throw new Error("request.params.query must be a string");if(!this.subscriptionStreams.has(t)){const i=new sP(n,this.socket),u=iP.Stream.create(i);this.subscriptionStreams.set(t,u)}return this.subscriptionStreams.get(t).filter(i=>i.query!==void 0)}async connected(){await this.socket.connectionStatus.waitFor(Jc.ConnectionStatus.Connected)}disconnect(){this.socket.disconnect()}async responseForRequestId(n){return(0,rP.firstEvent)(this.jsonRpcResponseStream.filter(t=>t.id===n))}}Da.WebsocketClient=dP;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WebsocketClient=e.instanceOfRpcStreamingClient=e.HttpClient=e.HttpBatchClient=void 0;var n=Aa;Object.defineProperty(e,"HttpBatchClient",{enumerable:!0,get:function(){return n.HttpBatchClient}});var t=Ua;Object.defineProperty(e,"HttpClient",{enumerable:!0,get:function(){return t.HttpClient}});var i=rt;Object.defineProperty(e,"instanceOfRpcStreamingClient",{enumerable:!0,get:function(){return i.instanceOfRpcStreamingClient}});var u=Da;Object.defineProperty(e,"WebsocketClient",{enumerable:!0,get:function(){return u.WebsocketClient}})})(Wi);var Nf={},Ha={},cn={},ye={};Object.defineProperty(ye,"__esModule",{value:!0});ye.encodeBlockId=ye.encodeVersion=ye.encodeBytes=ye.encodeTime=ye.encodeUvarint=ye.encodeString=ye.dictionaryToStringMap=ye.may=ye.assertNotEmpty=ye.assertObject=ye.assertArray=ye.assertNumber=ye.assertString=ye.assertBoolean=ye.assertSet=void 0;const uP=Pe;function Ft(e){if(e===void 0)throw new Error("Value must not be undefined");if(e===null)throw new Error("Value must not be null");return e}ye.assertSet=Ft;function cP(e){if(Ft(e),typeof e!="boolean")throw new Error("Value must be a boolean");return e}ye.assertBoolean=cP;function lP(e){if(Ft(e),typeof e!="string")throw new Error("Value must be a string");return e}ye.assertString=lP;function fP(e){if(Ft(e),typeof e!="number")throw new Error("Value must be a number");return e}ye.assertNumber=fP;function pP(e){if(Ft(e),!Array.isArray(e))throw new Error("Value must be a an array");return e}ye.assertArray=pP;function mP(e){if(Ft(e),typeof e!="object")throw new Error("Value must be an object");if(Object.prototype.toString.call(e)!=="[object Object]")throw new Error("Value must be a simple object");return e}ye.assertObject=mP;function yP(e){if(Ft(e),typeof e=="number"&&e===0)throw new Error("must provide a non-zero value");if(e.length===0)throw new Error("must provide a non-empty value");return e}ye.assertNotEmpty=yP;function hP(e,n){return n==null?void 0:e(n)}ye.may=hP;function gP(e){const n=new Map;for(const t of Object.keys(e)){const i=e[t];if(typeof i!="string")throw new Error("Found dictionary value of type other than string");n.set(t,i)}return n}ye.dictionaryToStringMap=gP;function SP(e){const n=(0,uP.toUtf8)(e);return Uint8Array.from([n.length,...n])}ye.encodeString=SP;function zr(e){return e>=128?Uint8Array.from([e&255|128,...zr(e>>7)]):Uint8Array.from([e&255])}ye.encodeUvarint=zr;function kP(e){const n=e.getTime(),t=Math.floor(n/1e3),i=t?[8,...zr(t)]:new Uint8Array,u=(e.nanoseconds||0)+n%1e3*1e6,R=u?[16,...zr(u)]:new Uint8Array;return Uint8Array.from([...i,...R])}ye.encodeTime=kP;function PP(e){if(e.length>=128)throw new Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}ye.encodeBytes=PP;function RP(e){const n=e.block?Uint8Array.from([8,...zr(e.block)]):new Uint8Array,t=e.app?Uint8Array.from([16,...zr(e.app)]):new Uint8Array;return Uint8Array.from([...n,...t])}ye.encodeVersion=RP;function BP(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}ye.encodeBlockId=BP;Object.defineProperty(cn,"__esModule",{value:!0});cn.smallIntToApi=cn.apiToBigInt=cn.apiToSmallInt=void 0;const Md=Cn,vP=ye;function OP(e){return(typeof e=="number"?new Md.Int53(e):Md.Int53.fromString(e)).toNumber()}cn.apiToSmallInt=OP;function bP(e){if((0,vP.assertString)(e),!e.match(/^-?[0-9]+$/))throw new Error("Invalid string format");return BigInt(e)}cn.apiToBigInt=bP;function AP(e){return new Md.Int53(e).toString()}cn.smallIntToApi=AP;var ge={};
8Object.defineProperty(ge,"__esModule",{value:!0});ge.encodeBlockId=ge.encodeVersion=ge.encodeBytes=ge.encodeTime=ge.encodeUvarint=ge.encodeString=ge.dictionaryToStringMap=ge.may=ge.assertNotEmpty=ge.assertObject=ge.assertArray=ge.assertNumber=ge.assertString=ge.assertBoolean=ge.assertSet=void 0;const IP=Pe;function Gt(e){if(e===void 0)throw new Error("Value must not be undefined");if(e===null)throw new Error("Value must not be null");return e}ge.assertSet=Gt;function TP(e){if(Gt(e),typeof e!="boolean")throw new Error("Value must be a boolean");return e}ge.assertBoolean=TP;function NP(e){if(Gt(e),typeof e!="string")throw new Error("Value must be a string");return e}ge.assertString=NP;function CP(e){if(Gt(e),typeof e!="number")throw new Error("Value must be a number");return e}ge.assertNumber=CP;function wP(e){if(Gt(e),!Array.isArray(e))throw new Error("Value must be a an array");return e}ge.assertArray=wP;function _P(e){if(Gt(e),typeof e!="object")throw new Error("Value must be an object");if(Object.prototype.toString.call(e)!=="[object Object]")throw new Error("Value must be a simple object");return e}ge.assertObject=_P;function EP(e){if(Gt(e),typeof e=="number"&&e===0)throw new Error("must provide a non-zero value");if(e.length===0)throw new Error("must provide a non-empty value");return e}ge.assertNotEmpty=EP;function JP(e,n){return n==null?void 0:e(n)}ge.may=JP;function UP(e){const n=new Map;for(const t of Object.keys(e)){const i=e[t];if(typeof i!="string")throw new Error("Found dictionary value of type other than string");n.set(t,i)}return n}ge.dictionaryToStringMap=UP;function DP(e){const n=(0,IP.toUtf8)(e);return Uint8Array.from([n.length,...n])}ge.encodeString=DP;function Zr(e){return e>=128?Uint8Array.from([e&255|128,...Zr(e>>7)]):Uint8Array.from([e&255])}ge.encodeUvarint=Zr;function MP(e){const n=e.getTime(),t=Math.floor(n/1e3),i=t?[8,...Zr(t)]:new Uint8Array,u=(e.nanoseconds||0)+n%1e3*1e6,R=u?[16,...Zr(u)]:new Uint8Array;return Uint8Array.from([...i,...R])}ge.encodeTime=MP;function HP(e){if(e.length>=128)throw new Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}ge.encodeBytes=HP;function qP(e){const n=e.block?Uint8Array.from([8,...Zr(e.block)]):new Uint8Array,t=e.app?Uint8Array.from([16,...Zr(e.app)]):new Uint8Array;return Uint8Array.from([...n,...t])}ge.encodeVersion=qP;function VP(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}ge.encodeBlockId=VP;var qa={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buildQuery=e.SubscriptionEventType=e.Method=void 0,function(t){t.AbciInfo="abci_info",t.AbciQuery="abci_query",t.Block="block",t.Blockchain="blockchain",t.BlockResults="block_results",t.BlockSearch="block_search",t.BroadcastTxAsync="broadcast_tx_async",t.BroadcastTxSync="broadcast_tx_sync",t.BroadcastTxCommit="broadcast_tx_commit",t.Commit="commit",t.Genesis="genesis",t.Health="health",t.NumUnconfirmedTxs="num_unconfirmed_txs",t.Status="status",t.Subscribe="subscribe",t.Tx="tx",t.TxSearch="tx_search",t.Validators="validators",t.Unsubscribe="unsubscribe"}(e.Method||(e.Method={})),function(t){t.NewBlock="NewBlock",t.NewBlockHeader="NewBlockHeader",t.Tx="Tx"}(e.SubscriptionEventType||(e.SubscriptionEventType={}));function n(t){const u=(t.tags?t.tags:[]).map(v=>`${v.key}='${v.value}'`),R=t.raw?[t.raw]:[];return[...u,...R].join(" AND ")}e.buildQuery=n})(qa);var QP=re&&re.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var u=Object.getOwnPropertyDescriptor(n,t);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,u)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),WP=re&&re.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),FP=re&&re.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&QP(n,e,t);return WP(n,e),n};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.Params=void 0;const Ou=Pe,Mn=cn,Ve=st,tn=ge,GP=FP(qa);function ld(e){return{height:(0,tn.may)(Mn.smallIntToApi,e.height)}}function LP(e){return{minHeight:(0,tn.may)(Mn.smallIntToApi,e.minHeight),maxHeight:(0,tn.may)(Mn.smallIntToApi,e.maxHeight)}}function $P(e){return{query:e.query,page:(0,tn.may)(Mn.smallIntToApi,e.page),per_page:(0,tn.may)(Mn.smallIntToApi,e.per_page),order_by:e.order_by}}function KP(e){return{path:(0,tn.assertNotEmpty)(e.path),data:(0,Ou.toHex)(e.data),height:(0,tn.may)(Mn.smallIntToApi,e.height),prove:e.prove}}function zP(e){return{tx:(0,Ou.toBase64)((0,tn.assertNotEmpty)(e.tx))}}function ZP(e){return{hash:(0,Ou.toBase64)((0,tn.assertNotEmpty)(e.hash)),prove:e.prove}}function YP(e){return{query:e.query,prove:e.prove,page:(0,tn.may)(Mn.smallIntToApi,e.page),per_page:(0,tn.may)(Mn.smallIntToApi,e.per_page),order_by:e.order_by}}function XP(e){return{height:(0,tn.may)(Mn.smallIntToApi,e.height),page:(0,tn.may)(Mn.smallIntToApi,e.page),per_page:(0,tn.may)(Mn.smallIntToApi,e.per_page)}}let xP=class{static encodeAbciInfo(n){return(0,Ve.createJsonRpcRequest)(n.method)}static encodeAbciQuery(n){return(0,Ve.createJsonRpcRequest)(n.method,KP(n.params))}static encodeBlock(n){return(0,Ve.createJsonRpcRequest)(n.method,ld(n.params))}static encodeBlockchain(n){return(0,Ve.createJsonRpcRequest)(n.method,LP(n.params))}static encodeBlockResults(n){return(0,Ve.createJsonRpcRequest)(n.method,ld(n.params))}static encodeBlockSearch(n){return(0,Ve.createJsonRpcRequest)(n.method,$P(n.params))}static encodeBroadcastTx(n){return(0,Ve.createJsonRpcRequest)(n.method,zP(n.params))}static encodeCommit(n){return(0,Ve.createJsonRpcRequest)(n.method,ld(n.params))}static encodeGenesis(n){return(0,Ve.createJsonRpcRequest)(n.method)}static encodeHealth(n){return(0,Ve.createJsonRpcRequest)(n.method)}static encodeNumUnconfirmedTxs(n){return(0,Ve.createJsonRpcRequest)(n.method)}static encodeStatus(n){return(0,Ve.createJsonRpcRequest)(n.method)}static encodeSubscribe(n){const t={key:"tm.event",value:n.query.type},i=GP.buildQuery({tags:[t],raw:n.query.raw});return(0,Ve.createJsonRpcRequest)("subscribe",{query:i})}static encodeTx(n){return(0,Ve.createJsonRpcRequest)(n.method,ZP(n.params))}static encodeTxSearch(n){return(0,Ve.createJsonRpcRequest)(n.method,YP(n.params))}static encodeValidators(n){return(0,Ve.createJsonRpcRequest)(n.method,XP(n.params))}};Ha.Params=xP;var Bn={},zi={};
8(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BlockIdFlag=void 0,function(n){n[n.Unknown=0]="Unknown",n[n.Absent=1]="Absent",n[n.Commit=2]="Commit",n[n.Nil=3]="Nil",n[n.Unrecognized=-1]="Unrecognized"}(e.BlockIdFlag||(e.BlockIdFlag={}))})(zi);var Yr={};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.hashBlock=Yr.hashTx=void 0;const bu=fn,Ze=ge;function jP(e){return(0,bu.sha256)(e)}Yr.hashTx=jP;function eR(e){if(e<1)throw new Error("Cannot split an empty tree");const n=2**Math.floor(Math.log2(e));return n<e?n:n/2}function nR(e){const n=new bu.Sha256(Uint8Array.from([0]));return n.update(e),n.digest()}function tR(e,n){const t=new bu.Sha256(Uint8Array.from([1]));return t.update(e),t.update(n),t.digest()}function Hd(e){switch(e.length){case 0:throw new Error("Cannot hash empty tree");case 1:return nR(e[0]);default:{const n=eR(e.length),t=Hd(e.slice(0,n)),i=Hd(e.slice(n));return tR(t,i)}}}function rR(e){if(!e.lastBlockId)throw new Error("Hashing a block header with no last block ID (i.e. header at height 1) is not supported. If you need this, contributions are welcome. Please add documentation and test vectors for this case.");const n=[(0,Ze.encodeVersion)(e.version),(0,Ze.encodeString)(e.chainId),(0,Ze.encodeUvarint)(e.height),(0,Ze.encodeTime)(e.time),(0,Ze.encodeBlockId)(e.lastBlockId),(0,Ze.encodeBytes)(e.lastCommitHash),(0,Ze.encodeBytes)(e.dataHash),(0,Ze.encodeBytes)(e.validatorsHash),(0,Ze.encodeBytes)(e.nextValidatorsHash),(0,Ze.encodeBytes)(e.consensusHash),(0,Ze.encodeBytes)(e.appHash),(0,Ze.encodeBytes)(e.lastResultsHash),(0,Ze.encodeBytes)(e.evidenceHash),(0,Ze.encodeBytes)(e.proposerAddress)];return Hd(n)}Yr.hashBlock=rR;Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Responses=Bn.decodeValidatorInfo=Bn.decodeValidatorGenesis=Bn.decodeValidatorUpdate=Bn.decodeEvent=void 0;const ue=Pe,Cf=$e,wi=Le,ae=cn,iR=zi,x=ge,oR=Yr;function aR(e){return{data:e.data,lastBlockHeight:(0,x.may)(ae.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,x.may)(ue.fromBase64,e.last_block_app_hash)}}function sR(e){return{ops:e.ops.map(n=>({type:n.type,key:(0,ue.fromBase64)(n.key),data:(0,ue.fromBase64)(n.data)}))}}function dR(e){return{key:(0,ue.fromBase64)((0,x.assertString)(e.key??"")),value:(0,ue.fromBase64)((0,x.assertString)(e.value??"")),proof:(0,x.may)(sR,e.proofOps),height:(0,x.may)(ae.apiToSmallInt,e.height),code:(0,x.may)(ae.apiToSmallInt,e.code),codespace:(0,x.assertString)(e.codespace??""),index:(0,x.may)(ae.apiToSmallInt,e.index),log:e.log,info:(0,x.assertString)(e.info??"")}}function uR(e){return{key:(0,x.assertNotEmpty)(e.key),value:e.value??""}}function cR(e){return(0,x.assertArray)(e).map(uR)}function wf(e){return{type:e.type,attributes:e.attributes?cR(e.attributes):[]}}Bn.decodeEvent=wf;function qd(e){return(0,x.assertArray)(e).map(wf)}function Xr(e){return{code:(0,ae.apiToSmallInt)((0,x.assertNumber)(e.code??0)),codespace:e.codespace,log:e.log,data:(0,x.may)(ue.fromBase64,e.data),events:e.events?qd(e.events):[],gasWanted:(0,ae.apiToBigInt)(e.gas_wanted??"0"),gasUsed:(0,ae.apiToBigInt)(e.gas_used??"0")}}function Au(e){if("Sum"in e){const[[n,t]]=Object.entries(e.Sum.value);return(0,Cf.assert)(n==="ed25519"||n==="secp256k1",`unknown pubkey type: ${n}`),{algorithm:n,data:(0,ue.fromBase64)((0,x.assertNotEmpty)(t))}}else switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,ue.fromBase64)((0,x.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,ue.fromBase64)((0,x.assertNotEmpty)(e.value))};default:throw new Error(`unknown pubkey type: ${e.type}`)}}function lR(e){return{maxBytes:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.max_bytes)),maxGas:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.max_gas))}}function fR(e){return{maxAgeNumBlocks:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.max_age_duration))}}function _f(e){return{block:lR((0,x.assertObject)(e.block)),evidence:fR((0,x.assertObject)(e.evidence))}}function Ef(e){return{pubkey:Au((0,x.assertObject)(e.pub_key)),votingPower:(0,ae.apiToBigInt)(e.power??"0")}}Bn.decodeValidatorUpdate=Ef;function pR(e){return{height:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(Xr),validatorUpdates:(e.validator_updates||[]).map(Ef),consensusUpdates:(0,x.may)(_f,e.consensus_param_updates),beginBlockEvents:qd(e.begin_block_events||[]),endBlockEvents:qd(e.end_block_events||[])}}function Va(e){return{hash:(0,ue.fromHex)((0,x.assertNotEmpty)(e.hash)),parts:{total:(0,x.assertNotEmpty)(e.parts.total),hash:(0,ue.fromHex)((0,x.assertNotEmpty)(e.parts.hash))}}}function mR(e){return{block:(0,ae.apiToSmallInt)(e.block),app:(0,ae.apiToSmallInt)(e.app??0)}}function Qa(e){return{version:mR(e.version),chainId:(0,x.assertNotEmpty)(e.chain_id),height:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.height)),time:(0,wi.fromRfc3339WithNanoseconds)((0,x.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?Va(e.last_block_id):null,lastCommitHash:(0,ue.fromHex)((0,x.assertSet)(e.last_commit_hash)),dataHash:(0,ue.fromHex)((0,x.assertSet)(e.data_hash)),validatorsHash:(0,ue.fromHex)((0,x.assertSet)(e.validators_hash)),nextValidatorsHash:(0,ue.fromHex)((0,x.assertSet)(e.next_validators_hash)),consensusHash:(0,ue.fromHex)((0,x.assertSet)(e.consensus_hash)),appHash:(0,ue.fromHex)((0,x.assertSet)(e.app_hash)),lastResultsHash:(0,ue.fromHex)((0,x.assertSet)(e.last_results_hash)),evidenceHash:(0,ue.fromHex)((0,x.assertSet)(e.evidence_hash)),proposerAddress:(0,ue.fromHex)((0,x.assertNotEmpty)(e.proposer_address))}}function yR(e){return{blockId:Va(e.block_id),blockSize:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.block_size)),header:Qa(e.header),numTxs:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.num_txs))}}function hR(e){return{lastHeight:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.last_height)),blockMetas:(0,x.assertArray)(e.block_metas).map(yR)}}function gR(e){return{...Xr(e),hash:(0,ue.fromHex)((0,x.assertNotEmpty)(e.hash))}}function SR(e){const n=e.tx_result?Xr(e.tx_result):void 0;return{height:(0,ae.apiToSmallInt)(e.height),hash:(0,ue.fromHex)((0,x.assertNotEmpty)(e.hash)),checkTx:Xr((0,x.assertObject)(e.check_tx)),deliverTx:n,txResult:n}}function kR(e){return(0,Cf.assert)(e in iR.BlockIdFlag),e}function PR(e){return{blockIdFlag:kR(e.block_id_flag),validatorAddress:e.validator_address?(0,ue.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,wi.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,ue.fromBase64)(e.signature):void 0}}function Jf(e){return{blockId:Va((0,x.assertObject)(e.block_id)),height:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.height)),round:(0,ae.apiToSmallInt)(e.round),signatures:(0,x.assertArray)(e.signatures).map(PR)}}function RR(e){return{canonical:(0,x.assertBoolean)(e.canonical),header:Qa(e.signed_header.header),commit:Jf(e.signed_header.commit)}}function Uf(e){return{address:(0,ue.fromHex)((0,x.assertNotEmpty)(e.address)),pubkey:Au((0,x.assertObject)(e.pub_key)),votingPower:(0,ae.apiToBigInt)((0,x.assertNotEmpty)(e.power))}}Bn.decodeValidatorGenesis=Uf;function BR(e){return{genesisTime:(0,wi.fromRfc3339WithNanoseconds)((0,x.assertNotEmpty)(e.genesis_time)),chainId:(0,x.assertNotEmpty)(e.chain_id),consensusParams:_f(e.consensus_params),validators:e.validators?(0,x.assertArray)(e.validators).map(Uf):[],appHash:(0,ue.fromHex)((0,x.assertSet)(e.app_hash)),appState:e.app_state}}function Iu(e){return{pubkey:Au((0,x.assertObject)(e.pub_key)),votingPower:(0,ae.apiToBigInt)((0,x.assertNotEmpty)(e.voting_power)),address:(0,ue.fromHex)((0,x.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,ae.apiToSmallInt)(e.proposer_priority):void 0}}Bn.decodeValidatorInfo=Iu;function vR(e){return{id:(0,ue.fromHex)((0,x.assertNotEmpty)(e.id)),listenAddr:(0,x.assertNotEmpty)(e.listen_addr),network:(0,x.assertNotEmpty)(e.network),version:(0,x.assertString)(e.version),channels:(0,x.assertNotEmpty)(e.channels),moniker:(0,x.assertNotEmpty)(e.moniker),other:(0,x.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.protocol_version.app)),block:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.protocol_version.block)),p2p:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.protocol_version.p2p))}}}function OR(e){const n=e.earliest_block_height?(0,ae.apiToSmallInt)(e.earliest_block_height):void 0,t=e.earliest_block_time?(0,wi.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,ue.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,ue.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:n||void 0,earliestBlockTime:t!=null&&t.getTime()?t:void 0,latestBlockHash:(0,ue.fromHex)((0,x.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,ue.fromHex)((0,x.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,wi.fromRfc3339WithNanoseconds)((0,x.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,x.assertBoolean)(e.catching_up)}}function bR(e){return{nodeInfo:vR(e.node_info),syncInfo:OR(e.sync_info),validatorInfo:Iu(e.validator_info)}}function AR(e){return{data:(0,ue.fromBase64)((0,x.assertNotEmpty)(e.data)),rootHash:(0,ue.fromHex)((0,x.assertNotEmpty)(e.root_hash)),proof:{total:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.proof.total)),index:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.proof.index)),leafHash:(0,ue.fromBase64)((0,x.assertNotEmpty)(e.proof.leaf_hash)),au
8nts:(0,x.assertArray)(e.proof.aunts).map(ue.fromBase64)}}}function Df(e){return{tx:(0,ue.fromBase64)((0,x.assertNotEmpty)(e.tx)),result:Xr((0,x.assertObject)(e.tx_result)),height:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.height)),index:(0,ae.apiToSmallInt)((0,x.assertNumber)(e.index)),hash:(0,ue.fromHex)((0,x.assertNotEmpty)(e.hash)),proof:(0,x.may)(AR,e.proof)}}function IR(e){return{totalCount:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.total_count)),txs:(0,x.assertArray)(e.txs).map(Df)}}function TR(e){const n=(0,ue.fromBase64)((0,x.assertNotEmpty)(e.tx));return{tx:n,hash:(0,oR.hashTx)(n),result:Xr(e.result),height:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.height))}}function NR(e){return{blockHeight:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.block_height)),validators:(0,x.assertArray)(e.validators).map(Iu),count:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.count)),total:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.total))}}function Mf(e){var n;return{header:Qa((0,x.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?Jf((0,x.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,x.assertArray)(e.data.txs).map(ue.fromBase64):[],evidence:((n=e.evidence)==null?void 0:n.evidence)??[]}}function Hf(e){return{blockId:Va(e.block_id),block:Mf(e.block)}}function CR(e){return{totalCount:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.total_count)),blocks:(0,x.assertArray)(e.blocks).map(Hf)}}function wR(e){return{total:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.total)),totalBytes:(0,ae.apiToSmallInt)((0,x.assertNotEmpty)(e.total_bytes))}}let _R=class qf{static decodeAbciInfo(n){return aR((0,x.assertObject)(n.result.response))}static decodeAbciQuery(n){return dR((0,x.assertObject)(n.result.response))}static decodeBlock(n){return Hf(n.result)}static decodeBlockResults(n){return pR(n.result)}static decodeBlockSearch(n){return CR(n.result)}static decodeBlockchain(n){return hR(n.result)}static decodeBroadcastTxSync(n){return gR(n.result)}static decodeBroadcastTxAsync(n){return qf.decodeBroadcastTxSync(n)}static decodeBroadcastTxCommit(n){return SR(n.result)}static decodeCommit(n){return RR(n.result)}static decodeGenesis(n){return BR((0,x.assertObject)(n.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(n){return wR(n.result)}static decodeStatus(n){return bR(n.result)}static decodeNewBlockEvent(n){return Mf(n.data.value.block)}static decodeNewBlockHeaderEvent(n){return Qa(n.data.value.header)}static decodeTxEvent(n){return TR(n.data.value.TxResult)}static decodeTx(n){return Df(n.result)}static decodeTxSearch(n){return IR(n.result)}static decodeValidators(n){return NR(n.result)}};Bn.Responses=_R;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Responses=e.Params=void 0;var n=Ha;Object.defineProperty(e,"Params",{enumerable:!0,get:function(){return n.Params}});var t=Bn;Object.defineProperty(e,"Responses",{enumerable:!0,get:function(){return t.Responses}})})(Nf);var ER=re&&re.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var u=Object.getOwnPropertyDescriptor(n,t);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,u)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),JR=re&&re.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),UR=re&&re.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&ER(n,e,t);return JR(n,e),n};Object.defineProperty(ba,"__esModule",{value:!0});ba.Comet38Client=void 0;const DR=st,lo=Wi,le=Nf,be=UR(qa);class Eo{static async connect(n){let t;return typeof n=="object"?t=new lo.HttpClient(n):t=n.startsWith("http://")||n.startsWith("https://")?new lo.HttpClient(n):new lo.WebsocketClient(n),await this.detectVersion(t),Eo.create(t)}static async create(n){return new Eo(n)}static async detectVersion(n){const t=(0,DR.createJsonRpcRequest)(be.Method.Status),u=(await n.execute(t)).result;if(!u||!u.node_info)throw new Error("Unrecognized format for status response");const R=u.node_info.version;
8if(typeof R!="string")throw new Error("Unrecognized version format: must be string");return R}constructor(n){this.client=n}disconnect(){this.client.disconnect()}async abciInfo(){const n={method:be.Method.AbciInfo};return this.doCall(n,le.Params.encodeAbciInfo,le.Responses.decodeAbciInfo)}async abciQuery(n){const t={params:n,method:be.Method.AbciQuery};return this.doCall(t,le.Params.encodeAbciQuery,le.Responses.decodeAbciQuery)}async block(n){const t={method:be.Method.Block,params:{height:n}};return this.doCall(t,le.Params.encodeBlock,le.Responses.decodeBlock)}async blockResults(n){const t={method:be.Method.BlockResults,params:{height:n}};return this.doCall(t,le.Params.encodeBlockResults,le.Responses.decodeBlockResults)}async blockSearch(n){const t={params:n,method:be.Method.BlockSearch},i=await this.doCall(t,le.Params.encodeBlockSearch,le.Responses.decodeBlockSearch);return{...i,blocks:[...i.blocks].sort((u,R)=>u.block.header.height-R.block.header.height)}}async blockSearchAll(n){let t=n.page||1;const i=[];let u=!1;for(;!u;){const R=await this.blockSearch({...n,page:t});i.push(...R.blocks),i.length<R.totalCount?t++:u=!0}return i.sort((R,v)=>R.block.header.height-v.block.header.height),{totalCount:i.length,blocks:i}}async blockchain(n,t){const i={method:be.Method.Blockchain,params:{minHeight:n,maxHeight:t}};return this.doCall(i,le.Params.encodeBlockchain,le.Responses.decodeBlockchain)}async broadcastTxSync(n){const t={params:n,method:be.Method.BroadcastTxSync};return this.doCall(t,le.Params.encodeBroadcastTx,le.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(n){const t={params:n,method:be.Method.BroadcastTxAsync};return this.doCall(t,le.Params.encodeBroadcastTx,le.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(n){const t={params:n,method:be.Method.BroadcastTxCommit};return this.doCall(t,le.Params.encodeBroadcastTx,le.Responses.decodeBroadcastTxCommit)}async commit(n){const t={method:be.Method.Commit,params:{height:n}};return this.doCall(t,le.Params.encodeCommit,le.Responses.decodeCommit)}async genesis(){const n={method:be.Method.Genesis};return this.doCall(n,le.Params.encodeGenesis,le.Responses.decodeGenesis)}async health(){const n={method:be.Method.Health};return this.doCall(n,le.Params.encodeHealth,le.Responses.decodeHealth)}async numUnconfirmedTxs(){const n={method:be.Method.NumUnconfirmedTxs};return this.doCall(n,le.Params.encodeNumUnconfirmedTxs,le.Responses.decodeNumUnconfirmedTxs)}async status(){const n={method:be.Method.Status};return this.doCall(n,le.Params.encodeStatus,le.Responses.decodeStatus)}subscribeNewBlock(){const n={method:be.Method.Subscribe,query:{type:be.SubscriptionEventType.NewBlock}};return this.subscribe(n,le.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){const n={method:be.Method.Subscribe,query:{type:be.SubscriptionEventType.NewBlockHeader}};return this.subscribe(n,le.Responses.decodeNewBlockHeaderEvent)}subscribeTx(n){const t={method:be.Method.Subscribe,query:{type:be.SubscriptionEventType.Tx,raw:n}};return this.subscribe(t,le.Responses.decodeTxEvent)}async tx(n){const t={params:n,method:be.Method.Tx};return this.doCall(t,le.Params.encodeTx,le.Responses.decodeTx)}async txSearch(n){const t={params:n,method:be.Method.TxSearch};return this.doCall(t,le.Params.encodeTxSearch,le.Responses.decodeTxSearch)}async txSearchAll(n){let t=n.page||1;const i=[];let u=!1;for(;!u;){const R=await this.txSearch({...n,page:t});i.push(...R.txs),i.length<R.totalCount?t++:u=!0}return{totalCount:i.length,txs:i}}async validators(n){const t={method:be.Method.Validators,params:n};return this.doCall(t,le.Params.encodeValidators,le.Responses.decodeValidators)}async validatorsAll(n){const t=[];let i=1,u=!1,R=n;for(;!u;){const v=await this.validators({per_page:50,height:R,page:i});t.push(...v.validators),R=R||v.blockHeight,t.length<v.total?i++:u=!0}return{blockHeight:R??0,count:t.length,total:t.length,validators:t}}async doCall(n,t,i){const u=t(n),R=await this.client.execute(u);return i(R)}subscribe(n,t){if(!(0,lo.instanceOfRpcStreamingClient)(this.client))throw new Error("This RPC client type cannot subscribe to events");const i=le.Params.encodeSubscribe(n);return this.client.listen(i).map(R=>t(R))}}ba.Comet38Client=Eo;var Vf={};
8(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VoteType=e.broadcastTxCommitSuccess=e.broadcastTxSyncSuccess=void 0;function n(i){return i.code===0}e.broadcastTxSyncSuccess=n;function t(i){return i.checkTx.code===0&&!!i.deliverTx&&i.deliverTx.code===0}e.broadcastTxCommitSuccess=t,function(i){i[i.PreVote=1]="PreVote",i[i.PreCommit=2]="PreCommit"}(e.VoteType||(e.VoteType={}))})(Vf);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VoteType=e.broadcastTxSyncSuccess=e.broadcastTxCommitSuccess=e.SubscriptionEventType=e.Method=e.Comet38Client=void 0;var n=ba;Object.defineProperty(e,"Comet38Client",{enumerable:!0,get:function(){return n.Comet38Client}});var t=qa;Object.defineProperty(e,"Method",{enumerable:!0,get:function(){return t.Method}}),Object.defineProperty(e,"SubscriptionEventType",{enumerable:!0,get:function(){return t.SubscriptionEventType}});var i=Vf;Object.defineProperty(e,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return i.broadcastTxCommitSuccess}}),Object.defineProperty(e,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return i.broadcastTxSyncSuccess}}),Object.defineProperty(e,"VoteType",{enumerable:!0,get:function(){return i.VoteType}})})(Co);var Ii={},Wa={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buildQuery=e.SubscriptionEventType=e.Method=void 0,function(t){t.AbciInfo="abci_info",t.AbciQuery="abci_query",t.Block="block",t.Blockchain="blockchain",t.BlockResults="block_results",t.BlockSearch="block_search",t.BroadcastTxAsync="broadcast_tx_async",t.BroadcastTxSync="broadcast_tx_sync",t.BroadcastTxCommit="broadcast_tx_commit",t.Commit="commit",t.Genesis="genesis",t.Health="health",t.NumUnconfirmedTxs="num_unconfirmed_txs",t.Status="status",t.Subscribe="subscribe",t.Tx="tx",t.TxSearch="tx_search",t.Validators="validators",t.Unsubscribe="unsubscribe"}(e.Method||(e.Method={})),function(t){t.NewBlock="NewBlock",t.NewBlockHeader="NewBlockHeader",t.Tx="Tx"}(e.SubscriptionEventType||(e.SubscriptionEventType={}));function n(t){const u=(t.tags?t.tags:[]).map(v=>`${v.key}='${v.value}'`),R=t.raw?[t.raw]:[];return[...u,...R].join(" AND ")}e.buildQuery=n})(Wa);var Qf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VoteType=e.broadcastTxCommitSuccess=e.broadcastTxSyncSuccess=void 0;function n(i){return i.code===0}e.broadcastTxSyncSuccess=n;function t(i){return i.checkTx.code===0&&!!i.deliverTx&&i.deliverTx.code===0}e.broadcastTxCommitSuccess=t,function(i){i[i.PreVote=1]="PreVote",i[i.PreCommit=2]="PreCommit"}(e.VoteType||(e.VoteType={}))})(Qf);var Fa={},Wf={},Ga={},MR=re&&re.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var u=Object.getOwnPropertyDescriptor(n,t);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,u)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),HR=re&&re.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),qR=re&&re.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&MR(n,e,t);return HR(n,e),n};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.Params=void 0;const Tu=Pe,Hn=cn,Qe=st,rn=ye,VR=qR(Wa);function fd(e){return{height:(0,rn.may)(Hn.smallIntToApi,e.height)}}function QR(e){return{minHeight:(0,rn.may)(Hn.smallIntToApi,e.minHeight),maxHeight:(0,rn.may)(Hn.smallIntToApi,e.maxHeight)}}function WR(e){return{query:e.query,page:(0,rn.may)(Hn.smallIntToApi,e.page),per_page:(0,rn.may)(Hn.smallIntToApi,e.per_page),order_by:e.order_by}}function FR(e){return{path:(0,rn.assertNotEmpty)(e.path),data:(0,Tu.toHex)(e.data),height:(0,rn.may)(Hn.smallIntToApi,e.height),prove:e.prove}}function GR(e){return{tx:(0,Tu.toBase64)((0,rn.assertNotEmpty)(e.tx))}}function LR(e){return{hash:(0,Tu.toBase64)((0,rn.assertNotEmpty)(e.hash)),prove:e.prove}}function $R(e){return{query:e.query,prove:e.prove,page:(0,rn.may)(Hn.smallIntToApi,e.page),per_page:(0,rn.may)(Hn.smallIntToApi,e.per_page),order_by:e.order_by}}function KR(e){return{height:(0,rn.may)(Hn.smallIntToApi,e.height),page:(0,rn.may)(Hn.smallIntToApi,e.page),per_page:(0,rn.may)(Hn.smallIntToApi,e.per_page)}}let zR=class{static encodeAbciInfo(n){return(0,Qe.createJsonRpcRequest)(n.method)}static encodeAbciQuery(n){return(0,Qe.createJsonRpcRequest)(n.method,FR(n.params))}static encodeBlock(n){return(0,Qe.createJsonRpcRequest)(n.method,fd(n.params))}static encodeBlockchain(n){return(0,Qe.createJsonRpcRequest)(n.method,QR(n.params))}static encodeBlockResults(n){return(0,Qe.createJsonRpcRequest)(n.method,fd(n.params))}static encodeBlockSearch(n){return(0,Qe.createJsonRpcRequest)(n.method,WR(n.params))}static encodeBroadcastTx(n){return(0,Qe.createJsonRpcRequest)(n.method,GR(n.params))}static encodeCommit(n){return(0,Qe.createJsonRpcRequest)(n.method,fd(n.params))}static encodeGenesis(n){return(0,Qe.createJsonRpcRequest)(n.method)}static encodeHealth(n){return(0,Qe.createJsonRpcRequest)(n.method)}static encodeNumUnconfirmedTxs(n){return(0,Qe.createJsonRpcRequest)(n.method)}static encodeStatus(n){return(0,Qe.createJsonRpcRequest)(n.method)}static encodeSubscribe(n){const t={key:"tm.event",value:n.query.type},i=VR.buildQuery({tags:[t],raw:n.query.raw});return(0,Qe.createJsonRpcRequest)("subscribe",{query:i})}static encodeTx(n){return(0,Qe.createJsonRpcRequest)(n.method,LR(n.params))}static encodeTxSearch(n){return(0,Qe.createJsonRpcRequest)(n.method,$R(n.params))}static encodeValidators(n){return(0,Qe.createJsonRpcRequest)(n.method,KR(n.params))}};Ga.Params=zR;var vn={},xr={};
8Object.defineProperty(xr,"__esModule",{value:!0});xr.hashBlock=xr.hashTx=void 0;const Nu=fn,Ye=ye;function ZR(e){return(0,Nu.sha256)(e)}xr.hashTx=ZR;function YR(e){if(e<1)throw new Error("Cannot split an empty tree");const n=2**Math.floor(Math.log2(e));return n<e?n:n/2}function XR(e){const n=new Nu.Sha256(Uint8Array.from([0]));return n.update(e),n.digest()}function xR(e,n){const t=new Nu.Sha256(Uint8Array.from([1]));return t.update(e),t.update(n),t.digest()}function Vd(e){switch(e.length){case 0:throw new Error("Cannot hash empty tree");case 1:return XR(e[0]);default:{const n=YR(e.length),t=Vd(e.slice(0,n)),i=Vd(e.slice(n));return xR(t,i)}}}function jR(e){if(!e.lastBlockId)throw new Error("Hashing a block header with no last block ID (i.e. header at height 1) is not supported. If you need this, contributions are welcome. Please add documentation and test vectors for this case.");const n=[(0,Ye.encodeVersion)(e.version),(0,Ye.encodeString)(e.chainId),(0,Ye.encodeUvarint)(e.height),(0,Ye.encodeTime)(e.time),(0,Ye.encodeBlockId)(e.lastBlockId),(0,Ye.encodeBytes)(e.lastCommitHash),(0,Ye.encodeBytes)(e.dataHash),(0,Ye.encodeBytes)(e.validatorsHash),(0,Ye.encodeBytes)(e.nextValidatorsHash),(0,Ye.encodeBytes)(e.consensusHash),(0,Ye.encodeBytes)(e.appHash),(0,Ye.encodeBytes)(e.lastResultsHash),(0,Ye.encodeBytes)(e.evidenceHash),(0,Ye.encodeBytes)(e.proposerAddress)];return Vd(n)}xr.hashBlock=jR;Object.defineProperty(vn,"__esModule",{value:!0});vn.Responses=vn.decodeValidatorInfo=vn.decodeValidatorGenesis=vn.decodeValidatorUpdate=vn.decodeEvent=void 0;const oe=Pe,Ff=$e,_i=Le,se=cn,eB=zi,Y=ye,nB=xr;function tB(e){return{data:e.data,lastBlockHeight:(0,Y.may)(se.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,Y.may)(oe.fromBase64,e.last_block_app_hash)}}function rB(e){return{ops:e.ops.map(n=>({type:n.type,key:(0,oe.fromBase64)(n.key),data:(0,oe.fromBase64)(n.data)}))}}function iB(e){return{key:(0,oe.fromBase64)((0,Y.assertString)(e.key??"")),value:(0,oe.fromBase64)((0,Y.assertString)(e.value??"")),proof:(0,Y.may)(rB,e.proofOps),height:(0,Y.may)(se.apiToSmallInt,e.height),code:(0,Y.may)(se.apiToSmallInt,e.code),codespace:(0,Y.assertString)(e.codespace??""),index:(0,Y.may)(se.apiToSmallInt,e.index),log:e.log,info:(0,Y.assertString)(e.info??"")}}function oB(e){return{key:(0,oe.fromBase64)((0,Y.assertNotEmpty)(e.key)),value:(0,oe.fromBase64)((0,Y.assertString)(e.value??""))}}function aB(e){return(0,Y.assertArray)(e).map(oB)}function Gf(e){return{type:e.type,attributes:e.attributes?aB(e.attributes):[]}}vn.decodeEvent=Gf;function Qd(e){return(0,Y.assertArray)(e).map(Gf)}function jr(e){return{code:(0,se.apiToSmallInt)((0,Y.assertNumber)(e.code??0)),codespace:e.codespace,log:e.log,data:(0,Y.may)(oe.fromBase64,e.data),events:e.events?Qd(e.events):[],gasWanted:(0,se.apiToBigInt)(e.gas_wanted??"0"),gasUsed:(0,se.apiToBigInt)(e.gas_used??"0")}}function Cu(e){if("Sum"in e){const[[n,t]]=Object.entries(e.Sum.value);return(0,Ff.assert)(n==="ed25519"||n==="secp256k1",`unknown pubkey type: ${n}`),{algorithm:n,data:(0,oe.fromBase64)((0,Y.assertNotEmpty)(t))}}else switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,oe.fromBase64)((0,Y.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,oe.fromBase64)((0,Y.assertNotEmpty)(e.value))};default:throw new Error(`unknown pubkey type: ${e.type}`)}}function sB(e){return{maxBytes:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.max_bytes)),maxGas:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.max_gas))}}function dB(e){return{maxAgeNumBlocks:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.max_age_duration))}}function Lf(e){return{block:sB((0,Y.assertObject)(e.block)),evidence:dB((0,Y.assertObject)(e.evidence))}}function $f(e){return{pubkey:Cu((0,Y.assertObject)(e.pub_key)),votingPower:(0,se.apiToBigInt)(e.power??"0")}}vn.decodeValidatorUpdate=$f;function uB(e){return{height:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(jr),validatorUpdates:(e.validator_updates||[]).map($f),consensusUpdates:(0,Y.may)(Lf,e.consensus_param_updates),beginBlockEvents:Qd(e.begin_block_events||[]),endBlockEvents:Qd(e.end_block_events||[])}}function La(e){return{hash:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.hash)),parts:{total:(0,Y.assertNotEmpty)(e.parts.total),hash:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.parts.hash))}}}function cB(e){return{block:(0,se.apiToSmallInt)(e.block),app:(0,se.apiToSmallInt)(e.app??0)}}function $a(e){return{version:cB(e.version),chainId:(0,Y.assertNotEmpty)(e.chain_id),height:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.height)),time:(0,_i.fromRfc3339WithNanoseconds)((0,Y.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?La(e.last_block_id):null,lastCommitHash:(0,oe.fromHex)((0,Y.assertSet)(e.last_commit_hash)),dataHash:(0,oe.fromHex)((0,Y.assertSet)(e.data_hash)),validatorsHash:(0,oe.fromHex)((0,Y.assertSet)(e.validators_hash)),nextValidatorsHash:(0,oe.fromHex)((0,Y.assertSet)(e.next_validators_hash)),consensusHash:(0,oe.fromHex)((0,Y.assertSet)(e.consensus_hash)),appHash:(0,oe.fromHex)((0,Y.assertSet)(e.app_hash)),lastResultsHash:(0,oe.fromHex)((0,Y.assertSet)(e.last_results_hash)),evidenceHash:(0,oe.fromHex)((0,Y.assertSet)(e.evidence_hash)),proposerAddress:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.proposer_address))}}function lB(e){return{blockId:La(e.block_id),blockSize:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.block_size)),header:$a(e.header),numTxs:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.num_txs))}}function fB(e){return{lastHeight:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.last_height)),blockMetas:(0,Y.assertArray)(e.block_metas).map(lB)}}function pB(e){return{...jr(e),hash:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.hash))}}function mB(e){return{height:(0,se.apiToSmallInt)(e.height),hash:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.hash)),checkTx:jr((0,Y.assertObject)(e.check_tx)),deliverTx:(0,Y.may)(jr,e.deliver_tx)}}function yB(e){return(0,Ff.assert)(e in eB.BlockIdFlag),e}function hB(e){return{blockIdFlag:yB(e.block_id_flag),validatorAddress:e.validator_address?(0,oe.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,_i.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,oe.fromBase64)(e.signature):void 0}}function Kf(e){return{blockId:La((0,Y.assertObject)(e.block_id)),height:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.height)),round:(0,se.apiToSmallInt)(e.round),signatures:(0,Y.assertArray)(e.signatures).map(hB)}}function gB(e){return{canonical:(0,Y.assertBoolean)(e.canonical),header:$a(e.signed_header.header),commit:Kf(e.signed_header.commit)}}function zf(e){return{address:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.address)),pubkey:Cu((0,Y.assertObject)(e.pub_key)),votingPower:(0,se.apiToBigInt)((0,Y.assertNotEmpty)(e.power))}}vn.decodeValidatorGenesis=zf;function SB(e){return{genesisTime:(0,_i.fromRfc3339WithNanoseconds)((0,Y.assertNotEmpty)(e.genesis_time)),chainId:(0,Y.assertNotEmpty)(e.chain_id),consensusParams:Lf(e.consensus_params),validators:e.validators?(0,Y.assertArray)(e.validators).map(zf):[],appHash:(0,oe.fromHex)((0,Y.assertSet)(e.app_hash)),appState:e.app_state}}function wu(e){return{pubkey:Cu((0,Y.assertObject)(e.pub_key)),votingPower:(0,se.apiToBigInt)((0,Y.assertNotEmpty)(e.voting_power)),address:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,se.apiToSmallInt)(e.proposer_priority):void 0}}vn.decodeValidatorInfo=wu;function kB(e){return{id:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.id)),listenAddr:(0,Y.assertNotEmpty)(e.listen_addr),network:(0,Y.assertNotEmpty)(e.network),version:(0,Y.assertString)(e.version),channels:(0,Y.assertNotEmpty)(e.channels),moniker:(0,Y.assertNotEmpty)(e.moniker),other:(0,Y.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.protocol_version.app)),block:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.protocol_version.block)),p2p:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.protocol_version.p2p))}}}function PB(e){const n=e.earliest_block_height?(0,se.apiToSmallInt)(e.earliest_block_height):void 0,t=e.earliest_block_time?(0,_i.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,oe.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,oe.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:n||void 0,earliestBlockTime:t!=null&&t.getTime()?t:void 0,latestBlockHash:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,_i.fromRfc3339WithNanoseconds)((0,Y.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,Y.assertBoolean)(e.catching_up)}}function RB(e){return{nodeInfo:kB(e.node_info),syncInfo:PB(e.sync_info),validatorInfo:wu(e.validator_info)}}function BB(e){return{data:(0,oe.fromBase64)((0,Y.assertNotEmpty)(e.data)),rootHash:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.root_hash)),proof:{total:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.proof.total)),index:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.proof.index)),leafHash:(0,oe.fromBase64)((0,Y.assertNotEmpty)(e.proof.leaf_hash)),au
8nts:(0,Y.assertArray)(e.proof.aunts).map(oe.fromBase64)}}}function Zf(e){return{tx:(0,oe.fromBase64)((0,Y.assertNotEmpty)(e.tx)),result:jr((0,Y.assertObject)(e.tx_result)),height:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.height)),index:(0,se.apiToSmallInt)((0,Y.assertNumber)(e.index)),hash:(0,oe.fromHex)((0,Y.assertNotEmpty)(e.hash)),proof:(0,Y.may)(BB,e.proof)}}function vB(e){return{totalCount:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.total_count)),txs:(0,Y.assertArray)(e.txs).map(Zf)}}function OB(e){const n=(0,oe.fromBase64)((0,Y.assertNotEmpty)(e.tx));return{tx:n,hash:(0,nB.hashTx)(n),result:jr(e.result),height:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.height))}}function bB(e){return{blockHeight:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.block_height)),validators:(0,Y.assertArray)(e.validators).map(wu),count:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.count)),total:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.total))}}function Yf(e){var n;return{header:$a((0,Y.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?Kf((0,Y.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,Y.assertArray)(e.data.txs).map(oe.fromBase64):[],evidence:((n=e.evidence)==null?void 0:n.evidence)??[]}}function Xf(e){return{blockId:La(e.block_id),block:Yf(e.block)}}function AB(e){return{totalCount:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.total_count)),blocks:(0,Y.assertArray)(e.blocks).map(Xf)}}function IB(e){return{total:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.total)),totalBytes:(0,se.apiToSmallInt)((0,Y.assertNotEmpty)(e.total_bytes))}}let TB=class xf{static decodeAbciInfo(n){return tB((0,Y.assertObject)(n.result.response))}static decodeAbciQuery(n){return iB((0,Y.assertObject)(n.result.response))}static decodeBlock(n){return Xf(n.result)}static decodeBlockResults(n){return uB(n.result)}static decodeBlockSearch(n){return AB(n.result)}static decodeBlockchain(n){return fB(n.result)}static decodeBroadcastTxSync(n){return pB(n.result)}static decodeBroadcastTxAsync(n){return xf.decodeBroadcastTxSync(n)}static decodeBroadcastTxCommit(n){return mB(n.result)}static decodeCommit(n){return gB(n.result)}static decodeGenesis(n){return SB((0,Y.assertObject)(n.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(n){return IB(n.result)}static decodeStatus(n){return RB(n.result)}static decodeNewBlockEvent(n){return Yf(n.data.value.block)}static decodeNewBlockHeaderEvent(n){return $a(n.data.value.header)}static decodeTxEvent(n){return OB(n.data.value.TxResult)}static decodeTx(n){return Zf(n.result)}static decodeTxSearch(n){return vB(n.result)}static decodeValidators(n){return bB(n.result)}};vn.Responses=TB;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Responses=e.Params=void 0;var n=Ga;Object.defineProperty(e,"Params",{enumerable:!0,get:function(){return n.Params}});var t=vn;Object.defineProperty(e,"Responses",{enumerable:!0,get:function(){return t.Responses}})})(Wf);var NB=re&&re.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var u=Object.getOwnPropertyDescriptor(n,t);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,u)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),CB=re&&re.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),wB=re&&re.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&NB(n,e,t);return CB(n,e),n};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.Tendermint34Client=void 0;const _B=st,fo=Wi,fe=Wf,Ae=wB(Wa);class Jo{static async connect(n){let t;return typeof n=="object"?t=new fo.HttpClient(n):t=n.startsWith("http://")||n.startsWith("https://")?new fo.HttpClient(n):new fo.WebsocketClient(n),await this.detectVersion(t),Jo.create(t)}static async create(n){return new Jo(n)}static async detectVersion(n){const t=(0,_B.createJsonRpcRequest)(Ae.Method.Status),u=(await n.execute(t)).result;if(!u||!u.node_info)throw new Error("Unrecognized format for status response");const R=u.node_info.version;
8if(typeof R!="string")throw new Error("Unrecognized version format: must be string");return R}constructor(n){this.client=n}disconnect(){this.client.disconnect()}async abciInfo(){const n={method:Ae.Method.AbciInfo};return this.doCall(n,fe.Params.encodeAbciInfo,fe.Responses.decodeAbciInfo)}async abciQuery(n){const t={params:n,method:Ae.Method.AbciQuery};return this.doCall(t,fe.Params.encodeAbciQuery,fe.Responses.decodeAbciQuery)}async block(n){const t={method:Ae.Method.Block,params:{height:n}};return this.doCall(t,fe.Params.encodeBlock,fe.Responses.decodeBlock)}async blockResults(n){const t={method:Ae.Method.BlockResults,params:{height:n}};return this.doCall(t,fe.Params.encodeBlockResults,fe.Responses.decodeBlockResults)}async blockSearch(n){const t={params:n,method:Ae.Method.BlockSearch},i=await this.doCall(t,fe.Params.encodeBlockSearch,fe.Responses.decodeBlockSearch);return{...i,blocks:[...i.blocks].sort((u,R)=>u.block.header.height-R.block.header.height)}}async blockSearchAll(n){let t=n.page||1;const i=[];let u=!1;for(;!u;){const R=await this.blockSearch({...n,page:t});i.push(...R.blocks),i.length<R.totalCount?t++:u=!0}return i.sort((R,v)=>R.block.header.height-v.block.header.height),{totalCount:i.length,blocks:i}}async blockchain(n,t){const i={method:Ae.Method.Blockchain,params:{minHeight:n,maxHeight:t}};return this.doCall(i,fe.Params.encodeBlockchain,fe.Responses.decodeBlockchain)}async broadcastTxSync(n){const t={params:n,method:Ae.Method.BroadcastTxSync};return this.doCall(t,fe.Params.encodeBroadcastTx,fe.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(n){const t={params:n,method:Ae.Method.BroadcastTxAsync};return this.doCall(t,fe.Params.encodeBroadcastTx,fe.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(n){const t={params:n,method:Ae.Method.BroadcastTxCommit};return this.doCall(t,fe.Params.encodeBroadcastTx,fe.Responses.decodeBroadcastTxCommit)}async commit(n){const t={method:Ae.Method.Commit,params:{height:n}};return this.doCall(t,fe.Params.encodeCommit,fe.Responses.decodeCommit)}async genesis(){const n={method:Ae.Method.Genesis};return this.doCall(n,fe.Params.encodeGenesis,fe.Responses.decodeGenesis)}async health(){const n={method:Ae.Method.Health};return this.doCall(n,fe.Params.encodeHealth,fe.Responses.decodeHealth)}async numUnconfirmedTxs(){const n={method:Ae.Method.NumUnconfirmedTxs};return this.doCall(n,fe.Params.encodeNumUnconfirmedTxs,fe.Responses.decodeNumUnconfirmedTxs)}async status(){const n={method:Ae.Method.Status};return this.doCall(n,fe.Params.encodeStatus,fe.Responses.decodeStatus)}subscribeNewBlock(){const n={method:Ae.Method.Subscribe,query:{type:Ae.SubscriptionEventType.NewBlock}};return this.subscribe(n,fe.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){const n={method:Ae.Method.Subscribe,query:{type:Ae.SubscriptionEventType.NewBlockHeader}};return this.subscribe(n,fe.Responses.decodeNewBlockHeaderEvent)}subscribeTx(n){const t={method:Ae.Method.Subscribe,query:{type:Ae.SubscriptionEventType.Tx,raw:n}};return this.subscribe(t,fe.Responses.decodeTxEvent)}async tx(n){const t={params:n,method:Ae.Method.Tx};return this.doCall(t,fe.Params.encodeTx,fe.Responses.decodeTx)}async txSearch(n){const t={params:n,method:Ae.Method.TxSearch};
8return this.doCall(t,fe.Params.encodeTxSearch,fe.Responses.decodeTxSearch)}async txSearchAll(n){let t=n.page||1;const i=[];let u=!1;for(;!u;){const R=await this.txSearch({...n,page:t});i.push(...R.txs),i.length<R.totalCount?t++:u=!0}return{totalCount:i.length,txs:i}}async validators(n){const t={method:Ae.Method.Validators,params:n};return this.doCall(t,fe.Params.encodeValidators,fe.Responses.decodeValidators)}async validatorsAll(n){const t=[];let i=1,u=!1,R=n;for(;!u;){const v=await this.validators({per_page:50,height:R,page:i});t.push(...v.validators),R=R||v.blockHeight,t.length<v.total?i++:u=!0}return{blockHeight:R??0,count:t.length,total:t.length,validators:t}}async doCall(n,t,i){const u=t(n),R=await this.client.execute(u);return i(R)}subscribe(n,t){if(!(0,fo.instanceOfRpcStreamingClient)(this.client))throw new Error("This RPC client type cannot subscribe to events");const i=fe.Params.encodeSubscribe(n);return this.client.listen(i).map(R=>t(R))}}Fa.Tendermint34Client=Jo;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Tendermint34Client=e.VoteType=e.broadcastTxSyncSuccess=e.broadcastTxCommitSuccess=e.SubscriptionEventType=e.Method=void 0;var n=Wa;Object.defineProperty(e,"Method",{enumerable:!0,get:function(){return n.Method}}),Object.defineProperty(e,"SubscriptionEventType",{enumerable:!0,get:function(){return n.SubscriptionEventType}});var t=Qf;Object.defineProperty(e,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return t.broadcastTxCommitSuccess}}),Object.defineProperty(e,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return t.broadcastTxSyncSuccess}}),Object.defineProperty(e,"VoteType",{enumerable:!0,get:function(){return t.VoteType}});var i=Fa;Object.defineProperty(e,"Tendermint34Client",{enumerable:!0,get:function(){return i.Tendermint34Client}})})(Ii);var Uo={},Ka={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buildQuery=e.SubscriptionEventType=e.Method=void 0,function(t){t.AbciInfo="abci_info",t.AbciQuery="abci_query",t.Block="block",t.Blockchain="blockchain",t.BlockResults="block_results",t.BlockSearch="block_search",t.BroadcastTxAsync="broadcast_tx_async",t.BroadcastTxSync="broadcast_tx_sync",t.BroadcastTxCommit="broadcast_tx_commit",t.Commit="commit",t.Genesis="genesis",t.Health="health",t.NumUnconfirmedTxs="num_unconfirmed_txs",t.Status="status",t.Subscribe="subscribe",t.Tx="tx",t.TxSearch="tx_search",t.Validators="validators",t.Unsubscribe="unsubscribe"}(e.Method||(e.Method={})),function(t){t.NewBlock="NewBlock",t.NewBlockHeader="NewBlockHeader",t.Tx="Tx"}(e.SubscriptionEventType||(e.SubscriptionEventType={}));function n(t){const u=(t.tags?t.tags:[]).map(v=>`${v.key}='${v.value}'`),R=t.raw?[t.raw]:[];return[...u,...R].join(" AND ")}e.buildQuery=n})(Ka);var jf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VoteType=e.broadcastTxCommitSuccess=e.broadcastTxSyncSuccess=void 0;function n(i){return i.code===0}e.broadcastTxSyncSuccess=n;function t(i){return i.checkTx.code===0&&!!i.deliverTx&&i.deliverTx.code===0}e.broadcastTxCommitSuccess=t,function(i){i[i.PreVote=1]="PreVote",i[i.PreCommit=2]="PreCommit"}(e.VoteType||(e.VoteType={}))})(jf);var za={},ep={},Za={},Se={};Object.defineProperty(Se,"__esModule",{value:!0});Se.encodeBlockId=Se.encodeVersion=Se.encodeBytes=Se.encodeTime=Se.encodeUvarint=Se.encodeString=Se.dictionaryToStringMap=Se.may=Se.assertNotEmpty=Se.assertObject=Se.assertArray=Se.assertNumber=Se.assertString=Se.assertBoolean=Se.assertSet=void 0;const EB=Pe;function Lt(e){if(e===void 0)throw new Error("Value must not be undefined");if(e===null)throw new Error("Value must not be null");return e}Se.assertSet=Lt;function JB(e){if(Lt(e),typeof e!="boolean")throw new Error("Value must be a boolean");return e}Se.assertBoolean=JB;function UB(e){if(Lt(e),typeof e!="string")throw new Error("Value must be a string");return e}Se.assertString=UB;function DB(e){if(Lt(e),typeof e!="number")throw new Error("Value must be a number");return e}Se.assertNumber=DB;function MB(e){if(Lt(e),!Array.isArray(e))throw new Error("Value must be a an array");return e}Se.assertArray=MB;function HB(e){if(Lt(e),typeof e!="object")throw new Error("Value must be an object");
8if(Object.prototype.toString.call(e)!=="[object Object]")throw new Error("Value must be a simple object");return e}Se.assertObject=HB;function qB(e){if(Lt(e),typeof e=="number"&&e===0)throw new Error("must provide a non-zero value");if(e.length===0)throw new Error("must provide a non-empty value");return e}Se.assertNotEmpty=qB;function VB(e,n){return n==null?void 0:e(n)}Se.may=VB;function QB(e){const n=new Map;for(const t of Object.keys(e)){const i=e[t];if(typeof i!="string")throw new Error("Found dictionary value of type other than string");n.set(t,i)}return n}Se.dictionaryToStringMap=QB;function WB(e){const n=(0,EB.toUtf8)(e);return Uint8Array.from([n.length,...n])}Se.encodeString=WB;function ei(e){return e>=128?Uint8Array.from([e&255|128,...ei(e>>7)]):Uint8Array.from([e&255])}Se.encodeUvarint=ei;function FB(e){const n=e.getTime(),t=Math.floor(n/1e3),i=t?[8,...ei(t)]:new Uint8Array,u=(e.nanoseconds||0)+n%1e3*1e6,R=u?[16,...ei(u)]:new Uint8Array;return Uint8Array.from([...i,...R])}Se.encodeTime=FB;function GB(e){if(e.length>=128)throw new Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}Se.encodeBytes=GB;function LB(e){const n=e.block?Uint8Array.from([8,...ei(e.block)]):new Uint8Array,t=e.app?Uint8Array.from([16,...ei(e.app)]):new Uint8Array;return Uint8Array.from([...n,...t])}Se.encodeVersion=LB;function $B(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}Se.encodeBlockId=$B;var KB=re&&re.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var u=Object.getOwnPropertyDescriptor(n,t);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,u)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),zB=re&&re.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),ZB=re&&re.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&KB(n,e,t);return zB(n,e),n};Object.defineProperty(Za,"__esModule",{value:!0});Za.Params=void 0;const _u=Pe,qn=cn,We=st,on=Se,YB=ZB(Ka);function pd(e){return{height:(0,on.may)(qn.smallIntToApi,e.height)}}function XB(e){return{minHeight:(0,on.may)(qn.smallIntToApi,e.minHeight),maxHeight:(0,on.may)(qn.smallIntToApi,e.maxHeight)}}function xB(e){return{query:e.query,page:(0,on.may)(qn.smallIntToApi,e.page),per_page:(0,on.may)(qn.smallIntToApi,e.per_page),order_by:e.order_by}}function jB(e){return{path:(0,on.assertNotEmpty)(e.path),data:(0,_u.toHex)(e.data),height:(0,on.may)(qn.smallIntToApi,e.height),prove:e.prove}}function ev(e){return{tx:(0,_u.toBase64)((0,on.assertNotEmpty)(e.tx))}}function nv(e){return{hash:(0,_u.toBase64)((0,on.assertNotEmpty)(e.hash)),prove:e.prove}}function tv(e){return{query:e.query,prove:e.prove,page:(0,on.may)(qn.smallIntToApi,e.page),per_page:(0,on.may)(qn.smallIntToApi,e.per_page),order_by:e.order_by}}function rv(e){return{height:(0,on.may)(qn.smallIntToApi,e.height),page:(0,on.may)(qn.smallIntToApi,e.page),per_page:(0,on.may)(qn.smallIntToApi,e.per_page)}}class iv{static encodeAbciInfo(n){return(0,We.createJsonRpcRequest)(n.method)}static encodeAbciQuery(n){return(0,We.createJsonRpcRequest)(n.method,jB(n.params))}static encodeBlock(n){return(0,We.createJsonRpcRequest)(n.method,pd(n.params))}static encodeBlockchain(n){return(0,We.createJsonRpcRequest)(n.method,XB(n.params))}static encodeBlockResults(n){return(0,We.createJsonRpcRequest)(n.method,pd(n.params))}static encodeBlockSearch(n){return(0,We.createJsonRpcRequest)(n.method,xB(n.params))}static encodeBroadcastTx(n){return(0,We.createJsonRpcRequest)(n.method,ev(n.params))}static encodeCommit(n){return(0,We.createJsonRpcRequest)(n.method,pd(n.params))}static encodeGenesis(n){return(0,We.createJsonRpcRequest)(n.method)}static encodeHealth(n){return(0,We.createJsonRpcRequest)(n.method)}static encodeNumUnconfirmedTxs(n){return(0,We.createJsonRpcRequest)(n.method)}static encodeStatus(n){return(0,We.createJsonRpcRequest)(n.method)}static encodeSubscribe(n){const t={key:"tm.event",value:n.query.type},i=YB.buildQuery({tags:[t],raw:n.query.raw});return(0,We.createJsonRpcRequest)("subscribe",{query:i})}static encodeTx(n){return(0,We.createJsonRpcRequest)(n.method,nv(n.params))}static encodeTxSearch(n){return(0,We.createJsonRpcRequest)(n.method,tv(n.params))}static encodeValidators(n){return(0,We.createJsonRpcRequest)(n.method,rv(n.params))}}Za.Params=iv;var On={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});ni.hashBlock=ni.hashTx=void 0;const Eu=fn,Xe=Se;function ov(e){return(0,Eu.sha256)(e)}ni.hashTx=ov;function av(e){if(e<1)throw new Error("Cannot split an empty tree");const n=2**Math.floor(Math.log2(e));return n<e?n:n/2}function sv(e){const n=new Eu.Sha256(Uint8Array.from([0]));return n.update(e),n.digest()}function dv(e,n){const t=new Eu.Sha256(Uint8Array.from([1]));return t.update(e),t.update(n),t.digest()}function Wd(e){switch(e.length){case 0:throw new Error("Cannot hash empty tree");case 1:return sv(e[0]);default:{const n=av(e.length),t=Wd(e.slice(0,n)),i=Wd(e.slice(n));return dv(t,i)}}}function uv(e){if(!e.lastBlockId)throw new Error("Hashing a block header with no last block ID (i.e. header at height 1) is not supported. If you need this, c
8ontributions are welcome. Please add documentation and test vectors for this case.");const n=[(0,Xe.encodeVersion)(e.version),(0,Xe.encodeString)(e.chainId),(0,Xe.encodeUvarint)(e.height),(0,Xe.encodeTime)(e.time),(0,Xe.encodeBlockId)(e.lastBlockId),(0,Xe.encodeBytes)(e.lastCommitHash),(0,Xe.encodeBytes)(e.dataHash),(0,Xe.encodeBytes)(e.validatorsHash),(0,Xe.encodeBytes)(e.nextValidatorsHash),(0,Xe.encodeBytes)(e.consensusHash),(0,Xe.encodeBytes)(e.appHash),(0,Xe.encodeBytes)(e.lastResultsHash),(0,Xe.encodeBytes)(e.evidenceHash),(0,Xe.encodeBytes)(e.proposerAddress)];return Wd(n)}ni.hashBlock=uv;Object.defineProperty(On,"__esModule",{value:!0});On.Responses=On.decodeValidatorInfo=On.decodeValidatorGenesis=On.decodeValidatorUpdate=On.decodeEvent=void 0;const ce=Pe,np=$e,Ei=Le,de=cn,cv=zi,X=Se,lv=ni;function fv(e){return{data:e.data,lastBlockHeight:(0,X.may)(de.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,X.may)(ce.fromBase64,e.last_block_app_hash)}}function pv(e){return{ops:e.ops.map(n=>({type:n.type,key:(0,ce.fromBase64)(n.key),data:(0,ce.fromBase64)(n.data)}))}}function mv(e){return{key:(0,ce.fromBase64)((0,X.assertString)(e.key??"")),value:(0,ce.fromBase64)((0,X.assertString)(e.value??"")),proof:(0,X.may)(pv,e.proofOps),height:(0,X.may)(de.apiToSmallInt,e.height),code:(0,X.may)(de.apiToSmallInt,e.code),codespace:(0,X.assertString)(e.codespace??""),index:(0,X.may)(de.apiToSmallInt,e.index),log:e.log,info:(0,X.assertString)(e.info??"")}}function yv(e){return{key:(0,X.assertNotEmpty)(e.key),value:e.value??""}}function hv(e){return(0,X.assertArray)(e).map(yv)}function tp(e){return{type:e.type,attributes:e.attributes?hv(e.attributes):[]}}On.decodeEvent=tp;function Fd(e){return(0,X.assertArray)(e).map(tp)}function ti(e){return{code:(0,de.apiToSmallInt)((0,X.assertNumber)(e.code??0)),codespace:e.codespace,log:e.log,data:(0,X.may)(ce.fromBase64,e.data),events:e.events?Fd(e.events):[],gasWanted:(0,de.apiToBigInt)(e.gas_wanted??"0"),gasUsed:(0,de.apiToBigInt)(e.gas_used??"0")}}function Ju(e){if("Sum"in e){const[[n,t]]=Object.entries(e.Sum.value);return(0,np.assert)(n==="ed25519"||n==="secp256k1",`unknown pubkey type: ${n}`),{algorithm:n,data:(0,ce.fromBase64)((0,X.assertNotEmpty)(t))}}else switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,ce.fromBase64)((0,X.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,ce.fromBase64)((0,X.assertNotEmpty)(e.value))};default:throw new Error(`unknown pubkey type: ${e.type}`)}}function gv(e){return{maxBytes:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.max_bytes)),maxGas:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.max_gas))}}function Sv(e){return{maxAgeNumBlocks:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.max_age_duration))}}function rp(e){return{block:gv((0,X.assertObject)(e.block)),evidence:Sv((0,X.assertObject)(e.evidence))}}function ip(e){return{pubkey:Ju((0,X.assertObject)(e.pub_key)),votingPower:(0,de.apiToBigInt)(e.power??"0")}}On.decodeValidatorUpdate=ip;function kv(e){return{height:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(ti),validatorUpdates:(e.validator_updates||[]).map(ip),consensusUpdates:(0,X.may)(rp,e.consensus_param_updates),beginBlockEvents:Fd(e.begin_block_events||[]),endBlockEvents:Fd(e.end_block_events||[])}}function Ya(e){return{hash:(0,ce.fromHex)((0,X.assertNotEmpty)(e.hash)),parts:{total:(0,X.assertNotEmpty)(e.parts.total),hash:(0,ce.fromHex)((0,X.assertNotEmpty)(e.parts.hash))}}}function Pv(e){return{block:(0,de.apiToSmallInt)(e.block),app:(0,de.apiToSmallInt)(e.app??0)}}function Xa(e){return{version:Pv(e.version),chainId:(0,X.assertNotEmpty)(e.chain_id),height:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.height)),time:(0,Ei.fromRfc3339WithNanoseconds)((0,X.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?Ya(e.last_block_id):null,lastCommitHash:(0,ce.fromHex)((0,X.assertSet)(e.last_commit_hash)),dataHash:(0,ce.fromHex)((0,X.assertSet)(e.data_hash)),validatorsHash:(0,ce.fromHex)((0,X.assertSet)(e.validators_hash)),nextValidatorsHash:(0,ce.fromHex)((0,X.assertSet)(e.next_validators_hash)),consensusHash:(0,ce.fromHex)((0,X.assertSet)(e.consensus_hash)),appHash:(0,ce.fromHex)((0,X.assertSet)(e.app_hash)),lastResultsHash:(0,ce.fromHex)((0,X.assertSet)(e.last_results_hash)),evidenceHash:(0,ce.fromHex)((0,X.assertSet)(e.evidence_hash)),proposerAddress:(0,ce.fromHex)((0,X.assertNotEmpty)(e.proposer_address))}}function Rv(e){return{blockId:Ya(e.block_id),blockSize:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.block_size)),header:Xa(e.header),numTxs:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.num_txs))}}function Bv(e){return{lastHeight:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.last_height)),blockMetas:(0,X.assertArray)(e.block_metas).map(Rv)}}function vv(e){return{...ti(e),hash:(0,ce.fromHex)((0,X.assertNotEmpty)(e.hash))}}function Ov(e){return{height:(0,de.apiToSmallInt)(e.height),hash:(0,ce.fromHex)((0,X.assertNotEmpty)(e.hash)),checkTx:ti((0,X.assertObject)(e.check_tx)),deliverTx:(0,X.may)(ti,e.deliver_tx)}}function bv(e){return(0,np.assert)(e in cv.BlockIdFlag),e}function Av(e){return{blockIdFlag:bv(e.block_id_flag),validatorAddress:e.validator_address?(0,ce.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,Ei.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,ce.fromBase64)(e.signature):void 0}}function op(e){return{blockId:Ya((0,X.assertObject)(e.block_id)),height:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.height)),round:(0,de.apiToSmallInt)(e.round),signatures:(0,X.assertArray)(e.signatures).map(Av)}}function Iv(e){return{canonical:(0,X.assertBoolean)(e.canonical),header:Xa(e.signed_header.header),commit:op(e.signed_header.commit)}}function ap(e){return{address:(0,ce.fromHex)((0,X.assertNotEmpty)(e.address)),pubkey:Ju((0,X.assertObject)(e.pub_key)),votingPower:(0,de.apiToBigInt)((0,X.assertNotEmpty)(e.power))}}On.decodeValidatorGenesis=ap;function Tv(e){return{genesisTime:(0,Ei.fromRfc3339WithNanoseconds)((0,X.assertNotEmpty)(e.genesis_time)),chainId:(0,X.assertNotEmpty)(e.chain_id),consensusParams:rp(e.consensus_params),validators:e.validators?(0,X.assertArray)(e.validators).map(ap):[],appHash:(0,ce.fromHex)((0,X.assertSet)(e.app_hash)),appState:e.app_state}}function Uu(e){return{pubkey:Ju((0,X.assertObject)(e.pub_key)),votingPower:(0,de.apiToBigInt)((0,X.assertNotEmpty)(e.voting_power)),address:(0,ce.fromHex)((0,X.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,de.apiToSmallInt)(e.proposer_priority):void 0}}On.decodeValidatorInfo=Uu;function Nv(e){return{id:(0,ce.fromHex)((0,X.assertNotEmpty)(e.id)),listenAddr:(0,X.assertNotEmpty)(e.listen_addr),network:(0,X.assertNotEmpty)(e.network),version:(0,X.assertString)(e.version),channels:(0,X.assertNotEmpty)(e.channels),moniker:(0,X.assertNotEmpty)(e.moniker),other:(0,X.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.protocol_version.app)),block:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.protocol_version.block)),p2p:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.protocol_version.p2p))}}}function Cv(e){const n=e.earliest_block_height?(0,de.apiToSmallInt)(e.earliest_block_height):void 0,t=e.earliest_block_time?(0,Ei.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,ce.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,ce.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:n||void 0,earliestBlockTime:t!=null&&t.getTime()?t:void 0,latestBlockHash:(0,ce.fromHex)((0,X.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,ce.fromHex)((0,X.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,Ei.fromRfc3339WithNanoseconds)((0,X.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,X.assertBoolean)(e.catching_up)}}function wv(e){return{nodeInfo:Nv(e.node_info),syncInfo:Cv(e.sync_info),validatorInfo:Uu(e.validator_info)}}function _v(e){return{data:(0,ce.fromBase64)((0,X.assertNotEmpty)(e.data)),rootHash:(0,ce.fromHex)((0,X.assertNotEmpty)(e.root_hash)),proof:{total:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.proof.total)),index:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.proof.index)),leafHash:(0,ce.fromBase64)((0,X.assertNotEmpty)(e.proof.leaf_hash)),au
8nts:(0,X.assertArray)(e.proof.aunts).map(ce.fromBase64)}}}function sp(e){return{tx:(0,ce.fromBase64)((0,X.assertNotEmpty)(e.tx)),result:ti((0,X.assertObject)(e.tx_result)),height:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.height)),index:(0,de.apiToSmallInt)((0,X.assertNumber)(e.index)),hash:(0,ce.fromHex)((0,X.assertNotEmpty)(e.hash)),proof:(0,X.may)(_v,e.proof)}}function Ev(e){return{totalCount:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.total_count)),txs:(0,X.assertArray)(e.txs).map(sp)}}function Jv(e){const n=(0,ce.fromBase64)((0,X.assertNotEmpty)(e.tx));return{tx:n,hash:(0,lv.hashTx)(n),result:ti(e.result),height:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.height))}}function Uv(e){return{blockHeight:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.block_height)),validators:(0,X.assertArray)(e.validators).map(Uu),count:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.count)),total:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.total))}}function dp(e){var n;return{header:Xa((0,X.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?op((0,X.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,X.assertArray)(e.data.txs).map(ce.fromBase64):[],evidence:((n=e.evidence)==null?void 0:n.evidence)??[]}}function up(e){return{blockId:Ya(e.block_id),block:dp(e.block)}}function Dv(e){return{totalCount:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.total_count)),blocks:(0,X.assertArray)(e.blocks).map(up)}}function Mv(e){return{total:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.total)),totalBytes:(0,de.apiToSmallInt)((0,X.assertNotEmpty)(e.total_bytes))}}class Du{static decodeAbciInfo(n){return fv((0,X.assertObject)(n.result.response))}static decodeAbciQuery(n){return mv((0,X.assertObject)(n.result.response))}static decodeBlock(n){return up(n.result)}static decodeBlockResults(n){return kv(n.result)}static decodeBlockSearch(n){return Dv(n.result)}static decodeBlockchain(n){return Bv(n.result)}static decodeBroadcastTxSync(n){return vv(n.result)}static decodeBroadcastTxAsync(n){return Du.decodeBroadcastTxSync(n)}static decodeBroadcastTxCommit(n){return Ov(n.result)}static decodeCommit(n){return Iv(n.result)}static decodeGenesis(n){return Tv((0,X.assertObject)(n.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(n){return Mv(n.result)}static decodeStatus(n){return wv(n.result)}static decodeNewBlockEvent(n){return dp(n.data.value.block)}static decodeNewBlockHeaderEvent(n){return Xa(n.data.value.header)}static decodeTxEvent(n){return Jv(n.data.value.TxResult)}static decodeTx(n){return sp(n.result)}static decodeTxSearch(n){return Ev(n.result)}static decodeValidators(n){return Uv(n.result)}}On.Responses=Du;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Responses=e.Params=void 0;var n=Za;Object.defineProperty(e,"Params",{enumerable:!0,get:function(){return n.Params}});var t=On;Object.defineProperty(e,"Responses",{enumerable:!0,get:function(){return t.Responses}})})(ep);var Hv=re&&re.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var u=Object.getOwnPropertyDescriptor(n,t);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,u)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),qv=re&&re.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),Vv=re&&re.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&Hv(n,e,t);return qv(n,e),n};Object.defineProperty(za,"__esModule",{value:!0});za.Tendermint37Client=void 0;const Qv=st,po=Wi,pe=ep,Ie=Vv(Ka);class Do{static async connect(n){let t;return typeof n=="object"?t=new po.HttpClient(n):t=n.startsWith("http://")||n.startsWith("https://")?new po.HttpClient(n):new po.WebsocketClient(n),await this.detectVersion(t),Do.create(t)}static async create(n){return new Do(n)}static async detectVersion(n){const t=(0,Qv.createJsonRpcRequest)(Ie.Method.Status),u=(await n.execute(t)).result;if(!u||!u.node_info)throw new Error("Unrecognized format for status response");const R=u.node_info.version;
8if(typeof R!="string")throw new Error("Unrecognized version format: must be string");return R}constructor(n){this.client=n}disconnect(){this.client.disconnect()}async abciInfo(){const n={method:Ie.Method.AbciInfo};return this.doCall(n,pe.Params.encodeAbciInfo,pe.Responses.decodeAbciInfo)}async abciQuery(n){const t={params:n,method:Ie.Method.AbciQuery};return this.doCall(t,pe.Params.encodeAbciQuery,pe.Responses.decodeAbciQuery)}async block(n){const t={method:Ie.Method.Block,params:{height:n}};return this.doCall(t,pe.Params.encodeBlock,pe.Responses.decodeBlock)}async blockResults(n){const t={method:Ie.Method.BlockResults,params:{height:n}};return this.doCall(t,pe.Params.encodeBlockResults,pe.Responses.decodeBlockResults)}async blockSearch(n){const t={params:n,method:Ie.Method.BlockSearch},i=await this.doCall(t,pe.Params.encodeBlockSearch,pe.Responses.decodeBlockSearch);return{...i,blocks:[...i.blocks].sort((u,R)=>u.block.header.height-R.block.header.height)}}async blockSearchAll(n){let t=n.page||1;const i=[];let u=!1;for(;!u;){const R=await this.blockSearch({...n,page:t});i.push(...R.blocks),i.length<R.totalCount?t++:u=!0}return i.sort((R,v)=>R.block.header.height-v.block.header.height),{totalCount:i.length,blocks:i}}async blockchain(n,t){const i={method:Ie.Method.Blockchain,params:{minHeight:n,maxHeight:t}};return this.doCall(i,pe.Params.encodeBlockchain,pe.Responses.decodeBlockchain)}async broadcastTxSync(n){const t={params:n,method:Ie.Method.BroadcastTxSync};return this.doCall(t,pe.Params.encodeBroadcastTx,pe.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(n){const t={params:n,method:Ie.Method.BroadcastTxAsync};return this.doCall(t,pe.Params.encodeBroadcastTx,pe.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(n){const t={params:n,method:Ie.Method.BroadcastTxCommit};return this.doCall(t,pe.Params.encodeBroadcastTx,pe.Responses.decodeBroadcastTxCommit)}async commit(n){const t={method:Ie.Method.Commit,params:{height:n}};return this.doCall(t,pe.Params.encodeCommit,pe.Responses.decodeCommit)}async genesis(){const n={method:Ie.Method.Genesis};return this.doCall(n,pe.Params.encodeGenesis,pe.Responses.decodeGenesis)}async health(){const n={method:Ie.Method.Health};return this.doCall(n,pe.Params.encodeHealth,pe.Responses.decodeHealth)}async numUnconfirmedTxs(){const n={method:Ie.Method.NumUnconfirmedTxs};return this.doCall(n,pe.Params.encodeNumUnconfirmedTxs,pe.Responses.decodeNumUnconfirmedTxs)}async status(){const n={method:Ie.Method.Status};return this.doCall(n,pe.Params.encodeStatus,pe.Responses.decodeStatus)}subscribeNewBlock(){const n={method:Ie.Method.Subscribe,query:{type:Ie.SubscriptionEventType.NewBlock}};return this.subscribe(n,pe.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){const n={method:Ie.Method.Subscribe,query:{type:Ie.SubscriptionEventType.NewBlockHeader}};return this.subscribe(n,pe.Responses.decodeNewBlockHeaderEvent)}subscribeTx(n){const t={method:Ie.Method.Subscribe,query:{type:Ie.SubscriptionEventType.Tx,raw:n}};return this.subscribe(t,pe.Responses.decodeTxEvent)}async tx(n){const t={params:n,method:Ie.Method.Tx};return this.doCall(t,pe.Params.encodeTx,pe.Responses.decodeTx)}async txSearch(n){const t={params:n,method:Ie.Method.TxSearch};return this.doCall(t,pe.Params.encodeTxSearch,pe.Responses.decodeTxSearch)}async txSearchAll(n){let t=n.page||1;const i=[];let u=!1;for(;!u;){const R=await this.txSearch({...n,page:t});i.push(...R.txs),i.length<R.totalCount?t++:u=!0}return{totalCount:i.length,txs:i}}async validators(n){const t={method:Ie.Method.Validators,params:n};return this.doCall(t,pe.Params.encodeValidators,pe.Responses.decodeValidators)}async validatorsAll(n){const t=[];let i=1,u=!1,R=n;for(;!u;){const v=await this.validators({per_page:50,height:R,page:i});t.push(...v.validators),R=R||v.blockHeight,t.length<v.total?i++:u=!0}return{blockHeight:R??0,count:t.length,total:t.length,validators:t}}async doCall(n,t,i){const u=t(n),R=await this.client.execute(u);return i(R)}subscribe(n,t){if(!(0,po.instanceOfRpcStreamingClient)(this.client))throw new Error("This RPC client type cannot subscribe to events");const i=pe.Params.encodeSubscribe(n);return this.client.listen(i).map(R=>t(R))}}za.Tendermint37Client=Do;
8(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Tendermint37Client=e.VoteType=e.broadcastTxSyncSuccess=e.broadcastTxCommitSuccess=e.SubscriptionEventType=e.Method=void 0;var n=Ka;Object.defineProperty(e,"Method",{enumerable:!0,get:function(){return n.Method}}),Object.defineProperty(e,"SubscriptionEventType",{enumerable:!0,get:function(){return n.SubscriptionEventType}});var t=jf;Object.defineProperty(e,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return t.broadcastTxCommitSuccess}}),Object.defineProperty(e,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return t.broadcastTxSyncSuccess}}),Object.defineProperty(e,"VoteType",{enumerable:!0,get:function(){return t.VoteType}});var i=za;Object.defineProperty(e,"Tendermint37Client",{enumerable:!0,get:function(){return i.Tendermint37Client}})})(Uo);var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.connectComet=Yn.isComet38Client=Yn.isTendermint37Client=Yn.isTendermint34Client=void 0;const cp=Co,lp=Ii,fp=Uo;function Wv(e){return e instanceof lp.Tendermint34Client}Yn.isTendermint34Client=Wv;function Fv(e){return e instanceof fp.Tendermint37Client}Yn.isTendermint37Client=Fv;function Gv(e){return e instanceof cp.Comet38Client}Yn.isComet38Client=Gv;async function Lv(e){let n;const t=await fp.Tendermint37Client.connect(e),i=(await t.status()).nodeInfo.version;return i.startsWith("0.37.")?n=t:i.startsWith("0.38.")?(t.disconnect(),n=await cp.Comet38Client.connect(e)):(t.disconnect(),n=await lp.Tendermint34Client.connect(e)),n}Yn.connectComet=Lv;(function(e){var n=re&&re.__createBinding||(Object.create?function(p,k,o,s){s===void 0&&(s=o);var y=Object.getOwnPropertyDescriptor(k,o);(!y||("get"in y?!k.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return k[o]}}),Object.defineProperty(p,s,y)}:function(p,k,o,s){s===void 0&&(s=o),p[s]=k[o]}),t=re&&re.__setModuleDefault||(Object.create?function(p,k){Object.defineProperty(p,"default",{enumerable:!0,value:k})}:function(p,k){p.default=k}),i=re&&re.__importStar||function(p){if(p&&p.__esModule)return p;var k={};if(p!=null)for(var o in p)o!=="default"&&Object.prototype.hasOwnProperty.call(p,o)&&n(k,p,o);return t(k,p),k};Object.defineProperty(e,"__esModule",{value:!0}),e.BlockIdFlag=e.isTendermint37Client=e.isTendermint34Client=e.isComet38Client=e.connectComet=e.Tendermint37Client=e.tendermint37=e.Tendermint34Client=e.tendermint34=e.VoteType=e.SubscriptionEventType=e.Method=e.broadcastTxSyncSuccess=e.broadcastTxCommitSuccess=e.WebsocketClient=e.HttpClient=e.HttpBatchClient=e.Comet38Client=e.comet38=e.toSeconds=e.toRfc3339WithNanoseconds=e.fromSeconds=e.fromRfc3339WithNanoseconds=e.DateTime=e.rawSecp256k1PubkeyToRawAddress=e.rawEd25519PubkeyToRawAddress=e.pubkeyToRawAddress=e.pubkeyToAddress=void 0;var u=zn;Object.defineProperty(e,"pubkeyToAddress",{enumerable:!0,get:function(){return u.pubkeyToAddress}}),Object.defineProperty(e,"pubkeyToRawAddress",{enumerable:!0,get:function(){return u.pubkeyToRawAddress}}),Object.defineProperty(e,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return u.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(e,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return u.rawSecp256k1PubkeyToRawAddress}});var R=Le;Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return R.DateTime}}),Object.defineProperty(e,"fromRfc3339WithNanoseconds",{enumerable:!0,get:function(){return R.fromRfc3339WithNanoseconds}}),Object.defineProperty(e,"fromSeconds",{enumerable:!0,get:function(){return R.fromSeconds}}),Object.defineProperty(e,"toRfc3339WithNanoseconds",{enumerable:!0,get:function(){return R.toRfc3339WithNanoseconds}}),Object.defineProperty(e,"toSeconds",{enumerable:!0,get:function(){return R.toSeconds}}),e.comet38=i(Co);var v=Co;Object.defineProperty(e,"Comet38Client",{enumerable:!0,get:function(){return v.Comet38Client}});var E=Wi;Object.defineProperty(e,"HttpBatchClient",{enumerable:!0,get:function(){return E.HttpBatchClient}}),Object.defineProperty(e,"HttpClient",{enumerable:!0,get:function(){return E.HttpClient}}),Object.defineProperty(e,"WebsocketClient",{enumerable:!0,get:function(){return E.WebsocketClient}});var C=Ii;Object.defineProperty(e,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return C.broadcastTxCommitSuccess}}),Object.defineProperty(e,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return C.broadcastTxSyncSuccess}}),Object.defineProperty(e,"Method",{enumerable:!0,get:function(){return C.Method}}),Object.defineProperty(e,"SubscriptionEventType",{enumerable:!0,get:function(){return C.SubscriptionEventType}}),Object.defineProperty(e,"VoteType",{enumerable:!0,get:function(){return C.VoteType}}),e.tendermint34=i(Ii);var D=Ii;Object.defineProperty(e,"Tendermint34Client",{enumerable:!0,get:function(){return D.Tendermint34Client}}),e.tendermint37=i(Uo);var _=Uo;Object.defineProperty(e,"Tendermint37Client",{enumerable:!0,get:function(){return _.Tendermint37Client}});var b=Yn;Object.defineProperty(e,"connectComet",{enumerable:!0,get:function(){return b.connectComet}}),Object.defineProperty(e,"isComet38Client",{enumerable:!0,get:function(){return b.isComet38Client}}),Object.defineProperty(e,"isTendermint34Client",{enumerable:!0,get:function(){return b.isTendermint34Client}}),Object.defineProperty(e,"isTendermint37Client",{enumerable:!0,get:function(){return b.isTendermint37Client}});var f=zi;Object.defineProperty(e,"BlockIdFlag",{enumerable:!0,get:function(){return f.BlockIdFlag}})})(mu);var qe={};
8Object.defineProperty(qe,"__esModule",{value:!0});qe.StargateClient=qe.BroadcastTxError=qe.assertIsDeliverTxFailure=qe.assertIsDeliverTxSuccess=qe.isDeliverTxSuccess=qe.isDeliverTxFailure=qe.TimeoutError=void 0;const $v=ot,md=Pe,Uc=Cn,Dc=mu,Mc=$e,Kv=pu,zv=Ji,Zv=qi,mo=Ni,Yv=Ke,Xv=Qi;class pp extends Error{constructor(n,t){super(n),this.txId=t}}qe.TimeoutError=pp;function Mu(e){return!!e.code}qe.isDeliverTxFailure=Mu;function mp(e){return!Mu(e)}qe.isDeliverTxSuccess=mp;function xv(e){if(Mu(e))throw new Error(`Error when broadcasting tx ${e.transactionHash} at height ${e.height}. Code: ${e.code}; Raw log: ${e.rawLog}`)}qe.assertIsDeliverTxSuccess=xv;function jv(e){if(mp(e))throw new Error(`Transaction ${e.transactionHash} did not fail at height ${e.height}. Code: ${e.code}; Raw log: ${e.rawLog}`)}qe.assertIsDeliverTxFailure=jv;class yp extends Error{constructor(n,t,i){super(`Broadcasting transaction failed with code ${n} (codespace: ${t}). Log: ${i}`),this.code=n,this.codespace=t,this.log=i}}qe.BroadcastTxError=yp;class Mo{static async connect(n,t={}){const i=await(0,Dc.connectComet)(n);return Mo.create(i,t)}static async create(n,t={}){return new Mo(n,t)}constructor(n,t){n&&(this.cometClient=n,this.queryClient=Yv.QueryClient.withExtensions(n,mo.setupAuthExtension,mo.setupBankExtension,mo.setupStakingExtension,mo.setupTxExtension));const{accountParser:i=zv.accountFromAny}=t;this.accountParser=i}getCometClient(){return this.cometClient}forceGetCometClient(){if(!this.cometClient)throw new Error("Comet client not available. You cannot use online functionality in offline mode.");return this.cometClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw new Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){const t=(await this.forceGetCometClient().status()).nodeInfo.network;if(!t)throw new Error("Chain ID must not be empty");this.chainId=t}return this.chainId}async getHeight(){return(await this.forceGetCometClient().status()).syncInfo.latestBlockHeight}async getAccount(n){try{const t=await this.forceGetQueryClient().auth.account(n);return t?this.accountParser(t):null}catch(t){if(/rpc error: code = NotFound/i.test(t.toString()))return null;throw t}}async getSequence(n){const t=await this.getAccount(n);if(!t)throw new Error(`Account '${n}' does not exist on chain. Send some tokens there before trying to query sequence.`);return{accountNumber:t.accountNumber,sequence:t.sequence}}async getBlock(n){const t=await this.forceGetCometClient().block(n);return{id:(0,md.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new Uc.Uint53(t.block.header.version.block).toString(),app:new Uc.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,Dc.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(n,t){return this.forceGetQueryClient().bank.balance(n,t)}async getAllBalances(n){return this.forceGetQueryClient().bank.allBalances(n)}async getBalanceStaked(n){const t=[];let i;do{const{delegationResponses:R,pagination:v}=await this.forceGetQueryClient().staking.delegatorDelegations(n,i),E=R||[];t.push(...E),i=v==null?void 0:v.nextKey}while(i!==void 0&&i.length!==0);return t.reduce((R,v)=>((0,Mc.assert)(v.balance),R!==null?(0,$v.addCoins)(R,v.balance):v.balance),null)}async getDelegation(n,t){var u;let i;try{i=(u=(await this.forceGetQueryClient().staking.delegation(n,t)).delegationResponse)==null?void 0:u.balance}catch(R){if(!R.toString().includes("key not found"))throw R}return i||null}async getTx(n){return(await this.txsQuery(`tx.hash='${n}'`))[0]??null}async searchTx(n){let t;if(typeof n=="string")t=n;else if((0,Xv.isSearchTxQueryArray)(n))t=n.map(i=>typeof i.value=="string"?`${i.key}='${i.value}'`:`${i.key}=${i.value}`).join(" AND ");else throw new Error("Got unsupported query type. See CosmJS 0.31 CHANGELOG for API breaking changes here.");return this.txsQuery(t)}disconnect(){this.cometClient&&this.cometClient.disconnect()}async broadcastTx(n,t=6e4,i=3e3){let u=!1;const R=setTimeout(()=>{u=!0},t),v=async C=>
8{if(u)throw new pp(`Transaction with ID ${C} was submitted but was not yet found on the chain. You might want to check later. There was a wait of ${t/1e3} seconds.`,C);await(0,Mc.sleep)(i);const D=await this.getTx(C);return D?{code:D.code,height:D.height,txIndex:D.txIndex,events:D.events,rawLog:D.rawLog,transactionHash:C,msgResponses:D.msgResponses,gasUsed:D.gasUsed,gasWanted:D.gasWanted}:v(C)},E=await this.broadcastTxSync(n);return new Promise((C,D)=>v(E).then(_=>{clearTimeout(R),C(_)},_=>{clearTimeout(R),D(_)}))}async broadcastTxSync(n){const t=await this.forceGetCometClient().broadcastTxSync({tx:n});return t.code?Promise.reject(new yp(t.code,t.codespace??"",t.log)):(0,md.toHex)(t.hash).toUpperCase()}async txsQuery(n){return(await this.forceGetCometClient().txSearchAll({query:n})).txs.map(i=>{const u=Kv.TxMsgData.decode(i.result.data??new Uint8Array);return{height:i.height,txIndex:i.index,hash:(0,md.toHex)(i.hash).toUpperCase(),code:i.result.code,events:i.result.events.map(Zv.fromTendermintEvent),rawLog:i.result.log||"",tx:i.tx,msgResponses:u.msgResponses,gasUsed:i.result.gasUsed,gasWanted:i.result.gasWanted}})}}qe.StargateClient=Mo;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SigningStargateClient=e.createDefaultAminoConverters=e.defaultRegistryTypes=void 0;const n=ot,t=Pe,i=Cn,u=Ct,R=mu,v=$e,E=ve,C=ou,D=cu,_=ri,b=it,f=ha,p=Hi,k=qt,o=Ni,s=Ni,y=qe;e.defaultRegistryTypes=[["/cosmos.base.v1beta1.Coin",E.Coin],...o.authzTypes,...o.bankTypes,...o.distributionTypes,...o.feegrantTypes,...o.govTypes,...o.groupTypes,...o.stakingTypes,...o.ibcTypes,...o.vestingTypes];function w(){return{...(0,s.createAuthzAminoConverters)(),...(0,s.createBankAminoConverters)(),...(0,s.createDistributionAminoConverters)(),...(0,s.createGovAminoConverters)(),...(0,s.createStakingAminoConverters)(),...(0,s.createIbcAminoConverters)(),...(0,s.createFeegrantAminoConverters)(),...(0,s.createVestingAminoConverters)()}}e.createDefaultAminoConverters=w;class J extends y.StargateClient{static async connectWithSigner(U,r,m={}){const N=await(0,R.connectComet)(U);return J.createWithSigner(N,r,m)}static async createWithSigner(U,r,m={}){return new J(U,r,m)}static async offline(U,r={}){return new J(void 0,U,r)}constructor(U,r,m){super(U,m);const{registry:N=new u.Registry(e.defaultRegistryTypes),aminoTypes:V=new p.AminoTypes(w())}=m;this.registry=N,this.aminoTypes=V,this.signer=r,this.broadcastTimeoutMs=m.broadcastTimeoutMs,this.broadcastPollIntervalMs=m.broadcastPollIntervalMs,this.gasPrice=m.gasPrice}async simulate(U,r,m){const N=r.map(O=>this.registry.encodeAsAny(O)),V=(await this.signer.getAccounts()).find(O=>O.address===U);if(!V)throw new Error("Failed to retrieve account from signer");const d=(0,n.encodeSecp256k1Pubkey)(V.pubkey),{sequence:l}
8=await this.getSequence(U),{gasInfo:T}=await this.forceGetQueryClient().tx.simulate(N,m,d,l);return(0,v.assertDefined)(T),i.Uint53.fromString(T.gasUsed.toString()).toNumber()}async sendTokens(U,r,m,N,V=""){const d={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:U,toAddress:r,amount:[...m]}};return this.signAndBroadcast(U,[d],N,V)}async delegateTokens(U,r,m,N,V=""){const d={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:D.MsgDelegate.fromPartial({delegatorAddress:U,validatorAddress:r,amount:m})};return this.signAndBroadcast(U,[d],N,V)}async undelegateTokens(U,r,m,N,V=""){const d={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:D.MsgUndelegate.fromPartial({delegatorAddress:U,validatorAddress:r,amount:m})};return this.signAndBroadcast(U,[d],N,V)}async withdrawRewards(U,r,m,N=""){const V={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:C.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:U,validatorAddress:r})};return this.signAndBroadcast(U,[V],m,N)}async sendIbcTokens(U,r,m,N,V,d,l,T,O=""){const B=l?BigInt(l)*BigInt(1e9):void 0,M={typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:f.MsgTransfer.fromPartial({sourcePort:N,sourceChannel:V,sender:U,receiver:r,token:m,timeoutHeight:d,timeoutTimestamp:B})};return this.signAndBroadcast(U,[M],T,O)}async signAndBroadcast(U,r,m,N="",V){let d;if(m=="auto"||typeof m=="number"){(0,v.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");const O=await this.simulate(U,r,N),B=typeof m=="number"?m:1.4;d=(0,k.calculateFee)(Math.round(O*B),this.gasPrice)}else d=m;const l=await this.sign(U,r,d,N,void 0,V),T=b.TxRaw.encode(l).finish();return this.broadcastTx(T,this.broadcastTimeoutMs,this.broadcastPollIntervalMs)}async signAndBroadcastSync(U,r,m,N="",V){let d;if(m=="auto"||typeof m=="number"){(0,v.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");const O=await this.simulate(U,r,N),B=typeof m=="number"?m:1.3;d=(0,k.calculateFee)(Math.round(O*B),this.gasPrice)}else d=m;const l=await this.sign(U,r,d,N,void 0,V),T=b.TxRaw.encode(l).finish();return this.broadcastTxSync(T)}async sign(U,r,m,N,V,d){let l;if(V)l=V;else{const{accountNumber:T,sequence:O}
8=await this.getSequence(U),B=await this.getChainId();l={accountNumber:T,sequence:O,chainId:B}}return(0,u.isOfflineDirectSigner)(this.signer)?this.signDirect(U,r,m,N,l,d):this.signAmino(U,r,m,N,l,d)}async signAmino(U,r,m,N,{accountNumber:V,sequence:d,chainId:l},T){(0,v.assert)(!(0,u.isOfflineDirectSigner)(this.signer));const O=(await this.signer.getAccounts()).find(j=>j.address===U);if(!O)throw new Error("Failed to retrieve account from signer");const B=(0,u.encodePubkey)((0,n.encodeSecp256k1Pubkey)(O.pubkey)),M=_.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,W=r.map(j=>this.aminoTypes.toAmino(j)),H=(0,n.makeSignDoc)(W,m,l,N,V,d,T),{signature:a,signed:g}=await this.signer.signAmino(U,H),S={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:g.msgs.map(j=>this.aminoTypes.fromAmino(j)),memo:g.memo,timeoutHeight:T}},A=this.registry.encode(S),Q=i.Int53.fromString(g.fee.gas).toNumber(),L=i.Int53.fromString(g.sequence).toNumber(),G=(0,u.makeAuthInfoBytes)([{pubkey:B,sequence:L}],g.fee.amount,Q,g.fee.granter,g.fee.payer,M);return b.TxRaw.fromPartial({bodyBytes:A,authInfoBytes:G,signatures:[(0,t.fromBase64)(a.signature)]})}async signDirect(U,r,m,N,{accountNumber:V,sequence:d,chainId:l},T){(0,v.assert)((0,u.isOfflineDirectSigner)(this.signer));const O=(await this.signer.getAccounts()).find(A=>A.address===U);if(!O)throw new Error("Failed to retrieve account from signer");const B=(0,u.encodePubkey)((0,n.encodeSecp256k1Pubkey)(O.pubkey)),M={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:r,memo:N,timeoutHeight:T}},W=this.registry.encode(M),H=i.Int53.fromString(m.gas).toNumber(),a=(0,u.makeAuthInfoBytes)([{pubkey:B,sequence:d}],m.amount,H,m.granter,m.payer),g=(0,u.makeSignDoc)(W,a,l,V),{signature:h,signed:S}=await this.signer.signDirect(U,g);return b.TxRaw.fromPartial({bodyBytes:S.bodyBytes,authInfoBytes:S.authInfoBytes,signatures:[(0,t.fromBase64)(h.signature)]})}}e.SigningStargateClient=J})(Kl);(function(e){var n=re&&re.__createBinding||(Object.create?function(o,s,y,w){w===void 0&&(w=y);var J=Object.getOwnPropertyDescriptor(s,y);(!J||("get"in J?!s.__esModule:J.writable||J.configurable))&&(J={enumerable:!0,get:function(){return s[y]}}),Object.defineProperty(o,w,J)}:function(o,s,y,w){w===void 0&&(w=y),o[w]=s[y]}),t=re&&re.__setModuleDefault||(Object.create?function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}:function(o,s){o.default=s}),i=re&&re.__importStar||function(o){if(o&&o.__esModule)return o;var s={};if(o!=null)for(var y in o)y!=="default"&&Object.prototype.hasOwnProperty.call(o,y)&&n(s,o,y);return t(s,o),s};Object.defineProperty(e,"__esModule",{value:!0}),e.isMsgWithdrawDelegatorRewardEncodeObject=e.isMsgVoteWeightedEncodeObject=e.isMsgVoteEncodeObject=e.isMsgUndelegateEncodeObject=e.isMsgTransferEncodeObject=e.isMsgSubmitProposalEncodeObject=e.isMsgSendEncodeObject=e.isMsgEditValidatorEncodeObject=e.isMsgDepositEncodeObject=e.isMsgDelegateEncodeObject=e.isMsgCreateValidatorEncodeObject=e.isMsgBeginRedelegateEncodeObject=e.isAminoMsgWithdrawValidatorCommission=e.isAminoMsgWithdrawDelegatorReward=e.isAminoMsgVoteWeighted=e.isAminoMsgVote=e.isAminoMsgVerifyInvariant=e.isAminoMsgUnjail=e.isAminoMsgUndelegate=e.isAminoMsgTransfer=e.isAminoMsgSubmitProposal=e.isAminoMsgSubmitEvidence=e.isAminoMsgSetWithdrawAddress=e.isAminoMsgSend=e.isAminoMsgMultiSend=e.isAminoMsgFundCommunityPool=e.isAminoMsgEditValidator=e.isAminoMsgDeposit=e.isAminoMsgDelegate=e.isAminoMsgCreateVestingAccount=e.isAminoMsgCreateValidator=e.isAminoMsgBeginRedelegate=e.createVestingAminoConverters=e.createStakingAminoConverters=e.createSlashingAminoConverters=e.createIbcAminoConverters=e.createGroupAminoConverters=e.createGovAminoConverters=e.createFeegrantAminoConverters=e.createEvidenceAminoConverters=e.createDistributionAminoConverters=e.createCrysisAminoConverters=e.createBankAminoConverters=e.createAuthzAminoConverters=e.logs=e.GasPrice=e.calculateFee=e.fromTendermintEvent=e.AminoTypes=e.accountFromAny=void 0,e.parseCoins=e.makeCosmoshubPath=e.coins=e.coin=e.TimeoutError=e.StargateClient=e.isDeliverTxSuccess=e.isDeliverTxFailure=e.BroadcastTxError=e.assertIsDeliverTxSuccess=e.assertIsDeliverTxFailure=e.SigningStargateClient=e.defaultRegistryTypes=e.createDefaultAminoConverters=e.isSearchTxQueryArray=e.QueryClient=e.decodeCosmosSdkDecFromProto=e.createProtobufRpcClient=e.createPagination=e.makeMultisignedTxBytes=e.makeMultisignedTx=e.setupTxExtension=e.setupStakingExtension=e.setupSlashingExtension=e.setupMintExtension=e.setupIbcExtension=e.setupGovExtension=e.setupFeegrantExtension=e.setupDistributionExtension=e.setupBankExtension=e.setupAuthzExtension=e.setupAuthExtension=void 0;var u=Ji;Object.defineProperty(e,"accountFromAny",{enumerable:!0,get:function(){return u.accountFromAny}});var R=Hi;Object.defineProperty(e,"AminoTypes",{enumerable:!0,get:function(){return R.AminoTypes}});var v=qi;Object.defineProperty(e,"fromTendermintEvent",{enumerable:!0,get:function(){return v.fromTendermintEvent}});var E=qt;Object.defineProperty(e,"calculateFee",{enumerable:!0,get:function(){return E.calculateFee}}),Object.defineProperty(e,"GasPrice",{enumerable:!0,get:function(){return E.GasPrice}}),e.logs=i(je);var C=Ni;Object.defineProperty(e,"createAuthzAminoConverters",{enumerable:!0,get:function(){return C.createAuthzAminoConverters}}),Object.defineProperty(e,"createBankAminoConverters",{enumerable:!0,get:function(){return C.createBankAminoConverters}}),Object.defineProperty(e,"createCrysisAminoConverters",{enumerable:!0,get:function(){return C.createCrysisAminoConverters}}),Object.defineProperty(e,"createDistributionAminoConverters",{enumerable:!0,get:function(){return C.createDistributionAminoConverters}}),Object.defineProperty(e,"createEvidenceAminoConverters",{enumerable:!0,get:function(){return C.createEvidenceAminoConverters}}),Object.defineProperty(e,"createFeegrantAminoConverters",{enumerable:!0,get:function(){return C.createFeegrantAminoConverters}}),Object.defineProperty(e,"createGovAminoConverters",{enumerable:!0,get:function(){return C.createGovAminoConverters}}),Object.defineProperty(e,"createGroupAminoConverters",{enumerable:!0,get:function(){return C.createGroupAminoConverters}}),Object.defineProperty(e,"createIbcAminoConverters",{enumerable:!0,get:function(){return C.createIbcAminoConverters}}),Object.defineProperty(e,"createSlashingAminoConverters",{enumerable:!0,get:function(){return C.createSlashingAminoConverters}}),Object.defineProperty(e,"createStakingAminoConverters",{enumerable:!0,get:function(){return C.createStakingAminoConverters}}),Object.defineProperty(e,"createVestingAminoConverters",{enumerable:!0,get:function(){return C.createVestingAminoConverters}}),Object.defineProperty(e,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return C.isAminoMsgBeginRedelegate}}),Object.defineProperty(e,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return C.isAminoMsgCreateValidator}}),Object.defineProperty(e,"isAminoMsgCreateVestingAccount",{enumerable:!0,get:function(){return C.isAminoMsgCreateVestingAccount}}),Object.defineProperty(e,"isAminoMsgDelegate",{enumerable:!0,get:function(){return C.isAminoMsgDelegate}}),Object.defineProperty(e,"isAminoMsgDeposit",{enumerable:!0,get:function(){return C.isAminoMsgDeposit}}),Object.defineProperty(e,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return C.isAminoMsgEditValidator}}),Object.defineProperty(e,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return C.isAminoMsgFundCommunityPool}}),Object.defineProperty(e,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return C.isAminoMsgMultiSend}}),Object.defineProperty(e,"isAminoMsgSend",{enumerable:!0,get:function(){return C.isAminoMsgSend}}),Object.defineProperty(e,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return C.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(e,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return C.isAminoMsgSubmitEvidence}}),Object.defineProperty(e,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return C.isAminoMsgSubmitProposal}}),Object.defineProperty(e,"isAminoMsgTransfer",{enumerable:!0,get:function(){return C.isAminoMsgTransfer}}),Object.defineProperty(e,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return C.isAminoMsgUndelegate}}),Object.defineProperty(e,"isAminoMsgUnjail",{enumerable:!0,get:function(){return C.isAminoMsgUnjail}}),Object.defineProperty(e,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return C.isAminoMsgVerifyInvariant}}
8),Object.defineProperty(e,"isAminoMsgVote",{enumerable:!0,get:function(){return C.isAminoMsgVote}}),Object.defineProperty(e,"isAminoMsgVoteWeighted",{enumerable:!0,get:function(){return C.isAminoMsgVoteWeighted}}),Object.defineProperty(e,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return C.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(e,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return C.isAminoMsgWithdrawValidatorCommission}}),Object.defineProperty(e,"isMsgBeginRedelegateEncodeObject",{enumerable:!0,get:function(){return C.isMsgBeginRedelegateEncodeObject}}),Object.defineProperty(e,"isMsgCreateValidatorEncodeObject",{enumerable:!0,get:function(){return C.isMsgCreateValidatorEncodeObject}}),Object.defineProperty(e,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return C.isMsgDelegateEncodeObject}}),Object.defineProperty(e,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return C.isMsgDepositEncodeObject}}),Object.defineProperty(e,"isMsgEditValidatorEncodeObject",{enumerable:!0,get:function(){return C.isMsgEditValidatorEncodeObject}}),Object.defineProperty(e,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return C.isMsgSendEncodeObject}}),Object.defineProperty(e,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return C.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(e,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return C.isMsgTransferEncodeObject}}),Object.defineProperty(e,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return C.isMsgUndelegateEncodeObject}}),Object.defineProperty(e,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return C.isMsgVoteEncodeObject}}),Object.defineProperty(e,"isMsgVoteWeightedEncodeObject",{enumerable:!0,get:function(){return C.isMsgVoteWeightedEncodeObject}}),Object.defineProperty(e,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return C.isMsgWithdrawDelegatorRewardEncodeObject}}),Object.defineProperty(e,"setupAuthExtension",{enumerable:!0,get:function(){return C.setupAuthExtension}}),Object.defineProperty(e,"setupAuthzExtension",{enumerable:!0,get:function(){return C.setupAuthzExtension}}),Object.defineProperty(e,"setupBankExtension",{enumerable:!0,get:function(){return C.setupBankExtension}}),Object.defineProperty(e,"setupDistributionExtension",{enumerable:!0,get:function(){return C.setupDistributionExtension}}),Object.defineProperty(e,"setupFeegrantExtension",{enumerable:!0,get:function(){return C.setupFeegrantExtension}}),Object.defineProperty(e,"setupGovExtension",{enumerable:!0,get:function(){return C.setupGovExtension}}),Object.defineProperty(e,"setupIbcExtension",{enumerable:!0,get:function(){return C.setupIbcExtension}}),Object.defineProperty(e,"setupMintExtension",{enumerable:!0,get:function(){return C.setupMintExtension}}),Object.defineProperty(e,"setupSlashingExtension",{enumerable:!0,get:function(){return C.setupSlashingExtension}}),Object.defineProperty(e,"setupStakingExtension",{enumerable:!0,get:function(){return C.setupStakingExtension}}),Object.defineProperty(e,"setupTxExtension",{enumerable:!0,get:function(){return C.setupTxExtension}});var D=At;Object.defineProperty(e,"makeMultisignedTx",{enumerable:!0,get:function(){return D.makeMultisignedTx}}),Object.defineProperty(e,"makeMultisignedTxBytes",{enumerable:!0,get:function(){return D.makeMultisignedTxBytes}});var _=Ke;Object.defineProperty(e,"createPagination",{enumerable:!0,get:function(){return _.createPagination}}),Object.defineProperty(e,"createProtobufRpcClient",{enumerable:!0,get:function(){return _.createProtobufRpcClient}}),Object.defineProperty(e,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return _.decodeCosmosSdkDecFromProto}}),Object.defineProperty(e,"QueryClient",{enumerable:!0,get:function(){return _.QueryClient}});var b=Qi;Object.defineProperty(e,"isSearchTxQueryArray",{enumerable:!0,get:function(){return b.isSearchTxQueryArray}});var f=Kl;Object.defineProperty(e,"createDefaultAminoConverters",{enumerable:!0,get:function(){return f.createDefaultAminoConverters}}),Object.defineProperty(e,"defaultRegistryTypes",{enumerable:!0,get:function(){return f.defaultRegistryTypes}}),Object.defineProperty(e,"SigningStargateClient",{enumerable:!0,get:function(){return f.SigningStargateClient}});var p=qe;Object.defineProperty(e,"assertIsDeliverTxFailure",{enumerable:!0,get:function(){return p.assertIsDeliverTxFailure}}),Object.defineProperty(e,"assertIsDeliverTxSuccess",{enumerable:!0,get:function(){return p.assertIsDeliverTxSuccess}}),Object.defineProperty(e,"BroadcastTxError",{enumerable:!0,get:function(){return p.BroadcastTxError}}),Object.defineProperty(e,"isDeliverTxFailure",{enumerable:!0,get:function(){return p.isDeliverTxFailure}}),Object.defineProperty(e,"isDeliverTxSuccess",{enumerable:!0,get:function(){return p.isDeliverTxSuccess}}),Object.defineProperty(e,"StargateClient",{enumerable:!0,get:function(){return p.StargateClient}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return p.TimeoutError}});var k=Ct;Object.defineProperty(e,"coin",{enumerable:!0,get:function(){return k.coin}}),Object.defineProperty(e,"coins",{enumerable:!0,get:function(){return k.coins}}),Object.defineProperty(e,"makeCosmoshubPath",{enumerable:!0,get:function(){return k.makeCosmoshubPath}}),Object.defineProperty(e,"parseCoins",{enumerable:!0,get:function(){return k.parseCoins}})})(Vc);const e0={class:"bg-base-100 rounded shadow p-4"},n0=$("div",{class:"text-lg text-main font-semibold mb-1"},"Commission Rate",-1),t0={class:"text-sm text-base-content/70"},r0={class:"w-80 m-auto"},i0={class:"flex items-center justify-center flex-wrap gap-x-3"},o0={class:"flex items-center gap-x-2"},a0=$("div",{class:"bg-success w-[6px] h-[6px] rounded-full"},null,-1),s0={class:"text-caption"},d0={class:"flex items-center gap-x-2"},u0=$("div",{class:"bg-success w-[6px] h-[6px] rounded-full opacity-60"},null,-1),c0={class:"text-caption"},l0={class:"flex items-center gap-x-2"},f0=$("div",{class:"bg-secondary w-[6px] h-[6px] rounded-full"},null,-1),p0={class:"text-caption"},m0=2,y0=Hc({__name:"ValidatorCommissionRate",props:{commission:{type:Object}},setup(e){const n=e;let t=an(()=>{var k;return Number(((k=n.commission)==null?void 0:k.commission_rates.rate)||0)*100}),i=an(()=>{var k;return Number(((k=n.commission)==null?void 0:k.commission_rates.max_change_rate)||0)*100}),u=an(()=>{var k;return Number(((k=n.commission)==null?void 0:k.commission_rates.max_rate)||1)*100});const R=t,v=an(()=>u.value-t.value),E=an(()=>R.value>i.value?R.value-i.value:0),C=an(()=>R.value>i.value?i.value:R.value),D=an(()=>v.value>i.value?i.value:v.value),_=an(()=>v.value>i.value?v.value-i.value:0),b=an(()=>[E.value,C.value,m0,D.value,_.value]),f=qc(),p=an(()=>{const k="hsl(var(--bc))";return{chart:{width:"200px",sparkline:{enabled:!1}},colors:["rgba(109,120,141,0.2)","rgba(114,225,40,0.2)","rgba(114,225,40,1)","rgba(114,225,40,0.2)","rgba(109,120,141,0.2)"],legend:{show:!1},tooltip:{enabled:!1},dataLabels:{enabled:!1},stroke:{width:3,lineCap:"round",colors:["hsl(var(--b1))"]},labels:["Available","Daily Change","Commission Rate","Daily Change","Available"],states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},plotOptions:{pie:{endAngle:130,startAngle:-130,customScale:.9,donut:{size:"83%",labels:{show:!0,name:{offsetY:25,fontSize:"1rem",color:k},value:{offsetY:-15,fontWeight:500,fontSize:"2.125rem",formatter:s=>`${t.value.toFixed(1)}%`,color:"hsl(var(--bc))"},total:{show:!0,label:"Commission Rate",fontSize:"1rem",color:k,formatter:()=>`${t.value.toFixed(1)}%`}}}}},responsive:[{breakpoint:1709,options:{chart:{height:237}}}]}});return(k,o)=>{var s;return Te(),De("div",e0,[n0,$("div",t0,ne(`Updated at ${ie(f).toDay((s=n.commission)==null?void 0:s.update_time,"short")}`),1),$("div",r0,[Oe(ie(Jp),{type:"donut",options:p.value,series:b.value},null,8,["options","series"])]),$("div",null,[$("div",i0,[$("div",o0,[a0,$("span",s0,"Rate:"+ne(ie(t).toFixed(0))+"%",1)]),$("div",d0,[u0,$("span",c0,"24h: ±"+ne(ie(i))+"%",1)]),$("div",l0,[f0,$("span",p0,"Max:"+ne(ie(u))+"%",1)])])])])}}}),h0={class:"bg-base-100 px-4 pt-3 pb-4 rounded shadow border-indigo-500"},g0={class:"flex flex-col lg:!flex-row pt-2 pb-1"},S0={class:"flex-1"},k0={class:"flex"},P0={class:"avatar mr-4 relative w-24 rounded-lg overflow-hidden"},R0=$("div",{class:"w-24 rounded-lg absolute opacity-10"},null,-1),B0={class:"w-24 rounded-lg"},v0={class:"mx-2"},O0={class:"text-sm mb-4"},b0={class:"m-4 text-sm"},A0={class:"text-sm mb-3 font-medium"},I0={class:"card-list"},T0={class:"flex items-center mb-2"},N0={class:"font-bold mr-2"},C0=["href"],w0={class:"flex items-center"},_0={class:"font-bold mr-2"},E0=["href"],J0={class:"text-sm mt-4 mb-3 font-medium"},U0={class:"card-list"},D0={class:"flex items-center mb-2"},M0={class:"font-bold mr-2"},H0={class:"flex items-center"},q0={class:"font-bold mr-2"},V0={class:"text-sm mt-4 mb-3 font-medium"},Q0={class:"card-list"},W0={class:"flex items-center mb-2"},F0={class:"font-bold mr-2"},G0={class:"flex items-center"},L0={class:"font-bold mr-2"},$0={class:"flex-1"},K0={class:"flex flex-col mt-10"},z0={class:"flex mb-2"},Z0={class:"flex items-center justify-center rounded w-10 h-10",
8style:{border:"1px solid #666"}},Y0={class:"ml-3 flex flex-col justify-center"},X0={class:"text-sm"},x0={class:"flex mb-2"},j0={class:"flex items-center justify-center rounded w-10 h-10",style:{border:"1px solid #666"}},eO={class:"ml-3 flex flex-col justify-center"},nO={class:"text-sm"},tO={class:"flex mb-2"},rO={class:"flex items-center justify-center rounded w-10 h-10",style:{border:"1px solid #666"}},iO={class:"ml-3 flex flex-col"},oO={class:"text-sm"},aO={class:"flex mb-2"},sO={class:"flex items-center justify-center rounded w-10 h-10",style:{border:"1px solid #666"}},dO={class:"ml-3 flex flex-col justify-center"},uO={class:"text-sm"},cO={class:"flex mb-2"},lO={class:"flex items-center justify-center rounded w-10 h-10",style:{border:"1px solid #666"}},fO={class:"ml-3 flex flex-col justify-center"},pO={class:"text-sm"},mO={class:"flex mb-2"},yO={class:"flex items-center justify-center rounded w-10 h-10",style:{border:"1px solid #666"}},hO={class:"ml-3 flex flex-col justify-center"},gO={key:0},SO={key:1},kO={class:"text-sm"},PO={class:"text-sm px-4 pt-3 border-t"},RO={class:"mt-3 grid grid-cols-1 md:!grid-cols-3 gap-4"},BO={class:"bg-base-100 rounded shadow relative overflow-auto"},vO={class:"text-lg font-semibold text-main px-4 pt-4"},OO={class:"px-4 mt-1 flex flex-col justify-between pb-4 max-h-72",style:{height:"calc(100% - 50px)"}},bO={class:"overflow-auto flex-1"},AO={class:"text-sm mb-2"},IO={class:"text-sm mb-2 mt-2"},TO={class:""},NO={class:"bg-base-100 rounded shadow overflow-x-auto"},CO={class:"px-4 pt-4 mb-2 text-main font-lg font-semibold"},wO={class:"px-4 pb-4"},_O={class:"mb-3"},EO={class:"text-sm flex"},JO={class:"mb-3"},UO={class:"text-sm flex"},DO={class:"text-xs"},MO={class:"mb-3"},HO={class:"text-sm flex"},qO={class:"text-xs"},VO={class:"mb-3"},QO={class:"text-sm flex"},WO={class:"text-xs"},FO={class:"text-sm flex"},GO={class:"text-xs"},LO={key:0,class:"mt-5 bg-base-100 shadow rounded p-4"},$O={class:"text-lg mb-4 font-semibold"},KO={class:"float-right"},zO={class:"rounded overflow-auto"},ZO={class:"table validatore-table w-full"},YO={class:"text-left pl-4",style:{position:"relative","z-index":"2"}},XO={class:"text-left pl-4"},xO={class:"text-sm text-primary"},jO={class:"truncate text-primary"},eb={class:"mt-5 bg-base-100 shadow rounded p-4"},nb={class:"text-lg mb-4 font-semibold"},tb={class:"rounded overflow-auto"},rb={class:"table validatore-table w-full"},ib={class:"text-left pl-4",style:{position:"relative","z-index":"2"}},ob={class:"text-left pl-4"},ab={class:"text-left pl-4",width:"40%"},sb={class:"text-left pl-4"},db={class:"text-sm text-primary"},ub={class:"truncate text-primary",style:{"max-width":"200px"}},cb={class:"flex items-center"},lb={class:"mr-2"},fb={width:"150"},pb={class:"mt-5 bg-base-100 shadow rounded p-4"},mb={class:"text-lg mb-4 font-semibold"},yb={class:"tabs tabs-boxed bg-transparent"},hb=$("span",{class:"mr-10"},"Voting Power Events: ",-1),gb={class:"rounded overflow-auto"},Sb={class:"table validatore-table w-full"},kb={class:"text-left pl-4"},Pb={class:"text-left pl-4"},Rb={class:"text-left pl-4"},Bb={class:"pr-2 truncate text-primary",style:{"max-width":"250px"}},vb={class:"mr-2"},Ob={width:"150"},bb=$("br",null,null,-1),Ab={class:"text-xs pt-0 mt-0"},Ib={class:"toast"},Tb={class:"alert alert-success"},Nb={class:"text-xs md:!text-sm"},Cb={class:"toast"},wb={class:"alert alert-error"},_b={class:"text-xs md:!text-sm"},Vb=Hc({__name:"[validator]",props:["validator","chain"],setup(e){const n=e,t=Sp(),i=kp(),u=qc(),R=Pp(),v=new Ip,E=n.validator,C=pn({}),D=JSON.parse(localStorage.getItem("avatars")||"{}"),_=pn(D||{}),b=pn(""),f=pn([]),p=pn([]),k=pn({}),o=pn({}),s=pn({});o.value.account=Rp(E),t.fetchValidatorDelegation(E,o.value.account).then(H=>{H&&(s.value=H.delegation_response)});const y=pn({});i.rpc.getTxsBySender(o.value.account).then(H=>{y.value=H});const w=an(()=>{var S;const H=Number(((S=C.value.commission)==null?void 0:S.commission_rates.rate)||0),a=Np().inflation,g=Number(Cp().params.community_tax),h=Number(t.pool.bonded_tokens)/Number(wp().supply.amount);return u.percent((1-g)*(1-H)*Number(a)/h)}),J=an(()=>{var H;return(H=s.value.balance)!=null&&H.amount?u.calculatePercent(s.value.balance.amount,C.value.tokens):"-"}),P=H=>
8{if(!H)return"";const a=_.value[H]||"";return a.startsWith("http")?a:`https://s3.amazonaws.com/keybase_processed_uploads/${a}`},U=H=>new Promise(a=>{t.keybase(H).then(g=>{var h,S,A;if(Array.isArray(g.them)&&g.them.length>0){const Q=String((A=(S=(h=g.them[0])==null?void 0:h.pictures)==null?void 0:S.primary)==null?void 0:A.url).replace("https://s3.amazonaws.com/keybase_processed_uploads/","");_.value[H]=Q,a()}else throw new Error(`failed to fetch avatar for ${H}.`)}).catch(g=>{a()})}),r=H=>{U(H).then(()=>{localStorage.setItem("avatars",JSON.stringify(_.value))})};Bp(()=>{E&&(t.fetchValidator(E).then(H=>{var a,g,h;C.value=H.validator,b.value=((g=(a=H.validator)==null?void 0:a.description)==null?void 0:g.identity)||"",b.value&&!_.value[b.value]&&r(b.value),o.value.hex=vp(C.value.consensus_pubkey),o.value.valCons=Op(C.value.consensus_pubkey,((h=i.current)==null?void 0:h.bech32ConsensusPrefix)||"")}),i.rpc.getDistributionValidatorOutstandingRewards(E).then(H=>{var a,g,h,S;f.value=(g=(a=H.rewards)==null?void 0:a.rewards)==null?void 0:g.sort((A,Q)=>Number(Q.amount)-Number(A.amount)),(S=(h=H.rewards)==null?void 0:h.rewards)==null||S.forEach(A=>{A.denom.startsWith("ibc/")&&u.fetchDenomTrace(A.denom)})}),i.rpc.getDistributionValidatorCommission(E).then(H=>{var a,g,h,S;p.value=(g=(a=H.commission)==null?void 0:a.commission)==null?void 0:g.sort((A,Q)=>Number(Q.amount)-Number(A.amount)),(S=(h=H.commission)==null?void 0:h.commission)==null||S.forEach(A=>{A.denom.startsWith("ibc/")&&u.fetchDenomTrace(A.denom)})}))});let m=pn(0);const N=async H=>{if(H)try{await navigator.clipboard.writeText(H),m.value=1,setTimeout(()=>{m.value=0},1e3)}catch{m.value=2,setTimeout(()=>{m.value=0},1e3)}},V=an(()=>m.value===2?{class:"error",msg:"Copy Error!"}:{class:"success",msg:"Copy Success!"});function d(H){v.setPage(H),v.limit=10,i.rpc.getStakingValidatorsDelegations(E,v).then(a=>{k.value=a})}const l=pn({}),T=pn("delegate");function O(H,a){T.value=a,v.setPage(H),v.setPageSize(5),i.rpc.getTxs("?order_by=2&events={type}.validator='{validator}'",{type:T.value,validator:E},v).then(g=>{l.value=g})}function B(H){O(H,T.value)}B(1);function M(H){const g=H.filter(S=>S.type===T.value).filter(S=>S.attributes.findIndex(A=>A.value===E||A.value===Pe.toBase64(Tp(E)))>-1).map(S=>{const A={};return S.attributes.findIndex(Q=>Q.key==="amount")>-1?S.attributes.forEach(Q=>{A[Q.key]=Q.value}):S.attributes.forEach(Q=>{A[qu(Pe.fromBase64(Q.key))]=qu(Pe.fromBase64(Q.value))}),A}).map(S=>S.amount).join(",");return Vc.parseCoins(g).map(S=>u.formatToken(S)).join(", ")}function W(H){return H?Array.from(new Set(H.map(a=>a.delegator_address||a.grantee))):[]}return(H,a)=>{var S,A,Q,L,G,j,$t,Kt,zt,Zt,Yt,Xt,xt,jt;const g=bp("RouterLink"),h=Ap("lazy");return Te(),De("div",null,[$("div",h0,[$("div",g0,[$("div",S0,[$("div",k0,[$("div",P0,[R0,$("div",B0,[b.value&&_.value[b.value]!=="undefined"?dt((Te(),De("img",{key:0,class:"object-contain",onError:a[0]||(a[0]=me=>{r(b.value)})},null,544)),[[h,P(b.value)]]):(Te(),rr(ie(Ne),{key:1,class:"text-8xl",icon:"mdi-help-circle-outline"}))])]),$("div",v0,[$("h4",null,ne((S=C.value.description)==null?void 0:S.moniker),1),$("div",O0,ne(((A=C.value.description)==null?void 0:A.identity)||"-"),1),$("label",{for:"delegate",class:"btn btn-primary btn-sm w-full",onClick:a[1]||(a[1]=me=>ie(R).open("delegate",{validator_address:C.value.operator_address}))},ne(H.$t("account.btn_delegate")),1)])]),$("div",b0,[$("p",A0,ne(H.$t("staking.about_us")),1),$("div",I0,[$("div",T0,[Oe(ie(Ne),{icon:"mdi-web",class:"text-xl mr-1"}),$("span",N0,ne(H.$t("staking.website"))+": ",1),$("a",{href:((L=(Q=C.value)==null?void 0:Q.description)==null?void 0:L.website)||"#",class:Zi((j=(G=C.value)==null?void 0:G.description)!=null&&j.website?"cursor-pointer":"cursor-default")},ne((($t=C.value.description)==null?void 0:$t.website)||"-"),11,C0)]),$("div",w0,[Oe(ie(Ne),{icon:"mdi-email-outline",class:"text-xl mr-1"}),$("span",_0,ne(H.$t("staking.contact"))+": ",1),(Kt=C.value.description)!=null&&Kt.security_contact?(Te(),De("a",{key:0,href:"mailto:"+C.value.description.security_contact||"#",class:"cursor-pointer"},ne(((zt=C.value.description)==null?void 0:zt.security_contact)||"
8-"),9,E0)):Hu("",!0)])]),$("p",J0,ne(H.$t("staking.validator_status")),1),$("div",U0,[$("div",D0,[Oe(ie(Ne),{icon:"mdi-shield-account-outline",class:"text-xl mr-1"}),$("span",M0,ne(H.$t("staking.status"))+": ",1),$("span",null,ne(String(C.value.status).replace("BOND_STATUS_","")),1)]),$("div",H0,[Oe(ie(Ne),{icon:"mdi-shield-alert-outline",class:"text-xl mr-1"}),$("span",q0,ne(H.$t("staking.jailed"))+": ",1),$("span",null,ne(C.value.jailed||"-"),1)])]),$("p",V0,ne(H.$t("staking.liquid_staking")),1),$("div",Q0,[$("div",W0,[Oe(ie(Ne),{icon:"mdi-lock",class:"text-xl mr-1"}),$("span",F0,ne(H.$t("staking.validator_bond_share"))+": ",1),$("span",null,ne(ie(u).formatToken({amount:C.value.validator_bond_shares,denom:ie(t).params.bond_denom},!1)),1)]),$("div",G0,[Oe(ie(Ne),{icon:"mdi-waves-arrow-right",class:"text-xl mr-1"}),$("span",L0,ne(H.$t("staking.liquid_staking_shares"))+": ",1),$("span",null,ne(ie(u).formatToken({amount:C.value.liquid_shares,denom:ie(t).params.bond_denom},!1)),1)])])])]),$("div",$0,[$("div",K0,[$("div",z0,[$("div",Z0,[Oe(ie(Ne),{icon:"mdi-coin",class:"text-3xl"})]),$("div",Y0,[$("h4",null,ne(ie(u).formatToken2({amount:C.value.tokens,denom:ie(t).params.bond_denom})),1),$("span",X0,ne(H.$t("staking.total_bonded")),1)])]),$("div",x0,[$("div",j0,[Oe(ie(Ne),{icon:"mdi-percent",class:"text-3xl"})]),$("div",eO,[$("h4",null,ne(ie(u).formatToken(s.value.balance))+" ("+ne(J.value)+")",1),$("span",nO,ne(H.$t("staking.self_bonded")),1)])]),$("div",tO,[$("div",rO,[Oe(ie(Ne),{icon:"mdi-account-tie",class:"text-3xl"})]),$("div",iO,[$("h4",null,ne(C.value.min_self_delegation)+" "+ne(ie(t).params.bond_denom),1),$("span",oO,ne(H.$t("staking.min_self")),1)])]),$("div",aO,[$("div",sO,[Oe(ie(Ne),{icon:"mdi-finance",class:"text-3xl"})]),$("div",dO,[$("h4",null,ne(w.value),1),$("span",uO,ne(H.$t("staking.annual_profit")),1)])]),$("div",cO,[$("div",lO,[Oe(ie(Ne),{icon:"mdi:arrow-down-bold-circle-outline",class:"text-3xl"})]),$("div",fO,[$("h4",null,ne(C.value.unbonding_height),1),$("span",pO,ne(H.$t("staking.unbonding_height")),1)])]),$("div",mO,[$("div",yO,[Oe(ie(Ne),{icon:"mdi-clock",class:"text-3xl"})]),$("div",hO,[C.value.unbonding_time&&!C.value.unbonding_time.startsWith("1970")?(Te(),De("h4",gO,ne(ie(u).toDay(C.value.unbonding_time,"from")),1)):(Te(),De("h4",SO,"-")),$("span",kO,ne(H.$t("staking.unbonding_time")),1)])])])])]),$("div",PO,ne((Zt=C.value.description)==null?void 0:Zt.details),1)]),$("div",RO,[$("div",null,[Oe(y0,{commission:C.value.commission},null,8,["commission"])]),$("div",BO,[$("div",vO,ne(H.$t("staking.commissions_&_rewards")),1),$("div",OO,[$("div",bO,[$("div",AO,ne(H.$t("staking.commissions")),1),(Te(!0),De(ir,null,or(p.value,(me,wn)=>(Te(),De("div",{key:`reward-${wn}`,color:"info",label:"",variant:"outlined",class:"mr-1 mb-1 badge text-xs"},ne(ie(u).formatToken2(me)),1))),128)),$("div",IO,ne(H.$t("staking.outstanding"))+" "+ne(H.$t("account.rewards")),1),(Te(!0),De(ir,null,or(f.value,(me,wn)=>(Te(),De("div",{key:`reward-${wn}`,class:"mr-1 mb-1 badge text-xs"},ne(ie(u).formatToken2(me)),1))),128))]),$("div",TO,[$("label",{for:"withdraw_commission",class:"btn btn-primary w-full",onClick:a[2]||(a[2]=me=>ie(R).open("withdraw_commission",{validator_address:C.value.operator_address}))},ne(H.$t("account.btn_withdraw")),1)])])]),$("div",NO,[$("div",CO,ne(H.$t("staking.addresses")),1),$("div",wO,[$("div",_O,[$("div",EO,[_n(ne(H.$t("staking.account_addr"))+" ",1),dt(Oe(ie(Ne),{icon:"mdi:content-copy",class:"ml-2 cursor-pointer",onClick:a[3]||(a[3]=me=>N(o.value.account||""))},null,512),[[wt,o.value.account]])]),Oe(g,{class:"text-xs text-primary",to:`/${e.chain}/account/${o.value.account}`},{default:ar(()=>[_n(ne(o.value.account),1)]),_:1},8,["to"])]),$("div",JO,[$("div",UO,[_n(ne(H.$t("staking.operator_addr"))+" ",1),dt(Oe(ie(Ne),{icon:"mdi:content-copy",class:"ml-2 cursor-pointer",onClick:a[4]||(a[4]=me=>N(C.value.operator_address||""))},null,512),[[wt,C.value.operator_address]])]),$("div",DO,ne(C.value.operator_address),1)]),$("div",MO,[$("div",HO,[_n(ne(H.$t("staking.hex_addr"))+" ",1),dt(Oe(ie(Ne),{icon:"mdi:content-copy",class:"ml-2 cursor-pointer",onClick:a[5]||(a[5]=me=>N(o.value.hex||""))},null,512),[[wt,o.value.hex]])]),$("div",qO,ne(o.value.hex),1)]),$("div",VO,[$("div",QO,[_n(ne(H.$t("staking.signer_addr"))+" ",1),dt(Oe(ie(Ne),{icon:"mdi:content-copy",class:"ml-2 cursor-pointer",onClick:a[6]||(a[6]=me=>N(o.value.valCons||""))},null,512),[[wt,o.value.valCons]])]),$("div",WO,ne(o.value.valCons),1)]),$("div",null,[$("div",FO,[_n(ne(H.$t("staking.consensus_pub_key"))+" ",1),dt(Oe(ie(Ne),{icon:"mdi:content-copy",class:"ml-2 cursor-pointer",onClick:a[7]||(a[7]=me=>N(JSON.stringify(C.value.consensus_pubkey)||""))},null,512),[[wt,C.value.consensus_pubkey]])]),$("div",GO,ne(C.value.consensus_pubkey),1)])])])]),k.value.delegation_responses?(Te(),De("div",LO,[$("div",$O,[_n(ne(H.$t("account.delegations"))+" ",1),$("span",KO,ne(((Yt=k.value.delegation_responses)==null?void 0:Yt.length)||0)+" / "+ne(((Xt=k.value.pagination)==null?void 0:Xt.total)||0),1)]),$("div",zO,[$("table",ZO,[$("thead",null,[$("th",YO,ne(H.$t("account.delegator")),1),$("th",XO,ne(H.$t("account.delegation")),1)]),$("tbody",null,[(Te(!0),De(ir,null,or(k.value.delegation_responses,({balance:me,delegation:wn})=>(Te(),De("tr",null,[$("td",xO,ne(wn.delegator_address),1),$("td",jO,ne(ie(u).formatToken(me)),1)]))),256))])]),Oe(Vu,{total:(xt=k.value.pagination)==null?void 0:xt.total,limit:ie(v).limit,callback:d},null,8,["total","limit"])])])):Hu("",!0),$("div",eb,[$("div",nb,ne(H.$t("account.transactions")),1),$("div",tb,[$("table",rb,[$("thead",null,[$("th",ib,ne(H.$t("account.height")),1),$("th",ob,ne(H.$t("account.hash")),1),$("th",ab,ne(H.$t("account.messages")),1),$("th",sb,ne(H.$t("account.time")),1)]),$("tbody",null,[(Te(!0),De(ir,null,or(y.value.tx_responses,(me,wn)=>(Te(),De("tr",null,[$("td",db,[Oe(g,{to:`/${n.chain}/block/${me.height}`},{default:ar(()=>[_n(ne(me.height),1)]),_:2},1032,["to"])]),$("td",ub,[Oe(g,{to:`/${n.chain}/tx/${me.txhash}`},{default:ar(()=>[_n(ne(me.txhash),1)]),_:2},1032,["to"])]),$("td",null,[$("div",cb,[$("span",lb,ne(ie(u).messages(me.tx.body.messages)),1),me.code===0?(Te(),rr(ie(Ne),{key:0,icon:"mdi-check",class:"text-yes"})):(Te(),rr(ie(Ne),{key:1,icon:"mdi-multiply",class:"text-no"}))])]),$("td",fb,ne(ie(u).toDay(me.timestamp,"from")),1)]))),256))])])])]),$("div",pb,[$("div",mb,[$("div",yb,[hb,$("a",{class:Zi(["tab text-base-content/60",{"tab-active":T.value==="delegate"}]),onClick:a[8]||(a[8]=me=>O(1,"delegate"))},ne(H.$t("account.btn_delegate")),3),$("a",{class:Zi(["tab text-base-content/60",{"tab-active":T.value==="unbond"}]),onClick:a[9]||(a[9]=me=>O(1,"unbond"))}
8,ne(H.$t("account.btn_unbond")),3)])]),$("div",gb,[$("table",Sb,[$("thead",null,[$("th",kb,ne(H.$t("account.delegator")),1),$("th",Pb,ne(H.$t("account.amount")),1),$("th",Rb,ne(H.$t("account.height"))+" / "+ne(H.$t("account.time")),1)]),$("tbody",null,[(Te(!0),De(ir,null,or(l.value.tx_responses,(me,wn)=>{var er,nr;return Te(),De("tr",null,[$("td",Bb,[(Te(!0),De(ir,null,or(W((nr=(er=me.tx)==null?void 0:er.body)==null?void 0:nr.messages),tr=>(Te(),rr(g,{to:`/${n.chain}/account/${tr}`},{default:ar(()=>[_n(ne(tr),1)]),_:2},1032,["to"]))),256))]),$("td",null,[$("div",{class:Zi(["flex items-center",{"text-yes":T.value==="delegate","text-no":T.value==="unbond"}])},[Oe(g,{to:`/${n.chain}/tx/${me.txhash}`},{default:ar(()=>[$("span",vb,ne(T.value==="delegate"?"+":"-")+" "+ne(M(me.events)),1)]),_:2},1032,["to"]),me.code===0?(Te(),rr(ie(Ne),{key:0,icon:"mdi-check",class:"text-yes"})):(Te(),rr(ie(Ne),{key:1,icon:"mdi-multiply",class:"text-no"}))],2)]),$("td",Ob,[Oe(g,{class:"text-primary mb-0",to:`/${n.chain}/block/${me.height}`},{default:ar(()=>[_n(ne(me.height),1)]),_:2},1032,["to"]),bb,$("span",Ab,ne(ie(u).toDay(me.timestamp,"from")),1)])])}),256))])]),Oe(Vu,{total:(jt=l.value.pagination)==null?void 0:jt.total,limit:ie(v).limit,callback:B},null,8,["total","limit"])])]),dt($("div",Ib,[$("div",Tb,[$("div",Nb,[$("span",null,ne(V.value.msg),1)])])],512),[[wt,ie(m)===1]]),dt($("div",Cb,[$("div",wb,[$("div",_b,[$("span",null,ne(V.value.msg),1)])])],512),[[wt,ie(m)===2]])])}}});export{Vb as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.