@account-kit/signer 4.0.0-alpha.9 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/base.d.ts +286 -3
- package/dist/esm/base.js +307 -1
- package/dist/esm/base.js.map +1 -1
- package/dist/esm/client/base.d.ts +80 -1
- package/dist/esm/client/base.js +97 -0
- package/dist/esm/client/base.js.map +1 -1
- package/dist/esm/client/index.d.ts +162 -0
- package/dist/esm/client/index.js +167 -1
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/client/types.d.ts +4 -0
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/session/manager.js +18 -1
- package/dist/esm/session/manager.js.map +1 -1
- package/dist/esm/signer.d.ts +28 -0
- package/dist/esm/signer.js +24 -0
- package/dist/esm/signer.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +3 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/base.d.ts +1 -3
- package/dist/types/base.d.ts.map +1 -1
- package/dist/types/client/base.d.ts +11 -1
- package/dist/types/client/base.d.ts.map +1 -1
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/types/client/types.d.ts +4 -0
- package/dist/types/client/types.d.ts.map +1 -1
- package/dist/types/signer.d.ts +4 -3
- package/dist/types/signer.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +10 -15
- package/src/base.ts +17 -3
- package/src/client/base.ts +21 -2
- package/src/client/index.ts +2 -1
- package/src/client/types.ts +5 -0
- package/src/signer.ts +5 -0
- package/src/version.ts +1 -1
- package/dist/cjs/base.d.ts +0 -37
- package/dist/cjs/base.js +0 -292
- package/dist/cjs/base.js.map +0 -1
- package/dist/cjs/client/base.d.ts +0 -230
- package/dist/cjs/client/base.js +0 -298
- package/dist/cjs/client/base.js.map +0 -1
- package/dist/cjs/client/index.d.ts +0 -146
- package/dist/cjs/client/index.js +0 -260
- package/dist/cjs/client/index.js.map +0 -1
- package/dist/cjs/client/types.d.ts +0 -106
- package/dist/cjs/client/types.js +0 -3
- package/dist/cjs/client/types.js.map +0 -1
- package/dist/cjs/errors.d.ts +0 -4
- package/dist/cjs/errors.js +0 -16
- package/dist/cjs/errors.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -9
- package/dist/cjs/index.js +0 -16
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/session/manager.d.ts +0 -45
- package/dist/cjs/session/manager.js +0 -230
- package/dist/cjs/session/manager.js.map +0 -1
- package/dist/cjs/session/types.d.ts +0 -16
- package/dist/cjs/session/types.js +0 -3
- package/dist/cjs/session/types.js.map +0 -1
- package/dist/cjs/signer.d.ts +0 -262
- package/dist/cjs/signer.js +0 -34
- package/dist/cjs/signer.js.map +0 -1
- package/dist/cjs/types.d.ts +0 -14
- package/dist/cjs/types.js +0 -12
- package/dist/cjs/types.js.map +0 -1
- package/dist/cjs/utils/base64UrlEncode.d.ts +0 -1
- package/dist/cjs/utils/base64UrlEncode.js +0 -12
- package/dist/cjs/utils/base64UrlEncode.js.map +0 -1
- package/dist/cjs/utils/generateRandomBuffer.d.ts +0 -1
- package/dist/cjs/utils/generateRandomBuffer.js +0 -10
- package/dist/cjs/utils/generateRandomBuffer.js.map +0 -1
- package/dist/cjs/version.d.ts +0 -1
- package/dist/cjs/version.js +0 -5
- package/dist/cjs/version.js.map +0 -1
- package/dist/esm/package.json +0 -1
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,YAAY,EACjB,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,mBAAmB,EAC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CAAC,EAAE,yBAAyB,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAGjE;IAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAkD3B;IAEF,OAAO,CAAC,uBAAuB,CAoC7B;IAEF,OAAO,CAAC,iBAAiB,CA0BvB;CACH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ConnectionConfig } from "@aa-sdk/core";
|
|
2
|
-
import { TurnkeyClient } from "@turnkey/http";
|
|
2
|
+
import { TurnkeyClient, type TSignedRequest } from "@turnkey/http";
|
|
3
3
|
import EventEmitter from "eventemitter3";
|
|
4
4
|
import type { Hex } from "viem";
|
|
5
5
|
import type { AlchemySignerClientEvents, CreateAccountParams, EmailAuthParams, GetWebAuthnAttestationResult, SignerBody, SignerResponse, SignupResponse, User } from "./types.js";
|
|
@@ -87,6 +87,16 @@ export declare abstract class BaseSignerClient<TExportWalletParams = unknown> {
|
|
|
87
87
|
* @throws {Error} if no organization ID is provided when there is no current user
|
|
88
88
|
*/
|
|
89
89
|
whoami: (orgId?: string | undefined) => Promise<User>;
|
|
90
|
+
/**
|
|
91
|
+
* 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
|
+
* 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
|
|
93
|
+
* and then call our API to get the user information. Using this stamp is the most trusted way to get the user information since a stamp can only
|
|
94
|
+
* belong to the user who created it.
|
|
95
|
+
*
|
|
96
|
+
* @returns {Promise<TSignedRequest>} a promise that resolves to the "whoami" information for the logged in user
|
|
97
|
+
* @throws {Error} if no organization ID is provided
|
|
98
|
+
*/
|
|
99
|
+
stampWhoami: () => Promise<TSignedRequest>;
|
|
90
100
|
/**
|
|
91
101
|
* Looks up information based on an email address.
|
|
92
102
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/client/base.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;AACzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAGhC,OAAO,KAAK,EAEV,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,4BAA4B,EAC5B,UAAU,EACV,cAAc,EAEd,cAAc,EACd,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAClC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC,SAAS,CAAC,GAAG;IAC3D,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3D,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,SAAS,IAAI,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,8BAAsB,gBAAgB,CAAC,mBAAmB,GAAG,OAAO;IAClE,OAAO,CAAC,KAAK,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Ae,CAAkB;IACzC,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;;;;;;;;;;;;OAsBG;gBACS,MAAM,EAAE,yBAAyB;IAwB7C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,aAAa,WAAkB,mBAAmB,kDAwChD;IAEF;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACI,aAAa,WACV,KAAK,eAAe,EAAE,iBAAiB,CAAC;;OAYhD;IAEF;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,iBAAiB;gBAId,MAAM;eACP,MAAM;wBAeb;IAEF;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,qBAAqB,UAAgB,IAAI,GAAG,SAAS,mBAa1D;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACI,YAAY,4CAGhB,kBAAkB,sBAmBnB;IAEF;;;;;;;;;;;;;;;;;;OAkBG;IACI,UAAU,sBAGf;IAEF,OAAO,CAAC,iBAAiB,CAQvB;IAEF,OAAO,CAAC,mBAAmB,CAYzB;IAEF,SAAS,CAAC,sBAAsB,aACpB,iCAAiC,gBAC9B;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE;;;;;;;;;OAmDjC;CACH"}
|
|
@@ -20,6 +20,10 @@ export type CreateAccountParams = {
|
|
|
20
20
|
email: string;
|
|
21
21
|
expirationSeconds?: number;
|
|
22
22
|
redirectParams?: URLSearchParams;
|
|
23
|
+
} | {
|
|
24
|
+
type: "passkey";
|
|
25
|
+
email: string;
|
|
26
|
+
creationOpts?: CredentialCreationOptionOverrides;
|
|
23
27
|
} | {
|
|
24
28
|
type: "passkey";
|
|
25
29
|
username: string;
|
|
@@ -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,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,M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,cAAc,IAAI,IAAI,CAAC;IACvB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IACnC,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/signer.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ export type AuthParams = {
|
|
|
10
10
|
type: "email";
|
|
11
11
|
bundle: string;
|
|
12
12
|
orgId?: string;
|
|
13
|
+
} | {
|
|
14
|
+
type: "passkey";
|
|
15
|
+
email: string;
|
|
16
|
+
creationOpts?: CredentialCreationOptionOverrides;
|
|
13
17
|
} | {
|
|
14
18
|
type: "passkey";
|
|
15
19
|
createNew: false;
|
|
@@ -48,9 +52,6 @@ export declare const AlchemySignerParamsSchema: z.ZodObject<{
|
|
|
48
52
|
}>, z.ZodObject<{
|
|
49
53
|
rpcUrl: z.ZodString;
|
|
50
54
|
apiKey: z.ZodOptional<z.ZodNever>;
|
|
51
|
-
/**
|
|
52
|
-
* A SmartAccountSigner that can be used with any SmartContractAccount
|
|
53
|
-
*/
|
|
54
55
|
jwt: z.ZodOptional<z.ZodNever>;
|
|
55
56
|
}, "strip", z.ZodTypeAny, {
|
|
56
57
|
rpcUrl: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,M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E,iCAAiC,CAAC;CAClD,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC;CAClB,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,iCAAiC,CAAC;CAClD,CAAC;AAEN,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQlC,CAAC;AAEL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC;IAC7E;;;;;;;;;;;;;;;;;;;;OAoBG;gBACS,MAAM,EAAE,mBAAmB;CAexC"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.0-
|
|
1
|
+
export declare const VERSION = "4.0.0-beta.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@account-kit/signer",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.1",
|
|
4
4
|
"description": "Core interfaces and clients for interfacing with the Alchemy Signer API",
|
|
5
5
|
"author": "Alchemy",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
8
8
|
"type": "module",
|
|
9
|
-
"main": "./dist/
|
|
9
|
+
"main": "./dist/esm/index.js",
|
|
10
10
|
"module": "./dist/esm/index.js",
|
|
11
11
|
"types": "./dist/types/index.d.ts",
|
|
12
12
|
"typings": "./dist/types/index.d.ts",
|
|
@@ -24,16 +24,15 @@
|
|
|
24
24
|
".": {
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
26
|
"import": "./dist/esm/index.js",
|
|
27
|
-
"default": "./dist/
|
|
27
|
+
"default": "./dist/esm/index.js"
|
|
28
28
|
},
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"prebuild": "
|
|
33
|
-
"build": "yarn clean && yarn build:
|
|
34
|
-
"build:
|
|
35
|
-
"build:
|
|
36
|
-
"build:types": "tsc --project tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
|
|
32
|
+
"prebuild": "npx tsx ./inject-version.ts",
|
|
33
|
+
"build": "yarn clean && yarn build:esm && yarn build:types",
|
|
34
|
+
"build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm",
|
|
35
|
+
"build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
|
|
37
36
|
"docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/signer",
|
|
38
37
|
"clean": "rm -rf ./dist",
|
|
39
38
|
"test": "vitest --passWithNoTests",
|
|
@@ -50,19 +49,15 @@
|
|
|
50
49
|
"vitest": "^2.0.4"
|
|
51
50
|
},
|
|
52
51
|
"dependencies": {
|
|
53
|
-
"@aa-sdk/core": "^4.0.0-
|
|
52
|
+
"@aa-sdk/core": "^4.0.0-beta.1",
|
|
54
53
|
"@turnkey/http": "^2.6.2",
|
|
55
54
|
"@turnkey/iframe-stamper": "^1.0.0",
|
|
56
55
|
"@turnkey/viem": "^0.4.8",
|
|
57
56
|
"@turnkey/webauthn-stamper": "^0.4.3",
|
|
58
|
-
"viem": "2.8.6",
|
|
59
57
|
"zod": "^3.22.4"
|
|
60
58
|
},
|
|
61
59
|
"peerDependencies": {
|
|
62
|
-
"viem": "2.
|
|
63
|
-
},
|
|
64
|
-
"resolutions": {
|
|
65
|
-
"viem": "2.8.6"
|
|
60
|
+
"viem": "^2.20.0"
|
|
66
61
|
},
|
|
67
62
|
"publishConfig": {
|
|
68
63
|
"access": "public",
|
|
@@ -76,5 +71,5 @@
|
|
|
76
71
|
"url": "https://github.com/alchemyplatform/aa-sdk/issues"
|
|
77
72
|
},
|
|
78
73
|
"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
|
|
79
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "5e0db61aaa6b55e7da3e04d00822392b946b3882"
|
|
80
75
|
}
|
package/src/base.ts
CHANGED
|
@@ -313,7 +313,7 @@ export abstract class BaseAlchemySigner<TClient extends BaseSignerClient>
|
|
|
313
313
|
* @returns {Promise<any>} A promise that resolves to the signed message
|
|
314
314
|
*/
|
|
315
315
|
signTypedData: <
|
|
316
|
-
const TTypedData extends TypedData |
|
|
316
|
+
const TTypedData extends TypedData | Record<string, unknown>,
|
|
317
317
|
TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData
|
|
318
318
|
>(
|
|
319
319
|
params: TypedDataDefinition<TTypedData, TPrimaryType>
|
|
@@ -570,8 +570,22 @@ export abstract class BaseAlchemySigner<TClient extends BaseSignerClient>
|
|
|
570
570
|
args: Extract<AuthParams, { type: "passkey" }>
|
|
571
571
|
) => {
|
|
572
572
|
let user: User;
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
const shouldCreateNew = async () => {
|
|
574
|
+
if ("email" in args) {
|
|
575
|
+
const existingUser = await this.getUser(args.email);
|
|
576
|
+
return existingUser == null;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
return args.createNew;
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
if (await shouldCreateNew()) {
|
|
583
|
+
const result = await this.inner.createAccount(
|
|
584
|
+
args as Extract<
|
|
585
|
+
AuthParams,
|
|
586
|
+
{ type: "passkey" } & ({ email: string } | { createNew: true })
|
|
587
|
+
>
|
|
588
|
+
);
|
|
575
589
|
// account creation for passkeys returns the whoami response so we don't have to
|
|
576
590
|
// call it again after signup
|
|
577
591
|
user = {
|
package/src/client/base.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ConnectionConfig
|
|
2
|
-
import { TurnkeyClient } from "@turnkey/http";
|
|
1
|
+
import { ConnectionConfigSchema, type ConnectionConfig } from "@aa-sdk/core";
|
|
2
|
+
import { TurnkeyClient, type TSignedRequest } from "@turnkey/http";
|
|
3
3
|
import EventEmitter from "eventemitter3";
|
|
4
4
|
import type { Hex } from "viem";
|
|
5
5
|
import { NotAuthenticatedError } from "../errors.js";
|
|
@@ -227,6 +227,25 @@ export abstract class BaseSignerClient<TExportWalletParams = unknown> {
|
|
|
227
227
|
return this.user;
|
|
228
228
|
};
|
|
229
229
|
|
|
230
|
+
/**
|
|
231
|
+
* 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.
|
|
232
|
+
* 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
|
|
233
|
+
* and then call our API to get the user information. Using this stamp is the most trusted way to get the user information since a stamp can only
|
|
234
|
+
* belong to the user who created it.
|
|
235
|
+
*
|
|
236
|
+
* @returns {Promise<TSignedRequest>} a promise that resolves to the "whoami" information for the logged in user
|
|
237
|
+
* @throws {Error} if no organization ID is provided
|
|
238
|
+
*/
|
|
239
|
+
public stampWhoami = async (): Promise<TSignedRequest> => {
|
|
240
|
+
if (!this.user) {
|
|
241
|
+
throw new Error("User must be authenticated to stamp a whoami request");
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return await this.turnkeyClient.stampGetWhoami({
|
|
245
|
+
organizationId: this.user.orgId,
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
|
|
230
249
|
/**
|
|
231
250
|
* Looks up information based on an email address.
|
|
232
251
|
*
|
package/src/client/index.ts
CHANGED
|
@@ -128,7 +128,7 @@ export class AlchemySignerWebClient extends BaseSignerClient<ExportWalletParams>
|
|
|
128
128
|
// Passkey account creation flow
|
|
129
129
|
const { attestation, challenge } = await this.getWebAuthnAttestation(
|
|
130
130
|
params.creationOpts,
|
|
131
|
-
{ username: params.username }
|
|
131
|
+
{ username: "email" in params ? params.email : params.username }
|
|
132
132
|
);
|
|
133
133
|
|
|
134
134
|
const result = await this.request("/v1/signup", {
|
|
@@ -136,6 +136,7 @@ export class AlchemySignerWebClient extends BaseSignerClient<ExportWalletParams>
|
|
|
136
136
|
challenge: base64UrlEncode(challenge),
|
|
137
137
|
attestation,
|
|
138
138
|
},
|
|
139
|
+
email: "email" in params ? params.email : undefined,
|
|
139
140
|
});
|
|
140
141
|
|
|
141
142
|
this.user = {
|
package/src/client/types.ts
CHANGED
|
@@ -28,6 +28,11 @@ export type CreateAccountParams =
|
|
|
28
28
|
expirationSeconds?: number;
|
|
29
29
|
redirectParams?: URLSearchParams;
|
|
30
30
|
}
|
|
31
|
+
| {
|
|
32
|
+
type: "passkey";
|
|
33
|
+
email: string;
|
|
34
|
+
creationOpts?: CredentialCreationOptionOverrides;
|
|
35
|
+
}
|
|
31
36
|
| {
|
|
32
37
|
type: "passkey";
|
|
33
38
|
username: string;
|
package/src/signer.ts
CHANGED
|
@@ -10,6 +10,11 @@ import { SessionManagerParamsSchema } from "./session/manager.js";
|
|
|
10
10
|
export type AuthParams =
|
|
11
11
|
| { type: "email"; email: string; redirectParams?: URLSearchParams }
|
|
12
12
|
| { type: "email"; bundle: string; orgId?: string }
|
|
13
|
+
| {
|
|
14
|
+
type: "passkey";
|
|
15
|
+
email: string;
|
|
16
|
+
creationOpts?: CredentialCreationOptionOverrides;
|
|
17
|
+
}
|
|
13
18
|
| {
|
|
14
19
|
type: "passkey";
|
|
15
20
|
createNew: false;
|
package/src/version.ts
CHANGED
package/dist/cjs/base.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { type SmartAccountAuthenticator } from "@aa-sdk/core";
|
|
2
|
-
import { type CustomSource, type Hex, type LocalAccount, type SignableMessage, type TypedData, type TypedDataDefinition } from "viem";
|
|
3
|
-
import type { BaseSignerClient } from "./client/base";
|
|
4
|
-
import type { User } from "./client/types";
|
|
5
|
-
import { type SessionManagerParams } from "./session/manager.js";
|
|
6
|
-
import type { AuthParams } from "./signer";
|
|
7
|
-
import { type AlchemySignerEvents } from "./types.js";
|
|
8
|
-
export interface BaseAlchemySignerParams<TClient extends BaseSignerClient> {
|
|
9
|
-
client: TClient;
|
|
10
|
-
sessionConfig?: Omit<SessionManagerParams, "client">;
|
|
11
|
-
}
|
|
12
|
-
export declare abstract class BaseAlchemySigner<TClient extends BaseSignerClient> implements SmartAccountAuthenticator<AuthParams, User, TClient> {
|
|
13
|
-
signerType: string;
|
|
14
|
-
inner: TClient;
|
|
15
|
-
private sessionManager;
|
|
16
|
-
private store;
|
|
17
|
-
constructor({ client, sessionConfig }: BaseAlchemySignerParams<TClient>);
|
|
18
|
-
on: <E extends keyof AlchemySignerEvents>(event: E, listener: AlchemySignerEvents[E]) => () => void;
|
|
19
|
-
authenticate: (params: AuthParams) => Promise<User>;
|
|
20
|
-
disconnect: () => Promise<void>;
|
|
21
|
-
getAuthDetails: () => Promise<User>;
|
|
22
|
-
getAddress: () => Promise<`0x${string}`>;
|
|
23
|
-
signMessage: (msg: SignableMessage) => Promise<`0x${string}`>;
|
|
24
|
-
signTypedData: <const TTypedData extends TypedData | {
|
|
25
|
-
[key: string]: unknown;
|
|
26
|
-
}, TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData>(params: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
|
|
27
|
-
signTransaction: CustomSource["signTransaction"];
|
|
28
|
-
getUser: (email: string) => Promise<{
|
|
29
|
-
orgId: string;
|
|
30
|
-
} | null>;
|
|
31
|
-
addPasskey: (params?: CredentialCreationOptions) => Promise<string[]>;
|
|
32
|
-
exportWallet: (params: Parameters<(typeof this.inner)["exportWallet"]>[0]) => Promise<boolean>;
|
|
33
|
-
toViemAccount: () => LocalAccount;
|
|
34
|
-
private authenticateWithEmail;
|
|
35
|
-
private authenticateWithPasskey;
|
|
36
|
-
private registerListeners;
|
|
37
|
-
}
|
package/dist/cjs/base.js
DELETED
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseAlchemySigner = void 0;
|
|
4
|
-
const core_1 = require("@aa-sdk/core");
|
|
5
|
-
const viem_1 = require("viem");
|
|
6
|
-
const accounts_1 = require("viem/accounts");
|
|
7
|
-
const middleware_1 = require("zustand/middleware");
|
|
8
|
-
const vanilla_1 = require("zustand/vanilla");
|
|
9
|
-
const errors_js_1 = require("./errors.js");
|
|
10
|
-
const manager_js_1 = require("./session/manager.js");
|
|
11
|
-
const types_js_1 = require("./types.js");
|
|
12
|
-
class BaseAlchemySigner {
|
|
13
|
-
constructor({ client, sessionConfig }) {
|
|
14
|
-
Object.defineProperty(this, "signerType", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true,
|
|
18
|
-
value: "alchemy-signer"
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(this, "inner", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
configurable: true,
|
|
23
|
-
writable: true,
|
|
24
|
-
value: void 0
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(this, "sessionManager", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true,
|
|
30
|
-
value: void 0
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(this, "store", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
writable: true,
|
|
36
|
-
value: void 0
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(this, "on", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true,
|
|
42
|
-
value: (event, listener) => {
|
|
43
|
-
switch (event) {
|
|
44
|
-
case "connected":
|
|
45
|
-
return this.store.subscribe(({ status }) => status, (status) => status === types_js_1.AlchemySignerStatus.CONNECTED &&
|
|
46
|
-
listener(this.store.getState().user), { fireImmediately: true });
|
|
47
|
-
case "disconnected":
|
|
48
|
-
return this.store.subscribe(({ status }) => status, (status) => status === types_js_1.AlchemySignerStatus.DISCONNECTED &&
|
|
49
|
-
listener(), { fireImmediately: true });
|
|
50
|
-
case "statusChanged":
|
|
51
|
-
return this.store.subscribe(({ status }) => status, listener, { fireImmediately: true });
|
|
52
|
-
default:
|
|
53
|
-
throw new Error(`Uknown event type ${event}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
Object.defineProperty(this, "authenticate", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
configurable: true,
|
|
60
|
-
writable: true,
|
|
61
|
-
value: async (params) => {
|
|
62
|
-
if (params.type === "email") {
|
|
63
|
-
return this.authenticateWithEmail(params);
|
|
64
|
-
}
|
|
65
|
-
return this.authenticateWithPasskey(params);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(this, "disconnect", {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
configurable: true,
|
|
71
|
-
writable: true,
|
|
72
|
-
value: async () => {
|
|
73
|
-
await this.inner.disconnect();
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(this, "getAuthDetails", {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
configurable: true,
|
|
79
|
-
writable: true,
|
|
80
|
-
value: async () => {
|
|
81
|
-
const sessionUser = await this.sessionManager.getSessionUser();
|
|
82
|
-
if (sessionUser != null) {
|
|
83
|
-
return sessionUser;
|
|
84
|
-
}
|
|
85
|
-
return this.inner.whoami();
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
Object.defineProperty(this, "getAddress", {
|
|
89
|
-
enumerable: true,
|
|
90
|
-
configurable: true,
|
|
91
|
-
writable: true,
|
|
92
|
-
value: async () => {
|
|
93
|
-
const { address } = await this.inner.whoami();
|
|
94
|
-
return address;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
Object.defineProperty(this, "signMessage", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
configurable: true,
|
|
100
|
-
writable: true,
|
|
101
|
-
value: async (msg) => {
|
|
102
|
-
const messageHash = (0, viem_1.hashMessage)(msg);
|
|
103
|
-
return this.inner.signRawMessage(messageHash);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
Object.defineProperty(this, "signTypedData", {
|
|
107
|
-
enumerable: true,
|
|
108
|
-
configurable: true,
|
|
109
|
-
writable: true,
|
|
110
|
-
value: async (params) => {
|
|
111
|
-
const messageHash = (0, viem_1.hashTypedData)(params);
|
|
112
|
-
return this.inner.signRawMessage(messageHash);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
Object.defineProperty(this, "signTransaction", {
|
|
116
|
-
enumerable: true,
|
|
117
|
-
configurable: true,
|
|
118
|
-
writable: true,
|
|
119
|
-
value: async (tx, args) => {
|
|
120
|
-
const serializeFn = args?.serializer ?? viem_1.serializeTransaction;
|
|
121
|
-
const serializedTx = serializeFn(tx);
|
|
122
|
-
const signatureHex = await this.inner.signRawMessage((0, viem_1.keccak256)(serializedTx));
|
|
123
|
-
const signature = {
|
|
124
|
-
r: (0, core_1.takeBytes)(signatureHex, { count: 32 }),
|
|
125
|
-
s: (0, core_1.takeBytes)(signatureHex, { count: 32, offset: 32 }),
|
|
126
|
-
v: BigInt((0, core_1.takeBytes)(signatureHex, { count: 1, offset: 64 })),
|
|
127
|
-
};
|
|
128
|
-
return serializeFn(tx, signature);
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
Object.defineProperty(this, "getUser", {
|
|
132
|
-
enumerable: true,
|
|
133
|
-
configurable: true,
|
|
134
|
-
writable: true,
|
|
135
|
-
value: async (email) => {
|
|
136
|
-
const result = await this.inner.lookupUserByEmail(email);
|
|
137
|
-
if (result.orgId == null) {
|
|
138
|
-
return null;
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
orgId: result.orgId,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
Object.defineProperty(this, "addPasskey", {
|
|
146
|
-
enumerable: true,
|
|
147
|
-
configurable: true,
|
|
148
|
-
writable: true,
|
|
149
|
-
value: async (params) => {
|
|
150
|
-
return this.inner.addPasskey(params ?? {});
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
Object.defineProperty(this, "exportWallet", {
|
|
154
|
-
enumerable: true,
|
|
155
|
-
configurable: true,
|
|
156
|
-
writable: true,
|
|
157
|
-
value: async (params) => {
|
|
158
|
-
return this.inner.exportWallet(params);
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
Object.defineProperty(this, "toViemAccount", {
|
|
162
|
-
enumerable: true,
|
|
163
|
-
configurable: true,
|
|
164
|
-
writable: true,
|
|
165
|
-
value: () => {
|
|
166
|
-
if (!this.inner.getUser()) {
|
|
167
|
-
throw new errors_js_1.NotAuthenticatedError();
|
|
168
|
-
}
|
|
169
|
-
return (0, accounts_1.toAccount)({
|
|
170
|
-
address: this.inner.getUser().address,
|
|
171
|
-
signMessage: (msg) => this.signMessage(msg.message),
|
|
172
|
-
signTypedData: (typedDataDefinition) => this.signTypedData(typedDataDefinition),
|
|
173
|
-
signTransaction: this.signTransaction,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
Object.defineProperty(this, "authenticateWithEmail", {
|
|
178
|
-
enumerable: true,
|
|
179
|
-
configurable: true,
|
|
180
|
-
writable: true,
|
|
181
|
-
value: async (params) => {
|
|
182
|
-
if ("email" in params) {
|
|
183
|
-
const existingUser = await this.getUser(params.email);
|
|
184
|
-
const { orgId } = existingUser
|
|
185
|
-
? await this.inner.initEmailAuth({
|
|
186
|
-
email: params.email,
|
|
187
|
-
expirationSeconds: this.sessionManager.expirationTimeMs,
|
|
188
|
-
redirectParams: params.redirectParams,
|
|
189
|
-
})
|
|
190
|
-
: await this.inner.createAccount({
|
|
191
|
-
type: "email",
|
|
192
|
-
email: params.email,
|
|
193
|
-
expirationSeconds: this.sessionManager.expirationTimeMs,
|
|
194
|
-
redirectParams: params.redirectParams,
|
|
195
|
-
});
|
|
196
|
-
this.sessionManager.setTemporarySession({ orgId });
|
|
197
|
-
this.store.setState({ status: types_js_1.AlchemySignerStatus.AWAITING_EMAIL_AUTH });
|
|
198
|
-
return new Promise((resolve) => {
|
|
199
|
-
const removeListener = this.sessionManager.on("connected", (session) => {
|
|
200
|
-
resolve(session.user);
|
|
201
|
-
removeListener();
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
const temporarySession = params.orgId
|
|
207
|
-
? { orgId: params.orgId }
|
|
208
|
-
: this.sessionManager.getTemporarySession();
|
|
209
|
-
if (!temporarySession) {
|
|
210
|
-
this.store.setState({ status: types_js_1.AlchemySignerStatus.DISCONNECTED });
|
|
211
|
-
throw new Error("Could not find email auth init session!");
|
|
212
|
-
}
|
|
213
|
-
const user = await this.inner.completeEmailAuth({
|
|
214
|
-
bundle: params.bundle,
|
|
215
|
-
orgId: temporarySession.orgId,
|
|
216
|
-
});
|
|
217
|
-
return user;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
Object.defineProperty(this, "authenticateWithPasskey", {
|
|
222
|
-
enumerable: true,
|
|
223
|
-
configurable: true,
|
|
224
|
-
writable: true,
|
|
225
|
-
value: async (args) => {
|
|
226
|
-
let user;
|
|
227
|
-
if (args.createNew) {
|
|
228
|
-
const result = await this.inner.createAccount(args);
|
|
229
|
-
user = {
|
|
230
|
-
address: result.address,
|
|
231
|
-
userId: result.userId,
|
|
232
|
-
orgId: result.orgId,
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
user = await this.inner.lookupUserWithPasskey();
|
|
237
|
-
if (!user) {
|
|
238
|
-
this.store.setState({ status: types_js_1.AlchemySignerStatus.DISCONNECTED });
|
|
239
|
-
throw new Error("No user found");
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return user;
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
Object.defineProperty(this, "registerListeners", {
|
|
246
|
-
enumerable: true,
|
|
247
|
-
configurable: true,
|
|
248
|
-
writable: true,
|
|
249
|
-
value: () => {
|
|
250
|
-
this.sessionManager.on("connected", (session) => {
|
|
251
|
-
this.store.setState({
|
|
252
|
-
user: session.user,
|
|
253
|
-
status: types_js_1.AlchemySignerStatus.CONNECTED,
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
this.sessionManager.on("disconnected", () => {
|
|
257
|
-
this.store.setState({
|
|
258
|
-
user: null,
|
|
259
|
-
status: types_js_1.AlchemySignerStatus.DISCONNECTED,
|
|
260
|
-
});
|
|
261
|
-
});
|
|
262
|
-
this.sessionManager.on("initialized", () => {
|
|
263
|
-
this.store.setState((state) => ({
|
|
264
|
-
status: state.user
|
|
265
|
-
? types_js_1.AlchemySignerStatus.CONNECTED
|
|
266
|
-
: types_js_1.AlchemySignerStatus.DISCONNECTED,
|
|
267
|
-
}));
|
|
268
|
-
});
|
|
269
|
-
this.inner.on("authenticating", () => {
|
|
270
|
-
this.store.setState({ status: types_js_1.AlchemySignerStatus.AUTHENTICATING });
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
this.inner = client;
|
|
275
|
-
this.store = (0, vanilla_1.createStore)((0, middleware_1.subscribeWithSelector)(() => ({
|
|
276
|
-
user: null,
|
|
277
|
-
status: types_js_1.AlchemySignerStatus.INITIALIZING,
|
|
278
|
-
})));
|
|
279
|
-
this.sessionManager = new manager_js_1.SessionManager({
|
|
280
|
-
...sessionConfig,
|
|
281
|
-
client: this.inner,
|
|
282
|
-
});
|
|
283
|
-
this.store = (0, vanilla_1.createStore)((0, middleware_1.subscribeWithSelector)(() => ({
|
|
284
|
-
user: null,
|
|
285
|
-
status: types_js_1.AlchemySignerStatus.INITIALIZING,
|
|
286
|
-
})));
|
|
287
|
-
this.registerListeners();
|
|
288
|
-
this.sessionManager.initialize();
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
exports.BaseAlchemySigner = BaseAlchemySigner;
|
|
292
|
-
//# sourceMappingURL=base.js.map
|