Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
567402c
fix(package.json): upgraded esbuild to 0.19.2 to satisfy Nx, removed …
Ansonhkg Sep 5, 2025
85bf7ac
refactor(package.json): bun to npm
Ansonhkg Sep 5, 2025
48c0c07
refactor(Bun > npm + Jest): Jest runs E2E via Babel (uniform TS/ESM),…
Ansonhkg Sep 5, 2025
f64f3e6
fix(e2e): add force exit for npm e2e test
Ansonhkg Sep 5, 2025
26df601
refactor(Bun > npm + Jest): Jest runs E2E via Babel (uniform TS/ESM),…
Ansonhkg Sep 5, 2025
77586c1
fix(e2e): add force exit for npm e2e test
Ansonhkg Sep 5, 2025
e2fca2a
refactor(artillery): migrate from using Bun to npm
Ansonhkg Sep 5, 2025
30bf9da
fix(package): fix a peer-dependency conflicts where `[email protected]`…
Ansonhkg Sep 8, 2025
2e53cfc
refactor(pnpm): migrate from package-lock.json to pnpm-lock.yaml and …
Ansonhkg Sep 8, 2025
0e41fc5
fix(pnpm): resolve warnings for pnpm:
Ansonhkg Sep 8, 2025
9ed7fe1
chore(package): remove unused dependencies and scripts
Ansonhkg Sep 9, 2025
0dad0a8
chore(scripts): remove unused script
Ansonhkg Sep 9, 2025
81012f7
chore(package): migrate package types from commonjs to module for con…
Ansonhkg Sep 10, 2025
0779fe7
refactor(auth-services): migrate away from using Bun
Ansonhkg Sep 10, 2025
c16bc5d
refactor(auth-services): migrate away from using Bun
Ansonhkg Sep 10, 2025
f131df3
fix(networks): fix networks build issue - this fix is temporarly and …
Ansonhkg Sep 10, 2025
b3f63f9
feat(auth-services): add API key support when gating is enabled:
Ansonhkg Sep 10, 2025
ada4dc0
refactor(auth-services):
Ansonhkg Sep 10, 2025
ddfff2f
fix(types): deployed app returns Cannot find module '@ethersproject/a…
Ansonhkg Sep 10, 2025
416131c
fix(dependencies): add `@ethersproject/[email protected] ` to fix the `…
Ansonhkg Sep 10, 2025
2b8277b
fix(logger, types): use type export for types
Ansonhkg Sep 11, 2025
409d3fa
fix(auth-services): change project type from `application` to `librar…
Ansonhkg Sep 11, 2025
52ed77c
refactor(nx, package): update nx configuration and dependencies to ve…
Ansonhkg Sep 11, 2025
e62eee8
fix(build): 33 type errors from different places in the codebase. Maj…
Ansonhkg Sep 11, 2025
7780923
feat(lit-auth-server, lit-login-server): make them nx node apps and e…
Ansonhkg Sep 11, 2025
28afe72
fix(e2e): test should work again
Ansonhkg Sep 12, 2025
bac5bb2
chore: remove unused tools configuration and scripts
Ansonhkg Sep 12, 2025
9d8d389
refactor(contract-manager): improve type handling for wallet clients
Ansonhkg Sep 15, 2025
0edeb1f
refactor(e2e): moved ./e2e inside ./packages/e2e
Ansonhkg Sep 12, 2025
8a8163f
refactor(e2e): moved ./e2e inside ./packages/e2e
Ansonhkg Sep 12, 2025
151df69
chore: upload lock file
Ansonhkg Sep 12, 2025
d602829
refactor(artillery): update command scripts to include logging option…
Ansonhkg Sep 12, 2025
0a1d6fb
chore(package):
Ansonhkg Sep 12, 2025
965c117
refactor(auth, e2e):
Ansonhkg Sep 12, 2025
3c3ee94
feat(docker): add Docker support for lit-auth-server and lit-login-se…
Ansonhkg Sep 11, 2025
f59121d
fix(networks, schemas): fix build by adding the required StrictAuth d…
Ansonhkg Sep 15, 2025
8195ba6
refactor(e2e/artillery):
Ansonhkg Sep 12, 2025
25eb2a0
refactor(package): remove artillery scripts as we have nx commands al…
Ansonhkg Sep 15, 2025
1c18085
fix(e2e): update auth context types in e2e tests to use AuthContext f…
Ansonhkg Sep 15, 2025
9abb08f
fix(e2e): https://github.com/LIT-Protocol/js-sdk/pull/881#discussion_…
Ansonhkg Sep 15, 2025
dfe87bc
chore(package): update pnpm-lock.yaml
Ansonhkg Sep 18, 2025
f7b6ea5
Merge branch 'feature/jss-93-refactor-bun-pnpm' of github.com:LIT-Pro…
Ansonhkg Sep 18, 2025
a388b28
Merge pull request #891 from LIT-Protocol/feature/jss-107-refactor-mo…
Ansonhkg Sep 18, 2025
6856bdc
Merge branch 'feature/jss-93-refactor-bun-pnpm' of https://github.com…
Ansonhkg Sep 19, 2025
2fd7fd5
feat(lit-contracts): migrated away from https://github.com/Lit-Protoc…
Ansonhkg Sep 23, 2025
275a0d4
fmt
Ansonhkg Sep 23, 2025
cb48c72
fmt
Ansonhkg Sep 23, 2025
5a5e58d
Merge branch 'naga' into feat/migrate-lit-contracts-repo
Ansonhkg Sep 23, 2025
3ac0751
fix(contracts): sync prebuilt artifacts into workspace dist
Ansonhkg Sep 24, 2025
fc8e860
fmt
Ansonhkg Sep 24, 2025
642cd0b
feat(release): add initial monorepo release notes for v0.5.1
Ansonhkg Sep 24, 2025
dd2e6f4
fix(docs): update README to correct sync command for contract address…
Ansonhkg Sep 24, 2025
838bd2f
fix: https://github.com/LIT-Protocol/js-sdk/pull/889#discussion_r2372…
Ansonhkg Sep 24, 2025
dba7110
fix: unblock build (except auth-services)
Ansonhkg Sep 25, 2025
b68b8ea
Update packages/networks/src/networks/vNaga/shared/managers/state-man…
Ansonhkg Sep 25, 2025
7201203
fix: correct logger error arg order
Ansonhkg Sep 25, 2025
cdad6af
fix: https://github.com/LIT-Protocol/js-sdk/pull/892#discussion_r2376…
Ansonhkg Sep 25, 2025
d628a79
fix: https://github.com/LIT-Protocol/js-sdk/pull/892#discussion_r2376…
Ansonhkg Sep 25, 2025
36cb13a
fix: https://github.com/LIT-Protocol/js-sdk/pull/892#discussion_r2376…
Ansonhkg Sep 25, 2025
226198d
Merge branch 'feature/jss-93-refactor-bun-pnpm' into feature/jss-105-…
Ansonhkg Sep 25, 2025
cb396ca
Merge branch 'naga' of github.com:LIT-Protocol/js-sdk into feature/js…
Ansonhkg Sep 25, 2025
aa3206f
chore: update @lit-protocol/contracts version to 0.5.1 in pnpm-lock.yaml
Ansonhkg Sep 25, 2025
d9b654e
fmt
Ansonhkg Sep 25, 2025
666100c
Merge branch 'feature/jss-93-refactor-bun-pnpm' of github.com:LIT-Pro…
Ansonhkg Sep 25, 2025
138f0c7
fix: remove redundant CustomAuthDataSchema definition
Ansonhkg Sep 25, 2025
70d7219
Merge branch 'feature/jss-93-refactor-bun-pnpm' into feature/jss-105-…
Ansonhkg Sep 25, 2025
64ace59
chore: update lock file
Ansonhkg Sep 25, 2025
79d2c8e
fmt
Ansonhkg Sep 25, 2025
db98dc5
fix: remove duplicated code and remove unused mint route
Ansonhkg Sep 25, 2025
703780e
chore(CI): update CI to use pnpm instead of bun
Ansonhkg Sep 25, 2025
b6ae548
fix(ci): e2e
Ansonhkg Sep 25, 2025
bf71d65
fix(e2e): remove redundant '--' from test command
Ansonhkg Sep 25, 2025
82056e2
Merge branch 'feat/migrate-lit-contracts-repo' into feature/jss-105-r…
Ansonhkg Sep 25, 2025
668cedf
fix(e2e, ci): enable naga-test and naga-staging tests. Delete unused …
Ansonhkg Sep 25, 2025
da18bd7
fmt
Ansonhkg Sep 25, 2025
a51b88f
fix(e2e): simplify viewPKPsByAddress tests by removing unnecessary co…
Ansonhkg Sep 25, 2025
b4f7340
feat(e2e): add separate workflows for Naga Dev, Staging, and Test env…
Ansonhkg Sep 25, 2025
1ee19e8
fmt
Ansonhkg Sep 25, 2025
962505d
feat(e2e): consolidate Naga workflows into a single configuration for…
Ansonhkg Sep 25, 2025
ef9ad32
feat(e2e): create separate workflows for Naga Dev, Staging, and Test …
Ansonhkg Sep 25, 2025
e3c5760
feat(e2e): consolidate Naga workflows into a single matrix configurat…
Ansonhkg Sep 25, 2025
ffc66f8
feat(e2e): refactor environment variables and improve secret manageme…
Ansonhkg Sep 25, 2025
b58a736
feat(e2e): restructure E2E workflow to include build job and optimize…
Ansonhkg Sep 25, 2025
aa221a3
feat(e2e): add node setup and dependency installation steps in E2E job
Ansonhkg Sep 25, 2025
fcc833f
fix(e2e): remove cache option from setup-node action and update .giti…
Ansonhkg Sep 25, 2025
52f834c
fix(e2e): update artifact paths and refine health check command in E2…
Ansonhkg Sep 25, 2025
860d0b9
feat(e2e): add local CI testing command and update CI test command to…
Ansonhkg Sep 25, 2025
0b96e08
fix(e2e): update health check command to use the correct test script
Ansonhkg Sep 25, 2025
7ceb65f
fix(e2e): update artifact restoration process and ensure directories …
Ansonhkg Sep 25, 2025
7d25781
fix(e2e): remove build-output directory after restoring artifacts
Ansonhkg Sep 25, 2025
3510e92
fix(e2e): update artifact paths to reflect correct directory structure
Ansonhkg Sep 25, 2025
50e3db9
fix(e2e): add verification for required secrets and update health che…
Ansonhkg Sep 25, 2025
7e0de65
fix(e2e): update secret verification messages to include network context
Ansonhkg Sep 25, 2025
3461d00
fix(e2e): improve nonce management logic to prevent concurrent collis…
Ansonhkg Sep 26, 2025
ecff945
fix(e2e): update health check command to run all tests
Ansonhkg Sep 26, 2025
3cfb6a5
fix(e2e): update health check command to use new test name pattern an…
Ansonhkg Sep 26, 2025
ec43401
test(e2e): add rpc override tests to validate environment variable fu…
Ansonhkg Sep 26, 2025
80954a8
chore(test): update storage path to store in .e2e
Ansonhkg Sep 26, 2025
0db5783
fix(app): resolve issue with dirname resolution fallback to process.c…
Ansonhkg Sep 26, 2025
c6a2d30
docs(README): add Docker build instructions for lit-auth-server and l…
Ansonhkg Sep 26, 2025
a2699fd
chore(release): migrate from Bun to PNPM for setup and dependency ins…
Ansonhkg Sep 26, 2025
84edc9b
feat(workflows): add release workflow for Docker images
Ansonhkg Sep 26, 2025
390dd6a
fmt
Ansonhkg Sep 26, 2025
ebdbe8e
feat(workflows): add Rust toolchain and wasm-pack installation to Doc…
Ansonhkg Sep 26, 2025
ecb7463
feat(docker): update Dockerfiles for lit-auth-server and lit-login-se…
Ansonhkg Sep 26, 2025
9f7776e
docs: add links to published Docker images for lit-auth-server and li…
Ansonhkg Sep 26, 2025
6629304
chore: comment out naga-staging environment in e2e workflow
Ansonhkg Sep 26, 2025
480a125
fix: configure lit-auth-server to use environment variables for port …
Ansonhkg Sep 26, 2025
558f04e
feat(app,lit-login-server): add public assets configuration for lit-l…
Ansonhkg Sep 26, 2025
678f9f2
chore: update packageManager field in package.json
Ansonhkg Sep 26, 2025
7459f03
docs(README): add one-click deployable images for Lit Auth and Login …
Ansonhkg Sep 26, 2025
d8c5aae
chore: remove packageManager field from package.json
Ansonhkg Sep 26, 2025
9752854
chore(test): release 1
Ansonhkg Sep 26, 2025
3b7703a
fix: - Set every package that still emits CommonJS to declare itself …
Ansonhkg Sep 27, 2025
867516f
chore(release,test): 1
Ansonhkg Sep 27, 2025
4d353dd
chore(release,test): bump versions and update changelogs for multiple…
Ansonhkg Sep 27, 2025
aaa9604
doc(README): update package manager command
Ansonhkg Sep 29, 2025
0a8131b
docs(README): add section for apps in the monorepo and Docker support
Ansonhkg Sep 29, 2025
fe97a7d
fix(apps): update environment variable names for auth and login servers
Ansonhkg Sep 29, 2025
4616e56
chore(release,test): 8.0.1-test.4
Ansonhkg Sep 29, 2025
0ac1ac3
chore(release,test): 8.0.1-test.5
Ansonhkg Sep 29, 2025
02ec45a
chore(release,test): bump versions to 8.0.1-test.7 and update changelogs
Ansonhkg Sep 30, 2025
2b1285c
chore(release, test): bump versions to 0.0.2-test.8, 8.0.1-test.9, an…
Ansonhkg Sep 30, 2025
a833c7a
chore(release,test)
Ansonhkg Oct 1, 2025
ca57a26
feat(auth,auth-services,network,lit-client):
Ansonhkg Oct 2, 2025
fa22ebc
fix(auth-services): replace console.log with structured logging for m…
Ansonhkg Oct 2, 2025
84d2f45
chore: remove unused contract
Ansonhkg Oct 3, 2025
3d1494a
fmt
Ansonhkg Oct 3, 2025
e063168
fix(network/auth): respect handshake responders when preparing keyset…
Ansonhkg Oct 6, 2025
3e06601
fmt
Ansonhkg Oct 6, 2025
e0d8b86
feat(payment): add auth-service delegation routes, and sdk helpers.
Ansonhkg Oct 7, 2025
ca7ffdd
Merge pull request #892 from LIT-Protocol/feature/jss-105-refactor-au…
Ansonhkg Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bun-version

