@wormhole-foundation/wormhole-connect 2.1.0-beta.4-development → 2.1.0

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 (77) hide show
  1. package/dist/main.js +1 -1
  2. package/lib/{aptos-zuWdA6my.mjs → aptos-BqK7cMly.mjs} +2 -2
  3. package/lib/{aptos-otpuaKYt.js → aptos-C7pCAbUg.js} +2 -2
  4. package/lib/{aptos-CE1z5RIR.js → aptos-DYNyya4r.js} +1 -1
  5. package/lib/{aptos-7bfFeMdP.mjs → aptos-hNRlQB2L.mjs} +5 -5
  6. package/lib/{base64-k-Os5ldO.mjs → base64-BVPj2zYr.mjs} +1 -1
  7. package/lib/{base64-kjIpMcmW.js → base64-KSl9zI2U.js} +1 -1
  8. package/lib/{ccip-Bap8XFZB.mjs → ccip-B6vHFB5O.mjs} +1 -1
  9. package/lib/{ccip-BWC0vPMX.js → ccip-zobR3MWX.js} +1 -1
  10. package/lib/{chunk-IMTC3J2M-CpYue-QB.js → chunk-IMTC3J2M-Clcv-kNR.js} +1 -1
  11. package/lib/{chunk-IMTC3J2M-BXX6zaqr.mjs → chunk-IMTC3J2M-D7LWAYQa.mjs} +3 -3
  12. package/lib/{events-BYQcWm6S.mjs → events-FSoXRy3T.mjs} +1 -1
  13. package/lib/{events-CpvDCRB6.js → events-bGzCAvB8.js} +1 -1
  14. package/lib/{evm-BqioDqJQ.mjs → evm-BLO6Qv4a.mjs} +5 -5
  15. package/lib/{evm-CnzdN7DL.js → evm-CG-xuonQ.js} +3 -3
  16. package/lib/{evm-Mwom3m1b.mjs → evm-CN1iRHbr.mjs} +5 -5
  17. package/lib/{evm-D_gq6Vkl.js → evm-DYzdDx7h.js} +1 -1
  18. package/lib/{index-Y446HRy8.js → index--GEXYLpJ.js} +1 -1
  19. package/lib/{index-DXxwhxlz.mjs → index-0sRAi_-E.mjs} +23111 -23110
  20. package/lib/{index-C8kUlYxX.mjs → index-B4iVrVli.mjs} +2 -2
  21. package/lib/{index-WOTkpZNS.js → index-B5H5W-MP.js} +145 -145
  22. package/lib/{index-H9KqFgmp.js → index-BDTERphb.js} +1 -1
  23. package/lib/{index-BWUeb28M.mjs → index-BK9yAEqb.mjs} +2 -2
  24. package/lib/{index-qKiBJqxf.mjs → index-Ba7hi5Nv.mjs} +2 -2
  25. package/lib/{index-CPZPv8ma.js → index-Bb1cX9pM.js} +1 -1
  26. package/lib/{index-Ck2lgHfH.mjs → index-BdpPXZHn.mjs} +2 -2
  27. package/lib/{index-C8uhXGvb.js → index-BnZRt2Rd.js} +1 -1
  28. package/lib/{index-C5Z4SKFb.js → index-Bu6Mzk1B.js} +1 -1
  29. package/lib/{index-B9GJ0P2Y.js → index-BwcOlw60.js} +1 -1
  30. package/lib/{index-nmuj3_P0.mjs → index-BxEy7t5U.mjs} +2 -2
  31. package/lib/{index-D4D9pisy.mjs → index-BztaZVVL.mjs} +2 -2
  32. package/lib/{index-CsvfK_04.js → index-C-Fyx20B.js} +1 -1
  33. package/lib/{index-CQ-vXwWG.js → index-CEyJtiJA.js} +1 -1
  34. package/lib/{index-BNu2XU7B.js → index-CIr2v4IG.js} +1 -1
  35. package/lib/{index-BrLmYS1g.js → index-CtaGVEFZ.js} +1 -1
  36. package/lib/{index-BGh4lL9A.mjs → index-D1_1z7Wk.mjs} +1 -1
  37. package/lib/{index-LRbQsraN.js → index-D27hH8sY.js} +1 -1
  38. package/lib/{index-CpquIcpv.js → index-D75bWNLu.js} +1 -1
  39. package/lib/{index-CWeUuvwd.js → index-D8RCiuJ0.js} +1 -1
  40. package/lib/{index-BDfVMafv.js → index-DGrbzOIm.js} +1 -1
  41. package/lib/{index-CNrMl-ka.mjs → index-DI6kRBN0.mjs} +5 -5
  42. package/lib/{index-BNmhIn8v.mjs → index-DJMHyNjD.mjs} +2 -2
  43. package/lib/{index-DYSyjZam.mjs → index-DK3F1NhB.mjs} +4 -4
  44. package/lib/{index-DLMhM2Ah.mjs → index-DVHcJTqD.mjs} +1 -1
  45. package/lib/{index-iQUhiTbf.js → index-D_LeK8MJ.js} +1 -1
  46. package/lib/{index-CLjMuc-R.mjs → index-DcrVBUpc.mjs} +1 -1
  47. package/lib/{index-Bb7Z_dn3.mjs → index-DdL20a7t.mjs} +2 -2
  48. package/lib/{index-Dn17pEx3.js → index-DqmfSmiO.js} +1 -1
  49. package/lib/{index-DUMDc9-8.js → index-IzqkKy3R.js} +1 -1
  50. package/lib/{index-B_z7jrcA.mjs → index-O6PU89nP.mjs} +2 -2
  51. package/lib/{index-C2xA6weJ.mjs → index-QgCTXUa6.mjs} +3 -3
  52. package/lib/{index-BGk8Lib3.js → index-QtOAv51B.js} +1 -1
  53. package/lib/{index-is9vbRk6.js → index-gn107iCo.js} +1 -1
  54. package/lib/{index-DvaQAdrQ.mjs → index-grCrWNvp.mjs} +1 -1
  55. package/lib/{index-B887bVqe.js → index-iaMEYhF5.js} +1 -1
  56. package/lib/{index-Dv_PN2YS.mjs → index-nCiFssoC.mjs} +1 -1
  57. package/lib/{index-SpRjE-lR.mjs → index-xTX46Yw9.mjs} +1 -1
  58. package/lib/{index-D5xdeVYW.mjs → index-yt4URWzh.mjs} +1 -1
  59. package/lib/{index-CgLcGLhQ.mjs → index-zb82e-lE.mjs} +3 -3
  60. package/lib/{index.es-DaKST-Tu.js → index.es-DCYCSMuK.js} +2 -2
  61. package/lib/{index.es-XELuGQ1v.mjs → index.es-ffyJdlAz.mjs} +6 -6
  62. package/lib/index.js +1 -1
  63. package/lib/index.mjs +1 -1
  64. package/lib/{signer-CBkcr0G7.mjs → signer-BBbBI9Ch.mjs} +1 -1
  65. package/lib/{signer-C8BdcDph.js → signer-C8bS-IbV.js} +1 -1
  66. package/lib/{solana-BT0u9BIk.mjs → solana-7uRxf9WX.mjs} +5 -5
  67. package/lib/{solana-Dp3nxJ5I.js → solana-BVyz5H3z.js} +1 -1
  68. package/lib/{solana-DZJoFr_V.mjs → solana-BfVL9dAW.mjs} +4 -4
  69. package/lib/solana-DPZR_Eze.js +1 -0
  70. package/lib/{solanaEmbed.esm-DyCdC9Bf.mjs → solanaEmbed.esm-BXeUQQ1f.mjs} +2 -2
  71. package/lib/{solanaEmbed.esm-Dmb33sr2.js → solanaEmbed.esm-BylLsCAU.js} +1 -1
  72. package/lib/{sui-CGplq_XL.js → sui-BcGOZHgb.js} +1 -1
  73. package/lib/{sui-Dn893IB9.mjs → sui-CBeaWzBm.mjs} +1 -1
  74. package/lib/{sui-B8eP92oc.mjs → sui-NQaMhA2C.mjs} +5 -5
  75. package/lib/{sui-K4_elpRl.js → sui-fKD7sV9G.js} +2 -2
  76. package/package.json +1 -1
  77. package/lib/solana-B4bIzZfk.js +0 -1
