@sentio/sdk-bundle 2.53.1 → 2.53.2
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/0x4.js +3 -0
- package/lib/aptos/builtin/0x4.js.map +1 -0
- package/lib/aptos/builtin/index.js +1 -1
- package/lib/aptos/builtin/index.js.map +1 -1
- package/lib/{chunk-LHGVTXBD.js → chunk-2LEC6F4V.js} +2 -2
- package/lib/chunk-43QOQ35O.js +3 -0
- package/lib/chunk-43QOQ35O.js.map +1 -0
- package/lib/{chunk-JHVQ6HK3.js → chunk-BV6WCIY7.js} +2 -2
- package/lib/{chunk-JHVQ6HK3.js.map → chunk-BV6WCIY7.js.map} +1 -1
- package/lib/{chunk-NQ6WJUYA.js → chunk-JBAOTXZI.js} +2 -2
- package/lib/{chunk-L7F5TU3N.js → chunk-VOA4VQWT.js} +2 -2
- 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/index.js +1 -1
- package/lib/testing/index.js +1 -1
- package/package.json +3 -2
- /package/lib/{chunk-LHGVTXBD.js.map → chunk-2LEC6F4V.js.map} +0 -0
- /package/lib/{chunk-NQ6WJUYA.js.map → chunk-JBAOTXZI.js.map} +0 -0
- /package/lib/{chunk-L7F5TU3N.js.map → chunk-VOA4VQWT.js.map} +0 -0
package/lib/sui/builtin/0x1.js
CHANGED
|
@@ -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-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-2LEC6F4V.js";import"../../chunk-BV6WCIY7.js";import"../../chunk-BIZ3C6X2.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-JEHI4F22.js";import"../../chunk-TQZKGM2L.js";import"../../chunk-FVXMJQ6E.js";import"../../chunk-LAYQPIXT.js";import"../../chunk-D3BOBS3X.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-D5X27FT5.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
|
package/lib/sui/builtin/0x2.js
CHANGED
|
@@ -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-
|
|
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-VOA4VQWT.js";import"../../chunk-2LEC6F4V.js";import"../../chunk-BV6WCIY7.js";import"../../chunk-BIZ3C6X2.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-JEHI4F22.js";import"../../chunk-TQZKGM2L.js";import"../../chunk-FVXMJQ6E.js";import"../../chunk-LAYQPIXT.js";import"../../chunk-D3BOBS3X.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-D5X27FT5.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
|
package/lib/sui/builtin/0x3.js
CHANGED
|
@@ -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-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../chunk-JBAOTXZI.js";import"../../chunk-VOA4VQWT.js";import"../../chunk-2LEC6F4V.js";import"../../chunk-BV6WCIY7.js";import"../../chunk-BIZ3C6X2.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-JEHI4F22.js";import"../../chunk-TQZKGM2L.js";import"../../chunk-FVXMJQ6E.js";import"../../chunk-LAYQPIXT.js";import"../../chunk-D3BOBS3X.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-D5X27FT5.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
|
package/lib/sui/builtin/index.js
CHANGED
|
@@ -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-
|
|
2
|
+
import{m as x}from"../../chunk-JBAOTXZI.js";import{_ as t}from"../../chunk-VOA4VQWT.js";import{t as r}from"../../chunk-2LEC6F4V.js";import"../../chunk-BV6WCIY7.js";import"../../chunk-BIZ3C6X2.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-JEHI4F22.js";import"../../chunk-TQZKGM2L.js";import"../../chunk-FVXMJQ6E.js";import"../../chunk-LAYQPIXT.js";import"../../chunk-D3BOBS3X.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-D5X27FT5.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
|
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-
|
|
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-BV6WCIY7.js";import{f as b,g as c,h as d}from"../chunk-BIZ3C6X2.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import"../chunk-JEHI4F22.js";import"../chunk-TQZKGM2L.js";import"../chunk-FVXMJQ6E.js";import"../chunk-LAYQPIXT.js";import{q as a}from"../chunk-D3BOBS3X.js";import"../chunk-SUCYR7EB.js";import"../chunk-FK3BI3F2.js";import"../chunk-D5X27FT5.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
|
package/lib/testing/index.js
CHANGED
|
@@ -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-JHVQ6HK3.js";import{f as p}from"../chunk-BIZ3C6X2.js";import{f as C}from"../chunk-2FUFAJZ5.js";import"../chunk-4JXRK4YH.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import{b as F}from"../chunk-JEHI4F22.js";import"../chunk-TQZKGM2L.js";import"../chunk-FVXMJQ6E.js";import"../chunk-TJL2USNJ.js";import"../chunk-LAYQPIXT.js";import{b as x}from"../chunk-JF6AVAND.js";import{a as _,d as g,n as I}from"../chunk-D3BOBS3X.js";import"../chunk-L5NRTNYJ.js";import"../chunk-SUCYR7EB.js";import{a as T}from"../chunk-FK3BI3F2.js";import{B as c,Ud as M}from"../chunk-D5X27FT5.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-BV6WCIY7.js";import{f as p}from"../chunk-BIZ3C6X2.js";import{f as C}from"../chunk-2FUFAJZ5.js";import"../chunk-4JXRK4YH.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import{b as F}from"../chunk-JEHI4F22.js";import"../chunk-TQZKGM2L.js";import"../chunk-FVXMJQ6E.js";import"../chunk-TJL2USNJ.js";import"../chunk-LAYQPIXT.js";import{b as x}from"../chunk-JF6AVAND.js";import{a as _,d as g,n as I}from"../chunk-D3BOBS3X.js";import"../chunk-L5NRTNYJ.js";import"../chunk-SUCYR7EB.js";import{a as T}from"../chunk-FK3BI3F2.js";import{B as c,Ud as M}from"../chunk-D5X27FT5.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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentio/sdk-bundle",
|
|
3
|
-
"version": "2.53.
|
|
3
|
+
"version": "2.53.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"./aptos/builtin": "./lib/aptos/builtin/index.js",
|
|
25
25
|
"./aptos/builtin/0x1": "./lib/aptos/builtin/0x1.js",
|
|
26
26
|
"./aptos/builtin/0x3": "./lib/aptos/builtin/0x3.js",
|
|
27
|
+
"./aptos/builtin/0x4": "./lib/aptos/builtin/0x4.js",
|
|
27
28
|
"./solana": "./lib/solana/index.js",
|
|
28
29
|
"./solana/builtin": "./lib/solana/builtin/index.js",
|
|
29
30
|
"./solana/codegen": "./lib/solana/codegen/index.js",
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"{lib,assets}"
|
|
47
48
|
],
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@sentio/runtime": "^2.53.
|
|
50
|
+
"@sentio/runtime": "^2.53.2"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {},
|
|
52
53
|
"devDependencies": {},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|