@account-kit/signer 4.0.0-beta.1 → 4.0.0-beta.10
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/esm/base.d.ts +42 -5
- package/dist/esm/base.js +186 -29
- package/dist/esm/base.js.map +1 -1
- package/dist/esm/client/base.d.ts +22 -4
- package/dist/esm/client/base.js +36 -2
- package/dist/esm/client/base.js.map +1 -1
- package/dist/esm/client/index.d.ts +108 -7
- package/dist/esm/client/index.js +282 -14
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/client/types.d.ts +31 -1
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/metrics.d.ts +17 -0
- package/dist/esm/metrics.js +7 -0
- package/dist/esm/metrics.js.map +1 -0
- package/dist/esm/oauth.d.ts +19 -0
- package/dist/esm/oauth.js +26 -0
- package/dist/esm/oauth.js.map +1 -0
- package/dist/esm/session/manager.d.ts +3 -2
- package/dist/esm/session/manager.js +29 -15
- package/dist/esm/session/manager.js.map +1 -1
- package/dist/esm/session/types.d.ts +1 -1
- package/dist/esm/session/types.js.map +1 -1
- package/dist/esm/signer.d.ts +52 -7
- package/dist/esm/signer.js +46 -3
- package/dist/esm/signer.js.map +1 -1
- package/dist/esm/types.d.ts +8 -1
- package/dist/esm/types.js +3 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/typeAssertions.d.ts +1 -0
- package/dist/esm/utils/typeAssertions.js +4 -0
- package/dist/esm/utils/typeAssertions.js.map +1 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/base.d.ts +42 -5
- package/dist/types/base.d.ts.map +1 -1
- package/dist/types/client/base.d.ts +22 -4
- package/dist/types/client/base.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +108 -7
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/types/client/types.d.ts +31 -1
- package/dist/types/client/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/metrics.d.ts +18 -0
- package/dist/types/metrics.d.ts.map +1 -0
- package/dist/types/oauth.d.ts +20 -0
- package/dist/types/oauth.d.ts.map +1 -0
- package/dist/types/session/manager.d.ts +3 -2
- package/dist/types/session/manager.d.ts.map +1 -1
- package/dist/types/session/types.d.ts +1 -1
- package/dist/types/session/types.d.ts.map +1 -1
- package/dist/types/signer.d.ts +52 -7
- package/dist/types/signer.d.ts.map +1 -1
- package/dist/types/types.d.ts +8 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/typeAssertions.d.ts +2 -0
- package/dist/types/utils/typeAssertions.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/base.ts +260 -65
- package/src/client/base.ts +49 -4
- package/src/client/index.ts +317 -20
- package/src/client/types.ts +33 -1
- package/src/index.ts +5 -1
- package/src/metrics.ts +23 -0
- package/src/oauth.ts +36 -0
- package/src/session/manager.ts +46 -19
- package/src/session/types.ts +1 -1
- package/src/signer.ts +91 -4
- package/src/types.ts +9 -1
- package/src/utils/typeAssertions.ts +3 -0
- package/src/version.ts +1 -1
package/dist/types/base.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type SmartAccountAuthenticator } from "@aa-sdk/core";
|
|
2
|
-
import { type
|
|
2
|
+
import { type GetTransactionType, type Hex, type IsNarrowable, type LocalAccount, type SerializeTransactionFn, type SignableMessage, type TransactionSerializable, type TransactionSerialized, type TypedData, type TypedDataDefinition } from "viem";
|
|
3
3
|
import type { BaseSignerClient } from "./client/base";
|
|
4
|
-
import type { User } from "./client/types";
|
|
4
|
+
import type { OauthConfig, User } from "./client/types";
|
|
5
5
|
import { type SessionManagerParams } from "./session/manager.js";
|
|
6
6
|
import type { AuthParams } from "./signer";
|
|
7
|
-
import { type AlchemySignerEvents } from "./types.js";
|
|
7
|
+
import { type AlchemySignerEvents, type ErrorInfo } from "./types.js";
|
|
8
8
|
export interface BaseAlchemySignerParams<TClient extends BaseSignerClient> {
|
|
9
9
|
client: TClient;
|
|
10
10
|
sessionConfig?: Omit<SessionManagerParams, "client">;
|
|
11
|
+
initialError?: ErrorInfo;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* Base abstract class for Alchemy Signer, providing authentication and session management for smart accounts.
|
|
@@ -26,8 +27,9 @@ export declare abstract class BaseAlchemySigner<TClient extends BaseSignerClient
|
|
|
26
27
|
* @param {BaseAlchemySignerParams<TClient>} param0 Object containing the client and session configuration
|
|
27
28
|
* @param {TClient} param0.client The client instance to be used internally
|
|
28
29
|
* @param {SessionConfig} param0.sessionConfig Configuration for managing sessions
|
|
30
|
+
* @param {ErrorInfo | undefined} param0.initialError Error already present on the signer when initialized, if any
|
|
29
31
|
*/
|
|
30
|
-
constructor({ client, sessionConfig }: BaseAlchemySignerParams<TClient>);
|
|
32
|
+
constructor({ client, sessionConfig, initialError, }: BaseAlchemySignerParams<TClient>);
|
|
31
33
|
/**
|
|
32
34
|
* Allows you to subscribe to events emitted by the signer
|
|
33
35
|
*
|
|
@@ -36,6 +38,36 @@ export declare abstract class BaseAlchemySigner<TClient extends BaseSignerClient
|
|
|
36
38
|
* @returns {() => void} a function to remove the listener
|
|
37
39
|
*/
|
|
38
40
|
on: <E extends keyof AlchemySignerEvents>(event: E, listener: AlchemySignerEvents[E]) => () => void;
|
|
41
|
+
/**
|
|
42
|
+
* Prepares the config needed to use popup-based OAuth login. This must be
|
|
43
|
+
* called before calling `.authenticate` with params `{ type: "oauth", mode:
|
|
44
|
+
* "popup" }`, and is recommended to be called on page load.
|
|
45
|
+
*
|
|
46
|
+
* This method exists because browsers may prevent popups from opening unless
|
|
47
|
+
* triggered by user interaction, and so the OAuth config must already have
|
|
48
|
+
* been fetched at the time a user clicks a social login button.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { AlchemyWebSigner } from "@account-kit/signer";
|
|
53
|
+
*
|
|
54
|
+
* const signer = new AlchemyWebSigner({
|
|
55
|
+
* client: {
|
|
56
|
+
* connection: {
|
|
57
|
+
* rpcUrl: "/api/rpc",
|
|
58
|
+
* },
|
|
59
|
+
* iframeConfig: {
|
|
60
|
+
* iframeContainerId: "alchemy-signer-iframe-container",
|
|
61
|
+
* },
|
|
62
|
+
* },
|
|
63
|
+
* });
|
|
64
|
+
*
|
|
65
|
+
* await signer.preparePopupOauth();
|
|
66
|
+
* ```
|
|
67
|
+
* @returns {Promise<OauthConfig>} the config which must be loaded before
|
|
68
|
+
* using popup-based OAuth
|
|
69
|
+
*/
|
|
70
|
+
preparePopupOauth: () => Promise<OauthConfig>;
|
|
39
71
|
/**
|
|
40
72
|
* Authenticate a user with either an email or a passkey and create a session for that user
|
|
41
73
|
*
|
|
@@ -64,6 +96,7 @@ export declare abstract class BaseAlchemySigner<TClient extends BaseSignerClient
|
|
|
64
96
|
* @returns {Promise<User>} the user that was authenticated
|
|
65
97
|
*/
|
|
66
98
|
authenticate: (params: AuthParams) => Promise<User>;
|
|
99
|
+
private trackAuthenticateType;
|
|
67
100
|
/**
|
|
68
101
|
* Clear a user session and log them out
|
|
69
102
|
*
|
|
@@ -207,7 +240,9 @@ export declare abstract class BaseAlchemySigner<TClient extends BaseSignerClient
|
|
|
207
240
|
* @param {() => Hex} [args.serializer] an optional serializer function. If not provided, the default `serializeTransaction` function will be used
|
|
208
241
|
* @returns {Promise<string>} a promise that resolves to the serialized transaction with the signature
|
|
209
242
|
*/
|
|
210
|
-
signTransaction:
|
|
243
|
+
signTransaction: <serializer extends SerializeTransactionFn<TransactionSerializable> = SerializeTransactionFn<TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
|
|
244
|
+
serializer?: serializer | undefined;
|
|
245
|
+
} | undefined) => Promise<IsNarrowable<TransactionSerialized<GetTransactionType<transaction>>, Hex> extends true ? TransactionSerialized<GetTransactionType<transaction>> : Hex>;
|
|
211
246
|
/**
|
|
212
247
|
* Unauthenticated call to look up a user's organizationId by email
|
|
213
248
|
*
|
|
@@ -316,6 +351,8 @@ export declare abstract class BaseAlchemySigner<TClient extends BaseSignerClient
|
|
|
316
351
|
toViemAccount: () => LocalAccount;
|
|
317
352
|
private authenticateWithEmail;
|
|
318
353
|
private authenticateWithPasskey;
|
|
354
|
+
private authenticateWithOauth;
|
|
355
|
+
private handleOauthReturn;
|
|
319
356
|
private registerListeners;
|
|
320
357
|
}
|
|
321
358
|
//# sourceMappingURL=base.d.ts.map
|
package/dist/types/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAKL,KAAK,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAKL,KAAK,kBAAkB,EACvB,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,MAAM,CAAC;AAKd,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAe,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGrE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UA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;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,YAAY,EAAE,CACZ,MAAM,EAAE,UAAU,CAAC,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,KACvD,OAAO,CAAC,OAAO,CAAC,CAEnB;IAEF;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,aAAa,QAAO,YAAY,CAkB9B;IAEF,OAAO,CAAC,qBAAqB,CA0D3B;IAEF,OAAO,CAAC,uBAAuB,CAoC7B;IAEF,OAAO,CAAC,qBAAqB,CAc3B;IAEF,OAAO,CAAC,iBAAiB,CAWpB;IAEL,OAAO,CAAC,iBAAiB,CA4CvB;CACH"}
|
|
@@ -2,7 +2,7 @@ import { type ConnectionConfig } from "@aa-sdk/core";
|
|
|
2
2
|
import { TurnkeyClient, type TSignedRequest } from "@turnkey/http";
|
|
3
3
|
import EventEmitter from "eventemitter3";
|
|
4
4
|
import type { Hex } from "viem";
|
|
5
|
-
import type { AlchemySignerClientEvents, CreateAccountParams, EmailAuthParams, GetWebAuthnAttestationResult, SignerBody, SignerResponse, SignupResponse, User } from "./types.js";
|
|
5
|
+
import type { AlchemySignerClientEvents, AuthenticatingEventMetadata, CreateAccountParams, EmailAuthParams, GetWebAuthnAttestationResult, OauthConfig, OauthParams, SignerBody, SignerResponse, SignupResponse, User } from "./types.js";
|
|
6
6
|
export interface BaseSignerClientParams {
|
|
7
7
|
stamper: TurnkeyClient["stamper"];
|
|
8
8
|
connection: ConnectionConfig;
|
|
@@ -23,12 +23,19 @@ export declare abstract class BaseSignerClient<TExportWalletParams = unknown> {
|
|
|
23
23
|
protected turnkeyClient: TurnkeyClient;
|
|
24
24
|
protected rootOrg: string;
|
|
25
25
|
protected eventEmitter: EventEmitter<AlchemySignerClientEvents>;
|
|
26
|
+
protected oauthConfig: OauthConfig | undefined;
|
|
26
27
|
/**
|
|
27
28
|
* Create a new instance of the Alchemy Signer client
|
|
28
29
|
*
|
|
29
30
|
* @param {BaseSignerClientParams} params the parameters required to create the client
|
|
30
31
|
*/
|
|
31
32
|
constructor(params: BaseSignerClientParams);
|
|
33
|
+
/**
|
|
34
|
+
* Asynchronously fetches and sets the OAuth configuration.
|
|
35
|
+
*
|
|
36
|
+
* @returns {Promise<OauthConfig>} A promise that resolves to the OAuth configuration
|
|
37
|
+
*/
|
|
38
|
+
initOauth: () => Promise<OauthConfig>;
|
|
32
39
|
protected get user(): User | undefined;
|
|
33
40
|
protected set user(user: User | undefined);
|
|
34
41
|
/**
|
|
@@ -53,13 +60,23 @@ export declare abstract class BaseSignerClient<TExportWalletParams = unknown> {
|
|
|
53
60
|
abstract initEmailAuth(params: Omit<EmailAuthParams, "targetPublicKey">): Promise<{
|
|
54
61
|
orgId: string;
|
|
55
62
|
}>;
|
|
56
|
-
abstract
|
|
63
|
+
abstract completeAuthWithBundle(params: {
|
|
57
64
|
bundle: string;
|
|
58
65
|
orgId: string;
|
|
66
|
+
connectedEventName: keyof AlchemySignerClientEvents;
|
|
67
|
+
authenticatingType: AuthenticatingEventMetadata["type"];
|
|
68
|
+
idToken?: string;
|
|
59
69
|
}): Promise<User>;
|
|
70
|
+
abstract oauthWithRedirect(args: Extract<OauthParams, {
|
|
71
|
+
mode: "redirect";
|
|
72
|
+
}>): Promise<never>;
|
|
73
|
+
abstract oauthWithPopup(args: Extract<OauthParams, {
|
|
74
|
+
mode: "popup";
|
|
75
|
+
}>): Promise<User>;
|
|
60
76
|
abstract disconnect(): Promise<void>;
|
|
61
77
|
abstract exportWallet(params: TExportWalletParams): Promise<boolean>;
|
|
62
78
|
abstract lookupUserWithPasskey(user?: User): Promise<User>;
|
|
79
|
+
protected abstract getOauthConfig(): Promise<OauthConfig>;
|
|
63
80
|
protected abstract getWebAuthnAttestation(options: CredentialCreationOptions, userDetails?: {
|
|
64
81
|
username: string;
|
|
65
82
|
}): Promise<GetWebAuthnAttestationResult>;
|
|
@@ -83,10 +100,11 @@ export declare abstract class BaseSignerClient<TExportWalletParams = unknown> {
|
|
|
83
100
|
* Retrieves the current user or fetches the user information if not already available.
|
|
84
101
|
*
|
|
85
102
|
* @param {string} [orgId] optional organization ID, defaults to the user's organization ID
|
|
103
|
+
* @param {string} idToken an OIDC ID token containing additional user information
|
|
86
104
|
* @returns {Promise<User>} A promise that resolves to the user object
|
|
87
105
|
* @throws {Error} if no organization ID is provided when there is no current user
|
|
88
106
|
*/
|
|
89
|
-
whoami: (orgId?: string | undefined) => Promise<User>;
|
|
107
|
+
whoami: (orgId?: string | undefined, idToken?: string) => Promise<User>;
|
|
90
108
|
/**
|
|
91
109
|
* Generates a stamped whoami request for the current user. This request can then be used to call /signer/v1/whoami to get the user information.
|
|
92
110
|
* This is useful if you want to get the user information in a different context like a server. You can pass the stamped request to the server
|
|
@@ -129,7 +147,7 @@ export declare abstract class BaseSignerClient<TExportWalletParams = unknown> {
|
|
|
129
147
|
* @param {SignerBody<R>} body The request body containing the data to be sent
|
|
130
148
|
* @returns {Promise<SignerResponse<R>>} A promise that resolves to the response from the signer
|
|
131
149
|
*/
|
|
132
|
-
request: <R extends "/v1/signup" | "/v1/whoami" | "/v1/auth" | "/v1/lookup" | "/v1/sign-payload">(route: R, body: SignerBody<R>) => Promise<SignerResponse<R>>;
|
|
150
|
+
request: <R extends "/v1/signup" | "/v1/whoami" | "/v1/auth" | "/v1/lookup" | "/v1/sign-payload" | "/v1/prepare-oauth">(route: R, body: SignerBody<R>) => Promise<SignerResponse<R>>;
|
|
133
151
|
private exportAsSeedPhrase;
|
|
134
152
|
private exportAsPrivateKey;
|
|
135
153
|
protected pollActivityCompletion: <T extends "createOrganizationResult" | "createAuthenticatorsResult" | "createUsersResult" | "createPrivateKeysResult" | "createInvitationsResult" | "acceptInvitationResult" | "signRawPayloadResult" | "createPolicyResult" | "disablePrivateKeyResult" | "deleteUsersResult" | "deleteAuthenticatorsResult" | "deleteInvitationResult" | "deleteOrganizationResult" | "deletePolicyResult" | "createUserTagResult" | "deleteUserTagsResult" | "signTransactionResult" | "deleteApiKeysResult" | "createApiKeysResult" | "createPrivateKeyTagResult" | "deletePrivateKeyTagsResult" | "setPaymentMethodResult" | "activateBillingTierResult" | "deletePaymentMethodResult" | "createApiOnlyUsersResult" | "updateRootQuorumResult" | "updateUserTagResult" | "updatePrivateKeyTagResult" | "createSubOrganizationResult" | "updateAllowedOriginsResult" | "createPrivateKeysResultV2" | "updateUserResult" | "updatePolicyResult" | "createSubOrganizationResultV3" | "createWalletResult" | "createWalletAccountsResult" | "initUserEmailRecoveryResult" | "recoverUserResult" | "setOrganizationFeatureResult" | "removeOrganizationFeatureResult" | "exportPrivateKeyResult" | "exportWalletResult" | "createSubOrganizationResultV4" | "emailAuthResult" | "exportWalletAccountResult">(activity: Awaited<ReturnType<(typeof this.turnkeyClient)["getActivity"]>>["activity"], organizationId: string, resultKey: T) => Promise<NonNullable<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/client/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,YAAY,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/client/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAIhC,OAAO,KAAK,EAEV,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,eAAe,EACf,4BAA4B,EAC5B,WAAW,EACX,WAAW,EACX,UAAU,EACV,cAA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G;IACI,EAAE,sJAOP;IAEF;;;;;;OAMG;IACI,UAAU,YAAmB,yBAAyB,uBA+B3D;IAEF;;;;;;;OAOG;IACI,MAAM,yCAED,MAAM,KACf,QAAQ,IAAI,CAAC,CAyCd;IAEF;;;;;;;;OAQG;IACI,WAAW,QAAa,QAAQ,cAAc,CAAC,CAQpD;IAEF;;;;;OAKG;IACI,iBAAiB,UAAiB,MAAM;;OAE7C;IAEF;;;;;;;OAOG;IACI,cAAc,QAAe,GAAG,KAAG,QAAQ,GAAG,CAAC,CAsBpD;IAEF;;;;OAIG;IACI,OAAO,QAAO,IAAI,GAAG,IAAI,CAE9B;IAEF;;;;;;;OAOG;IACI,OAAO,8KA6BZ;IAKF,OAAO,CAAC,kBAAkB,CAmDxB;IAEF,OAAO,CAAC,kBAAkB,CA4BxB;IAGF,SAAS,CAAC,sBAAsB,0uCAKpB,QACR,WAAW,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,CAAC,CACvD,CAAC,UAAU,CAAC,kBACG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAsCtB;CAEH"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { BaseError } from "@aa-sdk/core";
|
|
1
2
|
import { z } from "zod";
|
|
3
|
+
import type { AuthParams } from "../signer.js";
|
|
2
4
|
import { BaseSignerClient } from "./base.js";
|
|
3
|
-
import type { CreateAccountParams, CredentialCreationOptionOverrides, EmailAuthParams, ExportWalletParams, User } from "./types.js";
|
|
5
|
+
import type { AlchemySignerClientEvents, AuthenticatingEventMetadata, CreateAccountParams, CredentialCreationOptionOverrides, EmailAuthParams, ExportWalletParams, OauthConfig, User } from "./types.js";
|
|
4
6
|
export declare const AlchemySignerClientParamsSchema: z.ZodObject<{
|
|
5
7
|
connection: z.ZodUnion<[z.ZodObject<{
|
|
6
8
|
rpcUrl: z.ZodOptional<z.ZodNever>;
|
|
@@ -63,6 +65,8 @@ export declare const AlchemySignerClientParamsSchema: z.ZodObject<{
|
|
|
63
65
|
}>;
|
|
64
66
|
rpId: z.ZodOptional<z.ZodString>;
|
|
65
67
|
rootOrgId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
68
|
+
oauthCallbackUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
69
|
+
enablePopupOauth: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
66
70
|
}, "strip", z.ZodTypeAny, {
|
|
67
71
|
connection: {
|
|
68
72
|
apiKey: string;
|
|
@@ -81,11 +85,13 @@ export declare const AlchemySignerClientParamsSchema: z.ZodObject<{
|
|
|
81
85
|
jwt: string;
|
|
82
86
|
apiKey?: undefined;
|
|
83
87
|
};
|
|
84
|
-
rootOrgId: string;
|
|
85
88
|
iframeConfig: {
|
|
86
89
|
iframeElementId: string;
|
|
87
90
|
iframeContainerId: string;
|
|
88
91
|
};
|
|
92
|
+
rootOrgId: string;
|
|
93
|
+
oauthCallbackUrl: string;
|
|
94
|
+
enablePopupOauth: boolean;
|
|
89
95
|
rpId?: string | undefined;
|
|
90
96
|
}, {
|
|
91
97
|
connection: {
|
|
@@ -111,6 +117,8 @@ export declare const AlchemySignerClientParamsSchema: z.ZodObject<{
|
|
|
111
117
|
};
|
|
112
118
|
rpId?: string | undefined;
|
|
113
119
|
rootOrgId?: string | undefined;
|
|
120
|
+
oauthCallbackUrl?: string | undefined;
|
|
121
|
+
enablePopupOauth?: boolean | undefined;
|
|
114
122
|
}>;
|
|
115
123
|
export type AlchemySignerClientParams = z.input<typeof AlchemySignerClientParamsSchema>;
|
|
116
124
|
/**
|
|
@@ -120,6 +128,7 @@ export type AlchemySignerClientParams = z.input<typeof AlchemySignerClientParams
|
|
|
120
128
|
export declare class AlchemySignerWebClient extends BaseSignerClient<ExportWalletParams> {
|
|
121
129
|
private iframeStamper;
|
|
122
130
|
private webauthnStamper;
|
|
131
|
+
oauthCallbackUrl: string;
|
|
123
132
|
iframeContainerId: string;
|
|
124
133
|
/**
|
|
125
134
|
* Initializes a new instance with the given parameters, setting up the connection, iframe configuration, and WebAuthn stamper.
|
|
@@ -195,7 +204,9 @@ export declare class AlchemySignerWebClient extends BaseSignerClient<ExportWalle
|
|
|
195
204
|
orgId: string;
|
|
196
205
|
}>;
|
|
197
206
|
/**
|
|
198
|
-
* Completes
|
|
207
|
+
* Completes auth for the user by injecting a credential bundle and retrieving
|
|
208
|
+
* the user information based on the provided organization ID. Emits events
|
|
209
|
+
* during the process.
|
|
199
210
|
*
|
|
200
211
|
* @example
|
|
201
212
|
* ```ts
|
|
@@ -210,15 +221,23 @@ export declare class AlchemySignerWebClient extends BaseSignerClient<ExportWalle
|
|
|
210
221
|
* },
|
|
211
222
|
* });
|
|
212
223
|
*
|
|
213
|
-
* const account = await client.
|
|
224
|
+
* const account = await client.completeAuthWithBundle({ orgId: "user-org-id", bundle: "bundle-from-email", connectedEventName: "connectedEmail" });
|
|
214
225
|
* ```
|
|
215
226
|
*
|
|
216
|
-
* @param {{ bundle: string; orgId: string
|
|
217
|
-
*
|
|
227
|
+
* @param {{ bundle: string; orgId: string, connectedEventName: keyof AlchemySignerClientEvents, idToken?: string }} config
|
|
228
|
+
* The configuration object for the authentication function containing the
|
|
229
|
+
* credential bundle to inject and the organization id associated with the
|
|
230
|
+
* user, as well as the event to be emitted on success and optionally an OIDC
|
|
231
|
+
* ID token with extra user information
|
|
232
|
+
* @returns {Promise<User>} A promise that resolves to the authenticated user
|
|
233
|
+
* information
|
|
218
234
|
*/
|
|
219
|
-
|
|
235
|
+
completeAuthWithBundle: ({ bundle, orgId, connectedEventName, idToken, authenticatingType, }: {
|
|
220
236
|
bundle: string;
|
|
221
237
|
orgId: string;
|
|
238
|
+
connectedEventName: keyof AlchemySignerClientEvents;
|
|
239
|
+
authenticatingType: AuthenticatingEventMetadata["type"];
|
|
240
|
+
idToken?: string | undefined;
|
|
222
241
|
}) => Promise<User>;
|
|
223
242
|
/**
|
|
224
243
|
* Asynchronously handles the authentication process using WebAuthn Stamper. If a user is provided, sets the user and returns it. Otherwise, retrieves the current user and initializes the WebAuthn stamper.
|
|
@@ -291,6 +310,68 @@ export declare class AlchemySignerWebClient extends BaseSignerClient<ExportWalle
|
|
|
291
310
|
* ```
|
|
292
311
|
*/
|
|
293
312
|
disconnect: () => Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* Redirects the user to the OAuth provider URL based on the provided arguments. This function will always reject after 1 second if the redirection does not occur.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```ts
|
|
318
|
+
* import { AlchemySignerWebClient } from "@account-kit/signer";
|
|
319
|
+
*
|
|
320
|
+
* const client = new AlchemySignerWebClient({
|
|
321
|
+
* connection: {
|
|
322
|
+
* apiKey: "your-api-key",
|
|
323
|
+
* },
|
|
324
|
+
* iframeConfig: {
|
|
325
|
+
* iframeContainerId: "signer-iframe-container",
|
|
326
|
+
* },
|
|
327
|
+
* });
|
|
328
|
+
*
|
|
329
|
+
* await client.oauthWithRedirect({
|
|
330
|
+
* type: "oauth",
|
|
331
|
+
* authProviderId: "google",
|
|
332
|
+
* mode: "redirect",
|
|
333
|
+
* redirectUrl: "/",
|
|
334
|
+
* });
|
|
335
|
+
* ```
|
|
336
|
+
*
|
|
337
|
+
* @param {Extract<AuthParams, { type: "oauth"; mode: "redirect" }>} args The arguments required to obtain the OAuth provider URL
|
|
338
|
+
* @returns {Promise<never>} A promise that will never resolve, only reject if the redirection fails
|
|
339
|
+
*/
|
|
340
|
+
oauthWithRedirect: (args: Extract<AuthParams, {
|
|
341
|
+
type: "oauth";
|
|
342
|
+
mode: "redirect";
|
|
343
|
+
}>) => Promise<never>;
|
|
344
|
+
/**
|
|
345
|
+
* Initiates an OAuth authentication flow in a popup window and returns the authenticated user.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ```ts
|
|
349
|
+
* import { AlchemySignerWebClient } from "@account-kit/signer";
|
|
350
|
+
*
|
|
351
|
+
* const client = new AlchemySignerWebClient({
|
|
352
|
+
* connection: {
|
|
353
|
+
* apiKey: "your-api-key",
|
|
354
|
+
* },
|
|
355
|
+
* iframeConfig: {
|
|
356
|
+
* iframeContainerId: "signer-iframe-container",
|
|
357
|
+
* },
|
|
358
|
+
* });
|
|
359
|
+
*
|
|
360
|
+
* const user = await client.oauthWithPopup({
|
|
361
|
+
* type: "oauth",
|
|
362
|
+
* authProviderId: "google",
|
|
363
|
+
* mode: "popup"
|
|
364
|
+
* });
|
|
365
|
+
* ```
|
|
366
|
+
*
|
|
367
|
+
* @param {Extract<AuthParams, { type: "oauth"; mode: "popup" }>} args The authentication parameters specifying OAuth type and popup mode
|
|
368
|
+
* @returns {Promise<User>} A promise that resolves to a `User` object containing the authenticated user information
|
|
369
|
+
*/
|
|
370
|
+
oauthWithPopup: (args: Extract<AuthParams, {
|
|
371
|
+
type: "oauth";
|
|
372
|
+
mode: "popup";
|
|
373
|
+
}>) => Promise<User>;
|
|
374
|
+
private getOauthProviderUrl;
|
|
294
375
|
private initIframeStamper;
|
|
295
376
|
private initWebauthnStamper;
|
|
296
377
|
protected getWebAuthnAttestation: (options?: CredentialCreationOptionOverrides, userDetails?: {
|
|
@@ -305,5 +386,25 @@ export declare class AlchemySignerWebClient extends BaseSignerClient<ExportWalle
|
|
|
305
386
|
transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
|
|
306
387
|
};
|
|
307
388
|
}>;
|
|
389
|
+
protected getOauthConfig: () => Promise<OauthConfig>;
|
|
390
|
+
private getOauthConfigForMode;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* This error is thrown when the OAuth flow is cancelled because the auth popup
|
|
394
|
+
* window was closed.
|
|
395
|
+
*/
|
|
396
|
+
export declare class OauthCancelledError extends BaseError {
|
|
397
|
+
name: string;
|
|
398
|
+
/**
|
|
399
|
+
* Constructor for initializing an error indicating that the OAuth flow was
|
|
400
|
+
* cancelled.
|
|
401
|
+
*/
|
|
402
|
+
constructor();
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* This error is thrown when an error occurs during the OAuth login flow.
|
|
406
|
+
*/
|
|
407
|
+
export declare class OauthFailedError extends BaseError {
|
|
408
|
+
name: string;
|
|
308
409
|
}
|
|
309
410
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,cAAc,CAAC;AAIjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,cAAc,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,iCAAiC,EACjC,eAAe,EACf,kBAAkB,EAClB,WAAW,EAEX,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO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,mBAAmB,CA0EzB;IAEF,OAAO,CAAC,iBAAiB,CAQvB;IAEF,OAAO,CAAC,mBAAmB,CAYzB;IAEF,UAAmB,sBAAsB,aAC7B,iCAAiC,gBAC9B;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE;;;;;;;;;OAmDjC;IAEF,UAAmB,cAAc,QAAa,QAAQ,WAAW,CAAC,CAIhE;IAEF,OAAO,CAAC,qBAAqB,CAY3B;CACH;AAoBD;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,SAAS;IACvC,IAAI,SAAyB;IAEtC;;;OAGG;;CAIJ;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;IACpC,IAAI,SAAsB;CACpC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Address } from "@aa-sdk/core";
|
|
2
2
|
import type { TSignedRequest, getWebAuthnAttestation } from "@turnkey/http";
|
|
3
3
|
import type { Hex } from "viem";
|
|
4
|
+
import type { AuthParams } from "../signer";
|
|
4
5
|
export type CredentialCreationOptionOverrides = {
|
|
5
6
|
publicKey?: Partial<CredentialCreationOptions["publicKey"]>;
|
|
6
7
|
} & Pick<CredentialCreationOptions, "signal">;
|
|
@@ -10,6 +11,8 @@ export type User = {
|
|
|
10
11
|
userId: string;
|
|
11
12
|
address: Address;
|
|
12
13
|
credentialId?: string;
|
|
14
|
+
idToken?: string;
|
|
15
|
+
claims?: Record<string, unknown>;
|
|
13
16
|
};
|
|
14
17
|
export type ExportWalletParams = {
|
|
15
18
|
iframeContainerId: string;
|
|
@@ -35,11 +38,27 @@ export type EmailAuthParams = {
|
|
|
35
38
|
targetPublicKey: string;
|
|
36
39
|
redirectParams?: URLSearchParams;
|
|
37
40
|
};
|
|
41
|
+
export type OauthParams = Extract<AuthParams, {
|
|
42
|
+
type: "oauth";
|
|
43
|
+
}> & {
|
|
44
|
+
expirationSeconds?: number;
|
|
45
|
+
};
|
|
38
46
|
export type SignupResponse = {
|
|
39
47
|
orgId: string;
|
|
40
48
|
userId?: string;
|
|
41
49
|
address?: Address;
|
|
42
50
|
};
|
|
51
|
+
export type OauthConfig = {
|
|
52
|
+
codeChallenge: string;
|
|
53
|
+
requestKey: string;
|
|
54
|
+
authProviders: AuthProviderConfig[];
|
|
55
|
+
};
|
|
56
|
+
export type AuthProviderConfig = {
|
|
57
|
+
id: string;
|
|
58
|
+
isCustomProvider?: boolean;
|
|
59
|
+
clientId: string;
|
|
60
|
+
authEndpoint: string;
|
|
61
|
+
};
|
|
43
62
|
export type SignerRoutes = SignerEndpoints[number]["Route"];
|
|
44
63
|
export type SignerBody<T extends SignerRoutes> = Extract<SignerEndpoints[number], {
|
|
45
64
|
Route: T;
|
|
@@ -93,13 +112,24 @@ export type SignerEndpoints = [
|
|
|
93
112
|
Response: {
|
|
94
113
|
signature: Hex;
|
|
95
114
|
};
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
Route: "/v1/prepare-oauth";
|
|
118
|
+
Body: {
|
|
119
|
+
nonce: string;
|
|
120
|
+
};
|
|
121
|
+
Response: OauthConfig;
|
|
96
122
|
}
|
|
97
123
|
];
|
|
124
|
+
export type AuthenticatingEventMetadata = {
|
|
125
|
+
type: "email" | "passkey" | "oauth";
|
|
126
|
+
};
|
|
98
127
|
export type AlchemySignerClientEvents = {
|
|
99
128
|
connected(user: User): void;
|
|
100
|
-
authenticating(): void;
|
|
129
|
+
authenticating(data: AuthenticatingEventMetadata): void;
|
|
101
130
|
connectedEmail(user: User, bundle: string): void;
|
|
102
131
|
connectedPasskey(user: User): void;
|
|
132
|
+
connectedOauth(user: User, bundle: string): void;
|
|
103
133
|
disconnected(): void;
|
|
104
134
|
};
|
|
105
135
|
export type AlchemySignerClientEvent = keyof AlchemySignerClientEvents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAA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C3B,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;QACF,QAAQ,EAAE,WAAW,CAAC;KACvB;CACF,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAC5B,cAAc,CAAC,IAAI,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACxD,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,YAAY,IAAI,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,MAAM,yBAAyB,CAAC;AAEvE,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC;IAChE,SAAS,EAAE,WAAW,CAAC;IACvB,mBAAmB,EAAE,WAAW,CAAC;CAClC,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { BaseAlchemySigner } from "./base.js";
|
|
2
2
|
export { BaseSignerClient } from "./client/base.js";
|
|
3
|
-
export { AlchemySignerWebClient } from "./client/index.js";
|
|
3
|
+
export { AlchemySignerWebClient, OauthCancelledError, OauthFailedError, } from "./client/index.js";
|
|
4
4
|
export type * from "./client/types.js";
|
|
5
5
|
export { DEFAULT_SESSION_MS } from "./session/manager.js";
|
|
6
6
|
export type * from "./signer.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,mBAAmB,mBAAmB,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,mBAAmB,aAAa,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,mBAAmB,YAAY,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type SignerEventsSchema = [
|
|
2
|
+
{
|
|
3
|
+
EventName: "signer_authnticate";
|
|
4
|
+
EventData: {
|
|
5
|
+
authType: "email" | "passkey_anon" | "passkey_email" | "oauthReturn";
|
|
6
|
+
provider?: never;
|
|
7
|
+
} | {
|
|
8
|
+
authType: "oauth";
|
|
9
|
+
provider: string;
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
EventName: "signer_sign_message";
|
|
14
|
+
EventData: undefined;
|
|
15
|
+
}
|
|
16
|
+
];
|
|
17
|
+
export declare const SignerLogger: import("@account-kit/logging").EventLogger<SignerEventsSchema>;
|
|
18
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/metrics.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,kBAAkB,GAAG;IAC/B;QACE,SAAS,EAAE,oBAAoB,CAAC;QAChC,SAAS,EACL;YACE,QAAQ,EAAE,OAAO,GAAG,cAAc,GAAG,eAAe,GAAG,aAAa,CAAC;YACrE,QAAQ,CAAC,EAAE,KAAK,CAAC;SAClB,GACD;YAAE,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7C;IACD;QACE,SAAS,EAAE,qBAAqB,CAAC;QACjC,SAAS,EAAE,SAAS,CAAC;KACtB;CACF,CAAC;AAEF,eAAO,MAAM,YAAY,gEAGvB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { KnownAuthProvider } from "./signer";
|
|
2
|
+
/**
|
|
3
|
+
* Turnkey requires the nonce in the id token to be in this format.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} turnkeyPublicKey key from a Turnkey iframe
|
|
6
|
+
* @returns {string} nonce to be used in OIDC
|
|
7
|
+
*/
|
|
8
|
+
export declare function getOauthNonce(turnkeyPublicKey: string): string;
|
|
9
|
+
export type ScopeAndClaims = {
|
|
10
|
+
scope: string;
|
|
11
|
+
claims?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Returns the default scope and claims when using a known auth provider
|
|
15
|
+
*
|
|
16
|
+
* @param {string} knownAuthProviderId id of a known auth provider, e.g. "google"
|
|
17
|
+
* @returns {ScopeAndClaims | undefined} default scope and claims
|
|
18
|
+
*/
|
|
19
|
+
export declare function getDefaultScopeAndClaims(knownAuthProviderId: KnownAuthProvider): ScopeAndClaims | undefined;
|
|
20
|
+
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/oauth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AASF;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,mBAAmB,EAAE,iBAAiB,GACrC,cAAc,GAAG,SAAS,CAE5B"}
|
|
@@ -10,14 +10,14 @@ export declare const SessionManagerParamsSchema: z.ZodObject<{
|
|
|
10
10
|
expirationTimeMs: z.ZodDefault<z.ZodNumber>;
|
|
11
11
|
client: z.ZodType<BaseSignerClient<unknown>, z.ZodTypeDef, BaseSignerClient<unknown>>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
storage: (Storage | "localStorage" | "sessionStorage") & (Storage | "localStorage" | "sessionStorage" | undefined);
|
|
13
14
|
sessionKey: string;
|
|
14
|
-
storage: ("localStorage" | "sessionStorage" | Storage) & ("localStorage" | "sessionStorage" | Storage | undefined);
|
|
15
15
|
expirationTimeMs: number;
|
|
16
16
|
client: BaseSignerClient<unknown>;
|
|
17
17
|
}, {
|
|
18
18
|
client: BaseSignerClient<unknown>;
|
|
19
19
|
sessionKey?: string | undefined;
|
|
20
|
-
storage?: "localStorage" | "sessionStorage" |
|
|
20
|
+
storage?: Storage | "localStorage" | "sessionStorage" | undefined;
|
|
21
21
|
expirationTimeMs?: number | undefined;
|
|
22
22
|
}>;
|
|
23
23
|
export type SessionManagerParams = z.input<typeof SessionManagerParamsSchema>;
|
|
@@ -42,5 +42,6 @@ export declare class SessionManager {
|
|
|
42
42
|
initialize(): void;
|
|
43
43
|
private getInitialState;
|
|
44
44
|
private registerEventListeners;
|
|
45
|
+
private setSessionWithUserAndBundle;
|
|
45
46
|
}
|
|
46
47
|
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src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;IAEF,OAAO,CAAC,UAAU,CAWhB;IAEK,UAAU;IAYjB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,sBAAsB,CAwC5B;IAEF,OAAO,CAAC,2BAA2B,CAsBjC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/session/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,OAAO,GACf;IACE,IAAI,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/session/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,OAAO,GACf;IACE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,IAAI,CAAC;IACrB,WAAW,IAAI,IAAI,CAAC;CACrB,CAAC"}
|