diff options
author | Pawel Zelawski <pawel.zelawski@outlook.com> | 2025-04-14 10:30:43 +0200 |
---|---|---|
committer | Pawel Zelawski <pawel.zelawski@outlook.com> | 2025-04-14 10:30:43 +0200 |
commit | b354d96163e2ba2103f7d8b101dae547eb4747fa (patch) | |
tree | a1be4510d0b82797a4ed465e534c15924d8d2082 /vite.config.ts | |
parent | e5a32e3002dfd5c17c847013cd27092f96ac2fba (diff) |
fix: Correct Bech32 address verification via dependency change
- Replaced faulty 'digibyte-message' dependency with 'bitcoinjs-message'.
- This resolves a critical bug where signatures from DigiByte Bech32 addresses (dgb1...) could not be verified due to issues in the old dependency chain.
- digiid-ts now correctly handles Legacy (D...), SegWit (S...), and Bech32 (dgb1...) address signature verification.
- Updated build configurations and addressed related linting issues revealed during testing.
Diffstat (limited to 'vite.config.ts')
-rw-r--r-- | vite.config.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vite.config.ts b/vite.config.ts index a69cc50..6ec42ad 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,6 +1,11 @@ +import path, { resolve } from 'path'; // Import path module +import { fileURLToPath } from 'url'; // Import for ESM __dirname alternative import { defineConfig } from 'vite'; import dts from 'vite-plugin-dts'; // Plugin to generate consolidated .d.ts file -import { resolve } from 'path'; + +// Get current directory path in ESM +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); // https://vitejs.dev/guide/build.html#library-mode export default defineConfig({ @@ -20,14 +25,14 @@ export default defineConfig({ rollupOptions: { // Make sure to externalize deps that shouldn't be bundled // into your library (e.g., peer dependencies) - external: ['crypto', 'module', 'digibyte-message'], // Externalize Node built-ins and the core dependency + external: ['crypto', 'module', 'bitcoinjs-message'], // Externalize Node built-ins and the core dependency output: { // Provide global variables to use in the UMD build // for externalized deps globals: { crypto: 'crypto', // Map 'crypto' import to global 'crypto' (Node) module: 'module', // Map 'module' import to global 'module' (Node) - 'digibyte-message': 'DigibyteMessage' // Example global name if needed, might not be necessary for UMD if only used internally + 'bitcoinjs-message': 'bitcoinjsMessage' // Map 'bitcoinjs-message' to global 'bitcoinjsMessage' }, }, }, |