herald-exchange-offramp-widget 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 +3 -0
- package/Readme.md +118 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +58 -0
- package/rollup.config.js +90 -0
- package/src/assets/css/style.module.css +1473 -0
- package/src/assets/icons-one.png +0 -0
- package/src/assets/react.svg +1 -0
- package/src/components/ButtonStepper.tsx +144 -0
- package/src/components/CommonCenterLoader.tsx +31 -0
- package/src/components/CustomeSelect.tsx +178 -0
- package/src/components/DotLoader.tsx +7 -0
- package/src/components/SellAdminCryptoAccount.tsx +603 -0
- package/src/components/SellField.tsx +712 -0
- package/src/components/WidgetBankDetails.tsx +612 -0
- package/src/components/WidgetComponent.tsx +40 -0
- package/src/components/WidgetContent.tsx +29 -0
- package/src/components/WidgetSuccesDetails.tsx +113 -0
- package/src/components/api.ts +59 -0
- package/src/components/chains.ts +319 -0
- package/src/components/images.d.ts +5 -0
- package/src/components/loader.tsx +12 -0
- package/src/components/style.module.css.d.ts +4 -0
- package/src/components/toast.tsx +43 -0
- package/src/components/types.ts +237 -0
- package/src/components/utils.ts +17 -0
- package/src/hooks/toastProvider.tsx +63 -0
- package/src/hooks/useSocketExchange.tsx +48 -0
- package/src/index.ts +3 -0
- package/tsconfig.json +118 -0
package/package.json
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"name": "herald-exchange-offramp-widget",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"module": "dist/index.mjs",
|
7
|
+
"types": "dist/index.d.ts",
|
8
|
+
"scripts": {
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
10
|
+
"rollup": "rollup -c --bundleConfigAsCjs",
|
11
|
+
"publish:patch": "npm run rollup && npm version patch --no-git-tag-version && npm publish",
|
12
|
+
"publish:minor": "npm run rollup && npm version minor --no-git-tag-version && npm publish",
|
13
|
+
"publish:major": "npm run rollup && npm version major --no-git-tag-version && npm publish"
|
14
|
+
},
|
15
|
+
"keywords": [],
|
16
|
+
"author": "",
|
17
|
+
"license": "ISC",
|
18
|
+
"devDependencies": {
|
19
|
+
"@babel/preset-react": "^7.27.1",
|
20
|
+
"@rollup/plugin-babel": "^6.0.4",
|
21
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
22
|
+
"@rollup/plugin-inject": "^5.0.5",
|
23
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
24
|
+
"@rollup/plugin-terser": "^0.4.4",
|
25
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
26
|
+
"@rollup/plugin-url": "^8.0.2",
|
27
|
+
"@types/node": "^22.15.21",
|
28
|
+
"@types/react": "^19.1.4",
|
29
|
+
"postcss": "^8.5.3",
|
30
|
+
"postcss-modules": "^6.0.1",
|
31
|
+
"react": "^19.1.0",
|
32
|
+
"rollup-plugin-dts": "^6.2.1",
|
33
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
34
|
+
"rollup-plugin-postcss": "^4.0.2",
|
35
|
+
"rollup-plugin-strip": "^1.2.2",
|
36
|
+
"tslib": "^2.8.1",
|
37
|
+
"typescript": "^5.8.3"
|
38
|
+
},
|
39
|
+
"dependencies": {
|
40
|
+
"multicoin-address-validator": "^0.5.25",
|
41
|
+
"qrcode.react": "^4.2.0",
|
42
|
+
"react-select": "^5.10.1",
|
43
|
+
"rollup": "^4.40.2",
|
44
|
+
"socket.io-client": "^4.8.1"
|
45
|
+
},
|
46
|
+
"browser": {
|
47
|
+
"fs": false,
|
48
|
+
"net": false,
|
49
|
+
"tls": false,
|
50
|
+
"child_process": false,
|
51
|
+
"zlib": false,
|
52
|
+
"http": false,
|
53
|
+
"https": false,
|
54
|
+
"url": false,
|
55
|
+
"stream": false,
|
56
|
+
"crypto": false
|
57
|
+
}
|
58
|
+
}
|
package/rollup.config.js
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
import commonjs from "@rollup/plugin-commonjs";
|
2
|
+
import resolve from "@rollup/plugin-node-resolve";
|
3
|
+
import terser from "@rollup/plugin-terser";
|
4
|
+
import typescript from "@rollup/plugin-typescript";
|
5
|
+
import PeerDepsExternal from "rollup-plugin-peer-deps-external";
|
6
|
+
import dts from "rollup-plugin-dts";
|
7
|
+
import postcss from "rollup-plugin-postcss";
|
8
|
+
import babel from "@rollup/plugin-babel";
|
9
|
+
import url from "@rollup/plugin-url";
|
10
|
+
import inject from "@rollup/plugin-inject";
|
11
|
+
import strip from "rollup-plugin-strip";
|
12
|
+
|
13
|
+
const packageJSON = require("./package.json");
|
14
|
+
|
15
|
+
export default [
|
16
|
+
{
|
17
|
+
input: "src/index.ts",
|
18
|
+
output: [
|
19
|
+
{
|
20
|
+
file: packageJSON.main,
|
21
|
+
format: "cjs",
|
22
|
+
sourcemap: true,
|
23
|
+
},
|
24
|
+
{
|
25
|
+
file: packageJSON.module,
|
26
|
+
format: "esm",
|
27
|
+
sourcemap: true,
|
28
|
+
},
|
29
|
+
],
|
30
|
+
plugins: [
|
31
|
+
PeerDepsExternal(),
|
32
|
+
resolve({
|
33
|
+
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
34
|
+
browser: true,
|
35
|
+
preferBuiltins: false,
|
36
|
+
}),
|
37
|
+
commonjs(),
|
38
|
+
inject({
|
39
|
+
Buffer: ["buffer", "Buffer"], // 👈 Inject Buffer globally
|
40
|
+
}),
|
41
|
+
typescript({ tsconfig: "./tsconfig.json" }),
|
42
|
+
terser(),
|
43
|
+
postcss({
|
44
|
+
modules: {
|
45
|
+
generateScopedName: "offramp-widget-sdk_[name]__[local]___[hash:base64:5]",
|
46
|
+
},
|
47
|
+
inject: true, // 👈 This ensures CSS is injected via <style> tag at runtime
|
48
|
+
extract: false, // 👈 Don't extract a separate .css file
|
49
|
+
minimize: true,
|
50
|
+
sourceMap: true,
|
51
|
+
}),
|
52
|
+
strip({
|
53
|
+
include: "**/*.(js|ts|tsx)",
|
54
|
+
functions: ["console.*", "assert.*"], // remove all console.* calls & assert.*
|
55
|
+
}),
|
56
|
+
babel({
|
57
|
+
babelHelpers: "bundled",
|
58
|
+
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
59
|
+
presets: ["@babel/preset-react", "@babel/preset-typescript"],
|
60
|
+
exclude: "node_modules/**",
|
61
|
+
}),
|
62
|
+
url({
|
63
|
+
include: ["**/*.svg", "**/*.png", "**/*.jpg", "**/*.gif"],
|
64
|
+
limit: 8192, // Inline files < 8kb, emit files for larger ones
|
65
|
+
emitFiles: true,
|
66
|
+
fileName: "[name][hash][extname]",
|
67
|
+
}),
|
68
|
+
],
|
69
|
+
external: [
|
70
|
+
"react",
|
71
|
+
"react-dom",
|
72
|
+
"fs",
|
73
|
+
"url",
|
74
|
+
"http",
|
75
|
+
"https",
|
76
|
+
"stream",
|
77
|
+
"crypto",
|
78
|
+
"child_process",
|
79
|
+
"zlib",
|
80
|
+
"net",
|
81
|
+
"tls",
|
82
|
+
],
|
83
|
+
},
|
84
|
+
{
|
85
|
+
input: "src/index.ts",
|
86
|
+
output: [{ file: packageJSON.types }],
|
87
|
+
plugins: [dts.default()],
|
88
|
+
external: [/\.css/],
|
89
|
+
},
|
90
|
+
];
|