@monerium/sdk-react-provider 0.0.6 → 0.0.8
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 +12 -360
- package/dist/index.js +1 -1
- package/dist/index.mjs +347 -359
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0.
|
|
3
|
+
## [0.0.8](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.8...sdk-react-provider-v0.0.8) (2023-11-17)
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
### Features
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
15
15
|
* add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
16
16
|
* add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
17
|
+
* add removal date to deprecated methods and add connect as deprecated ([c1e02e2](https://github.com/monerium/public-monorepo/commit/c1e02e273b08b091475757e0e68051098e20a5a0))
|
|
17
18
|
* add yarnrc to each lib ([6dc9f7a](https://github.com/monerium/public-monorepo/commit/6dc9f7a4a46e24596c862df83823f90be5dad803))
|
|
18
19
|
* correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
19
20
|
* fix ([6f9eef5](https://github.com/monerium/public-monorepo/commit/6f9eef5333d407a3ec95a84defb3adc1d9c6f7e8))
|
|
@@ -26,7 +27,9 @@
|
|
|
26
27
|
* test: ([e122f61](https://github.com/monerium/public-monorepo/commit/e122f61e5f907785b6076bfda855c275bcfce1d6))
|
|
27
28
|
* testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
28
29
|
* testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
30
|
+
* tests and release action ([a18438c](https://github.com/monerium/public-monorepo/commit/a18438c2974e79975722afe8f7f9679358f32da5))
|
|
29
31
|
* trigger both packages ([a8db647](https://github.com/monerium/public-monorepo/commit/a8db647e694abd753bdb06df352c1d72617d7e67))
|
|
32
|
+
* uff ([ae8e9e5](https://github.com/monerium/public-monorepo/commit/ae8e9e510b5fad9997addd31e1153e9ef66a9d5c))
|
|
30
33
|
* yarn instead of npm ([5b86535](https://github.com/monerium/public-monorepo/commit/5b86535ed225effa0d13b6b60388bf05783ebe63))
|
|
31
34
|
|
|
32
35
|
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
|
|
35
38
|
* release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
36
39
|
|
|
37
|
-
## [0.0.
|
|
40
|
+
## [0.0.8](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.8...sdk-react-provider-v0.0.8) (2023-11-17)
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
### Features
|
|
@@ -48,6 +51,7 @@
|
|
|
48
51
|
* . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
49
52
|
* add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
50
53
|
* add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
54
|
+
* add removal date to deprecated methods and add connect as deprecated ([c1e02e2](https://github.com/monerium/public-monorepo/commit/c1e02e273b08b091475757e0e68051098e20a5a0))
|
|
51
55
|
* add yarnrc to each lib ([6dc9f7a](https://github.com/monerium/public-monorepo/commit/6dc9f7a4a46e24596c862df83823f90be5dad803))
|
|
52
56
|
* correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
53
57
|
* fix ([6f9eef5](https://github.com/monerium/public-monorepo/commit/6f9eef5333d407a3ec95a84defb3adc1d9c6f7e8))
|
|
@@ -61,375 +65,23 @@
|
|
|
61
65
|
* testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
62
66
|
* testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
63
67
|
* trigger both packages ([a8db647](https://github.com/monerium/public-monorepo/commit/a8db647e694abd753bdb06df352c1d72617d7e67))
|
|
68
|
+
* uff ([ae8e9e5](https://github.com/monerium/public-monorepo/commit/ae8e9e510b5fad9997addd31e1153e9ef66a9d5c))
|
|
69
|
+
* yarn instead of npm ([5b86535](https://github.com/monerium/public-monorepo/commit/5b86535ed225effa0d13b6b60388bf05783ebe63))
|
|
64
70
|
|
|
65
71
|
|
|
66
72
|
### Miscellaneous Chores
|
|
67
73
|
|
|
68
74
|
* release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
69
75
|
|
|
70
|
-
## [0.0.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### Features
|
|
74
|
-
|
|
75
|
-
* add docs ([f5ba19d](https://github.com/monerium/public-monorepo/commit/f5ba19d5600e01cd0c97467a0a1f2fe94a2f40fc))
|
|
76
|
-
* sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
### Bug Fixes
|
|
80
|
-
|
|
81
|
-
* . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
82
|
-
* add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
83
|
-
* add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
84
|
-
* correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
85
|
-
* fix ([6f9eef5](https://github.com/monerium/public-monorepo/commit/6f9eef5333d407a3ec95a84defb3adc1d9c6f7e8))
|
|
86
|
-
* publish ([537b336](https://github.com/monerium/public-monorepo/commit/537b336180df288e0653b0db7230ae84758f8475))
|
|
87
|
-
* publish not working ([50a2a05](https://github.com/monerium/public-monorepo/commit/50a2a0583c03ef7a66a605c8215f72256192b8e2))
|
|
88
|
-
* releaseas ([db309d2](https://github.com/monerium/public-monorepo/commit/db309d2635196bac5df230e886d70c395c58b06b))
|
|
89
|
-
* remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
90
|
-
* remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
91
|
-
* **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
92
|
-
* test: ([e122f61](https://github.com/monerium/public-monorepo/commit/e122f61e5f907785b6076bfda855c275bcfce1d6))
|
|
93
|
-
* testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
94
|
-
* testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
95
|
-
* trigger both packages ([a8db647](https://github.com/monerium/public-monorepo/commit/a8db647e694abd753bdb06df352c1d72617d7e67))
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### Miscellaneous Chores
|
|
99
|
-
|
|
100
|
-
* release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
101
|
-
|
|
102
|
-
## [0.0.6](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.6...sdk-react-provider-v0.0.6) (2023-11-13)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### Features
|
|
106
|
-
|
|
107
|
-
* add docs ([f5ba19d](https://github.com/monerium/public-monorepo/commit/f5ba19d5600e01cd0c97467a0a1f2fe94a2f40fc))
|
|
108
|
-
* sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
### Bug Fixes
|
|
112
|
-
|
|
113
|
-
* . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
114
|
-
* add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
115
|
-
* add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
116
|
-
* correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
117
|
-
* fix ([6f9eef5](https://github.com/monerium/public-monorepo/commit/6f9eef5333d407a3ec95a84defb3adc1d9c6f7e8))
|
|
118
|
-
* publish ([537b336](https://github.com/monerium/public-monorepo/commit/537b336180df288e0653b0db7230ae84758f8475))
|
|
119
|
-
* publish not working ([50a2a05](https://github.com/monerium/public-monorepo/commit/50a2a0583c03ef7a66a605c8215f72256192b8e2))
|
|
120
|
-
* releaseas ([db309d2](https://github.com/monerium/public-monorepo/commit/db309d2635196bac5df230e886d70c395c58b06b))
|
|
121
|
-
* remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
122
|
-
* remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
123
|
-
* **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
124
|
-
* test: ([e122f61](https://github.com/monerium/public-monorepo/commit/e122f61e5f907785b6076bfda855c275bcfce1d6))
|
|
125
|
-
* testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
126
|
-
* testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
127
|
-
* trigger both packages ([a8db647](https://github.com/monerium/public-monorepo/commit/a8db647e694abd753bdb06df352c1d72617d7e67))
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
### Miscellaneous Chores
|
|
131
|
-
|
|
132
|
-
* release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
133
|
-
|
|
134
|
-
## [0.0.6](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.6...sdk-react-provider-v0.0.6) (2023-11-13)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
### Features
|
|
138
|
-
|
|
139
|
-
* add docs ([f5ba19d](https://github.com/monerium/public-monorepo/commit/f5ba19d5600e01cd0c97467a0a1f2fe94a2f40fc))
|
|
140
|
-
* sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
### Bug Fixes
|
|
144
|
-
|
|
145
|
-
* . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
146
|
-
* add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
147
|
-
* add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
148
|
-
* correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
149
|
-
* fix ([6f9eef5](https://github.com/monerium/public-monorepo/commit/6f9eef5333d407a3ec95a84defb3adc1d9c6f7e8))
|
|
150
|
-
* publish ([537b336](https://github.com/monerium/public-monorepo/commit/537b336180df288e0653b0db7230ae84758f8475))
|
|
151
|
-
* publish not working ([50a2a05](https://github.com/monerium/public-monorepo/commit/50a2a0583c03ef7a66a605c8215f72256192b8e2))
|
|
152
|
-
* releaseas ([db309d2](https://github.com/monerium/public-monorepo/commit/db309d2635196bac5df230e886d70c395c58b06b))
|
|
153
|
-
* remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
154
|
-
* remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
155
|
-
* **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
156
|
-
* test: ([e122f61](https://github.com/monerium/public-monorepo/commit/e122f61e5f907785b6076bfda855c275bcfce1d6))
|
|
157
|
-
* testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
158
|
-
* testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
159
|
-
* trigger both packages ([a8db647](https://github.com/monerium/public-monorepo/commit/a8db647e694abd753bdb06df352c1d72617d7e67))
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### Miscellaneous Chores
|
|
163
|
-
|
|
164
|
-
* release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
165
|
-
|
|
166
|
-
## [0.0.6](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.5...sdk-react-provider-v0.0.6) (2023-11-13)
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
### Bug Fixes
|
|
170
|
-
|
|
171
|
-
* publish not working ([50a2a05](https://github.com/monerium/public-monorepo/commit/50a2a0583c03ef7a66a605c8215f72256192b8e2))
|
|
172
|
-
|
|
173
|
-
## [0.0.5](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.5...sdk-react-provider-v0.0.5) (2023-11-09)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
### Features
|
|
177
|
-
|
|
178
|
-
* add docs ([f5ba19d](https://github.com/monerium/public-monorepo/commit/f5ba19d5600e01cd0c97467a0a1f2fe94a2f40fc))
|
|
179
|
-
* sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
### Bug Fixes
|
|
183
|
-
|
|
184
|
-
* . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
185
|
-
* add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
186
|
-
* add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
187
|
-
* correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
188
|
-
* fix ([6f9eef5](https://github.com/monerium/public-monorepo/commit/6f9eef5333d407a3ec95a84defb3adc1d9c6f7e8))
|
|
189
|
-
* releaseas ([db309d2](https://github.com/monerium/public-monorepo/commit/db309d2635196bac5df230e886d70c395c58b06b))
|
|
190
|
-
* remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
191
|
-
* remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
192
|
-
* **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
193
|
-
* test: ([e122f61](https://github.com/monerium/public-monorepo/commit/e122f61e5f907785b6076bfda855c275bcfce1d6))
|
|
194
|
-
* testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
195
|
-
* testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
196
|
-
* trigger both packages ([a8db647](https://github.com/monerium/public-monorepo/commit/a8db647e694abd753bdb06df352c1d72617d7e67))
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
### Miscellaneous Chores
|
|
200
|
-
|
|
201
|
-
* release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
202
|
-
|
|
203
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.5...sdk-react-provider-v0.0.4) (2023-11-09)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
### Features
|
|
207
|
-
|
|
208
|
-
* add docs ([f5ba19d](https://github.com/monerium/public-monorepo/commit/f5ba19d5600e01cd0c97467a0a1f2fe94a2f40fc))
|
|
209
|
-
* sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
### Bug Fixes
|
|
213
|
-
|
|
214
|
-
* . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
215
|
-
* add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
216
|
-
* add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
217
|
-
* correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
218
|
-
* fix ([6f9eef5](https://github.com/monerium/public-monorepo/commit/6f9eef5333d407a3ec95a84defb3adc1d9c6f7e8))
|
|
219
|
-
* remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
220
|
-
* remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
221
|
-
* **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
222
|
-
* test: ([e122f61](https://github.com/monerium/public-monorepo/commit/e122f61e5f907785b6076bfda855c275bcfce1d6))
|
|
223
|
-
* testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
224
|
-
* testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
225
|
-
* trigger both packages ([a8db647](https://github.com/monerium/public-monorepo/commit/a8db647e694abd753bdb06df352c1d72617d7e67))
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
### Miscellaneous Chores
|
|
229
|
-
|
|
230
|
-
* release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
231
|
-
|
|
232
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.4...sdk-react-provider-v0.0.4) (2023-11-09)
|
|
233
|
-
|
|
234
|
-
### Features
|
|
76
|
+
## [0.0.8](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.7...sdk-react-provider-v0.0.8) (2023-11-17)
|
|
235
77
|
|
|
236
|
-
- sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
237
78
|
|
|
238
79
|
### Bug Fixes
|
|
239
80
|
|
|
240
|
-
|
|
241
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
242
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
243
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
244
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
245
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
246
|
-
- **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
247
|
-
- test: ([e122f61](https://github.com/monerium/public-monorepo/commit/e122f61e5f907785b6076bfda855c275bcfce1d6))
|
|
248
|
-
- testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
249
|
-
- testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
250
|
-
|
|
251
|
-
### Miscellaneous Chores
|
|
252
|
-
|
|
253
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
81
|
+
* add removal date to deprecated methods and add connect as deprecated ([c1e02e2](https://github.com/monerium/public-monorepo/commit/c1e02e273b08b091475757e0e68051098e20a5a0))
|
|
254
82
|
|
|
255
|
-
## [0.0.
|
|
83
|
+
## [0.0.7](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.7...sdk-react-provider-v0.0.7) (2023-11-13)
|
|
256
84
|
|
|
257
85
|
### Features
|
|
258
86
|
|
|
259
|
-
-
|
|
260
|
-
|
|
261
|
-
### Bug Fixes
|
|
262
|
-
|
|
263
|
-
- . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
264
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
265
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
266
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
267
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
268
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
269
|
-
- **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
270
|
-
- test: ([e122f61](https://github.com/monerium/public-monorepo/commit/e122f61e5f907785b6076bfda855c275bcfce1d6))
|
|
271
|
-
- testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
272
|
-
- testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
273
|
-
|
|
274
|
-
### Miscellaneous Chores
|
|
275
|
-
|
|
276
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
277
|
-
|
|
278
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.4...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
279
|
-
|
|
280
|
-
### Features
|
|
281
|
-
|
|
282
|
-
- sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
283
|
-
|
|
284
|
-
### Bug Fixes
|
|
285
|
-
|
|
286
|
-
- . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
287
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
288
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
289
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
290
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
291
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
292
|
-
- **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
293
|
-
- testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
294
|
-
- testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
295
|
-
|
|
296
|
-
### Miscellaneous Chores
|
|
297
|
-
|
|
298
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
299
|
-
|
|
300
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.4...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
301
|
-
|
|
302
|
-
### Features
|
|
303
|
-
|
|
304
|
-
- sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
305
|
-
|
|
306
|
-
### Bug Fixes
|
|
307
|
-
|
|
308
|
-
- . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
309
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
310
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
311
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
312
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
313
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
314
|
-
- **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
315
|
-
- testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
316
|
-
- testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
317
|
-
|
|
318
|
-
### Miscellaneous Chores
|
|
319
|
-
|
|
320
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
321
|
-
|
|
322
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.4...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
323
|
-
|
|
324
|
-
### Features
|
|
325
|
-
|
|
326
|
-
- sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
327
|
-
|
|
328
|
-
### Bug Fixes
|
|
329
|
-
|
|
330
|
-
- . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
331
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
332
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
333
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
334
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
335
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
336
|
-
- **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
337
|
-
- testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
338
|
-
- testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
339
|
-
|
|
340
|
-
### Miscellaneous Chores
|
|
341
|
-
|
|
342
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
343
|
-
|
|
344
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.4...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
345
|
-
|
|
346
|
-
### Features
|
|
347
|
-
|
|
348
|
-
- sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
349
|
-
|
|
350
|
-
### Bug Fixes
|
|
351
|
-
|
|
352
|
-
- . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
353
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
354
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
355
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
356
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
357
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
358
|
-
- **sdk-react-provider:** add monerium/sdk as dep ([e43ac29](https://github.com/monerium/public-monorepo/commit/e43ac29d202c02789f1efa7354f5b0c9a1d5a8bb))
|
|
359
|
-
- testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
360
|
-
- testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
361
|
-
|
|
362
|
-
### Miscellaneous Chores
|
|
363
|
-
|
|
364
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
365
|
-
|
|
366
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.3...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
367
|
-
|
|
368
|
-
### Features
|
|
369
|
-
|
|
370
|
-
- sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
371
|
-
|
|
372
|
-
### Bug Fixes
|
|
373
|
-
|
|
374
|
-
- . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
375
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
376
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
377
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
378
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
379
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
380
|
-
- testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
381
|
-
- testing GH actions ([7ac3aba](https://github.com/monerium/public-monorepo/commit/7ac3abab83d9b81136776a2c7cbc323d8a64be5e))
|
|
382
|
-
|
|
383
|
-
### Miscellaneous Chores
|
|
384
|
-
|
|
385
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
386
|
-
|
|
387
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.4...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
388
|
-
|
|
389
|
-
### Features
|
|
390
|
-
|
|
391
|
-
- sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
392
|
-
|
|
393
|
-
### Bug Fixes
|
|
394
|
-
|
|
395
|
-
- . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
396
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
397
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
398
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
399
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
400
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
401
|
-
- testing ([aa5057d](https://github.com/monerium/public-monorepo/commit/aa5057dcc5a6e1f68e50833097c1379d2f2c00f5))
|
|
402
|
-
|
|
403
|
-
### Miscellaneous Chores
|
|
404
|
-
|
|
405
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
406
|
-
|
|
407
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.4...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
408
|
-
|
|
409
|
-
### Bug Fixes
|
|
410
|
-
|
|
411
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
412
|
-
- remove unused dep ([6f3defe](https://github.com/monerium/public-monorepo/commit/6f3defebe9b25d2e64f5598eebe039bab199d541))
|
|
413
|
-
|
|
414
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.4...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
415
|
-
|
|
416
|
-
### Bug Fixes
|
|
417
|
-
|
|
418
|
-
- correct prop for initializing class ([cc509bf](https://github.com/monerium/public-monorepo/commit/cc509bffe5f7ef3c15a52af3cc18a1e89fd3b9ac))
|
|
419
|
-
|
|
420
|
-
## [0.0.4](https://github.com/monerium/public-monorepo/compare/sdk-react-provider-v0.0.3...sdk-react-provider-v0.0.4) (2023-11-08)
|
|
421
|
-
|
|
422
|
-
### Features
|
|
423
|
-
|
|
424
|
-
- sdk provider ([9c2defb](https://github.com/monerium/public-monorepo/commit/9c2defb626c7cb10ca98f184ec28171af9a29d3d))
|
|
425
|
-
|
|
426
|
-
### Bug Fixes
|
|
427
|
-
|
|
428
|
-
- . ([8d70c4d](https://github.com/monerium/public-monorepo/commit/8d70c4d08b9e52e70ca47c2b5e4d83ef0e6187d8))
|
|
429
|
-
- add codesandbox demo to readme ([034dcef](https://github.com/monerium/public-monorepo/commit/034dcefdb26a7d97e3f0dae3c4fad02ed410d808))
|
|
430
|
-
- add manifest to release-please GH action ([875b5c5](https://github.com/monerium/public-monorepo/commit/875b5c581885eb2f56b6f8336f1e25e0a2b89887))
|
|
431
|
-
- remove comment from manifest ([9ac4fcf](https://github.com/monerium/public-monorepo/commit/9ac4fcf9fa06d41fe8f6ea2cd9adc7253a77e4de))
|
|
432
|
-
|
|
433
|
-
### Miscellaneous Chores
|
|
434
|
-
|
|
435
|
-
- release 0.0.4 ([c057779](https://github.com/monerium/public-monorepo/commit/c057779574346cbc448ca8b8605457afb8abaa56))
|
|
87
|
+
- initial commit
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ee=(o,e,t)=>{if(!e.has(o))throw TypeError("Cannot "+t)};var y=(o,e,t)=>(ee(o,e,"read from private field"),t?t.call(o):e.get(o)),H=(o,e,t)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,t)},I=(o,e,t,n)=>(ee(o,e,"write to private field"),n?n.call(o,t):e.set(o,t),t);var O=(o,e,t)=>(ee(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("react/jsx-runtime"),B=require("react"),se=B.createContext(null),Y=o=>{var e;return o&&((e=Object.entries(o))==null?void 0:e.length)>0?Object.entries(o).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):""},pe=o=>{switch(o){case 1:case 5:return"ethereum";case 100:case 10200:return"gnosis";case 137:case 80001:return"polygon";default:throw new Error(`Chain not supported: ${o}`)}},ve=o=>{switch(o){case 1:case 100:case 137:return"mainnet";case 5:return"goerli";case 10200:return"chiado";case 80001:return"mumbai";default:throw new Error(`Network not supported: ${o}`)}},te={environments:{production:{api:"https://api.monerium.app",web:"https://monerium.app",wss:"wss://api.monerium.app"},sandbox:{api:"https://api.monerium.dev",web:"https://sandbox.monerium.dev",wss:"wss://api.monerium.dev"}}},j="monerium.sdk.code_verifier",re="monerium.sdk.refresh_token";var N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ue(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function ge(o){if(o.__esModule)return o;var e=o.default;if(typeof e=="function"){var t=function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var c=Function.bind.apply(e,i);return new c}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(o).forEach(function(n){var i=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return o[n]}})}),t}var de={exports:{}};function we(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ne={exports:{}};const ye={},me=Object.freeze(Object.defineProperty({__proto__:null,default:ye},Symbol.toStringTag,{value:"Module"})),_e=ge(me);var ie;function fe(){return ie||(ie=1,function(o,e){(function(t,n){o.exports=n()})(N,function(){var t=t||function(n,i){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window<"u"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof N<"u"&&N.crypto&&(c=N.crypto),!c&&typeof we=="function")try{c=_e}catch{}var f=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},k=Object.create||function(){function r(){}return function(s){var u;return r.prototype=s,u=new r,r.prototype=null,u}}(),h={},w=h.lib={},m=w.Base=function(){return{extend:function(r){var s=k(this);return r&&s.mixIn(r),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var r=this.extend();return r.init.apply(r,arguments),r},init:function(){},mixIn:function(r){for(var s in r)r.hasOwnProperty(s)&&(this[s]=r[s]);r.hasOwnProperty("toString")&&(this.toString=r.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=w.WordArray=m.extend({init:function(r,s){r=this.words=r||[],s!=i?this.sigBytes=s:this.sigBytes=r.length*4},toString:function(r){return(r||l).stringify(this)},concat:function(r){var s=this.words,u=r.words,d=this.sigBytes,_=r.sigBytes;if(this.clamp(),d%4)for(var b=0;b<_;b++){var x=u[b>>>2]>>>24-b%4*8&255;s[d+b>>>2]|=x<<24-(d+b)%4*8}else for(var E=0;E<_;E+=4)s[d+E>>>2]=u[E>>>2];return this.sigBytes+=_,this},clamp:function(){var r=this.words,s=this.sigBytes;r[s>>>2]&=4294967295<<32-s%4*8,r.length=n.ceil(s/4)},clone:function(){var r=m.clone.call(this);return r.words=this.words.slice(0),r},random:function(r){for(var s=[],u=0;u<r;u+=4)s.push(f());return new g.init(s,r)}}),S=h.enc={},l=S.Hex={stringify:function(r){for(var s=r.words,u=r.sigBytes,d=[],_=0;_<u;_++){var b=s[_>>>2]>>>24-_%4*8&255;d.push((b>>>4).toString(16)),d.push((b&15).toString(16))}return d.join("")},parse:function(r){for(var s=r.length,u=[],d=0;d<s;d+=2)u[d>>>3]|=parseInt(r.substr(d,2),16)<<24-d%8*4;return new g.init(u,s/2)}},v=S.Latin1={stringify:function(r){for(var s=r.words,u=r.sigBytes,d=[],_=0;_<u;_++){var b=s[_>>>2]>>>24-_%4*8&255;d.push(String.fromCharCode(b))}return d.join("")},parse:function(r){for(var s=r.length,u=[],d=0;d<s;d++)u[d>>>2]|=(r.charCodeAt(d)&255)<<24-d%4*8;return new g.init(u,s)}},a=S.Utf8={stringify:function(r){try{return decodeURIComponent(escape(v.stringify(r)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(r){return v.parse(unescape(encodeURIComponent(r)))}},p=w.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(r){typeof r=="string"&&(r=a.parse(r)),this._data.concat(r),this._nDataBytes+=r.sigBytes},_process:function(r){var s,u=this._data,d=u.words,_=u.sigBytes,b=this.blockSize,x=b*4,E=_/x;r?E=n.ceil(E):E=n.max((E|0)-this._minBufferSize,0);var D=E*b,U=n.min(D*4,_);if(D){for(var q=0;q<D;q+=b)this._doProcessBlock(d,q);s=d.splice(0,D),u.sigBytes-=U}return new g.init(s,U)},clone:function(){var r=m.clone.call(this);return r._data=this._data.clone(),r},_minBufferSize:0});w.Hasher=p.extend({cfg:m.extend(),init:function(r){this.cfg=this.cfg.extend(r),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(r){return this._append(r),this._process(),this},finalize:function(r){r&&this._append(r);var s=this._doFinalize();return s},blockSize:16,_createHelper:function(r){return function(s,u){return new r.init(u).finalize(s)}},_createHmacHelper:function(r){return function(s,u){return new C.HMAC.init(r,u).finalize(s)}}});var C=h.algo={};return h}(Math);return t})}(ne)),ne.exports}(function(o,e){(function(t,n){o.exports=n(fe())})(N,function(t){return function(){var n=t,i=n.lib,c=i.WordArray,f=n.enc;f.Base64url={stringify:function(h,w){w===void 0&&(w=!0);var m=h.words,g=h.sigBytes,S=w?this._safe_map:this._map;h.clamp();for(var l=[],v=0;v<g;v+=3)for(var a=m[v>>>2]>>>24-v%4*8&255,p=m[v+1>>>2]>>>24-(v+1)%4*8&255,C=m[v+2>>>2]>>>24-(v+2)%4*8&255,r=a<<16|p<<8|C,s=0;s<4&&v+s*.75<g;s++)l.push(S.charAt(r>>>6*(3-s)&63));var u=S.charAt(64);if(u)for(;l.length%4;)l.push(u);return l.join("")},parse:function(h,w){w===void 0&&(w=!0);var m=h.length,g=w?this._safe_map:this._map,S=this._reverseMap;if(!S){S=this._reverseMap=[];for(var l=0;l<g.length;l++)S[g.charCodeAt(l)]=l}var v=g.charAt(64);if(v){var a=h.indexOf(v);a!==-1&&(m=a)}return k(h,m,S)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function k(h,w,m){for(var g=[],S=0,l=0;l<w;l++)if(l%4){var v=m[h.charCodeAt(l-1)]<<l%4*2,a=m[h.charCodeAt(l)]>>>6-l%4*2,p=v|a;g[S>>>2]|=p<<24-S%4*8,S++}return c.create(g,S)}}(),t.enc.Base64url})})(de);var be=de.exports;const Se=ue(be);var le={exports:{}};(function(o,e){(function(t,n){o.exports=n(fe())})(N,function(t){return function(n){var i=t,c=i.lib,f=c.WordArray,k=c.Hasher,h=i.algo,w=[],m=[];(function(){function l(C){for(var r=n.sqrt(C),s=2;s<=r;s++)if(!(C%s))return!1;return!0}function v(C){return(C-(C|0))*4294967296|0}for(var a=2,p=0;p<64;)l(a)&&(p<8&&(w[p]=v(n.pow(a,1/2))),m[p]=v(n.pow(a,1/3)),p++),a++})();var g=[],S=h.SHA256=k.extend({_doReset:function(){this._hash=new f.init(w.slice(0))},_doProcessBlock:function(l,v){for(var a=this._hash.words,p=a[0],C=a[1],r=a[2],s=a[3],u=a[4],d=a[5],_=a[6],b=a[7],x=0;x<64;x++){if(x<16)g[x]=l[v+x]|0;else{var E=g[x-15],D=(E<<25|E>>>7)^(E<<14|E>>>18)^E>>>3,U=g[x-2],q=(U<<15|U>>>17)^(U<<13|U>>>19)^U>>>10;g[x]=D+g[x-7]+q+g[x-16]}var Z=u&d^~u&_,A=p&C^p&r^C&r,z=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),L=(u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25),W=b+L+Z+m[x]+g[x],V=z+A;b=_,_=d,d=u,u=s+W|0,s=r,r=C,C=p,p=W+V|0}a[0]=a[0]+p|0,a[1]=a[1]+C|0,a[2]=a[2]+r|0,a[3]=a[3]+s|0,a[4]=a[4]+u|0,a[5]=a[5]+d|0,a[6]=a[6]+_|0,a[7]=a[7]+b|0},_doFinalize:function(){var l=this._data,v=l.words,a=this._nDataBytes*8,p=l.sigBytes*8;return v[p>>>5]|=128<<24-p%32,v[(p+64>>>9<<4)+14]=n.floor(a/4294967296),v[(p+64>>>9<<4)+15]=a,l.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var l=k.clone.call(this);return l._hash=this._hash.clone(),l}});i.SHA256=k._createHelper(S),i.HmacSHA256=k._createHmacHelper(S)}(Math),t.SHA256})})(le);var ke=le.exports;const Be=ue(ke),Ce=(o,e)=>{const{client_id:t,redirect_uri:n,scope:i,state:c,chainId:f,chain:k,network:h,address:w,signature:m}=o,g=w?{address:w,...m!==void 0?{signature:m}:{},...f!==void 0||k!==void 0?{chain:f?pe(f):k}:{},...f!==void 0||h!==void 0?{network:f?ve(f):h}:{}}:{};return Y({client_id:t,redirect_uri:n,...i!==void 0?{scope:i}:{},...c!==void 0?{state:c}:{},code_challenge:e,code_challenge_method:"S256",response_type:"code",...g})},xe=()=>{let o="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=e.length;let n=0;for(;n<128;)o+=e.charAt(Math.floor(Math.random()*t)),n+=1;return o},Ee=o=>Se.stringify(Be(o)),ae=(o,e)=>{const t=xe(),n=Ee(t);return sessionStorage.setItem(j,t||""),`${o}/auth?${Ce(e,n)}`},Ae=()=>{const o=window.location.href,[e,t]=o.split("?");t&&window.history.replaceState(null,"",e)},ce=o=>o.code!=null,Pe=o=>o.refresh_token!=null,Ie=o=>o.client_secret!=null,Oe=async(o,e,t,n)=>{const i=await fetch(`${o}`,{method:e,headers:n,body:t});let c;const f=await i.text();try{c=JSON.parse(f)}catch{throw f}if(!i.ok)throw c;return c},oe=typeof window>"u";var T,G,F,M,$,P,R,J,K,Q;class Re{constructor(e){H(this,P);H(this,T,void 0);H(this,G,void 0);H(this,F,void 0);H(this,M,void 0);H(this,$,void 0);H(this,J,void 0);H(this,K,void 0);H(this,Q,void 0);if(I(this,M,new Map),this.isAuthorized=!!this.bearerProfile,I(this,J,async(t,n,i)=>{const c=sessionStorage.getItem(j)||"";if(!c)throw new Error("Code verifier not found");return this.codeVerifier=c,sessionStorage.removeItem(j),await this.getBearerToken({code:i,redirect_uri:n,client_id:t,code_verifier:c})}),I(this,K,async({clientId:t,clientSecret:n})=>await this.getBearerToken({client_id:t,client_secret:n})),I(this,Q,async(t,n)=>await this.getBearerToken({refresh_token:n,client_id:t})),this.subscribeToOrderNotifications=()=>{var i,c;const t=`${y(this,T).wss}/profiles/${(i=this.bearerProfile)==null?void 0:i.profile}/orders?access_token=${(c=this.bearerProfile)==null?void 0:c.access_token}`,n=new WebSocket(t);return n.addEventListener("open",()=>{console.info(`Socket connected: ${t}`)}),n.addEventListener("error",f=>{throw console.error(f),new Error(`Socket error: ${t}`)}),n.addEventListener("message",f=>{var h;const k=JSON.parse(f.data);(h=y(this,M).get(k.meta.state))==null||h(k)}),n.addEventListener("close",()=>{console.info(`Socket connection closed: ${t}`)}),n},this.auth=async t=>await this.getBearerToken(t),this.getAuthFlowURI=t=>{const n=ae(y(this,T).api,t);return this.codeVerifier=sessionStorage.getItem(j),n},this.pkceRequest=t=>this.getAuthFlowURI(t),this.getEnvironment=()=>y(this,T),!e){I(this,T,te.environments.sandbox);return}if(typeof e=="string")I(this,T,te.environments[e]);else if(I(this,T,te.environments[e.environment||"sandbox"]),oe){const{clientId:t,clientSecret:n}=e;I(this,$,{clientId:t,clientSecret:n})}else{const{clientId:t,redirectUrl:n}=e;I(this,$,{clientId:t,redirectUrl:n})}}async authorize(e){var c,f;const t=(e==null?void 0:e.clientId)||((c=y(this,$))==null?void 0:c.clientId),n=(e==null?void 0:e.redirectUrl)||((f=y(this,$))==null?void 0:f.redirectUrl);if(!t)throw new Error("Missing ClientId");if(!n)throw new Error("Missing RedirectUrl");const i=ae(y(this,T).api,{client_id:t,redirect_uri:n,address:e==null?void 0:e.address,signature:e==null?void 0:e.signature,chainId:e==null?void 0:e.chainId});window.location.replace(i)}async connect(e){var k,h,w;const t=(e==null?void 0:e.clientId)||((k=y(this,$))==null?void 0:k.clientId);if((e==null?void 0:e.clientSecret)||((h=y(this,$))==null?void 0:h.clientSecret)){if(!oe)throw new Error("Only use client credentials on server side");return await y(this,K).call(this,y(this,$)),!!this.bearerProfile}const i=(e==null?void 0:e.redirectUrl)||((w=y(this,$))==null?void 0:w.redirectUrl);if(!t)throw new Error("Missing ClientId");if(oe)throw new Error("This only works on client side");const c=new URLSearchParams(window.location.search).get("code")||void 0,f=sessionStorage.getItem(re)||void 0;return c?await y(this,J).call(this,t,i,c):f&&await y(this,Q).call(this,t,f),!!this.bearerProfile}async getBearerToken(e){let t;if(ce(e))t={...e,grant_type:"authorization_code"};else if(Pe(e))t={...e,grant_type:"refresh_token"};else if(Ie(e))t={...e,grant_type:"client_credentials"};else throw new Error("Authentication method could not be detected.");return await O(this,P,R).call(this,"post","auth/token",t,!0).then(n=>{var i;this.bearerProfile=n,this.isAuthorized=!!n,I(this,G,`Bearer ${n==null?void 0:n.access_token}`),window.sessionStorage.setItem(re,((i=this.bearerProfile)==null?void 0:i.refresh_token)||"")}).catch(n=>{throw sessionStorage.removeItem(j),sessionStorage.removeItem(re),new Error(n==null?void 0:n.message)}),ce(e)&&Ae(),this.bearerProfile}getAuthContext(){return O(this,P,R).call(this,"get","auth/context")}getProfile(e){return O(this,P,R).call(this,"get",`profiles/${e}`)}getBalances(e){return e?O(this,P,R).call(this,"get",`profiles/${e}/balances`):O(this,P,R).call(this,"get","balances")}getOrders(e){const t=Y(e);return O(this,P,R).call(this,"get",`orders?${t}`)}getOrder(e){return O(this,P,R).call(this,"get",`orders/${e}`)}getTokens(){return O(this,P,R).call(this,"get","tokens")}linkAddress(e,t){return O(this,P,R).call(this,"post",`profiles/${e}/addresses`,JSON.stringify(t))}placeOrder(e,t){const n={...e,kind:"redeem",currency:"eur"};return t?O(this,P,R).call(this,"post",`profiles/${t}/orders`,JSON.stringify(n)):O(this,P,R).call(this,"post","orders",JSON.stringify(n))}uploadSupportingDocument(e){const t=Y(e);return O(this,P,R).call(this,"post","files/supporting-document",t,!0)}async connectOrderSocket(){var e;(e=this.bearerProfile)!=null&&e.access_token&&y(this,M).size>0&&I(this,F,this.subscribeToOrderNotifications())}async disconnect(){var e;sessionStorage.removeItem(j),y(this,M).clear(),(e=y(this,F))==null||e.close()}subscribeOrders(e,t){y(this,M).set(e,t)}unsubscribeOrders(e){var t;y(this,M).delete(e),y(this,M).size===0&&((t=y(this,F))==null||t.close(),I(this,F,void 0))}}T=new WeakMap,G=new WeakMap,F=new WeakMap,M=new WeakMap,$=new WeakMap,P=new WeakSet,R=async function(e,t,n,i){return Oe(`${y(this,T).api}/${t}`,e,i?Y(n):n,{Authorization:y(this,G)||"","Content-Type":`application/${i?"x-www-form-urlencoded":"json"}`})},J=new WeakMap,K=new WeakMap,Q=new WeakMap;const ze=({children:o,clientId:e="f99e629b-6dca-11ee-8aa6-5273f65ed05b",redirectUrl:t="http://localhost:5173",environment:n="sandbox"})=>{const[i,c]=B.useState(),[f,k]=B.useState(!1),[h,w]=B.useState(null),[m,g]=B.useState(null),[S,l]=B.useState(!1),[v,a]=B.useState(!1),[p,C]=B.useState(!1),[r,s]=B.useState(!1),[u,d]=B.useState(null),[_,b]=B.useState([]),[x,E]=B.useState([]);B.useEffect(()=>{const A=new Re({environment:n,clientId:e,redirectUrl:t});c(A)},[]),B.useEffect(()=>((async()=>{i&&k(await i.connect())})(),()=>{i&&i.disconnect()}),[i]),B.useEffect(()=>{(async()=>{if(i&&f)try{l(!0);const z=await i.getAuthContext(),L=await i.getProfile(z.defaultProfile),W=await i.getBalances(),V=await i.getOrders(),X=await i.getTokens();w(L),g(W),b(V),E(X)}catch(z){console.error("Error fetching data:",z),d(z)}finally{l(!1)}})()},[i,f]);const D=B.useCallback(async()=>{try{i&&await i.authorize()}catch(A){console.error("Error during authorization:",A),d(A)}},[i]),U=B.useCallback(async()=>{if(i&&f)try{s(!0);const A=await i.getBalances();g(A)}catch(A){console.error("Error getting balances:",A),d(A)}finally{s(!1)}},[i,f]),q=B.useCallback(async(A,z)=>{if(i&&f)try{a(!0);let L;parseInt(A.amount)>15e3&&z&&(L=(await i.uploadSupportingDocument(z)).id);const W={...A,documentId:L},V=await i.placeOrder(W);b(X=>[...X,V])}catch(L){console.error("Error placing order:",L),d(L)}finally{a(!1)}},[i,f]),Z=B.useCallback(async A=>{if(i&&f&&h)try{return C(!0),await i.linkAddress(h.id,A)}catch(z){console.error("Error linking address:",z),d(z)}finally{C(!1)}},[i,f,h]);return he.jsx(se.Provider,{value:{authorize:D,isAuthorized:f,profile:h,balances:m,loading:S,loadingPlaceOrder:v,loadingLinkAddress:p,loadingBalances:r,getBalances:U,linkAddress:Z,placeOrder:q,orders:_,tokens:x,error:u},children:o})};function Te(){const o=B.useContext(se);if(o===null)throw new Error("useMonerium must be used within a MoneriumProvider");return o}exports.MoneriumContext=se;exports.MoneriumProvider=ze;exports.useMonerium=Te;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("react/jsx-runtime"),S=require("react"),ne=S.createContext(null);var ie=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},m=(i,e,t)=>(ie(i,e,"read from private field"),t?t.call(i):e.get(i)),R=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},C=(i,e,t,n)=>(ie(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),T=(i,e,t)=>(ie(i,e,"access private method"),t);const Y=i=>{var e;return i&&((e=Object.entries(i))==null?void 0:e.length)>0?Object.entries(i).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):""},pe=i=>{switch(i){case 1:case 5:return"ethereum";case 100:case 10200:return"gnosis";case 137:case 80001:return"polygon";default:throw new Error(`Chain not supported: ${i}`)}},ge=i=>{switch(i){case 1:case 100:case 137:return"mainnet";case 5:return"goerli";case 10200:return"chiado";case 80001:return"mumbai";default:throw new Error(`Network not supported: ${i}`)}},ee={environments:{production:{api:"https://api.monerium.app",web:"https://monerium.app",wss:"wss://api.monerium.app"},sandbox:{api:"https://api.monerium.dev",web:"https://sandbox.monerium.dev",wss:"wss://api.monerium.dev"}}},N="monerium.sdk.code_verifier",te="monerium.sdk.refresh_token";var q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function le(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function ve(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function n(){if(this instanceof n){var o=[null];o.push.apply(o,arguments);var a=Function.bind.apply(e,o);return new a}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var o=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return i[n]}})}),t}var ue={exports:{}};function we(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var oe={exports:{}};const ye={},me=Object.freeze(Object.defineProperty({__proto__:null,default:ye},Symbol.toStringTag,{value:"Module"})),_e=ve(me);var se;function de(){return se||(se=1,function(i,e){(function(t,n){i.exports=n()})(q,function(){var t=t||function(n,o){var a;if(typeof window<"u"&&window.crypto&&(a=window.crypto),typeof self<"u"&&self.crypto&&(a=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(a=globalThis.crypto),!a&&typeof window<"u"&&window.msCrypto&&(a=window.msCrypto),!a&&typeof q<"u"&&q.crypto&&(a=q.crypto),!a&&typeof we=="function")try{a=_e}catch{}var d=function(){if(a){if(typeof a.getRandomValues=="function")try{return a.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof a.randomBytes=="function")try{return a.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},O=Object.create||function(){function r(){}return function(s){var l;return r.prototype=s,l=new r,r.prototype=null,l}}(),f={},_=f.lib={},w=_.Base=function(){return{extend:function(r){var s=O(this);return r&&s.mixIn(r),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var r=this.extend();return r.init.apply(r,arguments),r},init:function(){},mixIn:function(r){for(var s in r)r.hasOwnProperty(s)&&(this[s]=r[s]);r.hasOwnProperty("toString")&&(this.toString=r.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),v=_.WordArray=w.extend({init:function(r,s){r=this.words=r||[],s!=o?this.sigBytes=s:this.sigBytes=r.length*4},toString:function(r){return(r||h).stringify(this)},concat:function(r){var s=this.words,l=r.words,u=this.sigBytes,y=r.sigBytes;if(this.clamp(),u%4)for(var b=0;b<y;b++){var x=l[b>>>2]>>>24-b%4*8&255;s[u+b>>>2]|=x<<24-(u+b)%4*8}else for(var A=0;A<y;A+=4)s[u+A>>>2]=l[A>>>2];return this.sigBytes+=y,this},clamp:function(){var r=this.words,s=this.sigBytes;r[s>>>2]&=4294967295<<32-s%4*8,r.length=n.ceil(s/4)},clone:function(){var r=w.clone.call(this);return r.words=this.words.slice(0),r},random:function(r){for(var s=[],l=0;l<r;l+=4)s.push(d());return new v.init(s,r)}}),k=f.enc={},h=k.Hex={stringify:function(r){for(var s=r.words,l=r.sigBytes,u=[],y=0;y<l;y++){var b=s[y>>>2]>>>24-y%4*8&255;u.push((b>>>4).toString(16)),u.push((b&15).toString(16))}return u.join("")},parse:function(r){for(var s=r.length,l=[],u=0;u<s;u+=2)l[u>>>3]|=parseInt(r.substr(u,2),16)<<24-u%8*4;return new v.init(l,s/2)}},g=k.Latin1={stringify:function(r){for(var s=r.words,l=r.sigBytes,u=[],y=0;y<l;y++){var b=s[y>>>2]>>>24-y%4*8&255;u.push(String.fromCharCode(b))}return u.join("")},parse:function(r){for(var s=r.length,l=[],u=0;u<s;u++)l[u>>>2]|=(r.charCodeAt(u)&255)<<24-u%4*8;return new v.init(l,s)}},c=k.Utf8={stringify:function(r){try{return decodeURIComponent(escape(g.stringify(r)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(r){return g.parse(unescape(encodeURIComponent(r)))}},p=_.BufferedBlockAlgorithm=w.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(r){typeof r=="string"&&(r=c.parse(r)),this._data.concat(r),this._nDataBytes+=r.sigBytes},_process:function(r){var s,l=this._data,u=l.words,y=l.sigBytes,b=this.blockSize,x=b*4,A=y/x;r?A=n.ceil(A):A=n.max((A|0)-this._minBufferSize,0);var W=A*b,z=n.min(W*4,y);if(W){for(var L=0;L<W;L+=b)this._doProcessBlock(u,L);s=u.splice(0,W),l.sigBytes-=z}return new v.init(s,z)},clone:function(){var r=w.clone.call(this);return r._data=this._data.clone(),r},_minBufferSize:0});_.Hasher=p.extend({cfg:w.extend(),init:function(r){this.cfg=this.cfg.extend(r),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(r){return this._append(r),this._process(),this},finalize:function(r){r&&this._append(r);var s=this._doFinalize();return s},blockSize:16,_createHelper:function(r){return function(s,l){return new r.init(l).finalize(s)}},_createHmacHelper:function(r){return function(s,l){return new I.HMAC.init(r,l).finalize(s)}}});var I=f.algo={};return f}(Math);return t})}(oe)),oe.exports}(function(i,e){(function(t,n){i.exports=n(de())})(q,function(t){return function(){var n=t,o=n.lib,a=o.WordArray,d=n.enc;d.Base64url={stringify:function(f,_){_===void 0&&(_=!0);var w=f.words,v=f.sigBytes,k=_?this._safe_map:this._map;f.clamp();for(var h=[],g=0;g<v;g+=3)for(var c=w[g>>>2]>>>24-g%4*8&255,p=w[g+1>>>2]>>>24-(g+1)%4*8&255,I=w[g+2>>>2]>>>24-(g+2)%4*8&255,r=c<<16|p<<8|I,s=0;s<4&&g+s*.75<v;s++)h.push(k.charAt(r>>>6*(3-s)&63));var l=k.charAt(64);if(l)for(;h.length%4;)h.push(l);return h.join("")},parse:function(f,_){_===void 0&&(_=!0);var w=f.length,v=_?this._safe_map:this._map,k=this._reverseMap;if(!k){k=this._reverseMap=[];for(var h=0;h<v.length;h++)k[v.charCodeAt(h)]=h}var g=v.charAt(64);if(g){var c=f.indexOf(g);c!==-1&&(w=c)}return O(f,w,k)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function O(f,_,w){for(var v=[],k=0,h=0;h<_;h++)if(h%4){var g=w[f.charCodeAt(h-1)]<<h%4*2,c=w[f.charCodeAt(h)]>>>6-h%4*2,p=g|c;v[k>>>2]|=p<<24-k%4*8,k++}return a.create(v,k)}}(),t.enc.Base64url})})(ue);var be=ue.exports;const ke=le(be);var he={exports:{}};(function(i,e){(function(t,n){i.exports=n(de())})(q,function(t){return function(n){var o=t,a=o.lib,d=a.WordArray,O=a.Hasher,f=o.algo,_=[],w=[];(function(){function h(I){for(var r=n.sqrt(I),s=2;s<=r;s++)if(!(I%s))return!1;return!0}function g(I){return(I-(I|0))*4294967296|0}for(var c=2,p=0;p<64;)h(c)&&(p<8&&(_[p]=g(n.pow(c,1/2))),w[p]=g(n.pow(c,1/3)),p++),c++})();var v=[],k=f.SHA256=O.extend({_doReset:function(){this._hash=new d.init(_.slice(0))},_doProcessBlock:function(h,g){for(var c=this._hash.words,p=c[0],I=c[1],r=c[2],s=c[3],l=c[4],u=c[5],y=c[6],b=c[7],x=0;x<64;x++){if(x<16)v[x]=h[g+x]|0;else{var A=v[x-15],W=(A<<25|A>>>7)^(A<<14|A>>>18)^A>>>3,z=v[x-2],L=(z<<15|z>>>17)^(z<<13|z>>>19)^z>>>10;v[x]=W+v[x-7]+L+v[x-16]}var X=l&u^~l&y,M=p&I^p&r^I&r,P=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),U=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),H=b+U+X+w[x]+v[x],J=P+M;b=y,y=u,u=l,l=s+H|0,s=r,r=I,I=p,p=H+J|0}c[0]=c[0]+p|0,c[1]=c[1]+I|0,c[2]=c[2]+r|0,c[3]=c[3]+s|0,c[4]=c[4]+l|0,c[5]=c[5]+u|0,c[6]=c[6]+y|0,c[7]=c[7]+b|0},_doFinalize:function(){var h=this._data,g=h.words,c=this._nDataBytes*8,p=h.sigBytes*8;return g[p>>>5]|=128<<24-p%32,g[(p+64>>>9<<4)+14]=n.floor(c/4294967296),g[(p+64>>>9<<4)+15]=c,h.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var h=O.clone.call(this);return h._hash=this._hash.clone(),h}});o.SHA256=O._createHelper(k),o.HmacSHA256=O._createHmacHelper(k)}(Math),t.SHA256})})(he);var Se=he.exports;const Oe=le(Se),Ie=(i,e)=>{const{client_id:t,redirect_uri:n,scope:o,state:a,chainId:d,chain:O,network:f,address:_,signature:w}=i,v=_?{address:_,...w!==void 0?{signature:w}:{},...d!==void 0||O!==void 0?{chain:d?pe(d):O}:{},...d!==void 0||f!==void 0?{network:d?ge(d):f}:{}}:{};return Y({client_id:t,redirect_uri:n,...o!==void 0?{scope:o}:{},...a!==void 0?{state:a}:{},code_challenge:e,code_challenge_method:"S256",response_type:"code",...v})},xe=()=>{let i="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=e.length;let n=0;for(;n<128;)i+=e.charAt(Math.floor(Math.random()*t)),n+=1;return i},Ae=i=>ke.stringify(Oe(i)),ae=(i,e)=>{const t=xe(),n=Ae(t);return sessionStorage.setItem(N,t||""),`${i}/auth?${Ie(e,n)}`},Me=()=>{const i=window.location.href,[e,t]=i.split("?");t&&window.history.replaceState(null,"",e)},ce=i=>i.code!=null,Ee=i=>i.refresh_token!=null,Be=i=>i.client_secret!=null,Pe=async(i,e,t,n)=>{const o=await fetch(`${i}`,{method:e,headers:n,body:t});let a;const d=await o.text();try{a=JSON.parse(d)}catch{throw d}if(!o.ok)throw a;return a},re=typeof window>"u";var j,Z,F,D,$,E,B,G,K,Q;class Ce{constructor(e){if(R(this,E),R(this,j,void 0),R(this,Z,void 0),R(this,F,void 0),R(this,D,void 0),R(this,$,void 0),R(this,G,void 0),R(this,K,void 0),R(this,Q,void 0),C(this,D,new Map),this.isAuthorized=!!this.bearerProfile,C(this,G,async(t,n,o)=>{const a=sessionStorage.getItem(N)||"";if(!a)throw new Error("Code verifier not found");return this.codeVerifier=a,sessionStorage.removeItem(N),await this.getBearerToken({code:o,redirect_uri:n,client_id:t,code_verifier:a})}),C(this,K,async({clientId:t,clientSecret:n})=>await this.getBearerToken({client_id:t,client_secret:n})),C(this,Q,async(t,n)=>await this.getBearerToken({refresh_token:n,client_id:t})),this.subscribeToOrderNotifications=()=>{var t,n;const o=`${m(this,j).wss}/profiles/${(t=this.bearerProfile)==null?void 0:t.profile}/orders?access_token=${(n=this.bearerProfile)==null?void 0:n.access_token}`,a=new WebSocket(o);return a.addEventListener("open",()=>{console.info(`Socket connected: ${o}`)}),a.addEventListener("error",d=>{throw console.error(d),new Error(`Socket error: ${o}`)}),a.addEventListener("message",d=>{var O;const f=JSON.parse(d.data);(O=m(this,D).get(f.meta.state))==null||O(f)}),a.addEventListener("close",()=>{console.info(`Socket connection closed: ${o}`)}),a},this.auth=async t=>await this.getBearerToken(t),this.getAuthFlowURI=t=>{const n=ae(m(this,j).api,t);return this.codeVerifier=sessionStorage.getItem(N),n},this.pkceRequest=t=>this.getAuthFlowURI(t),this.getEnvironment=()=>m(this,j),!e){C(this,j,ee.environments.sandbox);return}if(typeof e=="string")C(this,j,ee.environments[e]);else if(C(this,j,ee.environments[e.environment||"sandbox"]),re){const{clientId:t,clientSecret:n}=e;C(this,$,{clientId:t,clientSecret:n})}else{const{clientId:t,redirectUrl:n}=e;C(this,$,{clientId:t,redirectUrl:n})}}async authorize(e){var t,n;const o=(e==null?void 0:e.clientId)||((t=m(this,$))==null?void 0:t.clientId),a=(e==null?void 0:e.redirectUrl)||((n=m(this,$))==null?void 0:n.redirectUrl);if(!o)throw new Error("Missing ClientId");if(!a)throw new Error("Missing RedirectUrl");const d=ae(m(this,j).api,{client_id:o,redirect_uri:a,address:e==null?void 0:e.address,signature:e==null?void 0:e.signature,chainId:e==null?void 0:e.chainId});window.location.replace(d)}async connect(e){var t,n,o;const a=(e==null?void 0:e.clientId)||((t=m(this,$))==null?void 0:t.clientId);if(e!=null&&e.clientSecret||(n=m(this,$))!=null&&n.clientSecret){if(!re)throw new Error("Only use client credentials on server side");return await m(this,K).call(this,m(this,$)),!!this.bearerProfile}const d=(e==null?void 0:e.redirectUrl)||((o=m(this,$))==null?void 0:o.redirectUrl);if(!a)throw new Error("Missing ClientId");if(re)throw new Error("This only works on client side");const O=new URLSearchParams(window.location.search).get("code")||void 0,f=sessionStorage.getItem(te)||void 0;return O?await m(this,G).call(this,a,d,O):f&&await m(this,Q).call(this,a,f),!!this.bearerProfile}async getBearerToken(e){let t;if(ce(e))t={...e,grant_type:"authorization_code"};else if(Ee(e))t={...e,grant_type:"refresh_token"};else if(Be(e))t={...e,grant_type:"client_credentials"};else throw new Error("Authentication method could not be detected.");return await T(this,E,B).call(this,"post","auth/token",t,!0).then(n=>{var o;this.bearerProfile=n,this.isAuthorized=!!n,C(this,Z,`Bearer ${n==null?void 0:n.access_token}`),window.sessionStorage.setItem(te,((o=this.bearerProfile)==null?void 0:o.refresh_token)||"")}).catch(n=>{throw sessionStorage.removeItem(N),sessionStorage.removeItem(te),new Error(n==null?void 0:n.message)}),ce(e)&&Me(),this.bearerProfile}getAuthContext(){return T(this,E,B).call(this,"get","auth/context")}getProfile(e){return T(this,E,B).call(this,"get",`profiles/${e}`)}getBalances(e){return e?T(this,E,B).call(this,"get",`profiles/${e}/balances`):T(this,E,B).call(this,"get","balances")}getOrders(e){const t=Y(e);return T(this,E,B).call(this,"get",`orders?${t}`)}getOrder(e){return T(this,E,B).call(this,"get",`orders/${e}`)}getTokens(){return T(this,E,B).call(this,"get","tokens")}linkAddress(e,t){return T(this,E,B).call(this,"post",`profiles/${e}/addresses`,JSON.stringify(t))}placeOrder(e,t){const n={...e,kind:"redeem",currency:"eur"};return t?T(this,E,B).call(this,"post",`profiles/${t}/orders`,JSON.stringify(n)):T(this,E,B).call(this,"post","orders",JSON.stringify(n))}uploadSupportingDocument(e){const t=Y(e);return T(this,E,B).call(this,"post","files/supporting-document",t,!0)}async connectOrderSocket(){var e;(e=this.bearerProfile)!=null&&e.access_token&&m(this,D).size>0&&C(this,F,this.subscribeToOrderNotifications())}async disconnect(){var e;sessionStorage.removeItem(N),m(this,D).clear(),(e=m(this,F))==null||e.close()}subscribeOrders(e,t){m(this,D).set(e,t)}unsubscribeOrders(e){var t;m(this,D).delete(e),m(this,D).size===0&&((t=m(this,F))==null||t.close(),C(this,F,void 0))}}j=new WeakMap,Z=new WeakMap,F=new WeakMap,D=new WeakMap,$=new WeakMap,E=new WeakSet,B=async function(i,e,t,n){return Pe(`${m(this,j).api}/${e}`,i,n?Y(t):t,{Authorization:m(this,Z)||"","Content-Type":`application/${n?"x-www-form-urlencoded":"json"}`})},G=new WeakMap,K=new WeakMap,Q=new WeakMap;const Te=({children:i,clientId:e="f99e629b-6dca-11ee-8aa6-5273f65ed05b",redirectUrl:t="http://localhost:5173",environment:n="sandbox"})=>{const[o,a]=S.useState(),[d,O]=S.useState(!1),[f,_]=S.useState(null),[w,v]=S.useState(null),[k,h]=S.useState(!1),[g,c]=S.useState(!1),[p,I]=S.useState(!1),[r,s]=S.useState(!1),[l,u]=S.useState(null),[y,b]=S.useState([]),[x,A]=S.useState([]);S.useEffect(()=>{const M=new Ce({environment:n,clientId:e,redirectUrl:t});a(M)},[]),S.useEffect(()=>((async()=>{o&&O(await o.getAccess())})(),()=>{o&&o.disconnect()}),[o]),S.useEffect(()=>{(async()=>{if(o&&d)try{h(!0);const P=await o.getAuthContext(),U=await o.getProfile(P.defaultProfile),H=await o.getBalances(),J=await o.getOrders(),V=await o.getTokens();_(U),v(H),b(J),A(V)}catch(P){console.error("Error fetching data:",P),u(P)}finally{h(!1)}})()},[o,d]);const W=S.useCallback(async()=>{try{o&&await o.authorize()}catch(M){console.error("Error during authorization:",M),u(M)}},[o]),z=S.useCallback(async()=>{if(o&&d)try{s(!0);const M=await o.getBalances();v(M)}catch(M){console.error("Error getting balances:",M),u(M)}finally{s(!1)}},[o,d]),L=S.useCallback(async(M,P)=>{if(o&&d)try{c(!0);let U;parseInt(M.amount)>15e3&&P&&(U=(await o.uploadSupportingDocument(P)).id);const H={...M,documentId:U},J=await o.placeOrder(H);b(V=>[...V,J])}catch(U){console.error("Error placing order:",U),u(U)}finally{c(!1)}},[o,d]),X=S.useCallback(async M=>{if(o&&d&&f)try{return I(!0),await o.linkAddress(f.id,M)}catch(P){console.error("Error linking address:",P),u(P)}finally{I(!1)}},[o,d,f]);return fe.jsx(ne.Provider,{value:{authorize:W,isAuthorized:d,profile:f,balances:w,loading:k,loadingPlaceOrder:g,loadingLinkAddress:p,loadingBalances:r,getBalances:z,linkAddress:X,placeOrder:L,orders:y,tokens:x,error:l},children:i})};function ze(){const i=S.useContext(ne);if(i===null)throw new Error("useMonerium must be used within a MoneriumProvider");return i}exports.MoneriumContext=ne;exports.MoneriumProvider=Te;exports.useMonerium=ze;
|