@btc-vision/walletconnect 1.0.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.
- package/.babelrc +4 -0
- package/.gitattributes +2 -0
- package/.prettierrc.json +12 -0
- package/.vscode/settings.json +10 -0
- package/CONTRIBUTING.md +71 -0
- package/LICENSE +21 -0
- package/README.md +58 -0
- package/browser/WalletConnection.d.ts +17 -0
- package/browser/WalletProvider.d.ts +19 -0
- package/browser/index.d.ts +2 -0
- package/browser/index.js +2 -0
- package/browser/index.js.LICENSE.txt +13 -0
- package/build/WalletConnection.d.ts +17 -0
- package/build/WalletConnection.js +90 -0
- package/build/WalletProvider.d.ts +19 -0
- package/build/WalletProvider.js +73 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/cjs/package.json +3 -0
- package/eslint.config.js +38 -0
- package/gulpfile.js +47 -0
- package/package.json +126 -0
- package/src/WalletConnection.ts +126 -0
- package/src/WalletProvider.tsx +101 -0
- package/src/index.ts +2 -0
- package/tsconfig.base.json +27 -0
- package/tsconfig.json +16 -0
- package/tsconfig.webpack.json +22 -0
- package/webpack.config.js +83 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": true,
|
|
4
|
+
"noImplicitAny": true,
|
|
5
|
+
"removeComments": true,
|
|
6
|
+
"suppressImplicitAnyIndexErrors": false,
|
|
7
|
+
"preserveConstEnums": true,
|
|
8
|
+
"resolveJsonModule": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"sourceMap": false,
|
|
11
|
+
"moduleDetection": "force",
|
|
12
|
+
"experimentalDecorators": true,
|
|
13
|
+
"lib": ["es6", "es2020", "es2021", "es2022", "esnext", "webworker", "dom", "scripthost"],
|
|
14
|
+
"strict": true,
|
|
15
|
+
"strictNullChecks": true,
|
|
16
|
+
"strictFunctionTypes": true,
|
|
17
|
+
"strictBindCallApply": true,
|
|
18
|
+
"strictPropertyInitialization": true,
|
|
19
|
+
"alwaysStrict": true,
|
|
20
|
+
"moduleResolution": "node",
|
|
21
|
+
"allowJs": true,
|
|
22
|
+
"incremental": true,
|
|
23
|
+
"allowSyntheticDefaultImports": true,
|
|
24
|
+
"esModuleInterop": true
|
|
25
|
+
},
|
|
26
|
+
"include": ["src/**/*.ts", "src/*", "src/**/*.js", "src/*.ts", "src/*.js", "src/*.cjs"]
|
|
27
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"jsx": "react-jsx",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"target": "ES2020",
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"outDir": "./build",
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"],
|
|
15
|
+
"exclude": ["node_modules"]
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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": [
|
|
14
|
+
"node_modules/@btc-vision/logger"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"moduleResolution": "bundler"
|
|
18
|
+
},
|
|
19
|
+
"exclude": [
|
|
20
|
+
"./src/tests"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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'],
|
|
32
|
+
},
|
|
33
|
+
modules: ['.', 'node_modules'],
|
|
34
|
+
extensions: ['.*', '.js', '.jsx', '.tsx', '.ts', '.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
|
+
},
|
|
71
|
+
optimization: {
|
|
72
|
+
usedExports: true,
|
|
73
|
+
},
|
|
74
|
+
plugins: [
|
|
75
|
+
new webpack.ProvidePlugin({
|
|
76
|
+
Buffer: ['buffer', 'Buffer'],
|
|
77
|
+
process: 'process/browser',
|
|
78
|
+
stream: 'stream-browserify',
|
|
79
|
+
zlib: 'browserify-zlib',
|
|
80
|
+
bitcoin: '@btc-vision/bitcoin',
|
|
81
|
+
}),
|
|
82
|
+
],
|
|
83
|
+
};
|