gondi 0.53.0 → 0.58.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.
@@ -6,12 +6,22 @@ export declare const signIn: ({ wallet, issuedAt }: {
6
6
  wallet: Wallet;
7
7
  issuedAt?: string;
8
8
  }) => Promise<any>;
9
+ /**
10
+ * The wallet's API session: signs in on the first request and reuses the token after it.
11
+ *
12
+ * Requests that start before the first sign-in finishes wait for that same sign-in rather than
13
+ * starting their own: every sign-in asks the API for a fresh nonce, which replaces the previous
14
+ * one, so concurrent sign-ins reject all but the last with `SIWE_ERROR`.
15
+ */
9
16
  export declare class SessionToken {
10
17
  token?: string;
11
18
  wallet: Wallet;
12
- constructor({ token, wallet }: {
19
+ private readonly requestToken;
20
+ private pendingSignIn?;
21
+ constructor({ token, wallet, requestToken, }: {
13
22
  token?: string;
14
23
  wallet: Wallet;
24
+ requestToken?: typeof signIn;
15
25
  });
16
26
  authorizeRequest(request: GraphQLRequest): Promise<{
17
27
  headers: {