@btc-vision/walletconnect 1.9.12 → 1.9.14
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.
- package/browser/context/WalletConnectContext.d.ts +5 -4
- package/browser/context/WalletConnectContext.d.ts.map +1 -0
- package/browser/hooks/WalletConnectHook.d.ts +2 -1
- package/browser/hooks/WalletConnectHook.d.ts.map +1 -0
- package/browser/index.d.ts +1 -0
- package/browser/index.d.ts.map +1 -0
- package/browser/index.js +799 -2
- package/browser/noble-curves.js +3353 -0
- package/browser/noble-hashes.js +3097 -0
- package/browser/provider/WalletConnectProvider.d.ts +2 -3
- package/browser/provider/WalletConnectProvider.d.ts.map +1 -0
- package/browser/types.d.ts +4 -3
- package/browser/types.d.ts.map +1 -0
- package/browser/utils/accessibility/definitions.d.ts +1 -0
- package/browser/utils/accessibility/definitions.d.ts.map +1 -0
- package/browser/utils/accessibility/errorDecoder.d.ts +1 -0
- package/browser/utils/accessibility/errorDecoder.d.ts.map +1 -0
- package/browser/utils/accessibility/patterns.d.ts +1 -0
- package/browser/utils/accessibility/patterns.d.ts.map +1 -0
- package/browser/valibot.js +5261 -0
- package/browser/vendors.js +63226 -0
- package/browser/walletconnect.css +1 -0
- package/browser/wallets/controller.d.ts +5 -4
- package/browser/wallets/controller.d.ts.map +1 -0
- package/browser/wallets/index.d.ts +3 -3
- package/browser/wallets/index.d.ts.map +1 -0
- package/browser/wallets/opwallet/controller.d.ts +3 -2
- package/browser/wallets/opwallet/controller.d.ts.map +1 -0
- package/browser/wallets/opwallet/interface.d.ts +2 -1
- package/browser/wallets/opwallet/interface.d.ts.map +1 -0
- package/browser/wallets/supported-wallets.d.ts +5 -1
- package/browser/wallets/supported-wallets.d.ts.map +1 -0
- package/browser/wallets/types.d.ts +3 -2
- package/browser/wallets/types.d.ts.map +1 -0
- package/browser/wallets/unisat/controller.d.ts +3 -2
- package/browser/wallets/unisat/controller.d.ts.map +1 -0
- package/browser/wallets/unisat/interface.d.ts +2 -1
- package/browser/wallets/unisat/interface.d.ts.map +1 -0
- package/build/context/WalletConnectContext.d.ts +2 -1
- package/build/context/WalletConnectContext.d.ts.map +1 -0
- package/build/context/WalletConnectContext.js +0 -3
- package/build/hooks/WalletConnectHook.d.ts +1 -0
- package/build/hooks/WalletConnectHook.d.ts.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -0
- package/build/provider/WalletConnectProvider.d.ts +1 -0
- package/build/provider/WalletConnectProvider.d.ts.map +1 -0
- package/build/provider/WalletConnectProvider.js +2 -3
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/types.d.ts +2 -1
- package/build/types.d.ts.map +1 -0
- package/build/types.js +1 -2
- package/build/utils/accessibility/definitions.d.ts +1 -0
- package/build/utils/accessibility/definitions.d.ts.map +1 -0
- package/build/utils/accessibility/errorDecoder.d.ts +1 -0
- package/build/utils/accessibility/errorDecoder.d.ts.map +1 -0
- package/build/utils/accessibility/patterns.d.ts +1 -0
- package/build/utils/accessibility/patterns.d.ts.map +1 -0
- package/build/utils/style.css +9 -0
- package/build/wallets/controller.d.ts +2 -1
- package/build/wallets/controller.d.ts.map +1 -0
- package/build/wallets/controller.js +10 -15
- package/build/wallets/index.d.ts +3 -3
- package/build/wallets/index.d.ts.map +1 -0
- package/build/wallets/index.js +4 -3
- package/build/wallets/opwallet/controller.d.ts +1 -0
- package/build/wallets/opwallet/controller.d.ts.map +1 -0
- package/build/wallets/opwallet/controller.js +6 -6
- package/build/wallets/opwallet/interface.d.ts +1 -0
- package/build/wallets/opwallet/interface.d.ts.map +1 -0
- package/build/wallets/opwallet/interface.js +0 -1
- package/build/wallets/supported-wallets.d.ts +5 -1
- package/build/wallets/supported-wallets.d.ts.map +1 -0
- package/build/wallets/supported-wallets.js +5 -1
- package/build/wallets/types.d.ts +2 -1
- package/build/wallets/types.d.ts.map +1 -0
- package/build/wallets/types.js +1 -4
- package/build/wallets/unisat/controller.d.ts +1 -0
- package/build/wallets/unisat/controller.d.ts.map +1 -0
- package/build/wallets/unisat/controller.js +6 -6
- package/build/wallets/unisat/interface.d.ts +1 -0
- package/build/wallets/unisat/interface.d.ts.map +1 -0
- package/build/wallets/unisat/interface.js +0 -1
- package/package.json +33 -32
- package/src/README.md +9 -3
- package/src/context/WalletConnectContext.ts +1 -1
- package/src/hooks/WalletConnectHook.tsx +1 -4
- package/src/provider/WalletConnectProvider.tsx +1 -1
- package/src/types.ts +1 -1
- package/src/utils/style.css +9 -0
- package/src/wallets/controller.ts +2 -7
- package/src/wallets/index.ts +4 -5
- package/src/wallets/supported-wallets.ts +4 -1
- package/src/wallets/types.ts +3 -7
- package/tsconfig.base.json +1 -3
- package/tsconfig.json +4 -3
- package/vite.config.browser.ts +92 -0
- package/.babelrc +0 -4
- package/browser/168.index.js +0 -1
- package/browser/index.js.LICENSE.txt +0 -20
- package/gulpfile.js +0 -145
- package/tsconfig.webpack.json +0 -18
- package/webpack.config.js +0 -87
package/src/wallets/types.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type MLDSASignature,
|
|
3
|
-
type Unisat,
|
|
4
|
-
UnisatChainType,
|
|
5
|
-
UnisatSigner,
|
|
6
|
-
} from '@btc-vision/transaction';
|
|
1
|
+
import { type MLDSASignature, type Unisat, UnisatChainType, UnisatSigner, } from '@btc-vision/transaction';
|
|
7
2
|
import { AbstractRpcProvider } from 'opnet';
|
|
8
|
-
import {
|
|
3
|
+
import { SupportedWallets } from './supported-wallets';
|
|
4
|
+
|
|
9
5
|
export { type AbstractRpcProvider } from 'opnet';
|
|
10
6
|
|
|
11
7
|
export interface WalletBase {
|
package/tsconfig.base.json
CHANGED
|
@@ -17,12 +17,10 @@
|
|
|
17
17
|
"strictBindCallApply": true,
|
|
18
18
|
"strictPropertyInitialization": true,
|
|
19
19
|
"alwaysStrict": true,
|
|
20
|
-
"moduleResolution": "node",
|
|
21
20
|
"allowJs": true,
|
|
22
21
|
"incremental": true,
|
|
23
22
|
"allowSyntheticDefaultImports": true,
|
|
24
|
-
"verbatimModuleSyntax": true,
|
|
25
23
|
"esModuleInterop": true
|
|
26
24
|
},
|
|
27
|
-
"include": ["src/**/*.ts", "src
|
|
25
|
+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"]
|
|
28
26
|
}
|
package/tsconfig.json
CHANGED
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"jsx": "react-jsx",
|
|
5
5
|
"module": "ESNext",
|
|
6
|
-
"target": "
|
|
6
|
+
"target": "ESNext",
|
|
7
7
|
"declaration": true,
|
|
8
|
+
"declarationMap": true,
|
|
8
9
|
"outDir": "./build",
|
|
9
|
-
"moduleResolution": "
|
|
10
|
+
"moduleResolution": "bundler",
|
|
10
11
|
"esModuleInterop": true,
|
|
11
12
|
"skipLibCheck": true,
|
|
12
13
|
"allowSyntheticDefaultImports": true
|
|
13
14
|
},
|
|
14
15
|
"include": ["src"],
|
|
15
|
-
"exclude": ["node_modules"]
|
|
16
|
+
"exclude": ["node_modules", "build", "browser"]
|
|
16
17
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { resolve } from 'path';
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
|
+
import dts from 'vite-plugin-dts';
|
|
4
|
+
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
build: {
|
|
8
|
+
outDir: 'browser',
|
|
9
|
+
emptyOutDir: true,
|
|
10
|
+
target: 'esnext',
|
|
11
|
+
minify: 'esbuild',
|
|
12
|
+
lib: {
|
|
13
|
+
entry: resolve(__dirname, 'src/index.ts'),
|
|
14
|
+
formats: ['es'],
|
|
15
|
+
fileName: () => 'index.js',
|
|
16
|
+
},
|
|
17
|
+
rollupOptions: {
|
|
18
|
+
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
|
19
|
+
output: {
|
|
20
|
+
chunkFileNames: '[name].js',
|
|
21
|
+
globals: {
|
|
22
|
+
react: 'React',
|
|
23
|
+
'react-dom': 'ReactDOM',
|
|
24
|
+
'react/jsx-runtime': 'jsxRuntime',
|
|
25
|
+
},
|
|
26
|
+
manualChunks: (id) => {
|
|
27
|
+
if (
|
|
28
|
+
id.includes('node_modules') ||
|
|
29
|
+
id.includes('@btc-vision/bitcoin') ||
|
|
30
|
+
id.includes('/bitcoin/build/')
|
|
31
|
+
) {
|
|
32
|
+
// Noble crypto - isolated, no circular deps
|
|
33
|
+
if (id.includes('@noble/curves')) return 'noble-curves';
|
|
34
|
+
if (id.includes('@noble/hashes')) return 'noble-hashes';
|
|
35
|
+
// Protobuf - isolated
|
|
36
|
+
if (id.includes('protobufjs')) return 'protobuf';
|
|
37
|
+
// Validation - isolated
|
|
38
|
+
if (id.includes('valibot')) return 'valibot';
|
|
39
|
+
// Everything else in vendors to avoid circular deps
|
|
40
|
+
return 'vendors';
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
resolve: {
|
|
47
|
+
alias: {
|
|
48
|
+
stream: 'stream-browserify',
|
|
49
|
+
buffer: 'buffer',
|
|
50
|
+
// Use source versions for proper tree-shaking (not browser bundles)
|
|
51
|
+
'@btc-vision/transaction': resolve(
|
|
52
|
+
__dirname,
|
|
53
|
+
'node_modules/@btc-vision/transaction/build/index.js',
|
|
54
|
+
),
|
|
55
|
+
'@btc-vision/bitcoin': resolve(
|
|
56
|
+
__dirname,
|
|
57
|
+
'node_modules/@btc-vision/bitcoin/build/index.js',
|
|
58
|
+
),
|
|
59
|
+
},
|
|
60
|
+
mainFields: ['module', 'main'],
|
|
61
|
+
},
|
|
62
|
+
define: {
|
|
63
|
+
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
64
|
+
global: 'globalThis',
|
|
65
|
+
},
|
|
66
|
+
plugins: [
|
|
67
|
+
nodePolyfills({
|
|
68
|
+
globals: {
|
|
69
|
+
Buffer: true,
|
|
70
|
+
global: true,
|
|
71
|
+
process: true,
|
|
72
|
+
},
|
|
73
|
+
// Include crypto polyfill
|
|
74
|
+
include: ['crypto', 'buffer', 'process', 'stream', 'zlib'],
|
|
75
|
+
overrides: {
|
|
76
|
+
crypto: 'crypto-browserify',
|
|
77
|
+
zlib: 'browserify-zlib',
|
|
78
|
+
},
|
|
79
|
+
}),
|
|
80
|
+
dts({
|
|
81
|
+
outDir: 'browser',
|
|
82
|
+
include: ['src/**/*.ts', 'src/**/*.tsx'],
|
|
83
|
+
exclude: ['src/**/*.test.ts', 'src/**/*.spec.ts'],
|
|
84
|
+
insertTypesEntry: true,
|
|
85
|
+
}),
|
|
86
|
+
],
|
|
87
|
+
esbuild: {
|
|
88
|
+
target: 'esnext',
|
|
89
|
+
jsx: 'automatic',
|
|
90
|
+
jsxImportSource: 'react',
|
|
91
|
+
},
|
|
92
|
+
});
|
package/.babelrc
DELETED
package/browser/168.index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=168;export const __webpack_esm_ids__=[168];export const __webpack_esm_modules__={168(e,_,r){r.d(_,{Worker:()=>s});class s{constructor(){throw new Error("worker_threads is not available in browser. Use Web Workers instead.")}}}};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9
|
-
|
|
10
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @license React
|
|
14
|
-
* react-jsx-runtime.production.js
|
|
15
|
-
*
|
|
16
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the MIT license found in the
|
|
19
|
-
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/
|
package/gulpfile.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import gulp from 'gulp';
|
|
2
|
-
import gulpcache from 'gulp-cached';
|
|
3
|
-
import gulpClean from 'gulp-clean';
|
|
4
|
-
import gulpESLintNew from 'gulp-eslint-new';
|
|
5
|
-
import logger from 'gulp-logger-new';
|
|
6
|
-
import ts from 'gulp-typescript';
|
|
7
|
-
|
|
8
|
-
process.on('uncaughtException', function (err) {
|
|
9
|
-
console.log('Caught exception: ', err);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const tsProject = ts.createProject('tsconfig.json', {
|
|
13
|
-
jsx: 'react-jsx',
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// TypeScript/JavaScript build
|
|
17
|
-
function buildESM() {
|
|
18
|
-
return tsProject
|
|
19
|
-
.src()
|
|
20
|
-
.pipe(gulpcache('ts-esm'))
|
|
21
|
-
.pipe(
|
|
22
|
-
logger({
|
|
23
|
-
before: 'Starting TypeScript compilation...',
|
|
24
|
-
after: 'TypeScript compiled!',
|
|
25
|
-
extname: '.js',
|
|
26
|
-
showChange: true,
|
|
27
|
-
}),
|
|
28
|
-
)
|
|
29
|
-
.pipe(gulpESLintNew())
|
|
30
|
-
.pipe(gulpESLintNew.format())
|
|
31
|
-
.pipe(tsProject())
|
|
32
|
-
.pipe(gulp.dest('build'));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Copy CSS files
|
|
36
|
-
function copyCSS() {
|
|
37
|
-
return gulp
|
|
38
|
-
.src(['src/**/*.css', 'src/**/*.scss', 'src/**/*.sass'], { base: 'src' })
|
|
39
|
-
.pipe(gulpcache('css'))
|
|
40
|
-
.pipe(
|
|
41
|
-
logger({
|
|
42
|
-
before: 'Copying CSS files...',
|
|
43
|
-
after: 'CSS files copied!',
|
|
44
|
-
showChange: true,
|
|
45
|
-
}),
|
|
46
|
-
)
|
|
47
|
-
.pipe(gulp.dest('build'));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Copy static assets (images, fonts, etc.)
|
|
51
|
-
function copyAssets() {
|
|
52
|
-
return gulp
|
|
53
|
-
.src(
|
|
54
|
-
[
|
|
55
|
-
'src/**/*.png',
|
|
56
|
-
'src/**/*.jpg',
|
|
57
|
-
'src/**/*.jpeg',
|
|
58
|
-
'src/**/*.gif',
|
|
59
|
-
'src/**/*.svg',
|
|
60
|
-
'src/**/*.ico',
|
|
61
|
-
'src/**/*.woff',
|
|
62
|
-
'src/**/*.woff2',
|
|
63
|
-
'src/**/*.ttf',
|
|
64
|
-
'src/**/*.eot',
|
|
65
|
-
'src/**/*.otf',
|
|
66
|
-
'src/**/*.json',
|
|
67
|
-
'!src/**/*.config.json', // Exclude config files if needed
|
|
68
|
-
'!src/**/tsconfig.json',
|
|
69
|
-
],
|
|
70
|
-
{ base: 'src' },
|
|
71
|
-
)
|
|
72
|
-
.pipe(gulpcache('assets'))
|
|
73
|
-
.pipe(
|
|
74
|
-
logger({
|
|
75
|
-
before: 'Copying assets...',
|
|
76
|
-
after: 'Assets copied!',
|
|
77
|
-
showChange: true,
|
|
78
|
-
}),
|
|
79
|
-
)
|
|
80
|
-
.pipe(gulp.dest('build'));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Copy HTML files if any
|
|
84
|
-
function copyHTML() {
|
|
85
|
-
return gulp
|
|
86
|
-
.src('src/**/*.html', { base: 'src' })
|
|
87
|
-
.pipe(gulpcache('html'))
|
|
88
|
-
.pipe(
|
|
89
|
-
logger({
|
|
90
|
-
before: 'Copying HTML files...',
|
|
91
|
-
after: 'HTML files copied!',
|
|
92
|
-
showChange: true,
|
|
93
|
-
}),
|
|
94
|
-
)
|
|
95
|
-
.pipe(gulp.dest('build'));
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// Clean build directory
|
|
99
|
-
export async function clean() {
|
|
100
|
-
return gulp.src('./build', { read: false, allowEmpty: true }).pipe(gulpClean());
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Build all
|
|
104
|
-
export const build = gulp.parallel(buildESM, copyCSS, copyAssets, copyHTML);
|
|
105
|
-
|
|
106
|
-
// Default task
|
|
107
|
-
export default build;
|
|
108
|
-
|
|
109
|
-
// Watch task with all file types
|
|
110
|
-
export function watch() {
|
|
111
|
-
// Watch TypeScript/JavaScript files
|
|
112
|
-
gulp.watch(
|
|
113
|
-
['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.js', 'src/**/*.jsx'],
|
|
114
|
-
gulp.series(buildESM),
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
// Watch CSS files
|
|
118
|
-
gulp.watch(['src/**/*.css', 'src/**/*.scss', 'src/**/*.sass'], gulp.series(copyCSS));
|
|
119
|
-
|
|
120
|
-
// Watch assets
|
|
121
|
-
gulp.watch(
|
|
122
|
-
[
|
|
123
|
-
'src/**/*.png',
|
|
124
|
-
'src/**/*.jpg',
|
|
125
|
-
'src/**/*.jpeg',
|
|
126
|
-
'src/**/*.gif',
|
|
127
|
-
'src/**/*.svg',
|
|
128
|
-
'src/**/*.ico',
|
|
129
|
-
'src/**/*.woff',
|
|
130
|
-
'src/**/*.woff2',
|
|
131
|
-
'src/**/*.ttf',
|
|
132
|
-
'src/**/*.eot',
|
|
133
|
-
'src/**/*.otf',
|
|
134
|
-
'src/**/*.json',
|
|
135
|
-
],
|
|
136
|
-
gulp.series(copyAssets),
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
// Watch HTML files
|
|
140
|
-
gulp.watch(['src/**/*.html'], gulp.series(copyHTML));
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// Additional utility tasks
|
|
144
|
-
export const cleanBuild = gulp.series(clean, build);
|
|
145
|
-
export const dev = gulp.series(build, watch);
|
package/tsconfig.webpack.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"outDir": "browser",
|
|
6
|
-
"target": "esnext",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"strict": true,
|
|
11
|
-
"baseUrl": ".",
|
|
12
|
-
"paths": {
|
|
13
|
-
"@btc-vision/logger": ["node_modules/@btc-vision/logger"]
|
|
14
|
-
},
|
|
15
|
-
"moduleResolution": "bundler"
|
|
16
|
-
},
|
|
17
|
-
"exclude": ["./src/tests"]
|
|
18
|
-
}
|
package/webpack.config.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
mode: 'production',
|
|
5
|
-
target: 'web',
|
|
6
|
-
entry: {
|
|
7
|
-
index: {
|
|
8
|
-
import: './src/index.ts',
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
externals: {
|
|
12
|
-
react: 'react',
|
|
13
|
-
'react-dom': 'react-dom',
|
|
14
|
-
},
|
|
15
|
-
watch: false,
|
|
16
|
-
output: {
|
|
17
|
-
filename: 'index.js',
|
|
18
|
-
path: import.meta.dirname + '/browser',
|
|
19
|
-
libraryTarget: 'module',
|
|
20
|
-
},
|
|
21
|
-
node: {
|
|
22
|
-
__dirname: false,
|
|
23
|
-
},
|
|
24
|
-
experiments: {
|
|
25
|
-
outputModule: true,
|
|
26
|
-
asyncWebAssembly: false,
|
|
27
|
-
syncWebAssembly: true,
|
|
28
|
-
},
|
|
29
|
-
resolve: {
|
|
30
|
-
extensionAlias: {
|
|
31
|
-
'.js': ['.js', '.ts', '.tsx'],
|
|
32
|
-
},
|
|
33
|
-
modules: ['.', 'node_modules'],
|
|
34
|
-
extensions: ['.*', '.js', '.jsx', '.tsx', '.ts', '.tsx', '.wasm'],
|
|
35
|
-
fallback: {
|
|
36
|
-
buffer: import.meta.resolve('buffer/'),
|
|
37
|
-
|
|
38
|
-
assert: import.meta.resolve('assert/'),
|
|
39
|
-
crypto: import.meta.resolve('./src/crypto/crypto-browser.js'),
|
|
40
|
-
http: import.meta.resolve('stream-http/'),
|
|
41
|
-
https: import.meta.resolve('https-browserify/'),
|
|
42
|
-
os: import.meta.resolve('os-browserify/browser/'),
|
|
43
|
-
stream: import.meta.resolve('stream-browserify'),
|
|
44
|
-
process: import.meta.resolve('process/browser'),
|
|
45
|
-
zlib: import.meta.resolve('browserify-zlib'),
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
cache: false,
|
|
49
|
-
module: {
|
|
50
|
-
rules: [
|
|
51
|
-
{
|
|
52
|
-
test: /\.(js|jsx|tsx|ts)$/,
|
|
53
|
-
exclude: /node_modules/,
|
|
54
|
-
resolve: {
|
|
55
|
-
fullySpecified: false,
|
|
56
|
-
},
|
|
57
|
-
use: [
|
|
58
|
-
{
|
|
59
|
-
loader: 'babel-loader',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
loader: 'ts-loader',
|
|
63
|
-
options: {
|
|
64
|
-
configFile: 'tsconfig.webpack.json',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
test: /\.css$/,
|
|
71
|
-
use: ['style-loader', 'css-loader'],
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
optimization: {
|
|
76
|
-
usedExports: true,
|
|
77
|
-
},
|
|
78
|
-
plugins: [
|
|
79
|
-
new webpack.ProvidePlugin({
|
|
80
|
-
Buffer: ['buffer', 'Buffer'],
|
|
81
|
-
process: 'process/browser',
|
|
82
|
-
stream: 'stream-browserify',
|
|
83
|
-
zlib: 'browserify-zlib',
|
|
84
|
-
bitcoin: '@btc-vision/bitcoin',
|
|
85
|
-
}),
|
|
86
|
-
],
|
|
87
|
-
};
|