@monerium/sdk 2.6.0 → 2.6.3
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 +24 -0
- package/README.md +15 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.6.3](https://github.com/monerium/sdk/compare/v2.6.2...v2.6.3) (2023-10-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* tests ([6be0014](https://github.com/monerium/sdk/commit/6be00148724942bdca74bbeea961b8b33bcd80f7))
|
|
9
|
+
|
|
10
|
+
## [2.6.2](https://github.com/monerium/sdk/compare/v2.6.1...v2.6.2) (2023-10-18)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* add missing info from README [no-ci] ([600bda5](https://github.com/monerium/sdk/commit/600bda52f9d8b61aa47222ace5308d3087e674e5))
|
|
16
|
+
* **docs:** add source code link to README ([c2a9294](https://github.com/monerium/sdk/commit/c2a9294f49e60ba9fd9373d94ec6069b6b559fb0))
|
|
17
|
+
* revert changes to action ([36eada9](https://github.com/monerium/sdk/commit/36eada92b89b9bf1de0659f74479d27b58697975))
|
|
18
|
+
* update docs on every push to main ([e0f57e6](https://github.com/monerium/sdk/commit/e0f57e61312a5fce0d02608eed6fc7c5aaba5b09))
|
|
19
|
+
|
|
20
|
+
## [2.6.1](https://github.com/monerium/sdk/compare/v2.6.0...v2.6.1) (2023-09-11)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* add info how to set environment ([c803cc5](https://github.com/monerium/sdk/commit/c803cc579ea11006ab845d4a4790e2a9bffae0b0))
|
|
26
|
+
|
|
3
27
|
## [2.6.0](https://github.com/monerium/sdk/compare/v2.5.2...v2.6.0) (2023-07-19)
|
|
4
28
|
|
|
5
29
|
|
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@ Everything you need to interact with the [Monerium API](https://monerium.dev/api
|
|
|
5
5
|
_This package is in development. Please make sure to check if any future updates contain commits
|
|
6
6
|
that may change the behavior of your application before you upgrade._
|
|
7
7
|
|
|
8
|
+
[Source code](https://github.com/monerium/sdk)
|
|
9
|
+
|
|
8
10
|
[SDK Documentation](https://monerium.github.io/sdk/)
|
|
9
11
|
|
|
10
12
|
[Code coverage](https://monerium.github.io/sdk/coverage)
|
|
@@ -37,14 +39,16 @@ networks: `mainnet`, `mainnet`, `mainnet`.
|
|
|
37
39
|
|
|
38
40
|
## Getting started
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
We recommend starting in the [Developer Portal](https://monerium.dev/docs/welcome). There you will learn more about `client_id`'s and ways of authenticating.
|
|
41
43
|
|
|
42
44
|
### Import the SDK and initialize a client
|
|
43
45
|
|
|
44
46
|
```ts
|
|
45
47
|
import { MoneriumClient } from '@monerium/sdk';
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
// By default, the client will use the sandbox environment.
|
|
50
|
+
// To change to production, pass "production" as the first argument.
|
|
51
|
+
const client = new MoneriumClient('sandbox');
|
|
48
52
|
```
|
|
49
53
|
|
|
50
54
|
### Authenticate using client credentials
|
|
@@ -57,6 +61,9 @@ await client.auth({
|
|
|
57
61
|
|
|
58
62
|
// User is now authenticated, get authentication data
|
|
59
63
|
await client.getAuthContext()
|
|
64
|
+
|
|
65
|
+
// You can now find your access and refresh token here:
|
|
66
|
+
const { access_token, refresh_token } = client.bearerProfile;
|
|
60
67
|
```
|
|
61
68
|
|
|
62
69
|
### Authenticate using auth flow
|
|
@@ -64,7 +71,8 @@ await client.getAuthContext()
|
|
|
64
71
|
```ts
|
|
65
72
|
// Construct the authFlowUrl for your application and redirect your customer.
|
|
66
73
|
let authFlowUrl = client.getAuthFlowURI({
|
|
67
|
-
client_id: "your_client_authflow_uuid"
|
|
74
|
+
client_id: "your_client_authflow_uuid",
|
|
75
|
+
redirect_uri: "http://your-webpage.com/monerium-integration"
|
|
68
76
|
// optional automatic wallet selection:
|
|
69
77
|
network: "mumbai",
|
|
70
78
|
chain: "polygon",
|
|
@@ -91,6 +99,9 @@ await client.auth({
|
|
|
91
99
|
|
|
92
100
|
// User is now authenticated, get authentication data
|
|
93
101
|
await client.getAuthContext();
|
|
102
|
+
|
|
103
|
+
// You can now find your access and refresh token here:
|
|
104
|
+
const { access_token, refresh_token } = client.bearerProfile;
|
|
94
105
|
```
|
|
95
106
|
|
|
96
107
|
## Contributing
|
|
@@ -112,10 +123,10 @@ yarn dlx @yarnpkg/sdks vscode
|
|
|
112
123
|
|
|
113
124
|
For development, a package can be linked into another project. This is often useful to test out new features or when trying to debug an issue in a package that manifests itself in another project. run yarn link inside of the sdk project.
|
|
114
125
|
|
|
115
|
-
|
|
116
126
|
```sh
|
|
117
127
|
YARN_IGNORE_PATH=1 yarn link
|
|
118
128
|
```
|
|
129
|
+
|
|
119
130
|
Use `yarn link "@monerium/sdk"` to link and test into your current project.
|
|
120
131
|
|
|
121
132
|
```sh
|
|
@@ -123,7 +134,6 @@ cd ../your-project
|
|
|
123
134
|
yarn link "@monerium/sdk"
|
|
124
135
|
```
|
|
125
136
|
|
|
126
|
-
|
|
127
137
|
## Publishing
|
|
128
138
|
|
|
129
139
|
When changes are merged to the `main` branch that follows the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard, [release-please](https://github.com/googleapis/release-please) workflow creates a pull request, preparing for the next release. If kept open, the following commits will also be added to the PR. Merging that PR will create a new release, a workflow will publish it on NPM and tag it on Github.
|