@paybutton/react 1.2.2 → 2.0.1

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.
Files changed (35) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.modern.js +1 -1
  4. package/dist/index.modern.js.map +1 -1
  5. package/dist/react/src/assets/edit-pencil.d.ts +3 -0
  6. package/dist/react/src/components/BarChart/BarChart.d.ts +13 -0
  7. package/dist/react/src/components/BarChart/BarChart.stories.d.ts +25 -0
  8. package/dist/react/src/components/BarChart/index.d.ts +1 -0
  9. package/dist/react/src/components/Button/Button.d.ts +21 -0
  10. package/dist/react/src/components/Button/Button.stories.d.ts +28 -0
  11. package/dist/react/src/components/Button/index.d.ts +1 -0
  12. package/dist/react/src/components/PayButton/PayButton.d.ts +37 -0
  13. package/dist/react/src/components/PayButton/PayButton.stories.d.ts +48 -0
  14. package/dist/react/src/components/PayButton/index.d.ts +1 -0
  15. package/dist/react/src/components/PaymentDialog/PaymentDialog.d.ts +40 -0
  16. package/dist/react/src/components/PaymentDialog/PaymentDialog.stories.d.ts +49 -0
  17. package/dist/react/src/components/PaymentDialog/index.d.ts +1 -0
  18. package/dist/react/src/components/Widget/Widget.d.ts +30 -0
  19. package/dist/react/src/components/Widget/Widget.stories.d.ts +34 -0
  20. package/dist/react/src/components/Widget/WidgetContainer.d.ts +31 -0
  21. package/dist/react/src/components/Widget/index.d.ts +1 -0
  22. package/dist/react/src/components/index.d.ts +8 -0
  23. package/dist/react/src/hooks/useAddressDetails.d.ts +3 -0
  24. package/dist/react/src/index.d.ts +31 -0
  25. package/dist/react/src/themes/Theme.d.ts +9 -0
  26. package/dist/react/src/themes/index.d.ts +13 -0
  27. package/dist/react/src/themes/themes/orange.d.ts +3 -0
  28. package/dist/react/src/themes/themes/paybutton.d.ts +3 -0
  29. package/dist/react/src/themes/themes/xec.d.ts +3 -0
  30. package/dist/react/src/util/address.d.ts +10 -0
  31. package/dist/react/src/util/api-client.d.ts +173 -0
  32. package/dist/react/src/util/format.d.ts +19 -0
  33. package/dist/react/src/util/randomizeSats.d.ts +3 -0
  34. package/dist/react/src/util/satoshis.d.ts +11 -0
  35. package/package.json +6 -4
@@ -0,0 +1,19 @@
1
+ import { currency } from './api-client';
2
+ export declare const DECIMALS: {
3
+ BCH: number;
4
+ XEC: number;
5
+ FIAT: number;
6
+ };
7
+ export declare const amount: (x?: number | null | undefined) => string | undefined;
8
+ export declare const formatPrice: (price: number, currencyType: currency, precision?: number) => string;
9
+ export declare const formatComma: (number: number) => string;
10
+ export declare const formatBCH: (bch: string) => string;
11
+ export declare const formatXEC: (xec: string) => string;
12
+ declare const _default: {
13
+ amount: (x?: number | null | undefined) => string | undefined;
14
+ formatPrice: (price: number, currencyType: currency, precision?: number) => string;
15
+ formatComma: (number: number) => string;
16
+ formatBCH: (bch: string) => string;
17
+ formatXEC: (xec: string) => string;
18
+ };
19
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { cryptoCurrency } from './api-client';
2
+ export declare const randomizeSatoshis: (amount: number, addressType: cryptoCurrency) => number;
3
+ export default randomizeSatoshis;
@@ -0,0 +1,11 @@
1
+ import { currency } from './api-client';
2
+ export declare type currencyObject = {
3
+ float: number;
4
+ string: string;
5
+ currency: string;
6
+ };
7
+ export declare const getCurrencyObject: (amount: number, currencyType: currency, randomSatoshis: boolean) => currencyObject;
8
+ declare const _default: {
9
+ getCurrencyObject: (amount: number, currencyType: currency, randomSatoshis: boolean) => currencyObject;
10
+ };
11
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paybutton/react",
3
- "version": "1.2.2",
3
+ "version": "2.0.1",
4
4
  "description": "The easiest way to accept Bitcoin Cash online",
5
5
  "author": "poldridge",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "build": "microbundle --jsx React.createElement --format modern,cjs",
19
19
  "lint": "eslint 'src/**/*.{ts,tsx}' --fix",
20
20
  "prettier": "prettier --write 'src/**/*.ts'",
21
- "start": "concurrently npm:watch npm:storybook",
21
+ "dev": "concurrently npm:watch npm:storybook",
22
22
  "storybook": "start-storybook -p 6006",
23
23
  "watch": "microbundle watch --jsx React.createElement --no-compress --format modern,cjs"
24
24
  },
@@ -60,6 +60,7 @@
60
60
  "eslint-plugin-react": "7.30.1",
61
61
  "eslint-plugin-react-hooks": "4.6.0",
62
62
  "eslint-plugin-standard": "4.1.0",
63
+ "html-webpack-plugin": "^5.5.0",
63
64
  "husky": "4.3.8",
64
65
  "lint-staged": "10.5.4",
65
66
  "microbundle": "0.12.4",
@@ -73,7 +74,6 @@
73
74
  "dist"
74
75
  ],
75
76
  "dependencies": {
76
- "@bitauth/libauth": "1.19.1",
77
77
  "@material-ui/core": "4.12.4",
78
78
  "@material-ui/lab": "4.0.0-alpha.61",
79
79
  "@material-ui/styles": "4.11.5",
@@ -83,7 +83,9 @@
83
83
  "lodash": "4.17.21",
84
84
  "notistack": "1.0.10",
85
85
  "qrcode.react": "1.0.1",
86
- "react-jss": "10.9.0"
86
+ "react-jss": "10.9.0",
87
+ "socket.io-client": "^4.7.1",
88
+ "xecaddrjs": "^0.0.1"
87
89
  },
88
90
  "husky": {
89
91
  "hooks": {