From c0735cb31c33244890ff57e6dc54642a9d67df1b Mon Sep 17 00:00:00 2001 From: degenpepe Date: Sun, 15 Feb 2026 18:38:33 +0800 Subject: [PATCH] fix: add AcpClient as named export for CJS compatibility (#95) When consuming the package via CommonJS require(), AcpClient was only available as module.default, not as a named export. This caused 'TypeError: AcpClient is not a constructor' when using destructured imports like: const { AcpClient } = require('@virtuals-protocol/acp-node') This fix adds AcpClient to the named exports alongside the existing default export, ensuring both ESM and CJS consumers can access it. --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 8051b7c..eaf7a63 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,6 +33,7 @@ import AcpContractClientV2 from "./contractClients/acpContractClientV2"; export default AcpClient; export { + AcpClient, AcpError, DeliverablePayload, BaseAcpContractClient,