@coinlist-co/react 0.12.2-rc.7b430dd → 0.12.2-rc.818bed6
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/dist/{chunk-DCW7NQXH.js → chunk-2HCSM3FB.js} +52 -19
- package/dist/chunk-2HCSM3FB.js.map +1 -0
- package/dist/{chunk-VH34YC3Q.js → chunk-OUFI3D3Q.js} +84 -4
- package/dist/chunk-OUFI3D3Q.js.map +1 -0
- package/dist/{chunk-MOE5S6CE.js → chunk-YMDYLYL3.js} +954 -441
- package/dist/chunk-YMDYLYL3.js.map +1 -0
- package/dist/client/index.cjs +12477 -8512
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +1965 -229
- package/dist/client/index.d.ts +1965 -229
- package/dist/client/index.js +9118 -5742
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.cjs +844 -142
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +72 -41
- package/dist/server/index.d.ts +72 -41
- package/dist/server/index.js +323 -65
- package/dist/server/index.js.map +1 -1
- package/dist/{tokens-namespace-CIWBtgt2.d.cts → time-DJU6E8KK.d.cts} +943 -192
- package/dist/{tokens-namespace-CIWBtgt2.d.ts → time-DJU6E8KK.d.ts} +943 -192
- package/dist/{token-registry-snapshot-CqI6dXM_.d.cts → token-registry-snapshot-B0xCp3GD.d.cts} +74 -8
- package/dist/{token-registry-snapshot-BNBNuDu1.d.ts → token-registry-snapshot-DGG5N27C.d.ts} +74 -8
- package/dist/universal/index.cjs +1036 -439
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.d.cts +105 -5
- package/dist/universal/index.d.ts +105 -5
- package/dist/universal/index.js +48 -2
- package/package.json +1 -1
- package/dist/chunk-DCW7NQXH.js.map +0 -1
- package/dist/chunk-MOE5S6CE.js.map +0 -1
- package/dist/chunk-VH34YC3Q.js.map +0 -1
package/dist/server/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AuthorizationCode, C as CodeVerifier,
|
|
1
|
+
import { A as AuthorizationCode, C as CodeVerifier, aH as OAuthSession, D as OAuthAccessToken, aI as ClientCredentialsOAuth, aJ as Sender, L as Logger, F as OffersNamespace, a0 as Offer, aK as PaginationParams, aL as PaginatedResponse, i as OfferId, J as OfferDetail, R as RequirementsNamespace, j as OfferOptionId, x as Requirement, y as RequirementsNamespaceImpl, U as UniversalNamespaceContext, t as WalletsNamespace, E as Erc20Namespace, h as CoinListTokenSaleNamespace, S as SuperstateSwapNamespace, m as OndoNamespace, c as CentrifugeNamespace, T as TokensNamespace, z as Config, aM as ClientSecret, Z as Seconds, a9 as PinoLoggerOptions } from '../time-DJU6E8KK.cjs';
|
|
2
2
|
import 'viem';
|
|
3
3
|
|
|
4
4
|
interface SessionStore {
|
|
@@ -55,18 +55,36 @@ interface ServerAuthNamespace {
|
|
|
55
55
|
* Exchanges an authorization code from `CoinListClient#auth.completeOAuth`
|
|
56
56
|
* for an OAuth session and persists it via {@link SessionStore.setSession}.
|
|
57
57
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
58
|
+
* The exchange is never retried automatically: an authorization code is
|
|
59
|
+
* single-use, so a retry of an attempt that reached the server would fail
|
|
60
|
+
* anyway, and could mask why the first one did.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link WritableSessionStoreRequiredError} if the session store
|
|
63
|
+
* does not provide `setSession`.
|
|
64
|
+
* @throws {@link HttpError} if CoinList refuses the exchange.
|
|
60
65
|
*/
|
|
61
66
|
completeOAuth(params: CompleteOAuthParams): Promise<OAuthSession>;
|
|
62
67
|
/**
|
|
63
68
|
* Returns a valid access token for the current session, refreshing it if it
|
|
64
69
|
* is expired or near expiry. This is what you serve to
|
|
65
|
-
* {@link ClientConfig.getAccessToken}
|
|
70
|
+
* {@link ClientConfig.getAccessToken}: answer `null` with "no session"
|
|
71
|
+
* (e.g. a 204) and a throw with a failure (e.g. a 503), never the other way
|
|
72
|
+
* round - the browser signs the user out on the first and not the second.
|
|
66
73
|
*
|
|
67
74
|
* **Writable store**: if the token is expired, the SDK exchanges the refresh
|
|
68
75
|
* token for a new session, persists it, and returns the fresh access token.
|
|
69
|
-
*
|
|
76
|
+
* Concurrent calls for the same session in this process share one exchange.
|
|
77
|
+
*
|
|
78
|
+
* A rejected refresh token (`400 invalid_grant`) is only a *suspicion* at
|
|
79
|
+
* first, because the backend answers "rotated a moment ago by a concurrent
|
|
80
|
+
* request" and "expired or revoked" identically: the SDK writes nothing,
|
|
81
|
+
* so it cannot overwrite the session the winning request just stored, and
|
|
82
|
+
* returns `null` - or the current access token, if that has not actually
|
|
83
|
+
* expired yet. Only a second rejection of the same refresh token, 5 to 60
|
|
84
|
+
* seconds later in this process, is the verdict: the session is cleared via
|
|
85
|
+
* {@link SessionStore.setSession} and {@link Config.onSessionExpired} is
|
|
86
|
+
* called. A browser confirming through your endpoint asks again after one
|
|
87
|
+
* second, so it signs out on its own verdict and not on this one.
|
|
70
88
|
*
|
|
71
89
|
* **Read-only store** (no `setSession`): refresh is skipped entirely. The
|
|
72
90
|
* stored token is returned as-is, even if it is expired — a non-null return
|
|
@@ -75,8 +93,14 @@ interface ServerAuthNamespace {
|
|
|
75
93
|
* store (e.g. in a Route Handler) when you need the SDK to renew the session
|
|
76
94
|
* automatically.
|
|
77
95
|
*
|
|
78
|
-
* @returns the access token, or `null` if there is no session or the
|
|
79
|
-
*
|
|
96
|
+
* @returns the access token, or `null` if there is no session, or the
|
|
97
|
+
* session was rejected (suspected or confirmed).
|
|
98
|
+
* @throws the underlying error - an {@link HttpError} for a 5xx or
|
|
99
|
+
* `invalid_client`, the `fetch` error for a network failure - when the SDK
|
|
100
|
+
* could not find out whether a session exists and the current access token
|
|
101
|
+
* has already expired. The session is left untouched. **Never treat this as
|
|
102
|
+
* logged out**: it means "try again", and during an outage treating it as
|
|
103
|
+
* logged out would sign out every user at once.
|
|
80
104
|
*/
|
|
81
105
|
getAccessToken(): Promise<OAuthAccessToken | null>;
|
|
82
106
|
/**
|
|
@@ -95,39 +119,23 @@ interface ServerAuthNamespace {
|
|
|
95
119
|
clientCredentials(): Promise<ClientCredentialsOAuth>;
|
|
96
120
|
/**
|
|
97
121
|
* Revokes the current token via `POST /oauth/revoke` and clears the session.
|
|
122
|
+
* Does nothing when there is no session.
|
|
98
123
|
*
|
|
99
|
-
*
|
|
124
|
+
* The revoke is best-effort: if it fails for any reason - an
|
|
125
|
+
* {@link HttpError}, a network failure, anything else - the failure is
|
|
126
|
+
* logged at `'warn'` and the session is cleared regardless, because the
|
|
127
|
+
* cleared session is what logs the user out. Set `strict` on the server
|
|
128
|
+
* config to rethrow it instead.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link WritableSessionStoreRequiredError} if the session store does
|
|
100
131
|
* not provide `setSession`.
|
|
132
|
+
* @throws whatever the {@link SessionStore} throws, in either mode. A failed
|
|
133
|
+
* `setSession(null)` means the session was not cleared.
|
|
134
|
+
* @throws the revoke failure, only when `strict` is set. The session is then
|
|
135
|
+
* left untouched, so the call can be retried.
|
|
101
136
|
*/
|
|
102
137
|
logout(): Promise<void>;
|
|
103
138
|
}
|
|
104
|
-
/** What {@link ServerAuthNamespaceImpl} needs out of `ServerConfig`. */
|
|
105
|
-
type ServerAuthConfig = Config & {
|
|
106
|
-
readonly clientSecret: ClientSecret;
|
|
107
|
-
readonly sessionStore: SessionStore;
|
|
108
|
-
/** Seconds before expiry at which a token counts as expired for refresh. */
|
|
109
|
-
readonly accessTokenExpiryBufferSeconds: number;
|
|
110
|
-
/** Whether to rethrow errors the SDK could otherwise swallow (e.g. revoke). */
|
|
111
|
-
readonly strict: boolean;
|
|
112
|
-
};
|
|
113
|
-
declare class ServerAuthNamespaceImpl implements ServerAuthNamespace {
|
|
114
|
-
private readonly api;
|
|
115
|
-
private readonly config;
|
|
116
|
-
private readonly log;
|
|
117
|
-
constructor(api: Sender, config: ServerAuthConfig);
|
|
118
|
-
completeOAuth(params: CompleteOAuthParams): Promise<OAuthSession>;
|
|
119
|
-
getAccessToken(): Promise<OAuthAccessToken | null>;
|
|
120
|
-
private readAccessToken;
|
|
121
|
-
private refreshSession;
|
|
122
|
-
clientCredentials(): Promise<ClientCredentialsOAuth>;
|
|
123
|
-
logout(): Promise<void>;
|
|
124
|
-
private revokeAndClear;
|
|
125
|
-
/**
|
|
126
|
-
* Returns the store's `setSession`, or throws — the guard every
|
|
127
|
-
* session-writing operation shares.
|
|
128
|
-
*/
|
|
129
|
-
private writableSessionStore;
|
|
130
|
-
}
|
|
131
139
|
|
|
132
140
|
/**
|
|
133
141
|
* What the server-only namespaces need, on top of what
|
|
@@ -193,11 +201,23 @@ declare class ServerRequirementsNamespaceImpl extends RequirementsNamespaceImpl
|
|
|
193
201
|
interface ServerConfig extends Config {
|
|
194
202
|
readonly clientSecret: ClientSecret;
|
|
195
203
|
readonly sessionStore: SessionStore;
|
|
196
|
-
/** Buffer in seconds before expiry to consider token expired for refresh. */
|
|
197
|
-
readonly accessTokenExpiryBufferSeconds?: number;
|
|
198
204
|
/**
|
|
199
|
-
*
|
|
200
|
-
*
|
|
205
|
+
* How many seconds before its expiry an access token is refreshed. Defaults
|
|
206
|
+
* to 60. Refreshing early moves the work to a single request while the
|
|
207
|
+
* current token still works, and a refresh that fails inside this window
|
|
208
|
+
* keeps serving the current token rather than failing the request.
|
|
209
|
+
*
|
|
210
|
+
* Build it with `Seconds.of(n)`, which throws a `ValidationError` unless
|
|
211
|
+
* `n` is a non-negative integer.
|
|
212
|
+
*/
|
|
213
|
+
readonly accessTokenExpiryBufferSeconds?: Seconds;
|
|
214
|
+
/**
|
|
215
|
+
* Whether the SDK throws where it would otherwise recover and log a
|
|
216
|
+
* `'warn'` line. Defaults to `false`.
|
|
217
|
+
*
|
|
218
|
+
* Today it governs one thing: a failed token revoke in `auth.logout()`. By
|
|
219
|
+
* default the session is cleared regardless; with `strict` the failure is
|
|
220
|
+
* rethrown and the session is left untouched.
|
|
201
221
|
*/
|
|
202
222
|
readonly strict?: boolean;
|
|
203
223
|
}
|
|
@@ -222,7 +242,10 @@ interface ServerConfig extends Config {
|
|
|
222
242
|
* Next.js Server Components.
|
|
223
243
|
*
|
|
224
244
|
* Unless a namespace says otherwise, its methods require a user session and
|
|
225
|
-
* throw {@link NotAuthenticatedError} when there is none.
|
|
245
|
+
* throw {@link NotAuthenticatedError} when there is none. When the SDK could
|
|
246
|
+
* not find out whether there is one - CoinList's token endpoint failing, or
|
|
247
|
+
* the network - they throw that underlying error instead: see
|
|
248
|
+
* {@link ServerAuthNamespace.getAccessToken}.
|
|
226
249
|
*/
|
|
227
250
|
interface CoinListServer {
|
|
228
251
|
/**
|
|
@@ -274,6 +297,14 @@ interface CoinListServer {
|
|
|
274
297
|
* ENG-1680 and will be client-only, since it needs a wallet to sign with.
|
|
275
298
|
*/
|
|
276
299
|
readonly ondo: OndoNamespace;
|
|
300
|
+
/**
|
|
301
|
+
* Centrifuge vault reads: an indicative quote and the vault-wide ordering
|
|
302
|
+
* gate. Both are free to poll.
|
|
303
|
+
*
|
|
304
|
+
* The quote has no expiry: it is indicative, the fund prices fulfilment
|
|
305
|
+
* later, and a countdown would imply a commitment the API does not make.
|
|
306
|
+
*/
|
|
307
|
+
readonly centrifuge: CentrifugeNamespace;
|
|
277
308
|
/**
|
|
278
309
|
* Token display metadata (name, symbol, decimals, logos) from CoinList's
|
|
279
310
|
* public token registry, keyed by chain + contract address — e.g.
|
|
@@ -351,4 +382,4 @@ declare class WritableSessionStoreRequiredError extends Error {
|
|
|
351
382
|
constructor(message?: string);
|
|
352
383
|
}
|
|
353
384
|
|
|
354
|
-
export { type CoinListServer, type CompleteOAuthParams, type
|
|
385
|
+
export { type CoinListServer, type CompleteOAuthParams, type ServerAuthNamespace, type ServerConfig, type ServerNamespaceContext, type ServerOffersNamespace, ServerOffersNamespaceImpl, type ServerRequirementsNamespace, ServerRequirementsNamespaceImpl, type SessionStore, WritableSessionStoreRequiredError, createCoinListServer, emptySessionStore, pinoServerLogger };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AuthorizationCode, C as CodeVerifier,
|
|
1
|
+
import { A as AuthorizationCode, C as CodeVerifier, aH as OAuthSession, D as OAuthAccessToken, aI as ClientCredentialsOAuth, aJ as Sender, L as Logger, F as OffersNamespace, a0 as Offer, aK as PaginationParams, aL as PaginatedResponse, i as OfferId, J as OfferDetail, R as RequirementsNamespace, j as OfferOptionId, x as Requirement, y as RequirementsNamespaceImpl, U as UniversalNamespaceContext, t as WalletsNamespace, E as Erc20Namespace, h as CoinListTokenSaleNamespace, S as SuperstateSwapNamespace, m as OndoNamespace, c as CentrifugeNamespace, T as TokensNamespace, z as Config, aM as ClientSecret, Z as Seconds, a9 as PinoLoggerOptions } from '../time-DJU6E8KK.js';
|
|
2
2
|
import 'viem';
|
|
3
3
|
|
|
4
4
|
interface SessionStore {
|
|
@@ -55,18 +55,36 @@ interface ServerAuthNamespace {
|
|
|
55
55
|
* Exchanges an authorization code from `CoinListClient#auth.completeOAuth`
|
|
56
56
|
* for an OAuth session and persists it via {@link SessionStore.setSession}.
|
|
57
57
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
58
|
+
* The exchange is never retried automatically: an authorization code is
|
|
59
|
+
* single-use, so a retry of an attempt that reached the server would fail
|
|
60
|
+
* anyway, and could mask why the first one did.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link WritableSessionStoreRequiredError} if the session store
|
|
63
|
+
* does not provide `setSession`.
|
|
64
|
+
* @throws {@link HttpError} if CoinList refuses the exchange.
|
|
60
65
|
*/
|
|
61
66
|
completeOAuth(params: CompleteOAuthParams): Promise<OAuthSession>;
|
|
62
67
|
/**
|
|
63
68
|
* Returns a valid access token for the current session, refreshing it if it
|
|
64
69
|
* is expired or near expiry. This is what you serve to
|
|
65
|
-
* {@link ClientConfig.getAccessToken}
|
|
70
|
+
* {@link ClientConfig.getAccessToken}: answer `null` with "no session"
|
|
71
|
+
* (e.g. a 204) and a throw with a failure (e.g. a 503), never the other way
|
|
72
|
+
* round - the browser signs the user out on the first and not the second.
|
|
66
73
|
*
|
|
67
74
|
* **Writable store**: if the token is expired, the SDK exchanges the refresh
|
|
68
75
|
* token for a new session, persists it, and returns the fresh access token.
|
|
69
|
-
*
|
|
76
|
+
* Concurrent calls for the same session in this process share one exchange.
|
|
77
|
+
*
|
|
78
|
+
* A rejected refresh token (`400 invalid_grant`) is only a *suspicion* at
|
|
79
|
+
* first, because the backend answers "rotated a moment ago by a concurrent
|
|
80
|
+
* request" and "expired or revoked" identically: the SDK writes nothing,
|
|
81
|
+
* so it cannot overwrite the session the winning request just stored, and
|
|
82
|
+
* returns `null` - or the current access token, if that has not actually
|
|
83
|
+
* expired yet. Only a second rejection of the same refresh token, 5 to 60
|
|
84
|
+
* seconds later in this process, is the verdict: the session is cleared via
|
|
85
|
+
* {@link SessionStore.setSession} and {@link Config.onSessionExpired} is
|
|
86
|
+
* called. A browser confirming through your endpoint asks again after one
|
|
87
|
+
* second, so it signs out on its own verdict and not on this one.
|
|
70
88
|
*
|
|
71
89
|
* **Read-only store** (no `setSession`): refresh is skipped entirely. The
|
|
72
90
|
* stored token is returned as-is, even if it is expired — a non-null return
|
|
@@ -75,8 +93,14 @@ interface ServerAuthNamespace {
|
|
|
75
93
|
* store (e.g. in a Route Handler) when you need the SDK to renew the session
|
|
76
94
|
* automatically.
|
|
77
95
|
*
|
|
78
|
-
* @returns the access token, or `null` if there is no session or the
|
|
79
|
-
*
|
|
96
|
+
* @returns the access token, or `null` if there is no session, or the
|
|
97
|
+
* session was rejected (suspected or confirmed).
|
|
98
|
+
* @throws the underlying error - an {@link HttpError} for a 5xx or
|
|
99
|
+
* `invalid_client`, the `fetch` error for a network failure - when the SDK
|
|
100
|
+
* could not find out whether a session exists and the current access token
|
|
101
|
+
* has already expired. The session is left untouched. **Never treat this as
|
|
102
|
+
* logged out**: it means "try again", and during an outage treating it as
|
|
103
|
+
* logged out would sign out every user at once.
|
|
80
104
|
*/
|
|
81
105
|
getAccessToken(): Promise<OAuthAccessToken | null>;
|
|
82
106
|
/**
|
|
@@ -95,39 +119,23 @@ interface ServerAuthNamespace {
|
|
|
95
119
|
clientCredentials(): Promise<ClientCredentialsOAuth>;
|
|
96
120
|
/**
|
|
97
121
|
* Revokes the current token via `POST /oauth/revoke` and clears the session.
|
|
122
|
+
* Does nothing when there is no session.
|
|
98
123
|
*
|
|
99
|
-
*
|
|
124
|
+
* The revoke is best-effort: if it fails for any reason - an
|
|
125
|
+
* {@link HttpError}, a network failure, anything else - the failure is
|
|
126
|
+
* logged at `'warn'` and the session is cleared regardless, because the
|
|
127
|
+
* cleared session is what logs the user out. Set `strict` on the server
|
|
128
|
+
* config to rethrow it instead.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link WritableSessionStoreRequiredError} if the session store does
|
|
100
131
|
* not provide `setSession`.
|
|
132
|
+
* @throws whatever the {@link SessionStore} throws, in either mode. A failed
|
|
133
|
+
* `setSession(null)` means the session was not cleared.
|
|
134
|
+
* @throws the revoke failure, only when `strict` is set. The session is then
|
|
135
|
+
* left untouched, so the call can be retried.
|
|
101
136
|
*/
|
|
102
137
|
logout(): Promise<void>;
|
|
103
138
|
}
|
|
104
|
-
/** What {@link ServerAuthNamespaceImpl} needs out of `ServerConfig`. */
|
|
105
|
-
type ServerAuthConfig = Config & {
|
|
106
|
-
readonly clientSecret: ClientSecret;
|
|
107
|
-
readonly sessionStore: SessionStore;
|
|
108
|
-
/** Seconds before expiry at which a token counts as expired for refresh. */
|
|
109
|
-
readonly accessTokenExpiryBufferSeconds: number;
|
|
110
|
-
/** Whether to rethrow errors the SDK could otherwise swallow (e.g. revoke). */
|
|
111
|
-
readonly strict: boolean;
|
|
112
|
-
};
|
|
113
|
-
declare class ServerAuthNamespaceImpl implements ServerAuthNamespace {
|
|
114
|
-
private readonly api;
|
|
115
|
-
private readonly config;
|
|
116
|
-
private readonly log;
|
|
117
|
-
constructor(api: Sender, config: ServerAuthConfig);
|
|
118
|
-
completeOAuth(params: CompleteOAuthParams): Promise<OAuthSession>;
|
|
119
|
-
getAccessToken(): Promise<OAuthAccessToken | null>;
|
|
120
|
-
private readAccessToken;
|
|
121
|
-
private refreshSession;
|
|
122
|
-
clientCredentials(): Promise<ClientCredentialsOAuth>;
|
|
123
|
-
logout(): Promise<void>;
|
|
124
|
-
private revokeAndClear;
|
|
125
|
-
/**
|
|
126
|
-
* Returns the store's `setSession`, or throws — the guard every
|
|
127
|
-
* session-writing operation shares.
|
|
128
|
-
*/
|
|
129
|
-
private writableSessionStore;
|
|
130
|
-
}
|
|
131
139
|
|
|
132
140
|
/**
|
|
133
141
|
* What the server-only namespaces need, on top of what
|
|
@@ -193,11 +201,23 @@ declare class ServerRequirementsNamespaceImpl extends RequirementsNamespaceImpl
|
|
|
193
201
|
interface ServerConfig extends Config {
|
|
194
202
|
readonly clientSecret: ClientSecret;
|
|
195
203
|
readonly sessionStore: SessionStore;
|
|
196
|
-
/** Buffer in seconds before expiry to consider token expired for refresh. */
|
|
197
|
-
readonly accessTokenExpiryBufferSeconds?: number;
|
|
198
204
|
/**
|
|
199
|
-
*
|
|
200
|
-
*
|
|
205
|
+
* How many seconds before its expiry an access token is refreshed. Defaults
|
|
206
|
+
* to 60. Refreshing early moves the work to a single request while the
|
|
207
|
+
* current token still works, and a refresh that fails inside this window
|
|
208
|
+
* keeps serving the current token rather than failing the request.
|
|
209
|
+
*
|
|
210
|
+
* Build it with `Seconds.of(n)`, which throws a `ValidationError` unless
|
|
211
|
+
* `n` is a non-negative integer.
|
|
212
|
+
*/
|
|
213
|
+
readonly accessTokenExpiryBufferSeconds?: Seconds;
|
|
214
|
+
/**
|
|
215
|
+
* Whether the SDK throws where it would otherwise recover and log a
|
|
216
|
+
* `'warn'` line. Defaults to `false`.
|
|
217
|
+
*
|
|
218
|
+
* Today it governs one thing: a failed token revoke in `auth.logout()`. By
|
|
219
|
+
* default the session is cleared regardless; with `strict` the failure is
|
|
220
|
+
* rethrown and the session is left untouched.
|
|
201
221
|
*/
|
|
202
222
|
readonly strict?: boolean;
|
|
203
223
|
}
|
|
@@ -222,7 +242,10 @@ interface ServerConfig extends Config {
|
|
|
222
242
|
* Next.js Server Components.
|
|
223
243
|
*
|
|
224
244
|
* Unless a namespace says otherwise, its methods require a user session and
|
|
225
|
-
* throw {@link NotAuthenticatedError} when there is none.
|
|
245
|
+
* throw {@link NotAuthenticatedError} when there is none. When the SDK could
|
|
246
|
+
* not find out whether there is one - CoinList's token endpoint failing, or
|
|
247
|
+
* the network - they throw that underlying error instead: see
|
|
248
|
+
* {@link ServerAuthNamespace.getAccessToken}.
|
|
226
249
|
*/
|
|
227
250
|
interface CoinListServer {
|
|
228
251
|
/**
|
|
@@ -274,6 +297,14 @@ interface CoinListServer {
|
|
|
274
297
|
* ENG-1680 and will be client-only, since it needs a wallet to sign with.
|
|
275
298
|
*/
|
|
276
299
|
readonly ondo: OndoNamespace;
|
|
300
|
+
/**
|
|
301
|
+
* Centrifuge vault reads: an indicative quote and the vault-wide ordering
|
|
302
|
+
* gate. Both are free to poll.
|
|
303
|
+
*
|
|
304
|
+
* The quote has no expiry: it is indicative, the fund prices fulfilment
|
|
305
|
+
* later, and a countdown would imply a commitment the API does not make.
|
|
306
|
+
*/
|
|
307
|
+
readonly centrifuge: CentrifugeNamespace;
|
|
277
308
|
/**
|
|
278
309
|
* Token display metadata (name, symbol, decimals, logos) from CoinList's
|
|
279
310
|
* public token registry, keyed by chain + contract address — e.g.
|
|
@@ -351,4 +382,4 @@ declare class WritableSessionStoreRequiredError extends Error {
|
|
|
351
382
|
constructor(message?: string);
|
|
352
383
|
}
|
|
353
384
|
|
|
354
|
-
export { type CoinListServer, type CompleteOAuthParams, type
|
|
385
|
+
export { type CoinListServer, type CompleteOAuthParams, type ServerAuthNamespace, type ServerConfig, type ServerNamespaceContext, type ServerOffersNamespace, ServerOffersNamespaceImpl, type ServerRequirementsNamespace, ServerRequirementsNamespaceImpl, type SessionStore, WritableSessionStoreRequiredError, createCoinListServer, emptySessionStore, pinoServerLogger };
|