@sentio/sdk-bundle 2.54.0-rc.6 → 2.54.0-rc.7

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 (74) 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/0x4.js +1 -1
  4. package/lib/aptos/builtin/index.js +1 -1
  5. package/lib/aptos/ext/index.js +1 -1
  6. package/lib/aptos/index.js +1 -1
  7. package/lib/btc/index.js +1 -1
  8. package/lib/{chunk-QTCDE2GU.js → chunk-2CQS5HK3.js} +2 -2
  9. package/lib/{chunk-A4YRPZLY.js → chunk-2JVSMCLK.js} +2 -2
  10. package/lib/{chunk-V75BIZJU.js → chunk-3DJLSC7V.js} +2 -2
  11. package/lib/{chunk-56V52WZM.js → chunk-65MPQCTW.js} +149 -149
  12. package/lib/{chunk-56V52WZM.js.map → chunk-65MPQCTW.js.map} +1 -1
  13. package/lib/{chunk-BPG6KWIM.js → chunk-AKIQK7JC.js} +2 -2
  14. package/lib/{chunk-BFVFGZEI.js → chunk-ASNZI46T.js} +2 -2
  15. package/lib/{chunk-AYUGO4ZL.js → chunk-FVVRBEED.js} +2 -2
  16. package/lib/{chunk-NRJYMZFI.js → chunk-GU4TPSPR.js} +2 -2
  17. package/lib/{chunk-NMWWWJT4.js → chunk-JP3MMFTY.js} +2 -2
  18. package/lib/{chunk-A33OLCNM.js → chunk-KZKMKSHB.js} +2 -2
  19. package/lib/{chunk-NXSDM7AP.js → chunk-LN2JXPL7.js} +2 -2
  20. package/lib/{chunk-2VXRVDVM.js → chunk-LTO76VZ6.js} +2 -2
  21. package/lib/{chunk-MTBSRF4K.js → chunk-PFKCAUCZ.js} +2 -2
  22. package/lib/{chunk-357BWWZX.js → chunk-R7QHRD3S.js} +2 -2
  23. package/lib/{chunk-P6X4NV3E.js → chunk-S2UIQSUU.js} +2 -2
  24. package/lib/{chunk-FFFMAB3M.js → chunk-STB544ZB.js} +2 -2
  25. package/lib/chunk-SXKPECM5.js +6 -0
  26. package/lib/chunk-SXKPECM5.js.map +1 -0
  27. package/lib/{chunk-ZILHIF3D.js → chunk-U2LHSDOO.js} +2 -2
  28. package/lib/{chunk-6ZYQTTM6.js → chunk-VP5JD634.js} +2 -2
  29. package/lib/{chunk-YNKRVNKD.js → chunk-XEHUA5RI.js} +2 -2
  30. package/lib/core/index.js +1 -1
  31. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  32. package/lib/eth/builtin/erc1155.js +1 -1
  33. package/lib/eth/builtin/erc20.js +1 -1
  34. package/lib/eth/builtin/erc721.js +1 -1
  35. package/lib/eth/builtin/index.js +1 -1
  36. package/lib/eth/builtin/weth9.js +1 -1
  37. package/lib/eth/index.js +1 -1
  38. package/lib/fuel/index.js +1 -1
  39. package/lib/index.js +1 -1
  40. package/lib/move/index.js +1 -1
  41. package/lib/solana/builtin/index.js +1 -1
  42. package/lib/solana/index.js +1 -1
  43. package/lib/stark/index.js +1 -1
  44. package/lib/store/index.js +1 -1
  45. package/lib/sui/builtin/0x1.js +1 -1
  46. package/lib/sui/builtin/0x2.js +1 -1
  47. package/lib/sui/builtin/0x3.js +1 -1
  48. package/lib/sui/builtin/index.js +1 -1
  49. package/lib/sui/ext/index.js +1 -1
  50. package/lib/sui/index.js +1 -1
  51. package/lib/testing/index.js +1 -1
  52. package/lib/testing/index.js.map +1 -1
  53. package/lib/utils/index.js +1 -1
  54. package/package.json +2 -2
  55. package/lib/chunk-DTS5OSCM.js +0 -5
  56. package/lib/chunk-DTS5OSCM.js.map +0 -1
  57. /package/lib/{chunk-QTCDE2GU.js.map → chunk-2CQS5HK3.js.map} +0 -0
  58. /package/lib/{chunk-A4YRPZLY.js.map → chunk-2JVSMCLK.js.map} +0 -0
  59. /package/lib/{chunk-V75BIZJU.js.map → chunk-3DJLSC7V.js.map} +0 -0
  60. /package/lib/{chunk-BPG6KWIM.js.map → chunk-AKIQK7JC.js.map} +0 -0
  61. /package/lib/{chunk-BFVFGZEI.js.map → chunk-ASNZI46T.js.map} +0 -0
  62. /package/lib/{chunk-AYUGO4ZL.js.map → chunk-FVVRBEED.js.map} +0 -0
  63. /package/lib/{chunk-NRJYMZFI.js.map → chunk-GU4TPSPR.js.map} +0 -0
  64. /package/lib/{chunk-NMWWWJT4.js.map → chunk-JP3MMFTY.js.map} +0 -0
  65. /package/lib/{chunk-A33OLCNM.js.map → chunk-KZKMKSHB.js.map} +0 -0
  66. /package/lib/{chunk-NXSDM7AP.js.map → chunk-LN2JXPL7.js.map} +0 -0
  67. /package/lib/{chunk-2VXRVDVM.js.map → chunk-LTO76VZ6.js.map} +0 -0
  68. /package/lib/{chunk-MTBSRF4K.js.map → chunk-PFKCAUCZ.js.map} +0 -0
  69. /package/lib/{chunk-357BWWZX.js.map → chunk-R7QHRD3S.js.map} +0 -0
  70. /package/lib/{chunk-P6X4NV3E.js.map → chunk-S2UIQSUU.js.map} +0 -0
  71. /package/lib/{chunk-FFFMAB3M.js.map → chunk-STB544ZB.js.map} +0 -0
  72. /package/lib/{chunk-ZILHIF3D.js.map → chunk-U2LHSDOO.js.map} +0 -0
  73. /package/lib/{chunk-6ZYQTTM6.js.map → chunk-VP5JD634.js.map} +0 -0
  74. /package/lib/{chunk-YNKRVNKD.js.map → chunk-XEHUA5RI.js.map} +0 -0
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{$ as L,A as k,Aa as ka,B as l,Ba as la,C as m,Ca as ma,D as n,Da as na,E as o,Ea as oa,F as p,Fa as pa,G as q,Ga as qa,H as r,Ha as ra,I as s,Ia as sa,J as t,Ja as ta,K as u,Ka as ua,L as v,La as va,M as w,Ma as wa,N as x,Na as xa,O as y,Oa as ya,P as z,Pa as za,Q as A,Qa as Aa,R as B,Ra as Ba,S as C,Sa as Ca,T as D,Ta as Da,U as E,Ua as Ea,V as F,Va as Fa,W as G,Wa as Ga,X as H,Xa as Ha,Y as I,Z as J,_ as K,aa as M,ba as N,ca as O,da as P,ea as Q,fa as R,ga as S,ha as T,ia as U,ja as V,ka as W,la as X,ma as Y,na as Z,oa as _,pa as $,q as a,qa as aa,r as b,ra as ba,s as c,sa as ca,t as d,ta as da,u as e,ua as ea,v as f,va as fa,w as g,wa as ga,x as h,xa as ha,y as i,ya as ia,z as j,za as ja}from"../../chunk-357BWWZX.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-A33OLCNM.js";import"../../chunk-P6X4NV3E.js";import"../../chunk-QTCDE2GU.js";import"../../chunk-2VXRVDVM.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-BFVFGZEI.js";import"../../chunk-A4YRPZLY.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-56V52WZM.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{p as account,a as acl,B as aggregator,ra as aggregator_factory,S as aggregator_v2,b as any$,T as aptos_account,C as aptos_coin,ha as aptos_governance,D as big_vector,E as bit_vector,h as block,u as bls12381,ia as bls12381_algebra,U as bn254_algebra,F as capability,v as chain_id,L as chain_status,d as code,e as coin,G as comparator,V as config_buffer,ja as consensus_config,M as copyable_any,aa as crypto_algebra,da as delegation_pool,Ga as dispatchable_fungible_asset,c as dkg,q as ed25519,i as event,ka as execution_config,w as features,W as fixed_point32,X as fixed_point64,Y as function_info,ba as fungible_asset,N as gas_schedule,r as genesis,sa as governance_proposal,f as guid,va as jwk_consensus_config,g as jwks,ea as keyless_account,Ha as loadAllTypes,O as managed_coin,Z as multi_ed25519,la as multisig_account,l as object$,za as object_code_deployment,m as option,ta as optional_aggregator,x as pool_u64,ma as pool_u64_unbound,Aa as primary_fungible_store,H as randomness,Ca as randomness_api_v0_config,pa as randomness_config,Da as randomness_config_seqnum,fa as reconfiguration,xa as reconfiguration_state,na as resource_account,P as ristretto255,Fa as ristretto255_bulletproofs,wa as ristretto255_elgamal,ya as ristretto255_pedersen,y as secp256k1,I as simple_map,J as smart_table,Q as smart_vector,j as stake,ca as staking_config,oa as staking_contract,_ as staking_proxy,$ as state_storage,K as storage_gas,n as string$,R as string_utils,k as table,qa as table_with_length,z as timestamp,ua as transaction_context,ga as transaction_fee,Ba as transaction_validation,A as type_info,Ea as validator_consensus_info,s as version,t as vesting,o as voting};
2
+ import{$ as L,A as k,Aa as ka,B as l,Ba as la,C as m,Ca as ma,D as n,Da as na,E as o,Ea as oa,F as p,Fa as pa,G as q,Ga as qa,H as r,Ha as ra,I as s,Ia as sa,J as t,Ja as ta,K as u,Ka as ua,L as v,La as va,M as w,Ma as wa,N as x,Na as xa,O as y,Oa as ya,P as z,Pa as za,Q as A,Qa as Aa,R as B,Ra as Ba,S as C,Sa as Ca,T as D,Ta as Da,U as E,Ua as Ea,V as F,Va as Fa,W as G,Wa as Ga,X as H,Xa as Ha,Y as I,Z as J,_ as K,aa as M,ba as N,ca as O,da as P,ea as Q,fa as R,ga as S,ha as T,ia as U,ja as V,ka as W,la as X,ma as Y,na as Z,oa as _,pa as $,q as a,qa as aa,r as b,ra as ba,s as c,sa as ca,t as d,ta as da,u as e,ua as ea,v as f,va as fa,w as g,wa as ga,x as h,xa as ha,y as i,ya as ia,z as j,za as ja}from"../../chunk-R7QHRD3S.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-KZKMKSHB.js";import"../../chunk-S2UIQSUU.js";import"../../chunk-2CQS5HK3.js";import"../../chunk-LTO76VZ6.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-ASNZI46T.js";import"../../chunk-2JVSMCLK.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-65MPQCTW.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{p as account,a as acl,B as aggregator,ra as aggregator_factory,S as aggregator_v2,b as any$,T as aptos_account,C as aptos_coin,ha as aptos_governance,D as big_vector,E as bit_vector,h as block,u as bls12381,ia as bls12381_algebra,U as bn254_algebra,F as capability,v as chain_id,L as chain_status,d as code,e as coin,G as comparator,V as config_buffer,ja as consensus_config,M as copyable_any,aa as crypto_algebra,da as delegation_pool,Ga as dispatchable_fungible_asset,c as dkg,q as ed25519,i as event,ka as execution_config,w as features,W as fixed_point32,X as fixed_point64,Y as function_info,ba as fungible_asset,N as gas_schedule,r as genesis,sa as governance_proposal,f as guid,va as jwk_consensus_config,g as jwks,ea as keyless_account,Ha as loadAllTypes,O as managed_coin,Z as multi_ed25519,la as multisig_account,l as object$,za as object_code_deployment,m as option,ta as optional_aggregator,x as pool_u64,ma as pool_u64_unbound,Aa as primary_fungible_store,H as randomness,Ca as randomness_api_v0_config,pa as randomness_config,Da as randomness_config_seqnum,fa as reconfiguration,xa as reconfiguration_state,na as resource_account,P as ristretto255,Fa as ristretto255_bulletproofs,wa as ristretto255_elgamal,ya as ristretto255_pedersen,y as secp256k1,I as simple_map,J as smart_table,Q as smart_vector,j as stake,ca as staking_config,oa as staking_contract,_ as staking_proxy,$ as state_storage,K as storage_gas,n as string$,R as string_utils,k as table,qa as table_with_length,z as timestamp,ua as transaction_context,ga as transaction_fee,Ba as transaction_validation,A as type_info,Ea as validator_consensus_info,s as version,t as vesting,o as voting};
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}from"../../chunk-NMWWWJT4.js";import"../../chunk-357BWWZX.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-A33OLCNM.js";import"../../chunk-P6X4NV3E.js";import"../../chunk-QTCDE2GU.js";import"../../chunk-2VXRVDVM.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-BFVFGZEI.js";import"../../chunk-A4YRPZLY.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-56V52WZM.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{f as loadAllTypes,b as property_map,a as token,c as token_coin_swap,e as token_event_store,d as token_transfers};
2
+ import{a,b,c,d,e,f}from"../../chunk-JP3MMFTY.js";import"../../chunk-R7QHRD3S.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-KZKMKSHB.js";import"../../chunk-S2UIQSUU.js";import"../../chunk-2CQS5HK3.js";import"../../chunk-LTO76VZ6.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-ASNZI46T.js";import"../../chunk-2JVSMCLK.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-65MPQCTW.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{f as loadAllTypes,b as property_map,a as token,c as token_coin_swap,e as token_event_store,d as token_transfers};
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{a,b,c,d,e,f}from"../../chunk-BPG6KWIM.js";import"../../chunk-357BWWZX.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-A33OLCNM.js";import"../../chunk-P6X4NV3E.js";import"../../chunk-QTCDE2GU.js";import"../../chunk-2VXRVDVM.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-BFVFGZEI.js";import"../../chunk-A4YRPZLY.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-56V52WZM.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{d as aptos_token,c as collection,f as loadAllTypes,e as property_map,b as royalty,a as token};
2
+ import{a,b,c,d,e,f}from"../../chunk-AKIQK7JC.js";import"../../chunk-R7QHRD3S.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-KZKMKSHB.js";import"../../chunk-S2UIQSUU.js";import"../../chunk-2CQS5HK3.js";import"../../chunk-LTO76VZ6.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-ASNZI46T.js";import"../../chunk-2JVSMCLK.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-65MPQCTW.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";export{d as aptos_token,c as collection,f as loadAllTypes,e as property_map,b as royalty,a as token};
3
3
  //# sourceMappingURL=0x4.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{g as t}from"../../chunk-NMWWWJT4.js";import{g as x}from"../../chunk-BPG6KWIM.js";import{Ya as r}from"../../chunk-357BWWZX.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-A33OLCNM.js";import"../../chunk-P6X4NV3E.js";import"../../chunk-QTCDE2GU.js";import"../../chunk-2VXRVDVM.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-BFVFGZEI.js";import"../../chunk-A4YRPZLY.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-56V52WZM.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";import("node:process").then(o=>o.stdout.write(""));export{r as _0x1,t as _0x3,x as _0x4};
2
+ import{g as t}from"../../chunk-JP3MMFTY.js";import{g as x}from"../../chunk-AKIQK7JC.js";import{Ya as r}from"../../chunk-R7QHRD3S.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-KZKMKSHB.js";import"../../chunk-S2UIQSUU.js";import"../../chunk-2CQS5HK3.js";import"../../chunk-LTO76VZ6.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-ASNZI46T.js";import"../../chunk-2JVSMCLK.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-65MPQCTW.js";import"../../chunk-RA75ESSD.js";import"../../chunk-G5BIPHMS.js";import("node:process").then(o=>o.stdout.write(""));export{r as _0x1,t as _0x3,x as _0x4};
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 p,b as g}from"../../chunk-LVWOFGF2.js";import{$a as w,Za as l,_a as a,ab as u,bb as y,cb as d,f as c}from"../../chunk-357BWWZX.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-A33OLCNM.js";import"../../chunk-P6X4NV3E.js";import"../../chunk-QTCDE2GU.js";import"../../chunk-2VXRVDVM.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-BFVFGZEI.js";import"../../chunk-A4YRPZLY.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-56V52WZM.js";import"../../chunk-RA75ESSD.js";import{a as r}from"../../chunk-G5BIPHMS.js";var s=class{static{r(this,"CoinList")}calculateValueInUsd(t,i,n,o=c.MAIN_NET){return d(t,i,n,o)}async getCoinInfo(t){return u(t)}whiteListed(t){return a().has(t)}whitelistCoins(){return a()}},m=new s,f=class extends p{static{r(this,"AptosDex")}coinList=new s};async function E(e,t,i,n,o){return g(m,e,t,i,n,o)}r(E,"getPairValue");import("node:process").then(e=>e.stdout.write(""));function h(e,t,i){if(!t.changes)throw Error("No resource change found, did you forget set fetchOption to { resourceChanges: true } ");for(let n of t.changes){if(n.type!=="write_resource")continue;let o=n;if(o.address===e.guid.account_address&&o.data.type===`0x1::coin::CoinStore<${i}>`)return{value:BigInt(o.data.data.coin.value)}}}r(h,"findNewCoinBalances");import("node:process").then(e=>e.stdout.write(""));import("node:process").then(e=>e.stdout.write(""));export{m as AptosCoinList,f as AptosDex,s as CoinList,h as findNewCoinBalances,E as getPairValue,y as getPriceForToken,u as getTokenInfoWithFallback,l as initTokenList,w as isWhiteListToken,d as tokenTokenValueInUsd,a as whitelistTokens};
2
+ import{a as p,b as g}from"../../chunk-LVWOFGF2.js";import{$a as w,Za as l,_a as a,ab as u,bb as y,cb as d,f as c}from"../../chunk-R7QHRD3S.js";import"../../chunk-4JXRK4YH.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-KZKMKSHB.js";import"../../chunk-S2UIQSUU.js";import"../../chunk-2CQS5HK3.js";import"../../chunk-LTO76VZ6.js";import"../../chunk-4WNGQ3EZ.js";import"../../chunk-ASNZI46T.js";import"../../chunk-2JVSMCLK.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-FK3BI3F2.js";import"../../chunk-65MPQCTW.js";import"../../chunk-RA75ESSD.js";import{a as r}from"../../chunk-G5BIPHMS.js";var s=class{static{r(this,"CoinList")}calculateValueInUsd(t,i,n,o=c.MAIN_NET){return d(t,i,n,o)}async getCoinInfo(t){return u(t)}whiteListed(t){return a().has(t)}whitelistCoins(){return a()}},m=new s,f=class extends p{static{r(this,"AptosDex")}coinList=new s};async function E(e,t,i,n,o){return g(m,e,t,i,n,o)}r(E,"getPairValue");import("node:process").then(e=>e.stdout.write(""));function h(e,t,i){if(!t.changes)throw Error("No resource change found, did you forget set fetchOption to { resourceChanges: true } ");for(let n of t.changes){if(n.type!=="write_resource")continue;let o=n;if(o.address===e.guid.account_address&&o.data.type===`0x1::coin::CoinStore<${i}>`)return{value:BigInt(o.data.data.coin.value)}}}r(h,"findNewCoinBalances");import("node:process").then(e=>e.stdout.write(""));import("node:process").then(e=>e.stdout.write(""));export{m as AptosCoinList,f as AptosDex,s as CoinList,h as findNewCoinBalances,E as getPairValue,y as getPriceForToken,u as getTokenInfoWithFallback,l as initTokenList,w as isWhiteListToken,d as tokenTokenValueInUsd,a as whitelistTokens};
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 b,b as c,c as d,d as e,db as r,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p,p as q}from"../chunk-357BWWZX.js";import"../chunk-4JXRK4YH.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import"../chunk-A33OLCNM.js";import"../chunk-P6X4NV3E.js";import"../chunk-QTCDE2GU.js";import"../chunk-2VXRVDVM.js";import"../chunk-4WNGQ3EZ.js";import{q as a}from"../chunk-BFVFGZEI.js";import"../chunk-A4YRPZLY.js";import"../chunk-SUCYR7EB.js";import"../chunk-FK3BI3F2.js";import"../chunk-56V52WZM.js";import"../chunk-RA75ESSD.js";import"../chunk-G5BIPHMS.js";export{m as AptosBaseProcessor,i as AptosBindOptions,j as AptosContext,o as AptosGlobalProcessor,n as AptosModulesProcessor,g as AptosNetwork,r as AptosPlugin,q as AptosResourceProcessorTemplate,k as AptosResourcesContext,p as AptosResourcesProcessor,l as AptosTransactionProcessor,a as BUILTIN_TYPES,b as MoveCoder,h as MovementNetwork,e as RichAptosClient,f as RichAptosClientWithContext,c as defaultMoveCoder,d as defaultMoveCoderForClient};
2
+ import{a as b,b as c,c as d,d as e,db as r,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p,p as q}from"../chunk-R7QHRD3S.js";import"../chunk-4JXRK4YH.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import"../chunk-KZKMKSHB.js";import"../chunk-S2UIQSUU.js";import"../chunk-2CQS5HK3.js";import"../chunk-LTO76VZ6.js";import"../chunk-4WNGQ3EZ.js";import{q as a}from"../chunk-ASNZI46T.js";import"../chunk-2JVSMCLK.js";import"../chunk-SUCYR7EB.js";import"../chunk-FK3BI3F2.js";import"../chunk-65MPQCTW.js";import"../chunk-RA75ESSD.js";import"../chunk-G5BIPHMS.js";export{m as AptosBaseProcessor,i as AptosBindOptions,j as AptosContext,o as AptosGlobalProcessor,n as AptosModulesProcessor,g as AptosNetwork,r as AptosPlugin,q as AptosResourceProcessorTemplate,k as AptosResourcesContext,p as AptosResourcesProcessor,l as AptosTransactionProcessor,a as BUILTIN_TYPES,b as MoveCoder,h as MovementNetwork,e as RichAptosClient,f as RichAptosClientWithContext,c as defaultMoveCoder,d as defaultMoveCoderForClient};
3
3
  //# sourceMappingURL=index.js.map
