@sentio/sdk-bundle 2.50.1 → 2.50.2-rc.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.
Files changed (68) hide show
  1. package/lib/aptos/builtin/0x1.js +1 -1
  2. package/lib/aptos/builtin/0x3.js +1 -1
  3. package/lib/aptos/builtin/index.js +1 -1
  4. package/lib/aptos/ext/index.js +1 -1
  5. package/lib/aptos/index.js +1 -1
  6. package/lib/btc/index.js +1 -1
  7. package/lib/{chunk-DDBMJIG4.js → chunk-2ZLOG6M7.js} +2 -2
  8. package/lib/{chunk-JS3OLQ4N.js → chunk-4M475LJH.js} +2 -2
  9. package/lib/{chunk-F4DYPLSS.js → chunk-5UED3IMZ.js} +2 -2
  10. package/lib/{chunk-RQRC6JFO.js → chunk-6JQFPDV5.js} +2 -2
  11. package/lib/{chunk-L5L6Z77V.js → chunk-AN265AQX.js} +2 -2
  12. package/lib/{chunk-HLNH3NYZ.js → chunk-GT6HNPDP.js} +2 -2
  13. package/lib/chunk-GUTGNATB.js +32 -0
  14. package/lib/chunk-GUTGNATB.js.map +1 -0
  15. package/lib/{chunk-HWDKW5FG.js → chunk-JK4IK6UV.js} +2 -2
  16. package/lib/{chunk-LI5W4TO6.js → chunk-L2RYMS7L.js} +2 -2
  17. package/lib/{chunk-QCBIDGO3.js → chunk-NSAUV6AB.js} +2 -2
  18. package/lib/{chunk-OMPBG6IS.js → chunk-OYU3JOOI.js} +2 -2
  19. package/lib/{chunk-3AZNSC2K.js → chunk-PNVVX7IL.js} +2 -2
  20. package/lib/{chunk-TUAGKH5K.js → chunk-RASCZBLN.js} +178 -178
  21. package/lib/{chunk-TUAGKH5K.js.map → chunk-RASCZBLN.js.map} +1 -1
  22. package/lib/{chunk-X5L63BMR.js → chunk-SWRIEEO2.js} +2 -2
  23. package/lib/{chunk-LQ2JMF5Z.js → chunk-TB5YQH36.js} +2 -2
  24. package/lib/{chunk-37JW6BLR.js → chunk-V6OJKYVZ.js} +2 -2
  25. package/lib/{chunk-7YR44CBG.js → chunk-VI7J5F7D.js} +2 -2
  26. package/lib/{chunk-MPJRHMKL.js → chunk-WSLRWDNP.js} +2 -2
  27. package/lib/core/index.js +1 -1
  28. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  29. package/lib/eth/builtin/erc1155.js +1 -1
  30. package/lib/eth/builtin/erc20.js +1 -1
  31. package/lib/eth/builtin/erc721.js +1 -1
  32. package/lib/eth/builtin/index.js +1 -1
  33. package/lib/eth/builtin/weth9.js +1 -1
  34. package/lib/eth/index.js +1 -1
  35. package/lib/fuel/index.js +1 -1
  36. package/lib/index.js +1 -1
  37. package/lib/move/index.js +1 -1
  38. package/lib/solana/builtin/index.js +1 -1
  39. package/lib/solana/index.js +1 -1
  40. package/lib/stark/index.js +1 -1
  41. package/lib/store/index.js +1 -1
  42. package/lib/sui/builtin/0x1.js +1 -1
  43. package/lib/sui/builtin/0x2.js +1 -1
  44. package/lib/sui/builtin/0x3.js +1 -1
  45. package/lib/sui/builtin/index.js +1 -1
  46. package/lib/sui/ext/index.js +1 -1
  47. package/lib/sui/index.js +1 -1
  48. package/lib/testing/index.js +1 -1
  49. package/lib/utils/index.js +1 -1
  50. package/package.json +2 -2
  51. package/lib/chunk-2E4NSWHZ.js +0 -32
  52. package/lib/chunk-2E4NSWHZ.js.map +0 -1
  53. /package/lib/{chunk-DDBMJIG4.js.map → chunk-2ZLOG6M7.js.map} +0 -0
  54. /package/lib/{chunk-JS3OLQ4N.js.map → chunk-4M475LJH.js.map} +0 -0
  55. /package/lib/{chunk-F4DYPLSS.js.map → chunk-5UED3IMZ.js.map} +0 -0
  56. /package/lib/{chunk-RQRC6JFO.js.map → chunk-6JQFPDV5.js.map} +0 -0
  57. /package/lib/{chunk-L5L6Z77V.js.map → chunk-AN265AQX.js.map} +0 -0
  58. /package/lib/{chunk-HLNH3NYZ.js.map → chunk-GT6HNPDP.js.map} +0 -0
  59. /package/lib/{chunk-HWDKW5FG.js.map → chunk-JK4IK6UV.js.map} +0 -0
  60. /package/lib/{chunk-LI5W4TO6.js.map → chunk-L2RYMS7L.js.map} +0 -0
  61. /package/lib/{chunk-QCBIDGO3.js.map → chunk-NSAUV6AB.js.map} +0 -0
  62. /package/lib/{chunk-OMPBG6IS.js.map → chunk-OYU3JOOI.js.map} +0 -0
  63. /package/lib/{chunk-3AZNSC2K.js.map → chunk-PNVVX7IL.js.map} +0 -0
  64. /package/lib/{chunk-X5L63BMR.js.map → chunk-SWRIEEO2.js.map} +0 -0
  65. /package/lib/{chunk-LQ2JMF5Z.js.map → chunk-TB5YQH36.js.map} +0 -0
  66. /package/lib/{chunk-37JW6BLR.js.map → chunk-V6OJKYVZ.js.map} +0 -0
  67. /package/lib/{chunk-7YR44CBG.js.map → chunk-VI7J5F7D.js.map} +0 -0
  68. /package/lib/{chunk-MPJRHMKL.js.map → chunk-WSLRWDNP.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{Ad as W,Cd as Ot,Dd as ue,Ed as Y,kd as ne,ld as B,md as Q,nd as ie,od as X,pd as vt,qd as mt,rd as wt,sd as gt,td as _t,ud as bt,vd as Mt,wd as F,xd as U,yd as ae,zd as oe}from"../chunk-TUAGKH5K.js";import"../chunk-RA75ESSD.js";import{a as n,d as ee,f as re}from"../chunk-G5BIPHMS.js";var xt=ee(()=>{"use strict";var kt;(function(f){(function(l){var h=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:P(),m=p(f);typeof h.Reflect<"u"&&(m=p(h.Reflect,m)),l(m,h),typeof h.Reflect>"u"&&(h.Reflect=f);function p(T,R){return function(k,I){Object.defineProperty(T,k,{configurable:!0,writable:!0,value:I}),R&&R(k,I)}}n(p,"makeExporter");function M(){try{return Function("return this;")()}catch{}}n(M,"functionThis");function x(){try{return(0,eval)("(function() { return this; })()")}catch{}}n(x,"indirectEvalThis");function P(){return M()||x()}n(P,"sloppyModeThis")})(function(l,h){var m=Object.prototype.hasOwnProperty,p=typeof Symbol=="function",M=p&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",x=p&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",P=typeof Object.create=="function",T={__proto__:[]}instanceof Array,R=!P&&!T,k={create:P?function(){return Z(Object.create(null))}:T?function(){return Z({__proto__:null})}:function(){return Z({})},has:R?function(t,e){return m.call(t,e)}:function(t,e){return e in t},get:R?function(t,e){return m.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},I=Object.getPrototypeOf(Function),N=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Qt(),H=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Xt(),$=typeof WeakMap=="function"?WeakMap:Yt(),j=p?Symbol.for("@reflect-metadata:registry"):void 0,A=Jt(),K=Lt(A);function Et(t,e,r,i){if(d(r)){if(!ft(t))throw new TypeError;if(!st(e))throw new TypeError;return Bt(t,e)}else{if(!ft(t))throw new TypeError;if(!g(e))throw new TypeError;if(!g(i)&&!d(i)&&!V(i))throw new TypeError;return V(i)&&(i=void 0),r=E(r),Ft(t,e,r,i)}}n(Et,"decorate"),l("decorate",Et);function It(t,e){function r(i,c){if(!g(i))throw new TypeError;if(!d(c)&&!$t(c))throw new TypeError;nt(t,e,i,c)}return n(r,"decorator"),r}n(It,"metadata"),l("metadata",It);function Pt(t,e,r,i){if(!g(r))throw new TypeError;return d(i)||(i=E(i)),nt(t,e,r,i)}n(Pt,"defineMetadata"),l("defineMetadata",Pt);function Rt(t,e,r){if(!g(e))throw new TypeError;return d(r)||(r=E(r)),tt(t,e,r)}n(Rt,"hasMetadata"),l("hasMetadata",Rt);function jt(t,e,r){if(!g(e))throw new TypeError;return d(r)||(r=E(r)),q(t,e,r)}n(jt,"hasOwnMetadata"),l("hasOwnMetadata",jt);function Vt(t,e,r){if(!g(e))throw new TypeError;return d(r)||(r=E(r)),et(t,e,r)}n(Vt,"getMetadata"),l("getMetadata",Vt);function Dt(t,e,r){if(!g(e))throw new TypeError;return d(r)||(r=E(r)),rt(t,e,r)}n(Dt,"getOwnMetadata"),l("getOwnMetadata",Dt);function Nt(t,e){if(!g(t))throw new TypeError;return d(e)||(e=E(e)),it(t,e)}n(Nt,"getMetadataKeys"),l("getMetadataKeys",Nt);function Gt(t,e){if(!g(t))throw new TypeError;return d(e)||(e=E(e)),at(t,e)}n(Gt,"getOwnMetadataKeys"),l("getOwnMetadataKeys",Gt);function At(t,e,r){if(!g(e))throw new TypeError;if(d(r)||(r=E(r)),!g(e))throw new TypeError;d(r)||(r=E(r));var i=G(e,r,!1);return d(i)?!1:i.OrdinaryDeleteMetadata(t,e,r)}n(At,"deleteMetadata"),l("deleteMetadata",At);function Bt(t,e){for(var r=t.length-1;r>=0;--r){var i=t[r],c=i(e);if(!d(c)&&!V(c)){if(!st(c))throw new TypeError;e=c}}return e}n(Bt,"DecorateConstructor");function Ft(t,e,r,i){for(var c=t.length-1;c>=0;--c){var _=t[c],O=_(e,r,i);if(!d(O)&&!V(O)){if(!g(O))throw new TypeError;i=O}}return i}n(Ft,"DecorateProperty");function tt(t,e,r){var i=q(t,e,r);if(i)return!0;var c=L(e);return V(c)?!1:tt(t,c,r)}n(tt,"OrdinaryHasMetadata");function q(t,e,r){var i=G(e,r,!1);return d(i)?!1:ut(i.OrdinaryHasOwnMetadata(t,e,r))}n(q,"OrdinaryHasOwnMetadata");function et(t,e,r){var i=q(t,e,r);if(i)return rt(t,e,r);var c=L(e);if(!V(c))return et(t,c,r)}n(et,"OrdinaryGetMetadata");function rt(t,e,r){var i=G(e,r,!1);if(!d(i))return i.OrdinaryGetOwnMetadata(t,e,r)}n(rt,"OrdinaryGetOwnMetadata");function nt(t,e,r,i){var c=G(r,i,!0);c.OrdinaryDefineOwnMetadata(t,e,r,i)}n(nt,"OrdinaryDefineOwnMetadata");function it(t,e){var r=at(t,e),i=L(t);if(i===null)return r;var c=it(i,e);if(c.length<=0)return r;if(r.length<=0)return c;for(var _=new H,O=[],y=0,a=r;y<a.length;y++){var o=a[y],u=_.has(o);u||(_.add(o),O.push(o))}for(var s=0,v=c;s<v.length;s++){var o=v[s],u=_.has(o);u||(_.add(o),O.push(o))}return O}n(it,"OrdinaryMetadataKeys");function at(t,e){var r=G(t,e,!1);return r?r.OrdinaryOwnMetadataKeys(t,e):[]}n(at,"OrdinaryOwnMetadataKeys");function ot(t){if(t===null)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return t===null?1:6;default:return 6}}n(ot,"Type");function d(t){return t===void 0}n(d,"IsUndefined");function V(t){return t===null}n(V,"IsNull");function Ut(t){return typeof t=="symbol"}n(Ut,"IsSymbol");function g(t){return typeof t=="object"?t!==null:typeof t=="function"}n(g,"IsObject");function Wt(t,e){switch(ot(t)){case 0:return t;case 1:return t;case 2:return t;case 3:return t;case 4:return t;case 5:return t}var r=e===3?"string":e===5?"number":"default",i=ct(t,M);if(i!==void 0){var c=i.call(t,r);if(g(c))throw new TypeError;return c}return zt(t,r==="default"?"number":r)}n(Wt,"ToPrimitive");function zt(t,e){if(e==="string"){var r=t.toString;if(D(r)){var i=r.call(t);if(!g(i))return i}var c=t.valueOf;if(D(c)){var i=c.call(t);if(!g(i))return i}}else{var c=t.valueOf;if(D(c)){var i=c.call(t);if(!g(i))return i}var _=t.toString;if(D(_)){var i=_.call(t);if(!g(i))return i}}throw new TypeError}n(zt,"OrdinaryToPrimitive");function ut(t){return!!t}n(ut,"ToBoolean");function Ht(t){return""+t}n(Ht,"ToString");function E(t){var e=Wt(t,3);return Ut(e)?e:Ht(e)}n(E,"ToPropertyKey");function ft(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:Object.prototype.toString.call(t)==="[object Array]"}n(ft,"IsArray");function D(t){return typeof t=="function"}n(D,"IsCallable");function st(t){return typeof t=="function"}n(st,"IsConstructor");function $t(t){switch(ot(t)){case 3:return!0;case 4:return!0;default:return!1}}n($t,"IsPropertyKey");function J(t,e){return t===e||t!==t&&e!==e}n(J,"SameValueZero");function ct(t,e){var r=t[e];if(r!=null){if(!D(r))throw new TypeError;return r}}n(ct,"GetMethod");function lt(t){var e=ct(t,x);if(!D(e))throw new TypeError;var r=e.call(t);if(!g(r))throw new TypeError;return r}n(lt,"GetIterator");function dt(t){return t.value}n(dt,"IteratorValue");function ht(t){var e=t.next();return e.done?!1:e}n(ht,"IteratorStep");function yt(t){var e=t.return;e&&e.call(t)}n(yt,"IteratorClose");function L(t){var e=Object.getPrototypeOf(t);if(typeof t!="function"||t===I||e!==I)return e;var r=t.prototype,i=r&&Object.getPrototypeOf(r);if(i==null||i===Object.prototype)return e;var c=i.constructor;return typeof c!="function"||c===t?e:c}n(L,"OrdinaryGetPrototypeOf");function qt(){var t;!d(j)&&typeof h.Reflect<"u"&&!(j in h.Reflect)&&typeof h.Reflect.defineMetadata=="function"&&(t=Zt(h.Reflect));var e,r,i,c=new $,_={registerProvider:O,getProvider:a,setProvider:u};return _;function O(s){if(!Object.isExtensible(_))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===s:break;case d(e):e=s;break;case e===s:break;case d(r):r=s;break;case r===s:break;default:i===void 0&&(i=new H),i.add(s);break}}function y(s,v){if(!d(e)){if(e.isProviderFor(s,v))return e;if(!d(r)){if(r.isProviderFor(s,v))return e;if(!d(i))for(var w=lt(i);;){var b=ht(w);if(!b)return;var S=dt(b);if(S.isProviderFor(s,v))return yt(w),S}}}if(!d(t)&&t.isProviderFor(s,v))return t}function a(s,v){var w=c.get(s),b;return d(w)||(b=w.get(v)),d(b)&&(b=y(s,v),d(b)||(d(w)&&(w=new N,c.set(s,w)),w.set(v,b))),b}function o(s){if(d(s))throw new TypeError;return e===s||r===s||!d(i)&&i.has(s)}function u(s,v,w){if(!o(w))throw new Error("Metadata provider not registered.");var b=a(s,v);if(b!==w){if(!d(b))return!1;var S=c.get(s);d(S)&&(S=new N,c.set(s,S)),S.set(v,w)}return!0}}n(qt,"CreateMetadataRegistry");function Jt(){var t;return!d(j)&&g(h.Reflect)&&Object.isExtensible(h.Reflect)&&(t=h.Reflect[j]),d(t)&&(t=qt()),!d(j)&&g(h.Reflect)&&Object.isExtensible(h.Reflect)&&Object.defineProperty(h.Reflect,j,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}n(Jt,"GetOrCreateMetadataRegistry");function Lt(t){var e=new $,r={isProviderFor:n(function(o,u){var s=e.get(o);return d(s)?!1:s.has(u)},"isProviderFor"),OrdinaryDefineOwnMetadata:O,OrdinaryHasOwnMetadata:c,OrdinaryGetOwnMetadata:_,OrdinaryOwnMetadataKeys:y,OrdinaryDeleteMetadata:a};return A.registerProvider(r),r;function i(o,u,s){var v=e.get(o),w=!1;if(d(v)){if(!s)return;v=new N,e.set(o,v),w=!0}var b=v.get(u);if(d(b)){if(!s)return;if(b=new N,v.set(u,b),!t.setProvider(o,u,r))throw v.delete(u),w&&e.delete(o),new Error("Wrong provider for target.")}return b}n(i,"GetOrCreateMetadataMap");function c(o,u,s){var v=i(u,s,!1);return d(v)?!1:ut(v.has(o))}n(c,"OrdinaryHasOwnMetadata");function _(o,u,s){var v=i(u,s,!1);if(!d(v))return v.get(o)}n(_,"OrdinaryGetOwnMetadata");function O(o,u,s,v){var w=i(s,v,!0);w.set(o,u)}n(O,"OrdinaryDefineOwnMetadata");function y(o,u){var s=[],v=i(o,u,!1);if(d(v))return s;for(var w=v.keys(),b=lt(w),S=0;;){var pt=ht(b);if(!pt)return s.length=S,s;var Kt=dt(pt);try{s[S]=Kt}catch(te){try{yt(b)}finally{throw te}}S++}}n(y,"OrdinaryOwnMetadataKeys");function a(o,u,s){var v=i(u,s,!1);if(d(v)||!v.delete(o))return!1;if(v.size===0){var w=e.get(u);d(w)||(w.delete(s),w.size===0&&e.delete(w))}return!0}n(a,"OrdinaryDeleteMetadata")}n(Lt,"CreateMetadataProvider");function Zt(t){var e=t.defineMetadata,r=t.hasOwnMetadata,i=t.getOwnMetadata,c=t.getOwnMetadataKeys,_=t.deleteMetadata,O=new $,y={isProviderFor:n(function(a,o){var u=O.get(a);return!d(u)&&u.has(o)?!0:c(a,o).length?(d(u)&&(u=new H,O.set(a,u)),u.add(o),!0):!1},"isProviderFor"),OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:i,OrdinaryOwnMetadataKeys:c,OrdinaryDeleteMetadata:_};return y}n(Zt,"CreateFallbackProvider");function G(t,e,r){var i=A.getProvider(t,e);if(!d(i))return i;if(r){if(A.setProvider(t,e,K))return K;throw new Error("Illegal state.")}}n(G,"GetMetadataProvider");function Qt(){var t={},e=[],r=function(){function y(a,o,u){this._index=0,this._keys=a,this._values=o,this._selector=u}return n(y,"MapIterator"),y.prototype["@@iterator"]=function(){return this},y.prototype[x]=function(){return this},y.prototype.next=function(){var a=this._index;if(a>=0&&a<this._keys.length){var o=this._selector(this._keys[a],this._values[a]);return a+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:o,done:!1}}return{value:void 0,done:!0}},y.prototype.throw=function(a){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),a},y.prototype.return=function(a){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:a,done:!0}},y}(),i=function(){function y(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return n(y,"Map"),Object.defineProperty(y.prototype,"size",{get:n(function(){return this._keys.length},"get"),enumerable:!0,configurable:!0}),y.prototype.has=function(a){return this._find(a,!1)>=0},y.prototype.get=function(a){var o=this._find(a,!1);return o>=0?this._values[o]:void 0},y.prototype.set=function(a,o){var u=this._find(a,!0);return this._values[u]=o,this},y.prototype.delete=function(a){var o=this._find(a,!1);if(o>=0){for(var u=this._keys.length,s=o+1;s<u;s++)this._keys[s-1]=this._keys[s],this._values[s-1]=this._values[s];return this._keys.length--,this._values.length--,J(a,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},y.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},y.prototype.keys=function(){return new r(this._keys,this._values,c)},y.prototype.values=function(){return new r(this._keys,this._values,_)},y.prototype.entries=function(){return new r(this._keys,this._values,O)},y.prototype["@@iterator"]=function(){return this.entries()},y.prototype[x]=function(){return this.entries()},y.prototype._find=function(a,o){if(!J(this._cacheKey,a)){this._cacheIndex=-1;for(var u=0;u<this._keys.length;u++)if(J(this._keys[u],a)){this._cacheIndex=u;break}}return this._cacheIndex<0&&o&&(this._cacheIndex=this._keys.length,this._keys.push(a),this._values.push(void 0)),this._cacheIndex},y}();return i;function c(y,a){return y}function _(y,a){return a}function O(y,a){return[y,a]}}n(Qt,"CreateMapPolyfill");function Xt(){var t=function(){function e(){this._map=new N}return n(e,"Set"),Object.defineProperty(e.prototype,"size",{get:n(function(){return this._map.size},"get"),enumerable:!0,configurable:!0}),e.prototype.has=function(r){return this._map.has(r)},e.prototype.add=function(r){return this._map.set(r,r),this},e.prototype.delete=function(r){return this._map.delete(r)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[x]=function(){return this.keys()},e}();return t}n(Xt,"CreateSetPolyfill");function Yt(){var t=16,e=k.create(),r=i();return function(){function a(){this._key=i()}return n(a,"WeakMap"),a.prototype.has=function(o){var u=c(o,!1);return u!==void 0?k.has(u,this._key):!1},a.prototype.get=function(o){var u=c(o,!1);return u!==void 0?k.get(u,this._key):void 0},a.prototype.set=function(o,u){var s=c(o,!0);return s[this._key]=u,this},a.prototype.delete=function(o){var u=c(o,!1);return u!==void 0?delete u[this._key]:!1},a.prototype.clear=function(){this._key=i()},a}();function i(){var a;do a="@@WeakMap@@"+y();while(k.has(e,a));return e[a]=!0,a}function c(a,o){if(!m.call(a,r)){if(!o)return;Object.defineProperty(a,r,{value:k.create()})}return a[r]}function _(a,o){for(var u=0;u<o;++u)a[u]=Math.random()*255|0;return a}function O(a){if(typeof Uint8Array=="function"){var o=new Uint8Array(a);return typeof crypto<"u"?crypto.getRandomValues(o):typeof msCrypto<"u"?msCrypto.getRandomValues(o):_(o,a),o}return _(new Array(a),a)}function y(){var a=O(t);a[6]=a[6]&79|64,a[8]=a[8]&191|128;for(var o="",u=0;u<t;++u){var s=a[u];(u===4||u===6||u===8)&&(o+="-"),s<16&&(o+="0"),o+=s.toString(16).toLowerCase()}return o}}n(Yt,"CreateWeakMapPolyfill");function Z(t){return t.__=void 0,delete t.__,t}n(Z,"MakeDictionary")})})(kt||(kt={}))});var le=re(xt(),1);function z(f,l,h){try{return h()}catch(m){throw new Error(`Get property "${l}" from Entity "${f}" failed: ${m.message}`)}}n(z,"handleError");function pe(f){return function(l){let h=l.meta||{},m=l.prototype;for(let[p,M]of Object.entries(h))if(M.isRelation&&M.relationName){let x=M.relationName,P=n(function(){return z(this.constructor.entityName,p,()=>M.to(this._data.fields[p]))},"idGetter"),T=n(function(k){this._data.fields[p]=z(this.constructor.entityName,p,()=>M.from(k))},"idSetter"),R=M.isArray?p+"IDs":p+"ID";Reflect.defineProperty(m,R,{get:P,set:T}),Reflect.defineProperty(m,p,{get:n(function(){let k=P.call(this);return Array.isArray(k)?Promise.all(k.map(I=>Y()?.get(x,I))):Y()?.get(x,k)},"get"),set:n(function(k){k instanceof Promise?k.then(I=>{T.call(this,I)}):T.call(this,k)},"set")})}else Reflect.defineProperty(m,p,{configurable:!0,get:n(function(){return z(this.constructor.entityName,p,()=>M.to(this._data.fields[p]))},"get"),set:n(function(x){this._data.fields[p]=z(this.constructor.entityName,p,()=>M.from(x))},"set")});return class extends l{_data={fields:{}};static entityName=f;constructor(...p){super();for(let M of Object.getOwnPropertyNames(this))l.prototype.hasOwnProperty(M)&&delete this[M];p[0]&&Object.assign(this,p[0])}}}}n(pe,"Entity");function ve(f){return function(l,h){let m=!1;f.endsWith("!")&&(m=!0,f=f.slice(0,-1));let p=W[f];if(!p)throw new Error(`Unsupported type ${f}`);m&&(p=B(p)),C(p)(l,h)}}n(ve,"Column");function me(f=""){return function(l,h){let m=!1;f.endsWith("!")&&(m=!0,f=f.slice(0,-1));let p=W[f];if(!p){let x=(l.constructor.meta||{})[h];if(x)p=x;else throw new Error("Can't find inner type convert")}m&&(p=B(p)),C(Q(p))(l,h)}}n(me,"ListColumn");function C(f){return function(l,h){let m=Reflect.getMetadata("design:type",l,h);if(!f){let M=m.name;if(f=W[M],!f)throw new Error(`Unsupported type ${M}`)}let p=l.constructor.meta||{};p[h]=f,l.constructor.meta=p}}n(C,"column");var we=C(Mt),ge=C(mt),_e=C(wt),be=C(F),Me=C(U),Oe=C(vt),ke=C(gt),xe=C(_t),Ce=C(bt);function Se(f,l){let h=f.constructor.meta||{},m=h[l];m&&(h[l]=B(m)),f.constructor.meta=h}n(Se,"Required");function Te(f){return function(l,h){C(X(f))(l,h)}}n(Te,"One");function Ee(f){return function(l,h){C(Q(X(f)))(l,h)}}n(Ee,"Many");import("node:process").then(f=>f.stdout.write(""));var Ct=class{static{n(this,"AbstractEntity")}_data;toJSON(){let l={};for(let[h,m]of Object.entries(this._data.fields))l[h]=St(m);return l}toString(){let l=this.toJSON();return`${Ot(this)} ${JSON.stringify(l)}`}};function St(f){if(f.nullValue)return null;if(f.bytesValue)return f.bytesValue;if(f.stringValue)return f.stringValue;if(f.bigdecimalValue)return F.to(f);if(f.bigintValue)return U.to(f);if(f.boolValue!=null)return f.boolValue;if(f.timestampValue)return f.timestampValue;if(f.floatValue)return f.floatValue;if(f.intValue)return f.intValue;if(f.listValue)return f.listValue.values.map(St);throw new Error("Unknown value type:"+JSON.stringify(f))}n(St,"toJSValue");import("node:process").then(f=>f.stdout.write(""));import{StoreContext as Be}from"@sentio/runtime";import("node:process").then(f=>f.stdout.write(""));var Tt=class{static{n(this,"Cursor")}_cursor;_done=!1;pageSize;constructor(l){this._cursor=l?.initCursor,this.pageSize=l?.pageSize}get cursor(){return this._cursor}set cursor(l){l||(this._done=!0),this._cursor=l}get hasNext(){return!this._done}};import("node:process").then(f=>f.stdout.write(""));import("node:process").then(f=>f.stdout.write(""));export{Ct as AbstractEntity,be as BigDecimalColumn,F as BigDecimalConverter,Me as BigIntColumn,U as BigIntConverter,ke as BooleanColumn,gt as BooleanConverter,Ce as BytesColumn,bt as BytesConverter,ve as Column,Tt as Cursor,pe as Entity,_e as FloatColumn,wt as FloatConverter,we as IDColumn,Mt as IDConverter,ge as IntColumn,mt as IntConverter,me as ListColumn,Ee as Many,Te as One,Se as Required,ue as Store,Be as StoreContext,Oe as StringColumn,vt as StringConverter,xe as TimestampColumn,_t as TimestampConverter,W as TypeConverters,ne as ValueRequiredError,Q as array_,ae as bytesToBigInt,C as column,ie as enumerate_,Ot as getEntityName,Y as getStore,X as objectId_,B as required_,oe as toBigInteger};
2
+ import{Ad as W,Cd as Ot,Dd as ue,Ed as Y,kd as ne,ld as B,md as Q,nd as ie,od as X,pd as vt,qd as mt,rd as wt,sd as gt,td as _t,ud as bt,vd as Mt,wd as F,xd as U,yd as ae,zd as oe}from"../chunk-RASCZBLN.js";import"../chunk-RA75ESSD.js";import{a as n,d as ee,f as re}from"../chunk-G5BIPHMS.js";var xt=ee(()=>{"use strict";var kt;(function(f){(function(l){var h=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:P(),m=p(f);typeof h.Reflect<"u"&&(m=p(h.Reflect,m)),l(m,h),typeof h.Reflect>"u"&&(h.Reflect=f);function p(T,R){return function(k,I){Object.defineProperty(T,k,{configurable:!0,writable:!0,value:I}),R&&R(k,I)}}n(p,"makeExporter");function M(){try{return Function("return this;")()}catch{}}n(M,"functionThis");function x(){try{return(0,eval)("(function() { return this; })()")}catch{}}n(x,"indirectEvalThis");function P(){return M()||x()}n(P,"sloppyModeThis")})(function(l,h){var m=Object.prototype.hasOwnProperty,p=typeof Symbol=="function",M=p&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",x=p&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",P=typeof Object.create=="function",T={__proto__:[]}instanceof Array,R=!P&&!T,k={create:P?function(){return Z(Object.create(null))}:T?function(){return Z({__proto__:null})}:function(){return Z({})},has:R?function(t,e){return m.call(t,e)}:function(t,e){return e in t},get:R?function(t,e){return m.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},I=Object.getPrototypeOf(Function),N=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Qt(),H=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Xt(),$=typeof WeakMap=="function"?WeakMap:Yt(),j=p?Symbol.for("@reflect-metadata:registry"):void 0,A=Jt(),K=Lt(A);function Et(t,e,r,i){if(d(r)){if(!ft(t))throw new TypeError;if(!st(e))throw new TypeError;return Bt(t,e)}else{if(!ft(t))throw new TypeError;if(!g(e))throw new TypeError;if(!g(i)&&!d(i)&&!V(i))throw new TypeError;return V(i)&&(i=void 0),r=E(r),Ft(t,e,r,i)}}n(Et,"decorate"),l("decorate",Et);function It(t,e){function r(i,c){if(!g(i))throw new TypeError;if(!d(c)&&!$t(c))throw new TypeError;nt(t,e,i,c)}return n(r,"decorator"),r}n(It,"metadata"),l("metadata",It);function Pt(t,e,r,i){if(!g(r))throw new TypeError;return d(i)||(i=E(i)),nt(t,e,r,i)}n(Pt,"defineMetadata"),l("defineMetadata",Pt);function Rt(t,e,r){if(!g(e))throw new TypeError;return d(r)||(r=E(r)),tt(t,e,r)}n(Rt,"hasMetadata"),l("hasMetadata",Rt);function jt(t,e,r){if(!g(e))throw new TypeError;return d(r)||(r=E(r)),q(t,e,r)}n(jt,"hasOwnMetadata"),l("hasOwnMetadata",jt);function Vt(t,e,r){if(!g(e))throw new TypeError;return d(r)||(r=E(r)),et(t,e,r)}n(Vt,"getMetadata"),l("getMetadata",Vt);function Dt(t,e,r){if(!g(e))throw new TypeError;return d(r)||(r=E(r)),rt(t,e,r)}n(Dt,"getOwnMetadata"),l("getOwnMetadata",Dt);function Nt(t,e){if(!g(t))throw new TypeError;return d(e)||(e=E(e)),it(t,e)}n(Nt,"getMetadataKeys"),l("getMetadataKeys",Nt);function Gt(t,e){if(!g(t))throw new TypeError;return d(e)||(e=E(e)),at(t,e)}n(Gt,"getOwnMetadataKeys"),l("getOwnMetadataKeys",Gt);function At(t,e,r){if(!g(e))throw new TypeError;if(d(r)||(r=E(r)),!g(e))throw new TypeError;d(r)||(r=E(r));var i=G(e,r,!1);return d(i)?!1:i.OrdinaryDeleteMetadata(t,e,r)}n(At,"deleteMetadata"),l("deleteMetadata",At);function Bt(t,e){for(var r=t.length-1;r>=0;--r){var i=t[r],c=i(e);if(!d(c)&&!V(c)){if(!st(c))throw new TypeError;e=c}}return e}n(Bt,"DecorateConstructor");function Ft(t,e,r,i){for(var c=t.length-1;c>=0;--c){var _=t[c],O=_(e,r,i);if(!d(O)&&!V(O)){if(!g(O))throw new TypeError;i=O}}return i}n(Ft,"DecorateProperty");function tt(t,e,r){var i=q(t,e,r);if(i)return!0;var c=L(e);return V(c)?!1:tt(t,c,r)}n(tt,"OrdinaryHasMetadata");function q(t,e,r){var i=G(e,r,!1);return d(i)?!1:ut(i.OrdinaryHasOwnMetadata(t,e,r))}n(q,"OrdinaryHasOwnMetadata");function et(t,e,r){var i=q(t,e,r);if(i)return rt(t,e,r);var c=L(e);if(!V(c))return et(t,c,r)}n(et,"OrdinaryGetMetadata");function rt(t,e,r){var i=G(e,r,!1);if(!d(i))return i.OrdinaryGetOwnMetadata(t,e,r)}n(rt,"OrdinaryGetOwnMetadata");function nt(t,e,r,i){var c=G(r,i,!0);c.OrdinaryDefineOwnMetadata(t,e,r,i)}n(nt,"OrdinaryDefineOwnMetadata");function it(t,e){var r=at(t,e),i=L(t);if(i===null)return r;var c=it(i,e);if(c.length<=0)return r;if(r.length<=0)return c;for(var _=new H,O=[],y=0,a=r;y<a.length;y++){var o=a[y],u=_.has(o);u||(_.add(o),O.push(o))}for(var s=0,v=c;s<v.length;s++){var o=v[s],u=_.has(o);u||(_.add(o),O.push(o))}return O}n(it,"OrdinaryMetadataKeys");function at(t,e){var r=G(t,e,!1);return r?r.OrdinaryOwnMetadataKeys(t,e):[]}n(at,"OrdinaryOwnMetadataKeys");function ot(t){if(t===null)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return t===null?1:6;default:return 6}}n(ot,"Type");function d(t){return t===void 0}n(d,"IsUndefined");function V(t){return t===null}n(V,"IsNull");function Ut(t){return typeof t=="symbol"}n(Ut,"IsSymbol");function g(t){return typeof t=="object"?t!==null:typeof t=="function"}n(g,"IsObject");function Wt(t,e){switch(ot(t)){case 0:return t;case 1:return t;case 2:return t;case 3:return t;case 4:return t;case 5:return t}var r=e===3?"string":e===5?"number":"default",i=ct(t,M);if(i!==void 0){var c=i.call(t,r);if(g(c))throw new TypeError;return c}return zt(t,r==="default"?"number":r)}n(Wt,"ToPrimitive");function zt(t,e){if(e==="string"){var r=t.toString;if(D(r)){var i=r.call(t);if(!g(i))return i}var c=t.valueOf;if(D(c)){var i=c.call(t);if(!g(i))return i}}else{var c=t.valueOf;if(D(c)){var i=c.call(t);if(!g(i))return i}var _=t.toString;if(D(_)){var i=_.call(t);if(!g(i))return i}}throw new TypeError}n(zt,"OrdinaryToPrimitive");function ut(t){return!!t}n(ut,"ToBoolean");function Ht(t){return""+t}n(Ht,"ToString");function E(t){var e=Wt(t,3);return Ut(e)?e:Ht(e)}n(E,"ToPropertyKey");function ft(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:Object.prototype.toString.call(t)==="[object Array]"}n(ft,"IsArray");function D(t){return typeof t=="function"}n(D,"IsCallable");function st(t){return typeof t=="function"}n(st,"IsConstructor");function $t(t){switch(ot(t)){case 3:return!0;case 4:return!0;default:return!1}}n($t,"IsPropertyKey");function J(t,e){return t===e||t!==t&&e!==e}n(J,"SameValueZero");function ct(t,e){var r=t[e];if(r!=null){if(!D(r))throw new TypeError;return r}}n(ct,"GetMethod");function lt(t){var e=ct(t,x);if(!D(e))throw new TypeError;var r=e.call(t);if(!g(r))throw new TypeError;return r}n(lt,"GetIterator");function dt(t){return t.value}n(dt,"IteratorValue");function ht(t){var e=t.next();return e.done?!1:e}n(ht,"IteratorStep");function yt(t){var e=t.return;e&&e.call(t)}n(yt,"IteratorClose");function L(t){var e=Object.getPrototypeOf(t);if(typeof t!="function"||t===I||e!==I)return e;var r=t.prototype,i=r&&Object.getPrototypeOf(r);if(i==null||i===Object.prototype)return e;var c=i.constructor;return typeof c!="function"||c===t?e:c}n(L,"OrdinaryGetPrototypeOf");function qt(){var t;!d(j)&&typeof h.Reflect<"u"&&!(j in h.Reflect)&&typeof h.Reflect.defineMetadata=="function"&&(t=Zt(h.Reflect));var e,r,i,c=new $,_={registerProvider:O,getProvider:a,setProvider:u};return _;function O(s){if(!Object.isExtensible(_))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===s:break;case d(e):e=s;break;case e===s:break;case d(r):r=s;break;case r===s:break;default:i===void 0&&(i=new H),i.add(s);break}}function y(s,v){if(!d(e)){if(e.isProviderFor(s,v))return e;if(!d(r)){if(r.isProviderFor(s,v))return e;if(!d(i))for(var w=lt(i);;){var b=ht(w);if(!b)return;var S=dt(b);if(S.isProviderFor(s,v))return yt(w),S}}}if(!d(t)&&t.isProviderFor(s,v))return t}function a(s,v){var w=c.get(s),b;return d(w)||(b=w.get(v)),d(b)&&(b=y(s,v),d(b)||(d(w)&&(w=new N,c.set(s,w)),w.set(v,b))),b}function o(s){if(d(s))throw new TypeError;return e===s||r===s||!d(i)&&i.has(s)}function u(s,v,w){if(!o(w))throw new Error("Metadata provider not registered.");var b=a(s,v);if(b!==w){if(!d(b))return!1;var S=c.get(s);d(S)&&(S=new N,c.set(s,S)),S.set(v,w)}return!0}}n(qt,"CreateMetadataRegistry");function Jt(){var t;return!d(j)&&g(h.Reflect)&&Object.isExtensible(h.Reflect)&&(t=h.Reflect[j]),d(t)&&(t=qt()),!d(j)&&g(h.Reflect)&&Object.isExtensible(h.Reflect)&&Object.defineProperty(h.Reflect,j,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}n(Jt,"GetOrCreateMetadataRegistry");function Lt(t){var e=new $,r={isProviderFor:n(function(o,u){var s=e.get(o);return d(s)?!1:s.has(u)},"isProviderFor"),OrdinaryDefineOwnMetadata:O,OrdinaryHasOwnMetadata:c,OrdinaryGetOwnMetadata:_,OrdinaryOwnMetadataKeys:y,OrdinaryDeleteMetadata:a};return A.registerProvider(r),r;function i(o,u,s){var v=e.get(o),w=!1;if(d(v)){if(!s)return;v=new N,e.set(o,v),w=!0}var b=v.get(u);if(d(b)){if(!s)return;if(b=new N,v.set(u,b),!t.setProvider(o,u,r))throw v.delete(u),w&&e.delete(o),new Error("Wrong provider for target.")}return b}n(i,"GetOrCreateMetadataMap");function c(o,u,s){var v=i(u,s,!1);return d(v)?!1:ut(v.has(o))}n(c,"OrdinaryHasOwnMetadata");function _(o,u,s){var v=i(u,s,!1);if(!d(v))return v.get(o)}n(_,"OrdinaryGetOwnMetadata");function O(o,u,s,v){var w=i(s,v,!0);w.set(o,u)}n(O,"OrdinaryDefineOwnMetadata");function y(o,u){var s=[],v=i(o,u,!1);if(d(v))return s;for(var w=v.keys(),b=lt(w),S=0;;){var pt=ht(b);if(!pt)return s.length=S,s;var Kt=dt(pt);try{s[S]=Kt}catch(te){try{yt(b)}finally{throw te}}S++}}n(y,"OrdinaryOwnMetadataKeys");function a(o,u,s){var v=i(u,s,!1);if(d(v)||!v.delete(o))return!1;if(v.size===0){var w=e.get(u);d(w)||(w.delete(s),w.size===0&&e.delete(w))}return!0}n(a,"OrdinaryDeleteMetadata")}n(Lt,"CreateMetadataProvider");function Zt(t){var e=t.defineMetadata,r=t.hasOwnMetadata,i=t.getOwnMetadata,c=t.getOwnMetadataKeys,_=t.deleteMetadata,O=new $,y={isProviderFor:n(function(a,o){var u=O.get(a);return!d(u)&&u.has(o)?!0:c(a,o).length?(d(u)&&(u=new H,O.set(a,u)),u.add(o),!0):!1},"isProviderFor"),OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:i,OrdinaryOwnMetadataKeys:c,OrdinaryDeleteMetadata:_};return y}n(Zt,"CreateFallbackProvider");function G(t,e,r){var i=A.getProvider(t,e);if(!d(i))return i;if(r){if(A.setProvider(t,e,K))return K;throw new Error("Illegal state.")}}n(G,"GetMetadataProvider");function Qt(){var t={},e=[],r=function(){function y(a,o,u){this._index=0,this._keys=a,this._values=o,this._selector=u}return n(y,"MapIterator"),y.prototype["@@iterator"]=function(){return this},y.prototype[x]=function(){return this},y.prototype.next=function(){var a=this._index;if(a>=0&&a<this._keys.length){var o=this._selector(this._keys[a],this._values[a]);return a+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:o,done:!1}}return{value:void 0,done:!0}},y.prototype.throw=function(a){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),a},y.prototype.return=function(a){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:a,done:!0}},y}(),i=function(){function y(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return n(y,"Map"),Object.defineProperty(y.prototype,"size",{get:n(function(){return this._keys.length},"get"),enumerable:!0,configurable:!0}),y.prototype.has=function(a){return this._find(a,!1)>=0},y.prototype.get=function(a){var o=this._find(a,!1);return o>=0?this._values[o]:void 0},y.prototype.set=function(a,o){var u=this._find(a,!0);return this._values[u]=o,this},y.prototype.delete=function(a){var o=this._find(a,!1);if(o>=0){for(var u=this._keys.length,s=o+1;s<u;s++)this._keys[s-1]=this._keys[s],this._values[s-1]=this._values[s];return this._keys.length--,this._values.length--,J(a,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},y.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},y.prototype.keys=function(){return new r(this._keys,this._values,c)},y.prototype.values=function(){return new r(this._keys,this._values,_)},y.prototype.entries=function(){return new r(this._keys,this._values,O)},y.prototype["@@iterator"]=function(){return this.entries()},y.prototype[x]=function(){return this.entries()},y.prototype._find=function(a,o){if(!J(this._cacheKey,a)){this._cacheIndex=-1;for(var u=0;u<this._keys.length;u++)if(J(this._keys[u],a)){this._cacheIndex=u;break}}return this._cacheIndex<0&&o&&(this._cacheIndex=this._keys.length,this._keys.push(a),this._values.push(void 0)),this._cacheIndex},y}();return i;function c(y,a){return y}function _(y,a){return a}function O(y,a){return[y,a]}}n(Qt,"CreateMapPolyfill");function Xt(){var t=function(){function e(){this._map=new N}return n(e,"Set"),Object.defineProperty(e.prototype,"size",{get:n(function(){return this._map.size},"get"),enumerable:!0,configurable:!0}),e.prototype.has=function(r){return this._map.has(r)},e.prototype.add=function(r){return this._map.set(r,r),this},e.prototype.delete=function(r){return this._map.delete(r)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[x]=function(){return this.keys()},e}();return t}n(Xt,"CreateSetPolyfill");function Yt(){var t=16,e=k.create(),r=i();return function(){function a(){this._key=i()}return n(a,"WeakMap"),a.prototype.has=function(o){var u=c(o,!1);return u!==void 0?k.has(u,this._key):!1},a.prototype.get=function(o){var u=c(o,!1);return u!==void 0?k.get(u,this._key):void 0},a.prototype.set=function(o,u){var s=c(o,!0);return s[this._key]=u,this},a.prototype.delete=function(o){var u=c(o,!1);return u!==void 0?delete u[this._key]:!1},a.prototype.clear=function(){this._key=i()},a}();function i(){var a;do a="@@WeakMap@@"+y();while(k.has(e,a));return e[a]=!0,a}function c(a,o){if(!m.call(a,r)){if(!o)return;Object.defineProperty(a,r,{value:k.create()})}return a[r]}function _(a,o){for(var u=0;u<o;++u)a[u]=Math.random()*255|0;return a}function O(a){if(typeof Uint8Array=="function"){var o=new Uint8Array(a);return typeof crypto<"u"?crypto.getRandomValues(o):typeof msCrypto<"u"?msCrypto.getRandomValues(o):_(o,a),o}return _(new Array(a),a)}function y(){var a=O(t);a[6]=a[6]&79|64,a[8]=a[8]&191|128;for(var o="",u=0;u<t;++u){var s=a[u];(u===4||u===6||u===8)&&(o+="-"),s<16&&(o+="0"),o+=s.toString(16).toLowerCase()}return o}}n(Yt,"CreateWeakMapPolyfill");function Z(t){return t.__=void 0,delete t.__,t}n(Z,"MakeDictionary")})})(kt||(kt={}))});var le=re(xt(),1);function z(f,l,h){try{return h()}catch(m){throw new Error(`Get property "${l}" from Entity "${f}" failed: ${m.message}`)}}n(z,"handleError");function pe(f){return function(l){let h=l.meta||{},m=l.prototype;for(let[p,M]of Object.entries(h))if(M.isRelation&&M.relationName){let x=M.relationName,P=n(function(){return z(this.constructor.entityName,p,()=>M.to(this._data.fields[p]))},"idGetter"),T=n(function(k){this._data.fields[p]=z(this.constructor.entityName,p,()=>M.from(k))},"idSetter"),R=M.isArray?p+"IDs":p+"ID";Reflect.defineProperty(m,R,{get:P,set:T}),Reflect.defineProperty(m,p,{get:n(function(){let k=P.call(this);return Array.isArray(k)?Promise.all(k.map(I=>Y()?.get(x,I))):Y()?.get(x,k)},"get"),set:n(function(k){k instanceof Promise?k.then(I=>{T.call(this,I)}):T.call(this,k)},"set")})}else Reflect.defineProperty(m,p,{configurable:!0,get:n(function(){return z(this.constructor.entityName,p,()=>M.to(this._data.fields[p]))},"get"),set:n(function(x){this._data.fields[p]=z(this.constructor.entityName,p,()=>M.from(x))},"set")});return class extends l{_data={fields:{}};static entityName=f;constructor(...p){super();for(let M of Object.getOwnPropertyNames(this))l.prototype.hasOwnProperty(M)&&delete this[M];p[0]&&Object.assign(this,p[0])}}}}n(pe,"Entity");function ve(f){return function(l,h){let m=!1;f.endsWith("!")&&(m=!0,f=f.slice(0,-1));let p=W[f];if(!p)throw new Error(`Unsupported type ${f}`);m&&(p=B(p)),C(p)(l,h)}}n(ve,"Column");function me(f=""){return function(l,h){let m=!1;f.endsWith("!")&&(m=!0,f=f.slice(0,-1));let p=W[f];if(!p){let x=(l.constructor.meta||{})[h];if(x)p=x;else throw new Error("Can't find inner type convert")}m&&(p=B(p)),C(Q(p))(l,h)}}n(me,"ListColumn");function C(f){return function(l,h){let m=Reflect.getMetadata("design:type",l,h);if(!f){let M=m.name;if(f=W[M],!f)throw new Error(`Unsupported type ${M}`)}let p=l.constructor.meta||{};p[h]=f,l.constructor.meta=p}}n(C,"column");var we=C(Mt),ge=C(mt),_e=C(wt),be=C(F),Me=C(U),Oe=C(vt),ke=C(gt),xe=C(_t),Ce=C(bt);function Se(f,l){let h=f.constructor.meta||{},m=h[l];m&&(h[l]=B(m)),f.constructor.meta=h}n(Se,"Required");function Te(f){return function(l,h){C(X(f))(l,h)}}n(Te,"One");function Ee(f){return function(l,h){C(Q(X(f)))(l,h)}}n(Ee,"Many");import("node:process").then(f=>f.stdout.write(""));var Ct=class{static{n(this,"AbstractEntity")}_data;toJSON(){let l={};for(let[h,m]of Object.entries(this._data.fields))l[h]=St(m);return l}toString(){let l=this.toJSON();return`${Ot(this)} ${JSON.stringify(l)}`}};function St(f){if(f.nullValue)return null;if(f.bytesValue)return f.bytesValue;if(f.stringValue)return f.stringValue;if(f.bigdecimalValue)return F.to(f);if(f.bigintValue)return U.to(f);if(f.boolValue!=null)return f.boolValue;if(f.timestampValue)return f.timestampValue;if(f.floatValue)return f.floatValue;if(f.intValue)return f.intValue;if(f.listValue)return f.listValue.values.map(St);throw new Error("Unknown value type:"+JSON.stringify(f))}n(St,"toJSValue");import("node:process").then(f=>f.stdout.write(""));import{StoreContext as Be}from"@sentio/runtime";import("node:process").then(f=>f.stdout.write(""));var Tt=class{static{n(this,"Cursor")}_cursor;_done=!1;pageSize;constructor(l){this._cursor=l?.initCursor,this.pageSize=l?.pageSize}get cursor(){return this._cursor}set cursor(l){l||(this._done=!0),this._cursor=l}get hasNext(){return!this._done}};import("node:process").then(f=>f.stdout.write(""));import("node:process").then(f=>f.stdout.write(""));export{Ct as AbstractEntity,be as BigDecimalColumn,F as BigDecimalConverter,Me as BigIntColumn,U as BigIntConverter,ke as BooleanColumn,gt as BooleanConverter,Ce as BytesColumn,bt as BytesConverter,ve as Column,Tt as Cursor,pe as Entity,_e as FloatColumn,wt as FloatConverter,we as IDColumn,Mt as IDConverter,ge as IntColumn,mt as IntConverter,me as ListColumn,Ee as Many,Te as One,Se as Required,ue as Store,Be as StoreContext,Oe as StringColumn,vt as StringConverter,xe as TimestampColumn,_t as TimestampConverter,W as TypeConverters,ne as ValueRequiredError,Q as array_,ae as bytesToBigInt,C as column,ie as enumerate_,Ot as getEntityName,Y as getStore,X as objectId_,B as required_,oe as toBigInteger};
3
3
  /*! Bundled license information:
4
4
 
5
5
  reflect-metadata/Reflect.js:
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-F4DYPLSS.js";import"../../chunk-DDBMJIG4.js";import"../../chunk-OMPBG6IS.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-LI5W4TO6.js";import"../../chunk-MPJRHMKL.js";import"../../chunk-JS3OLQ4N.js";import"../../chunk-2E4NSWHZ.js";import"../../chunk-LQ2JMF5Z.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-KMBS637G.js";import"../../chunk-TUAGKH5K.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{a as address,b as ascii,c as bcs,d as bit_vector,e as debug,f as fixed_point32,g as hash,s as loadAllTypes,h as option,i as string$,j as type_name,k as u128,l as u16,m as u256,n as u32,o as u64,p as u8,q as uq32_32,r as vector};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-5UED3IMZ.js";import"../../chunk-2ZLOG6M7.js";import"../../chunk-OYU3JOOI.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-L2RYMS7L.js";import"../../chunk-WSLRWDNP.js";import"../../chunk-4M475LJH.js";import"../../chunk-GUTGNATB.js";import"../../chunk-TB5YQH36.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-KMBS637G.js";import"../../chunk-RASCZBLN.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{a as address,b as ascii,c as bcs,d as bit_vector,e as debug,f as fixed_point32,g as hash,s as loadAllTypes,h as option,i as string$,j as type_name,k as u128,l as u16,m as u256,n as u32,o as u64,p as u8,q as uq32_32,r as vector};
3
3
  //# sourceMappingURL=0x1.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../../chunk-QCBIDGO3.js";import"../../chunk-F4DYPLSS.js";import"../../chunk-DDBMJIG4.js";import"../../chunk-OMPBG6IS.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-LI5W4TO6.js";import"../../chunk-MPJRHMKL.js";import"../../chunk-JS3OLQ4N.js";import"../../chunk-2E4NSWHZ.js";import"../../chunk-LQ2JMF5Z.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-KMBS637G.js";import"../../chunk-TUAGKH5K.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{a as address,b as authenticator_state,c as bag,d as balance,e as bcs,f as bls12381,g as borrow,h as clock,i as coin,j as config,k as deny_list,l as display,m as dynamic_field,n as dynamic_object_field,o as ecdsa_k1,p as ecdsa_r1,q as ecvrf,r as ed25519,s as event,t as groth16,u as group_ops,v as hash,w as hex,x as hmac,y as kiosk,z as kiosk_extension,A as linked_table,Z as loadAllTypes,B as math,C as object$,D as object_bag,E as object_table,F as package$,G as pay,H as poseidon,I as priority_queue,J as random,K as sui,L as table,M as table_vec,N as token,O as transfer,P as transfer_policy,Q as tx_context,R as types,S as url,T as vdf,U as vec_map,V as vec_set,W as versioned,X as zklogin_verified_id,Y as zklogin_verified_issuer};
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../../chunk-NSAUV6AB.js";import"../../chunk-5UED3IMZ.js";import"../../chunk-2ZLOG6M7.js";import"../../chunk-OYU3JOOI.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-L2RYMS7L.js";import"../../chunk-WSLRWDNP.js";import"../../chunk-4M475LJH.js";import"../../chunk-GUTGNATB.js";import"../../chunk-TB5YQH36.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-KMBS637G.js";import"../../chunk-RASCZBLN.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{a as address,b as authenticator_state,c as bag,d as balance,e as bcs,f as bls12381,g as borrow,h as clock,i as coin,j as config,k as deny_list,l as display,m as dynamic_field,n as dynamic_object_field,o as ecdsa_k1,p as ecdsa_r1,q as ecvrf,r as ed25519,s as event,t as groth16,u as group_ops,v as hash,w as hex,x as hmac,y as kiosk,z as kiosk_extension,A as linked_table,Z as loadAllTypes,B as math,C as object$,D as object_bag,E as object_table,F as package$,G as pay,H as poseidon,I as priority_queue,J as random,K as sui,L as table,M as table_vec,N as token,O as transfer,P as transfer_policy,Q as tx_context,R as types,S as url,T as vdf,U as vec_map,V as vec_set,W as versioned,X as zklogin_verified_id,Y as zklogin_verified_issuer};
3
3
  //# sourceMappingURL=0x2.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../chunk-RQRC6JFO.js";import"../../chunk-QCBIDGO3.js";import"../../chunk-F4DYPLSS.js";import"../../chunk-DDBMJIG4.js";import"../../chunk-OMPBG6IS.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-LI5W4TO6.js";import"../../chunk-MPJRHMKL.js";import"../../chunk-JS3OLQ4N.js";import"../../chunk-2E4NSWHZ.js";import"../../chunk-LQ2JMF5Z.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-KMBS637G.js";import"../../chunk-TUAGKH5K.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{a as genesis,l as loadAllTypes,b as stake_subsidy,c as staking_pool,d as storage_fund,e as sui_system,f as sui_system_state_inner,g as validator,h as validator_cap,i as validator_set,j as validator_wrapper,k as voting_power};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../chunk-6JQFPDV5.js";import"../../chunk-NSAUV6AB.js";import"../../chunk-5UED3IMZ.js";import"../../chunk-2ZLOG6M7.js";import"../../chunk-OYU3JOOI.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-L2RYMS7L.js";import"../../chunk-WSLRWDNP.js";import"../../chunk-4M475LJH.js";import"../../chunk-GUTGNATB.js";import"../../chunk-TB5YQH36.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-KMBS637G.js";import"../../chunk-RASCZBLN.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{a as genesis,l as loadAllTypes,b as stake_subsidy,c as staking_pool,d as storage_fund,e as sui_system,f as sui_system_state_inner,g as validator,h as validator_cap,i as validator_set,j as validator_wrapper,k as voting_power};
3
3
  //# sourceMappingURL=0x3.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{m as x}from"../../chunk-RQRC6JFO.js";import{_ as t}from"../../chunk-QCBIDGO3.js";import{t as r}from"../../chunk-F4DYPLSS.js";import"../../chunk-DDBMJIG4.js";import"../../chunk-OMPBG6IS.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-LI5W4TO6.js";import"../../chunk-MPJRHMKL.js";import"../../chunk-JS3OLQ4N.js";import"../../chunk-2E4NSWHZ.js";import"../../chunk-LQ2JMF5Z.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-KMBS637G.js";import"../../chunk-TUAGKH5K.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";import("node:process").then(o=>o.stdout.write(""));export{r as _0x1,t as _0x2,x as _0x3};
2
+ import{m as x}from"../../chunk-6JQFPDV5.js";import{_ as t}from"../../chunk-NSAUV6AB.js";import{t as r}from"../../chunk-5UED3IMZ.js";import"../../chunk-2ZLOG6M7.js";import"../../chunk-OYU3JOOI.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-L2RYMS7L.js";import"../../chunk-WSLRWDNP.js";import"../../chunk-4M475LJH.js";import"../../chunk-GUTGNATB.js";import"../../chunk-TB5YQH36.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-KMBS637G.js";import"../../chunk-RASCZBLN.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";import("node:process").then(o=>o.stdout.write(""));export{r as _0x1,t as _0x2,x as _0x3};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a as m,b as p}from"../../chunk-LVWOFGF2.js";import{i as C,j as s,k as a,l as u,m as S,n as g,o as l}from"../../chunk-OMPBG6IS.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-LI5W4TO6.js";import"../../chunk-MPJRHMKL.js";import"../../chunk-JS3OLQ4N.js";import"../../chunk-2E4NSWHZ.js";import"../../chunk-LQ2JMF5Z.js";import"../../chunk-KMBS637G.js";import"../../chunk-TUAGKH5K.js";import"../../chunk-RA75ESSD.js";import{a as e}from"../../chunk-G5BIPHMS.js";var n=class{static{e(this,"CoinList")}calculateValueInUsd(t,i,r){return l(t,i,r)}async getCoinInfo(t){return u(t)}whiteListed(t){return a(t)}whitelistCoins(){return s()}},d=new n,c=class extends m{static{e(this,"SuiDex")}coinList=d};async function I(o,t,i,r,f){return p(d,o,t,i,r,f)}e(I,"getPairValue");import("node:process").then(o=>o.stdout.write(""));import("node:process").then(o=>o.stdout.write(""));export{n as CoinList,d as SuiCoinList,c as SuiDex,l as calculateValueInUsd,u as getCoinInfo,S as getCoinInfoWithFallback,I as getPairValue,g as getPrice,C as initCoinList,a as whiteListed,s as whitelistCoins};
2
+ import{a as m,b as p}from"../../chunk-LVWOFGF2.js";import{i as C,j as s,k as a,l as u,m as S,n as g,o as l}from"../../chunk-OYU3JOOI.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-L2RYMS7L.js";import"../../chunk-WSLRWDNP.js";import"../../chunk-4M475LJH.js";import"../../chunk-GUTGNATB.js";import"../../chunk-TB5YQH36.js";import"../../chunk-KMBS637G.js";import"../../chunk-RASCZBLN.js";import"../../chunk-RA75ESSD.js";import{a as e}from"../../chunk-G5BIPHMS.js";var n=class{static{e(this,"CoinList")}calculateValueInUsd(t,i,r){return l(t,i,r)}async getCoinInfo(t){return u(t)}whiteListed(t){return a(t)}whitelistCoins(){return s()}},d=new n,c=class extends m{static{e(this,"SuiDex")}coinList=d};async function I(o,t,i,r,f){return p(d,o,t,i,r,f)}e(I,"getPairValue");import("node:process").then(o=>o.stdout.write(""));import("node:process").then(o=>o.stdout.write(""));export{n as CoinList,d as SuiCoinList,c as SuiDex,l as calculateValueInUsd,u as getCoinInfo,S as getCoinInfoWithFallback,I as getPairValue,g as getPrice,C as initCoinList,a as whiteListed,s as whitelistCoins};
3
3
  //# sourceMappingURL=index.js.map
package/lib/sui/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{A as q,B as r,C as s,D as t,E as u,m as e,o as f,p as g,q as h,r as i,s as j,u as k,v as l,w as m,x as n,y as o,z as p}from"../chunk-DDBMJIG4.js";import{f as b,g as c,h as d}from"../chunk-OMPBG6IS.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import"../chunk-LI5W4TO6.js";import"../chunk-MPJRHMKL.js";import"../chunk-JS3OLQ4N.js";import"../chunk-2E4NSWHZ.js";import{q as a}from"../chunk-LQ2JMF5Z.js";import"../chunk-SUCYR7EB.js";import"../chunk-KMBS637G.js";import"../chunk-TUAGKH5K.js";import"../chunk-RA75ESSD.js";import"../chunk-G5BIPHMS.js";export{a as BUILTIN_TYPES,e as MoveCoder,i as SuiAddressContext,n as SuiAddressProcessor,r as SuiAddressProcessorTemplate,k as SuiBaseProcessor,g as SuiContext,m as SuiGlobalProcessor,l as SuiModulesProcessor,b as SuiNetwork,h as SuiObjectChangeContext,j as SuiObjectContext,o as SuiObjectProcessor,s as SuiObjectProcessorTemplate,p as SuiObjectTypeProcessor,u as SuiPlugin,q as SuiWrappedObjectProcessor,t as SuiWrappedObjectProcessorTemplate,f as defaultMoveCoder,c as getClient,d as getRpcEndpoint};
2
+ import{A as q,B as r,C as s,D as t,E as u,m as e,o as f,p as g,q as h,r as i,s as j,u as k,v as l,w as m,x as n,y as o,z as p}from"../chunk-2ZLOG6M7.js";import{f as b,g as c,h as d}from"../chunk-OYU3JOOI.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import"../chunk-L2RYMS7L.js";import"../chunk-WSLRWDNP.js";import"../chunk-4M475LJH.js";import"../chunk-GUTGNATB.js";import{q as a}from"../chunk-TB5YQH36.js";import"../chunk-SUCYR7EB.js";import"../chunk-KMBS637G.js";import"../chunk-RASCZBLN.js";import"../chunk-RA75ESSD.js";import"../chunk-G5BIPHMS.js";export{a as BUILTIN_TYPES,e as MoveCoder,i as SuiAddressContext,n as SuiAddressProcessor,r as SuiAddressProcessorTemplate,k as SuiBaseProcessor,g as SuiContext,m as SuiGlobalProcessor,l as SuiModulesProcessor,b as SuiNetwork,h as SuiObjectChangeContext,j as SuiObjectContext,o as SuiObjectProcessor,s as SuiObjectProcessorTemplate,p as SuiObjectTypeProcessor,u as SuiPlugin,q as SuiWrappedObjectProcessor,t as SuiWrappedObjectProcessorTemplate,f as defaultMoveCoder,c as getClient,d as getRpcEndpoint};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{t as O}from"../chunk-DDBMJIG4.js";import{f as p}from"../chunk-OMPBG6IS.js";import{a as C}from"../chunk-3AZNSC2K.js";import"../chunk-YJXEXFFA.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import{b as F}from"../chunk-LI5W4TO6.js";import"../chunk-MPJRHMKL.js";import"../chunk-JS3OLQ4N.js";import"../chunk-7YR44CBG.js";import"../chunk-2E4NSWHZ.js";import{b as x}from"../chunk-HLNH3NYZ.js";import{a as _,d as g,n as I}from"../chunk-LQ2JMF5Z.js";import"../chunk-BKL3I6N3.js";import"../chunk-RQ5L7SUN.js";import"../chunk-SUCYR7EB.js";import{a as T}from"../chunk-KMBS637G.js";import{D as c,Md as M}from"../chunk-TUAGKH5K.js";import{a as D}from"../chunk-RA75ESSD.js";import{a,f as m}from"../chunk-G5BIPHMS.js";var J=m(T(),1);import{Endpoints as j,ProcessorServiceImpl as K,State as X}from"@sentio/runtime";var v=class{static{a(this,"AptosFacet")}server;constructor(t){this.server=t}testEntryFunctionCall(t,e=C.MAIN_NET){return this.testEntryFunctionCalls([t],e)}testEntryFunctionCalls(t,e=C.MAIN_NET){let n=[];for(let r of t){let o=this.buildEntryFunctionCallBinding(r,e);if(!o)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(t,e=C.MAIN_NET){let n=t.payload;for(let r of this.server.contractConfigs)if(r.contract?.chainId===e){for(let o of r.moveCallConfigs)for(let i of o.filters)if(g(r.contract.address)+"::"+i.function===n.function)return{data:{aptCall:{rawTransaction:"",transaction:t}},handlerIds:[o.handlerId],handlerType:c.APT_CALL}}}testEvent(t,e=C.MAIN_NET){let n=this.buildEventBinding(t,e);if(!n)throw Error("Invalid test event: "+JSON.stringify(t));return this.server.processBinding(n)}buildEventBinding(t,e=C.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e){for(let r of n.moveEventConfigs)for(let o of r.filters)for(let i of t.events)if(g(n.contract.address)+"::"+o.type===I(i.type).qname)return{data:{aptEvent:{rawTransaction:"",transaction:t}},handlerIds:[r.handlerId],handlerType:c.APT_EVENT}}}};import("node:process").then(s=>s.stdout.write(""));var B=class{static{a(this,"SolanaFacet")}server;constructor(t){this.server=t}testInstructions(t){return this.server.processBindings({bindings:t.map(e=>({data:{raw:new Uint8Array,solInstruction:e},handlerIds:[],handlerType:c.SOL_INSTRUCTION}))})}};import("node:process").then(s=>s.stdout.write(""));var l=m(T(),1);var S=class{static{a(this,"EthFacet")}server;constructor(t){this.server=t}testTrace(t,e=l.EthChainId.ETHEREUM){return this.testTraces([t],e)}testTraces(t,e=l.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildTraceBinding(r,e);if(!o)throw Error("Invalid test trace: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildTraceBinding(t,e=l.EthChainId.ETHEREUM){if(t.type!=="call"||!t.action.input)throw Error("Invalid test trace: "+JSON.stringify(t));let n=t.action.input.slice(0,10);for(let r of this.server.contractConfigs)if(r.contract?.chainId===e&&!(t.action.to?.toLowerCase()!==r.contract?.address.toLowerCase()&&r.contract?.address!==M)){for(let o of r.traceConfigs)if(o.signature==n)return{data:{ethTrace:{trace:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.ETH_TRACE}}}testLog(t,e=l.EthChainId.ETHEREUM){return this.testLogs([t],e)}testLogs(t,e=l.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildLogBinding(r,e);if(!o)throw Error("Invalid test log: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildLogBinding(t,e=l.EthChainId.ETHEREUM){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e&&!(t.address.toLowerCase()!==n.contract?.address.toLowerCase()&&n.contract?.address!=="*"))for(let r of n.logConfigs)for(let o of r.filters){let i=!0;for(let d in o.topics){let f=t.topics[d],u=o.topics[d].hashes;if(u.length!==0&&!u.find(h=>h.toLowerCase()===f.toLowerCase())){i=!1;break}}if(i)return{data:{ethLog:{log:t,timestamp:new Date}},handlerIds:[r.handlerId],handlerType:c.ETH_LOG}}}testAccountLog(t,e,n=l.EthChainId.ETHEREUM){return this.testAccountLogs(t,[e],n)}testAccountLogs(t,e,n=l.EthChainId.ETHEREUM){let r=[];for(let o of e){let i=this.buildAccountLogBinding(t,o,n);if(!i)throw Error("Invalid test log: "+JSON.stringify(o));r.push(i)}return this.server.processBindings({bindings:r})}buildAccountLogBinding(t,e,n=l.EthChainId.ETHEREUM){for(let r of this.server.accountConfigs)if(r.chainId===n&&t.toLowerCase()===r.address.toLowerCase())for(let o of r.logConfigs)for(let i of o.filters){let d=!0;for(let f in i.topics){let u=e.topics[f],h=i.topics[f].hashes;if(h.length!==0&&!h.find(R=>R.toLowerCase()===u.toLowerCase())){d=!1;break}}if(d)return{data:{ethLog:{log:e,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.ETH_LOG}}}testBlock(t,e=l.EthChainId.ETHEREUM){return this.testBlocks([t],e)}testBlocks(t,e=l.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildBlockBinding(r,e);if(!o)throw Error("Invalid test block: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildBlockBinding(t,e=l.EthChainId.ETHEREUM){let n={data:{ethBlock:{block:t}},handlerType:c.ETH_BLOCK,handlerIds:[]};for(let r of this.server.contractConfigs){if(r.contract?.chainId!==e)continue;let o=t.number;if(!(o<r.startBlock)&&!(r.endBlock!==0n&&o>=r.endBlock))for(let i of r.intervalConfigs)n.handlerIds.push(i.handlerId)}return n}};import("node:process").then(s=>s.stdout.write(""));var N=class{static{a(this,"SuiFacet")}server;constructor(t){this.server=t}testEntryFunctionCall(t,e=p.MAIN_NET){return this.testEntryFunctionCalls([t],e)}testEntryFunctionCalls(t,e=p.MAIN_NET){let n=[];for(let r of t){let o=this.buildEntryFunctionCallBinding(r,e);if(!o)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(t,e=p.MAIN_NET){let n=O(t);for(let r of n){let o=[g(r.package),r.module,r.function].join(_);for(let i of this.server.contractConfigs)if(i.contract?.chainId===e){for(let d of i.moveCallConfigs)for(let f of d.filters)if(g(i.contract.address)+"::"+f.function===o)return{data:{suiCall:{transaction:t,timestamp:new Date,slot:10000n}},handlerIds:[d.handlerId],handlerType:c.SUI_CALL}}}}testEvent(t,e=p.MAIN_NET){let n=this.buildEventBinding(t,e);if(!n)throw Error("Invalid test event: "+JSON.stringify(t));return this.server.processBinding(n)}testGlobalTransaction(t,e=p.MAIN_NET){let n=[];for(let o of this.server.contractConfigs)if(o.contract?.address==="*")for(let i of o.moveCallConfigs)i.filters.length===1&&i.filters[0].function===""&&n.push(i.handlerId);if(n.length===0)throw Error("Invalid test global transaction: "+JSON.stringify(t));let r={handlerIds:n,handlerType:c.SUI_CALL,data:{suiCall:{transaction:t,timestamp:t.timestampMs?new Date(t.timestampMs):new Date,slot:BigInt(t.checkpoint||0)}}};return this.server.processBinding(r)}buildEventBinding(t,e=p.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e){for(let r of n.moveEventConfigs)for(let o of r.filters)for(let i of t.events||[])if(g(n.contract.address)+"::"+o.type===I(i.type).qname)return{data:{suiEvent:{transaction:t,timestamp:new Date(t.timestampMs||0),slot:10000n}},handlerIds:[r.handlerId],handlerType:c.SUI_EVENT}}}};import("node:process").then(s=>s.stdout.write(""));var P=class{static{a(this,"FuelFacet")}server;constructor(t){this.server=t}testOnTransaction(t,e=x.TEST_NET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e){for(let o of r.fuelCallConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.FUEL_CALL},d=o.filters[0]?.function;if(d)for(let f of t.status.receipts||[])f.receiptType=="CALL"&&f.param1==d&&n.push(i);else n.push(i)}for(let o of r.fuelLogConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.FUEL_CALL},d=o.logIds;for(let f of t.status.receipts||[])if((f.receiptType=="LOG"||f.receiptType=="LOG_DATA")&&d.includes(f.rb)){n.push(i);break}}for(let o of r.assetConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.FUEL_CALL};n.push(i)}}return n}};import("node:process").then(s=>s.stdout.write(""));var k=m(T(),1);var H={INJECTIVE_MAINNET:k.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:k.CosmosChainId.INJECTIVE_TESTNET};import("node:process").then(s=>s.stdout.write(""));var y=class{static{a(this,"CosmosFacet")}server;constructor(t){this.server=t}testOnTransaction(t,e=H.INJECTIVE_TESTNET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e)for(let o of r.cosmosLogConfigs){let i={data:{cosmosCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.COSMOS_CALL},d=o.logFilters;for(let f of t.logs||[])if(f.events.find(u=>d.includes(u.type))){n.push(i);break}}return n}};import("node:process").then(s=>s.stdout.write(""));var U=m(T(),1);var b=class{static{a(this,"StarknetFacet")}server;constructor(t){this.server=t}testOnEvents(t,e=U.StarknetChainId.STARKNET_SEPOLIA){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test : "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[],r=Array.isArray(t)?t:[t];for(let o of r)for(let i of this.server.contractConfigs)if(i.contract?.chainId===e)for(let d of i.starknetEventConfigs){let f={data:{starknetEvents:{result:o,timestamp:new Date}},handlerIds:[d.handlerId],handlerType:c.STARKNET_EVENT},u=d.filters,h=o.keys;for(let R of h)for(let G of u)if(G.keys.includes(R))return n.push(f),n}return n}};import("node:process").then(s=>s.stdout.write(""));var V=m(T(),1);var w=class{static{a(this,"BTCFacet")}server;constructor(t){this.server=t}testOnTransactions(t,e=V.BTCChainId.BTC_TESTNET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test : "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e)for(let o of r.btcTransactionConfigs){let i={data:{btcTransaction:t},handlerIds:[o.handlerId],handlerType:c.BTC_TRANSACTION};n.push(i)}return n}};import("node:process").then(s=>s.stdout.write(""));var E={};function z(){X.reset()}a(z,"cleanTest");var A=class{static{a(this,"TestProcessorServer")}service;contractConfigs;accountConfigs;aptos;eth;solana;sui;fuel;cosmos;starknet;btc;constructor(t,e={}){z(),this.service=new K(t),this.aptos=new v(this),this.solana=new B(this),this.eth=new S(this),this.sui=new N(this),this.fuel=new P(this),this.cosmos=new y(this),this.starknet=new b(this),this.btc=new w(this);for(let n in J.CHAIN_MAP){let r=e[n]||"";j.INSTANCE.chainServer.set(n,r)}}async start(t={templateInstances:[]},e=E){let n=await this.service.start(t,e),r=await this.getConfig({});return this.contractConfigs=r.contractConfigs,this.accountConfigs=r.accountConfigs,n}stop(t,e=E){return this.service.stop(t,e)}getConfig(t,e=E){return this.service.getConfig(t,e)}processBindings(t,e=E){return this.service.processBindings(t,e)}processBinding(t,e=E){return this.service.processBindings({bindings:[t]},e)}processBindingsStream(t,e){throw new Error("Method not implemented.")}preprocessBindingsStream(t,e){throw new Error("Method not implemented.")}};import("node:process").then(s=>s.stdout.write(""));function L(s){if(s!==void 0){if(s.doubleValue!==void 0)return s.doubleValue;if(s.bigInteger!==void 0){let t=F(s.bigInteger.data);return s.bigInteger.negative&&(t=-t),t}if(s.bigDecimal!==void 0)return new D(s.bigDecimal)}}a(L,"MetricValueToNumber");function Q(s,t){if(s){for(let e of s.counters)if(e.metadata?.name===t)return L(e.metricValue)}}a(Q,"firstCounterValue");function W(s,t){if(s){for(let e of s.gauges)if(e.metadata?.name===t)return L(e.metricValue)}}a(W,"firstGaugeValue");import("node:process").then(s=>s.stdout.write(""));var q=m(T(),1);import{Endpoints as Y}from"@sentio/runtime";function Z(s){let t=[];Array.isArray(s)||(s=[s]);for(let e of Object.keys(q.CHAIN_MAP)){let n="TEST_ENDPOINT_"+e,r=process.env[n];r&&(t.push(e),Y.INSTANCE.chainServer.set(e,r))}for(let e of s)if(!t.includes(e))return!1;return!0}a(Z,"loadTestProvidersFromEnv");import("node:process").then(s=>s.stdout.write(""));import("node:process").then(s=>s.stdout.write(""));export{L as MetricValueToNumber,A as TestProcessorServer,Q as firstCounterValue,W as firstGaugeValue,Z as loadTestProvidersFromEnv};
2
+ import{t as O}from"../chunk-2ZLOG6M7.js";import{f as p}from"../chunk-OYU3JOOI.js";import{a as C}from"../chunk-PNVVX7IL.js";import"../chunk-YJXEXFFA.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import{b as F}from"../chunk-L2RYMS7L.js";import"../chunk-WSLRWDNP.js";import"../chunk-4M475LJH.js";import"../chunk-VI7J5F7D.js";import"../chunk-GUTGNATB.js";import{b as x}from"../chunk-GT6HNPDP.js";import{a as _,d as g,n as I}from"../chunk-TB5YQH36.js";import"../chunk-BKL3I6N3.js";import"../chunk-RQ5L7SUN.js";import"../chunk-SUCYR7EB.js";import{a as T}from"../chunk-KMBS637G.js";import{D as c,Md as M}from"../chunk-RASCZBLN.js";import{a as D}from"../chunk-RA75ESSD.js";import{a,f as m}from"../chunk-G5BIPHMS.js";var J=m(T(),1);import{Endpoints as j,ProcessorServiceImpl as K,State as X}from"@sentio/runtime";var v=class{static{a(this,"AptosFacet")}server;constructor(t){this.server=t}testEntryFunctionCall(t,e=C.MAIN_NET){return this.testEntryFunctionCalls([t],e)}testEntryFunctionCalls(t,e=C.MAIN_NET){let n=[];for(let r of t){let o=this.buildEntryFunctionCallBinding(r,e);if(!o)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(t,e=C.MAIN_NET){let n=t.payload;for(let r of this.server.contractConfigs)if(r.contract?.chainId===e){for(let o of r.moveCallConfigs)for(let i of o.filters)if(g(r.contract.address)+"::"+i.function===n.function)return{data:{aptCall:{rawTransaction:"",transaction:t}},handlerIds:[o.handlerId],handlerType:c.APT_CALL}}}testEvent(t,e=C.MAIN_NET){let n=this.buildEventBinding(t,e);if(!n)throw Error("Invalid test event: "+JSON.stringify(t));return this.server.processBinding(n)}buildEventBinding(t,e=C.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e){for(let r of n.moveEventConfigs)for(let o of r.filters)for(let i of t.events)if(g(n.contract.address)+"::"+o.type===I(i.type).qname)return{data:{aptEvent:{rawTransaction:"",transaction:t}},handlerIds:[r.handlerId],handlerType:c.APT_EVENT}}}};import("node:process").then(s=>s.stdout.write(""));var B=class{static{a(this,"SolanaFacet")}server;constructor(t){this.server=t}testInstructions(t){return this.server.processBindings({bindings:t.map(e=>({data:{raw:new Uint8Array,solInstruction:e},handlerIds:[],handlerType:c.SOL_INSTRUCTION}))})}};import("node:process").then(s=>s.stdout.write(""));var l=m(T(),1);var S=class{static{a(this,"EthFacet")}server;constructor(t){this.server=t}testTrace(t,e=l.EthChainId.ETHEREUM){return this.testTraces([t],e)}testTraces(t,e=l.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildTraceBinding(r,e);if(!o)throw Error("Invalid test trace: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildTraceBinding(t,e=l.EthChainId.ETHEREUM){if(t.type!=="call"||!t.action.input)throw Error("Invalid test trace: "+JSON.stringify(t));let n=t.action.input.slice(0,10);for(let r of this.server.contractConfigs)if(r.contract?.chainId===e&&!(t.action.to?.toLowerCase()!==r.contract?.address.toLowerCase()&&r.contract?.address!==M)){for(let o of r.traceConfigs)if(o.signature==n)return{data:{ethTrace:{trace:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.ETH_TRACE}}}testLog(t,e=l.EthChainId.ETHEREUM){return this.testLogs([t],e)}testLogs(t,e=l.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildLogBinding(r,e);if(!o)throw Error("Invalid test log: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildLogBinding(t,e=l.EthChainId.ETHEREUM){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e&&!(t.address.toLowerCase()!==n.contract?.address.toLowerCase()&&n.contract?.address!=="*"))for(let r of n.logConfigs)for(let o of r.filters){let i=!0;for(let d in o.topics){let f=t.topics[d],u=o.topics[d].hashes;if(u.length!==0&&!u.find(h=>h.toLowerCase()===f.toLowerCase())){i=!1;break}}if(i)return{data:{ethLog:{log:t,timestamp:new Date}},handlerIds:[r.handlerId],handlerType:c.ETH_LOG}}}testAccountLog(t,e,n=l.EthChainId.ETHEREUM){return this.testAccountLogs(t,[e],n)}testAccountLogs(t,e,n=l.EthChainId.ETHEREUM){let r=[];for(let o of e){let i=this.buildAccountLogBinding(t,o,n);if(!i)throw Error("Invalid test log: "+JSON.stringify(o));r.push(i)}return this.server.processBindings({bindings:r})}buildAccountLogBinding(t,e,n=l.EthChainId.ETHEREUM){for(let r of this.server.accountConfigs)if(r.chainId===n&&t.toLowerCase()===r.address.toLowerCase())for(let o of r.logConfigs)for(let i of o.filters){let d=!0;for(let f in i.topics){let u=e.topics[f],h=i.topics[f].hashes;if(h.length!==0&&!h.find(R=>R.toLowerCase()===u.toLowerCase())){d=!1;break}}if(d)return{data:{ethLog:{log:e,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.ETH_LOG}}}testBlock(t,e=l.EthChainId.ETHEREUM){return this.testBlocks([t],e)}testBlocks(t,e=l.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildBlockBinding(r,e);if(!o)throw Error("Invalid test block: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildBlockBinding(t,e=l.EthChainId.ETHEREUM){let n={data:{ethBlock:{block:t}},handlerType:c.ETH_BLOCK,handlerIds:[]};for(let r of this.server.contractConfigs){if(r.contract?.chainId!==e)continue;let o=t.number;if(!(o<r.startBlock)&&!(r.endBlock!==0n&&o>=r.endBlock))for(let i of r.intervalConfigs)n.handlerIds.push(i.handlerId)}return n}};import("node:process").then(s=>s.stdout.write(""));var N=class{static{a(this,"SuiFacet")}server;constructor(t){this.server=t}testEntryFunctionCall(t,e=p.MAIN_NET){return this.testEntryFunctionCalls([t],e)}testEntryFunctionCalls(t,e=p.MAIN_NET){let n=[];for(let r of t){let o=this.buildEntryFunctionCallBinding(r,e);if(!o)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(t,e=p.MAIN_NET){let n=O(t);for(let r of n){let o=[g(r.package),r.module,r.function].join(_);for(let i of this.server.contractConfigs)if(i.contract?.chainId===e){for(let d of i.moveCallConfigs)for(let f of d.filters)if(g(i.contract.address)+"::"+f.function===o)return{data:{suiCall:{transaction:t,timestamp:new Date,slot:10000n}},handlerIds:[d.handlerId],handlerType:c.SUI_CALL}}}}testEvent(t,e=p.MAIN_NET){let n=this.buildEventBinding(t,e);if(!n)throw Error("Invalid test event: "+JSON.stringify(t));return this.server.processBinding(n)}testGlobalTransaction(t,e=p.MAIN_NET){let n=[];for(let o of this.server.contractConfigs)if(o.contract?.address==="*")for(let i of o.moveCallConfigs)i.filters.length===1&&i.filters[0].function===""&&n.push(i.handlerId);if(n.length===0)throw Error("Invalid test global transaction: "+JSON.stringify(t));let r={handlerIds:n,handlerType:c.SUI_CALL,data:{suiCall:{transaction:t,timestamp:t.timestampMs?new Date(t.timestampMs):new Date,slot:BigInt(t.checkpoint||0)}}};return this.server.processBinding(r)}buildEventBinding(t,e=p.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e){for(let r of n.moveEventConfigs)for(let o of r.filters)for(let i of t.events||[])if(g(n.contract.address)+"::"+o.type===I(i.type).qname)return{data:{suiEvent:{transaction:t,timestamp:new Date(t.timestampMs||0),slot:10000n}},handlerIds:[r.handlerId],handlerType:c.SUI_EVENT}}}};import("node:process").then(s=>s.stdout.write(""));var P=class{static{a(this,"FuelFacet")}server;constructor(t){this.server=t}testOnTransaction(t,e=x.TEST_NET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e){for(let o of r.fuelCallConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.FUEL_CALL},d=o.filters[0]?.function;if(d)for(let f of t.status.receipts||[])f.receiptType=="CALL"&&f.param1==d&&n.push(i);else n.push(i)}for(let o of r.fuelLogConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.FUEL_CALL},d=o.logIds;for(let f of t.status.receipts||[])if((f.receiptType=="LOG"||f.receiptType=="LOG_DATA")&&d.includes(f.rb)){n.push(i);break}}for(let o of r.assetConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.FUEL_CALL};n.push(i)}}return n}};import("node:process").then(s=>s.stdout.write(""));var k=m(T(),1);var H={INJECTIVE_MAINNET:k.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:k.CosmosChainId.INJECTIVE_TESTNET};import("node:process").then(s=>s.stdout.write(""));var y=class{static{a(this,"CosmosFacet")}server;constructor(t){this.server=t}testOnTransaction(t,e=H.INJECTIVE_TESTNET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e)for(let o of r.cosmosLogConfigs){let i={data:{cosmosCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:c.COSMOS_CALL},d=o.logFilters;for(let f of t.logs||[])if(f.events.find(u=>d.includes(u.type))){n.push(i);break}}return n}};import("node:process").then(s=>s.stdout.write(""));var U=m(T(),1);var b=class{static{a(this,"StarknetFacet")}server;constructor(t){this.server=t}testOnEvents(t,e=U.StarknetChainId.STARKNET_SEPOLIA){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test : "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[],r=Array.isArray(t)?t:[t];for(let o of r)for(let i of this.server.contractConfigs)if(i.contract?.chainId===e)for(let d of i.starknetEventConfigs){let f={data:{starknetEvents:{result:o,timestamp:new Date}},handlerIds:[d.handlerId],handlerType:c.STARKNET_EVENT},u=d.filters,h=o.keys;for(let R of h)for(let G of u)if(G.keys.includes(R))return n.push(f),n}return n}};import("node:process").then(s=>s.stdout.write(""));var V=m(T(),1);var w=class{static{a(this,"BTCFacet")}server;constructor(t){this.server=t}testOnTransactions(t,e=V.BTCChainId.BTC_TESTNET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test : "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e)for(let o of r.btcTransactionConfigs){let i={data:{btcTransaction:t},handlerIds:[o.handlerId],handlerType:c.BTC_TRANSACTION};n.push(i)}return n}};import("node:process").then(s=>s.stdout.write(""));var E={};function z(){X.reset()}a(z,"cleanTest");var A=class{static{a(this,"TestProcessorServer")}service;contractConfigs;accountConfigs;aptos;eth;solana;sui;fuel;cosmos;starknet;btc;constructor(t,e={}){z(),this.service=new K(t),this.aptos=new v(this),this.solana=new B(this),this.eth=new S(this),this.sui=new N(this),this.fuel=new P(this),this.cosmos=new y(this),this.starknet=new b(this),this.btc=new w(this);for(let n in J.CHAIN_MAP){let r=e[n]||"";j.INSTANCE.chainServer.set(n,r)}}async start(t={templateInstances:[]},e=E){let n=await this.service.start(t,e),r=await this.getConfig({});return this.contractConfigs=r.contractConfigs,this.accountConfigs=r.accountConfigs,n}stop(t,e=E){return this.service.stop(t,e)}getConfig(t,e=E){return this.service.getConfig(t,e)}processBindings(t,e=E){return this.service.processBindings(t,e)}processBinding(t,e=E){return this.service.processBindings({bindings:[t]},e)}processBindingsStream(t,e){throw new Error("Method not implemented.")}preprocessBindingsStream(t,e){throw new Error("Method not implemented.")}};import("node:process").then(s=>s.stdout.write(""));function L(s){if(s!==void 0){if(s.doubleValue!==void 0)return s.doubleValue;if(s.bigInteger!==void 0){let t=F(s.bigInteger.data);return s.bigInteger.negative&&(t=-t),t}if(s.bigDecimal!==void 0)return new D(s.bigDecimal)}}a(L,"MetricValueToNumber");function Q(s,t){if(s){for(let e of s.counters)if(e.metadata?.name===t)return L(e.metricValue)}}a(Q,"firstCounterValue");function W(s,t){if(s){for(let e of s.gauges)if(e.metadata?.name===t)return L(e.metricValue)}}a(W,"firstGaugeValue");import("node:process").then(s=>s.stdout.write(""));var q=m(T(),1);import{Endpoints as Y}from"@sentio/runtime";function Z(s){let t=[];Array.isArray(s)||(s=[s]);for(let e of Object.keys(q.CHAIN_MAP)){let n="TEST_ENDPOINT_"+e,r=process.env[n];r&&(t.push(e),Y.INSTANCE.chainServer.set(e,r))}for(let e of s)if(!t.includes(e))return!1;return!0}a(Z,"loadTestProvidersFromEnv");import("node:process").then(s=>s.stdout.write(""));import("node:process").then(s=>s.stdout.write(""));export{L as MetricValueToNumber,A as TestProcessorServer,Q as firstCounterValue,W as firstGaugeValue,Z as loadTestProvidersFromEnv};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"../chunk-LI5W4TO6.js";import"../chunk-MPJRHMKL.js";import"../chunk-JS3OLQ4N.js";import"../chunk-2E4NSWHZ.js";import"../chunk-KMBS637G.js";import"../chunk-TUAGKH5K.js";import"../chunk-RA75ESSD.js";import"../chunk-G5BIPHMS.js";export{f as EthereumDexPrice,d as PriceUnit,g as SepoliaDexPrice,b as bytesToBigInt,a as estimateBlockNumberAtDate,k as getCoinsThatHasPrice,e as getPackageRoot,j as getPriceBySymbol,i as getPriceByType,h as getPriceClient,l as ignoreEthCallException,c as token};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"../chunk-L2RYMS7L.js";import"../chunk-WSLRWDNP.js";import"../chunk-4M475LJH.js";import"../chunk-GUTGNATB.js";import"../chunk-KMBS637G.js";import"../chunk-RASCZBLN.js";import"../chunk-RA75ESSD.js";import"../chunk-G5BIPHMS.js";export{f as EthereumDexPrice,d as PriceUnit,g as SepoliaDexPrice,b as bytesToBigInt,a as estimateBlockNumberAtDate,k as getCoinsThatHasPrice,e as getPackageRoot,j as getPriceBySymbol,i as getPriceByType,h as getPriceClient,l as ignoreEthCallException,c as token};
3
3
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/sdk-bundle",
3
- "version": "2.50.1",
3
+ "version": "2.50.2-rc.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -46,7 +46,7 @@
46
46
  "{lib,assets}"
47
47
  ],
48
48
  "dependencies": {
49
- "@sentio/runtime": "^2.50.1"
49
+ "@sentio/runtime": "^2.50.2-rc.1"
50
50
  },
51
51
  "peerDependencies": {},
52
52
  "devDependencies": {},