@sentio/runtime 2.60.1-rc.1 → 2.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chunk-K3OKCXRW.js +117 -0
- package/lib/{chunk-OJKZJGLN.js.map → chunk-K3OKCXRW.js.map} +1 -1
- package/lib/chunk-NWI5IEZU.js +38 -0
- package/lib/{chunk-26X74ASV.js.map → chunk-NWI5IEZU.js.map} +1 -1
- package/lib/chunk-WHWNPZZ3.js +3 -0
- package/lib/{chunk-6XHWJ2VS.js.map → chunk-WHWNPZZ3.js.map} +1 -1
- package/lib/chunk-YYEA4PFJ.js +26 -0
- package/lib/{chunk-ZTW66EYL.js.map → chunk-YYEA4PFJ.js.map} +1 -1
- package/lib/index.js +1 -74
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.js +21 -26835
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.js +2 -130
- package/lib/service-worker.js.map +1 -1
- package/lib/test-processor.test.js.map +1 -1
- package/package.json +1 -1
- package/lib/chunk-26X74ASV.js +0 -10975
- package/lib/chunk-6XHWJ2VS.js +0 -92
- package/lib/chunk-OJKZJGLN.js +0 -59981
- package/lib/chunk-ZTW66EYL.js +0 -28354
@@ -0,0 +1,26 @@
|
|
1
|
+
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
2
|
+
var wc=Object.create;var Yi=Object.defineProperty;var Mc=Object.getOwnPropertyDescriptor;var Wc=Object.getOwnPropertyNames;var qc=Object.getPrototypeOf,Gc=Object.prototype.hasOwnProperty;var tg=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var rg=(e,n)=>()=>(e&&(n=e(e=0)),n);var Y=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),ig=(e,n)=>{for(var t in n)Yi(e,t,{get:n[t],enumerable:!0})},Wa=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Wc(n))!Gc.call(e,i)&&i!==t&&Yi(e,i,{get:()=>n[i],enumerable:!(a=Mc(n,i))||a.enumerable});return e};var Sn=(e,n,t)=>(t=e!=null?wc(qc(e)):{},Wa(n||!e||!e.__esModule?Yi(t,"default",{value:e,enumerable:!0}):t,e)),ag=e=>Wa(Yi({},"__esModule",{value:!0}),e);var eo=Y((dg,ja)=>{"use strict";ja.exports=Qc;function Qc(e,n){for(var t=new Array(arguments.length-1),a=0,i=2,r=!0;i<arguments.length;)t[a++]=arguments[i++];return new Promise(function(h,c){t[a]=function(y){if(r)if(r=!1,y)c(y);else{for(var q=new Array(arguments.length-1),V=0;V<q.length;)q[V++]=arguments[V];h.apply(null,q)}};try{e.apply(n||null,t)}catch(g){r&&(r=!1,c(g))}})}});var io=Y(ro=>{"use strict";var ji=ro;ji.length=function(n){var t=n.length;if(!t)return 0;for(var a=0;--t%4>1&&n.charAt(t)==="=";)++a;return Math.ceil(n.length*3)/4-a};var Yn=new Array(64),to=new Array(123);for(Je=0;Je<64;)to[Yn[Je]=Je<26?Je+65:Je<52?Je+71:Je<62?Je-4:Je-59|43]=Je++;var Je;ji.encode=function(n,t,a){for(var i=null,r=[],s=0,h=0,c;t<a;){var g=n[t++];switch(h){case 0:r[s++]=Yn[g>>2],c=(g&3)<<4,h=1;break;case 1:r[s++]=Yn[c|g>>4],c=(g&15)<<2,h=2;break;case 2:r[s++]=Yn[c|g>>6],r[s++]=Yn[g&63],h=0;break}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,r)),s=0)}return h&&(r[s++]=Yn[c],r[s++]=61,h===1&&(r[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,r.slice(0,s))),i.join("")):String.fromCharCode.apply(String,r.slice(0,s))};var no="invalid encoding";ji.decode=function(n,t,a){for(var i=a,r=0,s,h=0;h<n.length;){var c=n.charCodeAt(h++);if(c===61&&r>1)break;if((c=to[c])===void 0)throw Error(no);switch(r){case 0:s=c,r=1;break;case 1:t[a++]=s<<2|(c&48)>>4,s=c,r=2;break;case 2:t[a++]=(s&15)<<4|(c&60)>>2,s=c,r=3;break;case 3:t[a++]=(s&3)<<6|c,r=0;break}}if(r===1)throw Error(no);return a-i};ji.test=function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)}});var oo=Y((sg,ao)=>{"use strict";ao.exports=ea;function ea(){this._listeners={}}ea.prototype.on=function(n,t,a){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:t,ctx:a||this}),this};ea.prototype.off=function(n,t){if(n===void 0)this._listeners={};else if(t===void 0)this._listeners[n]=[];else for(var a=this._listeners[n],i=0;i<a.length;)a[i].fn===t?a.splice(i,1):++i;return this};ea.prototype.emit=function(n){var t=this._listeners[n];if(t){for(var a=[],i=1;i<arguments.length;)a.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,a)}return this}});var go=Y((fg,po)=>{"use strict";po.exports=uo(uo);function uo(e){return typeof Float32Array<"u"?function(){var n=new Float32Array([-0]),t=new Uint8Array(n.buffer),a=t[3]===128;function i(c,g,y){n[0]=c,g[y]=t[0],g[y+1]=t[1],g[y+2]=t[2],g[y+3]=t[3]}function r(c,g,y){n[0]=c,g[y]=t[3],g[y+1]=t[2],g[y+2]=t[1],g[y+3]=t[0]}e.writeFloatLE=a?i:r,e.writeFloatBE=a?r:i;function s(c,g){return t[0]=c[g],t[1]=c[g+1],t[2]=c[g+2],t[3]=c[g+3],n[0]}function h(c,g){return t[3]=c[g],t[2]=c[g+1],t[1]=c[g+2],t[0]=c[g+3],n[0]}e.readFloatLE=a?s:h,e.readFloatBE=a?h:s}():function(){function n(a,i,r,s){var h=i<0?1:0;if(h&&(i=-i),i===0)a(1/i>0?0:2147483648,r,s);else if(isNaN(i))a(2143289344,r,s);else if(i>34028234663852886e22)a((h<<31|2139095040)>>>0,r,s);else if(i<11754943508222875e-54)a((h<<31|Math.round(i/1401298464324817e-60))>>>0,r,s);else{var c=Math.floor(Math.log(i)/Math.LN2),g=Math.round(i*Math.pow(2,-c)*8388608)&8388607;a((h<<31|c+127<<23|g)>>>0,r,s)}}e.writeFloatLE=n.bind(null,lo),e.writeFloatBE=n.bind(null,so);function t(a,i,r){var s=a(i,r),h=(s>>31)*2+1,c=s>>>23&255,g=s&8388607;return c===255?g?NaN:h*(1/0):c===0?h*1401298464324817e-60*g:h*Math.pow(2,c-150)*(g+8388608)}e.readFloatLE=t.bind(null,fo),e.readFloatBE=t.bind(null,co)}(),typeof Float64Array<"u"?function(){var n=new Float64Array([-0]),t=new Uint8Array(n.buffer),a=t[7]===128;function i(c,g,y){n[0]=c,g[y]=t[0],g[y+1]=t[1],g[y+2]=t[2],g[y+3]=t[3],g[y+4]=t[4],g[y+5]=t[5],g[y+6]=t[6],g[y+7]=t[7]}function r(c,g,y){n[0]=c,g[y]=t[7],g[y+1]=t[6],g[y+2]=t[5],g[y+3]=t[4],g[y+4]=t[3],g[y+5]=t[2],g[y+6]=t[1],g[y+7]=t[0]}e.writeDoubleLE=a?i:r,e.writeDoubleBE=a?r:i;function s(c,g){return t[0]=c[g],t[1]=c[g+1],t[2]=c[g+2],t[3]=c[g+3],t[4]=c[g+4],t[5]=c[g+5],t[6]=c[g+6],t[7]=c[g+7],n[0]}function h(c,g){return t[7]=c[g],t[6]=c[g+1],t[5]=c[g+2],t[4]=c[g+3],t[3]=c[g+4],t[2]=c[g+5],t[1]=c[g+6],t[0]=c[g+7],n[0]}e.readDoubleLE=a?s:h,e.readDoubleBE=a?h:s}():function(){function n(a,i,r,s,h,c){var g=s<0?1:0;if(g&&(s=-s),s===0)a(0,h,c+i),a(1/s>0?0:2147483648,h,c+r);else if(isNaN(s))a(0,h,c+i),a(2146959360,h,c+r);else if(s>17976931348623157e292)a(0,h,c+i),a((g<<31|2146435072)>>>0,h,c+r);else{var y;if(s<22250738585072014e-324)y=s/5e-324,a(y>>>0,h,c+i),a((g<<31|y/4294967296)>>>0,h,c+r);else{var q=Math.floor(Math.log(s)/Math.LN2);q===1024&&(q=1023),y=s*Math.pow(2,-q),a(y*4503599627370496>>>0,h,c+i),a((g<<31|q+1023<<20|y*1048576&1048575)>>>0,h,c+r)}}}e.writeDoubleLE=n.bind(null,lo,0,4),e.writeDoubleBE=n.bind(null,so,4,0);function t(a,i,r,s,h){var c=a(s,h+i),g=a(s,h+r),y=(g>>31)*2+1,q=g>>>20&2047,V=4294967296*(g&1048575)+c;return q===2047?V?NaN:y*(1/0):q===0?y*5e-324*V:y*Math.pow(2,q-1075)*(V+4503599627370496)}e.readDoubleLE=t.bind(null,fo,0,4),e.readDoubleBE=t.bind(null,co,4,0)}(),e}function lo(e,n,t){n[t]=e&255,n[t+1]=e>>>8&255,n[t+2]=e>>>16&255,n[t+3]=e>>>24}function so(e,n,t){n[t]=e>>>24,n[t+1]=e>>>16&255,n[t+2]=e>>>8&255,n[t+3]=e&255}function fo(e,n){return(e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24)>>>0}function co(e,n){return(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3])>>>0}});var mo=Y((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}});var yo=Y(ho=>{"use strict";var ua=ho;ua.length=function(n){for(var t=0,a=0,i=0;i<n.length;++i)a=n.charCodeAt(i),a<128?t+=1:a<2048?t+=2:(a&64512)===55296&&(n.charCodeAt(i+1)&64512)===56320?(++i,t+=4):t+=3;return t};ua.read=function(n,t,a){var i=a-t;if(i<1)return"";for(var r=null,s=[],h=0,c;t<a;)c=n[t++],c<128?s[h++]=c:c>191&&c<224?s[h++]=(c&31)<<6|n[t++]&63:c>239&&c<365?(c=((c&7)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,s[h++]=55296+(c>>10),s[h++]=56320+(c&1023)):s[h++]=(c&15)<<12|(n[t++]&63)<<6|n[t++]&63,h>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,s)),h=0);return r?(h&&r.push(String.fromCharCode.apply(String,s.slice(0,h))),r.join("")):String.fromCharCode.apply(String,s.slice(0,h))};ua.write=function(n,t,a){for(var i=a,r,s,h=0;h<n.length;++h)r=n.charCodeAt(h),r<128?t[a++]=r:r<2048?(t[a++]=r>>6|192,t[a++]=r&63|128):(r&64512)===55296&&((s=n.charCodeAt(h+1))&64512)===56320?(r=65536+((r&1023)<<10)+(s&1023),++h,t[a++]=r>>18|240,t[a++]=r>>12&63|128,t[a++]=r>>6&63|128,t[a++]=r&63|128):(t[a++]=r>>12|224,t[a++]=r>>6&63|128,t[a++]=r&63|128);return a-i}});var So=Y((pg,ko)=>{"use strict";ko.exports=Zc;function Zc(e,n,t){var a=t||8192,i=a>>>1,r=null,s=a;return function(c){if(c<1||c>i)return e(c);s+c>a&&(r=e(a),s=0);var g=n.call(r,s,s+=c);return s&7&&(s=(s|7)+1),g}}});var To=Y((gg,No)=>{"use strict";No.exports=j;var Qi=Un();function j(e,n){this.lo=e>>>0,this.hi=n>>>0}var Mn=j.zero=new j(0,0);Mn.toNumber=function(){return 0};Mn.zzEncode=Mn.zzDecode=function(){return this};Mn.length=function(){return 1};var zc=j.zeroHash="\0\0\0\0\0\0\0\0";j.fromNumber=function(n){if(n===0)return Mn;var t=n<0;t&&(n=-n);var a=n>>>0,i=(n-a)/4294967296>>>0;return t&&(i=~i>>>0,a=~a>>>0,++a>4294967295&&(a=0,++i>4294967295&&(i=0))),new j(a,i)};j.from=function(n){if(typeof n=="number")return j.fromNumber(n);if(Qi.isString(n))if(Qi.Long)n=Qi.Long.fromString(n);else return j.fromNumber(parseInt(n,10));return n.low||n.high?new j(n.low>>>0,n.high>>>0):Mn};j.prototype.toNumber=function(n){if(!n&&this.hi>>>31){var t=~this.lo+1>>>0,a=~this.hi>>>0;return t||(a=a+1>>>0),-(t+a*4294967296)}return this.lo+this.hi*4294967296};j.prototype.toLong=function(n){return Qi.Long?new Qi.Long(this.lo|0,this.hi|0,!!n):{low:this.lo|0,high:this.hi|0,unsigned:!!n}};var xn=String.prototype.charCodeAt;j.fromHash=function(n){return n===zc?Mn:new j((xn.call(n,0)|xn.call(n,1)<<8|xn.call(n,2)<<16|xn.call(n,3)<<24)>>>0,(xn.call(n,4)|xn.call(n,5)<<8|xn.call(n,6)<<16|xn.call(n,7)<<24)>>>0)};j.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};j.prototype.zzEncode=function(){var n=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^n)>>>0,this.lo=(this.lo<<1^n)>>>0,this};j.prototype.zzDecode=function(){var n=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^n)>>>0,this.hi=(this.hi>>>1^n)>>>0,this};j.prototype.length=function(){var n=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?t===0?n<16384?n<128?1:2:n<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:a<128?9:10}});var Un=Y(da=>{"use strict";var k=da;k.asPromise=eo();k.base64=io();k.EventEmitter=oo();k.float=go();k.inquire=mo();k.utf8=yo();k.pool=So();k.LongBits=To();k.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);k.global=k.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||da;k.emptyArray=Object.freeze?Object.freeze([]):[];k.emptyObject=Object.freeze?Object.freeze({}):{};k.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};k.isString=function(n){return typeof n=="string"||n instanceof String};k.isObject=function(n){return n&&typeof n=="object"};k.isset=k.isSet=function(n,t){var a=n[t];return a!=null&&n.hasOwnProperty(t)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1};k.Buffer=function(){try{var e=k.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}();k._Buffer_from=null;k._Buffer_allocUnsafe=null;k.newBuffer=function(n){return typeof n=="number"?k.Buffer?k._Buffer_allocUnsafe(n):new k.Array(n):k.Buffer?k._Buffer_from(n):typeof Uint8Array>"u"?n:new Uint8Array(n)};k.Array=typeof Uint8Array<"u"?Uint8Array:Array;k.Long=k.global.dcodeIO&&k.global.dcodeIO.Long||k.global.Long||k.inquire("long");k.key2Re=/^true|false|0|1$/;k.key32Re=/^-?(?:0|[1-9][0-9]*)$/;k.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;k.longToHash=function(n){return n?k.LongBits.from(n).toHash():k.LongBits.zeroHash};k.longFromHash=function(n,t){var a=k.LongBits.fromHash(n);return k.Long?k.Long.fromBits(a.lo,a.hi,t):a.toNumber(!!t)};function Co(e,n,t){for(var a=Object.keys(n),i=0;i<a.length;++i)(e[a[i]]===void 0||!t)&&(e[a[i]]=n[a[i]]);return e}k.merge=Co;k.lcFirst=function(n){return n.charAt(0).toLowerCase()+n.substring(1)};function Io(e){function n(t,a){if(!(this instanceof n))return new n(t,a);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:new Error().stack||""}),a&&Co(this,a)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),n}k.newError=Io;k.ProtocolError=Io("ProtocolError");k.oneOfGetter=function(n){for(var t={},a=0;a<n.length;++a)t[n[a]]=1;return function(){for(var i=Object.keys(this),r=i.length-1;r>-1;--r)if(t[i[r]]===1&&this[i[r]]!==void 0&&this[i[r]]!==null)return i[r]}};k.oneOfSetter=function(n){return function(t){for(var a=0;a<n.length;++a)n[a]!==t&&delete this[n[a]]}};k.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};k._configure=function(){var e=k.Buffer;if(!e){k._Buffer_from=k._Buffer_allocUnsafe=null;return}k._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,a){return new e(t,a)},k._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}}});var ma=Y((hg,Po)=>{"use strict";Po.exports=P;var Ee=Un(),la,na=Ee.LongBits,Ro=Ee.base64,Oo=Ee.utf8;function Zi(e,n,t){this.fn=e,this.len=n,this.next=void 0,this.val=t}function fa(){}function Kc(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function P(){this.len=0,this.head=new Zi(fa,0,0),this.tail=this.head,this.states=null}var Eo=function(){return Ee.Buffer?function(){return(P.create=function(){return new la})()}:function(){return new P}};P.create=Eo();P.alloc=function(n){return new Ee.Array(n)};Ee.Array!==Array&&(P.alloc=Ee.pool(P.alloc,Ee.Array.prototype.subarray));P.prototype._push=function(n,t,a){return this.tail=this.tail.next=new Zi(n,t,a),this.len+=t,this};function ca(e,n,t){n[t]=e&255}function Xc(e,n,t){for(;e>127;)n[t++]=e&127|128,e>>>=7;n[t]=e}function pa(e,n){this.len=e,this.next=void 0,this.val=n}pa.prototype=Object.create(Zi.prototype);pa.prototype.fn=Xc;P.prototype.uint32=function(n){return this.len+=(this.tail=this.tail.next=new pa((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};P.prototype.int32=function(n){return n<0?this._push(ga,10,na.fromNumber(n)):this.uint32(n)};P.prototype.sint32=function(n){return this.uint32((n<<1^n>>31)>>>0)};function ga(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}P.prototype.uint64=function(n){var t=na.from(n);return this._push(ga,t.length(),t)};P.prototype.int64=P.prototype.uint64;P.prototype.sint64=function(n){var t=na.from(n).zzEncode();return this._push(ga,t.length(),t)};P.prototype.bool=function(n){return this._push(ca,1,n?1:0)};function sa(e,n,t){n[t]=e&255,n[t+1]=e>>>8&255,n[t+2]=e>>>16&255,n[t+3]=e>>>24}P.prototype.fixed32=function(n){return this._push(sa,4,n>>>0)};P.prototype.sfixed32=P.prototype.fixed32;P.prototype.fixed64=function(n){var t=na.from(n);return this._push(sa,4,t.lo)._push(sa,4,t.hi)};P.prototype.sfixed64=P.prototype.fixed64;P.prototype.float=function(n){return this._push(Ee.float.writeFloatLE,4,n)};P.prototype.double=function(n){return this._push(Ee.float.writeDoubleLE,8,n)};var Yc=Ee.Array.prototype.set?function(n,t,a){t.set(n,a)}:function(n,t,a){for(var i=0;i<n.length;++i)t[a+i]=n[i]};P.prototype.bytes=function(n){var t=n.length>>>0;if(!t)return this._push(ca,1,0);if(Ee.isString(n)){var a=P.alloc(t=Ro.length(n));Ro.decode(n,a,0),n=a}return this.uint32(t)._push(Yc,t,n)};P.prototype.string=function(n){var t=Oo.length(n);return t?this.uint32(t)._push(Oo.write,t,n):this._push(ca,1,0)};P.prototype.fork=function(){return this.states=new Kc(this),this.head=this.tail=new Zi(fa,0,0),this.len=0,this};P.prototype.reset=function(){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 Zi(fa,0,0),this.len=0),this};P.prototype.ldelim=function(){var n=this.head,t=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=n.next,this.tail=t,this.len+=a),this};P.prototype.finish=function(){for(var n=this.head.next,t=this.constructor.alloc(this.len),a=0;n;)n.fn(n.val,t,a),a+=n.len,n=n.next;return t};P._configure=function(e){la=e,P.create=Eo(),la._configure()}});var Ao=Y((yg,vo)=>{"use strict";vo.exports=Nn;var _o=ma();(Nn.prototype=Object.create(_o.prototype)).constructor=Nn;var Vn=Un();function Nn(){_o.call(this)}Nn._configure=function(){Nn.alloc=Vn._Buffer_allocUnsafe,Nn.writeBytesBuffer=Vn.Buffer&&Vn.Buffer.prototype instanceof Uint8Array&&Vn.Buffer.prototype.set.name==="set"?function(n,t,a){t.set(n,a)}:function(n,t,a){if(n.copy)n.copy(t,a,0,n.length);else for(var i=0;i<n.length;)t[a++]=n[i++]}};Nn.prototype.bytes=function(n){Vn.isString(n)&&(n=Vn._Buffer_from(n,"base64"));var t=n.length>>>0;return this.uint32(t),t&&this._push(Nn.writeBytesBuffer,t,n),this};function $c(e,n,t){e.length<40?Vn.utf8.write(e,n,t):n.utf8Write?n.utf8Write(e,t):n.write(e,t)}Nn.prototype.string=function(n){var t=Vn.Buffer.byteLength(n);return this.uint32(t),t&&this._push($c,t,n),this};Nn._configure()});var ka=Y((kg,xo)=>{"use strict";xo.exports=G;var xe=Un(),ya,Do=xe.LongBits,jc=xe.utf8;function Ue(e,n){return RangeError("index out of range: "+e.pos+" + "+(n||1)+" > "+e.len)}function G(e){this.buf=e,this.pos=0,this.len=e.length}var Bo=typeof Uint8Array<"u"?function(n){if(n instanceof Uint8Array||Array.isArray(n))return new G(n);throw Error("illegal buffer")}:function(n){if(Array.isArray(n))return new G(n);throw Error("illegal buffer")},Jo=function(){return xe.Buffer?function(t){return(G.create=function(i){return xe.Buffer.isBuffer(i)?new ya(i):Bo(i)})(t)}:Bo};G.create=Jo();G.prototype._slice=xe.Array.prototype.subarray||xe.Array.prototype.slice;G.prototype.uint32=function(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,Ue(this,10);return n}}();G.prototype.int32=function(){return this.uint32()|0};G.prototype.sint32=function(){var n=this.uint32();return n>>>1^-(n&1)|0};function ha(){var e=new Do(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw Ue(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,e}if(this.len-this.pos>4){for(;n<5;++n)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;n<5;++n){if(this.pos>=this.len)throw Ue(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}G.prototype.bool=function(){return this.uint32()!==0};function ta(e,n){return(e[n-4]|e[n-3]<<8|e[n-2]<<16|e[n-1]<<24)>>>0}G.prototype.fixed32=function(){if(this.pos+4>this.len)throw Ue(this,4);return ta(this.buf,this.pos+=4)};G.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Ue(this,4);return ta(this.buf,this.pos+=4)|0};function bo(){if(this.pos+8>this.len)throw Ue(this,8);return new Do(ta(this.buf,this.pos+=4),ta(this.buf,this.pos+=4))}G.prototype.float=function(){if(this.pos+4>this.len)throw Ue(this,4);var n=xe.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};G.prototype.double=function(){if(this.pos+8>this.len)throw Ue(this,4);var n=xe.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};G.prototype.bytes=function(){var n=this.uint32(),t=this.pos,a=this.pos+n;if(a>this.len)throw Ue(this,n);if(this.pos+=n,Array.isArray(this.buf))return this.buf.slice(t,a);if(t===a){var i=xe.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,a)};G.prototype.string=function(){var n=this.bytes();return jc.read(n,0,n.length)};G.prototype.skip=function(n){if(typeof n=="number"){if(this.pos+n>this.len)throw Ue(this,n);this.pos+=n}else do if(this.pos>=this.len)throw Ue(this);while(this.buf[this.pos++]&128);return this};G.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!==4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this};G._configure=function(e){ya=e,G.create=Jo(),ya._configure();var n=xe.Long?"toLong":"toNumber";xe.merge(G.prototype,{int64:function(){return ha.call(this)[n](!1)},uint64:function(){return ha.call(this)[n](!0)},sint64:function(){return ha.call(this).zzDecode()[n](!1)},fixed64:function(){return bo.call(this)[n](!0)},sfixed64:function(){return bo.call(this)[n](!1)}})}});var Fo=Y((Sg,Lo)=>{"use strict";Lo.exports=Wn;var Vo=ka();(Wn.prototype=Object.create(Vo.prototype)).constructor=Wn;var Uo=Un();function Wn(e){Vo.call(this,e)}Wn._configure=function(){Uo.Buffer&&(Wn.prototype._slice=Uo.Buffer.prototype.slice)};Wn.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};Wn._configure()});var Mo=Y((Ng,wo)=>{"use strict";wo.exports=zi;var Sa=Un();(zi.prototype=Object.create(Sa.EventEmitter.prototype)).constructor=zi;function zi(e,n,t){if(typeof e!="function")throw TypeError("rpcImpl must be a function");Sa.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!n,this.responseDelimited=!!t}zi.prototype.rpcCall=function e(n,t,a,i,r){if(!i)throw TypeError("request must be specified");var s=this;if(!r)return Sa.asPromise(e,s,n,t,a,i);if(!s.rpcImpl){setTimeout(function(){r(Error("already ended"))},0);return}try{return s.rpcImpl(n,t[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(c,g){if(c)return s.emit("error",c,n),r(c);if(g===null){s.end(!0);return}if(!(g instanceof a))try{g=a[s.responseDelimited?"decodeDelimited":"decode"](g)}catch(y){return s.emit("error",y,n),r(y)}return s.emit("data",g,n),r(null,g)})}catch(h){s.emit("error",h,n),setTimeout(function(){r(h)},0);return}};zi.prototype.end=function(n){return this.rpcImpl&&(n||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var qo=Y(Wo=>{"use strict";var ep=Wo;ep.Service=Mo()});var Ho=Y((Cg,Go)=>{"use strict";Go.exports={}});var zo=Y(Zo=>{"use strict";var ke=Zo;ke.build="minimal";ke.Writer=ma();ke.BufferWriter=Ao();ke.Reader=ka();ke.BufferReader=Fo();ke.util=Un();ke.rpc=qo();ke.roots=Ho();ke.configure=Qo;function Qo(){ke.util._configure(),ke.Writer._configure(ke.BufferWriter),ke.Reader._configure(ke.BufferReader)}Qo()});var Ve=Y((Rg,Ko)=>{"use strict";Ko.exports=zo()});var Re=null;try{Re=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function L(e,n,t){this.low=e|0,this.high=n|0,this.unsigned=!!t}L.prototype.__isLong__;Object.defineProperty(L.prototype,"__isLong__",{value:!0});function re(e){return(e&&e.__isLong__)===!0}function qa(e){var n=Math.clz32(e&-e);return e?31-n:n}L.isLong=re;var Ga={},Ha={};function wn(e,n){var t,a,i;return n?(e>>>=0,(i=0<=e&&e<256)&&(a=Ha[e],a)?a:(t=v(e,0,!0),i&&(Ha[e]=t),t)):(e|=0,(i=-128<=e&&e<128)&&(a=Ga[e],a)?a:(t=v(e,e<0?-1:0,!1),i&&(Ga[e]=t),t))}L.fromInt=wn;function Oe(e,n){if(isNaN(e))return n?En:be;if(n){if(e<0)return En;if(e>=Ka)return $a}else{if(e<=-Za)return ye;if(e+1>=Za)return Ya}return e<0?Oe(-e,n).neg():v(e%Xn|0,e/Xn|0,n)}L.fromNumber=Oe;function v(e,n,t){return new L(e,n,t)}L.fromBits=v;var $i=Math.pow;function oa(e,n,t){if(e.length===0)throw Error("empty string");if(typeof n=="number"?(t=n,n=!1):n=!!n,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return n?En:be;if(t=t||10,t<2||36<t)throw RangeError("radix");var a;if((a=e.indexOf("-"))>0)throw Error("interior hyphen");if(a===0)return oa(e.substring(1),n,t).neg();for(var i=Oe($i(t,8)),r=be,s=0;s<e.length;s+=8){var h=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+h),t);if(h<8){var g=Oe($i(t,h));r=r.mul(g).add(Oe(c))}else r=r.mul(i),r=r.add(Oe(c))}return r.unsigned=n,r}L.fromString=oa;function De(e,n){return typeof e=="number"?Oe(e,n):typeof e=="string"?oa(e,n):v(e.low,e.high,typeof n=="boolean"?n:e.unsigned)}L.fromValue=De;var Qa=65536,Hc=1<<24,Xn=Qa*Qa,Ka=Xn*Xn,Za=Ka/2,za=wn(Hc),be=wn(0);L.ZERO=be;var En=wn(0,!0);L.UZERO=En;var Kn=wn(1);L.ONE=Kn;var Xa=wn(1,!0);L.UONE=Xa;var aa=wn(-1);L.NEG_ONE=aa;var Ya=v(-1,2147483647,!1);L.MAX_VALUE=Ya;var $a=v(-1,-1,!0);L.MAX_UNSIGNED_VALUE=$a;var ye=v(0,-2147483648,!1);L.MIN_VALUE=ye;var m=L.prototype;m.toInt=function(){return this.unsigned?this.low>>>0:this.low};m.toNumber=function(){return this.unsigned?(this.high>>>0)*Xn+(this.low>>>0):this.high*Xn+(this.low>>>0)};m.toString=function(n){if(n=n||10,n<2||36<n)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(ye)){var t=Oe(n),a=this.div(t),i=a.mul(t).sub(this);return a.toString(n)+i.toInt().toString(n)}else return"-"+this.neg().toString(n);for(var r=Oe($i(n,6),this.unsigned),s=this,h="";;){var c=s.div(r),g=s.sub(c.mul(r)).toInt()>>>0,y=g.toString(n);if(s=c,s.isZero())return y+h;for(;y.length<6;)y="0"+y;h=""+y+h}};m.getHighBits=function(){return this.high};m.getHighBitsUnsigned=function(){return this.high>>>0};m.getLowBits=function(){return this.low};m.getLowBitsUnsigned=function(){return this.low>>>0};m.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ye)?64:this.neg().getNumBitsAbs();for(var n=this.high!=0?this.high:this.low,t=31;t>0&&!(n&1<<t);t--);return this.high!=0?t+33:t+1};m.isZero=function(){return this.high===0&&this.low===0};m.eqz=m.isZero;m.isNegative=function(){return!this.unsigned&&this.high<0};m.isPositive=function(){return this.unsigned||this.high>=0};m.isOdd=function(){return(this.low&1)===1};m.isEven=function(){return(this.low&1)===0};m.equals=function(n){return re(n)||(n=De(n)),this.unsigned!==n.unsigned&&this.high>>>31===1&&n.high>>>31===1?!1:this.high===n.high&&this.low===n.low};m.eq=m.equals;m.notEquals=function(n){return!this.eq(n)};m.neq=m.notEquals;m.ne=m.notEquals;m.lessThan=function(n){return this.comp(n)<0};m.lt=m.lessThan;m.lessThanOrEqual=function(n){return this.comp(n)<=0};m.lte=m.lessThanOrEqual;m.le=m.lessThanOrEqual;m.greaterThan=function(n){return this.comp(n)>0};m.gt=m.greaterThan;m.greaterThanOrEqual=function(n){return this.comp(n)>=0};m.gte=m.greaterThanOrEqual;m.ge=m.greaterThanOrEqual;m.compare=function(n){if(re(n)||(n=De(n)),this.eq(n))return 0;var t=this.isNegative(),a=n.isNegative();return t&&!a?-1:!t&&a?1:this.unsigned?n.high>>>0>this.high>>>0||n.high===this.high&&n.low>>>0>this.low>>>0?-1:1:this.sub(n).isNegative()?-1:1};m.comp=m.compare;m.negate=function(){return!this.unsigned&&this.eq(ye)?ye:this.not().add(Kn)};m.neg=m.negate;m.add=function(n){re(n)||(n=De(n));var t=this.high>>>16,a=this.high&65535,i=this.low>>>16,r=this.low&65535,s=n.high>>>16,h=n.high&65535,c=n.low>>>16,g=n.low&65535,y=0,q=0,V=0,Ne=0;return Ne+=r+g,V+=Ne>>>16,Ne&=65535,V+=i+c,q+=V>>>16,V&=65535,q+=a+h,y+=q>>>16,q&=65535,y+=t+s,y&=65535,v(V<<16|Ne,y<<16|q,this.unsigned)};m.subtract=function(n){return re(n)||(n=De(n)),this.add(n.neg())};m.sub=m.subtract;m.multiply=function(n){if(this.isZero())return this;if(re(n)||(n=De(n)),Re){var t=Re.mul(this.low,this.high,n.low,n.high);return v(t,Re.get_high(),this.unsigned)}if(n.isZero())return this.unsigned?En:be;if(this.eq(ye))return n.isOdd()?ye:be;if(n.eq(ye))return this.isOdd()?ye:be;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(za)&&n.lt(za))return Oe(this.toNumber()*n.toNumber(),this.unsigned);var a=this.high>>>16,i=this.high&65535,r=this.low>>>16,s=this.low&65535,h=n.high>>>16,c=n.high&65535,g=n.low>>>16,y=n.low&65535,q=0,V=0,Ne=0,Xi=0;return Xi+=s*y,Ne+=Xi>>>16,Xi&=65535,Ne+=r*y,V+=Ne>>>16,Ne&=65535,Ne+=s*g,V+=Ne>>>16,Ne&=65535,V+=i*y,q+=V>>>16,V&=65535,V+=r*g,q+=V>>>16,V&=65535,V+=s*c,q+=V>>>16,V&=65535,q+=a*y+i*g+r*c+s*h,q&=65535,v(Ne<<16|Xi,q<<16|V,this.unsigned)};m.mul=m.multiply;m.divide=function(n){if(re(n)||(n=De(n)),n.isZero())throw Error("division by zero");if(Re){if(!this.unsigned&&this.high===-2147483648&&n.low===-1&&n.high===-1)return this;var t=(this.unsigned?Re.div_u:Re.div_s)(this.low,this.high,n.low,n.high);return v(t,Re.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?En:be;var a,i,r;if(this.unsigned){if(n.unsigned||(n=n.toUnsigned()),n.gt(this))return En;if(n.gt(this.shru(1)))return Xa;r=En}else{if(this.eq(ye)){if(n.eq(Kn)||n.eq(aa))return ye;if(n.eq(ye))return Kn;var s=this.shr(1);return a=s.div(n).shl(1),a.eq(be)?n.isNegative()?Kn:aa:(i=this.sub(n.mul(a)),r=a.add(i.div(n)),r)}else if(n.eq(ye))return this.unsigned?En:be;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg();r=be}for(i=this;i.gte(n);){a=Math.max(1,Math.floor(i.toNumber()/n.toNumber()));for(var h=Math.ceil(Math.log(a)/Math.LN2),c=h<=48?1:$i(2,h-48),g=Oe(a),y=g.mul(n);y.isNegative()||y.gt(i);)a-=c,g=Oe(a,this.unsigned),y=g.mul(n);g.isZero()&&(g=Kn),r=r.add(g),i=i.sub(y)}return r};m.div=m.divide;m.modulo=function(n){if(re(n)||(n=De(n)),Re){var t=(this.unsigned?Re.rem_u:Re.rem_s)(this.low,this.high,n.low,n.high);return v(t,Re.get_high(),this.unsigned)}return this.sub(this.div(n).mul(n))};m.mod=m.modulo;m.rem=m.modulo;m.not=function(){return v(~this.low,~this.high,this.unsigned)};m.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};m.clz=m.countLeadingZeros;m.countTrailingZeros=function(){return this.low?qa(this.low):qa(this.high)+32};m.ctz=m.countTrailingZeros;m.and=function(n){return re(n)||(n=De(n)),v(this.low&n.low,this.high&n.high,this.unsigned)};m.or=function(n){return re(n)||(n=De(n)),v(this.low|n.low,this.high|n.high,this.unsigned)};m.xor=function(n){return re(n)||(n=De(n)),v(this.low^n.low,this.high^n.high,this.unsigned)};m.shiftLeft=function(n){return re(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?v(this.low<<n,this.high<<n|this.low>>>32-n,this.unsigned):v(0,this.low<<n-32,this.unsigned)};m.shl=m.shiftLeft;m.shiftRight=function(n){return re(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?v(this.low>>>n|this.high<<32-n,this.high>>n,this.unsigned):v(this.high>>n-32,this.high>=0?0:-1,this.unsigned)};m.shr=m.shiftRight;m.shiftRightUnsigned=function(n){return re(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?v(this.low>>>n|this.high<<32-n,this.high>>>n,this.unsigned):n===32?v(this.high,0,this.unsigned):v(this.high>>>n-32,0,this.unsigned)};m.shru=m.shiftRightUnsigned;m.shr_u=m.shiftRightUnsigned;m.rotateLeft=function(n){var t;return re(n)&&(n=n.toInt()),(n&=63)===0?this:n===32?v(this.high,this.low,this.unsigned):n<32?(t=32-n,v(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned)):(n-=32,t=32-n,v(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned))};m.rotl=m.rotateLeft;m.rotateRight=function(n){var t;return re(n)&&(n=n.toInt()),(n&=63)===0?this:n===32?v(this.high,this.low,this.unsigned):n<32?(t=32-n,v(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned)):(n-=32,t=32-n,v(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned))};m.rotr=m.rotateRight;m.toSigned=function(){return this.unsigned?v(this.low,this.high,!1):this};m.toUnsigned=function(){return this.unsigned?this:v(this.low,this.high,!0)};m.toBytes=function(n){return n?this.toBytesLE():this.toBytesBE()};m.toBytesLE=function(){var n=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,n&255,n>>>8&255,n>>>16&255,n>>>24]};m.toBytesBE=function(){var n=this.high,t=this.low;return[n>>>24,n>>>16&255,n>>>8&255,n&255,t>>>24,t>>>16&255,t>>>8&255,t&255]};L.fromBytes=function(n,t,a){return a?L.fromBytesLE(n,t):L.fromBytesBE(n,t)};L.fromBytesLE=function(n,t){return new L(n[0]|n[1]<<8|n[2]<<16|n[3]<<24,n[4]|n[5]<<8|n[6]<<16|n[7]<<24,t)};L.fromBytesBE=function(n,t){return new L(n[4]<<24|n[5]<<16|n[6]<<8|n[7],n[0]<<24|n[1]<<16|n[2]<<8|n[3],t)};var $=L;var u=Sn(Ve(),1);var ra=Sn(Ve(),1);function Xo(){return{}}var Na={encode(e,n=ra.default.Writer.create()){return n},decode(e,n){let t=e instanceof ra.default.Reader?e:ra.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Xo();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return Na.fromPartial(e??{})},fromPartial(e){return Xo()}};var Te=Sn(Ve(),1),qn;(function(e){e[e.NULL_VALUE=0]="NULL_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(qn||(qn={}));function np(e){switch(e){case 0:case"NULL_VALUE":return qn.NULL_VALUE;case-1:case"UNRECOGNIZED":default:return qn.UNRECOGNIZED}}function tp(e){switch(e){case qn.NULL_VALUE:return"NULL_VALUE";case qn.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function Ta(){return{fields:{}}}var p={encode(e,n=Te.default.Writer.create()){return Object.entries(e.fields).forEach(([t,a])=>{a!==void 0&&Ra.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof Te.default.Reader?e:Te.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ta();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=Ra.decode(t,t.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{fields:$o(e.fields)?Object.entries(e.fields).reduce((n,[t,a])=>(n[t]=a,n),{}):{}}},toJSON(e){let n={};if(e.fields){let t=Object.entries(e.fields);t.length>0&&(n.fields={},t.forEach(([a,i])=>{n.fields[a]=i}))}return n},create(e){return p.fromPartial(e??{})},fromPartial(e){let n=Ta();return n.fields=Object.entries(e.fields??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=i),t),{}),n},wrap(e){let n=Ta();if(e!==void 0)for(let t of Object.keys(e))n.fields[t]=e[t];return n},unwrap(e){let n={};if(e.fields)for(let t of Object.keys(e.fields))n[t]=e.fields[t];return n}};function Yo(){return{key:"",value:void 0}}var Ra={encode(e,n=Te.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==void 0&&Pn.encode(Pn.wrap(e.value),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof Te.default.Reader?e:Te.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Yo();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=Pn.unwrap(Pn.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:$n(e.key)?globalThis.String(e.key):"",value:$n(e?.value)?e.value:void 0}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==void 0&&(n.value=e.value),n},create(e){return Ra.fromPartial(e??{})},fromPartial(e){let n=Yo();return n.key=e.key??"",n.value=e.value??void 0,n}};function Ca(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var Pn={encode(e,n=Te.default.Writer.create()){return e.nullValue!==void 0&&n.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&n.uint32(17).double(e.numberValue),e.stringValue!==void 0&&n.uint32(26).string(e.stringValue),e.boolValue!==void 0&&n.uint32(32).bool(e.boolValue),e.structValue!==void 0&&p.encode(p.wrap(e.structValue),n.uint32(42).fork()).ldelim(),e.listValue!==void 0&&Tn.encode(Tn.wrap(e.listValue),n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof Te.default.Reader?e:Te.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ca();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.nullValue=t.int32();continue;case 2:if(r!==17)break;i.numberValue=t.double();continue;case 3:if(r!==26)break;i.stringValue=t.string();continue;case 4:if(r!==32)break;i.boolValue=t.bool();continue;case 5:if(r!==42)break;i.structValue=p.unwrap(p.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.listValue=Tn.unwrap(Tn.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{nullValue:$n(e.nullValue)?np(e.nullValue):void 0,numberValue:$n(e.numberValue)?globalThis.Number(e.numberValue):void 0,stringValue:$n(e.stringValue)?globalThis.String(e.stringValue):void 0,boolValue:$n(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,structValue:$o(e.structValue)?e.structValue:void 0,listValue:globalThis.Array.isArray(e.listValue)?[...e.listValue]:void 0}},toJSON(e){let n={};return e.nullValue!==void 0&&(n.nullValue=tp(e.nullValue)),e.numberValue!==void 0&&(n.numberValue=e.numberValue),e.stringValue!==void 0&&(n.stringValue=e.stringValue),e.boolValue!==void 0&&(n.boolValue=e.boolValue),e.structValue!==void 0&&(n.structValue=e.structValue),e.listValue!==void 0&&(n.listValue=e.listValue),n},create(e){return Pn.fromPartial(e??{})},fromPartial(e){let n=Ca();return n.nullValue=e.nullValue??void 0,n.numberValue=e.numberValue??void 0,n.stringValue=e.stringValue??void 0,n.boolValue=e.boolValue??void 0,n.structValue=e.structValue??void 0,n.listValue=e.listValue??void 0,n},wrap(e){let n=Ca();if(e===null)n.nullValue=qn.NULL_VALUE;else if(typeof e=="boolean")n.boolValue=e;else if(typeof e=="number")n.numberValue=e;else if(typeof e=="string")n.stringValue=e;else if(globalThis.Array.isArray(e))n.listValue=e;else if(typeof e=="object")n.structValue=e;else if(typeof e<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e);return n},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function Ia(){return{values:[]}}var Tn={encode(e,n=Te.default.Writer.create()){for(let t of e.values)Pn.encode(Pn.wrap(t),n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof Te.default.Reader?e:Te.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ia();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.values.push(Pn.unwrap(Pn.decode(t,t.uint32())));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{values:globalThis.Array.isArray(e?.values)?[...e.values]:[]}},toJSON(e){let n={};return e.values?.length&&(n.values=e.values),n},create(e){return Tn.fromPartial(e??{})},fromPartial(e){let n=Ia();return n.values=e.values?.map(t=>t)||[],n},wrap(e){let n=Ia();return n.values=e??[],n},unwrap(e){return e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e}};function $o(e){return typeof e=="object"&&e!==null}function $n(e){return e!=null}var Gn=Sn(Ve(),1);function jo(){return{seconds:BigInt("0"),nanos:0}}var I={encode(e,n=Gn.default.Writer.create()){if(e.seconds!==BigInt("0")){if(BigInt.asIntN(64,e.seconds)!==e.seconds)throw new globalThis.Error("value provided for field message.seconds of type int64 too large");n.uint32(8).int64(e.seconds.toString())}return e.nanos!==0&&n.uint32(16).int32(e.nanos),n},decode(e,n){let t=e instanceof Gn.default.Reader?e:Gn.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=jo();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.seconds=rp(t.int64());continue;case 2:if(r!==16)break;i.nanos=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{seconds:eu(e.seconds)?BigInt(e.seconds):BigInt("0"),nanos:eu(e.nanos)?globalThis.Number(e.nanos):0}},toJSON(e){let n={};return e.seconds!==BigInt("0")&&(n.seconds=e.seconds.toString()),e.nanos!==0&&(n.nanos=Math.round(e.nanos)),n},create(e){return I.fromPartial(e??{})},fromPartial(e){let n=jo();return n.seconds=e.seconds??BigInt("0"),n.nanos=e.nanos??0,n}};function rp(e){return BigInt(e.toString())}Gn.default.util.Long!==$&&(Gn.default.util.Long=$,Gn.default.configure());function eu(e){return e!=null}var O=Sn(Ve(),1);var nu;(function(e){e[e.FREE=0]="FREE",e[e.DEV=1]="DEV",e[e.PRO=2]="PRO",e[e.ENTERPRISE=3]="ENTERPRISE",e[e.ANONYMOUS=16]="ANONYMOUS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(nu||(nu={}));var tu;(function(e){e[e.ORG_MEMBER=0]="ORG_MEMBER",e[e.ORG_ADMIN=1]="ORG_ADMIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(tu||(tu={}));var ru;(function(e){e[e.AND=0]="AND",e[e.OR=1]="OR",e[e.THEN=2]="THEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ru||(ru={}));var iu;(function(e){e[e.READ=0]="READ",e[e.WRITE=1]="WRITE",e[e.ADMIN=2]="ADMIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(iu||(iu={}));var au;(function(e){e[e.CREDIT_CARD=0]="CREDIT_CARD",e[e.INVOICE_FIAT=1]="INVOICE_FIAT",e[e.INVOICE_CRYPTO=2]="INVOICE_CRYPTO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(au||(au={}));var ou;(function(e){e[e.GENERAL=0]="GENERAL",e[e.PROCESSOR_UPLOAD_FAILED=101]="PROCESSOR_UPLOAD_FAILED",e[e.PROCESSOR_UPLOAD_SUCCESS=102]="PROCESSOR_UPLOAD_SUCCESS",e[e.PROCESSOR_OBSOLETED=103]="PROCESSOR_OBSOLETED",e[e.PROCESSOR_STOPPED=104]="PROCESSOR_STOPPED",e[e.PROCESSOR_ACTIVATED=105]="PROCESSOR_ACTIVATED",e[e.PROCESSOR_GENERAL=106]="PROCESSOR_GENERAL",e[e.PROCESSOR_ERROR=107]="PROCESSOR_ERROR",e[e.EXPORT_TASK_FAILED=201]="EXPORT_TASK_FAILED",e[e.EXPORT_TASK_SUCCESS=202]="EXPORT_TASK_SUCCESS",e[e.BILLING_INVOICE=301]="BILLING_INVOICE",e[e.BILLING_PAYMENT=302]="BILLING_PAYMENT",e[e.BILLING_SUBSCRIPTION=303]="BILLING_SUBSCRIPTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ou||(ou={}));var uu;(function(e){e[e.PENDING=0]="PENDING",e[e.SET_USERNAME=1]="SET_USERNAME",e[e.BANNED=9]="BANNED",e[e.ACTIVE=10]="ACTIVE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(uu||(uu={}));var du;(function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PRIVATE=1]="PRIVATE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(du||(du={}));var lu;(function(e){e[e.SENTIO=0]="SENTIO",e[e.SUBGRAPH=1]="SUBGRAPH",e[e.ACTION=2]="ACTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(lu||(lu={}));var su;(function(e){e[e.AVG=0]="AVG",e[e.SUM=1]="SUM",e[e.MIN=2]="MIN",e[e.MAX=3]="MAX",e[e.COUNT=4]="COUNT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(su||(su={}));var fu;(function(e){e[e.EQ=0]="EQ",e[e.NEQ=1]="NEQ",e[e.EXISTS=9]="EXISTS",e[e.NOT_EXISTS=10]="NOT_EXISTS",e[e.GT=2]="GT",e[e.GTE=3]="GTE",e[e.LT=4]="LT",e[e.LTE=5]="LTE",e[e.BETWEEN=7]="BETWEEN",e[e.NOT_BETWEEN=8]="NOT_BETWEEN",e[e.CONTAINS=11]="CONTAINS",e[e.NOT_CONTAINS=12]="NOT_CONTAINS",e[e.IN_COHORTS=13]="IN_COHORTS",e[e.NOT_IN_COHORTS=14]="NOT_IN_COHORTS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(fu||(fu={}));var cu;(function(e){e[e.EVENTS=0]="EVENTS",e[e.COHORTS=1]="COHORTS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(cu||(cu={}));var pu;(function(e){e[e.SUM=0]="SUM",e[e.CUMULATIVE_SUM=6]="CUMULATIVE_SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.CUMULATIVE_DISTINCT_COUNT=9]="CUMULATIVE_DISTINCT_COUNT",e[e.CUMULATIVE_COUNT=12]="CUMULATIVE_COUNT",e[e.LAST=7]="LAST",e[e.CUMULATIVE_LAST=10]="CUMULATIVE_LAST",e[e.FIRST=8]="FIRST",e[e.CUMULATIVE_FIRST=11]="CUMULATIVE_FIRST",e[e.PERCENTILE_25TH=20]="PERCENTILE_25TH",e[e.PERCENTILE_75TH=21]="PERCENTILE_75TH",e[e.PERCENTILE_90TH=22]="PERCENTILE_90TH",e[e.PERCENTILE_95TH=23]="PERCENTILE_95TH",e[e.PERCENTILE_99TH=24]="PERCENTILE_99TH",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(pu||(pu={}));var gu;(function(e){e[e.EQ=0]="EQ",e[e.NEQ=1]="NEQ",e[e.GT=2]="GT",e[e.GTE=3]="GTE",e[e.LT=4]="LT",e[e.LTE=5]="LTE",e[e.BETWEEN=7]="BETWEEN",e[e.NOT_BETWEEN=8]="NOT_BETWEEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(gu||(gu={}));var mu;(function(e){e[e.SUM=0]="SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.LAST=6]="LAST",e[e.FIRST=7]="FIRST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(mu||(mu={}));var hu;(function(e){e[e.PROCESSOR=0]="PROCESSOR",e[e.UI=1]="UI",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(hu||(hu={}));var yu;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.EMAIL=1]="EMAIL",e[e.SLACK=2]="SLACK",e[e.TELEGRAM=3]="TELEGRAM",e[e.WEBHOOK=4]="WEBHOOK",e[e.DISCORD=5]="DISCORD",e[e.PAGERDUTY=6]="PAGERDUTY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(yu||(yu={}));var ku;(function(e){e[e.STRING=0]="STRING",e[e.NUMBER=1]="NUMBER",e[e.BOOLEAN=2]="BOOLEAN",e[e.LIST=3]="LIST",e[e.TIME=4]="TIME",e[e.MAP=5]="MAP",e[e.JSON=6]="JSON",e[e.TOKEN=7]="TOKEN",e[e.DYNAMIC=8]="DYNAMIC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ku||(ku={}));var Su;(function(e){e[e.OnOrAfter=0]="OnOrAfter",e[e.On=1]="On",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Su||(Su={}));var Nu;(function(e){e[e.Disable=0]="Disable",e[e.FirstInTimeRange=1]="FirstInTimeRange",e[e.FirstInGlobal=2]="FirstInGlobal",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Nu||(Nu={}));var Tu;(function(e){e[e.Day=0]="Day",e[e.Week=1]="Week",e[e.Month=2]="Month",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Tu||(Tu={}));var Cu;(function(e){e[e.SUM=0]="SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Cu||(Cu={}));var Qn;(function(e){e[e.NULL_VALUE=0]="NULL_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Qn||(Qn={}));function ip(e){switch(e){case 0:case"NULL_VALUE":return Qn.NULL_VALUE;case-1:case"UNRECOGNIZED":default:return Qn.UNRECOGNIZED}}function ap(e){switch(e){case Qn.NULL_VALUE:return"NULL_VALUE";case Qn.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function Iu(){return{symbol:void 0,address:void 0}}var Ce={encode(e,n=O.default.Writer.create()){return e.symbol!==void 0&&n.uint32(10).string(e.symbol),e.address!==void 0&&jn.encode(e.address,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Iu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.symbol=t.string();continue;case 2:if(r!==18)break;i.address=jn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{symbol:F(e.symbol)?globalThis.String(e.symbol):void 0,address:F(e.address)?jn.fromJSON(e.address):void 0}},toJSON(e){let n={};return e.symbol!==void 0&&(n.symbol=e.symbol),e.address!==void 0&&(n.address=jn.toJSON(e.address)),n},create(e){return Ce.fromPartial(e??{})},fromPartial(e){let n=Iu();return n.symbol=e.symbol??void 0,n.address=e.address!==void 0&&e.address!==null?jn.fromPartial(e.address):void 0,n}};function Ru(){return{address:"",chain:""}}var jn={encode(e,n=O.default.Writer.create()){return e.address!==""&&n.uint32(10).string(e.address),e.chain!==""&&n.uint32(18).string(e.chain),n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ru();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.address=t.string();continue;case 2:if(r!==18)break;i.chain=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{address:F(e.address)?globalThis.String(e.address):"",chain:F(e.chain)?globalThis.String(e.chain):""}},toJSON(e){let n={};return e.address!==""&&(n.address=e.address),e.chain!==""&&(n.chain=e.chain),n},create(e){return jn.fromPartial(e??{})},fromPartial(e){let n=Ru();return n.address=e.address??"",n.chain=e.chain??"",n}};function Ou(){return{nullValue:void 0,intValue:void 0,int64Value:void 0,floatValue:void 0,bytesValue:void 0,boolValue:void 0,stringValue:void 0,timestampValue:void 0,bigintValue:void 0,bigdecimalValue:void 0,listValue:void 0,structValue:void 0,tokenValue:void 0}}var S={encode(e,n=O.default.Writer.create()){if(e.nullValue!==void 0&&n.uint32(8).int32(e.nullValue),e.intValue!==void 0&&n.uint32(16).int32(e.intValue),e.int64Value!==void 0){if(BigInt.asIntN(64,e.int64Value)!==e.int64Value)throw new globalThis.Error("value provided for field message.int64Value of type int64 too large");n.uint32(104).int64(e.int64Value.toString())}return e.floatValue!==void 0&&n.uint32(25).double(e.floatValue),e.bytesValue!==void 0&&n.uint32(34).bytes(e.bytesValue),e.boolValue!==void 0&&n.uint32(40).bool(e.boolValue),e.stringValue!==void 0&&n.uint32(50).string(e.stringValue),e.timestampValue!==void 0&&I.encode(xu(e.timestampValue),n.uint32(58).fork()).ldelim(),e.bigintValue!==void 0&&ee.encode(e.bigintValue,n.uint32(66).fork()).ldelim(),e.bigdecimalValue!==void 0&&Pe.encode(e.bigdecimalValue,n.uint32(74).fork()).ldelim(),e.listValue!==void 0&&D.encode(e.listValue,n.uint32(82).fork()).ldelim(),e.structValue!==void 0&&_.encode(e.structValue,n.uint32(90).fork()).ldelim(),e.tokenValue!==void 0&&Hn.encode(e.tokenValue,n.uint32(98).fork()).ldelim(),n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ou();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.nullValue=t.int32();continue;case 2:if(r!==16)break;i.intValue=t.int32();continue;case 13:if(r!==104)break;i.int64Value=op(t.int64());continue;case 3:if(r!==25)break;i.floatValue=t.double();continue;case 4:if(r!==34)break;i.bytesValue=t.bytes();continue;case 5:if(r!==40)break;i.boolValue=t.bool();continue;case 6:if(r!==50)break;i.stringValue=t.string();continue;case 7:if(r!==58)break;i.timestampValue=Ea(I.decode(t,t.uint32()));continue;case 8:if(r!==66)break;i.bigintValue=ee.decode(t,t.uint32());continue;case 9:if(r!==74)break;i.bigdecimalValue=Pe.decode(t,t.uint32());continue;case 10:if(r!==82)break;i.listValue=D.decode(t,t.uint32());continue;case 11:if(r!==90)break;i.structValue=_.decode(t,t.uint32());continue;case 12:if(r!==98)break;i.tokenValue=Hn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{nullValue:F(e.nullValue)?ip(e.nullValue):void 0,intValue:F(e.intValue)?globalThis.Number(e.intValue):void 0,int64Value:F(e.int64Value)?BigInt(e.int64Value):void 0,floatValue:F(e.floatValue)?globalThis.Number(e.floatValue):void 0,bytesValue:F(e.bytesValue)?Du(e.bytesValue):void 0,boolValue:F(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,stringValue:F(e.stringValue)?globalThis.String(e.stringValue):void 0,timestampValue:F(e.timestampValue)?Uu(e.timestampValue):void 0,bigintValue:F(e.bigintValue)?ee.fromJSON(e.bigintValue):void 0,bigdecimalValue:F(e.bigdecimalValue)?Pe.fromJSON(e.bigdecimalValue):void 0,listValue:F(e.listValue)?D.fromJSON(e.listValue):void 0,structValue:F(e.structValue)?_.fromJSON(e.structValue):void 0,tokenValue:F(e.tokenValue)?Hn.fromJSON(e.tokenValue):void 0}},toJSON(e){let n={};return e.nullValue!==void 0&&(n.nullValue=ap(e.nullValue)),e.intValue!==void 0&&(n.intValue=Math.round(e.intValue)),e.int64Value!==void 0&&(n.int64Value=e.int64Value.toString()),e.floatValue!==void 0&&(n.floatValue=e.floatValue),e.bytesValue!==void 0&&(n.bytesValue=Ju(e.bytesValue)),e.boolValue!==void 0&&(n.boolValue=e.boolValue),e.stringValue!==void 0&&(n.stringValue=e.stringValue),e.timestampValue!==void 0&&(n.timestampValue=e.timestampValue.toISOString()),e.bigintValue!==void 0&&(n.bigintValue=ee.toJSON(e.bigintValue)),e.bigdecimalValue!==void 0&&(n.bigdecimalValue=Pe.toJSON(e.bigdecimalValue)),e.listValue!==void 0&&(n.listValue=D.toJSON(e.listValue)),e.structValue!==void 0&&(n.structValue=_.toJSON(e.structValue)),e.tokenValue!==void 0&&(n.tokenValue=Hn.toJSON(e.tokenValue)),n},create(e){return S.fromPartial(e??{})},fromPartial(e){let n=Ou();return n.nullValue=e.nullValue??void 0,n.intValue=e.intValue??void 0,n.int64Value=e.int64Value??void 0,n.floatValue=e.floatValue??void 0,n.bytesValue=e.bytesValue??void 0,n.boolValue=e.boolValue??void 0,n.stringValue=e.stringValue??void 0,n.timestampValue=e.timestampValue??void 0,n.bigintValue=e.bigintValue!==void 0&&e.bigintValue!==null?ee.fromPartial(e.bigintValue):void 0,n.bigdecimalValue=e.bigdecimalValue!==void 0&&e.bigdecimalValue!==null?Pe.fromPartial(e.bigdecimalValue):void 0,n.listValue=e.listValue!==void 0&&e.listValue!==null?D.fromPartial(e.listValue):void 0,n.structValue=e.structValue!==void 0&&e.structValue!==null?_.fromPartial(e.structValue):void 0,n.tokenValue=e.tokenValue!==void 0&&e.tokenValue!==null?Hn.fromPartial(e.tokenValue):void 0,n}};function Eu(){return{fields:{}}}var _={encode(e,n=O.default.Writer.create()){return Object.entries(e.fields).forEach(([t,a])=>{Oa.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Eu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=Oa.decode(t,t.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{fields:up(e.fields)?Object.entries(e.fields).reduce((n,[t,a])=>(n[t]=S.fromJSON(a),n),{}):{}}},toJSON(e){let n={};if(e.fields){let t=Object.entries(e.fields);t.length>0&&(n.fields={},t.forEach(([a,i])=>{n.fields[a]=S.toJSON(i)}))}return n},create(e){return _.fromPartial(e??{})},fromPartial(e){let n=Eu();return n.fields=Object.entries(e.fields??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=S.fromPartial(i)),t),{}),n}};function Pu(){return{key:"",value:void 0}}var Oa={encode(e,n=O.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==void 0&&S.encode(e.value,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Pu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=S.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:F(e.key)?globalThis.String(e.key):"",value:F(e.value)?S.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==void 0&&(n.value=S.toJSON(e.value)),n},create(e){return Oa.fromPartial(e??{})},fromPartial(e){let n=Pu();return n.key=e.key??"",n.value=e.value!==void 0&&e.value!==null?S.fromPartial(e.value):void 0,n}};function _u(){return{values:[]}}var D={encode(e,n=O.default.Writer.create()){for(let t of e.values)S.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=_u();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.values.push(S.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{values:globalThis.Array.isArray(e?.values)?e.values.map(n=>S.fromJSON(n)):[]}},toJSON(e){let n={};return e.values?.length&&(n.values=e.values.map(t=>S.toJSON(t))),n},create(e){return D.fromPartial(e??{})},fromPartial(e){let n=_u();return n.values=e.values?.map(t=>S.fromPartial(t))||[],n}};function vu(){return{entities:[]}}var Ln={encode(e,n=O.default.Writer.create()){for(let t of e.entities)_.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=vu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entities.push(_.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entities:globalThis.Array.isArray(e?.entities)?e.entities.map(n=>_.fromJSON(n)):[]}},toJSON(e){let n={};return e.entities?.length&&(n.entities=e.entities.map(t=>_.toJSON(t))),n},create(e){return Ln.fromPartial(e??{})},fromPartial(e){let n=vu();return n.entities=e.entities?.map(t=>_.fromPartial(t))||[],n}};function Au(){return{value:void 0,exp:0}}var Pe={encode(e,n=O.default.Writer.create()){return e.value!==void 0&&ee.encode(e.value,n.uint32(10).fork()).ldelim(),e.exp!==0&&n.uint32(16).int32(e.exp),n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Au();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.value=ee.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.exp=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{value:F(e.value)?ee.fromJSON(e.value):void 0,exp:F(e.exp)?globalThis.Number(e.exp):0}},toJSON(e){let n={};return e.value!==void 0&&(n.value=ee.toJSON(e.value)),e.exp!==0&&(n.exp=Math.round(e.exp)),n},create(e){return Pe.fromPartial(e??{})},fromPartial(e){let n=Au();return n.value=e.value!==void 0&&e.value!==null?ee.fromPartial(e.value):void 0,n.exp=e.exp??0,n}};function Bu(){return{negative:!1,data:new Uint8Array(0)}}var ee={encode(e,n=O.default.Writer.create()){return e.negative!==!1&&n.uint32(8).bool(e.negative),e.data.length!==0&&n.uint32(18).bytes(e.data),n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Bu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.negative=t.bool();continue;case 2:if(r!==18)break;i.data=t.bytes();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{negative:F(e.negative)?globalThis.Boolean(e.negative):!1,data:F(e.data)?Du(e.data):new Uint8Array(0)}},toJSON(e){let n={};return e.negative!==!1&&(n.negative=e.negative),e.data.length!==0&&(n.data=Ju(e.data)),n},create(e){return ee.fromPartial(e??{})},fromPartial(e){let n=Bu();return n.negative=e.negative??!1,n.data=e.data??new Uint8Array(0),n}};function bu(){return{token:void 0,amount:void 0,specifiedAt:void 0}}var Hn={encode(e,n=O.default.Writer.create()){return e.token!==void 0&&Ce.encode(e.token,n.uint32(10).fork()).ldelim(),e.amount!==void 0&&Pe.encode(e.amount,n.uint32(18).fork()).ldelim(),e.specifiedAt!==void 0&&I.encode(xu(e.specifiedAt),n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof O.default.Reader?e:O.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=bu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.token=Ce.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.amount=Pe.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.specifiedAt=Ea(I.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{token:F(e.token)?Ce.fromJSON(e.token):void 0,amount:F(e.amount)?Pe.fromJSON(e.amount):void 0,specifiedAt:F(e.specifiedAt)?Uu(e.specifiedAt):void 0}},toJSON(e){let n={};return e.token!==void 0&&(n.token=Ce.toJSON(e.token)),e.amount!==void 0&&(n.amount=Pe.toJSON(e.amount)),e.specifiedAt!==void 0&&(n.specifiedAt=e.specifiedAt.toISOString()),n},create(e){return Hn.fromPartial(e??{})},fromPartial(e){let n=bu();return n.token=e.token!==void 0&&e.token!==null?Ce.fromPartial(e.token):void 0,n.amount=e.amount!==void 0&&e.amount!==null?Pe.fromPartial(e.amount):void 0,n.specifiedAt=e.specifiedAt??void 0,n}};function Du(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{let n=globalThis.atob(e),t=new Uint8Array(n.length);for(let a=0;a<n.length;++a)t[a]=n.charCodeAt(a);return t}}function Ju(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{let n=[];return e.forEach(t=>{n.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(n.join(""))}}function xu(e){let n=BigInt(Math.trunc(e.getTime()/1e3)),t=e.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function Ea(e){let n=(globalThis.Number(e.seconds.toString())||0)*1e3;return n+=(e.nanos||0)/1e6,new globalThis.Date(n)}function Uu(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):Ea(I.fromJSON(e))}function op(e){return BigInt(e.toString())}O.default.util.Long!==$&&(O.default.util.Long=$,O.default.configure());function up(e){return typeof e=="object"&&e!==null}function F(e){return e!=null}var _e;(function(e){e[e.UNKNOWN_TYPE=0]="UNKNOWN_TYPE",e[e.COUNTER=1]="COUNTER",e[e.GAUGE=2]="GAUGE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(_e||(_e={}));function dp(e){switch(e){case 0:case"UNKNOWN_TYPE":return _e.UNKNOWN_TYPE;case 1:case"COUNTER":return _e.COUNTER;case 2:case"GAUGE":return _e.GAUGE;case 3:case"HISTOGRAM":return _e.HISTOGRAM;case-1:case"UNRECOGNIZED":default:return _e.UNRECOGNIZED}}function lp(e){switch(e){case _e.UNKNOWN_TYPE:return"UNKNOWN_TYPE";case _e.COUNTER:return"COUNTER";case _e.GAUGE:return"GAUGE";case _e.HISTOGRAM:return"HISTOGRAM";case _e.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var ie;(function(e){e[e.COUNT=0]="COUNT",e[e.SUM=1]="SUM",e[e.AVG=2]="AVG",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.LAST=5]="LAST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ie||(ie={}));function sp(e){switch(e){case 0:case"COUNT":return ie.COUNT;case 1:case"SUM":return ie.SUM;case 2:case"AVG":return ie.AVG;case 3:case"MIN":return ie.MIN;case 4:case"MAX":return ie.MAX;case 5:case"LAST":return ie.LAST;case-1:case"UNRECOGNIZED":default:return ie.UNRECOGNIZED}}function fp(e){switch(e){case ie.COUNT:return"COUNT";case ie.SUM:return"SUM";case ie.AVG:return"AVG";case ie.MIN:return"MIN";case ie.MAX:return"MAX";case ie.LAST:return"LAST";case ie.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var ve;(function(e){e[e.ADDRESS=0]="ADDRESS",e[e.OBJECT=1]="OBJECT",e[e.WRAPPED_OBJECT=2]="WRAPPED_OBJECT",e[e.TYPE=3]="TYPE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ve||(ve={}));function cp(e){switch(e){case 0:case"ADDRESS":return ve.ADDRESS;case 1:case"OBJECT":return ve.OBJECT;case 2:case"WRAPPED_OBJECT":return ve.WRAPPED_OBJECT;case 3:case"TYPE":return ve.TYPE;case-1:case"UNRECOGNIZED":default:return ve.UNRECOGNIZED}}function pp(e){switch(e){case ve.ADDRESS:return"ADDRESS";case ve.OBJECT:return"OBJECT";case ve.WRAPPED_OBJECT:return"WRAPPED_OBJECT";case ve.TYPE:return"TYPE";case ve.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Cn;(function(e){e[e.ERC20=0]="ERC20",e[e.ERC721=1]="ERC721",e[e.ERC1155=2]="ERC1155",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Cn||(Cn={}));function gp(e){switch(e){case 0:case"ERC20":return Cn.ERC20;case 1:case"ERC721":return Cn.ERC721;case 2:case"ERC1155":return Cn.ERC1155;case-1:case"UNRECOGNIZED":default:return Cn.UNRECOGNIZED}}function mp(e){switch(e){case Cn.ERC20:return"ERC20";case Cn.ERC721:return"ERC721";case Cn.ERC1155:return"ERC1155";case Cn.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var T;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ETH_LOG=1]="ETH_LOG",e[e.ETH_BLOCK=2]="ETH_BLOCK",e[e.ETH_TRACE=5]="ETH_TRACE",e[e.ETH_TRANSACTION=11]="ETH_TRANSACTION",e[e.SOL_INSTRUCTION=4]="SOL_INSTRUCTION",e[e.APT_EVENT=6]="APT_EVENT",e[e.APT_CALL=7]="APT_CALL",e[e.APT_RESOURCE=8]="APT_RESOURCE",e[e.SUI_EVENT=3]="SUI_EVENT",e[e.SUI_CALL=9]="SUI_CALL",e[e.SUI_OBJECT=10]="SUI_OBJECT",e[e.SUI_OBJECT_CHANGE=12]="SUI_OBJECT_CHANGE",e[e.FUEL_CALL=13]="FUEL_CALL",e[e.FUEL_RECEIPT=19]="FUEL_RECEIPT",e[e.FUEL_TRANSACTION=20]="FUEL_TRANSACTION",e[e.FUEL_BLOCK=17]="FUEL_BLOCK",e[e.COSMOS_CALL=14]="COSMOS_CALL",e[e.STARKNET_EVENT=15]="STARKNET_EVENT",e[e.BTC_TRANSACTION=16]="BTC_TRANSACTION",e[e.BTC_BLOCK=18]="BTC_BLOCK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(T||(T={}));function ql(e){switch(e){case 0:case"UNKNOWN":return T.UNKNOWN;case 1:case"ETH_LOG":return T.ETH_LOG;case 2:case"ETH_BLOCK":return T.ETH_BLOCK;case 5:case"ETH_TRACE":return T.ETH_TRACE;case 11:case"ETH_TRANSACTION":return T.ETH_TRANSACTION;case 4:case"SOL_INSTRUCTION":return T.SOL_INSTRUCTION;case 6:case"APT_EVENT":return T.APT_EVENT;case 7:case"APT_CALL":return T.APT_CALL;case 8:case"APT_RESOURCE":return T.APT_RESOURCE;case 3:case"SUI_EVENT":return T.SUI_EVENT;case 9:case"SUI_CALL":return T.SUI_CALL;case 10:case"SUI_OBJECT":return T.SUI_OBJECT;case 12:case"SUI_OBJECT_CHANGE":return T.SUI_OBJECT_CHANGE;case 13:case"FUEL_CALL":return T.FUEL_CALL;case 19:case"FUEL_RECEIPT":return T.FUEL_RECEIPT;case 20:case"FUEL_TRANSACTION":return T.FUEL_TRANSACTION;case 17:case"FUEL_BLOCK":return T.FUEL_BLOCK;case 14:case"COSMOS_CALL":return T.COSMOS_CALL;case 15:case"STARKNET_EVENT":return T.STARKNET_EVENT;case 16:case"BTC_TRANSACTION":return T.BTC_TRANSACTION;case 18:case"BTC_BLOCK":return T.BTC_BLOCK;case-1:case"UNRECOGNIZED":default:return T.UNRECOGNIZED}}function Gl(e){switch(e){case T.UNKNOWN:return"UNKNOWN";case T.ETH_LOG:return"ETH_LOG";case T.ETH_BLOCK:return"ETH_BLOCK";case T.ETH_TRACE:return"ETH_TRACE";case T.ETH_TRANSACTION:return"ETH_TRANSACTION";case T.SOL_INSTRUCTION:return"SOL_INSTRUCTION";case T.APT_EVENT:return"APT_EVENT";case T.APT_CALL:return"APT_CALL";case T.APT_RESOURCE:return"APT_RESOURCE";case T.SUI_EVENT:return"SUI_EVENT";case T.SUI_CALL:return"SUI_CALL";case T.SUI_OBJECT:return"SUI_OBJECT";case T.SUI_OBJECT_CHANGE:return"SUI_OBJECT_CHANGE";case T.FUEL_CALL:return"FUEL_CALL";case T.FUEL_RECEIPT:return"FUEL_RECEIPT";case T.FUEL_TRANSACTION:return"FUEL_TRANSACTION";case T.FUEL_BLOCK:return"FUEL_BLOCK";case T.COSMOS_CALL:return"COSMOS_CALL";case T.STARKNET_EVENT:return"STARKNET_EVENT";case T.BTC_TRANSACTION:return"BTC_TRANSACTION";case T.BTC_BLOCK:return"BTC_BLOCK";case T.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Se;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR",e[e.CRITICAL=4]="CRITICAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Se||(Se={}));function hp(e){switch(e){case 0:case"DEBUG":return Se.DEBUG;case 1:case"INFO":return Se.INFO;case 2:case"WARNING":return Se.WARNING;case 3:case"ERROR":return Se.ERROR;case 4:case"CRITICAL":return Se.CRITICAL;case-1:case"UNRECOGNIZED":default:return Se.UNRECOGNIZED}}function yp(e){switch(e){case Se.DEBUG:return"DEBUG";case Se.INFO:return"INFO";case Se.WARNING:return"WARNING";case Se.ERROR:return"ERROR";case Se.CRITICAL:return"CRITICAL";case Se.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Vu;(function(e){e[e.AVG=0]="AVG",e[e.MEDIAN=1]="MEDIAN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Vu||(Vu={}));var ae;(function(e){e[e.STRING=0]="STRING",e[e.DOUBLE=1]="DOUBLE",e[e.BOOL=2]="BOOL",e[e.TIMESTAMP=3]="TIMESTAMP",e[e.BIG_INTEGER=4]="BIG_INTEGER",e[e.BIG_DECIMAL=5]="BIG_DECIMAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ae||(ae={}));function kp(e){switch(e){case 0:case"STRING":return ae.STRING;case 1:case"DOUBLE":return ae.DOUBLE;case 2:case"BOOL":return ae.BOOL;case 3:case"TIMESTAMP":return ae.TIMESTAMP;case 4:case"BIG_INTEGER":return ae.BIG_INTEGER;case 5:case"BIG_DECIMAL":return ae.BIG_DECIMAL;case-1:case"UNRECOGNIZED":default:return ae.UNRECOGNIZED}}function Sp(e){switch(e){case ae.STRING:return"STRING";case ae.DOUBLE:return"DOUBLE";case ae.BOOL:return"BOOL";case ae.TIMESTAMP:return"TIMESTAMP";case ae.BIG_INTEGER:return"BIG_INTEGER";case ae.BIG_DECIMAL:return"BIG_DECIMAL";case ae.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Ae;(function(e){e[e.BLOCK_NUMBER=0]="BLOCK_NUMBER",e[e.SEQ_MODE=1]="SEQ_MODE",e[e.UNIQUE_VALUE=2]="UNIQUE_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Ae||(Ae={}));function Np(e){switch(e){case 0:case"BLOCK_NUMBER":return Ae.BLOCK_NUMBER;case 1:case"SEQ_MODE":return Ae.SEQ_MODE;case 2:case"UNIQUE_VALUE":return Ae.UNIQUE_VALUE;case-1:case"UNRECOGNIZED":default:return Ae.UNRECOGNIZED}}function Tp(e){switch(e){case Ae.BLOCK_NUMBER:return"BLOCK_NUMBER";case Ae.SEQ_MODE:return"SEQ_MODE";case Ae.UNIQUE_VALUE:return"UNIQUE_VALUE";case Ae.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var In;(function(e){e[e.SET=0]="SET",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(In||(In={}));function Cp(e){switch(e){case 0:case"SET":return In.SET;case 1:case"ADD":return In.ADD;case 2:case"MULTIPLY":return In.MULTIPLY;case-1:case"UNRECOGNIZED":default:return In.UNRECOGNIZED}}function Ip(e){switch(e){case In.SET:return"SET";case In.ADD:return"ADD";case In.MULTIPLY:return"MULTIPLY";case In.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var J;(function(e){e[e.EQ=0]="EQ",e[e.NE=1]="NE",e[e.GT=2]="GT",e[e.GE=3]="GE",e[e.LT=4]="LT",e[e.LE=5]="LE",e[e.IN=6]="IN",e[e.NOT_IN=7]="NOT_IN",e[e.LIKE=8]="LIKE",e[e.NOT_LIKE=9]="NOT_LIKE",e[e.HAS_ALL=10]="HAS_ALL",e[e.HAS_ANY=11]="HAS_ANY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(J||(J={}));function Rp(e){switch(e){case 0:case"EQ":return J.EQ;case 1:case"NE":return J.NE;case 2:case"GT":return J.GT;case 3:case"GE":return J.GE;case 4:case"LT":return J.LT;case 5:case"LE":return J.LE;case 6:case"IN":return J.IN;case 7:case"NOT_IN":return J.NOT_IN;case 8:case"LIKE":return J.LIKE;case 9:case"NOT_LIKE":return J.NOT_LIKE;case 10:case"HAS_ALL":return J.HAS_ALL;case 11:case"HAS_ANY":return J.HAS_ANY;case-1:case"UNRECOGNIZED":default:return J.UNRECOGNIZED}}function Op(e){switch(e){case J.EQ:return"EQ";case J.NE:return"NE";case J.GT:return"GT";case J.GE:return"GE";case J.LT:return"LT";case J.LE:return"LE";case J.IN:return"IN";case J.NOT_IN:return"NOT_IN";case J.LIKE:return"LIKE";case J.NOT_LIKE:return"NOT_LIKE";case J.HAS_ALL:return"HAS_ALL";case J.HAS_ANY:return"HAS_ANY";case J.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Rn;(function(e){e[e.EVENT=0]="EVENT",e[e.GAUGE=1]="GAUGE",e[e.COUNTER=2]="COUNTER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Rn||(Rn={}));function Ep(e){switch(e){case 0:case"EVENT":return Rn.EVENT;case 1:case"GAUGE":return Rn.GAUGE;case 2:case"COUNTER":return Rn.COUNTER;case-1:case"UNRECOGNIZED":default:return Rn.UNRECOGNIZED}}function Pp(e){switch(e){case Rn.EVENT:return"EVENT";case Rn.GAUGE:return"GAUGE";case Rn.COUNTER:return"COUNTER";case Rn.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function Lu(){return{name:"",version:""}}var Fe={encode(e,n=u.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.version!==""&&n.uint32(26).string(e.version),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Lu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 3:if(r!==26)break;i.version=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:l(e.name)?globalThis.String(e.name):"",version:l(e.version)?globalThis.String(e.version):""}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.version!==""&&(n.version=e.version),n},create(e){return Fe.fromPartial(e??{})},fromPartial(e){let n=Lu();return n.name=e.name??"",n.version=e.version??"",n}};function Fu(){return{sequential:!1,forceExactBlockTime:!1,processBindingTimeout:0,skipStartBlockValidation:!1,rpcRetryTimes:0,ethAbiDecoderConfig:void 0}}var we={encode(e,n=u.default.Writer.create()){return e.sequential!==!1&&n.uint32(8).bool(e.sequential),e.forceExactBlockTime!==!1&&n.uint32(16).bool(e.forceExactBlockTime),e.processBindingTimeout!==0&&n.uint32(24).int32(e.processBindingTimeout),e.skipStartBlockValidation!==!1&&n.uint32(32).bool(e.skipStartBlockValidation),e.rpcRetryTimes!==0&&n.uint32(40).int32(e.rpcRetryTimes),e.ethAbiDecoderConfig!==void 0&&et.encode(e.ethAbiDecoderConfig,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Fu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.sequential=t.bool();continue;case 2:if(r!==16)break;i.forceExactBlockTime=t.bool();continue;case 3:if(r!==24)break;i.processBindingTimeout=t.int32();continue;case 4:if(r!==32)break;i.skipStartBlockValidation=t.bool();continue;case 5:if(r!==40)break;i.rpcRetryTimes=t.int32();continue;case 6:if(r!==50)break;i.ethAbiDecoderConfig=et.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{sequential:l(e.sequential)?globalThis.Boolean(e.sequential):!1,forceExactBlockTime:l(e.forceExactBlockTime)?globalThis.Boolean(e.forceExactBlockTime):!1,processBindingTimeout:l(e.processBindingTimeout)?globalThis.Number(e.processBindingTimeout):0,skipStartBlockValidation:l(e.skipStartBlockValidation)?globalThis.Boolean(e.skipStartBlockValidation):!1,rpcRetryTimes:l(e.rpcRetryTimes)?globalThis.Number(e.rpcRetryTimes):0,ethAbiDecoderConfig:l(e.ethAbiDecoderConfig)?et.fromJSON(e.ethAbiDecoderConfig):void 0}},toJSON(e){let n={};return e.sequential!==!1&&(n.sequential=e.sequential),e.forceExactBlockTime!==!1&&(n.forceExactBlockTime=e.forceExactBlockTime),e.processBindingTimeout!==0&&(n.processBindingTimeout=Math.round(e.processBindingTimeout)),e.skipStartBlockValidation!==!1&&(n.skipStartBlockValidation=e.skipStartBlockValidation),e.rpcRetryTimes!==0&&(n.rpcRetryTimes=Math.round(e.rpcRetryTimes)),e.ethAbiDecoderConfig!==void 0&&(n.ethAbiDecoderConfig=et.toJSON(e.ethAbiDecoderConfig)),n},create(e){return we.fromPartial(e??{})},fromPartial(e){let n=Fu();return n.sequential=e.sequential??!1,n.forceExactBlockTime=e.forceExactBlockTime??!1,n.processBindingTimeout=e.processBindingTimeout??0,n.skipStartBlockValidation=e.skipStartBlockValidation??!1,n.rpcRetryTimes=e.rpcRetryTimes??0,n.ethAbiDecoderConfig=e.ethAbiDecoderConfig!==void 0&&e.ethAbiDecoderConfig!==null?et.fromPartial(e.ethAbiDecoderConfig):void 0,n}};function wu(){return{enabled:!1,workerCount:void 0,skipWhenDecodeFailed:void 0}}var et={encode(e,n=u.default.Writer.create()){return e.enabled!==!1&&n.uint32(8).bool(e.enabled),e.workerCount!==void 0&&n.uint32(16).int32(e.workerCount),e.skipWhenDecodeFailed!==void 0&&n.uint32(24).bool(e.skipWhenDecodeFailed),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=wu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.enabled=t.bool();continue;case 2:if(r!==16)break;i.workerCount=t.int32();continue;case 3:if(r!==24)break;i.skipWhenDecodeFailed=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{enabled:l(e.enabled)?globalThis.Boolean(e.enabled):!1,workerCount:l(e.workerCount)?globalThis.Number(e.workerCount):void 0,skipWhenDecodeFailed:l(e.skipWhenDecodeFailed)?globalThis.Boolean(e.skipWhenDecodeFailed):void 0}},toJSON(e){let n={};return e.enabled!==!1&&(n.enabled=e.enabled),e.workerCount!==void 0&&(n.workerCount=Math.round(e.workerCount)),e.skipWhenDecodeFailed!==void 0&&(n.skipWhenDecodeFailed=e.skipWhenDecodeFailed),n},create(e){return et.fromPartial(e??{})},fromPartial(e){let n=wu();return n.enabled=e.enabled??!1,n.workerCount=e.workerCount??void 0,n.skipWhenDecodeFailed=e.skipWhenDecodeFailed??void 0,n}};function Mu(){return{config:void 0,executionConfig:void 0,contractConfigs:[],templateInstances:[],accountConfigs:[],metricConfigs:[],eventTrackingConfigs:[],exportConfigs:[],eventLogConfigs:[],dbSchema:void 0}}var _p={encode(e,n=u.default.Writer.create()){e.config!==void 0&&Fe.encode(e.config,n.uint32(10).fork()).ldelim(),e.executionConfig!==void 0&&we.encode(e.executionConfig,n.uint32(74).fork()).ldelim();for(let t of e.contractConfigs)Me.encode(t,n.uint32(18).fork()).ldelim();for(let t of e.templateInstances)H.encode(t,n.uint32(26).fork()).ldelim();for(let t of e.accountConfigs)Ze.encode(t,n.uint32(34).fork()).ldelim();for(let t of e.metricConfigs)Ge.encode(t,n.uint32(42).fork()).ldelim();for(let t of e.eventTrackingConfigs)rt.encode(t,n.uint32(50).fork()).ldelim();for(let t of e.exportConfigs)qe.encode(t,n.uint32(58).fork()).ldelim();for(let t of e.eventLogConfigs)He.encode(t,n.uint32(66).fork()).ldelim();return e.dbSchema!==void 0&&We.encode(e.dbSchema,n.uint32(82).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Mu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.config=Fe.decode(t,t.uint32());continue;case 9:if(r!==74)break;i.executionConfig=we.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.contractConfigs.push(Me.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.templateInstances.push(H.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.accountConfigs.push(Ze.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.metricConfigs.push(Ge.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.eventTrackingConfigs.push(rt.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.exportConfigs.push(qe.decode(t,t.uint32()));continue;case 8:if(r!==66)break;i.eventLogConfigs.push(He.decode(t,t.uint32()));continue;case 10:if(r!==82)break;i.dbSchema=We.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{config:l(e.config)?Fe.fromJSON(e.config):void 0,executionConfig:l(e.executionConfig)?we.fromJSON(e.executionConfig):void 0,contractConfigs:globalThis.Array.isArray(e?.contractConfigs)?e.contractConfigs.map(n=>Me.fromJSON(n)):[],templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(n=>H.fromJSON(n)):[],accountConfigs:globalThis.Array.isArray(e?.accountConfigs)?e.accountConfigs.map(n=>Ze.fromJSON(n)):[],metricConfigs:globalThis.Array.isArray(e?.metricConfigs)?e.metricConfigs.map(n=>Ge.fromJSON(n)):[],eventTrackingConfigs:globalThis.Array.isArray(e?.eventTrackingConfigs)?e.eventTrackingConfigs.map(n=>rt.fromJSON(n)):[],exportConfigs:globalThis.Array.isArray(e?.exportConfigs)?e.exportConfigs.map(n=>qe.fromJSON(n)):[],eventLogConfigs:globalThis.Array.isArray(e?.eventLogConfigs)?e.eventLogConfigs.map(n=>He.fromJSON(n)):[],dbSchema:l(e.dbSchema)?We.fromJSON(e.dbSchema):void 0}},toJSON(e){let n={};return e.config!==void 0&&(n.config=Fe.toJSON(e.config)),e.executionConfig!==void 0&&(n.executionConfig=we.toJSON(e.executionConfig)),e.contractConfigs?.length&&(n.contractConfigs=e.contractConfigs.map(t=>Me.toJSON(t))),e.templateInstances?.length&&(n.templateInstances=e.templateInstances.map(t=>H.toJSON(t))),e.accountConfigs?.length&&(n.accountConfigs=e.accountConfigs.map(t=>Ze.toJSON(t))),e.metricConfigs?.length&&(n.metricConfigs=e.metricConfigs.map(t=>Ge.toJSON(t))),e.eventTrackingConfigs?.length&&(n.eventTrackingConfigs=e.eventTrackingConfigs.map(t=>rt.toJSON(t))),e.exportConfigs?.length&&(n.exportConfigs=e.exportConfigs.map(t=>qe.toJSON(t))),e.eventLogConfigs?.length&&(n.eventLogConfigs=e.eventLogConfigs.map(t=>He.toJSON(t))),e.dbSchema!==void 0&&(n.dbSchema=We.toJSON(e.dbSchema)),n},create(e){return _p.fromPartial(e??{})},fromPartial(e){let n=Mu();return n.config=e.config!==void 0&&e.config!==null?Fe.fromPartial(e.config):void 0,n.executionConfig=e.executionConfig!==void 0&&e.executionConfig!==null?we.fromPartial(e.executionConfig):void 0,n.contractConfigs=e.contractConfigs?.map(t=>Me.fromPartial(t))||[],n.templateInstances=e.templateInstances?.map(t=>H.fromPartial(t))||[],n.accountConfigs=e.accountConfigs?.map(t=>Ze.fromPartial(t))||[],n.metricConfigs=e.metricConfigs?.map(t=>Ge.fromPartial(t))||[],n.eventTrackingConfigs=e.eventTrackingConfigs?.map(t=>rt.fromPartial(t))||[],n.exportConfigs=e.exportConfigs?.map(t=>qe.fromPartial(t))||[],n.eventLogConfigs=e.eventLogConfigs?.map(t=>He.fromPartial(t))||[],n.dbSchema=e.dbSchema!==void 0&&e.dbSchema!==null?We.fromPartial(e.dbSchema):void 0,n}};function Wu(){return{contractConfigs:[],accountConfigs:[]}}var Hl={encode(e,n=u.default.Writer.create()){for(let t of e.contractConfigs)Me.encode(t,n.uint32(18).fork()).ldelim();for(let t of e.accountConfigs)Ze.encode(t,n.uint32(34).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Wu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.contractConfigs.push(Me.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.accountConfigs.push(Ze.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{contractConfigs:globalThis.Array.isArray(e?.contractConfigs)?e.contractConfigs.map(n=>Me.fromJSON(n)):[],accountConfigs:globalThis.Array.isArray(e?.accountConfigs)?e.accountConfigs.map(n=>Ze.fromJSON(n)):[]}},toJSON(e){let n={};return e.contractConfigs?.length&&(n.contractConfigs=e.contractConfigs.map(t=>Me.toJSON(t))),e.accountConfigs?.length&&(n.accountConfigs=e.accountConfigs.map(t=>Ze.toJSON(t))),n},create(e){return Hl.fromPartial(e??{})},fromPartial(e){let n=Wu();return n.contractConfigs=e.contractConfigs?.map(t=>Me.fromPartial(t))||[],n.accountConfigs=e.accountConfigs?.map(t=>Ze.fromPartial(t))||[],n}};function qu(){return{contract:void 0,intervalConfigs:[],moveIntervalConfigs:[],logConfigs:[],traceConfigs:[],transactionConfig:[],moveEventConfigs:[],moveCallConfigs:[],moveResourceChangeConfigs:[],fuelTransactionConfigs:[],assetConfigs:[],fuelReceiptConfigs:[],cosmosLogConfigs:[],starknetEventConfigs:[],btcTransactionConfigs:[],instructionConfig:void 0,startBlock:BigInt("0"),endBlock:BigInt("0"),processorType:""}}var Me={encode(e,n=u.default.Writer.create()){e.contract!==void 0&&Ke.encode(e.contract,n.uint32(10).fork()).ldelim();for(let t of e.intervalConfigs)oe.encode(t,n.uint32(90).fork()).ldelim();for(let t of e.moveIntervalConfigs)ze.encode(t,n.uint32(154).fork()).ldelim();for(let t of e.logConfigs)Xe.encode(t,n.uint32(26).fork()).ldelim();for(let t of e.traceConfigs)ot.encode(t,n.uint32(18).fork()).ldelim();for(let t of e.transactionConfig)ut.encode(t,n.uint32(58).fork()).ldelim();for(let t of e.moveEventConfigs)kt.encode(t,n.uint32(74).fork()).ldelim();for(let t of e.moveCallConfigs)Ye.encode(t,n.uint32(82).fork()).ldelim();for(let t of e.moveResourceChangeConfigs)$e.encode(t,n.uint32(98).fork()).ldelim();for(let t of e.fuelTransactionConfigs)Pt.encode(t,n.uint32(162).fork()).ldelim();for(let t of e.assetConfigs)dt.encode(t,n.uint32(114).fork()).ldelim();for(let t of e.fuelReceiptConfigs)st.encode(t,n.uint32(170).fork()).ldelim();for(let t of e.cosmosLogConfigs)pt.encode(t,n.uint32(130).fork()).ldelim();for(let t of e.starknetEventConfigs)Ct.encode(t,n.uint32(138).fork()).ldelim();for(let t of e.btcTransactionConfigs)It.encode(t,n.uint32(146).fork()).ldelim();if(e.instructionConfig!==void 0&&mt.encode(e.instructionConfig,n.uint32(50).fork()).ldelim(),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");n.uint32(32).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");n.uint32(40).uint64(e.endBlock.toString())}return e.processorType!==""&&n.uint32(66).string(e.processorType),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=qu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.contract=Ke.decode(t,t.uint32());continue;case 11:if(r!==90)break;i.intervalConfigs.push(oe.decode(t,t.uint32()));continue;case 19:if(r!==154)break;i.moveIntervalConfigs.push(ze.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.logConfigs.push(Xe.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.traceConfigs.push(ot.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.transactionConfig.push(ut.decode(t,t.uint32()));continue;case 9:if(r!==74)break;i.moveEventConfigs.push(kt.decode(t,t.uint32()));continue;case 10:if(r!==82)break;i.moveCallConfigs.push(Ye.decode(t,t.uint32()));continue;case 12:if(r!==98)break;i.moveResourceChangeConfigs.push($e.decode(t,t.uint32()));continue;case 20:if(r!==162)break;i.fuelTransactionConfigs.push(Pt.decode(t,t.uint32()));continue;case 14:if(r!==114)break;i.assetConfigs.push(dt.decode(t,t.uint32()));continue;case 21:if(r!==170)break;i.fuelReceiptConfigs.push(st.decode(t,t.uint32()));continue;case 16:if(r!==130)break;i.cosmosLogConfigs.push(pt.decode(t,t.uint32()));continue;case 17:if(r!==138)break;i.starknetEventConfigs.push(Ct.decode(t,t.uint32()));continue;case 18:if(r!==146)break;i.btcTransactionConfigs.push(It.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.instructionConfig=mt.decode(t,t.uint32());continue;case 4:if(r!==32)break;i.startBlock=K(t.uint64());continue;case 5:if(r!==40)break;i.endBlock=K(t.uint64());continue;case 8:if(r!==66)break;i.processorType=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{contract:l(e.contract)?Ke.fromJSON(e.contract):void 0,intervalConfigs:globalThis.Array.isArray(e?.intervalConfigs)?e.intervalConfigs.map(n=>oe.fromJSON(n)):[],moveIntervalConfigs:globalThis.Array.isArray(e?.moveIntervalConfigs)?e.moveIntervalConfigs.map(n=>ze.fromJSON(n)):[],logConfigs:globalThis.Array.isArray(e?.logConfigs)?e.logConfigs.map(n=>Xe.fromJSON(n)):[],traceConfigs:globalThis.Array.isArray(e?.traceConfigs)?e.traceConfigs.map(n=>ot.fromJSON(n)):[],transactionConfig:globalThis.Array.isArray(e?.transactionConfig)?e.transactionConfig.map(n=>ut.fromJSON(n)):[],moveEventConfigs:globalThis.Array.isArray(e?.moveEventConfigs)?e.moveEventConfigs.map(n=>kt.fromJSON(n)):[],moveCallConfigs:globalThis.Array.isArray(e?.moveCallConfigs)?e.moveCallConfigs.map(n=>Ye.fromJSON(n)):[],moveResourceChangeConfigs:globalThis.Array.isArray(e?.moveResourceChangeConfigs)?e.moveResourceChangeConfigs.map(n=>$e.fromJSON(n)):[],fuelTransactionConfigs:globalThis.Array.isArray(e?.fuelTransactionConfigs)?e.fuelTransactionConfigs.map(n=>Pt.fromJSON(n)):[],assetConfigs:globalThis.Array.isArray(e?.assetConfigs)?e.assetConfigs.map(n=>dt.fromJSON(n)):[],fuelReceiptConfigs:globalThis.Array.isArray(e?.fuelReceiptConfigs)?e.fuelReceiptConfigs.map(n=>st.fromJSON(n)):[],cosmosLogConfigs:globalThis.Array.isArray(e?.cosmosLogConfigs)?e.cosmosLogConfigs.map(n=>pt.fromJSON(n)):[],starknetEventConfigs:globalThis.Array.isArray(e?.starknetEventConfigs)?e.starknetEventConfigs.map(n=>Ct.fromJSON(n)):[],btcTransactionConfigs:globalThis.Array.isArray(e?.btcTransactionConfigs)?e.btcTransactionConfigs.map(n=>It.fromJSON(n)):[],instructionConfig:l(e.instructionConfig)?mt.fromJSON(e.instructionConfig):void 0,startBlock:l(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:l(e.endBlock)?BigInt(e.endBlock):BigInt("0"),processorType:l(e.processorType)?globalThis.String(e.processorType):""}},toJSON(e){let n={};return e.contract!==void 0&&(n.contract=Ke.toJSON(e.contract)),e.intervalConfigs?.length&&(n.intervalConfigs=e.intervalConfigs.map(t=>oe.toJSON(t))),e.moveIntervalConfigs?.length&&(n.moveIntervalConfigs=e.moveIntervalConfigs.map(t=>ze.toJSON(t))),e.logConfigs?.length&&(n.logConfigs=e.logConfigs.map(t=>Xe.toJSON(t))),e.traceConfigs?.length&&(n.traceConfigs=e.traceConfigs.map(t=>ot.toJSON(t))),e.transactionConfig?.length&&(n.transactionConfig=e.transactionConfig.map(t=>ut.toJSON(t))),e.moveEventConfigs?.length&&(n.moveEventConfigs=e.moveEventConfigs.map(t=>kt.toJSON(t))),e.moveCallConfigs?.length&&(n.moveCallConfigs=e.moveCallConfigs.map(t=>Ye.toJSON(t))),e.moveResourceChangeConfigs?.length&&(n.moveResourceChangeConfigs=e.moveResourceChangeConfigs.map(t=>$e.toJSON(t))),e.fuelTransactionConfigs?.length&&(n.fuelTransactionConfigs=e.fuelTransactionConfigs.map(t=>Pt.toJSON(t))),e.assetConfigs?.length&&(n.assetConfigs=e.assetConfigs.map(t=>dt.toJSON(t))),e.fuelReceiptConfigs?.length&&(n.fuelReceiptConfigs=e.fuelReceiptConfigs.map(t=>st.toJSON(t))),e.cosmosLogConfigs?.length&&(n.cosmosLogConfigs=e.cosmosLogConfigs.map(t=>pt.toJSON(t))),e.starknetEventConfigs?.length&&(n.starknetEventConfigs=e.starknetEventConfigs.map(t=>Ct.toJSON(t))),e.btcTransactionConfigs?.length&&(n.btcTransactionConfigs=e.btcTransactionConfigs.map(t=>It.toJSON(t))),e.instructionConfig!==void 0&&(n.instructionConfig=mt.toJSON(e.instructionConfig)),e.startBlock!==BigInt("0")&&(n.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(n.endBlock=e.endBlock.toString()),e.processorType!==""&&(n.processorType=e.processorType),n},create(e){return Me.fromPartial(e??{})},fromPartial(e){let n=qu();return n.contract=e.contract!==void 0&&e.contract!==null?Ke.fromPartial(e.contract):void 0,n.intervalConfigs=e.intervalConfigs?.map(t=>oe.fromPartial(t))||[],n.moveIntervalConfigs=e.moveIntervalConfigs?.map(t=>ze.fromPartial(t))||[],n.logConfigs=e.logConfigs?.map(t=>Xe.fromPartial(t))||[],n.traceConfigs=e.traceConfigs?.map(t=>ot.fromPartial(t))||[],n.transactionConfig=e.transactionConfig?.map(t=>ut.fromPartial(t))||[],n.moveEventConfigs=e.moveEventConfigs?.map(t=>kt.fromPartial(t))||[],n.moveCallConfigs=e.moveCallConfigs?.map(t=>Ye.fromPartial(t))||[],n.moveResourceChangeConfigs=e.moveResourceChangeConfigs?.map(t=>$e.fromPartial(t))||[],n.fuelTransactionConfigs=e.fuelTransactionConfigs?.map(t=>Pt.fromPartial(t))||[],n.assetConfigs=e.assetConfigs?.map(t=>dt.fromPartial(t))||[],n.fuelReceiptConfigs=e.fuelReceiptConfigs?.map(t=>st.fromPartial(t))||[],n.cosmosLogConfigs=e.cosmosLogConfigs?.map(t=>pt.fromPartial(t))||[],n.starknetEventConfigs=e.starknetEventConfigs?.map(t=>Ct.fromPartial(t))||[],n.btcTransactionConfigs=e.btcTransactionConfigs?.map(t=>It.fromPartial(t))||[],n.instructionConfig=e.instructionConfig!==void 0&&e.instructionConfig!==null?mt.fromPartial(e.instructionConfig):void 0,n.startBlock=e.startBlock??BigInt("0"),n.endBlock=e.endBlock??BigInt("0"),n.processorType=e.processorType??"",n}};function Gu(){return{gqlSchema:""}}var We={encode(e,n=u.default.Writer.create()){return e.gqlSchema!==""&&n.uint32(10).string(e.gqlSchema),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Gu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.gqlSchema=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{gqlSchema:l(e.gqlSchema)?globalThis.String(e.gqlSchema):""}},toJSON(e){let n={};return e.gqlSchema!==""&&(n.gqlSchema=e.gqlSchema),n},create(e){return We.fromPartial(e??{})},fromPartial(e){let n=Gu();return n.gqlSchema=e.gqlSchema??"",n}};function Hu(){return{}}var nt={encode(e,n=u.default.Writer.create()){return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Hu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return nt.fromPartial(e??{})},fromPartial(e){return Hu()}};function Qu(){return{retentionEventName:"",days:0}}var tt={encode(e,n=u.default.Writer.create()){return e.retentionEventName!==""&&n.uint32(18).string(e.retentionEventName),e.days!==0&&n.uint32(24).int32(e.days),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Qu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.retentionEventName=t.string();continue;case 3:if(r!==24)break;i.days=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{retentionEventName:l(e.retentionEventName)?globalThis.String(e.retentionEventName):"",days:l(e.days)?globalThis.Number(e.days):0}},toJSON(e){let n={};return e.retentionEventName!==""&&(n.retentionEventName=e.retentionEventName),e.days!==0&&(n.days=Math.round(e.days)),n},create(e){return tt.fromPartial(e??{})},fromPartial(e){let n=Qu();return n.retentionEventName=e.retentionEventName??"",n.days=e.days??0,n}};function Zu(){return{eventName:"",totalByDay:!1,unique:!1,totalPerEntity:void 0,distinctAggregationByDays:[],retentionConfig:void 0}}var rt={encode(e,n=u.default.Writer.create()){e.eventName!==""&&n.uint32(10).string(e.eventName),e.totalByDay!==!1&&n.uint32(16).bool(e.totalByDay),e.unique!==!1&&n.uint32(24).bool(e.unique),e.totalPerEntity!==void 0&&nt.encode(e.totalPerEntity,n.uint32(34).fork()).ldelim(),n.uint32(42).fork();for(let t of e.distinctAggregationByDays)n.int32(t);return n.ldelim(),e.retentionConfig!==void 0&&tt.encode(e.retentionConfig,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Zu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.eventName=t.string();continue;case 2:if(r!==16)break;i.totalByDay=t.bool();continue;case 3:if(r!==24)break;i.unique=t.bool();continue;case 4:if(r!==34)break;i.totalPerEntity=nt.decode(t,t.uint32());continue;case 5:if(r===40){i.distinctAggregationByDays.push(t.int32());continue}if(r===42){let s=t.uint32()+t.pos;for(;t.pos<s;)i.distinctAggregationByDays.push(t.int32());continue}break;case 6:if(r!==50)break;i.retentionConfig=tt.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{eventName:l(e.eventName)?globalThis.String(e.eventName):"",totalByDay:l(e.totalByDay)?globalThis.Boolean(e.totalByDay):!1,unique:l(e.unique)?globalThis.Boolean(e.unique):!1,totalPerEntity:l(e.totalPerEntity)?nt.fromJSON(e.totalPerEntity):void 0,distinctAggregationByDays:globalThis.Array.isArray(e?.distinctAggregationByDays)?e.distinctAggregationByDays.map(n=>globalThis.Number(n)):[],retentionConfig:l(e.retentionConfig)?tt.fromJSON(e.retentionConfig):void 0}},toJSON(e){let n={};return e.eventName!==""&&(n.eventName=e.eventName),e.totalByDay!==!1&&(n.totalByDay=e.totalByDay),e.unique!==!1&&(n.unique=e.unique),e.totalPerEntity!==void 0&&(n.totalPerEntity=nt.toJSON(e.totalPerEntity)),e.distinctAggregationByDays?.length&&(n.distinctAggregationByDays=e.distinctAggregationByDays.map(t=>Math.round(t))),e.retentionConfig!==void 0&&(n.retentionConfig=tt.toJSON(e.retentionConfig)),n},create(e){return rt.fromPartial(e??{})},fromPartial(e){let n=Zu();return n.eventName=e.eventName??"",n.totalByDay=e.totalByDay??!1,n.unique=e.unique??!1,n.totalPerEntity=e.totalPerEntity!==void 0&&e.totalPerEntity!==null?nt.fromPartial(e.totalPerEntity):void 0,n.distinctAggregationByDays=e.distinctAggregationByDays?.map(t=>t)||[],n.retentionConfig=e.retentionConfig!==void 0&&e.retentionConfig!==null?tt.fromPartial(e.retentionConfig):void 0,n}};function zu(){return{name:"",channel:""}}var qe={encode(e,n=u.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.channel!==""&&n.uint32(18).string(e.channel),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=zu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 2:if(r!==18)break;i.channel=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:l(e.name)?globalThis.String(e.name):"",channel:l(e.channel)?globalThis.String(e.channel):""}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.channel!==""&&(n.channel=e.channel),n},create(e){return qe.fromPartial(e??{})},fromPartial(e){let n=zu();return n.name=e.name??"",n.channel=e.channel??"",n}};function Ku(){return{name:"",description:"",unit:"",sparse:!1,persistentBetweenVersion:!1,type:0,aggregationConfig:void 0}}var Ge={encode(e,n=u.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.description!==""&&n.uint32(26).string(e.description),e.unit!==""&&n.uint32(18).string(e.unit),e.sparse!==!1&&n.uint32(32).bool(e.sparse),e.persistentBetweenVersion!==!1&&n.uint32(40).bool(e.persistentBetweenVersion),e.type!==0&&n.uint32(56).int32(e.type),e.aggregationConfig!==void 0&&at.encode(e.aggregationConfig,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ku();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 3:if(r!==26)break;i.description=t.string();continue;case 2:if(r!==18)break;i.unit=t.string();continue;case 4:if(r!==32)break;i.sparse=t.bool();continue;case 5:if(r!==40)break;i.persistentBetweenVersion=t.bool();continue;case 7:if(r!==56)break;i.type=t.int32();continue;case 6:if(r!==50)break;i.aggregationConfig=at.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:l(e.name)?globalThis.String(e.name):"",description:l(e.description)?globalThis.String(e.description):"",unit:l(e.unit)?globalThis.String(e.unit):"",sparse:l(e.sparse)?globalThis.Boolean(e.sparse):!1,persistentBetweenVersion:l(e.persistentBetweenVersion)?globalThis.Boolean(e.persistentBetweenVersion):!1,type:l(e.type)?dp(e.type):0,aggregationConfig:l(e.aggregationConfig)?at.fromJSON(e.aggregationConfig):void 0}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.description!==""&&(n.description=e.description),e.unit!==""&&(n.unit=e.unit),e.sparse!==!1&&(n.sparse=e.sparse),e.persistentBetweenVersion!==!1&&(n.persistentBetweenVersion=e.persistentBetweenVersion),e.type!==0&&(n.type=lp(e.type)),e.aggregationConfig!==void 0&&(n.aggregationConfig=at.toJSON(e.aggregationConfig)),n},create(e){return Ge.fromPartial(e??{})},fromPartial(e){let n=Ku();return n.name=e.name??"",n.description=e.description??"",n.unit=e.unit??"",n.sparse=e.sparse??!1,n.persistentBetweenVersion=e.persistentBetweenVersion??!1,n.type=e.type??0,n.aggregationConfig=e.aggregationConfig!==void 0&&e.aggregationConfig!==null?at.fromPartial(e.aggregationConfig):void 0,n}};function Xu(){return{name:"",fields:[]}}var He={encode(e,n=u.default.Writer.create()){e.name!==""&&n.uint32(10).string(e.name);for(let t of e.fields)Qe.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Xu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 2:if(r!==18)break;i.fields.push(Qe.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:l(e.name)?globalThis.String(e.name):"",fields:globalThis.Array.isArray(e?.fields)?e.fields.map(n=>Qe.fromJSON(n)):[]}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.fields?.length&&(n.fields=e.fields.map(t=>Qe.toJSON(t))),n},create(e){return He.fromPartial(e??{})},fromPartial(e){let n=Xu();return n.name=e.name??"",n.fields=e.fields?.map(t=>Qe.fromPartial(t))||[],n}};function Yu(){return{fields:[]}}var it={encode(e,n=u.default.Writer.create()){for(let t of e.fields)Qe.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Yu();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.fields.push(Qe.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{fields:globalThis.Array.isArray(e?.fields)?e.fields.map(n=>Qe.fromJSON(n)):[]}},toJSON(e){let n={};return e.fields?.length&&(n.fields=e.fields.map(t=>Qe.toJSON(t))),n},create(e){return it.fromPartial(e??{})},fromPartial(e){let n=Yu();return n.fields=e.fields?.map(t=>Qe.fromPartial(t))||[],n}};function $u(){return{name:"",basicType:void 0,coinType:void 0,structType:void 0}}var Qe={encode(e,n=u.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.basicType!==void 0&&n.uint32(16).int32(e.basicType),e.coinType!==void 0&&Ce.encode(e.coinType,n.uint32(26).fork()).ldelim(),e.structType!==void 0&&it.encode(e.structType,n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=$u();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 2:if(r!==16)break;i.basicType=t.int32();continue;case 3:if(r!==26)break;i.coinType=Ce.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.structType=it.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:l(e.name)?globalThis.String(e.name):"",basicType:l(e.basicType)?kp(e.basicType):void 0,coinType:l(e.coinType)?Ce.fromJSON(e.coinType):void 0,structType:l(e.structType)?it.fromJSON(e.structType):void 0}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.basicType!==void 0&&(n.basicType=Sp(e.basicType)),e.coinType!==void 0&&(n.coinType=Ce.toJSON(e.coinType)),e.structType!==void 0&&(n.structType=it.toJSON(e.structType)),n},create(e){return Qe.fromPartial(e??{})},fromPartial(e){let n=$u();return n.name=e.name??"",n.basicType=e.basicType??void 0,n.coinType=e.coinType!==void 0&&e.coinType!==null?Ce.fromPartial(e.coinType):void 0,n.structType=e.structType!==void 0&&e.structType!==null?it.fromPartial(e.structType):void 0,n}};function ju(){return{intervalInMinutes:[],types:[],discardOrigin:!1}}var at={encode(e,n=u.default.Writer.create()){n.uint32(10).fork();for(let t of e.intervalInMinutes)n.int32(t);n.ldelim(),n.uint32(18).fork();for(let t of e.types)n.int32(t);return n.ldelim(),e.discardOrigin!==!1&&n.uint32(24).bool(e.discardOrigin),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ju();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r===8){i.intervalInMinutes.push(t.int32());continue}if(r===10){let s=t.uint32()+t.pos;for(;t.pos<s;)i.intervalInMinutes.push(t.int32());continue}break;case 2:if(r===16){i.types.push(t.int32());continue}if(r===18){let s=t.uint32()+t.pos;for(;t.pos<s;)i.types.push(t.int32());continue}break;case 3:if(r!==24)break;i.discardOrigin=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{intervalInMinutes:globalThis.Array.isArray(e?.intervalInMinutes)?e.intervalInMinutes.map(n=>globalThis.Number(n)):[],types:globalThis.Array.isArray(e?.types)?e.types.map(n=>sp(n)):[],discardOrigin:l(e.discardOrigin)?globalThis.Boolean(e.discardOrigin):!1}},toJSON(e){let n={};return e.intervalInMinutes?.length&&(n.intervalInMinutes=e.intervalInMinutes.map(t=>Math.round(t))),e.types?.length&&(n.types=e.types.map(t=>fp(t))),e.discardOrigin!==!1&&(n.discardOrigin=e.discardOrigin),n},create(e){return at.fromPartial(e??{})},fromPartial(e){let n=ju();return n.intervalInMinutes=e.intervalInMinutes?.map(t=>t)||[],n.types=e.types?.map(t=>t)||[],n.discardOrigin=e.discardOrigin??!1,n}};function ed(){return{chainId:"",address:"",startBlock:BigInt("0"),endBlock:BigInt("0"),intervalConfigs:[],moveIntervalConfigs:[],moveCallConfigs:[],moveResourceChangeConfigs:[],logConfigs:[]}}var Ze={encode(e,n=u.default.Writer.create()){if(e.chainId!==""&&n.uint32(10).string(e.chainId),e.address!==""&&n.uint32(18).string(e.address),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");n.uint32(24).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");n.uint32(80).uint64(e.endBlock.toString())}for(let t of e.intervalConfigs)oe.encode(t,n.uint32(34).fork()).ldelim();for(let t of e.moveIntervalConfigs)ze.encode(t,n.uint32(58).fork()).ldelim();for(let t of e.moveCallConfigs)Ye.encode(t,n.uint32(66).fork()).ldelim();for(let t of e.moveResourceChangeConfigs)$e.encode(t,n.uint32(74).fork()).ldelim();for(let t of e.logConfigs)Xe.encode(t,n.uint32(50).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ed();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.chainId=t.string();continue;case 2:if(r!==18)break;i.address=t.string();continue;case 3:if(r!==24)break;i.startBlock=K(t.uint64());continue;case 10:if(r!==80)break;i.endBlock=K(t.uint64());continue;case 4:if(r!==34)break;i.intervalConfigs.push(oe.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.moveIntervalConfigs.push(ze.decode(t,t.uint32()));continue;case 8:if(r!==66)break;i.moveCallConfigs.push(Ye.decode(t,t.uint32()));continue;case 9:if(r!==74)break;i.moveResourceChangeConfigs.push($e.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.logConfigs.push(Xe.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{chainId:l(e.chainId)?globalThis.String(e.chainId):"",address:l(e.address)?globalThis.String(e.address):"",startBlock:l(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:l(e.endBlock)?BigInt(e.endBlock):BigInt("0"),intervalConfigs:globalThis.Array.isArray(e?.intervalConfigs)?e.intervalConfigs.map(n=>oe.fromJSON(n)):[],moveIntervalConfigs:globalThis.Array.isArray(e?.moveIntervalConfigs)?e.moveIntervalConfigs.map(n=>ze.fromJSON(n)):[],moveCallConfigs:globalThis.Array.isArray(e?.moveCallConfigs)?e.moveCallConfigs.map(n=>Ye.fromJSON(n)):[],moveResourceChangeConfigs:globalThis.Array.isArray(e?.moveResourceChangeConfigs)?e.moveResourceChangeConfigs.map(n=>$e.fromJSON(n)):[],logConfigs:globalThis.Array.isArray(e?.logConfigs)?e.logConfigs.map(n=>Xe.fromJSON(n)):[]}},toJSON(e){let n={};return e.chainId!==""&&(n.chainId=e.chainId),e.address!==""&&(n.address=e.address),e.startBlock!==BigInt("0")&&(n.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(n.endBlock=e.endBlock.toString()),e.intervalConfigs?.length&&(n.intervalConfigs=e.intervalConfigs.map(t=>oe.toJSON(t))),e.moveIntervalConfigs?.length&&(n.moveIntervalConfigs=e.moveIntervalConfigs.map(t=>ze.toJSON(t))),e.moveCallConfigs?.length&&(n.moveCallConfigs=e.moveCallConfigs.map(t=>Ye.toJSON(t))),e.moveResourceChangeConfigs?.length&&(n.moveResourceChangeConfigs=e.moveResourceChangeConfigs.map(t=>$e.toJSON(t))),e.logConfigs?.length&&(n.logConfigs=e.logConfigs.map(t=>Xe.toJSON(t))),n},create(e){return Ze.fromPartial(e??{})},fromPartial(e){let n=ed();return n.chainId=e.chainId??"",n.address=e.address??"",n.startBlock=e.startBlock??BigInt("0"),n.endBlock=e.endBlock??BigInt("0"),n.intervalConfigs=e.intervalConfigs?.map(t=>oe.fromPartial(t))||[],n.moveIntervalConfigs=e.moveIntervalConfigs?.map(t=>ze.fromPartial(t))||[],n.moveCallConfigs=e.moveCallConfigs?.map(t=>Ye.fromPartial(t))||[],n.moveResourceChangeConfigs=e.moveResourceChangeConfigs?.map(t=>$e.fromPartial(t))||[],n.logConfigs=e.logConfigs?.map(t=>Xe.fromPartial(t))||[],n}};function nd(){return{recentInterval:0,backfillInterval:0}}var Le={encode(e,n=u.default.Writer.create()){return e.recentInterval!==0&&n.uint32(8).int32(e.recentInterval),e.backfillInterval!==0&&n.uint32(16).int32(e.backfillInterval),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=nd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.recentInterval=t.int32();continue;case 2:if(r!==16)break;i.backfillInterval=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{recentInterval:l(e.recentInterval)?globalThis.Number(e.recentInterval):0,backfillInterval:l(e.backfillInterval)?globalThis.Number(e.backfillInterval):0}},toJSON(e){let n={};return e.recentInterval!==0&&(n.recentInterval=Math.round(e.recentInterval)),e.backfillInterval!==0&&(n.backfillInterval=Math.round(e.backfillInterval)),n},create(e){return Le.fromPartial(e??{})},fromPartial(e){let n=nd();return n.recentInterval=e.recentInterval??0,n.backfillInterval=e.backfillInterval??0,n}};function td(){return{handlerId:0,minutes:0,minutesInterval:void 0,slot:0,slotInterval:void 0,fetchConfig:void 0,handlerName:""}}var oe={encode(e,n=u.default.Writer.create()){return e.handlerId!==0&&n.uint32(8).int32(e.handlerId),e.minutes!==0&&n.uint32(16).int32(e.minutes),e.minutesInterval!==void 0&&Le.encode(e.minutesInterval,n.uint32(34).fork()).ldelim(),e.slot!==0&&n.uint32(24).int32(e.slot),e.slotInterval!==void 0&&Le.encode(e.slotInterval,n.uint32(42).fork()).ldelim(),e.fetchConfig!==void 0&&Q.encode(e.fetchConfig,n.uint32(50).fork()).ldelim(),e.handlerName!==""&&n.uint32(58).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=td();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.handlerId=t.int32();continue;case 2:if(r!==16)break;i.minutes=t.int32();continue;case 4:if(r!==34)break;i.minutesInterval=Le.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.slot=t.int32();continue;case 5:if(r!==42)break;i.slotInterval=Le.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.fetchConfig=Q.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,minutes:l(e.minutes)?globalThis.Number(e.minutes):0,minutesInterval:l(e.minutesInterval)?Le.fromJSON(e.minutesInterval):void 0,slot:l(e.slot)?globalThis.Number(e.slot):0,slotInterval:l(e.slotInterval)?Le.fromJSON(e.slotInterval):void 0,fetchConfig:l(e.fetchConfig)?Q.fromJSON(e.fetchConfig):void 0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.minutes!==0&&(n.minutes=Math.round(e.minutes)),e.minutesInterval!==void 0&&(n.minutesInterval=Le.toJSON(e.minutesInterval)),e.slot!==0&&(n.slot=Math.round(e.slot)),e.slotInterval!==void 0&&(n.slotInterval=Le.toJSON(e.slotInterval)),e.fetchConfig!==void 0&&(n.fetchConfig=Q.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return oe.fromPartial(e??{})},fromPartial(e){let n=td();return n.handlerId=e.handlerId??0,n.minutes=e.minutes??0,n.minutesInterval=e.minutesInterval!==void 0&&e.minutesInterval!==null?Le.fromPartial(e.minutesInterval):void 0,n.slot=e.slot??0,n.slotInterval=e.slotInterval!==void 0&&e.slotInterval!==null?Le.fromPartial(e.slotInterval):void 0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?Q.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function rd(){return{intervalConfig:void 0,type:"",ownerType:0,resourceFetchConfig:void 0,fetchConfig:void 0}}var ze={encode(e,n=u.default.Writer.create()){return e.intervalConfig!==void 0&&oe.encode(e.intervalConfig,n.uint32(10).fork()).ldelim(),e.type!==""&&n.uint32(18).string(e.type),e.ownerType!==0&&n.uint32(24).int32(e.ownerType),e.resourceFetchConfig!==void 0&&yt.encode(e.resourceFetchConfig,n.uint32(34).fork()).ldelim(),e.fetchConfig!==void 0&&ue.encode(e.fetchConfig,n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=rd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.intervalConfig=oe.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.type=t.string();continue;case 3:if(r!==24)break;i.ownerType=t.int32();continue;case 4:if(r!==34)break;i.resourceFetchConfig=yt.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.fetchConfig=ue.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{intervalConfig:l(e.intervalConfig)?oe.fromJSON(e.intervalConfig):void 0,type:l(e.type)?globalThis.String(e.type):"",ownerType:l(e.ownerType)?cp(e.ownerType):0,resourceFetchConfig:l(e.resourceFetchConfig)?yt.fromJSON(e.resourceFetchConfig):void 0,fetchConfig:l(e.fetchConfig)?ue.fromJSON(e.fetchConfig):void 0}},toJSON(e){let n={};return e.intervalConfig!==void 0&&(n.intervalConfig=oe.toJSON(e.intervalConfig)),e.type!==""&&(n.type=e.type),e.ownerType!==0&&(n.ownerType=pp(e.ownerType)),e.resourceFetchConfig!==void 0&&(n.resourceFetchConfig=yt.toJSON(e.resourceFetchConfig)),e.fetchConfig!==void 0&&(n.fetchConfig=ue.toJSON(e.fetchConfig)),n},create(e){return ze.fromPartial(e??{})},fromPartial(e){let n=rd();return n.intervalConfig=e.intervalConfig!==void 0&&e.intervalConfig!==null?oe.fromPartial(e.intervalConfig):void 0,n.type=e.type??"",n.ownerType=e.ownerType??0,n.resourceFetchConfig=e.resourceFetchConfig!==void 0&&e.resourceFetchConfig!==null?yt.fromPartial(e.resourceFetchConfig):void 0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?ue.fromPartial(e.fetchConfig):void 0,n}};function id(){return{name:"",chainId:"",address:"",abi:""}}var Ke={encode(e,n=u.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.chainId!==""&&n.uint32(18).string(e.chainId),e.address!==""&&n.uint32(26).string(e.address),e.abi!==""&&n.uint32(34).string(e.abi),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=id();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 2:if(r!==18)break;i.chainId=t.string();continue;case 3:if(r!==26)break;i.address=t.string();continue;case 4:if(r!==34)break;i.abi=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:l(e.name)?globalThis.String(e.name):"",chainId:l(e.chainId)?globalThis.String(e.chainId):"",address:l(e.address)?globalThis.String(e.address):"",abi:l(e.abi)?globalThis.String(e.abi):""}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.chainId!==""&&(n.chainId=e.chainId),e.address!==""&&(n.address=e.address),e.abi!==""&&(n.abi=e.abi),n},create(e){return Ke.fromPartial(e??{})},fromPartial(e){let n=id();return n.name=e.name??"",n.chainId=e.chainId??"",n.address=e.address??"",n.abi=e.abi??"",n}};function ad(){return{contract:void 0,startBlock:BigInt("0"),endBlock:BigInt("0"),templateId:0,baseLabels:void 0}}var H={encode(e,n=u.default.Writer.create()){if(e.contract!==void 0&&Ke.encode(e.contract,n.uint32(10).fork()).ldelim(),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");n.uint32(16).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");n.uint32(24).uint64(e.endBlock.toString())}return e.templateId!==0&&n.uint32(32).int32(e.templateId),e.baseLabels!==void 0&&p.encode(p.wrap(e.baseLabels),n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ad();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.contract=Ke.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.startBlock=K(t.uint64());continue;case 3:if(r!==24)break;i.endBlock=K(t.uint64());continue;case 4:if(r!==32)break;i.templateId=t.int32();continue;case 5:if(r!==42)break;i.baseLabels=p.unwrap(p.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{contract:l(e.contract)?Ke.fromJSON(e.contract):void 0,startBlock:l(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:l(e.endBlock)?BigInt(e.endBlock):BigInt("0"),templateId:l(e.templateId)?globalThis.Number(e.templateId):0,baseLabels:x(e.baseLabels)?e.baseLabels:void 0}},toJSON(e){let n={};return e.contract!==void 0&&(n.contract=Ke.toJSON(e.contract)),e.startBlock!==BigInt("0")&&(n.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(n.endBlock=e.endBlock.toString()),e.templateId!==0&&(n.templateId=Math.round(e.templateId)),e.baseLabels!==void 0&&(n.baseLabels=e.baseLabels),n},create(e){return H.fromPartial(e??{})},fromPartial(e){let n=ad();return n.contract=e.contract!==void 0&&e.contract!==null?Ke.fromPartial(e.contract):void 0,n.startBlock=e.startBlock??BigInt("0"),n.endBlock=e.endBlock??BigInt("0"),n.templateId=e.templateId??0,n.baseLabels=e.baseLabels??void 0,n}};function od(){return{chainIds:[],dbSchema:void 0,config:void 0,executionConfig:void 0,metricConfigs:[],exportConfigs:[],eventLogConfigs:[]}}var Ql={encode(e,n=u.default.Writer.create()){for(let t of e.chainIds)n.uint32(10).string(t);e.dbSchema!==void 0&&We.encode(e.dbSchema,n.uint32(18).fork()).ldelim(),e.config!==void 0&&Fe.encode(e.config,n.uint32(26).fork()).ldelim(),e.executionConfig!==void 0&&we.encode(e.executionConfig,n.uint32(34).fork()).ldelim();for(let t of e.metricConfigs)Ge.encode(t,n.uint32(42).fork()).ldelim();for(let t of e.exportConfigs)qe.encode(t,n.uint32(50).fork()).ldelim();for(let t of e.eventLogConfigs)He.encode(t,n.uint32(58).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=od();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.chainIds.push(t.string());continue;case 2:if(r!==18)break;i.dbSchema=We.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.config=Fe.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.executionConfig=we.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.metricConfigs.push(Ge.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.exportConfigs.push(qe.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.eventLogConfigs.push(He.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{chainIds:globalThis.Array.isArray(e?.chainIds)?e.chainIds.map(n=>globalThis.String(n)):[],dbSchema:l(e.dbSchema)?We.fromJSON(e.dbSchema):void 0,config:l(e.config)?Fe.fromJSON(e.config):void 0,executionConfig:l(e.executionConfig)?we.fromJSON(e.executionConfig):void 0,metricConfigs:globalThis.Array.isArray(e?.metricConfigs)?e.metricConfigs.map(n=>Ge.fromJSON(n)):[],exportConfigs:globalThis.Array.isArray(e?.exportConfigs)?e.exportConfigs.map(n=>qe.fromJSON(n)):[],eventLogConfigs:globalThis.Array.isArray(e?.eventLogConfigs)?e.eventLogConfigs.map(n=>He.fromJSON(n)):[]}},toJSON(e){let n={};return e.chainIds?.length&&(n.chainIds=e.chainIds),e.dbSchema!==void 0&&(n.dbSchema=We.toJSON(e.dbSchema)),e.config!==void 0&&(n.config=Fe.toJSON(e.config)),e.executionConfig!==void 0&&(n.executionConfig=we.toJSON(e.executionConfig)),e.metricConfigs?.length&&(n.metricConfigs=e.metricConfigs.map(t=>Ge.toJSON(t))),e.exportConfigs?.length&&(n.exportConfigs=e.exportConfigs.map(t=>qe.toJSON(t))),e.eventLogConfigs?.length&&(n.eventLogConfigs=e.eventLogConfigs.map(t=>He.toJSON(t))),n},create(e){return Ql.fromPartial(e??{})},fromPartial(e){let n=od();return n.chainIds=e.chainIds?.map(t=>t)||[],n.dbSchema=e.dbSchema!==void 0&&e.dbSchema!==null?We.fromPartial(e.dbSchema):void 0,n.config=e.config!==void 0&&e.config!==null?Fe.fromPartial(e.config):void 0,n.executionConfig=e.executionConfig!==void 0&&e.executionConfig!==null?we.fromPartial(e.executionConfig):void 0,n.metricConfigs=e.metricConfigs?.map(t=>Ge.fromPartial(t))||[],n.exportConfigs=e.exportConfigs?.map(t=>qe.fromPartial(t))||[],n.eventLogConfigs=e.eventLogConfigs?.map(t=>He.fromPartial(t))||[],n}};function ud(){return{chainId:"",templateInstances:[]}}var Zl={encode(e,n=u.default.Writer.create()){e.chainId!==""&&n.uint32(10).string(e.chainId);for(let t of e.templateInstances)H.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ud();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.chainId=t.string();continue;case 2:if(r!==18)break;i.templateInstances.push(H.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{chainId:l(e.chainId)?globalThis.String(e.chainId):"",templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(n=>H.fromJSON(n)):[]}},toJSON(e){let n={};return e.chainId!==""&&(n.chainId=e.chainId),e.templateInstances?.length&&(n.templateInstances=e.templateInstances.map(t=>H.toJSON(t))),n},create(e){return Zl.fromPartial(e??{})},fromPartial(e){let n=ud();return n.chainId=e.chainId??"",n.templateInstances=e.templateInstances?.map(t=>H.fromPartial(t))||[],n}};function dd(){return{templateInstances:[]}}var vp={encode(e,n=u.default.Writer.create()){for(let t of e.templateInstances)H.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=dd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.templateInstances.push(H.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(n=>H.fromJSON(n)):[]}},toJSON(e){let n={};return e.templateInstances?.length&&(n.templateInstances=e.templateInstances.map(t=>H.toJSON(t))),n},create(e){return vp.fromPartial(e??{})},fromPartial(e){let n=dd();return n.templateInstances=e.templateInstances?.map(t=>H.fromPartial(t))||[],n}};function ld(){return{transaction:!1,transactionReceipt:!1,transactionReceiptLogs:!1,block:!1,trace:!1}}var Q={encode(e,n=u.default.Writer.create()){return e.transaction!==!1&&n.uint32(8).bool(e.transaction),e.transactionReceipt!==!1&&n.uint32(16).bool(e.transactionReceipt),e.transactionReceiptLogs!==!1&&n.uint32(40).bool(e.transactionReceiptLogs),e.block!==!1&&n.uint32(24).bool(e.block),e.trace!==!1&&n.uint32(32).bool(e.trace),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ld();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.transaction=t.bool();continue;case 2:if(r!==16)break;i.transactionReceipt=t.bool();continue;case 5:if(r!==40)break;i.transactionReceiptLogs=t.bool();continue;case 3:if(r!==24)break;i.block=t.bool();continue;case 4:if(r!==32)break;i.trace=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:l(e.transaction)?globalThis.Boolean(e.transaction):!1,transactionReceipt:l(e.transactionReceipt)?globalThis.Boolean(e.transactionReceipt):!1,transactionReceiptLogs:l(e.transactionReceiptLogs)?globalThis.Boolean(e.transactionReceiptLogs):!1,block:l(e.block)?globalThis.Boolean(e.block):!1,trace:l(e.trace)?globalThis.Boolean(e.trace):!1}},toJSON(e){let n={};return e.transaction!==!1&&(n.transaction=e.transaction),e.transactionReceipt!==!1&&(n.transactionReceipt=e.transactionReceipt),e.transactionReceiptLogs!==!1&&(n.transactionReceiptLogs=e.transactionReceiptLogs),e.block!==!1&&(n.block=e.block),e.trace!==!1&&(n.trace=e.trace),n},create(e){return Q.fromPartial(e??{})},fromPartial(e){let n=ld();return n.transaction=e.transaction??!1,n.transactionReceipt=e.transactionReceipt??!1,n.transactionReceiptLogs=e.transactionReceiptLogs??!1,n.block=e.block??!1,n.trace=e.trace??!1,n}};function sd(){return{signature:"",handlerId:0,fetchConfig:void 0,handlerName:""}}var ot={encode(e,n=u.default.Writer.create()){return e.signature!==""&&n.uint32(10).string(e.signature),e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&Q.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=sd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.signature=t.string();continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=Q.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{signature:l(e.signature)?globalThis.String(e.signature):"",handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:l(e.fetchConfig)?Q.fromJSON(e.fetchConfig):void 0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.signature!==""&&(n.signature=e.signature),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=Q.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return ot.fromPartial(e??{})},fromPartial(e){let n=sd();return n.signature=e.signature??"",n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?Q.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function fd(){return{handlerId:0,fetchConfig:void 0,handlerName:""}}var ut={encode(e,n=u.default.Writer.create()){return e.handlerId!==0&&n.uint32(8).int32(e.handlerId),e.fetchConfig!==void 0&&Q.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=fd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=Q.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:l(e.fetchConfig)?Q.fromJSON(e.fetchConfig):void 0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=Q.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return ut.fromPartial(e??{})},fromPartial(e){let n=fd();return n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?Q.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function cd(){return{filters:[],handlerId:0,fetchConfig:void 0,handlerName:""}}var Xe={encode(e,n=u.default.Writer.create()){for(let t of e.filters)gt.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&Q.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=cd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(gt.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=Q.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>gt.fromJSON(n)):[],handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:l(e.fetchConfig)?Q.fromJSON(e.fetchConfig):void 0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>gt.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=Q.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return Xe.fromPartial(e??{})},fromPartial(e){let n=cd();return n.filters=e.filters?.map(t=>gt.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?Q.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function pd(){return{filters:[],handlerId:0,handlerName:""}}var dt={encode(e,n=u.default.Writer.create()){for(let t of e.filters)lt.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=pd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(lt.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>lt.fromJSON(n)):[],handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>lt.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return dt.fromPartial(e??{})},fromPartial(e){let n=pd();return n.filters=e.filters?.map(t=>lt.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function gd(){return{assetId:void 0,fromAddress:void 0,toAddress:void 0}}var lt={encode(e,n=u.default.Writer.create()){return e.assetId!==void 0&&n.uint32(10).string(e.assetId),e.fromAddress!==void 0&&n.uint32(18).string(e.fromAddress),e.toAddress!==void 0&&n.uint32(26).string(e.toAddress),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=gd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.assetId=t.string();continue;case 2:if(r!==18)break;i.fromAddress=t.string();continue;case 3:if(r!==26)break;i.toAddress=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{assetId:l(e.assetId)?globalThis.String(e.assetId):void 0,fromAddress:l(e.fromAddress)?globalThis.String(e.fromAddress):void 0,toAddress:l(e.toAddress)?globalThis.String(e.toAddress):void 0}},toJSON(e){let n={};return e.assetId!==void 0&&(n.assetId=e.assetId),e.fromAddress!==void 0&&(n.fromAddress=e.fromAddress),e.toAddress!==void 0&&(n.toAddress=e.toAddress),n},create(e){return lt.fromPartial(e??{})},fromPartial(e){let n=gd();return n.assetId=e.assetId??void 0,n.fromAddress=e.fromAddress??void 0,n.toAddress=e.toAddress??void 0,n}};function md(){return{log:void 0,transfer:void 0,handlerId:0,handlerName:""}}var st={encode(e,n=u.default.Writer.create()){return e.log!==void 0&&ct.encode(e.log,n.uint32(10).fork()).ldelim(),e.transfer!==void 0&&ft.encode(e.transfer,n.uint32(18).fork()).ldelim(),e.handlerId!==0&&n.uint32(24).int32(e.handlerId),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=md();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.log=ct.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.transfer=ft.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.handlerId=t.int32();continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{log:l(e.log)?ct.fromJSON(e.log):void 0,transfer:l(e.transfer)?ft.fromJSON(e.transfer):void 0,handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.log!==void 0&&(n.log=ct.toJSON(e.log)),e.transfer!==void 0&&(n.transfer=ft.toJSON(e.transfer)),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return st.fromPartial(e??{})},fromPartial(e){let n=md();return n.log=e.log!==void 0&&e.log!==null?ct.fromPartial(e.log):void 0,n.transfer=e.transfer!==void 0&&e.transfer!==null?ft.fromPartial(e.transfer):void 0,n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function hd(){return{assetId:"",from:"",to:""}}var ft={encode(e,n=u.default.Writer.create()){return e.assetId!==""&&n.uint32(34).string(e.assetId),e.from!==""&&n.uint32(10).string(e.from),e.to!==""&&n.uint32(18).string(e.to),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=hd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.assetId=t.string();continue;case 1:if(r!==10)break;i.from=t.string();continue;case 2:if(r!==18)break;i.to=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{assetId:l(e.assetId)?globalThis.String(e.assetId):"",from:l(e.from)?globalThis.String(e.from):"",to:l(e.to)?globalThis.String(e.to):""}},toJSON(e){let n={};return e.assetId!==""&&(n.assetId=e.assetId),e.from!==""&&(n.from=e.from),e.to!==""&&(n.to=e.to),n},create(e){return ft.fromPartial(e??{})},fromPartial(e){let n=hd();return n.assetId=e.assetId??"",n.from=e.from??"",n.to=e.to??"",n}};function yd(){return{logIds:[]}}var ct={encode(e,n=u.default.Writer.create()){for(let t of e.logIds)n.uint32(10).string(t);return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=yd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.logIds.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{logIds:globalThis.Array.isArray(e?.logIds)?e.logIds.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.logIds?.length&&(n.logIds=e.logIds),n},create(e){return ct.fromPartial(e??{})},fromPartial(e){let n=yd();return n.logIds=e.logIds?.map(t=>t)||[],n}};function kd(){return{logFilters:[],handlerId:0,handlerName:""}}var pt={encode(e,n=u.default.Writer.create()){for(let t of e.logFilters)n.uint32(10).string(t);return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=kd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.logFilters.push(t.string());continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{logFilters:globalThis.Array.isArray(e?.logFilters)?e.logFilters.map(n=>globalThis.String(n)):[],handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.logFilters?.length&&(n.logFilters=e.logFilters),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return pt.fromPartial(e??{})},fromPartial(e){let n=kd();return n.logFilters=e.logFilters?.map(t=>t)||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function Sd(){return{topics:[],address:void 0,addressType:void 0}}var gt={encode(e,n=u.default.Writer.create()){for(let t of e.topics)_t.encode(t,n.uint32(10).fork()).ldelim();return e.address!==void 0&&n.uint32(18).string(e.address),e.addressType!==void 0&&n.uint32(24).int32(e.addressType),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Sd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.topics.push(_t.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.address=t.string();continue;case 3:if(r!==24)break;i.addressType=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{topics:globalThis.Array.isArray(e?.topics)?e.topics.map(n=>_t.fromJSON(n)):[],address:l(e.address)?globalThis.String(e.address):void 0,addressType:l(e.addressType)?gp(e.addressType):void 0}},toJSON(e){let n={};return e.topics?.length&&(n.topics=e.topics.map(t=>_t.toJSON(t))),e.address!==void 0&&(n.address=e.address),e.addressType!==void 0&&(n.addressType=mp(e.addressType)),n},create(e){return gt.fromPartial(e??{})},fromPartial(e){let n=Sd();return n.topics=e.topics?.map(t=>_t.fromPartial(t))||[],n.address=e.address??void 0,n.addressType=e.addressType??void 0,n}};function Nd(){return{innerInstruction:!1,parsedInstruction:!1,rawDataInstruction:!1}}var mt={encode(e,n=u.default.Writer.create()){return e.innerInstruction!==!1&&n.uint32(8).bool(e.innerInstruction),e.parsedInstruction!==!1&&n.uint32(16).bool(e.parsedInstruction),e.rawDataInstruction!==!1&&n.uint32(24).bool(e.rawDataInstruction),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Nd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.innerInstruction=t.bool();continue;case 2:if(r!==16)break;i.parsedInstruction=t.bool();continue;case 3:if(r!==24)break;i.rawDataInstruction=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{innerInstruction:l(e.innerInstruction)?globalThis.Boolean(e.innerInstruction):!1,parsedInstruction:l(e.parsedInstruction)?globalThis.Boolean(e.parsedInstruction):!1,rawDataInstruction:l(e.rawDataInstruction)?globalThis.Boolean(e.rawDataInstruction):!1}},toJSON(e){let n={};return e.innerInstruction!==!1&&(n.innerInstruction=e.innerInstruction),e.parsedInstruction!==!1&&(n.parsedInstruction=e.parsedInstruction),e.rawDataInstruction!==!1&&(n.rawDataInstruction=e.rawDataInstruction),n},create(e){return mt.fromPartial(e??{})},fromPartial(e){let n=Nd();return n.innerInstruction=e.innerInstruction??!1,n.parsedInstruction=e.parsedInstruction??!1,n.rawDataInstruction=e.rawDataInstruction??!1,n}};function Td(){return{moveTypePrefix:""}}var ht={encode(e,n=u.default.Writer.create()){return e.moveTypePrefix!==""&&n.uint32(10).string(e.moveTypePrefix),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Td();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.moveTypePrefix=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{moveTypePrefix:l(e.moveTypePrefix)?globalThis.String(e.moveTypePrefix):""}},toJSON(e){let n={};return e.moveTypePrefix!==""&&(n.moveTypePrefix=e.moveTypePrefix),n},create(e){return ht.fromPartial(e??{})},fromPartial(e){let n=Td();return n.moveTypePrefix=e.moveTypePrefix??"",n}};function Cd(){return{resourceChanges:!1,allEvents:!1,inputs:!1,resourceConfig:void 0,supportMultisigFunc:void 0,includeFailedTransaction:void 0}}var ue={encode(e,n=u.default.Writer.create()){return e.resourceChanges!==!1&&n.uint32(8).bool(e.resourceChanges),e.allEvents!==!1&&n.uint32(16).bool(e.allEvents),e.inputs!==!1&&n.uint32(32).bool(e.inputs),e.resourceConfig!==void 0&&ht.encode(e.resourceConfig,n.uint32(26).fork()).ldelim(),e.supportMultisigFunc!==void 0&&n.uint32(40).bool(e.supportMultisigFunc),e.includeFailedTransaction!==void 0&&n.uint32(48).bool(e.includeFailedTransaction),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Cd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.resourceChanges=t.bool();continue;case 2:if(r!==16)break;i.allEvents=t.bool();continue;case 4:if(r!==32)break;i.inputs=t.bool();continue;case 3:if(r!==26)break;i.resourceConfig=ht.decode(t,t.uint32());continue;case 5:if(r!==40)break;i.supportMultisigFunc=t.bool();continue;case 6:if(r!==48)break;i.includeFailedTransaction=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{resourceChanges:l(e.resourceChanges)?globalThis.Boolean(e.resourceChanges):!1,allEvents:l(e.allEvents)?globalThis.Boolean(e.allEvents):!1,inputs:l(e.inputs)?globalThis.Boolean(e.inputs):!1,resourceConfig:l(e.resourceConfig)?ht.fromJSON(e.resourceConfig):void 0,supportMultisigFunc:l(e.supportMultisigFunc)?globalThis.Boolean(e.supportMultisigFunc):void 0,includeFailedTransaction:l(e.includeFailedTransaction)?globalThis.Boolean(e.includeFailedTransaction):void 0}},toJSON(e){let n={};return e.resourceChanges!==!1&&(n.resourceChanges=e.resourceChanges),e.allEvents!==!1&&(n.allEvents=e.allEvents),e.inputs!==!1&&(n.inputs=e.inputs),e.resourceConfig!==void 0&&(n.resourceConfig=ht.toJSON(e.resourceConfig)),e.supportMultisigFunc!==void 0&&(n.supportMultisigFunc=e.supportMultisigFunc),e.includeFailedTransaction!==void 0&&(n.includeFailedTransaction=e.includeFailedTransaction),n},create(e){return ue.fromPartial(e??{})},fromPartial(e){let n=Cd();return n.resourceChanges=e.resourceChanges??!1,n.allEvents=e.allEvents??!1,n.inputs=e.inputs??!1,n.resourceConfig=e.resourceConfig!==void 0&&e.resourceConfig!==null?ht.fromPartial(e.resourceConfig):void 0,n.supportMultisigFunc=e.supportMultisigFunc??void 0,n.includeFailedTransaction=e.includeFailedTransaction??void 0,n}};function Id(){return{owned:!1}}var yt={encode(e,n=u.default.Writer.create()){return e.owned!==!1&&n.uint32(8).bool(e.owned),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Id();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.owned=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{owned:l(e.owned)?globalThis.Boolean(e.owned):!1}},toJSON(e){let n={};return e.owned!==!1&&(n.owned=e.owned),n},create(e){return yt.fromPartial(e??{})},fromPartial(e){let n=Id();return n.owned=e.owned??!1,n}};function Rd(){return{filters:[],handlerId:0,fetchConfig:void 0,handlerName:""}}var kt={encode(e,n=u.default.Writer.create()){for(let t of e.filters)St.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&ue.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Rd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(St.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=ue.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>St.fromJSON(n)):[],handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:l(e.fetchConfig)?ue.fromJSON(e.fetchConfig):void 0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>St.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=ue.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return kt.fromPartial(e??{})},fromPartial(e){let n=Rd();return n.filters=e.filters?.map(t=>St.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?ue.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function Od(){return{type:"",account:"",eventAccount:""}}var St={encode(e,n=u.default.Writer.create()){return e.type!==""&&n.uint32(10).string(e.type),e.account!==""&&n.uint32(18).string(e.account),e.eventAccount!==""&&n.uint32(26).string(e.eventAccount),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Od();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.type=t.string();continue;case 2:if(r!==18)break;i.account=t.string();continue;case 3:if(r!==26)break;i.eventAccount=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{type:l(e.type)?globalThis.String(e.type):"",account:l(e.account)?globalThis.String(e.account):"",eventAccount:l(e.eventAccount)?globalThis.String(e.eventAccount):""}},toJSON(e){let n={};return e.type!==""&&(n.type=e.type),e.account!==""&&(n.account=e.account),e.eventAccount!==""&&(n.eventAccount=e.eventAccount),n},create(e){return St.fromPartial(e??{})},fromPartial(e){let n=Od();return n.type=e.type??"",n.account=e.account??"",n.eventAccount=e.eventAccount??"",n}};function Ed(){return{filters:[],handlerId:0,fetchConfig:void 0,handlerName:""}}var Ye={encode(e,n=u.default.Writer.create()){for(let t of e.filters)Nt.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&ue.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ed();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(Nt.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=ue.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>Nt.fromJSON(n)):[],handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:l(e.fetchConfig)?ue.fromJSON(e.fetchConfig):void 0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>Nt.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=ue.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return Ye.fromPartial(e??{})},fromPartial(e){let n=Ed();return n.filters=e.filters?.map(t=>Nt.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?ue.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function Pd(){return{type:"",includeDeleted:!1,handlerId:0,handlerName:""}}var $e={encode(e,n=u.default.Writer.create()){return e.type!==""&&n.uint32(10).string(e.type),e.includeDeleted!==!1&&n.uint32(32).bool(e.includeDeleted),e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Pd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.type=t.string();continue;case 4:if(r!==32)break;i.includeDeleted=t.bool();continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{type:l(e.type)?globalThis.String(e.type):"",includeDeleted:l(e.includeDeleted)?globalThis.Boolean(e.includeDeleted):!1,handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.type!==""&&(n.type=e.type),e.includeDeleted!==!1&&(n.includeDeleted=e.includeDeleted),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return $e.fromPartial(e??{})},fromPartial(e){let n=Pd();return n.type=e.type??"",n.includeDeleted=e.includeDeleted??!1,n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function _d(){return{function:"",typeArguments:[],withTypeArguments:!1,includeFailed:!1,publicKeyPrefix:"",fromAndToAddress:void 0}}var Nt={encode(e,n=u.default.Writer.create()){e.function!==""&&n.uint32(10).string(e.function);for(let t of e.typeArguments)n.uint32(18).string(t);return e.withTypeArguments!==!1&&n.uint32(24).bool(e.withTypeArguments),e.includeFailed!==!1&&n.uint32(32).bool(e.includeFailed),e.publicKeyPrefix!==""&&n.uint32(42).string(e.publicKeyPrefix),e.fromAndToAddress!==void 0&&Tt.encode(e.fromAndToAddress,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=_d();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.function=t.string();continue;case 2:if(r!==18)break;i.typeArguments.push(t.string());continue;case 3:if(r!==24)break;i.withTypeArguments=t.bool();continue;case 4:if(r!==32)break;i.includeFailed=t.bool();continue;case 5:if(r!==42)break;i.publicKeyPrefix=t.string();continue;case 6:if(r!==50)break;i.fromAndToAddress=Tt.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{function:l(e.function)?globalThis.String(e.function):"",typeArguments:globalThis.Array.isArray(e?.typeArguments)?e.typeArguments.map(n=>globalThis.String(n)):[],withTypeArguments:l(e.withTypeArguments)?globalThis.Boolean(e.withTypeArguments):!1,includeFailed:l(e.includeFailed)?globalThis.Boolean(e.includeFailed):!1,publicKeyPrefix:l(e.publicKeyPrefix)?globalThis.String(e.publicKeyPrefix):"",fromAndToAddress:l(e.fromAndToAddress)?Tt.fromJSON(e.fromAndToAddress):void 0}},toJSON(e){let n={};return e.function!==""&&(n.function=e.function),e.typeArguments?.length&&(n.typeArguments=e.typeArguments),e.withTypeArguments!==!1&&(n.withTypeArguments=e.withTypeArguments),e.includeFailed!==!1&&(n.includeFailed=e.includeFailed),e.publicKeyPrefix!==""&&(n.publicKeyPrefix=e.publicKeyPrefix),e.fromAndToAddress!==void 0&&(n.fromAndToAddress=Tt.toJSON(e.fromAndToAddress)),n},create(e){return Nt.fromPartial(e??{})},fromPartial(e){let n=_d();return n.function=e.function??"",n.typeArguments=e.typeArguments?.map(t=>t)||[],n.withTypeArguments=e.withTypeArguments??!1,n.includeFailed=e.includeFailed??!1,n.publicKeyPrefix=e.publicKeyPrefix??"",n.fromAndToAddress=e.fromAndToAddress!==void 0&&e.fromAndToAddress!==null?Tt.fromPartial(e.fromAndToAddress):void 0,n}};function vd(){return{from:"",to:""}}var Tt={encode(e,n=u.default.Writer.create()){return e.from!==""&&n.uint32(10).string(e.from),e.to!==""&&n.uint32(18).string(e.to),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=vd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.from=t.string();continue;case 2:if(r!==18)break;i.to=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{from:l(e.from)?globalThis.String(e.from):"",to:l(e.to)?globalThis.String(e.to):""}},toJSON(e){let n={};return e.from!==""&&(n.from=e.from),e.to!==""&&(n.to=e.to),n},create(e){return Tt.fromPartial(e??{})},fromPartial(e){let n=vd();return n.from=e.from??"",n.to=e.to??"",n}};function Ad(){return{filters:[],handlerId:0,handlerName:""}}var Ct={encode(e,n=u.default.Writer.create()){for(let t of e.filters)Et.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ad();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(Et.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>Et.fromJSON(n)):[],handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>Et.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return Ct.fromPartial(e??{})},fromPartial(e){let n=Ad();return n.filters=e.filters?.map(t=>Et.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function Bd(){return{filters:[],handlerId:0,handlerName:""}}var It={encode(e,n=u.default.Writer.create()){for(let t of e.filters)je.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Bd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(je.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>je.fromJSON(n)):[],handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>je.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return It.fromPartial(e??{})},fromPartial(e){let n=Bd();return n.filters=e.filters?.map(t=>je.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function bd(){return{inputFilter:void 0,outputFilter:void 0,filter:[]}}var je={encode(e,n=u.default.Writer.create()){e.inputFilter!==void 0&&Rt.encode(e.inputFilter,n.uint32(10).fork()).ldelim(),e.outputFilter!==void 0&&Ot.encode(e.outputFilter,n.uint32(18).fork()).ldelim();for(let t of e.filter)de.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=bd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.inputFilter=Rt.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.outputFilter=Ot.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.filter.push(de.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{inputFilter:l(e.inputFilter)?Rt.fromJSON(e.inputFilter):void 0,outputFilter:l(e.outputFilter)?Ot.fromJSON(e.outputFilter):void 0,filter:globalThis.Array.isArray(e?.filter)?e.filter.map(n=>de.fromJSON(n)):[]}},toJSON(e){let n={};return e.inputFilter!==void 0&&(n.inputFilter=Rt.toJSON(e.inputFilter)),e.outputFilter!==void 0&&(n.outputFilter=Ot.toJSON(e.outputFilter)),e.filter?.length&&(n.filter=e.filter.map(t=>de.toJSON(t))),n},create(e){return je.fromPartial(e??{})},fromPartial(e){let n=bd();return n.inputFilter=e.inputFilter!==void 0&&e.inputFilter!==null?Rt.fromPartial(e.inputFilter):void 0,n.outputFilter=e.outputFilter!==void 0&&e.outputFilter!==null?Ot.fromPartial(e.outputFilter):void 0,n.filter=e.filter?.map(t=>de.fromPartial(t))||[],n}};function Dd(){return{eq:void 0,gt:void 0,gte:void 0,lt:void 0,lte:void 0,ne:void 0,prefix:void 0,contains:void 0,notContains:void 0,lengthEq:void 0,lengthGt:void 0,lengthLt:void 0,hasAny:void 0,hasAll:void 0,in:void 0}}var _n={encode(e,n=u.default.Writer.create()){return e.eq!==void 0&&S.encode(e.eq,n.uint32(10).fork()).ldelim(),e.gt!==void 0&&S.encode(e.gt,n.uint32(18).fork()).ldelim(),e.gte!==void 0&&S.encode(e.gte,n.uint32(26).fork()).ldelim(),e.lt!==void 0&&S.encode(e.lt,n.uint32(34).fork()).ldelim(),e.lte!==void 0&&S.encode(e.lte,n.uint32(42).fork()).ldelim(),e.ne!==void 0&&S.encode(e.ne,n.uint32(50).fork()).ldelim(),e.prefix!==void 0&&n.uint32(58).string(e.prefix),e.contains!==void 0&&n.uint32(66).string(e.contains),e.notContains!==void 0&&n.uint32(74).string(e.notContains),e.lengthEq!==void 0&&n.uint32(80).int32(e.lengthEq),e.lengthGt!==void 0&&n.uint32(88).int32(e.lengthGt),e.lengthLt!==void 0&&n.uint32(96).int32(e.lengthLt),e.hasAny!==void 0&&D.encode(e.hasAny,n.uint32(106).fork()).ldelim(),e.hasAll!==void 0&&D.encode(e.hasAll,n.uint32(114).fork()).ldelim(),e.in!==void 0&&D.encode(e.in,n.uint32(122).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Dd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.eq=S.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.gt=S.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.gte=S.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.lt=S.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.lte=S.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.ne=S.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.prefix=t.string();continue;case 8:if(r!==66)break;i.contains=t.string();continue;case 9:if(r!==74)break;i.notContains=t.string();continue;case 10:if(r!==80)break;i.lengthEq=t.int32();continue;case 11:if(r!==88)break;i.lengthGt=t.int32();continue;case 12:if(r!==96)break;i.lengthLt=t.int32();continue;case 13:if(r!==106)break;i.hasAny=D.decode(t,t.uint32());continue;case 14:if(r!==114)break;i.hasAll=D.decode(t,t.uint32());continue;case 15:if(r!==122)break;i.in=D.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{eq:l(e.eq)?S.fromJSON(e.eq):void 0,gt:l(e.gt)?S.fromJSON(e.gt):void 0,gte:l(e.gte)?S.fromJSON(e.gte):void 0,lt:l(e.lt)?S.fromJSON(e.lt):void 0,lte:l(e.lte)?S.fromJSON(e.lte):void 0,ne:l(e.ne)?S.fromJSON(e.ne):void 0,prefix:l(e.prefix)?globalThis.String(e.prefix):void 0,contains:l(e.contains)?globalThis.String(e.contains):void 0,notContains:l(e.notContains)?globalThis.String(e.notContains):void 0,lengthEq:l(e.lengthEq)?globalThis.Number(e.lengthEq):void 0,lengthGt:l(e.lengthGt)?globalThis.Number(e.lengthGt):void 0,lengthLt:l(e.lengthLt)?globalThis.Number(e.lengthLt):void 0,hasAny:l(e.hasAny)?D.fromJSON(e.hasAny):void 0,hasAll:l(e.hasAll)?D.fromJSON(e.hasAll):void 0,in:l(e.in)?D.fromJSON(e.in):void 0}},toJSON(e){let n={};return e.eq!==void 0&&(n.eq=S.toJSON(e.eq)),e.gt!==void 0&&(n.gt=S.toJSON(e.gt)),e.gte!==void 0&&(n.gte=S.toJSON(e.gte)),e.lt!==void 0&&(n.lt=S.toJSON(e.lt)),e.lte!==void 0&&(n.lte=S.toJSON(e.lte)),e.ne!==void 0&&(n.ne=S.toJSON(e.ne)),e.prefix!==void 0&&(n.prefix=e.prefix),e.contains!==void 0&&(n.contains=e.contains),e.notContains!==void 0&&(n.notContains=e.notContains),e.lengthEq!==void 0&&(n.lengthEq=Math.round(e.lengthEq)),e.lengthGt!==void 0&&(n.lengthGt=Math.round(e.lengthGt)),e.lengthLt!==void 0&&(n.lengthLt=Math.round(e.lengthLt)),e.hasAny!==void 0&&(n.hasAny=D.toJSON(e.hasAny)),e.hasAll!==void 0&&(n.hasAll=D.toJSON(e.hasAll)),e.in!==void 0&&(n.in=D.toJSON(e.in)),n},create(e){return _n.fromPartial(e??{})},fromPartial(e){let n=Dd();return n.eq=e.eq!==void 0&&e.eq!==null?S.fromPartial(e.eq):void 0,n.gt=e.gt!==void 0&&e.gt!==null?S.fromPartial(e.gt):void 0,n.gte=e.gte!==void 0&&e.gte!==null?S.fromPartial(e.gte):void 0,n.lt=e.lt!==void 0&&e.lt!==null?S.fromPartial(e.lt):void 0,n.lte=e.lte!==void 0&&e.lte!==null?S.fromPartial(e.lte):void 0,n.ne=e.ne!==void 0&&e.ne!==null?S.fromPartial(e.ne):void 0,n.prefix=e.prefix??void 0,n.contains=e.contains??void 0,n.notContains=e.notContains??void 0,n.lengthEq=e.lengthEq??void 0,n.lengthGt=e.lengthGt??void 0,n.lengthLt=e.lengthLt??void 0,n.hasAny=e.hasAny!==void 0&&e.hasAny!==null?D.fromPartial(e.hasAny):void 0,n.hasAll=e.hasAll!==void 0&&e.hasAll!==null?D.fromPartial(e.hasAll):void 0,n.in=e.in!==void 0&&e.in!==null?D.fromPartial(e.in):void 0,n}};function Jd(){return{conditions:{}}}var de={encode(e,n=u.default.Writer.create()){return Object.entries(e.conditions).forEach(([t,a])=>{Pa.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Jd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=Pa.decode(t,t.uint32());s.value!==void 0&&(i.conditions[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{conditions:x(e.conditions)?Object.entries(e.conditions).reduce((n,[t,a])=>(n[t]=_n.fromJSON(a),n),{}):{}}},toJSON(e){let n={};if(e.conditions){let t=Object.entries(e.conditions);t.length>0&&(n.conditions={},t.forEach(([a,i])=>{n.conditions[a]=_n.toJSON(i)}))}return n},create(e){return de.fromPartial(e??{})},fromPartial(e){let n=Jd();return n.conditions=Object.entries(e.conditions??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=_n.fromPartial(i)),t),{}),n}};function xd(){return{key:"",value:void 0}}var Pa={encode(e,n=u.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==void 0&&_n.encode(e.value,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=xd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=_n.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:l(e.key)?globalThis.String(e.key):"",value:l(e.value)?_n.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==void 0&&(n.value=_n.toJSON(e.value)),n},create(e){return Pa.fromPartial(e??{})},fromPartial(e){let n=xd();return n.key=e.key??"",n.value=e.value!==void 0&&e.value!==null?_n.fromPartial(e.value):void 0,n}};function Ud(){return{filters:[]}}var en={encode(e,n=u.default.Writer.create()){for(let t of e.filters)de.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ud();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(de.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>de.fromJSON(n)):[]}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>de.toJSON(t))),n},create(e){return en.fromPartial(e??{})},fromPartial(e){let n=Ud();return n.filters=e.filters?.map(t=>de.fromPartial(t))||[],n}};function Vd(){return{filters:void 0,preVOut:void 0,preTransaction:void 0}}var Rt={encode(e,n=u.default.Writer.create()){return e.filters!==void 0&&en.encode(e.filters,n.uint32(10).fork()).ldelim(),e.preVOut!==void 0&&de.encode(e.preVOut,n.uint32(18).fork()).ldelim(),e.preTransaction!==void 0&&je.encode(e.preTransaction,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Vd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters=en.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.preVOut=de.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.preTransaction=je.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:l(e.filters)?en.fromJSON(e.filters):void 0,preVOut:l(e.preVOut)?de.fromJSON(e.preVOut):void 0,preTransaction:l(e.preTransaction)?je.fromJSON(e.preTransaction):void 0}},toJSON(e){let n={};return e.filters!==void 0&&(n.filters=en.toJSON(e.filters)),e.preVOut!==void 0&&(n.preVOut=de.toJSON(e.preVOut)),e.preTransaction!==void 0&&(n.preTransaction=je.toJSON(e.preTransaction)),n},create(e){return Rt.fromPartial(e??{})},fromPartial(e){let n=Vd();return n.filters=e.filters!==void 0&&e.filters!==null?en.fromPartial(e.filters):void 0,n.preVOut=e.preVOut!==void 0&&e.preVOut!==null?de.fromPartial(e.preVOut):void 0,n.preTransaction=e.preTransaction!==void 0&&e.preTransaction!==null?je.fromPartial(e.preTransaction):void 0,n}};function Ld(){return{filters:void 0}}var Ot={encode(e,n=u.default.Writer.create()){return e.filters!==void 0&&en.encode(e.filters,n.uint32(10).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ld();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters=en.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:l(e.filters)?en.fromJSON(e.filters):void 0}},toJSON(e){let n={};return e.filters!==void 0&&(n.filters=en.toJSON(e.filters)),n},create(e){return Ot.fromPartial(e??{})},fromPartial(e){let n=Ld();return n.filters=e.filters!==void 0&&e.filters!==null?en.fromPartial(e.filters):void 0,n}};function Fd(){return{address:"",keys:[]}}var Et={encode(e,n=u.default.Writer.create()){e.address!==""&&n.uint32(10).string(e.address);for(let t of e.keys)n.uint32(18).string(t);return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Fd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.address=t.string();continue;case 2:if(r!==18)break;i.keys.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{address:l(e.address)?globalThis.String(e.address):"",keys:globalThis.Array.isArray(e?.keys)?e.keys.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.address!==""&&(n.address=e.address),e.keys?.length&&(n.keys=e.keys),n},create(e){return Et.fromPartial(e??{})},fromPartial(e){let n=Fd();return n.address=e.address??"",n.keys=e.keys?.map(t=>t)||[],n}};function wd(){return{handlerId:0,handlerName:""}}var Pt={encode(e,n=u.default.Writer.create()){return e.handlerId!==0&&n.uint32(8).int32(e.handlerId),e.handlerName!==""&&n.uint32(18).string(e.handlerName),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=wd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.handlerId=t.int32();continue;case 2:if(r!==18)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{handlerId:l(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:l(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return Pt.fromPartial(e??{})},fromPartial(e){let n=wd();return n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function Md(){return{hashes:[]}}var _t={encode(e,n=u.default.Writer.create()){for(let t of e.hashes)n.uint32(10).string(t);return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Md();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.hashes.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{hashes:globalThis.Array.isArray(e?.hashes)?e.hashes.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.hashes?.length&&(n.hashes=e.hashes),n},create(e){return _t.fromPartial(e??{})},fromPartial(e){let n=Md();return n.hashes=e.hashes?.map(t=>t)||[],n}};function Wd(){return{processId:0,binding:void 0,dbResult:void 0,start:void 0}}var zl={encode(e,n=u.default.Writer.create()){return e.processId!==0&&n.uint32(8).int32(e.processId),e.binding!==void 0&&lr.encode(e.binding,n.uint32(18).fork()).ldelim(),e.dbResult!==void 0&&At.encode(e.dbResult,n.uint32(26).fork()).ldelim(),e.start!==void 0&&n.uint32(32).bool(e.start),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Wd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.processId=t.int32();continue;case 2:if(r!==18)break;i.binding=lr.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.dbResult=At.decode(t,t.uint32());continue;case 4:if(r!==32)break;i.start=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{processId:l(e.processId)?globalThis.Number(e.processId):0,binding:l(e.binding)?lr.fromJSON(e.binding):void 0,dbResult:l(e.dbResult)?At.fromJSON(e.dbResult):void 0,start:l(e.start)?globalThis.Boolean(e.start):void 0}},toJSON(e){let n={};return e.processId!==0&&(n.processId=Math.round(e.processId)),e.binding!==void 0&&(n.binding=lr.toJSON(e.binding)),e.dbResult!==void 0&&(n.dbResult=At.toJSON(e.dbResult)),e.start!==void 0&&(n.start=e.start),n},create(e){return zl.fromPartial(e??{})},fromPartial(e){let n=Wd();return n.processId=e.processId??0,n.binding=e.binding!==void 0&&e.binding!==null?lr.fromPartial(e.binding):void 0,n.dbResult=e.dbResult!==void 0&&e.dbResult!==null?At.fromPartial(e.dbResult):void 0,n.start=e.start??void 0,n}};function qd(){return{partitions:{}}}var vt={encode(e,n=u.default.Writer.create()){return Object.entries(e.partitions).forEach(([t,a])=>{_a.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=qd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=_a.decode(t,t.uint32());s.value!==void 0&&(i.partitions[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{partitions:x(e.partitions)?Object.entries(e.partitions).reduce((n,[t,a])=>(n[globalThis.Number(t)]=vn.fromJSON(a),n),{}):{}}},toJSON(e){let n={};if(e.partitions){let t=Object.entries(e.partitions);t.length>0&&(n.partitions={},t.forEach(([a,i])=>{n.partitions[a]=vn.toJSON(i)}))}return n},create(e){return vt.fromPartial(e??{})},fromPartial(e){let n=qd();return n.partitions=Object.entries(e.partitions??{}).reduce((t,[a,i])=>(i!==void 0&&(t[globalThis.Number(a)]=vn.fromPartial(i)),t),{}),n}};function Gd(){return{userValue:void 0,sysValue:void 0}}var vn={encode(e,n=u.default.Writer.create()){return e.userValue!==void 0&&n.uint32(10).string(e.userValue),e.sysValue!==void 0&&n.uint32(16).int32(e.sysValue),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Gd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.userValue=t.string();continue;case 2:if(r!==16)break;i.sysValue=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{userValue:l(e.userValue)?globalThis.String(e.userValue):void 0,sysValue:l(e.sysValue)?Np(e.sysValue):void 0}},toJSON(e){let n={};return e.userValue!==void 0&&(n.userValue=e.userValue),e.sysValue!==void 0&&(n.sysValue=Tp(e.sysValue)),n},create(e){return vn.fromPartial(e??{})},fromPartial(e){let n=Gd();return n.userValue=e.userValue??void 0,n.sysValue=e.sysValue??void 0,n}};function Hd(){return{key:0,value:void 0}}var _a={encode(e,n=u.default.Writer.create()){return e.key!==0&&n.uint32(8).int32(e.key),e.value!==void 0&&vn.encode(e.value,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Hd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.key=t.int32();continue;case 2:if(r!==18)break;i.value=vn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:l(e.key)?globalThis.Number(e.key):0,value:l(e.value)?vn.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.key!==0&&(n.key=Math.round(e.key)),e.value!==void 0&&(n.value=vn.toJSON(e.value)),n},create(e){return _a.fromPartial(e??{})},fromPartial(e){let n=Hd();return n.key=e.key??0,n.value=e.value!==void 0&&e.value!==null?vn.fromPartial(e.value):void 0,n}};function Qd(){return{processId:0,partitions:void 0,dbRequest:void 0,tsRequest:void 0,tplRequest:void 0,result:void 0}}var Kl={encode(e,n=u.default.Writer.create()){return e.processId!==0&&n.uint32(8).int32(e.processId),e.partitions!==void 0&&vt.encode(e.partitions,n.uint32(18).fork()).ldelim(),e.dbRequest!==void 0&&Ut.encode(e.dbRequest,n.uint32(26).fork()).ldelim(),e.tsRequest!==void 0&&xt.encode(e.tsRequest,n.uint32(34).fork()).ldelim(),e.tplRequest!==void 0&&Jt.encode(e.tplRequest,n.uint32(42).fork()).ldelim(),e.result!==void 0&&Fn.encode(e.result,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Qd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.processId=t.int32();continue;case 2:if(r!==18)break;i.partitions=vt.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.dbRequest=Ut.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.tsRequest=xt.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.tplRequest=Jt.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.result=Fn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{processId:l(e.processId)?globalThis.Number(e.processId):0,partitions:l(e.partitions)?vt.fromJSON(e.partitions):void 0,dbRequest:l(e.dbRequest)?Ut.fromJSON(e.dbRequest):void 0,tsRequest:l(e.tsRequest)?xt.fromJSON(e.tsRequest):void 0,tplRequest:l(e.tplRequest)?Jt.fromJSON(e.tplRequest):void 0,result:l(e.result)?Fn.fromJSON(e.result):void 0}},toJSON(e){let n={};return e.processId!==0&&(n.processId=Math.round(e.processId)),e.partitions!==void 0&&(n.partitions=vt.toJSON(e.partitions)),e.dbRequest!==void 0&&(n.dbRequest=Ut.toJSON(e.dbRequest)),e.tsRequest!==void 0&&(n.tsRequest=xt.toJSON(e.tsRequest)),e.tplRequest!==void 0&&(n.tplRequest=Jt.toJSON(e.tplRequest)),e.result!==void 0&&(n.result=Fn.toJSON(e.result)),n},create(e){return Kl.fromPartial(e??{})},fromPartial(e){let n=Qd();return n.processId=e.processId??0,n.partitions=e.partitions!==void 0&&e.partitions!==null?vt.fromPartial(e.partitions):void 0,n.dbRequest=e.dbRequest!==void 0&&e.dbRequest!==null?Ut.fromPartial(e.dbRequest):void 0,n.tsRequest=e.tsRequest!==void 0&&e.tsRequest!==null?xt.fromPartial(e.tsRequest):void 0,n.tplRequest=e.tplRequest!==void 0&&e.tplRequest!==null?Jt.fromPartial(e.tplRequest):void 0,n.result=e.result!==void 0&&e.result!==null?Fn.fromPartial(e.result):void 0,n}};function Zd(){return{opId:BigInt("0"),data:void 0,list:void 0,error:void 0,entities:void 0,entityList:void 0,nextCursor:void 0}}var At={encode(e,n=u.default.Writer.create()){if(e.opId!==BigInt("0")){if(BigInt.asUintN(64,e.opId)!==e.opId)throw new globalThis.Error("value provided for field message.opId of type uint64 too large");n.uint32(8).uint64(e.opId.toString())}return e.data!==void 0&&p.encode(p.wrap(e.data),n.uint32(18).fork()).ldelim(),e.list!==void 0&&Tn.encode(Tn.wrap(e.list),n.uint32(34).fork()).ldelim(),e.error!==void 0&&n.uint32(26).string(e.error),e.entities!==void 0&&Ln.encode(e.entities,n.uint32(50).fork()).ldelim(),e.entityList!==void 0&&bt.encode(e.entityList,n.uint32(58).fork()).ldelim(),e.nextCursor!==void 0&&n.uint32(42).string(e.nextCursor),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Zd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.opId=K(t.uint64());continue;case 2:if(r!==18)break;i.data=p.unwrap(p.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.list=Tn.unwrap(Tn.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.error=t.string();continue;case 6:if(r!==50)break;i.entities=Ln.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.entityList=bt.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.nextCursor=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{opId:l(e.opId)?BigInt(e.opId):BigInt("0"),data:x(e.data)?e.data:void 0,list:globalThis.Array.isArray(e.list)?[...e.list]:void 0,error:l(e.error)?globalThis.String(e.error):void 0,entities:l(e.entities)?Ln.fromJSON(e.entities):void 0,entityList:l(e.entityList)?bt.fromJSON(e.entityList):void 0,nextCursor:l(e.nextCursor)?globalThis.String(e.nextCursor):void 0}},toJSON(e){let n={};return e.opId!==BigInt("0")&&(n.opId=e.opId.toString()),e.data!==void 0&&(n.data=e.data),e.list!==void 0&&(n.list=e.list),e.error!==void 0&&(n.error=e.error),e.entities!==void 0&&(n.entities=Ln.toJSON(e.entities)),e.entityList!==void 0&&(n.entityList=bt.toJSON(e.entityList)),e.nextCursor!==void 0&&(n.nextCursor=e.nextCursor),n},create(e){return At.fromPartial(e??{})},fromPartial(e){let n=Zd();return n.opId=e.opId??BigInt("0"),n.data=e.data??void 0,n.list=e.list??void 0,n.error=e.error??void 0,n.entities=e.entities!==void 0&&e.entities!==null?Ln.fromPartial(e.entities):void 0,n.entityList=e.entityList!==void 0&&e.entityList!==null?bt.fromPartial(e.entityList):void 0,n.nextCursor=e.nextCursor??void 0,n}};function zd(){return{entity:"",genBlockNumber:BigInt("0"),genBlockChain:"",genBlockTime:void 0,data:void 0}}var Bt={encode(e,n=u.default.Writer.create()){if(e.entity!==""&&n.uint32(10).string(e.entity),e.genBlockNumber!==BigInt("0")){if(BigInt.asUintN(64,e.genBlockNumber)!==e.genBlockNumber)throw new globalThis.Error("value provided for field message.genBlockNumber of type uint64 too large");n.uint32(16).uint64(e.genBlockNumber.toString())}return e.genBlockChain!==""&&n.uint32(26).string(e.genBlockChain),e.genBlockTime!==void 0&&I.encode(me(e.genBlockTime),n.uint32(34).fork()).ldelim(),e.data!==void 0&&_.encode(e.data,n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=zd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity=t.string();continue;case 2:if(r!==16)break;i.genBlockNumber=K(t.uint64());continue;case 3:if(r!==26)break;i.genBlockChain=t.string();continue;case 4:if(r!==34)break;i.genBlockTime=le(I.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.data=_.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:l(e.entity)?globalThis.String(e.entity):"",genBlockNumber:l(e.genBlockNumber)?BigInt(e.genBlockNumber):BigInt("0"),genBlockChain:l(e.genBlockChain)?globalThis.String(e.genBlockChain):"",genBlockTime:l(e.genBlockTime)?he(e.genBlockTime):void 0,data:l(e.data)?_.fromJSON(e.data):void 0}},toJSON(e){let n={};return e.entity!==""&&(n.entity=e.entity),e.genBlockNumber!==BigInt("0")&&(n.genBlockNumber=e.genBlockNumber.toString()),e.genBlockChain!==""&&(n.genBlockChain=e.genBlockChain),e.genBlockTime!==void 0&&(n.genBlockTime=e.genBlockTime.toISOString()),e.data!==void 0&&(n.data=_.toJSON(e.data)),n},create(e){return Bt.fromPartial(e??{})},fromPartial(e){let n=zd();return n.entity=e.entity??"",n.genBlockNumber=e.genBlockNumber??BigInt("0"),n.genBlockChain=e.genBlockChain??"",n.genBlockTime=e.genBlockTime??void 0,n.data=e.data!==void 0&&e.data!==null?_.fromPartial(e.data):void 0,n}};function Kd(){return{entities:[]}}var bt={encode(e,n=u.default.Writer.create()){for(let t of e.entities)Bt.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Kd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entities.push(Bt.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entities:globalThis.Array.isArray(e?.entities)?e.entities.map(n=>Bt.fromJSON(n)):[]}},toJSON(e){let n={};return e.entities?.length&&(n.entities=e.entities.map(t=>Bt.toJSON(t))),n},create(e){return bt.fromPartial(e??{})},fromPartial(e){let n=Kd();return n.entities=e.entities?.map(t=>Bt.fromPartial(t))||[],n}};function Xd(){return{fields:{}}}var Dt={encode(e,n=u.default.Writer.create()){return Object.entries(e.fields).forEach(([t,a])=>{va.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Xd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=va.decode(t,t.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{fields:x(e.fields)?Object.entries(e.fields).reduce((n,[t,a])=>(n[t]=An.fromJSON(a),n),{}):{}}},toJSON(e){let n={};if(e.fields){let t=Object.entries(e.fields);t.length>0&&(n.fields={},t.forEach(([a,i])=>{n.fields[a]=An.toJSON(i)}))}return n},create(e){return Dt.fromPartial(e??{})},fromPartial(e){let n=Xd();return n.fields=Object.entries(e.fields??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=An.fromPartial(i)),t),{}),n}};function Yd(){return{value:void 0,op:0}}var An={encode(e,n=u.default.Writer.create()){return e.value!==void 0&&S.encode(e.value,n.uint32(10).fork()).ldelim(),e.op!==0&&n.uint32(16).int32(e.op),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Yd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.value=S.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.op=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{value:l(e.value)?S.fromJSON(e.value):void 0,op:l(e.op)?Cp(e.op):0}},toJSON(e){let n={};return e.value!==void 0&&(n.value=S.toJSON(e.value)),e.op!==0&&(n.op=Ip(e.op)),n},create(e){return An.fromPartial(e??{})},fromPartial(e){let n=Yd();return n.value=e.value!==void 0&&e.value!==null?S.fromPartial(e.value):void 0,n.op=e.op??0,n}};function $d(){return{key:"",value:void 0}}var va={encode(e,n=u.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==void 0&&An.encode(e.value,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=$d();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=An.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:l(e.key)?globalThis.String(e.key):"",value:l(e.value)?An.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==void 0&&(n.value=An.toJSON(e.value)),n},create(e){return va.fromPartial(e??{})},fromPartial(e){let n=$d();return n.key=e.key??"",n.value=e.value!==void 0&&e.value!==null?An.fromPartial(e.value):void 0,n}};function jd(){return{templates:[]}}var Jt={encode(e,n=u.default.Writer.create()){for(let t of e.templates)H.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=jd();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.templates.push(H.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{templates:globalThis.Array.isArray(e?.templates)?e.templates.map(n=>H.fromJSON(n)):[]}},toJSON(e){let n={};return e.templates?.length&&(n.templates=e.templates.map(t=>H.toJSON(t))),n},create(e){return Jt.fromPartial(e??{})},fromPartial(e){let n=jd();return n.templates=e.templates?.map(t=>H.fromPartial(t))||[],n}};function el(){return{data:[]}}var xt={encode(e,n=u.default.Writer.create()){for(let t of e.data)tn.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=el();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.data.push(tn.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{data:globalThis.Array.isArray(e?.data)?e.data.map(n=>tn.fromJSON(n)):[]}},toJSON(e){let n={};return e.data?.length&&(n.data=e.data.map(t=>tn.toJSON(t))),n},create(e){return xt.fromPartial(e??{})},fromPartial(e){let n=el();return n.data=e.data?.map(t=>tn.fromPartial(t))||[],n}};function nl(){return{opId:BigInt("0"),get:void 0,upsert:void 0,update:void 0,delete:void 0,list:void 0}}var Ut={encode(e,n=u.default.Writer.create()){if(e.opId!==BigInt("0")){if(BigInt.asUintN(64,e.opId)!==e.opId)throw new globalThis.Error("value provided for field message.opId of type uint64 too large");n.uint32(8).uint64(e.opId.toString())}return e.get!==void 0&&Vt.encode(e.get,n.uint32(18).fork()).ldelim(),e.upsert!==void 0&&Ft.encode(e.upsert,n.uint32(26).fork()).ldelim(),e.update!==void 0&&wt.encode(e.update,n.uint32(50).fork()).ldelim(),e.delete!==void 0&&Mt.encode(e.delete,n.uint32(34).fork()).ldelim(),e.list!==void 0&&Lt.encode(e.list,n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=nl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.opId=K(t.uint64());continue;case 2:if(r!==18)break;i.get=Vt.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.upsert=Ft.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.update=wt.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.delete=Mt.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.list=Lt.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{opId:l(e.opId)?BigInt(e.opId):BigInt("0"),get:l(e.get)?Vt.fromJSON(e.get):void 0,upsert:l(e.upsert)?Ft.fromJSON(e.upsert):void 0,update:l(e.update)?wt.fromJSON(e.update):void 0,delete:l(e.delete)?Mt.fromJSON(e.delete):void 0,list:l(e.list)?Lt.fromJSON(e.list):void 0}},toJSON(e){let n={};return e.opId!==BigInt("0")&&(n.opId=e.opId.toString()),e.get!==void 0&&(n.get=Vt.toJSON(e.get)),e.upsert!==void 0&&(n.upsert=Ft.toJSON(e.upsert)),e.update!==void 0&&(n.update=wt.toJSON(e.update)),e.delete!==void 0&&(n.delete=Mt.toJSON(e.delete)),e.list!==void 0&&(n.list=Lt.toJSON(e.list)),n},create(e){return Ut.fromPartial(e??{})},fromPartial(e){let n=nl();return n.opId=e.opId??BigInt("0"),n.get=e.get!==void 0&&e.get!==null?Vt.fromPartial(e.get):void 0,n.upsert=e.upsert!==void 0&&e.upsert!==null?Ft.fromPartial(e.upsert):void 0,n.update=e.update!==void 0&&e.update!==null?wt.fromPartial(e.update):void 0,n.delete=e.delete!==void 0&&e.delete!==null?Mt.fromPartial(e.delete):void 0,n.list=e.list!==void 0&&e.list!==null?Lt.fromPartial(e.list):void 0,n}};function tl(){return{entity:"",id:""}}var Vt={encode(e,n=u.default.Writer.create()){return e.entity!==""&&n.uint32(10).string(e.entity),e.id!==""&&n.uint32(18).string(e.id),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=tl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity=t.string();continue;case 2:if(r!==18)break;i.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:l(e.entity)?globalThis.String(e.entity):"",id:l(e.id)?globalThis.String(e.id):""}},toJSON(e){let n={};return e.entity!==""&&(n.entity=e.entity),e.id!==""&&(n.id=e.id),n},create(e){return Vt.fromPartial(e??{})},fromPartial(e){let n=tl();return n.entity=e.entity??"",n.id=e.id??"",n}};function rl(){return{entity:"",filters:[],cursor:"",pageSize:void 0}}var Lt={encode(e,n=u.default.Writer.create()){e.entity!==""&&n.uint32(10).string(e.entity);for(let t of e.filters)Wt.encode(t,n.uint32(34).fork()).ldelim();return e.cursor!==""&&n.uint32(42).string(e.cursor),e.pageSize!==void 0&&n.uint32(48).uint32(e.pageSize),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=rl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity=t.string();continue;case 4:if(r!==34)break;i.filters.push(Wt.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.cursor=t.string();continue;case 6:if(r!==48)break;i.pageSize=t.uint32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:l(e.entity)?globalThis.String(e.entity):"",filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>Wt.fromJSON(n)):[],cursor:l(e.cursor)?globalThis.String(e.cursor):"",pageSize:l(e.pageSize)?globalThis.Number(e.pageSize):void 0}},toJSON(e){let n={};return e.entity!==""&&(n.entity=e.entity),e.filters?.length&&(n.filters=e.filters.map(t=>Wt.toJSON(t))),e.cursor!==""&&(n.cursor=e.cursor),e.pageSize!==void 0&&(n.pageSize=Math.round(e.pageSize)),n},create(e){return Lt.fromPartial(e??{})},fromPartial(e){let n=rl();return n.entity=e.entity??"",n.filters=e.filters?.map(t=>Wt.fromPartial(t))||[],n.cursor=e.cursor??"",n.pageSize=e.pageSize??void 0,n}};function il(){return{entity:[],id:[],data:[],entityData:[]}}var Ft={encode(e,n=u.default.Writer.create()){for(let t of e.entity)n.uint32(10).string(t);for(let t of e.id)n.uint32(18).string(t);for(let t of e.data)p.encode(p.wrap(t),n.uint32(26).fork()).ldelim();for(let t of e.entityData)_.encode(t,n.uint32(34).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=il();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity.push(t.string());continue;case 2:if(r!==18)break;i.id.push(t.string());continue;case 3:if(r!==26)break;i.data.push(p.unwrap(p.decode(t,t.uint32())));continue;case 4:if(r!==34)break;i.entityData.push(_.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(n=>globalThis.String(n)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(n=>globalThis.String(n)):[],data:globalThis.Array.isArray(e?.data)?[...e.data]:[],entityData:globalThis.Array.isArray(e?.entityData)?e.entityData.map(n=>_.fromJSON(n)):[]}},toJSON(e){let n={};return e.entity?.length&&(n.entity=e.entity),e.id?.length&&(n.id=e.id),e.data?.length&&(n.data=e.data),e.entityData?.length&&(n.entityData=e.entityData.map(t=>_.toJSON(t))),n},create(e){return Ft.fromPartial(e??{})},fromPartial(e){let n=il();return n.entity=e.entity?.map(t=>t)||[],n.id=e.id?.map(t=>t)||[],n.data=e.data?.map(t=>t)||[],n.entityData=e.entityData?.map(t=>_.fromPartial(t))||[],n}};function al(){return{entity:[],id:[],entityData:[]}}var wt={encode(e,n=u.default.Writer.create()){for(let t of e.entity)n.uint32(10).string(t);for(let t of e.id)n.uint32(18).string(t);for(let t of e.entityData)Dt.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=al();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity.push(t.string());continue;case 2:if(r!==18)break;i.id.push(t.string());continue;case 3:if(r!==26)break;i.entityData.push(Dt.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(n=>globalThis.String(n)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(n=>globalThis.String(n)):[],entityData:globalThis.Array.isArray(e?.entityData)?e.entityData.map(n=>Dt.fromJSON(n)):[]}},toJSON(e){let n={};return e.entity?.length&&(n.entity=e.entity),e.id?.length&&(n.id=e.id),e.entityData?.length&&(n.entityData=e.entityData.map(t=>Dt.toJSON(t))),n},create(e){return wt.fromPartial(e??{})},fromPartial(e){let n=al();return n.entity=e.entity?.map(t=>t)||[],n.id=e.id?.map(t=>t)||[],n.entityData=e.entityData?.map(t=>Dt.fromPartial(t))||[],n}};function ol(){return{entity:[],id:[]}}var Mt={encode(e,n=u.default.Writer.create()){for(let t of e.entity)n.uint32(10).string(t);for(let t of e.id)n.uint32(18).string(t);return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ol();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity.push(t.string());continue;case 2:if(r!==18)break;i.id.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(n=>globalThis.String(n)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.entity?.length&&(n.entity=e.entity),e.id?.length&&(n.id=e.id),n},create(e){return Mt.fromPartial(e??{})},fromPartial(e){let n=ol();return n.entity=e.entity?.map(t=>t)||[],n.id=e.id?.map(t=>t)||[],n}};function ul(){return{field:"",op:0,value:void 0}}var Wt={encode(e,n=u.default.Writer.create()){return e.field!==""&&n.uint32(10).string(e.field),e.op!==0&&n.uint32(16).int32(e.op),e.value!==void 0&&D.encode(e.value,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ul();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.field=t.string();continue;case 2:if(r!==16)break;i.op=t.int32();continue;case 3:if(r!==26)break;i.value=D.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{field:l(e.field)?globalThis.String(e.field):"",op:l(e.op)?Rp(e.op):0,value:l(e.value)?D.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.field!==""&&(n.field=e.field),e.op!==0&&(n.op=Op(e.op)),e.value!==void 0&&(n.value=D.toJSON(e.value)),n},create(e){return Wt.fromPartial(e??{})},fromPartial(e){let n=ul();return n.field=e.field??"",n.op=e.op??0,n.value=e.value!==void 0&&e.value!==null?D.fromPartial(e.value):void 0,n}};function dl(){return{ethLog:void 0,ethBlock:void 0,ethTransaction:void 0,ethTrace:void 0,solInstruction:void 0,aptEvent:void 0,aptCall:void 0,aptResource:void 0,suiEvent:void 0,suiCall:void 0,suiObject:void 0,suiObjectChange:void 0,fuelLog:void 0,fuelTransaction:void 0,fuelBlock:void 0,cosmosCall:void 0,starknetEvents:void 0,btcTransaction:void 0,btcBlock:void 0}}var qt={encode(e,n=u.default.Writer.create()){return e.ethLog!==void 0&&Gt.encode(e.ethLog,n.uint32(18).fork()).ldelim(),e.ethBlock!==void 0&&Ht.encode(e.ethBlock,n.uint32(26).fork()).ldelim(),e.ethTransaction!==void 0&&Qt.encode(e.ethTransaction,n.uint32(34).fork()).ldelim(),e.ethTrace!==void 0&&Zt.encode(e.ethTrace,n.uint32(42).fork()).ldelim(),e.solInstruction!==void 0&&zt.encode(e.solInstruction,n.uint32(50).fork()).ldelim(),e.aptEvent!==void 0&&Kt.encode(e.aptEvent,n.uint32(58).fork()).ldelim(),e.aptCall!==void 0&&Xt.encode(e.aptCall,n.uint32(66).fork()).ldelim(),e.aptResource!==void 0&&Yt.encode(e.aptResource,n.uint32(74).fork()).ldelim(),e.suiEvent!==void 0&&$t.encode(e.suiEvent,n.uint32(82).fork()).ldelim(),e.suiCall!==void 0&&jt.encode(e.suiCall,n.uint32(90).fork()).ldelim(),e.suiObject!==void 0&&er.encode(e.suiObject,n.uint32(98).fork()).ldelim(),e.suiObjectChange!==void 0&&nr.encode(e.suiObjectChange,n.uint32(106).fork()).ldelim(),e.fuelLog!==void 0&&tr.encode(e.fuelLog,n.uint32(162).fork()).ldelim(),e.fuelTransaction!==void 0&&rr.encode(e.fuelTransaction,n.uint32(170).fork()).ldelim(),e.fuelBlock!==void 0&&ir.encode(e.fuelBlock,n.uint32(146).fork()).ldelim(),e.cosmosCall!==void 0&&ar.encode(e.cosmosCall,n.uint32(122).fork()).ldelim(),e.starknetEvents!==void 0&&or.encode(e.starknetEvents,n.uint32(130).fork()).ldelim(),e.btcTransaction!==void 0&&ur.encode(e.btcTransaction,n.uint32(138).fork()).ldelim(),e.btcBlock!==void 0&&dr.encode(e.btcBlock,n.uint32(154).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=dl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.ethLog=Gt.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.ethBlock=Ht.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.ethTransaction=Qt.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.ethTrace=Zt.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.solInstruction=zt.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.aptEvent=Kt.decode(t,t.uint32());continue;case 8:if(r!==66)break;i.aptCall=Xt.decode(t,t.uint32());continue;case 9:if(r!==74)break;i.aptResource=Yt.decode(t,t.uint32());continue;case 10:if(r!==82)break;i.suiEvent=$t.decode(t,t.uint32());continue;case 11:if(r!==90)break;i.suiCall=jt.decode(t,t.uint32());continue;case 12:if(r!==98)break;i.suiObject=er.decode(t,t.uint32());continue;case 13:if(r!==106)break;i.suiObjectChange=nr.decode(t,t.uint32());continue;case 20:if(r!==162)break;i.fuelLog=tr.decode(t,t.uint32());continue;case 21:if(r!==170)break;i.fuelTransaction=rr.decode(t,t.uint32());continue;case 18:if(r!==146)break;i.fuelBlock=ir.decode(t,t.uint32());continue;case 15:if(r!==122)break;i.cosmosCall=ar.decode(t,t.uint32());continue;case 16:if(r!==130)break;i.starknetEvents=or.decode(t,t.uint32());continue;case 17:if(r!==138)break;i.btcTransaction=ur.decode(t,t.uint32());continue;case 19:if(r!==154)break;i.btcBlock=dr.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{ethLog:l(e.ethLog)?Gt.fromJSON(e.ethLog):void 0,ethBlock:l(e.ethBlock)?Ht.fromJSON(e.ethBlock):void 0,ethTransaction:l(e.ethTransaction)?Qt.fromJSON(e.ethTransaction):void 0,ethTrace:l(e.ethTrace)?Zt.fromJSON(e.ethTrace):void 0,solInstruction:l(e.solInstruction)?zt.fromJSON(e.solInstruction):void 0,aptEvent:l(e.aptEvent)?Kt.fromJSON(e.aptEvent):void 0,aptCall:l(e.aptCall)?Xt.fromJSON(e.aptCall):void 0,aptResource:l(e.aptResource)?Yt.fromJSON(e.aptResource):void 0,suiEvent:l(e.suiEvent)?$t.fromJSON(e.suiEvent):void 0,suiCall:l(e.suiCall)?jt.fromJSON(e.suiCall):void 0,suiObject:l(e.suiObject)?er.fromJSON(e.suiObject):void 0,suiObjectChange:l(e.suiObjectChange)?nr.fromJSON(e.suiObjectChange):void 0,fuelLog:l(e.fuelLog)?tr.fromJSON(e.fuelLog):void 0,fuelTransaction:l(e.fuelTransaction)?rr.fromJSON(e.fuelTransaction):void 0,fuelBlock:l(e.fuelBlock)?ir.fromJSON(e.fuelBlock):void 0,cosmosCall:l(e.cosmosCall)?ar.fromJSON(e.cosmosCall):void 0,starknetEvents:l(e.starknetEvents)?or.fromJSON(e.starknetEvents):void 0,btcTransaction:l(e.btcTransaction)?ur.fromJSON(e.btcTransaction):void 0,btcBlock:l(e.btcBlock)?dr.fromJSON(e.btcBlock):void 0}},toJSON(e){let n={};return e.ethLog!==void 0&&(n.ethLog=Gt.toJSON(e.ethLog)),e.ethBlock!==void 0&&(n.ethBlock=Ht.toJSON(e.ethBlock)),e.ethTransaction!==void 0&&(n.ethTransaction=Qt.toJSON(e.ethTransaction)),e.ethTrace!==void 0&&(n.ethTrace=Zt.toJSON(e.ethTrace)),e.solInstruction!==void 0&&(n.solInstruction=zt.toJSON(e.solInstruction)),e.aptEvent!==void 0&&(n.aptEvent=Kt.toJSON(e.aptEvent)),e.aptCall!==void 0&&(n.aptCall=Xt.toJSON(e.aptCall)),e.aptResource!==void 0&&(n.aptResource=Yt.toJSON(e.aptResource)),e.suiEvent!==void 0&&(n.suiEvent=$t.toJSON(e.suiEvent)),e.suiCall!==void 0&&(n.suiCall=jt.toJSON(e.suiCall)),e.suiObject!==void 0&&(n.suiObject=er.toJSON(e.suiObject)),e.suiObjectChange!==void 0&&(n.suiObjectChange=nr.toJSON(e.suiObjectChange)),e.fuelLog!==void 0&&(n.fuelLog=tr.toJSON(e.fuelLog)),e.fuelTransaction!==void 0&&(n.fuelTransaction=rr.toJSON(e.fuelTransaction)),e.fuelBlock!==void 0&&(n.fuelBlock=ir.toJSON(e.fuelBlock)),e.cosmosCall!==void 0&&(n.cosmosCall=ar.toJSON(e.cosmosCall)),e.starknetEvents!==void 0&&(n.starknetEvents=or.toJSON(e.starknetEvents)),e.btcTransaction!==void 0&&(n.btcTransaction=ur.toJSON(e.btcTransaction)),e.btcBlock!==void 0&&(n.btcBlock=dr.toJSON(e.btcBlock)),n},create(e){return qt.fromPartial(e??{})},fromPartial(e){let n=dl();return n.ethLog=e.ethLog!==void 0&&e.ethLog!==null?Gt.fromPartial(e.ethLog):void 0,n.ethBlock=e.ethBlock!==void 0&&e.ethBlock!==null?Ht.fromPartial(e.ethBlock):void 0,n.ethTransaction=e.ethTransaction!==void 0&&e.ethTransaction!==null?Qt.fromPartial(e.ethTransaction):void 0,n.ethTrace=e.ethTrace!==void 0&&e.ethTrace!==null?Zt.fromPartial(e.ethTrace):void 0,n.solInstruction=e.solInstruction!==void 0&&e.solInstruction!==null?zt.fromPartial(e.solInstruction):void 0,n.aptEvent=e.aptEvent!==void 0&&e.aptEvent!==null?Kt.fromPartial(e.aptEvent):void 0,n.aptCall=e.aptCall!==void 0&&e.aptCall!==null?Xt.fromPartial(e.aptCall):void 0,n.aptResource=e.aptResource!==void 0&&e.aptResource!==null?Yt.fromPartial(e.aptResource):void 0,n.suiEvent=e.suiEvent!==void 0&&e.suiEvent!==null?$t.fromPartial(e.suiEvent):void 0,n.suiCall=e.suiCall!==void 0&&e.suiCall!==null?jt.fromPartial(e.suiCall):void 0,n.suiObject=e.suiObject!==void 0&&e.suiObject!==null?er.fromPartial(e.suiObject):void 0,n.suiObjectChange=e.suiObjectChange!==void 0&&e.suiObjectChange!==null?nr.fromPartial(e.suiObjectChange):void 0,n.fuelLog=e.fuelLog!==void 0&&e.fuelLog!==null?tr.fromPartial(e.fuelLog):void 0,n.fuelTransaction=e.fuelTransaction!==void 0&&e.fuelTransaction!==null?rr.fromPartial(e.fuelTransaction):void 0,n.fuelBlock=e.fuelBlock!==void 0&&e.fuelBlock!==null?ir.fromPartial(e.fuelBlock):void 0,n.cosmosCall=e.cosmosCall!==void 0&&e.cosmosCall!==null?ar.fromPartial(e.cosmosCall):void 0,n.starknetEvents=e.starknetEvents!==void 0&&e.starknetEvents!==null?or.fromPartial(e.starknetEvents):void 0,n.btcTransaction=e.btcTransaction!==void 0&&e.btcTransaction!==null?ur.fromPartial(e.btcTransaction):void 0,n.btcBlock=e.btcBlock!==void 0&&e.btcBlock!==null?dr.fromPartial(e.btcBlock):void 0,n}};function ll(){return{log:void 0,timestamp:void 0,transaction:void 0,transactionReceipt:void 0,block:void 0,rawLog:"",rawTransaction:void 0,rawTransactionReceipt:void 0,rawBlock:void 0}}var Gt={encode(e,n=u.default.Writer.create()){return e.log!==void 0&&p.encode(p.wrap(e.log),n.uint32(26).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(34).fork()).ldelim(),e.transaction!==void 0&&p.encode(p.wrap(e.transaction),n.uint32(18).fork()).ldelim(),e.transactionReceipt!==void 0&&p.encode(p.wrap(e.transactionReceipt),n.uint32(42).fork()).ldelim(),e.block!==void 0&&p.encode(p.wrap(e.block),n.uint32(50).fork()).ldelim(),e.rawLog!==""&&n.uint32(58).string(e.rawLog),e.rawTransaction!==void 0&&n.uint32(66).string(e.rawTransaction),e.rawTransactionReceipt!==void 0&&n.uint32(74).string(e.rawTransactionReceipt),e.rawBlock!==void 0&&n.uint32(82).string(e.rawBlock),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ll();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 3:if(r!==26)break;i.log=p.unwrap(p.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.timestamp=le(I.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.transaction=p.unwrap(p.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.transactionReceipt=p.unwrap(p.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.block=p.unwrap(p.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.rawLog=t.string();continue;case 8:if(r!==66)break;i.rawTransaction=t.string();continue;case 9:if(r!==74)break;i.rawTransactionReceipt=t.string();continue;case 10:if(r!==82)break;i.rawBlock=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{log:x(e.log)?e.log:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0,transaction:x(e.transaction)?e.transaction:void 0,transactionReceipt:x(e.transactionReceipt)?e.transactionReceipt:void 0,block:x(e.block)?e.block:void 0,rawLog:l(e.rawLog)?globalThis.String(e.rawLog):"",rawTransaction:l(e.rawTransaction)?globalThis.String(e.rawTransaction):void 0,rawTransactionReceipt:l(e.rawTransactionReceipt)?globalThis.String(e.rawTransactionReceipt):void 0,rawBlock:l(e.rawBlock)?globalThis.String(e.rawBlock):void 0}},toJSON(e){let n={};return e.log!==void 0&&(n.log=e.log),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.transaction!==void 0&&(n.transaction=e.transaction),e.transactionReceipt!==void 0&&(n.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(n.block=e.block),e.rawLog!==""&&(n.rawLog=e.rawLog),e.rawTransaction!==void 0&&(n.rawTransaction=e.rawTransaction),e.rawTransactionReceipt!==void 0&&(n.rawTransactionReceipt=e.rawTransactionReceipt),e.rawBlock!==void 0&&(n.rawBlock=e.rawBlock),n},create(e){return Gt.fromPartial(e??{})},fromPartial(e){let n=ll();return n.log=e.log??void 0,n.timestamp=e.timestamp??void 0,n.transaction=e.transaction??void 0,n.transactionReceipt=e.transactionReceipt??void 0,n.block=e.block??void 0,n.rawLog=e.rawLog??"",n.rawTransaction=e.rawTransaction??void 0,n.rawTransactionReceipt=e.rawTransactionReceipt??void 0,n.rawBlock=e.rawBlock??void 0,n}};function sl(){return{block:void 0}}var Ht={encode(e,n=u.default.Writer.create()){return e.block!==void 0&&p.encode(p.wrap(e.block),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=sl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.block=p.unwrap(p.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{block:x(e.block)?e.block:void 0}},toJSON(e){let n={};return e.block!==void 0&&(n.block=e.block),n},create(e){return Ht.fromPartial(e??{})},fromPartial(e){let n=sl();return n.block=e.block??void 0,n}};function fl(){return{transaction:void 0,timestamp:void 0,transactionReceipt:void 0,block:void 0,trace:void 0,rawTransaction:"",rawTransactionReceipt:void 0,rawBlock:void 0,rawTrace:void 0}}var Qt={encode(e,n=u.default.Writer.create()){return e.transaction!==void 0&&p.encode(p.wrap(e.transaction),n.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(42).fork()).ldelim(),e.transactionReceipt!==void 0&&p.encode(p.wrap(e.transactionReceipt),n.uint32(26).fork()).ldelim(),e.block!==void 0&&p.encode(p.wrap(e.block),n.uint32(50).fork()).ldelim(),e.trace!==void 0&&p.encode(p.wrap(e.trace),n.uint32(58).fork()).ldelim(),e.rawTransaction!==""&&n.uint32(66).string(e.rawTransaction),e.rawTransactionReceipt!==void 0&&n.uint32(74).string(e.rawTransactionReceipt),e.rawBlock!==void 0&&n.uint32(82).string(e.rawBlock),e.rawTrace!==void 0&&n.uint32(90).string(e.rawTrace),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=fl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.transaction=p.unwrap(p.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.timestamp=le(I.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.transactionReceipt=p.unwrap(p.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.block=p.unwrap(p.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.trace=p.unwrap(p.decode(t,t.uint32()));continue;case 8:if(r!==66)break;i.rawTransaction=t.string();continue;case 9:if(r!==74)break;i.rawTransactionReceipt=t.string();continue;case 10:if(r!==82)break;i.rawBlock=t.string();continue;case 11:if(r!==90)break;i.rawTrace=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:x(e.transaction)?e.transaction:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0,transactionReceipt:x(e.transactionReceipt)?e.transactionReceipt:void 0,block:x(e.block)?e.block:void 0,trace:x(e.trace)?e.trace:void 0,rawTransaction:l(e.rawTransaction)?globalThis.String(e.rawTransaction):"",rawTransactionReceipt:l(e.rawTransactionReceipt)?globalThis.String(e.rawTransactionReceipt):void 0,rawBlock:l(e.rawBlock)?globalThis.String(e.rawBlock):void 0,rawTrace:l(e.rawTrace)?globalThis.String(e.rawTrace):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.transactionReceipt!==void 0&&(n.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(n.block=e.block),e.trace!==void 0&&(n.trace=e.trace),e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),e.rawTransactionReceipt!==void 0&&(n.rawTransactionReceipt=e.rawTransactionReceipt),e.rawBlock!==void 0&&(n.rawBlock=e.rawBlock),e.rawTrace!==void 0&&(n.rawTrace=e.rawTrace),n},create(e){return Qt.fromPartial(e??{})},fromPartial(e){let n=fl();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n.transactionReceipt=e.transactionReceipt??void 0,n.block=e.block??void 0,n.trace=e.trace??void 0,n.rawTransaction=e.rawTransaction??"",n.rawTransactionReceipt=e.rawTransactionReceipt??void 0,n.rawBlock=e.rawBlock??void 0,n.rawTrace=e.rawTrace??void 0,n}};function cl(){return{trace:void 0,timestamp:void 0,transaction:void 0,transactionReceipt:void 0,block:void 0}}var Zt={encode(e,n=u.default.Writer.create()){return e.trace!==void 0&&p.encode(p.wrap(e.trace),n.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(42).fork()).ldelim(),e.transaction!==void 0&&p.encode(p.wrap(e.transaction),n.uint32(18).fork()).ldelim(),e.transactionReceipt!==void 0&&p.encode(p.wrap(e.transactionReceipt),n.uint32(26).fork()).ldelim(),e.block!==void 0&&p.encode(p.wrap(e.block),n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=cl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.trace=p.unwrap(p.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.timestamp=le(I.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.transaction=p.unwrap(p.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.transactionReceipt=p.unwrap(p.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.block=p.unwrap(p.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{trace:x(e.trace)?e.trace:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0,transaction:x(e.transaction)?e.transaction:void 0,transactionReceipt:x(e.transactionReceipt)?e.transactionReceipt:void 0,block:x(e.block)?e.block:void 0}},toJSON(e){let n={};return e.trace!==void 0&&(n.trace=e.trace),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.transaction!==void 0&&(n.transaction=e.transaction),e.transactionReceipt!==void 0&&(n.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(n.block=e.block),n},create(e){return Zt.fromPartial(e??{})},fromPartial(e){let n=cl();return n.trace=e.trace??void 0,n.timestamp=e.timestamp??void 0,n.transaction=e.transaction??void 0,n.transactionReceipt=e.transactionReceipt??void 0,n.block=e.block??void 0,n}};function pl(){return{instructionData:"",slot:BigInt("0"),programAccountId:"",accounts:[],parsed:void 0}}var zt={encode(e,n=u.default.Writer.create()){if(e.instructionData!==""&&n.uint32(10).string(e.instructionData),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(16).uint64(e.slot.toString())}e.programAccountId!==""&&n.uint32(26).string(e.programAccountId);for(let t of e.accounts)n.uint32(42).string(t);return e.parsed!==void 0&&p.encode(p.wrap(e.parsed),n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=pl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.instructionData=t.string();continue;case 2:if(r!==16)break;i.slot=K(t.uint64());continue;case 3:if(r!==26)break;i.programAccountId=t.string();continue;case 5:if(r!==42)break;i.accounts.push(t.string());continue;case 4:if(r!==34)break;i.parsed=p.unwrap(p.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{instructionData:l(e.instructionData)?globalThis.String(e.instructionData):"",slot:l(e.slot)?BigInt(e.slot):BigInt("0"),programAccountId:l(e.programAccountId)?globalThis.String(e.programAccountId):"",accounts:globalThis.Array.isArray(e?.accounts)?e.accounts.map(n=>globalThis.String(n)):[],parsed:x(e.parsed)?e.parsed:void 0}},toJSON(e){let n={};return e.instructionData!==""&&(n.instructionData=e.instructionData),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),e.programAccountId!==""&&(n.programAccountId=e.programAccountId),e.accounts?.length&&(n.accounts=e.accounts),e.parsed!==void 0&&(n.parsed=e.parsed),n},create(e){return zt.fromPartial(e??{})},fromPartial(e){let n=pl();return n.instructionData=e.instructionData??"",n.slot=e.slot??BigInt("0"),n.programAccountId=e.programAccountId??"",n.accounts=e.accounts?.map(t=>t)||[],n.parsed=e.parsed??void 0,n}};function gl(){return{rawEvent:"",eventIndex:0,rawTransaction:""}}var Kt={encode(e,n=u.default.Writer.create()){return e.rawEvent!==""&&n.uint32(10).string(e.rawEvent),e.eventIndex!==0&&n.uint32(32).int32(e.eventIndex),e.rawTransaction!==""&&n.uint32(26).string(e.rawTransaction),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=gl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.rawEvent=t.string();continue;case 4:if(r!==32)break;i.eventIndex=t.int32();continue;case 3:if(r!==26)break;i.rawTransaction=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{rawEvent:l(e.rawEvent)?globalThis.String(e.rawEvent):"",eventIndex:l(e.eventIndex)?globalThis.Number(e.eventIndex):0,rawTransaction:l(e.rawTransaction)?globalThis.String(e.rawTransaction):""}},toJSON(e){let n={};return e.rawEvent!==""&&(n.rawEvent=e.rawEvent),e.eventIndex!==0&&(n.eventIndex=Math.round(e.eventIndex)),e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),n},create(e){return Kt.fromPartial(e??{})},fromPartial(e){let n=gl();return n.rawEvent=e.rawEvent??"",n.eventIndex=e.eventIndex??0,n.rawTransaction=e.rawTransaction??"",n}};function ml(){return{rawTransaction:""}}var Xt={encode(e,n=u.default.Writer.create()){return e.rawTransaction!==""&&n.uint32(26).string(e.rawTransaction),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ml();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 3:if(r!==26)break;i.rawTransaction=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{rawTransaction:l(e.rawTransaction)?globalThis.String(e.rawTransaction):""}},toJSON(e){let n={};return e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),n},create(e){return Xt.fromPartial(e??{})},fromPartial(e){let n=ml();return n.rawTransaction=e.rawTransaction??"",n}};function hl(){return{version:BigInt("0"),timestampMicros:BigInt("0"),rawResources:[]}}var Yt={encode(e,n=u.default.Writer.create()){if(e.version!==BigInt("0")){if(BigInt.asIntN(64,e.version)!==e.version)throw new globalThis.Error("value provided for field message.version of type int64 too large");n.uint32(16).int64(e.version.toString())}if(e.timestampMicros!==BigInt("0")){if(BigInt.asIntN(64,e.timestampMicros)!==e.timestampMicros)throw new globalThis.Error("value provided for field message.timestampMicros of type int64 too large");n.uint32(40).int64(e.timestampMicros.toString())}for(let t of e.rawResources)n.uint32(50).string(t);return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=hl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==16)break;i.version=K(t.int64());continue;case 5:if(r!==40)break;i.timestampMicros=K(t.int64());continue;case 6:if(r!==50)break;i.rawResources.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{version:l(e.version)?BigInt(e.version):BigInt("0"),timestampMicros:l(e.timestampMicros)?BigInt(e.timestampMicros):BigInt("0"),rawResources:globalThis.Array.isArray(e?.rawResources)?e.rawResources.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.version!==BigInt("0")&&(n.version=e.version.toString()),e.timestampMicros!==BigInt("0")&&(n.timestampMicros=e.timestampMicros.toString()),e.rawResources?.length&&(n.rawResources=e.rawResources),n},create(e){return Yt.fromPartial(e??{})},fromPartial(e){let n=hl();return n.version=e.version??BigInt("0"),n.timestampMicros=e.timestampMicros??BigInt("0"),n.rawResources=e.rawResources?.map(t=>t)||[],n}};function yl(){return{rawEvent:"",rawTransaction:"",timestamp:void 0,slot:BigInt("0")}}var $t={encode(e,n=u.default.Writer.create()){if(e.rawEvent!==""&&n.uint32(34).string(e.rawEvent),e.rawTransaction!==""&&n.uint32(42).string(e.rawTransaction),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(24).uint64(e.slot.toString())}return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=yl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.rawEvent=t.string();continue;case 5:if(r!==42)break;i.rawTransaction=t.string();continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue;case 3:if(r!==24)break;i.slot=K(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{rawEvent:l(e.rawEvent)?globalThis.String(e.rawEvent):"",rawTransaction:l(e.rawTransaction)?globalThis.String(e.rawTransaction):"",timestamp:l(e.timestamp)?he(e.timestamp):void 0,slot:l(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let n={};return e.rawEvent!==""&&(n.rawEvent=e.rawEvent),e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),n},create(e){return $t.fromPartial(e??{})},fromPartial(e){let n=yl();return n.rawEvent=e.rawEvent??"",n.rawTransaction=e.rawTransaction??"",n.timestamp=e.timestamp??void 0,n.slot=e.slot??BigInt("0"),n}};function kl(){return{rawTransaction:"",timestamp:void 0,slot:BigInt("0")}}var jt={encode(e,n=u.default.Writer.create()){if(e.rawTransaction!==""&&n.uint32(34).string(e.rawTransaction),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(24).uint64(e.slot.toString())}return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=kl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.rawTransaction=t.string();continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue;case 3:if(r!==24)break;i.slot=K(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{rawTransaction:l(e.rawTransaction)?globalThis.String(e.rawTransaction):"",timestamp:l(e.timestamp)?he(e.timestamp):void 0,slot:l(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let n={};return e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),n},create(e){return jt.fromPartial(e??{})},fromPartial(e){let n=kl();return n.rawTransaction=e.rawTransaction??"",n.timestamp=e.timestamp??void 0,n.slot=e.slot??BigInt("0"),n}};function Sl(){return{rawObjects:[],rawSelf:void 0,objectId:"",objectVersion:BigInt("0"),objectDigest:"",timestamp:void 0,slot:BigInt("0")}}var er={encode(e,n=u.default.Writer.create()){for(let t of e.rawObjects)n.uint32(82).string(t);if(e.rawSelf!==void 0&&n.uint32(74).string(e.rawSelf),e.objectId!==""&&n.uint32(42).string(e.objectId),e.objectVersion!==BigInt("0")){if(BigInt.asUintN(64,e.objectVersion)!==e.objectVersion)throw new globalThis.Error("value provided for field message.objectVersion of type uint64 too large");n.uint32(48).uint64(e.objectVersion.toString())}if(e.objectDigest!==""&&n.uint32(58).string(e.objectDigest),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(24).uint64(e.slot.toString())}return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Sl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 10:if(r!==82)break;i.rawObjects.push(t.string());continue;case 9:if(r!==74)break;i.rawSelf=t.string();continue;case 5:if(r!==42)break;i.objectId=t.string();continue;case 6:if(r!==48)break;i.objectVersion=K(t.uint64());continue;case 7:if(r!==58)break;i.objectDigest=t.string();continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue;case 3:if(r!==24)break;i.slot=K(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{rawObjects:globalThis.Array.isArray(e?.rawObjects)?e.rawObjects.map(n=>globalThis.String(n)):[],rawSelf:l(e.rawSelf)?globalThis.String(e.rawSelf):void 0,objectId:l(e.objectId)?globalThis.String(e.objectId):"",objectVersion:l(e.objectVersion)?BigInt(e.objectVersion):BigInt("0"),objectDigest:l(e.objectDigest)?globalThis.String(e.objectDigest):"",timestamp:l(e.timestamp)?he(e.timestamp):void 0,slot:l(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let n={};return e.rawObjects?.length&&(n.rawObjects=e.rawObjects),e.rawSelf!==void 0&&(n.rawSelf=e.rawSelf),e.objectId!==""&&(n.objectId=e.objectId),e.objectVersion!==BigInt("0")&&(n.objectVersion=e.objectVersion.toString()),e.objectDigest!==""&&(n.objectDigest=e.objectDigest),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),n},create(e){return er.fromPartial(e??{})},fromPartial(e){let n=Sl();return n.rawObjects=e.rawObjects?.map(t=>t)||[],n.rawSelf=e.rawSelf??void 0,n.objectId=e.objectId??"",n.objectVersion=e.objectVersion??BigInt("0"),n.objectDigest=e.objectDigest??"",n.timestamp=e.timestamp??void 0,n.slot=e.slot??BigInt("0"),n}};function Nl(){return{rawChanges:[],timestamp:void 0,txDigest:"",slot:BigInt("0")}}var nr={encode(e,n=u.default.Writer.create()){for(let t of e.rawChanges)n.uint32(42).string(t);if(e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),e.txDigest!==""&&n.uint32(34).string(e.txDigest),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(24).uint64(e.slot.toString())}return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Nl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 5:if(r!==42)break;i.rawChanges.push(t.string());continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.txDigest=t.string();continue;case 3:if(r!==24)break;i.slot=K(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{rawChanges:globalThis.Array.isArray(e?.rawChanges)?e.rawChanges.map(n=>globalThis.String(n)):[],timestamp:l(e.timestamp)?he(e.timestamp):void 0,txDigest:l(e.txDigest)?globalThis.String(e.txDigest):"",slot:l(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let n={};return e.rawChanges?.length&&(n.rawChanges=e.rawChanges),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.txDigest!==""&&(n.txDigest=e.txDigest),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),n},create(e){return nr.fromPartial(e??{})},fromPartial(e){let n=Nl();return n.rawChanges=e.rawChanges?.map(t=>t)||[],n.timestamp=e.timestamp??void 0,n.txDigest=e.txDigest??"",n.slot=e.slot??BigInt("0"),n}};function Tl(){return{transaction:void 0,timestamp:void 0,receiptIndex:BigInt("0")}}var tr={encode(e,n=u.default.Writer.create()){if(e.transaction!==void 0&&p.encode(p.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),e.receiptIndex!==BigInt("0")){if(BigInt.asIntN(64,e.receiptIndex)!==e.receiptIndex)throw new globalThis.Error("value provided for field message.receiptIndex of type int64 too large");n.uint32(24).int64(e.receiptIndex.toString())}return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Tl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=p.unwrap(p.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue;case 3:if(r!==24)break;i.receiptIndex=K(t.int64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:x(e.transaction)?e.transaction:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0,receiptIndex:l(e.receiptIndex)?BigInt(e.receiptIndex):BigInt("0")}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.receiptIndex!==BigInt("0")&&(n.receiptIndex=e.receiptIndex.toString()),n},create(e){return tr.fromPartial(e??{})},fromPartial(e){let n=Tl();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n.receiptIndex=e.receiptIndex??BigInt("0"),n}};function Cl(){return{transaction:void 0,timestamp:void 0}}var rr={encode(e,n=u.default.Writer.create()){return e.transaction!==void 0&&p.encode(p.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Cl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=p.unwrap(p.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:x(e.transaction)?e.transaction:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return rr.fromPartial(e??{})},fromPartial(e){let n=Cl();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n}};function Il(){return{block:void 0,timestamp:void 0}}var ir={encode(e,n=u.default.Writer.create()){return e.block!==void 0&&p.encode(p.wrap(e.block),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Il();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.block=p.unwrap(p.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{block:x(e.block)?e.block:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0}},toJSON(e){let n={};return e.block!==void 0&&(n.block=e.block),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return ir.fromPartial(e??{})},fromPartial(e){let n=Il();return n.block=e.block??void 0,n.timestamp=e.timestamp??void 0,n}};function Rl(){return{transaction:void 0,timestamp:void 0}}var ar={encode(e,n=u.default.Writer.create()){return e.transaction!==void 0&&p.encode(p.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Rl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=p.unwrap(p.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:x(e.transaction)?e.transaction:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return ar.fromPartial(e??{})},fromPartial(e){let n=Rl();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n}};function Ol(){return{result:void 0,timestamp:void 0}}var or={encode(e,n=u.default.Writer.create()){return e.result!==void 0&&p.encode(p.wrap(e.result),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ol();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.result=p.unwrap(p.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{result:x(e.result)?e.result:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0}},toJSON(e){let n={};return e.result!==void 0&&(n.result=e.result),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return or.fromPartial(e??{})},fromPartial(e){let n=Ol();return n.result=e.result??void 0,n.timestamp=e.timestamp??void 0,n}};function El(){return{transaction:void 0,timestamp:void 0}}var ur={encode(e,n=u.default.Writer.create()){return e.transaction!==void 0&&p.encode(p.wrap(e.transaction),n.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=El();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.transaction=p.unwrap(p.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.timestamp=le(I.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:x(e.transaction)?e.transaction:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return ur.fromPartial(e??{})},fromPartial(e){let n=El();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n}};function Pl(){return{block:void 0,timestamp:void 0}}var dr={encode(e,n=u.default.Writer.create()){return e.block!==void 0&&p.encode(p.wrap(e.block),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&I.encode(me(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Pl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.block=p.unwrap(p.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=le(I.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{block:x(e.block)?e.block:void 0,timestamp:l(e.timestamp)?he(e.timestamp):void 0}},toJSON(e){let n={};return e.block!==void 0&&(n.block=e.block),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return dr.fromPartial(e??{})},fromPartial(e){let n=Pl();return n.block=e.block??void 0,n.timestamp=e.timestamp??void 0,n}};function _l(){return{data:void 0,handlerType:0,handlerIds:[]}}var lr={encode(e,n=u.default.Writer.create()){e.data!==void 0&&qt.encode(e.data,n.uint32(10).fork()).ldelim(),e.handlerType!==0&&n.uint32(24).int32(e.handlerType),n.uint32(34).fork();for(let t of e.handlerIds)n.int32(t);return n.ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=_l();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.data=qt.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.handlerType=t.int32();continue;case 4:if(r===32){i.handlerIds.push(t.int32());continue}if(r===34){let s=t.uint32()+t.pos;for(;t.pos<s;)i.handlerIds.push(t.int32());continue}break}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{data:l(e.data)?qt.fromJSON(e.data):void 0,handlerType:l(e.handlerType)?ql(e.handlerType):0,handlerIds:globalThis.Array.isArray(e?.handlerIds)?e.handlerIds.map(n=>globalThis.Number(n)):[]}},toJSON(e){let n={};return e.data!==void 0&&(n.data=qt.toJSON(e.data)),e.handlerType!==0&&(n.handlerType=Gl(e.handlerType)),e.handlerIds?.length&&(n.handlerIds=e.handlerIds.map(t=>Math.round(t))),n},create(e){return lr.fromPartial(e??{})},fromPartial(e){let n=_l();return n.data=e.data!==void 0&&e.data!==null?qt.fromPartial(e.data):void 0,n.handlerType=e.handlerType??0,n.handlerIds=e.handlerIds?.map(t=>t)||[],n}};function vl(){return{configUpdated:!1,error:void 0}}var sr={encode(e,n=u.default.Writer.create()){return e.configUpdated!==!1&&n.uint32(8).bool(e.configUpdated),e.error!==void 0&&n.uint32(18).string(e.error),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=vl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.configUpdated=t.bool();continue;case 2:if(r!==18)break;i.error=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{configUpdated:l(e.configUpdated)?globalThis.Boolean(e.configUpdated):!1,error:l(e.error)?globalThis.String(e.error):void 0}},toJSON(e){let n={};return e.configUpdated!==!1&&(n.configUpdated=e.configUpdated),e.error!==void 0&&(n.error=e.error),n},create(e){return sr.fromPartial(e??{})},fromPartial(e){let n=vl();return n.configUpdated=e.configUpdated??!1,n.error=e.error??void 0,n}};function Al(){return{gauges:[],counters:[],events:[],exports:[],states:void 0,timeseriesResult:[]}}var Fn={encode(e,n=u.default.Writer.create()){for(let t of e.gauges)pr.encode(t,n.uint32(10).fork()).ldelim();for(let t of e.counters)gr.encode(t,n.uint32(18).fork()).ldelim();for(let t of e.events)mr.encode(t,n.uint32(34).fork()).ldelim();for(let t of e.exports)hr.encode(t,n.uint32(42).fork()).ldelim();e.states!==void 0&&sr.encode(e.states,n.uint32(50).fork()).ldelim();for(let t of e.timeseriesResult)tn.encode(t,n.uint32(58).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Al();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.gauges.push(pr.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.counters.push(gr.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.events.push(mr.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.exports.push(hr.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.states=sr.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.timeseriesResult.push(tn.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{gauges:globalThis.Array.isArray(e?.gauges)?e.gauges.map(n=>pr.fromJSON(n)):[],counters:globalThis.Array.isArray(e?.counters)?e.counters.map(n=>gr.fromJSON(n)):[],events:globalThis.Array.isArray(e?.events)?e.events.map(n=>mr.fromJSON(n)):[],exports:globalThis.Array.isArray(e?.exports)?e.exports.map(n=>hr.fromJSON(n)):[],states:l(e.states)?sr.fromJSON(e.states):void 0,timeseriesResult:globalThis.Array.isArray(e?.timeseriesResult)?e.timeseriesResult.map(n=>tn.fromJSON(n)):[]}},toJSON(e){let n={};return e.gauges?.length&&(n.gauges=e.gauges.map(t=>pr.toJSON(t))),e.counters?.length&&(n.counters=e.counters.map(t=>gr.toJSON(t))),e.events?.length&&(n.events=e.events.map(t=>mr.toJSON(t))),e.exports?.length&&(n.exports=e.exports.map(t=>hr.toJSON(t))),e.states!==void 0&&(n.states=sr.toJSON(e.states)),e.timeseriesResult?.length&&(n.timeseriesResult=e.timeseriesResult.map(t=>tn.toJSON(t))),n},create(e){return Fn.fromPartial(e??{})},fromPartial(e){let n=Al();return n.gauges=e.gauges?.map(t=>pr.fromPartial(t))||[],n.counters=e.counters?.map(t=>gr.fromPartial(t))||[],n.events=e.events?.map(t=>mr.fromPartial(t))||[],n.exports=e.exports?.map(t=>hr.fromPartial(t))||[],n.states=e.states!==void 0&&e.states!==null?sr.fromPartial(e.states):void 0,n.timeseriesResult=e.timeseriesResult?.map(t=>tn.fromPartial(t))||[],n}};function Bl(){return{context:void 0,calldata:""}}var fr={encode(e,n=u.default.Writer.create()){return e.context!==void 0&&cr.encode(e.context,n.uint32(10).fork()).ldelim(),e.calldata!==""&&n.uint32(18).string(e.calldata),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Bl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.context=cr.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.calldata=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{context:l(e.context)?cr.fromJSON(e.context):void 0,calldata:l(e.calldata)?globalThis.String(e.calldata):""}},toJSON(e){let n={};return e.context!==void 0&&(n.context=cr.toJSON(e.context)),e.calldata!==""&&(n.calldata=e.calldata),n},create(e){return fr.fromPartial(e??{})},fromPartial(e){let n=Bl();return n.context=e.context!==void 0&&e.context!==null?cr.fromPartial(e.context):void 0,n.calldata=e.calldata??"",n}};function bl(){return{chainId:"",address:"",blockTag:""}}var cr={encode(e,n=u.default.Writer.create()){return e.chainId!==""&&n.uint32(10).string(e.chainId),e.address!==""&&n.uint32(18).string(e.address),e.blockTag!==""&&n.uint32(26).string(e.blockTag),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=bl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.chainId=t.string();continue;case 2:if(r!==18)break;i.address=t.string();continue;case 3:if(r!==26)break;i.blockTag=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{chainId:l(e.chainId)?globalThis.String(e.chainId):"",address:l(e.address)?globalThis.String(e.address):"",blockTag:l(e.blockTag)?globalThis.String(e.blockTag):""}},toJSON(e){let n={};return e.chainId!==""&&(n.chainId=e.chainId),e.address!==""&&(n.address=e.address),e.blockTag!==""&&(n.blockTag=e.blockTag),n},create(e){return cr.fromPartial(e??{})},fromPartial(e){let n=bl();return n.chainId=e.chainId??"",n.address=e.address??"",n.blockTag=e.blockTag??"",n}};function Dl(){return{ethCallParams:[]}}var Ba={encode(e,n=u.default.Writer.create()){for(let t of e.ethCallParams)fr.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Dl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.ethCallParams.push(fr.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{ethCallParams:globalThis.Array.isArray(e?.ethCallParams)?e.ethCallParams.map(n=>fr.fromJSON(n)):[]}},toJSON(e){let n={};return e.ethCallParams?.length&&(n.ethCallParams=e.ethCallParams.map(t=>fr.toJSON(t))),n},create(e){return Ba.fromPartial(e??{})},fromPartial(e){let n=Dl();return n.ethCallParams=e.ethCallParams?.map(t=>fr.fromPartial(t))||[],n}};function Jl(){return{address:"",contractName:"",blockNumber:BigInt("0"),transactionHash:"",chainId:"",transactionIndex:0,logIndex:0,name:"",labels:{}}}var w={encode(e,n=u.default.Writer.create()){if(e.address!==""&&n.uint32(10).string(e.address),e.contractName!==""&&n.uint32(74).string(e.contractName),e.blockNumber!==BigInt("0")){if(BigInt.asUintN(64,e.blockNumber)!==e.blockNumber)throw new globalThis.Error("value provided for field message.blockNumber of type uint64 too large");n.uint32(16).uint64(e.blockNumber.toString())}return e.transactionHash!==""&&n.uint32(50).string(e.transactionHash),e.chainId!==""&&n.uint32(42).string(e.chainId),e.transactionIndex!==0&&n.uint32(24).int32(e.transactionIndex),e.logIndex!==0&&n.uint32(32).int32(e.logIndex),e.name!==""&&n.uint32(82).string(e.name),Object.entries(e.labels).forEach(([t,a])=>{Aa.encode({key:t,value:a},n.uint32(58).fork()).ldelim()}),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Jl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.address=t.string();continue;case 9:if(r!==74)break;i.contractName=t.string();continue;case 2:if(r!==16)break;i.blockNumber=K(t.uint64());continue;case 6:if(r!==50)break;i.transactionHash=t.string();continue;case 5:if(r!==42)break;i.chainId=t.string();continue;case 3:if(r!==24)break;i.transactionIndex=t.int32();continue;case 4:if(r!==32)break;i.logIndex=t.int32();continue;case 10:if(r!==82)break;i.name=t.string();continue;case 7:if(r!==58)break;let s=Aa.decode(t,t.uint32());s.value!==void 0&&(i.labels[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{address:l(e.address)?globalThis.String(e.address):"",contractName:l(e.contractName)?globalThis.String(e.contractName):"",blockNumber:l(e.blockNumber)?BigInt(e.blockNumber):BigInt("0"),transactionHash:l(e.transactionHash)?globalThis.String(e.transactionHash):"",chainId:l(e.chainId)?globalThis.String(e.chainId):"",transactionIndex:l(e.transactionIndex)?globalThis.Number(e.transactionIndex):0,logIndex:l(e.logIndex)?globalThis.Number(e.logIndex):0,name:l(e.name)?globalThis.String(e.name):"",labels:x(e.labels)?Object.entries(e.labels).reduce((n,[t,a])=>(n[t]=String(a),n),{}):{}}},toJSON(e){let n={};if(e.address!==""&&(n.address=e.address),e.contractName!==""&&(n.contractName=e.contractName),e.blockNumber!==BigInt("0")&&(n.blockNumber=e.blockNumber.toString()),e.transactionHash!==""&&(n.transactionHash=e.transactionHash),e.chainId!==""&&(n.chainId=e.chainId),e.transactionIndex!==0&&(n.transactionIndex=Math.round(e.transactionIndex)),e.logIndex!==0&&(n.logIndex=Math.round(e.logIndex)),e.name!==""&&(n.name=e.name),e.labels){let t=Object.entries(e.labels);t.length>0&&(n.labels={},t.forEach(([a,i])=>{n.labels[a]=i}))}return n},create(e){return w.fromPartial(e??{})},fromPartial(e){let n=Jl();return n.address=e.address??"",n.contractName=e.contractName??"",n.blockNumber=e.blockNumber??BigInt("0"),n.transactionHash=e.transactionHash??"",n.chainId=e.chainId??"",n.transactionIndex=e.transactionIndex??0,n.logIndex=e.logIndex??0,n.name=e.name??"",n.labels=Object.entries(e.labels??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=globalThis.String(i)),t),{}),n}};function xl(){return{key:"",value:""}}var Aa={encode(e,n=u.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=xl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:l(e.key)?globalThis.String(e.key):"",value:l(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return Aa.fromPartial(e??{})},fromPartial(e){let n=xl();return n.key=e.key??"",n.value=e.value??"",n}};function Ul(){return{bigDecimal:void 0,doubleValue:void 0,bigInteger:void 0}}var nn={encode(e,n=u.default.Writer.create()){return e.bigDecimal!==void 0&&n.uint32(10).string(e.bigDecimal),e.doubleValue!==void 0&&n.uint32(17).double(e.doubleValue),e.bigInteger!==void 0&&ee.encode(e.bigInteger,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ul();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.bigDecimal=t.string();continue;case 2:if(r!==17)break;i.doubleValue=t.double();continue;case 3:if(r!==26)break;i.bigInteger=ee.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{bigDecimal:l(e.bigDecimal)?globalThis.String(e.bigDecimal):void 0,doubleValue:l(e.doubleValue)?globalThis.Number(e.doubleValue):void 0,bigInteger:l(e.bigInteger)?ee.fromJSON(e.bigInteger):void 0}},toJSON(e){let n={};return e.bigDecimal!==void 0&&(n.bigDecimal=e.bigDecimal),e.doubleValue!==void 0&&(n.doubleValue=e.doubleValue),e.bigInteger!==void 0&&(n.bigInteger=ee.toJSON(e.bigInteger)),n},create(e){return nn.fromPartial(e??{})},fromPartial(e){let n=Ul();return n.bigDecimal=e.bigDecimal??void 0,n.doubleValue=e.doubleValue??void 0,n.bigInteger=e.bigInteger!==void 0&&e.bigInteger!==null?ee.fromPartial(e.bigInteger):void 0,n}};function Vl(){return{from:0}}var M={encode(e,n=u.default.Writer.create()){return e.from!==0&&n.uint32(8).int32(e.from),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Vl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.from=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{from:l(e.from)?ql(e.from):0}},toJSON(e){let n={};return e.from!==0&&(n.from=Gl(e.from)),n},create(e){return M.fromPartial(e??{})},fromPartial(e){let n=Vl();return n.from=e.from??0,n}};function Ll(){return{metadata:void 0,metricValue:void 0,runtimeInfo:void 0}}var pr={encode(e,n=u.default.Writer.create()){return e.metadata!==void 0&&w.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.metricValue!==void 0&&nn.encode(e.metricValue,n.uint32(18).fork()).ldelim(),e.runtimeInfo!==void 0&&M.encode(e.runtimeInfo,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ll();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=w.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.metricValue=nn.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.runtimeInfo=M.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:l(e.metadata)?w.fromJSON(e.metadata):void 0,metricValue:l(e.metricValue)?nn.fromJSON(e.metricValue):void 0,runtimeInfo:l(e.runtimeInfo)?M.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=w.toJSON(e.metadata)),e.metricValue!==void 0&&(n.metricValue=nn.toJSON(e.metricValue)),e.runtimeInfo!==void 0&&(n.runtimeInfo=M.toJSON(e.runtimeInfo)),n},create(e){return pr.fromPartial(e??{})},fromPartial(e){let n=Ll();return n.metadata=e.metadata!==void 0&&e.metadata!==null?w.fromPartial(e.metadata):void 0,n.metricValue=e.metricValue!==void 0&&e.metricValue!==null?nn.fromPartial(e.metricValue):void 0,n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?M.fromPartial(e.runtimeInfo):void 0,n}};function Fl(){return{metadata:void 0,metricValue:void 0,add:!1,runtimeInfo:void 0}}var gr={encode(e,n=u.default.Writer.create()){return e.metadata!==void 0&&w.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.metricValue!==void 0&&nn.encode(e.metricValue,n.uint32(18).fork()).ldelim(),e.add!==!1&&n.uint32(24).bool(e.add),e.runtimeInfo!==void 0&&M.encode(e.runtimeInfo,n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Fl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=w.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.metricValue=nn.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.add=t.bool();continue;case 4:if(r!==34)break;i.runtimeInfo=M.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:l(e.metadata)?w.fromJSON(e.metadata):void 0,metricValue:l(e.metricValue)?nn.fromJSON(e.metricValue):void 0,add:l(e.add)?globalThis.Boolean(e.add):!1,runtimeInfo:l(e.runtimeInfo)?M.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=w.toJSON(e.metadata)),e.metricValue!==void 0&&(n.metricValue=nn.toJSON(e.metricValue)),e.add!==!1&&(n.add=e.add),e.runtimeInfo!==void 0&&(n.runtimeInfo=M.toJSON(e.runtimeInfo)),n},create(e){return gr.fromPartial(e??{})},fromPartial(e){let n=Fl();return n.metadata=e.metadata!==void 0&&e.metadata!==null?w.fromPartial(e.metadata):void 0,n.metricValue=e.metricValue!==void 0&&e.metricValue!==null?nn.fromPartial(e.metricValue):void 0,n.add=e.add??!1,n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?M.fromPartial(e.runtimeInfo):void 0,n}};function wl(){return{metadata:void 0,distinctEntityId:"",attributes:void 0,severity:0,message:"",runtimeInfo:void 0,attributes2:void 0,noMetric:!1}}var mr={encode(e,n=u.default.Writer.create()){return e.metadata!==void 0&&w.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.distinctEntityId!==""&&n.uint32(18).string(e.distinctEntityId),e.attributes!==void 0&&p.encode(p.wrap(e.attributes),n.uint32(50).fork()).ldelim(),e.severity!==0&&n.uint32(56).int32(e.severity),e.message!==""&&n.uint32(66).string(e.message),e.runtimeInfo!==void 0&&M.encode(e.runtimeInfo,n.uint32(42).fork()).ldelim(),e.attributes2!==void 0&&_.encode(e.attributes2,n.uint32(74).fork()).ldelim(),e.noMetric!==!1&&n.uint32(24).bool(e.noMetric),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=wl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=w.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.distinctEntityId=t.string();continue;case 6:if(r!==50)break;i.attributes=p.unwrap(p.decode(t,t.uint32()));continue;case 7:if(r!==56)break;i.severity=t.int32();continue;case 8:if(r!==66)break;i.message=t.string();continue;case 5:if(r!==42)break;i.runtimeInfo=M.decode(t,t.uint32());continue;case 9:if(r!==74)break;i.attributes2=_.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.noMetric=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:l(e.metadata)?w.fromJSON(e.metadata):void 0,distinctEntityId:l(e.distinctEntityId)?globalThis.String(e.distinctEntityId):"",attributes:x(e.attributes)?e.attributes:void 0,severity:l(e.severity)?hp(e.severity):0,message:l(e.message)?globalThis.String(e.message):"",runtimeInfo:l(e.runtimeInfo)?M.fromJSON(e.runtimeInfo):void 0,attributes2:l(e.attributes2)?_.fromJSON(e.attributes2):void 0,noMetric:l(e.noMetric)?globalThis.Boolean(e.noMetric):!1}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=w.toJSON(e.metadata)),e.distinctEntityId!==""&&(n.distinctEntityId=e.distinctEntityId),e.attributes!==void 0&&(n.attributes=e.attributes),e.severity!==0&&(n.severity=yp(e.severity)),e.message!==""&&(n.message=e.message),e.runtimeInfo!==void 0&&(n.runtimeInfo=M.toJSON(e.runtimeInfo)),e.attributes2!==void 0&&(n.attributes2=_.toJSON(e.attributes2)),e.noMetric!==!1&&(n.noMetric=e.noMetric),n},create(e){return mr.fromPartial(e??{})},fromPartial(e){let n=wl();return n.metadata=e.metadata!==void 0&&e.metadata!==null?w.fromPartial(e.metadata):void 0,n.distinctEntityId=e.distinctEntityId??"",n.attributes=e.attributes??void 0,n.severity=e.severity??0,n.message=e.message??"",n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?M.fromPartial(e.runtimeInfo):void 0,n.attributes2=e.attributes2!==void 0&&e.attributes2!==null?_.fromPartial(e.attributes2):void 0,n.noMetric=e.noMetric??!1,n}};function Ml(){return{metadata:void 0,type:0,data:void 0,runtimeInfo:void 0}}var tn={encode(e,n=u.default.Writer.create()){return e.metadata!==void 0&&w.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.type!==0&&n.uint32(16).int32(e.type),e.data!==void 0&&_.encode(e.data,n.uint32(26).fork()).ldelim(),e.runtimeInfo!==void 0&&M.encode(e.runtimeInfo,n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ml();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=w.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.type=t.int32();continue;case 3:if(r!==26)break;i.data=_.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.runtimeInfo=M.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:l(e.metadata)?w.fromJSON(e.metadata):void 0,type:l(e.type)?Ep(e.type):0,data:l(e.data)?_.fromJSON(e.data):void 0,runtimeInfo:l(e.runtimeInfo)?M.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=w.toJSON(e.metadata)),e.type!==0&&(n.type=Pp(e.type)),e.data!==void 0&&(n.data=_.toJSON(e.data)),e.runtimeInfo!==void 0&&(n.runtimeInfo=M.toJSON(e.runtimeInfo)),n},create(e){return tn.fromPartial(e??{})},fromPartial(e){let n=Ml();return n.metadata=e.metadata!==void 0&&e.metadata!==null?w.fromPartial(e.metadata):void 0,n.type=e.type??0,n.data=e.data!==void 0&&e.data!==null?_.fromPartial(e.data):void 0,n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?M.fromPartial(e.runtimeInfo):void 0,n}};function Wl(){return{metadata:void 0,payload:"",runtimeInfo:void 0}}var hr={encode(e,n=u.default.Writer.create()){return e.metadata!==void 0&&w.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.payload!==""&&n.uint32(18).string(e.payload),e.runtimeInfo!==void 0&&M.encode(e.runtimeInfo,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof u.default.Reader?e:u.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Wl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=w.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.payload=t.string();continue;case 3:if(r!==26)break;i.runtimeInfo=M.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:l(e.metadata)?w.fromJSON(e.metadata):void 0,payload:l(e.payload)?globalThis.String(e.payload):"",runtimeInfo:l(e.runtimeInfo)?M.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=w.toJSON(e.metadata)),e.payload!==""&&(n.payload=e.payload),e.runtimeInfo!==void 0&&(n.runtimeInfo=M.toJSON(e.runtimeInfo)),n},create(e){return hr.fromPartial(e??{})},fromPartial(e){let n=Wl();return n.metadata=e.metadata!==void 0&&e.metadata!==null?w.fromPartial(e.metadata):void 0,n.payload=e.payload??"",n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?M.fromPartial(e.runtimeInfo):void 0,n}};var Lg={name:"ProcessorV3",fullName:"processor.ProcessorV3",methods:{init:{name:"Init",requestType:Na,requestStream:!1,responseType:Ql,responseStream:!1,options:{}},configureHandlers:{name:"ConfigureHandlers",requestType:Zl,requestStream:!1,responseType:Hl,responseStream:!1,options:{}},processBindingsStream:{name:"ProcessBindingsStream",requestType:zl,requestStream:!0,responseType:Kl,responseStream:!0,options:{}}}};function me(e){let n=BigInt(Math.trunc(e.getTime()/1e3)),t=e.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function le(e){let n=(globalThis.Number(e.seconds.toString())||0)*1e3;return n+=(e.nanos||0)/1e6,new globalThis.Date(n)}function he(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):le(I.fromJSON(e))}function K(e){return BigInt(e.toString())}u.default.util.Long!==$&&(u.default.util.Long=$,u.default.configure());function x(e){return typeof e=="object"&&e!==null}function l(e){return e!=null}import{AsyncLocalStorage as Ap}from"node:async_hooks";var Xl=class{name;supportedHandlers=[];async configure(n,t){}async start(n){}stateDiff(n){return!1}async processBinding(n,t){return Fn.create()}async preprocessBinding(n,t){return Ba.create()}async partition(n){return{partitions:n.handlerIds.reduce((t,a)=>({...t,[a]:{sysValue:Ae.UNRECOGNIZED}}),{})}}async startServer(n){}shutdownServer(){}async init(n){}},Yl=class e{static INSTANCE=new e;dbContextLocalStorage=new Ap;plugins=[];typesToPlugin=new Map;register(n){if(!this.plugins.find(t=>t.name===n.name)){this.plugins.push(n);for(let t of n.supportedHandlers){let a=this.typesToPlugin.get(t);if(a)throw new Error(`Duplicate plugin for ${t}: ${a.name} and ${n.name}`);this.typesToPlugin.set(t,n)}}}async configure(n,t){await Promise.all(this.plugins.map(a=>a.configure(n,t)))}start(n,t){return Promise.all(this.plugins.map(a=>a.start(n)))}startServer(n){return Promise.all(this.plugins.map(t=>t.startServer(n)))}shutdown(){this.plugins.forEach(n=>n.shutdownServer())}stateDiff(n){return this.plugins.some(t=>t.stateDiff(n))}processBinding(n,t,a){let i=this.typesToPlugin.get(n.handlerType);if(!i)throw new Error(`No plugin for ${n.handlerType}`);return this.dbContextLocalStorage.run(a,()=>i.processBinding(n,t))}async partition(n){let t=this.typesToPlugin.get(n.handlerType);if(!t)throw new Error(`No plugin for ${n.handlerType}`);return t.partition(n)}preprocessBinding(n,t,a){let i=this.typesToPlugin.get(n.handlerType);if(!i)throw new Error(`No plugin for ${n.handlerType}`);return this.dbContextLocalStorage.run(a,()=>i.preprocessBinding(n,t))}async init(n){return Promise.all(this.plugins.map(t=>t.init(n)))}};import("node:process").then(e=>e.stdout.write(""));var o=Sn(Ve(),1);var ia=Sn(Ve(),1);function $l(){return{}}var Ki={encode(e,n=ia.default.Writer.create()){return n},decode(e,n){let t=e instanceof ia.default.Reader?e:ia.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=$l();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return Ki.fromPartial(e??{})},fromPartial(e){return $l()}};import("node:process").then(e=>e.stdout.write(""));var Ie=Sn(Ve(),1);function Bp(e){switch(e){case 0:case"NULL_VALUE":return 0;case-1:case"UNRECOGNIZED":default:return-1}}function bp(e){switch(e){case 0:return"NULL_VALUE";case-1:default:return"UNRECOGNIZED"}}function ba(){return{fields:{}}}var f={encode(e,n=Ie.default.Writer.create()){return Object.entries(e.fields).forEach(([t,a])=>{a!==void 0&&xa.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof Ie.default.Reader?e:Ie.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ba();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=xa.decode(t,t.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{fields:es(e.fields)?Object.entries(e.fields).reduce((n,[t,a])=>(n[t]=a,n),{}):{}}},toJSON(e){let n={};if(e.fields){let t=Object.entries(e.fields);t.length>0&&(n.fields={},t.forEach(([a,i])=>{n.fields[a]=i}))}return n},create(e){return f.fromPartial(e??{})},fromPartial(e){let n=ba();return n.fields=Object.entries(e.fields??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=i),t),{}),n},wrap(e){let n=ba();if(e!==void 0)for(let t of Object.keys(e))n.fields[t]=e[t];return n},unwrap(e){let n={};if(e.fields)for(let t of Object.keys(e.fields))n[t]=e.fields[t];return n}};function jl(){return{key:"",value:void 0}}var xa={encode(e,n=Ie.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==void 0&&Bn.encode(Bn.wrap(e.value),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof Ie.default.Reader?e:Ie.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=jl();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=Bn.unwrap(Bn.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:yr(e.key)?globalThis.String(e.key):"",value:yr(e?.value)?e.value:void 0}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==void 0&&(n.value=e.value),n},create(e){return xa.fromPartial(e??{})},fromPartial(e){let n=jl();return n.key=e.key??"",n.value=e.value??void 0,n}};function Da(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var Bn={encode(e,n=Ie.default.Writer.create()){return e.nullValue!==void 0&&n.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&n.uint32(17).double(e.numberValue),e.stringValue!==void 0&&n.uint32(26).string(e.stringValue),e.boolValue!==void 0&&n.uint32(32).bool(e.boolValue),e.structValue!==void 0&&f.encode(f.wrap(e.structValue),n.uint32(42).fork()).ldelim(),e.listValue!==void 0&&On.encode(On.wrap(e.listValue),n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof Ie.default.Reader?e:Ie.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Da();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.nullValue=t.int32();continue;case 2:if(r!==17)break;i.numberValue=t.double();continue;case 3:if(r!==26)break;i.stringValue=t.string();continue;case 4:if(r!==32)break;i.boolValue=t.bool();continue;case 5:if(r!==42)break;i.structValue=f.unwrap(f.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.listValue=On.unwrap(On.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{nullValue:yr(e.nullValue)?Bp(e.nullValue):void 0,numberValue:yr(e.numberValue)?globalThis.Number(e.numberValue):void 0,stringValue:yr(e.stringValue)?globalThis.String(e.stringValue):void 0,boolValue:yr(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,structValue:es(e.structValue)?e.structValue:void 0,listValue:globalThis.Array.isArray(e.listValue)?[...e.listValue]:void 0}},toJSON(e){let n={};return e.nullValue!==void 0&&(n.nullValue=bp(e.nullValue)),e.numberValue!==void 0&&(n.numberValue=e.numberValue),e.stringValue!==void 0&&(n.stringValue=e.stringValue),e.boolValue!==void 0&&(n.boolValue=e.boolValue),e.structValue!==void 0&&(n.structValue=e.structValue),e.listValue!==void 0&&(n.listValue=e.listValue),n},create(e){return Bn.fromPartial(e??{})},fromPartial(e){let n=Da();return n.nullValue=e.nullValue??void 0,n.numberValue=e.numberValue??void 0,n.stringValue=e.stringValue??void 0,n.boolValue=e.boolValue??void 0,n.structValue=e.structValue??void 0,n.listValue=e.listValue??void 0,n},wrap(e){let n=Da();if(e===null)n.nullValue=0;else if(typeof e=="boolean")n.boolValue=e;else if(typeof e=="number")n.numberValue=e;else if(typeof e=="string")n.stringValue=e;else if(globalThis.Array.isArray(e))n.listValue=e;else if(typeof e=="object")n.structValue=e;else if(typeof e<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e);return n},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function Ja(){return{values:[]}}var On={encode(e,n=Ie.default.Writer.create()){for(let t of e.values)Bn.encode(Bn.wrap(t),n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof Ie.default.Reader?e:Ie.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ja();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.values.push(Bn.unwrap(Bn.decode(t,t.uint32())));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{values:globalThis.Array.isArray(e?.values)?[...e.values]:[]}},toJSON(e){let n={};return e.values?.length&&(n.values=e.values),n},create(e){return On.fromPartial(e??{})},fromPartial(e){let n=Ja();return n.values=e.values?.map(t=>t)||[],n},wrap(e){let n=Ja();return n.values=e??[],n},unwrap(e){return e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e}};function es(e){return typeof e=="object"&&e!==null}function yr(e){return e!=null}import("node:process").then(e=>e.stdout.write(""));var Zn=Sn(Ve(),1);function ns(){return{seconds:BigInt("0"),nanos:0}}var C={encode(e,n=Zn.default.Writer.create()){if(e.seconds!==BigInt("0")){if(BigInt.asIntN(64,e.seconds)!==e.seconds)throw new globalThis.Error("value provided for field message.seconds of type int64 too large");n.uint32(8).int64(e.seconds.toString())}return e.nanos!==0&&n.uint32(16).int32(e.nanos),n},decode(e,n){let t=e instanceof Zn.default.Reader?e:Zn.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ns();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.seconds=Dp(t.int64());continue;case 2:if(r!==16)break;i.nanos=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{seconds:ts(e.seconds)?BigInt(e.seconds):BigInt("0"),nanos:ts(e.nanos)?globalThis.Number(e.nanos):0}},toJSON(e){let n={};return e.seconds!==BigInt("0")&&(n.seconds=e.seconds.toString()),e.nanos!==0&&(n.nanos=Math.round(e.nanos)),n},create(e){return C.fromPartial(e??{})},fromPartial(e){let n=ns();return n.seconds=e.seconds??BigInt("0"),n.nanos=e.nanos??0,n}};function Dp(e){return BigInt(e.toString())}Zn.default.util.Long!==$&&(Zn.default.util.Long=$,Zn.default.configure());function ts(e){return e!=null}import("node:process").then(e=>e.stdout.write(""));var E=Sn(Ve(),1);function Jp(e){switch(e){case 0:case"NULL_VALUE":return 0;case-1:case"UNRECOGNIZED":default:return-1}}function xp(e){switch(e){case 0:return"NULL_VALUE";case-1:default:return"UNRECOGNIZED"}}function rs(){return{symbol:void 0,address:void 0}}var Be={encode(e,n=E.default.Writer.create()){return e.symbol!==void 0&&n.uint32(10).string(e.symbol),e.address!==void 0&&kr.encode(e.address,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=rs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.symbol=t.string();continue;case 2:if(r!==18)break;i.address=kr.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{symbol:W(e.symbol)?globalThis.String(e.symbol):void 0,address:W(e.address)?kr.fromJSON(e.address):void 0}},toJSON(e){let n={};return e.symbol!==void 0&&(n.symbol=e.symbol),e.address!==void 0&&(n.address=kr.toJSON(e.address)),n},create(e){return Be.fromPartial(e??{})},fromPartial(e){let n=rs();return n.symbol=e.symbol??void 0,n.address=e.address!==void 0&&e.address!==null?kr.fromPartial(e.address):void 0,n}};function is(){return{address:"",chain:""}}var kr={encode(e,n=E.default.Writer.create()){return e.address!==""&&n.uint32(10).string(e.address),e.chain!==""&&n.uint32(18).string(e.chain),n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=is();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.address=t.string();continue;case 2:if(r!==18)break;i.chain=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{address:W(e.address)?globalThis.String(e.address):"",chain:W(e.chain)?globalThis.String(e.chain):""}},toJSON(e){let n={};return e.address!==""&&(n.address=e.address),e.chain!==""&&(n.chain=e.chain),n},create(e){return kr.fromPartial(e??{})},fromPartial(e){let n=is();return n.address=e.address??"",n.chain=e.chain??"",n}};function as(){return{nullValue:void 0,intValue:void 0,int64Value:void 0,floatValue:void 0,bytesValue:void 0,boolValue:void 0,stringValue:void 0,timestampValue:void 0,bigintValue:void 0,bigdecimalValue:void 0,listValue:void 0,structValue:void 0,tokenValue:void 0}}var N={encode(e,n=E.default.Writer.create()){if(e.nullValue!==void 0&&n.uint32(8).int32(e.nullValue),e.intValue!==void 0&&n.uint32(16).int32(e.intValue),e.int64Value!==void 0){if(BigInt.asIntN(64,e.int64Value)!==e.int64Value)throw new globalThis.Error("value provided for field message.int64Value of type int64 too large");n.uint32(104).int64(e.int64Value.toString())}return e.floatValue!==void 0&&n.uint32(25).double(e.floatValue),e.bytesValue!==void 0&&n.uint32(34).bytes(e.bytesValue),e.boolValue!==void 0&&n.uint32(40).bool(e.boolValue),e.stringValue!==void 0&&n.uint32(50).string(e.stringValue),e.timestampValue!==void 0&&C.encode(ms(e.timestampValue),n.uint32(58).fork()).ldelim(),e.bigintValue!==void 0&&ne.encode(e.bigintValue,n.uint32(66).fork()).ldelim(),e.bigdecimalValue!==void 0&&rn.encode(e.bigdecimalValue,n.uint32(74).fork()).ldelim(),e.listValue!==void 0&&U.encode(e.listValue,n.uint32(82).fork()).ldelim(),e.structValue!==void 0&&A.encode(e.structValue,n.uint32(90).fork()).ldelim(),e.tokenValue!==void 0&&Sr.encode(e.tokenValue,n.uint32(98).fork()).ldelim(),n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=as();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.nullValue=t.int32();continue;case 2:if(r!==16)break;i.intValue=t.int32();continue;case 13:if(r!==104)break;i.int64Value=Up(t.int64());continue;case 3:if(r!==25)break;i.floatValue=t.double();continue;case 4:if(r!==34)break;i.bytesValue=t.bytes();continue;case 5:if(r!==40)break;i.boolValue=t.bool();continue;case 6:if(r!==50)break;i.stringValue=t.string();continue;case 7:if(r!==58)break;i.timestampValue=Va(C.decode(t,t.uint32()));continue;case 8:if(r!==66)break;i.bigintValue=ne.decode(t,t.uint32());continue;case 9:if(r!==74)break;i.bigdecimalValue=rn.decode(t,t.uint32());continue;case 10:if(r!==82)break;i.listValue=U.decode(t,t.uint32());continue;case 11:if(r!==90)break;i.structValue=A.decode(t,t.uint32());continue;case 12:if(r!==98)break;i.tokenValue=Sr.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{nullValue:W(e.nullValue)?Jp(e.nullValue):void 0,intValue:W(e.intValue)?globalThis.Number(e.intValue):void 0,int64Value:W(e.int64Value)?BigInt(e.int64Value):void 0,floatValue:W(e.floatValue)?globalThis.Number(e.floatValue):void 0,bytesValue:W(e.bytesValue)?ps(e.bytesValue):void 0,boolValue:W(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,stringValue:W(e.stringValue)?globalThis.String(e.stringValue):void 0,timestampValue:W(e.timestampValue)?hs(e.timestampValue):void 0,bigintValue:W(e.bigintValue)?ne.fromJSON(e.bigintValue):void 0,bigdecimalValue:W(e.bigdecimalValue)?rn.fromJSON(e.bigdecimalValue):void 0,listValue:W(e.listValue)?U.fromJSON(e.listValue):void 0,structValue:W(e.structValue)?A.fromJSON(e.structValue):void 0,tokenValue:W(e.tokenValue)?Sr.fromJSON(e.tokenValue):void 0}},toJSON(e){let n={};return e.nullValue!==void 0&&(n.nullValue=xp(e.nullValue)),e.intValue!==void 0&&(n.intValue=Math.round(e.intValue)),e.int64Value!==void 0&&(n.int64Value=e.int64Value.toString()),e.floatValue!==void 0&&(n.floatValue=e.floatValue),e.bytesValue!==void 0&&(n.bytesValue=gs(e.bytesValue)),e.boolValue!==void 0&&(n.boolValue=e.boolValue),e.stringValue!==void 0&&(n.stringValue=e.stringValue),e.timestampValue!==void 0&&(n.timestampValue=e.timestampValue.toISOString()),e.bigintValue!==void 0&&(n.bigintValue=ne.toJSON(e.bigintValue)),e.bigdecimalValue!==void 0&&(n.bigdecimalValue=rn.toJSON(e.bigdecimalValue)),e.listValue!==void 0&&(n.listValue=U.toJSON(e.listValue)),e.structValue!==void 0&&(n.structValue=A.toJSON(e.structValue)),e.tokenValue!==void 0&&(n.tokenValue=Sr.toJSON(e.tokenValue)),n},create(e){return N.fromPartial(e??{})},fromPartial(e){let n=as();return n.nullValue=e.nullValue??void 0,n.intValue=e.intValue??void 0,n.int64Value=e.int64Value??void 0,n.floatValue=e.floatValue??void 0,n.bytesValue=e.bytesValue??void 0,n.boolValue=e.boolValue??void 0,n.stringValue=e.stringValue??void 0,n.timestampValue=e.timestampValue??void 0,n.bigintValue=e.bigintValue!==void 0&&e.bigintValue!==null?ne.fromPartial(e.bigintValue):void 0,n.bigdecimalValue=e.bigdecimalValue!==void 0&&e.bigdecimalValue!==null?rn.fromPartial(e.bigdecimalValue):void 0,n.listValue=e.listValue!==void 0&&e.listValue!==null?U.fromPartial(e.listValue):void 0,n.structValue=e.structValue!==void 0&&e.structValue!==null?A.fromPartial(e.structValue):void 0,n.tokenValue=e.tokenValue!==void 0&&e.tokenValue!==null?Sr.fromPartial(e.tokenValue):void 0,n}};function os(){return{fields:{}}}var A={encode(e,n=E.default.Writer.create()){return Object.entries(e.fields).forEach(([t,a])=>{Ua.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=os();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=Ua.decode(t,t.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{fields:Vp(e.fields)?Object.entries(e.fields).reduce((n,[t,a])=>(n[t]=N.fromJSON(a),n),{}):{}}},toJSON(e){let n={};if(e.fields){let t=Object.entries(e.fields);t.length>0&&(n.fields={},t.forEach(([a,i])=>{n.fields[a]=N.toJSON(i)}))}return n},create(e){return A.fromPartial(e??{})},fromPartial(e){let n=os();return n.fields=Object.entries(e.fields??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=N.fromPartial(i)),t),{}),n}};function us(){return{key:"",value:void 0}}var Ua={encode(e,n=E.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==void 0&&N.encode(e.value,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=us();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=N.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:W(e.key)?globalThis.String(e.key):"",value:W(e.value)?N.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==void 0&&(n.value=N.toJSON(e.value)),n},create(e){return Ua.fromPartial(e??{})},fromPartial(e){let n=us();return n.key=e.key??"",n.value=e.value!==void 0&&e.value!==null?N.fromPartial(e.value):void 0,n}};function ds(){return{values:[]}}var U={encode(e,n=E.default.Writer.create()){for(let t of e.values)N.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ds();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.values.push(N.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{values:globalThis.Array.isArray(e?.values)?e.values.map(n=>N.fromJSON(n)):[]}},toJSON(e){let n={};return e.values?.length&&(n.values=e.values.map(t=>N.toJSON(t))),n},create(e){return U.fromPartial(e??{})},fromPartial(e){let n=ds();return n.values=e.values?.map(t=>N.fromPartial(t))||[],n}};function ls(){return{entities:[]}}var zn={encode(e,n=E.default.Writer.create()){for(let t of e.entities)A.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ls();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entities.push(A.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entities:globalThis.Array.isArray(e?.entities)?e.entities.map(n=>A.fromJSON(n)):[]}},toJSON(e){let n={};return e.entities?.length&&(n.entities=e.entities.map(t=>A.toJSON(t))),n},create(e){return zn.fromPartial(e??{})},fromPartial(e){let n=ls();return n.entities=e.entities?.map(t=>A.fromPartial(t))||[],n}};function ss(){return{value:void 0,exp:0}}var rn={encode(e,n=E.default.Writer.create()){return e.value!==void 0&&ne.encode(e.value,n.uint32(10).fork()).ldelim(),e.exp!==0&&n.uint32(16).int32(e.exp),n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ss();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.value=ne.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.exp=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{value:W(e.value)?ne.fromJSON(e.value):void 0,exp:W(e.exp)?globalThis.Number(e.exp):0}},toJSON(e){let n={};return e.value!==void 0&&(n.value=ne.toJSON(e.value)),e.exp!==0&&(n.exp=Math.round(e.exp)),n},create(e){return rn.fromPartial(e??{})},fromPartial(e){let n=ss();return n.value=e.value!==void 0&&e.value!==null?ne.fromPartial(e.value):void 0,n.exp=e.exp??0,n}};function fs(){return{negative:!1,data:new Uint8Array(0)}}var ne={encode(e,n=E.default.Writer.create()){return e.negative!==!1&&n.uint32(8).bool(e.negative),e.data.length!==0&&n.uint32(18).bytes(e.data),n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=fs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.negative=t.bool();continue;case 2:if(r!==18)break;i.data=t.bytes();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{negative:W(e.negative)?globalThis.Boolean(e.negative):!1,data:W(e.data)?ps(e.data):new Uint8Array(0)}},toJSON(e){let n={};return e.negative!==!1&&(n.negative=e.negative),e.data.length!==0&&(n.data=gs(e.data)),n},create(e){return ne.fromPartial(e??{})},fromPartial(e){let n=fs();return n.negative=e.negative??!1,n.data=e.data??new Uint8Array(0),n}};function cs(){return{token:void 0,amount:void 0,specifiedAt:void 0}}var Sr={encode(e,n=E.default.Writer.create()){return e.token!==void 0&&Be.encode(e.token,n.uint32(10).fork()).ldelim(),e.amount!==void 0&&rn.encode(e.amount,n.uint32(18).fork()).ldelim(),e.specifiedAt!==void 0&&C.encode(ms(e.specifiedAt),n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof E.default.Reader?e:E.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=cs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.token=Be.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.amount=rn.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.specifiedAt=Va(C.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{token:W(e.token)?Be.fromJSON(e.token):void 0,amount:W(e.amount)?rn.fromJSON(e.amount):void 0,specifiedAt:W(e.specifiedAt)?hs(e.specifiedAt):void 0}},toJSON(e){let n={};return e.token!==void 0&&(n.token=Be.toJSON(e.token)),e.amount!==void 0&&(n.amount=rn.toJSON(e.amount)),e.specifiedAt!==void 0&&(n.specifiedAt=e.specifiedAt.toISOString()),n},create(e){return Sr.fromPartial(e??{})},fromPartial(e){let n=cs();return n.token=e.token!==void 0&&e.token!==null?Be.fromPartial(e.token):void 0,n.amount=e.amount!==void 0&&e.amount!==null?rn.fromPartial(e.amount):void 0,n.specifiedAt=e.specifiedAt??void 0,n}};function ps(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{let n=globalThis.atob(e),t=new Uint8Array(n.length);for(let a=0;a<n.length;++a)t[a]=n.charCodeAt(a);return t}}function gs(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{let n=[];return e.forEach(t=>{n.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(n.join(""))}}function ms(e){let n=BigInt(Math.trunc(e.getTime()/1e3)),t=e.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function Va(e){let n=(globalThis.Number(e.seconds.toString())||0)*1e3;return n+=(e.nanos||0)/1e6,new globalThis.Date(n)}function hs(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):Va(C.fromJSON(e))}function Up(e){return BigInt(e.toString())}E.default.util.Long!==$&&(E.default.util.Long=$,E.default.configure());function Vp(e){return typeof e=="object"&&e!==null}function W(e){return e!=null}import("node:process").then(e=>e.stdout.write(""));function Lp(e){switch(e){case 0:case"UNKNOWN_TYPE":return 0;case 1:case"COUNTER":return 1;case 2:case"GAUGE":return 2;case 3:case"HISTOGRAM":return 3;case-1:case"UNRECOGNIZED":default:return-1}}function Fp(e){switch(e){case 0:return"UNKNOWN_TYPE";case 1:return"COUNTER";case 2:return"GAUGE";case 3:return"HISTOGRAM";case-1:default:return"UNRECOGNIZED"}}function wp(e){switch(e){case 0:case"COUNT":return 0;case 1:case"SUM":return 1;case 2:case"AVG":return 2;case 3:case"MIN":return 3;case 4:case"MAX":return 4;case 5:case"LAST":return 5;case-1:case"UNRECOGNIZED":default:return-1}}function Mp(e){switch(e){case 0:return"COUNT";case 1:return"SUM";case 2:return"AVG";case 3:return"MIN";case 4:return"MAX";case 5:return"LAST";case-1:default:return"UNRECOGNIZED"}}function Wp(e){switch(e){case 0:case"ADDRESS":return 0;case 1:case"OBJECT":return 1;case 2:case"WRAPPED_OBJECT":return 2;case 3:case"TYPE":return 3;case-1:case"UNRECOGNIZED":default:return-1}}function qp(e){switch(e){case 0:return"ADDRESS";case 1:return"OBJECT";case 2:return"WRAPPED_OBJECT";case 3:return"TYPE";case-1:default:return"UNRECOGNIZED"}}function Gp(e){switch(e){case 0:case"ERC20":return 0;case 1:case"ERC721":return 1;case 2:case"ERC1155":return 2;case-1:case"UNRECOGNIZED":default:return-1}}function Hp(e){switch(e){case 0:return"ERC20";case 1:return"ERC721";case 2:return"ERC1155";case-1:default:return"UNRECOGNIZED"}}function Pc(e){switch(e){case 0:case"UNKNOWN":return 0;case 1:case"ETH_LOG":return 1;case 2:case"ETH_BLOCK":return 2;case 5:case"ETH_TRACE":return 5;case 11:case"ETH_TRANSACTION":return 11;case 4:case"SOL_INSTRUCTION":return 4;case 6:case"APT_EVENT":return 6;case 7:case"APT_CALL":return 7;case 8:case"APT_RESOURCE":return 8;case 3:case"SUI_EVENT":return 3;case 9:case"SUI_CALL":return 9;case 10:case"SUI_OBJECT":return 10;case 12:case"SUI_OBJECT_CHANGE":return 12;case 13:case"FUEL_CALL":return 13;case 19:case"FUEL_RECEIPT":return 19;case 20:case"FUEL_TRANSACTION":return 20;case 17:case"FUEL_BLOCK":return 17;case 14:case"COSMOS_CALL":return 14;case 15:case"STARKNET_EVENT":return 15;case 16:case"BTC_TRANSACTION":return 16;case 18:case"BTC_BLOCK":return 18;case-1:case"UNRECOGNIZED":default:return-1}}function _c(e){switch(e){case 0:return"UNKNOWN";case 1:return"ETH_LOG";case 2:return"ETH_BLOCK";case 5:return"ETH_TRACE";case 11:return"ETH_TRANSACTION";case 4:return"SOL_INSTRUCTION";case 6:return"APT_EVENT";case 7:return"APT_CALL";case 8:return"APT_RESOURCE";case 3:return"SUI_EVENT";case 9:return"SUI_CALL";case 10:return"SUI_OBJECT";case 12:return"SUI_OBJECT_CHANGE";case 13:return"FUEL_CALL";case 19:return"FUEL_RECEIPT";case 20:return"FUEL_TRANSACTION";case 17:return"FUEL_BLOCK";case 14:return"COSMOS_CALL";case 15:return"STARKNET_EVENT";case 16:return"BTC_TRANSACTION";case 18:return"BTC_BLOCK";case-1:default:return"UNRECOGNIZED"}}function vc(e){switch(e){case 0:case"DEBUG":return 0;case 1:case"INFO":return 1;case 2:case"WARNING":return 2;case 3:case"ERROR":return 3;case 4:case"CRITICAL":return 4;case-1:case"UNRECOGNIZED":default:return-1}}function Ac(e){switch(e){case 0:return"DEBUG";case 1:return"INFO";case 2:return"WARNING";case 3:return"ERROR";case 4:return"CRITICAL";case-1:default:return"UNRECOGNIZED"}}function Qp(e){switch(e){case 0:case"STRING":return 0;case 1:case"DOUBLE":return 1;case 2:case"BOOL":return 2;case 3:case"TIMESTAMP":return 3;case 4:case"BIG_INTEGER":return 4;case 5:case"BIG_DECIMAL":return 5;case-1:case"UNRECOGNIZED":default:return-1}}function Zp(e){switch(e){case 0:return"STRING";case 1:return"DOUBLE";case 2:return"BOOL";case 3:return"TIMESTAMP";case 4:return"BIG_INTEGER";case 5:return"BIG_DECIMAL";case-1:default:return"UNRECOGNIZED"}}function zp(e){switch(e){case 0:case"BLOCK_NUMBER":return 0;case 1:case"SEQ_MODE":return 1;case 2:case"UNIQUE_VALUE":return 2;case-1:case"UNRECOGNIZED":default:return-1}}function Kp(e){switch(e){case 0:return"BLOCK_NUMBER";case 1:return"SEQ_MODE";case 2:return"UNIQUE_VALUE";case-1:default:return"UNRECOGNIZED"}}function Xp(e){switch(e){case 0:case"SET":return 0;case 1:case"ADD":return 1;case 2:case"MULTIPLY":return 2;case-1:case"UNRECOGNIZED":default:return-1}}function Yp(e){switch(e){case 0:return"SET";case 1:return"ADD";case 2:return"MULTIPLY";case-1:default:return"UNRECOGNIZED"}}function $p(e){switch(e){case 0:case"EQ":return 0;case 1:case"NE":return 1;case 2:case"GT":return 2;case 3:case"GE":return 3;case 4:case"LT":return 4;case 5:case"LE":return 5;case 6:case"IN":return 6;case 7:case"NOT_IN":return 7;case 8:case"LIKE":return 8;case 9:case"NOT_LIKE":return 9;case 10:case"HAS_ALL":return 10;case 11:case"HAS_ANY":return 11;case-1:case"UNRECOGNIZED":default:return-1}}function jp(e){switch(e){case 0:return"EQ";case 1:return"NE";case 2:return"GT";case 3:return"GE";case 4:return"LT";case 5:return"LE";case 6:return"IN";case 7:return"NOT_IN";case 8:return"LIKE";case 9:return"NOT_LIKE";case 10:return"HAS_ALL";case 11:return"HAS_ANY";case-1:default:return"UNRECOGNIZED"}}function eg(e){switch(e){case 0:case"EVENT":return 0;case 1:case"GAUGE":return 1;case 2:case"COUNTER":return 2;case-1:case"UNRECOGNIZED":default:return-1}}function ng(e){switch(e){case 0:return"EVENT";case 1:return"GAUGE";case 2:return"COUNTER";case-1:default:return"UNRECOGNIZED"}}function ys(){return{name:"",version:""}}var Nr={encode(e,n=o.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.version!==""&&n.uint32(26).string(e.version),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ys();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 3:if(r!==26)break;i.version=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:d(e.name)?globalThis.String(e.name):"",version:d(e.version)?globalThis.String(e.version):""}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.version!==""&&(n.version=e.version),n},create(e){return Nr.fromPartial(e??{})},fromPartial(e){let n=ys();return n.name=e.name??"",n.version=e.version??"",n}};function ks(){return{sequential:!1,forceExactBlockTime:!1,processBindingTimeout:0,skipStartBlockValidation:!1,rpcRetryTimes:0,ethAbiDecoderConfig:void 0}}var Tr={encode(e,n=o.default.Writer.create()){return e.sequential!==!1&&n.uint32(8).bool(e.sequential),e.forceExactBlockTime!==!1&&n.uint32(16).bool(e.forceExactBlockTime),e.processBindingTimeout!==0&&n.uint32(24).int32(e.processBindingTimeout),e.skipStartBlockValidation!==!1&&n.uint32(32).bool(e.skipStartBlockValidation),e.rpcRetryTimes!==0&&n.uint32(40).int32(e.rpcRetryTimes),e.ethAbiDecoderConfig!==void 0&&Cr.encode(e.ethAbiDecoderConfig,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ks();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.sequential=t.bool();continue;case 2:if(r!==16)break;i.forceExactBlockTime=t.bool();continue;case 3:if(r!==24)break;i.processBindingTimeout=t.int32();continue;case 4:if(r!==32)break;i.skipStartBlockValidation=t.bool();continue;case 5:if(r!==40)break;i.rpcRetryTimes=t.int32();continue;case 6:if(r!==50)break;i.ethAbiDecoderConfig=Cr.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{sequential:d(e.sequential)?globalThis.Boolean(e.sequential):!1,forceExactBlockTime:d(e.forceExactBlockTime)?globalThis.Boolean(e.forceExactBlockTime):!1,processBindingTimeout:d(e.processBindingTimeout)?globalThis.Number(e.processBindingTimeout):0,skipStartBlockValidation:d(e.skipStartBlockValidation)?globalThis.Boolean(e.skipStartBlockValidation):!1,rpcRetryTimes:d(e.rpcRetryTimes)?globalThis.Number(e.rpcRetryTimes):0,ethAbiDecoderConfig:d(e.ethAbiDecoderConfig)?Cr.fromJSON(e.ethAbiDecoderConfig):void 0}},toJSON(e){let n={};return e.sequential!==!1&&(n.sequential=e.sequential),e.forceExactBlockTime!==!1&&(n.forceExactBlockTime=e.forceExactBlockTime),e.processBindingTimeout!==0&&(n.processBindingTimeout=Math.round(e.processBindingTimeout)),e.skipStartBlockValidation!==!1&&(n.skipStartBlockValidation=e.skipStartBlockValidation),e.rpcRetryTimes!==0&&(n.rpcRetryTimes=Math.round(e.rpcRetryTimes)),e.ethAbiDecoderConfig!==void 0&&(n.ethAbiDecoderConfig=Cr.toJSON(e.ethAbiDecoderConfig)),n},create(e){return Tr.fromPartial(e??{})},fromPartial(e){let n=ks();return n.sequential=e.sequential??!1,n.forceExactBlockTime=e.forceExactBlockTime??!1,n.processBindingTimeout=e.processBindingTimeout??0,n.skipStartBlockValidation=e.skipStartBlockValidation??!1,n.rpcRetryTimes=e.rpcRetryTimes??0,n.ethAbiDecoderConfig=e.ethAbiDecoderConfig!==void 0&&e.ethAbiDecoderConfig!==null?Cr.fromPartial(e.ethAbiDecoderConfig):void 0,n}};function Ss(){return{enabled:!1,workerCount:void 0,skipWhenDecodeFailed:void 0}}var Cr={encode(e,n=o.default.Writer.create()){return e.enabled!==!1&&n.uint32(8).bool(e.enabled),e.workerCount!==void 0&&n.uint32(16).int32(e.workerCount),e.skipWhenDecodeFailed!==void 0&&n.uint32(24).bool(e.skipWhenDecodeFailed),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ss();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.enabled=t.bool();continue;case 2:if(r!==16)break;i.workerCount=t.int32();continue;case 3:if(r!==24)break;i.skipWhenDecodeFailed=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{enabled:d(e.enabled)?globalThis.Boolean(e.enabled):!1,workerCount:d(e.workerCount)?globalThis.Number(e.workerCount):void 0,skipWhenDecodeFailed:d(e.skipWhenDecodeFailed)?globalThis.Boolean(e.skipWhenDecodeFailed):void 0}},toJSON(e){let n={};return e.enabled!==!1&&(n.enabled=e.enabled),e.workerCount!==void 0&&(n.workerCount=Math.round(e.workerCount)),e.skipWhenDecodeFailed!==void 0&&(n.skipWhenDecodeFailed=e.skipWhenDecodeFailed),n},create(e){return Cr.fromPartial(e??{})},fromPartial(e){let n=Ss();return n.enabled=e.enabled??!1,n.workerCount=e.workerCount??void 0,n.skipWhenDecodeFailed=e.skipWhenDecodeFailed??void 0,n}};function Ns(){return{}}var Bc={encode(e,n=o.default.Writer.create()){return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ns();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return Bc.fromPartial(e??{})},fromPartial(e){return Ns()}};function Ts(){return{config:void 0,executionConfig:void 0,contractConfigs:[],templateInstances:[],accountConfigs:[],metricConfigs:[],eventTrackingConfigs:[],exportConfigs:[],eventLogConfigs:[],dbSchema:void 0}}var bc={encode(e,n=o.default.Writer.create()){e.config!==void 0&&Nr.encode(e.config,n.uint32(10).fork()).ldelim(),e.executionConfig!==void 0&&Tr.encode(e.executionConfig,n.uint32(74).fork()).ldelim();for(let t of e.contractConfigs)Ir.encode(t,n.uint32(18).fork()).ldelim();for(let t of e.templateInstances)ln.encode(t,n.uint32(26).fork()).ldelim();for(let t of e.accountConfigs)Dr.encode(t,n.uint32(34).fork()).ldelim();for(let t of e.metricConfigs)vr.encode(t,n.uint32(42).fork()).ldelim();for(let t of e.eventTrackingConfigs)Pr.encode(t,n.uint32(50).fork()).ldelim();for(let t of e.exportConfigs)_r.encode(t,n.uint32(58).fork()).ldelim();for(let t of e.eventLogConfigs)Ar.encode(t,n.uint32(66).fork()).ldelim();return e.dbSchema!==void 0&&Rr.encode(e.dbSchema,n.uint32(82).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ts();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.config=Nr.decode(t,t.uint32());continue;case 9:if(r!==74)break;i.executionConfig=Tr.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.contractConfigs.push(Ir.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.templateInstances.push(ln.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.accountConfigs.push(Dr.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.metricConfigs.push(vr.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.eventTrackingConfigs.push(Pr.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.exportConfigs.push(_r.decode(t,t.uint32()));continue;case 8:if(r!==66)break;i.eventLogConfigs.push(Ar.decode(t,t.uint32()));continue;case 10:if(r!==82)break;i.dbSchema=Rr.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{config:d(e.config)?Nr.fromJSON(e.config):void 0,executionConfig:d(e.executionConfig)?Tr.fromJSON(e.executionConfig):void 0,contractConfigs:globalThis.Array.isArray(e?.contractConfigs)?e.contractConfigs.map(n=>Ir.fromJSON(n)):[],templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(n=>ln.fromJSON(n)):[],accountConfigs:globalThis.Array.isArray(e?.accountConfigs)?e.accountConfigs.map(n=>Dr.fromJSON(n)):[],metricConfigs:globalThis.Array.isArray(e?.metricConfigs)?e.metricConfigs.map(n=>vr.fromJSON(n)):[],eventTrackingConfigs:globalThis.Array.isArray(e?.eventTrackingConfigs)?e.eventTrackingConfigs.map(n=>Pr.fromJSON(n)):[],exportConfigs:globalThis.Array.isArray(e?.exportConfigs)?e.exportConfigs.map(n=>_r.fromJSON(n)):[],eventLogConfigs:globalThis.Array.isArray(e?.eventLogConfigs)?e.eventLogConfigs.map(n=>Ar.fromJSON(n)):[],dbSchema:d(e.dbSchema)?Rr.fromJSON(e.dbSchema):void 0}},toJSON(e){let n={};return e.config!==void 0&&(n.config=Nr.toJSON(e.config)),e.executionConfig!==void 0&&(n.executionConfig=Tr.toJSON(e.executionConfig)),e.contractConfigs?.length&&(n.contractConfigs=e.contractConfigs.map(t=>Ir.toJSON(t))),e.templateInstances?.length&&(n.templateInstances=e.templateInstances.map(t=>ln.toJSON(t))),e.accountConfigs?.length&&(n.accountConfigs=e.accountConfigs.map(t=>Dr.toJSON(t))),e.metricConfigs?.length&&(n.metricConfigs=e.metricConfigs.map(t=>vr.toJSON(t))),e.eventTrackingConfigs?.length&&(n.eventTrackingConfigs=e.eventTrackingConfigs.map(t=>Pr.toJSON(t))),e.exportConfigs?.length&&(n.exportConfigs=e.exportConfigs.map(t=>_r.toJSON(t))),e.eventLogConfigs?.length&&(n.eventLogConfigs=e.eventLogConfigs.map(t=>Ar.toJSON(t))),e.dbSchema!==void 0&&(n.dbSchema=Rr.toJSON(e.dbSchema)),n},create(e){return bc.fromPartial(e??{})},fromPartial(e){let n=Ts();return n.config=e.config!==void 0&&e.config!==null?Nr.fromPartial(e.config):void 0,n.executionConfig=e.executionConfig!==void 0&&e.executionConfig!==null?Tr.fromPartial(e.executionConfig):void 0,n.contractConfigs=e.contractConfigs?.map(t=>Ir.fromPartial(t))||[],n.templateInstances=e.templateInstances?.map(t=>ln.fromPartial(t))||[],n.accountConfigs=e.accountConfigs?.map(t=>Dr.fromPartial(t))||[],n.metricConfigs=e.metricConfigs?.map(t=>vr.fromPartial(t))||[],n.eventTrackingConfigs=e.eventTrackingConfigs?.map(t=>Pr.fromPartial(t))||[],n.exportConfigs=e.exportConfigs?.map(t=>_r.fromPartial(t))||[],n.eventLogConfigs=e.eventLogConfigs?.map(t=>Ar.fromPartial(t))||[],n.dbSchema=e.dbSchema!==void 0&&e.dbSchema!==null?Rr.fromPartial(e.dbSchema):void 0,n}};function Cs(){return{contract:void 0,intervalConfigs:[],moveIntervalConfigs:[],logConfigs:[],traceConfigs:[],transactionConfig:[],moveEventConfigs:[],moveCallConfigs:[],moveResourceChangeConfigs:[],fuelCallConfigs:[],fuelTransactionConfigs:[],assetConfigs:[],fuelLogConfigs:[],fuelReceiptConfigs:[],cosmosLogConfigs:[],starknetEventConfigs:[],btcTransactionConfigs:[],instructionConfig:void 0,startBlock:BigInt("0"),endBlock:BigInt("0"),processorType:""}}var Ir={encode(e,n=o.default.Writer.create()){e.contract!==void 0&&dn.encode(e.contract,n.uint32(10).fork()).ldelim();for(let t of e.intervalConfigs)Z.encode(t,n.uint32(90).fork()).ldelim();for(let t of e.moveIntervalConfigs)un.encode(t,n.uint32(154).fork()).ldelim();for(let t of e.logConfigs)sn.encode(t,n.uint32(26).fork()).ldelim();for(let t of e.traceConfigs)xr.encode(t,n.uint32(18).fork()).ldelim();for(let t of e.transactionConfig)Ur.encode(t,n.uint32(58).fork()).ldelim();for(let t of e.moveEventConfigs)zr.encode(t,n.uint32(74).fork()).ldelim();for(let t of e.moveCallConfigs)fn.encode(t,n.uint32(82).fork()).ldelim();for(let t of e.moveResourceChangeConfigs)cn.encode(t,n.uint32(98).fork()).ldelim();for(let t of e.fuelCallConfigs)ii.encode(t,n.uint32(106).fork()).ldelim();for(let t of e.fuelTransactionConfigs)ai.encode(t,n.uint32(162).fork()).ldelim();for(let t of e.assetConfigs)Vr.encode(t,n.uint32(114).fork()).ldelim();for(let t of e.fuelLogConfigs)Fr.encode(t,n.uint32(122).fork()).ldelim();for(let t of e.fuelReceiptConfigs)wr.encode(t,n.uint32(170).fork()).ldelim();for(let t of e.cosmosLogConfigs)qr.encode(t,n.uint32(130).fork()).ldelim();for(let t of e.starknetEventConfigs)$r.encode(t,n.uint32(138).fork()).ldelim();for(let t of e.btcTransactionConfigs)jr.encode(t,n.uint32(146).fork()).ldelim();if(e.instructionConfig!==void 0&&Hr.encode(e.instructionConfig,n.uint32(50).fork()).ldelim(),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");n.uint32(32).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");n.uint32(40).uint64(e.endBlock.toString())}return e.processorType!==""&&n.uint32(66).string(e.processorType),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Cs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.contract=dn.decode(t,t.uint32());continue;case 11:if(r!==90)break;i.intervalConfigs.push(Z.decode(t,t.uint32()));continue;case 19:if(r!==154)break;i.moveIntervalConfigs.push(un.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.logConfigs.push(sn.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.traceConfigs.push(xr.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.transactionConfig.push(Ur.decode(t,t.uint32()));continue;case 9:if(r!==74)break;i.moveEventConfigs.push(zr.decode(t,t.uint32()));continue;case 10:if(r!==82)break;i.moveCallConfigs.push(fn.decode(t,t.uint32()));continue;case 12:if(r!==98)break;i.moveResourceChangeConfigs.push(cn.decode(t,t.uint32()));continue;case 13:if(r!==106)break;i.fuelCallConfigs.push(ii.decode(t,t.uint32()));continue;case 20:if(r!==162)break;i.fuelTransactionConfigs.push(ai.decode(t,t.uint32()));continue;case 14:if(r!==114)break;i.assetConfigs.push(Vr.decode(t,t.uint32()));continue;case 15:if(r!==122)break;i.fuelLogConfigs.push(Fr.decode(t,t.uint32()));continue;case 21:if(r!==170)break;i.fuelReceiptConfigs.push(wr.decode(t,t.uint32()));continue;case 16:if(r!==130)break;i.cosmosLogConfigs.push(qr.decode(t,t.uint32()));continue;case 17:if(r!==138)break;i.starknetEventConfigs.push($r.decode(t,t.uint32()));continue;case 18:if(r!==146)break;i.btcTransactionConfigs.push(jr.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.instructionConfig=Hr.decode(t,t.uint32());continue;case 4:if(r!==32)break;i.startBlock=X(t.uint64());continue;case 5:if(r!==40)break;i.endBlock=X(t.uint64());continue;case 8:if(r!==66)break;i.processorType=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{contract:d(e.contract)?dn.fromJSON(e.contract):void 0,intervalConfigs:globalThis.Array.isArray(e?.intervalConfigs)?e.intervalConfigs.map(n=>Z.fromJSON(n)):[],moveIntervalConfigs:globalThis.Array.isArray(e?.moveIntervalConfigs)?e.moveIntervalConfigs.map(n=>un.fromJSON(n)):[],logConfigs:globalThis.Array.isArray(e?.logConfigs)?e.logConfigs.map(n=>sn.fromJSON(n)):[],traceConfigs:globalThis.Array.isArray(e?.traceConfigs)?e.traceConfigs.map(n=>xr.fromJSON(n)):[],transactionConfig:globalThis.Array.isArray(e?.transactionConfig)?e.transactionConfig.map(n=>Ur.fromJSON(n)):[],moveEventConfigs:globalThis.Array.isArray(e?.moveEventConfigs)?e.moveEventConfigs.map(n=>zr.fromJSON(n)):[],moveCallConfigs:globalThis.Array.isArray(e?.moveCallConfigs)?e.moveCallConfigs.map(n=>fn.fromJSON(n)):[],moveResourceChangeConfigs:globalThis.Array.isArray(e?.moveResourceChangeConfigs)?e.moveResourceChangeConfigs.map(n=>cn.fromJSON(n)):[],fuelCallConfigs:globalThis.Array.isArray(e?.fuelCallConfigs)?e.fuelCallConfigs.map(n=>ii.fromJSON(n)):[],fuelTransactionConfigs:globalThis.Array.isArray(e?.fuelTransactionConfigs)?e.fuelTransactionConfigs.map(n=>ai.fromJSON(n)):[],assetConfigs:globalThis.Array.isArray(e?.assetConfigs)?e.assetConfigs.map(n=>Vr.fromJSON(n)):[],fuelLogConfigs:globalThis.Array.isArray(e?.fuelLogConfigs)?e.fuelLogConfigs.map(n=>Fr.fromJSON(n)):[],fuelReceiptConfigs:globalThis.Array.isArray(e?.fuelReceiptConfigs)?e.fuelReceiptConfigs.map(n=>wr.fromJSON(n)):[],cosmosLogConfigs:globalThis.Array.isArray(e?.cosmosLogConfigs)?e.cosmosLogConfigs.map(n=>qr.fromJSON(n)):[],starknetEventConfigs:globalThis.Array.isArray(e?.starknetEventConfigs)?e.starknetEventConfigs.map(n=>$r.fromJSON(n)):[],btcTransactionConfigs:globalThis.Array.isArray(e?.btcTransactionConfigs)?e.btcTransactionConfigs.map(n=>jr.fromJSON(n)):[],instructionConfig:d(e.instructionConfig)?Hr.fromJSON(e.instructionConfig):void 0,startBlock:d(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:d(e.endBlock)?BigInt(e.endBlock):BigInt("0"),processorType:d(e.processorType)?globalThis.String(e.processorType):""}},toJSON(e){let n={};return e.contract!==void 0&&(n.contract=dn.toJSON(e.contract)),e.intervalConfigs?.length&&(n.intervalConfigs=e.intervalConfigs.map(t=>Z.toJSON(t))),e.moveIntervalConfigs?.length&&(n.moveIntervalConfigs=e.moveIntervalConfigs.map(t=>un.toJSON(t))),e.logConfigs?.length&&(n.logConfigs=e.logConfigs.map(t=>sn.toJSON(t))),e.traceConfigs?.length&&(n.traceConfigs=e.traceConfigs.map(t=>xr.toJSON(t))),e.transactionConfig?.length&&(n.transactionConfig=e.transactionConfig.map(t=>Ur.toJSON(t))),e.moveEventConfigs?.length&&(n.moveEventConfigs=e.moveEventConfigs.map(t=>zr.toJSON(t))),e.moveCallConfigs?.length&&(n.moveCallConfigs=e.moveCallConfigs.map(t=>fn.toJSON(t))),e.moveResourceChangeConfigs?.length&&(n.moveResourceChangeConfigs=e.moveResourceChangeConfigs.map(t=>cn.toJSON(t))),e.fuelCallConfigs?.length&&(n.fuelCallConfigs=e.fuelCallConfigs.map(t=>ii.toJSON(t))),e.fuelTransactionConfigs?.length&&(n.fuelTransactionConfigs=e.fuelTransactionConfigs.map(t=>ai.toJSON(t))),e.assetConfigs?.length&&(n.assetConfigs=e.assetConfigs.map(t=>Vr.toJSON(t))),e.fuelLogConfigs?.length&&(n.fuelLogConfigs=e.fuelLogConfigs.map(t=>Fr.toJSON(t))),e.fuelReceiptConfigs?.length&&(n.fuelReceiptConfigs=e.fuelReceiptConfigs.map(t=>wr.toJSON(t))),e.cosmosLogConfigs?.length&&(n.cosmosLogConfigs=e.cosmosLogConfigs.map(t=>qr.toJSON(t))),e.starknetEventConfigs?.length&&(n.starknetEventConfigs=e.starknetEventConfigs.map(t=>$r.toJSON(t))),e.btcTransactionConfigs?.length&&(n.btcTransactionConfigs=e.btcTransactionConfigs.map(t=>jr.toJSON(t))),e.instructionConfig!==void 0&&(n.instructionConfig=Hr.toJSON(e.instructionConfig)),e.startBlock!==BigInt("0")&&(n.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(n.endBlock=e.endBlock.toString()),e.processorType!==""&&(n.processorType=e.processorType),n},create(e){return Ir.fromPartial(e??{})},fromPartial(e){let n=Cs();return n.contract=e.contract!==void 0&&e.contract!==null?dn.fromPartial(e.contract):void 0,n.intervalConfigs=e.intervalConfigs?.map(t=>Z.fromPartial(t))||[],n.moveIntervalConfigs=e.moveIntervalConfigs?.map(t=>un.fromPartial(t))||[],n.logConfigs=e.logConfigs?.map(t=>sn.fromPartial(t))||[],n.traceConfigs=e.traceConfigs?.map(t=>xr.fromPartial(t))||[],n.transactionConfig=e.transactionConfig?.map(t=>Ur.fromPartial(t))||[],n.moveEventConfigs=e.moveEventConfigs?.map(t=>zr.fromPartial(t))||[],n.moveCallConfigs=e.moveCallConfigs?.map(t=>fn.fromPartial(t))||[],n.moveResourceChangeConfigs=e.moveResourceChangeConfigs?.map(t=>cn.fromPartial(t))||[],n.fuelCallConfigs=e.fuelCallConfigs?.map(t=>ii.fromPartial(t))||[],n.fuelTransactionConfigs=e.fuelTransactionConfigs?.map(t=>ai.fromPartial(t))||[],n.assetConfigs=e.assetConfigs?.map(t=>Vr.fromPartial(t))||[],n.fuelLogConfigs=e.fuelLogConfigs?.map(t=>Fr.fromPartial(t))||[],n.fuelReceiptConfigs=e.fuelReceiptConfigs?.map(t=>wr.fromPartial(t))||[],n.cosmosLogConfigs=e.cosmosLogConfigs?.map(t=>qr.fromPartial(t))||[],n.starknetEventConfigs=e.starknetEventConfigs?.map(t=>$r.fromPartial(t))||[],n.btcTransactionConfigs=e.btcTransactionConfigs?.map(t=>jr.fromPartial(t))||[],n.instructionConfig=e.instructionConfig!==void 0&&e.instructionConfig!==null?Hr.fromPartial(e.instructionConfig):void 0,n.startBlock=e.startBlock??BigInt("0"),n.endBlock=e.endBlock??BigInt("0"),n.processorType=e.processorType??"",n}};function Is(){return{gqlSchema:""}}var Rr={encode(e,n=o.default.Writer.create()){return e.gqlSchema!==""&&n.uint32(10).string(e.gqlSchema),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Is();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.gqlSchema=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{gqlSchema:d(e.gqlSchema)?globalThis.String(e.gqlSchema):""}},toJSON(e){let n={};return e.gqlSchema!==""&&(n.gqlSchema=e.gqlSchema),n},create(e){return Rr.fromPartial(e??{})},fromPartial(e){let n=Is();return n.gqlSchema=e.gqlSchema??"",n}};function Rs(){return{}}var Or={encode(e,n=o.default.Writer.create()){return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Rs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return Or.fromPartial(e??{})},fromPartial(e){return Rs()}};function Os(){return{retentionEventName:"",days:0}}var Er={encode(e,n=o.default.Writer.create()){return e.retentionEventName!==""&&n.uint32(18).string(e.retentionEventName),e.days!==0&&n.uint32(24).int32(e.days),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Os();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.retentionEventName=t.string();continue;case 3:if(r!==24)break;i.days=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{retentionEventName:d(e.retentionEventName)?globalThis.String(e.retentionEventName):"",days:d(e.days)?globalThis.Number(e.days):0}},toJSON(e){let n={};return e.retentionEventName!==""&&(n.retentionEventName=e.retentionEventName),e.days!==0&&(n.days=Math.round(e.days)),n},create(e){return Er.fromPartial(e??{})},fromPartial(e){let n=Os();return n.retentionEventName=e.retentionEventName??"",n.days=e.days??0,n}};function Es(){return{eventName:"",totalByDay:!1,unique:!1,totalPerEntity:void 0,distinctAggregationByDays:[],retentionConfig:void 0}}var Pr={encode(e,n=o.default.Writer.create()){e.eventName!==""&&n.uint32(10).string(e.eventName),e.totalByDay!==!1&&n.uint32(16).bool(e.totalByDay),e.unique!==!1&&n.uint32(24).bool(e.unique),e.totalPerEntity!==void 0&&Or.encode(e.totalPerEntity,n.uint32(34).fork()).ldelim(),n.uint32(42).fork();for(let t of e.distinctAggregationByDays)n.int32(t);return n.ldelim(),e.retentionConfig!==void 0&&Er.encode(e.retentionConfig,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Es();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.eventName=t.string();continue;case 2:if(r!==16)break;i.totalByDay=t.bool();continue;case 3:if(r!==24)break;i.unique=t.bool();continue;case 4:if(r!==34)break;i.totalPerEntity=Or.decode(t,t.uint32());continue;case 5:if(r===40){i.distinctAggregationByDays.push(t.int32());continue}if(r===42){let s=t.uint32()+t.pos;for(;t.pos<s;)i.distinctAggregationByDays.push(t.int32());continue}break;case 6:if(r!==50)break;i.retentionConfig=Er.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{eventName:d(e.eventName)?globalThis.String(e.eventName):"",totalByDay:d(e.totalByDay)?globalThis.Boolean(e.totalByDay):!1,unique:d(e.unique)?globalThis.Boolean(e.unique):!1,totalPerEntity:d(e.totalPerEntity)?Or.fromJSON(e.totalPerEntity):void 0,distinctAggregationByDays:globalThis.Array.isArray(e?.distinctAggregationByDays)?e.distinctAggregationByDays.map(n=>globalThis.Number(n)):[],retentionConfig:d(e.retentionConfig)?Er.fromJSON(e.retentionConfig):void 0}},toJSON(e){let n={};return e.eventName!==""&&(n.eventName=e.eventName),e.totalByDay!==!1&&(n.totalByDay=e.totalByDay),e.unique!==!1&&(n.unique=e.unique),e.totalPerEntity!==void 0&&(n.totalPerEntity=Or.toJSON(e.totalPerEntity)),e.distinctAggregationByDays?.length&&(n.distinctAggregationByDays=e.distinctAggregationByDays.map(t=>Math.round(t))),e.retentionConfig!==void 0&&(n.retentionConfig=Er.toJSON(e.retentionConfig)),n},create(e){return Pr.fromPartial(e??{})},fromPartial(e){let n=Es();return n.eventName=e.eventName??"",n.totalByDay=e.totalByDay??!1,n.unique=e.unique??!1,n.totalPerEntity=e.totalPerEntity!==void 0&&e.totalPerEntity!==null?Or.fromPartial(e.totalPerEntity):void 0,n.distinctAggregationByDays=e.distinctAggregationByDays?.map(t=>t)||[],n.retentionConfig=e.retentionConfig!==void 0&&e.retentionConfig!==null?Er.fromPartial(e.retentionConfig):void 0,n}};function Ps(){return{name:"",channel:""}}var _r={encode(e,n=o.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.channel!==""&&n.uint32(18).string(e.channel),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ps();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 2:if(r!==18)break;i.channel=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:d(e.name)?globalThis.String(e.name):"",channel:d(e.channel)?globalThis.String(e.channel):""}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.channel!==""&&(n.channel=e.channel),n},create(e){return _r.fromPartial(e??{})},fromPartial(e){let n=Ps();return n.name=e.name??"",n.channel=e.channel??"",n}};function _s(){return{name:"",description:"",unit:"",sparse:!1,persistentBetweenVersion:!1,type:0,aggregationConfig:void 0}}var vr={encode(e,n=o.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.description!==""&&n.uint32(26).string(e.description),e.unit!==""&&n.uint32(18).string(e.unit),e.sparse!==!1&&n.uint32(32).bool(e.sparse),e.persistentBetweenVersion!==!1&&n.uint32(40).bool(e.persistentBetweenVersion),e.type!==0&&n.uint32(56).int32(e.type),e.aggregationConfig!==void 0&&br.encode(e.aggregationConfig,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=_s();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 3:if(r!==26)break;i.description=t.string();continue;case 2:if(r!==18)break;i.unit=t.string();continue;case 4:if(r!==32)break;i.sparse=t.bool();continue;case 5:if(r!==40)break;i.persistentBetweenVersion=t.bool();continue;case 7:if(r!==56)break;i.type=t.int32();continue;case 6:if(r!==50)break;i.aggregationConfig=br.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:d(e.name)?globalThis.String(e.name):"",description:d(e.description)?globalThis.String(e.description):"",unit:d(e.unit)?globalThis.String(e.unit):"",sparse:d(e.sparse)?globalThis.Boolean(e.sparse):!1,persistentBetweenVersion:d(e.persistentBetweenVersion)?globalThis.Boolean(e.persistentBetweenVersion):!1,type:d(e.type)?Lp(e.type):0,aggregationConfig:d(e.aggregationConfig)?br.fromJSON(e.aggregationConfig):void 0}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.description!==""&&(n.description=e.description),e.unit!==""&&(n.unit=e.unit),e.sparse!==!1&&(n.sparse=e.sparse),e.persistentBetweenVersion!==!1&&(n.persistentBetweenVersion=e.persistentBetweenVersion),e.type!==0&&(n.type=Fp(e.type)),e.aggregationConfig!==void 0&&(n.aggregationConfig=br.toJSON(e.aggregationConfig)),n},create(e){return vr.fromPartial(e??{})},fromPartial(e){let n=_s();return n.name=e.name??"",n.description=e.description??"",n.unit=e.unit??"",n.sparse=e.sparse??!1,n.persistentBetweenVersion=e.persistentBetweenVersion??!1,n.type=e.type??0,n.aggregationConfig=e.aggregationConfig!==void 0&&e.aggregationConfig!==null?br.fromPartial(e.aggregationConfig):void 0,n}};function vs(){return{name:"",fields:[]}}var Ar={encode(e,n=o.default.Writer.create()){e.name!==""&&n.uint32(10).string(e.name);for(let t of e.fields)on.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=vs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 2:if(r!==18)break;i.fields.push(on.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:d(e.name)?globalThis.String(e.name):"",fields:globalThis.Array.isArray(e?.fields)?e.fields.map(n=>on.fromJSON(n)):[]}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.fields?.length&&(n.fields=e.fields.map(t=>on.toJSON(t))),n},create(e){return Ar.fromPartial(e??{})},fromPartial(e){let n=vs();return n.name=e.name??"",n.fields=e.fields?.map(t=>on.fromPartial(t))||[],n}};function As(){return{fields:[]}}var Br={encode(e,n=o.default.Writer.create()){for(let t of e.fields)on.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=As();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.fields.push(on.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{fields:globalThis.Array.isArray(e?.fields)?e.fields.map(n=>on.fromJSON(n)):[]}},toJSON(e){let n={};return e.fields?.length&&(n.fields=e.fields.map(t=>on.toJSON(t))),n},create(e){return Br.fromPartial(e??{})},fromPartial(e){let n=As();return n.fields=e.fields?.map(t=>on.fromPartial(t))||[],n}};function Bs(){return{name:"",basicType:void 0,coinType:void 0,structType:void 0}}var on={encode(e,n=o.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.basicType!==void 0&&n.uint32(16).int32(e.basicType),e.coinType!==void 0&&Be.encode(e.coinType,n.uint32(26).fork()).ldelim(),e.structType!==void 0&&Br.encode(e.structType,n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Bs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 2:if(r!==16)break;i.basicType=t.int32();continue;case 3:if(r!==26)break;i.coinType=Be.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.structType=Br.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:d(e.name)?globalThis.String(e.name):"",basicType:d(e.basicType)?Qp(e.basicType):void 0,coinType:d(e.coinType)?Be.fromJSON(e.coinType):void 0,structType:d(e.structType)?Br.fromJSON(e.structType):void 0}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.basicType!==void 0&&(n.basicType=Zp(e.basicType)),e.coinType!==void 0&&(n.coinType=Be.toJSON(e.coinType)),e.structType!==void 0&&(n.structType=Br.toJSON(e.structType)),n},create(e){return on.fromPartial(e??{})},fromPartial(e){let n=Bs();return n.name=e.name??"",n.basicType=e.basicType??void 0,n.coinType=e.coinType!==void 0&&e.coinType!==null?Be.fromPartial(e.coinType):void 0,n.structType=e.structType!==void 0&&e.structType!==null?Br.fromPartial(e.structType):void 0,n}};function bs(){return{intervalInMinutes:[],types:[],discardOrigin:!1}}var br={encode(e,n=o.default.Writer.create()){n.uint32(10).fork();for(let t of e.intervalInMinutes)n.int32(t);n.ldelim(),n.uint32(18).fork();for(let t of e.types)n.int32(t);return n.ldelim(),e.discardOrigin!==!1&&n.uint32(24).bool(e.discardOrigin),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=bs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r===8){i.intervalInMinutes.push(t.int32());continue}if(r===10){let s=t.uint32()+t.pos;for(;t.pos<s;)i.intervalInMinutes.push(t.int32());continue}break;case 2:if(r===16){i.types.push(t.int32());continue}if(r===18){let s=t.uint32()+t.pos;for(;t.pos<s;)i.types.push(t.int32());continue}break;case 3:if(r!==24)break;i.discardOrigin=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{intervalInMinutes:globalThis.Array.isArray(e?.intervalInMinutes)?e.intervalInMinutes.map(n=>globalThis.Number(n)):[],types:globalThis.Array.isArray(e?.types)?e.types.map(n=>wp(n)):[],discardOrigin:d(e.discardOrigin)?globalThis.Boolean(e.discardOrigin):!1}},toJSON(e){let n={};return e.intervalInMinutes?.length&&(n.intervalInMinutes=e.intervalInMinutes.map(t=>Math.round(t))),e.types?.length&&(n.types=e.types.map(t=>Mp(t))),e.discardOrigin!==!1&&(n.discardOrigin=e.discardOrigin),n},create(e){return br.fromPartial(e??{})},fromPartial(e){let n=bs();return n.intervalInMinutes=e.intervalInMinutes?.map(t=>t)||[],n.types=e.types?.map(t=>t)||[],n.discardOrigin=e.discardOrigin??!1,n}};function Ds(){return{chainId:"",address:"",startBlock:BigInt("0"),endBlock:BigInt("0"),intervalConfigs:[],aptosIntervalConfigs:[],moveIntervalConfigs:[],moveCallConfigs:[],moveResourceChangeConfigs:[],logConfigs:[]}}var Dr={encode(e,n=o.default.Writer.create()){if(e.chainId!==""&&n.uint32(10).string(e.chainId),e.address!==""&&n.uint32(18).string(e.address),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");n.uint32(24).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");n.uint32(80).uint64(e.endBlock.toString())}for(let t of e.intervalConfigs)Z.encode(t,n.uint32(34).fork()).ldelim();for(let t of e.aptosIntervalConfigs)Jr.encode(t,n.uint32(42).fork()).ldelim();for(let t of e.moveIntervalConfigs)un.encode(t,n.uint32(58).fork()).ldelim();for(let t of e.moveCallConfigs)fn.encode(t,n.uint32(66).fork()).ldelim();for(let t of e.moveResourceChangeConfigs)cn.encode(t,n.uint32(74).fork()).ldelim();for(let t of e.logConfigs)sn.encode(t,n.uint32(50).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ds();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.chainId=t.string();continue;case 2:if(r!==18)break;i.address=t.string();continue;case 3:if(r!==24)break;i.startBlock=X(t.uint64());continue;case 10:if(r!==80)break;i.endBlock=X(t.uint64());continue;case 4:if(r!==34)break;i.intervalConfigs.push(Z.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.aptosIntervalConfigs.push(Jr.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.moveIntervalConfigs.push(un.decode(t,t.uint32()));continue;case 8:if(r!==66)break;i.moveCallConfigs.push(fn.decode(t,t.uint32()));continue;case 9:if(r!==74)break;i.moveResourceChangeConfigs.push(cn.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.logConfigs.push(sn.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{chainId:d(e.chainId)?globalThis.String(e.chainId):"",address:d(e.address)?globalThis.String(e.address):"",startBlock:d(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:d(e.endBlock)?BigInt(e.endBlock):BigInt("0"),intervalConfigs:globalThis.Array.isArray(e?.intervalConfigs)?e.intervalConfigs.map(n=>Z.fromJSON(n)):[],aptosIntervalConfigs:globalThis.Array.isArray(e?.aptosIntervalConfigs)?e.aptosIntervalConfigs.map(n=>Jr.fromJSON(n)):[],moveIntervalConfigs:globalThis.Array.isArray(e?.moveIntervalConfigs)?e.moveIntervalConfigs.map(n=>un.fromJSON(n)):[],moveCallConfigs:globalThis.Array.isArray(e?.moveCallConfigs)?e.moveCallConfigs.map(n=>fn.fromJSON(n)):[],moveResourceChangeConfigs:globalThis.Array.isArray(e?.moveResourceChangeConfigs)?e.moveResourceChangeConfigs.map(n=>cn.fromJSON(n)):[],logConfigs:globalThis.Array.isArray(e?.logConfigs)?e.logConfigs.map(n=>sn.fromJSON(n)):[]}},toJSON(e){let n={};return e.chainId!==""&&(n.chainId=e.chainId),e.address!==""&&(n.address=e.address),e.startBlock!==BigInt("0")&&(n.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(n.endBlock=e.endBlock.toString()),e.intervalConfigs?.length&&(n.intervalConfigs=e.intervalConfigs.map(t=>Z.toJSON(t))),e.aptosIntervalConfigs?.length&&(n.aptosIntervalConfigs=e.aptosIntervalConfigs.map(t=>Jr.toJSON(t))),e.moveIntervalConfigs?.length&&(n.moveIntervalConfigs=e.moveIntervalConfigs.map(t=>un.toJSON(t))),e.moveCallConfigs?.length&&(n.moveCallConfigs=e.moveCallConfigs.map(t=>fn.toJSON(t))),e.moveResourceChangeConfigs?.length&&(n.moveResourceChangeConfigs=e.moveResourceChangeConfigs.map(t=>cn.toJSON(t))),e.logConfigs?.length&&(n.logConfigs=e.logConfigs.map(t=>sn.toJSON(t))),n},create(e){return Dr.fromPartial(e??{})},fromPartial(e){let n=Ds();return n.chainId=e.chainId??"",n.address=e.address??"",n.startBlock=e.startBlock??BigInt("0"),n.endBlock=e.endBlock??BigInt("0"),n.intervalConfigs=e.intervalConfigs?.map(t=>Z.fromPartial(t))||[],n.aptosIntervalConfigs=e.aptosIntervalConfigs?.map(t=>Jr.fromPartial(t))||[],n.moveIntervalConfigs=e.moveIntervalConfigs?.map(t=>un.fromPartial(t))||[],n.moveCallConfigs=e.moveCallConfigs?.map(t=>fn.fromPartial(t))||[],n.moveResourceChangeConfigs=e.moveResourceChangeConfigs?.map(t=>cn.fromPartial(t))||[],n.logConfigs=e.logConfigs?.map(t=>sn.fromPartial(t))||[],n}};function Js(){return{recentInterval:0,backfillInterval:0}}var an={encode(e,n=o.default.Writer.create()){return e.recentInterval!==0&&n.uint32(8).int32(e.recentInterval),e.backfillInterval!==0&&n.uint32(16).int32(e.backfillInterval),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Js();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.recentInterval=t.int32();continue;case 2:if(r!==16)break;i.backfillInterval=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{recentInterval:d(e.recentInterval)?globalThis.Number(e.recentInterval):0,backfillInterval:d(e.backfillInterval)?globalThis.Number(e.backfillInterval):0}},toJSON(e){let n={};return e.recentInterval!==0&&(n.recentInterval=Math.round(e.recentInterval)),e.backfillInterval!==0&&(n.backfillInterval=Math.round(e.backfillInterval)),n},create(e){return an.fromPartial(e??{})},fromPartial(e){let n=Js();return n.recentInterval=e.recentInterval??0,n.backfillInterval=e.backfillInterval??0,n}};function xs(){return{handlerId:0,minutes:0,minutesInterval:void 0,slot:0,slotInterval:void 0,fetchConfig:void 0,handlerName:""}}var Z={encode(e,n=o.default.Writer.create()){return e.handlerId!==0&&n.uint32(8).int32(e.handlerId),e.minutes!==0&&n.uint32(16).int32(e.minutes),e.minutesInterval!==void 0&&an.encode(e.minutesInterval,n.uint32(34).fork()).ldelim(),e.slot!==0&&n.uint32(24).int32(e.slot),e.slotInterval!==void 0&&an.encode(e.slotInterval,n.uint32(42).fork()).ldelim(),e.fetchConfig!==void 0&&z.encode(e.fetchConfig,n.uint32(50).fork()).ldelim(),e.handlerName!==""&&n.uint32(58).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=xs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.handlerId=t.int32();continue;case 2:if(r!==16)break;i.minutes=t.int32();continue;case 4:if(r!==34)break;i.minutesInterval=an.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.slot=t.int32();continue;case 5:if(r!==42)break;i.slotInterval=an.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.fetchConfig=z.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,minutes:d(e.minutes)?globalThis.Number(e.minutes):0,minutesInterval:d(e.minutesInterval)?an.fromJSON(e.minutesInterval):void 0,slot:d(e.slot)?globalThis.Number(e.slot):0,slotInterval:d(e.slotInterval)?an.fromJSON(e.slotInterval):void 0,fetchConfig:d(e.fetchConfig)?z.fromJSON(e.fetchConfig):void 0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.minutes!==0&&(n.minutes=Math.round(e.minutes)),e.minutesInterval!==void 0&&(n.minutesInterval=an.toJSON(e.minutesInterval)),e.slot!==0&&(n.slot=Math.round(e.slot)),e.slotInterval!==void 0&&(n.slotInterval=an.toJSON(e.slotInterval)),e.fetchConfig!==void 0&&(n.fetchConfig=z.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return Z.fromPartial(e??{})},fromPartial(e){let n=xs();return n.handlerId=e.handlerId??0,n.minutes=e.minutes??0,n.minutesInterval=e.minutesInterval!==void 0&&e.minutesInterval!==null?an.fromPartial(e.minutesInterval):void 0,n.slot=e.slot??0,n.slotInterval=e.slotInterval!==void 0&&e.slotInterval!==null?an.fromPartial(e.slotInterval):void 0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?z.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function Us(){return{intervalConfig:void 0,type:""}}var Jr={encode(e,n=o.default.Writer.create()){return e.intervalConfig!==void 0&&Z.encode(e.intervalConfig,n.uint32(10).fork()).ldelim(),e.type!==""&&n.uint32(18).string(e.type),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Us();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.intervalConfig=Z.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.type=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{intervalConfig:d(e.intervalConfig)?Z.fromJSON(e.intervalConfig):void 0,type:d(e.type)?globalThis.String(e.type):""}},toJSON(e){let n={};return e.intervalConfig!==void 0&&(n.intervalConfig=Z.toJSON(e.intervalConfig)),e.type!==""&&(n.type=e.type),n},create(e){return Jr.fromPartial(e??{})},fromPartial(e){let n=Us();return n.intervalConfig=e.intervalConfig!==void 0&&e.intervalConfig!==null?Z.fromPartial(e.intervalConfig):void 0,n.type=e.type??"",n}};function Vs(){return{intervalConfig:void 0,type:"",ownerType:0,resourceFetchConfig:void 0,fetchConfig:void 0}}var un={encode(e,n=o.default.Writer.create()){return e.intervalConfig!==void 0&&Z.encode(e.intervalConfig,n.uint32(10).fork()).ldelim(),e.type!==""&&n.uint32(18).string(e.type),e.ownerType!==0&&n.uint32(24).int32(e.ownerType),e.resourceFetchConfig!==void 0&&Zr.encode(e.resourceFetchConfig,n.uint32(34).fork()).ldelim(),e.fetchConfig!==void 0&&se.encode(e.fetchConfig,n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Vs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.intervalConfig=Z.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.type=t.string();continue;case 3:if(r!==24)break;i.ownerType=t.int32();continue;case 4:if(r!==34)break;i.resourceFetchConfig=Zr.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.fetchConfig=se.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{intervalConfig:d(e.intervalConfig)?Z.fromJSON(e.intervalConfig):void 0,type:d(e.type)?globalThis.String(e.type):"",ownerType:d(e.ownerType)?Wp(e.ownerType):0,resourceFetchConfig:d(e.resourceFetchConfig)?Zr.fromJSON(e.resourceFetchConfig):void 0,fetchConfig:d(e.fetchConfig)?se.fromJSON(e.fetchConfig):void 0}},toJSON(e){let n={};return e.intervalConfig!==void 0&&(n.intervalConfig=Z.toJSON(e.intervalConfig)),e.type!==""&&(n.type=e.type),e.ownerType!==0&&(n.ownerType=qp(e.ownerType)),e.resourceFetchConfig!==void 0&&(n.resourceFetchConfig=Zr.toJSON(e.resourceFetchConfig)),e.fetchConfig!==void 0&&(n.fetchConfig=se.toJSON(e.fetchConfig)),n},create(e){return un.fromPartial(e??{})},fromPartial(e){let n=Vs();return n.intervalConfig=e.intervalConfig!==void 0&&e.intervalConfig!==null?Z.fromPartial(e.intervalConfig):void 0,n.type=e.type??"",n.ownerType=e.ownerType??0,n.resourceFetchConfig=e.resourceFetchConfig!==void 0&&e.resourceFetchConfig!==null?Zr.fromPartial(e.resourceFetchConfig):void 0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?se.fromPartial(e.fetchConfig):void 0,n}};function Ls(){return{name:"",chainId:"",address:"",abi:""}}var dn={encode(e,n=o.default.Writer.create()){return e.name!==""&&n.uint32(10).string(e.name),e.chainId!==""&&n.uint32(18).string(e.chainId),e.address!==""&&n.uint32(26).string(e.address),e.abi!==""&&n.uint32(34).string(e.abi),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ls();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.name=t.string();continue;case 2:if(r!==18)break;i.chainId=t.string();continue;case 3:if(r!==26)break;i.address=t.string();continue;case 4:if(r!==34)break;i.abi=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{name:d(e.name)?globalThis.String(e.name):"",chainId:d(e.chainId)?globalThis.String(e.chainId):"",address:d(e.address)?globalThis.String(e.address):"",abi:d(e.abi)?globalThis.String(e.abi):""}},toJSON(e){let n={};return e.name!==""&&(n.name=e.name),e.chainId!==""&&(n.chainId=e.chainId),e.address!==""&&(n.address=e.address),e.abi!==""&&(n.abi=e.abi),n},create(e){return dn.fromPartial(e??{})},fromPartial(e){let n=Ls();return n.name=e.name??"",n.chainId=e.chainId??"",n.address=e.address??"",n.abi=e.abi??"",n}};function Fs(){return{contract:void 0,startBlock:BigInt("0"),endBlock:BigInt("0"),templateId:0,baseLabels:void 0}}var ln={encode(e,n=o.default.Writer.create()){if(e.contract!==void 0&&dn.encode(e.contract,n.uint32(10).fork()).ldelim(),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");n.uint32(16).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");n.uint32(24).uint64(e.endBlock.toString())}return e.templateId!==0&&n.uint32(32).int32(e.templateId),e.baseLabels!==void 0&&f.encode(f.wrap(e.baseLabels),n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Fs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.contract=dn.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.startBlock=X(t.uint64());continue;case 3:if(r!==24)break;i.endBlock=X(t.uint64());continue;case 4:if(r!==32)break;i.templateId=t.int32();continue;case 5:if(r!==42)break;i.baseLabels=f.unwrap(f.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{contract:d(e.contract)?dn.fromJSON(e.contract):void 0,startBlock:d(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:d(e.endBlock)?BigInt(e.endBlock):BigInt("0"),templateId:d(e.templateId)?globalThis.Number(e.templateId):0,baseLabels:R(e.baseLabels)?e.baseLabels:void 0}},toJSON(e){let n={};return e.contract!==void 0&&(n.contract=dn.toJSON(e.contract)),e.startBlock!==BigInt("0")&&(n.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(n.endBlock=e.endBlock.toString()),e.templateId!==0&&(n.templateId=Math.round(e.templateId)),e.baseLabels!==void 0&&(n.baseLabels=e.baseLabels),n},create(e){return ln.fromPartial(e??{})},fromPartial(e){let n=Fs();return n.contract=e.contract!==void 0&&e.contract!==null?dn.fromPartial(e.contract):void 0,n.startBlock=e.startBlock??BigInt("0"),n.endBlock=e.endBlock??BigInt("0"),n.templateId=e.templateId??0,n.baseLabels=e.baseLabels??void 0,n}};function ws(){return{templateInstances:[]}}var Dc={encode(e,n=o.default.Writer.create()){for(let t of e.templateInstances)ln.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ws();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.templateInstances.push(ln.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(n=>ln.fromJSON(n)):[]}},toJSON(e){let n={};return e.templateInstances?.length&&(n.templateInstances=e.templateInstances.map(t=>ln.toJSON(t))),n},create(e){return Dc.fromPartial(e??{})},fromPartial(e){let n=ws();return n.templateInstances=e.templateInstances?.map(t=>ln.fromPartial(t))||[],n}};function Ms(){return{transaction:!1,transactionReceipt:!1,transactionReceiptLogs:!1,block:!1,trace:!1}}var z={encode(e,n=o.default.Writer.create()){return e.transaction!==!1&&n.uint32(8).bool(e.transaction),e.transactionReceipt!==!1&&n.uint32(16).bool(e.transactionReceipt),e.transactionReceiptLogs!==!1&&n.uint32(40).bool(e.transactionReceiptLogs),e.block!==!1&&n.uint32(24).bool(e.block),e.trace!==!1&&n.uint32(32).bool(e.trace),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ms();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.transaction=t.bool();continue;case 2:if(r!==16)break;i.transactionReceipt=t.bool();continue;case 5:if(r!==40)break;i.transactionReceiptLogs=t.bool();continue;case 3:if(r!==24)break;i.block=t.bool();continue;case 4:if(r!==32)break;i.trace=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:d(e.transaction)?globalThis.Boolean(e.transaction):!1,transactionReceipt:d(e.transactionReceipt)?globalThis.Boolean(e.transactionReceipt):!1,transactionReceiptLogs:d(e.transactionReceiptLogs)?globalThis.Boolean(e.transactionReceiptLogs):!1,block:d(e.block)?globalThis.Boolean(e.block):!1,trace:d(e.trace)?globalThis.Boolean(e.trace):!1}},toJSON(e){let n={};return e.transaction!==!1&&(n.transaction=e.transaction),e.transactionReceipt!==!1&&(n.transactionReceipt=e.transactionReceipt),e.transactionReceiptLogs!==!1&&(n.transactionReceiptLogs=e.transactionReceiptLogs),e.block!==!1&&(n.block=e.block),e.trace!==!1&&(n.trace=e.trace),n},create(e){return z.fromPartial(e??{})},fromPartial(e){let n=Ms();return n.transaction=e.transaction??!1,n.transactionReceipt=e.transactionReceipt??!1,n.transactionReceiptLogs=e.transactionReceiptLogs??!1,n.block=e.block??!1,n.trace=e.trace??!1,n}};function Ws(){return{signature:"",handlerId:0,fetchConfig:void 0,handlerName:""}}var xr={encode(e,n=o.default.Writer.create()){return e.signature!==""&&n.uint32(10).string(e.signature),e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&z.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ws();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.signature=t.string();continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=z.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{signature:d(e.signature)?globalThis.String(e.signature):"",handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:d(e.fetchConfig)?z.fromJSON(e.fetchConfig):void 0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.signature!==""&&(n.signature=e.signature),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=z.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return xr.fromPartial(e??{})},fromPartial(e){let n=Ws();return n.signature=e.signature??"",n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?z.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function qs(){return{handlerId:0,fetchConfig:void 0,handlerName:""}}var Ur={encode(e,n=o.default.Writer.create()){return e.handlerId!==0&&n.uint32(8).int32(e.handlerId),e.fetchConfig!==void 0&&z.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=qs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=z.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:d(e.fetchConfig)?z.fromJSON(e.fetchConfig):void 0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=z.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return Ur.fromPartial(e??{})},fromPartial(e){let n=qs();return n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?z.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function Gs(){return{filters:[],handlerId:0,fetchConfig:void 0,handlerName:""}}var sn={encode(e,n=o.default.Writer.create()){for(let t of e.filters)Gr.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&z.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Gs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(Gr.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=z.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>Gr.fromJSON(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:d(e.fetchConfig)?z.fromJSON(e.fetchConfig):void 0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>Gr.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=z.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return sn.fromPartial(e??{})},fromPartial(e){let n=Gs();return n.filters=e.filters?.map(t=>Gr.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?z.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function Hs(){return{filters:[],handlerId:0,handlerName:""}}var Vr={encode(e,n=o.default.Writer.create()){for(let t of e.filters)Lr.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Hs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(Lr.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>Lr.fromJSON(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>Lr.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return Vr.fromPartial(e??{})},fromPartial(e){let n=Hs();return n.filters=e.filters?.map(t=>Lr.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function Qs(){return{assetId:void 0,fromAddress:void 0,toAddress:void 0}}var Lr={encode(e,n=o.default.Writer.create()){return e.assetId!==void 0&&n.uint32(10).string(e.assetId),e.fromAddress!==void 0&&n.uint32(18).string(e.fromAddress),e.toAddress!==void 0&&n.uint32(26).string(e.toAddress),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Qs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.assetId=t.string();continue;case 2:if(r!==18)break;i.fromAddress=t.string();continue;case 3:if(r!==26)break;i.toAddress=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{assetId:d(e.assetId)?globalThis.String(e.assetId):void 0,fromAddress:d(e.fromAddress)?globalThis.String(e.fromAddress):void 0,toAddress:d(e.toAddress)?globalThis.String(e.toAddress):void 0}},toJSON(e){let n={};return e.assetId!==void 0&&(n.assetId=e.assetId),e.fromAddress!==void 0&&(n.fromAddress=e.fromAddress),e.toAddress!==void 0&&(n.toAddress=e.toAddress),n},create(e){return Lr.fromPartial(e??{})},fromPartial(e){let n=Qs();return n.assetId=e.assetId??void 0,n.fromAddress=e.fromAddress??void 0,n.toAddress=e.toAddress??void 0,n}};function Zs(){return{logIds:[],handlerId:0,handlerName:""}}var Fr={encode(e,n=o.default.Writer.create()){for(let t of e.logIds)n.uint32(10).string(t);return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Zs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.logIds.push(t.string());continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{logIds:globalThis.Array.isArray(e?.logIds)?e.logIds.map(n=>globalThis.String(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.logIds?.length&&(n.logIds=e.logIds),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return Fr.fromPartial(e??{})},fromPartial(e){let n=Zs();return n.logIds=e.logIds?.map(t=>t)||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function zs(){return{log:void 0,transfer:void 0,handlerId:0,handlerName:""}}var wr={encode(e,n=o.default.Writer.create()){return e.log!==void 0&&Wr.encode(e.log,n.uint32(10).fork()).ldelim(),e.transfer!==void 0&&Mr.encode(e.transfer,n.uint32(18).fork()).ldelim(),e.handlerId!==0&&n.uint32(24).int32(e.handlerId),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=zs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.log=Wr.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.transfer=Mr.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.handlerId=t.int32();continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{log:d(e.log)?Wr.fromJSON(e.log):void 0,transfer:d(e.transfer)?Mr.fromJSON(e.transfer):void 0,handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.log!==void 0&&(n.log=Wr.toJSON(e.log)),e.transfer!==void 0&&(n.transfer=Mr.toJSON(e.transfer)),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return wr.fromPartial(e??{})},fromPartial(e){let n=zs();return n.log=e.log!==void 0&&e.log!==null?Wr.fromPartial(e.log):void 0,n.transfer=e.transfer!==void 0&&e.transfer!==null?Mr.fromPartial(e.transfer):void 0,n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function Ks(){return{assetId:"",from:"",to:""}}var Mr={encode(e,n=o.default.Writer.create()){return e.assetId!==""&&n.uint32(34).string(e.assetId),e.from!==""&&n.uint32(10).string(e.from),e.to!==""&&n.uint32(18).string(e.to),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ks();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.assetId=t.string();continue;case 1:if(r!==10)break;i.from=t.string();continue;case 2:if(r!==18)break;i.to=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{assetId:d(e.assetId)?globalThis.String(e.assetId):"",from:d(e.from)?globalThis.String(e.from):"",to:d(e.to)?globalThis.String(e.to):""}},toJSON(e){let n={};return e.assetId!==""&&(n.assetId=e.assetId),e.from!==""&&(n.from=e.from),e.to!==""&&(n.to=e.to),n},create(e){return Mr.fromPartial(e??{})},fromPartial(e){let n=Ks();return n.assetId=e.assetId??"",n.from=e.from??"",n.to=e.to??"",n}};function Xs(){return{logIds:[]}}var Wr={encode(e,n=o.default.Writer.create()){for(let t of e.logIds)n.uint32(10).string(t);return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Xs();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.logIds.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{logIds:globalThis.Array.isArray(e?.logIds)?e.logIds.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.logIds?.length&&(n.logIds=e.logIds),n},create(e){return Wr.fromPartial(e??{})},fromPartial(e){let n=Xs();return n.logIds=e.logIds?.map(t=>t)||[],n}};function Ys(){return{logFilters:[],handlerId:0,handlerName:""}}var qr={encode(e,n=o.default.Writer.create()){for(let t of e.logFilters)n.uint32(10).string(t);return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ys();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.logFilters.push(t.string());continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{logFilters:globalThis.Array.isArray(e?.logFilters)?e.logFilters.map(n=>globalThis.String(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.logFilters?.length&&(n.logFilters=e.logFilters),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return qr.fromPartial(e??{})},fromPartial(e){let n=Ys();return n.logFilters=e.logFilters?.map(t=>t)||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function $s(){return{topics:[],address:void 0,addressType:void 0}}var Gr={encode(e,n=o.default.Writer.create()){for(let t of e.topics)oi.encode(t,n.uint32(10).fork()).ldelim();return e.address!==void 0&&n.uint32(18).string(e.address),e.addressType!==void 0&&n.uint32(24).int32(e.addressType),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=$s();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.topics.push(oi.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.address=t.string();continue;case 3:if(r!==24)break;i.addressType=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{topics:globalThis.Array.isArray(e?.topics)?e.topics.map(n=>oi.fromJSON(n)):[],address:d(e.address)?globalThis.String(e.address):void 0,addressType:d(e.addressType)?Gp(e.addressType):void 0}},toJSON(e){let n={};return e.topics?.length&&(n.topics=e.topics.map(t=>oi.toJSON(t))),e.address!==void 0&&(n.address=e.address),e.addressType!==void 0&&(n.addressType=Hp(e.addressType)),n},create(e){return Gr.fromPartial(e??{})},fromPartial(e){let n=$s();return n.topics=e.topics?.map(t=>oi.fromPartial(t))||[],n.address=e.address??void 0,n.addressType=e.addressType??void 0,n}};function js(){return{innerInstruction:!1,parsedInstruction:!1,rawDataInstruction:!1}}var Hr={encode(e,n=o.default.Writer.create()){return e.innerInstruction!==!1&&n.uint32(8).bool(e.innerInstruction),e.parsedInstruction!==!1&&n.uint32(16).bool(e.parsedInstruction),e.rawDataInstruction!==!1&&n.uint32(24).bool(e.rawDataInstruction),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=js();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.innerInstruction=t.bool();continue;case 2:if(r!==16)break;i.parsedInstruction=t.bool();continue;case 3:if(r!==24)break;i.rawDataInstruction=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{innerInstruction:d(e.innerInstruction)?globalThis.Boolean(e.innerInstruction):!1,parsedInstruction:d(e.parsedInstruction)?globalThis.Boolean(e.parsedInstruction):!1,rawDataInstruction:d(e.rawDataInstruction)?globalThis.Boolean(e.rawDataInstruction):!1}},toJSON(e){let n={};return e.innerInstruction!==!1&&(n.innerInstruction=e.innerInstruction),e.parsedInstruction!==!1&&(n.parsedInstruction=e.parsedInstruction),e.rawDataInstruction!==!1&&(n.rawDataInstruction=e.rawDataInstruction),n},create(e){return Hr.fromPartial(e??{})},fromPartial(e){let n=js();return n.innerInstruction=e.innerInstruction??!1,n.parsedInstruction=e.parsedInstruction??!1,n.rawDataInstruction=e.rawDataInstruction??!1,n}};function ef(){return{moveTypePrefix:""}}var Qr={encode(e,n=o.default.Writer.create()){return e.moveTypePrefix!==""&&n.uint32(10).string(e.moveTypePrefix),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ef();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.moveTypePrefix=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{moveTypePrefix:d(e.moveTypePrefix)?globalThis.String(e.moveTypePrefix):""}},toJSON(e){let n={};return e.moveTypePrefix!==""&&(n.moveTypePrefix=e.moveTypePrefix),n},create(e){return Qr.fromPartial(e??{})},fromPartial(e){let n=ef();return n.moveTypePrefix=e.moveTypePrefix??"",n}};function nf(){return{resourceChanges:!1,allEvents:!1,inputs:!1,resourceConfig:void 0,supportMultisigFunc:void 0,includeFailedTransaction:void 0}}var se={encode(e,n=o.default.Writer.create()){return e.resourceChanges!==!1&&n.uint32(8).bool(e.resourceChanges),e.allEvents!==!1&&n.uint32(16).bool(e.allEvents),e.inputs!==!1&&n.uint32(32).bool(e.inputs),e.resourceConfig!==void 0&&Qr.encode(e.resourceConfig,n.uint32(26).fork()).ldelim(),e.supportMultisigFunc!==void 0&&n.uint32(40).bool(e.supportMultisigFunc),e.includeFailedTransaction!==void 0&&n.uint32(48).bool(e.includeFailedTransaction),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=nf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.resourceChanges=t.bool();continue;case 2:if(r!==16)break;i.allEvents=t.bool();continue;case 4:if(r!==32)break;i.inputs=t.bool();continue;case 3:if(r!==26)break;i.resourceConfig=Qr.decode(t,t.uint32());continue;case 5:if(r!==40)break;i.supportMultisigFunc=t.bool();continue;case 6:if(r!==48)break;i.includeFailedTransaction=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{resourceChanges:d(e.resourceChanges)?globalThis.Boolean(e.resourceChanges):!1,allEvents:d(e.allEvents)?globalThis.Boolean(e.allEvents):!1,inputs:d(e.inputs)?globalThis.Boolean(e.inputs):!1,resourceConfig:d(e.resourceConfig)?Qr.fromJSON(e.resourceConfig):void 0,supportMultisigFunc:d(e.supportMultisigFunc)?globalThis.Boolean(e.supportMultisigFunc):void 0,includeFailedTransaction:d(e.includeFailedTransaction)?globalThis.Boolean(e.includeFailedTransaction):void 0}},toJSON(e){let n={};return e.resourceChanges!==!1&&(n.resourceChanges=e.resourceChanges),e.allEvents!==!1&&(n.allEvents=e.allEvents),e.inputs!==!1&&(n.inputs=e.inputs),e.resourceConfig!==void 0&&(n.resourceConfig=Qr.toJSON(e.resourceConfig)),e.supportMultisigFunc!==void 0&&(n.supportMultisigFunc=e.supportMultisigFunc),e.includeFailedTransaction!==void 0&&(n.includeFailedTransaction=e.includeFailedTransaction),n},create(e){return se.fromPartial(e??{})},fromPartial(e){let n=nf();return n.resourceChanges=e.resourceChanges??!1,n.allEvents=e.allEvents??!1,n.inputs=e.inputs??!1,n.resourceConfig=e.resourceConfig!==void 0&&e.resourceConfig!==null?Qr.fromPartial(e.resourceConfig):void 0,n.supportMultisigFunc=e.supportMultisigFunc??void 0,n.includeFailedTransaction=e.includeFailedTransaction??void 0,n}};function tf(){return{owned:!1}}var Zr={encode(e,n=o.default.Writer.create()){return e.owned!==!1&&n.uint32(8).bool(e.owned),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=tf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.owned=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{owned:d(e.owned)?globalThis.Boolean(e.owned):!1}},toJSON(e){let n={};return e.owned!==!1&&(n.owned=e.owned),n},create(e){return Zr.fromPartial(e??{})},fromPartial(e){let n=tf();return n.owned=e.owned??!1,n}};function rf(){return{filters:[],handlerId:0,fetchConfig:void 0,handlerName:""}}var zr={encode(e,n=o.default.Writer.create()){for(let t of e.filters)Kr.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&se.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=rf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(Kr.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=se.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>Kr.fromJSON(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:d(e.fetchConfig)?se.fromJSON(e.fetchConfig):void 0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>Kr.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=se.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return zr.fromPartial(e??{})},fromPartial(e){let n=rf();return n.filters=e.filters?.map(t=>Kr.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?se.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function af(){return{type:"",account:"",eventAccount:""}}var Kr={encode(e,n=o.default.Writer.create()){return e.type!==""&&n.uint32(10).string(e.type),e.account!==""&&n.uint32(18).string(e.account),e.eventAccount!==""&&n.uint32(26).string(e.eventAccount),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=af();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.type=t.string();continue;case 2:if(r!==18)break;i.account=t.string();continue;case 3:if(r!==26)break;i.eventAccount=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{type:d(e.type)?globalThis.String(e.type):"",account:d(e.account)?globalThis.String(e.account):"",eventAccount:d(e.eventAccount)?globalThis.String(e.eventAccount):""}},toJSON(e){let n={};return e.type!==""&&(n.type=e.type),e.account!==""&&(n.account=e.account),e.eventAccount!==""&&(n.eventAccount=e.eventAccount),n},create(e){return Kr.fromPartial(e??{})},fromPartial(e){let n=af();return n.type=e.type??"",n.account=e.account??"",n.eventAccount=e.eventAccount??"",n}};function of(){return{filters:[],handlerId:0,fetchConfig:void 0,handlerName:""}}var fn={encode(e,n=o.default.Writer.create()){for(let t of e.filters)Xr.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&se.encode(e.fetchConfig,n.uint32(26).fork()).ldelim(),e.handlerName!==""&&n.uint32(34).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=of();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(Xr.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.fetchConfig=se.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>Xr.fromJSON(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:d(e.fetchConfig)?se.fromJSON(e.fetchConfig):void 0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>Xr.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(n.fetchConfig=se.toJSON(e.fetchConfig)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return fn.fromPartial(e??{})},fromPartial(e){let n=of();return n.filters=e.filters?.map(t=>Xr.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?se.fromPartial(e.fetchConfig):void 0,n.handlerName=e.handlerName??"",n}};function uf(){return{type:"",includeDeleted:!1,handlerId:0,handlerName:""}}var cn={encode(e,n=o.default.Writer.create()){return e.type!==""&&n.uint32(10).string(e.type),e.includeDeleted!==!1&&n.uint32(32).bool(e.includeDeleted),e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=uf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.type=t.string();continue;case 4:if(r!==32)break;i.includeDeleted=t.bool();continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{type:d(e.type)?globalThis.String(e.type):"",includeDeleted:d(e.includeDeleted)?globalThis.Boolean(e.includeDeleted):!1,handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.type!==""&&(n.type=e.type),e.includeDeleted!==!1&&(n.includeDeleted=e.includeDeleted),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return cn.fromPartial(e??{})},fromPartial(e){let n=uf();return n.type=e.type??"",n.includeDeleted=e.includeDeleted??!1,n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function df(){return{function:"",typeArguments:[],withTypeArguments:!1,includeFailed:!1,publicKeyPrefix:"",fromAndToAddress:void 0}}var Xr={encode(e,n=o.default.Writer.create()){e.function!==""&&n.uint32(10).string(e.function);for(let t of e.typeArguments)n.uint32(18).string(t);return e.withTypeArguments!==!1&&n.uint32(24).bool(e.withTypeArguments),e.includeFailed!==!1&&n.uint32(32).bool(e.includeFailed),e.publicKeyPrefix!==""&&n.uint32(42).string(e.publicKeyPrefix),e.fromAndToAddress!==void 0&&Yr.encode(e.fromAndToAddress,n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=df();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.function=t.string();continue;case 2:if(r!==18)break;i.typeArguments.push(t.string());continue;case 3:if(r!==24)break;i.withTypeArguments=t.bool();continue;case 4:if(r!==32)break;i.includeFailed=t.bool();continue;case 5:if(r!==42)break;i.publicKeyPrefix=t.string();continue;case 6:if(r!==50)break;i.fromAndToAddress=Yr.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{function:d(e.function)?globalThis.String(e.function):"",typeArguments:globalThis.Array.isArray(e?.typeArguments)?e.typeArguments.map(n=>globalThis.String(n)):[],withTypeArguments:d(e.withTypeArguments)?globalThis.Boolean(e.withTypeArguments):!1,includeFailed:d(e.includeFailed)?globalThis.Boolean(e.includeFailed):!1,publicKeyPrefix:d(e.publicKeyPrefix)?globalThis.String(e.publicKeyPrefix):"",fromAndToAddress:d(e.fromAndToAddress)?Yr.fromJSON(e.fromAndToAddress):void 0}},toJSON(e){let n={};return e.function!==""&&(n.function=e.function),e.typeArguments?.length&&(n.typeArguments=e.typeArguments),e.withTypeArguments!==!1&&(n.withTypeArguments=e.withTypeArguments),e.includeFailed!==!1&&(n.includeFailed=e.includeFailed),e.publicKeyPrefix!==""&&(n.publicKeyPrefix=e.publicKeyPrefix),e.fromAndToAddress!==void 0&&(n.fromAndToAddress=Yr.toJSON(e.fromAndToAddress)),n},create(e){return Xr.fromPartial(e??{})},fromPartial(e){let n=df();return n.function=e.function??"",n.typeArguments=e.typeArguments?.map(t=>t)||[],n.withTypeArguments=e.withTypeArguments??!1,n.includeFailed=e.includeFailed??!1,n.publicKeyPrefix=e.publicKeyPrefix??"",n.fromAndToAddress=e.fromAndToAddress!==void 0&&e.fromAndToAddress!==null?Yr.fromPartial(e.fromAndToAddress):void 0,n}};function lf(){return{from:"",to:""}}var Yr={encode(e,n=o.default.Writer.create()){return e.from!==""&&n.uint32(10).string(e.from),e.to!==""&&n.uint32(18).string(e.to),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=lf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.from=t.string();continue;case 2:if(r!==18)break;i.to=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{from:d(e.from)?globalThis.String(e.from):"",to:d(e.to)?globalThis.String(e.to):""}},toJSON(e){let n={};return e.from!==""&&(n.from=e.from),e.to!==""&&(n.to=e.to),n},create(e){return Yr.fromPartial(e??{})},fromPartial(e){let n=lf();return n.from=e.from??"",n.to=e.to??"",n}};function sf(){return{filters:[],handlerId:0,handlerName:""}}var $r={encode(e,n=o.default.Writer.create()){for(let t of e.filters)ti.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=sf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(ti.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>ti.fromJSON(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>ti.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return $r.fromPartial(e??{})},fromPartial(e){let n=sf();return n.filters=e.filters?.map(t=>ti.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function ff(){return{filters:[],handlerId:0,handlerName:""}}var jr={encode(e,n=o.default.Writer.create()){for(let t of e.filters)pn.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ff();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(pn.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>pn.fromJSON(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>pn.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return jr.fromPartial(e??{})},fromPartial(e){let n=ff();return n.filters=e.filters?.map(t=>pn.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function cf(){return{inputFilter:void 0,outputFilter:void 0,filter:[]}}var pn={encode(e,n=o.default.Writer.create()){e.inputFilter!==void 0&&ei.encode(e.inputFilter,n.uint32(10).fork()).ldelim(),e.outputFilter!==void 0&&ni.encode(e.outputFilter,n.uint32(18).fork()).ldelim();for(let t of e.filter)fe.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=cf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.inputFilter=ei.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.outputFilter=ni.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.filter.push(fe.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{inputFilter:d(e.inputFilter)?ei.fromJSON(e.inputFilter):void 0,outputFilter:d(e.outputFilter)?ni.fromJSON(e.outputFilter):void 0,filter:globalThis.Array.isArray(e?.filter)?e.filter.map(n=>fe.fromJSON(n)):[]}},toJSON(e){let n={};return e.inputFilter!==void 0&&(n.inputFilter=ei.toJSON(e.inputFilter)),e.outputFilter!==void 0&&(n.outputFilter=ni.toJSON(e.outputFilter)),e.filter?.length&&(n.filter=e.filter.map(t=>fe.toJSON(t))),n},create(e){return pn.fromPartial(e??{})},fromPartial(e){let n=cf();return n.inputFilter=e.inputFilter!==void 0&&e.inputFilter!==null?ei.fromPartial(e.inputFilter):void 0,n.outputFilter=e.outputFilter!==void 0&&e.outputFilter!==null?ni.fromPartial(e.outputFilter):void 0,n.filter=e.filter?.map(t=>fe.fromPartial(t))||[],n}};function pf(){return{eq:void 0,gt:void 0,gte:void 0,lt:void 0,lte:void 0,ne:void 0,prefix:void 0,contains:void 0,notContains:void 0,lengthEq:void 0,lengthGt:void 0,lengthLt:void 0,hasAny:void 0,hasAll:void 0,in:void 0}}var bn={encode(e,n=o.default.Writer.create()){return e.eq!==void 0&&N.encode(e.eq,n.uint32(10).fork()).ldelim(),e.gt!==void 0&&N.encode(e.gt,n.uint32(18).fork()).ldelim(),e.gte!==void 0&&N.encode(e.gte,n.uint32(26).fork()).ldelim(),e.lt!==void 0&&N.encode(e.lt,n.uint32(34).fork()).ldelim(),e.lte!==void 0&&N.encode(e.lte,n.uint32(42).fork()).ldelim(),e.ne!==void 0&&N.encode(e.ne,n.uint32(50).fork()).ldelim(),e.prefix!==void 0&&n.uint32(58).string(e.prefix),e.contains!==void 0&&n.uint32(66).string(e.contains),e.notContains!==void 0&&n.uint32(74).string(e.notContains),e.lengthEq!==void 0&&n.uint32(80).int32(e.lengthEq),e.lengthGt!==void 0&&n.uint32(88).int32(e.lengthGt),e.lengthLt!==void 0&&n.uint32(96).int32(e.lengthLt),e.hasAny!==void 0&&U.encode(e.hasAny,n.uint32(106).fork()).ldelim(),e.hasAll!==void 0&&U.encode(e.hasAll,n.uint32(114).fork()).ldelim(),e.in!==void 0&&U.encode(e.in,n.uint32(122).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=pf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.eq=N.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.gt=N.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.gte=N.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.lt=N.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.lte=N.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.ne=N.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.prefix=t.string();continue;case 8:if(r!==66)break;i.contains=t.string();continue;case 9:if(r!==74)break;i.notContains=t.string();continue;case 10:if(r!==80)break;i.lengthEq=t.int32();continue;case 11:if(r!==88)break;i.lengthGt=t.int32();continue;case 12:if(r!==96)break;i.lengthLt=t.int32();continue;case 13:if(r!==106)break;i.hasAny=U.decode(t,t.uint32());continue;case 14:if(r!==114)break;i.hasAll=U.decode(t,t.uint32());continue;case 15:if(r!==122)break;i.in=U.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{eq:d(e.eq)?N.fromJSON(e.eq):void 0,gt:d(e.gt)?N.fromJSON(e.gt):void 0,gte:d(e.gte)?N.fromJSON(e.gte):void 0,lt:d(e.lt)?N.fromJSON(e.lt):void 0,lte:d(e.lte)?N.fromJSON(e.lte):void 0,ne:d(e.ne)?N.fromJSON(e.ne):void 0,prefix:d(e.prefix)?globalThis.String(e.prefix):void 0,contains:d(e.contains)?globalThis.String(e.contains):void 0,notContains:d(e.notContains)?globalThis.String(e.notContains):void 0,lengthEq:d(e.lengthEq)?globalThis.Number(e.lengthEq):void 0,lengthGt:d(e.lengthGt)?globalThis.Number(e.lengthGt):void 0,lengthLt:d(e.lengthLt)?globalThis.Number(e.lengthLt):void 0,hasAny:d(e.hasAny)?U.fromJSON(e.hasAny):void 0,hasAll:d(e.hasAll)?U.fromJSON(e.hasAll):void 0,in:d(e.in)?U.fromJSON(e.in):void 0}},toJSON(e){let n={};return e.eq!==void 0&&(n.eq=N.toJSON(e.eq)),e.gt!==void 0&&(n.gt=N.toJSON(e.gt)),e.gte!==void 0&&(n.gte=N.toJSON(e.gte)),e.lt!==void 0&&(n.lt=N.toJSON(e.lt)),e.lte!==void 0&&(n.lte=N.toJSON(e.lte)),e.ne!==void 0&&(n.ne=N.toJSON(e.ne)),e.prefix!==void 0&&(n.prefix=e.prefix),e.contains!==void 0&&(n.contains=e.contains),e.notContains!==void 0&&(n.notContains=e.notContains),e.lengthEq!==void 0&&(n.lengthEq=Math.round(e.lengthEq)),e.lengthGt!==void 0&&(n.lengthGt=Math.round(e.lengthGt)),e.lengthLt!==void 0&&(n.lengthLt=Math.round(e.lengthLt)),e.hasAny!==void 0&&(n.hasAny=U.toJSON(e.hasAny)),e.hasAll!==void 0&&(n.hasAll=U.toJSON(e.hasAll)),e.in!==void 0&&(n.in=U.toJSON(e.in)),n},create(e){return bn.fromPartial(e??{})},fromPartial(e){let n=pf();return n.eq=e.eq!==void 0&&e.eq!==null?N.fromPartial(e.eq):void 0,n.gt=e.gt!==void 0&&e.gt!==null?N.fromPartial(e.gt):void 0,n.gte=e.gte!==void 0&&e.gte!==null?N.fromPartial(e.gte):void 0,n.lt=e.lt!==void 0&&e.lt!==null?N.fromPartial(e.lt):void 0,n.lte=e.lte!==void 0&&e.lte!==null?N.fromPartial(e.lte):void 0,n.ne=e.ne!==void 0&&e.ne!==null?N.fromPartial(e.ne):void 0,n.prefix=e.prefix??void 0,n.contains=e.contains??void 0,n.notContains=e.notContains??void 0,n.lengthEq=e.lengthEq??void 0,n.lengthGt=e.lengthGt??void 0,n.lengthLt=e.lengthLt??void 0,n.hasAny=e.hasAny!==void 0&&e.hasAny!==null?U.fromPartial(e.hasAny):void 0,n.hasAll=e.hasAll!==void 0&&e.hasAll!==null?U.fromPartial(e.hasAll):void 0,n.in=e.in!==void 0&&e.in!==null?U.fromPartial(e.in):void 0,n}};function gf(){return{conditions:{}}}var fe={encode(e,n=o.default.Writer.create()){return Object.entries(e.conditions).forEach(([t,a])=>{La.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=gf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=La.decode(t,t.uint32());s.value!==void 0&&(i.conditions[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{conditions:R(e.conditions)?Object.entries(e.conditions).reduce((n,[t,a])=>(n[t]=bn.fromJSON(a),n),{}):{}}},toJSON(e){let n={};if(e.conditions){let t=Object.entries(e.conditions);t.length>0&&(n.conditions={},t.forEach(([a,i])=>{n.conditions[a]=bn.toJSON(i)}))}return n},create(e){return fe.fromPartial(e??{})},fromPartial(e){let n=gf();return n.conditions=Object.entries(e.conditions??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=bn.fromPartial(i)),t),{}),n}};function mf(){return{key:"",value:void 0}}var La={encode(e,n=o.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==void 0&&bn.encode(e.value,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=mf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=bn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:d(e.key)?globalThis.String(e.key):"",value:d(e.value)?bn.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==void 0&&(n.value=bn.toJSON(e.value)),n},create(e){return La.fromPartial(e??{})},fromPartial(e){let n=mf();return n.key=e.key??"",n.value=e.value!==void 0&&e.value!==null?bn.fromPartial(e.value):void 0,n}};function hf(){return{filters:[]}}var gn={encode(e,n=o.default.Writer.create()){for(let t of e.filters)fe.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=hf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(fe.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>fe.fromJSON(n)):[]}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>fe.toJSON(t))),n},create(e){return gn.fromPartial(e??{})},fromPartial(e){let n=hf();return n.filters=e.filters?.map(t=>fe.fromPartial(t))||[],n}};function yf(){return{filters:void 0,preVOut:void 0,preTransaction:void 0}}var ei={encode(e,n=o.default.Writer.create()){return e.filters!==void 0&&gn.encode(e.filters,n.uint32(10).fork()).ldelim(),e.preVOut!==void 0&&fe.encode(e.preVOut,n.uint32(18).fork()).ldelim(),e.preTransaction!==void 0&&pn.encode(e.preTransaction,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=yf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters=gn.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.preVOut=fe.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.preTransaction=pn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:d(e.filters)?gn.fromJSON(e.filters):void 0,preVOut:d(e.preVOut)?fe.fromJSON(e.preVOut):void 0,preTransaction:d(e.preTransaction)?pn.fromJSON(e.preTransaction):void 0}},toJSON(e){let n={};return e.filters!==void 0&&(n.filters=gn.toJSON(e.filters)),e.preVOut!==void 0&&(n.preVOut=fe.toJSON(e.preVOut)),e.preTransaction!==void 0&&(n.preTransaction=pn.toJSON(e.preTransaction)),n},create(e){return ei.fromPartial(e??{})},fromPartial(e){let n=yf();return n.filters=e.filters!==void 0&&e.filters!==null?gn.fromPartial(e.filters):void 0,n.preVOut=e.preVOut!==void 0&&e.preVOut!==null?fe.fromPartial(e.preVOut):void 0,n.preTransaction=e.preTransaction!==void 0&&e.preTransaction!==null?pn.fromPartial(e.preTransaction):void 0,n}};function kf(){return{filters:void 0}}var ni={encode(e,n=o.default.Writer.create()){return e.filters!==void 0&&gn.encode(e.filters,n.uint32(10).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=kf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters=gn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:d(e.filters)?gn.fromJSON(e.filters):void 0}},toJSON(e){let n={};return e.filters!==void 0&&(n.filters=gn.toJSON(e.filters)),n},create(e){return ni.fromPartial(e??{})},fromPartial(e){let n=kf();return n.filters=e.filters!==void 0&&e.filters!==null?gn.fromPartial(e.filters):void 0,n}};function Sf(){return{address:"",keys:[]}}var ti={encode(e,n=o.default.Writer.create()){e.address!==""&&n.uint32(10).string(e.address);for(let t of e.keys)n.uint32(18).string(t);return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Sf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.address=t.string();continue;case 2:if(r!==18)break;i.keys.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{address:d(e.address)?globalThis.String(e.address):"",keys:globalThis.Array.isArray(e?.keys)?e.keys.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.address!==""&&(n.address=e.address),e.keys?.length&&(n.keys=e.keys),n},create(e){return ti.fromPartial(e??{})},fromPartial(e){let n=Sf();return n.address=e.address??"",n.keys=e.keys?.map(t=>t)||[],n}};function Nf(){return{function:"",includeFailed:!1}}var ri={encode(e,n=o.default.Writer.create()){return e.function!==""&&n.uint32(10).string(e.function),e.includeFailed!==!1&&n.uint32(16).bool(e.includeFailed),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Nf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.function=t.string();continue;case 2:if(r!==16)break;i.includeFailed=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{function:d(e.function)?globalThis.String(e.function):"",includeFailed:d(e.includeFailed)?globalThis.Boolean(e.includeFailed):!1}},toJSON(e){let n={};return e.function!==""&&(n.function=e.function),e.includeFailed!==!1&&(n.includeFailed=e.includeFailed),n},create(e){return ri.fromPartial(e??{})},fromPartial(e){let n=Nf();return n.function=e.function??"",n.includeFailed=e.includeFailed??!1,n}};function Tf(){return{filters:[],handlerId:0,handlerName:""}}var ii={encode(e,n=o.default.Writer.create()){for(let t of e.filters)ri.encode(t,n.uint32(10).fork()).ldelim();return e.handlerId!==0&&n.uint32(16).int32(e.handlerId),e.handlerName!==""&&n.uint32(26).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Tf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.filters.push(ri.decode(t,t.uint32()));continue;case 2:if(r!==16)break;i.handlerId=t.int32();continue;case 3:if(r!==26)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>ri.fromJSON(n)):[],handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.filters?.length&&(n.filters=e.filters.map(t=>ri.toJSON(t))),e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return ii.fromPartial(e??{})},fromPartial(e){let n=Tf();return n.filters=e.filters?.map(t=>ri.fromPartial(t))||[],n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function Cf(){return{handlerId:0,handlerName:""}}var ai={encode(e,n=o.default.Writer.create()){return e.handlerId!==0&&n.uint32(8).int32(e.handlerId),e.handlerName!==""&&n.uint32(18).string(e.handlerName),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Cf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.handlerId=t.int32();continue;case 2:if(r!==18)break;i.handlerName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{handlerId:d(e.handlerId)?globalThis.Number(e.handlerId):0,handlerName:d(e.handlerName)?globalThis.String(e.handlerName):""}},toJSON(e){let n={};return e.handlerId!==0&&(n.handlerId=Math.round(e.handlerId)),e.handlerName!==""&&(n.handlerName=e.handlerName),n},create(e){return ai.fromPartial(e??{})},fromPartial(e){let n=Cf();return n.handlerId=e.handlerId??0,n.handlerName=e.handlerName??"",n}};function If(){return{hashes:[]}}var oi={encode(e,n=o.default.Writer.create()){for(let t of e.hashes)n.uint32(10).string(t);return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=If();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.hashes.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{hashes:globalThis.Array.isArray(e?.hashes)?e.hashes.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.hashes?.length&&(n.hashes=e.hashes),n},create(e){return oi.fromPartial(e??{})},fromPartial(e){let n=If();return n.hashes=e.hashes?.map(t=>t)||[],n}};function Rf(){return{bindings:[]}}var Jc={encode(e,n=o.default.Writer.create()){for(let t of e.bindings)ce.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Rf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.bindings.push(ce.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{bindings:globalThis.Array.isArray(e?.bindings)?e.bindings.map(n=>ce.fromJSON(n)):[]}},toJSON(e){let n={};return e.bindings?.length&&(n.bindings=e.bindings.map(t=>ce.toJSON(t))),n},create(e){return Jc.fromPartial(e??{})},fromPartial(e){let n=Rf();return n.bindings=e.bindings?.map(t=>ce.fromPartial(t))||[],n}};function Of(){return{result:void 0,configUpdated:!1}}var xc={encode(e,n=o.default.Writer.create()){return e.result!==void 0&&yn.encode(e.result,n.uint32(10).fork()).ldelim(),e.configUpdated!==!1&&n.uint32(32).bool(e.configUpdated),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Of();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.result=yn.decode(t,t.uint32());continue;case 4:if(r!==32)break;i.configUpdated=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{result:d(e.result)?yn.fromJSON(e.result):void 0,configUpdated:d(e.configUpdated)?globalThis.Boolean(e.configUpdated):!1}},toJSON(e){let n={};return e.result!==void 0&&(n.result=yn.toJSON(e.result)),e.configUpdated!==!1&&(n.configUpdated=e.configUpdated),n},create(e){return xc.fromPartial(e??{})},fromPartial(e){let n=Of();return n.result=e.result!==void 0&&e.result!==null?yn.fromPartial(e.result):void 0,n.configUpdated=e.configUpdated??!1,n}};function Ef(){return{processId:0,binding:void 0,dbResult:void 0,start:void 0}}var Uc={encode(e,n=o.default.Writer.create()){return e.processId!==0&&n.uint32(8).int32(e.processId),e.binding!==void 0&&ce.encode(e.binding,n.uint32(18).fork()).ldelim(),e.dbResult!==void 0&&mn.encode(e.dbResult,n.uint32(26).fork()).ldelim(),e.start!==void 0&&n.uint32(32).bool(e.start),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ef();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.processId=t.int32();continue;case 2:if(r!==18)break;i.binding=ce.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.dbResult=mn.decode(t,t.uint32());continue;case 4:if(r!==32)break;i.start=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{processId:d(e.processId)?globalThis.Number(e.processId):0,binding:d(e.binding)?ce.fromJSON(e.binding):void 0,dbResult:d(e.dbResult)?mn.fromJSON(e.dbResult):void 0,start:d(e.start)?globalThis.Boolean(e.start):void 0}},toJSON(e){let n={};return e.processId!==0&&(n.processId=Math.round(e.processId)),e.binding!==void 0&&(n.binding=ce.toJSON(e.binding)),e.dbResult!==void 0&&(n.dbResult=mn.toJSON(e.dbResult)),e.start!==void 0&&(n.start=e.start),n},create(e){return Uc.fromPartial(e??{})},fromPartial(e){let n=Ef();return n.processId=e.processId??0,n.binding=e.binding!==void 0&&e.binding!==null?ce.fromPartial(e.binding):void 0,n.dbResult=e.dbResult!==void 0&&e.dbResult!==null?mn.fromPartial(e.dbResult):void 0,n.start=e.start??void 0,n}};function Pf(){return{processId:0,dbRequest:void 0,result:void 0,partitions:void 0}}var Vc={encode(e,n=o.default.Writer.create()){return e.processId!==0&&n.uint32(8).int32(e.processId),e.dbRequest!==void 0&&hn.encode(e.dbRequest,n.uint32(18).fork()).ldelim(),e.result!==void 0&&yn.encode(e.result,n.uint32(26).fork()).ldelim(),e.partitions!==void 0&&ui.encode(e.partitions,n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Pf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.processId=t.int32();continue;case 2:if(r!==18)break;i.dbRequest=hn.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.result=yn.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.partitions=ui.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{processId:d(e.processId)?globalThis.Number(e.processId):0,dbRequest:d(e.dbRequest)?hn.fromJSON(e.dbRequest):void 0,result:d(e.result)?yn.fromJSON(e.result):void 0,partitions:d(e.partitions)?ui.fromJSON(e.partitions):void 0}},toJSON(e){let n={};return e.processId!==0&&(n.processId=Math.round(e.processId)),e.dbRequest!==void 0&&(n.dbRequest=hn.toJSON(e.dbRequest)),e.result!==void 0&&(n.result=yn.toJSON(e.result)),e.partitions!==void 0&&(n.partitions=ui.toJSON(e.partitions)),n},create(e){return Vc.fromPartial(e??{})},fromPartial(e){let n=Pf();return n.processId=e.processId??0,n.dbRequest=e.dbRequest!==void 0&&e.dbRequest!==null?hn.fromPartial(e.dbRequest):void 0,n.result=e.result!==void 0&&e.result!==null?yn.fromPartial(e.result):void 0,n.partitions=e.partitions!==void 0&&e.partitions!==null?ui.fromPartial(e.partitions):void 0,n}};function _f(){return{partitions:{}}}var ui={encode(e,n=o.default.Writer.create()){return Object.entries(e.partitions).forEach(([t,a])=>{Fa.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=_f();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=Fa.decode(t,t.uint32());s.value!==void 0&&(i.partitions[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{partitions:R(e.partitions)?Object.entries(e.partitions).reduce((n,[t,a])=>(n[globalThis.Number(t)]=Dn.fromJSON(a),n),{}):{}}},toJSON(e){let n={};if(e.partitions){let t=Object.entries(e.partitions);t.length>0&&(n.partitions={},t.forEach(([a,i])=>{n.partitions[a]=Dn.toJSON(i)}))}return n},create(e){return ui.fromPartial(e??{})},fromPartial(e){let n=_f();return n.partitions=Object.entries(e.partitions??{}).reduce((t,[a,i])=>(i!==void 0&&(t[globalThis.Number(a)]=Dn.fromPartial(i)),t),{}),n}};function vf(){return{userValue:void 0,sysValue:void 0}}var Dn={encode(e,n=o.default.Writer.create()){return e.userValue!==void 0&&n.uint32(10).string(e.userValue),e.sysValue!==void 0&&n.uint32(16).int32(e.sysValue),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=vf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.userValue=t.string();continue;case 2:if(r!==16)break;i.sysValue=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{userValue:d(e.userValue)?globalThis.String(e.userValue):void 0,sysValue:d(e.sysValue)?zp(e.sysValue):void 0}},toJSON(e){let n={};return e.userValue!==void 0&&(n.userValue=e.userValue),e.sysValue!==void 0&&(n.sysValue=Kp(e.sysValue)),n},create(e){return Dn.fromPartial(e??{})},fromPartial(e){let n=vf();return n.userValue=e.userValue??void 0,n.sysValue=e.sysValue??void 0,n}};function Af(){return{key:0,value:void 0}}var Fa={encode(e,n=o.default.Writer.create()){return e.key!==0&&n.uint32(8).int32(e.key),e.value!==void 0&&Dn.encode(e.value,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Af();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.key=t.int32();continue;case 2:if(r!==18)break;i.value=Dn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:d(e.key)?globalThis.Number(e.key):0,value:d(e.value)?Dn.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.key!==0&&(n.key=Math.round(e.key)),e.value!==void 0&&(n.value=Dn.toJSON(e.value)),n},create(e){return Fa.fromPartial(e??{})},fromPartial(e){let n=Af();return n.key=e.key??0,n.value=e.value!==void 0&&e.value!==null?Dn.fromPartial(e.value):void 0,n}};function Bf(){return{processId:0,bindings:void 0,dbResult:void 0}}var Lc={encode(e,n=o.default.Writer.create()){return e.processId!==0&&n.uint32(8).int32(e.processId),e.bindings!==void 0&&di.encode(e.bindings,n.uint32(18).fork()).ldelim(),e.dbResult!==void 0&&mn.encode(e.dbResult,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Bf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.processId=t.int32();continue;case 2:if(r!==18)break;i.bindings=di.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.dbResult=mn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{processId:d(e.processId)?globalThis.Number(e.processId):0,bindings:d(e.bindings)?di.fromJSON(e.bindings):void 0,dbResult:d(e.dbResult)?mn.fromJSON(e.dbResult):void 0}},toJSON(e){let n={};return e.processId!==0&&(n.processId=Math.round(e.processId)),e.bindings!==void 0&&(n.bindings=di.toJSON(e.bindings)),e.dbResult!==void 0&&(n.dbResult=mn.toJSON(e.dbResult)),n},create(e){return Lc.fromPartial(e??{})},fromPartial(e){let n=Bf();return n.processId=e.processId??0,n.bindings=e.bindings!==void 0&&e.bindings!==null?di.fromPartial(e.bindings):void 0,n.dbResult=e.dbResult!==void 0&&e.dbResult!==null?mn.fromPartial(e.dbResult):void 0,n}};function bf(){return{bindings:[]}}var di={encode(e,n=o.default.Writer.create()){for(let t of e.bindings)ce.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=bf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.bindings.push(ce.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{bindings:globalThis.Array.isArray(e?.bindings)?e.bindings.map(n=>ce.fromJSON(n)):[]}},toJSON(e){let n={};return e.bindings?.length&&(n.bindings=e.bindings.map(t=>ce.toJSON(t))),n},create(e){return di.fromPartial(e??{})},fromPartial(e){let n=bf();return n.bindings=e.bindings?.map(t=>ce.fromPartial(t))||[],n}};function Df(){return{processId:0,dbRequest:void 0}}var Fc={encode(e,n=o.default.Writer.create()){return e.processId!==0&&n.uint32(8).int32(e.processId),e.dbRequest!==void 0&&hn.encode(e.dbRequest,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Df();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.processId=t.int32();continue;case 2:if(r!==18)break;i.dbRequest=hn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{processId:d(e.processId)?globalThis.Number(e.processId):0,dbRequest:d(e.dbRequest)?hn.fromJSON(e.dbRequest):void 0}},toJSON(e){let n={};return e.processId!==0&&(n.processId=Math.round(e.processId)),e.dbRequest!==void 0&&(n.dbRequest=hn.toJSON(e.dbRequest)),n},create(e){return Fc.fromPartial(e??{})},fromPartial(e){let n=Df();return n.processId=e.processId??0,n.dbRequest=e.dbRequest!==void 0&&e.dbRequest!==null?hn.fromPartial(e.dbRequest):void 0,n}};function Jf(){return{opId:BigInt("0"),data:void 0,list:void 0,error:void 0,entities:void 0,entityList:void 0,nextCursor:void 0}}var mn={encode(e,n=o.default.Writer.create()){if(e.opId!==BigInt("0")){if(BigInt.asUintN(64,e.opId)!==e.opId)throw new globalThis.Error("value provided for field message.opId of type uint64 too large");n.uint32(8).uint64(e.opId.toString())}return e.data!==void 0&&f.encode(f.wrap(e.data),n.uint32(18).fork()).ldelim(),e.list!==void 0&&On.encode(On.wrap(e.list),n.uint32(34).fork()).ldelim(),e.error!==void 0&&n.uint32(26).string(e.error),e.entities!==void 0&&zn.encode(e.entities,n.uint32(50).fork()).ldelim(),e.entityList!==void 0&&si.encode(e.entityList,n.uint32(58).fork()).ldelim(),e.nextCursor!==void 0&&n.uint32(42).string(e.nextCursor),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Jf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.opId=X(t.uint64());continue;case 2:if(r!==18)break;i.data=f.unwrap(f.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.list=On.unwrap(On.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.error=t.string();continue;case 6:if(r!==50)break;i.entities=zn.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.entityList=si.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.nextCursor=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{opId:d(e.opId)?BigInt(e.opId):BigInt("0"),data:R(e.data)?e.data:void 0,list:globalThis.Array.isArray(e.list)?[...e.list]:void 0,error:d(e.error)?globalThis.String(e.error):void 0,entities:d(e.entities)?zn.fromJSON(e.entities):void 0,entityList:d(e.entityList)?si.fromJSON(e.entityList):void 0,nextCursor:d(e.nextCursor)?globalThis.String(e.nextCursor):void 0}},toJSON(e){let n={};return e.opId!==BigInt("0")&&(n.opId=e.opId.toString()),e.data!==void 0&&(n.data=e.data),e.list!==void 0&&(n.list=e.list),e.error!==void 0&&(n.error=e.error),e.entities!==void 0&&(n.entities=zn.toJSON(e.entities)),e.entityList!==void 0&&(n.entityList=si.toJSON(e.entityList)),e.nextCursor!==void 0&&(n.nextCursor=e.nextCursor),n},create(e){return mn.fromPartial(e??{})},fromPartial(e){let n=Jf();return n.opId=e.opId??BigInt("0"),n.data=e.data??void 0,n.list=e.list??void 0,n.error=e.error??void 0,n.entities=e.entities!==void 0&&e.entities!==null?zn.fromPartial(e.entities):void 0,n.entityList=e.entityList!==void 0&&e.entityList!==null?si.fromPartial(e.entityList):void 0,n.nextCursor=e.nextCursor??void 0,n}};function xf(){return{entity:"",genBlockNumber:BigInt("0"),genBlockChain:"",genBlockTime:void 0,data:void 0}}var li={encode(e,n=o.default.Writer.create()){if(e.entity!==""&&n.uint32(10).string(e.entity),e.genBlockNumber!==BigInt("0")){if(BigInt.asUintN(64,e.genBlockNumber)!==e.genBlockNumber)throw new globalThis.Error("value provided for field message.genBlockNumber of type uint64 too large");n.uint32(16).uint64(e.genBlockNumber.toString())}return e.genBlockChain!==""&&n.uint32(26).string(e.genBlockChain),e.genBlockTime!==void 0&&C.encode(pe(e.genBlockTime),n.uint32(34).fork()).ldelim(),e.data!==void 0&&A.encode(e.data,n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=xf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity=t.string();continue;case 2:if(r!==16)break;i.genBlockNumber=X(t.uint64());continue;case 3:if(r!==26)break;i.genBlockChain=t.string();continue;case 4:if(r!==34)break;i.genBlockTime=te(C.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.data=A.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:d(e.entity)?globalThis.String(e.entity):"",genBlockNumber:d(e.genBlockNumber)?BigInt(e.genBlockNumber):BigInt("0"),genBlockChain:d(e.genBlockChain)?globalThis.String(e.genBlockChain):"",genBlockTime:d(e.genBlockTime)?ge(e.genBlockTime):void 0,data:d(e.data)?A.fromJSON(e.data):void 0}},toJSON(e){let n={};return e.entity!==""&&(n.entity=e.entity),e.genBlockNumber!==BigInt("0")&&(n.genBlockNumber=e.genBlockNumber.toString()),e.genBlockChain!==""&&(n.genBlockChain=e.genBlockChain),e.genBlockTime!==void 0&&(n.genBlockTime=e.genBlockTime.toISOString()),e.data!==void 0&&(n.data=A.toJSON(e.data)),n},create(e){return li.fromPartial(e??{})},fromPartial(e){let n=xf();return n.entity=e.entity??"",n.genBlockNumber=e.genBlockNumber??BigInt("0"),n.genBlockChain=e.genBlockChain??"",n.genBlockTime=e.genBlockTime??void 0,n.data=e.data!==void 0&&e.data!==null?A.fromPartial(e.data):void 0,n}};function Uf(){return{entities:[]}}var si={encode(e,n=o.default.Writer.create()){for(let t of e.entities)li.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Uf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entities.push(li.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entities:globalThis.Array.isArray(e?.entities)?e.entities.map(n=>li.fromJSON(n)):[]}},toJSON(e){let n={};return e.entities?.length&&(n.entities=e.entities.map(t=>li.toJSON(t))),n},create(e){return si.fromPartial(e??{})},fromPartial(e){let n=Uf();return n.entities=e.entities?.map(t=>li.fromPartial(t))||[],n}};function Vf(){return{fields:{}}}var fi={encode(e,n=o.default.Writer.create()){return Object.entries(e.fields).forEach(([t,a])=>{wa.encode({key:t,value:a},n.uint32(10).fork()).ldelim()}),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Vf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let s=wa.decode(t,t.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{fields:R(e.fields)?Object.entries(e.fields).reduce((n,[t,a])=>(n[t]=Jn.fromJSON(a),n),{}):{}}},toJSON(e){let n={};if(e.fields){let t=Object.entries(e.fields);t.length>0&&(n.fields={},t.forEach(([a,i])=>{n.fields[a]=Jn.toJSON(i)}))}return n},create(e){return fi.fromPartial(e??{})},fromPartial(e){let n=Vf();return n.fields=Object.entries(e.fields??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=Jn.fromPartial(i)),t),{}),n}};function Lf(){return{value:void 0,op:0}}var Jn={encode(e,n=o.default.Writer.create()){return e.value!==void 0&&N.encode(e.value,n.uint32(10).fork()).ldelim(),e.op!==0&&n.uint32(16).int32(e.op),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Lf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.value=N.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.op=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{value:d(e.value)?N.fromJSON(e.value):void 0,op:d(e.op)?Xp(e.op):0}},toJSON(e){let n={};return e.value!==void 0&&(n.value=N.toJSON(e.value)),e.op!==0&&(n.op=Yp(e.op)),n},create(e){return Jn.fromPartial(e??{})},fromPartial(e){let n=Lf();return n.value=e.value!==void 0&&e.value!==null?N.fromPartial(e.value):void 0,n.op=e.op??0,n}};function Ff(){return{key:"",value:void 0}}var wa={encode(e,n=o.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==void 0&&Jn.encode(e.value,n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ff();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=Jn.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:d(e.key)?globalThis.String(e.key):"",value:d(e.value)?Jn.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==void 0&&(n.value=Jn.toJSON(e.value)),n},create(e){return wa.fromPartial(e??{})},fromPartial(e){let n=Ff();return n.key=e.key??"",n.value=e.value!==void 0&&e.value!==null?Jn.fromPartial(e.value):void 0,n}};function wf(){return{opId:BigInt("0"),get:void 0,upsert:void 0,update:void 0,delete:void 0,list:void 0}}var hn={encode(e,n=o.default.Writer.create()){if(e.opId!==BigInt("0")){if(BigInt.asUintN(64,e.opId)!==e.opId)throw new globalThis.Error("value provided for field message.opId of type uint64 too large");n.uint32(8).uint64(e.opId.toString())}return e.get!==void 0&&ci.encode(e.get,n.uint32(18).fork()).ldelim(),e.upsert!==void 0&&gi.encode(e.upsert,n.uint32(26).fork()).ldelim(),e.update!==void 0&&mi.encode(e.update,n.uint32(50).fork()).ldelim(),e.delete!==void 0&&hi.encode(e.delete,n.uint32(34).fork()).ldelim(),e.list!==void 0&&pi.encode(e.list,n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=wf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.opId=X(t.uint64());continue;case 2:if(r!==18)break;i.get=ci.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.upsert=gi.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.update=mi.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.delete=hi.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.list=pi.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{opId:d(e.opId)?BigInt(e.opId):BigInt("0"),get:d(e.get)?ci.fromJSON(e.get):void 0,upsert:d(e.upsert)?gi.fromJSON(e.upsert):void 0,update:d(e.update)?mi.fromJSON(e.update):void 0,delete:d(e.delete)?hi.fromJSON(e.delete):void 0,list:d(e.list)?pi.fromJSON(e.list):void 0}},toJSON(e){let n={};return e.opId!==BigInt("0")&&(n.opId=e.opId.toString()),e.get!==void 0&&(n.get=ci.toJSON(e.get)),e.upsert!==void 0&&(n.upsert=gi.toJSON(e.upsert)),e.update!==void 0&&(n.update=mi.toJSON(e.update)),e.delete!==void 0&&(n.delete=hi.toJSON(e.delete)),e.list!==void 0&&(n.list=pi.toJSON(e.list)),n},create(e){return hn.fromPartial(e??{})},fromPartial(e){let n=wf();return n.opId=e.opId??BigInt("0"),n.get=e.get!==void 0&&e.get!==null?ci.fromPartial(e.get):void 0,n.upsert=e.upsert!==void 0&&e.upsert!==null?gi.fromPartial(e.upsert):void 0,n.update=e.update!==void 0&&e.update!==null?mi.fromPartial(e.update):void 0,n.delete=e.delete!==void 0&&e.delete!==null?hi.fromPartial(e.delete):void 0,n.list=e.list!==void 0&&e.list!==null?pi.fromPartial(e.list):void 0,n}};function Mf(){return{entity:"",id:""}}var ci={encode(e,n=o.default.Writer.create()){return e.entity!==""&&n.uint32(10).string(e.entity),e.id!==""&&n.uint32(18).string(e.id),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Mf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity=t.string();continue;case 2:if(r!==18)break;i.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:d(e.entity)?globalThis.String(e.entity):"",id:d(e.id)?globalThis.String(e.id):""}},toJSON(e){let n={};return e.entity!==""&&(n.entity=e.entity),e.id!==""&&(n.id=e.id),n},create(e){return ci.fromPartial(e??{})},fromPartial(e){let n=Mf();return n.entity=e.entity??"",n.id=e.id??"",n}};function Wf(){return{entity:"",filters:[],cursor:"",pageSize:void 0}}var pi={encode(e,n=o.default.Writer.create()){e.entity!==""&&n.uint32(10).string(e.entity);for(let t of e.filters)yi.encode(t,n.uint32(34).fork()).ldelim();return e.cursor!==""&&n.uint32(42).string(e.cursor),e.pageSize!==void 0&&n.uint32(48).uint32(e.pageSize),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Wf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity=t.string();continue;case 4:if(r!==34)break;i.filters.push(yi.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.cursor=t.string();continue;case 6:if(r!==48)break;i.pageSize=t.uint32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:d(e.entity)?globalThis.String(e.entity):"",filters:globalThis.Array.isArray(e?.filters)?e.filters.map(n=>yi.fromJSON(n)):[],cursor:d(e.cursor)?globalThis.String(e.cursor):"",pageSize:d(e.pageSize)?globalThis.Number(e.pageSize):void 0}},toJSON(e){let n={};return e.entity!==""&&(n.entity=e.entity),e.filters?.length&&(n.filters=e.filters.map(t=>yi.toJSON(t))),e.cursor!==""&&(n.cursor=e.cursor),e.pageSize!==void 0&&(n.pageSize=Math.round(e.pageSize)),n},create(e){return pi.fromPartial(e??{})},fromPartial(e){let n=Wf();return n.entity=e.entity??"",n.filters=e.filters?.map(t=>yi.fromPartial(t))||[],n.cursor=e.cursor??"",n.pageSize=e.pageSize??void 0,n}};function qf(){return{entity:[],id:[],data:[],entityData:[]}}var gi={encode(e,n=o.default.Writer.create()){for(let t of e.entity)n.uint32(10).string(t);for(let t of e.id)n.uint32(18).string(t);for(let t of e.data)f.encode(f.wrap(t),n.uint32(26).fork()).ldelim();for(let t of e.entityData)A.encode(t,n.uint32(34).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=qf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity.push(t.string());continue;case 2:if(r!==18)break;i.id.push(t.string());continue;case 3:if(r!==26)break;i.data.push(f.unwrap(f.decode(t,t.uint32())));continue;case 4:if(r!==34)break;i.entityData.push(A.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(n=>globalThis.String(n)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(n=>globalThis.String(n)):[],data:globalThis.Array.isArray(e?.data)?[...e.data]:[],entityData:globalThis.Array.isArray(e?.entityData)?e.entityData.map(n=>A.fromJSON(n)):[]}},toJSON(e){let n={};return e.entity?.length&&(n.entity=e.entity),e.id?.length&&(n.id=e.id),e.data?.length&&(n.data=e.data),e.entityData?.length&&(n.entityData=e.entityData.map(t=>A.toJSON(t))),n},create(e){return gi.fromPartial(e??{})},fromPartial(e){let n=qf();return n.entity=e.entity?.map(t=>t)||[],n.id=e.id?.map(t=>t)||[],n.data=e.data?.map(t=>t)||[],n.entityData=e.entityData?.map(t=>A.fromPartial(t))||[],n}};function Gf(){return{entity:[],id:[],entityData:[]}}var mi={encode(e,n=o.default.Writer.create()){for(let t of e.entity)n.uint32(10).string(t);for(let t of e.id)n.uint32(18).string(t);for(let t of e.entityData)fi.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Gf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity.push(t.string());continue;case 2:if(r!==18)break;i.id.push(t.string());continue;case 3:if(r!==26)break;i.entityData.push(fi.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(n=>globalThis.String(n)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(n=>globalThis.String(n)):[],entityData:globalThis.Array.isArray(e?.entityData)?e.entityData.map(n=>fi.fromJSON(n)):[]}},toJSON(e){let n={};return e.entity?.length&&(n.entity=e.entity),e.id?.length&&(n.id=e.id),e.entityData?.length&&(n.entityData=e.entityData.map(t=>fi.toJSON(t))),n},create(e){return mi.fromPartial(e??{})},fromPartial(e){let n=Gf();return n.entity=e.entity?.map(t=>t)||[],n.id=e.id?.map(t=>t)||[],n.entityData=e.entityData?.map(t=>fi.fromPartial(t))||[],n}};function Hf(){return{entity:[],id:[]}}var hi={encode(e,n=o.default.Writer.create()){for(let t of e.entity)n.uint32(10).string(t);for(let t of e.id)n.uint32(18).string(t);return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Hf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.entity.push(t.string());continue;case 2:if(r!==18)break;i.id.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(n=>globalThis.String(n)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.entity?.length&&(n.entity=e.entity),e.id?.length&&(n.id=e.id),n},create(e){return hi.fromPartial(e??{})},fromPartial(e){let n=Hf();return n.entity=e.entity?.map(t=>t)||[],n.id=e.id?.map(t=>t)||[],n}};function Qf(){return{field:"",op:0,value:void 0}}var yi={encode(e,n=o.default.Writer.create()){return e.field!==""&&n.uint32(10).string(e.field),e.op!==0&&n.uint32(16).int32(e.op),e.value!==void 0&&U.encode(e.value,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Qf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.field=t.string();continue;case 2:if(r!==16)break;i.op=t.int32();continue;case 3:if(r!==26)break;i.value=U.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{field:d(e.field)?globalThis.String(e.field):"",op:d(e.op)?$p(e.op):0,value:d(e.value)?U.fromJSON(e.value):void 0}},toJSON(e){let n={};return e.field!==""&&(n.field=e.field),e.op!==0&&(n.op=jp(e.op)),e.value!==void 0&&(n.value=U.toJSON(e.value)),n},create(e){return yi.fromPartial(e??{})},fromPartial(e){let n=Qf();return n.field=e.field??"",n.op=e.op??0,n.value=e.value!==void 0&&e.value!==null?U.fromPartial(e.value):void 0,n}};function Zf(){return{ethLog:void 0,ethBlock:void 0,ethTransaction:void 0,ethTrace:void 0,solInstruction:void 0,aptEvent:void 0,aptCall:void 0,aptResource:void 0,suiEvent:void 0,suiCall:void 0,suiObject:void 0,suiObjectChange:void 0,fuelLog:void 0,fuelCall:void 0,fuelTransaction:void 0,fuelBlock:void 0,cosmosCall:void 0,starknetEvents:void 0,btcTransaction:void 0,btcBlock:void 0}}var ki={encode(e,n=o.default.Writer.create()){return e.ethLog!==void 0&&Si.encode(e.ethLog,n.uint32(18).fork()).ldelim(),e.ethBlock!==void 0&&Ni.encode(e.ethBlock,n.uint32(26).fork()).ldelim(),e.ethTransaction!==void 0&&Ti.encode(e.ethTransaction,n.uint32(34).fork()).ldelim(),e.ethTrace!==void 0&&Ci.encode(e.ethTrace,n.uint32(42).fork()).ldelim(),e.solInstruction!==void 0&&Ii.encode(e.solInstruction,n.uint32(50).fork()).ldelim(),e.aptEvent!==void 0&&Ri.encode(e.aptEvent,n.uint32(58).fork()).ldelim(),e.aptCall!==void 0&&Oi.encode(e.aptCall,n.uint32(66).fork()).ldelim(),e.aptResource!==void 0&&Ei.encode(e.aptResource,n.uint32(74).fork()).ldelim(),e.suiEvent!==void 0&&Pi.encode(e.suiEvent,n.uint32(82).fork()).ldelim(),e.suiCall!==void 0&&_i.encode(e.suiCall,n.uint32(90).fork()).ldelim(),e.suiObject!==void 0&&vi.encode(e.suiObject,n.uint32(98).fork()).ldelim(),e.suiObjectChange!==void 0&&Ai.encode(e.suiObjectChange,n.uint32(106).fork()).ldelim(),e.fuelLog!==void 0&&Bi.encode(e.fuelLog,n.uint32(162).fork()).ldelim(),e.fuelCall!==void 0&&Di.encode(e.fuelCall,n.uint32(114).fork()).ldelim(),e.fuelTransaction!==void 0&&bi.encode(e.fuelTransaction,n.uint32(170).fork()).ldelim(),e.fuelBlock!==void 0&&Ji.encode(e.fuelBlock,n.uint32(146).fork()).ldelim(),e.cosmosCall!==void 0&&xi.encode(e.cosmosCall,n.uint32(122).fork()).ldelim(),e.starknetEvents!==void 0&&Ui.encode(e.starknetEvents,n.uint32(130).fork()).ldelim(),e.btcTransaction!==void 0&&Vi.encode(e.btcTransaction,n.uint32(138).fork()).ldelim(),e.btcBlock!==void 0&&Li.encode(e.btcBlock,n.uint32(154).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Zf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.ethLog=Si.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.ethBlock=Ni.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.ethTransaction=Ti.decode(t,t.uint32());continue;case 5:if(r!==42)break;i.ethTrace=Ci.decode(t,t.uint32());continue;case 6:if(r!==50)break;i.solInstruction=Ii.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.aptEvent=Ri.decode(t,t.uint32());continue;case 8:if(r!==66)break;i.aptCall=Oi.decode(t,t.uint32());continue;case 9:if(r!==74)break;i.aptResource=Ei.decode(t,t.uint32());continue;case 10:if(r!==82)break;i.suiEvent=Pi.decode(t,t.uint32());continue;case 11:if(r!==90)break;i.suiCall=_i.decode(t,t.uint32());continue;case 12:if(r!==98)break;i.suiObject=vi.decode(t,t.uint32());continue;case 13:if(r!==106)break;i.suiObjectChange=Ai.decode(t,t.uint32());continue;case 20:if(r!==162)break;i.fuelLog=Bi.decode(t,t.uint32());continue;case 14:if(r!==114)break;i.fuelCall=Di.decode(t,t.uint32());continue;case 21:if(r!==170)break;i.fuelTransaction=bi.decode(t,t.uint32());continue;case 18:if(r!==146)break;i.fuelBlock=Ji.decode(t,t.uint32());continue;case 15:if(r!==122)break;i.cosmosCall=xi.decode(t,t.uint32());continue;case 16:if(r!==130)break;i.starknetEvents=Ui.decode(t,t.uint32());continue;case 17:if(r!==138)break;i.btcTransaction=Vi.decode(t,t.uint32());continue;case 19:if(r!==154)break;i.btcBlock=Li.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{ethLog:d(e.ethLog)?Si.fromJSON(e.ethLog):void 0,ethBlock:d(e.ethBlock)?Ni.fromJSON(e.ethBlock):void 0,ethTransaction:d(e.ethTransaction)?Ti.fromJSON(e.ethTransaction):void 0,ethTrace:d(e.ethTrace)?Ci.fromJSON(e.ethTrace):void 0,solInstruction:d(e.solInstruction)?Ii.fromJSON(e.solInstruction):void 0,aptEvent:d(e.aptEvent)?Ri.fromJSON(e.aptEvent):void 0,aptCall:d(e.aptCall)?Oi.fromJSON(e.aptCall):void 0,aptResource:d(e.aptResource)?Ei.fromJSON(e.aptResource):void 0,suiEvent:d(e.suiEvent)?Pi.fromJSON(e.suiEvent):void 0,suiCall:d(e.suiCall)?_i.fromJSON(e.suiCall):void 0,suiObject:d(e.suiObject)?vi.fromJSON(e.suiObject):void 0,suiObjectChange:d(e.suiObjectChange)?Ai.fromJSON(e.suiObjectChange):void 0,fuelLog:d(e.fuelLog)?Bi.fromJSON(e.fuelLog):void 0,fuelCall:d(e.fuelCall)?Di.fromJSON(e.fuelCall):void 0,fuelTransaction:d(e.fuelTransaction)?bi.fromJSON(e.fuelTransaction):void 0,fuelBlock:d(e.fuelBlock)?Ji.fromJSON(e.fuelBlock):void 0,cosmosCall:d(e.cosmosCall)?xi.fromJSON(e.cosmosCall):void 0,starknetEvents:d(e.starknetEvents)?Ui.fromJSON(e.starknetEvents):void 0,btcTransaction:d(e.btcTransaction)?Vi.fromJSON(e.btcTransaction):void 0,btcBlock:d(e.btcBlock)?Li.fromJSON(e.btcBlock):void 0}},toJSON(e){let n={};return e.ethLog!==void 0&&(n.ethLog=Si.toJSON(e.ethLog)),e.ethBlock!==void 0&&(n.ethBlock=Ni.toJSON(e.ethBlock)),e.ethTransaction!==void 0&&(n.ethTransaction=Ti.toJSON(e.ethTransaction)),e.ethTrace!==void 0&&(n.ethTrace=Ci.toJSON(e.ethTrace)),e.solInstruction!==void 0&&(n.solInstruction=Ii.toJSON(e.solInstruction)),e.aptEvent!==void 0&&(n.aptEvent=Ri.toJSON(e.aptEvent)),e.aptCall!==void 0&&(n.aptCall=Oi.toJSON(e.aptCall)),e.aptResource!==void 0&&(n.aptResource=Ei.toJSON(e.aptResource)),e.suiEvent!==void 0&&(n.suiEvent=Pi.toJSON(e.suiEvent)),e.suiCall!==void 0&&(n.suiCall=_i.toJSON(e.suiCall)),e.suiObject!==void 0&&(n.suiObject=vi.toJSON(e.suiObject)),e.suiObjectChange!==void 0&&(n.suiObjectChange=Ai.toJSON(e.suiObjectChange)),e.fuelLog!==void 0&&(n.fuelLog=Bi.toJSON(e.fuelLog)),e.fuelCall!==void 0&&(n.fuelCall=Di.toJSON(e.fuelCall)),e.fuelTransaction!==void 0&&(n.fuelTransaction=bi.toJSON(e.fuelTransaction)),e.fuelBlock!==void 0&&(n.fuelBlock=Ji.toJSON(e.fuelBlock)),e.cosmosCall!==void 0&&(n.cosmosCall=xi.toJSON(e.cosmosCall)),e.starknetEvents!==void 0&&(n.starknetEvents=Ui.toJSON(e.starknetEvents)),e.btcTransaction!==void 0&&(n.btcTransaction=Vi.toJSON(e.btcTransaction)),e.btcBlock!==void 0&&(n.btcBlock=Li.toJSON(e.btcBlock)),n},create(e){return ki.fromPartial(e??{})},fromPartial(e){let n=Zf();return n.ethLog=e.ethLog!==void 0&&e.ethLog!==null?Si.fromPartial(e.ethLog):void 0,n.ethBlock=e.ethBlock!==void 0&&e.ethBlock!==null?Ni.fromPartial(e.ethBlock):void 0,n.ethTransaction=e.ethTransaction!==void 0&&e.ethTransaction!==null?Ti.fromPartial(e.ethTransaction):void 0,n.ethTrace=e.ethTrace!==void 0&&e.ethTrace!==null?Ci.fromPartial(e.ethTrace):void 0,n.solInstruction=e.solInstruction!==void 0&&e.solInstruction!==null?Ii.fromPartial(e.solInstruction):void 0,n.aptEvent=e.aptEvent!==void 0&&e.aptEvent!==null?Ri.fromPartial(e.aptEvent):void 0,n.aptCall=e.aptCall!==void 0&&e.aptCall!==null?Oi.fromPartial(e.aptCall):void 0,n.aptResource=e.aptResource!==void 0&&e.aptResource!==null?Ei.fromPartial(e.aptResource):void 0,n.suiEvent=e.suiEvent!==void 0&&e.suiEvent!==null?Pi.fromPartial(e.suiEvent):void 0,n.suiCall=e.suiCall!==void 0&&e.suiCall!==null?_i.fromPartial(e.suiCall):void 0,n.suiObject=e.suiObject!==void 0&&e.suiObject!==null?vi.fromPartial(e.suiObject):void 0,n.suiObjectChange=e.suiObjectChange!==void 0&&e.suiObjectChange!==null?Ai.fromPartial(e.suiObjectChange):void 0,n.fuelLog=e.fuelLog!==void 0&&e.fuelLog!==null?Bi.fromPartial(e.fuelLog):void 0,n.fuelCall=e.fuelCall!==void 0&&e.fuelCall!==null?Di.fromPartial(e.fuelCall):void 0,n.fuelTransaction=e.fuelTransaction!==void 0&&e.fuelTransaction!==null?bi.fromPartial(e.fuelTransaction):void 0,n.fuelBlock=e.fuelBlock!==void 0&&e.fuelBlock!==null?Ji.fromPartial(e.fuelBlock):void 0,n.cosmosCall=e.cosmosCall!==void 0&&e.cosmosCall!==null?xi.fromPartial(e.cosmosCall):void 0,n.starknetEvents=e.starknetEvents!==void 0&&e.starknetEvents!==null?Ui.fromPartial(e.starknetEvents):void 0,n.btcTransaction=e.btcTransaction!==void 0&&e.btcTransaction!==null?Vi.fromPartial(e.btcTransaction):void 0,n.btcBlock=e.btcBlock!==void 0&&e.btcBlock!==null?Li.fromPartial(e.btcBlock):void 0,n}};function zf(){return{log:void 0,timestamp:void 0,transaction:void 0,transactionReceipt:void 0,block:void 0,rawLog:"",rawTransaction:void 0,rawTransactionReceipt:void 0,rawBlock:void 0}}var Si={encode(e,n=o.default.Writer.create()){return e.log!==void 0&&f.encode(f.wrap(e.log),n.uint32(26).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(34).fork()).ldelim(),e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(18).fork()).ldelim(),e.transactionReceipt!==void 0&&f.encode(f.wrap(e.transactionReceipt),n.uint32(42).fork()).ldelim(),e.block!==void 0&&f.encode(f.wrap(e.block),n.uint32(50).fork()).ldelim(),e.rawLog!==""&&n.uint32(58).string(e.rawLog),e.rawTransaction!==void 0&&n.uint32(66).string(e.rawTransaction),e.rawTransactionReceipt!==void 0&&n.uint32(74).string(e.rawTransactionReceipt),e.rawBlock!==void 0&&n.uint32(82).string(e.rawBlock),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=zf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 3:if(r!==26)break;i.log=f.unwrap(f.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.timestamp=te(C.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.transactionReceipt=f.unwrap(f.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.block=f.unwrap(f.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.rawLog=t.string();continue;case 8:if(r!==66)break;i.rawTransaction=t.string();continue;case 9:if(r!==74)break;i.rawTransactionReceipt=t.string();continue;case 10:if(r!==82)break;i.rawBlock=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{log:R(e.log)?e.log:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0,transaction:R(e.transaction)?e.transaction:void 0,transactionReceipt:R(e.transactionReceipt)?e.transactionReceipt:void 0,block:R(e.block)?e.block:void 0,rawLog:d(e.rawLog)?globalThis.String(e.rawLog):"",rawTransaction:d(e.rawTransaction)?globalThis.String(e.rawTransaction):void 0,rawTransactionReceipt:d(e.rawTransactionReceipt)?globalThis.String(e.rawTransactionReceipt):void 0,rawBlock:d(e.rawBlock)?globalThis.String(e.rawBlock):void 0}},toJSON(e){let n={};return e.log!==void 0&&(n.log=e.log),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.transaction!==void 0&&(n.transaction=e.transaction),e.transactionReceipt!==void 0&&(n.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(n.block=e.block),e.rawLog!==""&&(n.rawLog=e.rawLog),e.rawTransaction!==void 0&&(n.rawTransaction=e.rawTransaction),e.rawTransactionReceipt!==void 0&&(n.rawTransactionReceipt=e.rawTransactionReceipt),e.rawBlock!==void 0&&(n.rawBlock=e.rawBlock),n},create(e){return Si.fromPartial(e??{})},fromPartial(e){let n=zf();return n.log=e.log??void 0,n.timestamp=e.timestamp??void 0,n.transaction=e.transaction??void 0,n.transactionReceipt=e.transactionReceipt??void 0,n.block=e.block??void 0,n.rawLog=e.rawLog??"",n.rawTransaction=e.rawTransaction??void 0,n.rawTransactionReceipt=e.rawTransactionReceipt??void 0,n.rawBlock=e.rawBlock??void 0,n}};function Kf(){return{block:void 0}}var Ni={encode(e,n=o.default.Writer.create()){return e.block!==void 0&&f.encode(f.wrap(e.block),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Kf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.block=f.unwrap(f.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{block:R(e.block)?e.block:void 0}},toJSON(e){let n={};return e.block!==void 0&&(n.block=e.block),n},create(e){return Ni.fromPartial(e??{})},fromPartial(e){let n=Kf();return n.block=e.block??void 0,n}};function Xf(){return{transaction:void 0,timestamp:void 0,transactionReceipt:void 0,block:void 0,trace:void 0,rawTransaction:"",rawTransactionReceipt:void 0,rawBlock:void 0,rawTrace:void 0}}var Ti={encode(e,n=o.default.Writer.create()){return e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(42).fork()).ldelim(),e.transactionReceipt!==void 0&&f.encode(f.wrap(e.transactionReceipt),n.uint32(26).fork()).ldelim(),e.block!==void 0&&f.encode(f.wrap(e.block),n.uint32(50).fork()).ldelim(),e.trace!==void 0&&f.encode(f.wrap(e.trace),n.uint32(58).fork()).ldelim(),e.rawTransaction!==""&&n.uint32(66).string(e.rawTransaction),e.rawTransactionReceipt!==void 0&&n.uint32(74).string(e.rawTransactionReceipt),e.rawBlock!==void 0&&n.uint32(82).string(e.rawBlock),e.rawTrace!==void 0&&n.uint32(90).string(e.rawTrace),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Xf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.timestamp=te(C.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.transactionReceipt=f.unwrap(f.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.block=f.unwrap(f.decode(t,t.uint32()));continue;case 7:if(r!==58)break;i.trace=f.unwrap(f.decode(t,t.uint32()));continue;case 8:if(r!==66)break;i.rawTransaction=t.string();continue;case 9:if(r!==74)break;i.rawTransactionReceipt=t.string();continue;case 10:if(r!==82)break;i.rawBlock=t.string();continue;case 11:if(r!==90)break;i.rawTrace=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0,transactionReceipt:R(e.transactionReceipt)?e.transactionReceipt:void 0,block:R(e.block)?e.block:void 0,trace:R(e.trace)?e.trace:void 0,rawTransaction:d(e.rawTransaction)?globalThis.String(e.rawTransaction):"",rawTransactionReceipt:d(e.rawTransactionReceipt)?globalThis.String(e.rawTransactionReceipt):void 0,rawBlock:d(e.rawBlock)?globalThis.String(e.rawBlock):void 0,rawTrace:d(e.rawTrace)?globalThis.String(e.rawTrace):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.transactionReceipt!==void 0&&(n.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(n.block=e.block),e.trace!==void 0&&(n.trace=e.trace),e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),e.rawTransactionReceipt!==void 0&&(n.rawTransactionReceipt=e.rawTransactionReceipt),e.rawBlock!==void 0&&(n.rawBlock=e.rawBlock),e.rawTrace!==void 0&&(n.rawTrace=e.rawTrace),n},create(e){return Ti.fromPartial(e??{})},fromPartial(e){let n=Xf();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n.transactionReceipt=e.transactionReceipt??void 0,n.block=e.block??void 0,n.trace=e.trace??void 0,n.rawTransaction=e.rawTransaction??"",n.rawTransactionReceipt=e.rawTransactionReceipt??void 0,n.rawBlock=e.rawBlock??void 0,n.rawTrace=e.rawTrace??void 0,n}};function Yf(){return{trace:void 0,timestamp:void 0,transaction:void 0,transactionReceipt:void 0,block:void 0}}var Ci={encode(e,n=o.default.Writer.create()){return e.trace!==void 0&&f.encode(f.wrap(e.trace),n.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(42).fork()).ldelim(),e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(18).fork()).ldelim(),e.transactionReceipt!==void 0&&f.encode(f.wrap(e.transactionReceipt),n.uint32(26).fork()).ldelim(),e.block!==void 0&&f.encode(f.wrap(e.block),n.uint32(50).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Yf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.trace=f.unwrap(f.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.timestamp=te(C.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.transactionReceipt=f.unwrap(f.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.block=f.unwrap(f.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{trace:R(e.trace)?e.trace:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0,transaction:R(e.transaction)?e.transaction:void 0,transactionReceipt:R(e.transactionReceipt)?e.transactionReceipt:void 0,block:R(e.block)?e.block:void 0}},toJSON(e){let n={};return e.trace!==void 0&&(n.trace=e.trace),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.transaction!==void 0&&(n.transaction=e.transaction),e.transactionReceipt!==void 0&&(n.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(n.block=e.block),n},create(e){return Ci.fromPartial(e??{})},fromPartial(e){let n=Yf();return n.trace=e.trace??void 0,n.timestamp=e.timestamp??void 0,n.transaction=e.transaction??void 0,n.transactionReceipt=e.transactionReceipt??void 0,n.block=e.block??void 0,n}};function $f(){return{instructionData:"",slot:BigInt("0"),programAccountId:"",accounts:[],parsed:void 0}}var Ii={encode(e,n=o.default.Writer.create()){if(e.instructionData!==""&&n.uint32(10).string(e.instructionData),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(16).uint64(e.slot.toString())}e.programAccountId!==""&&n.uint32(26).string(e.programAccountId);for(let t of e.accounts)n.uint32(42).string(t);return e.parsed!==void 0&&f.encode(f.wrap(e.parsed),n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=$f();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.instructionData=t.string();continue;case 2:if(r!==16)break;i.slot=X(t.uint64());continue;case 3:if(r!==26)break;i.programAccountId=t.string();continue;case 5:if(r!==42)break;i.accounts.push(t.string());continue;case 4:if(r!==34)break;i.parsed=f.unwrap(f.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{instructionData:d(e.instructionData)?globalThis.String(e.instructionData):"",slot:d(e.slot)?BigInt(e.slot):BigInt("0"),programAccountId:d(e.programAccountId)?globalThis.String(e.programAccountId):"",accounts:globalThis.Array.isArray(e?.accounts)?e.accounts.map(n=>globalThis.String(n)):[],parsed:R(e.parsed)?e.parsed:void 0}},toJSON(e){let n={};return e.instructionData!==""&&(n.instructionData=e.instructionData),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),e.programAccountId!==""&&(n.programAccountId=e.programAccountId),e.accounts?.length&&(n.accounts=e.accounts),e.parsed!==void 0&&(n.parsed=e.parsed),n},create(e){return Ii.fromPartial(e??{})},fromPartial(e){let n=$f();return n.instructionData=e.instructionData??"",n.slot=e.slot??BigInt("0"),n.programAccountId=e.programAccountId??"",n.accounts=e.accounts?.map(t=>t)||[],n.parsed=e.parsed??void 0,n}};function jf(){return{rawEvent:"",eventIndex:0,transaction:void 0,rawTransaction:""}}var Ri={encode(e,n=o.default.Writer.create()){return e.rawEvent!==""&&n.uint32(10).string(e.rawEvent),e.eventIndex!==0&&n.uint32(32).int32(e.eventIndex),e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(18).fork()).ldelim(),e.rawTransaction!==""&&n.uint32(26).string(e.rawTransaction),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=jf();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.rawEvent=t.string();continue;case 4:if(r!==32)break;i.eventIndex=t.int32();continue;case 2:if(r!==18)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.rawTransaction=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{rawEvent:d(e.rawEvent)?globalThis.String(e.rawEvent):"",eventIndex:d(e.eventIndex)?globalThis.Number(e.eventIndex):0,transaction:R(e.transaction)?e.transaction:void 0,rawTransaction:d(e.rawTransaction)?globalThis.String(e.rawTransaction):""}},toJSON(e){let n={};return e.rawEvent!==""&&(n.rawEvent=e.rawEvent),e.eventIndex!==0&&(n.eventIndex=Math.round(e.eventIndex)),e.transaction!==void 0&&(n.transaction=e.transaction),e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),n},create(e){return Ri.fromPartial(e??{})},fromPartial(e){let n=jf();return n.rawEvent=e.rawEvent??"",n.eventIndex=e.eventIndex??0,n.transaction=e.transaction??void 0,n.rawTransaction=e.rawTransaction??"",n}};function ec(){return{transaction:void 0,rawTransaction:""}}var Oi={encode(e,n=o.default.Writer.create()){return e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(18).fork()).ldelim(),e.rawTransaction!==""&&n.uint32(26).string(e.rawTransaction),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ec();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.rawTransaction=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,rawTransaction:d(e.rawTransaction)?globalThis.String(e.rawTransaction):""}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),n},create(e){return Oi.fromPartial(e??{})},fromPartial(e){let n=ec();return n.transaction=e.transaction??void 0,n.rawTransaction=e.rawTransaction??"",n}};function nc(){return{resources:[],version:BigInt("0"),timestampMicros:BigInt("0"),rawResources:[]}}var Ei={encode(e,n=o.default.Writer.create()){for(let t of e.resources)f.encode(f.wrap(t),n.uint32(34).fork()).ldelim();if(e.version!==BigInt("0")){if(BigInt.asIntN(64,e.version)!==e.version)throw new globalThis.Error("value provided for field message.version of type int64 too large");n.uint32(16).int64(e.version.toString())}if(e.timestampMicros!==BigInt("0")){if(BigInt.asIntN(64,e.timestampMicros)!==e.timestampMicros)throw new globalThis.Error("value provided for field message.timestampMicros of type int64 too large");n.uint32(40).int64(e.timestampMicros.toString())}for(let t of e.rawResources)n.uint32(50).string(t);return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=nc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.resources.push(f.unwrap(f.decode(t,t.uint32())));continue;case 2:if(r!==16)break;i.version=X(t.int64());continue;case 5:if(r!==40)break;i.timestampMicros=X(t.int64());continue;case 6:if(r!==50)break;i.rawResources.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{resources:globalThis.Array.isArray(e?.resources)?[...e.resources]:[],version:d(e.version)?BigInt(e.version):BigInt("0"),timestampMicros:d(e.timestampMicros)?BigInt(e.timestampMicros):BigInt("0"),rawResources:globalThis.Array.isArray(e?.rawResources)?e.rawResources.map(n=>globalThis.String(n)):[]}},toJSON(e){let n={};return e.resources?.length&&(n.resources=e.resources),e.version!==BigInt("0")&&(n.version=e.version.toString()),e.timestampMicros!==BigInt("0")&&(n.timestampMicros=e.timestampMicros.toString()),e.rawResources?.length&&(n.rawResources=e.rawResources),n},create(e){return Ei.fromPartial(e??{})},fromPartial(e){let n=nc();return n.resources=e.resources?.map(t=>t)||[],n.version=e.version??BigInt("0"),n.timestampMicros=e.timestampMicros??BigInt("0"),n.rawResources=e.rawResources?.map(t=>t)||[],n}};function tc(){return{transaction:void 0,rawEvent:"",rawTransaction:"",timestamp:void 0,slot:BigInt("0")}}var Pi={encode(e,n=o.default.Writer.create()){if(e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.rawEvent!==""&&n.uint32(34).string(e.rawEvent),e.rawTransaction!==""&&n.uint32(42).string(e.rawTransaction),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(24).uint64(e.slot.toString())}return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=tc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.rawEvent=t.string();continue;case 5:if(r!==42)break;i.rawTransaction=t.string();continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue;case 3:if(r!==24)break;i.slot=X(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,rawEvent:d(e.rawEvent)?globalThis.String(e.rawEvent):"",rawTransaction:d(e.rawTransaction)?globalThis.String(e.rawTransaction):"",timestamp:d(e.timestamp)?ge(e.timestamp):void 0,slot:d(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.rawEvent!==""&&(n.rawEvent=e.rawEvent),e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),n},create(e){return Pi.fromPartial(e??{})},fromPartial(e){let n=tc();return n.transaction=e.transaction??void 0,n.rawEvent=e.rawEvent??"",n.rawTransaction=e.rawTransaction??"",n.timestamp=e.timestamp??void 0,n.slot=e.slot??BigInt("0"),n}};function rc(){return{transaction:void 0,rawTransaction:"",timestamp:void 0,slot:BigInt("0")}}var _i={encode(e,n=o.default.Writer.create()){if(e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.rawTransaction!==""&&n.uint32(34).string(e.rawTransaction),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(24).uint64(e.slot.toString())}return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=rc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.rawTransaction=t.string();continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue;case 3:if(r!==24)break;i.slot=X(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,rawTransaction:d(e.rawTransaction)?globalThis.String(e.rawTransaction):"",timestamp:d(e.timestamp)?ge(e.timestamp):void 0,slot:d(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.rawTransaction!==""&&(n.rawTransaction=e.rawTransaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),n},create(e){return _i.fromPartial(e??{})},fromPartial(e){let n=rc();return n.transaction=e.transaction??void 0,n.rawTransaction=e.rawTransaction??"",n.timestamp=e.timestamp??void 0,n.slot=e.slot??BigInt("0"),n}};function ic(){return{objects:[],self:void 0,rawObjects:[],rawSelf:void 0,objectId:"",objectVersion:BigInt("0"),objectDigest:"",timestamp:void 0,slot:BigInt("0")}}var vi={encode(e,n=o.default.Writer.create()){for(let t of e.objects)f.encode(f.wrap(t),n.uint32(10).fork()).ldelim();e.self!==void 0&&f.encode(f.wrap(e.self),n.uint32(34).fork()).ldelim();for(let t of e.rawObjects)n.uint32(82).string(t);if(e.rawSelf!==void 0&&n.uint32(74).string(e.rawSelf),e.objectId!==""&&n.uint32(42).string(e.objectId),e.objectVersion!==BigInt("0")){if(BigInt.asUintN(64,e.objectVersion)!==e.objectVersion)throw new globalThis.Error("value provided for field message.objectVersion of type uint64 too large");n.uint32(48).uint64(e.objectVersion.toString())}if(e.objectDigest!==""&&n.uint32(58).string(e.objectDigest),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(24).uint64(e.slot.toString())}return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ic();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.objects.push(f.unwrap(f.decode(t,t.uint32())));continue;case 4:if(r!==34)break;i.self=f.unwrap(f.decode(t,t.uint32()));continue;case 10:if(r!==82)break;i.rawObjects.push(t.string());continue;case 9:if(r!==74)break;i.rawSelf=t.string();continue;case 5:if(r!==42)break;i.objectId=t.string();continue;case 6:if(r!==48)break;i.objectVersion=X(t.uint64());continue;case 7:if(r!==58)break;i.objectDigest=t.string();continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue;case 3:if(r!==24)break;i.slot=X(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{objects:globalThis.Array.isArray(e?.objects)?[...e.objects]:[],self:R(e.self)?e.self:void 0,rawObjects:globalThis.Array.isArray(e?.rawObjects)?e.rawObjects.map(n=>globalThis.String(n)):[],rawSelf:d(e.rawSelf)?globalThis.String(e.rawSelf):void 0,objectId:d(e.objectId)?globalThis.String(e.objectId):"",objectVersion:d(e.objectVersion)?BigInt(e.objectVersion):BigInt("0"),objectDigest:d(e.objectDigest)?globalThis.String(e.objectDigest):"",timestamp:d(e.timestamp)?ge(e.timestamp):void 0,slot:d(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let n={};return e.objects?.length&&(n.objects=e.objects),e.self!==void 0&&(n.self=e.self),e.rawObjects?.length&&(n.rawObjects=e.rawObjects),e.rawSelf!==void 0&&(n.rawSelf=e.rawSelf),e.objectId!==""&&(n.objectId=e.objectId),e.objectVersion!==BigInt("0")&&(n.objectVersion=e.objectVersion.toString()),e.objectDigest!==""&&(n.objectDigest=e.objectDigest),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),n},create(e){return vi.fromPartial(e??{})},fromPartial(e){let n=ic();return n.objects=e.objects?.map(t=>t)||[],n.self=e.self??void 0,n.rawObjects=e.rawObjects?.map(t=>t)||[],n.rawSelf=e.rawSelf??void 0,n.objectId=e.objectId??"",n.objectVersion=e.objectVersion??BigInt("0"),n.objectDigest=e.objectDigest??"",n.timestamp=e.timestamp??void 0,n.slot=e.slot??BigInt("0"),n}};function ac(){return{changes:[],rawChanges:[],timestamp:void 0,txDigest:"",slot:BigInt("0")}}var Ai={encode(e,n=o.default.Writer.create()){for(let t of e.changes)f.encode(f.wrap(t),n.uint32(10).fork()).ldelim();for(let t of e.rawChanges)n.uint32(42).string(t);if(e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),e.txDigest!==""&&n.uint32(34).string(e.txDigest),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");n.uint32(24).uint64(e.slot.toString())}return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=ac();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.changes.push(f.unwrap(f.decode(t,t.uint32())));continue;case 5:if(r!==42)break;i.rawChanges.push(t.string());continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.txDigest=t.string();continue;case 3:if(r!==24)break;i.slot=X(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{changes:globalThis.Array.isArray(e?.changes)?[...e.changes]:[],rawChanges:globalThis.Array.isArray(e?.rawChanges)?e.rawChanges.map(n=>globalThis.String(n)):[],timestamp:d(e.timestamp)?ge(e.timestamp):void 0,txDigest:d(e.txDigest)?globalThis.String(e.txDigest):"",slot:d(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let n={};return e.changes?.length&&(n.changes=e.changes),e.rawChanges?.length&&(n.rawChanges=e.rawChanges),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.txDigest!==""&&(n.txDigest=e.txDigest),e.slot!==BigInt("0")&&(n.slot=e.slot.toString()),n},create(e){return Ai.fromPartial(e??{})},fromPartial(e){let n=ac();return n.changes=e.changes?.map(t=>t)||[],n.rawChanges=e.rawChanges?.map(t=>t)||[],n.timestamp=e.timestamp??void 0,n.txDigest=e.txDigest??"",n.slot=e.slot??BigInt("0"),n}};function oc(){return{transaction:void 0,timestamp:void 0,receiptIndex:BigInt("0")}}var Bi={encode(e,n=o.default.Writer.create()){if(e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),e.receiptIndex!==BigInt("0")){if(BigInt.asIntN(64,e.receiptIndex)!==e.receiptIndex)throw new globalThis.Error("value provided for field message.receiptIndex of type int64 too large");n.uint32(24).int64(e.receiptIndex.toString())}return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=oc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue;case 3:if(r!==24)break;i.receiptIndex=X(t.int64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0,receiptIndex:d(e.receiptIndex)?BigInt(e.receiptIndex):BigInt("0")}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),e.receiptIndex!==BigInt("0")&&(n.receiptIndex=e.receiptIndex.toString()),n},create(e){return Bi.fromPartial(e??{})},fromPartial(e){let n=oc();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n.receiptIndex=e.receiptIndex??BigInt("0"),n}};function uc(){return{transaction:void 0,timestamp:void 0}}var bi={encode(e,n=o.default.Writer.create()){return e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=uc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return bi.fromPartial(e??{})},fromPartial(e){let n=uc();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n}};function dc(){return{transaction:void 0,timestamp:void 0}}var Di={encode(e,n=o.default.Writer.create()){return e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=dc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return Di.fromPartial(e??{})},fromPartial(e){let n=dc();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n}};function lc(){return{block:void 0,timestamp:void 0}}var Ji={encode(e,n=o.default.Writer.create()){return e.block!==void 0&&f.encode(f.wrap(e.block),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=lc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.block=f.unwrap(f.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{block:R(e.block)?e.block:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0}},toJSON(e){let n={};return e.block!==void 0&&(n.block=e.block),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return Ji.fromPartial(e??{})},fromPartial(e){let n=lc();return n.block=e.block??void 0,n.timestamp=e.timestamp??void 0,n}};function sc(){return{transaction:void 0,timestamp:void 0}}var xi={encode(e,n=o.default.Writer.create()){return e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=sc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return xi.fromPartial(e??{})},fromPartial(e){let n=sc();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n}};function fc(){return{result:void 0,timestamp:void 0}}var Ui={encode(e,n=o.default.Writer.create()){return e.result!==void 0&&f.encode(f.wrap(e.result),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=fc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.result=f.unwrap(f.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{result:R(e.result)?e.result:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0}},toJSON(e){let n={};return e.result!==void 0&&(n.result=e.result),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return Ui.fromPartial(e??{})},fromPartial(e){let n=fc();return n.result=e.result??void 0,n.timestamp=e.timestamp??void 0,n}};function cc(){return{transaction:void 0,timestamp:void 0}}var Vi={encode(e,n=o.default.Writer.create()){return e.transaction!==void 0&&f.encode(f.wrap(e.transaction),n.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(42).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=cc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;i.transaction=f.unwrap(f.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.timestamp=te(C.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{transaction:R(e.transaction)?e.transaction:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0}},toJSON(e){let n={};return e.transaction!==void 0&&(n.transaction=e.transaction),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return Vi.fromPartial(e??{})},fromPartial(e){let n=cc();return n.transaction=e.transaction??void 0,n.timestamp=e.timestamp??void 0,n}};function pc(){return{block:void 0,timestamp:void 0}}var Li={encode(e,n=o.default.Writer.create()){return e.block!==void 0&&f.encode(f.wrap(e.block),n.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&C.encode(pe(e.timestamp),n.uint32(18).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=pc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.block=f.unwrap(f.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.timestamp=te(C.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{block:R(e.block)?e.block:void 0,timestamp:d(e.timestamp)?ge(e.timestamp):void 0}},toJSON(e){let n={};return e.block!==void 0&&(n.block=e.block),e.timestamp!==void 0&&(n.timestamp=e.timestamp.toISOString()),n},create(e){return Li.fromPartial(e??{})},fromPartial(e){let n=pc();return n.block=e.block??void 0,n.timestamp=e.timestamp??void 0,n}};function gc(){return{data:void 0,handlerType:0,handlerIds:[]}}var ce={encode(e,n=o.default.Writer.create()){e.data!==void 0&&ki.encode(e.data,n.uint32(10).fork()).ldelim(),e.handlerType!==0&&n.uint32(24).int32(e.handlerType),n.uint32(34).fork();for(let t of e.handlerIds)n.int32(t);return n.ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=gc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.data=ki.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.handlerType=t.int32();continue;case 4:if(r===32){i.handlerIds.push(t.int32());continue}if(r===34){let s=t.uint32()+t.pos;for(;t.pos<s;)i.handlerIds.push(t.int32());continue}break}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{data:d(e.data)?ki.fromJSON(e.data):void 0,handlerType:d(e.handlerType)?Pc(e.handlerType):0,handlerIds:globalThis.Array.isArray(e?.handlerIds)?e.handlerIds.map(n=>globalThis.Number(n)):[]}},toJSON(e){let n={};return e.data!==void 0&&(n.data=ki.toJSON(e.data)),e.handlerType!==0&&(n.handlerType=_c(e.handlerType)),e.handlerIds?.length&&(n.handlerIds=e.handlerIds.map(t=>Math.round(t))),n},create(e){return ce.fromPartial(e??{})},fromPartial(e){let n=gc();return n.data=e.data!==void 0&&e.data!==null?ki.fromPartial(e.data):void 0,n.handlerType=e.handlerType??0,n.handlerIds=e.handlerIds?.map(t=>t)||[],n}};function mc(){return{configUpdated:!1,error:void 0}}var Fi={encode(e,n=o.default.Writer.create()){return e.configUpdated!==!1&&n.uint32(8).bool(e.configUpdated),e.error!==void 0&&n.uint32(18).string(e.error),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=mc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.configUpdated=t.bool();continue;case 2:if(r!==18)break;i.error=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{configUpdated:d(e.configUpdated)?globalThis.Boolean(e.configUpdated):!1,error:d(e.error)?globalThis.String(e.error):void 0}},toJSON(e){let n={};return e.configUpdated!==!1&&(n.configUpdated=e.configUpdated),e.error!==void 0&&(n.error=e.error),n},create(e){return Fi.fromPartial(e??{})},fromPartial(e){let n=mc();return n.configUpdated=e.configUpdated??!1,n.error=e.error??void 0,n}};function hc(){return{gauges:[],counters:[],logs:[],events:[],exports:[],states:void 0,timeseriesResult:[]}}var yn={encode(e,n=o.default.Writer.create()){for(let t of e.gauges)wi.encode(t,n.uint32(10).fork()).ldelim();for(let t of e.counters)Mi.encode(t,n.uint32(18).fork()).ldelim();for(let t of e.logs)Wi.encode(t,n.uint32(26).fork()).ldelim();for(let t of e.events)qi.encode(t,n.uint32(34).fork()).ldelim();for(let t of e.exports)Hi.encode(t,n.uint32(42).fork()).ldelim();e.states!==void 0&&Fi.encode(e.states,n.uint32(50).fork()).ldelim();for(let t of e.timeseriesResult)Gi.encode(t,n.uint32(58).fork()).ldelim();return n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=hc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.gauges.push(wi.decode(t,t.uint32()));continue;case 2:if(r!==18)break;i.counters.push(Mi.decode(t,t.uint32()));continue;case 3:if(r!==26)break;i.logs.push(Wi.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.events.push(qi.decode(t,t.uint32()));continue;case 5:if(r!==42)break;i.exports.push(Hi.decode(t,t.uint32()));continue;case 6:if(r!==50)break;i.states=Fi.decode(t,t.uint32());continue;case 7:if(r!==58)break;i.timeseriesResult.push(Gi.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{gauges:globalThis.Array.isArray(e?.gauges)?e.gauges.map(n=>wi.fromJSON(n)):[],counters:globalThis.Array.isArray(e?.counters)?e.counters.map(n=>Mi.fromJSON(n)):[],logs:globalThis.Array.isArray(e?.logs)?e.logs.map(n=>Wi.fromJSON(n)):[],events:globalThis.Array.isArray(e?.events)?e.events.map(n=>qi.fromJSON(n)):[],exports:globalThis.Array.isArray(e?.exports)?e.exports.map(n=>Hi.fromJSON(n)):[],states:d(e.states)?Fi.fromJSON(e.states):void 0,timeseriesResult:globalThis.Array.isArray(e?.timeseriesResult)?e.timeseriesResult.map(n=>Gi.fromJSON(n)):[]}},toJSON(e){let n={};return e.gauges?.length&&(n.gauges=e.gauges.map(t=>wi.toJSON(t))),e.counters?.length&&(n.counters=e.counters.map(t=>Mi.toJSON(t))),e.logs?.length&&(n.logs=e.logs.map(t=>Wi.toJSON(t))),e.events?.length&&(n.events=e.events.map(t=>qi.toJSON(t))),e.exports?.length&&(n.exports=e.exports.map(t=>Hi.toJSON(t))),e.states!==void 0&&(n.states=Fi.toJSON(e.states)),e.timeseriesResult?.length&&(n.timeseriesResult=e.timeseriesResult.map(t=>Gi.toJSON(t))),n},create(e){return yn.fromPartial(e??{})},fromPartial(e){let n=hc();return n.gauges=e.gauges?.map(t=>wi.fromPartial(t))||[],n.counters=e.counters?.map(t=>Mi.fromPartial(t))||[],n.logs=e.logs?.map(t=>Wi.fromPartial(t))||[],n.events=e.events?.map(t=>qi.fromPartial(t))||[],n.exports=e.exports?.map(t=>Hi.fromPartial(t))||[],n.states=e.states!==void 0&&e.states!==null?Fi.fromPartial(e.states):void 0,n.timeseriesResult=e.timeseriesResult?.map(t=>Gi.fromPartial(t))||[],n}};function yc(){return{address:"",contractName:"",blockNumber:BigInt("0"),transactionHash:"",chainId:"",transactionIndex:0,logIndex:0,name:"",labels:{}}}var B={encode(e,n=o.default.Writer.create()){if(e.address!==""&&n.uint32(10).string(e.address),e.contractName!==""&&n.uint32(74).string(e.contractName),e.blockNumber!==BigInt("0")){if(BigInt.asUintN(64,e.blockNumber)!==e.blockNumber)throw new globalThis.Error("value provided for field message.blockNumber of type uint64 too large");n.uint32(16).uint64(e.blockNumber.toString())}return e.transactionHash!==""&&n.uint32(50).string(e.transactionHash),e.chainId!==""&&n.uint32(42).string(e.chainId),e.transactionIndex!==0&&n.uint32(24).int32(e.transactionIndex),e.logIndex!==0&&n.uint32(32).int32(e.logIndex),e.name!==""&&n.uint32(82).string(e.name),Object.entries(e.labels).forEach(([t,a])=>{Ma.encode({key:t,value:a},n.uint32(58).fork()).ldelim()}),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=yc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.address=t.string();continue;case 9:if(r!==74)break;i.contractName=t.string();continue;case 2:if(r!==16)break;i.blockNumber=X(t.uint64());continue;case 6:if(r!==50)break;i.transactionHash=t.string();continue;case 5:if(r!==42)break;i.chainId=t.string();continue;case 3:if(r!==24)break;i.transactionIndex=t.int32();continue;case 4:if(r!==32)break;i.logIndex=t.int32();continue;case 10:if(r!==82)break;i.name=t.string();continue;case 7:if(r!==58)break;let s=Ma.decode(t,t.uint32());s.value!==void 0&&(i.labels[s.key]=s.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{address:d(e.address)?globalThis.String(e.address):"",contractName:d(e.contractName)?globalThis.String(e.contractName):"",blockNumber:d(e.blockNumber)?BigInt(e.blockNumber):BigInt("0"),transactionHash:d(e.transactionHash)?globalThis.String(e.transactionHash):"",chainId:d(e.chainId)?globalThis.String(e.chainId):"",transactionIndex:d(e.transactionIndex)?globalThis.Number(e.transactionIndex):0,logIndex:d(e.logIndex)?globalThis.Number(e.logIndex):0,name:d(e.name)?globalThis.String(e.name):"",labels:R(e.labels)?Object.entries(e.labels).reduce((n,[t,a])=>(n[t]=String(a),n),{}):{}}},toJSON(e){let n={};if(e.address!==""&&(n.address=e.address),e.contractName!==""&&(n.contractName=e.contractName),e.blockNumber!==BigInt("0")&&(n.blockNumber=e.blockNumber.toString()),e.transactionHash!==""&&(n.transactionHash=e.transactionHash),e.chainId!==""&&(n.chainId=e.chainId),e.transactionIndex!==0&&(n.transactionIndex=Math.round(e.transactionIndex)),e.logIndex!==0&&(n.logIndex=Math.round(e.logIndex)),e.name!==""&&(n.name=e.name),e.labels){let t=Object.entries(e.labels);t.length>0&&(n.labels={},t.forEach(([a,i])=>{n.labels[a]=i}))}return n},create(e){return B.fromPartial(e??{})},fromPartial(e){let n=yc();return n.address=e.address??"",n.contractName=e.contractName??"",n.blockNumber=e.blockNumber??BigInt("0"),n.transactionHash=e.transactionHash??"",n.chainId=e.chainId??"",n.transactionIndex=e.transactionIndex??0,n.logIndex=e.logIndex??0,n.name=e.name??"",n.labels=Object.entries(e.labels??{}).reduce((t,[a,i])=>(i!==void 0&&(t[a]=globalThis.String(i)),t),{}),n}};function kc(){return{key:"",value:""}}var Ma={encode(e,n=o.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=kc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.key=t.string();continue;case 2:if(r!==18)break;i.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{key:d(e.key)?globalThis.String(e.key):"",value:d(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return Ma.fromPartial(e??{})},fromPartial(e){let n=kc();return n.key=e.key??"",n.value=e.value??"",n}};function Sc(){return{bigDecimal:void 0,doubleValue:void 0,bigInteger:void 0}}var kn={encode(e,n=o.default.Writer.create()){return e.bigDecimal!==void 0&&n.uint32(10).string(e.bigDecimal),e.doubleValue!==void 0&&n.uint32(17).double(e.doubleValue),e.bigInteger!==void 0&&ne.encode(e.bigInteger,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Sc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.bigDecimal=t.string();continue;case 2:if(r!==17)break;i.doubleValue=t.double();continue;case 3:if(r!==26)break;i.bigInteger=ne.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{bigDecimal:d(e.bigDecimal)?globalThis.String(e.bigDecimal):void 0,doubleValue:d(e.doubleValue)?globalThis.Number(e.doubleValue):void 0,bigInteger:d(e.bigInteger)?ne.fromJSON(e.bigInteger):void 0}},toJSON(e){let n={};return e.bigDecimal!==void 0&&(n.bigDecimal=e.bigDecimal),e.doubleValue!==void 0&&(n.doubleValue=e.doubleValue),e.bigInteger!==void 0&&(n.bigInteger=ne.toJSON(e.bigInteger)),n},create(e){return kn.fromPartial(e??{})},fromPartial(e){let n=Sc();return n.bigDecimal=e.bigDecimal??void 0,n.doubleValue=e.doubleValue??void 0,n.bigInteger=e.bigInteger!==void 0&&e.bigInteger!==null?ne.fromPartial(e.bigInteger):void 0,n}};function Nc(){return{from:0}}var b={encode(e,n=o.default.Writer.create()){return e.from!==0&&n.uint32(8).int32(e.from),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Nc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;i.from=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{from:d(e.from)?Pc(e.from):0}},toJSON(e){let n={};return e.from!==0&&(n.from=_c(e.from)),n},create(e){return b.fromPartial(e??{})},fromPartial(e){let n=Nc();return n.from=e.from??0,n}};function Tc(){return{metadata:void 0,metricValue:void 0,runtimeInfo:void 0}}var wi={encode(e,n=o.default.Writer.create()){return e.metadata!==void 0&&B.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.metricValue!==void 0&&kn.encode(e.metricValue,n.uint32(18).fork()).ldelim(),e.runtimeInfo!==void 0&&b.encode(e.runtimeInfo,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Tc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=B.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.metricValue=kn.decode(t,t.uint32());continue;case 3:if(r!==26)break;i.runtimeInfo=b.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:d(e.metadata)?B.fromJSON(e.metadata):void 0,metricValue:d(e.metricValue)?kn.fromJSON(e.metricValue):void 0,runtimeInfo:d(e.runtimeInfo)?b.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=B.toJSON(e.metadata)),e.metricValue!==void 0&&(n.metricValue=kn.toJSON(e.metricValue)),e.runtimeInfo!==void 0&&(n.runtimeInfo=b.toJSON(e.runtimeInfo)),n},create(e){return wi.fromPartial(e??{})},fromPartial(e){let n=Tc();return n.metadata=e.metadata!==void 0&&e.metadata!==null?B.fromPartial(e.metadata):void 0,n.metricValue=e.metricValue!==void 0&&e.metricValue!==null?kn.fromPartial(e.metricValue):void 0,n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?b.fromPartial(e.runtimeInfo):void 0,n}};function Cc(){return{metadata:void 0,metricValue:void 0,add:!1,runtimeInfo:void 0}}var Mi={encode(e,n=o.default.Writer.create()){return e.metadata!==void 0&&B.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.metricValue!==void 0&&kn.encode(e.metricValue,n.uint32(18).fork()).ldelim(),e.add!==!1&&n.uint32(24).bool(e.add),e.runtimeInfo!==void 0&&b.encode(e.runtimeInfo,n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Cc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=B.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.metricValue=kn.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.add=t.bool();continue;case 4:if(r!==34)break;i.runtimeInfo=b.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:d(e.metadata)?B.fromJSON(e.metadata):void 0,metricValue:d(e.metricValue)?kn.fromJSON(e.metricValue):void 0,add:d(e.add)?globalThis.Boolean(e.add):!1,runtimeInfo:d(e.runtimeInfo)?b.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=B.toJSON(e.metadata)),e.metricValue!==void 0&&(n.metricValue=kn.toJSON(e.metricValue)),e.add!==!1&&(n.add=e.add),e.runtimeInfo!==void 0&&(n.runtimeInfo=b.toJSON(e.runtimeInfo)),n},create(e){return Mi.fromPartial(e??{})},fromPartial(e){let n=Cc();return n.metadata=e.metadata!==void 0&&e.metadata!==null?B.fromPartial(e.metadata):void 0,n.metricValue=e.metricValue!==void 0&&e.metricValue!==null?kn.fromPartial(e.metricValue):void 0,n.add=e.add??!1,n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?b.fromPartial(e.runtimeInfo):void 0,n}};function Ic(){return{metadata:void 0,level:0,message:"",attributes:"",attributes2:void 0,runtimeInfo:void 0}}var Wi={encode(e,n=o.default.Writer.create()){return e.metadata!==void 0&&B.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.level!==0&&n.uint32(16).int32(e.level),e.message!==""&&n.uint32(26).string(e.message),e.attributes!==""&&n.uint32(50).string(e.attributes),e.attributes2!==void 0&&f.encode(f.wrap(e.attributes2),n.uint32(58).fork()).ldelim(),e.runtimeInfo!==void 0&&b.encode(e.runtimeInfo,n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ic();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=B.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.level=t.int32();continue;case 3:if(r!==26)break;i.message=t.string();continue;case 6:if(r!==50)break;i.attributes=t.string();continue;case 7:if(r!==58)break;i.attributes2=f.unwrap(f.decode(t,t.uint32()));continue;case 4:if(r!==34)break;i.runtimeInfo=b.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:d(e.metadata)?B.fromJSON(e.metadata):void 0,level:d(e.level)?vc(e.level):0,message:d(e.message)?globalThis.String(e.message):"",attributes:d(e.attributes)?globalThis.String(e.attributes):"",attributes2:R(e.attributes2)?e.attributes2:void 0,runtimeInfo:d(e.runtimeInfo)?b.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=B.toJSON(e.metadata)),e.level!==0&&(n.level=Ac(e.level)),e.message!==""&&(n.message=e.message),e.attributes!==""&&(n.attributes=e.attributes),e.attributes2!==void 0&&(n.attributes2=e.attributes2),e.runtimeInfo!==void 0&&(n.runtimeInfo=b.toJSON(e.runtimeInfo)),n},create(e){return Wi.fromPartial(e??{})},fromPartial(e){let n=Ic();return n.metadata=e.metadata!==void 0&&e.metadata!==null?B.fromPartial(e.metadata):void 0,n.level=e.level??0,n.message=e.message??"",n.attributes=e.attributes??"",n.attributes2=e.attributes2??void 0,n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?b.fromPartial(e.runtimeInfo):void 0,n}};function Rc(){return{metadata:void 0,distinctEntityId:"",attributes:void 0,severity:0,message:"",runtimeInfo:void 0,attributes2:void 0,noMetric:!1}}var qi={encode(e,n=o.default.Writer.create()){return e.metadata!==void 0&&B.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.distinctEntityId!==""&&n.uint32(18).string(e.distinctEntityId),e.attributes!==void 0&&f.encode(f.wrap(e.attributes),n.uint32(50).fork()).ldelim(),e.severity!==0&&n.uint32(56).int32(e.severity),e.message!==""&&n.uint32(66).string(e.message),e.runtimeInfo!==void 0&&b.encode(e.runtimeInfo,n.uint32(42).fork()).ldelim(),e.attributes2!==void 0&&A.encode(e.attributes2,n.uint32(74).fork()).ldelim(),e.noMetric!==!1&&n.uint32(24).bool(e.noMetric),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Rc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=B.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.distinctEntityId=t.string();continue;case 6:if(r!==50)break;i.attributes=f.unwrap(f.decode(t,t.uint32()));continue;case 7:if(r!==56)break;i.severity=t.int32();continue;case 8:if(r!==66)break;i.message=t.string();continue;case 5:if(r!==42)break;i.runtimeInfo=b.decode(t,t.uint32());continue;case 9:if(r!==74)break;i.attributes2=A.decode(t,t.uint32());continue;case 3:if(r!==24)break;i.noMetric=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:d(e.metadata)?B.fromJSON(e.metadata):void 0,distinctEntityId:d(e.distinctEntityId)?globalThis.String(e.distinctEntityId):"",attributes:R(e.attributes)?e.attributes:void 0,severity:d(e.severity)?vc(e.severity):0,message:d(e.message)?globalThis.String(e.message):"",runtimeInfo:d(e.runtimeInfo)?b.fromJSON(e.runtimeInfo):void 0,attributes2:d(e.attributes2)?A.fromJSON(e.attributes2):void 0,noMetric:d(e.noMetric)?globalThis.Boolean(e.noMetric):!1}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=B.toJSON(e.metadata)),e.distinctEntityId!==""&&(n.distinctEntityId=e.distinctEntityId),e.attributes!==void 0&&(n.attributes=e.attributes),e.severity!==0&&(n.severity=Ac(e.severity)),e.message!==""&&(n.message=e.message),e.runtimeInfo!==void 0&&(n.runtimeInfo=b.toJSON(e.runtimeInfo)),e.attributes2!==void 0&&(n.attributes2=A.toJSON(e.attributes2)),e.noMetric!==!1&&(n.noMetric=e.noMetric),n},create(e){return qi.fromPartial(e??{})},fromPartial(e){let n=Rc();return n.metadata=e.metadata!==void 0&&e.metadata!==null?B.fromPartial(e.metadata):void 0,n.distinctEntityId=e.distinctEntityId??"",n.attributes=e.attributes??void 0,n.severity=e.severity??0,n.message=e.message??"",n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?b.fromPartial(e.runtimeInfo):void 0,n.attributes2=e.attributes2!==void 0&&e.attributes2!==null?A.fromPartial(e.attributes2):void 0,n.noMetric=e.noMetric??!1,n}};function Oc(){return{metadata:void 0,type:0,data:void 0,runtimeInfo:void 0}}var Gi={encode(e,n=o.default.Writer.create()){return e.metadata!==void 0&&B.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.type!==0&&n.uint32(16).int32(e.type),e.data!==void 0&&A.encode(e.data,n.uint32(26).fork()).ldelim(),e.runtimeInfo!==void 0&&b.encode(e.runtimeInfo,n.uint32(34).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Oc();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=B.decode(t,t.uint32());continue;case 2:if(r!==16)break;i.type=t.int32();continue;case 3:if(r!==26)break;i.data=A.decode(t,t.uint32());continue;case 4:if(r!==34)break;i.runtimeInfo=b.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:d(e.metadata)?B.fromJSON(e.metadata):void 0,type:d(e.type)?eg(e.type):0,data:d(e.data)?A.fromJSON(e.data):void 0,runtimeInfo:d(e.runtimeInfo)?b.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=B.toJSON(e.metadata)),e.type!==0&&(n.type=ng(e.type)),e.data!==void 0&&(n.data=A.toJSON(e.data)),e.runtimeInfo!==void 0&&(n.runtimeInfo=b.toJSON(e.runtimeInfo)),n},create(e){return Gi.fromPartial(e??{})},fromPartial(e){let n=Oc();return n.metadata=e.metadata!==void 0&&e.metadata!==null?B.fromPartial(e.metadata):void 0,n.type=e.type??0,n.data=e.data!==void 0&&e.data!==null?A.fromPartial(e.data):void 0,n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?b.fromPartial(e.runtimeInfo):void 0,n}};function Ec(){return{metadata:void 0,payload:"",runtimeInfo:void 0}}var Hi={encode(e,n=o.default.Writer.create()){return e.metadata!==void 0&&B.encode(e.metadata,n.uint32(10).fork()).ldelim(),e.payload!==""&&n.uint32(18).string(e.payload),e.runtimeInfo!==void 0&&b.encode(e.runtimeInfo,n.uint32(26).fork()).ldelim(),n},decode(e,n){let t=e instanceof o.default.Reader?e:o.default.Reader.create(e),a=n===void 0?t.len:t.pos+n,i=Ec();for(;t.pos<a;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;i.metadata=B.decode(t,t.uint32());continue;case 2:if(r!==18)break;i.payload=t.string();continue;case 3:if(r!==26)break;i.runtimeInfo=b.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return i},fromJSON(e){return{metadata:d(e.metadata)?B.fromJSON(e.metadata):void 0,payload:d(e.payload)?globalThis.String(e.payload):"",runtimeInfo:d(e.runtimeInfo)?b.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let n={};return e.metadata!==void 0&&(n.metadata=B.toJSON(e.metadata)),e.payload!==""&&(n.payload=e.payload),e.runtimeInfo!==void 0&&(n.runtimeInfo=b.toJSON(e.runtimeInfo)),n},create(e){return Hi.fromPartial(e??{})},fromPartial(e){let n=Ec();return n.metadata=e.metadata!==void 0&&e.metadata!==null?B.fromPartial(e.metadata):void 0,n.payload=e.payload??"",n.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?b.fromPartial(e.runtimeInfo):void 0,n}},hm={name:"Processor",fullName:"processor.Processor",methods:{start:{name:"Start",requestType:Dc,requestStream:!1,responseType:Ki,responseStream:!1,options:{}},stop:{name:"Stop",requestType:Ki,requestStream:!1,responseType:Ki,responseStream:!1,options:{}},getConfig:{name:"GetConfig",requestType:Bc,requestStream:!1,responseType:bc,responseStream:!1,options:{}},processBindings:{name:"ProcessBindings",requestType:Jc,requestStream:!1,responseType:xc,responseStream:!1,options:{}},processBindingsStream:{name:"ProcessBindingsStream",requestType:Uc,requestStream:!0,responseType:Vc,responseStream:!0,options:{}},preprocessBindingsStream:{name:"PreprocessBindingsStream",requestType:Lc,requestStream:!0,responseType:Fc,responseStream:!0,options:{}}}};function pe(e){let n=BigInt(Math.trunc(e.getTime()/1e3)),t=e.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function te(e){let n=(globalThis.Number(e.seconds.toString())||0)*1e3;return n+=(e.nanos||0)/1e6,new globalThis.Date(n)}function ge(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):te(C.fromJSON(e))}function X(e){return BigInt(e.toString())}o.default.util.Long!==$&&(o.default.util.Long=$,o.default.configure());function R(e){return typeof e=="object"&&e!==null}function d(e){return e!=null}import("node:process").then(e=>e.stdout.write(""));export{tg as a,rg as b,Y as c,ig as d,Sn as e,ag as f,eo as g,mo as h,Un as i,ma as j,ka as k,qo as l,Ho as m,zo as n,Ve as o,T as p,_p as q,Ze as r,Ql as s,vp as t,Fn as u,Lg as v,Xl as w,Yl as x,Tr as y,Fi as z,yn as A,hm as B};
|
3
|
+
/*! Bundled license information:
|
4
|
+
|
5
|
+
long/index.js:
|
6
|
+
(**
|
7
|
+
* @license
|
8
|
+
* Copyright 2009 The Closure Library Authors
|
9
|
+
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
10
|
+
*
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
12
|
+
* you may not use this file except in compliance with the License.
|
13
|
+
* You may obtain a copy of the License at
|
14
|
+
*
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
*
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20
|
+
* See the License for the specific language governing permissions and
|
21
|
+
* limitations under the License.
|
22
|
+
*
|
23
|
+
* SPDX-License-Identifier: Apache-2.0
|
24
|
+
*)
|
25
|
+
*/
|
26
|
+
//# sourceMappingURL=chunk-YYEA4PFJ.js.map
|