@monerium/sdk 2.1.23 → 2.2.1
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 +21 -2
- package/dist/index.d.ts +47 -47
- package/dist/index.mjs +459 -92
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +117 -117
- package/dist/index.umd.js.map +1 -1
- package/package.json +14 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.1](https://github.com/monerium/sdk/compare/v2.2.0...v2.2.1) (2023-04-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous
|
|
7
|
+
|
|
8
|
+
* backward support for node 16.15 ([a80379b](https://github.com/monerium/sdk/commit/a80379b8849f78e541d9f4455cd12cd676e7751f))
|
|
9
|
+
* ignore release please branches for build ([4b68cfa](https://github.com/monerium/sdk/commit/4b68cfa17380432136620acb67e856619333e3aa))
|
|
10
|
+
* move configs to reduce clutter in root folder ([#78](https://github.com/monerium/sdk/issues/78)) ([f2dcb21](https://github.com/monerium/sdk/commit/f2dcb2190811c9521e029eb15caef3b4ee557c4a))
|
|
11
|
+
|
|
12
|
+
## [2.2.0](https://github.com/monerium/sdk/compare/v2.1.23...v2.2.0) (2023-04-25)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* use Yarn PnP ([#73](https://github.com/monerium/sdk/issues/73)) ([4295154](https://github.com/monerium/sdk/commit/4295154487c3eb255b23816b5cf32aac52cae710))
|
|
18
|
+
|
|
3
19
|
## [2.1.23](https://github.com/monerium/sdk/compare/v2.1.22...v2.1.23) (2023-04-25)
|
|
4
20
|
|
|
21
|
+
|
|
5
22
|
### Bug Fixes
|
|
6
23
|
|
|
7
|
-
|
|
24
|
+
* now it should publish succesfully to npm registry ([#71](https://github.com/monerium/sdk/issues/71)) ([5b5e37b](https://github.com/monerium/sdk/commit/5b5e37b2cde1d1e0411e3e023cfcd5f7eca376d6))
|
|
8
25
|
|
|
9
26
|
## [2.1.22](https://github.com/monerium/sdk/compare/v2.1.21...v2.1.22) (2023-04-24)
|
|
10
27
|
|
|
28
|
+
|
|
11
29
|
### Bug Fixes
|
|
12
30
|
|
|
13
|
-
|
|
31
|
+
* deploy static pipeline ([#69](https://github.com/monerium/sdk/issues/69)) ([38067e7](https://github.com/monerium/sdk/commit/38067e75e3334b6eb20dcc182f1d6aaca5af0caa))
|
|
32
|
+
|
|
14
33
|
|
|
15
34
|
## [2.1.21](https://github.com/monerium/sdk/compare/v2.1.20...v2.1.21) (2023-04-24)
|
|
16
35
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v7.
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
2
|
|
|
3
3
|
export type Environment = {
|
|
4
4
|
api: string;
|
|
@@ -19,17 +19,17 @@ export interface BearerProfile {
|
|
|
19
19
|
userId: string;
|
|
20
20
|
}
|
|
21
21
|
export declare enum Currency {
|
|
22
|
-
eur =
|
|
23
|
-
usd =
|
|
24
|
-
gbp =
|
|
25
|
-
isk =
|
|
22
|
+
eur = 'eur',
|
|
23
|
+
usd = 'usd',
|
|
24
|
+
gbp = 'gbp',
|
|
25
|
+
isk = 'isk',
|
|
26
26
|
}
|
|
27
27
|
export type AuthArgs =
|
|
28
|
-
| Omit<AuthCode,
|
|
29
|
-
| Omit<RefreshToken,
|
|
30
|
-
| Omit<ClientCredentials,
|
|
28
|
+
| Omit<AuthCode, 'grant_type'>
|
|
29
|
+
| Omit<RefreshToken, 'grant_type'>
|
|
30
|
+
| Omit<ClientCredentials, 'grant_type'>;
|
|
31
31
|
export interface AuthCode {
|
|
32
|
-
grant_type:
|
|
32
|
+
grant_type: 'authorization_code';
|
|
33
33
|
client_id: string;
|
|
34
34
|
code: string;
|
|
35
35
|
code_verifier: string;
|
|
@@ -37,13 +37,13 @@ export interface AuthCode {
|
|
|
37
37
|
scope?: string;
|
|
38
38
|
}
|
|
39
39
|
export interface RefreshToken {
|
|
40
|
-
grant_type:
|
|
40
|
+
grant_type: 'refresh_token';
|
|
41
41
|
client_id: string;
|
|
42
42
|
refresh_token: string;
|
|
43
43
|
scope?: string;
|
|
44
44
|
}
|
|
45
45
|
export interface ClientCredentials {
|
|
46
|
-
grant_type:
|
|
46
|
+
grant_type: 'client_credentials';
|
|
47
47
|
client_id: string;
|
|
48
48
|
client_secret: string;
|
|
49
49
|
scope?: string;
|
|
@@ -53,7 +53,7 @@ export interface ClientCredentials {
|
|
|
53
53
|
*/
|
|
54
54
|
export type PKCERequestArgs = Omit<
|
|
55
55
|
PKCERequest,
|
|
56
|
-
|
|
56
|
+
'code_challenge' | 'code_challenge_method' | 'response_type'
|
|
57
57
|
>;
|
|
58
58
|
export type PKCERequest = {
|
|
59
59
|
/** the authentication flow client id of the application */
|
|
@@ -61,9 +61,9 @@ export type PKCERequest = {
|
|
|
61
61
|
/** the code challenge automatically generated by the SDK */
|
|
62
62
|
code_challenge: string;
|
|
63
63
|
/** the code challenge method for the authentication flow , handled by the SDK */
|
|
64
|
-
code_challenge_method:
|
|
64
|
+
code_challenge_method: 'S256';
|
|
65
65
|
/** the response type of the authentication flow, handled by the SDK */
|
|
66
|
-
response_type:
|
|
66
|
+
response_type: 'code';
|
|
67
67
|
/** the state of the application */
|
|
68
68
|
state?: string;
|
|
69
69
|
/** the redirect uri of the application */
|
|
@@ -80,18 +80,18 @@ export type PKCERequest = {
|
|
|
80
80
|
chain?: Chain;
|
|
81
81
|
};
|
|
82
82
|
declare enum Method {
|
|
83
|
-
password =
|
|
84
|
-
resource =
|
|
85
|
-
jwt =
|
|
86
|
-
apiKey =
|
|
83
|
+
password = 'password',
|
|
84
|
+
resource = 'resource',
|
|
85
|
+
jwt = 'jwt',
|
|
86
|
+
apiKey = 'apiKey',
|
|
87
87
|
}
|
|
88
88
|
export declare enum ProfileType {
|
|
89
|
-
corporate =
|
|
90
|
-
personal =
|
|
89
|
+
corporate = 'corporate',
|
|
90
|
+
personal = 'personal',
|
|
91
91
|
}
|
|
92
92
|
export declare enum Permission {
|
|
93
|
-
read =
|
|
94
|
-
write =
|
|
93
|
+
read = 'read',
|
|
94
|
+
write = 'write',
|
|
95
95
|
}
|
|
96
96
|
export interface AuthProfile {
|
|
97
97
|
id: string;
|
|
@@ -103,7 +103,7 @@ export interface AuthContext {
|
|
|
103
103
|
userId: string;
|
|
104
104
|
email: string;
|
|
105
105
|
name: string;
|
|
106
|
-
roles:
|
|
106
|
+
roles: 'admin'[];
|
|
107
107
|
auth: {
|
|
108
108
|
method: Method;
|
|
109
109
|
subject: string;
|
|
@@ -113,23 +113,23 @@ export interface AuthContext {
|
|
|
113
113
|
profiles: AuthProfile[];
|
|
114
114
|
}
|
|
115
115
|
export declare enum KYCState {
|
|
116
|
-
absent =
|
|
117
|
-
submitted =
|
|
118
|
-
pending =
|
|
119
|
-
confirmed =
|
|
116
|
+
absent = 'absent',
|
|
117
|
+
submitted = 'submitted',
|
|
118
|
+
pending = 'pending',
|
|
119
|
+
confirmed = 'confirmed',
|
|
120
120
|
}
|
|
121
121
|
export declare enum KYCOutcome {
|
|
122
|
-
approved =
|
|
123
|
-
rejected =
|
|
124
|
-
unknown =
|
|
122
|
+
approved = 'approved',
|
|
123
|
+
rejected = 'rejected',
|
|
124
|
+
unknown = 'unknown',
|
|
125
125
|
}
|
|
126
126
|
export interface KYC {
|
|
127
127
|
state: KYCState;
|
|
128
128
|
outcome: KYCOutcome;
|
|
129
129
|
}
|
|
130
130
|
export declare enum PaymentStandard {
|
|
131
|
-
iban =
|
|
132
|
-
scan =
|
|
131
|
+
iban = 'iban',
|
|
132
|
+
scan = 'scan',
|
|
133
133
|
}
|
|
134
134
|
export interface Account {
|
|
135
135
|
address: string;
|
|
@@ -149,15 +149,15 @@ export interface Profile {
|
|
|
149
149
|
accounts: Account[];
|
|
150
150
|
}
|
|
151
151
|
export declare enum Chain {
|
|
152
|
-
polygon =
|
|
153
|
-
ethereum =
|
|
154
|
-
gnosis =
|
|
152
|
+
polygon = 'polygon',
|
|
153
|
+
ethereum = 'ethereum',
|
|
154
|
+
gnosis = 'gnosis',
|
|
155
155
|
}
|
|
156
156
|
export declare enum Network {
|
|
157
|
-
mainnet =
|
|
158
|
-
chiado =
|
|
159
|
-
goerli =
|
|
160
|
-
mumbai =
|
|
157
|
+
mainnet = 'mainnet',
|
|
158
|
+
chiado = 'chiado',
|
|
159
|
+
goerli = 'goerli',
|
|
160
|
+
mumbai = 'mumbai',
|
|
161
161
|
}
|
|
162
162
|
export interface Balance {
|
|
163
163
|
currency: Currency;
|
|
@@ -171,17 +171,17 @@ export interface Balances {
|
|
|
171
171
|
balances: Balance[];
|
|
172
172
|
}
|
|
173
173
|
export declare enum OrderKind {
|
|
174
|
-
redeem =
|
|
175
|
-
issue =
|
|
174
|
+
redeem = 'redeem',
|
|
175
|
+
issue = 'issue',
|
|
176
176
|
}
|
|
177
177
|
export declare enum OrderState {
|
|
178
|
-
placed =
|
|
179
|
-
pending =
|
|
180
|
-
processed =
|
|
181
|
-
rejected =
|
|
178
|
+
placed = 'placed',
|
|
179
|
+
pending = 'pending',
|
|
180
|
+
processed = 'processed',
|
|
181
|
+
rejected = 'rejected',
|
|
182
182
|
}
|
|
183
183
|
export interface Fee {
|
|
184
|
-
provider:
|
|
184
|
+
provider: 'satchel';
|
|
185
185
|
currency: Currency;
|
|
186
186
|
amount: string;
|
|
187
187
|
}
|
|
@@ -295,7 +295,7 @@ export declare class MoneriumClient {
|
|
|
295
295
|
/** The PKCE code verifier */
|
|
296
296
|
codeVerifier?: string;
|
|
297
297
|
bearerProfile?: BearerProfile;
|
|
298
|
-
constructor(env?:
|
|
298
|
+
constructor(env?: 'production' | 'sandbox');
|
|
299
299
|
auth(args: AuthArgs): Promise<BearerProfile>;
|
|
300
300
|
/**
|
|
301
301
|
* Construct the url to the authorization code flow,
|