@sentio/sdk-bundle 2.41.4 → 2.41.5
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/aptos/builtin/0x1.js +1 -1
- package/lib/aptos/builtin/0x3.js +1 -1
- package/lib/aptos/builtin/index.js +1 -1
- package/lib/aptos/ext/index.js +1 -1
- package/lib/aptos/index.js +1 -1
- package/lib/btc/index.js +1 -1
- package/lib/{chunk-SDJOH3KH.js → chunk-3C4YSA42.js} +2 -2
- package/lib/{chunk-QRNQPRH4.js → chunk-3KK6D6YO.js} +2 -2
- package/lib/{chunk-7IA5RTOB.js → chunk-4ACVSPIF.js} +2 -2
- package/lib/{chunk-GPETITBA.js → chunk-4QS3NUUW.js} +2 -2
- package/lib/{chunk-WL4SNWT6.js → chunk-BVDLKPY7.js} +2 -2
- package/lib/{chunk-63HPJECU.js → chunk-CJVPUD6U.js} +2 -2
- package/lib/{chunk-5WEQ4PSE.js → chunk-CSVBDVD7.js} +2 -2
- package/lib/{chunk-JGYBNJHX.js → chunk-JTQMVYTS.js} +9 -9
- package/lib/{chunk-JGYBNJHX.js.map → chunk-JTQMVYTS.js.map} +1 -1
- package/lib/{chunk-KY7NG4ER.js → chunk-KY5AFKV5.js} +2 -2
- package/lib/{chunk-RYFT36S5.js → chunk-LCUGDGMN.js} +2 -2
- package/lib/{chunk-5WM5D6EI.js → chunk-MGIOFRXM.js} +2 -2
- package/lib/{chunk-R7S4ZNCQ.js → chunk-PSYYSAEX.js} +2 -2
- package/lib/{chunk-EL6CQHDY.js → chunk-RDBX2EIJ.js} +2 -2
- package/lib/{chunk-SPZVAGFS.js → chunk-VEVTWG5S.js} +2 -2
- package/lib/{chunk-G6D6EDWO.js → chunk-VM5J6G66.js} +2 -2
- package/lib/{chunk-T5A3YPP2.js → chunk-X7K74U6O.js} +2 -2
- package/lib/{chunk-WGFT7DSU.js → chunk-XYISSQEU.js} +2 -2
- package/lib/{chunk-IQNZE4RM.js → chunk-XZRRBRMQ.js} +2 -2
- package/lib/core/index.js +1 -1
- package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
- package/lib/eth/builtin/erc1155.js +1 -1
- package/lib/eth/builtin/erc20.js +1 -1
- package/lib/eth/builtin/erc721.js +1 -1
- package/lib/eth/builtin/index.js +1 -1
- package/lib/eth/builtin/weth9.js +1 -1
- package/lib/eth/codegen/index.js +1 -1
- package/lib/eth/index.js +1 -1
- package/lib/fuel/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/move/index.js +1 -1
- package/lib/solana/builtin/index.js +1 -1
- package/lib/solana/index.js +1 -1
- package/lib/stark/index.js +1 -1
- package/lib/store/index.js +1 -1
- package/lib/sui/builtin/0x1.js +1 -1
- package/lib/sui/builtin/0x2.js +1 -1
- package/lib/sui/builtin/0x3.js +1 -1
- package/lib/sui/builtin/index.js +1 -1
- package/lib/sui/ext/index.js +1 -1
- package/lib/sui/index.js +1 -1
- package/lib/testing/index.js +1 -1
- package/lib/utils/index.js +1 -1
- package/package.json +2 -2
- /package/lib/{chunk-SDJOH3KH.js.map → chunk-3C4YSA42.js.map} +0 -0
- /package/lib/{chunk-QRNQPRH4.js.map → chunk-3KK6D6YO.js.map} +0 -0
- /package/lib/{chunk-7IA5RTOB.js.map → chunk-4ACVSPIF.js.map} +0 -0
- /package/lib/{chunk-GPETITBA.js.map → chunk-4QS3NUUW.js.map} +0 -0
- /package/lib/{chunk-WL4SNWT6.js.map → chunk-BVDLKPY7.js.map} +0 -0
- /package/lib/{chunk-63HPJECU.js.map → chunk-CJVPUD6U.js.map} +0 -0
- /package/lib/{chunk-5WEQ4PSE.js.map → chunk-CSVBDVD7.js.map} +0 -0
- /package/lib/{chunk-KY7NG4ER.js.map → chunk-KY5AFKV5.js.map} +0 -0
- /package/lib/{chunk-RYFT36S5.js.map → chunk-LCUGDGMN.js.map} +0 -0
- /package/lib/{chunk-5WM5D6EI.js.map → chunk-MGIOFRXM.js.map} +0 -0
- /package/lib/{chunk-R7S4ZNCQ.js.map → chunk-PSYYSAEX.js.map} +0 -0
- /package/lib/{chunk-EL6CQHDY.js.map → chunk-RDBX2EIJ.js.map} +0 -0
- /package/lib/{chunk-SPZVAGFS.js.map → chunk-VEVTWG5S.js.map} +0 -0
- /package/lib/{chunk-G6D6EDWO.js.map → chunk-VM5J6G66.js.map} +0 -0
- /package/lib/{chunk-T5A3YPP2.js.map → chunk-X7K74U6O.js.map} +0 -0
- /package/lib/{chunk-WGFT7DSU.js.map → chunk-XYISSQEU.js.map} +0 -0
- /package/lib/{chunk-IQNZE4RM.js.map → chunk-XZRRBRMQ.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as $}from"./chunk-7HVQTJAO.js";import{D as B,Hc as ae,Mb as W,Nb as v,Ob as N,Pb as z,Qb as L,Rb as G,W as J,bd as Y,gd as Z,jc as U,kc as q,lc as K,mc as y,nc as Q,pc as X}from"./chunk-
|
|
2
|
+
import{a as $}from"./chunk-7HVQTJAO.js";import{D as B,Hc as ae,Mb as W,Nb as v,Ob as N,Pb as z,Qb as L,Rb as G,W as J,bd as Y,gd as Z,jc as U,kc as q,lc as K,mc as y,nc as Q,pc as X}from"./chunk-JTQMVYTS.js";import{g as C,l as D}from"./chunk-TW3ZXDJC.js";import{e as k,g as j}from"./chunk-LLHU72AA.js";import{errorString as ue,GLOBAL_CONFIG as fe,mergeProcessResults as ge,Plugin as pe,PluginManager as me,USER_PROCESSOR as he}from"@sentio/runtime";var P=k(ae(),1);import{ListStateStorage as ie}from"@sentio/runtime";var O=class extends ie{},p=O;j(p,"INSTANCE",new O);var M=k($(),1),ce={MAIN_NET:M.FuelChainId.FUEL_MAINNET,TEST_NET:M.FuelChainId.FUEL_TESTNET};function x(o){switch(o){case ce.TEST_NET:return"https://testnet.fuel.network/v1/graphql"}return"https://testnet.fuel.network/v1/graphql"}var R=class{constructor(e,t,s,n,r){this.args=n;this.logs=r}},m=class extends Y{constructor(t,s,n,r){super({});this.chainId=t;this.contractAddress=s;this.contractName=n;this.transaction=r}logIndex=-1;getChainId(){return this.chainId}setLogIndex(t){this.logIndex=t}getMetaDataInternal(t,s){return{address:this.contractAddress,contractName:this.contractName,blockNumber:BigInt(this.transaction?.blockNumber||0),transactionIndex:0,transactionHash:this.transaction?.id||"",chainId:this.getChainId(),name:t,logIndex:this.logIndex,labels:X(s)}}};var w={includeFailed:!1};function ee(o,e){for(let t of o||[])if(t.type==N.Coin&&t.assetId==e)return t.owner}function H(o,e){let t=D(o.rawPayload),s=o?.status.receipts?.map(U)||[],[n]=new G().decode(t,0),{gasCosts:r,feeParameters:a,txParameters:c,baseAssetId:g}=e.getChain().consensusParameters,u=o.status?.block?.header?.height,{gasPriceFactor:i,gasPerByte:l}=a,{maxInputs:d,maxGasPerTx:h}=c,f={type:o.status?.__typename,...o.status};return{...q({id:o.id,receipts:s,transaction:n,transactionBytes:t,gqlTransactionStatus:f,gasPerByte:C(l),gasPriceFactor:C(i),maxInputs:d,gasCosts:r,gasPrice:C(o.gasPrice),maxGasPerTx:h,baseAssetId:g}),blockNumber:u,sender:ee(n.inputs,g)}}async function E(o,e,t){let s=D(o.rawPayload),[n]=new G().decode(s,0),r=o?.status.receipts?.map(U)||[],a={type:o.status?.__typename,...o.status},c=a?.block?.header?.height,g=Object.values(e)[0],u=[];r.forEach((d,h)=>{if(d.type===L.LogData||d.type===L.Log){let f=new v(g),F=d.type===L.Log?new W("u64").encode(d.val0):d.data,A=d.val1.toString(),[_]=f.decodeLog(F,A);u.push({logId:A,data:_,receiptIndex:h})}});let i=new K(o.status.transactionId,t,{main:Object.values(e)[0],otherContractsAbis:{}});return i.gqlTransaction={...o,status:a},{...await i.getTransactionSummary(),blockNumber:c,logs:u,sender:ee(n.inputs,t.getChain().consensusParameters.baseAssetId)}}var T=class{constructor(e){this.config=e}callHandlers=[];provider;static bind(e){let t=new T(e);return p.INSTANCE.addValue(t),t}async configure(){let e=x(this.config.chainId);this.provider=await y.create(e)}onTransfer(e,t){let s=[],n=V(e.assetId),r=V(e.from),a=V(e.to);for(let g of n)for(let u of r)for(let i of a)s.push({assetId:g,fromAddress:u,toAddress:i});let c={handler:async g=>{let u=g.transaction,i=H(u,this.provider),l={from:[],to:[]};for(let f of i.transaction.inputs||[])f.type==N.Coin&&l.from.push({address:f.owner,assetId:f.assetId});for(let f of i.transaction.outputs||[])if(f.type==z.Coin){let F=f.amount.toString(10);l.to.push({address:f.to,amount:BigInt(F),assetId:f.assetId})}let d=l.from[0].assetId||"",h=new m(this.config.chainId,d,this.config.name??"",i);return await t(l,h),h.stopAndGetResult()},assetConfig:{filters:s}};return this.callHandlers.push(c),this}};function V(o){return o?Array.isArray(o)?o.length>0?o:[void 0]:[o]:[void 0]}import{mergeProcessResults as le}from"@sentio/runtime";var I=class{constructor(e){this.config=e}callHandlers=[];provider;static bind(e){let t=new I(e);return p.INSTANCE.addValue(t),t}latestGasPrice;async configure(){let e=x(this.config.chainId);this.provider=await y.create(e),this.provider.getLatestGasPrice=async()=>{if(this.latestGasPrice)return C(this.latestGasPrice);let{latestGasPrice:t}=await this.provider.operations.getLatestGasPrice();return this.latestGasPrice=t?.gasPrice,C(t.gasPrice)}}onTransaction(e,t=w){let s={handler:async n=>{let r=this.config.abi?{[this.config.address]:this.config.abi}:{},a=await E(n.transaction,r,this.provider),c=new m(this.config.chainId,this.config.address,this.config.name??this.config.address,a);return await e(a,c),c.stopAndGetResult()},fetchConfig:{filters:[],...t}};return this.callHandlers.push(s),this}onCall(e,t,s=w){let n=new Set(Array.isArray(e)?e:[e]);if(!this.config.abi)throw new Error("ABI must be provided to use onCall");let r=this.config.abi,a={},c=new v(r);for(let u of n)try{let i=c.functions[u],l=C(i.selector,"hex").toString();a[i.name]={function:l,includeFailed:!!s.includeFailed}}catch(i){console.error(i)}let g={handler:async u=>{try{let i=new Q(this.config.address,r,this.provider),l=u.transaction,d=await E(l,{[this.config.address]:r},this.provider),h=new m(this.config.chainId,this.config.address,this.config.name??this.config.address,d);for(let f of d.operations)for(let F of f.calls||[])if(n.has(F.functionName)){let A=i.functions[F.functionName],_=Object.values(F.argumentsProvided||{}),re=A(..._),ne=new R(re,d,!1,F.argumentsProvided,d.logs);await t(ne,h)}return h.stopAndGetResult()}catch(i){return console.error(i),{gauges:[],counters:[],events:[],exports:[],states:{configUpdated:!1}}}},fetchConfig:{filters:Object.values(a)}};return this.callHandlers.push(g),this}onLog(e,t){let s=new Set(Array.isArray(e)?e:[e]),n={handler:async r=>{try{let a=r.transaction,c=await E(a,{[this.config.address]:this.config.abi},this.provider),g=[],u=(c.logs||[]).filter(i=>s.has(i.logId));for(let i of u){let l=new m(this.config.chainId,this.config.address,this.config.name??this.config.address,c);l.setLogIndex(i.receiptIndex),await t(i,l),g.push(l.stopAndGetResult())}return le(g)}catch(a){return console.error(a),{gauges:[],counters:[],events:[],exports:[],states:{configUpdated:!1}}}},logConfig:{logIds:Array.from(s)}};return this.callHandlers.push(n),this}};import{mergeProcessResults as de}from"@sentio/runtime";var b=class{constructor(e){this.config=e}callHandlers=[];provider;static bind(e){let t=new b(e);return p.INSTANCE.addValue(t),t}async configure(){let e=x(this.config.chainId);this.provider=await y.create(e)}onTransaction(e,t=w){let s={handler:async n=>{let r;try{r=H(n.transaction,this.provider)}catch(c){return console.error("error decoding transaction",c),de([])}let a=new m(this.config.chainId,"*",this.config.name??"*",r);return await e(r,a),a.stopAndGetResult()},fetchConfig:{filters:[],...t}};return this.callHandlers.push(s),this}};var S=class extends pe{name="FuelPlugin";handlers={callHandlers:[]};async configure(e){let t={callHandlers:[]};for(let s of p.INSTANCE.getValues()){await s.configure();let n=J.fromPartial({processorType:he,contract:{name:s.config.name,chainId:s.config.chainId.toString(),address:s.config.address||"*",abi:""},startBlock:s.config.startBlock,endBlock:s.config.endBlock});for(let r of s.callHandlers){let a=t.callHandlers.push(r.handler)-1;if(s instanceof I)if(r.logConfig?.logIds?.length)n.fuelLogConfigs.push({logIds:r.logConfig.logIds,handlerId:a});else{let c={handlerId:a,filters:r.fetchConfig?.filters||[]};n.fuelCallConfigs.push(c)}else if(s instanceof T){let c=r.assetConfig;n.assetConfigs.push({filters:c?.filters||[],handlerId:a})}else if(s instanceof b){let c={handlerId:a,filters:[]};n.fuelCallConfigs.push(c),n.contract.address="*"}}e.contractConfigs.push(n)}this.handlers=t}supportedHandlers=[B.FUEL_CALL];processBinding(e){switch(e.handlerType){case B.FUEL_CALL:return this.processTransaction(e);default:throw new P.ServerError(P.Status.INVALID_ARGUMENT,"No handle type registered "+e.handlerType)}}async start(e){}stateDiff(e){return Z.INSTANCE.getValues().length!==e.templateInstances.length}async processTransaction(e){if(!e.data?.fuelCall?.transaction)throw new P.ServerError(P.Status.INVALID_ARGUMENT,"transaction can't be null");let t=e.data.fuelCall,s=[];for(let n of e.handlerIds){let r=this.handlers.callHandlers[n](t).catch(a=>{throw new P.ServerError(P.Status.INTERNAL,"error processing transaction: "+JSON.stringify(t.transaction)+`
|
|
3
3
|
`+ue(a))});fe.execution.sequential&&await r,s.push(r)}return ge(await Promise.all(s))}};me.INSTANCE.register(new S);var oe=k($(),1);var te=class extends I{constructor(e,t){t||(t={chainId:oe.FuelChainId.FUEL_MAINNET,address:"*"}),t.abi=e,super(t),p.INSTANCE.addValue(this)}},se=class{args;returnValue;argsObject;logs};export{p as a,ce as b,x as c,R as d,m as e,w as f,H as g,E as h,T as i,I as j,b as k,S as l,te as m,se as n};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-RDBX2EIJ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as _}from"./chunk-LBLFXPCY.js";import{D as u,Hc as I,W as f,Zc as T,bd as b,gd as C,pc as h}from"./chunk-
|
|
2
|
+
import{a as _}from"./chunk-LBLFXPCY.js";import{D as u,Hc as I,W as f,Zc as T,bd as b,gd as C,pc as h}from"./chunk-JTQMVYTS.js";import{e as y,g}from"./chunk-LLHU72AA.js";var l=class extends b{constructor(e,s,r,n){super({});this.chainId=e;this.name=s;this.tx=r;this.address=n}getMetaDataInternal(e,s){return{address:this.address,contractName:this.name,blockNumber:BigInt(this.tx.status?.block_time??0),transactionIndex:0,transactionHash:this.tx.txid,chainId:this.getChainId(),name:e,logIndex:0,labels:h(s)}}getChainId(){return this.chainId}};import{ListStateStorage as x}from"@sentio/runtime";var m=class extends x{},c=m;g(c,"INSTANCE",new m);var d=class{constructor(t){this.config=t}callHandlers=[];static bind(t){let e=new d(t);return c.INSTANCE.addValue(e),e}onTransaction(t,e){let s={handler:async r=>{let n=r.transaction,o=new l(this.config.chainId,this.config.name??this.config.address??"",n,this.config.address??n.vout[0].scriptpubkey_address);return await t(n,o),o.stopAndGetResult()},filter:e};return this.callHandlers.push(s),this}};import{errorString as k,GLOBAL_CONFIG as R,mergeProcessResults as B,Plugin as N,PluginManager as P,USER_PROCESSOR as v}from"@sentio/runtime";var a=y(I(),1);var p=class extends N{name="BTCPlugin";handlers={txHandlers:[]};async configure(t){let e={txHandlers:[]};for(let s of c.INSTANCE.getValues()){let r=f.fromPartial({processorType:v,contract:{name:s.config.name,chainId:s.config.chainId.toString(),address:s.config.address||"*",abi:""},startBlock:s.config.startBlock,endBlock:s.config.endBlock});for(let n of s.callHandlers){let o=e.txHandlers.push(n.handler)-1;n.filter?r.btcTransactionConfigs.push({filters:[{fieldFilters:F(n.filter)}],handlerId:o}):r.btcTransactionConfigs.push({filters:[{address:r.contract?.address||"*"}],handlerId:o})}t.contractConfigs.push(r)}this.handlers=e}supportedHandlers=[u.BTC_TRANSACTION];processBinding(t){switch(t.handlerType){case u.BTC_TRANSACTION:return this.processTransaction(t);default:throw new a.ServerError(a.Status.INVALID_ARGUMENT,"No handle type registered "+t.handlerType)}}async start(t){}stateDiff(t){return C.INSTANCE.getValues().length!==t.templateInstances.length}async processTransaction(t){if(!t.data?.btcTransaction)throw new a.ServerError(a.Status.INVALID_ARGUMENT,"BTCEvents can't be null");let e=[],s=t.data?.btcTransaction;for(let r of t.handlerIds){let n=this.handlers.txHandlers[r](t.data?.btcTransaction).catch(o=>{throw new a.ServerError(a.Status.INTERNAL,"error processing transaction: "+JSON.stringify(s)+`
|
|
3
3
|
`+k(o))});R.execution.sequential&&await n,e.push(n)}return B(await Promise.all(e))}};P.INSTANCE.register(new p);function F(i){return{filters:(_(i)?i:[i]).map(e=>{let{field:s,...r}=e;return{field:s,...S(r)}})}}function S(i){return Object.entries(i).reduce((t,[e,s])=>(s!==void 0&&(t[e]=T(s)),t),{})}export{l as a,c as b,d as c,p as d};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-VEVTWG5S.js.map
|