@sentio/sdk-bundle 2.63.0 → 2.63.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) 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/{chunk-RWNFJKBC.js → chunk-3UW3O4RI.js} +2 -2
  8. package/lib/{chunk-INM2JQXV.js → chunk-3XOMJPOV.js} +2 -2
  9. package/lib/{chunk-MEXIWEPZ.js → chunk-4CH3FO2Y.js} +2 -2
  10. package/lib/{chunk-MEXIWEPZ.js.map → chunk-4CH3FO2Y.js.map} +1 -1
  11. package/lib/chunk-67VWORXP.js +7 -0
  12. package/lib/chunk-67VWORXP.js.map +1 -0
  13. package/lib/{chunk-57B2QEFU.js → chunk-ATNNVLSV.js} +2 -2
  14. package/lib/{chunk-CIT277G3.js → chunk-CQUCT4WO.js} +2 -2
  15. package/lib/{chunk-MV77KZ7X.js → chunk-D2UTA6NP.js} +3 -3
  16. package/lib/{chunk-MV77KZ7X.js.map → chunk-D2UTA6NP.js.map} +1 -1
  17. package/lib/{chunk-NF7SQC5T.js → chunk-DCBB6WSY.js} +2 -2
  18. package/lib/{chunk-IRMT3JAE.js → chunk-E32G76ZD.js} +2 -2
  19. package/lib/{chunk-45NSVYWS.js → chunk-HYBAVEVS.js} +2 -2
  20. package/lib/{chunk-EDLEFVHW.js → chunk-MEWILSVR.js} +2 -2
  21. package/lib/{chunk-33Y7LZTL.js → chunk-OSRVBU5W.js} +2 -2
  22. package/lib/{chunk-XCZJCPWS.js → chunk-PJJSNY3A.js} +2 -2
  23. package/lib/{chunk-VG7IARUK.js → chunk-STFYLBQW.js} +2 -2
  24. package/lib/{chunk-RFTTBMZW.js → chunk-US7CSPMG.js} +2 -2
  25. package/lib/{chunk-TLJXINOL.js → chunk-WESN5VPX.js} +2 -2
  26. package/lib/{chunk-JWIM4IJV.js → chunk-WS3R3PHZ.js} +2 -2
  27. package/lib/{chunk-XMZYAXTX.js → chunk-ZXTBG7Q4.js} +2 -2
  28. package/lib/{chunk-VGSWB3RH.js → chunk-ZXUK2KRA.js} +2 -2
  29. package/lib/core/index.js +1 -1
  30. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  31. package/lib/eth/builtin/erc1155.js +1 -1
  32. package/lib/eth/builtin/erc20.js +1 -1
  33. package/lib/eth/builtin/erc721.js +1 -1
  34. package/lib/eth/builtin/index.js +1 -1
  35. package/lib/eth/builtin/weth9.js +1 -1
  36. package/lib/eth/index.js +1 -1
  37. package/lib/fuel/index.js +1 -1
  38. package/lib/index.js +1 -1
  39. package/lib/iota/builtin/0x1.js +1 -1
  40. package/lib/iota/builtin/0x2.js +1 -1
  41. package/lib/iota/builtin/0x3.js +1 -1
  42. package/lib/iota/builtin/index.js +1 -1
  43. package/lib/iota/ext/index.js +1 -1
  44. package/lib/iota/index.js +1 -1
  45. package/lib/move/index.js +1 -1
  46. package/lib/solana/builtin/index.js +1 -1
  47. package/lib/solana/index.js +1 -1
  48. package/lib/stark/index.js +1 -1
  49. package/lib/store/index.js +1 -1
  50. package/lib/sui/builtin/0x1.js +1 -1
  51. package/lib/sui/builtin/0x2.js +1 -1
  52. package/lib/sui/builtin/0x3.js +1 -1
  53. package/lib/sui/builtin/index.js +1 -1
  54. package/lib/sui/ext/index.js +1 -1
  55. package/lib/sui/index.js +1 -1
  56. package/lib/testing/index.js +1 -1
  57. package/lib/utils/index.js +1 -1
  58. package/package.json +2 -2
  59. package/lib/chunk-V7ONVBT4.js +0 -7
  60. package/lib/chunk-V7ONVBT4.js.map +0 -1
  61. /package/lib/{chunk-RWNFJKBC.js.map → chunk-3UW3O4RI.js.map} +0 -0
  62. /package/lib/{chunk-INM2JQXV.js.map → chunk-3XOMJPOV.js.map} +0 -0
  63. /package/lib/{chunk-57B2QEFU.js.map → chunk-ATNNVLSV.js.map} +0 -0
  64. /package/lib/{chunk-CIT277G3.js.map → chunk-CQUCT4WO.js.map} +0 -0
  65. /package/lib/{chunk-NF7SQC5T.js.map → chunk-DCBB6WSY.js.map} +0 -0
  66. /package/lib/{chunk-IRMT3JAE.js.map → chunk-E32G76ZD.js.map} +0 -0
  67. /package/lib/{chunk-45NSVYWS.js.map → chunk-HYBAVEVS.js.map} +0 -0
  68. /package/lib/{chunk-EDLEFVHW.js.map → chunk-MEWILSVR.js.map} +0 -0
  69. /package/lib/{chunk-33Y7LZTL.js.map → chunk-OSRVBU5W.js.map} +0 -0
  70. /package/lib/{chunk-XCZJCPWS.js.map → chunk-PJJSNY3A.js.map} +0 -0
  71. /package/lib/{chunk-VG7IARUK.js.map → chunk-STFYLBQW.js.map} +0 -0
  72. /package/lib/{chunk-RFTTBMZW.js.map → chunk-US7CSPMG.js.map} +0 -0
  73. /package/lib/{chunk-TLJXINOL.js.map → chunk-WESN5VPX.js.map} +0 -0
  74. /package/lib/{chunk-JWIM4IJV.js.map → chunk-WS3R3PHZ.js.map} +0 -0
  75. /package/lib/{chunk-XMZYAXTX.js.map → chunk-ZXTBG7Q4.js.map} +0 -0
  76. /package/lib/{chunk-VGSWB3RH.js.map → chunk-ZXUK2KRA.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 K,$a as Ka,A as j,Aa as ja,B as k,Ba as ka,C as l,Ca as la,D as m,Da as ma,E as n,Ea as na,F as o,Fa as oa,G as p,Ga as pa,H as q,Ha as qa,I as r,Ia as ra,J as s,Ja as sa,K as t,Ka as ta,L as u,La as ua,M as v,Ma as va,N as w,Na as wa,O as x,Oa as xa,P as y,Pa as ya,Q as z,Qa as za,R as A,Ra as Aa,S as B,Sa as Ba,T as C,Ta as Ca,U as D,Ua as Da,V as E,Va as Ea,W as F,Wa as Fa,X as G,Xa as Ga,Y as H,Ya as Ha,Z as I,Za as Ia,_ as J,_a as Ja,aa as L,ab as La,ba as M,bb as Ma,ca as N,cb as Na,da as O,db as Oa,ea as P,eb as Pa,fa as Q,fb as Qa,ga as R,gb as Ra,ha as S,hb as Sa,ia as T,ib as Ta,ja as U,jb as Ua,ka as V,kb as Va,la as W,lb as Wa,ma as X,mb as Xa,na as Y,nb as Ya,oa as Z,ob as Za,pa as _,qa as $,r as a,ra as aa,s as b,sa as ba,t as c,ta as ca,u as d,ua as da,v as e,va as ea,w as f,wa as fa,x as g,xa as ga,y as h,ya as ha,z as i,za as ia}from"../../chunk-MV77KZ7X.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-57B2QEFU.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-45NSVYWS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-MEXIWEPZ.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.js";import"../../chunk-G5BIPHMS.js";export{q as account,Ea as account_abstraction,a as acl,G as aggregator,Da as aggregator_factory,$ as aggregator_v2,b as any$,aa as aptos_account,H as aptos_coin,ra as aptos_governance,A as auth_data,I as bcs_stream,ma as big_ordered_map,J as big_vector,K as bit_vector,i as block,w as bls12381,sa as bls12381_algebra,ba as bn254_algebra,L as capability,x as chain_id,T as chain_status,c as cmp,e as code,f as coin,M as comparator,ca as config_buffer,ta as consensus_config,U as copyable_any,ja as crypto_algebra,na as delegation_pool,Ya as dispatchable_fungible_asset,d as dkg,r as ed25519,Xa as ethereum_derivable_account,j as event,ua as execution_config,y as features,Aa as federated_keyless,da as fixed_point32,ea as fixed_point64,fa as function_info,ka as fungible_asset,V as gas_schedule,s as genesis,Fa as governance_proposal,g as guid,Ja as jwk_consensus_config,h as jwks,t as keyless,oa as keyless_account,Za as loadAllTypes,W as managed_coin,ga as multi_ed25519,B as multi_key,va as multisig_account,wa as nonce_validation,m as object$,Na as object_code_deployment,n as option,Ga as optional_aggregator,Q as ordered_map,Qa as permissioned_delegation,Ha as permissioned_signer,z as pool_u64,xa as pool_u64_unbound,Oa as primary_fungible_store,N as randomness,Sa as randomness_api_v0_config,Ba as randomness_config,Ta as randomness_config_seqnum,X as rate_limiter,pa as reconfiguration,La as reconfiguration_state,ya as resource_account,Y as ristretto255,Wa as ristretto255_bulletproofs,Ka as ristretto255_elgamal,Ma as ristretto255_pedersen,C as secp256k1,D as secp256r1,O as simple_map,P as single_key,R as smart_table,Z as smart_vector,Ua as solana_derivable_account,k as stake,la as staking_config,za as staking_contract,ha as staking_proxy,ia as state_storage,S as storage_gas,Ra as storage_slots_allocator,o as string$,_ as string_utils,l as table,Ca as table_with_length,E as timestamp,Ia as transaction_context,qa as transaction_fee,Pa as transaction_validation,F as type_info,Va as validator_consensus_info,u as version,v as vesting,p as voting};