@@ -1 +1 @@
1
- "use strict";var v=Object.defineProperty;var y=(b,e,t)=>e in b?v(b,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):b[e]=t;var i=(b,e,t)=>y(b,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./chunk-IMTC3J2M-CpYue-QB.js"),c=require("./index-WOTkpZNS.js"),k=require("./aptos-otpuaKYt.js"),M=require("./unsignedTransaction-C1YeEl4G.js"),x=[["Mainnet",{depositForBurn:"0xa11ceb0b0700000a0701000802080e031614042a04052e30075e870108e5014000000001000201030004000001050701000100060b0001070304010801020805060108010309080900010002010205060c030e05050208000b010108020108020105010b0101090003060c0b01010900030108000004060c08000e0501030e66756e6769626c655f6173736574066f626a656374167072696d6172795f66756e6769626c655f73746f72650f746f6b656e5f6d657373656e6765720d46756e6769626c654173736574064f626a656374084d6574616461746111616464726573735f746f5f6f626a656374087769746864726177106465706f7369745f666f725f6275726e00000000000000000000000000000000000000000000000000000000000000019bce6734f7b63e835108e3bd8c36743d4709fe435f44791918801d0989640a9d0000010f0b0438000c060a000b060b0138010c050b000b050b020b0311020102",handleReceiveMessage:"0xa11ceb0b0700000a0601000402040403080c051416072a53087d40000001010002000000030203000101040304000103060c0a020a020003060c060a02060a020108000101136d6573736167655f7472616e736d69747465720f746f6b656e5f6d657373656e67657207526563656970740f726563656976655f6d6573736167651668616e646c655f726563656976655f6d657373616765177e17751820e4b4371873ca8c30279be63bdea63b88ed0f2239c2eea10f17729bce6734f7b63e835108e3bd8c36743d4709fe435f44791918801d0989640a9d000001070b000e010e02110011010102"}],["Testnet",{depositForBurn:"0xa11ceb0b0700000a0701000802080e031614042a04052e30075e870108e5014000000001000201030004000001050701000100060b0001070304010801020805060108010309080900010002010205060c030e05050208000b010108020108020105010b0101090003060c0b01010900030108000004060c08000e0501030e66756e6769626c655f6173736574066f626a656374167072696d6172795f66756e6769626c655f73746f72650f746f6b656e5f6d657373656e6765720d46756e6769626c654173736574064f626a656374084d6574616461746111616464726573735f746f5f6f626a656374087769746864726177106465706f7369745f666f725f6275726e00000000000000000000000000000000000000000000000000000000000000015f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b90000010f0b0438000c060a000b060b0138010c050b000b050b020b0311020102",handleReceiveMessage:"0xa11ceb0b0700000a0601000402040403080c051416072a53087d40000001010002000000030203000101040304000103060c0a020a020003060c060a02060a020108000101136d6573736167655f7472616e736d69747465720f746f6b656e5f6d657373656e67657207526563656970740f726563656976655f6d6573736167651668616e646c655f726563656976655f6d657373616765081e86cebf457a0c6004f35bd648a2794698f52e0dde09a48619dcd3d4cc23d95f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b9000001070b000e010e02110011010102"}]],u=c.constMap(x,[0,1]);class h{constructor(e,t,n,s){i(this,"network");i(this,"chain");i(this,"provider");i(this,"contracts");i(this,"usdcId");i(this,"tokenMessengerId");i(this,"messageTransmitterId");i(this,"moveScripts");var a,f,o;if(this.network=e,this.chain=t,this.provider=n,this.contracts=s,e==="Devnet")throw new Error("CircleBridge not supported on Devnet");const r=c.usdcContract.get(this.network,this.chain);if(!r)throw new Error(`No USDC contract configured for network=${this.network} chain=${this.chain}`);if(!((a=s.cctp)!=null&&a.tokenMessenger))throw new Error(`Circle Token Messenger contract for domain ${t} not found`);if(!((f=s.cctp)!=null&&f.messageTransmitter))throw new Error(`Circle Message Transmitter contract for domain ${t} not found`);if(!u.has(e))throw new Error("No Aptos CCTP move scripts found");this.usdcId=r,this.tokenMessengerId=(o=s.cctp)==null?void 0:o.tokenMessenger,this.messageTransmitterId=s.cctp.messageTransmitter,this.moveScripts=u.get(e)}async*transfer(e,t,n){const s=new d.y$2(c.circleChainId.get(this.network,t.chain)),r=d.l.from(this.usdcId),a=d.l.from(t.address.toUniversalAddress().toUint8Array()),f=[new d.m$1(n),s,a,r],o={bytecode:this.moveScripts.depositForBurn,functionArguments:f};yield this.createUnsignedTx(o,"Aptos.CircleBridge.Transfer")}async isTransferCompleted(e){const t=new d.y$2(e.sourceDomain).bcsToBytes(),n=new d.m$1(e.nonce).bcsToBytes(),s=c.keccak_256(new Uint8Array([...t,45,...n])),r=c.hex.encode(s);return(await this.provider.view({payload:{function:`${this.messageTransmitterId}::message_transmitter::is_nonce_used`,functionArguments:[r]}}))[0]}async*redeem(e,t,n){const s=[d.t$4.U8(c.CircleBridge.serialize(t)),d.t$4.U8(c.hex.decode(n))],r={bytecode:this.moveScripts.handleReceiveMessage,functionArguments:s};yield this.createUnsignedTx(r,"Aptos.CircleBridge.Redeem")}async parseTransactionDetails(e){var g;const t=await this.provider.getTransactionByHash({transactionHash:e}),n=this.messageTransmitterId.replace(/^0x0+/,"0x"),s=(g=t.events)==null?void 0:g.find(C=>C.type===`${n}::message_transmitter::MessageSent`);if(!s)throw new Error("No MessageSent event found");const r=c.hex.decode(s.data.message),[a,f]=c.CircleBridge.deserialize(r),{payload:o}=a,p=o.messageSender,l=o.mintRecipient,m=c.toCircleChain(this.network,a.sourceDomain),w=c.toCircleChain(this.network,a.destinationDomain),T={chain:m,address:o.burnToken};return{from:{chain:m,address:p},to:{chain:w,address:l},token:T,amount:o.amount,message:a,id:{hash:f}}}static async fromRpc(e,t){const[n,s]=await k.AptosPlatform.chainFromRpc(e),r=t[s];if(r.network!==n)throw new Error(`Network mismatch: ${r.network} != ${n}`);return new h(n,s,e,r.contracts)}createUnsignedTx(e,t,n=!1){return new M.AptosUnsignedTransaction(e,this.network,this.chain,t,n)}}c.registerProtocol("Aptos","CircleBridge",h);exports.AptosCircleBridge=h;
1
+ "use strict";var v=Object.defineProperty;var y=(b,e,t)=>e in b?v(b,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):b[e]=t;var i=(b,e,t)=>y(b,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./chunk-IMTC3J2M-Clcv-kNR.js"),c=require("./index-B5H5W-MP.js"),k=require("./aptos-C7pCAbUg.js"),M=require("./unsignedTransaction-C1YeEl4G.js"),x=[["Mainnet",{depositForBurn:"0xa11ceb0b0700000a0701000802080e031614042a04052e30075e870108e5014000000001000201030004000001050701000100060b0001070304010801020805060108010309080900010002010205060c030e05050208000b010108020108020105010b0101090003060c0b01010900030108000004060c08000e0501030e66756e6769626c655f6173736574066f626a656374167072696d6172795f66756e6769626c655f73746f72650f746f6b656e5f6d657373656e6765720d46756e6769626c654173736574064f626a656374084d6574616461746111616464726573735f746f5f6f626a656374087769746864726177106465706f7369745f666f725f6275726e00000000000000000000000000000000000000000000000000000000000000019bce6734f7b63e835108e3bd8c36743d4709fe435f44791918801d0989640a9d0000010f0b0438000c060a000b060b0138010c050b000b050b020b0311020102",handleReceiveMessage:"0xa11ceb0b0700000a0601000402040403080c051416072a53087d40000001010002000000030203000101040304000103060c0a020a020003060c060a02060a020108000101136d6573736167655f7472616e736d69747465720f746f6b656e5f6d657373656e67657207526563656970740f726563656976655f6d6573736167651668616e646c655f726563656976655f6d657373616765177e17751820e4b4371873ca8c30279be63bdea63b88ed0f2239c2eea10f17729bce6734f7b63e835108e3bd8c36743d4709fe435f44791918801d0989640a9d000001070b000e010e02110011010102"}],["Testnet",{depositForBurn:"0xa11ceb0b0700000a0701000802080e031614042a04052e30075e870108e5014000000001000201030004000001050701000100060b0001070304010801020805060108010309080900010002010205060c030e05050208000b010108020108020105010b0101090003060c0b01010900030108000004060c08000e0501030e66756e6769626c655f6173736574066f626a656374167072696d6172795f66756e6769626c655f73746f72650f746f6b656e5f6d657373656e6765720d46756e6769626c654173736574064f626a656374084d6574616461746111616464726573735f746f5f6f626a656374087769746864726177106465706f7369745f666f725f6275726e00000000000000000000000000000000000000000000000000000000000000015f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b90000010f0b0438000c060a000b060b0138010c050b000b050b020b0311020102",handleReceiveMessage:"0xa11ceb0b0700000a0601000402040403080c051416072a53087d40000001010002000000030203000101040304000103060c0a020a020003060c060a02060a020108000101136d6573736167655f7472616e736d69747465720f746f6b656e5f6d657373656e67657207526563656970740f726563656976655f6d6573736167651668616e646c655f726563656976655f6d657373616765081e86cebf457a0c6004f35bd648a2794698f52e0dde09a48619dcd3d4cc23d95f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b9000001070b000e010e02110011010102"}]],u=c.constMap(x,[0,1]);class h{constructor(e,t,n,s){i(this,"network");i(this,"chain");i(this,"provider");i(this,"contracts");i(this,"usdcId");i(this,"tokenMessengerId");i(this,"messageTransmitterId");i(this,"moveScripts");var a,f,o;if(this.network=e,this.chain=t,this.provider=n,this.contracts=s,e==="Devnet")throw new Error("CircleBridge not supported on Devnet");const r=c.usdcContract.get(this.network,this.chain);if(!r)throw new Error(`No USDC contract configured for network=${this.network} chain=${this.chain}`);if(!((a=s.cctp)!=null&&a.tokenMessenger))throw new Error(`Circle Token Messenger contract for domain ${t} not found`);if(!((f=s.cctp)!=null&&f.messageTransmitter))throw new Error(`Circle Message Transmitter contract for domain ${t} not found`);if(!u.has(e))throw new Error("No Aptos CCTP move scripts found");this.usdcId=r,this.tokenMessengerId=(o=s.cctp)==null?void 0:o.tokenMessenger,this.messageTransmitterId=s.cctp.messageTransmitter,this.moveScripts=u.get(e)}async*transfer(e,t,n){const s=new d.y$2(c.circleChainId.get(this.network,t.chain)),r=d.l.from(this.usdcId),a=d.l.from(t.address.toUniversalAddress().toUint8Array()),f=[new d.m$1(n),s,a,r],o={bytecode:this.moveScripts.depositForBurn,functionArguments:f};yield this.createUnsignedTx(o,"Aptos.CircleBridge.Transfer")}async isTransferCompleted(e){const t=new d.y$2(e.sourceDomain).bcsToBytes(),n=new d.m$1(e.nonce).bcsToBytes(),s=c.keccak_256(new Uint8Array([...t,45,...n])),r=c.hex.encode(s);return(await this.provider.view({payload:{function:`${this.messageTransmitterId}::message_transmitter::is_nonce_used`,functionArguments:[r]}}))[0]}async*redeem(e,t,n){const s=[d.t$4.U8(c.CircleBridge.serialize(t)),d.t$4.U8(c.hex.decode(n))],r={bytecode:this.moveScripts.handleReceiveMessage,functionArguments:s};yield this.createUnsignedTx(r,"Aptos.CircleBridge.Redeem")}async parseTransactionDetails(e){var g;const t=await this.provider.getTransactionByHash({transactionHash:e}),n=this.messageTransmitterId.replace(/^0x0+/,"0x"),s=(g=t.events)==null?void 0:g.find(C=>C.type===`${n}::message_transmitter::MessageSent`);if(!s)throw new Error("No MessageSent event found");const r=c.hex.decode(s.data.message),[a,f]=c.CircleBridge.deserialize(r),{payload:o}=a,p=o.messageSender,l=o.mintRecipient,m=c.toCircleChain(this.network,a.sourceDomain),w=c.toCircleChain(this.network,a.destinationDomain),T={chain:m,address:o.burnToken};return{from:{chain:m,address:p},to:{chain:w,address:l},token:T,amount:o.amount,message:a,id:{hash:f}}}static async fromRpc(e,t){const[n,s]=await k.AptosPlatform.chainFromRpc(e),r=t[s];if(r.network!==n)throw new Error(`Network mismatch: ${r.network} != ${n}`);return new h(n,s,e,r.contracts)}createUnsignedTx(e,t,n=!1){return new M.AptosUnsignedTransaction(e,this.network,this.chain,t,n)}}c.registerProtocol("Aptos","CircleBridge",h);exports.AptosCircleBridge=h;
@@ -1,6 +1,6 @@
1
- import { s as ce, T as N, o as ot, n as _t, R as Do, t as H, y as gt, a as C, p as K } from "./index-SpRjE-lR.mjs";
1
+ import { s as ce, T as N, o as ot, n as _t, R as Do, t as H, y as gt, a as C, p as K } from "./index-xTX46Yw9.mjs";
2
2
  import { d as Uo } from "./dijkstra-BZM-8g-B.mjs";
3
- import { V as Wo } from "./index-DXxwhxlz.mjs";
3
+ import { V as Wo } from "./index-0sRAi_-E.mjs";
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2019 Google LLC
@@ -1,8 +1,8 @@
1
1
  var Er = Object.defineProperty;
2
2
  var xr = (e, t, r) => t in e ? Er(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var F = (e, t, r) => xr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { X as jr, y as Ir, cj as Or, bw as Ar, bu as kr, bv as Bt, r as _r, bx as Rt, bj as Cr } from "./index-DXxwhxlz.mjs";
5
- import { S as Nt, u as Pt } from "./sui-B8eP92oc.mjs";
4
+ import { X as jr, y as Ir, cj as Or, bw as Ar, bu as kr, bv as Bt, r as _r, bx as Rt, bj as Cr } from "./index-0sRAi_-E.mjs";
5
+ import { S as Nt, u as Pt } from "./sui-NQaMhA2C.mjs";
6
6
  import { S as $r } from "./unsignedTransaction-BD81leu1.mjs";
7
7
  class Mr extends TypeError {
8
8
  constructor(t, r) {
@@ -1,4 +1,4 @@
1
- "use strict";var xr=Object.defineProperty;var Br=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var D=(t,e,r)=>Br(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index-WOTkpZNS.js"),b=require("./sui-K4_elpRl.js");require("./index-B887bVqe.js");const Ht=require("./unsignedTransaction-DzSLsK-p.js");class Cr extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...c}=e,{path:a}=e,o=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??o),s!=null&&(this.cause=o),Object.assign(this,c),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function $r(t){return K(t)&&typeof t[Symbol.iterator]=="function"}function K(t){return typeof t=="object"&&t!=null}function J(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Ur(t){const{done:e,value:r}=t.next();return e?void 0:r}function Pr(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:c}=r,{refinement:a,message:o=`Expected a value of type \`${c}\`${a?` with refinement \`${a}\``:""}, but received: \`${J(n)}\``}=t;return{value:n,type:c,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:o}}function*Lt(t,e,r,n){$r(t)||(t=[t]);for(const i of t){const s=Pr(i,e,r,n);s&&(yield s)}}function*lt(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:c=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),c&&e.type!=="type"&&K(e.schema)&&K(t)&&!Array.isArray(t)))for(const d in t)e.schema[d]===void 0&&delete t[d];let o="valid";for(const d of e.validator(t,a))d.explanation=r.message,o="not_valid",yield[d,void 0];for(let[d,u,h]of e.entries(t,a)){const m=lt(u,h,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,u],coerce:s,mask:c,message:r.message});for(const y of m)y[0]?(o=y[0].refinement!=null?"not_refined":"not_valid",yield[y[0],void 0]):s&&(u=y[1],d===void 0?t=u:t instanceof Map?t.set(d,u):t instanceof Set?t.add(u):K(t)&&(u!==void 0||d in t)&&(t[d]=u))}if(o!=="not_valid")for(const d of e.refiner(t,a))d.explanation=r.message,o="not_refined",yield[d,void 0];o==="valid"&&(yield[void 0,t])}class te{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:c=o=>o,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=c,i?this.validator=(o,d)=>{const u=i(o,d);return Lt(u,d,this,o)}:this.validator=()=>[],s?this.refiner=(o,d)=>{const u=s(o,d);return Lt(u,d,this,o)}:this.refiner=()=>[]}assert(e,r){return nt(e,this,r)}create(e,r){return Xt(e,this,r)}is(e){return L(e,this)}mask(e,r){return Zt(e,this,r)}validate(e,r={}){return _e(e,this,r)}}function nt(t,e,r){const n=_e(t,e,{message:r});if(n[0])throw n[0]}function Xt(t,e,r){const n=_e(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Zt(t,e,r){const n=_e(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function L(t,e){return!_e(t,e)[0]}function _e(t,e,r={}){const n=lt(t,e,r),i=Ur(n);return i[0]?[new Cr(i[0],function*(){for(const c of n)c[0]&&(yield c[0])}),void 0]:[void 0,i[1]]}function je(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?Rr(n):p(n)}function W(t,e){return new te({type:t,schema:null,validator:e})}function it(){return W("any",()=>!0)}function E(t){return new te({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${J(e)}`}})}function Mr(){return W("bigint",t=>typeof t=="bigint")}function z(){return W("boolean",t=>typeof t=="boolean")}function ee(){return W("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${J(t)}`)}function k(t){const e=J(t),r=typeof t;return new te({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${J(n)}`}})}function Yt(){return W("never",()=>!1)}function $(t){return new te({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function ge(){return W("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${J(t)}`)}function p(t){const e=t?Object.keys(t):[],r=Yt();return new te({type:"object",schema:t||null,*entries(n){if(t&&K(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return K(n)||`Expected an object, but received: ${J(n)}`},coercer(n){return K(n)?{...n}:n}})}function v(t){return new te({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Q(t,e){return new te({type:"record",schema:null,*entries(r){if(K(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`}})}function g(){return W("string",t=>typeof t=="string"||`Expected a string, but received: ${J(t)}`)}function Qt(t){const e=Yt();return new te({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${J(r)}`}})}function Rr(t){const e=Object.keys(t);return new te({type:"type",schema:t,*entries(r){if(K(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`},coercer(r){return K(r)?{...r}:r}})}function U(t){const e=t.map(r=>r.type).join(" | ");return new te({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...c]=lt(r,s,n),[a]=c;if(a[0])for(const[o]of c)o&&i.push(o);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${J(r)}`,...i]}})}function er(){return W("unknown",()=>!0)}const ft=U([p({AddressOwner:g()}),p({ObjectOwner:g()}),p({Shared:p({initial_shared_version:$(g())})}),k("Immutable")]);W("SuiJsonValue",()=>!0);const Nr=U([p({u32:g()}),p({u64:g()}),p({f64:g()})]);p({attributes:Q(g(),$(Nr)),featureFlags:Q(g(),z()),maxSupportedProtocolVersion:g(),minSupportedProtocolVersion:g(),protocolVersion:g()});U([g(),k("package")]);const ce=p({digest:g(),objectId:g(),version:U([ge(),g(),Mr()])});p({owner:ft,reference:ce});p({objectId:g(),sequenceNumber:g()});p({payment:E(ce),owner:g(),price:g(),budget:g()});const Dr=je(ce,p({type:g(),owner:ft,previousTransaction:g()})),Vr=Q(g(),it()),zr=Q(g(),er()),Fr=p({type:g(),fields:Vr,hasPublicTransfer:z()}),Gr=p({disassembled:zr}),Lr=U([je(Fr,p({dataType:k("moveObject")})),je(Gr,p({dataType:k("package")}))]),Wr=p({type:g(),hasPublicTransfer:z(),version:g(),bcsBytes:g()}),Kr=p({id:g(),moduleMap:Q(g(),g())}),Jr=U([je(Wr,p({dataType:k("moveObject")})),je(Kr,p({dataType:k("package")}))]);BigInt(1e9);const tr=p({code:g(),error:v(g()),object_id:v(g()),parent_object_id:v(g()),version:v(g()),digest:v(g())}),qr=p({data:$(v(Q(g(),g()))),error:$(v(tr))}),Hr=U([qr,v(Q(g(),g()))]),rr=p({objectId:g(),version:g(),digest:g(),type:$(v(g())),content:$(v(Lr)),bcs:$(v(Jr)),owner:$(v(ft)),previousTransaction:$(v(g())),storageRebate:$(v(g())),display:$(v(Hr))});p({showType:$(v(z())),showContent:$(v(z())),showBcs:$(v(z())),showOwner:$(v(z())),showPreviousTransaction:$(v(z())),showStorageRebate:$(v(z())),showDisplay:$(v(z()))});U([k("Exists"),k("notExists"),k("Deleted")]);E(Dr);const Xr=p({data:$(v(rr)),error:$(v(tr))});function Zr(t){return t.data}function Yr(t){if(t.error&&"object_id"in t.error&&"version"in t.error&&"digest"in t.error){const e=t.error;return{objectId:e.object_id,version:e.version,digest:e.digest}}}function Wt(t){if("reference"in t)return t.reference;const e=Zr(t);return e?{objectId:e.objectId,version:e.version,digest:e.digest}:Yr(t)}p({objectId:g(),atCheckpoint:v(ge())});p({data:E(Xr),nextCursor:v($(g())),hasNextPage:z()});U([p({details:rr,status:k("VersionFound")}),p({details:g(),status:k("ObjectNotExists")}),p({details:ce,status:k("ObjectDeleted")}),p({details:Qt([g(),ge()]),status:k("VersionNotFound")}),p({details:p({asked_version:ge(),latest_version:ge(),object_id:g()}),status:k("VersionTooHigh")})]);const Qr=U([g(),p({Object:g()})]);E(Qr);const en=p({address:g(),name:g()}),tn=U([k("Private"),k("Public"),k("Friend")]),gt=p({abilities:E(g())}),rn=p({constraints:gt,isPhantom:z()}),nn=p({TypeParameter:ge()}),Xe=Qt([p({module:g(),package:g(),function:g()}),g()]);p({rank3Days:E(Xe),rank7Days:E(Xe),rank30Days:E(Xe)});function nr(t){if(!t)return!1;if(typeof t=="string"||L(t,nn)||ir(t))return!0;if(typeof t!="object")return!1;const e=t;return!!(L(e.Reference,me)||L(e.MutableReference,me)||L(e.Vector,me))}const me=W("SuiMoveNormalizedType",nr);function ir(t){if(!t||typeof t!="object")return!1;const e=t;if(!e.Struct||typeof e.Struct!="object")return!1;const r=e.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>nr(n)))}W("SuiMoveNormalizedStructType",ir);const sn=p({visibility:tn,isEntry:z(),typeParameters:E(gt),parameters:E(me),return:E(me)}),an=p({name:g(),type:me}),on=p({abilities:gt,typeParameters:E(rn),fields:E(an)}),cn=p({fileFormatVersion:ge(),address:g(),name:g(),friends:E(en),structs:Q(g(),on),exposedFunctions:Q(g(),sn)});Q(g(),cn);function st(t){return typeof t=="object"&&"MutableReference"in t?t.MutableReference:void 0}function sr(t){return typeof t=="object"&&"Reference"in t?t.Reference:void 0}function ht(t){if(typeof t=="object"&&"Struct"in t)return t;const e=sr(t),r=st(t);if(typeof e=="object"&&"Struct"in e)return e;if(typeof r=="object"&&"Struct"in r)return r}function un(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var i=t.charAt(n),s=i.charCodeAt(0);if(e[s]!==255)throw new TypeError(i+" is ambiguous");e[s]=n}var c=t.length,a=t.charAt(0),o=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function u(y){if(y instanceof Uint8Array||(ArrayBuffer.isView(y)?y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength):Array.isArray(y)&&(y=Uint8Array.from(y))),!(y instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(y.length===0)return"";for(var S=0,T=0,f=0,O=y.length;f!==O&&y[f]===0;)f++,S++;for(var B=(O-f)*d+1>>>0,P=new Uint8Array(B);f!==O;){for(var A=y[f],j=0,M=B-1;(A!==0||j<T)&&M!==-1;M--,j++)A+=256*P[M]>>>0,P[M]=A%c>>>0,A=A/c>>>0;if(A!==0)throw new Error("Non-zero carry");T=j,f++}for(var q=B-T;q!==B&&P[q]===0;)q++;for(var pe=a.repeat(S);q<B;++q)pe+=t.charAt(P[q]);return pe}function h(y){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;for(var S=0,T=0,f=0;y[S]===a;)T++,S++;for(var O=(y.length-S)*o+1>>>0,B=new Uint8Array(O);y[S];){var P=e[y.charCodeAt(S)];if(P===255)return;for(var A=0,j=O-1;(P!==0||A<f)&&j!==-1;j--,A++)P+=c*B[j]>>>0,B[j]=P%256>>>0,P=P/256>>>0;if(P!==0)throw new Error("Non-zero carry");f=A,S++}for(var M=O-f;M!==O&&B[M]===0;)M++;for(var q=new Uint8Array(T+(O-M)),pe=T;M!==O;)q[pe++]=B[M++];return q}function m(y){var S=h(y);if(S)return S;throw new Error("Non-base"+c+" character")}return{encode:u,decodeUnsafe:h,decode:m}}var dn=un;const ln=dn,fn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var gn=ln(fn);const ar=w.getDefaultExportFromCjs(gn),xe=t=>ar.encode(t),pt=t=>ar.decode(t);function ue(t){return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const Ze=8192;function Be(t){if(t.length<Ze)return btoa(String.fromCharCode(...t));let e="";for(var r=0;r<t.length;r+=Ze){const n=t.slice(r,r+Ze);e+=String.fromCharCode(...n)}return btoa(e)}function Je(t){var i;const e=t.startsWith("0x")?t.slice(2):t,n=((i=(e.length%2===0?e:`0${e}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function Ce(t){return t.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}function yt(t){let e=[],r=0;if(t===0)return[0];for(;t>0;)e[r]=t&127,(t>>=7)&&(e[r]|=128),r+=1;return e}function hn(t){let e=0,r=0,n=0;for(;;){let i=t[n];if(n+=1,e|=(i&127)<<r,!(i&128))break;r+=7}return{value:e,length:n}}class or{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),n=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let e=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let e=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(e){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,e);return this.shift(e),n}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,e),{value:n,length:i}=hn(r);return this.shift(i),n}readVec(e){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(e(this,i,r));return n}}function pn(t,e){switch(e){case"base58":return xe(t);case"base64":return Be(t);case"hex":return Ce(t);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function yn(t,e){switch(e){case"base58":return pt(t);case"base64":return ue(t);case"hex":return Je(t);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function mt(t,e=["<",">"]){const[r,n]=e,i=[];let s="",c=0;for(let a=0;a<t.length;a++){const o=t[a];if(o===r&&c++,o===n&&c--,c===0&&o===","){i.push(s.trim()),s="";continue}s+=o}return i.push(s.trim()),i}class cr{constructor({size:e=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=r||e,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const r=this.bytePosition+e;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return Ye(BigInt(e),8).forEach(r=>this.write8(r)),this}write128(e){return Ye(BigInt(e),16).forEach(r=>this.write8(r)),this}write256(e){return Ye(BigInt(e),32).forEach(r=>this.write8(r)),this}writeULEB(e){return yt(e).forEach(r=>this.write8(r)),this}writeVec(e,r){return this.writeULEB(e.length),Array.from(e).forEach((n,i)=>r(this,n,i,e.length)),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return pn(this.toBytes(),e)}}function Ye(t,e){let r=new Uint8Array(e),n=0;for(;t>0;)r[n]=Number(t%BigInt(256)),t=t/BigInt(256),n+=1;return r}var ur=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(ur(t,e,"read from private field"),r?r.call(t):e.get(t)),ze=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Fe=(t,e,r,n)=>(ur(t,e,"write to private field"),e.set(t,r),r),ye,Se,Me,ae;const dr=class{constructor(t){ze(this,ye,void 0),ze(this,Se,void 0),this.name=t.name,this.read=t.read,this.serializedSize=t.serializedSize??(()=>null),Fe(this,ye,t.write),Fe(this,Se,t.serialize??((e,r)=>{const n=new cr({size:this.serializedSize(e)??void 0,...r});return X(this,ye).call(this,e,n),n.toBytes()})),this.validate=t.validate??(()=>{})}write(t,e){this.validate(t),X(this,ye).call(this,t,e)}serialize(t,e){return this.validate(t),new mn(this,X(this,Se).call(this,t,e))}parse(t){const e=new or(t);return this.read(e)}transform({name:t,input:e,output:r}){return new dr({name:t??this.name,read:n=>r(this.read(n)),write:(n,i)=>X(this,ye).call(this,e(n),i),serializedSize:n=>this.serializedSize(e(n)),serialize:(n,i)=>X(this,Se).call(this,e(n),i),validate:n=>this.validate(e(n))})}};let Z=dr;ye=new WeakMap;Se=new WeakMap;const lr=Symbol.for("@mysten/serialized-bcs");function wt(t){return!!t&&typeof t=="object"&&t[lr]===!0}class mn{constructor(e,r){ze(this,Me,void 0),ze(this,ae,void 0),Fe(this,Me,e),Fe(this,ae,r)}get[lr](){return!0}toBytes(){return X(this,ae)}toHex(){return Ce(X(this,ae))}toBase64(){return Be(X(this,ae))}toBase58(){return xe(X(this,ae))}parse(){return X(this,Me).parse(X(this,ae))}}Me=new WeakMap;ae=new WeakMap;function Ge({size:t,...e}){return new Z({...e,serializedSize:()=>t})}function Qe({readMethod:t,writeMethod:e,...r}){return Ge({...r,read:n=>n[t](),write:(n,i)=>i[e](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function et({readMethod:t,writeMethod:e,...r}){return Ge({...r,read:n=>n[t](),write:(n,i)=>i[e](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function wn({serialize:t,...e}){const r=new Z({...e,serialize:t,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function bn({toBytes:t,fromBytes:e,...r}){return new Z({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return e(s)},write:(n,i)=>{const s=t(n);i.writeULEB(s.length);for(let c=0;c<s.length;c++)i.write8(s[c])},serialize:n=>{const i=t(n),s=yt(i.length),c=new Uint8Array(s.length+i.length);return c.set(s,0),c.set(i,s.length),c},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function Sn(t){let e=null;function r(){return e||(e=t()),e}return new Z({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const l={u8(t){return Qe({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...t})},u16(t){return Qe({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...t})},u32(t){return Qe({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...t})},u64(t){return et({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...t})},u128(t){return et({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...t})},u256(t){return et({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...t})},bool(t){return Ge({name:"bool",size:1,read:e=>e.read8()===1,write:(e,r)=>r.write8(e?1:0),...t,validate:e=>{var r;if((r=t==null?void 0:t.validate)==null||r.call(t,e),typeof e!="boolean")throw new TypeError(`Expected boolean, found ${typeof e}`)}})},uleb128(t){return wn({name:"uleb128",read:e=>e.readULEB(),serialize:e=>Uint8Array.from(yt(e)),...t})},bytes(t,e){return Ge({name:`bytes[${t}]`,size:t,read:r=>r.readBytes(t),write:(r,n)=>{for(let i=0;i<t;i++)n.write8(r[i]??0)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==t)throw new TypeError(`Expected array of length ${t}, found ${r.length}`)}})},string(t){return bn({name:"string",toBytes:e=>new TextEncoder().encode(e),fromBytes:e=>new TextDecoder().decode(e),...t})},fixedArray(t,e,r){return new Z({name:`${e.name}[${t}]`,read:n=>{const i=new Array(t);for(let s=0;s<t;s++)i[s]=e.read(n);return i},write:(n,i)=>{for(const s of n)e.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==t)throw new TypeError(`Expected array of length ${t}, found ${n.length}`)}})},option(t){return l.enum(`Option<${t.name}>`,{None:null,Some:t}).transform({input:e=>e==null?{None:!0}:{Some:e},output:e=>"Some"in e?e.Some:null})},vector(t,e){return new Z({name:`vector<${t.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=t.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)t.write(i,n)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(t,e){return new Z({name:`(${t.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<t.length;i++){const s=t[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of t)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<t.length;i++)t[i].write(r[i],n)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==t.length)throw new TypeError(`Expected array of length ${t.length}, found ${r.length}`)}})},struct(t,e,r){const n=Object.entries(e);return new Z({name:t,serializedSize:i=>{let s=0;for(const[c,a]of n){const o=a.serializedSize(i[c]);if(o==null)return null;s+=o}return s},read:i=>{const s={};for(const[c,a]of n)s[c]=a.read(i);return s},write:(i,s)=>{for(const[c,a]of n)a.write(i[c],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(t,e,r){const n=Object.entries(e);return new Z({name:t,read:i=>{const s=i.readULEB(),[c,a]=n[s];return{[c]:(a==null?void 0:a.read(i))??!0}},write:(i,s)=>{const[c,a]=Object.entries(i)[0];for(let o=0;o<n.length;o++){const[d,u]=n[o];if(d===c){s.writeULEB(o),u==null||u.write(a,s);return}}},...r,validate:i=>{var a;if((a=r==null?void 0:r.validate)==null||a.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[c]=s;if(!Object.hasOwn(e,c))throw new TypeError(`Invalid enum variant ${c}`)}})},map(t,e){return l.vector(l.tuple([t,e])).transform({name:`Map<${t.name}, ${e.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(t,e){return(...r)=>e(...r).transform({name:`${e.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(t){return Sn(t)}},Tn=32,Te=class{constructor(t){if(this.types=new Map,this.counter=0,t instanceof Te){this.schema=t.schema,this.types=new Map(t.types);return}if(this.schema=t,this.registerAddressType(Te.ADDRESS,t.addressLength,t.addressEncoding),this.registerVectorType(t.vectorType),t.types&&t.types.structs)for(let e of Object.keys(t.types.structs))this.registerStructType(e,t.types.structs[e]);if(t.types&&t.types.enums)for(let e of Object.keys(t.types.enums))this.registerEnumType(e,t.types.enums[e]);if(t.types&&t.types.aliases)for(let e of Object.keys(t.types.aliases))this.registerAlias(e,t.types.aliases[e]);t.withPrimitives!==!1&&vn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(t,e,r){if(typeof t=="string"||Array.isArray(t)){const{name:n,params:i}=this.parseTypeName(t);return this.getTypeInterface(n).encode(this,e,r,i)}if(typeof t=="object"){const n=this.tempKey();return new Te(this).registerStructType(n,t).ser(n,e,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
1
+ "use strict";var xr=Object.defineProperty;var Br=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var D=(t,e,r)=>Br(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index-B5H5W-MP.js"),b=require("./sui-fKD7sV9G.js");require("./index-iaMEYhF5.js");const Ht=require("./unsignedTransaction-DzSLsK-p.js");class Cr extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...c}=e,{path:a}=e,o=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??o),s!=null&&(this.cause=o),Object.assign(this,c),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function $r(t){return K(t)&&typeof t[Symbol.iterator]=="function"}function K(t){return typeof t=="object"&&t!=null}function J(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Ur(t){const{done:e,value:r}=t.next();return e?void 0:r}function Pr(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:c}=r,{refinement:a,message:o=`Expected a value of type \`${c}\`${a?` with refinement \`${a}\``:""}, but received: \`${J(n)}\``}=t;return{value:n,type:c,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:o}}function*Lt(t,e,r,n){$r(t)||(t=[t]);for(const i of t){const s=Pr(i,e,r,n);s&&(yield s)}}function*lt(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:c=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),c&&e.type!=="type"&&K(e.schema)&&K(t)&&!Array.isArray(t)))for(const d in t)e.schema[d]===void 0&&delete t[d];let o="valid";for(const d of e.validator(t,a))d.explanation=r.message,o="not_valid",yield[d,void 0];for(let[d,u,h]of e.entries(t,a)){const m=lt(u,h,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,u],coerce:s,mask:c,message:r.message});for(const y of m)y[0]?(o=y[0].refinement!=null?"not_refined":"not_valid",yield[y[0],void 0]):s&&(u=y[1],d===void 0?t=u:t instanceof Map?t.set(d,u):t instanceof Set?t.add(u):K(t)&&(u!==void 0||d in t)&&(t[d]=u))}if(o!=="not_valid")for(const d of e.refiner(t,a))d.explanation=r.message,o="not_refined",yield[d,void 0];o==="valid"&&(yield[void 0,t])}class te{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:c=o=>o,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=c,i?this.validator=(o,d)=>{const u=i(o,d);return Lt(u,d,this,o)}:this.validator=()=>[],s?this.refiner=(o,d)=>{const u=s(o,d);return Lt(u,d,this,o)}:this.refiner=()=>[]}assert(e,r){return nt(e,this,r)}create(e,r){return Xt(e,this,r)}is(e){return L(e,this)}mask(e,r){return Zt(e,this,r)}validate(e,r={}){return _e(e,this,r)}}function nt(t,e,r){const n=_e(t,e,{message:r});if(n[0])throw n[0]}function Xt(t,e,r){const n=_e(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Zt(t,e,r){const n=_e(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function L(t,e){return!_e(t,e)[0]}function _e(t,e,r={}){const n=lt(t,e,r),i=Ur(n);return i[0]?[new Cr(i[0],function*(){for(const c of n)c[0]&&(yield c[0])}),void 0]:[void 0,i[1]]}function je(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?Rr(n):p(n)}function W(t,e){return new te({type:t,schema:null,validator:e})}function it(){return W("any",()=>!0)}function E(t){return new te({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${J(e)}`}})}function Mr(){return W("bigint",t=>typeof t=="bigint")}function z(){return W("boolean",t=>typeof t=="boolean")}function ee(){return W("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${J(t)}`)}function k(t){const e=J(t),r=typeof t;return new te({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${J(n)}`}})}function Yt(){return W("never",()=>!1)}function $(t){return new te({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function ge(){return W("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${J(t)}`)}function p(t){const e=t?Object.keys(t):[],r=Yt();return new te({type:"object",schema:t||null,*entries(n){if(t&&K(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return K(n)||`Expected an object, but received: ${J(n)}`},coercer(n){return K(n)?{...n}:n}})}function v(t){return new te({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Q(t,e){return new te({type:"record",schema:null,*entries(r){if(K(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`}})}function g(){return W("string",t=>typeof t=="string"||`Expected a string, but received: ${J(t)}`)}function Qt(t){const e=Yt();return new te({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${J(r)}`}})}function Rr(t){const e=Object.keys(t);return new te({type:"type",schema:t,*entries(r){if(K(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`},coercer(r){return K(r)?{...r}:r}})}function U(t){const e=t.map(r=>r.type).join(" | ");return new te({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...c]=lt(r,s,n),[a]=c;if(a[0])for(const[o]of c)o&&i.push(o);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${J(r)}`,...i]}})}function er(){return W("unknown",()=>!0)}const ft=U([p({AddressOwner:g()}),p({ObjectOwner:g()}),p({Shared:p({initial_shared_version:$(g())})}),k("Immutable")]);W("SuiJsonValue",()=>!0);const Nr=U([p({u32:g()}),p({u64:g()}),p({f64:g()})]);p({attributes:Q(g(),$(Nr)),featureFlags:Q(g(),z()),maxSupportedProtocolVersion:g(),minSupportedProtocolVersion:g(),protocolVersion:g()});U([g(),k("package")]);const ce=p({digest:g(),objectId:g(),version:U([ge(),g(),Mr()])});p({owner:ft,reference:ce});p({objectId:g(),sequenceNumber:g()});p({payment:E(ce),owner:g(),price:g(),budget:g()});const Dr=je(ce,p({type:g(),owner:ft,previousTransaction:g()})),Vr=Q(g(),it()),zr=Q(g(),er()),Fr=p({type:g(),fields:Vr,hasPublicTransfer:z()}),Gr=p({disassembled:zr}),Lr=U([je(Fr,p({dataType:k("moveObject")})),je(Gr,p({dataType:k("package")}))]),Wr=p({type:g(),hasPublicTransfer:z(),version:g(),bcsBytes:g()}),Kr=p({id:g(),moduleMap:Q(g(),g())}),Jr=U([je(Wr,p({dataType:k("moveObject")})),je(Kr,p({dataType:k("package")}))]);BigInt(1e9);const tr=p({code:g(),error:v(g()),object_id:v(g()),parent_object_id:v(g()),version:v(g()),digest:v(g())}),qr=p({data:$(v(Q(g(),g()))),error:$(v(tr))}),Hr=U([qr,v(Q(g(),g()))]),rr=p({objectId:g(),version:g(),digest:g(),type:$(v(g())),content:$(v(Lr)),bcs:$(v(Jr)),owner:$(v(ft)),previousTransaction:$(v(g())),storageRebate:$(v(g())),display:$(v(Hr))});p({showType:$(v(z())),showContent:$(v(z())),showBcs:$(v(z())),showOwner:$(v(z())),showPreviousTransaction:$(v(z())),showStorageRebate:$(v(z())),showDisplay:$(v(z()))});U([k("Exists"),k("notExists"),k("Deleted")]);E(Dr);const Xr=p({data:$(v(rr)),error:$(v(tr))});function Zr(t){return t.data}function Yr(t){if(t.error&&"object_id"in t.error&&"version"in t.error&&"digest"in t.error){const e=t.error;return{objectId:e.object_id,version:e.version,digest:e.digest}}}function Wt(t){if("reference"in t)return t.reference;const e=Zr(t);return e?{objectId:e.objectId,version:e.version,digest:e.digest}:Yr(t)}p({objectId:g(),atCheckpoint:v(ge())});p({data:E(Xr),nextCursor:v($(g())),hasNextPage:z()});U([p({details:rr,status:k("VersionFound")}),p({details:g(),status:k("ObjectNotExists")}),p({details:ce,status:k("ObjectDeleted")}),p({details:Qt([g(),ge()]),status:k("VersionNotFound")}),p({details:p({asked_version:ge(),latest_version:ge(),object_id:g()}),status:k("VersionTooHigh")})]);const Qr=U([g(),p({Object:g()})]);E(Qr);const en=p({address:g(),name:g()}),tn=U([k("Private"),k("Public"),k("Friend")]),gt=p({abilities:E(g())}),rn=p({constraints:gt,isPhantom:z()}),nn=p({TypeParameter:ge()}),Xe=Qt([p({module:g(),package:g(),function:g()}),g()]);p({rank3Days:E(Xe),rank7Days:E(Xe),rank30Days:E(Xe)});function nr(t){if(!t)return!1;if(typeof t=="string"||L(t,nn)||ir(t))return!0;if(typeof t!="object")return!1;const e=t;return!!(L(e.Reference,me)||L(e.MutableReference,me)||L(e.Vector,me))}const me=W("SuiMoveNormalizedType",nr);function ir(t){if(!t||typeof t!="object")return!1;const e=t;if(!e.Struct||typeof e.Struct!="object")return!1;const r=e.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>nr(n)))}W("SuiMoveNormalizedStructType",ir);const sn=p({visibility:tn,isEntry:z(),typeParameters:E(gt),parameters:E(me),return:E(me)}),an=p({name:g(),type:me}),on=p({abilities:gt,typeParameters:E(rn),fields:E(an)}),cn=p({fileFormatVersion:ge(),address:g(),name:g(),friends:E(en),structs:Q(g(),on),exposedFunctions:Q(g(),sn)});Q(g(),cn);function st(t){return typeof t=="object"&&"MutableReference"in t?t.MutableReference:void 0}function sr(t){return typeof t=="object"&&"Reference"in t?t.Reference:void 0}function ht(t){if(typeof t=="object"&&"Struct"in t)return t;const e=sr(t),r=st(t);if(typeof e=="object"&&"Struct"in e)return e;if(typeof r=="object"&&"Struct"in r)return r}function un(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var i=t.charAt(n),s=i.charCodeAt(0);if(e[s]!==255)throw new TypeError(i+" is ambiguous");e[s]=n}var c=t.length,a=t.charAt(0),o=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function u(y){if(y instanceof Uint8Array||(ArrayBuffer.isView(y)?y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength):Array.isArray(y)&&(y=Uint8Array.from(y))),!(y instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(y.length===0)return"";for(var S=0,T=0,f=0,O=y.length;f!==O&&y[f]===0;)f++,S++;for(var B=(O-f)*d+1>>>0,P=new Uint8Array(B);f!==O;){for(var A=y[f],j=0,M=B-1;(A!==0||j<T)&&M!==-1;M--,j++)A+=256*P[M]>>>0,P[M]=A%c>>>0,A=A/c>>>0;if(A!==0)throw new Error("Non-zero carry");T=j,f++}for(var q=B-T;q!==B&&P[q]===0;)q++;for(var pe=a.repeat(S);q<B;++q)pe+=t.charAt(P[q]);return pe}function h(y){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;for(var S=0,T=0,f=0;y[S]===a;)T++,S++;for(var O=(y.length-S)*o+1>>>0,B=new Uint8Array(O);y[S];){var P=e[y.charCodeAt(S)];if(P===255)return;for(var A=0,j=O-1;(P!==0||A<f)&&j!==-1;j--,A++)P+=c*B[j]>>>0,B[j]=P%256>>>0,P=P/256>>>0;if(P!==0)throw new Error("Non-zero carry");f=A,S++}for(var M=O-f;M!==O&&B[M]===0;)M++;for(var q=new Uint8Array(T+(O-M)),pe=T;M!==O;)q[pe++]=B[M++];return q}function m(y){var S=h(y);if(S)return S;throw new Error("Non-base"+c+" character")}return{encode:u,decodeUnsafe:h,decode:m}}var dn=un;const ln=dn,fn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var gn=ln(fn);const ar=w.getDefaultExportFromCjs(gn),xe=t=>ar.encode(t),pt=t=>ar.decode(t);function ue(t){return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const Ze=8192;function Be(t){if(t.length<Ze)return btoa(String.fromCharCode(...t));let e="";for(var r=0;r<t.length;r+=Ze){const n=t.slice(r,r+Ze);e+=String.fromCharCode(...n)}return btoa(e)}function Je(t){var i;const e=t.startsWith("0x")?t.slice(2):t,n=((i=(e.length%2===0?e:`0${e}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function Ce(t){return t.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}function yt(t){let e=[],r=0;if(t===0)return[0];for(;t>0;)e[r]=t&127,(t>>=7)&&(e[r]|=128),r+=1;return e}function hn(t){let e=0,r=0,n=0;for(;;){let i=t[n];if(n+=1,e|=(i&127)<<r,!(i&128))break;r+=7}return{value:e,length:n}}class or{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),n=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let e=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let e=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(e){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,e);return this.shift(e),n}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,e),{value:n,length:i}=hn(r);return this.shift(i),n}readVec(e){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(e(this,i,r));return n}}function pn(t,e){switch(e){case"base58":return xe(t);case"base64":return Be(t);case"hex":return Ce(t);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function yn(t,e){switch(e){case"base58":return pt(t);case"base64":return ue(t);case"hex":return Je(t);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function mt(t,e=["<",">"]){const[r,n]=e,i=[];let s="",c=0;for(let a=0;a<t.length;a++){const o=t[a];if(o===r&&c++,o===n&&c--,c===0&&o===","){i.push(s.trim()),s="";continue}s+=o}return i.push(s.trim()),i}class cr{constructor({size:e=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=r||e,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const r=this.bytePosition+e;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return Ye(BigInt(e),8).forEach(r=>this.write8(r)),this}write128(e){return Ye(BigInt(e),16).forEach(r=>this.write8(r)),this}write256(e){return Ye(BigInt(e),32).forEach(r=>this.write8(r)),this}writeULEB(e){return yt(e).forEach(r=>this.write8(r)),this}writeVec(e,r){return this.writeULEB(e.length),Array.from(e).forEach((n,i)=>r(this,n,i,e.length)),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return pn(this.toBytes(),e)}}function Ye(t,e){let r=new Uint8Array(e),n=0;for(;t>0;)r[n]=Number(t%BigInt(256)),t=t/BigInt(256),n+=1;return r}var ur=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(ur(t,e,"read from private field"),r?r.call(t):e.get(t)),ze=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Fe=(t,e,r,n)=>(ur(t,e,"write to private field"),e.set(t,r),r),ye,Se,Me,ae;const dr=class{constructor(t){ze(this,ye,void 0),ze(this,Se,void 0),this.name=t.name,this.read=t.read,this.serializedSize=t.serializedSize??(()=>null),Fe(this,ye,t.write),Fe(this,Se,t.serialize??((e,r)=>{const n=new cr({size:this.serializedSize(e)??void 0,...r});return X(this,ye).call(this,e,n),n.toBytes()})),this.validate=t.validate??(()=>{})}write(t,e){this.validate(t),X(this,ye).call(this,t,e)}serialize(t,e){return this.validate(t),new mn(this,X(this,Se).call(this,t,e))}parse(t){const e=new or(t);return this.read(e)}transform({name:t,input:e,output:r}){return new dr({name:t??this.name,read:n=>r(this.read(n)),write:(n,i)=>X(this,ye).call(this,e(n),i),serializedSize:n=>this.serializedSize(e(n)),serialize:(n,i)=>X(this,Se).call(this,e(n),i),validate:n=>this.validate(e(n))})}};let Z=dr;ye=new WeakMap;Se=new WeakMap;const lr=Symbol.for("@mysten/serialized-bcs");function wt(t){return!!t&&typeof t=="object"&&t[lr]===!0}class mn{constructor(e,r){ze(this,Me,void 0),ze(this,ae,void 0),Fe(this,Me,e),Fe(this,ae,r)}get[lr](){return!0}toBytes(){return X(this,ae)}toHex(){return Ce(X(this,ae))}toBase64(){return Be(X(this,ae))}toBase58(){return xe(X(this,ae))}parse(){return X(this,Me).parse(X(this,ae))}}Me=new WeakMap;ae=new WeakMap;function Ge({size:t,...e}){return new Z({...e,serializedSize:()=>t})}function Qe({readMethod:t,writeMethod:e,...r}){return Ge({...r,read:n=>n[t](),write:(n,i)=>i[e](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function et({readMethod:t,writeMethod:e,...r}){return Ge({...r,read:n=>n[t](),write:(n,i)=>i[e](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function wn({serialize:t,...e}){const r=new Z({...e,serialize:t,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function bn({toBytes:t,fromBytes:e,...r}){return new Z({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return e(s)},write:(n,i)=>{const s=t(n);i.writeULEB(s.length);for(let c=0;c<s.length;c++)i.write8(s[c])},serialize:n=>{const i=t(n),s=yt(i.length),c=new Uint8Array(s.length+i.length);return c.set(s,0),c.set(i,s.length),c},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function Sn(t){let e=null;function r(){return e||(e=t()),e}return new Z({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const l={u8(t){return Qe({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...t})},u16(t){return Qe({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...t})},u32(t){return Qe({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...t})},u64(t){return et({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...t})},u128(t){return et({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...t})},u256(t){return et({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...t})},bool(t){return Ge({name:"bool",size:1,read:e=>e.read8()===1,write:(e,r)=>r.write8(e?1:0),...t,validate:e=>{var r;if((r=t==null?void 0:t.validate)==null||r.call(t,e),typeof e!="boolean")throw new TypeError(`Expected boolean, found ${typeof e}`)}})},uleb128(t){return wn({name:"uleb128",read:e=>e.readULEB(),serialize:e=>Uint8Array.from(yt(e)),...t})},bytes(t,e){return Ge({name:`bytes[${t}]`,size:t,read:r=>r.readBytes(t),write:(r,n)=>{for(let i=0;i<t;i++)n.write8(r[i]??0)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==t)throw new TypeError(`Expected array of length ${t}, found ${r.length}`)}})},string(t){return bn({name:"string",toBytes:e=>new TextEncoder().encode(e),fromBytes:e=>new TextDecoder().decode(e),...t})},fixedArray(t,e,r){return new Z({name:`${e.name}[${t}]`,read:n=>{const i=new Array(t);for(let s=0;s<t;s++)i[s]=e.read(n);return i},write:(n,i)=>{for(const s of n)e.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==t)throw new TypeError(`Expected array of length ${t}, found ${n.length}`)}})},option(t){return l.enum(`Option<${t.name}>`,{None:null,Some:t}).transform({input:e=>e==null?{None:!0}:{Some:e},output:e=>"Some"in e?e.Some:null})},vector(t,e){return new Z({name:`vector<${t.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=t.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)t.write(i,n)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(t,e){return new Z({name:`(${t.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<t.length;i++){const s=t[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of t)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<t.length;i++)t[i].write(r[i],n)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==t.length)throw new TypeError(`Expected array of length ${t.length}, found ${r.length}`)}})},struct(t,e,r){const n=Object.entries(e);return new Z({name:t,serializedSize:i=>{let s=0;for(const[c,a]of n){const o=a.serializedSize(i[c]);if(o==null)return null;s+=o}return s},read:i=>{const s={};for(const[c,a]of n)s[c]=a.read(i);return s},write:(i,s)=>{for(const[c,a]of n)a.write(i[c],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(t,e,r){const n=Object.entries(e);return new Z({name:t,read:i=>{const s=i.readULEB(),[c,a]=n[s];return{[c]:(a==null?void 0:a.read(i))??!0}},write:(i,s)=>{const[c,a]=Object.entries(i)[0];for(let o=0;o<n.length;o++){const[d,u]=n[o];if(d===c){s.writeULEB(o),u==null||u.write(a,s);return}}},...r,validate:i=>{var a;if((a=r==null?void 0:r.validate)==null||a.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[c]=s;if(!Object.hasOwn(e,c))throw new TypeError(`Invalid enum variant ${c}`)}})},map(t,e){return l.vector(l.tuple([t,e])).transform({name:`Map<${t.name}, ${e.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(t,e){return(...r)=>e(...r).transform({name:`${e.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(t){return Sn(t)}},Tn=32,Te=class{constructor(t){if(this.types=new Map,this.counter=0,t instanceof Te){this.schema=t.schema,this.types=new Map(t.types);return}if(this.schema=t,this.registerAddressType(Te.ADDRESS,t.addressLength,t.addressEncoding),this.registerVectorType(t.vectorType),t.types&&t.types.structs)for(let e of Object.keys(t.types.structs))this.registerStructType(e,t.types.structs[e]);if(t.types&&t.types.enums)for(let e of Object.keys(t.types.enums))this.registerEnumType(e,t.types.enums[e]);if(t.types&&t.types.aliases)for(let e of Object.keys(t.types.aliases))this.registerAlias(e,t.types.aliases[e]);t.withPrimitives!==!1&&vn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(t,e,r){if(typeof t=="string"||Array.isArray(t)){const{name:n,params:i}=this.parseTypeName(t);return this.getTypeInterface(n).encode(this,e,r,i)}if(typeof t=="object"){const n=this.tempKey();return new Te(this).registerStructType(n,t).ser(n,e,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
2
2
  ${JSON.stringify(t)}`)}de(t,e,r){if(typeof e=="string")if(r)e=yn(e,r);else throw new Error("To pass a string to `bcs.de`, specify encoding");if(typeof t=="string"||Array.isArray(t)){const{name:n,params:i}=this.parseTypeName(t);return this.getTypeInterface(n).decode(this,e,i)}if(typeof t=="object"){const n=new Te(this),i=this.tempKey();return n.registerStructType(i,t).de(i,e,r)}throw new Error(`Incorrect type passed into the '.de()' function.
3
3
  ${JSON.stringify(t)}`)}hasType(t){return this.types.has(t)}registerAlias(t,e){return this.types.set(t,e),this}registerType(t,e,r,n=()=>!0){const{name:i,params:s}=this.parseTypeName(t);return this.types.set(i,{encode(c,a,o,d){const u=s.reduce((h,m,y)=>Object.assign(h,{[m]:d[y]}),{});return this._encodeRaw.call(c,new cr(o),a,d,u)},decode(c,a,o){const d=s.reduce((u,h,m)=>Object.assign(u,{[h]:o[m]}),{});return this._decodeRaw.call(c,new or(a),o,d)},_encodeRaw(c,a,o,d){if(n(a))return e.call(this,c,a,o,d);throw new Error(`Validation failed for type ${i}, data: ${a}`)},_decodeRaw(c,a,o){return r.call(this,c,a,o)}}),this}registerBcsType(t,e){return this.registerType(t,(r,n,i)=>{const s=i.map(c=>new Z({name:String(c),write:(a,o)=>{const{name:d,params:u}=this.parseTypeName(c),h=this.getTypeInterface(d),m=u.reduce((y,S,T)=>Object.assign(y,{[S]:i[T]}),{});return h._encodeRaw.call(this,o,a,u,m)},read:()=>{throw new Error("Not implemented")}}));return e(...s).write(n,r),r},(r,n)=>{const i=n.map(s=>new Z({name:String(s),write:(c,a)=>{throw new Error("Not implemented")},read:c=>{const{name:a,params:o}=this.parseTypeName(s),d=this.getTypeInterface(a),u=o.reduce((h,m,y)=>Object.assign(h,{[m]:n[y]}),{});return d._decodeRaw.call(this,c,o,u)}}));return e(...i).read(r)}),this}registerAddressType(t,e,r="hex"){switch(r){case"base64":return this.registerType(t,function(i,s){return ue(s).reduce((c,a)=>c.write8(a),i)},function(i){return Be(i.readBytes(e))});case"hex":return this.registerType(t,function(i,s){return Je(s).reduce((c,a)=>c.write8(a),i)},function(i){return Ce(i.readBytes(e))});default:throw new Error("Unsupported encoding! Use either hex or base64")}}registerVectorType(t){let{name:e,params:r}=this.parseTypeName(t);if(r.length>1)throw new Error("Vector can have only one type parameter; got "+e);return this.registerType(t,function(i,s,c,a){return i.writeVec(s,(o,d)=>{let u=c[0];if(!u)throw new Error(`Incorrect number of type parameters passed a to vector '${t}'`);let{name:h,params:m}=this.parseTypeName(u);if(this.hasType(h))return this.getTypeInterface(h)._encodeRaw.call(this,o,d,m,a);if(!(h in a))throw new Error(`Unable to find a matching type definition for ${h} in vector; make sure you passed a generic`);let{name:y,params:S}=this.parseTypeName(a[h]);return this.getTypeInterface(y)._encodeRaw.call(this,o,d,S,a)})},function(i,s,c){return i.readVec(a=>{let o=s[0];if(!o)throw new Error(`Incorrect number of type parameters passed to a vector '${t}'`);let{name:d,params:u}=this.parseTypeName(o);if(this.hasType(d))return this.getTypeInterface(d)._decodeRaw.call(this,a,u,c);if(!(d in c))throw new Error(`Unable to find a matching type definition for ${d} in vector; make sure you passed a generic`);let{name:h,params:m}=this.parseTypeName(c[d]);return this.getTypeInterface(h)._decodeRaw.call(this,a,m,c)})})}registerStructType(t,e){for(let c in e){let a=this.tempKey(),o=e[c];!Array.isArray(o)&&typeof o!="string"&&(e[c]=a,this.registerStructType(a,o))}let r=Object.freeze(e),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(t);return this.registerType(t,function(a,o,d,u){if(!o||o.constructor!==Object)throw new Error(`Expected ${i} to be an Object, got: ${o}`);if(d.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${d.length}`);for(let h of n){if(!(h in o))throw new Error(`Struct ${i} requires field ${h}:${r[h]}`);const{name:m,params:y}=this.parseTypeName(r[h]);if(!s.includes(m))this.getTypeInterface(m)._encodeRaw.call(this,a,o[h],y,u);else{const S=s.indexOf(m);let{name:T,params:f}=this.parseTypeName(d[S]);if(this.hasType(T)){this.getTypeInterface(T)._encodeRaw.call(this,a,o[h],f,u);continue}if(!(T in u))throw new Error(`Unable to find a matching type definition for ${T} in ${i}; make sure you passed a generic`);let{name:O,params:B}=this.parseTypeName(u[T]);this.getTypeInterface(O)._encodeRaw.call(this,a,o[h],B,u)}}return a},function(a,o,d){if(o.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${o.length}`);let u={};for(let h of n){const{name:m,params:y}=this.parseTypeName(r[h]);if(!s.includes(m))u[h]=this.getTypeInterface(m)._decodeRaw.call(this,a,y,d);else{const S=s.indexOf(m);let{name:T,params:f}=this.parseTypeName(o[S]);if(this.hasType(T)){u[h]=this.getTypeInterface(T)._decodeRaw.call(this,a,f,d);continue}if(!(T in d))throw new Error(`Unable to find a matching type definition for ${T} in ${i}; make sure you passed a generic`);let{name:O,params:B}=this.parseTypeName(d[T]);u[h]=this.getTypeInterface(O)._decodeRaw.call(this,a,B,d)}}return u})}registerEnumType(t,e){for(let c in e){let a=this.tempKey(),o=e[c];o!==null&&!Array.isArray(o)&&typeof o!="string"&&(e[c]=a,this.registerStructType(a,o))}let r=Object.freeze(e),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(t);return this.registerType(t,function(a,o,d,u){if(!o)throw new Error(`Unable to write enum "${i}", missing data.
4
4
  Received: "${o}"`);if(typeof o!="object")throw new Error(`Incorrect data passed into enum "${i}", expected object with properties: "${n.join(" | ")}".
@@ -1 +1 @@
1
- "use strict";var h=Object.defineProperty;var m=(a,e,t)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var s=(a,e,t)=>m(a,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-WOTkpZNS.js"),w=require("./aptos-otpuaKYt.js");class c{constructor(e,t,r,o){s(this,"network");s(this,"chain");s(this,"connection");s(this,"contracts");s(this,"chainId");s(this,"coreBridge");this.network=e,this.chain=t,this.connection=r,this.contracts=o,this.chainId=i.toChainId(t);const n=o.coreBridge;if(!n)throw new Error(`CoreBridge contract Address for chain ${t} not found`);this.coreBridge=n}getGuardianSet(e){throw new Error("Method not implemented.")}getGuardianSetIndex(){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,t){const[r,o]=await w.AptosPlatform.chainFromRpc(e),n=t[o];if(n.network!==r)throw new Error(`Network mismatch: ${n.network} !== ${r}`);return new c(r,o,e,n.contracts)}async*publishMessage(e,t){throw new Error("Method not implemented.")}async*verifyMessage(e,t){throw new Error("Not implemented.")}async parseTransaction(e){return(await this.parseMessages(e)).map(r=>({chain:r.emitterChain,emitter:r.emitterAddress,sequence:r.sequence}))}async parseMessages(e){const t=await this.connection.getTransactionByHash({transactionHash:e});if(t.type!=="user_transaction")throw new Error(`${e} is not a user_transaction`);const r=t.events.filter(o=>o.type.endsWith("WormholeMessage"));if(!r||r.length===0)throw new Error(`WormholeMessage not found for ${e}`);return r.map(o=>{const n=o.data,d=new i.UniversalAddress(BigInt(n.sender).toString(16).padStart(64,"0"));return i.createVAA("Uint8Array",{guardianSet:0,emitterChain:this.chain,emitterAddress:d,sequence:BigInt(n.sequence),timestamp:Number(n.timestamp),consistencyLevel:n.consistency_level,nonce:Number(n.nonce),signatures:[],payload:i.hex.decode(n.payload)})})}}i.registerProtocol("Aptos","WormholeCore",c);exports.AptosWormholeCore=c;
1
+ "use strict";var h=Object.defineProperty;var m=(a,e,t)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var s=(a,e,t)=>m(a,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-B5H5W-MP.js"),w=require("./aptos-C7pCAbUg.js");class c{constructor(e,t,r,o){s(this,"network");s(this,"chain");s(this,"connection");s(this,"contracts");s(this,"chainId");s(this,"coreBridge");this.network=e,this.chain=t,this.connection=r,this.contracts=o,this.chainId=i.toChainId(t);const n=o.coreBridge;if(!n)throw new Error(`CoreBridge contract Address for chain ${t} not found`);this.coreBridge=n}getGuardianSet(e){throw new Error("Method not implemented.")}getGuardianSetIndex(){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,t){const[r,o]=await w.AptosPlatform.chainFromRpc(e),n=t[o];if(n.network!==r)throw new Error(`Network mismatch: ${n.network} !== ${r}`);return new c(r,o,e,n.contracts)}async*publishMessage(e,t){throw new Error("Method not implemented.")}async*verifyMessage(e,t){throw new Error("Not implemented.")}async parseTransaction(e){return(await this.parseMessages(e)).map(r=>({chain:r.emitterChain,emitter:r.emitterAddress,sequence:r.sequence}))}async parseMessages(e){const t=await this.connection.getTransactionByHash({transactionHash:e});if(t.type!=="user_transaction")throw new Error(`${e} is not a user_transaction`);const r=t.events.filter(o=>o.type.endsWith("WormholeMessage"));if(!r||r.length===0)throw new Error(`WormholeMessage not found for ${e}`);return r.map(o=>{const n=o.data,d=new i.UniversalAddress(BigInt(n.sender).toString(16).padStart(64,"0"));return i.createVAA("Uint8Array",{guardianSet:0,emitterChain:this.chain,emitterAddress:d,sequence:BigInt(n.sequence),timestamp:Number(n.timestamp),consistencyLevel:n.consistency_level,nonce:Number(n.nonce),signatures:[],payload:i.hex.decode(n.payload)})})}}i.registerProtocol("Aptos","WormholeCore",c);exports.AptosWormholeCore=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-WOTkpZNS.js");class o extends Error{constructor(r){super(r)}}class s extends o{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const n=e.struct([e.u32("mintAuthorityOption"),e.publicKey("mintAuthority"),e.u64("supply"),e.u8("decimals"),e.bool("isInitialized"),e.u32("freezeAuthorityOption"),e.publicKey("freezeAuthority")]);n.span;async function c(t,r,u=!1,i=e.TOKEN_PROGRAM_ID,O=e.ASSOCIATED_TOKEN_PROGRAM_ID){if(!u&&!e.PublicKey.isOnCurve(r.toBuffer()))throw new s;const[A]=await e.PublicKey.findProgramAddress([r.toBuffer(),i.toBuffer(),t.toBuffer()],O);return A}exports.ASSOCIATED_TOKEN_PROGRAM_ID=e.ASSOCIATED_TOKEN_PROGRAM_ID;exports.TOKEN_2022_PROGRAM_ID=e.TOKEN_2022_PROGRAM_ID;exports.TOKEN_PROGRAM_ID=e.TOKEN_PROGRAM_ID;exports.MintLayout=n;exports.TokenError=o;exports.TokenOwnerOffCurveError=s;exports.getAssociatedTokenAddress=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B5H5W-MP.js");class o extends Error{constructor(r){super(r)}}class s extends o{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const n=e.struct([e.u32("mintAuthorityOption"),e.publicKey("mintAuthority"),e.u64("supply"),e.u8("decimals"),e.bool("isInitialized"),e.u32("freezeAuthorityOption"),e.publicKey("freezeAuthority")]);n.span;async function c(t,r,u=!1,i=e.TOKEN_PROGRAM_ID,O=e.ASSOCIATED_TOKEN_PROGRAM_ID){if(!u&&!e.PublicKey.isOnCurve(r.toBuffer()))throw new s;const[A]=await e.PublicKey.findProgramAddress([r.toBuffer(),i.toBuffer(),t.toBuffer()],O);return A}exports.ASSOCIATED_TOKEN_PROGRAM_ID=e.ASSOCIATED_TOKEN_PROGRAM_ID;exports.TOKEN_2022_PROGRAM_ID=e.TOKEN_2022_PROGRAM_ID;exports.TOKEN_PROGRAM_ID=e.TOKEN_PROGRAM_ID;exports.MintLayout=n;exports.TokenError=o;exports.TokenOwnerOffCurveError=s;exports.getAssociatedTokenAddress=c;
@@ -1 +1 @@
1
- "use strict";const e=require("./index-WOTkpZNS.js");function I(n,t,o,s){e.ahash(n);const a=e.checkOpts({dkLen:32,asyncTick:10},s),{c:d,dkLen:i,asyncTick:r}=a;if(e.anumber(d),e.anumber(i),e.anumber(r),d<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=e.toBytes(t),u=e.toBytes(o),f=new Uint8Array(i),p=e.hmac.create(n,l),c=p._cloneInto().update(u);return{c:d,dkLen:i,asyncTick:r,DK:f,PRF:p,PRFSalt:c}}function L(n,t,o,s,a){return n.destroy(),t.destroy(),s&&s.destroy(),a.fill(0),o}function g(n,t,o,s){const{c:a,dkLen:d,DK:i,PRF:r,PRFSalt:l}=I(n,t,o,s);let u;const f=new Uint8Array(4),p=e.createView(f),c=new Uint8Array(r.outputLen);for(let w=1,y=0;y<d;w++,y+=r.outputLen){const m=i.subarray(y,y+r.outputLen);p.setInt32(0,w,!1),(u=l._cloneInto(u)).update(f).digestInto(c),m.set(c.subarray(0,m.length));for(let h=1;h<a;h++){r._cloneInto(u).update(c).digestInto(c);for(let k=0;k<m.length;k++)m[k]^=c[k]}}return L(r,l,i,u,c)}/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */function b(n){if(typeof n!="string")throw new TypeError("invalid mnemonic type: "+typeof n);return n.normalize("NFKD")}function F(n){const t=b(n),o=t.split(" ");if(![12,15,18,21,24].includes(o.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:o}}const S=n=>b("mnemonic"+n);function T(n,t=""){return g(e.sha512,F(n).nfkd,S(t),{c:2048,dkLen:64})}exports.mnemonicToSeedSync=T;
1
+ "use strict";const e=require("./index-B5H5W-MP.js");function I(n,t,o,s){e.ahash(n);const a=e.checkOpts({dkLen:32,asyncTick:10},s),{c:d,dkLen:i,asyncTick:r}=a;if(e.anumber(d),e.anumber(i),e.anumber(r),d<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=e.toBytes(t),u=e.toBytes(o),f=new Uint8Array(i),p=e.hmac.create(n,l),c=p._cloneInto().update(u);return{c:d,dkLen:i,asyncTick:r,DK:f,PRF:p,PRFSalt:c}}function L(n,t,o,s,a){return n.destroy(),t.destroy(),s&&s.destroy(),a.fill(0),o}function g(n,t,o,s){const{c:a,dkLen:d,DK:i,PRF:r,PRFSalt:l}=I(n,t,o,s);let u;const f=new Uint8Array(4),p=e.createView(f),c=new Uint8Array(r.outputLen);for(let w=1,y=0;y<d;w++,y+=r.outputLen){const m=i.subarray(y,y+r.outputLen);p.setInt32(0,w,!1),(u=l._cloneInto(u)).update(f).digestInto(c),m.set(c.subarray(0,m.length));for(let h=1;h<a;h++){r._cloneInto(u).update(c).digestInto(c);for(let k=0;k<m.length;k++)m[k]^=c[k]}}return L(r,l,i,u,c)}/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */function b(n){if(typeof n!="string")throw new TypeError("invalid mnemonic type: "+typeof n);return n.normalize("NFKD")}function F(n){const t=b(n),o=t.split(" ");if(![12,15,18,21,24].includes(o.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:o}}const S=n=>b("mnemonic"+n);function T(n,t=""){return g(e.sha512,F(n).nfkd,S(t),{c:2048,dkLen:64})}exports.mnemonicToSeedSync=T;
@@ -1,4 +1,4 @@
1
- import { c5 as J, cv as Z } from "./index-DXxwhxlz.mjs";
1
+ import { c5 as J, cv as Z } from "./index-0sRAi_-E.mjs";
2
2
  const j = "logger/5.7.0";
3
3
  let F = !1, k = !1;
4
4
  const U = { debug: 1, default: 2, info: 2, warning: 3, error: 4, off: 5 };
@@ -1,4 +1,4 @@
1
- "use strict";const $=require("./index-WOTkpZNS.js");function ae(e,t){for(var u=0;u<t.length;u++){const r=t[u];if(typeof r!="string"&&!Array.isArray(r)){for(const D in r)if(D!=="default"&&!(D in e)){const n=Object.getOwnPropertyDescriptor(r,D);n&&Object.defineProperty(e,D,n.get?n:{enumerable:!0,get:()=>r[D]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var V=$.requireHash();const ee=$.getDefaultExportFromCjs(V),ie=ae({__proto__:null,default:ee},[V]);function oe(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var u=new Uint8Array(256),r=0;r<u.length;r++)u[r]=255;for(var D=0;D<e.length;D++){var n=e.charAt(D),a=n.charCodeAt(0);if(u[a]!==255)throw new TypeError(n+" is ambiguous");u[a]=D}var i=e.length,f=e.charAt(0),o=Math.log(i)/Math.log(256),s=Math.log(256)/Math.log(i);function h(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var d=0,w=0,_=0,C=c.length;_!==C&&c[_]===0;)_++,d++;for(var p=(C-_)*s+1>>>0,b=new Uint8Array(p);_!==C;){for(var O=c[_],m=0,y=p-1;(O!==0||m<w)&&y!==-1;y--,m++)O+=256*b[y]>>>0,b[y]=O%i>>>0,O=O/i>>>0;if(O!==0)throw new Error("Non-zero carry");w=m,_++}for(var S=p-w;S!==p&&b[S]===0;)S++;for(var R=f.repeat(d);S<p;++S)R+=e.charAt(b[S]);return R}function l(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var d=0;if(c[d]!==" "){for(var w=0,_=0;c[d]===f;)w++,d++;for(var C=(c.length-d)*o+1>>>0,p=new Uint8Array(C);c[d];){var b=u[c.charCodeAt(d)];if(b===255)return;for(var O=0,m=C-1;(b!==0||O<_)&&m!==-1;m--,O++)b+=i*p[m]>>>0,p[m]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");_=O,d++}if(c[d]!==" "){for(var y=C-_;y!==C&&p[y]===0;)y++;for(var S=new Uint8Array(w+(C-y)),R=w;y!==C;)S[R++]=p[y++];return S}}}function v(c){var d=l(c);if(d)return d;throw new Error(`Non-${t} character`)}return{encode:h,decodeUnsafe:l,decode:v}}var ce=oe,se=ce;const fe=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},le=e=>new TextEncoder().encode(e),Ee=e=>new TextDecoder().decode(e);class de{constructor(t,u,r){this.name=t,this.prefix=u,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class be{constructor(t,u,r){if(this.name=t,this.prefix=u,u.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=u.codePointAt(0),this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return te(this,t)}}class he{constructor(t){this.decoders=t}or(t){return te(this,t)}decode(t){const u=t[0],r=this.decoders[u];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const te=(e,t)=>new he({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class _e{constructor(t,u,r,D){this.name=t,this.prefix=u,this.baseEncode=r,this.baseDecode=D,this.encoder=new de(t,u,r),this.decoder=new be(t,u,D)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const M=({name:e,prefix:t,encode:u,decode:r})=>new _e(e,t,u,r),j=({prefix:e,name:t,alphabet:u})=>{const{encode:r,decode:D}=se(u,t);return M({prefix:e,name:t,encode:r,decode:n=>fe(D(n))})},ye=(e,t,u,r)=>{const D={};for(let s=0;s<t.length;++s)D[t[s]]=s;let n=e.length;for(;e[n-1]==="=";)--n;const a=new Uint8Array(n*u/8|0);let i=0,f=0,o=0;for(let s=0;s<n;++s){const h=D[e[s]];if(h===void 0)throw new SyntaxError(`Non-${r} character`);f=f<<u|h,i+=u,i>=8&&(i-=8,a[o++]=255&f>>i)}if(i>=u||255&f<<8-i)throw new SyntaxError("Unexpected end of data");return a},Ce=(e,t,u)=>{const r=t[t.length-1]==="=",D=(1<<u)-1;let n="",a=0,i=0;for(let f=0;f<e.length;++f)for(i=i<<8|e[f],a+=8;a>u;)a-=u,n+=t[D&i>>a];if(a&&(n+=t[D&i<<u-a]),r)for(;n.length*u&7;)n+="=";return n},E=({name:e,prefix:t,bitsPerChar:u,alphabet:r})=>M({prefix:t,name:e,encode(D){return Ce(D,r,u)},decode(D){return ye(D,r,u,e)}}),pe=M({prefix:"\0",name:"identity",encode:e=>Ee(e),decode:e=>le(e)}),Oe=Object.freeze(Object.defineProperty({__proto__:null,identity:pe},Symbol.toStringTag,{value:"Module"})),Se=E({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),ve=Object.freeze(Object.defineProperty({__proto__:null,base2:Se},Symbol.toStringTag,{value:"Module"})),me=E({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),we=Object.freeze(Object.defineProperty({__proto__:null,base8:me},Symbol.toStringTag,{value:"Module"})),ge=j({prefix:"9",name:"base10",alphabet:"0123456789"}),Ae=Object.freeze(Object.defineProperty({__proto__:null,base10:ge},Symbol.toStringTag,{value:"Module"})),Te=E({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ne=E({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Fe=Object.freeze(Object.defineProperty({__proto__:null,base16:Te,base16upper:Ne},Symbol.toStringTag,{value:"Module"})),Ue=E({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),je=E({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Re=E({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Me=E({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Pe=E({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ie=E({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Be=E({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ye=E({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),He=E({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),We=Object.freeze(Object.defineProperty({__proto__:null,base32:Ue,base32hex:Pe,base32hexpad:Be,base32hexpadupper:Ye,base32hexupper:Ie,base32pad:Re,base32padupper:Me,base32upper:je,base32z:He},Symbol.toStringTag,{value:"Module"})),qe=j({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ze=j({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$e=Object.freeze(Object.defineProperty({__proto__:null,base36:qe,base36upper:ze},Symbol.toStringTag,{value:"Module"})),Ve=j({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ke=j({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Xe=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Ve,base58flickr:Ke},Symbol.toStringTag,{value:"Module"})),Ge=E({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),ke=E({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Je=E({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Le=E({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Qe=Object.freeze(Object.defineProperty({__proto__:null,base64:Ge,base64pad:ke,base64url:Je,base64urlpad:Le},Symbol.toStringTag,{value:"Module"})),ue=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ze=ue.reduce((e,t,u)=>(e[u]=t,e),[]),xe=ue.reduce((e,t,u)=>(e[t.codePointAt(0)]=u,e),[]);function et(e){return e.reduce((t,u)=>(t+=Ze[u],t),"")}function tt(e){const t=[];for(const u of e){const r=xe[u.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${u}`);t.push(r)}return new Uint8Array(t)}const ut=M({prefix:"🚀",name:"base256emoji",encode:et,decode:tt}),rt=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:ut},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;var re={};/*! *****************************************************************************
1
+ "use strict";const $=require("./index-B5H5W-MP.js");function ae(e,t){for(var u=0;u<t.length;u++){const r=t[u];if(typeof r!="string"&&!Array.isArray(r)){for(const D in r)if(D!=="default"&&!(D in e)){const n=Object.getOwnPropertyDescriptor(r,D);n&&Object.defineProperty(e,D,n.get?n:{enumerable:!0,get:()=>r[D]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var V=$.requireHash();const ee=$.getDefaultExportFromCjs(V),ie=ae({__proto__:null,default:ee},[V]);function oe(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var u=new Uint8Array(256),r=0;r<u.length;r++)u[r]=255;for(var D=0;D<e.length;D++){var n=e.charAt(D),a=n.charCodeAt(0);if(u[a]!==255)throw new TypeError(n+" is ambiguous");u[a]=D}var i=e.length,f=e.charAt(0),o=Math.log(i)/Math.log(256),s=Math.log(256)/Math.log(i);function h(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var d=0,w=0,_=0,C=c.length;_!==C&&c[_]===0;)_++,d++;for(var p=(C-_)*s+1>>>0,b=new Uint8Array(p);_!==C;){for(var O=c[_],m=0,y=p-1;(O!==0||m<w)&&y!==-1;y--,m++)O+=256*b[y]>>>0,b[y]=O%i>>>0,O=O/i>>>0;if(O!==0)throw new Error("Non-zero carry");w=m,_++}for(var S=p-w;S!==p&&b[S]===0;)S++;for(var R=f.repeat(d);S<p;++S)R+=e.charAt(b[S]);return R}function l(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var d=0;if(c[d]!==" "){for(var w=0,_=0;c[d]===f;)w++,d++;for(var C=(c.length-d)*o+1>>>0,p=new Uint8Array(C);c[d];){var b=u[c.charCodeAt(d)];if(b===255)return;for(var O=0,m=C-1;(b!==0||O<_)&&m!==-1;m--,O++)b+=i*p[m]>>>0,p[m]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");_=O,d++}if(c[d]!==" "){for(var y=C-_;y!==C&&p[y]===0;)y++;for(var S=new Uint8Array(w+(C-y)),R=w;y!==C;)S[R++]=p[y++];return S}}}function v(c){var d=l(c);if(d)return d;throw new Error(`Non-${t} character`)}return{encode:h,decodeUnsafe:l,decode:v}}var ce=oe,se=ce;const fe=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},le=e=>new TextEncoder().encode(e),Ee=e=>new TextDecoder().decode(e);class de{constructor(t,u,r){this.name=t,this.prefix=u,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class be{constructor(t,u,r){if(this.name=t,this.prefix=u,u.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=u.codePointAt(0),this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return te(this,t)}}class he{constructor(t){this.decoders=t}or(t){return te(this,t)}decode(t){const u=t[0],r=this.decoders[u];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const te=(e,t)=>new he({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class _e{constructor(t,u,r,D){this.name=t,this.prefix=u,this.baseEncode=r,this.baseDecode=D,this.encoder=new de(t,u,r),this.decoder=new be(t,u,D)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const M=({name:e,prefix:t,encode:u,decode:r})=>new _e(e,t,u,r),j=({prefix:e,name:t,alphabet:u})=>{const{encode:r,decode:D}=se(u,t);return M({prefix:e,name:t,encode:r,decode:n=>fe(D(n))})},ye=(e,t,u,r)=>{const D={};for(let s=0;s<t.length;++s)D[t[s]]=s;let n=e.length;for(;e[n-1]==="=";)--n;const a=new Uint8Array(n*u/8|0);let i=0,f=0,o=0;for(let s=0;s<n;++s){const h=D[e[s]];if(h===void 0)throw new SyntaxError(`Non-${r} character`);f=f<<u|h,i+=u,i>=8&&(i-=8,a[o++]=255&f>>i)}if(i>=u||255&f<<8-i)throw new SyntaxError("Unexpected end of data");return a},Ce=(e,t,u)=>{const r=t[t.length-1]==="=",D=(1<<u)-1;let n="",a=0,i=0;for(let f=0;f<e.length;++f)for(i=i<<8|e[f],a+=8;a>u;)a-=u,n+=t[D&i>>a];if(a&&(n+=t[D&i<<u-a]),r)for(;n.length*u&7;)n+="=";return n},E=({name:e,prefix:t,bitsPerChar:u,alphabet:r})=>M({prefix:t,name:e,encode(D){return Ce(D,r,u)},decode(D){return ye(D,r,u,e)}}),pe=M({prefix:"\0",name:"identity",encode:e=>Ee(e),decode:e=>le(e)}),Oe=Object.freeze(Object.defineProperty({__proto__:null,identity:pe},Symbol.toStringTag,{value:"Module"})),Se=E({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),ve=Object.freeze(Object.defineProperty({__proto__:null,base2:Se},Symbol.toStringTag,{value:"Module"})),me=E({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),we=Object.freeze(Object.defineProperty({__proto__:null,base8:me},Symbol.toStringTag,{value:"Module"})),ge=j({prefix:"9",name:"base10",alphabet:"0123456789"}),Ae=Object.freeze(Object.defineProperty({__proto__:null,base10:ge},Symbol.toStringTag,{value:"Module"})),Te=E({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ne=E({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Fe=Object.freeze(Object.defineProperty({__proto__:null,base16:Te,base16upper:Ne},Symbol.toStringTag,{value:"Module"})),Ue=E({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),je=E({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Re=E({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Me=E({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Pe=E({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ie=E({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Be=E({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ye=E({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),He=E({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),We=Object.freeze(Object.defineProperty({__proto__:null,base32:Ue,base32hex:Pe,base32hexpad:Be,base32hexpadupper:Ye,base32hexupper:Ie,base32pad:Re,base32padupper:Me,base32upper:je,base32z:He},Symbol.toStringTag,{value:"Module"})),qe=j({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ze=j({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$e=Object.freeze(Object.defineProperty({__proto__:null,base36:qe,base36upper:ze},Symbol.toStringTag,{value:"Module"})),Ve=j({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ke=j({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Xe=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Ve,base58flickr:Ke},Symbol.toStringTag,{value:"Module"})),Ge=E({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),ke=E({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Je=E({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Le=E({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Qe=Object.freeze(Object.defineProperty({__proto__:null,base64:Ge,base64pad:ke,base64url:Je,base64urlpad:Le},Symbol.toStringTag,{value:"Module"})),ue=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ze=ue.reduce((e,t,u)=>(e[u]=t,e),[]),xe=ue.reduce((e,t,u)=>(e[t.codePointAt(0)]=u,e),[]);function et(e){return e.reduce((t,u)=>(t+=Ze[u],t),"")}function tt(e){const t=[];for(const u of e){const r=xe[u.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${u}`);t.push(r)}return new Uint8Array(t)}const ut=M({prefix:"🚀",name:"base256emoji",encode:et,decode:tt}),rt=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:ut},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;var re={};/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-H9KqFgmp.js"),ko=require("./dijkstra-CtFxn7S9.js"),Mo=require("./index-WOTkpZNS.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-BDTERphb.js"),ko=require("./dijkstra-CtFxn7S9.js"),Mo=require("./index-B5H5W-MP.js");/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- "use strict";var Tr=Object.defineProperty;var vr=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var F=(e,t,r)=>vr(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./index-WOTkpZNS.js"),ke=require("./sui-K4_elpRl.js"),Er=require("./unsignedTransaction-DzSLsK-p.js");class xr extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...a}=t,{path:o}=t,u=o.length===0?i:`At path: ${o.join(".")} -- ${i}`;super(s??u),s!=null&&(this.cause=u),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function jr(e){return z(e)&&typeof e[Symbol.iterator]=="function"}function z(e){return typeof e=="object"&&e!=null}function V(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Ir(e){const{done:t,value:r}=e.next();return t?void 0:r}function Or(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:a}=r,{refinement:o,message:u=`Expected a value of type \`${a}\`${o?` with refinement \`${o}\``:""}, but received: \`${V(n)}\``}=e;return{value:n,type:a,refinement:o,key:i[i.length-1],path:i,branch:s,...e,message:u}}function*Nt(e,t,r,n){jr(e)||(e=[e]);for(const i of e){const s=Or(i,t,r,n);s&&(yield s)}}function*at(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,o={path:n,branch:i};if(s&&(e=t.coercer(e,o),a&&t.type!=="type"&&z(t.schema)&&z(e)&&!Array.isArray(e)))for(const d in e)t.schema[d]===void 0&&delete e[d];let u="valid";for(const d of t.validator(e,o))d.explanation=r.message,u="not_valid",yield[d,void 0];for(let[d,l,g]of t.entries(e,o)){const m=at(l,g,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,l],coerce:s,mask:a,message:r.message});for(const p of m)p[0]?(u=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):s&&(l=p[1],d===void 0?e=l:e instanceof Map?e.set(d,l):e instanceof Set?e.add(l):z(e)&&(l!==void 0||d in e)&&(e[d]=l))}if(u!=="not_valid")for(const d of t.refiner(e,o))d.explanation=r.message,u="not_refined",yield[d,void 0];u==="valid"&&(yield[void 0,e])}class Y{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:a=u=>u,entries:o=function*(){}}=t;this.type=r,this.schema=n,this.entries=o,this.coercer=a,i?this.validator=(u,d)=>{const l=i(u,d);return Nt(l,d,this,u)}:this.validator=()=>[],s?this.refiner=(u,d)=>{const l=s(u,d);return Nt(l,d,this,u)}:this.refiner=()=>[]}assert(t,r){return Qe(t,this,r)}create(t,r){return Gt(t,this,r)}is(t){return N(t,this)}mask(t,r){return Ft(t,this,r)}validate(t,r={}){return xe(t,this,r)}}function Qe(e,t,r){const n=xe(e,t,{message:r});if(n[0])throw n[0]}function Gt(e,t,r){const n=xe(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Ft(e,t,r){const n=xe(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function N(e,t){return!xe(e,t)[0]}function xe(e,t,r={}){const n=at(e,t,r),i=Ir(n);return i[0]?[new xr(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function be(...e){const t=e[0].type==="type",r=e.map(i=>i.schema),n=Object.assign({},...r);return t?kr(n):h(n)}function P(e,t){return new Y({type:e,schema:null,validator:t})}function et(){return P("any",()=>!0)}function v(e){return new Y({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${V(t)}`}})}function Ar(){return P("bigint",e=>typeof e=="bigint")}function U(){return P("boolean",e=>typeof e=="boolean")}function Z(){return P("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${V(e)}`)}function b(e){const t=V(e),r=typeof e;return new Y({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${V(n)}`}})}function Lt(){return P("never",()=>!1)}function O(e){return new Y({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function de(){return P("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${V(e)}`)}function h(e){const t=e?Object.keys(e):[],r=Lt();return new Y({type:"object",schema:e||null,*entries(n){if(e&&z(n)){const i=new Set(Object.keys(n));for(const s of t)i.delete(s),yield[s,n[s],e[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return z(n)||`Expected an object, but received: ${V(n)}`},coercer(n){return z(n)?{...n}:n}})}function w(e){return new Y({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function X(e,t){return new Y({type:"record",schema:null,*entries(r){if(z(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return z(r)||`Expected an object, but received: ${V(r)}`}})}function f(){return P("string",e=>typeof e=="string"||`Expected a string, but received: ${V(e)}`)}function Kt(e){const t=Lt();return new Y({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${V(r)}`}})}function kr(e){const t=Object.keys(e);return new Y({type:"type",schema:e,*entries(r){if(z(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return z(r)||`Expected an object, but received: ${V(r)}`},coercer(r){return z(r)?{...r}:r}})}function k(e){const t=e.map(r=>r.type).join(" | ");return new Y({type:"union",schema:null,coercer(r){for(const n of e){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of e){const[...a]=at(r,s,n),[o]=a;if(o[0])for(const[u]of a)u&&i.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${V(r)}`,...i]}})}function Wt(){return P("unknown",()=>!0)}const ot=k([h({AddressOwner:f()}),h({ObjectOwner:f()}),h({Shared:h({initial_shared_version:O(f())})}),b("Immutable")]);P("SuiJsonValue",()=>!0);const _r=k([h({u32:f()}),h({u64:f()}),h({f64:f()})]);h({attributes:X(f(),O(_r)),featureFlags:X(f(),U()),maxSupportedProtocolVersion:f(),minSupportedProtocolVersion:f(),protocolVersion:f()});k([f(),b("package")]);const ae=h({digest:f(),objectId:f(),version:k([de(),f(),Ar()])});h({owner:ot,reference:ae});h({objectId:f(),sequenceNumber:f()});h({payment:v(ae),owner:f(),price:f(),budget:f()});const Cr=be(ae,h({type:f(),owner:ot,previousTransaction:f()})),$r=X(f(),et()),Mr=X(f(),Wt()),Ur=h({type:f(),fields:$r,hasPublicTransfer:U()}),Br=h({disassembled:Mr}),Rr=k([be(Ur,h({dataType:b("moveObject")})),be(Br,h({dataType:b("package")}))]),Nr=h({type:f(),hasPublicTransfer:U(),version:f(),bcsBytes:f()}),Pr=h({id:f(),moduleMap:X(f(),f())}),Dr=k([be(Nr,h({dataType:b("moveObject")})),be(Pr,h({dataType:b("package")}))]);BigInt(1e9);const Jt=h({code:f(),error:w(f()),object_id:w(f()),parent_object_id:w(f()),version:w(f()),digest:w(f())}),zr=h({data:O(w(X(f(),f()))),error:O(w(Jt))}),Vr=k([zr,w(X(f(),f()))]),Ht=h({objectId:f(),version:f(),digest:f(),type:O(w(f())),content:O(w(Rr)),bcs:O(w(Dr)),owner:O(w(ot)),previousTransaction:O(w(f())),storageRebate:O(w(f())),display:O(w(Vr))});h({showType:O(w(U())),showContent:O(w(U())),showBcs:O(w(U())),showOwner:O(w(U())),showPreviousTransaction:O(w(U())),showStorageRebate:O(w(U())),showDisplay:O(w(U()))});k([b("Exists"),b("notExists"),b("Deleted")]);v(Cr);const Gr=h({data:O(w(Ht)),error:O(w(Jt))});function Fr(e){return e.data}function Lr(e){if(e.error&&"object_id"in e.error&&"version"in e.error&&"digest"in e.error){const t=e.error;return{objectId:t.object_id,version:t.version,digest:t.digest}}}function Pt(e){if("reference"in e)return e.reference;const t=Fr(e);return t?{objectId:t.objectId,version:t.version,digest:t.digest}:Lr(e)}h({objectId:f(),atCheckpoint:w(de())});h({data:v(Gr),nextCursor:w(O(f())),hasNextPage:U()});k([h({details:Ht,status:b("VersionFound")}),h({details:f(),status:b("ObjectNotExists")}),h({details:ae,status:b("ObjectDeleted")}),h({details:Kt([f(),de()]),status:b("VersionNotFound")}),h({details:h({asked_version:de(),latest_version:de(),object_id:f()}),status:b("VersionTooHigh")})]);const Kr=k([f(),h({Object:f()})]);v(Kr);const Wr=h({address:f(),name:f()}),Jr=k([b("Private"),b("Public"),b("Friend")]),ct=h({abilities:v(f())}),Hr=h({constraints:ct,isPhantom:U()}),Xr=h({TypeParameter:de()}),Ke=Kt([h({module:f(),package:f(),function:f()}),f()]);h({rank3Days:v(Ke),rank7Days:v(Ke),rank30Days:v(Ke)});function Xt(e){if(!e)return!1;if(typeof e=="string"||N(e,Xr)||qt(e))return!0;if(typeof e!="object")return!1;const t=e;return!!(N(t.Reference,he)||N(t.MutableReference,he)||N(t.Vector,he))}const he=P("SuiMoveNormalizedType",Xt);function qt(e){if(!e||typeof e!="object")return!1;const t=e;if(!t.Struct||typeof t.Struct!="object")return!1;const r=t.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>Xt(n)))}P("SuiMoveNormalizedStructType",qt);const qr=h({visibility:Jr,isEntry:U(),typeParameters:v(ct),parameters:v(he),return:v(he)}),Zr=h({name:f(),type:he}),Yr=h({abilities:ct,typeParameters:v(Hr),fields:v(Zr)}),Qr=h({fileFormatVersion:de(),address:f(),name:f(),friends:v(Wr),structs:X(f(),Yr),exposedFunctions:X(f(),qr)});X(f(),Qr);function tt(e){return typeof e=="object"&&"MutableReference"in e?e.MutableReference:void 0}function Zt(e){return typeof e=="object"&&"Reference"in e?e.Reference:void 0}function ut(e){if(typeof e=="object"&&"Struct"in e)return e;const t=Zt(e),r=tt(e);if(typeof t=="object"&&"Struct"in t)return t;if(typeof r=="object"&&"Struct"in r)return r}function en(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),s=i.charCodeAt(0);if(t[s]!==255)throw new TypeError(i+" is ambiguous");t[s]=n}var a=e.length,o=e.charAt(0),u=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function l(p){if(p instanceof Uint8Array||(ArrayBuffer.isView(p)?p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength):Array.isArray(p)&&(p=Uint8Array.from(p))),!(p instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(p.length===0)return"";for(var y=0,S=0,E=0,A=p.length;E!==A&&p[E]===0;)E++,y++;for(var _=(A-E)*d+1>>>0,D=new Uint8Array(_);E!==A;){for(var q=p[E],ie=0,G=_-1;(q!==0||ie<S)&&G!==-1;G--,ie++)q+=256*D[G]>>>0,D[G]=q%a>>>0,q=q/a>>>0;if(q!==0)throw new Error("Non-zero carry");S=ie,E++}for(var Q=_-S;Q!==_&&D[Q]===0;)Q++;for(var Ae=o.repeat(y);Q<_;++Q)Ae+=e.charAt(D[Q]);return Ae}function g(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;for(var y=0,S=0,E=0;p[y]===o;)S++,y++;for(var A=(p.length-y)*u+1>>>0,_=new Uint8Array(A);p[y];){var D=t[p.charCodeAt(y)];if(D===255)return;for(var q=0,ie=A-1;(D!==0||q<E)&&ie!==-1;ie--,q++)D+=a*_[ie]>>>0,_[ie]=D%256>>>0,D=D/256>>>0;if(D!==0)throw new Error("Non-zero carry");E=q,y++}for(var G=A-E;G!==A&&_[G]===0;)G++;for(var Q=new Uint8Array(S+(A-G)),Ae=S;G!==A;)Q[Ae++]=_[G++];return Q}function m(p){var y=g(p);if(y)return y;throw new Error("Non-base"+a+" character")}return{encode:l,decodeUnsafe:g,decode:m}}var tn=en;const rn=tn,nn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var sn=rn(nn);const Yt=K.getDefaultExportFromCjs(sn),je=e=>Yt.encode(e),dt=e=>Yt.decode(e);function oe(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}const We=8192;function Ie(e){if(e.length<We)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=We){const n=e.slice(r,r+We);t+=String.fromCharCode(...n)}return btoa(t)}function Fe(e){var i;const t=e.startsWith("0x")?e.slice(2):e,n=((i=(t.length%2===0?t:`0${t}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function Oe(e){return e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),"")}function ft(e){let t=[],r=0;if(e===0)return[0];for(;e>0;)t[r]=e&127,(e>>=7)&&(t[r]|=128),r+=1;return t}function an(e){let t=0,r=0,n=0;for(;;){let i=e[n];if(n+=1,t|=(i&127)<<r,!(i&128))break;r+=7}return{value:t,length:n}}class Qt{constructor(t){this.bytePosition=0,this.dataView=new DataView(t.buffer)}shift(t){return this.bytePosition+=t,this}read8(){let t=this.dataView.getUint8(this.bytePosition);return this.shift(1),t}read16(){let t=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),t}read32(){let t=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),t}read64(){let t=this.read32(),n=this.read32().toString(16)+t.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let t=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+t.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let t=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+t.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(t){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,t);return this.shift(t),n}readULEB(){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t),{value:n,length:i}=an(r);return this.shift(i),n}readVec(t){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(t(this,i,r));return n}}function on(e,t){switch(t){case"base58":return je(e);case"base64":return Ie(e);case"hex":return Oe(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function cn(e,t){switch(t){case"base58":return dt(e);case"base64":return oe(e);case"hex":return Fe(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function er(e,t=["<",">"]){const[r,n]=t,i=[];let s="",a=0;for(let o=0;o<e.length;o++){const u=e[o];if(u===r&&a++,u===n&&a--,a===0&&u===","){i.push(s.trim()),s="";continue}s+=u}return i.push(s.trim()),i}class tr{constructor({size:t=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=t,this.maxSize=r||t,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(t))}ensureSizeOrGrow(t){const r=this.bytePosition+t;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(t){return this.bytePosition+=t,this}write8(t){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(t)),this.shift(1)}write16(t){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(t),!0),this.shift(2)}write32(t){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(t),!0),this.shift(4)}write64(t){return Je(BigInt(t),8).forEach(r=>this.write8(r)),this}write128(t){return Je(BigInt(t),16).forEach(r=>this.write8(r)),this}write256(t){return Je(BigInt(t),32).forEach(r=>this.write8(r)),this}writeULEB(t){return ft(t).forEach(r=>this.write8(r)),this}writeVec(t,r){return this.writeULEB(t.length),Array.from(t).forEach((n,i)=>r(this,n,i,t.length)),this}*[Symbol.iterator](){for(let t=0;t<this.bytePosition;t++)yield this.dataView.getUint8(t);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(t){return on(this.toBytes(),t)}}function Je(e,t){let r=new Uint8Array(t),n=0;for(;e>0;)r[n]=Number(e%BigInt(256)),e=e/BigInt(256),n+=1;return r}var rr=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},W=(e,t,r)=>(rr(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Pe=(e,t,r,n)=>(rr(e,t,"write to private field"),t.set(e,r),r),le,pe,Me,se;const nr=class{constructor(e){Ne(this,le,void 0),Ne(this,pe,void 0),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),Pe(this,le,e.write),Pe(this,pe,e.serialize??((t,r)=>{const n=new tr({size:this.serializedSize(t)??void 0,...r});return W(this,le).call(this,t,n),n.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),W(this,le).call(this,e,t)}serialize(e,t){return this.validate(e),new un(this,W(this,pe).call(this,e,t))}parse(e){const t=new Qt(e);return this.read(t)}transform({name:e,input:t,output:r}){return new nr({name:e??this.name,read:n=>r(this.read(n)),write:(n,i)=>W(this,le).call(this,t(n),i),serializedSize:n=>this.serializedSize(t(n)),serialize:(n,i)=>W(this,pe).call(this,t(n),i),validate:n=>this.validate(t(n))})}};let J=nr;le=new WeakMap;pe=new WeakMap;const ir=Symbol.for("@mysten/serialized-bcs");function lt(e){return!!e&&typeof e=="object"&&e[ir]===!0}class un{constructor(t,r){Ne(this,Me,void 0),Ne(this,se,void 0),Pe(this,Me,t),Pe(this,se,r)}get[ir](){return!0}toBytes(){return W(this,se)}toHex(){return Oe(W(this,se))}toBase64(){return Ie(W(this,se))}toBase58(){return je(W(this,se))}parse(){return W(this,Me).parse(W(this,se))}}Me=new WeakMap;se=new WeakMap;function De({size:e,...t}){return new J({...t,serializedSize:()=>e})}function He({readMethod:e,writeMethod:t,...r}){return De({...r,read:n=>n[e](),write:(n,i)=>i[t](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function Xe({readMethod:e,writeMethod:t,...r}){return De({...r,read:n=>n[e](),write:(n,i)=>i[t](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function dn({serialize:e,...t}){const r=new J({...t,serialize:e,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function fn({toBytes:e,fromBytes:t,...r}){return new J({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return t(s)},write:(n,i)=>{const s=e(n);i.writeULEB(s.length);for(let a=0;a<s.length;a++)i.write8(s[a])},serialize:n=>{const i=e(n),s=ft(i.length),a=new Uint8Array(s.length+i.length);return a.set(s,0),a.set(i,s.length),a},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function ln(e){let t=null;function r(){return t||(t=e()),t}return new J({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const c={u8(e){return He({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...e})},u16(e){return He({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...e})},u32(e){return He({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e})},u64(e){return Xe({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e})},u128(e){return Xe({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e})},u256(e){return Xe({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e})},bool(e){return De({name:"bool",size:1,read:t=>t.read8()===1,write:(t,r)=>r.write8(t?1:0),...e,validate:t=>{var r;if((r=e==null?void 0:e.validate)==null||r.call(e,t),typeof t!="boolean")throw new TypeError(`Expected boolean, found ${typeof t}`)}})},uleb128(e){return dn({name:"uleb128",read:t=>t.readULEB(),serialize:t=>Uint8Array.from(ft(t)),...e})},bytes(e,t){return De({name:`bytes[${e}]`,size:e,read:r=>r.readBytes(e),write:(r,n)=>{for(let i=0;i<e;i++)n.write8(r[i]??0)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}})},string(e){return fn({name:"string",toBytes:t=>new TextEncoder().encode(t),fromBytes:t=>new TextDecoder().decode(t),...e})},fixedArray(e,t,r){return new J({name:`${t.name}[${e}]`,read:n=>{const i=new Array(e);for(let s=0;s<e;s++)i[s]=t.read(n);return i},write:(n,i)=>{for(const s of n)t.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==e)throw new TypeError(`Expected array of length ${e}, found ${n.length}`)}})},option(e){return c.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:t=>t==null?{None:!0}:{Some:t},output:t=>"Some"in t?t.Some:null})},vector(e,t){return new J({name:`vector<${e.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=e.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)e.write(i,n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(e,t){return new J({name:`(${e.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<e.length;i++){const s=e[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of e)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<e.length;i++)e[i].write(r[i],n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}})},struct(e,t,r){const n=Object.entries(t);return new J({name:e,serializedSize:i=>{let s=0;for(const[a,o]of n){const u=o.serializedSize(i[a]);if(u==null)return null;s+=u}return s},read:i=>{const s={};for(const[a,o]of n)s[a]=o.read(i);return s},write:(i,s)=>{for(const[a,o]of n)o.write(i[a],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(e,t,r){const n=Object.entries(t);return new J({name:e,read:i=>{const s=i.readULEB(),[a,o]=n[s];return{[a]:(o==null?void 0:o.read(i))??!0}},write:(i,s)=>{const[a,o]=Object.entries(i)[0];for(let u=0;u<n.length;u++){const[d,l]=n[u];if(d===a){s.writeULEB(u),l==null||l.write(o,s);return}}},...r,validate:i=>{var o;if((o=r==null?void 0:r.validate)==null||o.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[a]=s;if(!Object.hasOwn(t,a))throw new TypeError(`Invalid enum variant ${a}`)}})},map(e,t){return c.vector(c.tuple([e,t])).transform({name:`Map<${e.name}, ${t.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(e,t){return(...r)=>t(...r).transform({name:`${t.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(e){return ln(e)}},hn=32,me=class{constructor(e){if(this.types=new Map,this.counter=0,e instanceof me){this.schema=e.schema,this.types=new Map(e.types);return}if(this.schema=e,this.registerAddressType(me.ADDRESS,e.addressLength,e.addressEncoding),this.registerVectorType(e.vectorType),e.types&&e.types.structs)for(let t of Object.keys(e.types.structs))this.registerStructType(t,e.types.structs[t]);if(e.types&&e.types.enums)for(let t of Object.keys(e.types.enums))this.registerEnumType(t,e.types.enums[t]);if(e.types&&e.types.aliases)for(let t of Object.keys(e.types.aliases))this.registerAlias(t,e.types.aliases[t]);e.withPrimitives!==!1&&gn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(e,t,r){if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).encode(this,t,r,i)}if(typeof e=="object"){const n=this.tempKey();return new me(this).registerStructType(n,e).ser(n,t,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
1
+ "use strict";var Tr=Object.defineProperty;var vr=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var F=(e,t,r)=>vr(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./index-B5H5W-MP.js"),ke=require("./sui-fKD7sV9G.js"),Er=require("./unsignedTransaction-DzSLsK-p.js");class xr extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...a}=t,{path:o}=t,u=o.length===0?i:`At path: ${o.join(".")} -- ${i}`;super(s??u),s!=null&&(this.cause=u),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function jr(e){return z(e)&&typeof e[Symbol.iterator]=="function"}function z(e){return typeof e=="object"&&e!=null}function V(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Ir(e){const{done:t,value:r}=e.next();return t?void 0:r}function Or(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:a}=r,{refinement:o,message:u=`Expected a value of type \`${a}\`${o?` with refinement \`${o}\``:""}, but received: \`${V(n)}\``}=e;return{value:n,type:a,refinement:o,key:i[i.length-1],path:i,branch:s,...e,message:u}}function*Nt(e,t,r,n){jr(e)||(e=[e]);for(const i of e){const s=Or(i,t,r,n);s&&(yield s)}}function*at(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,o={path:n,branch:i};if(s&&(e=t.coercer(e,o),a&&t.type!=="type"&&z(t.schema)&&z(e)&&!Array.isArray(e)))for(const d in e)t.schema[d]===void 0&&delete e[d];let u="valid";for(const d of t.validator(e,o))d.explanation=r.message,u="not_valid",yield[d,void 0];for(let[d,l,g]of t.entries(e,o)){const m=at(l,g,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,l],coerce:s,mask:a,message:r.message});for(const p of m)p[0]?(u=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):s&&(l=p[1],d===void 0?e=l:e instanceof Map?e.set(d,l):e instanceof Set?e.add(l):z(e)&&(l!==void 0||d in e)&&(e[d]=l))}if(u!=="not_valid")for(const d of t.refiner(e,o))d.explanation=r.message,u="not_refined",yield[d,void 0];u==="valid"&&(yield[void 0,e])}class Y{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:a=u=>u,entries:o=function*(){}}=t;this.type=r,this.schema=n,this.entries=o,this.coercer=a,i?this.validator=(u,d)=>{const l=i(u,d);return Nt(l,d,this,u)}:this.validator=()=>[],s?this.refiner=(u,d)=>{const l=s(u,d);return Nt(l,d,this,u)}:this.refiner=()=>[]}assert(t,r){return Qe(t,this,r)}create(t,r){return Gt(t,this,r)}is(t){return N(t,this)}mask(t,r){return Ft(t,this,r)}validate(t,r={}){return xe(t,this,r)}}function Qe(e,t,r){const n=xe(e,t,{message:r});if(n[0])throw n[0]}function Gt(e,t,r){const n=xe(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Ft(e,t,r){const n=xe(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function N(e,t){return!xe(e,t)[0]}function xe(e,t,r={}){const n=at(e,t,r),i=Ir(n);return i[0]?[new xr(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function be(...e){const t=e[0].type==="type",r=e.map(i=>i.schema),n=Object.assign({},...r);return t?kr(n):h(n)}function P(e,t){return new Y({type:e,schema:null,validator:t})}function et(){return P("any",()=>!0)}function v(e){return new Y({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${V(t)}`}})}function Ar(){return P("bigint",e=>typeof e=="bigint")}function U(){return P("boolean",e=>typeof e=="boolean")}function Z(){return P("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${V(e)}`)}function b(e){const t=V(e),r=typeof e;return new Y({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${V(n)}`}})}function Lt(){return P("never",()=>!1)}function O(e){return new Y({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function de(){return P("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${V(e)}`)}function h(e){const t=e?Object.keys(e):[],r=Lt();return new Y({type:"object",schema:e||null,*entries(n){if(e&&z(n)){const i=new Set(Object.keys(n));for(const s of t)i.delete(s),yield[s,n[s],e[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return z(n)||`Expected an object, but received: ${V(n)}`},coercer(n){return z(n)?{...n}:n}})}function w(e){return new Y({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function X(e,t){return new Y({type:"record",schema:null,*entries(r){if(z(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return z(r)||`Expected an object, but received: ${V(r)}`}})}function f(){return P("string",e=>typeof e=="string"||`Expected a string, but received: ${V(e)}`)}function Kt(e){const t=Lt();return new Y({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${V(r)}`}})}function kr(e){const t=Object.keys(e);return new Y({type:"type",schema:e,*entries(r){if(z(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return z(r)||`Expected an object, but received: ${V(r)}`},coercer(r){return z(r)?{...r}:r}})}function k(e){const t=e.map(r=>r.type).join(" | ");return new Y({type:"union",schema:null,coercer(r){for(const n of e){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of e){const[...a]=at(r,s,n),[o]=a;if(o[0])for(const[u]of a)u&&i.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${V(r)}`,...i]}})}function Wt(){return P("unknown",()=>!0)}const ot=k([h({AddressOwner:f()}),h({ObjectOwner:f()}),h({Shared:h({initial_shared_version:O(f())})}),b("Immutable")]);P("SuiJsonValue",()=>!0);const _r=k([h({u32:f()}),h({u64:f()}),h({f64:f()})]);h({attributes:X(f(),O(_r)),featureFlags:X(f(),U()),maxSupportedProtocolVersion:f(),minSupportedProtocolVersion:f(),protocolVersion:f()});k([f(),b("package")]);const ae=h({digest:f(),objectId:f(),version:k([de(),f(),Ar()])});h({owner:ot,reference:ae});h({objectId:f(),sequenceNumber:f()});h({payment:v(ae),owner:f(),price:f(),budget:f()});const Cr=be(ae,h({type:f(),owner:ot,previousTransaction:f()})),$r=X(f(),et()),Mr=X(f(),Wt()),Ur=h({type:f(),fields:$r,hasPublicTransfer:U()}),Br=h({disassembled:Mr}),Rr=k([be(Ur,h({dataType:b("moveObject")})),be(Br,h({dataType:b("package")}))]),Nr=h({type:f(),hasPublicTransfer:U(),version:f(),bcsBytes:f()}),Pr=h({id:f(),moduleMap:X(f(),f())}),Dr=k([be(Nr,h({dataType:b("moveObject")})),be(Pr,h({dataType:b("package")}))]);BigInt(1e9);const Jt=h({code:f(),error:w(f()),object_id:w(f()),parent_object_id:w(f()),version:w(f()),digest:w(f())}),zr=h({data:O(w(X(f(),f()))),error:O(w(Jt))}),Vr=k([zr,w(X(f(),f()))]),Ht=h({objectId:f(),version:f(),digest:f(),type:O(w(f())),content:O(w(Rr)),bcs:O(w(Dr)),owner:O(w(ot)),previousTransaction:O(w(f())),storageRebate:O(w(f())),display:O(w(Vr))});h({showType:O(w(U())),showContent:O(w(U())),showBcs:O(w(U())),showOwner:O(w(U())),showPreviousTransaction:O(w(U())),showStorageRebate:O(w(U())),showDisplay:O(w(U()))});k([b("Exists"),b("notExists"),b("Deleted")]);v(Cr);const Gr=h({data:O(w(Ht)),error:O(w(Jt))});function Fr(e){return e.data}function Lr(e){if(e.error&&"object_id"in e.error&&"version"in e.error&&"digest"in e.error){const t=e.error;return{objectId:t.object_id,version:t.version,digest:t.digest}}}function Pt(e){if("reference"in e)return e.reference;const t=Fr(e);return t?{objectId:t.objectId,version:t.version,digest:t.digest}:Lr(e)}h({objectId:f(),atCheckpoint:w(de())});h({data:v(Gr),nextCursor:w(O(f())),hasNextPage:U()});k([h({details:Ht,status:b("VersionFound")}),h({details:f(),status:b("ObjectNotExists")}),h({details:ae,status:b("ObjectDeleted")}),h({details:Kt([f(),de()]),status:b("VersionNotFound")}),h({details:h({asked_version:de(),latest_version:de(),object_id:f()}),status:b("VersionTooHigh")})]);const Kr=k([f(),h({Object:f()})]);v(Kr);const Wr=h({address:f(),name:f()}),Jr=k([b("Private"),b("Public"),b("Friend")]),ct=h({abilities:v(f())}),Hr=h({constraints:ct,isPhantom:U()}),Xr=h({TypeParameter:de()}),Ke=Kt([h({module:f(),package:f(),function:f()}),f()]);h({rank3Days:v(Ke),rank7Days:v(Ke),rank30Days:v(Ke)});function Xt(e){if(!e)return!1;if(typeof e=="string"||N(e,Xr)||qt(e))return!0;if(typeof e!="object")return!1;const t=e;return!!(N(t.Reference,he)||N(t.MutableReference,he)||N(t.Vector,he))}const he=P("SuiMoveNormalizedType",Xt);function qt(e){if(!e||typeof e!="object")return!1;const t=e;if(!t.Struct||typeof t.Struct!="object")return!1;const r=t.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>Xt(n)))}P("SuiMoveNormalizedStructType",qt);const qr=h({visibility:Jr,isEntry:U(),typeParameters:v(ct),parameters:v(he),return:v(he)}),Zr=h({name:f(),type:he}),Yr=h({abilities:ct,typeParameters:v(Hr),fields:v(Zr)}),Qr=h({fileFormatVersion:de(),address:f(),name:f(),friends:v(Wr),structs:X(f(),Yr),exposedFunctions:X(f(),qr)});X(f(),Qr);function tt(e){return typeof e=="object"&&"MutableReference"in e?e.MutableReference:void 0}function Zt(e){return typeof e=="object"&&"Reference"in e?e.Reference:void 0}function ut(e){if(typeof e=="object"&&"Struct"in e)return e;const t=Zt(e),r=tt(e);if(typeof t=="object"&&"Struct"in t)return t;if(typeof r=="object"&&"Struct"in r)return r}function en(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),s=i.charCodeAt(0);if(t[s]!==255)throw new TypeError(i+" is ambiguous");t[s]=n}var a=e.length,o=e.charAt(0),u=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function l(p){if(p instanceof Uint8Array||(ArrayBuffer.isView(p)?p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength):Array.isArray(p)&&(p=Uint8Array.from(p))),!(p instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(p.length===0)return"";for(var y=0,S=0,E=0,A=p.length;E!==A&&p[E]===0;)E++,y++;for(var _=(A-E)*d+1>>>0,D=new Uint8Array(_);E!==A;){for(var q=p[E],ie=0,G=_-1;(q!==0||ie<S)&&G!==-1;G--,ie++)q+=256*D[G]>>>0,D[G]=q%a>>>0,q=q/a>>>0;if(q!==0)throw new Error("Non-zero carry");S=ie,E++}for(var Q=_-S;Q!==_&&D[Q]===0;)Q++;for(var Ae=o.repeat(y);Q<_;++Q)Ae+=e.charAt(D[Q]);return Ae}function g(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;for(var y=0,S=0,E=0;p[y]===o;)S++,y++;for(var A=(p.length-y)*u+1>>>0,_=new Uint8Array(A);p[y];){var D=t[p.charCodeAt(y)];if(D===255)return;for(var q=0,ie=A-1;(D!==0||q<E)&&ie!==-1;ie--,q++)D+=a*_[ie]>>>0,_[ie]=D%256>>>0,D=D/256>>>0;if(D!==0)throw new Error("Non-zero carry");E=q,y++}for(var G=A-E;G!==A&&_[G]===0;)G++;for(var Q=new Uint8Array(S+(A-G)),Ae=S;G!==A;)Q[Ae++]=_[G++];return Q}function m(p){var y=g(p);if(y)return y;throw new Error("Non-base"+a+" character")}return{encode:l,decodeUnsafe:g,decode:m}}var tn=en;const rn=tn,nn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var sn=rn(nn);const Yt=K.getDefaultExportFromCjs(sn),je=e=>Yt.encode(e),dt=e=>Yt.decode(e);function oe(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}const We=8192;function Ie(e){if(e.length<We)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=We){const n=e.slice(r,r+We);t+=String.fromCharCode(...n)}return btoa(t)}function Fe(e){var i;const t=e.startsWith("0x")?e.slice(2):e,n=((i=(t.length%2===0?t:`0${t}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function Oe(e){return e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),"")}function ft(e){let t=[],r=0;if(e===0)return[0];for(;e>0;)t[r]=e&127,(e>>=7)&&(t[r]|=128),r+=1;return t}function an(e){let t=0,r=0,n=0;for(;;){let i=e[n];if(n+=1,t|=(i&127)<<r,!(i&128))break;r+=7}return{value:t,length:n}}class Qt{constructor(t){this.bytePosition=0,this.dataView=new DataView(t.buffer)}shift(t){return this.bytePosition+=t,this}read8(){let t=this.dataView.getUint8(this.bytePosition);return this.shift(1),t}read16(){let t=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),t}read32(){let t=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),t}read64(){let t=this.read32(),n=this.read32().toString(16)+t.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let t=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+t.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let t=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+t.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(t){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,t);return this.shift(t),n}readULEB(){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t),{value:n,length:i}=an(r);return this.shift(i),n}readVec(t){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(t(this,i,r));return n}}function on(e,t){switch(t){case"base58":return je(e);case"base64":return Ie(e);case"hex":return Oe(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function cn(e,t){switch(t){case"base58":return dt(e);case"base64":return oe(e);case"hex":return Fe(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function er(e,t=["<",">"]){const[r,n]=t,i=[];let s="",a=0;for(let o=0;o<e.length;o++){const u=e[o];if(u===r&&a++,u===n&&a--,a===0&&u===","){i.push(s.trim()),s="";continue}s+=u}return i.push(s.trim()),i}class tr{constructor({size:t=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=t,this.maxSize=r||t,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(t))}ensureSizeOrGrow(t){const r=this.bytePosition+t;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(t){return this.bytePosition+=t,this}write8(t){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(t)),this.shift(1)}write16(t){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(t),!0),this.shift(2)}write32(t){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(t),!0),this.shift(4)}write64(t){return Je(BigInt(t),8).forEach(r=>this.write8(r)),this}write128(t){return Je(BigInt(t),16).forEach(r=>this.write8(r)),this}write256(t){return Je(BigInt(t),32).forEach(r=>this.write8(r)),this}writeULEB(t){return ft(t).forEach(r=>this.write8(r)),this}writeVec(t,r){return this.writeULEB(t.length),Array.from(t).forEach((n,i)=>r(this,n,i,t.length)),this}*[Symbol.iterator](){for(let t=0;t<this.bytePosition;t++)yield this.dataView.getUint8(t);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(t){return on(this.toBytes(),t)}}function Je(e,t){let r=new Uint8Array(t),n=0;for(;e>0;)r[n]=Number(e%BigInt(256)),e=e/BigInt(256),n+=1;return r}var rr=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},W=(e,t,r)=>(rr(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Pe=(e,t,r,n)=>(rr(e,t,"write to private field"),t.set(e,r),r),le,pe,Me,se;const nr=class{constructor(e){Ne(this,le,void 0),Ne(this,pe,void 0),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),Pe(this,le,e.write),Pe(this,pe,e.serialize??((t,r)=>{const n=new tr({size:this.serializedSize(t)??void 0,...r});return W(this,le).call(this,t,n),n.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),W(this,le).call(this,e,t)}serialize(e,t){return this.validate(e),new un(this,W(this,pe).call(this,e,t))}parse(e){const t=new Qt(e);return this.read(t)}transform({name:e,input:t,output:r}){return new nr({name:e??this.name,read:n=>r(this.read(n)),write:(n,i)=>W(this,le).call(this,t(n),i),serializedSize:n=>this.serializedSize(t(n)),serialize:(n,i)=>W(this,pe).call(this,t(n),i),validate:n=>this.validate(t(n))})}};let J=nr;le=new WeakMap;pe=new WeakMap;const ir=Symbol.for("@mysten/serialized-bcs");function lt(e){return!!e&&typeof e=="object"&&e[ir]===!0}class un{constructor(t,r){Ne(this,Me,void 0),Ne(this,se,void 0),Pe(this,Me,t),Pe(this,se,r)}get[ir](){return!0}toBytes(){return W(this,se)}toHex(){return Oe(W(this,se))}toBase64(){return Ie(W(this,se))}toBase58(){return je(W(this,se))}parse(){return W(this,Me).parse(W(this,se))}}Me=new WeakMap;se=new WeakMap;function De({size:e,...t}){return new J({...t,serializedSize:()=>e})}function He({readMethod:e,writeMethod:t,...r}){return De({...r,read:n=>n[e](),write:(n,i)=>i[t](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function Xe({readMethod:e,writeMethod:t,...r}){return De({...r,read:n=>n[e](),write:(n,i)=>i[t](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function dn({serialize:e,...t}){const r=new J({...t,serialize:e,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function fn({toBytes:e,fromBytes:t,...r}){return new J({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return t(s)},write:(n,i)=>{const s=e(n);i.writeULEB(s.length);for(let a=0;a<s.length;a++)i.write8(s[a])},serialize:n=>{const i=e(n),s=ft(i.length),a=new Uint8Array(s.length+i.length);return a.set(s,0),a.set(i,s.length),a},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function ln(e){let t=null;function r(){return t||(t=e()),t}return new J({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const c={u8(e){return He({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...e})},u16(e){return He({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...e})},u32(e){return He({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e})},u64(e){return Xe({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e})},u128(e){return Xe({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e})},u256(e){return Xe({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e})},bool(e){return De({name:"bool",size:1,read:t=>t.read8()===1,write:(t,r)=>r.write8(t?1:0),...e,validate:t=>{var r;if((r=e==null?void 0:e.validate)==null||r.call(e,t),typeof t!="boolean")throw new TypeError(`Expected boolean, found ${typeof t}`)}})},uleb128(e){return dn({name:"uleb128",read:t=>t.readULEB(),serialize:t=>Uint8Array.from(ft(t)),...e})},bytes(e,t){return De({name:`bytes[${e}]`,size:e,read:r=>r.readBytes(e),write:(r,n)=>{for(let i=0;i<e;i++)n.write8(r[i]??0)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}})},string(e){return fn({name:"string",toBytes:t=>new TextEncoder().encode(t),fromBytes:t=>new TextDecoder().decode(t),...e})},fixedArray(e,t,r){return new J({name:`${t.name}[${e}]`,read:n=>{const i=new Array(e);for(let s=0;s<e;s++)i[s]=t.read(n);return i},write:(n,i)=>{for(const s of n)t.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==e)throw new TypeError(`Expected array of length ${e}, found ${n.length}`)}})},option(e){return c.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:t=>t==null?{None:!0}:{Some:t},output:t=>"Some"in t?t.Some:null})},vector(e,t){return new J({name:`vector<${e.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=e.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)e.write(i,n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(e,t){return new J({name:`(${e.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<e.length;i++){const s=e[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of e)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<e.length;i++)e[i].write(r[i],n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}})},struct(e,t,r){const n=Object.entries(t);return new J({name:e,serializedSize:i=>{let s=0;for(const[a,o]of n){const u=o.serializedSize(i[a]);if(u==null)return null;s+=u}return s},read:i=>{const s={};for(const[a,o]of n)s[a]=o.read(i);return s},write:(i,s)=>{for(const[a,o]of n)o.write(i[a],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(e,t,r){const n=Object.entries(t);return new J({name:e,read:i=>{const s=i.readULEB(),[a,o]=n[s];return{[a]:(o==null?void 0:o.read(i))??!0}},write:(i,s)=>{const[a,o]=Object.entries(i)[0];for(let u=0;u<n.length;u++){const[d,l]=n[u];if(d===a){s.writeULEB(u),l==null||l.write(o,s);return}}},...r,validate:i=>{var o;if((o=r==null?void 0:r.validate)==null||o.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[a]=s;if(!Object.hasOwn(t,a))throw new TypeError(`Invalid enum variant ${a}`)}})},map(e,t){return c.vector(c.tuple([e,t])).transform({name:`Map<${e.name}, ${t.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(e,t){return(...r)=>t(...r).transform({name:`${t.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(e){return ln(e)}},hn=32,me=class{constructor(e){if(this.types=new Map,this.counter=0,e instanceof me){this.schema=e.schema,this.types=new Map(e.types);return}if(this.schema=e,this.registerAddressType(me.ADDRESS,e.addressLength,e.addressEncoding),this.registerVectorType(e.vectorType),e.types&&e.types.structs)for(let t of Object.keys(e.types.structs))this.registerStructType(t,e.types.structs[t]);if(e.types&&e.types.enums)for(let t of Object.keys(e.types.enums))this.registerEnumType(t,e.types.enums[t]);if(e.types&&e.types.aliases)for(let t of Object.keys(e.types.aliases))this.registerAlias(t,e.types.aliases[t]);e.withPrimitives!==!1&&gn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(e,t,r){if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).encode(this,t,r,i)}if(typeof e=="object"){const n=this.tempKey();return new me(this).registerStructType(n,e).ser(n,t,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
2
2
  ${JSON.stringify(e)}`)}de(e,t,r){if(typeof t=="string")if(r)t=cn(t,r);else throw new Error("To pass a string to `bcs.de`, specify encoding");if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).decode(this,t,i)}if(typeof e=="object"){const n=new me(this),i=this.tempKey();return n.registerStructType(i,e).de(i,t,r)}throw new Error(`Incorrect type passed into the '.de()' function.
3
3
  ${JSON.stringify(e)}`)}hasType(e){return this.types.has(e)}registerAlias(e,t){return this.types.set(e,t),this}registerType(e,t,r,n=()=>!0){const{name:i,params:s}=this.parseTypeName(e);return this.types.set(i,{encode(a,o,u,d){const l=s.reduce((g,m,p)=>Object.assign(g,{[m]:d[p]}),{});return this._encodeRaw.call(a,new tr(u),o,d,l)},decode(a,o,u){const d=s.reduce((l,g,m)=>Object.assign(l,{[g]:u[m]}),{});return this._decodeRaw.call(a,new Qt(o),u,d)},_encodeRaw(a,o,u,d){if(n(o))return t.call(this,a,o,u,d);throw new Error(`Validation failed for type ${i}, data: ${o}`)},_decodeRaw(a,o,u){return r.call(this,a,o,u)}}),this}registerBcsType(e,t){return this.registerType(e,(r,n,i)=>{const s=i.map(a=>new J({name:String(a),write:(o,u)=>{const{name:d,params:l}=this.parseTypeName(a),g=this.getTypeInterface(d),m=l.reduce((p,y,S)=>Object.assign(p,{[y]:i[S]}),{});return g._encodeRaw.call(this,u,o,l,m)},read:()=>{throw new Error("Not implemented")}}));return t(...s).write(n,r),r},(r,n)=>{const i=n.map(s=>new J({name:String(s),write:(a,o)=>{throw new Error("Not implemented")},read:a=>{const{name:o,params:u}=this.parseTypeName(s),d=this.getTypeInterface(o),l=u.reduce((g,m,p)=>Object.assign(g,{[m]:n[p]}),{});return d._decodeRaw.call(this,a,u,l)}}));return t(...i).read(r)}),this}registerAddressType(e,t,r="hex"){switch(r){case"base64":return this.registerType(e,function(i,s){return oe(s).reduce((a,o)=>a.write8(o),i)},function(i){return Ie(i.readBytes(t))});case"hex":return this.registerType(e,function(i,s){return Fe(s).reduce((a,o)=>a.write8(o),i)},function(i){return Oe(i.readBytes(t))});default:throw new Error("Unsupported encoding! Use either hex or base64")}}registerVectorType(e){let{name:t,params:r}=this.parseTypeName(e);if(r.length>1)throw new Error("Vector can have only one type parameter; got "+t);return this.registerType(e,function(i,s,a,o){return i.writeVec(s,(u,d)=>{let l=a[0];if(!l)throw new Error(`Incorrect number of type parameters passed a to vector '${e}'`);let{name:g,params:m}=this.parseTypeName(l);if(this.hasType(g))return this.getTypeInterface(g)._encodeRaw.call(this,u,d,m,o);if(!(g in o))throw new Error(`Unable to find a matching type definition for ${g} in vector; make sure you passed a generic`);let{name:p,params:y}=this.parseTypeName(o[g]);return this.getTypeInterface(p)._encodeRaw.call(this,u,d,y,o)})},function(i,s,a){return i.readVec(o=>{let u=s[0];if(!u)throw new Error(`Incorrect number of type parameters passed to a vector '${e}'`);let{name:d,params:l}=this.parseTypeName(u);if(this.hasType(d))return this.getTypeInterface(d)._decodeRaw.call(this,o,l,a);if(!(d in a))throw new Error(`Unable to find a matching type definition for ${d} in vector; make sure you passed a generic`);let{name:g,params:m}=this.parseTypeName(a[d]);return this.getTypeInterface(g)._decodeRaw.call(this,o,m,a)})})}registerStructType(e,t){for(let a in t){let o=this.tempKey(),u=t[a];!Array.isArray(u)&&typeof u!="string"&&(t[a]=o,this.registerStructType(o,u))}let r=Object.freeze(t),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(e);return this.registerType(e,function(o,u,d,l){if(!u||u.constructor!==Object)throw new Error(`Expected ${i} to be an Object, got: ${u}`);if(d.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${d.length}`);for(let g of n){if(!(g in u))throw new Error(`Struct ${i} requires field ${g}:${r[g]}`);const{name:m,params:p}=this.parseTypeName(r[g]);if(!s.includes(m))this.getTypeInterface(m)._encodeRaw.call(this,o,u[g],p,l);else{const y=s.indexOf(m);let{name:S,params:E}=this.parseTypeName(d[y]);if(this.hasType(S)){this.getTypeInterface(S)._encodeRaw.call(this,o,u[g],E,l);continue}if(!(S in l))throw new Error(`Unable to find a matching type definition for ${S} in ${i}; make sure you passed a generic`);let{name:A,params:_}=this.parseTypeName(l[S]);this.getTypeInterface(A)._encodeRaw.call(this,o,u[g],_,l)}}return o},function(o,u,d){if(u.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${u.length}`);let l={};for(let g of n){const{name:m,params:p}=this.parseTypeName(r[g]);if(!s.includes(m))l[g]=this.getTypeInterface(m)._decodeRaw.call(this,o,p,d);else{const y=s.indexOf(m);let{name:S,params:E}=this.parseTypeName(u[y]);if(this.hasType(S)){l[g]=this.getTypeInterface(S)._decodeRaw.call(this,o,E,d);continue}if(!(S in d))throw new Error(`Unable to find a matching type definition for ${S} in ${i}; make sure you passed a generic`);let{name:A,params:_}=this.parseTypeName(d[S]);l[g]=this.getTypeInterface(A)._decodeRaw.call(this,o,_,d)}}return l})}registerEnumType(e,t){for(let a in t){let o=this.tempKey(),u=t[a];u!==null&&!Array.isArray(u)&&typeof u!="string"&&(t[a]=o,this.registerStructType(o,u))}let r=Object.freeze(t),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(e);return this.registerType(e,function(o,u,d,l){if(!u)throw new Error(`Unable to write enum "${i}", missing data.
4
4
  Received: "${u}"`);if(typeof u!="object")throw new Error(`Incorrect data passed into enum "${i}", expected object with properties: "${n.join(" | ")}".
@@ -1 +1 @@
1
- "use strict";const W=require("./index-WOTkpZNS.js"),j="logger/5.7.0";let F=!1,k=!1;const U={debug:1,default:2,info:2,warning:3,error:4,off:5};let G=U.default,O=null;function Q(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test".normalize(t)!=="test")throw new Error("bad normalize")}catch{r.push(t)}}),r.length)throw new Error("missing "+r.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(r){return r.message}return null}const L=Q();var D;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(D||(D={}));var E;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(E||(E={}));const B="0123456789abcdef";class o{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const n=t.toLowerCase();U[n]==null&&this.throwArgumentError("invalid log level name","logLevel",t),!(G>U[n])&&console.log.apply(console,e)}debug(...t){this._log(o.levels.DEBUG,t)}info(...t){this._log(o.levels.INFO,t)}warn(...t){this._log(o.levels.WARNING,t)}makeError(t,e,n){if(k)return this.makeError("censored error",e,{});e||(e=o.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(g=>{const p=n[g];try{if(p instanceof Uint8Array){let S="";for(let I=0;I<p.length;I++)S+=B[p[I]>>4],S+=B[p[I]&15];i.push(g+"=Uint8Array(0x"+S+")")}else i.push(g+"="+JSON.stringify(p))}catch{i.push(g+"="+JSON.stringify(n[g].toString()))}}),i.push(`code=${e}`),i.push(`version=${this.version}`);const N=t;let m="";switch(e){case E.NUMERIC_FAULT:{m="NUMERIC_FAULT";const g=t;switch(g){case"overflow":case"underflow":case"division-by-zero":m+="-"+g;break;case"negative-power":case"negative-width":m+="-unsupported";break;case"unbound-bitwise-result":m+="-unbound-result";break}break}case E.CALL_EXCEPTION:case E.INSUFFICIENT_FUNDS:case E.MISSING_NEW:case E.NONCE_EXPIRED:case E.REPLACEMENT_UNDERPRICED:case E.TRANSACTION_REPLACED:case E.UNPREDICTABLE_GAS_LIMIT:m=e;break}m&&(t+=" [ See: https://links.ethers.org/v5-errors-"+m+" ]"),i.length&&(t+=" ("+i.join(", ")+")");const b=new Error(t);return b.reason=N,b.code=e,Object.keys(n).forEach(function(g){b[g]=n[g]}),b}throwError(t,e,n){throw this.makeError(t,e,n)}throwArgumentError(t,e,n){return this.throwError(t,o.errors.INVALID_ARGUMENT,{argument:e,value:n})}assert(t,e,n,i){t||this.throwError(e,n,i)}assertArgument(t,e,n,i){t||this.throwArgumentError(e,n,i)}checkNormalize(t){L&&this.throwError("platform missing String.prototype.normalize",o.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:L})}checkSafeUint53(t,e){typeof t=="number"&&(e==null&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,o.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,o.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,n){n?n=": "+n:n="",t<e&&this.throwError("missing argument"+n,o.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+n,o.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){(t===Object||t==null)&&this.throwError("missing new",o.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",o.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||t==null)&&this.throwError("missing new",o.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return O||(O=new o(j)),O}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",o.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),F){if(!t)return;this.globalLogger().throwError("error censorship permanent",o.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}k=!!t,F=!!e}static setLogLevel(t){const e=U[t.toLowerCase()];if(e==null){o.globalLogger().warn("invalid log level - "+t);return}G=e}static from(t){return new o(t)}}o.errors=E;o.levels=D;const Y="bytes/5.7.0",f=new o(Y);function V(r){return!!r.toHexString}function y(r){return r.slice||(r.slice=function(){const t=Array.prototype.slice.call(arguments);return y(new Uint8Array(Array.prototype.slice.apply(r,t)))}),r}function rr(r){return l(r)&&!(r.length%2)||P(r)}function z(r){return typeof r=="number"&&r==r&&r%1===0}function P(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!z(r.length)||r.length<0)return!1;for(let t=0;t<r.length;t++){const e=r[t];if(!z(e)||e<0||e>=256)return!1}return!0}function A(r,t){if(t||(t={}),typeof r=="number"){f.checkSafeUint53(r,"invalid arrayify value");const e=[];for(;r;)e.unshift(r&255),r=parseInt(String(r/256));return e.length===0&&e.push(0),y(new Uint8Array(e))}if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),V(r)&&(r=r.toHexString()),l(r)){let e=r.substring(2);e.length%2&&(t.hexPad==="left"?e="0"+e:t.hexPad==="right"?e+="0":f.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;i<e.length;i+=2)n.push(parseInt(e.substring(i,i+2),16));return y(new Uint8Array(n))}return P(r)?y(new Uint8Array(r)):f.throwArgumentError("invalid arrayify value","value",r)}function tr(r){const t=r.map(i=>A(i)),e=t.reduce((i,N)=>i+N.length,0),n=new Uint8Array(e);return t.reduce((i,N)=>(n.set(N,i),i+N.length),0),y(n)}function er(r,t){r=A(r),r.length>t&&f.throwArgumentError("value out of range","value",arguments[0]);const e=new Uint8Array(t);return e.set(r,t-r.length),y(e)}function l(r,t){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||t&&r.length!==2+2*t)}const d="0123456789abcdef";function c(r,t){if(t||(t={}),typeof r=="number"){f.checkSafeUint53(r,"invalid hexlify value");let e="";for(;r;)e=d[r&15]+e,r=Math.floor(r/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),V(r))return r.toHexString();if(l(r))return r.length%2&&(t.hexPad==="left"?r="0x0"+r.substring(2):t.hexPad==="right"?r+="0":f.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(P(r)){let e="0x";for(let n=0;n<r.length;n++){let i=r[n];e+=d[(i&240)>>4]+d[i&15]}return e}return f.throwArgumentError("invalid hexlify value","value",r)}function nr(r){if(typeof r!="string")r=c(r);else if(!l(r)||r.length%2)return null;return(r.length-2)/2}function ir(r,t,e){return typeof r!="string"?r=c(r):(!l(r)||r.length%2)&&f.throwArgumentError("invalid hexData","value",r),t=2+2*t,e!=null?"0x"+r.substring(t,2+2*e):"0x"+r.substring(t)}function sr(r){let t="0x";return r.forEach(e=>{t+=c(e).substring(2)}),t}function _(r,t){for(typeof r!="string"?r=c(r):l(r)||f.throwArgumentError("invalid hex string","value",r),r.length>2*t+2&&f.throwArgumentError("value out of range","value",arguments[1]);r.length<2*t+2;)r="0x0"+r.substring(2);return r}function or(r){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(rr(r)){let e=A(r);e.length===64?(t.v=27+(e[32]>>7),e[32]&=127,t.r=c(e.slice(0,32)),t.s=c(e.slice(32,64))):e.length===65?(t.r=c(e.slice(0,32)),t.s=c(e.slice(32,64)),t.v=e[64]):f.throwArgumentError("invalid signature string","signature",r),t.v<27&&(t.v===0||t.v===1?t.v+=27:f.throwArgumentError("signature invalid v byte","signature",r)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(e[32]|=128),t._vs=c(e.slice(32,64))}else{if(t.r=r.r,t.s=r.s,t.v=r.v,t.recoveryParam=r.recoveryParam,t._vs=r._vs,t._vs!=null){const i=er(A(t._vs),32);t._vs=c(i);const N=i[0]>=128?1:0;t.recoveryParam==null?t.recoveryParam=N:t.recoveryParam!==N&&f.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const m=c(i);t.s==null?t.s=m:t.s!==m&&f.throwArgumentError("signature v mismatch _vs","signature",r)}if(t.recoveryParam==null)t.v==null?f.throwArgumentError("signature missing v and recoveryParam","signature",r):t.v===0||t.v===1?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(t.v==null)t.v=27+t.recoveryParam;else{const i=t.v===0||t.v===1?t.v:1-t.v%2;t.recoveryParam!==i&&f.throwArgumentError("signature recoveryParam mismatch v","signature",r)}t.r==null||!l(t.r)?f.throwArgumentError("signature missing or invalid r","signature",r):t.r=_(t.r,32),t.s==null||!l(t.s)?f.throwArgumentError("signature missing or invalid s","signature",r):t.s=_(t.s,32);const e=A(t.s);e[0]>=128&&f.throwArgumentError("signature s out of range","signature",r),t.recoveryParam&&(e[0]|=128);const n=c(e);t._vs&&(l(t._vs)||f.throwArgumentError("signature invalid _vs","signature",r),t._vs=_(t._vs,32)),t._vs==null?t._vs=n:t._vs!==n&&f.throwArgumentError("signature _vs mismatch v and s","signature",r)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}const fr="bignumber/5.7.0";var T=W.BN.BN;const w=new o(fr),C={},ur=9007199254740991;let $=!1;class h{constructor(t,e){t!==C&&w.throwError("cannot call constructor directly; use BigNumber.from",o.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return u(s(this).fromTwos(t))}toTwos(t){return u(s(this).toTwos(t))}abs(){return this._hex[0]==="-"?h.from(this._hex.substring(1)):this}add(t){return u(s(this).add(s(t)))}sub(t){return u(s(this).sub(s(t)))}div(t){return h.from(t).isZero()&&a("division-by-zero","div"),u(s(this).div(s(t)))}mul(t){return u(s(this).mul(s(t)))}mod(t){const e=s(t);return e.isNeg()&&a("division-by-zero","mod"),u(s(this).umod(e))}pow(t){const e=s(t);return e.isNeg()&&a("negative-power","pow"),u(s(this).pow(e))}and(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","and"),u(s(this).and(e))}or(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","or"),u(s(this).or(e))}xor(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","xor"),u(s(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&a("negative-width","mask"),u(s(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&a("negative-width","shl"),u(s(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&a("negative-width","shr"),u(s(this).shrn(t))}eq(t){return s(this).eq(s(t))}lt(t){return s(this).lt(s(t))}lte(t){return s(this).lte(s(t))}gt(t){return s(this).gt(s(t))}gte(t){return s(this).gte(s(t))}isNegative(){return this._hex[0]==="-"}isZero(){return s(this).isZero()}toNumber(){try{return s(this).toNumber()}catch{a("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return w.throwError("this platform does not support BigInt",o.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?$||($=!0,w.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?w.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",o.errors.UNEXPECTED_ARGUMENT,{}):w.throwError("BigNumber.toString does not accept parameters",o.errors.UNEXPECTED_ARGUMENT,{})),s(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if(typeof t=="string")return t.match(/^-?0x[0-9a-f]+$/i)?new h(C,R(t)):t.match(/^-?[0-9]+$/)?new h(C,R(new T(t))):w.throwArgumentError("invalid BigNumber string","value",t);if(typeof t=="number")return t%1&&a("underflow","BigNumber.from",t),(t>=ur||t<=-9007199254740991)&&a("overflow","BigNumber.from",t),h.from(String(t));const e=t;if(typeof e=="bigint")return h.from(e.toString());if(P(e))return h.from(c(e));if(e)if(e.toHexString){const n=e.toHexString();if(typeof n=="string")return h.from(n)}else{let n=e._hex;if(n==null&&e.type==="BigNumber"&&(n=e.hex),typeof n=="string"&&(l(n)||n[0]==="-"&&l(n.substring(1))))return h.from(n)}return w.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function R(r){if(typeof r!="string")return R(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&w.throwArgumentError("invalid hex","value",r),r=R(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function u(r){return h.from(R(r))}function s(r){const t=h.from(r).toHexString();return t[0]==="-"?new T("-"+t.substring(3),16):new T(t.substring(2),16)}function a(r,t,e){const n={fault:r,operation:t};return e!=null&&(n.value=e),w.throwError(r,o.errors.NUMERIC_FAULT,n)}function hr(r){return new T(r,36).toString(16)}const cr="properties/5.7.0",K=new o(cr);function J(r,t,e){Object.defineProperty(r,t,{enumerable:!0,value:e,writable:!1})}function lr(r,t){for(let e=0;e<32;e++){if(r[t])return r[t];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}const ar={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Z(r){if(r==null||ar[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const t=Object.keys(r);for(let e=0;e<t.length;e++){let n=null;try{n=r[t[e]]}catch{continue}if(!Z(n))return!1}return!0}return K.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function gr(r){if(Z(r))return r;if(Array.isArray(r))return Object.freeze(r.map(t=>M(t)));if(typeof r=="object"){const t={};for(const e in r){const n=r[e];n!==void 0&&J(t,e,M(n))}return t}return K.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function M(r){return gr(r)}class Er{constructor(t){for(const e in t)this[e]=M(t[e])}}function q(r){return"0x"+W.sha3.keccak_256(A(r))}const mr="address/5.7.0",x=new o(mr);function H(r){l(r,20)||x.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const t=r.substring(2).split(""),e=new Uint8Array(40);for(let i=0;i<40;i++)e[i]=t[i].charCodeAt(0);const n=A(q(e));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(n[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Nr=9007199254740991;function wr(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const v={};for(let r=0;r<10;r++)v[String(r)]=String(r);for(let r=0;r<26;r++)v[String.fromCharCode(65+r)]=String(10+r);const X=Math.floor(wr(Nr));function Ar(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let t=r.split("").map(n=>v[n]).join("");for(;t.length>=X;){let n=t.substring(0,X);t=parseInt(n,10)%97+t.substring(n.length)}let e=String(98-parseInt(t,10)%97);for(;e.length<2;)e="0"+e;return e}function yr(r){let t=null;if(typeof r!="string"&&x.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),t=H(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==r&&x.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==Ar(r)&&x.throwArgumentError("bad icap checksum","address",r),t=hr(r.substring(4));t.length<40;)t="0"+t;t=H("0x"+t)}else x.throwArgumentError("invalid address","address",r);return t}exports.BigNumber=h;exports.Description=Er;exports.Logger=o;exports.arrayify=A;exports.concat=tr;exports.defineReadOnly=J;exports.getAddress=yr;exports.getStatic=lr;exports.hexConcat=sr;exports.hexDataLength=nr;exports.hexDataSlice=ir;exports.hexZeroPad=_;exports.hexlify=c;exports.isHexString=l;exports.keccak256=q;exports.splitSignature=or;
1
+ "use strict";const W=require("./index-B5H5W-MP.js"),j="logger/5.7.0";let F=!1,k=!1;const U={debug:1,default:2,info:2,warning:3,error:4,off:5};let G=U.default,O=null;function Q(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test".normalize(t)!=="test")throw new Error("bad normalize")}catch{r.push(t)}}),r.length)throw new Error("missing "+r.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(r){return r.message}return null}const L=Q();var D;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(D||(D={}));var E;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(E||(E={}));const B="0123456789abcdef";class o{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const n=t.toLowerCase();U[n]==null&&this.throwArgumentError("invalid log level name","logLevel",t),!(G>U[n])&&console.log.apply(console,e)}debug(...t){this._log(o.levels.DEBUG,t)}info(...t){this._log(o.levels.INFO,t)}warn(...t){this._log(o.levels.WARNING,t)}makeError(t,e,n){if(k)return this.makeError("censored error",e,{});e||(e=o.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(g=>{const p=n[g];try{if(p instanceof Uint8Array){let S="";for(let I=0;I<p.length;I++)S+=B[p[I]>>4],S+=B[p[I]&15];i.push(g+"=Uint8Array(0x"+S+")")}else i.push(g+"="+JSON.stringify(p))}catch{i.push(g+"="+JSON.stringify(n[g].toString()))}}),i.push(`code=${e}`),i.push(`version=${this.version}`);const N=t;let m="";switch(e){case E.NUMERIC_FAULT:{m="NUMERIC_FAULT";const g=t;switch(g){case"overflow":case"underflow":case"division-by-zero":m+="-"+g;break;case"negative-power":case"negative-width":m+="-unsupported";break;case"unbound-bitwise-result":m+="-unbound-result";break}break}case E.CALL_EXCEPTION:case E.INSUFFICIENT_FUNDS:case E.MISSING_NEW:case E.NONCE_EXPIRED:case E.REPLACEMENT_UNDERPRICED:case E.TRANSACTION_REPLACED:case E.UNPREDICTABLE_GAS_LIMIT:m=e;break}m&&(t+=" [ See: https://links.ethers.org/v5-errors-"+m+" ]"),i.length&&(t+=" ("+i.join(", ")+")");const b=new Error(t);return b.reason=N,b.code=e,Object.keys(n).forEach(function(g){b[g]=n[g]}),b}throwError(t,e,n){throw this.makeError(t,e,n)}throwArgumentError(t,e,n){return this.throwError(t,o.errors.INVALID_ARGUMENT,{argument:e,value:n})}assert(t,e,n,i){t||this.throwError(e,n,i)}assertArgument(t,e,n,i){t||this.throwArgumentError(e,n,i)}checkNormalize(t){L&&this.throwError("platform missing String.prototype.normalize",o.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:L})}checkSafeUint53(t,e){typeof t=="number"&&(e==null&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,o.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,o.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,n){n?n=": "+n:n="",t<e&&this.throwError("missing argument"+n,o.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+n,o.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){(t===Object||t==null)&&this.throwError("missing new",o.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",o.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||t==null)&&this.throwError("missing new",o.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return O||(O=new o(j)),O}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",o.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),F){if(!t)return;this.globalLogger().throwError("error censorship permanent",o.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}k=!!t,F=!!e}static setLogLevel(t){const e=U[t.toLowerCase()];if(e==null){o.globalLogger().warn("invalid log level - "+t);return}G=e}static from(t){return new o(t)}}o.errors=E;o.levels=D;const Y="bytes/5.7.0",f=new o(Y);function V(r){return!!r.toHexString}function y(r){return r.slice||(r.slice=function(){const t=Array.prototype.slice.call(arguments);return y(new Uint8Array(Array.prototype.slice.apply(r,t)))}),r}function rr(r){return l(r)&&!(r.length%2)||P(r)}function z(r){return typeof r=="number"&&r==r&&r%1===0}function P(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!z(r.length)||r.length<0)return!1;for(let t=0;t<r.length;t++){const e=r[t];if(!z(e)||e<0||e>=256)return!1}return!0}function A(r,t){if(t||(t={}),typeof r=="number"){f.checkSafeUint53(r,"invalid arrayify value");const e=[];for(;r;)e.unshift(r&255),r=parseInt(String(r/256));return e.length===0&&e.push(0),y(new Uint8Array(e))}if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),V(r)&&(r=r.toHexString()),l(r)){let e=r.substring(2);e.length%2&&(t.hexPad==="left"?e="0"+e:t.hexPad==="right"?e+="0":f.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;i<e.length;i+=2)n.push(parseInt(e.substring(i,i+2),16));return y(new Uint8Array(n))}return P(r)?y(new Uint8Array(r)):f.throwArgumentError("invalid arrayify value","value",r)}function tr(r){const t=r.map(i=>A(i)),e=t.reduce((i,N)=>i+N.length,0),n=new Uint8Array(e);return t.reduce((i,N)=>(n.set(N,i),i+N.length),0),y(n)}function er(r,t){r=A(r),r.length>t&&f.throwArgumentError("value out of range","value",arguments[0]);const e=new Uint8Array(t);return e.set(r,t-r.length),y(e)}function l(r,t){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||t&&r.length!==2+2*t)}const d="0123456789abcdef";function c(r,t){if(t||(t={}),typeof r=="number"){f.checkSafeUint53(r,"invalid hexlify value");let e="";for(;r;)e=d[r&15]+e,r=Math.floor(r/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),V(r))return r.toHexString();if(l(r))return r.length%2&&(t.hexPad==="left"?r="0x0"+r.substring(2):t.hexPad==="right"?r+="0":f.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(P(r)){let e="0x";for(let n=0;n<r.length;n++){let i=r[n];e+=d[(i&240)>>4]+d[i&15]}return e}return f.throwArgumentError("invalid hexlify value","value",r)}function nr(r){if(typeof r!="string")r=c(r);else if(!l(r)||r.length%2)return null;return(r.length-2)/2}function ir(r,t,e){return typeof r!="string"?r=c(r):(!l(r)||r.length%2)&&f.throwArgumentError("invalid hexData","value",r),t=2+2*t,e!=null?"0x"+r.substring(t,2+2*e):"0x"+r.substring(t)}function sr(r){let t="0x";return r.forEach(e=>{t+=c(e).substring(2)}),t}function _(r,t){for(typeof r!="string"?r=c(r):l(r)||f.throwArgumentError("invalid hex string","value",r),r.length>2*t+2&&f.throwArgumentError("value out of range","value",arguments[1]);r.length<2*t+2;)r="0x0"+r.substring(2);return r}function or(r){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(rr(r)){let e=A(r);e.length===64?(t.v=27+(e[32]>>7),e[32]&=127,t.r=c(e.slice(0,32)),t.s=c(e.slice(32,64))):e.length===65?(t.r=c(e.slice(0,32)),t.s=c(e.slice(32,64)),t.v=e[64]):f.throwArgumentError("invalid signature string","signature",r),t.v<27&&(t.v===0||t.v===1?t.v+=27:f.throwArgumentError("signature invalid v byte","signature",r)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(e[32]|=128),t._vs=c(e.slice(32,64))}else{if(t.r=r.r,t.s=r.s,t.v=r.v,t.recoveryParam=r.recoveryParam,t._vs=r._vs,t._vs!=null){const i=er(A(t._vs),32);t._vs=c(i);const N=i[0]>=128?1:0;t.recoveryParam==null?t.recoveryParam=N:t.recoveryParam!==N&&f.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const m=c(i);t.s==null?t.s=m:t.s!==m&&f.throwArgumentError("signature v mismatch _vs","signature",r)}if(t.recoveryParam==null)t.v==null?f.throwArgumentError("signature missing v and recoveryParam","signature",r):t.v===0||t.v===1?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(t.v==null)t.v=27+t.recoveryParam;else{const i=t.v===0||t.v===1?t.v:1-t.v%2;t.recoveryParam!==i&&f.throwArgumentError("signature recoveryParam mismatch v","signature",r)}t.r==null||!l(t.r)?f.throwArgumentError("signature missing or invalid r","signature",r):t.r=_(t.r,32),t.s==null||!l(t.s)?f.throwArgumentError("signature missing or invalid s","signature",r):t.s=_(t.s,32);const e=A(t.s);e[0]>=128&&f.throwArgumentError("signature s out of range","signature",r),t.recoveryParam&&(e[0]|=128);const n=c(e);t._vs&&(l(t._vs)||f.throwArgumentError("signature invalid _vs","signature",r),t._vs=_(t._vs,32)),t._vs==null?t._vs=n:t._vs!==n&&f.throwArgumentError("signature _vs mismatch v and s","signature",r)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}const fr="bignumber/5.7.0";var T=W.BN.BN;const w=new o(fr),C={},ur=9007199254740991;let $=!1;class h{constructor(t,e){t!==C&&w.throwError("cannot call constructor directly; use BigNumber.from",o.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return u(s(this).fromTwos(t))}toTwos(t){return u(s(this).toTwos(t))}abs(){return this._hex[0]==="-"?h.from(this._hex.substring(1)):this}add(t){return u(s(this).add(s(t)))}sub(t){return u(s(this).sub(s(t)))}div(t){return h.from(t).isZero()&&a("division-by-zero","div"),u(s(this).div(s(t)))}mul(t){return u(s(this).mul(s(t)))}mod(t){const e=s(t);return e.isNeg()&&a("division-by-zero","mod"),u(s(this).umod(e))}pow(t){const e=s(t);return e.isNeg()&&a("negative-power","pow"),u(s(this).pow(e))}and(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","and"),u(s(this).and(e))}or(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","or"),u(s(this).or(e))}xor(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","xor"),u(s(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&a("negative-width","mask"),u(s(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&a("negative-width","shl"),u(s(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&a("negative-width","shr"),u(s(this).shrn(t))}eq(t){return s(this).eq(s(t))}lt(t){return s(this).lt(s(t))}lte(t){return s(this).lte(s(t))}gt(t){return s(this).gt(s(t))}gte(t){return s(this).gte(s(t))}isNegative(){return this._hex[0]==="-"}isZero(){return s(this).isZero()}toNumber(){try{return s(this).toNumber()}catch{a("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return w.throwError("this platform does not support BigInt",o.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?$||($=!0,w.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?w.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",o.errors.UNEXPECTED_ARGUMENT,{}):w.throwError("BigNumber.toString does not accept parameters",o.errors.UNEXPECTED_ARGUMENT,{})),s(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if(typeof t=="string")return t.match(/^-?0x[0-9a-f]+$/i)?new h(C,R(t)):t.match(/^-?[0-9]+$/)?new h(C,R(new T(t))):w.throwArgumentError("invalid BigNumber string","value",t);if(typeof t=="number")return t%1&&a("underflow","BigNumber.from",t),(t>=ur||t<=-9007199254740991)&&a("overflow","BigNumber.from",t),h.from(String(t));const e=t;if(typeof e=="bigint")return h.from(e.toString());if(P(e))return h.from(c(e));if(e)if(e.toHexString){const n=e.toHexString();if(typeof n=="string")return h.from(n)}else{let n=e._hex;if(n==null&&e.type==="BigNumber"&&(n=e.hex),typeof n=="string"&&(l(n)||n[0]==="-"&&l(n.substring(1))))return h.from(n)}return w.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function R(r){if(typeof r!="string")return R(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&w.throwArgumentError("invalid hex","value",r),r=R(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function u(r){return h.from(R(r))}function s(r){const t=h.from(r).toHexString();return t[0]==="-"?new T("-"+t.substring(3),16):new T(t.substring(2),16)}function a(r,t,e){const n={fault:r,operation:t};return e!=null&&(n.value=e),w.throwError(r,o.errors.NUMERIC_FAULT,n)}function hr(r){return new T(r,36).toString(16)}const cr="properties/5.7.0",K=new o(cr);function J(r,t,e){Object.defineProperty(r,t,{enumerable:!0,value:e,writable:!1})}function lr(r,t){for(let e=0;e<32;e++){if(r[t])return r[t];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}const ar={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Z(r){if(r==null||ar[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const t=Object.keys(r);for(let e=0;e<t.length;e++){let n=null;try{n=r[t[e]]}catch{continue}if(!Z(n))return!1}return!0}return K.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function gr(r){if(Z(r))return r;if(Array.isArray(r))return Object.freeze(r.map(t=>M(t)));if(typeof r=="object"){const t={};for(const e in r){const n=r[e];n!==void 0&&J(t,e,M(n))}return t}return K.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function M(r){return gr(r)}class Er{constructor(t){for(const e in t)this[e]=M(t[e])}}function q(r){return"0x"+W.sha3.keccak_256(A(r))}const mr="address/5.7.0",x=new o(mr);function H(r){l(r,20)||x.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const t=r.substring(2).split(""),e=new Uint8Array(40);for(let i=0;i<40;i++)e[i]=t[i].charCodeAt(0);const n=A(q(e));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(n[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Nr=9007199254740991;function wr(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const v={};for(let r=0;r<10;r++)v[String(r)]=String(r);for(let r=0;r<26;r++)v[String.fromCharCode(65+r)]=String(10+r);const X=Math.floor(wr(Nr));function Ar(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let t=r.split("").map(n=>v[n]).join("");for(;t.length>=X;){let n=t.substring(0,X);t=parseInt(n,10)%97+t.substring(n.length)}let e=String(98-parseInt(t,10)%97);for(;e.length<2;)e="0"+e;return e}function yr(r){let t=null;if(typeof r!="string"&&x.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),t=H(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==r&&x.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==Ar(r)&&x.throwArgumentError("bad icap checksum","address",r),t=hr(r.substring(4));t.length<40;)t="0"+t;t=H("0x"+t)}else x.throwArgumentError("invalid address","address",r);return t}exports.BigNumber=h;exports.Description=Er;exports.Logger=o;exports.arrayify=A;exports.concat=tr;exports.defineReadOnly=J;exports.getAddress=yr;exports.getStatic=lr;exports.hexConcat=sr;exports.hexDataLength=nr;exports.hexDataSlice=ir;exports.hexZeroPad=_;exports.hexlify=c;exports.isHexString=l;exports.keccak256=q;exports.splitSignature=or;
@@ -1,9 +1,9 @@
1
- import { ct as Wl, V as R, cr as sa, aD as Hl, X as oa, c5 as L, ae as Jl, ai as Gl } from "./index-DXxwhxlz.mjs";
1
+ import { ct as Wl, V as R, cr as sa, aD as Hl, X as oa, c5 as L, ae as Jl, ai as Gl } from "./index-0sRAi_-E.mjs";
2
2
  import { d as Yl } from "./dijkstra-BZM-8g-B.mjs";
3
- import { e as He, s as aa } from "./events-BYQcWm6S.mjs";
4
- import { c as I, a as Ye } from "./index-Dv_PN2YS.mjs";
5
- import { r as Ql, a as It, g as xt, i as qe, b as ni, I as Rt, f as Ce, t as fe, w as Hi, c as Si, C as Xl, d as Zl, e as ns, h as eu, j as tu, k as vn, p as ru, l as wn, A as iu, E as pe, m as nu, y as be, P as ss, Q as su, n as ou, T as ca, o as _n, q as bn, s as Qe, _ as au, u as vt } from "./index-BNmhIn8v.mjs";
6
- import { s as la, a as Re, h as ua, L as cu, d as nr, l as lu, e as Ii, g as uu, i as os, k as hu } from "./index-BGh4lL9A.mjs";
3
+ import { e as He, s as aa } from "./events-FSoXRy3T.mjs";
4
+ import { c as I, a as Ye } from "./index-nCiFssoC.mjs";
5
+ import { r as Ql, a as It, g as xt, i as qe, b as ni, I as Rt, f as Ce, t as fe, w as Hi, c as Si, C as Xl, d as Zl, e as ns, h as eu, j as tu, k as vn, p as ru, l as wn, A as iu, E as pe, m as nu, y as be, P as ss, Q as su, n as ou, T as ca, o as _n, q as bn, s as Qe, _ as au, u as vt } from "./index-DJMHyNjD.mjs";
6
+ import { s as la, a as Re, h as ua, L as cu, d as nr, l as lu, e as Ii, g as uu, i as os, k as hu } from "./index-D1_1z7Wk.mjs";
7
7
  let du = class extends Ql {
8
8
  constructor(e) {
9
9
  super(e), this.events = new He.EventEmitter(), this.hasRegisteredEventListeners = !1, this.connection = this.setConnection(e), this.connection.connected && this.registerEventListeners();
@@ -1,5 +1,5 @@
1
- import { b as vo, d as _o, f as xo, g as Eo, i as Fo, j as Ao, k as So, l as Bo, m as Io, n as Oo, c as To } from "./index-Dv_PN2YS.mjs";
2
- import { V as ge, X as Tn, cr as Co, aB as me } from "./index-DXxwhxlz.mjs";
1
+ import { b as vo, d as _o, f as xo, g as Eo, i as Fo, j as Ao, k as So, l as Bo, m as Io, n as Oo, c as To } from "./index-nCiFssoC.mjs";
2
+ import { V as ge, X as Tn, cr as Co, aB as me } from "./index-0sRAi_-E.mjs";
3
3
  function Cn(e = 0) {
4
4
  return globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null ? globalThis.Buffer.allocUnsafe(e) : new Uint8Array(e);
5
5
  }
@@ -1,9 +1,9 @@
1
- import { aT as Do, cp as uy, V as De, cq as Zy, X as Pv, az as eg } from "./index-DXxwhxlz.mjs";
2
- import { h as tg, e as ng } from "./index-Dv_PN2YS.mjs";
3
- import { e as iy, d as ag } from "./base64-k-Os5ldO.mjs";
1
+ import { aT as Do, cp as uy, V as De, cq as Zy, X as Pv, az as eg } from "./index-0sRAi_-E.mjs";
2
+ import { h as tg, e as ng } from "./index-nCiFssoC.mjs";
3
+ import { e as iy, d as ag } from "./base64-BVPj2zYr.mjs";
4
4
  import * as Wf from "react";
5
5
  import d1, { createContext as lg, useState as is, useEffect as Ky, useCallback as ug, useContext as ig } from "react";
6
- import { L as ot, B as mn, d as i2, a as o0, h as U2, b as og, c as w9, g as od, e as Jy, k as cd, f as wr, i as cg, j as Tr, D as vs } from "./index-BGh4lL9A.mjs";
6
+ import { L as ot, B as mn, d as i2, a as o0, h as U2, b as og, c as w9, g as od, e as Jy, k as cd, f as wr, i as cg, j as Tr, D as vs } from "./index-D1_1z7Wk.mjs";
7
7
  function rd(c, i) {
8
8
  (i == null || i > c.length) && (i = c.length);
9
9
  for (var d = 0, f = new Array(i); d < i; d++) f[d] = c[d];
@@ -1,7 +1,7 @@
1
1
  var Pt = Object.defineProperty;
2
2
  var _t = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var f = (e, t, r) => _t(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { ae as c, V as l, a_ as A, bH as le, b2 as z, b1 as U, b3 as G, b0 as S, a$ as V, bI as Ge, bJ as Ze, bK as Wt, bL as It, bM as Ut, bN as Nt, bO as O, bP as E, b6 as y, bQ as T, bR as Ft, bS as ye, bB as dt, bT as xt, bU as lt, bV as zt, bW as Ot, bX as Q, bY as Lt, bZ as Z, b_ as H, b$ as Dt, c0 as qt, c1 as Kt, c2 as Vt, c3 as Se, c4 as Gt, c5 as v, c6 as Zt, e as oe, f as k, bA as Ce, bd as Ht, m as $, bG as Be, c7 as Yt, c8 as Qt, at as ae, ai as L, c9 as Xt, ca as ft, bj as mt, g as gt } from "./index-DXxwhxlz.mjs";
4
+ import { ae as c, V as l, a_ as A, bH as le, b2 as z, b1 as U, b3 as G, b0 as S, a$ as V, bI as Ge, bJ as Ze, bK as Wt, bL as It, bM as Ut, bN as Nt, bO as O, bP as E, b6 as y, bQ as T, bR as Ft, bS as ye, bB as dt, bT as xt, bU as lt, bV as zt, bW as Ot, bX as Q, bY as Lt, bZ as Z, b_ as H, b$ as Dt, c0 as qt, c1 as Kt, c2 as Vt, c3 as Se, c4 as Gt, c5 as v, c6 as Zt, e as oe, f as k, bA as Ce, bd as Ht, m as $, bG as Be, c7 as Yt, c8 as Qt, at as ae, ai as L, c9 as Xt, ca as ft, bj as mt, g as gt } from "./index-0sRAi_-E.mjs";
5
5
  const M = new c("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
6
6
  new c("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
7
7
  const Ae = new c("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"), D = new c("So11111111111111111111111111111111111111112");