@monerium/sdk 3.4.11 → 4.0.0
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/README.md +348 -308
- package/dist/index.d.ts +956 -504
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/package.json +3 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,61 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a cryptographically random PKCE code verifier (RFC 7636).
|
|
3
|
+
* Returns a base64url-encoded string of 32 random bytes (256 bits of entropy).
|
|
4
|
+
* The caller is responsible for storing this until the callback.
|
|
5
|
+
* @group Auth
|
|
6
|
+
* @category Functions
|
|
7
|
+
*/
|
|
8
|
+
declare const randomPKCECodeVerifier: () => string;
|
|
9
|
+
/**
|
|
10
|
+
* Derive the S256 code challenge from a code verifier.
|
|
11
|
+
* Synchronous. Returns a base64url-encoded SHA-256 hash.
|
|
12
|
+
* @group Auth
|
|
13
|
+
* @category Functions
|
|
14
|
+
*/
|
|
15
|
+
declare const calculatePKCECodeChallenge: (codeVerifier: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Generate a new PKCE code verifier and its corresponding challenge.
|
|
18
|
+
* @group Auth
|
|
19
|
+
* @category Functions
|
|
20
|
+
*/
|
|
21
|
+
declare const generatePKCE: () => {
|
|
22
|
+
codeVerifier: string;
|
|
23
|
+
codeChallenge: string;
|
|
24
|
+
};
|
|
25
|
+
interface ParsedAuthorizationResponse {
|
|
26
|
+
code?: string;
|
|
27
|
+
state?: string;
|
|
28
|
+
error?: string;
|
|
29
|
+
errorDescription?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parse a callback URL or query string into structured fields.
|
|
33
|
+
*
|
|
34
|
+
* - Returns an empty object if none of the expected parameters are present.
|
|
35
|
+
* - Check for the presence of `code` or `error` to determine if the URL
|
|
36
|
+
* contains an OAuth2 authorization response.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* const { code, error } = parseAuthorizationResponse(req.url);
|
|
40
|
+
* const { code, error } = parseAuthorizationResponse('?code=abc&state=xyz');
|
|
41
|
+
* @group Auth
|
|
42
|
+
* @category Functions
|
|
43
|
+
*/
|
|
44
|
+
declare const parseAuthorizationResponse: (input: string) => ParsedAuthorizationResponse;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Single source of truth for all supported EVM chain pairs.
|
|
48
|
+
*
|
|
49
|
+
* Each entry is a { production, sandbox } pair sharing the same network family.
|
|
50
|
+
*
|
|
51
|
+
* ── Adding a new EVM chain ────────────────────────────────────────────────────
|
|
52
|
+
* Add ONE entry to EVM_CHAIN_PAIRS below. All types (ProductionChain,
|
|
53
|
+
* SandboxChain, EvmChainId) and all lookup maps (chainIdToName,
|
|
54
|
+
* validEvmChainNames, productionToSandbox) are derived automatically.
|
|
55
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
56
|
+
*/
|
|
57
|
+
declare const EVM_CHAIN_PAIRS: readonly [{
|
|
58
|
+
readonly production: {
|
|
59
|
+
readonly id: "ethereum";
|
|
60
|
+
readonly chainId: 1;
|
|
61
|
+
};
|
|
62
|
+
readonly sandbox: {
|
|
63
|
+
readonly id: "sepolia";
|
|
64
|
+
readonly chainId: 11155111;
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
readonly production: {
|
|
68
|
+
readonly id: "gnosis";
|
|
69
|
+
readonly chainId: 100;
|
|
70
|
+
};
|
|
71
|
+
readonly sandbox: {
|
|
72
|
+
readonly id: "chiado";
|
|
73
|
+
readonly chainId: 10200;
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
readonly production: {
|
|
77
|
+
readonly id: "polygon";
|
|
78
|
+
readonly chainId: 137;
|
|
79
|
+
};
|
|
80
|
+
readonly sandbox: {
|
|
81
|
+
readonly id: "amoy";
|
|
82
|
+
readonly chainId: 80002;
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
readonly production: {
|
|
86
|
+
readonly id: "arbitrum";
|
|
87
|
+
readonly chainId: 42161;
|
|
88
|
+
};
|
|
89
|
+
readonly sandbox: {
|
|
90
|
+
readonly id: "arbitrumsepolia";
|
|
91
|
+
readonly chainId: 421614;
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
readonly production: {
|
|
95
|
+
readonly id: "linea";
|
|
96
|
+
readonly chainId: 59144;
|
|
97
|
+
};
|
|
98
|
+
readonly sandbox: {
|
|
99
|
+
readonly id: "lineasepolia";
|
|
100
|
+
readonly chainId: 59141;
|
|
101
|
+
};
|
|
102
|
+
}, {
|
|
103
|
+
readonly production: {
|
|
104
|
+
readonly id: "scroll";
|
|
105
|
+
readonly chainId: 534352;
|
|
106
|
+
};
|
|
107
|
+
readonly sandbox: {
|
|
108
|
+
readonly id: "scrollsepolia";
|
|
109
|
+
readonly chainId: 534351;
|
|
110
|
+
};
|
|
111
|
+
}, {
|
|
112
|
+
readonly production: {
|
|
113
|
+
readonly id: "base";
|
|
114
|
+
readonly chainId: 8453;
|
|
115
|
+
};
|
|
116
|
+
readonly sandbox: {
|
|
117
|
+
readonly id: "basesepolia";
|
|
118
|
+
readonly chainId: 84532;
|
|
119
|
+
};
|
|
120
|
+
}, {
|
|
121
|
+
readonly production: {
|
|
122
|
+
readonly id: "camino";
|
|
123
|
+
readonly chainId: 500;
|
|
124
|
+
};
|
|
125
|
+
readonly sandbox: {
|
|
126
|
+
readonly id: "columbus";
|
|
127
|
+
readonly chainId: 501;
|
|
128
|
+
};
|
|
129
|
+
}];
|
|
130
|
+
/**
|
|
131
|
+
* All supported production chain names.
|
|
132
|
+
* @group Primitives
|
|
133
|
+
*/
|
|
134
|
+
type ProductionChain = 'ethereum' | 'gnosis' | 'polygon' | 'arbitrum' | 'linea' | 'scroll' | 'base' | 'camino' | 'noble';
|
|
135
|
+
/**
|
|
136
|
+
* All supported sandbox chain names.
|
|
137
|
+
* @group Primitives
|
|
138
|
+
*/
|
|
139
|
+
type SandboxChain = 'sepolia' | 'chiado' | 'amoy' | 'arbitrumsepolia' | 'lineasepolia' | 'scrollsepolia' | 'basesepolia' | 'columbus' | 'grand';
|
|
140
|
+
/**
|
|
141
|
+
* All known EVM chain IDs. The union extends `number` for backwards
|
|
142
|
+
* compatibility — known values are listed in EVM_CHAIN_PAIRS above.
|
|
143
|
+
* @group Primitives
|
|
144
|
+
*/
|
|
145
|
+
type EvmChainId = number | (typeof EVM_CHAIN_PAIRS)[number]['production' | 'sandbox']['chainId'];
|
|
146
|
+
/**
|
|
147
|
+
* @group Primitives
|
|
148
|
+
*/
|
|
149
|
+
type Chain = ProductionChain | SandboxChain;
|
|
150
|
+
/**
|
|
151
|
+
* @group Primitives
|
|
152
|
+
*/
|
|
153
|
+
type ChainId = EvmChainId | CosmosChainId;
|
|
154
|
+
/**
|
|
155
|
+
* @group Primitives
|
|
156
|
+
*/
|
|
157
|
+
type CosmosChainId = 'noble-1' | 'grand-1' | 'florin-1';
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @group Primitives
|
|
161
|
+
*/
|
|
1
162
|
type Environment = {
|
|
2
163
|
name: ENV;
|
|
3
164
|
api: string;
|
|
4
165
|
web: string;
|
|
5
|
-
wss: string;
|
|
6
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* @group Primitives
|
|
169
|
+
*/
|
|
7
170
|
type Config = {
|
|
8
171
|
environments: {
|
|
9
172
|
production: Environment;
|
|
10
173
|
sandbox: Environment;
|
|
11
174
|
};
|
|
12
175
|
};
|
|
176
|
+
/**
|
|
177
|
+
* @group Primitives
|
|
178
|
+
*/
|
|
13
179
|
type ENV = 'sandbox' | 'production';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type EvmChainId = number | 1 | 11155111 | 100 | 10200 | 500 | 501 | 137 | 80002 | 8453 | 84532 | 42161 | 421614 | 59141 | 59144 | 534352 | 534351;
|
|
18
|
-
type ChainId = EvmChainId | CosmosChainId;
|
|
19
|
-
type CosmosChainId = 'noble-1' | 'grand-1' | 'florin-1';
|
|
180
|
+
/**
|
|
181
|
+
* @group Tokens
|
|
182
|
+
*/
|
|
20
183
|
declare enum Currency {
|
|
21
184
|
eur = "eur",
|
|
22
185
|
usd = "usd",
|
|
23
186
|
gbp = "gbp",
|
|
24
187
|
isk = "isk"
|
|
25
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* @group Tokens
|
|
191
|
+
*/
|
|
26
192
|
type TokenSymbol = 'EURe' | 'GBPe' | 'USDe' | 'ISKe';
|
|
193
|
+
/**
|
|
194
|
+
* @group Tokens
|
|
195
|
+
*/
|
|
27
196
|
type Ticker = 'EUR' | 'GBP' | 'USD' | 'ISK';
|
|
197
|
+
/**
|
|
198
|
+
* @group Tokens
|
|
199
|
+
*/
|
|
28
200
|
type CurrencyCode = 'eur' | 'gbp' | 'usd' | 'isk';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*
|
|
43
|
-
* [Auth endpoint in API documentation:](https://docs.monerium.com/api#operation/auth).
|
|
44
|
-
* */
|
|
45
|
-
interface RefreshTokenPayload {
|
|
46
|
-
grant_type: 'refresh_token';
|
|
47
|
-
client_id: string;
|
|
48
|
-
refresh_token: string;
|
|
49
|
-
}
|
|
50
|
-
/** One of the options for the {@link AuthArgs}.
|
|
51
|
-
*
|
|
52
|
-
* [Auth endpoint in API documentation:](https://docs.monerium.com/api#operation/auth).
|
|
53
|
-
* */
|
|
54
|
-
interface ClientCredentialsPayload {
|
|
55
|
-
grant_type: 'client_credentials';
|
|
56
|
-
client_id: string;
|
|
57
|
-
client_secret: string;
|
|
201
|
+
/**
|
|
202
|
+
* Information about the EURe token on different networks.
|
|
203
|
+
* @group Tokens
|
|
204
|
+
*/
|
|
205
|
+
interface Token {
|
|
206
|
+
currency: Currency;
|
|
207
|
+
ticker: Ticker;
|
|
208
|
+
symbol: TokenSymbol;
|
|
209
|
+
chain: Chain;
|
|
210
|
+
/** The address of the EURe contract on this network */
|
|
211
|
+
address: string;
|
|
212
|
+
/** How many decimals this token supports */
|
|
213
|
+
decimals: number;
|
|
58
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Returned by all auth grant functions. Store server-side — never in the browser.
|
|
217
|
+
* @group Auth
|
|
218
|
+
* @category Types
|
|
219
|
+
*/
|
|
59
220
|
interface BearerProfile {
|
|
60
221
|
access_token: string;
|
|
61
222
|
token_type: string;
|
|
@@ -64,130 +225,82 @@ interface BearerProfile {
|
|
|
64
225
|
profile: string;
|
|
65
226
|
userId: string;
|
|
66
227
|
}
|
|
67
|
-
interface PKCERequestShared {
|
|
68
|
-
/** the authentication flow client id of the application */
|
|
69
|
-
client_id: string;
|
|
70
|
-
/** the redirect uri of the application */
|
|
71
|
-
redirect_uri?: string;
|
|
72
|
-
/** the code challenge automatically generated by the SDK */
|
|
73
|
-
code_challenge: string;
|
|
74
|
-
/** the code challenge method for the authentication flow , handled by the SDK */
|
|
75
|
-
code_challenge_method: 'S256';
|
|
76
|
-
/** the state of the application */
|
|
77
|
-
state?: string;
|
|
78
|
-
}
|
|
79
228
|
/**
|
|
80
|
-
* @
|
|
229
|
+
* @group Profiles
|
|
81
230
|
*/
|
|
82
|
-
type
|
|
83
|
-
interface PKCERequest extends PKCERequestShared {
|
|
84
|
-
/** the response type of the authentication flow, handled by the SDK */
|
|
85
|
-
response_type: 'code';
|
|
86
|
-
/** the email of the user to prefill the login form */
|
|
87
|
-
email?: string;
|
|
88
|
-
/** @deprecated: will be removed, the scope of the application */
|
|
89
|
-
scope?: string;
|
|
90
|
-
/** the address of the wallet to automatically link */
|
|
91
|
-
address?: string;
|
|
92
|
-
/** the signature of the wallet to automatically link */
|
|
93
|
-
signature?: string;
|
|
94
|
-
/** The network of the wallet to automatically link */
|
|
95
|
-
chain?: Chain | ChainId;
|
|
96
|
-
/** You can skip the connect wallet and request IBAN steps in the Authorization Flow and use the Link Address and Request IBAN API endpoints after you have gotten the authorization */
|
|
97
|
-
skip_create_account?: boolean;
|
|
98
|
-
/** You can skip the KYC onboarding steps in the Authorization Flow and use the the details, additional data, and verifications API endpoints after you have gotten the authorization. */
|
|
99
|
-
skip_kyc?: boolean;
|
|
100
|
-
}
|
|
231
|
+
type Method = 'password' | 'resource' | 'jwt' | 'apiKey' | 'bearer';
|
|
101
232
|
/**
|
|
102
|
-
* @
|
|
233
|
+
* @group Profiles
|
|
103
234
|
*/
|
|
104
|
-
type
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
**/
|
|
110
|
-
authentication_method: 'siwe';
|
|
111
|
-
/** An EIP-4361 compatible message. https://eips.ethereum.org/EIPS/eip-4361
|
|
112
|
-
* https://monerium.com/siwe
|
|
113
|
-
* */
|
|
114
|
-
message: string;
|
|
115
|
-
/** Signature for the SIWE message. Must include the 0x prefix. */
|
|
116
|
-
signature: string;
|
|
117
|
-
}
|
|
118
|
-
declare enum Method {
|
|
119
|
-
password = "password",
|
|
120
|
-
resource = "resource",
|
|
121
|
-
jwt = "jwt",
|
|
122
|
-
apiKey = "apiKey",
|
|
123
|
-
bearer = "bearer"
|
|
124
|
-
}
|
|
235
|
+
type ProfileKind = 'corporate' | 'personal';
|
|
236
|
+
/**
|
|
237
|
+
* @ignore
|
|
238
|
+
* @deprecated Use ProfileKind instead
|
|
239
|
+
* */
|
|
125
240
|
declare enum ProfileType {
|
|
126
241
|
corporate = "corporate",
|
|
127
242
|
personal = "personal"
|
|
128
243
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
declare enum KYCState {
|
|
146
|
-
absent = "absent",
|
|
147
|
-
submitted = "submitted",
|
|
148
|
-
pending = "pending",
|
|
149
|
-
confirmed = "confirmed"
|
|
150
|
-
}
|
|
151
|
-
declare enum KYCOutcome {
|
|
152
|
-
approved = "approved",
|
|
153
|
-
rejected = "rejected",
|
|
154
|
-
unknown = "unknown"
|
|
155
|
-
}
|
|
156
|
-
declare enum AccountState {
|
|
157
|
-
requested = "requested",
|
|
158
|
-
approved = "approved",
|
|
159
|
-
pending = "pending",
|
|
160
|
-
rejected = "rejected",
|
|
161
|
-
closed = "closed"
|
|
162
|
-
}
|
|
163
|
-
interface KYC {
|
|
164
|
-
state: KYCState;
|
|
165
|
-
outcome: KYCOutcome;
|
|
166
|
-
}
|
|
167
|
-
declare enum PaymentStandard {
|
|
168
|
-
iban = "iban",
|
|
169
|
-
scan = "scan",
|
|
170
|
-
chain = "chain",
|
|
171
|
-
account = "account"
|
|
244
|
+
/**
|
|
245
|
+
* @group Profiles
|
|
246
|
+
*/
|
|
247
|
+
type Permission = 'read' | 'write';
|
|
248
|
+
/**
|
|
249
|
+
* The state of the profile lifecycle.
|
|
250
|
+
* @group Profiles
|
|
251
|
+
*/
|
|
252
|
+
type ProfileState = 'created' | 'incomplete' | 'submitted' | 'approved' | 'rejected';
|
|
253
|
+
/**
|
|
254
|
+
* KYC details section with its current state.
|
|
255
|
+
*
|
|
256
|
+
* @group Profiles
|
|
257
|
+
*/
|
|
258
|
+
interface ProfileDetailsState {
|
|
259
|
+
state: ProfileState;
|
|
172
260
|
}
|
|
173
261
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
262
|
+
* Additional data section used for risk calculations.
|
|
263
|
+
*
|
|
264
|
+
* @group Profiles
|
|
176
265
|
*/
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
nationalIdentityCard = "nationalIdentityCard",
|
|
180
|
-
drivingLicense = "drivingLicense"
|
|
266
|
+
interface ProfileFormState {
|
|
267
|
+
state: ProfileState;
|
|
181
268
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
269
|
+
/**
|
|
270
|
+
* The type of personal profile verification.
|
|
271
|
+
*
|
|
272
|
+
* @group Profiles
|
|
273
|
+
*/
|
|
274
|
+
type PersonalVerificationKind = 'idDocument' | 'facialSimilarity' | 'proofOfResidency' | 'sourceOfFunds';
|
|
275
|
+
/**
|
|
276
|
+
* The type of corporate profile verification.
|
|
277
|
+
*
|
|
278
|
+
* @group Profiles
|
|
279
|
+
*/
|
|
280
|
+
type CorporateVerificationKind = 'sourceOfFunds' | 'corporateName' | 'corporateAddress' | 'registrationNumber' | 'dateOfRegistration' | 'beneficialOwnership' | 'powerOfAttorney';
|
|
281
|
+
/**
|
|
282
|
+
* Verification items required for this profile, each with its current state.
|
|
283
|
+
*
|
|
284
|
+
* @group Profiles
|
|
285
|
+
*/
|
|
286
|
+
interface ProfileVerificationState {
|
|
287
|
+
kind: PersonalVerificationKind | CorporateVerificationKind;
|
|
288
|
+
state: ProfileState;
|
|
185
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* The type of ID document. Passports, National ID cards, and driving licenses are supported.
|
|
292
|
+
* The ID document must verify the person's name, birthday, and nationality.
|
|
293
|
+
* @group Profiles
|
|
294
|
+
*/
|
|
295
|
+
type IdDocumentKind = 'passport' | 'nationalIdentityCard' | 'drivingLicense';
|
|
296
|
+
/**
|
|
297
|
+
* @group Profiles
|
|
298
|
+
*/
|
|
186
299
|
interface AuthContext {
|
|
187
300
|
userId: string;
|
|
188
301
|
email: string;
|
|
189
302
|
name: string;
|
|
190
|
-
roles
|
|
303
|
+
roles?: string[];
|
|
191
304
|
auth: {
|
|
192
305
|
method: Method;
|
|
193
306
|
subject: string;
|
|
@@ -197,59 +310,108 @@ interface AuthContext {
|
|
|
197
310
|
defaultProfile: string;
|
|
198
311
|
profiles: {
|
|
199
312
|
id: string;
|
|
200
|
-
kind:
|
|
313
|
+
kind: ProfileKind | 'unknown';
|
|
201
314
|
name: string;
|
|
202
315
|
perms: Permission[];
|
|
203
316
|
}[];
|
|
204
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* @group Profiles
|
|
320
|
+
*/
|
|
205
321
|
interface ProfilesResponse {
|
|
206
|
-
profiles: Profile[];
|
|
322
|
+
profiles: Omit<Profile, 'details' | 'form' | 'verifications'>[];
|
|
207
323
|
}
|
|
324
|
+
/**
|
|
325
|
+
* @group Profiles
|
|
326
|
+
*/
|
|
208
327
|
interface Profile {
|
|
328
|
+
/** Unique identifier of the profile. The Profile ID is the main identifier used to represent ownership of other API resources */
|
|
209
329
|
id: string;
|
|
330
|
+
/** String identifier specifying the type of the profile. */
|
|
331
|
+
kind: ProfileKind;
|
|
332
|
+
/** The Profile name. This can be a corporate or an individual. */
|
|
210
333
|
name: string;
|
|
211
|
-
|
|
334
|
+
/** The state of the profile lifecycle. */
|
|
212
335
|
state: ProfileState;
|
|
336
|
+
/** KYC details section with its current state. */
|
|
337
|
+
details?: ProfileDetailsState;
|
|
338
|
+
/** The form data for the profile. */
|
|
339
|
+
form?: ProfileFormState;
|
|
340
|
+
/** Verification items required for this profile, each with its current state. */
|
|
341
|
+
verifications?: ProfileVerificationState[];
|
|
213
342
|
}
|
|
214
|
-
/**
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
343
|
+
/**
|
|
344
|
+
* @group Profiles
|
|
345
|
+
*/
|
|
346
|
+
interface GetProfilesParams {
|
|
347
|
+
/** Filter the list on the state of profiles */
|
|
218
348
|
state?: ProfileState;
|
|
219
|
-
/**
|
|
220
|
-
kind?:
|
|
349
|
+
/** Filter the list on the kind of profiles*/
|
|
350
|
+
kind?: ProfileKind;
|
|
221
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* @group Profiles
|
|
354
|
+
*/
|
|
222
355
|
interface PersonalProfileDetails {
|
|
223
356
|
idDocument: {
|
|
357
|
+
/** The document number. */
|
|
224
358
|
number: string;
|
|
359
|
+
/** The type of ID document. Must verify the person's name, birthday, and nationality */
|
|
225
360
|
kind: IdDocumentKind;
|
|
226
361
|
};
|
|
227
362
|
firstName: string;
|
|
228
363
|
lastName: string;
|
|
364
|
+
/** Street and building number where the person lives. */
|
|
229
365
|
address: string;
|
|
366
|
+
/** Postal code where the person lives. */
|
|
230
367
|
postalCode: string;
|
|
368
|
+
/** City where the person lives. */
|
|
231
369
|
city: string;
|
|
370
|
+
/**Two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) where the person lives */
|
|
232
371
|
country: string;
|
|
372
|
+
/** State/County where the person lives. */
|
|
233
373
|
countryState?: string;
|
|
374
|
+
/** Two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) for the person's nationality. */
|
|
234
375
|
nationality: string;
|
|
376
|
+
/** The person's date of birth in `YYYY-MM-DD format. */
|
|
235
377
|
birthday: string;
|
|
236
378
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
379
|
+
/**
|
|
380
|
+
* @group Profiles
|
|
381
|
+
*/
|
|
240
382
|
type Representative = PersonalProfileDetails;
|
|
383
|
+
/**
|
|
384
|
+
* @group Profiles
|
|
385
|
+
*/
|
|
241
386
|
type Beneficiary = Omit<PersonalProfileDetails, 'idDocument'> & {
|
|
242
387
|
/** Ownership in % that is between 25% and 100%. */
|
|
243
388
|
ownershipPercentage: number;
|
|
244
389
|
};
|
|
390
|
+
/**
|
|
391
|
+
* @group Profiles
|
|
392
|
+
*/
|
|
245
393
|
type Director = Omit<PersonalProfileDetails, 'idDocument'>;
|
|
394
|
+
/**
|
|
395
|
+
* @group Profiles
|
|
396
|
+
*/
|
|
246
397
|
interface CorporateProfileDetails {
|
|
247
398
|
name: string;
|
|
248
399
|
registrationNumber: string;
|
|
400
|
+
/** The company's registration date in the `YYYY-MM-DD` format. */
|
|
401
|
+
registrationDate?: string;
|
|
402
|
+
/** The company's VAT number */
|
|
403
|
+
vatNumber?: string;
|
|
404
|
+
/** The company's website */
|
|
405
|
+
website?: string;
|
|
406
|
+
/** Street and building number where the corporate is located. */
|
|
249
407
|
address: string;
|
|
408
|
+
/** Postal code where the corporate is located. */
|
|
250
409
|
postalCode: string;
|
|
410
|
+
/** City where the corporate is located. */
|
|
251
411
|
city: string;
|
|
412
|
+
/** Two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) where the corporate is located */
|
|
252
413
|
country: string;
|
|
414
|
+
/** State/County where the corporate is located. */
|
|
253
415
|
countryState: string;
|
|
254
416
|
/** List of individuals representing the company and authorized to act on it's behalf. */
|
|
255
417
|
representatives: Representative[];
|
|
@@ -258,16 +420,138 @@ interface CorporateProfileDetails {
|
|
|
258
420
|
/** List of Individual who has powers to legally bind the company (power of procuration). */
|
|
259
421
|
directors: Director[];
|
|
260
422
|
}
|
|
261
|
-
|
|
423
|
+
/**
|
|
424
|
+
* @group Profiles
|
|
425
|
+
*/
|
|
426
|
+
type UpdateProfileDetailsInput = {
|
|
427
|
+
/** The profile ID to update. */
|
|
428
|
+
profile: string;
|
|
429
|
+
personal: PersonalProfileDetails;
|
|
430
|
+
} | {
|
|
431
|
+
/** The profile ID to update. */
|
|
432
|
+
profile: string;
|
|
262
433
|
corporate: CorporateProfileDetails;
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* @group Profiles
|
|
437
|
+
*/
|
|
438
|
+
type PersonalProfileForm = {
|
|
439
|
+
/** The occupation code representing the individual's current employment status. */
|
|
440
|
+
occupation: 'OCCUPATION_STUDENT' | 'OCCUPATION_EMPLOYED' | 'OCCUPATION_SELF_EMPLOYED' | 'OCCUPATION_UNEMPLOYED' | 'OCCUPATION_RETIRED';
|
|
441
|
+
/** The profession code representing the individual's professional field. */
|
|
442
|
+
profession: 'PROF_ACCOUNTANCY' | 'PROF_ADMINISTRATIVE' | 'PROF_AGRICULTURE' | 'PROF_ARTS_MEDIA' | 'PROF_BROKER_DEALER' | 'PROF_CATERING_HOSPITALITY' | 'PROF_CHARITY' | 'PROF_CONSTRUCTION_REAL_ESTATE' | 'PROF_DEALER_HIGH_VALUE_GOODS' | 'PROF_DEALER_PRECIOUS_METALS' | 'PROF_EDUCATION' | 'PROF_EMERGENCY_SERVICES' | 'PROF_EXTRACTIVE_INDUSTRY' | 'PROF_FIN_SERVICES_BANKING' | 'PROF_FIN_SERVICES_INSURANCE' | 'PROF_FIN_SERVICES_OTHER' | 'PROF_FIN_SERVICES_PRIVATE_BANKING' | 'PROF_GAMBLING' | 'PROF_GOVERNMENT' | 'PROF_HEALTHCARE_MEDICAL' | 'PROF_INFORMATION_TECHNOLOGY' | 'PROF_LEGAL' | 'PROF_MANUFACTURING' | 'PROF_MARKETING' | 'PROF_MILITARY_DEFENCE' | 'PROF_MONEY_SERVICE_BUSINESS' | 'PROF_PENSIONER' | 'PROF_PUBLIC_PROCUREMENT' | 'PROF_RETAIL_SALES';
|
|
443
|
+
/** The origin of the fund code representing the source of the individual's funds. */
|
|
444
|
+
fundOrigin: 'FUND_ORIGIN_SALARY' | 'FUND_ORIGIN_DIVIDENDS' | 'FUND_ORIGIN_INHERITANCE' | 'FUND_ORIGIN_SAVINGS' | 'FUND_ORIGIN_INVESTMENT' | 'FUND_ORIGIN_GIFT' | 'FUND_ORIGIN_MINING' | 'FUND_ORIGIN_REAL_ESTATE' | 'FUND_ORIGIN_LOAN';
|
|
445
|
+
/** The code representing the individual's annual income range. */
|
|
446
|
+
annualIncome: 'ANNUAL_INCOME_UNDER_10K' | 'ANNUAL_INCOME_10K_TO_50K' | 'ANNUAL_INCOME_50K_TO_150K' | 'ANNUAL_INCOME_150K_TO_300K' | 'ANNUAL_INCOME_OVER_300K';
|
|
447
|
+
/** The code representing the individual's monthly turnover range. */
|
|
448
|
+
monthlyTurnover: 'TURNOVER_UNDER_10K' | 'TURNOVER_10K_TO_50K' | 'TURNOVER_50K_TO_150K' | 'TURNOVER_150K_TO_500K' | 'TURNOVER_OVER_500K';
|
|
449
|
+
/** The code representing the number of transactions the individual makes each month. */
|
|
450
|
+
monthlyTransactionCount: 'TRANSACTION_COUNT_LESS_THAN_5' | 'TRANSACTION_COUNT_5_TO_50' | 'TRANSACTION_COUNT_50_TO_100' | 'TRANSACTION_COUNT_100_TO_200' | 'TRANSACTION_COUNT_OVER_200';
|
|
451
|
+
/** List of codes representing the individual's financial activities. */
|
|
452
|
+
activities: ('ACTIVITY_COMMERCE_SELLING' | 'ACTIVITY_COMMERCE_BUYING' | 'ACTIVITY_INVESTING_CRYPTO' | 'ACTIVITY_OTHER')[];
|
|
453
|
+
/** A description of the other activity if the code `ACTIVITY_OTHER` is chosen. */
|
|
454
|
+
activityOther?: string;
|
|
455
|
+
/** Indicates whether the individual holds a politically exposed person (PEP) status. */
|
|
456
|
+
publicFunction: boolean;
|
|
457
|
+
/** Indicates whether the individual is the owner of the funds. */
|
|
458
|
+
fundOwner: boolean;
|
|
459
|
+
/** Indicates whether the individual is a United States citizen. */
|
|
460
|
+
usCitizen: boolean;
|
|
461
|
+
/** Indicates whether the individual is subject to US tax obligations (e.g. holds a US tax identification number or is a US resident for tax purposes). */
|
|
462
|
+
usTaxPerson: boolean;
|
|
463
|
+
/** Tax Identification Number (TIN) assigned by the individual's tax authority. Format varies by country (e.g. SSN in the US, NI number in the UK). */
|
|
464
|
+
taxId: string;
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* Form for a company
|
|
468
|
+
* @group Profiles
|
|
469
|
+
*/
|
|
470
|
+
type CorporateProfileForm = {
|
|
471
|
+
/** A brief description of the company's services. */
|
|
472
|
+
service: string;
|
|
473
|
+
};
|
|
474
|
+
/**
|
|
475
|
+
* @group Profiles
|
|
476
|
+
*/
|
|
477
|
+
type UpdateProfileFormInput = {
|
|
478
|
+
/** The profile ID to update. */
|
|
479
|
+
profile: string;
|
|
480
|
+
personal: PersonalProfileForm;
|
|
481
|
+
} | {
|
|
482
|
+
/** The profile ID to update. */
|
|
483
|
+
profile: string;
|
|
484
|
+
corporate: CorporateProfileForm;
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* @group Profiles
|
|
488
|
+
*/
|
|
489
|
+
interface CreateProfileInput {
|
|
490
|
+
/** Determines whether the profile is personal or corporate, and which body structure to use in subsequent PATCH endpoints. */
|
|
491
|
+
kind: ProfileKind;
|
|
492
|
+
/** Optional partner-supplied profile ID. */
|
|
493
|
+
id?: string;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* @group Profiles
|
|
497
|
+
*/
|
|
498
|
+
type KYCProvider = 'sumsub';
|
|
499
|
+
/**
|
|
500
|
+
* @group Profiles
|
|
501
|
+
*/
|
|
502
|
+
interface ShareProfileKYCInput {
|
|
503
|
+
/** Id of the profile to share. */
|
|
504
|
+
profile: string;
|
|
505
|
+
/** Determines whether the profile is personal or corporate, and which body structure to use in subsequent PATCH endpoints. */
|
|
506
|
+
provider: KYCProvider;
|
|
507
|
+
/** Token for a personal profile applicant. */
|
|
508
|
+
personal: {
|
|
509
|
+
/** Provider-issued applicant token. */
|
|
510
|
+
token: string;
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* @group Profiles
|
|
515
|
+
*/
|
|
516
|
+
interface PersonalProfileVerification {
|
|
517
|
+
/** The type of the verification. */
|
|
518
|
+
kind: PersonalVerificationKind;
|
|
519
|
+
/** ID of a previously uploaded file associated with this verification. */
|
|
520
|
+
fileId: string;
|
|
263
521
|
}
|
|
264
|
-
|
|
522
|
+
/**
|
|
523
|
+
* @group Profiles
|
|
524
|
+
*/
|
|
525
|
+
interface CorporateProfileVerification {
|
|
526
|
+
/** The type of the verification. */
|
|
527
|
+
kind: CorporateVerificationKind;
|
|
528
|
+
/** ID of a previously uploaded file associated with this verification. */
|
|
529
|
+
fileId: string;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* @group Profiles
|
|
533
|
+
*/
|
|
534
|
+
type UpdateProfileVerificationsInput = {
|
|
535
|
+
/** The profile ID to update. */
|
|
536
|
+
profile: string;
|
|
537
|
+
personal: PersonalProfileVerification[];
|
|
538
|
+
} | {
|
|
539
|
+
/** The profile ID to update. */
|
|
540
|
+
profile: string;
|
|
541
|
+
corporate: CorporateProfileVerification[];
|
|
542
|
+
};
|
|
543
|
+
/**
|
|
544
|
+
* @group Addresses
|
|
545
|
+
*/
|
|
265
546
|
interface AddressesQueryParams {
|
|
266
547
|
/** Filter the list by profile */
|
|
267
548
|
profile?: string;
|
|
268
549
|
/** Filter the list by chain */
|
|
269
550
|
chain?: Chain | ChainId;
|
|
270
551
|
}
|
|
552
|
+
/**
|
|
553
|
+
* @group Addresses
|
|
554
|
+
*/
|
|
271
555
|
interface Address {
|
|
272
556
|
/** The id of the profile the address belongs to. */
|
|
273
557
|
profile: string;
|
|
@@ -276,84 +560,146 @@ interface Address {
|
|
|
276
560
|
/** Which chains is the address linked on. */
|
|
277
561
|
chains: Chain[];
|
|
278
562
|
}
|
|
563
|
+
/**
|
|
564
|
+
* @group Addresses
|
|
565
|
+
*/
|
|
279
566
|
interface AddressesResponse {
|
|
280
567
|
addresses: Address[];
|
|
281
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* @group Addresses
|
|
571
|
+
*/
|
|
282
572
|
interface CurrencyBalance {
|
|
283
573
|
currency: Currency;
|
|
284
574
|
amount: string;
|
|
285
575
|
}
|
|
576
|
+
/**
|
|
577
|
+
* @group Addresses
|
|
578
|
+
*/
|
|
579
|
+
interface GetBalancesParams {
|
|
580
|
+
address: string;
|
|
581
|
+
chain: Chain | ChainId;
|
|
582
|
+
currencies?: Currency | Currency[];
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* @group Addresses
|
|
586
|
+
*/
|
|
286
587
|
interface Balances {
|
|
287
588
|
id: string;
|
|
288
589
|
address: string;
|
|
289
590
|
chain: Chain;
|
|
290
591
|
balances: CurrencyBalance[];
|
|
291
592
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
593
|
+
/**
|
|
594
|
+
* @group Orders
|
|
595
|
+
*/
|
|
596
|
+
type PaymentStandard = 'iban' | 'scan' | 'chain' | 'account';
|
|
597
|
+
/**
|
|
598
|
+
* @group Orders
|
|
599
|
+
*/
|
|
600
|
+
interface Identifier {
|
|
601
|
+
standard: PaymentStandard;
|
|
602
|
+
bic?: string;
|
|
301
603
|
}
|
|
604
|
+
/**
|
|
605
|
+
* @group Orders
|
|
606
|
+
*/
|
|
607
|
+
type OrderKind = 'issue' | 'redeem';
|
|
608
|
+
/**
|
|
609
|
+
* @group Orders
|
|
610
|
+
*/
|
|
611
|
+
type OrderState = 'placed' | 'pending' | 'processed' | 'rejected';
|
|
612
|
+
/**
|
|
613
|
+
* @group Orders
|
|
614
|
+
*/
|
|
302
615
|
interface Fee {
|
|
303
616
|
provider: 'satchel';
|
|
304
617
|
currency: Currency;
|
|
305
618
|
amount: string;
|
|
306
619
|
}
|
|
620
|
+
/**
|
|
621
|
+
* @group Orders
|
|
622
|
+
*/
|
|
307
623
|
interface IBANIdentifier extends Identifier {
|
|
308
|
-
standard:
|
|
624
|
+
standard: 'iban';
|
|
309
625
|
iban: string;
|
|
310
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* @group Orders
|
|
629
|
+
*/
|
|
311
630
|
interface CrossChainIdentifier extends Identifier {
|
|
312
|
-
standard:
|
|
631
|
+
standard: 'chain';
|
|
313
632
|
/** The receivers address */
|
|
314
633
|
address: string;
|
|
315
634
|
/** The receivers network */
|
|
316
635
|
chain: Chain | ChainId;
|
|
317
636
|
}
|
|
637
|
+
/**
|
|
638
|
+
* @group Orders
|
|
639
|
+
*/
|
|
318
640
|
interface BankAccountIdentifier extends Identifier {
|
|
319
641
|
/** The standard of the bank account. This is used to identify generic bank account. */
|
|
320
|
-
standard:
|
|
642
|
+
standard: 'account';
|
|
321
643
|
/** The account number of the bank account. */
|
|
322
644
|
accountNumber: number;
|
|
323
645
|
/** The address of the bank account holder. */
|
|
324
646
|
address: string;
|
|
325
647
|
}
|
|
648
|
+
/**
|
|
649
|
+
* @group Orders
|
|
650
|
+
*/
|
|
326
651
|
interface SCANIdentifier extends Identifier {
|
|
327
|
-
standard:
|
|
652
|
+
standard: 'scan';
|
|
328
653
|
sortCode: string;
|
|
329
654
|
accountNumber: string;
|
|
330
655
|
}
|
|
656
|
+
/**
|
|
657
|
+
* @group Orders
|
|
658
|
+
*/
|
|
331
659
|
interface Individual extends CounterpartDetails {
|
|
332
660
|
firstName?: string;
|
|
333
661
|
lastName?: string;
|
|
334
662
|
address?: string;
|
|
335
663
|
}
|
|
664
|
+
/**
|
|
665
|
+
* @group Orders
|
|
666
|
+
*/
|
|
336
667
|
interface Corporation extends CounterpartDetails {
|
|
337
668
|
companyName: string;
|
|
338
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* @group Orders
|
|
672
|
+
*/
|
|
339
673
|
interface Issuer {
|
|
340
674
|
/** The sender name. This can be a corporate or an individual. */
|
|
341
675
|
name: string;
|
|
342
676
|
}
|
|
677
|
+
/**
|
|
678
|
+
* @group Orders
|
|
679
|
+
*/
|
|
343
680
|
interface Counterpart {
|
|
344
681
|
identifier: IBANIdentifier | SCANIdentifier | CrossChainIdentifier | BankAccountIdentifier;
|
|
345
682
|
details: Individual | Corporation | Issuer;
|
|
346
683
|
}
|
|
684
|
+
/**
|
|
685
|
+
* @group Orders
|
|
686
|
+
*/
|
|
347
687
|
interface CounterpartDetails {
|
|
348
688
|
name?: string;
|
|
349
689
|
bank?: CounterpartBank;
|
|
350
690
|
country?: string;
|
|
351
691
|
}
|
|
692
|
+
/**
|
|
693
|
+
* @group Orders
|
|
694
|
+
*/
|
|
352
695
|
interface CounterpartBank {
|
|
353
696
|
name?: string;
|
|
354
697
|
address?: string;
|
|
355
698
|
bic?: string;
|
|
356
699
|
}
|
|
700
|
+
/**
|
|
701
|
+
* @group Orders
|
|
702
|
+
*/
|
|
357
703
|
interface OrderMetadata {
|
|
358
704
|
placedAt: string;
|
|
359
705
|
processedAt?: string;
|
|
@@ -361,7 +707,10 @@ interface OrderMetadata {
|
|
|
361
707
|
txHashes?: string[];
|
|
362
708
|
supportingDocumentId?: string;
|
|
363
709
|
}
|
|
364
|
-
|
|
710
|
+
/**
|
|
711
|
+
* @group Orders
|
|
712
|
+
*/
|
|
713
|
+
interface OrderParams {
|
|
365
714
|
address?: string;
|
|
366
715
|
txHash?: string;
|
|
367
716
|
profile?: string;
|
|
@@ -369,6 +718,9 @@ interface OrderFilter {
|
|
|
369
718
|
accountId?: string;
|
|
370
719
|
state?: OrderState;
|
|
371
720
|
}
|
|
721
|
+
/**
|
|
722
|
+
* @group Orders
|
|
723
|
+
*/
|
|
372
724
|
interface Order {
|
|
373
725
|
id: string;
|
|
374
726
|
profile: string;
|
|
@@ -383,25 +735,20 @@ interface Order {
|
|
|
383
735
|
meta: OrderMetadata;
|
|
384
736
|
state: OrderState;
|
|
385
737
|
}
|
|
738
|
+
/**
|
|
739
|
+
* @group Orders
|
|
740
|
+
*/
|
|
386
741
|
interface OrdersResponse {
|
|
387
742
|
orders: Order[];
|
|
388
743
|
}
|
|
389
744
|
/**
|
|
390
|
-
*
|
|
745
|
+
* @group Orders
|
|
391
746
|
*/
|
|
392
|
-
interface
|
|
393
|
-
currency: Currency;
|
|
394
|
-
ticker: Ticker;
|
|
395
|
-
symbol: TokenSymbol;
|
|
396
|
-
chain: Chain;
|
|
397
|
-
/** The address of the EURe contract on this network */
|
|
398
|
-
address: string;
|
|
399
|
-
/** How many decimals this token supports */
|
|
400
|
-
decimals: number;
|
|
401
|
-
}
|
|
402
|
-
type NewOrder = NewOrderByAddress | NewOrderByAccountId;
|
|
403
|
-
interface NewOrderCommon {
|
|
747
|
+
interface PlaceOrderInput {
|
|
404
748
|
/** The unique identifier of the order */
|
|
749
|
+
address: string;
|
|
750
|
+
/** The senders network */
|
|
751
|
+
chain: Chain | ChainId;
|
|
405
752
|
id?: string;
|
|
406
753
|
amount: string;
|
|
407
754
|
signature: string;
|
|
@@ -411,20 +758,18 @@ interface NewOrderCommon {
|
|
|
411
758
|
memo?: string;
|
|
412
759
|
supportingDocumentId?: string;
|
|
413
760
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
chain: Chain | ChainId;
|
|
418
|
-
}
|
|
419
|
-
interface NewOrderByAccountId extends NewOrderCommon {
|
|
420
|
-
accountId: string;
|
|
421
|
-
}
|
|
761
|
+
/**
|
|
762
|
+
* @group Files
|
|
763
|
+
*/
|
|
422
764
|
interface SupportingDocMetadata {
|
|
423
765
|
uploadedBy: string;
|
|
424
766
|
createdAt: string;
|
|
425
767
|
updatedAt: string;
|
|
426
768
|
}
|
|
427
|
-
|
|
769
|
+
/**
|
|
770
|
+
* @group Files
|
|
771
|
+
*/
|
|
772
|
+
interface FilesResponse {
|
|
428
773
|
id: string;
|
|
429
774
|
name: string;
|
|
430
775
|
type: string;
|
|
@@ -432,7 +777,10 @@ interface SupportingDoc {
|
|
|
432
777
|
hash: string;
|
|
433
778
|
meta: SupportingDocMetadata;
|
|
434
779
|
}
|
|
435
|
-
|
|
780
|
+
/**
|
|
781
|
+
* @group Addresses
|
|
782
|
+
*/
|
|
783
|
+
interface LinkAddressInput {
|
|
436
784
|
/** Profile ID that owns the address. */
|
|
437
785
|
profile?: string;
|
|
438
786
|
/** The public key of the blockchain account. */
|
|
@@ -451,7 +799,10 @@ interface LinkAddress {
|
|
|
451
799
|
signature: string;
|
|
452
800
|
chain: Chain | ChainId;
|
|
453
801
|
}
|
|
454
|
-
|
|
802
|
+
/**
|
|
803
|
+
* @group Addresses
|
|
804
|
+
*/
|
|
805
|
+
interface LinkAddressResponse {
|
|
455
806
|
profile: string;
|
|
456
807
|
address: string;
|
|
457
808
|
state: string;
|
|
@@ -460,91 +811,79 @@ interface LinkedAddress {
|
|
|
460
811
|
linkedAt: string;
|
|
461
812
|
};
|
|
462
813
|
}
|
|
463
|
-
|
|
814
|
+
type LinkAddress = LinkAddressResponse;
|
|
815
|
+
/**
|
|
816
|
+
* @group IBANs
|
|
817
|
+
*/
|
|
818
|
+
type IBANState = 'requested' | 'approved' | 'pending' | 'rejected' | 'closed';
|
|
819
|
+
/**
|
|
820
|
+
* @group IBANs
|
|
821
|
+
*/
|
|
822
|
+
interface RequestIbanInput {
|
|
464
823
|
/** the address to request the IBAN. */
|
|
465
824
|
address: string;
|
|
466
825
|
/** the chain to request the IBAN. */
|
|
467
826
|
chain: Chain | ChainId;
|
|
468
827
|
/** payment email notifications sent to customers, `true` by default. */
|
|
469
|
-
emailNotifications
|
|
828
|
+
emailNotifications?: boolean;
|
|
470
829
|
}
|
|
471
|
-
|
|
830
|
+
/**
|
|
831
|
+
* @group IBANs
|
|
832
|
+
*/
|
|
833
|
+
interface IbansParams {
|
|
472
834
|
profile?: string;
|
|
473
835
|
chain?: Chain | ChainId;
|
|
474
836
|
}
|
|
837
|
+
/**
|
|
838
|
+
* @group IBANs
|
|
839
|
+
*/
|
|
475
840
|
interface IBAN {
|
|
841
|
+
/** The IBAN is a unique identifier for a bank account across different countries and includes a two-letter country code, two check digits, and a number of alphanumeric characters. It may include spaces for readability but should be stored without spaces. */
|
|
476
842
|
iban: string;
|
|
843
|
+
/** Bank Identifier Code (BIC) of the bank associated with this IBAN. */
|
|
477
844
|
bic: string;
|
|
845
|
+
/** The profile id that owns the IBAN */
|
|
478
846
|
profile: string;
|
|
847
|
+
/** The address that this IBAN is connected to */
|
|
479
848
|
address: string;
|
|
849
|
+
/** The chain that this IBAN is connected to */
|
|
480
850
|
chain: Chain;
|
|
481
|
-
|
|
851
|
+
name: string;
|
|
852
|
+
state: IBANState;
|
|
482
853
|
emailNotifications: boolean;
|
|
483
854
|
}
|
|
855
|
+
/**
|
|
856
|
+
* @group IBANs
|
|
857
|
+
*/
|
|
484
858
|
interface IBANsResponse {
|
|
485
859
|
ibans: IBAN[];
|
|
486
860
|
}
|
|
487
|
-
|
|
861
|
+
/**
|
|
862
|
+
* @group IBANs
|
|
863
|
+
*/
|
|
864
|
+
interface MoveIbanInput {
|
|
865
|
+
iban: string;
|
|
488
866
|
/** the address to move iban to */
|
|
489
867
|
address: string;
|
|
490
868
|
/** the chain to move iban to */
|
|
491
869
|
chain: Chain | ChainId;
|
|
492
870
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
type
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
} & BearerTokenCredentials;
|
|
501
|
-
interface AuthFlowOptionsShared {
|
|
502
|
-
/** the state oauth parameter */
|
|
503
|
-
state?: string;
|
|
504
|
-
}
|
|
505
|
-
interface AuthFlowOptions extends AuthFlowOptionsShared {
|
|
506
|
-
/** the email of the user to prefill the login form */
|
|
507
|
-
email?: string;
|
|
508
|
-
/** skip account creation in auth flow */
|
|
509
|
-
skipCreateAccount?: boolean;
|
|
510
|
-
/** skip KYC in auth flow */
|
|
511
|
-
skipKyc?: boolean;
|
|
512
|
-
/** the address your customer should link in auth flow */
|
|
513
|
-
address?: string;
|
|
514
|
-
/** the signature of the address */
|
|
515
|
-
signature?: string;
|
|
516
|
-
/** the chain of the address */
|
|
517
|
-
chain?: Chain | ChainId;
|
|
518
|
-
}
|
|
519
|
-
interface AuthFlowSIWEOptions extends AuthFlowOptionsShared {
|
|
520
|
-
/** Signature for the SIWE message. Must include the 0x prefix. */
|
|
521
|
-
signature: string;
|
|
522
|
-
/**
|
|
523
|
-
* An EIP-4361 compatible message. https://eips.ethereum.org/EIPS/eip-4361
|
|
524
|
-
*
|
|
525
|
-
* https://monerium.com/siwe
|
|
526
|
-
* */
|
|
527
|
-
message: string;
|
|
528
|
-
}
|
|
529
|
-
interface ClientCredentials {
|
|
530
|
-
clientId: string;
|
|
531
|
-
clientSecret: string;
|
|
532
|
-
}
|
|
533
|
-
interface AuthorizationCodeCredentials {
|
|
534
|
-
clientId: string;
|
|
535
|
-
redirectUri: string;
|
|
536
|
-
}
|
|
537
|
-
type BearerTokenCredentials = ClientCredentials | AuthorizationCodeCredentials;
|
|
538
|
-
type ResponseStatus = {
|
|
539
|
-
status: number;
|
|
540
|
-
statusText: string;
|
|
871
|
+
/**
|
|
872
|
+
* @group Primitives
|
|
873
|
+
* @internal
|
|
874
|
+
*/
|
|
875
|
+
type AcceptedResponse = {
|
|
876
|
+
code: 202;
|
|
877
|
+
status: 'Accepted';
|
|
541
878
|
};
|
|
542
879
|
/**
|
|
543
880
|
* Type of pending signature
|
|
881
|
+
* @group Signatures
|
|
544
882
|
*/
|
|
545
883
|
type PendingSignatureKind = 'linkAddress' | 'order';
|
|
546
884
|
/**
|
|
547
885
|
* Base interface for pending signatures
|
|
886
|
+
* @group Signatures
|
|
548
887
|
*/
|
|
549
888
|
interface PendingSignatureBase {
|
|
550
889
|
kind: PendingSignatureKind;
|
|
@@ -554,6 +893,7 @@ interface PendingSignatureBase {
|
|
|
554
893
|
}
|
|
555
894
|
/**
|
|
556
895
|
* Pending signature for an order
|
|
896
|
+
* @group Signatures
|
|
557
897
|
*/
|
|
558
898
|
interface PendingOrderSignature extends PendingSignatureBase {
|
|
559
899
|
id: string;
|
|
@@ -564,18 +904,21 @@ interface PendingOrderSignature extends PendingSignatureBase {
|
|
|
564
904
|
}
|
|
565
905
|
/**
|
|
566
906
|
* Pending signature for linking an address
|
|
907
|
+
* @group Signatures
|
|
567
908
|
*/
|
|
568
909
|
interface PendingLinkAddressSignature extends PendingSignatureBase {
|
|
569
910
|
kind: 'linkAddress';
|
|
570
911
|
}
|
|
571
912
|
/**
|
|
572
913
|
* Union type for all pending signature types
|
|
914
|
+
* @group Signatures
|
|
573
915
|
*/
|
|
574
916
|
type PendingSignature = PendingOrderSignature | PendingLinkAddressSignature;
|
|
575
917
|
/**
|
|
576
918
|
* Query parameters for fetching pending signatures
|
|
919
|
+
* @group Signatures
|
|
577
920
|
*/
|
|
578
|
-
interface
|
|
921
|
+
interface SignaturesParams {
|
|
579
922
|
/** Filter by blockchain address */
|
|
580
923
|
address?: string;
|
|
581
924
|
/** Filter by blockchain network */
|
|
@@ -587,6 +930,7 @@ interface SignaturesQueryParams {
|
|
|
587
930
|
}
|
|
588
931
|
/**
|
|
589
932
|
* Response from the signatures endpoint
|
|
933
|
+
* @group Signatures
|
|
590
934
|
*/
|
|
591
935
|
interface SignaturesResponse {
|
|
592
936
|
/** Array of pending signatures */
|
|
@@ -594,322 +938,453 @@ interface SignaturesResponse {
|
|
|
594
938
|
/** Total number of pending signatures */
|
|
595
939
|
total: number;
|
|
596
940
|
}
|
|
941
|
+
/**
|
|
942
|
+
* @group Webhooks
|
|
943
|
+
*/
|
|
944
|
+
type WebhookSubscriptionState = 'active' | 'inactive';
|
|
945
|
+
/**
|
|
946
|
+
* @group Webhooks
|
|
947
|
+
*/
|
|
948
|
+
type WebhookEventType = 'iban.updated' | 'order.created' | 'order.updated' | 'profile.updated';
|
|
949
|
+
/**
|
|
950
|
+
* @group Webhooks
|
|
951
|
+
*/
|
|
952
|
+
interface WebhookSubscription {
|
|
953
|
+
id: string;
|
|
954
|
+
url: string;
|
|
955
|
+
types: WebhookEventType[];
|
|
956
|
+
state: WebhookSubscriptionState;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* @group Webhooks
|
|
960
|
+
*/
|
|
961
|
+
interface WebhookSubscriptionsResponse {
|
|
962
|
+
subscriptions: WebhookSubscription[];
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* @group Webhooks
|
|
966
|
+
*/
|
|
967
|
+
interface CreateWebhookSubscriptionInput {
|
|
968
|
+
url: string;
|
|
969
|
+
secret: string;
|
|
970
|
+
types?: WebhookEventType[];
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* @group Webhooks
|
|
974
|
+
*/
|
|
975
|
+
interface UpdateWebhookSubscriptionInput {
|
|
976
|
+
subscription: string;
|
|
977
|
+
state?: WebhookSubscriptionState;
|
|
978
|
+
types?: WebhookEventType[];
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* @category Types
|
|
982
|
+
*/
|
|
983
|
+
interface BuildAuthorizationUrlOptions {
|
|
984
|
+
clientId: string;
|
|
985
|
+
redirectUri: string;
|
|
986
|
+
codeChallenge: string;
|
|
987
|
+
state?: string;
|
|
988
|
+
email?: string;
|
|
989
|
+
skipKyc?: boolean;
|
|
990
|
+
authMode?: 'login' | 'signup';
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* @category Types
|
|
994
|
+
*/
|
|
995
|
+
interface BuildSiweAuthorizationUrlOptions {
|
|
996
|
+
clientId: string;
|
|
997
|
+
redirectUri: string;
|
|
998
|
+
codeChallenge: string;
|
|
999
|
+
message: string;
|
|
1000
|
+
signature: string;
|
|
1001
|
+
state?: string;
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* @category Types
|
|
1005
|
+
*/
|
|
1006
|
+
interface AuthorizationCodeGrantOptions {
|
|
1007
|
+
clientId: string;
|
|
1008
|
+
redirectUri: string;
|
|
1009
|
+
code: string;
|
|
1010
|
+
codeVerifier: string;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* @category Types
|
|
1014
|
+
*/
|
|
1015
|
+
interface RefreshTokenGrantOptions {
|
|
1016
|
+
clientId: string;
|
|
1017
|
+
refreshToken: string;
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* @category Types
|
|
1021
|
+
*/
|
|
1022
|
+
interface ClientCredentialsGrantOptions {
|
|
1023
|
+
clientId: string;
|
|
1024
|
+
clientSecret: string;
|
|
1025
|
+
}
|
|
597
1026
|
|
|
598
1027
|
/**
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
* const monerium = new MoneriumClient() // defaults to `sandbox`
|
|
604
|
-
*
|
|
605
|
-
* // or
|
|
606
|
-
* new MoneriumClient('production')
|
|
607
|
-
*
|
|
608
|
-
* // or
|
|
609
|
-
* new MoneriumClient({
|
|
610
|
-
* environment: 'sandbox',
|
|
611
|
-
* clientId: 'your-client-id',
|
|
612
|
-
* redirectUri: 'http://your-redirect-url.com/monerium'
|
|
613
|
-
* });
|
|
614
|
-
*
|
|
615
|
-
*```
|
|
1028
|
+
* Get Environment configuration for the given environment. Defaults to 'sandbox' if not specified.
|
|
1029
|
+
* @param env - The target environment (`'sandbox'` or `'production'`). Defaults to `'sandbox'`.
|
|
1030
|
+
* @returns Environment configuration
|
|
616
1031
|
*/
|
|
617
|
-
declare
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
*
|
|
666
|
-
*/
|
|
667
|
-
siwe(params: AuthFlowSIWEOptions): Promise<void>;
|
|
1032
|
+
declare function getEnv(env?: ENV): Environment;
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* @group Client
|
|
1036
|
+
* @category Types
|
|
1037
|
+
*/
|
|
1038
|
+
type TransportRequest = {
|
|
1039
|
+
method: string;
|
|
1040
|
+
url: string;
|
|
1041
|
+
headers: Record<string, string>;
|
|
1042
|
+
body?: BodyInit | string;
|
|
1043
|
+
signal?: AbortSignal;
|
|
1044
|
+
};
|
|
1045
|
+
/**
|
|
1046
|
+
* @group Client
|
|
1047
|
+
* @category Types
|
|
1048
|
+
*/
|
|
1049
|
+
type TransportResponse = {
|
|
1050
|
+
status: number;
|
|
1051
|
+
headers?: Record<string, string>;
|
|
1052
|
+
bodyText: string;
|
|
1053
|
+
};
|
|
1054
|
+
/**
|
|
1055
|
+
* Replaces the internal `fetch` call. Headers (`Authorization`, `Content-Type`,
|
|
1056
|
+
* `Accept`) are pre-populated. Must return a `Promise` resolving with the raw
|
|
1057
|
+
* response `status` and `bodyText`. Throw on network-level failures.
|
|
1058
|
+
* The SDK owns JSON parsing and error normalisation.
|
|
1059
|
+
* @group Client
|
|
1060
|
+
* @category Types
|
|
1061
|
+
*/
|
|
1062
|
+
type Transport = (request: TransportRequest) => Promise<TransportResponse>;
|
|
1063
|
+
|
|
1064
|
+
interface MoneriumApiClientOptions {
|
|
1065
|
+
environment?: ENV;
|
|
1066
|
+
getAccessToken: () => Promise<string | undefined> | string | undefined;
|
|
1067
|
+
transport?: Transport;
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* Base abstract client containing the shared configuration and request logic.
|
|
1071
|
+
*/
|
|
1072
|
+
declare abstract class MoneriumBaseClient {
|
|
1073
|
+
protected options: MoneriumApiClientOptions;
|
|
1074
|
+
protected env: ReturnType<typeof getEnv>;
|
|
1075
|
+
protected transport: Transport;
|
|
1076
|
+
constructor(options: MoneriumApiClientOptions);
|
|
1077
|
+
protected getToken(): Promise<string | undefined>;
|
|
1078
|
+
protected request<T>(method: string, path: string, body?: unknown, contentType?: string): Promise<T>;
|
|
1079
|
+
protected requestFormData<T>(method: string, path: string, form: FormData): Promise<T>;
|
|
668
1080
|
/**
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
* @group Authentication
|
|
1081
|
+
* Get the current auth context.
|
|
672
1082
|
*
|
|
673
|
-
* @param {string} refreshToken - provide the refresh token to get a new access token
|
|
674
|
-
*
|
|
675
|
-
* @returns boolean to indicate if access has been granted
|
|
676
|
-
*
|
|
677
|
-
* @example
|
|
678
|
-
* ```ts
|
|
679
|
-
* import { MoneriumClient } from '@monerium/sdk';
|
|
680
|
-
* // Initialize the client with credentials
|
|
681
|
-
* const monerium = new MoneriumClient({
|
|
682
|
-
* environment: 'sandbox',
|
|
683
|
-
* clientId: 'your_client_credentials_uuid', // replace with your client ID
|
|
684
|
-
* clientSecret: 'your_client_secret', // replace with your client secret
|
|
685
|
-
* });
|
|
686
|
-
*
|
|
687
|
-
* await monerium.getAccess();
|
|
688
|
-
*
|
|
689
|
-
* const refreshToken = monerium.bearerProfile?.refresh_token;
|
|
690
|
-
*
|
|
691
|
-
* // TODO: store the refresh token securely
|
|
692
|
-
*
|
|
693
|
-
* // reconnect...
|
|
694
|
-
* await monerium.getAccess(refreshToken);
|
|
695
|
-
* ```
|
|
696
|
-
*/
|
|
697
|
-
getAccess(refreshToken?: string): Promise<boolean>;
|
|
698
|
-
/**
|
|
699
|
-
* @group Authentication
|
|
700
1083
|
* @see {@link https://docs.monerium.com/api#tag/auth/operation/auth-context | API Documentation}
|
|
701
1084
|
*/
|
|
702
1085
|
getAuthContext(): Promise<AuthContext>;
|
|
703
1086
|
/**
|
|
704
|
-
*
|
|
705
|
-
*
|
|
1087
|
+
* Get a profile by its id.
|
|
1088
|
+
*
|
|
1089
|
+
* @param profileId - The id of the profile to fetch.
|
|
706
1090
|
* @see {@link https://docs.monerium.com/api#tag/profiles/operation/profile | API Documentation}
|
|
707
1091
|
*/
|
|
708
|
-
getProfile(
|
|
1092
|
+
getProfile(profileId: string): Promise<Profile>;
|
|
709
1093
|
/**
|
|
710
|
-
*
|
|
1094
|
+
* Get all profiles.
|
|
1095
|
+
*
|
|
711
1096
|
* @see {@link https://docs.monerium.com/api#tag/profiles/operation/profiles | API Documentation}
|
|
712
1097
|
*/
|
|
713
|
-
getProfiles(params?:
|
|
1098
|
+
getProfiles(params?: GetProfilesParams): Promise<ProfilesResponse>;
|
|
714
1099
|
/**
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
*
|
|
718
|
-
* @group Addresses
|
|
719
|
-
* @param {string} address - The public key of the blockchain account.
|
|
1100
|
+
* Get details for a single address after it has been linked to Monerium.
|
|
1101
|
+
* @param address - The public key of the blockchain account.
|
|
720
1102
|
*
|
|
721
1103
|
* @see {@link https://docs.monerium.com/api#tag/addresses/operation/address | API Documentation}
|
|
722
|
-
*
|
|
723
|
-
* @example
|
|
724
|
-
* ```ts
|
|
725
|
-
* monerium.getAddress('0x1234567890abcdef1234567890abcdef12345678')
|
|
726
|
-
* ```
|
|
727
1104
|
*/
|
|
728
1105
|
getAddress(address: string): Promise<Address>;
|
|
729
1106
|
/**
|
|
730
|
-
*
|
|
731
|
-
*
|
|
1107
|
+
* Get a list of all addresses linked to the profile.
|
|
1108
|
+
*
|
|
732
1109
|
* @see {@link https://docs.monerium.com/api#tag/addresses/operation/addresses | API Documentation}
|
|
733
1110
|
*/
|
|
734
1111
|
getAddresses(params?: AddressesQueryParams): Promise<AddressesResponse>;
|
|
735
1112
|
/**
|
|
736
|
-
*
|
|
737
|
-
*
|
|
1113
|
+
* Add a new address to the profile.
|
|
1114
|
+
*
|
|
1115
|
+
* @see {@link https://docs.monerium.com/api#tag/addresses/operation/link-address | API Documentation}
|
|
1116
|
+
* @returns {LinkAddressResponse | AcceptedResponse} - The address was linked successfully or an accepted response if the address is being processed asynchronously.
|
|
1117
|
+
*/
|
|
1118
|
+
linkAddress(body: LinkAddressInput): Promise<LinkAddressResponse | AcceptedResponse>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Get the balances for a given address on a specific chain.
|
|
1121
|
+
*
|
|
1122
|
+
* @see {@link https://docs.monerium.com/api#tag/addresses/operation/balances | API Documentation}
|
|
738
1123
|
*/
|
|
739
|
-
getBalances(
|
|
1124
|
+
getBalances(params: GetBalancesParams): Promise<Balances>;
|
|
740
1125
|
/**
|
|
741
|
-
* Fetch details about a single IBAN
|
|
1126
|
+
* Fetch details about a single IBAN.
|
|
1127
|
+
* @param iban - The IBAN to fetch.
|
|
742
1128
|
*
|
|
743
|
-
* @group IBANs
|
|
744
|
-
* @param {string} iban - the IBAN to fetch.
|
|
745
1129
|
* @see {@link https://docs.monerium.com/api#tag/ibans/operation/iban | API Documentation}
|
|
746
1130
|
*/
|
|
747
1131
|
getIban(iban: string): Promise<IBAN>;
|
|
748
1132
|
/**
|
|
749
|
-
* Fetch all IBANs for the profile
|
|
750
|
-
*
|
|
1133
|
+
* Fetch all IBANs for the profile.
|
|
1134
|
+
*
|
|
751
1135
|
* @see {@link https://docs.monerium.com/api#tag/ibans/operation/ibans | API Documentation}
|
|
752
1136
|
*/
|
|
753
|
-
getIbans(
|
|
1137
|
+
getIbans(params?: IbansParams): Promise<IBANsResponse>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Request an IBAN for the profile.
|
|
1140
|
+
*
|
|
1141
|
+
* @see {@link https://docs.monerium.com/api#tag/ibans/operation/request-iban | API Documentation}
|
|
1142
|
+
*/
|
|
1143
|
+
requestIban(input: RequestIbanInput): Promise<AcceptedResponse>;
|
|
754
1144
|
/**
|
|
755
|
-
*
|
|
756
|
-
*
|
|
1145
|
+
* Move an IBAN to a different address and chain.
|
|
1146
|
+
*
|
|
1147
|
+
* @see {@link https://docs.monerium.com/api#tag/ibans/operation/move-iban | API Documentation}
|
|
757
1148
|
*/
|
|
758
|
-
|
|
1149
|
+
moveIban(input: MoveIbanInput): Promise<AcceptedResponse>;
|
|
759
1150
|
/**
|
|
760
|
-
*
|
|
761
|
-
*
|
|
1151
|
+
* Get an order by its ID.
|
|
1152
|
+
*
|
|
1153
|
+
* @see {@link https://docs.monerium.com/api/#tag/orders/operation/order | API Documentation}
|
|
762
1154
|
*/
|
|
763
1155
|
getOrder(orderId: string): Promise<Order>;
|
|
764
1156
|
/**
|
|
765
|
-
*
|
|
1157
|
+
* Get a list of orders.
|
|
1158
|
+
*
|
|
1159
|
+
* @see {@link https://docs.monerium.com/api/#tag/orders/operation/orders | API Documentation}
|
|
1160
|
+
*/
|
|
1161
|
+
getOrders(params?: OrderParams): Promise<OrdersResponse>;
|
|
1162
|
+
/**
|
|
1163
|
+
* Place a new order.
|
|
1164
|
+
*
|
|
1165
|
+
* **Note:** For multi-signature orders, the API returns a 202 Accepted response
|
|
1166
|
+
* with `{ status: 202, statusText: "Accepted" }` instead of the full Order object.
|
|
1167
|
+
*
|
|
1168
|
+
* @returns `Order` for regular orders; `AcceptedResponse` for multi-sig orders.
|
|
1169
|
+
* @see {@link https://docs.monerium.com/api#tag/orders/operation/post-orders | API Documentation}
|
|
1170
|
+
*/
|
|
1171
|
+
placeOrder(input: PlaceOrderInput): Promise<Order | AcceptedResponse>;
|
|
1172
|
+
/**
|
|
1173
|
+
* Get Monerium tokens with contract addresses and chain details.
|
|
1174
|
+
*
|
|
766
1175
|
* @see {@link https://docs.monerium.com/api#tag/tokens | API Documentation}
|
|
767
1176
|
*/
|
|
768
1177
|
getTokens(): Promise<Token[]>;
|
|
769
1178
|
/**
|
|
770
1179
|
* Get pending signatures for the authenticated user.
|
|
771
1180
|
*
|
|
772
|
-
* Returns pending signatures that require user action, such as order signatures
|
|
773
|
-
* or link address signatures. Accepts filtering by address, chain, kind, and profile.
|
|
774
|
-
*
|
|
775
|
-
* @group Signatures
|
|
776
|
-
* @param {SignaturesQueryParams} [params] - Optional query parameters to filter signatures
|
|
777
1181
|
* @see {@link https://docs.monerium.com/api#tag/signatures/operation/get-signatures | API Documentation}
|
|
1182
|
+
*/
|
|
1183
|
+
getSignatures(params?: SignaturesParams): Promise<SignaturesResponse>;
|
|
1184
|
+
/**
|
|
1185
|
+
* Upload a supporting document for KYC onboarding or order support using `multipart/form-data`.
|
|
778
1186
|
*
|
|
779
|
-
* @
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
*
|
|
784
|
-
*
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
* // Get pending signatures on a specific chain
|
|
791
|
-
* const polygonSignatures = await monerium.getSignatures({
|
|
792
|
-
* chain: 'polygon'
|
|
793
|
-
* });
|
|
794
|
-
* ```
|
|
795
|
-
*/
|
|
796
|
-
getSignatures(params?: SignaturesQueryParams): Promise<SignaturesResponse>;
|
|
797
|
-
/**
|
|
798
|
-
* Add a new address to the profile
|
|
799
|
-
* @group Addresses
|
|
800
|
-
* @see {@link https://docs.monerium.com/api#tag/addresses/operation/link-address | API Documentation}
|
|
1187
|
+
* Accepts binary data in multiple formats and normalizes it to a {@link Blob}
|
|
1188
|
+
* internally before sending the request.
|
|
1189
|
+
*
|
|
1190
|
+
* @param file - The document to upload. Can be a {@link Blob}, {@link Uint8Array}, or {@link ArrayBuffer}.
|
|
1191
|
+
* @param filename - Optional filename to associate with the uploaded file.
|
|
1192
|
+
* If not provided, a default name will be inferred when possible, otherwise `"document"` is used.
|
|
1193
|
+
* @see {@link https://docs.monerium.com/api/#tag/files | API Documentation}
|
|
1194
|
+
* @remarks
|
|
1195
|
+
* This method constructs a {@link FormData} payload internally and sends it to the `POST /files` endpoint.
|
|
1196
|
+
* Consumers do not need to manually create or manage multipart form data.
|
|
801
1197
|
*/
|
|
802
|
-
|
|
1198
|
+
uploadSupportingDocument(file: Blob | Uint8Array | ArrayBuffer, filename?: string): Promise<FilesResponse>;
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* Server-side client containing operations that require client secrets.
|
|
1202
|
+
* Must never be used in a browser context.
|
|
1203
|
+
*/
|
|
1204
|
+
declare abstract class MoneriumServerClient extends MoneriumBaseClient {
|
|
803
1205
|
/**
|
|
804
|
-
*
|
|
1206
|
+
* Get an access token using client credentials. Server-side only.
|
|
1207
|
+
* clientSecret must never be used in a browser context.
|
|
805
1208
|
*
|
|
806
|
-
|
|
807
|
-
|
|
1209
|
+
*/
|
|
1210
|
+
clientCredentialsGrant(clientId: string, clientSecret: string): Promise<BearerProfile>;
|
|
1211
|
+
/**
|
|
1212
|
+
* List all webhook subscriptions for the authenticated user.
|
|
808
1213
|
*
|
|
809
|
-
* @
|
|
810
|
-
|
|
811
|
-
|
|
1214
|
+
* @see {@link https://docs.monerium.com/api#tag/webhooks/operation/list-subscriptions | API Documentation}
|
|
1215
|
+
*/
|
|
1216
|
+
getSubscriptions(): Promise<WebhookSubscriptionsResponse>;
|
|
1217
|
+
/**
|
|
1218
|
+
* Create webhook subscription.
|
|
812
1219
|
*
|
|
813
|
-
* @see {@link https://docs.monerium.com/api#tag/
|
|
1220
|
+
* @see {@link https://docs.monerium.com/api#tag/webhooks/operation/create-subscription | API Documentation}
|
|
1221
|
+
*/
|
|
1222
|
+
createSubscription(input: CreateWebhookSubscriptionInput): Promise<WebhookSubscription>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Update an existing webhook subscription.
|
|
814
1225
|
*
|
|
815
|
-
* @
|
|
1226
|
+
* @see {@link https://docs.monerium.com/api#tag/webhooks/operation/update-subscription | API Documentation}
|
|
816
1227
|
*/
|
|
817
|
-
|
|
1228
|
+
updateSubscription(input: UpdateWebhookSubscriptionInput): Promise<WebhookSubscription>;
|
|
1229
|
+
}
|
|
1230
|
+
declare class MoneriumPrivateClient extends MoneriumServerClient {
|
|
1231
|
+
}
|
|
1232
|
+
declare class MoneriumOAuthClient extends MoneriumBaseClient {
|
|
818
1233
|
/**
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
* @see {@link https://docs.monerium.com/api#tag/ibans/operation/move-iban | API Documentation}
|
|
1234
|
+
* Build the authorization redirect URL.
|
|
1235
|
+
* Returns a URL string — the caller navigates to it.
|
|
1236
|
+
* The SDK does not redirect.
|
|
823
1237
|
*/
|
|
824
|
-
|
|
1238
|
+
buildAuthorizationUrl(options: Omit<BuildAuthorizationUrlOptions, 'environment'>): string;
|
|
825
1239
|
/**
|
|
826
|
-
*
|
|
827
|
-
*
|
|
828
|
-
*
|
|
1240
|
+
* Build the SIWE authorization redirect URL.
|
|
1241
|
+
* Returns a URL string — the caller navigates to it.
|
|
1242
|
+
* The SDK does not redirect.
|
|
1243
|
+
*
|
|
1244
|
+
*/
|
|
1245
|
+
buildSiweAuthorizationUrl(options: Omit<BuildSiweAuthorizationUrlOptions, 'environment'>): string;
|
|
1246
|
+
/**
|
|
1247
|
+
* Exchange an authorization code for tokens.
|
|
1248
|
+
* The caller stores the returned BearerProfile — the SDK does not write to any storage.
|
|
1249
|
+
*
|
|
829
1250
|
*/
|
|
830
|
-
|
|
1251
|
+
authorizationCodeGrant(options: Omit<AuthorizationCodeGrantOptions, 'environment' | 'transport'>): Promise<BearerProfile>;
|
|
831
1252
|
/**
|
|
832
|
-
*
|
|
833
|
-
*
|
|
1253
|
+
* Get a new access token using a refresh token.
|
|
1254
|
+
* The caller stores the returned BearerProfile — the SDK does not write to any storage.
|
|
834
1255
|
*/
|
|
835
|
-
|
|
1256
|
+
refreshTokenGrant(options: Omit<RefreshTokenGrantOptions, 'environment' | 'transport'>): Promise<BearerProfile>;
|
|
836
1257
|
/**
|
|
837
|
-
*
|
|
838
|
-
*
|
|
1258
|
+
* Parse a callback URL or query string into structured fields.
|
|
1259
|
+
*
|
|
1260
|
+
* - Returns an empty object if none of the expected parameters are present.
|
|
1261
|
+
* - Check for the presence of `code` or `error` to determine if the URL
|
|
1262
|
+
* contains an OAuth2 authorization response.
|
|
1263
|
+
*
|
|
1264
|
+
* @example
|
|
1265
|
+
* const { code, error } = client.parseAuthorizationResponse(req.url);
|
|
1266
|
+
* const { code, error } = client.parseAuthorizationResponse('?code=abc&state=xyz');
|
|
839
1267
|
*/
|
|
840
|
-
|
|
1268
|
+
parseAuthorizationResponse(input: string): ParsedAuthorizationResponse;
|
|
1269
|
+
}
|
|
1270
|
+
declare class MoneriumWhitelabelClient extends MoneriumServerClient {
|
|
841
1271
|
/**
|
|
842
|
-
*
|
|
1272
|
+
* Creates a new profile.
|
|
843
1273
|
*
|
|
844
|
-
* @
|
|
845
|
-
* @param {OrderNotificationQueryParams} [params]
|
|
846
|
-
* @see {@link https://docs.monerium.com/api#tag/orders/operation/orders-notifications | API Document - Websocket}
|
|
847
|
-
|
|
1274
|
+
* @see {@link https://docs.monerium.com/api#tag/profiles/operation/create-profile | API Documentation}
|
|
848
1275
|
*/
|
|
849
|
-
|
|
850
|
-
/** specify which type of orders to listen to */
|
|
851
|
-
filter?: OrderNotificationQueryParams;
|
|
852
|
-
onMessage?: (data: Order) => void;
|
|
853
|
-
onError?: (err: Event) => void;
|
|
854
|
-
}): WebSocket | undefined;
|
|
1276
|
+
createProfile(input: CreateProfileInput): Promise<Profile>;
|
|
855
1277
|
/**
|
|
856
|
-
*
|
|
1278
|
+
* Share KYC data
|
|
857
1279
|
*
|
|
858
|
-
* @
|
|
859
|
-
* @
|
|
860
|
-
*
|
|
1280
|
+
* @returns {Promise<AcceptedResponse>} The KYC data import has been initiated. Subscribe to `profile.update` webhook to monitor the progress.
|
|
1281
|
+
* @see {@link https://docs.monerium.com/api#tag/profiles/operation/share-profile-kyc | API Documentation}
|
|
1282
|
+
*
|
|
1283
|
+
* @ignore NOT YET LIVE
|
|
861
1284
|
*/
|
|
862
|
-
|
|
1285
|
+
shareProfileKYC(input: ShareProfileKYCInput): Promise<AcceptedResponse>;
|
|
863
1286
|
/**
|
|
864
|
-
*
|
|
1287
|
+
* Submit the compliance details for a profile. Updates only the `details` section without affecting other sections.
|
|
1288
|
+
*
|
|
1289
|
+
* > **KYC reliance model only.** Most integrations should use `shareProfileKYC()` to populate details via Sumsub instead.
|
|
865
1290
|
*
|
|
866
|
-
* @
|
|
1291
|
+
* @see {@link https://docs.monerium.com/api#tag/profiles/operation/patch-profile-details | API Documentation}
|
|
1292
|
+
* @returns {Promise<AcceptedResponse>} The applicant details have been received and will be processed by Monerium.
|
|
867
1293
|
*/
|
|
868
|
-
|
|
1294
|
+
updateProfileDetails(input: UpdateProfileDetailsInput): Promise<AcceptedResponse>;
|
|
869
1295
|
/**
|
|
870
|
-
*
|
|
1296
|
+
* Submit additional data for a profile used for risk calculations (e.g. purpose of account, source of funds). Updates only the `form` section without affecting other sections.
|
|
871
1297
|
*
|
|
872
|
-
* @
|
|
1298
|
+
* @see {@link https://docs.monerium.com/api#tag/profiles/operation/patch-profile-form | API Documentation}
|
|
1299
|
+
* @returns {Promise<AcceptedResponse>} The profile form has been received and will be processed by Monerium.
|
|
873
1300
|
*/
|
|
874
|
-
|
|
1301
|
+
updateProfileForm(input: UpdateProfileFormInput): Promise<AcceptedResponse>;
|
|
875
1302
|
/**
|
|
1303
|
+
* Submit verifications for a profile. Only the verifications provided are updated. `sourceOfFunds` is submitted here by all partners when required; other verification kinds are populated automatically when using the Sumsub share flow.
|
|
876
1304
|
*
|
|
877
|
-
* @
|
|
1305
|
+
* @see {@link https://docs.monerium.com/api#tag/profiles/operation/patch-profile-verifications | API Documentation}
|
|
1306
|
+
* @returns {Promise<AcceptedResponse>} The verification data has been received and will be processed by Monerium.
|
|
878
1307
|
*/
|
|
879
|
-
|
|
1308
|
+
updateProfileVerifications(input: UpdateProfileVerificationsInput): Promise<AcceptedResponse>;
|
|
880
1309
|
}
|
|
881
1310
|
|
|
1311
|
+
/**
|
|
1312
|
+
* Thrown when the Monerium API returns a non-2xx response.
|
|
1313
|
+
* Fields map directly to the API response body — nothing is translated or normalised.
|
|
1314
|
+
*
|
|
1315
|
+
* @example
|
|
1316
|
+
* try {
|
|
1317
|
+
* await client.getProfiles();
|
|
1318
|
+
* } catch (err) {
|
|
1319
|
+
* if (err instanceof MoneriumApiError) {
|
|
1320
|
+
* console.log(err.code); // 401
|
|
1321
|
+
* console.log(err.status); // "Unauthorized"
|
|
1322
|
+
* console.log(err.message); // "Not authenticated"
|
|
1323
|
+
* console.log(err.errors); // field-level validation errors, if present
|
|
1324
|
+
* }
|
|
1325
|
+
* }
|
|
1326
|
+
* @group Errors
|
|
1327
|
+
*/
|
|
1328
|
+
declare class MoneriumApiError extends Error {
|
|
1329
|
+
code: number;
|
|
1330
|
+
status: string;
|
|
1331
|
+
errors?: Record<string, string>;
|
|
1332
|
+
details?: unknown;
|
|
1333
|
+
constructor(body: {
|
|
1334
|
+
code: number;
|
|
1335
|
+
status: string;
|
|
1336
|
+
message: string;
|
|
1337
|
+
errors?: Record<string, string>;
|
|
1338
|
+
details?: unknown;
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
* @group Errors
|
|
1343
|
+
*/
|
|
1344
|
+
type MoneriumSdkErrorType = 'network_error' | 'authentication_required' | 'invalid_configuration';
|
|
1345
|
+
/**
|
|
1346
|
+
* Thrown for SDK-level failures — no HTTP response involved.
|
|
1347
|
+
*
|
|
1348
|
+
* @example
|
|
1349
|
+
* try {
|
|
1350
|
+
* await client.getProfiles();
|
|
1351
|
+
* } catch (err) {
|
|
1352
|
+
* if (err instanceof MoneriumSdkError) {
|
|
1353
|
+
* console.log(err.type); // 'network_error' | 'authentication_required' | ...
|
|
1354
|
+
* console.log(err.cause); // underlying fetch error, if type === 'network_error'
|
|
1355
|
+
* }
|
|
1356
|
+
* }
|
|
1357
|
+
* @group Errors
|
|
1358
|
+
*/
|
|
1359
|
+
declare class MoneriumSdkError extends Error {
|
|
1360
|
+
type: MoneriumSdkErrorType;
|
|
1361
|
+
cause?: unknown;
|
|
1362
|
+
constructor(type: MoneriumSdkErrorType, message: string, cause?: unknown);
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* @group Utilities
|
|
1367
|
+
*/
|
|
882
1368
|
declare const _default: {
|
|
883
1369
|
/**
|
|
884
1370
|
* The message used to link addresses.
|
|
885
1371
|
*/
|
|
886
1372
|
LINK_MESSAGE: string;
|
|
887
|
-
/**
|
|
888
|
-
* The key used to store the code verifier in the local storage.
|
|
889
|
-
*/
|
|
890
|
-
STORAGE_CODE_VERIFIER: string;
|
|
891
|
-
/**
|
|
892
|
-
* The key used to store the access token in the local storage.
|
|
893
|
-
*/
|
|
894
|
-
STORAGE_ACCESS_TOKEN: string;
|
|
895
|
-
/**
|
|
896
|
-
* The unix timestamp used to calculate the expiration time of the access token.
|
|
897
|
-
*/
|
|
898
|
-
STORAGE_ACCESS_EXPIRY: string;
|
|
899
1373
|
};
|
|
900
1374
|
|
|
901
1375
|
/**
|
|
902
|
-
*
|
|
903
1376
|
* @param d Date to be formatted
|
|
904
1377
|
* @returns RFC3339 date format.
|
|
905
1378
|
* @example 2023-04-30T12:00:00+01:00
|
|
906
1379
|
* @example 2023-04-30T02:08:15Z
|
|
1380
|
+
* @group Utilities
|
|
907
1381
|
*/
|
|
908
1382
|
declare const rfc3339: (d: Date) => string;
|
|
909
1383
|
/**
|
|
910
1384
|
* This will resolve the chainId number to the corresponding chain name.
|
|
911
1385
|
* @param chain The chainId of the network
|
|
912
1386
|
* @returns chain name, 'ethereum', 'polygon', 'gnosis', etc.
|
|
1387
|
+
* @group Utilities
|
|
913
1388
|
*/
|
|
914
1389
|
declare const parseChain: (chain: Chain | ChainId) => Chain;
|
|
915
1390
|
/**
|
|
@@ -931,10 +1406,13 @@ declare const parseChain: (chain: Chain | ChainId) => Chain;
|
|
|
931
1406
|
* @example `Send EUR 1 to 0x1234123412341234123412341234123412341234 on ethereum at 2023-04-30T12:00:00+01:00`
|
|
932
1407
|
*
|
|
933
1408
|
* @example `Send EUR 1 to IS1234123412341234 at 2023-04-30T12:00:00+01:00`
|
|
1409
|
+
* @group Utilities
|
|
934
1410
|
*/
|
|
935
1411
|
declare const placeOrderMessage: (amount: string | number, currency: Currency, receiver: string, chain?: ChainId | Chain) => string;
|
|
936
1412
|
/**
|
|
937
|
-
*
|
|
1413
|
+
* Construct an EIP-4361 SIWE message for use with {@link buildSiweAuthorizationUrl}.
|
|
1414
|
+
* @see https://monerium.com/siwe
|
|
1415
|
+
* @group Utilities
|
|
938
1416
|
*/
|
|
939
1417
|
declare const siweMessage: ({ domain, address, appName, redirectUri, chainId, issuedAt, expiryAt, privacyPolicyUrl, termsOfServiceUrl, }: {
|
|
940
1418
|
domain: string;
|
|
@@ -962,44 +1440,18 @@ declare const siweMessage: ({ domain, address, appName, redirectUri, chainId, is
|
|
|
962
1440
|
* getChain(137) // 'polygon'
|
|
963
1441
|
* getChain(80002) // 'amoy'
|
|
964
1442
|
* ```
|
|
1443
|
+
* @group Utilities
|
|
965
1444
|
*/
|
|
966
1445
|
declare const getChain: (chainId: number) => Chain;
|
|
1446
|
+
/**
|
|
1447
|
+
* Shorten an IBAN for display: `GB29...2917`
|
|
1448
|
+
* @group Utilities
|
|
1449
|
+
*/
|
|
967
1450
|
declare const shortenIban: (iban?: string) => string | undefined;
|
|
968
|
-
declare const shortenAddress: (address?: string) => string | undefined;
|
|
969
|
-
|
|
970
1451
|
/**
|
|
971
|
-
*
|
|
972
|
-
*
|
|
973
|
-
*
|
|
974
|
-
*
|
|
975
|
-
* ## Installation
|
|
976
|
-
*
|
|
977
|
-
* ```bash
|
|
978
|
-
* pnpm add @monerium/sdk
|
|
979
|
-
* ```
|
|
980
|
-
*
|
|
981
|
-
* @example
|
|
982
|
-
* ```tsx
|
|
983
|
-
* import { MoneriumClient } from '@monerium/sdk';
|
|
984
|
-
*
|
|
985
|
-
* const monerium = new MoneriumClient({
|
|
986
|
-
* clientId: '...',
|
|
987
|
-
* redirectUri: '...',
|
|
988
|
-
* environment: 'sandbox',
|
|
989
|
-
* })
|
|
990
|
-
*
|
|
991
|
-
* // Will redirect the user to Monerium's authentication code flow.
|
|
992
|
-
* await monerium.authorize();
|
|
993
|
-
*
|
|
994
|
-
* // Will use the authorization code flow code to get access token
|
|
995
|
-
* await monerium.getAccess();
|
|
996
|
-
*
|
|
997
|
-
* // or use refresh token to get access token if provided.
|
|
998
|
-
* await monerium.getAccess(refreshToken);
|
|
999
|
-
*
|
|
1000
|
-
* // Retrieve profiles the client has access to.
|
|
1001
|
-
* await monerium.getProfiles();
|
|
1002
|
-
* ```
|
|
1452
|
+
* Shorten a blockchain address for display: `0x1234...abcd`
|
|
1453
|
+
* @group Utilities
|
|
1003
1454
|
*/
|
|
1455
|
+
declare const shortenAddress: (address?: string) => string | undefined;
|
|
1004
1456
|
|
|
1005
|
-
export {
|
|
1457
|
+
export { type AcceptedResponse, type Address, type AddressesQueryParams, type AddressesResponse, type AuthContext, type AuthorizationCodeGrantOptions, type Balances, type BankAccountIdentifier, type BearerProfile, type Beneficiary, type BuildAuthorizationUrlOptions, type BuildSiweAuthorizationUrlOptions, type Chain, type ChainId, type ClientCredentialsGrantOptions, type Config, type CorporateProfileDetails, type CorporateProfileForm, type CorporateProfileVerification, type CorporateVerificationKind, type Corporation, type Counterpart, type CounterpartBank, type CounterpartDetails, type CreateProfileInput, type CreateWebhookSubscriptionInput, type CrossChainIdentifier, Currency, type CurrencyBalance, type CurrencyCode, type Director, type ENV, type Environment, type Fee, type FilesResponse, type GetBalancesParams, type GetProfilesParams, type IBAN, type IBANIdentifier, type IBANState, type IBANsResponse, type IbansParams, type IdDocumentKind, type Identifier, type Individual, type Issuer, type KYCProvider, type LinkAddress, type LinkAddressInput, type LinkAddressResponse, type Method, type MoneriumApiClientOptions, MoneriumApiError, MoneriumBaseClient, MoneriumOAuthClient, MoneriumPrivateClient, MoneriumSdkError, type MoneriumSdkErrorType, MoneriumServerClient, MoneriumWhitelabelClient, type MoveIbanInput, type Order, type OrderKind, type OrderMetadata, type OrderParams, type OrderState, type OrdersResponse, type ParsedAuthorizationResponse, type PaymentStandard, type PendingLinkAddressSignature, type PendingOrderSignature, type PendingSignature, type PendingSignatureKind, type Permission, type PersonalProfileDetails, type PersonalProfileForm, type PersonalProfileVerification, type PersonalVerificationKind, type PlaceOrderInput, type ProductionChain, type Profile, type ProfileDetailsState, type ProfileFormState, type ProfileKind, type ProfileState, ProfileType, type ProfileVerificationState, type ProfilesResponse, type RefreshTokenGrantOptions, type Representative, type RequestIbanInput, type SCANIdentifier, type SandboxChain, type ShareProfileKYCInput, type SignaturesParams, type SignaturesResponse, type SupportingDocMetadata, type Ticker, type Token, type TokenSymbol, type Transport, type TransportRequest, type TransportResponse, type UpdateProfileDetailsInput, type UpdateProfileFormInput, type UpdateProfileVerificationsInput, type UpdateWebhookSubscriptionInput, type WebhookEventType, type WebhookSubscription, type WebhookSubscriptionState, type WebhookSubscriptionsResponse, calculatePKCECodeChallenge, _default as constants, generatePKCE, getChain, parseAuthorizationResponse, parseChain, placeOrderMessage, randomPKCECodeVerifier, rfc3339, shortenAddress, shortenIban, siweMessage };
|