This file was deleted.

9 changes: 9 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
[
"@babel/preset-env",
{ "targets": { "node": "current" }, "modules": "commonjs" }
],
["@babel/preset-typescript", { "allowDeclareFields": true }]
]
}
8,347 changes: 0 additions & 8,347 deletions bun.lock

This file was deleted.

2 changes: 0 additions & 2 deletions e2e/src/helper/auth-contexts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { init } from '../init';

import { hexToBigInt, keccak256, toBytes } from 'viem';

/**
* Creates a PKP authentication context
*/
Expand Down
8 changes: 4 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getJestProjects } from '@nx/jest';
import { getJestProjectsAsync } from '@nx/jest';

export default {
projects: getJestProjects(),
};
export default async () => ({
projects: await getJestProjectsAsync(),
});
56 changes: 56 additions & 0 deletions jest.e2e.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import type { Config } from 'jest';

// only map local packages (prevent hijacking external `@lit-protocol/*` packages)
const localPackages = [
'access-control-conditions',
'access-control-conditions-schemas',
'auth',
'auth-helpers',
'auth-services',
'constants',
'crypto',
'lit-client',
'logger',
'networks',
'schemas',
'types',
'wasm',
'wrapped-keys',
'wrapped-keys-lit-actions',
];

const config: Config = {
testEnvironment: 'node',
testMatch: ['<rootDir>/e2e/src/e2e.spec.ts'],

// Use Babel for everything; simple and robust with TS + ESM
transform: {
'^.+\\.(ts|tsx|js|mjs)$': 'babel-jest',
},

// Allow transforms for node_modules so ESM deps work
transformIgnorePatterns: [],

// Resolve monorepo packages to sources
moduleNameMapper: {

// Local packages
[`^@lit-protocol/(${localPackages.join('|')})/lib/(.*)$`]:
'<rootDir>/packages/$1/src/lib/$2',
[`^@lit-protocol/(${localPackages.join('|')})(/.*)?$`]:
'<rootDir>/packages/$1/src$2',
},

// this is to avoid duplicate module resolution errors
// eg.
// jest-haste-map: Haste module naming collision: @lit-protocol/crypto
// The following files share their name; please adjust your hasteImpl:
// * <rootDir>/packages/crypto/package.json
// * <rootDir>/.nx/cache/10833129804332267556/outputs/dist/packages/crypto/package.json
// FAIL e2e/src/e2e.spec.ts
// ● Test suite failed to run
// The name `@lit-protocol/auth` was looked up in the Haste module map. It cannot be resolved, because there exists several different files, or packages, that provide a module for that particular name and platform. The platform is generic (no extension). You must delete or exclude files until there remains only one of these:
modulePathIgnorePatterns: ['<rootDir>/.nx/', '<rootDir>/dist/'],
};

