@sentio/runtime 2.41.3-rc.3 → 2.41.3-rc.4

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/index.d.ts CHANGED
@@ -167,6 +167,7 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
167
167
  listValue?: {
168
168
  values?: any[] | undefined;
169
169
  } | undefined;
170
+ structValue?: any | undefined;
170
171
  } | undefined;
171
172
  } | undefined;
172
173
  }[] | undefined;
@@ -331,6 +332,7 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
331
332
  listValue?: {
332
333
  values?: any[] | undefined;
333
334
  } | undefined;
335
+ structValue?: any | undefined;
334
336
  } | undefined;
335
337
  } | undefined;
336
338
  }[] | undefined;
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
- import{U as d,V as N,W as O,X as b,Y as w,Z as A,g as u,i as T,j as l,m,n as x,o as f,p as h,q as V,y as p}from"./chunk-GBO4WWUG.js";var r=class{stateMap=new Map;static reset(){r.INSTANCE=new r}},e=r;u(e,"INSTANCE",new r);var n=class{constructor(){}key(){return this.constructor.name}getOrRegister(){let t=e.INSTANCE.stateMap.get(this.key());return t||(t=this.initValue(),e.INSTANCE.stateMap.set(this.key(),t)),t}},g=class extends n{initValue(){return new Map}getValue(t){return this.getOrRegister().get(t)}getValues(){let t=this.getOrRegister();return Array.from(t.values())}getOrSetValue(t,s){let o=this.getOrRegister(),a=o.get(t);return a?(console.warn(t,"has been registered twice, use the previous one"),a):(o.set(t,s),s)}},c=class extends n{initValue(){return[]}getValues(){return this.getOrRegister()}addValue(t){return this.getOrRegister().push(t),t}};export{O as DummyProvider,V as Endpoints,p as GLOBAL_CONFIG,c as ListStateStorage,g as MapStateStorage,T as Plugin,l as PluginManager,A as ProcessorServiceImpl,w as QueuedStaticJsonRpcProvider,e as State,n as StateStorage,N as StoreContext,f as USER_PROCESSOR,x as errorString,b as getProvider,h as makeEthCallKey,m as mergeProcessResults,d as timeoutError};
2
+ import{U as d,V as N,W as O,X as b,Y as w,Z as A,g as u,i as T,j as l,m,n as x,o as f,p as h,q as V,y as p}from"./chunk-PXZEKALJ.js";var r=class{stateMap=new Map;static reset(){r.INSTANCE=new r}},e=r;u(e,"INSTANCE",new r);var n=class{constructor(){}key(){return this.constructor.name}getOrRegister(){let t=e.INSTANCE.stateMap.get(this.key());return t||(t=this.initValue(),e.INSTANCE.stateMap.set(this.key(),t)),t}},g=class extends n{initValue(){return new Map}getValue(t){return this.getOrRegister().get(t)}getValues(){let t=this.getOrRegister();return Array.from(t.values())}getOrSetValue(t,s){let o=this.getOrRegister(),a=o.get(t);return a?(console.warn(t,"has been registered twice, use the previous one"),a):(o.set(t,s),s)}},c=class extends n{initValue(){return[]}getValues(){return this.getOrRegister()}addValue(t){return this.getOrRegister().push(t),t}};export{O as DummyProvider,V as Endpoints,p as GLOBAL_CONFIG,c as ListStateStorage,g as MapStateStorage,T as Plugin,l as PluginManager,A as ProcessorServiceImpl,w as QueuedStaticJsonRpcProvider,e as State,n as StateStorage,N as StoreContext,f as USER_PROCESSOR,x as errorString,b as getProvider,h as makeEthCallKey,m as mergeProcessResults,d as timeoutError};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
3
- import{A as rh,B as Qr,C as nh,D as ih,E as pt,F as J,G as oh,H as Yt,I as Io,J as dt,K as ht,L as ah,M as uh,N as ke,O as A,P as Lo,Q as at,R as X,S as Ne,T as w,Z as sh,a as M,b as E,c as y,d as it,e as je,f as Y,h as Q1,k as Qd,l as Zd,q as Sr,r as ul,s as Z1,t as Jn,u as eh,v as th,w as eC,x as tC,y as sl,z as ot}from"./chunk-GBO4WWUG.js";var he=y(ll=>{"use strict";ll.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((n,o)=>{e.push((a,u)=>a!=null?o(a):n(u)),t.apply(this,e)})},"name",{value:t.name})};ll.fromPromise=function(t){return Object.defineProperty(function(...e){let n=e[e.length-1];if(typeof n!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(o=>n(null,o),n)},"name",{value:t.name})}});var ch=y((I7,lh)=>{var $t=M("constants"),rC=process.cwd,Co=null,nC=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Co||(Co=rC.call(process)),Co};try{process.cwd()}catch{}typeof process.chdir=="function"&&(cl=process.chdir,process.chdir=function(t){Co=null,cl.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,cl));var cl;lh.exports=iC;function iC(t){$t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||n(t),t.chown=u(t.chown),t.fchown=u(t.fchown),t.lchown=u(t.lchown),t.chmod=o(t.chmod),t.fchmod=o(t.fchmod),t.lchmod=o(t.lchmod),t.chownSync=i(t.chownSync),t.fchownSync=i(t.fchownSync),t.lchownSync=i(t.lchownSync),t.chmodSync=a(t.chmodSync),t.fchmodSync=a(t.fchmodSync),t.lchmodSync=a(t.lchmodSync),t.stat=r(t.stat),t.fstat=r(t.fstat),t.lstat=r(t.lstat),t.statSync=s(t.statSync),t.fstatSync=s(t.fstatSync),t.lstatSync=s(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,p,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,p,m,f){f&&process.nextTick(f)},t.lchownSync=function(){}),nC==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function p(m,f,v){var S=Date.now(),_=0;c(m,f,function O(g){if(g&&(g.code==="EACCES"||g.code==="EPERM"||g.code==="EBUSY")&&Date.now()-S<6e4){setTimeout(function(){t.stat(f,function(b,L){b&&b.code==="ENOENT"?c(m,f,O):v(g)})},_),_<100&&(_+=10);return}v&&v(g)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function p(m,f,v,S,_,O){var g;if(O&&typeof O=="function"){var b=0;g=function(L,B,j){if(L&&L.code==="EAGAIN"&&b<10)return b++,c.call(t,m,f,v,S,_,g);O.apply(this,arguments)}}return c.call(t,m,f,v,S,_,g)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(p,m,f,v,S){for(var _=0;;)try{return c.call(t,p,m,f,v,S)}catch(O){if(O.code==="EAGAIN"&&_<10){_++;continue}throw O}}}(t.readSync);function e(c){c.lchmod=function(p,m,f){c.open(p,$t.O_WRONLY|$t.O_SYMLINK,m,function(v,S){if(v){f&&f(v);return}c.fchmod(S,m,function(_){c.close(S,function(O){f&&f(_||O)})})})},c.lchmodSync=function(p,m){var f=c.openSync(p,$t.O_WRONLY|$t.O_SYMLINK,m),v=!0,S;try{S=c.fchmodSync(f,m),v=!1}finally{if(v)try{c.closeSync(f)}catch{}else c.closeSync(f)}return S}}function n(c){$t.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(p,m,f,v){c.open(p,$t.O_SYMLINK,function(S,_){if(S){v&&v(S);return}c.futimes(_,m,f,function(O){c.close(_,function(g){v&&v(O||g)})})})},c.lutimesSync=function(p,m,f){var v=c.openSync(p,$t.O_SYMLINK),S,_=!0;try{S=c.futimesSync(v,m,f),_=!1}finally{if(_)try{c.closeSync(v)}catch{}else c.closeSync(v)}return S}):c.futimes&&(c.lutimes=function(p,m,f,v){v&&process.nextTick(v)},c.lutimesSync=function(){})}function o(c){return c&&function(p,m,f){return c.call(t,p,m,function(v){l(v)&&(v=null),f&&f.apply(this,arguments)})}}function a(c){return c&&function(p,m){try{return c.call(t,p,m)}catch(f){if(!l(f))throw f}}}function u(c){return c&&function(p,m,f,v){return c.call(t,p,m,f,function(S){l(S)&&(S=null),v&&v.apply(this,arguments)})}}function i(c){return c&&function(p,m,f){try{return c.call(t,p,m,f)}catch(v){if(!l(v))throw v}}}function r(c){return c&&function(p,m,f){typeof m=="function"&&(f=m,m=null);function v(S,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),f&&f.apply(this,arguments)}return m?c.call(t,p,m,v):c.call(t,p,v)}}function s(c){return c&&function(p,m){var f=m?c.call(t,p,m):c.call(t,p);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function l(c){if(!c||c.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var dh=y((L7,ph)=>{var fh=M("stream").Stream;ph.exports=oC;function oC(t){return{ReadStream:e,WriteStream:n};function e(o,a){if(!(this instanceof e))return new e(o,a);fh.call(this);var u=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var i=Object.keys(a),r=0,s=i.length;r<s;r++){var l=i[r];this[l]=a[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){u._read()});return}t.open(this.path,this.flags,this.mode,function(c,p){if(c){u.emit("error",c),u.readable=!1;return}u.fd=p,u.emit("open",p),u._read()})}function n(o,a){if(!(this instanceof n))return new n(o,a);fh.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var u=Object.keys(a),i=0,r=u.length;i<r;i++){var s=u[i];this[s]=a[s]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var mh=y((C7,hh)=>{"use strict";hh.exports=uC;var aC=Object.getPrototypeOf||function(t){return t.__proto__};function uC(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:aC(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var en=y((U7,dl)=>{var oe=M("fs"),sC=ch(),lC=dh(),cC=mh(),Uo=M("util"),_e,Vo;typeof Symbol=="function"&&typeof Symbol.for=="function"?(_e=Symbol.for("graceful-fs.queue"),Vo=Symbol.for("graceful-fs.previous")):(_e="___graceful-fs.queue",Vo="___graceful-fs.previous");function fC(){}function _h(t,e){Object.defineProperty(t,_e,{get:function(){return e}})}var Er=fC;Uo.debuglog?Er=Uo.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Er=function(){var t=Uo.format.apply(Uo,arguments);t="GFS4: "+t.split(/\n/).join(`
3
+ import{A as rh,B as Qr,C as nh,D as ih,E as pt,F as J,G as oh,H as Yt,I as Io,J as dt,K as ht,L as ah,M as uh,N as ke,O as A,P as Lo,Q as at,R as X,S as Ne,T as w,Z as sh,a as M,b as E,c as y,d as it,e as je,f as Y,h as Q1,k as Qd,l as Zd,q as Sr,r as ul,s as Z1,t as Jn,u as eh,v as th,w as eC,x as tC,y as sl,z as ot}from"./chunk-PXZEKALJ.js";var he=y(ll=>{"use strict";ll.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((n,o)=>{e.push((a,u)=>a!=null?o(a):n(u)),t.apply(this,e)})},"name",{value:t.name})};ll.fromPromise=function(t){return Object.defineProperty(function(...e){let n=e[e.length-1];if(typeof n!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(o=>n(null,o),n)},"name",{value:t.name})}});var ch=y((I7,lh)=>{var $t=M("constants"),rC=process.cwd,Co=null,nC=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Co||(Co=rC.call(process)),Co};try{process.cwd()}catch{}typeof process.chdir=="function"&&(cl=process.chdir,process.chdir=function(t){Co=null,cl.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,cl));var cl;lh.exports=iC;function iC(t){$t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||n(t),t.chown=u(t.chown),t.fchown=u(t.fchown),t.lchown=u(t.lchown),t.chmod=o(t.chmod),t.fchmod=o(t.fchmod),t.lchmod=o(t.lchmod),t.chownSync=i(t.chownSync),t.fchownSync=i(t.fchownSync),t.lchownSync=i(t.lchownSync),t.chmodSync=a(t.chmodSync),t.fchmodSync=a(t.fchmodSync),t.lchmodSync=a(t.lchmodSync),t.stat=r(t.stat),t.fstat=r(t.fstat),t.lstat=r(t.lstat),t.statSync=s(t.statSync),t.fstatSync=s(t.fstatSync),t.lstatSync=s(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,p,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,p,m,f){f&&process.nextTick(f)},t.lchownSync=function(){}),nC==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function p(m,f,v){var S=Date.now(),_=0;c(m,f,function O(g){if(g&&(g.code==="EACCES"||g.code==="EPERM"||g.code==="EBUSY")&&Date.now()-S<6e4){setTimeout(function(){t.stat(f,function(b,L){b&&b.code==="ENOENT"?c(m,f,O):v(g)})},_),_<100&&(_+=10);return}v&&v(g)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function p(m,f,v,S,_,O){var g;if(O&&typeof O=="function"){var b=0;g=function(L,B,j){if(L&&L.code==="EAGAIN"&&b<10)return b++,c.call(t,m,f,v,S,_,g);O.apply(this,arguments)}}return c.call(t,m,f,v,S,_,g)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(p,m,f,v,S){for(var _=0;;)try{return c.call(t,p,m,f,v,S)}catch(O){if(O.code==="EAGAIN"&&_<10){_++;continue}throw O}}}(t.readSync);function e(c){c.lchmod=function(p,m,f){c.open(p,$t.O_WRONLY|$t.O_SYMLINK,m,function(v,S){if(v){f&&f(v);return}c.fchmod(S,m,function(_){c.close(S,function(O){f&&f(_||O)})})})},c.lchmodSync=function(p,m){var f=c.openSync(p,$t.O_WRONLY|$t.O_SYMLINK,m),v=!0,S;try{S=c.fchmodSync(f,m),v=!1}finally{if(v)try{c.closeSync(f)}catch{}else c.closeSync(f)}return S}}function n(c){$t.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(p,m,f,v){c.open(p,$t.O_SYMLINK,function(S,_){if(S){v&&v(S);return}c.futimes(_,m,f,function(O){c.close(_,function(g){v&&v(O||g)})})})},c.lutimesSync=function(p,m,f){var v=c.openSync(p,$t.O_SYMLINK),S,_=!0;try{S=c.futimesSync(v,m,f),_=!1}finally{if(_)try{c.closeSync(v)}catch{}else c.closeSync(v)}return S}):c.futimes&&(c.lutimes=function(p,m,f,v){v&&process.nextTick(v)},c.lutimesSync=function(){})}function o(c){return c&&function(p,m,f){return c.call(t,p,m,function(v){l(v)&&(v=null),f&&f.apply(this,arguments)})}}function a(c){return c&&function(p,m){try{return c.call(t,p,m)}catch(f){if(!l(f))throw f}}}function u(c){return c&&function(p,m,f,v){return c.call(t,p,m,f,function(S){l(S)&&(S=null),v&&v.apply(this,arguments)})}}function i(c){return c&&function(p,m,f){try{return c.call(t,p,m,f)}catch(v){if(!l(v))throw v}}}function r(c){return c&&function(p,m,f){typeof m=="function"&&(f=m,m=null);function v(S,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),f&&f.apply(this,arguments)}return m?c.call(t,p,m,v):c.call(t,p,v)}}function s(c){return c&&function(p,m){var f=m?c.call(t,p,m):c.call(t,p);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function l(c){if(!c||c.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var dh=y((L7,ph)=>{var fh=M("stream").Stream;ph.exports=oC;function oC(t){return{ReadStream:e,WriteStream:n};function e(o,a){if(!(this instanceof e))return new e(o,a);fh.call(this);var u=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var i=Object.keys(a),r=0,s=i.length;r<s;r++){var l=i[r];this[l]=a[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){u._read()});return}t.open(this.path,this.flags,this.mode,function(c,p){if(c){u.emit("error",c),u.readable=!1;return}u.fd=p,u.emit("open",p),u._read()})}function n(o,a){if(!(this instanceof n))return new n(o,a);fh.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var u=Object.keys(a),i=0,r=u.length;i<r;i++){var s=u[i];this[s]=a[s]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var mh=y((C7,hh)=>{"use strict";hh.exports=uC;var aC=Object.getPrototypeOf||function(t){return t.__proto__};function uC(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:aC(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var en=y((U7,dl)=>{var oe=M("fs"),sC=ch(),lC=dh(),cC=mh(),Uo=M("util"),_e,Vo;typeof Symbol=="function"&&typeof Symbol.for=="function"?(_e=Symbol.for("graceful-fs.queue"),Vo=Symbol.for("graceful-fs.previous")):(_e="___graceful-fs.queue",Vo="___graceful-fs.previous");function fC(){}function _h(t,e){Object.defineProperty(t,_e,{get:function(){return e}})}var Er=fC;Uo.debuglog?Er=Uo.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Er=function(){var t=Uo.format.apply(Uo,arguments);t="GFS4: "+t.split(/\n/).join(`
4
4
  GFS4: `),console.error(t)});oe[_e]||(vh=global[_e]||[],_h(oe,vh),oe.close=function(t){function e(n,o){return t.call(oe,n,function(a){a||yh(),typeof o=="function"&&o.apply(this,arguments)})}return Object.defineProperty(e,Vo,{value:t}),e}(oe.close),oe.closeSync=function(t){function e(n){t.apply(oe,arguments),yh()}return Object.defineProperty(e,Vo,{value:t}),e}(oe.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Er(oe[_e]),M("assert").equal(oe[_e].length,0)}));var vh;global[_e]||_h(global,oe[_e]);dl.exports=fl(cC(oe));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!oe.__patched&&(dl.exports=fl(oe),oe.__patched=!0);function fl(t){sC(t),t.gracefulify=fl,t.createReadStream=B,t.createWriteStream=j;var e=t.readFile;t.readFile=n;function n(P,k,U){return typeof k=="function"&&(U=k,k=null),z(P,k,U);function z(W,ne,ie,ue){return e(W,ne,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Zr([z,[W,ne,ie],Z,ue||Date.now(),Date.now()]):typeof ie=="function"&&ie.apply(this,arguments)})}}var o=t.writeFile;t.writeFile=a;function a(P,k,U,z){return typeof U=="function"&&(z=U,U=null),W(P,k,U,z);function W(ne,ie,ue,Z,ye){return o(ne,ie,ue,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zr([W,[ne,ie,ue,Z],re,ye||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var u=t.appendFile;u&&(t.appendFile=i);function i(P,k,U,z){return typeof U=="function"&&(z=U,U=null),W(P,k,U,z);function W(ne,ie,ue,Z,ye){return u(ne,ie,ue,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zr([W,[ne,ie,ue,Z],re,ye||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var r=t.copyFile;r&&(t.copyFile=s);function s(P,k,U,z){return typeof U=="function"&&(z=U,U=0),W(P,k,U,z);function W(ne,ie,ue,Z,ye){return r(ne,ie,ue,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zr([W,[ne,ie,ue,Z],re,ye||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var l=t.readdir;t.readdir=p;var c=/^v[0-5]\./;function p(P,k,U){typeof k=="function"&&(U=k,k=null);var z=c.test(process.version)?function(ie,ue,Z,ye){return l(ie,W(ie,ue,Z,ye))}:function(ie,ue,Z,ye){return l(ie,ue,W(ie,ue,Z,ye))};return z(P,k,U);function W(ne,ie,ue,Z){return function(ye,re){ye&&(ye.code==="EMFILE"||ye.code==="ENFILE")?Zr([z,[ne,ie,ue],ye,Z||Date.now(),Date.now()]):(re&&re.sort&&re.sort(),typeof ue=="function"&&ue.call(this,ye,re))}}}if(process.version.substr(0,4)==="v0.8"){var m=lC(t);O=m.ReadStream,b=m.WriteStream}var f=t.ReadStream;f&&(O.prototype=Object.create(f.prototype),O.prototype.open=g);var v=t.WriteStream;v&&(b.prototype=Object.create(v.prototype),b.prototype.open=L),Object.defineProperty(t,"ReadStream",{get:function(){return O},set:function(P){O=P},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return b},set:function(P){b=P},enumerable:!0,configurable:!0});var S=O;Object.defineProperty(t,"FileReadStream",{get:function(){return S},set:function(P){S=P},enumerable:!0,configurable:!0});var _=b;Object.defineProperty(t,"FileWriteStream",{get:function(){return _},set:function(P){_=P},enumerable:!0,configurable:!0});function O(P,k){return this instanceof O?(f.apply(this,arguments),this):O.apply(Object.create(O.prototype),arguments)}function g(){var P=this;$(P.path,P.flags,P.mode,function(k,U){k?(P.autoClose&&P.destroy(),P.emit("error",k)):(P.fd=U,P.emit("open",U),P.read())})}function b(P,k){return this instanceof b?(v.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function L(){var P=this;$(P.path,P.flags,P.mode,function(k,U){k?(P.destroy(),P.emit("error",k)):(P.fd=U,P.emit("open",U))})}function B(P,k){return new t.ReadStream(P,k)}function j(P,k){return new t.WriteStream(P,k)}var ae=t.open;t.open=$;function $(P,k,U,z){return typeof U=="function"&&(z=U,U=null),W(P,k,U,z);function W(ne,ie,ue,Z,ye){return ae(ne,ie,ue,function(re,w7){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zr([W,[ne,ie,ue,Z],re,ye||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}return t}function Zr(t){Er("ENQUEUE",t[0].name,t[1]),oe[_e].push(t),pl()}var Do;function yh(){for(var t=Date.now(),e=0;e<oe[_e].length;++e)oe[_e][e].length>2&&(oe[_e][e][3]=t,oe[_e][e][4]=t);pl()}function pl(){if(clearTimeout(Do),Do=void 0,oe[_e].length!==0){var t=oe[_e].shift(),e=t[0],n=t[1],o=t[2],a=t[3],u=t[4];if(a===void 0)Er("RETRY",e.name,n),e.apply(null,n);else if(Date.now()-a>=6e4){Er("TIMEOUT",e.name,n);var i=n.pop();typeof i=="function"&&i.call(null,o)}else{var r=Date.now()-u,s=Math.max(u-a,1),l=Math.min(s*1.2,100);r>=l?(Er("RETRY",e.name,n),e.apply(null,n.concat([a]))):oe[_e].push(t)}Do===void 0&&(Do=setTimeout(pl,0))}}});var Pe=y(Mt=>{"use strict";var Sh=he().fromCallback,Re=en(),pC=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof Re[t]=="function");Object.assign(Mt,Re);pC.forEach(t=>{Mt[t]=Sh(Re[t])});Mt.exists=function(t,e){return typeof e=="function"?Re.exists(t,e):new Promise(n=>Re.exists(t,n))};Mt.read=function(t,e,n,o,a,u){return typeof u=="function"?Re.read(t,e,n,o,a,u):new Promise((i,r)=>{Re.read(t,e,n,o,a,(s,l,c)=>{if(s)return r(s);i({bytesRead:l,buffer:c})})})};Mt.write=function(t,e,...n){return typeof n[n.length-1]=="function"?Re.write(t,e,...n):new Promise((o,a)=>{Re.write(t,e,...n,(u,i,r)=>{if(u)return a(u);o({bytesWritten:i,buffer:r})})})};Mt.readv=function(t,e,...n){return typeof n[n.length-1]=="function"?Re.readv(t,e,...n):new Promise((o,a)=>{Re.readv(t,e,...n,(u,i,r)=>{if(u)return a(u);o({bytesRead:i,buffers:r})})})};Mt.writev=function(t,e,...n){return typeof n[n.length-1]=="function"?Re.writev(t,e,...n):new Promise((o,a)=>{Re.writev(t,e,...n,(u,i,r)=>{if(u)return a(u);o({bytesWritten:i,buffers:r})})})};typeof Re.realpath.native=="function"?Mt.realpath.native=Sh(Re.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Th=y((V7,Eh)=>{"use strict";var dC=M("path");Eh.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(dC.parse(e).root,""))){let o=new Error(`Path contains invalid characters: ${e}`);throw o.code="EINVAL",o}}});var bh=y((k7,hl)=>{"use strict";var gh=Pe(),{checkPath:Oh}=Th(),Ah=t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode};hl.exports.makeDir=async(t,e)=>(Oh(t),gh.mkdir(t,{mode:Ah(e),recursive:!0}));hl.exports.makeDirSync=(t,e)=>(Oh(t),gh.mkdirSync(t,{mode:Ah(e),recursive:!0}))});var ut=y((B7,xh)=>{"use strict";var hC=he().fromPromise,{makeDir:mC,makeDirSync:ml}=bh(),vl=hC(mC);xh.exports={mkdirs:vl,mkdirsSync:ml,mkdirp:vl,mkdirpSync:ml,ensureDir:vl,ensureDirSync:ml}});var Kt=y((G7,Rh)=>{"use strict";var vC=he().fromPromise,Nh=Pe();function yC(t){return Nh.access(t).then(()=>!0).catch(()=>!1)}Rh.exports={pathExists:vC(yC),pathExistsSync:Nh.existsSync}});var yl=y((q7,Ph)=>{"use strict";var tn=Pe(),_C=he().fromPromise;async function SC(t,e,n){let o=await tn.open(t,"r+"),a=null;try{await tn.futimes(o,e,n)}finally{try{await tn.close(o)}catch(u){a=u}}if(a)throw a}function EC(t,e,n){let o=tn.openSync(t,"r+");return tn.futimesSync(o,e,n),tn.closeSync(o)}Ph.exports={utimesMillis:_C(SC),utimesMillisSync:EC}});var Tr=y((F7,Lh)=>{"use strict";var rn=Pe(),me=M("path"),wh=he().fromPromise;function TC(t,e,n){let o=n.dereference?a=>rn.stat(a,{bigint:!0}):a=>rn.lstat(a,{bigint:!0});return Promise.all([o(t),o(e).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,u])=>({srcStat:a,destStat:u}))}function gC(t,e,n){let o,a=n.dereference?i=>rn.statSync(i,{bigint:!0}):i=>rn.lstatSync(i,{bigint:!0}),u=a(t);try{o=a(e)}catch(i){if(i.code==="ENOENT")return{srcStat:u,destStat:null};throw i}return{srcStat:u,destStat:o}}async function OC(t,e,n,o){let{srcStat:a,destStat:u}=await TC(t,e,o);if(u){if(Qn(a,u)){let i=me.basename(t),r=me.basename(e);if(n==="move"&&i!==r&&i.toLowerCase()===r.toLowerCase())return{srcStat:a,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!a.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(a.isDirectory()&&_l(t,e))throw new Error(ko(t,e,n));return{srcStat:a,destStat:u}}function AC(t,e,n,o){let{srcStat:a,destStat:u}=gC(t,e,o);if(u){if(Qn(a,u)){let i=me.basename(t),r=me.basename(e);if(n==="move"&&i!==r&&i.toLowerCase()===r.toLowerCase())return{srcStat:a,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!a.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(a.isDirectory()&&_l(t,e))throw new Error(ko(t,e,n));return{srcStat:a,destStat:u}}async function Mh(t,e,n,o){let a=me.resolve(me.dirname(t)),u=me.resolve(me.dirname(n));if(u===a||u===me.parse(u).root)return;let i;try{i=await rn.stat(u,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(Qn(e,i))throw new Error(ko(t,n,o));return Mh(t,e,u,o)}function Ih(t,e,n,o){let a=me.resolve(me.dirname(t)),u=me.resolve(me.dirname(n));if(u===a||u===me.parse(u).root)return;let i;try{i=rn.statSync(u,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(Qn(e,i))throw new Error(ko(t,n,o));return Ih(t,e,u,o)}function Qn(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}function _l(t,e){let n=me.resolve(t).split(me.sep).filter(a=>a),o=me.resolve(e).split(me.sep).filter(a=>a);return n.every((a,u)=>o[u]===a)}function ko(t,e,n){return`Cannot ${n} '${t}' to a subdirectory of itself, '${e}'.`}Lh.exports={checkPaths:wh(OC),checkPathsSync:AC,checkParentPaths:wh(Mh),checkParentPathsSync:Ih,isSrcSubdir:_l,areIdentical:Qn}});var kh=y((H7,Vh)=>{"use strict";var Oe=Pe(),Zn=M("path"),{mkdirs:bC}=ut(),{pathExists:xC}=Kt(),{utimesMillis:NC}=yl(),ei=Tr();async function RC(t,e,n={}){typeof n=="function"&&(n={filter:n}),n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
5
5
 
6
6
  see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:o,destStat:a}=await ei.checkPaths(t,e,"copy",n);if(await ei.checkParentPaths(t,o,e,"copy"),!await Uh(t,e,n))return;let i=Zn.dirname(e);await xC(i)||await bC(i),await Dh(a,t,e,n)}async function Uh(t,e,n){return n.filter?n.filter(t,e):!0}async function Dh(t,e,n,o){let u=await(o.dereference?Oe.stat:Oe.lstat)(e);if(u.isDirectory())return IC(u,t,e,n,o);if(u.isFile()||u.isCharacterDevice()||u.isBlockDevice())return PC(u,t,e,n,o);if(u.isSymbolicLink())return LC(t,e,n,o);throw u.isSocket()?new Error(`Cannot copy a socket file: ${e}`):u.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}async function PC(t,e,n,o,a){if(!e)return Ch(t,n,o,a);if(a.overwrite)return await Oe.unlink(o),Ch(t,n,o,a);if(a.errorOnExist)throw new Error(`'${o}' already exists`)}async function Ch(t,e,n,o){if(await Oe.copyFile(e,n),o.preserveTimestamps){wC(t.mode)&&await MC(n,t.mode);let a=await Oe.stat(e);await NC(n,a.atime,a.mtime)}return Oe.chmod(n,t.mode)}function wC(t){return(t&128)===0}function MC(t,e){return Oe.chmod(t,e|128)}async function IC(t,e,n,o,a){e||await Oe.mkdir(o);let u=await Oe.readdir(n);await Promise.all(u.map(async i=>{let r=Zn.join(n,i),s=Zn.join(o,i);if(!await Uh(r,s,a))return;let{destStat:c}=await ei.checkPaths(r,s,"copy",a);return Dh(c,r,s,a)})),e||await Oe.chmod(o,t.mode)}async function LC(t,e,n,o){let a=await Oe.readlink(e);if(o.dereference&&(a=Zn.resolve(process.cwd(),a)),!t)return Oe.symlink(a,n);let u=null;try{u=await Oe.readlink(n)}catch(i){if(i.code==="EINVAL"||i.code==="UNKNOWN")return Oe.symlink(a,n);throw i}if(o.dereference&&(u=Zn.resolve(process.cwd(),u)),ei.isSrcSubdir(a,u))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${u}'.`);if(ei.isSrcSubdir(u,a))throw new Error(`Cannot overwrite '${u}' with '${a}'.`);return await Oe.unlink(n),Oe.symlink(a,n)}Vh.exports=RC});var Hh=y((j7,Fh)=>{"use strict";var we=en(),ti=M("path"),CC=ut().mkdirsSync,UC=yl().utimesMillisSync,ri=Tr();function DC(t,e,n){typeof n=="function"&&(n={filter:n}),n=n||{},n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.41.3-rc.3",
3
+ "version": "2.41.3-rc.4",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -204,6 +204,7 @@ export enum HandlerType {
204
204
  FUEL_CALL = 13,
205
205
  COSMOS_CALL = 14,
206
206
  STARKNET_EVENT = 15,
207
+ BTC_TRANSACTION = 16,
207
208
  UNRECOGNIZED = -1,
208
209
  }
209
210
 
@@ -257,6 +258,9 @@ export function handlerTypeFromJSON(object: any): HandlerType {
257
258
  case 15:
258
259
  case "STARKNET_EVENT":
259
260
  return HandlerType.STARKNET_EVENT;
261
+ case 16:
262
+ case "BTC_TRANSACTION":
263
+ return HandlerType.BTC_TRANSACTION;
260
264
  case -1:
261
265
  case "UNRECOGNIZED":
262
266
  default:
@@ -298,6 +302,8 @@ export function handlerTypeToJSON(object: HandlerType): string {
298
302
  return "COSMOS_CALL";
299
303
  case HandlerType.STARKNET_EVENT:
300
304
  return "STARKNET_EVENT";
305
+ case HandlerType.BTC_TRANSACTION:
306
+ return "BTC_TRANSACTION";
301
307
  case HandlerType.UNRECOGNIZED:
302
308
  default:
303
309
  return "UNRECOGNIZED";
@@ -396,6 +402,7 @@ export interface ContractConfig {
396
402
  fuelLogConfigs: FuelLogHandlerConfig[];
397
403
  cosmosLogConfigs: CosmosLogHandlerConfig[];
398
404
  starknetEventConfigs: StarknetEventHandlerConfig[];
405
+ btcTransactionConfigs: BTCTransactionHandlerConfig[];
399
406
  instructionConfig: InstructionHandlerConfig | undefined;
400
407
  startBlock: bigint;
401
408
  endBlock: bigint;
@@ -725,6 +732,15 @@ export interface StarknetEventHandlerConfig {
725
732
  handlerId: number;
726
733
  }
727
734
 
735
+ export interface BTCTransactionHandlerConfig {
736
+ filters: BTCTransactionFilter[];
737
+ handlerId: number;
738
+ }
739
+
740
+ export interface BTCTransactionFilter {
741
+ address: string;
742
+ }
743
+
728
744
  export interface StarknetEventFilter {
729
745
  address: string;
730
746
  keys: string[];
@@ -954,6 +970,7 @@ export interface Data {
954
970
  fuelCall?: Data_FuelCall | undefined;
955
971
  cosmosCall?: Data_CosmosCall | undefined;
956
972
  starknetEvents?: Data_StarknetEvent | undefined;
973
+ btcTransaction?: Data_BTCTransaction | undefined;
957
974
  }
958
975
 
959
976
  export interface Data_EthLog {
@@ -1047,6 +1064,11 @@ export interface Data_StarknetEvent {
1047
1064
  timestamp: Date | undefined;
1048
1065
  }
1049
1066
 
1067
+ export interface Data_BTCTransaction {
1068
+ transaction: { [key: string]: any } | undefined;
1069
+ timestamp: Date | undefined;
1070
+ }
1071
+
1050
1072
  export interface DataBinding {
1051
1073
  data: Data | undefined;
1052
1074
  handlerType: HandlerType;
@@ -1605,6 +1627,7 @@ function createBaseContractConfig(): ContractConfig {
1605
1627
  fuelLogConfigs: [],
1606
1628
  cosmosLogConfigs: [],
1607
1629
  starknetEventConfigs: [],
1630
+ btcTransactionConfigs: [],
1608
1631
  instructionConfig: undefined,
1609
1632
  startBlock: BigInt("0"),
1610
1633
  endBlock: BigInt("0"),
@@ -1653,6 +1676,9 @@ export const ContractConfig = {
1653
1676
  for (const v of message.starknetEventConfigs) {
1654
1677
  StarknetEventHandlerConfig.encode(v!, writer.uint32(138).fork()).ldelim();
1655
1678
  }
1679
+ for (const v of message.btcTransactionConfigs) {
1680
+ BTCTransactionHandlerConfig.encode(v!, writer.uint32(146).fork()).ldelim();
1681
+ }
1656
1682
  if (message.instructionConfig !== undefined) {
1657
1683
  InstructionHandlerConfig.encode(message.instructionConfig, writer.uint32(50).fork()).ldelim();
1658
1684
  }
@@ -1772,6 +1798,13 @@ export const ContractConfig = {
1772
1798
 
1773
1799
  message.starknetEventConfigs.push(StarknetEventHandlerConfig.decode(reader, reader.uint32()));
1774
1800
  continue;
1801
+ case 18:
1802
+ if (tag !== 146) {
1803
+ break;
1804
+ }
1805
+
1806
+ message.btcTransactionConfigs.push(BTCTransactionHandlerConfig.decode(reader, reader.uint32()));
1807
+ continue;
1775
1808
  case 6:
1776
1809
  if (tag !== 50) {
1777
1810
  break;
@@ -1848,6 +1881,9 @@ export const ContractConfig = {
1848
1881
  starknetEventConfigs: globalThis.Array.isArray(object?.starknetEventConfigs)
1849
1882
  ? object.starknetEventConfigs.map((e: any) => StarknetEventHandlerConfig.fromJSON(e))
1850
1883
  : [],
1884
+ btcTransactionConfigs: globalThis.Array.isArray(object?.btcTransactionConfigs)
1885
+ ? object.btcTransactionConfigs.map((e: any) => BTCTransactionHandlerConfig.fromJSON(e))
1886
+ : [],
1851
1887
  instructionConfig: isSet(object.instructionConfig)
1852
1888
  ? InstructionHandlerConfig.fromJSON(object.instructionConfig)
1853
1889
  : undefined,
@@ -1898,6 +1934,9 @@ export const ContractConfig = {
1898
1934
  if (message.starknetEventConfigs?.length) {
1899
1935
  obj.starknetEventConfigs = message.starknetEventConfigs.map((e) => StarknetEventHandlerConfig.toJSON(e));
1900
1936
  }
1937
+ if (message.btcTransactionConfigs?.length) {
1938
+ obj.btcTransactionConfigs = message.btcTransactionConfigs.map((e) => BTCTransactionHandlerConfig.toJSON(e));
1939
+ }
1901
1940
  if (message.instructionConfig !== undefined) {
1902
1941
  obj.instructionConfig = InstructionHandlerConfig.toJSON(message.instructionConfig);
1903
1942
  }
@@ -1935,6 +1974,8 @@ export const ContractConfig = {
1935
1974
  message.cosmosLogConfigs = object.cosmosLogConfigs?.map((e) => CosmosLogHandlerConfig.fromPartial(e)) || [];
1936
1975
  message.starknetEventConfigs = object.starknetEventConfigs?.map((e) => StarknetEventHandlerConfig.fromPartial(e)) ||
1937
1976
  [];
1977
+ message.btcTransactionConfigs =
1978
+ object.btcTransactionConfigs?.map((e) => BTCTransactionHandlerConfig.fromPartial(e)) || [];
1938
1979
  message.instructionConfig = (object.instructionConfig !== undefined && object.instructionConfig !== null)
1939
1980
  ? InstructionHandlerConfig.fromPartial(object.instructionConfig)
1940
1981
  : undefined;
@@ -5540,6 +5581,139 @@ export const StarknetEventHandlerConfig = {
5540
5581
  },
5541
5582
  };
5542
5583
 
5584
+ function createBaseBTCTransactionHandlerConfig(): BTCTransactionHandlerConfig {
5585
+ return { filters: [], handlerId: 0 };
5586
+ }
5587
+
5588
+ export const BTCTransactionHandlerConfig = {
5589
+ encode(message: BTCTransactionHandlerConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
5590
+ for (const v of message.filters) {
5591
+ BTCTransactionFilter.encode(v!, writer.uint32(10).fork()).ldelim();
5592
+ }
5593
+ if (message.handlerId !== 0) {
5594
+ writer.uint32(16).int32(message.handlerId);
5595
+ }
5596
+ return writer;
5597
+ },
5598
+
5599
+ decode(input: _m0.Reader | Uint8Array, length?: number): BTCTransactionHandlerConfig {
5600
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
5601
+ let end = length === undefined ? reader.len : reader.pos + length;
5602
+ const message = createBaseBTCTransactionHandlerConfig();
5603
+ while (reader.pos < end) {
5604
+ const tag = reader.uint32();
5605
+ switch (tag >>> 3) {
5606
+ case 1:
5607
+ if (tag !== 10) {
5608
+ break;
5609
+ }
5610
+
5611
+ message.filters.push(BTCTransactionFilter.decode(reader, reader.uint32()));
5612
+ continue;
5613
+ case 2:
5614
+ if (tag !== 16) {
5615
+ break;
5616
+ }
5617
+
5618
+ message.handlerId = reader.int32();
5619
+ continue;
5620
+ }
5621
+ if ((tag & 7) === 4 || tag === 0) {
5622
+ break;
5623
+ }
5624
+ reader.skipType(tag & 7);
5625
+ }
5626
+ return message;
5627
+ },
5628
+
5629
+ fromJSON(object: any): BTCTransactionHandlerConfig {
5630
+ return {
5631
+ filters: globalThis.Array.isArray(object?.filters)
5632
+ ? object.filters.map((e: any) => BTCTransactionFilter.fromJSON(e))
5633
+ : [],
5634
+ handlerId: isSet(object.handlerId) ? globalThis.Number(object.handlerId) : 0,
5635
+ };
5636
+ },
5637
+
5638
+ toJSON(message: BTCTransactionHandlerConfig): unknown {
5639
+ const obj: any = {};
5640
+ if (message.filters?.length) {
5641
+ obj.filters = message.filters.map((e) => BTCTransactionFilter.toJSON(e));
5642
+ }
5643
+ if (message.handlerId !== 0) {
5644
+ obj.handlerId = Math.round(message.handlerId);
5645
+ }
5646
+ return obj;
5647
+ },
5648
+
5649
+ create(base?: DeepPartial<BTCTransactionHandlerConfig>): BTCTransactionHandlerConfig {
5650
+ return BTCTransactionHandlerConfig.fromPartial(base ?? {});
5651
+ },
5652
+ fromPartial(object: DeepPartial<BTCTransactionHandlerConfig>): BTCTransactionHandlerConfig {
5653
+ const message = createBaseBTCTransactionHandlerConfig();
5654
+ message.filters = object.filters?.map((e) => BTCTransactionFilter.fromPartial(e)) || [];
5655
+ message.handlerId = object.handlerId ?? 0;
5656
+ return message;
5657
+ },
5658
+ };
5659
+
5660
+ function createBaseBTCTransactionFilter(): BTCTransactionFilter {
5661
+ return { address: "" };
5662
+ }
5663
+
5664
+ export const BTCTransactionFilter = {
5665
+ encode(message: BTCTransactionFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
5666
+ if (message.address !== "") {
5667
+ writer.uint32(10).string(message.address);
5668
+ }
5669
+ return writer;
5670
+ },
5671
+
5672
+ decode(input: _m0.Reader | Uint8Array, length?: number): BTCTransactionFilter {
5673
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
5674
+ let end = length === undefined ? reader.len : reader.pos + length;
5675
+ const message = createBaseBTCTransactionFilter();
5676
+ while (reader.pos < end) {
5677
+ const tag = reader.uint32();
5678
+ switch (tag >>> 3) {
5679
+ case 1:
5680
+ if (tag !== 10) {
5681
+ break;
5682
+ }
5683
+
5684
+ message.address = reader.string();
5685
+ continue;
5686
+ }
5687
+ if ((tag & 7) === 4 || tag === 0) {
5688
+ break;
5689
+ }
5690
+ reader.skipType(tag & 7);
5691
+ }
5692
+ return message;
5693
+ },
5694
+
5695
+ fromJSON(object: any): BTCTransactionFilter {
5696
+ return { address: isSet(object.address) ? globalThis.String(object.address) : "" };
5697
+ },
5698
+
5699
+ toJSON(message: BTCTransactionFilter): unknown {
5700
+ const obj: any = {};
5701
+ if (message.address !== "") {
5702
+ obj.address = message.address;
5703
+ }
5704
+ return obj;
5705
+ },
5706
+
5707
+ create(base?: DeepPartial<BTCTransactionFilter>): BTCTransactionFilter {
5708
+ return BTCTransactionFilter.fromPartial(base ?? {});
5709
+ },
5710
+ fromPartial(object: DeepPartial<BTCTransactionFilter>): BTCTransactionFilter {
5711
+ const message = createBaseBTCTransactionFilter();
5712
+ message.address = object.address ?? "";
5713
+ return message;
5714
+ },
5715
+ };
5716
+
5543
5717
  function createBaseStarknetEventFilter(): StarknetEventFilter {
5544
5718
  return { address: "", keys: [] };
5545
5719
  }
@@ -7322,6 +7496,7 @@ function createBaseData(): Data {
7322
7496
  fuelCall: undefined,
7323
7497
  cosmosCall: undefined,
7324
7498
  starknetEvents: undefined,
7499
+ btcTransaction: undefined,
7325
7500
  };
7326
7501
  }
7327
7502
 
@@ -7375,6 +7550,9 @@ export const Data = {
7375
7550
  if (message.starknetEvents !== undefined) {
7376
7551
  Data_StarknetEvent.encode(message.starknetEvents, writer.uint32(130).fork()).ldelim();
7377
7552
  }
7553
+ if (message.btcTransaction !== undefined) {
7554
+ Data_BTCTransaction.encode(message.btcTransaction, writer.uint32(138).fork()).ldelim();
7555
+ }
7378
7556
  return writer;
7379
7557
  },
7380
7558
 
@@ -7497,6 +7675,13 @@ export const Data = {
7497
7675
 
7498
7676
  message.starknetEvents = Data_StarknetEvent.decode(reader, reader.uint32());
7499
7677
  continue;
7678
+ case 17:
7679
+ if (tag !== 138) {
7680
+ break;
7681
+ }
7682
+
7683
+ message.btcTransaction = Data_BTCTransaction.decode(reader, reader.uint32());
7684
+ continue;
7500
7685
  }
7501
7686
  if ((tag & 7) === 4 || tag === 0) {
7502
7687
  break;
@@ -7526,6 +7711,7 @@ export const Data = {
7526
7711
  fuelCall: isSet(object.fuelCall) ? Data_FuelCall.fromJSON(object.fuelCall) : undefined,
7527
7712
  cosmosCall: isSet(object.cosmosCall) ? Data_CosmosCall.fromJSON(object.cosmosCall) : undefined,
7528
7713
  starknetEvents: isSet(object.starknetEvents) ? Data_StarknetEvent.fromJSON(object.starknetEvents) : undefined,
7714
+ btcTransaction: isSet(object.btcTransaction) ? Data_BTCTransaction.fromJSON(object.btcTransaction) : undefined,
7529
7715
  };
7530
7716
  },
7531
7717
 
@@ -7579,6 +7765,9 @@ export const Data = {
7579
7765
  if (message.starknetEvents !== undefined) {
7580
7766
  obj.starknetEvents = Data_StarknetEvent.toJSON(message.starknetEvents);
7581
7767
  }
7768
+ if (message.btcTransaction !== undefined) {
7769
+ obj.btcTransaction = Data_BTCTransaction.toJSON(message.btcTransaction);
7770
+ }
7582
7771
  return obj;
7583
7772
  },
7584
7773
 
@@ -7633,6 +7822,9 @@ export const Data = {
7633
7822
  message.starknetEvents = (object.starknetEvents !== undefined && object.starknetEvents !== null)
7634
7823
  ? Data_StarknetEvent.fromPartial(object.starknetEvents)
7635
7824
  : undefined;
7825
+ message.btcTransaction = (object.btcTransaction !== undefined && object.btcTransaction !== null)
7826
+ ? Data_BTCTransaction.fromPartial(object.btcTransaction)
7827
+ : undefined;
7636
7828
  return message;
7637
7829
  },
7638
7830
  };
@@ -9020,6 +9212,80 @@ export const Data_StarknetEvent = {
9020
9212
  },
9021
9213
  };
9022
9214
 
9215
+ function createBaseData_BTCTransaction(): Data_BTCTransaction {
9216
+ return { transaction: undefined, timestamp: undefined };
9217
+ }
9218
+
9219
+ export const Data_BTCTransaction = {
9220
+ encode(message: Data_BTCTransaction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9221
+ if (message.transaction !== undefined) {
9222
+ Struct.encode(Struct.wrap(message.transaction), writer.uint32(34).fork()).ldelim();
9223
+ }
9224
+ if (message.timestamp !== undefined) {
9225
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim();
9226
+ }
9227
+ return writer;
9228
+ },
9229
+
9230
+ decode(input: _m0.Reader | Uint8Array, length?: number): Data_BTCTransaction {
9231
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
9232
+ let end = length === undefined ? reader.len : reader.pos + length;
9233
+ const message = createBaseData_BTCTransaction();
9234
+ while (reader.pos < end) {
9235
+ const tag = reader.uint32();
9236
+ switch (tag >>> 3) {
9237
+ case 4:
9238
+ if (tag !== 34) {
9239
+ break;
9240
+ }
9241
+
9242
+ message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
9243
+ continue;
9244
+ case 5:
9245
+ if (tag !== 42) {
9246
+ break;
9247
+ }
9248
+
9249
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
9250
+ continue;
9251
+ }
9252
+ if ((tag & 7) === 4 || tag === 0) {
9253
+ break;
9254
+ }
9255
+ reader.skipType(tag & 7);
9256
+ }
9257
+ return message;
9258
+ },
9259
+
9260
+ fromJSON(object: any): Data_BTCTransaction {
9261
+ return {
9262
+ transaction: isObject(object.transaction) ? object.transaction : undefined,
9263
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
9264
+ };
9265
+ },
9266
+
9267
+ toJSON(message: Data_BTCTransaction): unknown {
9268
+ const obj: any = {};
9269
+ if (message.transaction !== undefined) {
9270
+ obj.transaction = message.transaction;
9271
+ }
9272
+ if (message.timestamp !== undefined) {
9273
+ obj.timestamp = message.timestamp.toISOString();
9274
+ }
9275
+ return obj;
9276
+ },
9277
+
9278
+ create(base?: DeepPartial<Data_BTCTransaction>): Data_BTCTransaction {
9279
+ return Data_BTCTransaction.fromPartial(base ?? {});
9280
+ },
9281
+ fromPartial(object: DeepPartial<Data_BTCTransaction>): Data_BTCTransaction {
9282
+ const message = createBaseData_BTCTransaction();
9283
+ message.transaction = object.transaction ?? undefined;
9284
+ message.timestamp = object.timestamp ?? undefined;
9285
+ return message;
9286
+ },
9287
+ };
9288
+
9023
9289
  function createBaseDataBinding(): DataBinding {
9024
9290
  return { data: undefined, handlerType: 0, handlerIds: [] };
9025
9291
  }
@@ -1840,6 +1840,7 @@ export interface RichValue {
1840
1840
  bigintValue?: BigInteger | undefined;
1841
1841
  bigdecimalValue?: BigDecimal | undefined;
1842
1842
  listValue?: RichValueList | undefined;
1843
+ structValue?: RichStruct | undefined;
1843
1844
  }
1844
1845
 
1845
1846
  export enum RichValue_NullValue {
@@ -12540,6 +12541,7 @@ function createBaseRichValue(): RichValue {
12540
12541
  bigintValue: undefined,
12541
12542
  bigdecimalValue: undefined,
12542
12543
  listValue: undefined,
12544
+ structValue: undefined,
12543
12545
  };
12544
12546
  }
12545
12547
 
@@ -12575,6 +12577,9 @@ export const RichValue = {
12575
12577
  if (message.listValue !== undefined) {
12576
12578
  RichValueList.encode(message.listValue, writer.uint32(82).fork()).ldelim();
12577
12579
  }
12580
+ if (message.structValue !== undefined) {
12581
+ RichStruct.encode(message.structValue, writer.uint32(90).fork()).ldelim();
12582
+ }
12578
12583
  return writer;
12579
12584
  },
12580
12585
 
@@ -12655,6 +12660,13 @@ export const RichValue = {
12655
12660
 
12656
12661
  message.listValue = RichValueList.decode(reader, reader.uint32());
12657
12662
  continue;
12663
+ case 11:
12664
+ if (tag !== 90) {
12665
+ break;
12666
+ }
12667
+
12668
+ message.structValue = RichStruct.decode(reader, reader.uint32());
12669
+ continue;
12658
12670
  }
12659
12671
  if ((tag & 7) === 4 || tag === 0) {
12660
12672
  break;
@@ -12676,6 +12688,7 @@ export const RichValue = {
12676
12688
  bigintValue: isSet(object.bigintValue) ? BigInteger.fromJSON(object.bigintValue) : undefined,
12677
12689
  bigdecimalValue: isSet(object.bigdecimalValue) ? BigDecimal.fromJSON(object.bigdecimalValue) : undefined,
12678
12690
  listValue: isSet(object.listValue) ? RichValueList.fromJSON(object.listValue) : undefined,
12691
+ structValue: isSet(object.structValue) ? RichStruct.fromJSON(object.structValue) : undefined,
12679
12692
  };
12680
12693
  },
12681
12694
 
@@ -12711,6 +12724,9 @@ export const RichValue = {
12711
12724
  if (message.listValue !== undefined) {
12712
12725
  obj.listValue = RichValueList.toJSON(message.listValue);
12713
12726
  }
12727
+ if (message.structValue !== undefined) {
12728
+ obj.structValue = RichStruct.toJSON(message.structValue);
12729
+ }
12714
12730
  return obj;
12715
12731
  },
12716
12732
 
@@ -12735,6 +12751,9 @@ export const RichValue = {
12735
12751
  message.listValue = (object.listValue !== undefined && object.listValue !== null)
12736
12752
  ? RichValueList.fromPartial(object.listValue)
12737
12753
  : undefined;
12754
+ message.structValue = (object.structValue !== undefined && object.structValue !== null)
12755
+ ? RichStruct.fromPartial(object.structValue)
12756
+ : undefined;
12738
12757
  return message;
12739
12758
  },
12740
12759
  };