2
+ import{$ as K,$a as Ka,A as j,Aa as ja,B as k,Ba as ka,C as l,Ca as la,D as m,Da as ma,E as n,Ea as na,F as o,Fa as oa,G as p,Ga as pa,H as q,Ha as qa,I as r,Ia as ra,J as s,Ja as sa,K as t,Ka as ta,L as u,La as ua,M as v,Ma as va,N as w,Na as wa,O as x,Oa as xa,P as y,Pa as ya,Q as z,Qa as za,R as A,Ra as Aa,S as B,Sa as Ba,T as C,Ta as Ca,U as D,Ua as Da,V as E,Va as Ea,W as F,Wa as Fa,X as G,Xa as Ga,Y as H,Ya as Ha,Z as I,Za as Ia,_ as J,_a as Ja,aa as L,ab as La,ba as M,bb as Ma,ca as N,cb as Na,da as O,db as Oa,ea as P,eb as Pa,fa as Q,fb as Qa,ga as R,gb as Ra,ha as S,hb as Sa,ia as T,ib as Ta,ja as U,jb as Ua,ka as V,kb as Va,la as W,lb as Wa,ma as X,mb as Xa,na as Y,nb as Ya,oa as Z,ob as Za,pa as _,qa as $,r as a,ra as aa,s as b,sa as ba,t as c,ta as ca,u as d,ua as da,v as e,va as ea,w as f,wa as fa,x as g,xa as ga,y as h,ya as ha,z as i,za as ia}from"../../chunk-D2UTA6NP.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-ATNNVLSV.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-HYBAVEVS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-4CH3FO2Y.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.js";import"../../chunk-G5BIPHMS.js";export{q as account,Ea as account_abstraction,a as acl,G as aggregator,Da as aggregator_factory,$ as aggregator_v2,b as any$,aa as aptos_account,H as aptos_coin,ra as aptos_governance,A as auth_data,I as bcs_stream,ma as big_ordered_map,J as big_vector,K as bit_vector,i as block,w as bls12381,sa as bls12381_algebra,ba as bn254_algebra,L as capability,x as chain_id,T as chain_status,c as cmp,e as code,f as coin,M as comparator,ca as config_buffer,ta as consensus_config,U as copyable_any,ja as crypto_algebra,na as delegation_pool,Ya as dispatchable_fungible_asset,d as dkg,r as ed25519,Xa as ethereum_derivable_account,j as event,ua as execution_config,y as features,Aa as federated_keyless,da as fixed_point32,ea as fixed_point64,fa as function_info,ka as fungible_asset,V as gas_schedule,s as genesis,Fa as governance_proposal,g as guid,Ja as jwk_consensus_config,h as jwks,t as keyless,oa as keyless_account,Za as loadAllTypes,W as managed_coin,ga as multi_ed25519,B as multi_key,va as multisig_account,wa as nonce_validation,m as object$,Na as object_code_deployment,n as option,Ga as optional_aggregator,Q as ordered_map,Qa as permissioned_delegation,Ha as permissioned_signer,z as pool_u64,xa as pool_u64_unbound,Oa as primary_fungible_store,N as randomness,Sa as randomness_api_v0_config,Ba as randomness_config,Ta as randomness_config_seqnum,X as rate_limiter,pa as reconfiguration,La as reconfiguration_state,ya as resource_account,Y as ristretto255,Wa as ristretto255_bulletproofs,Ka as ristretto255_elgamal,Ma as ristretto255_pedersen,C as secp256k1,D as secp256r1,O as simple_map,P as single_key,R as smart_table,Z as smart_vector,Ua as solana_derivable_account,k as stake,la as staking_config,za as staking_contract,ha as staking_proxy,ia as state_storage,S as storage_gas,Ra as storage_slots_allocator,o as string$,_ as string_utils,l as table,Ca as table_with_length,E as timestamp,Ia as transaction_context,qa as transaction_fee,Pa as transaction_validation,F as type_info,Va as validator_consensus_info,u as version,v as vesting,p 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-JWIM4IJV.js";import"../../chunk-MV77KZ7X.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-57B2QEFU.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-45NSVYWS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-MEXIWEPZ.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.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-WS3R3PHZ.js";import"../../chunk-D2UTA6NP.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-ATNNVLSV.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-HYBAVEVS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-4CH3FO2Y.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.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-XMZYAXTX.js";import"../../chunk-MV77KZ7X.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-57B2QEFU.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-45NSVYWS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-MEXIWEPZ.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.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-ZXTBG7Q4.js";import"../../chunk-D2UTA6NP.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-ATNNVLSV.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-HYBAVEVS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-4CH3FO2Y.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.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-JWIM4IJV.js";import{g as x}from"../../chunk-XMZYAXTX.js";import{pb as r}from"../../chunk-MV77KZ7X.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-57B2QEFU.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-45NSVYWS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-MEXIWEPZ.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.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-WS3R3PHZ.js";import{g as x}from"../../chunk-ZXTBG7Q4.js";import{pb as r}from"../../chunk-D2UTA6NP.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-ATNNVLSV.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-HYBAVEVS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-4CH3FO2Y.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.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-SG7JFJTS.js";import{g as a,qb as l,rb as c,sb as w,tb as u,ub as T,vb as d}from"../../chunk-MV77KZ7X.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-57B2QEFU.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-45NSVYWS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-MEXIWEPZ.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.js";import{a as i}from"../../chunk-G5BIPHMS.js";var s=class{static{i(this,"CoinList")}calculateValueInUsd(t,o,r,n=a.MAIN_NET){return d(t,o,r,n)}async getCoinInfo(t,o=a.MAIN_NET){return u(t,o)}whiteListed(t){return c().has(t)}whitelistCoins(){return c()}},m=new s,f=class extends p{static{i(this,"AptosDex")}coinList=new s};async function E(e,t,o,r,n){return g(m,e,t,o,r,n)}i(E,"getPairValue");import("node:process").then(e=>e.stdout.write(""));function h(e,t,o){if(!t.changes)throw Error("No resource change found, did you forget set fetchOption to { resourceChanges: true } ");for(let r of t.changes){if(r.type!=="write_resource")continue;let n=r;if(n.address===e.guid.account_address&&n.data.type===`0x1::coin::CoinStore<${o}>`)return{value:BigInt(n.data.data.coin.value)}}}i(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,T as getPriceForToken,u as getTokenInfoWithFallback,l as initTokenList,w as isWhiteListToken,d as tokenTokenValueInUsd,c as whitelistTokens};
2
+ import{a as p,b as g}from"../../chunk-SG7JFJTS.js";import{g as a,qb as l,rb as c,sb as w,tb as u,ub as T,vb as d}from"../../chunk-D2UTA6NP.js";import"../../chunk-3MTUCHCP.js";import"../../chunk-TSEQGMTN.js";import"../../chunk-J7Z2TKQE.js";import"../../chunk-ATNNVLSV.js";import"../../chunk-R3FE2HF3.js";import"../../chunk-TTG5P3RD.js";import"../../chunk-HYBAVEVS.js";import"../../chunk-VHQBRB4B.js";import"../../chunk-ZVXXUBUV.js";import"../../chunk-SUCYR7EB.js";import"../../chunk-4CH3FO2Y.js";import"../../chunk-RA75ESSD.js";import"../../chunk-T2GZNU62.js";import{a as i}from"../../chunk-G5BIPHMS.js";var s=class{static{i(this,"CoinList")}calculateValueInUsd(t,o,r,n=a.MAIN_NET){return d(t,o,r,n)}async getCoinInfo(t,o=a.MAIN_NET){return u(t,o)}whiteListed(t){return c().has(t)}whitelistCoins(){return c()}},m=new s,f=class extends p{static{i(this,"AptosDex")}coinList=new s};async function E(e,t,o,r,n){return g(m,e,t,o,r,n)}i(E,"getPairValue");import("node:process").then(e=>e.stdout.write(""));function h(e,t,o){if(!t.changes)throw Error("No resource change found, did you forget set fetchOption to { resourceChanges: true } ");for(let r of t.changes){if(r.type!=="write_resource")continue;let n=r;if(n.address===e.guid.account_address&&n.data.type===`0x1::coin::CoinStore<${o}>`)return{value:BigInt(n.data.data.coin.value)}}}i(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,T as getPriceForToken,u as getTokenInfoWithFallback,l as initTokenList,w as isWhiteListToken,d as tokenTokenValueInUsd,c 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,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,q as r,wb as s}from"../chunk-MV77KZ7X.js";import"../chunk-3MTUCHCP.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import"../chunk-57B2QEFU.js";import"../chunk-R3FE2HF3.js";import"../chunk-TTG5P3RD.js";import{q as a}from"../chunk-45NSVYWS.js";import"../chunk-VHQBRB4B.js";import"../chunk-ZVXXUBUV.js";import"../chunk-SUCYR7EB.js";import"../chunk-MEXIWEPZ.js";import"../chunk-RA75ESSD.js";import"../chunk-T2GZNU62.js";import"../chunk-G5BIPHMS.js";export{n as AptosBaseProcessor,j as AptosBindOptions,k as AptosContext,p as AptosGlobalProcessor,o as AptosModulesProcessor,h as AptosNetwork,s as AptosPlugin,r as AptosResourceProcessorTemplate,l as AptosResourcesContext,q as AptosResourcesProcessor,m as AptosTransactionProcessor,a as BUILTIN_TYPES,e as LATEST_LEDGER_VERSION,b as MoveCoder,i as MovementNetwork,f as RichAptosClient,g as RichAptosClientWithContext,c as defaultMoveCoder,d as defaultMoveCoderForClient};
2
+ import{a as b,b as c,c as d,d as e,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,q as r,wb as s}from"../chunk-D2UTA6NP.js";import"../chunk-3MTUCHCP.js";import"../chunk-TSEQGMTN.js";import"../chunk-J7Z2TKQE.js";import"../chunk-ATNNVLSV.js";import"../chunk-R3FE2HF3.js";import"../chunk-TTG5P3RD.js";import{q as a}from"../chunk-HYBAVEVS.js";import"../chunk-VHQBRB4B.js";import"../chunk-ZVXXUBUV.js";import"../chunk-SUCYR7EB.js";import"../chunk-4CH3FO2Y.js";import"../chunk-RA75ESSD.js";import"../chunk-T2GZNU62.js";import"../chunk-G5BIPHMS.js";export{n as AptosBaseProcessor,j as AptosBindOptions,k as AptosContext,p as AptosGlobalProcessor,o as AptosModulesProcessor,h as AptosNetwork,s as AptosPlugin,r as AptosResourceProcessorTemplate,l as AptosResourcesContext,q as AptosResourcesProcessor,m as AptosTransactionProcessor,a as BUILTIN_TYPES,e as LATEST_LEDGER_VERSION,b as MoveCoder,i as MovementNetwork,f as RichAptosClient,g as RichAptosClientWithContext,c as defaultMoveCoder,d as defaultMoveCoderForClient};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{b as Tl}from"./chunk-FMZDKD72.js";import{I as br,J as Pm,K as js,L as Bm,M as Il,O as Dm,b as ra,c as Lm,d as Nl,g as xm}from"./chunk-VHQBRB4B.js";import{Bd as wl,E as ta,Ic as bl,ja as Sl,nc as Or,wc as Ol,yc as Cm,zc as vm}from"./chunk-MEXIWEPZ.js";import{b as km}from"./chunk-T2GZNU62.js";import{a,b as ue,c as Ne,d as ce,e as kn,f as fe,g as Ln}from"./chunk-G5BIPHMS.js";function Ll(n,e){return Array.apply(0,new Array(Math.ceil(n.length/e))).map((t,r)=>n.slice(r*e,(r+1)*e))}var sa,sr,bt,Nr=Ne(()=>{"use strict";sr=process.env.ANCHOR_BROWSER||typeof window<"u"&&!(!((sa=window.process)===null||sa===void 0)&&sa.hasOwnProperty("type"));a(Ll,"chunks");bt=a(n=>"version"in n,"isVersionedTransaction")});var Bl=ce((oa,Pl)=>{"use strict";var Xs=ue("buffer"),vt=Xs.Buffer;function xl(n,e){for(var t in n)e[t]=n[t]}a(xl,"copyProps");vt.from&&vt.alloc&&vt.allocUnsafe&&vt.allocUnsafeSlow?Pl.exports=Xs:(xl(Xs,oa),oa.Buffer=Ir);function Ir(n,e,t){return vt(n,e,t)}a(Ir,"SafeBuffer");Ir.prototype=Object.create(vt.prototype);xl(vt,Ir);Ir.from=function(n,e,t){if(typeof n=="number")throw new TypeError("Argument must not be a number");return vt(n,e,t)};Ir.alloc=function(n,e,t){if(typeof n!="number")throw new TypeError("Argument must be a number");var r=vt(n);return e!==void 0?typeof t=="string"?r.fill(e,t):r.fill(e):r.fill(0),r};Ir.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return vt(n)};Ir.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return Xs.SlowBuffer(n)}});var Ul=ce((lN,Dl)=>{"use strict";var Js=Bl().Buffer;function Wm(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var r=0;r<n.length;r++){var o=n.charAt(r),s=o.charCodeAt(0);if(e[s]!==255)throw new TypeError(o+" is ambiguous");e[s]=r}var i=n.length,u=n.charAt(0),f=Math.log(i)/Math.log(256),p=Math.log(256)/Math.log(i);function d(E){if((Array.isArray(E)||E instanceof Uint8Array)&&(E=Js.from(E)),!Js.isBuffer(E))throw new TypeError("Expected Buffer");if(E.length===0)return"";for(var O=0,b=0,k=0,L=E.length;k!==L&&E[k]===0;)k++,O++;for(var A=(L-k)*p+1>>>0,x=new Uint8Array(A);k!==L;){for(var z=E[k],Y=0,re=A-1;(z!==0||Y<b)&&re!==-1;re--,Y++)z+=256*x[re]>>>0,x[re]=z%i>>>0,z=z/i>>>0;if(z!==0)throw new Error("Non-zero carry");b=Y,k++}for(var te=A-b;te!==A&&x[te]===0;)te++;for(var Oe=u.repeat(O);te<A;++te)Oe+=n.charAt(x[te]);return Oe}a(d,"encode");function y(E){if(typeof E!="string")throw new TypeError("Expected String");if(E.length===0)return Js.alloc(0);for(var O=0,b=0,k=0;E[O]===u;)b++,O++;for(var L=(E.length-O)*f+1>>>0,A=new Uint8Array(L);E[O];){var x=e[E.charCodeAt(O)];if(x===255)return;for(var z=0,Y=L-1;(x!==0||z<k)&&Y!==-1;Y--,z++)x+=i*A[Y]>>>0,A[Y]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");k=z,O++}for(var re=L-k;re!==L&&A[re]===0;)re++;var te=Js.allocUnsafe(b+(L-re));te.fill(0,0,b);for(var Oe=b;re!==L;)te[Oe++]=A[re++];return te}a(y,"decodeUnsafe");function S(E){var O=y(E);if(O)return O;throw new Error("Non-base"+i+" character")}return a(S,"decode"),{encode:d,decodeUnsafe:y,decode:S}}a(Wm,"base");Dl.exports=Wm});var Yr=ce((dN,Ml)=>{"use strict";var Vm=Ul(),Gm="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Ml.exports=Vm(Gm)});var ia,$l=Ne(()=>{"use strict";xm();ia=Nl});var Fl=ce(ua=>{"use strict";function Wt(n,e,t){return e<=n&&n<=t}a(Wt,"inRange");function ro(n){if(n===void 0)return{};if(n===Object(n))return n;throw TypeError("Could not convert argument to dictionary")}a(ro,"ToDictionary");function qm(n){for(var e=String(n),t=e.length,r=0,o=[];r<t;){var s=e.charCodeAt(r);if(s<55296||s>57343)o.push(s);else if(56320<=s&&s<=57343)o.push(65533);else if(55296<=s&&s<=56319)if(r===t-1)o.push(65533);else{var i=n.charCodeAt(r+1);if(56320<=i&&i<=57343){var u=s&1023,f=i&1023;o.push(65536+(u<<10)+f),r+=1}else o.push(65533)}r+=1}return o}a(qm,"stringToCodePoints");function jm(n){for(var e="",t=0;t<n.length;++t){var r=n[t];r<=65535?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return e}a(jm,"codePointsToString");var Zs=-1;function ca(n){this.tokens=[].slice.call(n)}a(ca,"Stream");ca.prototype={endOfStream:a(function(){return!this.tokens.length},"endOfStream"),read:a(function(){return this.tokens.length?this.tokens.shift():Zs},"read"),prepend:a(function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(n)},"prepend"),push:a(function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.push(e.shift());else this.tokens.push(n)},"push")};var Xr=-1;function aa(n,e){if(n)throw TypeError("Decoder error");return e||65533}a(aa,"decoderError");var Qs="utf-8";function eo(n,e){if(!(this instanceof eo))return new eo(n,e);if(n=n!==void 0?String(n).toLowerCase():Qs,n!==Qs)throw new Error("Encoding not supported. Only utf-8 is supported");e=ro(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}a(eo,"TextDecoder");eo.prototype={decode:a(function(e,t){var r;typeof e=="object"&&e instanceof ArrayBuffer?r=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):r=new Uint8Array(0),t=ro(t),this._streaming||(this._decoder=new Ym({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var o=new ca(r),s=[],i;!o.endOfStream()&&(i=this._decoder.handler(o,o.read()),i!==Xr);)i!==null&&(Array.isArray(i)?s.push.apply(s,i):s.push(i));if(!this._streaming){do{if(i=this._decoder.handler(o,o.read()),i===Xr)break;i!==null&&(Array.isArray(i)?s.push.apply(s,i):s.push(i))}while(!o.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),jm(s)},"decode")};function to(n,e){if(!(this instanceof to))return new to(n,e);if(n=n!==void 0?String(n).toLowerCase():Qs,n!==Qs)throw new Error("Encoding not supported. Only utf-8 is supported");e=ro(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}a(to,"TextEncoder");to.prototype={encode:a(function(e,t){e=e?String(e):"",t=ro(t),this._streaming||(this._encoder=new Xm(this._options)),this._streaming=!!t.stream;for(var r=[],o=new ca(qm(e)),s;!o.endOfStream()&&(s=this._encoder.handler(o,o.read()),s!==Xr);)Array.isArray(s)?r.push.apply(r,s):r.push(s);if(!this._streaming){for(;s=this._encoder.handler(o,o.read()),s!==Xr;)Array.isArray(s)?r.push.apply(r,s):r.push(s);this._encoder=null}return new Uint8Array(r)},"encode")};function Ym(n){var e=n.fatal,t=0,r=0,o=0,s=128,i=191;this.handler=function(u,f){if(f===Zs&&o!==0)return o=0,aa(e);if(f===Zs)return Xr;if(o===0){if(Wt(f,0,127))return f;if(Wt(f,194,223))o=1,t=f-192;else if(Wt(f,224,239))f===224&&(s=160),f===237&&(i=159),o=2,t=f-224;else if(Wt(f,240,244))f===240&&(s=144),f===244&&(i=143),o=3,t=f-240;else return aa(e);return t=t<<6*o,null}if(!Wt(f,s,i))return t=o=r=0,s=128,i=191,u.prepend(f),aa(e);if(s=128,i=191,r+=1,t+=f-128<<6*(o-r),r!==o)return null;var p=t;return t=o=r=0,p}}a(Ym,"UTF8Decoder");function Xm(n){var e=n.fatal;this.handler=function(t,r){if(r===Zs)return Xr;if(Wt(r,0,127))return r;var o,s;Wt(r,128,2047)?(o=1,s=192):Wt(r,2048,65535)?(o=2,s=224):Wt(r,65536,1114111)&&(o=3,s=240);for(var i=[(r>>6*o)+s];o>0;){var u=r>>6*(o-1);i.push(128|u&63),o-=1}return i}}a(Xm,"UTF8Encoder");ua.TextEncoder=to;ua.TextDecoder=eo});var Vl=ce(Se=>{"use strict";var Jm=Se&&Se.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:a(function(){return e[t]},"get")})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),Zm=Se&&Se.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),kt=Se&&Se.__decorate||function(n,e,t,r){var o=arguments.length,s=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var u=n.length-1;u>=0;u--)(i=n[u])&&(s=(o<3?i(s):o>3?i(e,t,s):i(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},Qm=Se&&Se.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.hasOwnProperty.call(n,t)&&Jm(e,n,t);return Zm(e,n),e},zl=Se&&Se.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Se,"__esModule",{value:!0});Se.deserializeUnchecked=Se.deserialize=Se.serialize=Se.BinaryReader=Se.BinaryWriter=Se.BorshError=Se.baseDecode=Se.baseEncode=void 0;var or=zl(Or()),Hl=zl(Yr()),eg=Qm(Fl()),tg=typeof TextDecoder!="function"?eg.TextDecoder:TextDecoder,rg=new tg("utf-8",{fatal:!0});function ng(n){return typeof n=="string"&&(n=Buffer.from(n,"utf8")),Hl.default.encode(Buffer.from(n))}a(ng,"baseEncode");Se.baseEncode=ng;function sg(n){return Buffer.from(Hl.default.decode(n))}a(sg,"baseDecode");Se.baseDecode=sg;var la=1024,We=class extends Error{static{a(this,"BorshError")}constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}};Se.BorshError=We;var no=class{static{a(this,"BinaryWriter")}constructor(){this.buf=Buffer.alloc(la),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(la)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new or.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new or.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new or.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new or.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(la)]),this.length+=e.length}writeString(e){this.maybeResize();let t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(let r of e)this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}};Se.BinaryWriter=no;function Lt(n,e,t){let r=t.value;t.value=function(...o){try{return r.apply(this,o)}catch(s){if(s instanceof RangeError){let i=s.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(i)>=0)throw new We("Reached the end of buffer when deserializing")}throw s}}}a(Lt,"handlingRangeError");var Qe=class{static{a(this,"BinaryReader")}constructor(e){this.buf=e,this.offset=0}readU8(){let e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){let e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){let e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){let e=this.readBuffer(8);return new or.default(e,"le")}readU128(){let e=this.readBuffer(16);return new or.default(e,"le")}readU256(){let e=this.readBuffer(32);return new or.default(e,"le")}readU512(){let e=this.readBuffer(64);return new or.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new We(`Expected buffer length ${e} isn't within bounds`);let t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){let e=this.readU32(),t=this.readBuffer(e);try{return rg.decode(t)}catch(r){throw new We(`Error decoding UTF-8 string: ${r}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){let t=this.readU32(),r=Array();for(let o=0;o<t;++o)r.push(e());return r}};kt([Lt],Qe.prototype,"readU8",null);kt([Lt],Qe.prototype,"readU16",null);kt([Lt],Qe.prototype,"readU32",null);kt([Lt],Qe.prototype,"readU64",null);kt([Lt],Qe.prototype,"readU128",null);kt([Lt],Qe.prototype,"readU256",null);kt([Lt],Qe.prototype,"readU512",null);kt([Lt],Qe.prototype,"readString",null);kt([Lt],Qe.prototype,"readFixedArray",null);kt([Lt],Qe.prototype,"readArray",null);Se.BinaryReader=Qe;function Kl(n){return n.charAt(0).toUpperCase()+n.slice(1)}a(Kl,"capitalizeFirstLetter");function Tr(n,e,t,r,o){try{if(typeof r=="string")o[`write${Kl(r)}`](t);else if(r instanceof Array)if(typeof r[0]=="number"){if(t.length!==r[0])throw new We(`Expecting byte array of length ${r[0]}, but got ${t.length} bytes`);o.writeFixedArray(t)}else if(r.length===2&&typeof r[1]=="number"){if(t.length!==r[1])throw new We(`Expecting byte array of length ${r[1]}, but got ${t.length} bytes`);for(let s=0;s<r[1];s++)Tr(n,null,t[s],r[0],o)}else o.writeArray(t,s=>{Tr(n,e,s,r[0],o)});else if(r.kind!==void 0)switch(r.kind){case"option":{t==null?o.writeU8(0):(o.writeU8(1),Tr(n,e,t,r.type,o));break}case"map":{o.writeU32(t.size),t.forEach((s,i)=>{Tr(n,e,i,r.key,o),Tr(n,e,s,r.value,o)});break}default:throw new We(`FieldType ${r} unrecognized`)}else Wl(n,t,o)}catch(s){throw s instanceof We&&s.addToFieldPath(e),s}}a(Tr,"serializeField");function Wl(n,e,t){if(typeof e.borshSerialize=="function"){e.borshSerialize(t);return}let r=n.get(e.constructor);if(!r)throw new We(`Class ${e.constructor.name} is missing in schema`);if(r.kind==="struct")r.fields.map(([o,s])=>{Tr(n,o,e[o],s,t)});else if(r.kind==="enum"){let o=e[r.field];for(let s=0;s<r.values.length;++s){let[i,u]=r.values[s];if(i===o){t.writeU8(s),Tr(n,i,e[i],u,t);break}}}else throw new We(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}a(Wl,"serializeStruct");function og(n,e,t=no){let r=new t;return Wl(n,e,r),r.toArray()}a(og,"serialize");Se.serialize=og;function Cr(n,e,t,r){try{if(typeof t=="string")return r[`read${Kl(t)}`]();if(t instanceof Array){if(typeof t[0]=="number")return r.readFixedArray(t[0]);if(typeof t[1]=="number"){let o=[];for(let s=0;s<t[1];s++)o.push(Cr(n,null,t[0],r));return o}else return r.readArray(()=>Cr(n,e,t[0],r))}if(t.kind==="option")return r.readU8()?Cr(n,e,t.type,r):void 0;if(t.kind==="map"){let o=new Map,s=r.readU32();for(let i=0;i<s;i++){let u=Cr(n,e,t.key,r),f=Cr(n,e,t.value,r);o.set(u,f)}return o}return fa(n,t,r)}catch(o){throw o instanceof We&&o.addToFieldPath(e),o}}a(Cr,"deserializeField");function fa(n,e,t){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(t);let r=n.get(e);if(!r)throw new We(`Class ${e.name} is missing in schema`);if(r.kind==="struct"){let o={};for(let[s,i]of n.get(e).fields)o[s]=Cr(n,s,i,t);return new e(o)}if(r.kind==="enum"){let o=t.readU8();if(o>=r.values.length)throw new We(`Enum index: ${o} is out of range`);let[s,i]=r.values[o],u=Cr(n,s,i,t);return new e({[s]:u})}throw new We(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}a(fa,"deserializeStruct");function ig(n,e,t,r=Qe){let o=new r(t),s=fa(n,e,o);if(o.offset<t.length)throw new We(`Unexpected ${t.length-o.offset} bytes after deserialized data`);return s}a(ig,"deserialize");Se.deserialize=ig;function ag(n,e,t,r=Qe){let o=new r(t);return fa(n,e,o)}a(ag,"deserializeUnchecked");Se.deserializeUnchecked=ag});var pa=ce(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.s16=C.s8=C.nu64be=C.u48be=C.u40be=C.u32be=C.u24be=C.u16be=C.nu64=C.u48=C.u40=C.u32=C.u24=C.u16=C.u8=C.offset=C.greedy=C.Constant=C.UTF8=C.CString=C.Blob=C.Boolean=C.BitField=C.BitStructure=C.VariantLayout=C.Union=C.UnionLayoutDiscriminator=C.UnionDiscriminator=C.Structure=C.Sequence=C.DoubleBE=C.Double=C.FloatBE=C.Float=C.NearInt64BE=C.NearInt64=C.NearUInt64BE=C.NearUInt64=C.IntBE=C.Int=C.UIntBE=C.UInt=C.OffsetLayout=C.GreedyCount=C.ExternalLayout=C.bindConstructorLayout=C.nameWithProperty=C.Layout=C.uint8ArrayToBuffer=C.checkUint8Array=void 0;C.constant=C.utf8=C.cstr=C.blob=C.unionLayoutDiscriminator=C.union=C.seq=C.bits=C.struct=C.f64be=C.f64=C.f32be=C.f32=C.ns64be=C.s48be=C.s40be=C.s32be=C.s24be=C.s16be=C.ns64=C.s48=C.s40=C.s32=C.s24=void 0;var ha=ue("buffer");function Qr(n){if(!(n instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}a(Qr,"checkUint8Array");C.checkUint8Array=Qr;function _e(n){return Qr(n),ha.Buffer.from(n.buffer,n.byteOffset,n.length)}a(_e,"uint8ArrayToBuffer");C.uint8ArrayToBuffer=_e;var ge=class{static{a(this,"Layout")}constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};C.Layout=ge;function _a(n,e){return e.property?n+"["+e.property+"]":n}a(_a,"nameWithProperty");C.nameWithProperty=_a;function cg(n,e){if(typeof n!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(n,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof ge))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(e,"boundConstructor_"))throw new Error("layout is already bound to a constructor");n.layout_=e,e.boundConstructor_=n,e.makeDestinationObject=()=>new n,Object.defineProperty(n.prototype,"encode",{value(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(n,"decode",{value(t,r){return e.decode(t,r)},writable:!0})}a(cg,"bindConstructorLayout");C.bindConstructorLayout=cg;var qe=class extends ge{static{a(this,"ExternalLayout")}isCount(){throw new Error("ExternalLayout is abstract")}};C.ExternalLayout=qe;var so=class extends qe{static{a(this,"GreedyCount")}constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t=0){Qr(e);let r=e.length-t;return Math.floor(r/this.elementSpan)}encode(e,t,r){return 0}};C.GreedyCount=so;var xn=class extends qe{static{a(this,"OffsetLayout")}constructor(e,t=0,r){if(!(e instanceof ge))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof tt||this.layout instanceof ct}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}};C.OffsetLayout=xn;var tt=class extends ge{static{a(this,"UInt")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return _e(e).readUIntLE(t,this.span)}encode(e,t,r=0){return _e(t).writeUIntLE(e,r,this.span),this.span}};C.UInt=tt;var ct=class extends ge{static{a(this,"UIntBE")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return _e(e).readUIntBE(t,this.span)}encode(e,t,r=0){return _e(t).writeUIntBE(e,r,this.span),this.span}};C.UIntBE=ct;var Vt=class extends ge{static{a(this,"Int")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return _e(e).readIntLE(t,this.span)}encode(e,t,r=0){return _e(t).writeIntLE(e,r,this.span),this.span}};C.Int=Vt;var ir=class extends ge{static{a(this,"IntBE")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return _e(e).readIntBE(t,this.span)}encode(e,t,r=0){return _e(t).writeIntBE(e,r,this.span),this.span}};C.IntBE=ir;var da=Math.pow(2,32);function So(n){let e=Math.floor(n/da),t=n-e*da;return{hi32:e,lo32:t}}a(So,"divmodInt64");function Oo(n,e){return n*da+e}a(Oo,"roundedInt64");var oo=class extends ge{static{a(this,"NearUInt64")}constructor(e){super(8,e)}decode(e,t=0){let r=_e(e),o=r.readUInt32LE(t),s=r.readUInt32LE(t+4);return Oo(s,o)}encode(e,t,r=0){let o=So(e),s=_e(t);return s.writeUInt32LE(o.lo32,r),s.writeUInt32LE(o.hi32,r+4),8}};C.NearUInt64=oo;var io=class extends ge{static{a(this,"NearUInt64BE")}constructor(e){super(8,e)}decode(e,t=0){let r=_e(e),o=r.readUInt32BE(t),s=r.readUInt32BE(t+4);return Oo(o,s)}encode(e,t,r=0){let o=So(e),s=_e(t);return s.writeUInt32BE(o.hi32,r),s.writeUInt32BE(o.lo32,r+4),8}};C.NearUInt64BE=io;var ao=class extends ge{static{a(this,"NearInt64")}constructor(e){super(8,e)}decode(e,t=0){let r=_e(e),o=r.readUInt32LE(t),s=r.readInt32LE(t+4);return Oo(s,o)}encode(e,t,r=0){let o=So(e),s=_e(t);return s.writeUInt32LE(o.lo32,r),s.writeInt32LE(o.hi32,r+4),8}};C.NearInt64=ao;var co=class extends ge{static{a(this,"NearInt64BE")}constructor(e){super(8,e)}decode(e,t=0){let r=_e(e),o=r.readInt32BE(t),s=r.readUInt32BE(t+4);return Oo(o,s)}encode(e,t,r=0){let o=So(e),s=_e(t);return s.writeInt32BE(o.hi32,r),s.writeUInt32BE(o.lo32,r+4),8}};C.NearInt64BE=co;var uo=class extends ge{static{a(this,"Float")}constructor(e){super(4,e)}decode(e,t=0){return _e(e).readFloatLE(t)}encode(e,t,r=0){return _e(t).writeFloatLE(e,r),4}};C.Float=uo;var lo=class extends ge{static{a(this,"FloatBE")}constructor(e){super(4,e)}decode(e,t=0){return _e(e).readFloatBE(t)}encode(e,t,r=0){return _e(t).writeFloatBE(e,r),4}};C.FloatBE=lo;var fo=class extends ge{static{a(this,"Double")}constructor(e){super(8,e)}decode(e,t=0){return _e(e).readDoubleLE(t)}encode(e,t,r=0){return _e(t).writeDoubleLE(e,r),8}};C.Double=fo;var ho=class extends ge{static{a(this,"DoubleBE")}constructor(e){super(8,e)}decode(e,t=0){return _e(e).readDoubleBE(t)}encode(e,t,r=0){return _e(t).writeDoubleBE(e,r),8}};C.DoubleBE=ho;var _o=class extends ge{static{a(this,"Sequence")}constructor(e,t,r){if(!(e instanceof ge))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof qe&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let o=-1;!(t instanceof qe)&&0<e.span&&(o=t*e.span),super(o,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,o=this.count;if(o instanceof qe&&(o=o.decode(e,t)),0<this.elementLayout.span)r=o*this.elementLayout.span;else{let s=0;for(;s<o;)r+=this.elementLayout.getSpan(e,t+r),++s}return r}decode(e,t=0){let r=[],o=0,s=this.count;for(s instanceof qe&&(s=s.decode(e,t));o<s;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),o+=1;return r}encode(e,t,r=0){let o=this.elementLayout,s=e.reduce((i,u)=>i+o.encode(u,t,r+i),0);return this.count instanceof qe&&this.count.encode(e.length,t,r),s}};C.Sequence=_o;var po=class extends ge{static{a(this,"Structure")}constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((s,i)=>s&&i instanceof ge,!0)))throw new TypeError("fields must be array of Layout instances");typeof t=="boolean"&&r===void 0&&(r=t,t=void 0);for(let s of e)if(0>s.span&&s.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let o=-1;try{o=e.reduce((s,i)=>s+i.getSpan(),0)}catch{}super(o,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((o,s)=>{let i=s.getSpan(e,t);return t+=i,o+i},0)}catch{throw new RangeError("indeterminate span")}return r}decode(e,t=0){Qr(e);let r=this.makeDestinationObject();for(let o of this.fields)if(o.property!==void 0&&(r[o.property]=o.decode(e,t)),t+=o.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){let o=r,s=0,i=0;for(let u of this.fields){let f=u.span;if(i=0<f?f:0,u.property!==void 0){let p=e[u.property];p!==void 0&&(i=u.encode(p,t,r),0>f&&(f=u.getSpan(t,r)))}s=r,r+=f}return s+i-o}fromArray(e){let t=this.makeDestinationObject();for(let r of this.fields)r.property!==void 0&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let t=0;for(let r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}};C.Structure=po;var Pn=class{static{a(this,"UnionDiscriminator")}constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,r){throw new Error("UnionDiscriminator is abstract")}};C.UnionDiscriminator=Pn;var Zr=class extends Pn{static{a(this,"UnionLayoutDiscriminator")}constructor(e,t){if(!(e instanceof qe&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,r){return this.layout.encode(e,t,r)}};C.UnionLayoutDiscriminator=Zr;var Bn=class extends ge{static{a(this,"Union")}constructor(e,t,r){let o;if(e instanceof tt||e instanceof ct)o=new Zr(new xn(e));else if(e instanceof qe&&e.isCount())o=new Zr(e);else if(e instanceof Pn)o=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(t===void 0&&(t=null),!(t===null||t instanceof ge))throw new TypeError("defaultLayout must be null or a Layout");if(t!==null){if(0>t.span)throw new Error("defaultLayout must have constant span");t.property===void 0&&(t=t.replicate("content"))}let s=-1;t&&(s=t.span,0<=s&&(e instanceof tt||e instanceof ct)&&(s+=o.layout.span)),super(s,r),this.discriminator=o,this.usesPrefixDiscriminator=e instanceof tt||e instanceof ct,this.defaultLayout=t,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(u){return i(u)},this.configGetSourceVariant=function(u){i=u.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;let r=this.getVariant(e,t);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;let t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(let t in this.registry){let r=this.registry[t];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw new Error("unable to infer src variant")}decode(e,t=0){let r,o=this.discriminator,s=o.decode(e,t),i=this.registry[s];if(i===void 0){let u=this.defaultLayout,f=0;this.usesPrefixDiscriminator&&(f=o.layout.span),r=this.makeDestinationObject(),r[o.property]=s,r[u.property]=u.decode(e,t+f)}else r=i.decode(e,t);return r}encode(e,t,r=0){let o=this.getSourceVariant(e);if(o===void 0){let s=this.discriminator,i=this.defaultLayout,u=0;return this.usesPrefixDiscriminator&&(u=s.layout.span),s.encode(e[s.property],t,r),u+i.encode(e[i.property],t,r+u)}return o.encode(e,t,r)}addVariant(e,t,r){let o=new mo(this,e,t,r);return this.registry[e]=o,o}getVariant(e,t=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,t):r=e,this.registry[r]}};C.Union=Bn;var mo=class extends ge{static{a(this,"VariantLayout")}constructor(e,t,r,o){if(!(e instanceof Bn))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if(typeof r=="string"&&o===void 0&&(o=r,r=null),r){if(!(r instanceof ge))throw new TypeError("layout must be a Layout");if(e.defaultLayout!==null&&0<=r.span&&r.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof o!="string")throw new TypeError("variant must have a String property")}let s=e.span;0>e.span&&(s=r?r.span:0,0<=s&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span)),super(s,o),this.union=e,this.variant=t,this.layout=r||null}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let o=0;return this.layout&&(o=this.layout.getSpan(e,t+r)),r+o}decode(e,t=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let o=0;return this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+o):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,t,r=0){let o=0;if(this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);let s=o;if(this.layout&&(this.layout.encode(e[this.property],t,r+o),s+=this.layout.getSpan(t,r+o),0<=this.union.span&&s>this.union.span))throw new Error("encoded variant overruns containing union");return s}fromArray(e){if(this.layout)return this.layout.fromArray(e)}};C.VariantLayout=mo;function Jr(n){return 0>n&&(n+=4294967296),n}a(Jr,"fixBitwiseResult");var Dn=class extends ge{static{a(this,"BitStructure")}constructor(e,t,r){if(!(e instanceof tt||e instanceof ct))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof t=="string"&&r===void 0&&(r=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let o=0;this._packedSetValue=function(s){return o=Jr(s),this},this._packedGetValue=function(){return o}}decode(e,t=0){let r=this.makeDestinationObject(),o=this.word.decode(e,t);this._packedSetValue(o);for(let s of this.fields)s.property!==void 0&&(r[s.property]=s.decode(e));return r}encode(e,t,r=0){let o=this.word.decode(t,r);this._packedSetValue(o);for(let s of this.fields)if(s.property!==void 0){let i=e[s.property];i!==void 0&&s.encode(i)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){let r=new Un(this,e,t);return this.fields.push(r),r}addBoolean(e){let t=new go(this,e);return this.fields.push(t),t}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}};C.BitStructure=Dn;var Un=class{static{a(this,"BitField")}constructor(e,t,r){if(!(e instanceof Dn))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");let o=8*e.span,s=e.fields.reduce((i,u)=>i+u.bits,0);if(t+s>o)throw new Error("bits too long for span remainder ("+(o-s)+" of "+o+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,t===32&&(this.valueMask=4294967295),this.start=s,this.container.msb&&(this.start=o-s-t),this.wordMask=Jr(this.valueMask<<this.start),this.property=r}decode(e,t){let r=this.container._packedGetValue();return Jr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==Jr(e&this.valueMask))throw new TypeError(_a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),r=Jr(e<<this.start);this.container._packedSetValue(Jr(t&~this.wordMask)|r)}};C.BitField=Un;var go=class extends Un{static{a(this,"Boolean")}constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){typeof e=="boolean"&&(e=+e),super.encode(e)}};C.Boolean=go;var yo=class extends ge{static{a(this,"Blob")}constructor(e,t){if(!(e instanceof qe&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof qe||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),_e(e).slice(t,t+r)}encode(e,t,r){let o=this.length;if(this.length instanceof qe&&(o=e.length),!(e instanceof Uint8Array&&o===e.length))throw new TypeError(_a("Blob.encode",this)+" requires (length "+o+") Uint8Array as src");if(r+o>t.length)throw new RangeError("encoding overruns Uint8Array");let s=_e(e);return _e(t).write(s.toString("hex"),r,o,"hex"),this.length instanceof qe&&this.length.encode(o,t,r),o}};C.Blob=yo;var Ro=class extends ge{static{a(this,"CString")}constructor(e){super(-1,e)}getSpan(e,t=0){Qr(e);let r=t;for(;r<e.length&&e[r]!==0;)r+=1;return 1+r-t}decode(e,t=0){let r=this.getSpan(e,t);return _e(e).slice(t,t+r-1).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));let o=ha.Buffer.from(e,"utf8"),s=o.length;if(r+s>t.length)throw new RangeError("encoding overruns Buffer");let i=_e(t);return o.copy(i,r),i[r+s]=0,s+1}};C.CString=Ro;var Eo=class extends ge{static{a(this,"UTF8")}constructor(e,t){if(typeof e=="string"&&t===void 0&&(t=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t=0){return Qr(e),e.length-t}decode(e,t=0){let r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return _e(e).slice(t,t+r).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));let o=ha.Buffer.from(e,"utf8"),s=o.length;if(0<=this.maxSpan&&this.maxSpan<s)throw new RangeError("text length exceeds maxSpan");if(r+s>t.length)throw new RangeError("encoding overruns Buffer");return o.copy(_e(t),r),s}};C.UTF8=Eo;var Ao=class extends ge{static{a(this,"Constant")}constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,r){return 0}};C.Constant=Ao;C.greedy=(n,e)=>new so(n,e);C.offset=(n,e,t)=>new xn(n,e,t);C.u8=n=>new tt(1,n);C.u16=n=>new tt(2,n);C.u24=n=>new tt(3,n);C.u32=n=>new tt(4,n);C.u40=n=>new tt(5,n);C.u48=n=>new tt(6,n);C.nu64=n=>new oo(n);C.u16be=n=>new ct(2,n);C.u24be=n=>new ct(3,n);C.u32be=n=>new ct(4,n);C.u40be=n=>new ct(5,n);C.u48be=n=>new ct(6,n);C.nu64be=n=>new io(n);C.s8=n=>new Vt(1,n);C.s16=n=>new Vt(2,n);C.s24=n=>new Vt(3,n);C.s32=n=>new Vt(4,n);C.s40=n=>new Vt(5,n);C.s48=n=>new Vt(6,n);C.ns64=n=>new ao(n);C.s16be=n=>new ir(2,n);C.s24be=n=>new ir(3,n);C.s32be=n=>new ir(4,n);C.s40be=n=>new ir(5,n);C.s48be=n=>new ir(6,n);C.ns64be=n=>new co(n);C.f32=n=>new uo(n);C.f32be=n=>new lo(n);C.f64=n=>new fo(n);C.f64be=n=>new ho(n);C.struct=(n,e,t)=>new po(n,e,t);C.bits=(n,e,t)=>new Dn(n,e,t);C.seq=(n,e,t)=>new _o(n,e,t);C.union=(n,e,t)=>new Bn(n,e,t);C.unionLayoutDiscriminator=(n,e)=>new Zr(n,e);C.blob=(n,e)=>new yo(n,e);C.cstr=n=>new Ro(n);C.utf8=(n,e)=>new Eo(n,e);C.constant=(n,e)=>new Ao(n,e)});function Zl(n){return Array.isArray(n)?"%5B"+n.map(Zl).join("%2C%20")+"%5D":typeof n=="bigint"?`${n}n`:encodeURIComponent(String(n!=null&&Object.getPrototypeOf(n)===null?{...n}:n))}function cA([n,e]){return`${n}=${Zl(e)}`}function uA(n){let e=Object.entries(n).map(cA).join("&");return Buffer.from(e,"utf8").toString("base64")}function fA(n,e={}){let t=lA[n];if(t.length===0)return"";let r;function o(i){if(r[xt]===2){let u=t.slice(r[Gt]+1,i);s.push(u in e?`${e[u]}`:`$${u}`)}else r[xt]===1&&s.push(t.slice(r[Gt],i))}a(o,"commitStateUpTo");let s=[];return t.split("").forEach((i,u)=>{if(u===0){r={[Gt]:0,[xt]:t[0]==="\\"?0:t[0]==="$"?2:1};return}let f;switch(r[xt]){case 0:f={[Gt]:u,[xt]:1};break;case 1:i==="\\"?f={[Gt]:u,[xt]:0}:i==="$"&&(f={[Gt]:u,[xt]:2});break;case 2:i==="\\"?f={[Gt]:u,[xt]:0}:i==="$"?f={[Gt]:u,[xt]:2}:i.match(/\w/)||(f={[Gt]:u,[xt]:1});break}f&&(r!==f&&o(u),r=f)}),o(),s.join("")}function dA(n,e={}){if(process.env.NODE_ENV!=="production")return fA(n,e);{let t=`Solana error #${n}; Decode this error by running \`npx @solana/errors decode -- ${n}`;return Object.keys(e).length&&(t+=` '${uA(e)}'`),`${t}\``}}var ug,lg,fg,dg,hg,_g,pg,mg,gg,yg,Rg,Eg,Ag,Sg,Og,bg,wg,Ng,Ig,Tg,Cg,vg,kg,Lg,xg,Pg,Bg,Dg,Ug,Mg,$g,Fg,zg,Hg,Kg,Wg,Vg,Gg,qg,jg,Yg,Xg,Jg,Zg,Qg,ey,ty,ry,ny,sy,oy,iy,ay,cy,uy,ly,fy,dy,hy,_y,py,my,gy,yy,Ry,Ey,Ay,Sy,Oy,by,wy,Ny,Iy,Ty,Cy,vy,ky,Ly,xy,Py,By,Dy,Uy,My,$y,Fy,zy,Hy,Ky,Wy,Vy,Gy,qy,jy,Yy,Xy,Jy,Zy,Qy,eR,tR,rR,nR,sR,oR,iR,aR,cR,uR,lR,fR,dR,hR,_R,pR,mR,gR,yR,RR,ER,AR,SR,OR,bR,wR,NR,IR,TR,CR,vR,kR,LR,xR,PR,BR,DR,UR,MR,$R,FR,zR,HR,KR,WR,VR,GR,qR,jR,YR,XR,JR,ZR,QR,eE,tE,rE,nE,sE,oE,iE,aE,cE,uE,lE,fE,dE,hE,_E,pE,mE,gE,yE,RE,EE,AE,SE,OE,bE,wE,NE,IE,TE,CE,vE,kE,LE,xE,PE,BE,DE,ma,ga,Gl,ql,ya,Ra,Ea,UE,ME,$E,FE,Aa,zE,jl,Yl,HE,KE,WE,VE,GE,Xl,Jl,qE,jE,YE,XE,JE,ZE,QE,eA,tA,rA,nA,sA,oA,iA,aA,lA,Gt,xt,ar,Sa=Ne(()=>{"use strict";ug=1,lg=2,fg=3,dg=4,hg=5,_g=6,pg=7,mg=8,gg=9,yg=10,Rg=-32700,Eg=-32603,Ag=-32602,Sg=-32601,Og=-32600,bg=-32016,wg=-32015,Ng=-32014,Ig=-32013,Tg=-32012,Cg=-32011,vg=-32010,kg=-32009,Lg=-32008,xg=-32007,Pg=-32006,Bg=-32005,Dg=-32004,Ug=-32003,Mg=-32002,$g=-32001,Fg=28e5,zg=2800001,Hg=2800002,Kg=2800003,Wg=2800004,Vg=2800005,Gg=2800006,qg=2800007,jg=2800008,Yg=2800009,Xg=2800010,Jg=2800011,Zg=323e4,Qg=32300001,ey=3230002,ty=3230003,ry=3230004,ny=361e4,sy=3610001,oy=3610002,iy=3610003,ay=3610004,cy=3610005,uy=3610006,ly=3610007,fy=3611e3,dy=3704e3,hy=3704001,_y=3704002,py=3704003,my=3704004,gy=4128e3,yy=4128001,Ry=4128002,Ey=4615e3,Ay=4615001,Sy=4615002,Oy=4615003,by=4615004,wy=4615005,Ny=4615006,Iy=4615007,Ty=4615008,Cy=4615009,vy=4615010,ky=4615011,Ly=4615012,xy=4615013,Py=4615014,By=4615015,Dy=4615016,Uy=4615017,My=4615018,$y=4615019,Fy=4615020,zy=4615021,Hy=4615022,Ky=4615023,Wy=4615024,Vy=4615025,Gy=4615026,qy=4615027,jy=4615028,Yy=4615029,Xy=4615030,Jy=4615031,Zy=4615032,Qy=4615033,eR=4615034,tR=4615035,rR=4615036,nR=4615037,sR=4615038,oR=4615039,iR=4615040,aR=4615041,cR=4615042,uR=4615043,lR=4615044,fR=4615045,dR=4615046,hR=4615047,_R=4615048,pR=4615049,mR=4615050,gR=4615051,yR=4615052,RR=4615053,ER=4615054,AR=5508e3,SR=5508001,OR=5508002,bR=5508003,wR=5508004,NR=5508005,IR=5508006,TR=5508007,CR=5508008,vR=5508009,kR=5508010,LR=5508011,xR=5663e3,PR=5663001,BR=5663002,DR=5663003,UR=5663004,MR=5663005,$R=5663006,FR=5663007,zR=5663008,HR=5663009,KR=5663010,WR=5663011,VR=5663012,GR=5663013,qR=5663014,jR=5663015,YR=5663016,XR=5663017,JR=5663018,ZR=5663019,QR=5663020,eE=705e4,tE=7050001,rE=7050002,nE=7050003,sE=7050004,oE=7050005,iE=7050006,aE=7050007,cE=7050008,uE=7050009,lE=7050010,fE=7050011,dE=7050012,hE=7050013,_E=7050014,pE=7050015,mE=7050016,gE=7050017,yE=7050018,RE=7050019,EE=7050020,AE=7050021,SE=7050022,OE=7050023,bE=7050024,wE=7050025,NE=7050026,IE=7050027,TE=7050028,CE=7050029,vE=7050030,kE=7050031,LE=7050032,xE=7050033,PE=7050034,BE=7050035,DE=7050036,ma=8078e3,ga=8078001,Gl=8078002,ql=8078003,ya=8078004,Ra=8078005,Ea=8078006,UE=8078007,ME=8078008,$E=8078009,FE=8078010,Aa=8078011,zE=8078012,jl=8078013,Yl=8078014,HE=8078015,KE=8078016,WE=8078017,VE=8078018,GE=8078019,Xl=8078020,Jl=8078021,qE=8078022,jE=81e5,YE=8100001,XE=8100002,JE=8100003,ZE=819e4,QE=8190001,eA=8190002,tA=8190003,rA=8190004,nA=99e5,sA=9900001,oA=9900002,iA=9900003,aA=9900004;a(Zl,"encodeValue");a(cA,"encodeObjectContextEntry");a(uA,"encodeContextObject");lA={[Zg]:"Account not found at address: $address",[ry]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[ty]:"Expected decoded account at address: $address",[ey]:"Failed to decode account data at address: $address",[Qg]:"Accounts not found at addresses: $addresses",[Yg]:"Unable to find a viable program address bump seed.",[Hg]:"$putativeAddress is not a base58-encoded address.",[Fg]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[Kg]:"The `CryptoKey` must be an `Ed25519` public key.",[Jg]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[jg]:"Invalid seeds; point must fall off the Ed25519 curve.",[Wg]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[Gg]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[qg]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[Vg]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Xg]:"Program address cannot end with PDA marker.",[zg]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[dg]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[ug]:"The network has progressed past the last block for which this transaction could have been committed.",[ma]:"Codec [$codecDescription] cannot decode empty byte arrays.",[qE]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[Xl]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[Ra]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Ea]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[ya]:"Encoder and decoder must either both be fixed-size or variable-size.",[ME]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[Gl]:"Expected a fixed-size codec, got a variable-size one.",[jl]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[ql]:"Expected a variable-size codec, got a fixed-size one.",[GE]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[ga]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[VE]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[$E]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[FE]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[HE]:"Invalid literal union variant. Expected one of [$variants], got $value.",[UE]:"Expected [$codecDescription] to have $expected items, got $actual.",[zE]:"Invalid value $value for base $base with alphabet $alphabet.",[KE]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[Aa]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Yl]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[Jl]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[WE]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[fy]:"No random values implementation could be found.",[Cy]:"instruction requires an uninitialized account",[Ky]:"instruction tries to borrow reference for an account which is already borrowed",[Wy]:"instruction left account with an outstanding borrowed reference",[zy]:"program other than the account's owner changed the size of the account data",[wy]:"account data too small for instruction",[Hy]:"instruction expected an executable account",[dR]:"An account does not have enough lamports to be rent-exempt",[_R]:"Program arithmetic overflowed",[fR]:"Failed to serialize or deserialize account data: $encodedData",[ER]:"Builtin programs must consume compute units",[Zy]:"Cross-program invocation call depth too deep",[sR]:"Computational budget exceeded",[Gy]:"custom program error: #$code",[Uy]:"instruction contains duplicate accounts",[Vy]:"instruction modifications of multiply-passed account differ",[Xy]:"executable accounts must be rent exempt",[jy]:"instruction changed executable accounts data",[Yy]:"instruction changed the balance of an executable account",[My]:"instruction changed executable bit of an account",[Py]:"instruction modified data of an account it does not own",[xy]:"instruction spent from the balance of an account it does not own",[Ay]:"generic instruction error",[mR]:"Provided owner is not allowed",[uR]:"Account is immutable",[lR]:"Incorrect authority provided",[Iy]:"incorrect program id for instruction",[Ny]:"insufficient funds for instruction",[by]:"invalid account data for instruction",[hR]:"Invalid account owner",[Sy]:"invalid program argument",[qy]:"program returned invalid error code",[Oy]:"invalid instruction data",[nR]:"Failed to reallocate account data",[rR]:"Provided seeds do not result in a valid address",[gR]:"Accounts data allocations exceeded the maximum allowed per transaction",[yR]:"Max accounts exceeded",[RR]:"Max instruction trace length exceeded",[tR]:"Length of the seed is too long for address generation",[Qy]:"An account required by the instruction is missing",[Ty]:"missing required signature for instruction",[Ly]:"instruction illegally modified the program id of an account",[Fy]:"insufficient account keys for instruction",[oR]:"Cross-program invocation with unauthorized signer or writable account",[iR]:"Failed to create program execution environment",[cR]:"Program failed to compile",[aR]:"Program failed to complete",[Dy]:"instruction modified data of a read-only account",[By]:"instruction changed the balance of a read-only account",[eR]:"Cross-program invocation reentrancy not allowed for this instruction",[$y]:"instruction modified rent epoch of an account",[ky]:"sum of account balances before and after instruction do not match",[vy]:"instruction requires an initialized account",[Ey]:"",[Jy]:"Unsupported program id",[pR]:"Unsupported sysvar",[gy]:"The instruction does not have any accounts.",[yy]:"The instruction does not have any data.",[Ry]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[hg]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[lg]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[oA]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[aA]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[sA]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[nA]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[iA]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Eg]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[Ag]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[Og]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Sg]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Rg]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[Tg]:"$__serverMessage",[$g]:"$__serverMessage",[Dg]:"$__serverMessage",[Ng]:"$__serverMessage",[vg]:"$__serverMessage",[kg]:"$__serverMessage",[bg]:"Minimum context slot has not been reached",[Bg]:"Node is unhealthy; behind by $numSlotsBehind slots",[Lg]:"No snapshot",[Mg]:"Transaction simulation failed",[xg]:"$__serverMessage",[Cg]:"Transaction history is not available from this node",[Pg]:"$__serverMessage",[Ig]:"Transaction signature length mismatch",[Ug]:"Transaction signature verification failure",[wg]:"$__serverMessage",[dy]:"Key pair bytes must be of length 64, got $byteLength.",[hy]:"Expected private key bytes with length 32. Actual length: $actualLength.",[_y]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[my]:"The provided private key does not match the provided public key.",[py]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[_g]:"Lamports value must be in the range [0, 2e64-1]",[pg]:"`$value` cannot be parsed as a `BigInt`",[yg]:"$message",[mg]:"`$value` cannot be parsed as a `Number`",[fg]:"No nonce account could be found at address `$nonceAccountAddress`",[ZE]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[eA]:"WebSocket was closed before payload could be added to the send buffer",[tA]:"WebSocket connection closed",[rA]:"WebSocket failed to connect",[QE]:"Failed to obtain a subscription id from the server",[JE]:"Could not find an API plan for RPC method: `$method`",[jE]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[XE]:"HTTP error ($statusCode): $message",[YE]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[AR]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[SR]:"The provided value does not implement the `KeyPairSigner` interface",[bR]:"The provided value does not implement the `MessageModifyingSigner` interface",[wR]:"The provided value does not implement the `MessagePartialSigner` interface",[OR]:"The provided value does not implement any of the `MessageSigner` interfaces",[IR]:"The provided value does not implement the `TransactionModifyingSigner` interface",[TR]:"The provided value does not implement the `TransactionPartialSigner` interface",[CR]:"The provided value does not implement the `TransactionSendingSigner` interface",[NR]:"The provided value does not implement any of the `TransactionSigner` interfaces",[vR]:"More than one `TransactionSendingSigner` was identified.",[kR]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[LR]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[ly]:"Cannot export a non-extractable key.",[sy]:"No digest implementation could be found.",[ny]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[oy]:`This runtime does not support the generation of Ed25519 key pairs.
2
+ import{b as Tl}from"./chunk-FMZDKD72.js";import{I as br,J as Pm,K as js,L as Bm,M as Il,O as Dm,b as ra,c as Lm,d as Nl,g as xm}from"./chunk-VHQBRB4B.js";import{Bd as wl,E as ta,Ic as bl,ja as Sl,nc as Or,wc as Ol,yc as Cm,zc as vm}from"./chunk-4CH3FO2Y.js";import{b as km}from"./chunk-T2GZNU62.js";import{a,b as ue,c as Ne,d as ce,e as kn,f as fe,g as Ln}from"./chunk-G5BIPHMS.js";function Ll(n,e){return Array.apply(0,new Array(Math.ceil(n.length/e))).map((t,r)=>n.slice(r*e,(r+1)*e))}var sa,sr,bt,Nr=Ne(()=>{"use strict";sr=process.env.ANCHOR_BROWSER||typeof window<"u"&&!(!((sa=window.process)===null||sa===void 0)&&sa.hasOwnProperty("type"));a(Ll,"chunks");bt=a(n=>"version"in n,"isVersionedTransaction")});var Bl=ce((oa,Pl)=>{"use strict";var Xs=ue("buffer"),vt=Xs.Buffer;function xl(n,e){for(var t in n)e[t]=n[t]}a(xl,"copyProps");vt.from&&vt.alloc&&vt.allocUnsafe&&vt.allocUnsafeSlow?Pl.exports=Xs:(xl(Xs,oa),oa.Buffer=Ir);function Ir(n,e,t){return vt(n,e,t)}a(Ir,"SafeBuffer");Ir.prototype=Object.create(vt.prototype);xl(vt,Ir);Ir.from=function(n,e,t){if(typeof n=="number")throw new TypeError("Argument must not be a number");return vt(n,e,t)};Ir.alloc=function(n,e,t){if(typeof n!="number")throw new TypeError("Argument must be a number");var r=vt(n);return e!==void 0?typeof t=="string"?r.fill(e,t):r.fill(e):r.fill(0),r};Ir.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return vt(n)};Ir.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return Xs.SlowBuffer(n)}});var Ul=ce((lN,Dl)=>{"use strict";var Js=Bl().Buffer;function Wm(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var r=0;r<n.length;r++){var o=n.charAt(r),s=o.charCodeAt(0);if(e[s]!==255)throw new TypeError(o+" is ambiguous");e[s]=r}var i=n.length,u=n.charAt(0),f=Math.log(i)/Math.log(256),p=Math.log(256)/Math.log(i);function d(E){if((Array.isArray(E)||E instanceof Uint8Array)&&(E=Js.from(E)),!Js.isBuffer(E))throw new TypeError("Expected Buffer");if(E.length===0)return"";for(var O=0,b=0,k=0,L=E.length;k!==L&&E[k]===0;)k++,O++;for(var A=(L-k)*p+1>>>0,x=new Uint8Array(A);k!==L;){for(var z=E[k],Y=0,re=A-1;(z!==0||Y<b)&&re!==-1;re--,Y++)z+=256*x[re]>>>0,x[re]=z%i>>>0,z=z/i>>>0;if(z!==0)throw new Error("Non-zero carry");b=Y,k++}for(var te=A-b;te!==A&&x[te]===0;)te++;for(var Oe=u.repeat(O);te<A;++te)Oe+=n.charAt(x[te]);return Oe}a(d,"encode");function y(E){if(typeof E!="string")throw new TypeError("Expected String");if(E.length===0)return Js.alloc(0);for(var O=0,b=0,k=0;E[O]===u;)b++,O++;for(var L=(E.length-O)*f+1>>>0,A=new Uint8Array(L);E[O];){var x=e[E.charCodeAt(O)];if(x===255)return;for(var z=0,Y=L-1;(x!==0||z<k)&&Y!==-1;Y--,z++)x+=i*A[Y]>>>0,A[Y]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");k=z,O++}for(var re=L-k;re!==L&&A[re]===0;)re++;var te=Js.allocUnsafe(b+(L-re));te.fill(0,0,b);for(var Oe=b;re!==L;)te[Oe++]=A[re++];return te}a(y,"decodeUnsafe");function S(E){var O=y(E);if(O)return O;throw new Error("Non-base"+i+" character")}return a(S,"decode"),{encode:d,decodeUnsafe:y,decode:S}}a(Wm,"base");Dl.exports=Wm});var Yr=ce((dN,Ml)=>{"use strict";var Vm=Ul(),Gm="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Ml.exports=Vm(Gm)});var ia,$l=Ne(()=>{"use strict";xm();ia=Nl});var Fl=ce(ua=>{"use strict";function Wt(n,e,t){return e<=n&&n<=t}a(Wt,"inRange");function ro(n){if(n===void 0)return{};if(n===Object(n))return n;throw TypeError("Could not convert argument to dictionary")}a(ro,"ToDictionary");function qm(n){for(var e=String(n),t=e.length,r=0,o=[];r<t;){var s=e.charCodeAt(r);if(s<55296||s>57343)o.push(s);else if(56320<=s&&s<=57343)o.push(65533);else if(55296<=s&&s<=56319)if(r===t-1)o.push(65533);else{var i=n.charCodeAt(r+1);if(56320<=i&&i<=57343){var u=s&1023,f=i&1023;o.push(65536+(u<<10)+f),r+=1}else o.push(65533)}r+=1}return o}a(qm,"stringToCodePoints");function jm(n){for(var e="",t=0;t<n.length;++t){var r=n[t];r<=65535?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return e}a(jm,"codePointsToString");var Zs=-1;function ca(n){this.tokens=[].slice.call(n)}a(ca,"Stream");ca.prototype={endOfStream:a(function(){return!this.tokens.length},"endOfStream"),read:a(function(){return this.tokens.length?this.tokens.shift():Zs},"read"),prepend:a(function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(n)},"prepend"),push:a(function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.push(e.shift());else this.tokens.push(n)},"push")};var Xr=-1;function aa(n,e){if(n)throw TypeError("Decoder error");return e||65533}a(aa,"decoderError");var Qs="utf-8";function eo(n,e){if(!(this instanceof eo))return new eo(n,e);if(n=n!==void 0?String(n).toLowerCase():Qs,n!==Qs)throw new Error("Encoding not supported. Only utf-8 is supported");e=ro(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}a(eo,"TextDecoder");eo.prototype={decode:a(function(e,t){var r;typeof e=="object"&&e instanceof ArrayBuffer?r=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):r=new Uint8Array(0),t=ro(t),this._streaming||(this._decoder=new Ym({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var o=new ca(r),s=[],i;!o.endOfStream()&&(i=this._decoder.handler(o,o.read()),i!==Xr);)i!==null&&(Array.isArray(i)?s.push.apply(s,i):s.push(i));if(!this._streaming){do{if(i=this._decoder.handler(o,o.read()),i===Xr)break;i!==null&&(Array.isArray(i)?s.push.apply(s,i):s.push(i))}while(!o.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),jm(s)},"decode")};function to(n,e){if(!(this instanceof to))return new to(n,e);if(n=n!==void 0?String(n).toLowerCase():Qs,n!==Qs)throw new Error("Encoding not supported. Only utf-8 is supported");e=ro(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}a(to,"TextEncoder");to.prototype={encode:a(function(e,t){e=e?String(e):"",t=ro(t),this._streaming||(this._encoder=new Xm(this._options)),this._streaming=!!t.stream;for(var r=[],o=new ca(qm(e)),s;!o.endOfStream()&&(s=this._encoder.handler(o,o.read()),s!==Xr);)Array.isArray(s)?r.push.apply(r,s):r.push(s);if(!this._streaming){for(;s=this._encoder.handler(o,o.read()),s!==Xr;)Array.isArray(s)?r.push.apply(r,s):r.push(s);this._encoder=null}return new Uint8Array(r)},"encode")};function Ym(n){var e=n.fatal,t=0,r=0,o=0,s=128,i=191;this.handler=function(u,f){if(f===Zs&&o!==0)return o=0,aa(e);if(f===Zs)return Xr;if(o===0){if(Wt(f,0,127))return f;if(Wt(f,194,223))o=1,t=f-192;else if(Wt(f,224,239))f===224&&(s=160),f===237&&(i=159),o=2,t=f-224;else if(Wt(f,240,244))f===240&&(s=144),f===244&&(i=143),o=3,t=f-240;else return aa(e);return t=t<<6*o,null}if(!Wt(f,s,i))return t=o=r=0,s=128,i=191,u.prepend(f),aa(e);if(s=128,i=191,r+=1,t+=f-128<<6*(o-r),r!==o)return null;var p=t;return t=o=r=0,p}}a(Ym,"UTF8Decoder");function Xm(n){var e=n.fatal;this.handler=function(t,r){if(r===Zs)return Xr;if(Wt(r,0,127))return r;var o,s;Wt(r,128,2047)?(o=1,s=192):Wt(r,2048,65535)?(o=2,s=224):Wt(r,65536,1114111)&&(o=3,s=240);for(var i=[(r>>6*o)+s];o>0;){var u=r>>6*(o-1);i.push(128|u&63),o-=1}return i}}a(Xm,"UTF8Encoder");ua.TextEncoder=to;ua.TextDecoder=eo});var Vl=ce(Se=>{"use strict";var Jm=Se&&Se.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:a(function(){return e[t]},"get")})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),Zm=Se&&Se.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),kt=Se&&Se.__decorate||function(n,e,t,r){var o=arguments.length,s=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var u=n.length-1;u>=0;u--)(i=n[u])&&(s=(o<3?i(s):o>3?i(e,t,s):i(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},Qm=Se&&Se.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.hasOwnProperty.call(n,t)&&Jm(e,n,t);return Zm(e,n),e},zl=Se&&Se.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Se,"__esModule",{value:!0});Se.deserializeUnchecked=Se.deserialize=Se.serialize=Se.BinaryReader=Se.BinaryWriter=Se.BorshError=Se.baseDecode=Se.baseEncode=void 0;var or=zl(Or()),Hl=zl(Yr()),eg=Qm(Fl()),tg=typeof TextDecoder!="function"?eg.TextDecoder:TextDecoder,rg=new tg("utf-8",{fatal:!0});function ng(n){return typeof n=="string"&&(n=Buffer.from(n,"utf8")),Hl.default.encode(Buffer.from(n))}a(ng,"baseEncode");Se.baseEncode=ng;function sg(n){return Buffer.from(Hl.default.decode(n))}a(sg,"baseDecode");Se.baseDecode=sg;var la=1024,We=class extends Error{static{a(this,"BorshError")}constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}};Se.BorshError=We;var no=class{static{a(this,"BinaryWriter")}constructor(){this.buf=Buffer.alloc(la),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(la)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new or.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new or.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new or.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new or.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(la)]),this.length+=e.length}writeString(e){this.maybeResize();let t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(let r of e)this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}};Se.BinaryWriter=no;function Lt(n,e,t){let r=t.value;t.value=function(...o){try{return r.apply(this,o)}catch(s){if(s instanceof RangeError){let i=s.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(i)>=0)throw new We("Reached the end of buffer when deserializing")}throw s}}}a(Lt,"handlingRangeError");var Qe=class{static{a(this,"BinaryReader")}constructor(e){this.buf=e,this.offset=0}readU8(){let e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){let e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){let e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){let e=this.readBuffer(8);return new or.default(e,"le")}readU128(){let e=this.readBuffer(16);return new or.default(e,"le")}readU256(){let e=this.readBuffer(32);return new or.default(e,"le")}readU512(){let e=this.readBuffer(64);return new or.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new We(`Expected buffer length ${e} isn't within bounds`);let t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){let e=this.readU32(),t=this.readBuffer(e);try{return rg.decode(t)}catch(r){throw new We(`Error decoding UTF-8 string: ${r}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){let t=this.readU32(),r=Array();for(let o=0;o<t;++o)r.push(e());return r}};kt([Lt],Qe.prototype,"readU8",null);kt([Lt],Qe.prototype,"readU16",null);kt([Lt],Qe.prototype,"readU32",null);kt([Lt],Qe.prototype,"readU64",null);kt([Lt],Qe.prototype,"readU128",null);kt([Lt],Qe.prototype,"readU256",null);kt([Lt],Qe.prototype,"readU512",null);kt([Lt],Qe.prototype,"readString",null);kt([Lt],Qe.prototype,"readFixedArray",null);kt([Lt],Qe.prototype,"readArray",null);Se.BinaryReader=Qe;function Kl(n){return n.charAt(0).toUpperCase()+n.slice(1)}a(Kl,"capitalizeFirstLetter");function Tr(n,e,t,r,o){try{if(typeof r=="string")o[`write${Kl(r)}`](t);else if(r instanceof Array)if(typeof r[0]=="number"){if(t.length!==r[0])throw new We(`Expecting byte array of length ${r[0]}, but got ${t.length} bytes`);o.writeFixedArray(t)}else if(r.length===2&&typeof r[1]=="number"){if(t.length!==r[1])throw new We(`Expecting byte array of length ${r[1]}, but got ${t.length} bytes`);for(let s=0;s<r[1];s++)Tr(n,null,t[s],r[0],o)}else o.writeArray(t,s=>{Tr(n,e,s,r[0],o)});else if(r.kind!==void 0)switch(r.kind){case"option":{t==null?o.writeU8(0):(o.writeU8(1),Tr(n,e,t,r.type,o));break}case"map":{o.writeU32(t.size),t.forEach((s,i)=>{Tr(n,e,i,r.key,o),Tr(n,e,s,r.value,o)});break}default:throw new We(`FieldType ${r} unrecognized`)}else Wl(n,t,o)}catch(s){throw s instanceof We&&s.addToFieldPath(e),s}}a(Tr,"serializeField");function Wl(n,e,t){if(typeof e.borshSerialize=="function"){e.borshSerialize(t);return}let r=n.get(e.constructor);if(!r)throw new We(`Class ${e.constructor.name} is missing in schema`);if(r.kind==="struct")r.fields.map(([o,s])=>{Tr(n,o,e[o],s,t)});else if(r.kind==="enum"){let o=e[r.field];for(let s=0;s<r.values.length;++s){let[i,u]=r.values[s];if(i===o){t.writeU8(s),Tr(n,i,e[i],u,t);break}}}else throw new We(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}a(Wl,"serializeStruct");function og(n,e,t=no){let r=new t;return Wl(n,e,r),r.toArray()}a(og,"serialize");Se.serialize=og;function Cr(n,e,t,r){try{if(typeof t=="string")return r[`read${Kl(t)}`]();if(t instanceof Array){if(typeof t[0]=="number")return r.readFixedArray(t[0]);if(typeof t[1]=="number"){let o=[];for(let s=0;s<t[1];s++)o.push(Cr(n,null,t[0],r));return o}else return r.readArray(()=>Cr(n,e,t[0],r))}if(t.kind==="option")return r.readU8()?Cr(n,e,t.type,r):void 0;if(t.kind==="map"){let o=new Map,s=r.readU32();for(let i=0;i<s;i++){let u=Cr(n,e,t.key,r),f=Cr(n,e,t.value,r);o.set(u,f)}return o}return fa(n,t,r)}catch(o){throw o instanceof We&&o.addToFieldPath(e),o}}a(Cr,"deserializeField");function fa(n,e,t){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(t);let r=n.get(e);if(!r)throw new We(`Class ${e.name} is missing in schema`);if(r.kind==="struct"){let o={};for(let[s,i]of n.get(e).fields)o[s]=Cr(n,s,i,t);return new e(o)}if(r.kind==="enum"){let o=t.readU8();if(o>=r.values.length)throw new We(`Enum index: ${o} is out of range`);let[s,i]=r.values[o],u=Cr(n,s,i,t);return new e({[s]:u})}throw new We(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}a(fa,"deserializeStruct");function ig(n,e,t,r=Qe){let o=new r(t),s=fa(n,e,o);if(o.offset<t.length)throw new We(`Unexpected ${t.length-o.offset} bytes after deserialized data`);return s}a(ig,"deserialize");Se.deserialize=ig;function ag(n,e,t,r=Qe){let o=new r(t);return fa(n,e,o)}a(ag,"deserializeUnchecked");Se.deserializeUnchecked=ag});var pa=ce(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.s16=C.s8=C.nu64be=C.u48be=C.u40be=C.u32be=C.u24be=C.u16be=C.nu64=C.u48=C.u40=C.u32=C.u24=C.u16=C.u8=C.offset=C.greedy=C.Constant=C.UTF8=C.CString=C.Blob=C.Boolean=C.BitField=C.BitStructure=C.VariantLayout=C.Union=C.UnionLayoutDiscriminator=C.UnionDiscriminator=C.Structure=C.Sequence=C.DoubleBE=C.Double=C.FloatBE=C.Float=C.NearInt64BE=C.NearInt64=C.NearUInt64BE=C.NearUInt64=C.IntBE=C.Int=C.UIntBE=C.UInt=C.OffsetLayout=C.GreedyCount=C.ExternalLayout=C.bindConstructorLayout=C.nameWithProperty=C.Layout=C.uint8ArrayToBuffer=C.checkUint8Array=void 0;C.constant=C.utf8=C.cstr=C.blob=C.unionLayoutDiscriminator=C.union=C.seq=C.bits=C.struct=C.f64be=C.f64=C.f32be=C.f32=C.ns64be=C.s48be=C.s40be=C.s32be=C.s24be=C.s16be=C.ns64=C.s48=C.s40=C.s32=C.s24=void 0;var ha=ue("buffer");function Qr(n){if(!(n instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}a(Qr,"checkUint8Array");C.checkUint8Array=Qr;function _e(n){return Qr(n),ha.Buffer.from(n.buffer,n.byteOffset,n.length)}a(_e,"uint8ArrayToBuffer");C.uint8ArrayToBuffer=_e;var ge=class{static{a(this,"Layout")}constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};C.Layout=ge;function _a(n,e){return e.property?n+"["+e.property+"]":n}a(_a,"nameWithProperty");C.nameWithProperty=_a;function cg(n,e){if(typeof n!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(n,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof ge))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(e,"boundConstructor_"))throw new Error("layout is already bound to a constructor");n.layout_=e,e.boundConstructor_=n,e.makeDestinationObject=()=>new n,Object.defineProperty(n.prototype,"encode",{value(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(n,"decode",{value(t,r){return e.decode(t,r)},writable:!0})}a(cg,"bindConstructorLayout");C.bindConstructorLayout=cg;var qe=class extends ge{static{a(this,"ExternalLayout")}isCount(){throw new Error("ExternalLayout is abstract")}};C.ExternalLayout=qe;var so=class extends qe{static{a(this,"GreedyCount")}constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t=0){Qr(e);let r=e.length-t;return Math.floor(r/this.elementSpan)}encode(e,t,r){return 0}};C.GreedyCount=so;var xn=class extends qe{static{a(this,"OffsetLayout")}constructor(e,t=0,r){if(!(e instanceof ge))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof tt||this.layout instanceof ct}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}};C.OffsetLayout=xn;var tt=class extends ge{static{a(this,"UInt")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return _e(e).readUIntLE(t,this.span)}encode(e,t,r=0){return _e(t).writeUIntLE(e,r,this.span),this.span}};C.UInt=tt;var ct=class extends ge{static{a(this,"UIntBE")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return _e(e).readUIntBE(t,this.span)}encode(e,t,r=0){return _e(t).writeUIntBE(e,r,this.span),this.span}};C.UIntBE=ct;var Vt=class extends ge{static{a(this,"Int")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return _e(e).readIntLE(t,this.span)}encode(e,t,r=0){return _e(t).writeIntLE(e,r,this.span),this.span}};C.Int=Vt;var ir=class extends ge{static{a(this,"IntBE")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return _e(e).readIntBE(t,this.span)}encode(e,t,r=0){return _e(t).writeIntBE(e,r,this.span),this.span}};C.IntBE=ir;var da=Math.pow(2,32);function So(n){let e=Math.floor(n/da),t=n-e*da;return{hi32:e,lo32:t}}a(So,"divmodInt64");function Oo(n,e){return n*da+e}a(Oo,"roundedInt64");var oo=class extends ge{static{a(this,"NearUInt64")}constructor(e){super(8,e)}decode(e,t=0){let r=_e(e),o=r.readUInt32LE(t),s=r.readUInt32LE(t+4);return Oo(s,o)}encode(e,t,r=0){let o=So(e),s=_e(t);return s.writeUInt32LE(o.lo32,r),s.writeUInt32LE(o.hi32,r+4),8}};C.NearUInt64=oo;var io=class extends ge{static{a(this,"NearUInt64BE")}constructor(e){super(8,e)}decode(e,t=0){let r=_e(e),o=r.readUInt32BE(t),s=r.readUInt32BE(t+4);return Oo(o,s)}encode(e,t,r=0){let o=So(e),s=_e(t);return s.writeUInt32BE(o.hi32,r),s.writeUInt32BE(o.lo32,r+4),8}};C.NearUInt64BE=io;var ao=class extends ge{static{a(this,"NearInt64")}constructor(e){super(8,e)}decode(e,t=0){let r=_e(e),o=r.readUInt32LE(t),s=r.readInt32LE(t+4);return Oo(s,o)}encode(e,t,r=0){let o=So(e),s=_e(t);return s.writeUInt32LE(o.lo32,r),s.writeInt32LE(o.hi32,r+4),8}};C.NearInt64=ao;var co=class extends ge{static{a(this,"NearInt64BE")}constructor(e){super(8,e)}decode(e,t=0){let r=_e(e),o=r.readInt32BE(t),s=r.readUInt32BE(t+4);return Oo(o,s)}encode(e,t,r=0){let o=So(e),s=_e(t);return s.writeInt32BE(o.hi32,r),s.writeUInt32BE(o.lo32,r+4),8}};C.NearInt64BE=co;var uo=class extends ge{static{a(this,"Float")}constructor(e){super(4,e)}decode(e,t=0){return _e(e).readFloatLE(t)}encode(e,t,r=0){return _e(t).writeFloatLE(e,r),4}};C.Float=uo;var lo=class extends ge{static{a(this,"FloatBE")}constructor(e){super(4,e)}decode(e,t=0){return _e(e).readFloatBE(t)}encode(e,t,r=0){return _e(t).writeFloatBE(e,r),4}};C.FloatBE=lo;var fo=class extends ge{static{a(this,"Double")}constructor(e){super(8,e)}decode(e,t=0){return _e(e).readDoubleLE(t)}encode(e,t,r=0){return _e(t).writeDoubleLE(e,r),8}};C.Double=fo;var ho=class extends ge{static{a(this,"DoubleBE")}constructor(e){super(8,e)}decode(e,t=0){return _e(e).readDoubleBE(t)}encode(e,t,r=0){return _e(t).writeDoubleBE(e,r),8}};C.DoubleBE=ho;var _o=class extends ge{static{a(this,"Sequence")}constructor(e,t,r){if(!(e instanceof ge))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof qe&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let o=-1;!(t instanceof qe)&&0<e.span&&(o=t*e.span),super(o,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,o=this.count;if(o instanceof qe&&(o=o.decode(e,t)),0<this.elementLayout.span)r=o*this.elementLayout.span;else{let s=0;for(;s<o;)r+=this.elementLayout.getSpan(e,t+r),++s}return r}decode(e,t=0){let r=[],o=0,s=this.count;for(s instanceof qe&&(s=s.decode(e,t));o<s;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),o+=1;return r}encode(e,t,r=0){let o=this.elementLayout,s=e.reduce((i,u)=>i+o.encode(u,t,r+i),0);return this.count instanceof qe&&this.count.encode(e.length,t,r),s}};C.Sequence=_o;var po=class extends ge{static{a(this,"Structure")}constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((s,i)=>s&&i instanceof ge,!0)))throw new TypeError("fields must be array of Layout instances");typeof t=="boolean"&&r===void 0&&(r=t,t=void 0);for(let s of e)if(0>s.span&&s.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let o=-1;try{o=e.reduce((s,i)=>s+i.getSpan(),0)}catch{}super(o,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((o,s)=>{let i=s.getSpan(e,t);return t+=i,o+i},0)}catch{throw new RangeError("indeterminate span")}return r}decode(e,t=0){Qr(e);let r=this.makeDestinationObject();for(let o of this.fields)if(o.property!==void 0&&(r[o.property]=o.decode(e,t)),t+=o.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){let o=r,s=0,i=0;for(let u of this.fields){let f=u.span;if(i=0<f?f:0,u.property!==void 0){let p=e[u.property];p!==void 0&&(i=u.encode(p,t,r),0>f&&(f=u.getSpan(t,r)))}s=r,r+=f}return s+i-o}fromArray(e){let t=this.makeDestinationObject();for(let r of this.fields)r.property!==void 0&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let t=0;for(let r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}};C.Structure=po;var Pn=class{static{a(this,"UnionDiscriminator")}constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,r){throw new Error("UnionDiscriminator is abstract")}};C.UnionDiscriminator=Pn;var Zr=class extends Pn{static{a(this,"UnionLayoutDiscriminator")}constructor(e,t){if(!(e instanceof qe&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,r){return this.layout.encode(e,t,r)}};C.UnionLayoutDiscriminator=Zr;var Bn=class extends ge{static{a(this,"Union")}constructor(e,t,r){let o;if(e instanceof tt||e instanceof ct)o=new Zr(new xn(e));else if(e instanceof qe&&e.isCount())o=new Zr(e);else if(e instanceof Pn)o=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(t===void 0&&(t=null),!(t===null||t instanceof ge))throw new TypeError("defaultLayout must be null or a Layout");if(t!==null){if(0>t.span)throw new Error("defaultLayout must have constant span");t.property===void 0&&(t=t.replicate("content"))}let s=-1;t&&(s=t.span,0<=s&&(e instanceof tt||e instanceof ct)&&(s+=o.layout.span)),super(s,r),this.discriminator=o,this.usesPrefixDiscriminator=e instanceof tt||e instanceof ct,this.defaultLayout=t,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(u){return i(u)},this.configGetSourceVariant=function(u){i=u.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;let r=this.getVariant(e,t);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;let t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(let t in this.registry){let r=this.registry[t];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw new Error("unable to infer src variant")}decode(e,t=0){let r,o=this.discriminator,s=o.decode(e,t),i=this.registry[s];if(i===void 0){let u=this.defaultLayout,f=0;this.usesPrefixDiscriminator&&(f=o.layout.span),r=this.makeDestinationObject(),r[o.property]=s,r[u.property]=u.decode(e,t+f)}else r=i.decode(e,t);return r}encode(e,t,r=0){let o=this.getSourceVariant(e);if(o===void 0){let s=this.discriminator,i=this.defaultLayout,u=0;return this.usesPrefixDiscriminator&&(u=s.layout.span),s.encode(e[s.property],t,r),u+i.encode(e[i.property],t,r+u)}return o.encode(e,t,r)}addVariant(e,t,r){let o=new mo(this,e,t,r);return this.registry[e]=o,o}getVariant(e,t=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,t):r=e,this.registry[r]}};C.Union=Bn;var mo=class extends ge{static{a(this,"VariantLayout")}constructor(e,t,r,o){if(!(e instanceof Bn))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if(typeof r=="string"&&o===void 0&&(o=r,r=null),r){if(!(r instanceof ge))throw new TypeError("layout must be a Layout");if(e.defaultLayout!==null&&0<=r.span&&r.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof o!="string")throw new TypeError("variant must have a String property")}let s=e.span;0>e.span&&(s=r?r.span:0,0<=s&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span)),super(s,o),this.union=e,this.variant=t,this.layout=r||null}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let o=0;return this.layout&&(o=this.layout.getSpan(e,t+r)),r+o}decode(e,t=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let o=0;return this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+o):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,t,r=0){let o=0;if(this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);let s=o;if(this.layout&&(this.layout.encode(e[this.property],t,r+o),s+=this.layout.getSpan(t,r+o),0<=this.union.span&&s>this.union.span))throw new Error("encoded variant overruns containing union");return s}fromArray(e){if(this.layout)return this.layout.fromArray(e)}};C.VariantLayout=mo;function Jr(n){return 0>n&&(n+=4294967296),n}a(Jr,"fixBitwiseResult");var Dn=class extends ge{static{a(this,"BitStructure")}constructor(e,t,r){if(!(e instanceof tt||e instanceof ct))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof t=="string"&&r===void 0&&(r=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let o=0;this._packedSetValue=function(s){return o=Jr(s),this},this._packedGetValue=function(){return o}}decode(e,t=0){let r=this.makeDestinationObject(),o=this.word.decode(e,t);this._packedSetValue(o);for(let s of this.fields)s.property!==void 0&&(r[s.property]=s.decode(e));return r}encode(e,t,r=0){let o=this.word.decode(t,r);this._packedSetValue(o);for(let s of this.fields)if(s.property!==void 0){let i=e[s.property];i!==void 0&&s.encode(i)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){let r=new Un(this,e,t);return this.fields.push(r),r}addBoolean(e){let t=new go(this,e);return this.fields.push(t),t}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}};C.BitStructure=Dn;var Un=class{static{a(this,"BitField")}constructor(e,t,r){if(!(e instanceof Dn))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");let o=8*e.span,s=e.fields.reduce((i,u)=>i+u.bits,0);if(t+s>o)throw new Error("bits too long for span remainder ("+(o-s)+" of "+o+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,t===32&&(this.valueMask=4294967295),this.start=s,this.container.msb&&(this.start=o-s-t),this.wordMask=Jr(this.valueMask<<this.start),this.property=r}decode(e,t){let r=this.container._packedGetValue();return Jr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==Jr(e&this.valueMask))throw new TypeError(_a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),r=Jr(e<<this.start);this.container._packedSetValue(Jr(t&~this.wordMask)|r)}};C.BitField=Un;var go=class extends Un{static{a(this,"Boolean")}constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){typeof e=="boolean"&&(e=+e),super.encode(e)}};C.Boolean=go;var yo=class extends ge{static{a(this,"Blob")}constructor(e,t){if(!(e instanceof qe&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof qe||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),_e(e).slice(t,t+r)}encode(e,t,r){let o=this.length;if(this.length instanceof qe&&(o=e.length),!(e instanceof Uint8Array&&o===e.length))throw new TypeError(_a("Blob.encode",this)+" requires (length "+o+") Uint8Array as src");if(r+o>t.length)throw new RangeError("encoding overruns Uint8Array");let s=_e(e);return _e(t).write(s.toString("hex"),r,o,"hex"),this.length instanceof qe&&this.length.encode(o,t,r),o}};C.Blob=yo;var Ro=class extends ge{static{a(this,"CString")}constructor(e){super(-1,e)}getSpan(e,t=0){Qr(e);let r=t;for(;r<e.length&&e[r]!==0;)r+=1;return 1+r-t}decode(e,t=0){let r=this.getSpan(e,t);return _e(e).slice(t,t+r-1).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));let o=ha.Buffer.from(e,"utf8"),s=o.length;if(r+s>t.length)throw new RangeError("encoding overruns Buffer");let i=_e(t);return o.copy(i,r),i[r+s]=0,s+1}};C.CString=Ro;var Eo=class extends ge{static{a(this,"UTF8")}constructor(e,t){if(typeof e=="string"&&t===void 0&&(t=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t=0){return Qr(e),e.length-t}decode(e,t=0){let r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return _e(e).slice(t,t+r).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));let o=ha.Buffer.from(e,"utf8"),s=o.length;if(0<=this.maxSpan&&this.maxSpan<s)throw new RangeError("text length exceeds maxSpan");if(r+s>t.length)throw new RangeError("encoding overruns Buffer");return o.copy(_e(t),r),s}};C.UTF8=Eo;var Ao=class extends ge{static{a(this,"Constant")}constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,r){return 0}};C.Constant=Ao;C.greedy=(n,e)=>new so(n,e);C.offset=(n,e,t)=>new xn(n,e,t);C.u8=n=>new tt(1,n);C.u16=n=>new tt(2,n);C.u24=n=>new tt(3,n);C.u32=n=>new tt(4,n);C.u40=n=>new tt(5,n);C.u48=n=>new tt(6,n);C.nu64=n=>new oo(n);C.u16be=n=>new ct(2,n);C.u24be=n=>new ct(3,n);C.u32be=n=>new ct(4,n);C.u40be=n=>new ct(5,n);C.u48be=n=>new ct(6,n);C.nu64be=n=>new io(n);C.s8=n=>new Vt(1,n);C.s16=n=>new Vt(2,n);C.s24=n=>new Vt(3,n);C.s32=n=>new Vt(4,n);C.s40=n=>new Vt(5,n);C.s48=n=>new Vt(6,n);C.ns64=n=>new ao(n);C.s16be=n=>new ir(2,n);C.s24be=n=>new ir(3,n);C.s32be=n=>new ir(4,n);C.s40be=n=>new ir(5,n);C.s48be=n=>new ir(6,n);C.ns64be=n=>new co(n);C.f32=n=>new uo(n);C.f32be=n=>new lo(n);C.f64=n=>new fo(n);C.f64be=n=>new ho(n);C.struct=(n,e,t)=>new po(n,e,t);C.bits=(n,e,t)=>new Dn(n,e,t);C.seq=(n,e,t)=>new _o(n,e,t);C.union=(n,e,t)=>new Bn(n,e,t);C.unionLayoutDiscriminator=(n,e)=>new Zr(n,e);C.blob=(n,e)=>new yo(n,e);C.cstr=n=>new Ro(n);C.utf8=(n,e)=>new Eo(n,e);C.constant=(n,e)=>new Ao(n,e)});function Zl(n){return Array.isArray(n)?"%5B"+n.map(Zl).join("%2C%20")+"%5D":typeof n=="bigint"?`${n}n`:encodeURIComponent(String(n!=null&&Object.getPrototypeOf(n)===null?{...n}:n))}function cA([n,e]){return`${n}=${Zl(e)}`}function uA(n){let e=Object.entries(n).map(cA).join("&");return Buffer.from(e,"utf8").toString("base64")}function fA(n,e={}){let t=lA[n];if(t.length===0)return"";let r;function o(i){if(r[xt]===2){let u=t.slice(r[Gt]+1,i);s.push(u in e?`${e[u]}`:`$${u}`)}else r[xt]===1&&s.push(t.slice(r[Gt],i))}a(o,"commitStateUpTo");let s=[];return t.split("").forEach((i,u)=>{if(u===0){r={[Gt]:0,[xt]:t[0]==="\\"?0:t[0]==="$"?2:1};return}let f;switch(r[xt]){case 0:f={[Gt]:u,[xt]:1};break;case 1:i==="\\"?f={[Gt]:u,[xt]:0}:i==="$"&&(f={[Gt]:u,[xt]:2});break;case 2:i==="\\"?f={[Gt]:u,[xt]:0}:i==="$"?f={[Gt]:u,[xt]:2}:i.match(/\w/)||(f={[Gt]:u,[xt]:1});break}f&&(r!==f&&o(u),r=f)}),o(),s.join("")}function dA(n,e={}){if(process.env.NODE_ENV!=="production")return fA(n,e);{let t=`Solana error #${n}; Decode this error by running \`npx @solana/errors decode -- ${n}`;return Object.keys(e).length&&(t+=` '${uA(e)}'`),`${t}\``}}var ug,lg,fg,dg,hg,_g,pg,mg,gg,yg,Rg,Eg,Ag,Sg,Og,bg,wg,Ng,Ig,Tg,Cg,vg,kg,Lg,xg,Pg,Bg,Dg,Ug,Mg,$g,Fg,zg,Hg,Kg,Wg,Vg,Gg,qg,jg,Yg,Xg,Jg,Zg,Qg,ey,ty,ry,ny,sy,oy,iy,ay,cy,uy,ly,fy,dy,hy,_y,py,my,gy,yy,Ry,Ey,Ay,Sy,Oy,by,wy,Ny,Iy,Ty,Cy,vy,ky,Ly,xy,Py,By,Dy,Uy,My,$y,Fy,zy,Hy,Ky,Wy,Vy,Gy,qy,jy,Yy,Xy,Jy,Zy,Qy,eR,tR,rR,nR,sR,oR,iR,aR,cR,uR,lR,fR,dR,hR,_R,pR,mR,gR,yR,RR,ER,AR,SR,OR,bR,wR,NR,IR,TR,CR,vR,kR,LR,xR,PR,BR,DR,UR,MR,$R,FR,zR,HR,KR,WR,VR,GR,qR,jR,YR,XR,JR,ZR,QR,eE,tE,rE,nE,sE,oE,iE,aE,cE,uE,lE,fE,dE,hE,_E,pE,mE,gE,yE,RE,EE,AE,SE,OE,bE,wE,NE,IE,TE,CE,vE,kE,LE,xE,PE,BE,DE,ma,ga,Gl,ql,ya,Ra,Ea,UE,ME,$E,FE,Aa,zE,jl,Yl,HE,KE,WE,VE,GE,Xl,Jl,qE,jE,YE,XE,JE,ZE,QE,eA,tA,rA,nA,sA,oA,iA,aA,lA,Gt,xt,ar,Sa=Ne(()=>{"use strict";ug=1,lg=2,fg=3,dg=4,hg=5,_g=6,pg=7,mg=8,gg=9,yg=10,Rg=-32700,Eg=-32603,Ag=-32602,Sg=-32601,Og=-32600,bg=-32016,wg=-32015,Ng=-32014,Ig=-32013,Tg=-32012,Cg=-32011,vg=-32010,kg=-32009,Lg=-32008,xg=-32007,Pg=-32006,Bg=-32005,Dg=-32004,Ug=-32003,Mg=-32002,$g=-32001,Fg=28e5,zg=2800001,Hg=2800002,Kg=2800003,Wg=2800004,Vg=2800005,Gg=2800006,qg=2800007,jg=2800008,Yg=2800009,Xg=2800010,Jg=2800011,Zg=323e4,Qg=32300001,ey=3230002,ty=3230003,ry=3230004,ny=361e4,sy=3610001,oy=3610002,iy=3610003,ay=3610004,cy=3610005,uy=3610006,ly=3610007,fy=3611e3,dy=3704e3,hy=3704001,_y=3704002,py=3704003,my=3704004,gy=4128e3,yy=4128001,Ry=4128002,Ey=4615e3,Ay=4615001,Sy=4615002,Oy=4615003,by=4615004,wy=4615005,Ny=4615006,Iy=4615007,Ty=4615008,Cy=4615009,vy=4615010,ky=4615011,Ly=4615012,xy=4615013,Py=4615014,By=4615015,Dy=4615016,Uy=4615017,My=4615018,$y=4615019,Fy=4615020,zy=4615021,Hy=4615022,Ky=4615023,Wy=4615024,Vy=4615025,Gy=4615026,qy=4615027,jy=4615028,Yy=4615029,Xy=4615030,Jy=4615031,Zy=4615032,Qy=4615033,eR=4615034,tR=4615035,rR=4615036,nR=4615037,sR=4615038,oR=4615039,iR=4615040,aR=4615041,cR=4615042,uR=4615043,lR=4615044,fR=4615045,dR=4615046,hR=4615047,_R=4615048,pR=4615049,mR=4615050,gR=4615051,yR=4615052,RR=4615053,ER=4615054,AR=5508e3,SR=5508001,OR=5508002,bR=5508003,wR=5508004,NR=5508005,IR=5508006,TR=5508007,CR=5508008,vR=5508009,kR=5508010,LR=5508011,xR=5663e3,PR=5663001,BR=5663002,DR=5663003,UR=5663004,MR=5663005,$R=5663006,FR=5663007,zR=5663008,HR=5663009,KR=5663010,WR=5663011,VR=5663012,GR=5663013,qR=5663014,jR=5663015,YR=5663016,XR=5663017,JR=5663018,ZR=5663019,QR=5663020,eE=705e4,tE=7050001,rE=7050002,nE=7050003,sE=7050004,oE=7050005,iE=7050006,aE=7050007,cE=7050008,uE=7050009,lE=7050010,fE=7050011,dE=7050012,hE=7050013,_E=7050014,pE=7050015,mE=7050016,gE=7050017,yE=7050018,RE=7050019,EE=7050020,AE=7050021,SE=7050022,OE=7050023,bE=7050024,wE=7050025,NE=7050026,IE=7050027,TE=7050028,CE=7050029,vE=7050030,kE=7050031,LE=7050032,xE=7050033,PE=7050034,BE=7050035,DE=7050036,ma=8078e3,ga=8078001,Gl=8078002,ql=8078003,ya=8078004,Ra=8078005,Ea=8078006,UE=8078007,ME=8078008,$E=8078009,FE=8078010,Aa=8078011,zE=8078012,jl=8078013,Yl=8078014,HE=8078015,KE=8078016,WE=8078017,VE=8078018,GE=8078019,Xl=8078020,Jl=8078021,qE=8078022,jE=81e5,YE=8100001,XE=8100002,JE=8100003,ZE=819e4,QE=8190001,eA=8190002,tA=8190003,rA=8190004,nA=99e5,sA=9900001,oA=9900002,iA=9900003,aA=9900004;a(Zl,"encodeValue");a(cA,"encodeObjectContextEntry");a(uA,"encodeContextObject");lA={[Zg]:"Account not found at address: $address",[ry]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[ty]:"Expected decoded account at address: $address",[ey]:"Failed to decode account data at address: $address",[Qg]:"Accounts not found at addresses: $addresses",[Yg]:"Unable to find a viable program address bump seed.",[Hg]:"$putativeAddress is not a base58-encoded address.",[Fg]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[Kg]:"The `CryptoKey` must be an `Ed25519` public key.",[Jg]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[jg]:"Invalid seeds; point must fall off the Ed25519 curve.",[Wg]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[Gg]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[qg]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[Vg]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Xg]:"Program address cannot end with PDA marker.",[zg]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[dg]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[ug]:"The network has progressed past the last block for which this transaction could have been committed.",[ma]:"Codec [$codecDescription] cannot decode empty byte arrays.",[qE]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[Xl]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[Ra]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Ea]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[ya]:"Encoder and decoder must either both be fixed-size or variable-size.",[ME]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[Gl]:"Expected a fixed-size codec, got a variable-size one.",[jl]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[ql]:"Expected a variable-size codec, got a fixed-size one.",[GE]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[ga]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[VE]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[$E]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[FE]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[HE]:"Invalid literal union variant. Expected one of [$variants], got $value.",[UE]:"Expected [$codecDescription] to have $expected items, got $actual.",[zE]:"Invalid value $value for base $base with alphabet $alphabet.",[KE]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[Aa]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Yl]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[Jl]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[WE]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[fy]:"No random values implementation could be found.",[Cy]:"instruction requires an uninitialized account",[Ky]:"instruction tries to borrow reference for an account which is already borrowed",[Wy]:"instruction left account with an outstanding borrowed reference",[zy]:"program other than the account's owner changed the size of the account data",[wy]:"account data too small for instruction",[Hy]:"instruction expected an executable account",[dR]:"An account does not have enough lamports to be rent-exempt",[_R]:"Program arithmetic overflowed",[fR]:"Failed to serialize or deserialize account data: $encodedData",[ER]:"Builtin programs must consume compute units",[Zy]:"Cross-program invocation call depth too deep",[sR]:"Computational budget exceeded",[Gy]:"custom program error: #$code",[Uy]:"instruction contains duplicate accounts",[Vy]:"instruction modifications of multiply-passed account differ",[Xy]:"executable accounts must be rent exempt",[jy]:"instruction changed executable accounts data",[Yy]:"instruction changed the balance of an executable account",[My]:"instruction changed executable bit of an account",[Py]:"instruction modified data of an account it does not own",[xy]:"instruction spent from the balance of an account it does not own",[Ay]:"generic instruction error",[mR]:"Provided owner is not allowed",[uR]:"Account is immutable",[lR]:"Incorrect authority provided",[Iy]:"incorrect program id for instruction",[Ny]:"insufficient funds for instruction",[by]:"invalid account data for instruction",[hR]:"Invalid account owner",[Sy]:"invalid program argument",[qy]:"program returned invalid error code",[Oy]:"invalid instruction data",[nR]:"Failed to reallocate account data",[rR]:"Provided seeds do not result in a valid address",[gR]:"Accounts data allocations exceeded the maximum allowed per transaction",[yR]:"Max accounts exceeded",[RR]:"Max instruction trace length exceeded",[tR]:"Length of the seed is too long for address generation",[Qy]:"An account required by the instruction is missing",[Ty]:"missing required signature for instruction",[Ly]:"instruction illegally modified the program id of an account",[Fy]:"insufficient account keys for instruction",[oR]:"Cross-program invocation with unauthorized signer or writable account",[iR]:"Failed to create program execution environment",[cR]:"Program failed to compile",[aR]:"Program failed to complete",[Dy]:"instruction modified data of a read-only account",[By]:"instruction changed the balance of a read-only account",[eR]:"Cross-program invocation reentrancy not allowed for this instruction",[$y]:"instruction modified rent epoch of an account",[ky]:"sum of account balances before and after instruction do not match",[vy]:"instruction requires an initialized account",[Ey]:"",[Jy]:"Unsupported program id",[pR]:"Unsupported sysvar",[gy]:"The instruction does not have any accounts.",[yy]:"The instruction does not have any data.",[Ry]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[hg]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[lg]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[oA]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[aA]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[sA]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[nA]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[iA]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Eg]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[Ag]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[Og]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Sg]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Rg]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[Tg]:"$__serverMessage",[$g]:"$__serverMessage",[Dg]:"$__serverMessage",[Ng]:"$__serverMessage",[vg]:"$__serverMessage",[kg]:"$__serverMessage",[bg]:"Minimum context slot has not been reached",[Bg]:"Node is unhealthy; behind by $numSlotsBehind slots",[Lg]:"No snapshot",[Mg]:"Transaction simulation failed",[xg]:"$__serverMessage",[Cg]:"Transaction history is not available from this node",[Pg]:"$__serverMessage",[Ig]:"Transaction signature length mismatch",[Ug]:"Transaction signature verification failure",[wg]:"$__serverMessage",[dy]:"Key pair bytes must be of length 64, got $byteLength.",[hy]:"Expected private key bytes with length 32. Actual length: $actualLength.",[_y]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[my]:"The provided private key does not match the provided public key.",[py]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[_g]:"Lamports value must be in the range [0, 2e64-1]",[pg]:"`$value` cannot be parsed as a `BigInt`",[yg]:"$message",[mg]:"`$value` cannot be parsed as a `Number`",[fg]:"No nonce account could be found at address `$nonceAccountAddress`",[ZE]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[eA]:"WebSocket was closed before payload could be added to the send buffer",[tA]:"WebSocket connection closed",[rA]:"WebSocket failed to connect",[QE]:"Failed to obtain a subscription id from the server",[JE]:"Could not find an API plan for RPC method: `$method`",[jE]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[XE]:"HTTP error ($statusCode): $message",[YE]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[AR]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[SR]:"The provided value does not implement the `KeyPairSigner` interface",[bR]:"The provided value does not implement the `MessageModifyingSigner` interface",[wR]:"The provided value does not implement the `MessagePartialSigner` interface",[OR]:"The provided value does not implement any of the `MessageSigner` interfaces",[IR]:"The provided value does not implement the `TransactionModifyingSigner` interface",[TR]:"The provided value does not implement the `TransactionPartialSigner` interface",[CR]:"The provided value does not implement the `TransactionSendingSigner` interface",[NR]:"The provided value does not implement any of the `TransactionSigner` interfaces",[vR]:"More than one `TransactionSendingSigner` was identified.",[kR]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[LR]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[ly]:"Cannot export a non-extractable key.",[sy]:"No digest implementation could be found.",[ny]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[oy]:`This runtime does not support the generation of Ed25519 key pairs.
3
3
 
4
4
  Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
5
5
 
@@ -258,4 +258,4 @@ buffer-layout/lib/Layout.js:
258
258
  * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}
259
259
  *)
260
260
  */
261
- //# sourceMappingURL=chunk-RWNFJKBC.js.map
261
+ //# sourceMappingURL=chunk-3UW3O4RI.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 R,C as y,E as P,G as g,W as S,X as w,Y as C,i as B,j as A,l as p,r as d,w as O,z as T}from"./chunk-57B2QEFU.js";import{a as i,e as k}from"./chunk-G5BIPHMS.js";var H={};k(H,{ERC1155BoundContractView:()=>u,ERC1155ContractView:()=>f,ERC1155Processor:()=>E,ERC1155ProcessorTemplate:()=>F,ERC1155__factory:()=>g,getERC1155Contract:()=>h,getERC1155ContractOnContext:()=>N,mockApprovalForAllLog:()=>U,mockTransferBatchLog:()=>j,mockTransferSingleLog:()=>L,mockURILog:()=>D});var l=g.connect("0x0",w),f=class extends B{static{i(this,"ERC1155ContractView")}constructor(t){super(t),this.callStatic.contract=t}async balanceOf(t,e,r,n,s){try{return await this.contract.getFunction("balanceOf(address,uint256)")(t,e,r||{})}catch(o){let c=new Error().stack;throw p(o,void 0,c)}}async balanceOfBatch(t,e,r,n,s){try{return await this.contract.getFunction("balanceOfBatch(address[],uint256[])")(t,e,r||{})}catch(o){let c=new Error().stack;throw p(o,void 0,c)}}async isApprovedForAll(t,e,r,n,s){try{return await this.contract.getFunction("isApprovedForAll(address,address)")(t,e,r||{})}catch(o){let c=new Error().stack;throw p(o,void 0,c)}}async supportsInterface(t,e,r,n){try{return await this.contract.getFunction("supportsInterface(bytes4)")(t,e||{})}catch(s){let o=new Error().stack;throw p(s,void 0,o)}}async uri(t,e,r,n){try{return await this.contract.getFunction("uri(uint256)")(t,e||{})}catch(s){let o=new Error().stack;throw p(s,void 0,o)}}callStatic={contract:this.contract,async safeBatchTransferFrom(t,e,r,n,s,o,c,I){try{return await this.contract.getFunction("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)").staticCall(t,e,r,n,s,o||{})}catch(x){let m=new Error().stack;throw p(x,void 0,m)}},async safeTransferFrom(t,e,r,n,s,o,c,I){try{return await this.contract.getFunction("safeTransferFrom(address,address,uint256,uint256,bytes)").staticCall(t,e,r,n,s,o||{})}catch(x){let m=new Error().stack;throw p(x,void 0,m)}},async setApprovalForAll(t,e,r,n,s){try{return await this.contract.getFunction("setApprovalForAll(address,bool)").staticCall(t,e,r||{})}catch(o){let c=new Error().stack;throw p(o,void 0,c)}}};encodeCall={balanceOf(t,e,r){return d(r,"balanceOf","function balanceOf(address,uint256)",[t,e])},balanceOfBatch(t,e,r){return d(r,"balanceOfBatch","function balanceOfBatch(address[],uint256[])",[t,e])},isApprovedForAll(t,e,r){return d(r,"isApprovedForAll","function isApprovedForAll(address,address)",[t,e])},safeBatchTransferFrom(t,e,r,n,s,o){return d(o,"safeBatchTransferFrom","function safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)",[t,e,r,n,s])},safeTransferFrom(t,e,r,n,s,o){return d(o,"safeTransferFrom","function safeTransferFrom(address,address,uint256,uint256,bytes)",[t,e,r,n,s])},setApprovalForAll(t,e,r){return d(r,"setApprovalForAll","function setApprovalForAll(address,bool)",[t,e])},supportsInterface(t,e){return d(e,"supportsInterface","function supportsInterface(bytes4)",[t])},uri(t,e){return d(e,"uri","function uri(uint256)",[t])}}},u=class extends A{static{i(this,"ERC1155BoundContractView")}async balanceOf(t,e,r){return await this.view.balanceOf(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}async balanceOfBatch(t,e,r){return await this.view.balanceOfBatch(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}async isApprovedForAll(t,e,r){return await this.view.isApprovedForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}async supportsInterface(t,e){return await this.view.supportsInterface(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async uri(t,e){return await this.view.uri(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}callStatic={view:this.view,context:this.context,async safeBatchTransferFrom(t,e,r,n,s,o){return await this.view.callStatic.safeBatchTransferFrom(t,e,r,n,s,{blockTag:this.context.blockNumber,...o},this.context.preparedData,this.context.getEthCallContext())},async safeTransferFrom(t,e,r,n,s,o){return await this.view.callStatic.safeTransferFrom(t,e,r,n,s,{blockTag:this.context.blockNumber,...o},this.context.preparedData,this.context.getEthCallContext())},async setApprovalForAll(t,e,r){return await this.view.callStatic.setApprovalForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}};encodeCall={view:this.view,context:this.context,balanceOf(t,e,r){return this.view.encodeCall.balanceOf(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},balanceOfBatch(t,e,r){return this.view.encodeCall.balanceOfBatch(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},isApprovedForAll(t,e,r){return this.view.encodeCall.isApprovedForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},safeBatchTransferFrom(t,e,r,n,s,o){return this.view.encodeCall.safeBatchTransferFrom(t,e,r,n,s,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(o)})},safeTransferFrom(t,e,r,n,s,o){return this.view.encodeCall.safeTransferFrom(t,e,r,n,s,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(o)})},setApprovalForAll(t,e,r){return this.view.encodeCall.setApprovalForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},supportsInterface(t,e){return this.view.encodeCall.supportsInterface(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},uri(t,e){return this.view.encodeCall.uri(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})}}},E=class a extends O{static{i(this,"ERC1155Processor")}onEventApprovalForAll(t,e,r,n){return e||(e=l.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=l.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=l.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x00fdd58e",t,e,r)}onCallBalanceOfBatch(t,e,r){return super.onEthTrace("0x4e1273f4",t,e,r)}onCallIsApprovedForAll(t,e,r){return super.onEthTrace("0xe985e9c5",t,e,r)}onCallSafeBatchTransferFrom(t,e,r){return super.onEthTrace("0x2eb2c2d6",t,e,r)}onCallSafeTransferFrom(t,e,r){return super.onEthTrace("0xf242432a",t,e,r)}onCallSetApprovalForAll(t,e,r){return super.onEthTrace("0xa22cb465",t,e,r)}onCallSupportsInterface(t,e,r){return super.onEthTrace("0x01ffc9a7",t,e,r)}onCallUri(t,e,r){return super.onEthTrace("0x0e89341c",t,e,r)}static filters={ApprovalForAll(t,e,r){return l.filters["ApprovalForAll(address,address,bool)"](t,e,r)},TransferBatch(t,e,r,n,s){return l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](t,e,r,n,s)},TransferSingle(t,e,r,n,s){return l.filters["TransferSingle(address,address,address,uint256,uint256)"](t,e,r,n,s)},URI(t,e){return l.filters["URI(string,uint256)"](t,e)}};CreateBoundContractView(){let t=h(this.config.network,this.config.address);return new u(this.config.address,t)}static bind(t){t.name||(t.name="ERC1155");let e=T(t);return e||(e=new a(t),b(t,e)),e}},F=class extends P{static{i(this,"ERC1155ProcessorTemplate")}bindInternal(t){t.name||(t.name="ERC1155");let e=T(t);return e||(e=new E(t),b(t,e)),e}onEventApprovalForAll(t,e,r,n){return e||(e=l.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=l.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=l.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}};function h(a,t){let e=R("ERC1155",t,a);if(!e){let r=g.connect(t,S(a));e=new f(r),y("ERC1155",t,a,e)}return e}i(h,"getERC1155Contract");function N(a,t){let e=h(a.getChainId(),t),r=new u(t,e);return r.context=a,r.callStatic&&(r.callStatic.context=a),r}i(N,"getERC1155ContractOnContext");import("node:process").then(a=>a.stdout.write(""));var v={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function U(a,t){let r=h(C.ETHEREUM,a).rawContract.interface.encodeEventLog("ApprovalForAll(address,address,bool)",[t.account,t.operator,t.approved]);return{...v,index:0,address:a,data:r.data,topics:r.topics}}i(U,"mockApprovalForAllLog");function j(a,t){let r=h(C.ETHEREUM,a).rawContract.interface.encodeEventLog("TransferBatch(address,address,address,uint256[],uint256[])",[t.operator,t.from,t.to,t.ids,t.values]);return{...v,index:0,address:a,data:r.data,topics:r.topics}}i(j,"mockTransferBatchLog");function L(a,t){let r=h(C.ETHEREUM,a).rawContract.interface.encodeEventLog("TransferSingle(address,address,address,uint256,uint256)",[t.operator,t.from,t.to,t.id,t.value]);return{...v,index:0,address:a,data:r.data,topics:r.topics}}i(L,"mockTransferSingleLog");function D(a,t){let r=h(C.ETHEREUM,a).rawContract.interface.encodeEventLog("URI(string,uint256)",[t.value,t.id]);return{...v,index:0,address:a,data:r.data,topics:r.topics}}i(D,"mockURILog");import("node:process").then(a=>a.stdout.write(""));import("node:process").then(a=>a.stdout.write(""));import("node:process").then(a=>a.stdout.write(""));export{f as a,u as b,E as c,F as d,h as e,N as f,U as g,j as h,L as i,D as j,H as k};
3
- //# sourceMappingURL=chunk-INM2JQXV.js.map
2
+ import{A as b,B as R,C as y,E as P,G as g,W as S,X as w,Y as C,i as B,j as A,l as p,r as d,w as O,z as T}from"./chunk-ATNNVLSV.js";import{a as i,e as k}from"./chunk-G5BIPHMS.js";var H={};k(H,{ERC1155BoundContractView:()=>u,ERC1155ContractView:()=>f,ERC1155Processor:()=>E,ERC1155ProcessorTemplate:()=>F,ERC1155__factory:()=>g,getERC1155Contract:()=>h,getERC1155ContractOnContext:()=>N,mockApprovalForAllLog:()=>U,mockTransferBatchLog:()=>j,mockTransferSingleLog:()=>L,mockURILog:()=>D});var l=g.connect("0x0",w),f=class extends B{static{i(this,"ERC1155ContractView")}constructor(t){super(t),this.callStatic.contract=t}async balanceOf(t,e,r,n,s){try{return await this.contract.getFunction("balanceOf(address,uint256)")(t,e,r||{})}catch(o){let c=new Error().stack;throw p(o,void 0,c)}}async balanceOfBatch(t,e,r,n,s){try{return await this.contract.getFunction("balanceOfBatch(address[],uint256[])")(t,e,r||{})}catch(o){let c=new Error().stack;throw p(o,void 0,c)}}async isApprovedForAll(t,e,r,n,s){try{return await this.contract.getFunction("isApprovedForAll(address,address)")(t,e,r||{})}catch(o){let c=new Error().stack;throw p(o,void 0,c)}}async supportsInterface(t,e,r,n){try{return await this.contract.getFunction("supportsInterface(bytes4)")(t,e||{})}catch(s){let o=new Error().stack;throw p(s,void 0,o)}}async uri(t,e,r,n){try{return await this.contract.getFunction("uri(uint256)")(t,e||{})}catch(s){let o=new Error().stack;throw p(s,void 0,o)}}callStatic={contract:this.contract,async safeBatchTransferFrom(t,e,r,n,s,o,c,I){try{return await this.contract.getFunction("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)").staticCall(t,e,r,n,s,o||{})}catch(x){let m=new Error().stack;throw p(x,void 0,m)}},async safeTransferFrom(t,e,r,n,s,o,c,I){try{return await this.contract.getFunction("safeTransferFrom(address,address,uint256,uint256,bytes)").staticCall(t,e,r,n,s,o||{})}catch(x){let m=new Error().stack;throw p(x,void 0,m)}},async setApprovalForAll(t,e,r,n,s){try{return await this.contract.getFunction("setApprovalForAll(address,bool)").staticCall(t,e,r||{})}catch(o){let c=new Error().stack;throw p(o,void 0,c)}}};encodeCall={balanceOf(t,e,r){return d(r,"balanceOf","function balanceOf(address,uint256)",[t,e])},balanceOfBatch(t,e,r){return d(r,"balanceOfBatch","function balanceOfBatch(address[],uint256[])",[t,e])},isApprovedForAll(t,e,r){return d(r,"isApprovedForAll","function isApprovedForAll(address,address)",[t,e])},safeBatchTransferFrom(t,e,r,n,s,o){return d(o,"safeBatchTransferFrom","function safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)",[t,e,r,n,s])},safeTransferFrom(t,e,r,n,s,o){return d(o,"safeTransferFrom","function safeTransferFrom(address,address,uint256,uint256,bytes)",[t,e,r,n,s])},setApprovalForAll(t,e,r){return d(r,"setApprovalForAll","function setApprovalForAll(address,bool)",[t,e])},supportsInterface(t,e){return d(e,"supportsInterface","function supportsInterface(bytes4)",[t])},uri(t,e){return d(e,"uri","function uri(uint256)",[t])}}},u=class extends A{static{i(this,"ERC1155BoundContractView")}async balanceOf(t,e,r){return await this.view.balanceOf(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}async balanceOfBatch(t,e,r){return await this.view.balanceOfBatch(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}async isApprovedForAll(t,e,r){return await this.view.isApprovedForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}async supportsInterface(t,e){return await this.view.supportsInterface(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async uri(t,e){return await this.view.uri(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}callStatic={view:this.view,context:this.context,async safeBatchTransferFrom(t,e,r,n,s,o){return await this.view.callStatic.safeBatchTransferFrom(t,e,r,n,s,{blockTag:this.context.blockNumber,...o},this.context.preparedData,this.context.getEthCallContext())},async safeTransferFrom(t,e,r,n,s,o){return await this.view.callStatic.safeTransferFrom(t,e,r,n,s,{blockTag:this.context.blockNumber,...o},this.context.preparedData,this.context.getEthCallContext())},async setApprovalForAll(t,e,r){return await this.view.callStatic.setApprovalForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}};encodeCall={view:this.view,context:this.context,balanceOf(t,e,r){return this.view.encodeCall.balanceOf(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},balanceOfBatch(t,e,r){return this.view.encodeCall.balanceOfBatch(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},isApprovedForAll(t,e,r){return this.view.encodeCall.isApprovedForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},safeBatchTransferFrom(t,e,r,n,s,o){return this.view.encodeCall.safeBatchTransferFrom(t,e,r,n,s,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(o)})},safeTransferFrom(t,e,r,n,s,o){return this.view.encodeCall.safeTransferFrom(t,e,r,n,s,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(o)})},setApprovalForAll(t,e,r){return this.view.encodeCall.setApprovalForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},supportsInterface(t,e){return this.view.encodeCall.supportsInterface(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},uri(t,e){return this.view.encodeCall.uri(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})}}},E=class a extends O{static{i(this,"ERC1155Processor")}onEventApprovalForAll(t,e,r,n){return e||(e=l.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=l.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=l.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x00fdd58e",t,e,r)}onCallBalanceOfBatch(t,e,r){return super.onEthTrace("0x4e1273f4",t,e,r)}onCallIsApprovedForAll(t,e,r){return super.onEthTrace("0xe985e9c5",t,e,r)}onCallSafeBatchTransferFrom(t,e,r){return super.onEthTrace("0x2eb2c2d6",t,e,r)}onCallSafeTransferFrom(t,e,r){return super.onEthTrace("0xf242432a",t,e,r)}onCallSetApprovalForAll(t,e,r){return super.onEthTrace("0xa22cb465",t,e,r)}onCallSupportsInterface(t,e,r){return super.onEthTrace("0x01ffc9a7",t,e,r)}onCallUri(t,e,r){return super.onEthTrace("0x0e89341c",t,e,r)}static filters={ApprovalForAll(t,e,r){return l.filters["ApprovalForAll(address,address,bool)"](t,e,r)},TransferBatch(t,e,r,n,s){return l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](t,e,r,n,s)},TransferSingle(t,e,r,n,s){return l.filters["TransferSingle(address,address,address,uint256,uint256)"](t,e,r,n,s)},URI(t,e){return l.filters["URI(string,uint256)"](t,e)}};CreateBoundContractView(){let t=h(this.config.network,this.config.address);return new u(this.config.address,t)}static bind(t){t.name||(t.name="ERC1155");let e=T(t);return e||(e=new a(t),b(t,e)),e}},F=class extends P{static{i(this,"ERC1155ProcessorTemplate")}bindInternal(t){t.name||(t.name="ERC1155");let e=T(t);return e||(e=new E(t),b(t,e)),e}onEventApprovalForAll(t,e,r,n){return e||(e=l.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=l.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=l.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}};function h(a,t){let e=R("ERC1155",t,a);if(!e){let r=g.connect(t,S(a));e=new f(r),y("ERC1155",t,a,e)}return e}i(h,"getERC1155Contract");function N(a,t){let e=h(a.getChainId(),t),r=new u(t,e);return r.context=a,r.callStatic&&(r.callStatic.context=a),r}i(N,"getERC1155ContractOnContext");import("node:process").then(a=>a.stdout.write(""));var v={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function U(a,t){let r=h(C.ETHEREUM,a).rawContract.interface.encodeEventLog("ApprovalForAll(address,address,bool)",[t.account,t.operator,t.approved]);return{...v,index:0,address:a,data:r.data,topics:r.topics}}i(U,"mockApprovalForAllLog");function j(a,t){let r=h(C.ETHEREUM,a).rawContract.interface.encodeEventLog("TransferBatch(address,address,address,uint256[],uint256[])",[t.operator,t.from,t.to,t.ids,t.values]);return{...v,index:0,address:a,data:r.data,topics:r.topics}}i(j,"mockTransferBatchLog");function L(a,t){let r=h(C.ETHEREUM,a).rawContract.interface.encodeEventLog("TransferSingle(address,address,address,uint256,uint256)",[t.operator,t.from,t.to,t.id,t.value]);return{...v,index:0,address:a,data:r.data,topics:r.topics}}i(L,"mockTransferSingleLog");function D(a,t){let r=h(C.ETHEREUM,a).rawContract.interface.encodeEventLog("URI(string,uint256)",[t.value,t.id]);return{...v,index:0,address:a,data:r.data,topics:r.topics}}i(D,"mockURILog");import("node:process").then(a=>a.stdout.write(""));import("node:process").then(a=>a.stdout.write(""));import("node:process").then(a=>a.stdout.write(""));export{f as a,u as b,E as c,F as d,h as e,N as f,U as g,j as h,L as i,D as j,H as k};
3
+ //# sourceMappingURL=chunk-3XOMJPOV.js.map