@monerium/sdk 2.0.16 → 2.0.18
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 +17 -0
- package/README.md +10 -6
- package/dist/index.mjs +748 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +377 -411
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/dist/index.es.js +0 -782
- package/dist/index.es.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.18](https://github.com/monerium/sdk/compare/v2.0.17...v2.0.18) (2023-04-21)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- es6 module imports ([00edf8d](https://github.com/monerium/sdk/commit/00edf8d600e6944fbcc17da00351ffae9ee79b53))
|
|
8
|
+
- test credentials ([00edf8d](https://github.com/monerium/sdk/commit/00edf8d600e6944fbcc17da00351ffae9ee79b53))
|
|
9
|
+
|
|
10
|
+
### Miscellaneous
|
|
11
|
+
|
|
12
|
+
- explain and add uppercase to the -randomness- ([5ed54d8](https://github.com/monerium/sdk/commit/5ed54d86a79b88293c595bd23ecf07cd30aafe63))
|
|
13
|
+
|
|
14
|
+
## [2.0.17](https://github.com/monerium/sdk/compare/v2.0.16...v2.0.17) (2023-02-25)
|
|
15
|
+
|
|
16
|
+
### Miscellaneous
|
|
17
|
+
|
|
18
|
+
- dont use crypto-js for randomizing a string ([412957e](https://github.com/monerium/sdk/commit/412957e028d968bbc483dbc6f8724f7e2da4739a))
|
|
19
|
+
|
|
3
20
|
## [2.0.16](https://github.com/monerium/sdk/compare/v2.0.15...v2.0.16) (2023-02-25)
|
|
4
21
|
|
|
5
22
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -59,21 +59,25 @@ let authFlowUrl = client.getAuthFlowURI({
|
|
|
59
59
|
signature: "0xValidSignature0df2b6c9e0fc067ab29bdbf322bec30aad7c46dcd97f62498a91ef7795957397e0f49426e000b0f500c347219ddd98dc5080982563055e918031c"
|
|
60
60
|
|
|
61
61
|
})
|
|
62
|
+
// Store the code verifier in localStorage
|
|
63
|
+
window.localStorage.setItem("myCodeVerifier", client.code_verifier);
|
|
62
64
|
// Redirecting to the Monerium onboarding / Authentication flow.
|
|
63
65
|
window.location.replace(authFlowUrl)
|
|
66
|
+
```
|
|
64
67
|
|
|
68
|
+
```ts
|
|
65
69
|
// As the final step of the flow, the customer will be routed back to the `redirect_uri` with a `code` parameter attached to it.
|
|
66
70
|
// i.e. http://your-webpage.com/monerium-integration?code=1234abcd
|
|
67
71
|
|
|
68
72
|
await client.auth({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
})
|
|
73
|
+
client_id: "your_client_authflow_uuid",
|
|
74
|
+
code: new URLSearchParams(window.location.search).get("code"),
|
|
75
|
+
code_verifier: window.localStorage.getItem("myCodeVerifier"),
|
|
76
|
+
redirect_url: "http://your-webpage.com/monerium-integration",
|
|
77
|
+
});
|
|
74
78
|
|
|
75
79
|
// User is now authenticated, get authentication data
|
|
76
|
-
await client.getAuthContext()
|
|
80
|
+
await client.getAuthContext();
|
|
77
81
|
```
|
|
78
82
|
|
|
79
83
|
## Developing
|