package/lib/btc/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 t,b as e,c as m,d as p,e as f,f as r}from"../chunk-NRJYMZFI.js";import"../chunk-4WNGQ3EZ.js";import"../chunk-56V52WZM.js";import"../chunk-RA75ESSD.js";import"../chunk-G5BIPHMS.js";import("node:process").then(o=>o.stdout.write(""));export{e as BTCBlockContext,t as BTCContext,r as BTCPlugin,p as BTCProcessor,m as BTCProcessorState,f as filters2Proto};
2
+ import{a as t,b as e,c as m,d as p,e as f,f as r}from"../chunk-GU4TPSPR.js";import"../chunk-4WNGQ3EZ.js";import"../chunk-65MPQCTW.js";import"../chunk-RA75ESSD.js";import"../chunk-G5BIPHMS.js";import("node:process").then(o=>o.stdout.write(""));export{e as BTCBlockContext,t as BTCContext,r as BTCPlugin,p as BTCProcessor,m as BTCProcessorState,f as filters2Proto};
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{B as f,C as p,U as O,V as R,W as h,e as m,f as b,i as s,o as i,t as T,w,x as P,y as v,z as y}from"./chunk-2VXRVDVM.js";import{a as l,e as k}from"./chunk-G5BIPHMS.js";var j={};k(j,{EACAggregatorProxyBoundContractView:()=>C,EACAggregatorProxyContractView:()=>x,EACAggregatorProxyProcessor:()=>u,EACAggregatorProxyProcessorTemplate:()=>A,EACAggregatorProxy__factory:()=>p,getEACAggregatorProxyContract:()=>d,getEACAggregatorProxyContractOnContext:()=>D,mockAnswerUpdatedLog:()=>I,mockNewRoundLog:()=>F,mockOwnershipTransferRequestedLog:()=>N,mockOwnershipTransferredLog:()=>B});var g=p.connect("0x0",R),x=class extends m{static{l(this,"EACAggregatorProxyContractView")}constructor(t){super(t),this.callStatic.contract=t}async accessController(t,e,r){try{return await this.contract.getFunction("accessController()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async aggregator(t,e,r){try{return await this.contract.getFunction("aggregator()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async decimals(t,e,r){try{return await this.contract.getFunction("decimals()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async description(t,e,r){try{return await this.contract.getFunction("description()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async getAnswer(t,e,r,a){try{return await this.contract.getFunction("getAnswer(uint256)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async getRoundData(t,e,r,a){try{return await this.contract.getFunction("getRoundData(uint80)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async getTimestamp(t,e,r,a){try{return await this.contract.getFunction("getTimestamp(uint256)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async latestAnswer(t,e,r){try{return await this.contract.getFunction("latestAnswer()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async latestRound(t,e,r){try{return await this.contract.getFunction("latestRound()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async latestRoundData(t,e,r){try{return await this.contract.getFunction("latestRoundData()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async latestTimestamp(t,e,r){try{return await this.contract.getFunction("latestTimestamp()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async owner(t,e,r){try{return await this.contract.getFunction("owner()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async phaseAggregators(t,e,r,a){try{return await this.contract.getFunction("phaseAggregators(uint16)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async phaseId(t,e,r){try{return await this.contract.getFunction("phaseId()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async proposedAggregator(t,e,r){try{return await this.contract.getFunction("proposedAggregator()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async proposedGetRoundData(t,e,r,a){try{return await this.contract.getFunction("proposedGetRoundData(uint80)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async proposedLatestRoundData(t,e,r){try{return await this.contract.getFunction("proposedLatestRoundData()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async version(t,e,r){try{return await this.contract.getFunction("version()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}callStatic={contract:this.contract,async acceptOwnership(t,e,r){try{return await this.contract.getFunction("acceptOwnership()").staticCall(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}},async confirmAggregator(t,e,r,a){try{return await this.contract.getFunction("confirmAggregator(address)").staticCall(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}},async proposeAggregator(t,e,r,a){try{return await this.contract.getFunction("proposeAggregator(address)").staticCall(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}},async setController(t,e,r,a){try{return await this.contract.getFunction("setController(address)").staticCall(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}},async transferOwnership(t,e,r,a){try{return await this.contract.getFunction("transferOwnership(address)").staticCall(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}};encodeCall={acceptOwnership(t){return i(t,"acceptOwnership","function acceptOwnership()",[])},accessController(t){return i(t,"accessController","function accessController()",[])},aggregator(t){return i(t,"aggregator","function aggregator()",[])},confirmAggregator(t,e){return i(e,"confirmAggregator","function confirmAggregator(address)",[t])},decimals(t){return i(t,"decimals","function decimals()",[])},description(t){return i(t,"description","function description()",[])},getAnswer(t,e){return i(e,"getAnswer","function getAnswer(uint256)",[t])},getRoundData(t,e){return i(e,"getRoundData","function getRoundData(uint80)",[t])},getTimestamp(t,e){return i(e,"getTimestamp","function getTimestamp(uint256)",[t])},latestAnswer(t){return i(t,"latestAnswer","function latestAnswer()",[])},latestRound(t){return i(t,"latestRound","function latestRound()",[])},latestRoundData(t){return i(t,"latestRoundData","function latestRoundData()",[])},latestTimestamp(t){return i(t,"latestTimestamp","function latestTimestamp()",[])},owner(t){return i(t,"owner","function owner()",[])},phaseAggregators(t,e){return i(e,"phaseAggregators","function phaseAggregators(uint16)",[t])},phaseId(t){return i(t,"phaseId","function phaseId()",[])},proposeAggregator(t,e){return i(e,"proposeAggregator","function proposeAggregator(address)",[t])},proposedAggregator(t){return i(t,"proposedAggregator","function proposedAggregator()",[])},proposedGetRoundData(t,e){return i(e,"proposedGetRoundData","function proposedGetRoundData(uint80)",[t])},proposedLatestRoundData(t){return i(t,"proposedLatestRoundData","function proposedLatestRoundData()",[])},setController(t,e){return i(e,"setController","function setController(address)",[t])},transferOwnership(t,e){return i(e,"transferOwnership","function transferOwnership(address)",[t])},version(t){return i(t,"version","function version()",[])}}},C=class extends b{static{l(this,"EACAggregatorProxyBoundContractView")}async accessController(t){return await this.view.accessController({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async aggregator(t){return await this.view.aggregator({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async decimals(t){return await this.view.decimals({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async description(t){return await this.view.description({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async getAnswer(t,e){return await this.view.getAnswer(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async getRoundData(t,e){return await this.view.getRoundData(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async getTimestamp(t,e){return await this.view.getTimestamp(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async latestAnswer(t){return await this.view.latestAnswer({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async latestRound(t){return await this.view.latestRound({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async latestRoundData(t){return await this.view.latestRoundData({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async latestTimestamp(t){return await this.view.latestTimestamp({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async owner(t){return await this.view.owner({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async phaseAggregators(t,e){return await this.view.phaseAggregators(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async phaseId(t){return await this.view.phaseId({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async proposedAggregator(t){return await this.view.proposedAggregator({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async proposedGetRoundData(t,e){return await this.view.proposedGetRoundData(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async proposedLatestRoundData(t){return await this.view.proposedLatestRoundData({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async version(t){return await this.view.version({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}callStatic={view:this.view,context:this.context,async acceptOwnership(t){return await this.view.callStatic.acceptOwnership({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())},async confirmAggregator(t,e){return await this.view.callStatic.confirmAggregator(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())},async proposeAggregator(t,e){return await this.view.callStatic.proposeAggregator(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())},async setController(t,e){return await this.view.callStatic.setController(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())},async transferOwnership(t,e){return await this.view.callStatic.transferOwnership(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}};encodeCall={view:this.view,context:this.context,acceptOwnership(t){return this.view.encodeCall.acceptOwnership({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},accessController(t){return this.view.encodeCall.accessController({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},aggregator(t){return this.view.encodeCall.aggregator({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},confirmAggregator(t,e){return this.view.encodeCall.confirmAggregator(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},decimals(t){return this.view.encodeCall.decimals({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},description(t){return this.view.encodeCall.description({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},getAnswer(t,e){return this.view.encodeCall.getAnswer(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},getRoundData(t,e){return this.view.encodeCall.getRoundData(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},getTimestamp(t,e){return this.view.encodeCall.getTimestamp(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},latestAnswer(t){return this.view.encodeCall.latestAnswer({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},latestRound(t){return this.view.encodeCall.latestRound({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},latestRoundData(t){return this.view.encodeCall.latestRoundData({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},latestTimestamp(t){return this.view.encodeCall.latestTimestamp({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},owner(t){return this.view.encodeCall.owner({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},phaseAggregators(t,e){return this.view.encodeCall.phaseAggregators(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},phaseId(t){return this.view.encodeCall.phaseId({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},proposeAggregator(t,e){return this.view.encodeCall.proposeAggregator(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},proposedAggregator(t){return this.view.encodeCall.proposedAggregator({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},proposedGetRoundData(t,e){return this.view.encodeCall.proposedGetRoundData(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},proposedLatestRoundData(t){return this.view.encodeCall.proposedLatestRoundData({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},setController(t,e){return this.view.encodeCall.setController(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},transferOwnership(t,e){return this.view.encodeCall.transferOwnership(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},version(t){return this.view.encodeCall.version({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})}}},u=class o extends T{static{l(this,"EACAggregatorProxyProcessor")}onEventAnswerUpdated(t,e,r,a){return e||(e=g.filters["AnswerUpdated(int256,uint256,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventNewRound(t,e,r,a){return e||(e=g.filters["NewRound(uint256,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventOwnershipTransferRequested(t,e,r,a){return e||(e=g.filters["OwnershipTransferRequested(address,address)"](null,null)),super.onEthEvent(t,e,r,a)}onEventOwnershipTransferred(t,e,r,a){return e||(e=g.filters["OwnershipTransferred(address,address)"](null,null)),super.onEthEvent(t,e,r,a)}onCallAcceptOwnership(t,e,r){return super.onEthTrace("0x79ba5097",t,e,r)}onCallAccessController(t,e,r){return super.onEthTrace("0xbc43cbaf",t,e,r)}onCallAggregator(t,e,r){return super.onEthTrace("0x245a7bfc",t,e,r)}onCallConfirmAggregator(t,e,r){return super.onEthTrace("0xa928c096",t,e,r)}onCallDecimals(t,e,r){return super.onEthTrace("0x313ce567",t,e,r)}onCallDescription(t,e,r){return super.onEthTrace("0x7284e416",t,e,r)}onCallGetAnswer(t,e,r){return super.onEthTrace("0xb5ab58dc",t,e,r)}onCallGetRoundData(t,e,r){return super.onEthTrace("0x9a6fc8f5",t,e,r)}onCallGetTimestamp(t,e,r){return super.onEthTrace("0xb633620c",t,e,r)}onCallLatestAnswer(t,e,r){return super.onEthTrace("0x50d25bcd",t,e,r)}onCallLatestRound(t,e,r){return super.onEthTrace("0x668a0f02",t,e,r)}onCallLatestRoundData(t,e,r){return super.onEthTrace("0xfeaf968c",t,e,r)}onCallLatestTimestamp(t,e,r){return super.onEthTrace("0x8205bf6a",t,e,r)}onCallOwner(t,e,r){return super.onEthTrace("0x8da5cb5b",t,e,r)}onCallPhaseAggregators(t,e,r){return super.onEthTrace("0xc1597304",t,e,r)}onCallPhaseId(t,e,r){return super.onEthTrace("0x58303b10",t,e,r)}onCallProposeAggregator(t,e,r){return super.onEthTrace("0xf8a2abd3",t,e,r)}onCallProposedAggregator(t,e,r){return super.onEthTrace("0xe8c4be30",t,e,r)}onCallProposedGetRoundData(t,e,r){return super.onEthTrace("0x6001ac53",t,e,r)}onCallProposedLatestRoundData(t,e,r){return super.onEthTrace("0x8f6b4d91",t,e,r)}onCallSetController(t,e,r){return super.onEthTrace("0x92eefe9b",t,e,r)}onCallTransferOwnership(t,e,r){return super.onEthTrace("0xf2fde38b",t,e,r)}onCallVersion(t,e,r){return super.onEthTrace("0x54fd4d50",t,e,r)}static filters={AnswerUpdated(t,e,r){return g.filters["AnswerUpdated(int256,uint256,uint256)"](t,e,r)},NewRound(t,e,r){return g.filters["NewRound(uint256,address,uint256)"](t,e,r)},OwnershipTransferRequested(t,e){return g.filters["OwnershipTransferRequested(address,address)"](t,e)},OwnershipTransferred(t,e){return g.filters["OwnershipTransferred(address,address)"](t,e)}};CreateBoundContractView(){let t=d(this.config.network,this.config.address);return new C(this.config.address,t)}static bind(t){t.name||(t.name="EACAggregatorProxy");let e=w(t);return e||(e=new o(t),P(t,e)),e}},A=class extends f{static{l(this,"EACAggregatorProxyProcessorTemplate")}bindInternal(t){t.name||(t.name="EACAggregatorProxy");let e=w(t);return e||(e=new u(t),P(t,e)),e}onEventAnswerUpdated(t,e,r,a){return e||(e=g.filters["AnswerUpdated(int256,uint256,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventNewRound(t,e,r,a){return e||(e=g.filters["NewRound(uint256,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventOwnershipTransferRequested(t,e,r,a){return e||(e=g.filters["OwnershipTransferRequested(address,address)"](null,null)),super.onEthEvent(t,e,r,a)}onEventOwnershipTransferred(t,e,r,a){return e||(e=g.filters["OwnershipTransferred(address,address)"](null,null)),super.onEthEvent(t,e,r,a)}};function d(o,t){let e=v("EACAggregatorProxy",t,o);if(!e){let r=p.connect(t,O(o));e=new x(r),y("EACAggregatorProxy",t,o,e)}return e}l(d,"getEACAggregatorProxyContract");function D(o,t){let e=d(o.getChainId(),t),r=new C(t,e);return r.context=o,r.callStatic&&(r.callStatic.context=o),r}l(D,"getEACAggregatorProxyContractOnContext");import("node:process").then(o=>o.stdout.write(""));var E={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function I(o,t){let r=d(h.EthChainId.ETHEREUM,o).rawContract.interface.encodeEventLog("AnswerUpdated(int256,uint256,uint256)",[t.current,t.roundId,t.updatedAt]);return{...E,index:0,address:o,data:r.data,topics:r.topics}}l(I,"mockAnswerUpdatedLog");function F(o,t){let r=d(h.EthChainId.ETHEREUM,o).rawContract.interface.encodeEventLog("NewRound(uint256,address,uint256)",[t.roundId,t.startedBy,t.startedAt]);return{...E,index:0,address:o,data:r.data,topics:r.topics}}l(F,"mockNewRoundLog");function N(o,t){let r=d(h.EthChainId.ETHEREUM,o).rawContract.interface.encodeEventLog("OwnershipTransferRequested(address,address)",[t.from,t.to]);return{...E,index:0,address:o,data:r.data,topics:r.topics}}l(N,"mockOwnershipTransferRequestedLog");function B(o,t){let r=d(h.EthChainId.ETHEREUM,o).rawContract.interface.encodeEventLog("OwnershipTransferred(address,address)",[t.from,t.to]);return{...E,index:0,address:o,data:r.data,topics:r.topics}}l(B,"mockOwnershipTransferredLog");import("node:process").then(o=>o.stdout.write(""));import("node:process").then(o=>o.stdout.write(""));import("node:process").then(o=>o.stdout.write(""));export{x as a,C as b,u as c,A as d,d as e,D as f,I as g,F as h,N as i,B as j,j as k};
3
- //# sourceMappingURL=chunk-QTCDE2GU.js.map
2
+ import{B as f,C as p,U as O,V as R,W as h,e as m,f as b,i as s,o as i,t as T,w,x as P,y as v,z as y}from"./chunk-LTO76VZ6.js";import{a as l,e as k}from"./chunk-G5BIPHMS.js";var j={};k(j,{EACAggregatorProxyBoundContractView:()=>C,EACAggregatorProxyContractView:()=>x,EACAggregatorProxyProcessor:()=>u,EACAggregatorProxyProcessorTemplate:()=>A,EACAggregatorProxy__factory:()=>p,getEACAggregatorProxyContract:()=>d,getEACAggregatorProxyContractOnContext:()=>D,mockAnswerUpdatedLog:()=>I,mockNewRoundLog:()=>F,mockOwnershipTransferRequestedLog:()=>N,mockOwnershipTransferredLog:()=>B});var g=p.connect("0x0",R),x=class extends m{static{l(this,"EACAggregatorProxyContractView")}constructor(t){super(t),this.callStatic.contract=t}async accessController(t,e,r){try{return await this.contract.getFunction("accessController()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async aggregator(t,e,r){try{return await this.contract.getFunction("aggregator()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async decimals(t,e,r){try{return await this.contract.getFunction("decimals()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async description(t,e,r){try{return await this.contract.getFunction("description()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async getAnswer(t,e,r,a){try{return await this.contract.getFunction("getAnswer(uint256)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async getRoundData(t,e,r,a){try{return await this.contract.getFunction("getRoundData(uint80)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async getTimestamp(t,e,r,a){try{return await this.contract.getFunction("getTimestamp(uint256)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async latestAnswer(t,e,r){try{return await this.contract.getFunction("latestAnswer()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async latestRound(t,e,r){try{return await this.contract.getFunction("latestRound()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async latestRoundData(t,e,r){try{return await this.contract.getFunction("latestRoundData()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async latestTimestamp(t,e,r){try{return await this.contract.getFunction("latestTimestamp()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async owner(t,e,r){try{return await this.contract.getFunction("owner()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async phaseAggregators(t,e,r,a){try{return await this.contract.getFunction("phaseAggregators(uint16)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async phaseId(t,e,r){try{return await this.contract.getFunction("phaseId()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async proposedAggregator(t,e,r){try{return await this.contract.getFunction("proposedAggregator()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async proposedGetRoundData(t,e,r,a){try{return await this.contract.getFunction("proposedGetRoundData(uint80)")(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}async proposedLatestRoundData(t,e,r){try{return await this.contract.getFunction("proposedLatestRoundData()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}async version(t,e,r){try{return await this.contract.getFunction("version()")(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}}callStatic={contract:this.contract,async acceptOwnership(t,e,r){try{return await this.contract.getFunction("acceptOwnership()").staticCall(t||{})}catch(a){let n=new Error().stack;throw s(a,void 0,n)}},async confirmAggregator(t,e,r,a){try{return await this.contract.getFunction("confirmAggregator(address)").staticCall(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}},async proposeAggregator(t,e,r,a){try{return await this.contract.getFunction("proposeAggregator(address)").staticCall(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}},async setController(t,e,r,a){try{return await this.contract.getFunction("setController(address)").staticCall(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}},async transferOwnership(t,e,r,a){try{return await this.contract.getFunction("transferOwnership(address)").staticCall(t,e||{})}catch(n){let c=new Error().stack;throw s(n,void 0,c)}}};encodeCall={acceptOwnership(t){return i(t,"acceptOwnership","function acceptOwnership()",[])},accessController(t){return i(t,"accessController","function accessController()",[])},aggregator(t){return i(t,"aggregator","function aggregator()",[])},confirmAggregator(t,e){return i(e,"confirmAggregator","function confirmAggregator(address)",[t])},decimals(t){return i(t,"decimals","function decimals()",[])},description(t){return i(t,"description","function description()",[])},getAnswer(t,e){return i(e,"getAnswer","function getAnswer(uint256)",[t])},getRoundData(t,e){return i(e,"getRoundData","function getRoundData(uint80)",[t])},getTimestamp(t,e){return i(e,"getTimestamp","function getTimestamp(uint256)",[t])},latestAnswer(t){return i(t,"latestAnswer","function latestAnswer()",[])},latestRound(t){return i(t,"latestRound","function latestRound()",[])},latestRoundData(t){return i(t,"latestRoundData","function latestRoundData()",[])},latestTimestamp(t){return i(t,"latestTimestamp","function latestTimestamp()",[])},owner(t){return i(t,"owner","function owner()",[])},phaseAggregators(t,e){return i(e,"phaseAggregators","function phaseAggregators(uint16)",[t])},phaseId(t){return i(t,"phaseId","function phaseId()",[])},proposeAggregator(t,e){return i(e,"proposeAggregator","function proposeAggregator(address)",[t])},proposedAggregator(t){return i(t,"proposedAggregator","function proposedAggregator()",[])},proposedGetRoundData(t,e){return i(e,"proposedGetRoundData","function proposedGetRoundData(uint80)",[t])},proposedLatestRoundData(t){return i(t,"proposedLatestRoundData","function proposedLatestRoundData()",[])},setController(t,e){return i(e,"setController","function setController(address)",[t])},transferOwnership(t,e){return i(e,"transferOwnership","function transferOwnership(address)",[t])},version(t){return i(t,"version","function version()",[])}}},C=class extends b{static{l(this,"EACAggregatorProxyBoundContractView")}async accessController(t){return await this.view.accessController({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async aggregator(t){return await this.view.aggregator({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async decimals(t){return await this.view.decimals({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async description(t){return await this.view.description({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async getAnswer(t,e){return await this.view.getAnswer(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async getRoundData(t,e){return await this.view.getRoundData(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async getTimestamp(t,e){return await this.view.getTimestamp(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async latestAnswer(t){return await this.view.latestAnswer({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async latestRound(t){return await this.view.latestRound({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async latestRoundData(t){return await this.view.latestRoundData({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async latestTimestamp(t){return await this.view.latestTimestamp({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async owner(t){return await this.view.owner({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async phaseAggregators(t,e){return await this.view.phaseAggregators(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async phaseId(t){return await this.view.phaseId({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async proposedAggregator(t){return await this.view.proposedAggregator({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async proposedGetRoundData(t,e){return await this.view.proposedGetRoundData(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async proposedLatestRoundData(t){return await this.view.proposedLatestRoundData({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async version(t){return await this.view.version({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}callStatic={view:this.view,context:this.context,async acceptOwnership(t){return await this.view.callStatic.acceptOwnership({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())},async confirmAggregator(t,e){return await this.view.callStatic.confirmAggregator(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())},async proposeAggregator(t,e){return await this.view.callStatic.proposeAggregator(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())},async setController(t,e){return await this.view.callStatic.setController(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())},async transferOwnership(t,e){return await this.view.callStatic.transferOwnership(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}};encodeCall={view:this.view,context:this.context,acceptOwnership(t){return this.view.encodeCall.acceptOwnership({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},accessController(t){return this.view.encodeCall.accessController({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},aggregator(t){return this.view.encodeCall.aggregator({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},confirmAggregator(t,e){return this.view.encodeCall.confirmAggregator(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},decimals(t){return this.view.encodeCall.decimals({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},description(t){return this.view.encodeCall.description({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},getAnswer(t,e){return this.view.encodeCall.getAnswer(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},getRoundData(t,e){return this.view.encodeCall.getRoundData(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},getTimestamp(t,e){return this.view.encodeCall.getTimestamp(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},latestAnswer(t){return this.view.encodeCall.latestAnswer({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},latestRound(t){return this.view.encodeCall.latestRound({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},latestRoundData(t){return this.view.encodeCall.latestRoundData({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},latestTimestamp(t){return this.view.encodeCall.latestTimestamp({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},owner(t){return this.view.encodeCall.owner({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},phaseAggregators(t,e){return this.view.encodeCall.phaseAggregators(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},phaseId(t){return this.view.encodeCall.phaseId({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},proposeAggregator(t,e){return this.view.encodeCall.proposeAggregator(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},proposedAggregator(t){return this.view.encodeCall.proposedAggregator({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},proposedGetRoundData(t,e){return this.view.encodeCall.proposedGetRoundData(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},proposedLatestRoundData(t){return this.view.encodeCall.proposedLatestRoundData({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},setController(t,e){return this.view.encodeCall.setController(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},transferOwnership(t,e){return this.view.encodeCall.transferOwnership(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},version(t){return this.view.encodeCall.version({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})}}},u=class o extends T{static{l(this,"EACAggregatorProxyProcessor")}onEventAnswerUpdated(t,e,r,a){return e||(e=g.filters["AnswerUpdated(int256,uint256,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventNewRound(t,e,r,a){return e||(e=g.filters["NewRound(uint256,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventOwnershipTransferRequested(t,e,r,a){return e||(e=g.filters["OwnershipTransferRequested(address,address)"](null,null)),super.onEthEvent(t,e,r,a)}onEventOwnershipTransferred(t,e,r,a){return e||(e=g.filters["OwnershipTransferred(address,address)"](null,null)),super.onEthEvent(t,e,r,a)}onCallAcceptOwnership(t,e,r){return super.onEthTrace("0x79ba5097",t,e,r)}onCallAccessController(t,e,r){return super.onEthTrace("0xbc43cbaf",t,e,r)}onCallAggregator(t,e,r){return super.onEthTrace("0x245a7bfc",t,e,r)}onCallConfirmAggregator(t,e,r){return super.onEthTrace("0xa928c096",t,e,r)}onCallDecimals(t,e,r){return super.onEthTrace("0x313ce567",t,e,r)}onCallDescription(t,e,r){return super.onEthTrace("0x7284e416",t,e,r)}onCallGetAnswer(t,e,r){return super.onEthTrace("0xb5ab58dc",t,e,r)}onCallGetRoundData(t,e,r){return super.onEthTrace("0x9a6fc8f5",t,e,r)}onCallGetTimestamp(t,e,r){return super.onEthTrace("0xb633620c",t,e,r)}onCallLatestAnswer(t,e,r){return super.onEthTrace("0x50d25bcd",t,e,r)}onCallLatestRound(t,e,r){return super.onEthTrace("0x668a0f02",t,e,r)}onCallLatestRoundData(t,e,r){return super.onEthTrace("0xfeaf968c",t,e,r)}onCallLatestTimestamp(t,e,r){return super.onEthTrace("0x8205bf6a",t,e,r)}onCallOwner(t,e,r){return super.onEthTrace("0x8da5cb5b",t,e,r)}onCallPhaseAggregators(t,e,r){return super.onEthTrace("0xc1597304",t,e,r)}onCallPhaseId(t,e,r){return super.onEthTrace("0x58303b10",t,e,r)}onCallProposeAggregator(t,e,r){return super.onEthTrace("0xf8a2abd3",t,e,r)}onCallProposedAggregator(t,e,r){return super.onEthTrace("0xe8c4be30",t,e,r)}onCallProposedGetRoundData(t,e,r){return super.onEthTrace("0x6001ac53",t,e,r)}onCallProposedLatestRoundData(t,e,r){return super.onEthTrace("0x8f6b4d91",t,e,r)}onCallSetController(t,e,r){return super.onEthTrace("0x92eefe9b",t,e,r)}onCallTransferOwnership(t,e,r){return super.onEthTrace("0xf2fde38b",t,e,r)}onCallVersion(t,e,r){return super.onEthTrace("0x54fd4d50",t,e,r)}static filters={AnswerUpdated(t,e,r){return g.filters["AnswerUpdated(int256,uint256,uint256)"](t,e,r)},NewRound(t,e,r){return g.filters["NewRound(uint256,address,uint256)"](t,e,r)},OwnershipTransferRequested(t,e){return g.filters["OwnershipTransferRequested(address,address)"](t,e)},OwnershipTransferred(t,e){return g.filters["OwnershipTransferred(address,address)"](t,e)}};CreateBoundContractView(){let t=d(this.config.network,this.config.address);return new C(this.config.address,t)}static bind(t){t.name||(t.name="EACAggregatorProxy");let e=w(t);return e||(e=new o(t),P(t,e)),e}},A=class extends f{static{l(this,"EACAggregatorProxyProcessorTemplate")}bindInternal(t){t.name||(t.name="EACAggregatorProxy");let e=w(t);return e||(e=new u(t),P(t,e)),e}onEventAnswerUpdated(t,e,r,a){return e||(e=g.filters["AnswerUpdated(int256,uint256,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventNewRound(t,e,r,a){return e||(e=g.filters["NewRound(uint256,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventOwnershipTransferRequested(t,e,r,a){return e||(e=g.filters["OwnershipTransferRequested(address,address)"](null,null)),super.onEthEvent(t,e,r,a)}onEventOwnershipTransferred(t,e,r,a){return e||(e=g.filters["OwnershipTransferred(address,address)"](null,null)),super.onEthEvent(t,e,r,a)}};function d(o,t){let e=v("EACAggregatorProxy",t,o);if(!e){let r=p.connect(t,O(o));e=new x(r),y("EACAggregatorProxy",t,o,e)}return e}l(d,"getEACAggregatorProxyContract");function D(o,t){let e=d(o.getChainId(),t),r=new C(t,e);return r.context=o,r.callStatic&&(r.callStatic.context=o),r}l(D,"getEACAggregatorProxyContractOnContext");import("node:process").then(o=>o.stdout.write(""));var E={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function I(o,t){let r=d(h.EthChainId.ETHEREUM,o).rawContract.interface.encodeEventLog("AnswerUpdated(int256,uint256,uint256)",[t.current,t.roundId,t.updatedAt]);return{...E,index:0,address:o,data:r.data,topics:r.topics}}l(I,"mockAnswerUpdatedLog");function F(o,t){let r=d(h.EthChainId.ETHEREUM,o).rawContract.interface.encodeEventLog("NewRound(uint256,address,uint256)",[t.roundId,t.startedBy,t.startedAt]);return{...E,index:0,address:o,data:r.data,topics:r.topics}}l(F,"mockNewRoundLog");function N(o,t){let r=d(h.EthChainId.ETHEREUM,o).rawContract.interface.encodeEventLog("OwnershipTransferRequested(address,address)",[t.from,t.to]);return{...E,index:0,address:o,data:r.data,topics:r.topics}}l(N,"mockOwnershipTransferRequestedLog");function B(o,t){let r=d(h.EthChainId.ETHEREUM,o).rawContract.interface.encodeEventLog("OwnershipTransferred(address,address)",[t.from,t.to]);return{...E,index:0,address:o,data:r.data,topics:r.topics}}l(B,"mockOwnershipTransferredLog");import("node:process").then(o=>o.stdout.write(""));import("node:process").then(o=>o.stdout.write(""));import("node:process").then(o=>o.stdout.write(""));export{x as a,C as b,u as c,A as d,d as e,D as f,I as g,F as h,N as i,B as j,j as k};
3
+ //# sourceMappingURL=chunk-2CQS5HK3.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{Ac as at,Bc as pt,Cc as Y,Dc as mt,Ec as st,Fc as Ut,Gc as yt,Hc as Nt,Nc as G,Oc as q,Pc as Zt,Qc as lt,Rc as Mt,Sc as Gt,Tc as qt,Uc as Pt,Vc as le,dc as It,fc as Dt,gc as Tt,hc as Ot,ic as fe,nc as x,oc as ae,yc as ft,zc as Ft}from"./chunk-56V52WZM.js";import{a as m,c as it,d as ce,f as ie}from"./chunk-G5BIPHMS.js";var he,de,k,K,Et,zt,Vt=it(()=>{"use strict";fe();ae();Tt();[he,de]=x.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(a=>BigInt(a))),k=new Uint32Array(80),K=new Uint32Array(80),Et=class extends Ot{static{m(this,"SHA512")}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:n,Al:s,Bh:o,Bl:d,Ch:r,Cl:l,Dh:p,Dl:c,Eh:B,El:t,Fh:h,Fl:w,Gh:g,Gl:D,Hh:A,Hl:H}=this;return[n,s,o,d,r,l,p,c,B,t,h,w,g,D,A,H]}set(n,s,o,d,r,l,p,c,B,t,h,w,g,D,A,H){this.Ah=n|0,this.Al=s|0,this.Bh=o|0,this.Bl=d|0,this.Ch=r|0,this.Cl=l|0,this.Dh=p|0,this.Dl=c|0,this.Eh=B|0,this.El=t|0,this.Fh=h|0,this.Fl=w|0,this.Gh=g|0,this.Gl=D|0,this.Hh=A|0,this.Hl=H|0}process(n,s){for(let f=0;f<16;f++,s+=4)k[f]=n.getUint32(s),K[f]=n.getUint32(s+=4);for(let f=16;f<80;f++){let T=k[f-15]|0,M=K[f-15]|0,W=x.rotrSH(T,M,1)^x.rotrSH(T,M,8)^x.shrSH(T,M,7),tt=x.rotrSL(T,M,1)^x.rotrSL(T,M,8)^x.shrSL(T,M,7),N=k[f-2]|0,O=K[f-2]|0,et=x.rotrSH(N,O,19)^x.rotrBH(N,O,61)^x.shrSH(N,O,6),J=x.rotrSL(N,O,19)^x.rotrBL(N,O,61)^x.shrSL(N,O,6),nt=x.add4L(tt,J,K[f-7],K[f-16]),ot=x.add4H(nt,W,et,k[f-7],k[f-16]);k[f]=ot|0,K[f]=nt|0}let{Ah:o,Al:d,Bh:r,Bl:l,Ch:p,Cl:c,Dh:B,Dl:t,Eh:h,El:w,Fh:g,Fl:D,Gh:A,Gl:H,Hh:X,Hl:Q}=this;for(let f=0;f<80;f++){let T=x.rotrSH(h,w,14)^x.rotrSH(h,w,18)^x.rotrBH(h,w,41),M=x.rotrSL(h,w,14)^x.rotrSL(h,w,18)^x.rotrBL(h,w,41),W=h&g^~h&A,tt=w&D^~w&H,N=x.add5L(Q,M,tt,de[f],K[f]),O=x.add5H(N,X,T,W,he[f],k[f]),et=N|0,J=x.rotrSH(o,d,28)^x.rotrBH(o,d,34)^x.rotrBH(o,d,39),nt=x.rotrSL(o,d,28)^x.rotrBL(o,d,34)^x.rotrBL(o,d,39),ot=o&r^o&p^r&p,ut=d&l^d&c^l&c;X=A|0,Q=H|0,A=g|0,H=D|0,g=h|0,D=w|0,{h,l:w}=x.add(B|0,t|0,O|0,et|0),B=p|0,t=c|0,p=r|0,c=l|0,r=o|0,l=d|0;let xt=x.add3L(et,nt,ut);o=x.add3H(xt,O,J,ot),d=xt|0}({h:o,l:d}=x.add(this.Ah|0,this.Al|0,o|0,d|0)),{h:r,l}=x.add(this.Bh|0,this.Bl|0,r|0,l|0),{h:p,l:c}=x.add(this.Ch|0,this.Cl|0,p|0,c|0),{h:B,l:t}=x.add(this.Dh|0,this.Dl|0,B|0,t|0),{h,l:w}=x.add(this.Eh|0,this.El|0,h|0,w|0),{h:g,l:D}=x.add(this.Fh|0,this.Fl|0,g|0,D|0),{h:A,l:H}=x.add(this.Gh|0,this.Gl|0,A|0,H|0),{h:X,l:Q}=x.add(this.Hh|0,this.Hl|0,X|0,Q|0),this.set(o,d,r,l,p,c,B,t,h,w,g,D,A,H,X,Q)}roundClean(){k.fill(0),K.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},zt=It(()=>new Et)});function be(a){let n=Pt(a);return Ut(a,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...n})}function Yt(a){let n=be(a),{Fp:s,n:o,prehash:d,hash:r,randomBytes:l,nByteLength:p,h:c}=n,B=ht<<BigInt(p*8)-U,t=s.create,h=lt(n.n,n.nBitLength),w=n.uvRatio||((u,e)=>{try{return{isValid:!0,value:s.sqrt(u*s.inv(e))}}catch{return{isValid:!1,value:P}}}),g=n.adjustScalarBytes||(u=>u),D=n.domain||((u,e,i)=>{if(ft("phflag",i),e.length||i)throw new Error("Contexts/pre-hash are not supported");return u});function A(u,e){st("coordinate "+u,e,P,B)}m(A,"aCoordinate");function H(u){if(!(u instanceof f))throw new Error("ExtendedPoint expected")}m(H,"assertPoint");let X=yt((u,e)=>{let{ex:i,ey:b,ez:y}=u,E=u.is0();e==null&&(e=E?ue:s.inv(y));let _=t(i*e),R=t(b*e),v=t(y*e);if(E)return{x:P,y:U};if(v!==U)throw new Error("invZ was invalid");return{x:_,y:R}}),Q=yt(u=>{let{a:e,d:i}=n;if(u.is0())throw new Error("bad point: ZERO");let{ex:b,ey:y,ez:E,et:_}=u,R=t(b*b),v=t(y*y),S=t(E*E),L=t(S*S),F=t(R*e),z=t(S*t(F+v)),V=t(L+t(i*t(R*v)));if(z!==V)throw new Error("bad point: equation left != right (1)");let Z=t(b*y),j=t(E*_);if(Z!==j)throw new Error("bad point: equation left != right (2)");return!0});class f{static{m(this,"Point")}constructor(e,i,b,y){this.ex=e,this.ey=i,this.ez=b,this.et=y,A("x",e),A("y",i),A("z",b),A("t",y),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof f)throw new Error("extended point not allowed");let{x:i,y:b}=e||{};return A("x",i),A("y",b),new f(i,b,U,t(i*b))}static normalizeZ(e){let i=s.invertBatch(e.map(b=>b.ez));return e.map((b,y)=>b.toAffine(i[y])).map(f.fromAffine)}static msm(e,i){return qt(f,h,e,i)}_setWindowSize(e){W.setWindowSize(this,e)}assertValidity(){Q(this)}equals(e){H(e);let{ex:i,ey:b,ez:y}=this,{ex:E,ey:_,ez:R}=e,v=t(i*R),S=t(E*y),L=t(b*R),F=t(_*y);return v===S&&L===F}is0(){return this.equals(f.ZERO)}negate(){return new f(t(-this.ex),this.ey,this.ez,t(-this.et))}double(){let{a:e}=n,{ex:i,ey:b,ez:y}=this,E=t(i*i),_=t(b*b),R=t(ht*t(y*y)),v=t(e*E),S=i+b,L=t(t(S*S)-E-_),F=v+_,z=F-R,V=v-_,Z=t(L*z),j=t(F*V),$=t(L*V),ct=t(z*F);return new f(Z,j,ct,$)}add(e){H(e);let{a:i,d:b}=n,{ex:y,ey:E,ez:_,et:R}=this,{ex:v,ey:S,ez:L,et:F}=e;if(i===BigInt(-1)){let gt=t((E-y)*(S+v)),Rt=t((E+y)*(S-v)),bt=t(Rt-gt);if(bt===P)return this.double();let St=t(_*ht*F),At=t(R*ht*L),Lt=At+St,Ct=Rt+gt,Ht=At-St,ne=t(Lt*bt),se=t(Ct*Ht),oe=t(Lt*Ht),re=t(bt*Ct);return new f(ne,se,re,oe)}let z=t(y*v),V=t(E*S),Z=t(R*b*F),j=t(_*L),$=t((y+E)*(v+S)-z-V),ct=j-Z,_t=j+Z,vt=t(V-i*z),Jt=t($*ct),$t=t(_t*vt),te=t($*vt),ee=t(ct*_t);return new f(Jt,$t,ee,te)}subtract(e){return this.add(e.negate())}wNAF(e){return W.wNAFCached(this,e,f.normalizeZ)}multiply(e){let i=e;st("scalar",i,U,o);let{p:b,f:y}=this.wNAF(i);return f.normalizeZ([b,y])[0]}multiplyUnsafe(e){let i=e;return st("scalar",i,P,o),i===P?M:this.equals(M)||i===U?this:this.equals(T)?this.wNAF(i).p:W.unsafeLadder(this,i)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return W.unsafeLadder(this,o).is0()}toAffine(e){return X(this,e)}clearCofactor(){let{h:e}=n;return e===U?this:this.multiplyUnsafe(e)}static fromHex(e,i=!1){let{d:b,a:y}=n,E=s.BYTES;e=Y("pointHex",e,E),ft("zip215",i);let _=e.slice(),R=e[E-1];_[E-1]=R&-129;let v=at(_),S=i?B:s.ORDER;st("pointHex.y",v,P,S);let L=t(v*v),F=t(L-U),z=t(b*L-y),{isValid:V,value:Z}=w(F,z);if(!V)throw new Error("Point.fromHex: invalid y coordinate");let j=(Z&U)===U,$=(R&128)!==0;if(!i&&Z===P&&$)throw new Error("Point.fromHex: x=0 and x_0=1");return $!==j&&(Z=t(-Z)),f.fromAffine({x:Z,y:v})}static fromPrivateKey(e){return O(e).point}toRawBytes(){let{x:e,y:i}=this.toAffine(),b=pt(i,s.BYTES);return b[b.length-1]|=e&U?128:0,b}toHex(){return Ft(this.toRawBytes())}}f.BASE=new f(n.Gx,n.Gy,U,t(n.Gx*n.Gy)),f.ZERO=new f(P,U,U,P);let{BASE:T,ZERO:M}=f,W=Gt(f,p*8);function tt(u){return G(u,o)}m(tt,"modN");function N(u){return tt(at(u))}m(N,"modN_LE");function O(u){let e=p;u=Y("private key",u,e);let i=Y("hashed private key",r(u),2*e),b=g(i.slice(0,e)),y=i.slice(e,2*e),E=N(b),_=T.multiply(E),R=_.toRawBytes();return{head:b,prefix:y,scalar:E,point:_,pointBytes:R}}m(O,"getExtendedPublicKey");function et(u){return O(u).pointBytes}m(et,"getPublicKey");function J(u=new Uint8Array,...e){let i=mt(...e);return N(r(D(i,Y("context",u),!!d)))}m(J,"hashDomainToScalar");function nt(u,e,i={}){u=Y("message",u),d&&(u=d(u));let{prefix:b,scalar:y,pointBytes:E}=O(e),_=J(i.context,b,u),R=T.multiply(_).toRawBytes(),v=J(i.context,R,E,u),S=tt(_+v*y);st("signature.s",S,P,o);let L=mt(R,pt(S,s.BYTES));return Y("result",L,p*2)}m(nt,"sign");let ot=xe;function ut(u,e,i,b=ot){let{context:y,zip215:E}=b,_=s.BYTES;u=Y("signature",u,2*_),e=Y("message",e),E!==void 0&&ft("zip215",E),d&&(e=d(e));let R=at(u.slice(_,2*_)),v,S,L;try{v=f.fromHex(i,E),S=f.fromHex(u.slice(0,_),E),L=T.multiplyUnsafe(R)}catch{return!1}if(!E&&v.isSmallOrder())return!1;let F=J(y,S.toRawBytes(),v.toRawBytes(),e);return S.add(v.multiplyUnsafe(F)).subtract(L).clearCofactor().equals(f.ZERO)}return m(ut,"verify"),T._setWindowSize(8),{CURVE:n,getPublicKey:et,sign:nt,verify:ut,ExtendedPoint:f,utils:{getExtendedPublicKey:O,randomPrivateKey:m(()=>l(s.BYTES),"randomPrivateKey"),precompute(u=8,e=f.BASE){return e._setWindowSize(u),e.multiply(BigInt(3)),e}}}}var P,U,ht,ue,xe,Xt=it(()=>{"use strict";le();Mt();Nt();Nt();P=BigInt(0),U=BigInt(1),ht=BigInt(2),ue=BigInt(8),xe={zip215:!0};m(be,"validateOpts");m(Yt,"twistedEdwards")});function Ee(a){let n=BigInt(10),s=BigInt(20),o=BigInt(40),d=BigInt(80),r=Bt,p=a*a%r*a%r,c=q(p,jt,r)*p%r,B=q(c,pe,r)*a%r,t=q(B,me,r)*B%r,h=q(t,n,r)*t%r,w=q(h,s,r)*h%r,g=q(w,o,r)*w%r,D=q(g,d,r)*g%r,A=q(D,d,r)*g%r,H=q(A,n,r)*t%r;return{pow_p_5_8:q(H,jt,r)*a%r,b2:p}}function Be(a){return a[0]&=248,a[31]&=127,a[31]|=64,a}function we(a,n){let s=Bt,o=G(n*n*n,s),d=G(o*o*n,s),r=Ee(a*d).pow_p_5_8,l=G(a*o*r,s),p=G(n*l*l,s),c=l,B=G(l*Wt,s),t=p===a,h=p===G(-a,s),w=p===G(-a*Wt,s);return t&&(l=c),(h||w)&&(l=B),Zt(l,s)&&(l=G(-l,s)),{isValid:t||h,value:l}}var Bt,Wt,Xe,pe,jt,We,me,ye,_e,ve,je,ge=it(()=>{"use strict";Vt();Tt();Xt();Mt();Bt=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),Wt=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),Xe=BigInt(0),pe=BigInt(1),jt=BigInt(2),We=BigInt(3),me=BigInt(5),ye=BigInt(8);m(Ee,"ed25519_pow_2_252_3");m(Be,"adjustScalarBytes");m(we,"uvRatio");_e=lt(Bt,void 0,!0),ve={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:_e,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:ye,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:zt,randomBytes:Dt,adjustScalarBytes:Be,uvRatio:we},je=Yt(ve)});var Kt=ce((Qe,wt)=>{"use strict";var Re=Object.prototype.hasOwnProperty,I="~";function rt(){}m(rt,"Events");Object.create&&(rt.prototype=Object.create(null),new rt().__proto__||(I=!1));function Se(a,n,s){this.fn=a,this.context=n,this.once=s||!1}m(Se,"EE");function kt(a,n,s,o,d){if(typeof s!="function")throw new TypeError("The listener must be a function");var r=new Se(s,o||a,d),l=I?I+n:n;return a._events[l]?a._events[l].fn?a._events[l]=[a._events[l],r]:a._events[l].push(r):(a._events[l]=r,a._eventsCount++),a}m(kt,"addListener");function dt(a,n){--a._eventsCount===0?a._events=new rt:delete a._events[n]}m(dt,"clearEvent");function C(){this._events=new rt,this._eventsCount=0}m(C,"EventEmitter");C.prototype.eventNames=m(function(){var n=[],s,o;if(this._eventsCount===0)return n;for(o in s=this._events)Re.call(s,o)&&n.push(I?o.slice(1):o);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(s)):n},"eventNames");C.prototype.listeners=m(function(n){var s=I?I+n:n,o=this._events[s];if(!o)return[];if(o.fn)return[o.fn];for(var d=0,r=o.length,l=new Array(r);d<r;d++)l[d]=o[d].fn;return l},"listeners");C.prototype.listenerCount=m(function(n){var s=I?I+n:n,o=this._events[s];return o?o.fn?1:o.length:0},"listenerCount");C.prototype.emit=m(function(n,s,o,d,r,l){var p=I?I+n:n;if(!this._events[p])return!1;var c=this._events[p],B=arguments.length,t,h;if(c.fn){switch(c.once&&this.removeListener(n,c.fn,void 0,!0),B){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,s),!0;case 3:return c.fn.call(c.context,s,o),!0;case 4:return c.fn.call(c.context,s,o,d),!0;case 5:return c.fn.call(c.context,s,o,d,r),!0;case 6:return c.fn.call(c.context,s,o,d,r,l),!0}for(h=1,t=new Array(B-1);h<B;h++)t[h-1]=arguments[h];c.fn.apply(c.context,t)}else{var w=c.length,g;for(h=0;h<w;h++)switch(c[h].once&&this.removeListener(n,c[h].fn,void 0,!0),B){case 1:c[h].fn.call(c[h].context);break;case 2:c[h].fn.call(c[h].context,s);break;case 3:c[h].fn.call(c[h].context,s,o);break;case 4:c[h].fn.call(c[h].context,s,o,d);break;default:if(!t)for(g=1,t=new Array(B-1);g<B;g++)t[g-1]=arguments[g];c[h].fn.apply(c[h].context,t)}}return!0},"emit");C.prototype.on=m(function(n,s,o){return kt(this,n,s,o,!1)},"on");C.prototype.once=m(function(n,s,o){return kt(this,n,s,o,!0)},"once");C.prototype.removeListener=m(function(n,s,o,d){var r=I?I+n:n;if(!this._events[r])return this;if(!s)return dt(this,r),this;var l=this._events[r];if(l.fn)l.fn===s&&(!d||l.once)&&(!o||l.context===o)&&dt(this,r);else{for(var p=0,c=[],B=l.length;p<B;p++)(l[p].fn!==s||d&&!l[p].once||o&&l[p].context!==o)&&c.push(l[p]);c.length?this._events[r]=c.length===1?c[0]:c:dt(this,r)}return this},"removeListener");C.prototype.removeAllListeners=m(function(n){var s;return n?(s=I?I+n:n,this._events[s]&&dt(this,s)):(this._events=new rt,this._eventsCount=0),this},"removeAllListeners");C.prototype.off=C.prototype.removeListener;C.prototype.addListener=C.prototype.on;C.prefixed=I;C.EventEmitter=C;typeof wt<"u"&&(wt.exports=C)});var Qt,$e,Ae=it(()=>{"use strict";Qt=ie(Kt(),1),$e=Qt.default});export{zt as a,Vt as b,je as c,ge as d,Qt as e,$e as f,Ae as g};
2
+ import{Ac as ft,Bc as Ft,Cc as at,Dc as pt,Ec as Y,Fc as mt,Gc as st,Hc as Ut,Ic as yt,Jc as Nt,Pc as G,Qc as q,Rc as Zt,Sc as lt,Tc as Mt,Uc as Gt,Vc as qt,Wc as Pt,Xc as le,fc as It,hc as Dt,ic as Tt,jc as Ot,kc as fe,pc as x,qc as ae}from"./chunk-65MPQCTW.js";import{a as m,c as it,d as ce,f as ie}from"./chunk-G5BIPHMS.js";var he,de,k,K,Et,zt,Vt=it(()=>{"use strict";fe();ae();Tt();[he,de]=x.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(a=>BigInt(a))),k=new Uint32Array(80),K=new Uint32Array(80),Et=class extends Ot{static{m(this,"SHA512")}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:n,Al:s,Bh:o,Bl:d,Ch:r,Cl:l,Dh:p,Dl:c,Eh:B,El:t,Fh:h,Fl:w,Gh:g,Gl:D,Hh:A,Hl:H}=this;return[n,s,o,d,r,l,p,c,B,t,h,w,g,D,A,H]}set(n,s,o,d,r,l,p,c,B,t,h,w,g,D,A,H){this.Ah=n|0,this.Al=s|0,this.Bh=o|0,this.Bl=d|0,this.Ch=r|0,this.Cl=l|0,this.Dh=p|0,this.Dl=c|0,this.Eh=B|0,this.El=t|0,this.Fh=h|0,this.Fl=w|0,this.Gh=g|0,this.Gl=D|0,this.Hh=A|0,this.Hl=H|0}process(n,s){for(let f=0;f<16;f++,s+=4)k[f]=n.getUint32(s),K[f]=n.getUint32(s+=4);for(let f=16;f<80;f++){let T=k[f-15]|0,M=K[f-15]|0,W=x.rotrSH(T,M,1)^x.rotrSH(T,M,8)^x.shrSH(T,M,7),tt=x.rotrSL(T,M,1)^x.rotrSL(T,M,8)^x.shrSL(T,M,7),N=k[f-2]|0,O=K[f-2]|0,et=x.rotrSH(N,O,19)^x.rotrBH(N,O,61)^x.shrSH(N,O,6),J=x.rotrSL(N,O,19)^x.rotrBL(N,O,61)^x.shrSL(N,O,6),nt=x.add4L(tt,J,K[f-7],K[f-16]),ot=x.add4H(nt,W,et,k[f-7],k[f-16]);k[f]=ot|0,K[f]=nt|0}let{Ah:o,Al:d,Bh:r,Bl:l,Ch:p,Cl:c,Dh:B,Dl:t,Eh:h,El:w,Fh:g,Fl:D,Gh:A,Gl:H,Hh:X,Hl:Q}=this;for(let f=0;f<80;f++){let T=x.rotrSH(h,w,14)^x.rotrSH(h,w,18)^x.rotrBH(h,w,41),M=x.rotrSL(h,w,14)^x.rotrSL(h,w,18)^x.rotrBL(h,w,41),W=h&g^~h&A,tt=w&D^~w&H,N=x.add5L(Q,M,tt,de[f],K[f]),O=x.add5H(N,X,T,W,he[f],k[f]),et=N|0,J=x.rotrSH(o,d,28)^x.rotrBH(o,d,34)^x.rotrBH(o,d,39),nt=x.rotrSL(o,d,28)^x.rotrBL(o,d,34)^x.rotrBL(o,d,39),ot=o&r^o&p^r&p,ut=d&l^d&c^l&c;X=A|0,Q=H|0,A=g|0,H=D|0,g=h|0,D=w|0,{h,l:w}=x.add(B|0,t|0,O|0,et|0),B=p|0,t=c|0,p=r|0,c=l|0,r=o|0,l=d|0;let xt=x.add3L(et,nt,ut);o=x.add3H(xt,O,J,ot),d=xt|0}({h:o,l:d}=x.add(this.Ah|0,this.Al|0,o|0,d|0)),{h:r,l}=x.add(this.Bh|0,this.Bl|0,r|0,l|0),{h:p,l:c}=x.add(this.Ch|0,this.Cl|0,p|0,c|0),{h:B,l:t}=x.add(this.Dh|0,this.Dl|0,B|0,t|0),{h,l:w}=x.add(this.Eh|0,this.El|0,h|0,w|0),{h:g,l:D}=x.add(this.Fh|0,this.Fl|0,g|0,D|0),{h:A,l:H}=x.add(this.Gh|0,this.Gl|0,A|0,H|0),{h:X,l:Q}=x.add(this.Hh|0,this.Hl|0,X|0,Q|0),this.set(o,d,r,l,p,c,B,t,h,w,g,D,A,H,X,Q)}roundClean(){k.fill(0),K.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},zt=It(()=>new Et)});function be(a){let n=Pt(a);return Ut(a,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...n})}function Yt(a){let n=be(a),{Fp:s,n:o,prehash:d,hash:r,randomBytes:l,nByteLength:p,h:c}=n,B=ht<<BigInt(p*8)-U,t=s.create,h=lt(n.n,n.nBitLength),w=n.uvRatio||((u,e)=>{try{return{isValid:!0,value:s.sqrt(u*s.inv(e))}}catch{return{isValid:!1,value:P}}}),g=n.adjustScalarBytes||(u=>u),D=n.domain||((u,e,i)=>{if(ft("phflag",i),e.length||i)throw new Error("Contexts/pre-hash are not supported");return u});function A(u,e){st("coordinate "+u,e,P,B)}m(A,"aCoordinate");function H(u){if(!(u instanceof f))throw new Error("ExtendedPoint expected")}m(H,"assertPoint");let X=yt((u,e)=>{let{ex:i,ey:b,ez:y}=u,E=u.is0();e==null&&(e=E?ue:s.inv(y));let _=t(i*e),R=t(b*e),v=t(y*e);if(E)return{x:P,y:U};if(v!==U)throw new Error("invZ was invalid");return{x:_,y:R}}),Q=yt(u=>{let{a:e,d:i}=n;if(u.is0())throw new Error("bad point: ZERO");let{ex:b,ey:y,ez:E,et:_}=u,R=t(b*b),v=t(y*y),S=t(E*E),L=t(S*S),F=t(R*e),z=t(S*t(F+v)),V=t(L+t(i*t(R*v)));if(z!==V)throw new Error("bad point: equation left != right (1)");let Z=t(b*y),j=t(E*_);if(Z!==j)throw new Error("bad point: equation left != right (2)");return!0});class f{static{m(this,"Point")}constructor(e,i,b,y){this.ex=e,this.ey=i,this.ez=b,this.et=y,A("x",e),A("y",i),A("z",b),A("t",y),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof f)throw new Error("extended point not allowed");let{x:i,y:b}=e||{};return A("x",i),A("y",b),new f(i,b,U,t(i*b))}static normalizeZ(e){let i=s.invertBatch(e.map(b=>b.ez));return e.map((b,y)=>b.toAffine(i[y])).map(f.fromAffine)}static msm(e,i){return qt(f,h,e,i)}_setWindowSize(e){W.setWindowSize(this,e)}assertValidity(){Q(this)}equals(e){H(e);let{ex:i,ey:b,ez:y}=this,{ex:E,ey:_,ez:R}=e,v=t(i*R),S=t(E*y),L=t(b*R),F=t(_*y);return v===S&&L===F}is0(){return this.equals(f.ZERO)}negate(){return new f(t(-this.ex),this.ey,this.ez,t(-this.et))}double(){let{a:e}=n,{ex:i,ey:b,ez:y}=this,E=t(i*i),_=t(b*b),R=t(ht*t(y*y)),v=t(e*E),S=i+b,L=t(t(S*S)-E-_),F=v+_,z=F-R,V=v-_,Z=t(L*z),j=t(F*V),$=t(L*V),ct=t(z*F);return new f(Z,j,ct,$)}add(e){H(e);let{a:i,d:b}=n,{ex:y,ey:E,ez:_,et:R}=this,{ex:v,ey:S,ez:L,et:F}=e;if(i===BigInt(-1)){let gt=t((E-y)*(S+v)),Rt=t((E+y)*(S-v)),bt=t(Rt-gt);if(bt===P)return this.double();let St=t(_*ht*F),At=t(R*ht*L),Lt=At+St,Ct=Rt+gt,Ht=At-St,ne=t(Lt*bt),se=t(Ct*Ht),oe=t(Lt*Ht),re=t(bt*Ct);return new f(ne,se,re,oe)}let z=t(y*v),V=t(E*S),Z=t(R*b*F),j=t(_*L),$=t((y+E)*(v+S)-z-V),ct=j-Z,_t=j+Z,vt=t(V-i*z),Jt=t($*ct),$t=t(_t*vt),te=t($*vt),ee=t(ct*_t);return new f(Jt,$t,ee,te)}subtract(e){return this.add(e.negate())}wNAF(e){return W.wNAFCached(this,e,f.normalizeZ)}multiply(e){let i=e;st("scalar",i,U,o);let{p:b,f:y}=this.wNAF(i);return f.normalizeZ([b,y])[0]}multiplyUnsafe(e){let i=e;return st("scalar",i,P,o),i===P?M:this.equals(M)||i===U?this:this.equals(T)?this.wNAF(i).p:W.unsafeLadder(this,i)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return W.unsafeLadder(this,o).is0()}toAffine(e){return X(this,e)}clearCofactor(){let{h:e}=n;return e===U?this:this.multiplyUnsafe(e)}static fromHex(e,i=!1){let{d:b,a:y}=n,E=s.BYTES;e=Y("pointHex",e,E),ft("zip215",i);let _=e.slice(),R=e[E-1];_[E-1]=R&-129;let v=at(_),S=i?B:s.ORDER;st("pointHex.y",v,P,S);let L=t(v*v),F=t(L-U),z=t(b*L-y),{isValid:V,value:Z}=w(F,z);if(!V)throw new Error("Point.fromHex: invalid y coordinate");let j=(Z&U)===U,$=(R&128)!==0;if(!i&&Z===P&&$)throw new Error("Point.fromHex: x=0 and x_0=1");return $!==j&&(Z=t(-Z)),f.fromAffine({x:Z,y:v})}static fromPrivateKey(e){return O(e).point}toRawBytes(){let{x:e,y:i}=this.toAffine(),b=pt(i,s.BYTES);return b[b.length-1]|=e&U?128:0,b}toHex(){return Ft(this.toRawBytes())}}f.BASE=new f(n.Gx,n.Gy,U,t(n.Gx*n.Gy)),f.ZERO=new f(P,U,U,P);let{BASE:T,ZERO:M}=f,W=Gt(f,p*8);function tt(u){return G(u,o)}m(tt,"modN");function N(u){return tt(at(u))}m(N,"modN_LE");function O(u){let e=p;u=Y("private key",u,e);let i=Y("hashed private key",r(u),2*e),b=g(i.slice(0,e)),y=i.slice(e,2*e),E=N(b),_=T.multiply(E),R=_.toRawBytes();return{head:b,prefix:y,scalar:E,point:_,pointBytes:R}}m(O,"getExtendedPublicKey");function et(u){return O(u).pointBytes}m(et,"getPublicKey");function J(u=new Uint8Array,...e){let i=mt(...e);return N(r(D(i,Y("context",u),!!d)))}m(J,"hashDomainToScalar");function nt(u,e,i={}){u=Y("message",u),d&&(u=d(u));let{prefix:b,scalar:y,pointBytes:E}=O(e),_=J(i.context,b,u),R=T.multiply(_).toRawBytes(),v=J(i.context,R,E,u),S=tt(_+v*y);st("signature.s",S,P,o);let L=mt(R,pt(S,s.BYTES));return Y("result",L,p*2)}m(nt,"sign");let ot=xe;function ut(u,e,i,b=ot){let{context:y,zip215:E}=b,_=s.BYTES;u=Y("signature",u,2*_),e=Y("message",e),E!==void 0&&ft("zip215",E),d&&(e=d(e));let R=at(u.slice(_,2*_)),v,S,L;try{v=f.fromHex(i,E),S=f.fromHex(u.slice(0,_),E),L=T.multiplyUnsafe(R)}catch{return!1}if(!E&&v.isSmallOrder())return!1;let F=J(y,S.toRawBytes(),v.toRawBytes(),e);return S.add(v.multiplyUnsafe(F)).subtract(L).clearCofactor().equals(f.ZERO)}return m(ut,"verify"),T._setWindowSize(8),{CURVE:n,getPublicKey:et,sign:nt,verify:ut,ExtendedPoint:f,utils:{getExtendedPublicKey:O,randomPrivateKey:m(()=>l(s.BYTES),"randomPrivateKey"),precompute(u=8,e=f.BASE){return e._setWindowSize(u),e.multiply(BigInt(3)),e}}}}var P,U,ht,ue,xe,Xt=it(()=>{"use strict";le();Mt();Nt();Nt();P=BigInt(0),U=BigInt(1),ht=BigInt(2),ue=BigInt(8),xe={zip215:!0};m(be,"validateOpts");m(Yt,"twistedEdwards")});function Ee(a){let n=BigInt(10),s=BigInt(20),o=BigInt(40),d=BigInt(80),r=Bt,p=a*a%r*a%r,c=q(p,jt,r)*p%r,B=q(c,pe,r)*a%r,t=q(B,me,r)*B%r,h=q(t,n,r)*t%r,w=q(h,s,r)*h%r,g=q(w,o,r)*w%r,D=q(g,d,r)*g%r,A=q(D,d,r)*g%r,H=q(A,n,r)*t%r;return{pow_p_5_8:q(H,jt,r)*a%r,b2:p}}function Be(a){return a[0]&=248,a[31]&=127,a[31]|=64,a}function we(a,n){let s=Bt,o=G(n*n*n,s),d=G(o*o*n,s),r=Ee(a*d).pow_p_5_8,l=G(a*o*r,s),p=G(n*l*l,s),c=l,B=G(l*Wt,s),t=p===a,h=p===G(-a,s),w=p===G(-a*Wt,s);return t&&(l=c),(h||w)&&(l=B),Zt(l,s)&&(l=G(-l,s)),{isValid:t||h,value:l}}var Bt,Wt,Xe,pe,jt,We,me,ye,_e,ve,je,ge=it(()=>{"use strict";Vt();Tt();Xt();Mt();Bt=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),Wt=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),Xe=BigInt(0),pe=BigInt(1),jt=BigInt(2),We=BigInt(3),me=BigInt(5),ye=BigInt(8);m(Ee,"ed25519_pow_2_252_3");m(Be,"adjustScalarBytes");m(we,"uvRatio");_e=lt(Bt,void 0,!0),ve={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:_e,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:ye,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:zt,randomBytes:Dt,adjustScalarBytes:Be,uvRatio:we},je=Yt(ve)});var Kt=ce((Qe,wt)=>{"use strict";var Re=Object.prototype.hasOwnProperty,I="~";function rt(){}m(rt,"Events");Object.create&&(rt.prototype=Object.create(null),new rt().__proto__||(I=!1));function Se(a,n,s){this.fn=a,this.context=n,this.once=s||!1}m(Se,"EE");function kt(a,n,s,o,d){if(typeof s!="function")throw new TypeError("The listener must be a function");var r=new Se(s,o||a,d),l=I?I+n:n;return a._events[l]?a._events[l].fn?a._events[l]=[a._events[l],r]:a._events[l].push(r):(a._events[l]=r,a._eventsCount++),a}m(kt,"addListener");function dt(a,n){--a._eventsCount===0?a._events=new rt:delete a._events[n]}m(dt,"clearEvent");function C(){this._events=new rt,this._eventsCount=0}m(C,"EventEmitter");C.prototype.eventNames=m(function(){var n=[],s,o;if(this._eventsCount===0)return n;for(o in s=this._events)Re.call(s,o)&&n.push(I?o.slice(1):o);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(s)):n},"eventNames");C.prototype.listeners=m(function(n){var s=I?I+n:n,o=this._events[s];if(!o)return[];if(o.fn)return[o.fn];for(var d=0,r=o.length,l=new Array(r);d<r;d++)l[d]=o[d].fn;return l},"listeners");C.prototype.listenerCount=m(function(n){var s=I?I+n:n,o=this._events[s];return o?o.fn?1:o.length:0},"listenerCount");C.prototype.emit=m(function(n,s,o,d,r,l){var p=I?I+n:n;if(!this._events[p])return!1;var c=this._events[p],B=arguments.length,t,h;if(c.fn){switch(c.once&&this.removeListener(n,c.fn,void 0,!0),B){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,s),!0;case 3:return c.fn.call(c.context,s,o),!0;case 4:return c.fn.call(c.context,s,o,d),!0;case 5:return c.fn.call(c.context,s,o,d,r),!0;case 6:return c.fn.call(c.context,s,o,d,r,l),!0}for(h=1,t=new Array(B-1);h<B;h++)t[h-1]=arguments[h];c.fn.apply(c.context,t)}else{var w=c.length,g;for(h=0;h<w;h++)switch(c[h].once&&this.removeListener(n,c[h].fn,void 0,!0),B){case 1:c[h].fn.call(c[h].context);break;case 2:c[h].fn.call(c[h].context,s);break;case 3:c[h].fn.call(c[h].context,s,o);break;case 4:c[h].fn.call(c[h].context,s,o,d);break;default:if(!t)for(g=1,t=new Array(B-1);g<B;g++)t[g-1]=arguments[g];c[h].fn.apply(c[h].context,t)}}return!0},"emit");C.prototype.on=m(function(n,s,o){return kt(this,n,s,o,!1)},"on");C.prototype.once=m(function(n,s,o){return kt(this,n,s,o,!0)},"once");C.prototype.removeListener=m(function(n,s,o,d){var r=I?I+n:n;if(!this._events[r])return this;if(!s)return dt(this,r),this;var l=this._events[r];if(l.fn)l.fn===s&&(!d||l.once)&&(!o||l.context===o)&&dt(this,r);else{for(var p=0,c=[],B=l.length;p<B;p++)(l[p].fn!==s||d&&!l[p].once||o&&l[p].context!==o)&&c.push(l[p]);c.length?this._events[r]=c.length===1?c[0]:c:dt(this,r)}return this},"removeListener");C.prototype.removeAllListeners=m(function(n){var s;return n?(s=I?I+n:n,this._events[s]&&dt(this,s)):(this._events=new rt,this._eventsCount=0),this},"removeAllListeners");C.prototype.off=C.prototype.removeListener;C.prototype.addListener=C.prototype.on;C.prefixed=I;C.EventEmitter=C;typeof wt<"u"&&(wt.exports=C)});var Qt,$e,Ae=it(()=>{"use strict";Qt=ie(Kt(),1),$e=Qt.default});export{zt as a,Vt as b,je as c,ge as d,Qt as e,$e as f,Ae as g};
3
3
  /*! Bundled license information:
4
4
 
5
5
  @noble/curves/esm/abstract/edwards.js:
@@ -8,4 +8,4 @@ import{Ac as at,Bc as pt,Cc as Y,Dc as mt,Ec as st,Fc as Ut,Gc as yt,Hc as Nt,Nc
8
8
  @noble/curves/esm/ed25519.js:
9
9
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
10
10
  */
11
- //# sourceMappingURL=chunk-A4YRPZLY.js.map
11
+ //# sourceMappingURL=chunk-2JVSMCLK.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a as Ne,b as Me,c as L,e as Pe,f as g,g as M,i as ke}from"./chunk-6ZYQTTM6.js";import{a as T,b as ee}from"./chunk-4WNGQ3EZ.js";import{D as de,E as Ae,a as m,d as z,f as F,i as Ie,m as I,n as _,o as ue,u as je,v as xe,w as X}from"./chunk-BFVFGZEI.js";import{a as _e}from"./chunk-FK3BI3F2.js";import{B as O,Sd as Z,U as ve,Ud as w,cd as Y,da as ye,rd as Q,v as A,xa as N}from"./chunk-56V52WZM.js";import{a,f as B}from"./chunk-G5BIPHMS.js";import{ListStateStorage as Je,mergeProcessResults as qe}from"@sentio/runtime";var p=B(Q(),1);var Xe="0x0000000000000000000000000000000000000000000000000000000000000000";function f(n){return typeof n!="object"||n==null?!1:n.$kind==="GasCoin"||n.$kind==="Result"||n.$kind==="NestedResult"||n.$kind==="Input"}a(f,"isTransactionArgument");function tt(n,e){return f(n)?n:e.object(n)}a(tt,"transactionArgumentOrObject");function nt(n,e){return f(n)?n:typeof n=="string"?e.pure.string(n):e.pure.u64(n)}a(nt,"transactionArgumentOrPure");function rt(n,e){return f(n)?n:e.pure.address(n)}a(rt,"transactionArgumentOrPureAddress");function st(n,e){return f(n)?n:e.pure.u8(n)}a(st,"transactionArgumentOrPureU8");function ot(n,e){return f(n)?n:e.pure.u16(n)}a(ot,"transactionArgumentOrPureU16");function it(n,e){return f(n)?n:e.pure.u32(n)}a(it,"transactionArgumentOrPureU32");function at(n,e){return f(n)?n:e.pure.u64(n)}a(at,"transactionArgumentOrPureU64");function ct(n,e){return f(n)?n:e.pure.u128(n)}a(ct,"transactionArgumentOrPureU128");function ut(n,e){return f(n)?n:e.pure.u256(n)}a(ut,"transactionArgumentOrPureU256");function dt(n,e){return f(n)?n:e.pure.bool(n)}a(dt,"transactionArgumentOrPureBool");function lt(n,e){return f(n)?n:e.makeMoveVec({elements:n.map(t=>e.object(t))})}a(lt,"transactionArgumentOrVec");function te(n){return{address:n.address,exposedFunctions:Object.entries(n.exposedFunctions).map(([e,t])=>Le(e,t)),name:n.name,structs:Object.entries(n.structs).map(([e,t])=>Ve(e,t))}}a(te,"toInternalModule");function Le(n,e){let t;switch(e.visibility){case"Private":t=X.PRIVATE;break;case"Public":t=X.PUBLIC;break;case"Friend":t=X.FRIEND;break;default:throw Error("No visibility for function"+n)}return{typeParams:e.typeParameters.map(r=>({constraints:r.abilities})),isEntry:e.isEntry,name:n,params:e.parameters.map(j),return:e.return.map(j),visibility:t}}a(Le,"toInternalFunction");function Ve(n,e){return{abilities:e.abilities.abilities,fields:e.fields.map(Ue),typeParams:e.typeParameters.map(t=>({constraints:t.constraints.abilities})),isNative:!1,isEvent:!1,name:n}}a(Ve,"toInternalStruct");function Ue(n){return{name:n.name,type:j(n.type)}}a(Ue,"toInternalField");function j(n){if(typeof n=="string")return new I(n);if("Struct"in n){let e=[n.Struct.address,n.Struct.module,n.Struct.name].join(m),t=n.Struct.typeArguments.map(j);return new I(e,t)}if("Vector"in n)return new I("Vector",[j(n.Vector)]);if("TypeParameter"in n)return new I("T"+n.TypeParameter);if("Reference"in n){let e=j(n.Reference);return e.reference=!0,e}if("MutableReference"in n){let e=j(n.MutableReference);return e.reference=!0,e.mutable=!0,e}throw new Error("Unexpected sui type")}a(j,"toTypeDescriptor");var ne=class extends je{static{a(this,"SuiChainAdapter")}async getChainId(){return this.client.getChainIdentifier()}client;constructor(e){super(),this.client=e}async fetchModule(e,t){return await this.client.getNormalizedMoveModule({package:e,module:t})}async fetchModules(e){let t=await this.client.getNormalizedMoveModulesByPackage({package:e});return Object.values(t)}getMeaningfulFunctionParams(e){return e}toInternalModules(e){return Object.values(e).map(te)}getAllEventStructs(e){let t=new Map;for(let r of e){let s=Ie(r);for(let o of r.structs){let i=new Set(o.abilities);i.has("Drop")&&i.has("Copy")&&t.set(s+m+o.name,o)}}return t}getType(e){return e.type}getData(e){if(e===void 0)throw Error("val is undefined");return"parsedJson"in e?e.parsedJson:e.dataType==="moveObject"||"fields"in e&&"type"in e&&Object.keys(e).length===2?e.fields:e}};var v=class extends xe{static{a(this,"MoveCoder")}constructor(e){super(new ne(e))}load(e,t){let r=this.moduleMapping.get(e.address+"::"+e.name),s=this.moduleMapping.get(t+"::"+e.name);return r&&s||(r=te(e),this.loadInternal(r,t)),r}async decode(e,t){switch(t.qname){case"0x1::ascii::Char":if(e!==void 0&&typeof e!="string"){let s=(await super.decode(e,t)).byte;return String.fromCharCode(s)}case"0x1::ascii::String":if(e!==void 0&&typeof e!="string"){let s=(await super.decode(e,t)).bytes;return new TextDecoder().decode(new Uint8Array(s))}case"0x2::object::ID":if(e!==void 0&&typeof e!="string"){let s=(await super.decode(e,t)).bytes;return Me(s)}case"0x2::url::Url":if(e!==void 0&&typeof e!="string")return(await super.decode(e,t)).url;case"0x2::coin::Coin":if(e!==void 0&&typeof e!="string"){let s=(await super.decode(e,t)).id.id.bytes;return new TextDecoder().decode(new Uint8Array(s))}return e;case"0x2::balance::Balance":return e.value?(await super.decode(e,t)).value:BigInt(e);case"0x1::option::Option":if(e===null)return e;if(e.vec){let s=await super.decode(e,t);return s=s.vec,s.length===0?null:s[0]}return this.decode(e,t.typeArgs[0]);case"Address":return Ne(e);case"0x1::string::String":if(typeof e!="string")return new TextDecoder().decode(new Uint8Array(e.bytes));default:return super.decode(e,t)}}decodeEvent(e){return this.decodedStruct(e)}filterAndDecodeEvents(e,t){return typeof e=="string"&&(e=_(e)),this.filterAndDecodeStruct(e,t)}async getDynamicFields(e,t=ue,r=ue){let s=new I("0x2::dynamic_field::Field");return s.typeArgs=[t,r],(await this.filterAndDecodeObjects(s,e)).map(i=>i.data_decoded)}filterAndDecodeObjects(e,t){return this.filterAndDecodeStruct(e,t)}async decodeFunctionPayload(e,t){let r=[e.package,e.module,e.function].join(m),s=await this.getMoveFunction(r),o=this.adapter.getMeaningfulFunctionParams(s.params),i=[];for(let c of e.arguments||[]){let d=c;if("Input"in d){let C=d.Input,h=t[C];h.type==="pure"?i.push(h.value):(h.type==="object"||console.error("unexpected function arg value"),i.push(void 0))}else i.push(void 0)}let u=await this.decodeArray(i,o,!1);return{...e,arguments_decoded:u}}bcsRegistered=new Set;bcsRegistry=new Map;async getBCSTypeWithArgs(e,t=[]){let r=e.qname,s=e.getNormalizedSignature(),o=this.bcsRegistry.get(s);if(o)return o;let i=r.toLowerCase();switch(i){case"u8":case"u16":case"u32":case"u64":case"u128":case"u256":case"bool":return L[i]();case"address":return L.Address;case"vector":return L.vector(t[0]);default:if(!r.includes("::"))throw`Unimplemented builtin type ${r}`}let u;try{u=await this.getMoveStruct(r)}catch(d){throw console.error("Invalid move address",r),d}let c={};for(let d of u.fields)if(d.type.qname.startsWith("T")&&t.length){let C=+d.type.qname.slice(1);c[d.name]=t[C]}else d.type.typeArgs.length&&t.length?c[d.name]=await this.getBCSTypeWithArgs(d.type,t):c[d.name]=await this.getBCSType(d.type);return L.struct(r,c)}async getBCSType(e){let t=await Promise.all(e.typeArgs.map(s=>this.getBCSType(s))),r=await this.getBCSTypeWithArgs(e,t);return this.bcsRegistry.set(e.getNormalizedSignature(),r),r}async registerBCSTypes(e){let t=e.getNormalizedSignature();if(this.bcsRegistered.has(t))return;this.bcsRegistered.add(t);let r=await this.getBCSType(e);this.bcsRegistry.set(e.getNormalizedSignature(),r)}async decodeBCS(e,t,r){if(await this.registerBCSTypes(e),typeof t=="string"){let o=Buffer.from(t,r);t=new Uint8Array(o,o.byteOffset,o.byteLength)}return this.bcsRegistry.get(e.getNormalizedSignature())?.parse(t)}async decodeDevInspectResult(e){let t=[];if(e.results!=null)for(let r of e.results)if(r.returnValues)for(let s of r.returnValues){let o=_(s[1]),i=await this.decodeBCS(o,new Uint8Array(s[0])),u=await this.decodeType(i,o);t.push(u)}else t.push(null);return{...e,results_decoded:t}}},Ge="https://fullnode.mainnet.sui.io/",Ee=new Map;function He(n=Ge){let e=Ee.get(n);return e||(e=new v(new Pe({url:n})),Ee.set(n,e)),e}a(He,"defaultMoveCoder");var De=new Map,le;async function $e(n){let e=De.get(n);if(!e){e=new v(n);let t=await n.getChainIdentifier(),r=He();le||(le=await r.adapter.getChainId()),t===le&&(e=r),De.set(n,e)}return e}a($e,"getMoveCoder");var Re=new Map;function P(n=g.MAIN_NET){let e=Re.get(n);return e||(e=new v(M(n)),Re.set(n,e)),e}a(P,"defaultMoveCoder");import("node:process").then(n=>n.stdout.write(""));var b=class extends de{static{a(this,"SuiContext")}moduleName;timestamp;checkpoint;transaction;eventIndex;coder;constructor(e,t,r,s,o,i,u,c){super(c),this.address=r.toLowerCase(),this.network=t,this.moduleName=e,this.timestamp=s,this.checkpoint=o,this.eventIndex=u,this.coder=P(t),i&&(this.transaction=i)}getChainId(){return this.network}getTimestamp(){return this.timestamp.getDate()}getMetaDataInternal(e,t){return{address:this.address,contractName:this.moduleName,blockNumber:this.checkpoint,transactionIndex:0,transactionHash:this.transaction?.digest||"",logIndex:this.eventIndex,chainId:this.getChainId(),name:e,labels:Y(t)}}get client(){return M(this.network)}},k=class extends de{static{a(this,"SuiObjectChangeContext")}timestamp;checkpoint;coder;txDigest;constructor(e,t,r,s,o,i){super(i),this.address=t,this.network=e,this.timestamp=r,this.checkpoint=s,this.txDigest=o,this.coder=P(e)}getChainId(){return this.network}getTimestamp(){return this.timestamp.getDate()}getMetaDataInternal(e,t){return{address:this.address,contractName:"*",blockNumber:this.checkpoint,transactionIndex:-1,transactionHash:this.txDigest,logIndex:0,chainId:this.getChainId(),name:e,labels:Y(t)}}get client(){return M(this.network)}},pe=class extends Ae{static{a(this,"SuiAddressContext")}address;network;checkpoint;timestamp;coder;contractName="address";constructor(e,t,r,s,o){super(o),this.address=t,this.network=e,this.checkpoint=r,this.timestamp=s,this.coder=P(e)}getChainId(){return this.network}getMetaDataInternal(e,t){return{address:this.address,contractName:this.contractName,blockNumber:this.checkpoint,transactionIndex:0,transactionHash:"",logIndex:0,chainId:this.getChainId(),name:e,labels:Y(t)}}get client(){return M(this.network)}getTimestamp(){return this.timestamp.getDate()}},re=class extends pe{static{a(this,"SuiObjectContext")}contractName="object";objectId;objectVersion;constructor(e,t,r,s,o,i){super(e,t,s,o,i),this.objectId=t,this.objectVersion=r}};import("node:process").then(n=>n.stdout.write(""));function Be(n){let e=n.transaction?.data.transaction;if(!e)return[];let t=e.kind==="ProgrammableTransaction"?e:void 0;return t?t.transactions.flatMap(r=>{if("MoveCall"in r){let s=r.MoveCall;return s.package=z(s.package),[s]}return[]}):[]}a(Be,"getMoveCalls");import("node:process").then(n=>n.stdout.write(""));var V={resourceChanges:!1,allEvents:!1,inputs:!1};function me(n){return{startCheckpoint:n.startCheckpoint||0n,address:n.address===w?w:F(n.address),network:n.network||g.MAIN_NET,baseLabels:n.baseLabels}}a(me,"configure");var U=class n extends Je{static{a(this,"SuiProcessorState")}static INSTANCE=new n},G=class{static{a(this,"SuiBaseProcessor")}moduleName;config;eventHandlers=[];callHandlers=[];objectChangeHandlers=[];coder;constructor(e,t){return this.moduleName=e,this.config=me(t),U.INSTANCE.addValue(this),this.coder=P(this.config.network),ee(this)}getChainId(){return this.config.network}onMoveEvent(e,t,r){let s=[],o=N.fromPartial({...V,...r});Array.isArray(t)?s=t:s.push(t);let i=this,u=new Set(s.map(c=>c.type));return this.eventHandlers.push({handlerName:T(),handler:a(async function(c){if(!c.transaction)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"event is null");let d=c.transaction;if(!d.events||!d.events.length)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"no event in the transactions");let C=[];for(let h of d.events){let H=Number(h.id.eventSeq)||0,[we,R,ce]=_(h.type).qname.split(m);if(!u.has([R,ce].join(m)))continue;let K=new b(i.moduleName,i.config.network,i.config.address,c.timestamp||new Date(0),c.slot,d,H,i.config.baseLabels),Fe=await i.coder.decodeEvent(h);await e(Fe||h,K),C.push(K.stopAndGetResult())}return qe(C)},"handler"),filters:s,fetchConfig:o}),this}onEntryFunctionCall(e,t,r){let s=[],o=N.fromPartial({...V,...r});Array.isArray(t)?s=t:s.push(t);let i=this,u=new Set(s.map(c=>c.function));return this.callHandlers.push({handlerName:T(),handler:a(async function(c){if(!c.transaction)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"call is null");let d=c.transaction,C=new b(i.moduleName,i.config.network,i.config.address,c.timestamp||new Date(0),c.slot,d,0,i.config.baseLabels);if(d){let h=Be(d),H=d.transaction?.data?.transaction;if(!H)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"Unexpected getTransactionKind get empty");let we=H.kind==="ProgrammableTransaction"?H:void 0;for(let R of h){let ce=[R.module,R.function].join(m);if(!u.has(ce))continue;let K=await i.coder.decodeFunctionPayload(R,we?.inputs||[]);await e(K,C)}}return C.stopAndGetResult()},"handler"),filters:s,fetchConfig:o}),this}onEvent(e,t){return this.onMoveEvent(e,{type:""},t),this}onTransactionBlock(e,t,r){let s=N.fromPartial({...V,...r}),o=this;return this.callHandlers.push({handlerName:T(),handler:a(async function(i){if(!i.transaction)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"transaction is null");let u=i.transaction,c=new b(o.moduleName,o.config.network,o.config.address,i.timestamp||new Date(0),i.slot,u,0,o.config.baseLabels);return u&&await e(u,c),c.stopAndGetResult()},"handler"),filters:[{...t,function:""}],fetchConfig:s}),this}onObjectChange(e,t){if(this.config.network===g.TEST_NET)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"object change not supported in testnet");let r=this;return this.objectChangeHandlers.push({handlerName:T(),handler:a(async function(s){let o=new k(r.config.network,r.config.address,s.timestamp||new Date(0),s.slot,s.txDigest,r.config.baseLabels);return await e(s.changes,o),o.stopAndGetResult()},"handler"),type:t}),this}},fe=class n extends G{static{a(this,"SuiModulesProcessor")}static bind(e){return new n(w,e)}},he=class n extends G{static{a(this,"SuiGlobalProcessor")}static bind(e){return new n(w,{...e,address:w})}onTransactionBlock(e,t,r){return super.onTransactionBlock(e,t,r)}onObjectChange(e,t){return super.onObjectChange(e,t)}};import("node:process").then(n=>n.stdout.write(""));import{ListStateStorage as We}from"@sentio/runtime";var E=B(Q(),1);var be={owned:!1},y=class n extends We{static{a(this,"SuiAccountProcessorState")}static INSTANCE=new n},se=class{static{a(this,"SuiBaseObjectOrAddressProcessor")}config;ownerType;templateId;objectHandlers=[];objectChangeHandlers=[];constructor(e){return e.ownerType===A.TYPE?this.config={startCheckpoint:e.startCheckpoint||0n,address:e.address==="*"?"*":z(e.address),network:e.network||g.MAIN_NET,baseLabels:e.baseLabels}:this.config=me(e),this.ownerType=e.ownerType,y.INSTANCE.addValue(this),ee(this)}getChainId(){return this.config.network}onInterval(e,t,r,s,o){let i=this;return this.objectHandlers.push({handlerName:T(),handler:a(async function(u){let c=new re(i.config.network,u.objectId,u.objectVersion,u.slot,u.timestamp||new Date(0),i.config.baseLabels);return await i.doHandle(e,u,c),c.stopAndGetResult()},"handler"),timeIntervalInMinutes:t,checkPointInterval:r,type:s,fetchConfig:{...be,...o}}),this}},$=class extends se{static{a(this,"SuiBaseObjectOrAddressProcessorInternal")}onTimeInterval(e,t=60,r=240,s,o){return this.onInterval(e,{recentInterval:t,backfillInterval:r},void 0,s,o)}onCheckpointInterval(e,t=1e5,r=4e5,s,o){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:r},s,o)}},x=class n extends ${static{a(this,"SuiAddressProcessor")}callHandlers=[];static bind(e){return new n({...e,ownerType:A.ADDRESS})}async doHandle(e,t,r){return e(t.objects,r)}onTransactionBlock(e,t,r){let s=N.fromPartial({...V,...r}),o={fromAndToAddress:{from:"",to:this.config.address},...t},i=this;return this.callHandlers.push({handlerName:T(),handler:a(async function(u){if(!u.transaction)throw new E.ServerError(E.Status.INVALID_ARGUMENT,"transaction is null");let c=u.transaction,d=new b("object",i.config.network,i.config.address,u.timestamp||new Date(0),u.slot,c,0,i.config.baseLabels);return c&&await e(c,d),d.stopAndGetResult()},"handler"),filters:[{...o,function:""}],fetchConfig:s}),this}},J=class n extends ${static{a(this,"SuiObjectProcessor")}static bind(e){return new n({address:e.objectId,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:A.OBJECT,baseLabels:e.baseLabels})}async doHandle(e,t,r){if(!t.self){console.log(`Sui object not existed in ${r.checkpoint}, please specific a start time`);return}return e(t.self,t.objects,r)}},ge=class n extends se{static{a(this,"SuiObjectTypeProcessor")}objectType;static bind(e){let t=new n({address:w,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:A.TYPE,baseLabels:e.baseLabels});return t.objectType=e.objectType,t}async doHandle(e,t,r){if(!t.self){console.log(`Sui object not existed in ${r.checkpoint}, please specific a start time`);return}let s=await r.coder.filterAndDecodeObjects(this.objectType,[t.self]);return e(s[0],t.objects,r)}onObjectChange(e){if(this.config.network===g.TEST_NET)throw new E.ServerError(E.Status.INVALID_ARGUMENT,"object change not supported in testnet");let t=this;return this.objectChangeHandlers.push({handlerName:T(),handler:a(async function(r){let s=new k(t.config.network,t.config.address,r.timestamp||new Date(0),r.slot,r.txDigest,t.config.baseLabels);return await e(r.changes,s),s.stopAndGetResult()},"handler"),type:this.objectType.qname}),this}onTimeInterval(e,t=60,r=240,s){return this.onInterval(e,{recentInterval:t,backfillInterval:r},void 0,this.objectType.qname,s)}onCheckpointInterval(e,t=1e5,r=4e5,s){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:r},this.objectType.qname,s)}},q=class n extends ${static{a(this,"SuiWrappedObjectProcessor")}static bind(e){return new n({address:e.objectId,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:A.WRAPPED_OBJECT,baseLabels:e.baseLabels})}async doHandle(e,t,r){return e(t.objects,r)}};import("node:process").then(n=>n.stdout.write(""));import{ListStateStorage as Ke}from"@sentio/runtime";var S=B(Q(),1);var D=class n extends Ke{static{a(this,"SuiAccountProcessorTemplateState")}static INSTANCE=new n},W=class{static{a(this,"SuiObjectOrAddressProcessorTemplate")}id;objectHandlers=[];binds=new Set;constructor(){this.id=D.INSTANCE.getValues().length,D.INSTANCE.addValue(this)}bind(e,t){e.network=e.network||t.network,e.startCheckpoint=e.startCheckpoint||t.checkpoint;let r=e.objectId||e.address;if(r==="*")throw new S.ServerError(S.Status.INVALID_ARGUMENT,"can't bind template instance with *");r=F(r);let s=[e.network,r].join("_");if(this.binds.has(s)){console.log(`Same object id can be bind to one template only once, ignore duplicate bind: ${s}`);return}this.binds.add(s);let o=this.createProcessor(e);for(let u of this.objectHandlers)o.onInterval(u.handler,u.timeIntervalInMinutes,u.checkpointInterval,u.type,u.fetchConfig);let i=o.config;t.update({states:{configUpdated:!0}}),Z.INSTANCE.addValue({templateId:this.id,contract:{name:"",chainId:i.network,address:i.address,abi:""},startBlock:i.startCheckpoint,endBlock:0n,baseLabels:i.baseLabels}),console.log(`successfully bind template ${s}`)}unbind(e,t){e.network=e.network||t.network,e.startCheckpoint=e.startCheckpoint||t.checkpoint;let r=e.objectId||e.address;if(r==="*")throw new S.ServerError(S.Status.INVALID_ARGUMENT,"can't delete template instance bind with *");r=F(r);let s=[e.network,r].join("_");if(!this.binds.has(s)){console.log(`the template instance ${s} not existed or already unbind`);return}this.binds.delete(s);let o=0,i=Z.INSTANCE.unregister();for(let c of i){if(c.contract?.chainId===e.network&&c.contract.address==r){o++;continue}Z.INSTANCE.addValue(c)}if(o!==1)throw new S.ServerError(S.Status.INVALID_ARGUMENT,`Failed to delete template instance ${s}, deleted ${o} times`);let u=y.INSTANCE.unregister();o=0;for(let c of u){if(c.templateId===this.id&&c.config.network==e.network&&c.config.address===r){o++;continue}y.INSTANCE.addValue(c)}if(o!==1)throw new S.ServerError(S.Status.INVALID_ARGUMENT,`Failed to delete processor for template ${this.id}, ${s}. deleted ${o} times`);console.log(`successfully unbind template ${s}`),t.update({states:{configUpdated:!0}})}onInterval(e,t,r,s,o){return this.objectHandlers.push({handler:e,timeIntervalInMinutes:t,checkpointInterval:r,type:s,fetchConfig:{...be,...o}}),this}onTimeInterval(e,t=60,r=240,s,o){return this.onInterval(e,{recentInterval:t,backfillInterval:r},void 0,s,o)}onCheckpointInterval(e,t=1e5,r=4e5,s,o){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:r},s,o)}};var Se=class extends W{static{a(this,"SuiAddressProcessorTemplate")}handlers=[];createProcessor(e){let t=x.bind(e);for(let r of this.handlers)t.onTransactionBlock(r.handler,r.filter,r.fetchConfig);return t.templateId=this.id,t}onTransactionBlock(e,t,r){return this.handlers.push({handler:e,filter:t,fetchConfig:r}),this}},Ce=class extends W{static{a(this,"SuiObjectProcessorTemplate")}createProcessor(e){let t=J.bind(e);return t.templateId=this.id,t}},Oe=class extends W{static{a(this,"SuiWrappedObjectProcessorTemplate")}createProcessor(e){let t=q.bind(e);return t.templateId=this.id,t}};import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));import{errorString as oe,mergeProcessResults as ie,Plugin as Ye,PluginManager as Qe,USER_PROCESSOR as Ze}from"@sentio/runtime";var l=B(Q(),1);var Te=B(_e(),1);var ae=class extends Ye{static{a(this,"SuiPlugin")}name="SuiPlugin";handlers={suiCallHandlers:[],suiEventHandlers:[],suiObjectHandlers:[],suiObjectChangeHandlers:[]};async start(e){await ke(),console.log("total instances:",e.templateInstances.length);let t=new Set(Object.values(Te.SuiChainId));for(let r of e.templateInstances){if(!t.has(r.contract?.chainId||""))continue;console.log("start template instance",r.templateId),D.INSTANCE.getValues()[r.templateId].bind({address:r.contract?.address||"",objectId:r.contract?.address||"",network:r.contract?.chainId||g.MAIN_NET,startCheckpoint:r.startBlock||0n,baseLabels:r.baseLabels},ze)}}async configure(e){let t={suiCallHandlers:[],suiEventHandlers:[],suiObjectHandlers:[],suiObjectChangeHandlers:[]};for(let r of U.INSTANCE.getValues()){let s=ve.fromPartial({transactionConfig:[],processorType:Ze,contract:{name:r.moduleName,chainId:r.config.network,address:r.config.address,abi:""},startBlock:r.config.startCheckpoint});for(let o of r.eventHandlers){let i=t.suiEventHandlers.push(o.handler)-1,u={filters:o.filters.map(c=>({type:c.type,account:c.account||""})),fetchConfig:o.fetchConfig,handlerId:i,handlerName:o.handlerName};s.moveEventConfigs.push(u)}for(let o of r.callHandlers){let i=t.suiCallHandlers.push(o.handler)-1,u={filters:o.filters.map(c=>({function:c.function,typeArguments:c.typeArguments||[],withTypeArguments:!!c.typeArguments,includeFailed:c.includeFailed||!1,publicKeyPrefix:c.publicKeyPrefix||"",fromAndToAddress:c.fromAndToAddress})),fetchConfig:o.fetchConfig,handlerId:i,handlerName:o.handlerName};s.moveCallConfigs.push(u)}for(let o of r.objectChangeHandlers){let i=t.suiObjectChangeHandlers.push(o.handler)-1,u={type:o.type,handlerId:i,handlerName:o.handlerName};s.moveResourceChangeConfigs.push(u)}e.contractConfigs.push(s)}for(let r of y.INSTANCE.getValues()){let s=ye.fromPartial({address:r.config.address,chainId:r.getChainId(),startBlock:r.config.startCheckpoint});for(let o of r.objectChangeHandlers){let i=t.suiObjectChangeHandlers.push(o.handler)-1,u={type:o.type,handlerId:i,handlerName:o.handlerName};s.moveResourceChangeConfigs.push(u)}for(let o of r.objectHandlers){let i=t.suiObjectHandlers.push(o.handler)-1;s.moveIntervalConfigs.push({intervalConfig:{handlerId:i,handlerName:o.handlerName,minutes:0,minutesInterval:o.timeIntervalInMinutes,slot:0,slotInterval:o.checkPointInterval,fetchConfig:void 0},type:o.type||"",ownerType:r.ownerType,resourceFetchConfig:o.fetchConfig,fetchConfig:void 0})}if(r instanceof x)for(let o of r.callHandlers){let i=t.suiCallHandlers.push(o.handler)-1,u={filters:o.filters.map(c=>({function:c.function,typeArguments:c.typeArguments||[],withTypeArguments:!!c.typeArguments,includeFailed:c.includeFailed||!1,publicKeyPrefix:c.publicKeyPrefix||"",fromAndToAddress:c.fromAndToAddress})),fetchConfig:o.fetchConfig,handlerId:i,handlerName:o.handlerName};s.moveCallConfigs.push(u)}e.accountConfigs.push(s)}this.handlers=t}async processSuiEvent(e){if(!e.data?.suiEvent)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Event can't be empty");let t=[],r=e.data.suiEvent;for(let s of e.handlerIds)t.push(this.handlers.suiEventHandlers[s](r).catch(o=>{throw new l.ServerError(l.Status.INTERNAL,"error processing event: "+JSON.stringify(r)+`
2
+ import{a as Ne,b as Me,c as L,e as Pe,f as g,g as M,i as ke}from"./chunk-VP5JD634.js";import{a as T,b as ee}from"./chunk-4WNGQ3EZ.js";import{D as de,E as Ae,a as m,d as z,f as F,i as Ie,m as I,n as _,o as ue,u as je,v as xe,w as X}from"./chunk-ASNZI46T.js";import{a as _e}from"./chunk-FK3BI3F2.js";import{B as O,U as ve,Ud as Z,Wd as w,da as ye,ed as Y,td as Q,v as A,xa as N}from"./chunk-65MPQCTW.js";import{a,f as B}from"./chunk-G5BIPHMS.js";import{ListStateStorage as Je,mergeProcessResults as qe}from"@sentio/runtime";var p=B(Q(),1);var Xe="0x0000000000000000000000000000000000000000000000000000000000000000";function f(n){return typeof n!="object"||n==null?!1:n.$kind==="GasCoin"||n.$kind==="Result"||n.$kind==="NestedResult"||n.$kind==="Input"}a(f,"isTransactionArgument");function tt(n,e){return f(n)?n:e.object(n)}a(tt,"transactionArgumentOrObject");function nt(n,e){return f(n)?n:typeof n=="string"?e.pure.string(n):e.pure.u64(n)}a(nt,"transactionArgumentOrPure");function rt(n,e){return f(n)?n:e.pure.address(n)}a(rt,"transactionArgumentOrPureAddress");function st(n,e){return f(n)?n:e.pure.u8(n)}a(st,"transactionArgumentOrPureU8");function ot(n,e){return f(n)?n:e.pure.u16(n)}a(ot,"transactionArgumentOrPureU16");function it(n,e){return f(n)?n:e.pure.u32(n)}a(it,"transactionArgumentOrPureU32");function at(n,e){return f(n)?n:e.pure.u64(n)}a(at,"transactionArgumentOrPureU64");function ct(n,e){return f(n)?n:e.pure.u128(n)}a(ct,"transactionArgumentOrPureU128");function ut(n,e){return f(n)?n:e.pure.u256(n)}a(ut,"transactionArgumentOrPureU256");function dt(n,e){return f(n)?n:e.pure.bool(n)}a(dt,"transactionArgumentOrPureBool");function lt(n,e){return f(n)?n:e.makeMoveVec({elements:n.map(t=>e.object(t))})}a(lt,"transactionArgumentOrVec");function te(n){return{address:n.address,exposedFunctions:Object.entries(n.exposedFunctions).map(([e,t])=>Le(e,t)),name:n.name,structs:Object.entries(n.structs).map(([e,t])=>Ve(e,t))}}a(te,"toInternalModule");function Le(n,e){let t;switch(e.visibility){case"Private":t=X.PRIVATE;break;case"Public":t=X.PUBLIC;break;case"Friend":t=X.FRIEND;break;default:throw Error("No visibility for function"+n)}return{typeParams:e.typeParameters.map(r=>({constraints:r.abilities})),isEntry:e.isEntry,name:n,params:e.parameters.map(j),return:e.return.map(j),visibility:t}}a(Le,"toInternalFunction");function Ve(n,e){return{abilities:e.abilities.abilities,fields:e.fields.map(Ue),typeParams:e.typeParameters.map(t=>({constraints:t.constraints.abilities})),isNative:!1,isEvent:!1,name:n}}a(Ve,"toInternalStruct");function Ue(n){return{name:n.name,type:j(n.type)}}a(Ue,"toInternalField");function j(n){if(typeof n=="string")return new I(n);if("Struct"in n){let e=[n.Struct.address,n.Struct.module,n.Struct.name].join(m),t=n.Struct.typeArguments.map(j);return new I(e,t)}if("Vector"in n)return new I("Vector",[j(n.Vector)]);if("TypeParameter"in n)return new I("T"+n.TypeParameter);if("Reference"in n){let e=j(n.Reference);return e.reference=!0,e}if("MutableReference"in n){let e=j(n.MutableReference);return e.reference=!0,e.mutable=!0,e}throw new Error("Unexpected sui type")}a(j,"toTypeDescriptor");var ne=class extends je{static{a(this,"SuiChainAdapter")}async getChainId(){return this.client.getChainIdentifier()}client;constructor(e){super(),this.client=e}async fetchModule(e,t){return await this.client.getNormalizedMoveModule({package:e,module:t})}async fetchModules(e){let t=await this.client.getNormalizedMoveModulesByPackage({package:e});return Object.values(t)}getMeaningfulFunctionParams(e){return e}toInternalModules(e){return Object.values(e).map(te)}getAllEventStructs(e){let t=new Map;for(let r of e){let s=Ie(r);for(let o of r.structs){let i=new Set(o.abilities);i.has("Drop")&&i.has("Copy")&&t.set(s+m+o.name,o)}}return t}getType(e){return e.type}getData(e){if(e===void 0)throw Error("val is undefined");return"parsedJson"in e?e.parsedJson:e.dataType==="moveObject"||"fields"in e&&"type"in e&&Object.keys(e).length===2?e.fields:e}};var v=class extends xe{static{a(this,"MoveCoder")}constructor(e){super(new ne(e))}load(e,t){let r=this.moduleMapping.get(e.address+"::"+e.name),s=this.moduleMapping.get(t+"::"+e.name);return r&&s||(r=te(e),this.loadInternal(r,t)),r}async decode(e,t){switch(t.qname){case"0x1::ascii::Char":if(e!==void 0&&typeof e!="string"){let s=(await super.decode(e,t)).byte;return String.fromCharCode(s)}case"0x1::ascii::String":if(e!==void 0&&typeof e!="string"){let s=(await super.decode(e,t)).bytes;return new TextDecoder().decode(new Uint8Array(s))}case"0x2::object::ID":if(e!==void 0&&typeof e!="string"){let s=(await super.decode(e,t)).bytes;return Me(s)}case"0x2::url::Url":if(e!==void 0&&typeof e!="string")return(await super.decode(e,t)).url;case"0x2::coin::Coin":if(e!==void 0&&typeof e!="string"){let s=(await super.decode(e,t)).id.id.bytes;return new TextDecoder().decode(new Uint8Array(s))}return e;case"0x2::balance::Balance":return e.value?(await super.decode(e,t)).value:BigInt(e);case"0x1::option::Option":if(e===null)return e;if(e.vec){let s=await super.decode(e,t);return s=s.vec,s.length===0?null:s[0]}return this.decode(e,t.typeArgs[0]);case"Address":return Ne(e);case"0x1::string::String":if(typeof e!="string")return new TextDecoder().decode(new Uint8Array(e.bytes));default:return super.decode(e,t)}}decodeEvent(e){return this.decodedStruct(e)}filterAndDecodeEvents(e,t){return typeof e=="string"&&(e=_(e)),this.filterAndDecodeStruct(e,t)}async getDynamicFields(e,t=ue,r=ue){let s=new I("0x2::dynamic_field::Field");return s.typeArgs=[t,r],(await this.filterAndDecodeObjects(s,e)).map(i=>i.data_decoded)}filterAndDecodeObjects(e,t){return this.filterAndDecodeStruct(e,t)}async decodeFunctionPayload(e,t){let r=[e.package,e.module,e.function].join(m),s=await this.getMoveFunction(r),o=this.adapter.getMeaningfulFunctionParams(s.params),i=[];for(let c of e.arguments||[]){let d=c;if("Input"in d){let C=d.Input,h=t[C];h.type==="pure"?i.push(h.value):(h.type==="object"||console.error("unexpected function arg value"),i.push(void 0))}else i.push(void 0)}let u=await this.decodeArray(i,o,!1);return{...e,arguments_decoded:u}}bcsRegistered=new Set;bcsRegistry=new Map;async getBCSTypeWithArgs(e,t=[]){let r=e.qname,s=e.getNormalizedSignature(),o=this.bcsRegistry.get(s);if(o)return o;let i=r.toLowerCase();switch(i){case"u8":case"u16":case"u32":case"u64":case"u128":case"u256":case"bool":return L[i]();case"address":return L.Address;case"vector":return L.vector(t[0]);default:if(!r.includes("::"))throw`Unimplemented builtin type ${r}`}let u;try{u=await this.getMoveStruct(r)}catch(d){throw console.error("Invalid move address",r),d}let c={};for(let d of u.fields)if(d.type.qname.startsWith("T")&&t.length){let C=+d.type.qname.slice(1);c[d.name]=t[C]}else d.type.typeArgs.length&&t.length?c[d.name]=await this.getBCSTypeWithArgs(d.type,t):c[d.name]=await this.getBCSType(d.type);return L.struct(r,c)}async getBCSType(e){let t=await Promise.all(e.typeArgs.map(s=>this.getBCSType(s))),r=await this.getBCSTypeWithArgs(e,t);return this.bcsRegistry.set(e.getNormalizedSignature(),r),r}async registerBCSTypes(e){let t=e.getNormalizedSignature();if(this.bcsRegistered.has(t))return;this.bcsRegistered.add(t);let r=await this.getBCSType(e);this.bcsRegistry.set(e.getNormalizedSignature(),r)}async decodeBCS(e,t,r){if(await this.registerBCSTypes(e),typeof t=="string"){let o=Buffer.from(t,r);t=new Uint8Array(o,o.byteOffset,o.byteLength)}return this.bcsRegistry.get(e.getNormalizedSignature())?.parse(t)}async decodeDevInspectResult(e){let t=[];if(e.results!=null)for(let r of e.results)if(r.returnValues)for(let s of r.returnValues){let o=_(s[1]),i=await this.decodeBCS(o,new Uint8Array(s[0])),u=await this.decodeType(i,o);t.push(u)}else t.push(null);return{...e,results_decoded:t}}},Ge="https://fullnode.mainnet.sui.io/",Ee=new Map;function He(n=Ge){let e=Ee.get(n);return e||(e=new v(new Pe({url:n})),Ee.set(n,e)),e}a(He,"defaultMoveCoder");var De=new Map,le;async function $e(n){let e=De.get(n);if(!e){e=new v(n);let t=await n.getChainIdentifier(),r=He();le||(le=await r.adapter.getChainId()),t===le&&(e=r),De.set(n,e)}return e}a($e,"getMoveCoder");var Re=new Map;function P(n=g.MAIN_NET){let e=Re.get(n);return e||(e=new v(M(n)),Re.set(n,e)),e}a(P,"defaultMoveCoder");import("node:process").then(n=>n.stdout.write(""));var b=class extends de{static{a(this,"SuiContext")}moduleName;timestamp;checkpoint;transaction;eventIndex;coder;constructor(e,t,r,s,o,i,u,c){super(c),this.address=r.toLowerCase(),this.network=t,this.moduleName=e,this.timestamp=s,this.checkpoint=o,this.eventIndex=u,this.coder=P(t),i&&(this.transaction=i)}getChainId(){return this.network}getTimestamp(){return this.timestamp.getDate()}getMetaDataInternal(e,t){return{address:this.address,contractName:this.moduleName,blockNumber:this.checkpoint,transactionIndex:0,transactionHash:this.transaction?.digest||"",logIndex:this.eventIndex,chainId:this.getChainId(),name:e,labels:Y(t)}}get client(){return M(this.network)}},k=class extends de{static{a(this,"SuiObjectChangeContext")}timestamp;checkpoint;coder;txDigest;constructor(e,t,r,s,o,i){super(i),this.address=t,this.network=e,this.timestamp=r,this.checkpoint=s,this.txDigest=o,this.coder=P(e)}getChainId(){return this.network}getTimestamp(){return this.timestamp.getDate()}getMetaDataInternal(e,t){return{address:this.address,contractName:"*",blockNumber:this.checkpoint,transactionIndex:-1,transactionHash:this.txDigest,logIndex:0,chainId:this.getChainId(),name:e,labels:Y(t)}}get client(){return M(this.network)}},pe=class extends Ae{static{a(this,"SuiAddressContext")}address;network;checkpoint;timestamp;coder;contractName="address";constructor(e,t,r,s,o){super(o),this.address=t,this.network=e,this.checkpoint=r,this.timestamp=s,this.coder=P(e)}getChainId(){return this.network}getMetaDataInternal(e,t){return{address:this.address,contractName:this.contractName,blockNumber:this.checkpoint,transactionIndex:0,transactionHash:"",logIndex:0,chainId:this.getChainId(),name:e,labels:Y(t)}}get client(){return M(this.network)}getTimestamp(){return this.timestamp.getDate()}},re=class extends pe{static{a(this,"SuiObjectContext")}contractName="object";objectId;objectVersion;constructor(e,t,r,s,o,i){super(e,t,s,o,i),this.objectId=t,this.objectVersion=r}};import("node:process").then(n=>n.stdout.write(""));function Be(n){let e=n.transaction?.data.transaction;if(!e)return[];let t=e.kind==="ProgrammableTransaction"?e:void 0;return t?t.transactions.flatMap(r=>{if("MoveCall"in r){let s=r.MoveCall;return s.package=z(s.package),[s]}return[]}):[]}a(Be,"getMoveCalls");import("node:process").then(n=>n.stdout.write(""));var V={resourceChanges:!1,allEvents:!1,inputs:!1};function me(n){return{startCheckpoint:n.startCheckpoint||0n,address:n.address===w?w:F(n.address),network:n.network||g.MAIN_NET,baseLabels:n.baseLabels}}a(me,"configure");var U=class n extends Je{static{a(this,"SuiProcessorState")}static INSTANCE=new n},G=class{static{a(this,"SuiBaseProcessor")}moduleName;config;eventHandlers=[];callHandlers=[];objectChangeHandlers=[];coder;constructor(e,t){return this.moduleName=e,this.config=me(t),U.INSTANCE.addValue(this),this.coder=P(this.config.network),ee(this)}getChainId(){return this.config.network}onMoveEvent(e,t,r){let s=[],o=N.fromPartial({...V,...r});Array.isArray(t)?s=t:s.push(t);let i=this,u=new Set(s.map(c=>c.type));return this.eventHandlers.push({handlerName:T(),handler:a(async function(c){if(!c.transaction)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"event is null");let d=c.transaction;if(!d.events||!d.events.length)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"no event in the transactions");let C=[];for(let h of d.events){let H=Number(h.id.eventSeq)||0,[we,R,ce]=_(h.type).qname.split(m);if(!u.has([R,ce].join(m)))continue;let K=new b(i.moduleName,i.config.network,i.config.address,c.timestamp||new Date(0),c.slot,d,H,i.config.baseLabels),Fe=await i.coder.decodeEvent(h);await e(Fe||h,K),C.push(K.stopAndGetResult())}return qe(C)},"handler"),filters:s,fetchConfig:o}),this}onEntryFunctionCall(e,t,r){let s=[],o=N.fromPartial({...V,...r});Array.isArray(t)?s=t:s.push(t);let i=this,u=new Set(s.map(c=>c.function));return this.callHandlers.push({handlerName:T(),handler:a(async function(c){if(!c.transaction)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"call is null");let d=c.transaction,C=new b(i.moduleName,i.config.network,i.config.address,c.timestamp||new Date(0),c.slot,d,0,i.config.baseLabels);if(d){let h=Be(d),H=d.transaction?.data?.transaction;if(!H)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"Unexpected getTransactionKind get empty");let we=H.kind==="ProgrammableTransaction"?H:void 0;for(let R of h){let ce=[R.module,R.function].join(m);if(!u.has(ce))continue;let K=await i.coder.decodeFunctionPayload(R,we?.inputs||[]);await e(K,C)}}return C.stopAndGetResult()},"handler"),filters:s,fetchConfig:o}),this}onEvent(e,t){return this.onMoveEvent(e,{type:""},t),this}onTransactionBlock(e,t,r){let s=N.fromPartial({...V,...r}),o=this;return this.callHandlers.push({handlerName:T(),handler:a(async function(i){if(!i.transaction)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"transaction is null");let u=i.transaction,c=new b(o.moduleName,o.config.network,o.config.address,i.timestamp||new Date(0),i.slot,u,0,o.config.baseLabels);return u&&await e(u,c),c.stopAndGetResult()},"handler"),filters:[{...t,function:""}],fetchConfig:s}),this}onObjectChange(e,t){if(this.config.network===g.TEST_NET)throw new p.ServerError(p.Status.INVALID_ARGUMENT,"object change not supported in testnet");let r=this;return this.objectChangeHandlers.push({handlerName:T(),handler:a(async function(s){let o=new k(r.config.network,r.config.address,s.timestamp||new Date(0),s.slot,s.txDigest,r.config.baseLabels);return await e(s.changes,o),o.stopAndGetResult()},"handler"),type:t}),this}},fe=class n extends G{static{a(this,"SuiModulesProcessor")}static bind(e){return new n(w,e)}},he=class n extends G{static{a(this,"SuiGlobalProcessor")}static bind(e){return new n(w,{...e,address:w})}onTransactionBlock(e,t,r){return super.onTransactionBlock(e,t,r)}onObjectChange(e,t){return super.onObjectChange(e,t)}};import("node:process").then(n=>n.stdout.write(""));import{ListStateStorage as We}from"@sentio/runtime";var E=B(Q(),1);var be={owned:!1},y=class n extends We{static{a(this,"SuiAccountProcessorState")}static INSTANCE=new n},se=class{static{a(this,"SuiBaseObjectOrAddressProcessor")}config;ownerType;templateId;objectHandlers=[];objectChangeHandlers=[];constructor(e){return e.ownerType===A.TYPE?this.config={startCheckpoint:e.startCheckpoint||0n,address:e.address==="*"?"*":z(e.address),network:e.network||g.MAIN_NET,baseLabels:e.baseLabels}:this.config=me(e),this.ownerType=e.ownerType,y.INSTANCE.addValue(this),ee(this)}getChainId(){return this.config.network}onInterval(e,t,r,s,o){let i=this;return this.objectHandlers.push({handlerName:T(),handler:a(async function(u){let c=new re(i.config.network,u.objectId,u.objectVersion,u.slot,u.timestamp||new Date(0),i.config.baseLabels);return await i.doHandle(e,u,c),c.stopAndGetResult()},"handler"),timeIntervalInMinutes:t,checkPointInterval:r,type:s,fetchConfig:{...be,...o}}),this}},$=class extends se{static{a(this,"SuiBaseObjectOrAddressProcessorInternal")}onTimeInterval(e,t=60,r=240,s,o){return this.onInterval(e,{recentInterval:t,backfillInterval:r},void 0,s,o)}onCheckpointInterval(e,t=1e5,r=4e5,s,o){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:r},s,o)}},x=class n extends ${static{a(this,"SuiAddressProcessor")}callHandlers=[];static bind(e){return new n({...e,ownerType:A.ADDRESS})}async doHandle(e,t,r){return e(t.objects,r)}onTransactionBlock(e,t,r){let s=N.fromPartial({...V,...r}),o={fromAndToAddress:{from:"",to:this.config.address},...t},i=this;return this.callHandlers.push({handlerName:T(),handler:a(async function(u){if(!u.transaction)throw new E.ServerError(E.Status.INVALID_ARGUMENT,"transaction is null");let c=u.transaction,d=new b("object",i.config.network,i.config.address,u.timestamp||new Date(0),u.slot,c,0,i.config.baseLabels);return c&&await e(c,d),d.stopAndGetResult()},"handler"),filters:[{...o,function:""}],fetchConfig:s}),this}},J=class n extends ${static{a(this,"SuiObjectProcessor")}static bind(e){return new n({address:e.objectId,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:A.OBJECT,baseLabels:e.baseLabels})}async doHandle(e,t,r){if(!t.self){console.log(`Sui object not existed in ${r.checkpoint}, please specific a start time`);return}return e(t.self,t.objects,r)}},ge=class n extends se{static{a(this,"SuiObjectTypeProcessor")}objectType;static bind(e){let t=new n({address:w,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:A.TYPE,baseLabels:e.baseLabels});return t.objectType=e.objectType,t}async doHandle(e,t,r){if(!t.self){console.log(`Sui object not existed in ${r.checkpoint}, please specific a start time`);return}let s=await r.coder.filterAndDecodeObjects(this.objectType,[t.self]);return e(s[0],t.objects,r)}onObjectChange(e){if(this.config.network===g.TEST_NET)throw new E.ServerError(E.Status.INVALID_ARGUMENT,"object change not supported in testnet");let t=this;return this.objectChangeHandlers.push({handlerName:T(),handler:a(async function(r){let s=new k(t.config.network,t.config.address,r.timestamp||new Date(0),r.slot,r.txDigest,t.config.baseLabels);return await e(r.changes,s),s.stopAndGetResult()},"handler"),type:this.objectType.qname}),this}onTimeInterval(e,t=60,r=240,s){return this.onInterval(e,{recentInterval:t,backfillInterval:r},void 0,this.objectType.qname,s)}onCheckpointInterval(e,t=1e5,r=4e5,s){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:r},this.objectType.qname,s)}},q=class n extends ${static{a(this,"SuiWrappedObjectProcessor")}static bind(e){return new n({address:e.objectId,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:A.WRAPPED_OBJECT,baseLabels:e.baseLabels})}async doHandle(e,t,r){return e(t.objects,r)}};import("node:process").then(n=>n.stdout.write(""));import{ListStateStorage as Ke}from"@sentio/runtime";var S=B(Q(),1);var D=class n extends Ke{static{a(this,"SuiAccountProcessorTemplateState")}static INSTANCE=new n},W=class{static{a(this,"SuiObjectOrAddressProcessorTemplate")}id;objectHandlers=[];binds=new Set;constructor(){this.id=D.INSTANCE.getValues().length,D.INSTANCE.addValue(this)}bind(e,t){e.network=e.network||t.network,e.startCheckpoint=e.startCheckpoint||t.checkpoint;let r=e.objectId||e.address;if(r==="*")throw new S.ServerError(S.Status.INVALID_ARGUMENT,"can't bind template instance with *");r=F(r);let s=[e.network,r].join("_");if(this.binds.has(s)){console.log(`Same object id can be bind to one template only once, ignore duplicate bind: ${s}`);return}this.binds.add(s);let o=this.createProcessor(e);for(let u of this.objectHandlers)o.onInterval(u.handler,u.timeIntervalInMinutes,u.checkpointInterval,u.type,u.fetchConfig);let i=o.config;t.update({states:{configUpdated:!0}}),Z.INSTANCE.addValue({templateId:this.id,contract:{name:"",chainId:i.network,address:i.address,abi:""},startBlock:i.startCheckpoint,endBlock:0n,baseLabels:i.baseLabels}),console.log(`successfully bind template ${s}`)}unbind(e,t){e.network=e.network||t.network,e.startCheckpoint=e.startCheckpoint||t.checkpoint;let r=e.objectId||e.address;if(r==="*")throw new S.ServerError(S.Status.INVALID_ARGUMENT,"can't delete template instance bind with *");r=F(r);let s=[e.network,r].join("_");if(!this.binds.has(s)){console.log(`the template instance ${s} not existed or already unbind`);return}this.binds.delete(s);let o=0,i=Z.INSTANCE.unregister();for(let c of i){if(c.contract?.chainId===e.network&&c.contract.address==r){o++;continue}Z.INSTANCE.addValue(c)}if(o!==1)throw new S.ServerError(S.Status.INVALID_ARGUMENT,`Failed to delete template instance ${s}, deleted ${o} times`);let u=y.INSTANCE.unregister();o=0;for(let c of u){if(c.templateId===this.id&&c.config.network==e.network&&c.config.address===r){o++;continue}y.INSTANCE.addValue(c)}if(o!==1)throw new S.ServerError(S.Status.INVALID_ARGUMENT,`Failed to delete processor for template ${this.id}, ${s}. deleted ${o} times`);console.log(`successfully unbind template ${s}`),t.update({states:{configUpdated:!0}})}onInterval(e,t,r,s,o){return this.objectHandlers.push({handler:e,timeIntervalInMinutes:t,checkpointInterval:r,type:s,fetchConfig:{...be,...o}}),this}onTimeInterval(e,t=60,r=240,s,o){return this.onInterval(e,{recentInterval:t,backfillInterval:r},void 0,s,o)}onCheckpointInterval(e,t=1e5,r=4e5,s,o){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:r},s,o)}};var Se=class extends W{static{a(this,"SuiAddressProcessorTemplate")}handlers=[];createProcessor(e){let t=x.bind(e);for(let r of this.handlers)t.onTransactionBlock(r.handler,r.filter,r.fetchConfig);return t.templateId=this.id,t}onTransactionBlock(e,t,r){return this.handlers.push({handler:e,filter:t,fetchConfig:r}),this}},Ce=class extends W{static{a(this,"SuiObjectProcessorTemplate")}createProcessor(e){let t=J.bind(e);return t.templateId=this.id,t}},Oe=class extends W{static{a(this,"SuiWrappedObjectProcessorTemplate")}createProcessor(e){let t=q.bind(e);return t.templateId=this.id,t}};import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));import{errorString as oe,mergeProcessResults as ie,Plugin as Ye,PluginManager as Qe,USER_PROCESSOR as Ze}from"@sentio/runtime";var l=B(Q(),1);var Te=B(_e(),1);var ae=class extends Ye{static{a(this,"SuiPlugin")}name="SuiPlugin";handlers={suiCallHandlers:[],suiEventHandlers:[],suiObjectHandlers:[],suiObjectChangeHandlers:[]};async start(e){await ke(),console.log("total instances:",e.templateInstances.length);let t=new Set(Object.values(Te.SuiChainId));for(let r of e.templateInstances){if(!t.has(r.contract?.chainId||""))continue;console.log("start template instance",r.templateId),D.INSTANCE.getValues()[r.templateId].bind({address:r.contract?.address||"",objectId:r.contract?.address||"",network:r.contract?.chainId||g.MAIN_NET,startCheckpoint:r.startBlock||0n,baseLabels:r.baseLabels},ze)}}async configure(e){let t={suiCallHandlers:[],suiEventHandlers:[],suiObjectHandlers:[],suiObjectChangeHandlers:[]};for(let r of U.INSTANCE.getValues()){let s=ve.fromPartial({transactionConfig:[],processorType:Ze,contract:{name:r.moduleName,chainId:r.config.network,address:r.config.address,abi:""},startBlock:r.config.startCheckpoint});for(let o of r.eventHandlers){let i=t.suiEventHandlers.push(o.handler)-1,u={filters:o.filters.map(c=>({type:c.type,account:c.account||""})),fetchConfig:o.fetchConfig,handlerId:i,handlerName:o.handlerName};s.moveEventConfigs.push(u)}for(let o of r.callHandlers){let i=t.suiCallHandlers.push(o.handler)-1,u={filters:o.filters.map(c=>({function:c.function,typeArguments:c.typeArguments||[],withTypeArguments:!!c.typeArguments,includeFailed:c.includeFailed||!1,publicKeyPrefix:c.publicKeyPrefix||"",fromAndToAddress:c.fromAndToAddress})),fetchConfig:o.fetchConfig,handlerId:i,handlerName:o.handlerName};s.moveCallConfigs.push(u)}for(let o of r.objectChangeHandlers){let i=t.suiObjectChangeHandlers.push(o.handler)-1,u={type:o.type,handlerId:i,handlerName:o.handlerName};s.moveResourceChangeConfigs.push(u)}e.contractConfigs.push(s)}for(let r of y.INSTANCE.getValues()){let s=ye.fromPartial({address:r.config.address,chainId:r.getChainId(),startBlock:r.config.startCheckpoint});for(let o of r.objectChangeHandlers){let i=t.suiObjectChangeHandlers.push(o.handler)-1,u={type:o.type,handlerId:i,handlerName:o.handlerName};s.moveResourceChangeConfigs.push(u)}for(let o of r.objectHandlers){let i=t.suiObjectHandlers.push(o.handler)-1;s.moveIntervalConfigs.push({intervalConfig:{handlerId:i,handlerName:o.handlerName,minutes:0,minutesInterval:o.timeIntervalInMinutes,slot:0,slotInterval:o.checkPointInterval,fetchConfig:void 0},type:o.type||"",ownerType:r.ownerType,resourceFetchConfig:o.fetchConfig,fetchConfig:void 0})}if(r instanceof x)for(let o of r.callHandlers){let i=t.suiCallHandlers.push(o.handler)-1,u={filters:o.filters.map(c=>({function:c.function,typeArguments:c.typeArguments||[],withTypeArguments:!!c.typeArguments,includeFailed:c.includeFailed||!1,publicKeyPrefix:c.publicKeyPrefix||"",fromAndToAddress:c.fromAndToAddress})),fetchConfig:o.fetchConfig,handlerId:i,handlerName:o.handlerName};s.moveCallConfigs.push(u)}e.accountConfigs.push(s)}this.handlers=t}async processSuiEvent(e){if(!e.data?.suiEvent)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Event can't be empty");let t=[],r=e.data.suiEvent;for(let s of e.handlerIds)t.push(this.handlers.suiEventHandlers[s](r).catch(o=>{throw new l.ServerError(l.Status.INTERNAL,"error processing event: "+JSON.stringify(r)+`
3
3
  `+oe(o))}));return ie(await Promise.all(t))}async processSuiFunctionCall(e){if(!e.data?.suiCall)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Call can't be empty");let t=e.data.suiCall,r=[];for(let s of e.handlerIds){let o=this.handlers.suiCallHandlers[s](t).catch(i=>{throw new l.ServerError(l.Status.INTERNAL,"error processing call: "+JSON.stringify(t)+`
4
4
  `+oe(i))});r.push(o)}return ie(await Promise.all(r))}async processSuiObject(e){if(!e.data?.suiObject)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Object can't be empty");let t=e.data.suiObject,r=[];for(let s of e.handlerIds)r.push(this.handlers.suiObjectHandlers[s](t).catch(o=>{throw new l.ServerError(l.Status.INTERNAL,"error processing object: "+JSON.stringify(t)+`
5
5
  `+oe(o))}));return ie(await Promise.all(r))}async processSuiObjectChange(e){if(!e.data?.suiObjectChange)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Object change can't be empty");let t=e.data.suiObjectChange,r=[];for(let s of e.handlerIds)r.push(this.handlers.suiObjectChangeHandlers[s](t).catch(o=>{throw new l.ServerError(l.Status.INTERNAL,"error processing object change: "+JSON.stringify(t)+`
6
6
  `+oe(o))}));return ie(await Promise.all(r))}supportedHandlers=[O.SUI_EVENT,O.SUI_CALL,O.SUI_OBJECT,O.SUI_OBJECT_CHANGE];processBinding(e){switch(e.handlerType){case O.SUI_EVENT:return this.processSuiEvent(e);case O.SUI_CALL:return this.processSuiFunctionCall(e);case O.SUI_OBJECT:return this.processSuiObject(e);case O.SUI_OBJECT_CHANGE:return this.processSuiObjectChange(e);default:throw new l.ServerError(l.Status.INVALID_ARGUMENT,"No handle type registered "+e.handlerType)}}};Qe.INSTANCE.register(new ae);var ze=new b("",Te.SuiChainId.SUI_MAINNET,"",new Date,0n,{},0,{});import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));export{Xe as a,tt as b,nt as c,rt as d,st as e,ot as f,it as g,at as h,ct as i,ut as j,dt as k,lt as l,v as m,$e as n,P as o,b as p,k as q,pe as r,re as s,Be as t,G as u,fe as v,he as w,x,J as y,ge as z,q as A,Se as B,Ce as C,Oe as D,ae as E};
7
- //# sourceMappingURL=chunk-V75BIZJU.js.map
7
+ //# sourceMappingURL=chunk-3DJLSC7V.js.map