@ckb-ccc/connector-react 0.0.17-alpha.1 → 0.0.17-alpha.11
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/CHANGELOG.md +114 -39
- package/README.md +6 -26
- package/dist/hooks/useCcc.d.ts +4 -2
- package/dist/hooks/useCcc.d.ts.map +1 -1
- package/dist/hooks/useCcc.js +11 -5
- package/package.json +6 -6
- package/src/hooks/useCcc.tsx +15 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,96 @@
|
|
|
1
1
|
# @ckb-ccc/connector-react
|
|
2
2
|
|
|
3
|
+
## 0.0.17-alpha.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @ckb-ccc/connector@0.0.17-alpha.10
|
|
9
|
+
|
|
10
|
+
## 0.0.17-alpha.10
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies []:
|
|
15
|
+
- @ckb-ccc/connector@0.0.17-alpha.9
|
|
16
|
+
|
|
17
|
+
## 0.0.17-alpha.9
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies []:
|
|
22
|
+
- @ckb-ccc/connector@0.0.17-alpha.8
|
|
23
|
+
|
|
24
|
+
## 0.0.17-alpha.8
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies []:
|
|
29
|
+
- @ckb-ccc/connector@0.0.17-alpha.7
|
|
30
|
+
|
|
31
|
+
## 0.0.17-alpha.7
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- [#78](https://github.com/ckb-devrel/ccc/pull/78) [`517dd3a`](https://github.com/ckb-devrel/ccc/commit/517dd3a28a0d6bf14df68450101f82e94a230801) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(connector-react): useCcc().isOpen
|
|
36
|
+
|
|
37
|
+
## 0.0.17-alpha.6
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies []:
|
|
42
|
+
- @ckb-ccc/connector@0.0.17-alpha.6
|
|
43
|
+
|
|
44
|
+
## 0.0.17-alpha.5
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- Updated dependencies []:
|
|
49
|
+
- @ckb-ccc/connector@0.0.17-alpha.5
|
|
50
|
+
|
|
51
|
+
## 0.0.17-alpha.4
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- [#70](https://github.com/ckb-devrel/ccc/pull/70) [`acfc050`](https://github.com/ckb-devrel/ccc/commit/acfc0502cd6beb48b9310dec8411dcd630507366) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(core): websocket transport
|
|
56
|
+
|
|
57
|
+
- Updated dependencies [[`acfc050`](https://github.com/ckb-devrel/ccc/commit/acfc0502cd6beb48b9310dec8411dcd630507366)]:
|
|
58
|
+
- @ckb-ccc/connector@0.0.17-alpha.4
|
|
59
|
+
|
|
60
|
+
## 0.0.17-alpha.3
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- [#69](https://github.com/ckb-devrel/ccc/pull/69) [`8824ff2`](https://github.com/ckb-devrel/ccc/commit/8824ff27af3b76186f1a7d6db8c907cd66f09d6a) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): Client.waitTransaction
|
|
65
|
+
|
|
66
|
+
- [#67](https://github.com/ckb-devrel/ccc/pull/67) [`c092988`](https://github.com/ckb-devrel/ccc/commit/c092988e7765b9ac79498d6bd72a6a2f62859b6f) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): auto fee rate
|
|
67
|
+
|
|
68
|
+
- Updated dependencies [[`8824ff2`](https://github.com/ckb-devrel/ccc/commit/8824ff27af3b76186f1a7d6db8c907cd66f09d6a), [`c092988`](https://github.com/ckb-devrel/ccc/commit/c092988e7765b9ac79498d6bd72a6a2f62859b6f)]:
|
|
69
|
+
- @ckb-ccc/connector@0.0.17-alpha.3
|
|
70
|
+
|
|
71
|
+
## 0.0.17-alpha.2
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- Updated dependencies []:
|
|
76
|
+
- @ckb-ccc/connector@0.0.17-alpha.2
|
|
77
|
+
|
|
3
78
|
## 0.0.17-alpha.1
|
|
4
79
|
|
|
5
80
|
### Patch Changes
|
|
6
81
|
|
|
7
|
-
- [#62](https://github.com/ckb-
|
|
82
|
+
- [#62](https://github.com/ckb-devrel/ccc/pull/62) [`543c765`](https://github.com/ckb-devrel/ccc/commit/543c76523b3864f2203631762c27b8fc4c942cd7) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(connector): Powered by CCC
|
|
8
83
|
|
|
9
|
-
- Updated dependencies [[`543c765`](https://github.com/ckb-
|
|
84
|
+
- Updated dependencies [[`543c765`](https://github.com/ckb-devrel/ccc/commit/543c76523b3864f2203631762c27b8fc4c942cd7)]:
|
|
10
85
|
- @ckb-ccc/connector@0.0.17-alpha.1
|
|
11
86
|
|
|
12
87
|
## 0.0.17-alpha.0
|
|
13
88
|
|
|
14
89
|
### Patch Changes
|
|
15
90
|
|
|
16
|
-
- [#60](https://github.com/ckb-
|
|
91
|
+
- [#60](https://github.com/ckb-devrel/ccc/pull/60) [`e904963`](https://github.com/ckb-devrel/ccc/commit/e904963a16f12c410d861eb3ae01b87d68cb3e34) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat: support Xverse
|
|
17
92
|
|
|
18
|
-
- Updated dependencies [[`e904963`](https://github.com/ckb-
|
|
93
|
+
- Updated dependencies [[`e904963`](https://github.com/ckb-devrel/ccc/commit/e904963a16f12c410d861eb3ae01b87d68cb3e34)]:
|
|
19
94
|
- @ckb-ccc/connector@0.0.17-alpha.0
|
|
20
95
|
|
|
21
96
|
## 0.0.16
|
|
@@ -29,53 +104,53 @@
|
|
|
29
104
|
|
|
30
105
|
### Patch Changes
|
|
31
106
|
|
|
32
|
-
- [`2483637`](https://github.com/ckb-
|
|
107
|
+
- [`2483637`](https://github.com/ckb-devrel/ccc/commit/2483637c89a2e012ed6408d8cabc123b8a45faa9) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(connector): animation
|
|
33
108
|
|
|
34
|
-
- Updated dependencies [[`2483637`](https://github.com/ckb-
|
|
109
|
+
- Updated dependencies [[`2483637`](https://github.com/ckb-devrel/ccc/commit/2483637c89a2e012ed6408d8cabc123b8a45faa9)]:
|
|
35
110
|
- @ckb-ccc/connector@0.0.15
|
|
36
111
|
|
|
37
112
|
## 0.0.14
|
|
38
113
|
|
|
39
114
|
### Patch Changes
|
|
40
115
|
|
|
41
|
-
- [#56](https://github.com/ckb-
|
|
116
|
+
- [#56](https://github.com/ckb-devrel/ccc/pull/56) [`b4aa690`](https://github.com/ckb-devrel/ccc/commit/b4aa69085d69fc0953629fd907212922d7d106dd) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(connector): manage button
|
|
42
117
|
|
|
43
|
-
- [#56](https://github.com/ckb-
|
|
118
|
+
- [#56](https://github.com/ckb-devrel/ccc/pull/56) [`f13f4d3`](https://github.com/ckb-devrel/ccc/commit/f13f4d319ca66b571029a65e945e3a038bfeea25) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): Signer.findTransactions
|
|
44
119
|
|
|
45
|
-
- [#48](https://github.com/ckb-
|
|
120
|
+
- [#48](https://github.com/ckb-devrel/ccc/pull/48) [`4fb114b`](https://github.com/ckb-devrel/ccc/commit/4fb114bc421c7250eed7388c16f1c026875153e6) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(okx): make okx wallet happy
|
|
46
121
|
|
|
47
|
-
- [#54](https://github.com/ckb-
|
|
122
|
+
- [#54](https://github.com/ckb-devrel/ccc/pull/54) [`3f49876`](https://github.com/ckb-devrel/ccc/commit/3f49876826f5a9eeff8d14c7d8d7b9cf2cea0f32) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(connector): useless back button
|
|
48
123
|
|
|
49
|
-
- [#53](https://github.com/ckb-
|
|
124
|
+
- [#53](https://github.com/ckb-devrel/ccc/pull/53) [`32bffff`](https://github.com/ckb-devrel/ccc/commit/32bffff407934ec5d16bf7c5701b128d8b29c452) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(connector): select client
|
|
50
125
|
|
|
51
|
-
- Updated dependencies [[`b4aa690`](https://github.com/ckb-
|
|
126
|
+
- Updated dependencies [[`b4aa690`](https://github.com/ckb-devrel/ccc/commit/b4aa69085d69fc0953629fd907212922d7d106dd), [`f13f4d3`](https://github.com/ckb-devrel/ccc/commit/f13f4d319ca66b571029a65e945e3a038bfeea25), [`4fb114b`](https://github.com/ckb-devrel/ccc/commit/4fb114bc421c7250eed7388c16f1c026875153e6), [`3f49876`](https://github.com/ckb-devrel/ccc/commit/3f49876826f5a9eeff8d14c7d8d7b9cf2cea0f32), [`32bffff`](https://github.com/ckb-devrel/ccc/commit/32bffff407934ec5d16bf7c5701b128d8b29c452)]:
|
|
52
127
|
- @ckb-ccc/connector@0.0.14
|
|
53
128
|
|
|
54
129
|
## 0.0.14-alpha.3
|
|
55
130
|
|
|
56
131
|
### Patch Changes
|
|
57
132
|
|
|
58
|
-
- [#54](https://github.com/ckb-
|
|
133
|
+
- [#54](https://github.com/ckb-devrel/ccc/pull/54) [`3f49876`](https://github.com/ckb-devrel/ccc/commit/3f49876826f5a9eeff8d14c7d8d7b9cf2cea0f32) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(connector): useless back button
|
|
59
134
|
|
|
60
|
-
- Updated dependencies [[`3f49876`](https://github.com/ckb-
|
|
135
|
+
- Updated dependencies [[`3f49876`](https://github.com/ckb-devrel/ccc/commit/3f49876826f5a9eeff8d14c7d8d7b9cf2cea0f32)]:
|
|
61
136
|
- @ckb-ccc/connector@0.0.14-alpha.3
|
|
62
137
|
|
|
63
138
|
## 0.0.14-alpha.2
|
|
64
139
|
|
|
65
140
|
### Patch Changes
|
|
66
141
|
|
|
67
|
-
- [#53](https://github.com/ckb-
|
|
142
|
+
- [#53](https://github.com/ckb-devrel/ccc/pull/53) [`32bffff`](https://github.com/ckb-devrel/ccc/commit/32bffff407934ec5d16bf7c5701b128d8b29c452) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(connector): select client
|
|
68
143
|
|
|
69
|
-
- Updated dependencies [[`32bffff`](https://github.com/ckb-
|
|
144
|
+
- Updated dependencies [[`32bffff`](https://github.com/ckb-devrel/ccc/commit/32bffff407934ec5d16bf7c5701b128d8b29c452)]:
|
|
70
145
|
- @ckb-ccc/connector@0.0.14-alpha.2
|
|
71
146
|
|
|
72
147
|
## 0.0.14-alpha.1
|
|
73
148
|
|
|
74
149
|
### Patch Changes
|
|
75
150
|
|
|
76
|
-
- [#48](https://github.com/ckb-
|
|
151
|
+
- [#48](https://github.com/ckb-devrel/ccc/pull/48) [`4fb114b`](https://github.com/ckb-devrel/ccc/commit/4fb114bc421c7250eed7388c16f1c026875153e6) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(okx): make okx wallet happy
|
|
77
152
|
|
|
78
|
-
- Updated dependencies [[`4fb114b`](https://github.com/ckb-
|
|
153
|
+
- Updated dependencies [[`4fb114b`](https://github.com/ckb-devrel/ccc/commit/4fb114bc421c7250eed7388c16f1c026875153e6)]:
|
|
79
154
|
- @ckb-ccc/connector@0.0.14-alpha.1
|
|
80
155
|
|
|
81
156
|
## 0.0.14-alpha.0
|
|
@@ -89,21 +164,21 @@
|
|
|
89
164
|
|
|
90
165
|
### Patch Changes
|
|
91
166
|
|
|
92
|
-
- [`9e6b9fd`](https://github.com/ckb-
|
|
167
|
+
- [`9e6b9fd`](https://github.com/ckb-devrel/ccc/commit/9e6b9fd40274015a0964dec8e0ee58dcbc06c786) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(connector-react): if the filter is undefined, accept all
|
|
93
168
|
|
|
94
|
-
- [`6d62032`](https://github.com/ckb-
|
|
169
|
+
- [`6d62032`](https://github.com/ckb-devrel/ccc/commit/6d620326f42f8c48eff9deb95578cf28d7bf5c97) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(core): recordCells should not add usableCells
|
|
95
170
|
|
|
96
|
-
- [`3658797`](https://github.com/ckb-
|
|
171
|
+
- [`3658797`](https://github.com/ckb-devrel/ccc/commit/3658797e67c42c56b20fa66481d0455ed019e69f) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): node.js websocket
|
|
97
172
|
|
|
98
|
-
- [#25](https://github.com/ckb-
|
|
173
|
+
- [#25](https://github.com/ckb-devrel/ccc/pull/25) [`69c10fd`](https://github.com/ckb-devrel/ccc/commit/69c10fdfcd507433c13b15d17015dca4687afb97) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(utxo-global): switchNetwork
|
|
99
174
|
|
|
100
|
-
- [`44c7fee`](https://github.com/ckb-
|
|
175
|
+
- [`44c7fee`](https://github.com/ckb-devrel/ccc/commit/44c7feed37369836268fba21884418682f15254b) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(core): completeInputs
|
|
101
176
|
|
|
102
|
-
- [`079e20e`](https://github.com/ckb-
|
|
177
|
+
- [`079e20e`](https://github.com/ckb-devrel/ccc/commit/079e20ef14cf9a7c06bbaddf3e92cbfbb005da11) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): more APIs. Since parsing.
|
|
103
178
|
|
|
104
|
-
- [`ed154d1`](https://github.com/ckb-
|
|
179
|
+
- [`ed154d1`](https://github.com/ckb-devrel/ccc/commit/ed154d189e239907ad686ec51ac8133b6d5eb895) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): Signer.findCells
|
|
105
180
|
|
|
106
|
-
- Updated dependencies [[`6d62032`](https://github.com/ckb-
|
|
181
|
+
- Updated dependencies [[`6d62032`](https://github.com/ckb-devrel/ccc/commit/6d620326f42f8c48eff9deb95578cf28d7bf5c97), [`3658797`](https://github.com/ckb-devrel/ccc/commit/3658797e67c42c56b20fa66481d0455ed019e69f), [`69c10fd`](https://github.com/ckb-devrel/ccc/commit/69c10fdfcd507433c13b15d17015dca4687afb97), [`44c7fee`](https://github.com/ckb-devrel/ccc/commit/44c7feed37369836268fba21884418682f15254b), [`079e20e`](https://github.com/ckb-devrel/ccc/commit/079e20ef14cf9a7c06bbaddf3e92cbfbb005da11), [`ed154d1`](https://github.com/ckb-devrel/ccc/commit/ed154d189e239907ad686ec51ac8133b6d5eb895)]:
|
|
107
182
|
- @ckb-ccc/connector@0.0.13
|
|
108
183
|
|
|
109
184
|
## 0.0.13-alpha.8
|
|
@@ -117,42 +192,42 @@
|
|
|
117
192
|
|
|
118
193
|
### Patch Changes
|
|
119
194
|
|
|
120
|
-
- [`079e20e`](https://github.com/ckb-
|
|
195
|
+
- [`079e20e`](https://github.com/ckb-devrel/ccc/commit/079e20ef14cf9a7c06bbaddf3e92cbfbb005da11) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): more APIs. Since parsing.
|
|
121
196
|
|
|
122
|
-
- [`ed154d1`](https://github.com/ckb-
|
|
197
|
+
- [`ed154d1`](https://github.com/ckb-devrel/ccc/commit/ed154d189e239907ad686ec51ac8133b6d5eb895) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): Signer.findCells
|
|
123
198
|
|
|
124
|
-
- Updated dependencies [[`079e20e`](https://github.com/ckb-
|
|
199
|
+
- Updated dependencies [[`079e20e`](https://github.com/ckb-devrel/ccc/commit/079e20ef14cf9a7c06bbaddf3e92cbfbb005da11), [`ed154d1`](https://github.com/ckb-devrel/ccc/commit/ed154d189e239907ad686ec51ac8133b6d5eb895)]:
|
|
125
200
|
- @ckb-ccc/connector@0.0.13-alpha.7
|
|
126
201
|
|
|
127
202
|
## 0.0.13-alpha.6
|
|
128
203
|
|
|
129
204
|
### Patch Changes
|
|
130
205
|
|
|
131
|
-
- [#25](https://github.com/ckb-
|
|
206
|
+
- [#25](https://github.com/ckb-devrel/ccc/pull/25) [`69c10fd`](https://github.com/ckb-devrel/ccc/commit/69c10fdfcd507433c13b15d17015dca4687afb97) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(utxo-global): switchNetwork
|
|
132
207
|
|
|
133
|
-
- [`44c7fee`](https://github.com/ckb-
|
|
208
|
+
- [`44c7fee`](https://github.com/ckb-devrel/ccc/commit/44c7feed37369836268fba21884418682f15254b) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(core): completeInputs
|
|
134
209
|
|
|
135
|
-
- Updated dependencies [[`69c10fd`](https://github.com/ckb-
|
|
210
|
+
- Updated dependencies [[`69c10fd`](https://github.com/ckb-devrel/ccc/commit/69c10fdfcd507433c13b15d17015dca4687afb97), [`44c7fee`](https://github.com/ckb-devrel/ccc/commit/44c7feed37369836268fba21884418682f15254b)]:
|
|
136
211
|
- @ckb-ccc/connector@0.0.13-alpha.6
|
|
137
212
|
|
|
138
213
|
## 0.0.13-alpha.5
|
|
139
214
|
|
|
140
215
|
### Patch Changes
|
|
141
216
|
|
|
142
|
-
- [`9e6b9fd`](https://github.com/ckb-
|
|
217
|
+
- [`9e6b9fd`](https://github.com/ckb-devrel/ccc/commit/9e6b9fd40274015a0964dec8e0ee58dcbc06c786) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(connector-react): if the filter is undefined, accept all
|
|
143
218
|
|
|
144
|
-
- [`6d62032`](https://github.com/ckb-
|
|
219
|
+
- [`6d62032`](https://github.com/ckb-devrel/ccc/commit/6d620326f42f8c48eff9deb95578cf28d7bf5c97) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(core): recordCells should not add usableCells
|
|
145
220
|
|
|
146
|
-
- Updated dependencies [[`6d62032`](https://github.com/ckb-
|
|
221
|
+
- Updated dependencies [[`6d62032`](https://github.com/ckb-devrel/ccc/commit/6d620326f42f8c48eff9deb95578cf28d7bf5c97)]:
|
|
147
222
|
- @ckb-ccc/connector@0.0.13-alpha.5
|
|
148
223
|
|
|
149
224
|
## 0.0.13-alpha.4
|
|
150
225
|
|
|
151
226
|
### Patch Changes
|
|
152
227
|
|
|
153
|
-
- [`3658797`](https://github.com/ckb-
|
|
228
|
+
- [`3658797`](https://github.com/ckb-devrel/ccc/commit/3658797e67c42c56b20fa66481d0455ed019e69f) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(core): node.js websocket
|
|
154
229
|
|
|
155
|
-
- Updated dependencies [[`3658797`](https://github.com/ckb-
|
|
230
|
+
- Updated dependencies [[`3658797`](https://github.com/ckb-devrel/ccc/commit/3658797e67c42c56b20fa66481d0455ed019e69f)]:
|
|
156
231
|
- @ckb-ccc/connector@0.0.13-alpha.4
|
|
157
232
|
|
|
158
233
|
## 0.0.13-alpha.3
|
|
@@ -187,9 +262,9 @@
|
|
|
187
262
|
|
|
188
263
|
### Patch Changes
|
|
189
264
|
|
|
190
|
-
- [`591e779`](https://github.com/ckb-
|
|
265
|
+
- [`591e779`](https://github.com/ckb-devrel/ccc/commit/591e7794ce3d07ceaad55b7a80d2277fe0aa9fe7) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat: custom SignersController
|
|
191
266
|
|
|
192
|
-
- Updated dependencies [[`6bee006`](https://github.com/ckb-
|
|
267
|
+
- Updated dependencies [[`6bee006`](https://github.com/ckb-devrel/ccc/commit/6bee006fbcb96986c65ca4d2d896fca21db2503b), [`591e779`](https://github.com/ckb-devrel/ccc/commit/591e7794ce3d07ceaad55b7a80d2277fe0aa9fe7)]:
|
|
193
268
|
- @ckb-ccc/connector@0.0.12
|
|
194
269
|
|
|
195
270
|
## 0.0.12-alpha.7
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://app.ckbccc.com/">
|
|
3
|
-
<img alt="Logo" src="https://raw.githubusercontent.com/ckb-
|
|
3
|
+
<img alt="Logo" src="https://raw.githubusercontent.com/ckb-devrel/ccc/master/assets/logoAndText.svg" style="height: 8rem; max-width: 90%; padding: 0.5rem 0;" />
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
<a href="https://www.npmjs.com/package/@ckb-ccc/connector-react"><img
|
|
13
13
|
alt="NPM Version" src="https://img.shields.io/npm/v/%40ckb-ccc%2Fconnector-react"
|
|
14
14
|
/></a>
|
|
15
|
-
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/ckb-
|
|
16
|
-
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/ckb-
|
|
17
|
-
<img alt="GitHub branch check runs" src="https://img.shields.io/github/check-runs/ckb-
|
|
15
|
+
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/ckb-devrel/ccc" />
|
|
16
|
+
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/ckb-devrel/ccc/master" />
|
|
17
|
+
<img alt="GitHub branch check runs" src="https://img.shields.io/github/check-runs/ckb-devrel/ccc/master" />
|
|
18
18
|
<a href="https://live.ckbccc.com/"><img
|
|
19
19
|
alt="Playground" src="https://img.shields.io/website?url=https%3A%2F%2Flive.ckbccc.com%2F&label=Playground"
|
|
20
20
|
/></a>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</p>
|
|
28
28
|
|
|
29
29
|
<p align="center">
|
|
30
|
-
|
|
30
|
+
CCC - CKBers' Codebase is a one-stop solution for your CKB JS/TS ecosystem development.
|
|
31
31
|
<br />
|
|
32
32
|
Empower yourself with CCC to discover the unlimited potential of CKB.
|
|
33
33
|
<br />
|
|
@@ -36,26 +36,6 @@
|
|
|
36
36
|
Fully enabling CKB's Turing completeness and cryptographic freedom power.
|
|
37
37
|
</p>
|
|
38
38
|
|
|
39
|
-
## Playground
|
|
40
|
-
|
|
41
|
-
<p align="center">
|
|
42
|
-
<a href="https://live.ckbccc.com/">
|
|
43
|
-
<img src="https://raw.githubusercontent.com/ckb-ecofund/ccc/master/assets/preview.png" width="90%" />
|
|
44
|
-
</a>
|
|
45
|
-
</p>
|
|
46
|
-
|
|
47
|
-
This project is still under active development, and we are looking forward to your feedback. You can [experiment instantly in the playground](https://live.ckbccc.com/). If you are new to the CKB, we recommend checking [Nervos CKB Docs](https://docs.nervos.org/) for basic knowledge.
|
|
48
|
-
|
|
49
|
-
## App
|
|
50
|
-
|
|
51
|
-
<p align="center">
|
|
52
|
-
<a href="https://app.ckbccc.com/">
|
|
53
|
-
<img src="https://raw.githubusercontent.com/ckb-ecofund/ccc/master/assets/appPreview.png" width="50%" />
|
|
54
|
-
</a>
|
|
55
|
-
</p>
|
|
56
|
-
|
|
57
|
-
For non-developers, you can also [try CCC's app now here](https://app.ckbccc.com/). It showcases how to use CCC for some basic scenarios in CKB.
|
|
58
|
-
|
|
59
39
|
## Use the Connector UI
|
|
60
40
|
|
|
61
41
|
Before using the Connector, wrap your UI with the CCC Provider:
|
|
@@ -67,5 +47,5 @@ Before using the Connector, wrap your UI with the CCC Provider:
|
|
|
67
47
|
Check [the document for @ckb-ccc/connector-react](https://docs.ckbccc.com/modules/_ckb_ccc_connector_react.index.ccc.html) for more information.
|
|
68
48
|
|
|
69
49
|
<h3 align="center">
|
|
70
|
-
Read more about CCC on <a href="https://docs.ckbccc.com">our website</a> or <a href="https://github.com/ckb-
|
|
50
|
+
Read more about CCC on <a href="https://docs.ckbccc.com">our website</a> or <a href="https://github.com/ckb-devrel/ccc">GitHub Repo</a>.
|
|
71
51
|
</h3>
|
package/dist/hooks/useCcc.d.ts
CHANGED
|
@@ -17,11 +17,13 @@ export declare function Provider({ children, connectorProps, hideMark, name, ico
|
|
|
17
17
|
preferredNetworks?: ccc.NetworkPreference[];
|
|
18
18
|
}): React.JSX.Element;
|
|
19
19
|
export declare function useCcc(): {
|
|
20
|
+
isOpen: boolean;
|
|
20
21
|
open: () => unknown;
|
|
22
|
+
close: () => unknown;
|
|
21
23
|
disconnect: () => unknown;
|
|
22
24
|
setClient: (client: ccc.Client) => unknown;
|
|
23
25
|
client: ccc.Client;
|
|
24
|
-
wallet?: ccc.Wallet
|
|
25
|
-
signerInfo?: ccc.SignerInfo
|
|
26
|
+
wallet?: ccc.Wallet;
|
|
27
|
+
signerInfo?: ccc.SignerInfo;
|
|
26
28
|
};
|
|
27
29
|
//# sourceMappingURL=useCcc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCcc.d.ts","sourceRoot":"","sources":["../../src/hooks/useCcc.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,KAAK,EAAE,EAEZ,cAAc,EACd,SAAS,EAQV,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useCcc.d.ts","sourceRoot":"","sources":["../../src/hooks/useCcc.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,KAAK,EAAE,EAEZ,cAAc,EACd,SAAS,EAQV,MAAM,OAAO,CAAC;AA4Cf,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,iBAAiB,GAClB,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC;IAC1C,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtE,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;CAC7C,qBA8FA;AAED,wBAAgB,MAAM;YAhKR,OAAO;UACT,MAAM,OAAO;WACZ,MAAM,OAAO;gBACR,MAAM,OAAO;eACd,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,KAAK,OAAO;YAClC,GAAG,CAAC,MAAM;aACT,GAAG,CAAC,MAAM;iBACN,GAAG,CAAC,UAAU;EAiKhC"}
|
package/dist/hooks/useCcc.js
CHANGED
|
@@ -19,12 +19,16 @@ export function Provider({ children, connectorProps, hideMark, name, icon, signe
|
|
|
19
19
|
const [ref, setRef] = useState(null);
|
|
20
20
|
const [isOpen, setIsOpen] = useState(false);
|
|
21
21
|
const [_, setFlag] = useState(0);
|
|
22
|
-
const
|
|
22
|
+
const defaultSignersController = useRef(undefined);
|
|
23
23
|
const client = useMemo(() => ref?.client ?? new ccc.ClientPublicTestnet(), [ref?.client]);
|
|
24
24
|
const open = useCallback(() => {
|
|
25
25
|
setIsOpen(true);
|
|
26
26
|
ref?.requestUpdate();
|
|
27
27
|
}, [setIsOpen, ref, ref?.requestUpdate]);
|
|
28
|
+
const close = useCallback(() => {
|
|
29
|
+
setIsOpen(false);
|
|
30
|
+
ref?.requestUpdate();
|
|
31
|
+
}, [setIsOpen, ref, ref?.requestUpdate]);
|
|
28
32
|
const disconnect = useMemo(() => ref?.disconnect.bind(ref) ?? (() => { }), [ref, ref?.disconnect]);
|
|
29
33
|
const setClient = useMemo(() => ref?.setClient.bind(ref) ?? (() => { }), [ref, ref?.setClient]);
|
|
30
34
|
useEffect(() => {
|
|
@@ -33,22 +37,24 @@ export function Provider({ children, connectorProps, hideMark, name, icon, signe
|
|
|
33
37
|
}
|
|
34
38
|
}, [setClient]);
|
|
35
39
|
useEffect(() => {
|
|
36
|
-
if (!
|
|
37
|
-
|
|
40
|
+
if (!defaultSignersController.current) {
|
|
41
|
+
defaultSignersController.current = new SignersControllerWithFilter(signerFilter);
|
|
38
42
|
}
|
|
39
43
|
else {
|
|
40
|
-
|
|
44
|
+
defaultSignersController.current.filter = signerFilter;
|
|
41
45
|
}
|
|
42
46
|
}, [signerFilter]);
|
|
43
47
|
return (React.createElement(CCC_CONTEXT.Provider, { value: {
|
|
48
|
+
isOpen,
|
|
44
49
|
open,
|
|
50
|
+
close,
|
|
45
51
|
disconnect,
|
|
46
52
|
setClient,
|
|
47
53
|
client,
|
|
48
54
|
wallet: ref?.wallet,
|
|
49
55
|
signerInfo: ref?.signer,
|
|
50
56
|
} },
|
|
51
|
-
React.createElement(Connector, { hideMark: hideMark, name: name, icon: icon, signersController: signersController ??
|
|
57
|
+
React.createElement(Connector, { hideMark: hideMark, name: name, icon: icon, signersController: signersController ?? defaultSignersController.current, ref: setRef, onWillUpdate: () => setFlag((f) => f + 1), onClose: close, preferredNetworks: preferredNetworks, clientOptions: clientOptions, ...connectorProps,
|
|
52
58
|
style: {
|
|
53
59
|
zIndex: 999,
|
|
54
60
|
...(isOpen ? {} : { display: "none" }),
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckb-ccc/connector-react",
|
|
3
|
-
"version": "0.0.17-alpha.
|
|
3
|
+
"version": "0.0.17-alpha.11",
|
|
4
4
|
"description": "CCC - CKBer's Codebase. Common Chains Connector UI Component for React",
|
|
5
5
|
"author": "Hanssen0 <hanssen0@hanssen0.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
8
|
-
"homepage": "https://github.com/ckb-
|
|
8
|
+
"homepage": "https://github.com/ckb-devrel/ccc",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git://github.com/ckb-
|
|
11
|
+
"url": "git://github.com/ckb-devrel/ccc.git"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "dist/index.js",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@lit/react": "^1.0.5",
|
|
38
|
-
"@ckb-ccc/connector": "0.0.17-alpha.
|
|
38
|
+
"@ckb-ccc/connector": "0.0.17-alpha.10"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=16"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "rimraf ./dist && tsc",
|
|
45
|
-
"lint": "eslint",
|
|
46
|
-
"format": "prettier --write . && eslint --fix"
|
|
45
|
+
"lint": "eslint ./src",
|
|
46
|
+
"format": "prettier --write . && eslint --fix ./src"
|
|
47
47
|
}
|
|
48
48
|
}
|
package/src/hooks/useCcc.tsx
CHANGED
|
@@ -15,7 +15,9 @@ import { Connector } from "../components/index.js";
|
|
|
15
15
|
|
|
16
16
|
const CCC_CONTEXT = createContext<
|
|
17
17
|
| {
|
|
18
|
+
isOpen: boolean;
|
|
18
19
|
open: () => unknown;
|
|
20
|
+
close: () => unknown;
|
|
19
21
|
disconnect: () => unknown;
|
|
20
22
|
setClient: (client: ccc.Client) => unknown;
|
|
21
23
|
client: ccc.Client;
|
|
@@ -66,7 +68,7 @@ export function Provider({
|
|
|
66
68
|
}: {
|
|
67
69
|
children: ReactNode;
|
|
68
70
|
connectorProps?: HTMLAttributes<{}>;
|
|
69
|
-
hideMark?: boolean
|
|
71
|
+
hideMark?: boolean;
|
|
70
72
|
name?: string;
|
|
71
73
|
icon?: string;
|
|
72
74
|
signerFilter?: (
|
|
@@ -81,7 +83,7 @@ export function Provider({
|
|
|
81
83
|
const [ref, setRef] = useState<ccc.WebComponentConnector | null>(null);
|
|
82
84
|
const [isOpen, setIsOpen] = useState(false);
|
|
83
85
|
const [_, setFlag] = useState(0);
|
|
84
|
-
const
|
|
86
|
+
const defaultSignersController = useRef<
|
|
85
87
|
SignersControllerWithFilter | undefined
|
|
86
88
|
>(undefined);
|
|
87
89
|
|
|
@@ -93,6 +95,10 @@ export function Provider({
|
|
|
93
95
|
setIsOpen(true);
|
|
94
96
|
ref?.requestUpdate();
|
|
95
97
|
}, [setIsOpen, ref, ref?.requestUpdate]);
|
|
98
|
+
const close = useCallback(() => {
|
|
99
|
+
setIsOpen(false);
|
|
100
|
+
ref?.requestUpdate();
|
|
101
|
+
}, [setIsOpen, ref, ref?.requestUpdate]);
|
|
96
102
|
const disconnect = useMemo(
|
|
97
103
|
() => ref?.disconnect.bind(ref) ?? (() => {}),
|
|
98
104
|
[ref, ref?.disconnect],
|
|
@@ -108,19 +114,21 @@ export function Provider({
|
|
|
108
114
|
}
|
|
109
115
|
}, [setClient]);
|
|
110
116
|
useEffect(() => {
|
|
111
|
-
if (!
|
|
112
|
-
|
|
117
|
+
if (!defaultSignersController.current) {
|
|
118
|
+
defaultSignersController.current = new SignersControllerWithFilter(
|
|
113
119
|
signerFilter,
|
|
114
120
|
);
|
|
115
121
|
} else {
|
|
116
|
-
|
|
122
|
+
defaultSignersController.current.filter = signerFilter;
|
|
117
123
|
}
|
|
118
124
|
}, [signerFilter]);
|
|
119
125
|
|
|
120
126
|
return (
|
|
121
127
|
<CCC_CONTEXT.Provider
|
|
122
128
|
value={{
|
|
129
|
+
isOpen,
|
|
123
130
|
open,
|
|
131
|
+
close,
|
|
124
132
|
disconnect,
|
|
125
133
|
setClient,
|
|
126
134
|
|
|
@@ -134,11 +142,11 @@ export function Provider({
|
|
|
134
142
|
name={name}
|
|
135
143
|
icon={icon}
|
|
136
144
|
signersController={
|
|
137
|
-
signersController ??
|
|
145
|
+
signersController ?? defaultSignersController.current
|
|
138
146
|
}
|
|
139
147
|
ref={setRef}
|
|
140
148
|
onWillUpdate={() => setFlag((f) => f + 1)}
|
|
141
|
-
onClose={
|
|
149
|
+
onClose={close}
|
|
142
150
|
preferredNetworks={preferredNetworks}
|
|
143
151
|
clientOptions={clientOptions}
|
|
144
152
|
{...{
|