@paybutton/react 1.0.5 → 1.2.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/README.md +25 -25
- package/dist/assets/edit-pencil.d.ts +3 -0
- package/dist/components/BarChart/BarChart.d.ts +13 -0
- package/dist/components/BarChart/BarChart.stories.d.ts +26 -0
- package/dist/components/BarChart/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.stories.d.ts +2 -1
- package/dist/components/PayButton/PayButton.d.ts +9 -3
- package/dist/components/PayButton/PayButton.stories.d.ts +7 -1
- package/dist/components/PaymentDialog/PaymentDialog.d.ts +37 -0
- package/dist/components/PaymentDialog/PaymentDialog.stories.d.ts +50 -0
- package/dist/components/PaymentDialog/index.d.ts +1 -0
- package/dist/components/Widget/Widget.d.ts +13 -1
- package/dist/components/Widget/Widget.stories.d.ts +1 -0
- package/dist/components/Widget/WidgetContainer.d.ts +12 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/index.d.ts +18 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/util/address.d.ts +5 -0
- package/dist/util/api-client.d.ts +198 -49
- package/dist/util/format.d.ts +9 -0
- package/dist/util/satoshis.d.ts +12 -0
- package/package.json +99 -93
- package/dist/BCH~bmNlrEgs.svg +0 -7
- package/dist/components/PayButton/PayButton.test.d.ts +0 -1
- package/dist/components/UI/Button/Button.d.ts +0 -14
- package/dist/components/UI/Button/Button.stories.d.ts +0 -20
- package/dist/components/UI/Button/Button.test.d.ts +0 -1
- package/dist/components/UI/Button/index.d.ts +0 -1
- package/dist/components/UI/Widget/Widget.d.ts +0 -16
- package/dist/components/UI/Widget/Widget.stories.d.ts +0 -33
- package/dist/components/UI/Widget/Widget.test.d.ts +0 -1
- package/dist/components/UI/Widget/index.d.ts +0 -1
- package/dist/components/WidgetContainer/WidgetContainer.d.ts +0 -18
- package/dist/components/WidgetContainer/WidgetContainer.test.d.ts +0 -1
- package/dist/components/WidgetContainer/index.d.ts +0 -1
- package/dist/components/index.spec.d.ts +0 -0
- package/dist/components/index.test.d.ts +0 -1
- package/dist/hooks/useBalancePolling.d.ts +0 -20
- package/dist/hooks/useTheme.d.ts +0 -4
- package/dist/index.test.d.ts +0 -1
- package/dist/stories/Button.d.ts +0 -28
- package/dist/stories/Button.stories.d.ts +0 -8
- package/dist/stories/Header.d.ts +0 -9
- package/dist/stories/Header.stories.d.ts +0 -6
- package/dist/stories/Page.d.ts +0 -9
- package/dist/stories/Page.stories.d.ts +0 -6
- package/dist/util/copyToClipboard.d.ts +0 -2
- package/dist/util/satoshisToBCH.d.ts +0 -2
|
@@ -1,61 +1,210 @@
|
|
|
1
|
-
export declare const getAddressDetails: (address: string) => Promise<AddressDetails>;
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
export declare const getAddressDetails: (address: string, rootUrl?: string) => Promise<AddressDetails>;
|
|
2
|
+
export declare const getSatoshiBalance: (address: string, rootUrl?: string) => Promise<{
|
|
3
|
+
satoshis: number;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const getUTXOs: (address: string, rootUrl?: string) => Promise<UtxoDetails>;
|
|
6
|
+
export declare const getFiatPrice: (currency: currency) => Promise<PriceData>;
|
|
7
|
+
export declare const getTransactionDetails: (txid: string, rootUrl?: string) => Promise<TransactionDetails>;
|
|
4
8
|
declare const _default: {
|
|
5
|
-
getAddressDetails: (address: string) => Promise<AddressDetails>;
|
|
6
|
-
getTransactionDetails: (txid: string) => Promise<TransactionDetails>;
|
|
7
|
-
getFiatPrice: (currency:
|
|
9
|
+
getAddressDetails: (address: string, rootUrl?: string) => Promise<AddressDetails>;
|
|
10
|
+
getTransactionDetails: (txid: string, rootUrl?: string) => Promise<TransactionDetails>;
|
|
11
|
+
getFiatPrice: (currency: currency) => Promise<PriceData>;
|
|
12
|
+
getSatoshiBalance: (address: string, rootUrl?: string) => Promise<{
|
|
13
|
+
satoshis: number;
|
|
14
|
+
}>;
|
|
8
15
|
};
|
|
9
16
|
export default _default;
|
|
10
17
|
export declare type fiatCurrency = 'USD' | 'CAD' | 'EUR' | 'GBP' | 'AUD';
|
|
18
|
+
export declare type cryptoCurrency = 'BCH' | 'SAT' | 'bits';
|
|
19
|
+
export declare type currency = cryptoCurrency | fiatCurrency;
|
|
11
20
|
export interface AddressDetails {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
totalReceived: number;
|
|
15
|
-
totalReceivedSat: number;
|
|
16
|
-
totalSent: number;
|
|
17
|
-
totalSentSat: number;
|
|
18
|
-
unconfirmedBalance: number;
|
|
19
|
-
unconfirmedBalanceSat: number;
|
|
20
|
-
unconfirmedTxAppearances: number;
|
|
21
|
-
txAppearances: number;
|
|
22
|
-
transactions: [string];
|
|
23
|
-
legacyAddress: string;
|
|
24
|
-
cashAddress: string;
|
|
21
|
+
confirmedTransactionsList: [ConfirmedTransaction];
|
|
22
|
+
unconfirmedTransactionsList: [UnconfirmedTransaction];
|
|
25
23
|
}
|
|
26
|
-
export interface
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
export interface TransactionDetails {
|
|
30
|
-
txid: string;
|
|
24
|
+
export interface ConfirmedTransaction {
|
|
25
|
+
hash: string;
|
|
31
26
|
version: number;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
inputsList: {
|
|
28
|
+
index: number;
|
|
29
|
+
outpoint: {
|
|
30
|
+
hash: string;
|
|
31
|
+
index: number;
|
|
32
|
+
};
|
|
33
|
+
signatureScript: string;
|
|
35
34
|
sequence: number;
|
|
36
|
-
|
|
35
|
+
value: number;
|
|
36
|
+
previousScript: string;
|
|
37
|
+
address: string;
|
|
37
38
|
}[];
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
type: string;
|
|
46
|
-
cashAddrs: string[];
|
|
47
|
-
};
|
|
48
|
-
spentTxId: string | null;
|
|
49
|
-
spentIndex: number | null;
|
|
50
|
-
spentHeight: number | null;
|
|
39
|
+
outputsList: {
|
|
40
|
+
index: number;
|
|
41
|
+
value: number;
|
|
42
|
+
pubkeyScript: string;
|
|
43
|
+
address: string;
|
|
44
|
+
scriptClass: string;
|
|
45
|
+
disassembledScript: string;
|
|
51
46
|
}[];
|
|
52
|
-
|
|
53
|
-
blockheight: number;
|
|
54
|
-
confirmations: number;
|
|
55
|
-
time: number;
|
|
56
|
-
blocktime: number;
|
|
57
|
-
firstSeenTime: number;
|
|
58
|
-
isCoinBase: boolean;
|
|
59
|
-
valueOut: number;
|
|
47
|
+
lockTime: number;
|
|
60
48
|
size: number;
|
|
49
|
+
timestamp: number;
|
|
50
|
+
confirmations: number;
|
|
51
|
+
blockHeight: number;
|
|
52
|
+
blockHash: string;
|
|
53
|
+
slpTransactionInfo: {
|
|
54
|
+
slpAction: number;
|
|
55
|
+
validityJudgement: number;
|
|
56
|
+
parseError: string;
|
|
57
|
+
tokenId: string;
|
|
58
|
+
burnFlagsList: [];
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export interface UnconfirmedTransaction {
|
|
62
|
+
transaction: {
|
|
63
|
+
hash: string;
|
|
64
|
+
version: number;
|
|
65
|
+
inputsList: {
|
|
66
|
+
index: number;
|
|
67
|
+
outpoint: {
|
|
68
|
+
hash: string;
|
|
69
|
+
index: number;
|
|
70
|
+
};
|
|
71
|
+
signatureScript: string;
|
|
72
|
+
sequence: number;
|
|
73
|
+
value: number;
|
|
74
|
+
previousScript: string;
|
|
75
|
+
address: string;
|
|
76
|
+
}[];
|
|
77
|
+
outputsList: {
|
|
78
|
+
index: number;
|
|
79
|
+
value: number;
|
|
80
|
+
pubkeyScript: string;
|
|
81
|
+
address: string;
|
|
82
|
+
scriptClass: string;
|
|
83
|
+
disassembledScript: string;
|
|
84
|
+
}[];
|
|
85
|
+
lockTime: number;
|
|
86
|
+
size: number;
|
|
87
|
+
timestamp: number;
|
|
88
|
+
confirmations: number;
|
|
89
|
+
blockHeight: number;
|
|
90
|
+
blockHash: string;
|
|
91
|
+
slpTransactionInfo: {
|
|
92
|
+
slpAction: number;
|
|
93
|
+
validityJudgement: number;
|
|
94
|
+
parseError: string;
|
|
95
|
+
tokenId: string;
|
|
96
|
+
burnFlagsList: [];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
addedTime: number;
|
|
100
|
+
addedHeight: number;
|
|
101
|
+
fee: number;
|
|
102
|
+
feePerKb: number;
|
|
103
|
+
startingPriority: number;
|
|
104
|
+
}
|
|
105
|
+
export interface UtxoDetails {
|
|
106
|
+
outputsList: [Output];
|
|
107
|
+
tokenMetadataList: [TokenMetaData];
|
|
108
|
+
}
|
|
109
|
+
export interface Output {
|
|
110
|
+
outpoint: {
|
|
111
|
+
hash: string;
|
|
112
|
+
index: number;
|
|
113
|
+
};
|
|
114
|
+
pubkeyScript: string;
|
|
115
|
+
value: number;
|
|
116
|
+
isCoinbase: boolean;
|
|
117
|
+
blockHeight: number;
|
|
118
|
+
}
|
|
119
|
+
export interface TokenMetaData {
|
|
120
|
+
tokenId: string;
|
|
121
|
+
tokenType: number;
|
|
122
|
+
v1Fungible: {
|
|
123
|
+
tokenTicker: string;
|
|
124
|
+
tokenName: string;
|
|
125
|
+
tokenDocumentUrl: string;
|
|
126
|
+
tokenDocumentHash: string;
|
|
127
|
+
decimals: number;
|
|
128
|
+
mintBatonHash: string;
|
|
129
|
+
mintBatonVout: number;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export interface PriceData {
|
|
133
|
+
price: number;
|
|
134
|
+
}
|
|
135
|
+
export interface TransactionDetails {
|
|
136
|
+
transaction: {
|
|
137
|
+
hash: string;
|
|
138
|
+
version: number;
|
|
139
|
+
inputsList: {
|
|
140
|
+
index: number;
|
|
141
|
+
outpoint: {
|
|
142
|
+
hash: string;
|
|
143
|
+
index: number;
|
|
144
|
+
};
|
|
145
|
+
signatureScript: string;
|
|
146
|
+
sequence: number;
|
|
147
|
+
value: number;
|
|
148
|
+
previousScript: string;
|
|
149
|
+
address: string;
|
|
150
|
+
slpToken: {
|
|
151
|
+
tokenId: string;
|
|
152
|
+
amount: string;
|
|
153
|
+
isMintBaton: boolean;
|
|
154
|
+
address: string;
|
|
155
|
+
decimals: number;
|
|
156
|
+
slpAction: number;
|
|
157
|
+
tokenType: number;
|
|
158
|
+
};
|
|
159
|
+
}[];
|
|
160
|
+
outputsList: {
|
|
161
|
+
index: number;
|
|
162
|
+
value: number;
|
|
163
|
+
pubkeyScript: string;
|
|
164
|
+
address: string;
|
|
165
|
+
scriptClass: string;
|
|
166
|
+
disassembledScript: string;
|
|
167
|
+
slpToken?: {
|
|
168
|
+
tokenId: string;
|
|
169
|
+
amount: string;
|
|
170
|
+
isMintBaton: boolean;
|
|
171
|
+
address: string;
|
|
172
|
+
decimals: number;
|
|
173
|
+
slpAction: number;
|
|
174
|
+
tokenType: number;
|
|
175
|
+
};
|
|
176
|
+
}[];
|
|
177
|
+
lockTime: number;
|
|
178
|
+
size: number;
|
|
179
|
+
timestamp: number;
|
|
180
|
+
confirmations: number;
|
|
181
|
+
blockHeight: number;
|
|
182
|
+
blockHash: string;
|
|
183
|
+
slpTransactionInfo: {
|
|
184
|
+
slpAction: number;
|
|
185
|
+
validityJudgement: number;
|
|
186
|
+
parseError: string;
|
|
187
|
+
tokenId: string;
|
|
188
|
+
burnFlagsList: [number];
|
|
189
|
+
v1Nft1ChildGenesis: {
|
|
190
|
+
name: string;
|
|
191
|
+
ticker: string;
|
|
192
|
+
documentUrl: string;
|
|
193
|
+
documentHash: string;
|
|
194
|
+
decimals: number;
|
|
195
|
+
groupTokenId: string;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
tokenMetadata: {
|
|
200
|
+
tokenId: string;
|
|
201
|
+
tokenType: number;
|
|
202
|
+
v1Nft1Child: {
|
|
203
|
+
tokenTicker: string;
|
|
204
|
+
tokenName: string;
|
|
205
|
+
tokenDocumentUrl: string;
|
|
206
|
+
tokenDocumentHash: string;
|
|
207
|
+
groupId: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
61
210
|
}
|
package/dist/util/format.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { currency } from './api-client';
|
|
1
2
|
export declare const amount: (x?: number | null | undefined) => string | undefined;
|
|
3
|
+
export declare const formatPrice: (price: number, currencyType: currency, precision?: number) => string;
|
|
4
|
+
export declare const formatComma: (number: number) => string;
|
|
5
|
+
export declare const formatBCH: (bch: string) => string;
|
|
6
|
+
export declare const formatBits: (bits: string | number) => string;
|
|
2
7
|
declare const _default: {
|
|
3
8
|
amount: (x?: number | null | undefined) => string | undefined;
|
|
9
|
+
formatPrice: (price: number, currencyType: currency, precision?: number) => string;
|
|
10
|
+
formatComma: (number: number) => string;
|
|
11
|
+
formatBCH: (bch: string) => string;
|
|
12
|
+
formatBits: (bits: string | number) => string;
|
|
4
13
|
};
|
|
5
14
|
export default _default;
|
package/dist/util/satoshis.d.ts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { fiatCurrency } from './api-client';
|
|
2
|
+
export declare type cryptoCurrency = 'BCH' | 'SAT' | 'bits';
|
|
3
|
+
export declare type currency = cryptoCurrency | fiatCurrency;
|
|
1
4
|
export declare const satoshisToBch: (satoshis: number) => number;
|
|
2
5
|
export declare const bchToSatoshis: (bch: number) => number;
|
|
6
|
+
export declare type currencyObject = {
|
|
7
|
+
float: number;
|
|
8
|
+
string: string;
|
|
9
|
+
currency: string;
|
|
10
|
+
BCHstring?: string | undefined;
|
|
11
|
+
satoshis?: number | undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare const getCurrencyObject: (amount: number, currencyType: currency) => currencyObject;
|
|
3
14
|
declare const _default: {
|
|
4
15
|
satoshisToBch: (satoshis: number) => number;
|
|
5
16
|
bchToSatoshis: (bch: number) => number;
|
|
17
|
+
getCurrencyObject: (amount: number, currencyType: currency) => currencyObject;
|
|
6
18
|
};
|
|
7
19
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,93 +1,99 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@paybutton/react",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "The easiest way to accept Bitcoin Cash online",
|
|
5
|
-
"author": "poldridge",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/PayButton/paybutton.git"
|
|
10
|
-
},
|
|
11
|
-
"main": "dist/index.js",
|
|
12
|
-
"module": "dist/index.modern.js",
|
|
13
|
-
"source": "src/index.tsx",
|
|
14
|
-
"engines": {
|
|
15
|
-
"node": ">=10"
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "microbundle --jsx React.createElement --format modern,cjs",
|
|
19
|
-
"lint": "eslint 'src/**/*.{ts,tsx}' --fix",
|
|
20
|
-
"prettier": "prettier --write 'src/**/*.ts'",
|
|
21
|
-
"start": "concurrently npm:watch npm:storybook",
|
|
22
|
-
"storybook": "start-storybook -p 6006",
|
|
23
|
-
"watch": "microbundle watch --jsx React.createElement --no-compress --format modern,cjs"
|
|
24
|
-
},
|
|
25
|
-
"peerDependencies": {
|
|
26
|
-
"react": "^16.13.1",
|
|
27
|
-
"react-dom": "^16.13.1"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@babel/core": "^7.11.6",
|
|
31
|
-
"@
|
|
32
|
-
"@storybook/addon-
|
|
33
|
-
"@storybook/addon-
|
|
34
|
-
"@storybook/addon-
|
|
35
|
-
"@storybook/
|
|
36
|
-
"@storybook/
|
|
37
|
-
"@storybook/react": "^
|
|
38
|
-
"@
|
|
39
|
-
"@types/
|
|
40
|
-
"@types/
|
|
41
|
-
"@types/
|
|
42
|
-
"@types/react
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"eslint
|
|
53
|
-
"eslint-
|
|
54
|
-
"eslint-
|
|
55
|
-
"eslint-
|
|
56
|
-
"eslint-plugin-
|
|
57
|
-
"eslint-plugin-
|
|
58
|
-
"eslint-plugin-
|
|
59
|
-
"eslint-plugin-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@paybutton/react",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "The easiest way to accept Bitcoin Cash online",
|
|
5
|
+
"author": "poldridge",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/PayButton/paybutton.git"
|
|
10
|
+
},
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"module": "dist/index.modern.js",
|
|
13
|
+
"source": "src/index.tsx",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=10"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "microbundle --jsx React.createElement --format modern,cjs",
|
|
19
|
+
"lint": "eslint 'src/**/*.{ts,tsx}' --fix",
|
|
20
|
+
"prettier": "prettier --write 'src/**/*.ts'",
|
|
21
|
+
"start": "concurrently npm:watch npm:storybook",
|
|
22
|
+
"storybook": "start-storybook -p 6006",
|
|
23
|
+
"watch": "microbundle watch --jsx React.createElement --no-compress --format modern,cjs"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "^16.13.1",
|
|
27
|
+
"react-dom": "^16.13.1"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@babel/core": "^7.11.6",
|
|
31
|
+
"@popperjs/core": "^2.7.2",
|
|
32
|
+
"@storybook/addon-a11y": "^6.1.18",
|
|
33
|
+
"@storybook/addon-actions": "^6.1.18",
|
|
34
|
+
"@storybook/addon-essentials": "^6.1.18",
|
|
35
|
+
"@storybook/addon-links": "^6.1.18",
|
|
36
|
+
"@storybook/node-logger": "^6.1.18",
|
|
37
|
+
"@storybook/preset-create-react-app": "^3.1.6",
|
|
38
|
+
"@storybook/react": "^6.1.18",
|
|
39
|
+
"@types/currency-formatter": "^1.3.0",
|
|
40
|
+
"@types/lodash": "^4.14.157",
|
|
41
|
+
"@types/node": "^12.12.38",
|
|
42
|
+
"@types/qrcode.react": "^1.0.1",
|
|
43
|
+
"@types/react": "^16.9.27",
|
|
44
|
+
"@types/react-dom": "^16.9.7",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
|
46
|
+
"@typescript-eslint/parser": "^2.26.0",
|
|
47
|
+
"babel-eslint": "^10.0.3",
|
|
48
|
+
"babel-loader": "^8.1.0",
|
|
49
|
+
"concurrently": "^5.3.0",
|
|
50
|
+
"cross-env": "^7.0.2",
|
|
51
|
+
"currency-formatter": "^1.5.6",
|
|
52
|
+
"eslint": "^6.8.0",
|
|
53
|
+
"eslint-config-prettier": "^6.7.0",
|
|
54
|
+
"eslint-config-standard": "^14.1.0",
|
|
55
|
+
"eslint-config-standard-react": "^9.2.0",
|
|
56
|
+
"eslint-plugin-import": "^2.18.2",
|
|
57
|
+
"eslint-plugin-node": "^11.0.0",
|
|
58
|
+
"eslint-plugin-prettier": "^3.1.1",
|
|
59
|
+
"eslint-plugin-promise": "^4.2.1",
|
|
60
|
+
"eslint-plugin-react": "^7.17.0",
|
|
61
|
+
"eslint-plugin-react-hooks": "^4.1.2",
|
|
62
|
+
"eslint-plugin-standard": "^4.0.1",
|
|
63
|
+
"husky": "^4.3.0",
|
|
64
|
+
"lint-staged": "^10.4.0",
|
|
65
|
+
"microbundle": "^0.12.4",
|
|
66
|
+
"npm-run-all": "^4.1.5",
|
|
67
|
+
"prettier": "^2.1.2",
|
|
68
|
+
"react-is": "^16.13.1",
|
|
69
|
+
"react-scripts": "^3.4.3",
|
|
70
|
+
"typescript": "^3.7.5"
|
|
71
|
+
},
|
|
72
|
+
"files": [
|
|
73
|
+
"dist"
|
|
74
|
+
],
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@bitauth/libauth": "^1.18.0",
|
|
77
|
+
"@material-ui/core": "^4.11.0",
|
|
78
|
+
"@material-ui/lab": "^4.0.0-alpha.56",
|
|
79
|
+
"@material-ui/styles": "^4.10.0",
|
|
80
|
+
"axios": "^0.21.1",
|
|
81
|
+
"bignumber.js": "^9.0.1",
|
|
82
|
+
"copy-to-clipboard": "^3.3.1",
|
|
83
|
+
"lodash": "^4.17.20",
|
|
84
|
+
"notistack": "^1.0.0",
|
|
85
|
+
"qrcode.react": "^1.0.0",
|
|
86
|
+
"react-jss": "^10.3.0"
|
|
87
|
+
},
|
|
88
|
+
"husky": {
|
|
89
|
+
"hooks": {
|
|
90
|
+
"pre-commit": "lint-staged"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"lint-staged": {
|
|
94
|
+
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
|
|
95
|
+
"eslint --fix",
|
|
96
|
+
"prettier --write"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
}
|
package/dist/BCH~bmNlrEgs.svg
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<g fill-rule="evenodd">
|
|
4
|
-
<circle cx="16" cy="16" r="16" fill="#4bc846"/>
|
|
5
|
-
<path d="m21.207 10.534c-0.776-1.972-2.722-2.15-4.988-1.71l-0.807-2.813-1.712 0.491 0.786 2.74c-0.45 0.128-0.908 0.27-1.363 0.41l-0.79-2.758-1.711 0.49 0.805 2.813c-0.368 0.114-0.73 0.226-1.085 0.328l-3e-3 -0.01-2.362 0.677 0.525 1.83s1.258-0.388 1.243-0.358c0.694-0.199 1.035 0.139 1.2 0.468l0.92 3.204c0.047-0.013 0.11-0.029 0.184-0.04l-0.181 0.052 1.287 4.49c0.032 0.227 4e-3 0.612-0.48 0.752 0.027 0.013-1.246 0.356-1.246 0.356l0.247 2.143 2.228-0.64c0.415-0.117 0.825-0.227 1.226-0.34l0.817 2.845 1.71-0.49-0.807-2.815a65.74 65.74 0 0 0 1.372-0.38l0.802 2.803 1.713-0.491-0.814-2.84c2.831-0.991 4.638-2.294 4.113-5.07-0.422-2.234-1.724-2.912-3.471-2.836 0.848-0.79 1.213-1.858 0.642-3.3zm-0.65 6.77c0.61 2.127-3.1 2.929-4.26 3.263l-1.081-3.77c1.16-0.333 4.704-1.71 5.34 0.508zm-2.322-5.09c0.554 1.935-2.547 2.58-3.514 2.857l-0.98-3.419c0.966-0.277 3.915-1.455 4.494 0.563z" fill="#fff" fill-rule="nonzero"/>
|
|
6
|
-
</g>
|
|
7
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Theme, ThemeName } from '../../../themes';
|
|
3
|
-
declare type animation = 'slide' | 'invert' | 'none';
|
|
4
|
-
export interface ButtonProps {
|
|
5
|
-
animation?: animation;
|
|
6
|
-
borderRadius?: number | string;
|
|
7
|
-
size?: number;
|
|
8
|
-
children?: string;
|
|
9
|
-
hoverText?: string;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
theme?: ThemeName | Theme;
|
|
12
|
-
}
|
|
13
|
-
export declare const Button: (props: ButtonProps) => React.ReactElement;
|
|
14
|
-
export default Button;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Story } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ButtonProps } from './Button';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: (props: ButtonProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
7
|
-
decorators: ((Story: Story<import("@storybook/react").Args>) => React.ReactNode)[];
|
|
8
|
-
argTypes: {
|
|
9
|
-
onClick: {
|
|
10
|
-
table: {
|
|
11
|
-
disable: boolean;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
parameters: {
|
|
16
|
-
jest: string[];
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export default _default;
|
|
20
|
-
export declare const Primary: Story<ButtonProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Button';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Theme, ThemeName } from '../../../themes';
|
|
3
|
-
export interface WidgetProps {
|
|
4
|
-
address: string;
|
|
5
|
-
amount?: number | null;
|
|
6
|
-
displayAmount?: string;
|
|
7
|
-
text?: string;
|
|
8
|
-
ButtonComponent?: React.ComponentType;
|
|
9
|
-
loading: boolean;
|
|
10
|
-
success: boolean;
|
|
11
|
-
successMessage?: string;
|
|
12
|
-
theme?: ThemeName | Theme;
|
|
13
|
-
foot?: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
export declare const Widget: React.FC<WidgetProps>;
|
|
16
|
-
export default Widget;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Story } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { WidgetProps } from './Widget';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: React.FC<WidgetProps>;
|
|
7
|
-
decorators: ((Story: Story<import("@storybook/react").Args>) => React.ReactNode)[];
|
|
8
|
-
argTypes: {
|
|
9
|
-
success: {
|
|
10
|
-
control: string;
|
|
11
|
-
};
|
|
12
|
-
ButtonComponent: {
|
|
13
|
-
table: {
|
|
14
|
-
disable: boolean;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
foot: {
|
|
18
|
-
table: {
|
|
19
|
-
disable: boolean;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
args: {
|
|
24
|
-
address: string;
|
|
25
|
-
loading: boolean;
|
|
26
|
-
success: boolean;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export default _default;
|
|
30
|
-
export declare const Primary: Story<WidgetProps>;
|
|
31
|
-
export declare const Success: Story<WidgetProps>;
|
|
32
|
-
export declare const Loading: Story<WidgetProps>;
|
|
33
|
-
export declare const OrangeTheme: Story<WidgetProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Widget';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { fiatCurrency } from '../../util/api-client';
|
|
3
|
-
import { WidgetProps } from '../UI/Widget/Widget';
|
|
4
|
-
export declare type cryptoCurrency = 'BCH' | 'SAT';
|
|
5
|
-
export declare type currency = cryptoCurrency | fiatCurrency;
|
|
6
|
-
export interface WidgetContainerProps extends Omit<Omit<WidgetProps, 'loading'>, 'success'> {
|
|
7
|
-
active?: boolean;
|
|
8
|
-
amount?: number;
|
|
9
|
-
currency?: currency;
|
|
10
|
-
detectPayment?: boolean;
|
|
11
|
-
displayCurrency?: cryptoCurrency;
|
|
12
|
-
hideToasts?: boolean;
|
|
13
|
-
onSuccess?: (txid: string, amount: number) => void;
|
|
14
|
-
onTransaction?: (txid: string, amount: number) => void;
|
|
15
|
-
sound?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const WidgetContainer: (props: WidgetContainerProps) => React.ReactElement;
|
|
18
|
-
export default WidgetContainer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './WidgetContainer';
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface AddressDetails {
|
|
2
|
-
loading: boolean;
|
|
3
|
-
data?: {
|
|
4
|
-
balance: number;
|
|
5
|
-
balanceSat: number;
|
|
6
|
-
totalReceived: number;
|
|
7
|
-
totalReceivedSat: number;
|
|
8
|
-
totalSent: number;
|
|
9
|
-
totalSentSat: number;
|
|
10
|
-
unconfirmedBalance: number;
|
|
11
|
-
unconfirmedBalanceSat: number;
|
|
12
|
-
unconfirmedTxAppearances: number;
|
|
13
|
-
txAppearances: number;
|
|
14
|
-
transactions: [string];
|
|
15
|
-
legacyAddress: string;
|
|
16
|
-
cashAddress: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare const useAddressDetails: (address: string) => AddressDetails;
|
|
20
|
-
export default useAddressDetails;
|