export default config;
52 changes: 23 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"version": "0.0.1",
"license": "MIT",
"scripts": {
"reset": "bun unlink-all && rimraf dist node_modules doc tmp yarn-error.log yarn.lock package-lock.json bun.lockb learn-debug.log tmp .nx lit-auth-storage pkp-tokens lit-auth-local ./e2e/dist ./e2e/node_modules",
"go": "bun run build && bun link-all",
"build": "bun unlink-all && nx run-many --parallel=false --target=build --all --exclude=wrapped-keys,wrapped-keys-lit-actions && bun run prettier",
"reset": "rimraf dist pnpm-lock.yaml node_modules tmp yarn-error.log yarn.lock package-lock.json learn-debug.log .nx lit-auth-storage pkp-tokens lit-auth-local ./e2e/dist ./e2e/node_modules",
"build": "nx run-many --parallel=false --target=build --all --exclude=wrapped-keys,wrapped-keys-lit-actions && npm run prettier",
"build:affected": "nx affected --target=build --exclude=wrapped-keys,wrapped-keys-lit-actions",
"check-deps": "npx nx run-many --target=check-deps --exclude=wrapped-keys,wrapped-keys-lit-actions",
"validate": "npm run check-deps && npm run build",
Expand All @@ -17,15 +16,12 @@
"publish:tinny": "cd ./local-tests && npm publish",
"gen:docs": "node ./tools/scripts/gen-doc.mjs",
"gen:readme": "node ./tools/scripts/gen-readme.mjs",
"gen:local-network-context": "bun run packages/networks/src/networks/vNaga/envs/naga-local/scripts/00-generate-abi-signatures.ts",
"gen:local-network-context": "dotenvx run --env-file=.env -- node --conditions=import --import tsx packages/networks/src/networks/vNaga/shared/scripts/generate-abi-signatures.ts",
"prettier": "npx nx format:write --all",
"format:check": "npx nx format:check --all",
"link-all": "for dir in packages/*/; do echo \"Linking in $dir\"; (cd \"$dir\" && bun link) || { echo \"ERROR: Failed to link in $dir\"; exit 1; }; done",
"unlink-all": "for dir in packages/*/; do echo \"Unlinking in $dir\"; (cd \"$dir\" && bun unlink) || { echo \"ERROR: Failed to unlink in $dir\"; exit 1; }; done",
"auth-services": "cd packages/auth-services && bun run start",
"test:e2e": "bun test ./e2e/src/e2e.spec.ts --timeout 50000000 -t",
"artillery:init": "bun run ./e2e/artillery/src/init.ts",
"artillery:balance-status": "LOG_LEVEL=silent bun run ./e2e/artillery/src/balance-status.ts",
"test:e2e": "npx jest --clearCache --config ./jest.e2e.config.ts && LOG_LEVEL=${LOG_LEVEL:-silent} dotenvx run --env-file=.env -- jest --runInBand --detectOpenHandles --forceExit --config ./jest.e2e.config.ts --testTimeout=50000000 -t",
"artillery:init": "dotenvx run --env-file=.env -- tsx e2e/artillery/src/init.ts",
"artillery:balance-status": "LOG_LEVEL=${LOG_LEVEL:-silent} dotenvx run --env-file=.env -- tsx e2e/artillery/src/balance-status.ts",
"artillery:pkp-sign": "DEBUG_HTTP=true LOG_LEVEL=silent dotenvx run --env-file=.env -- sh -c 'artillery run ./e2e/artillery/configs/pkp-sign.yml ${ARTILLERY_KEY:+--record --key $ARTILLERY_KEY}'",
"artillery:encrypt-decrypt": "DEBUG_HTTP=true LOG_LEVEL=silent dotenvx run --env-file=.env -- sh -c 'artillery run ./e2e/artillery/configs/encrypt-decrypt.yml ${ARTILLERY_KEY:+--record --key $ARTILLERY_KEY}'",
"artillery:execute-js": "DEBUG_HTTP=true LOG_LEVEL=silent dotenvx run --env-file=.env -- sh -c 'artillery run ./e2e/artillery/configs/execute.yml ${ARTILLERY_KEY:+--record --key $ARTILLERY_KEY}'",
Expand All @@ -34,7 +30,11 @@
},
"private": true,
"dependencies": {
"@babel/core": "^7.28.4",
"@babel/preset-env": "^7.28.3",
"@babel/preset-typescript": "^7.27.1",
"@dotenvx/dotenvx": "^1.6.4",
"@ethersproject/contracts": "5.8.0",
"@lit-protocol/contracts": "^0.5.0",
"@lit-protocol/nacl": "7.1.1",
"@lit-protocol/uint8arrays": "7.1.1",
Expand All @@ -44,8 +44,8 @@
"@simplewebauthn/browser": "^7.2.0",
"@simplewebauthn/typescript-types": "^7.0.0",
"@wagmi/core": "^2.17.1",
"@walletconnect/ethereum-provider": "2.9.2",
"ajv": "^8.12.0",
"babel-jest": "^29",
"base64url": "^3.0.1",
"bs58": "^6.0.0",
"cbor-web": "^9.0.2",
Expand All @@ -70,17 +70,12 @@
},
"devDependencies": {
"@changesets/cli": "^2.29.4",
"@nx/devkit": "17.3.0",
"@nx/esbuild": "17.3.0",
"@nx/eslint-plugin": "17.3.0",
"@nx/jest": "17.3.0",
"@nx/js": "17.3.0",
"@nx/linter": "17.3.0",
"@nx/next": "17.3.0",
"@nx/node": "17.3.0",
"@nx/plugin": "17.3.0",
"@nx/react": "17.3.0",
"@nx/web": "17.3.0",
"@nx/esbuild": "21.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💖 New hotness.

"@nx/eslint-plugin": "21.2.1",
"@nx/jest": "21.2.1",
"@nx/js": "21.2.1",
"@nx/node": "21.2.1",
"@nx/plugin": "21.2.1",
"@solana/web3.js": "1.95.3",
"@types/depd": "^1.1.36",
"@types/events": "^3.0.3",
Expand All @@ -93,13 +88,11 @@
"@typescript-eslint/parser": "6.21.0",
"artillery": "^2.0.23",
"axios": "^1.6.0",
"chalk": "^5.3.0",
"esbuild": "^0.17.3",
"esbuild": "^0.19.2",
"esbuild-node-builtins": "^0.1.0",
"esbuild-node-externals": "^1.14.0",
"esbuild-plugin-tsc": "^0.4.0",
"eslint": "8.48.0",
"eslint-config-next": "12.2.3",
"eslint": "9.34.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-import": "^2.29.1",
Expand All @@ -112,15 +105,16 @@
"live-server": "^1.2.2",
"node-fetch": "^2.6.1",
"node-localstorage": "^3.0.5",
"nx": "17.3.0",
"nx": "21.2.1",
"path": "^0.12.7",
"pino-pretty": "^13.0.0",
"prettier": "^2.6.2",
"react": "^19.1.0",
"rimraf": "^6.0.1",
"ts-jest": "29.2.5",
"typedoc": "^0.26.6",
"typedoc-theme-hierarchy": "^5.0.0",
"ts-node": "^10.9.2",
"tsx": "^4.20.5",
"typedoc": "^0.28.12",
"typescript": "5.8.3"
},
"workspaces": [
Expand Down
3 changes: 1 addition & 2 deletions packages/auth-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@elysiajs/swagger": "^1.2.0",
"@lit-protocol/contracts": "^0.4.0",
"@simplewebauthn/server": "6.2.1",
"@simplewebauthn/typescript-types": "^8.3.4",
"@simplewebauthn/typescript-types": "8.3.4",
"@t3-oss/env-core": "^0.12.0",
"bs58": "^6.0.0",
"bullmq": "^5.52.3",
Expand All @@ -40,7 +40,6 @@
"redis": "^4.6.13",
"stytch": "^12.4.0",
"tslib": "^2.8.1",
"uuidv4": "^6.2.13",
"viem": "2.29.4",
"wagmi": "^2.14.11",
"zod": "^3.24.2",
Expand Down
5 changes: 3 additions & 2 deletions packages/auth-services/src/_setup/redis.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { createClient } from 'redis';
import { createClient, type RedisClientType } from 'redis';

import { env } from '../env';

export const redisClient = createClient({
export const redisClient: RedisClientType = createClient({
url: env.REDIS_URL,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ConnectionOptions, Queue } from 'bullmq';
import { JSONStringify as BigIntStringify } from 'json-with-bigint';
import { v4 as uuidv4 } from 'uuid';
import { env } from '../../env';
import { parseRedisUrl } from './helper/redisUrlParser';
import { JobName } from './jobRegistry';
Expand All @@ -20,7 +19,7 @@ export const addJob = async (
jobData: { requestBody: any }
) => {
const job = await mainAppQueue.add(jobName, jobData, {
jobId: uuidv4(),
jobId: crypto.randomUUID(),
});

console.log(`[BullMQ] Job ${job.id} added to queue ${mainAppQueue.name}`);
Expand Down
4 changes: 3 additions & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"@lit-protocol/nacl": "7.1.1",
"@lit-protocol/uint8arrays": "7.1.1",
"@noble/curves": "^1.8.1",
"@noble/hashes": "^1.8.0",
"ajv": "^8.12.0",
"zod": "3.24.3"
"zod": "3.24.3",
"tslib": "^2.8.1"
}
}
3 changes: 2 additions & 1 deletion packages/networks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"pino": "^9.6.0",
"pino-caller": "^4.0.0",
"viem": "2.29.4",
"zod": "3.24.3"
"zod": "3.24.3",
"@noble/hashes": "^1.8.0"
},
"gitHead": "0d7334c2c55f448e91fe32f29edc5db8f5e09e4b",
"tags": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '../interfaces/NetworkContext';
import type { PKPStorageProvider } from '../../../../storage/types';
import { DEV_PRIVATE_KEY } from '@lit-protocol/constants';
import { AuthData, StrictAuthData } from '@lit-protocol/schemas';

export type CreateChainManagerReturn = {
api: {
Expand All @@ -26,11 +27,7 @@ export type CreateChainManagerReturn = {
) => InstanceType<typeof api.PKPPermissionsManager>;
paymentManager: () => InstanceType<typeof api.PaymentManager>;
getPKPsByAuthData: (
authData: {
authMethodType: number | bigint;
authMethodId: string;
accessToken?: string;
},
authData: StrictAuthData | AuthData,
pagination?: { limit?: number; offset?: number },
storageProvider?: PKPStorageProvider
) => ReturnType<typeof api.PKPPermissionsManager.getPKPsByAuthData>;
Expand Down Expand Up @@ -78,6 +75,15 @@ export const createChainManagerFactory = <T, M>(
fn(req, _networkConfig, accountOrWalletClient);
};

const bindAccount = <ReqArgType, RetType>(
fn: (
req: ReqArgType,
accountOrWalletClient: ExpectedAccountOrWalletClient
) => RetType
) => {
return (req: ReqArgType): RetType => fn(req, accountOrWalletClient);
};

return {
api: {
mintWithEoa: bindContext(api.mintWithEoa),
Expand Down Expand Up @@ -135,8 +141,8 @@ export const createChainManagerFactory = <T, M>(
);
},
pricing: {
getPriceFeedInfo: bindContext(api.pricing.getPriceFeedInfo),
getNodePrices: bindContext(api.pricing.getNodePrices),
getPriceFeedInfo: bindAccount(api.pricing.getPriceFeedInfo),
getNodePrices: bindAccount(api.pricing.getNodePrices),
},
connection: {
getConnectionInfo: (args?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ export async function getConnectionInfo({
realmId: networkCtx.networkSpecificConfigs.realmId,
networkCtx: networkCtx,
},
{
accountOrWalletClient,
}
accountOrWalletClient
);

const epochState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { logger } from '../../../../../../../../shared/logger';
import { DefaultNetworkConfig } from '../../../../../../../shared/interfaces/NetworkContext';
import {
createContractsManager,
createReadOnlyContractsManager,
ExpectedAccountOrWalletClient,
} from '../../../../../contract-manager/createContractsManager';
import { pubkeyToTokenId } from './pubkeyToTokenId';
Expand Down Expand Up @@ -110,10 +111,11 @@ export async function resolvePkpTokenId(
throw new Error('Network context required for address resolution');
}

const { pubkeyRouterContract } = createContractsManager(
networkCtx,
accountOrWalletClient
);
// never pass undefined; fall back to read-only
const { pubkeyRouterContract } = accountOrWalletClient
? createContractsManager(networkCtx, accountOrWalletClient)
: createReadOnlyContractsManager(networkCtx);

const pkpTokenId = await pubkeyRouterContract.read.ethAddressToPkpId([
validatedInput.address as `0x${string}`,
]);
Expand Down
Loading
Loading