Skip to content

⭐️ LIT-4211 - V8 auth and lit client refactor #800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 71 commits into
base: feat/naga-fix-bls-wasm-cleanup
Choose a base branch
from

Conversation

MaximusHaximus
Copy link
Contributor

Description

This PR is a major refactor for v8 sdk onwards; some packages have been combined, others removed, and new APIs are introduced in this release to simplify interaction with the SDK and eliminate existing codebase-level technical debt across the SDK.

Major points

  • Introduces new packages to help simplify usage of the SDK and eliminate codebase technical debt
    • lit-client
      • Consumers of the SDK will use lit-client instead of a lit node client directly, and the lit-client will use an internal lit node client and/or lit chain client as needed
    • auth
      • Combines two packages that handled similar or identical responsibilities into a single auth package
        • lit-auth-client is now a subset of the new auth package
          • Renames AuthProviders to Authenticators for clarity
        • auth-browser
          • Code from auth-browser has been moved into auth as a single, metamask-specific authenticator
    • networks
      • LitNetwork objects encapsulate configuration and behaviours that can be different across LIT network versions
      • From v8 onward, magic strings will no longer be used to configure various parts of the SDK; instead, a specific LitNetwork object will be imported and passed into the relevant calls/configurations.
  • using an AuthManager with a LitClient eliminates the need for a separate nodejs version of the lit-node-client due to migration of embedded metamask-specific logic in lit-node-client to an explicit authenticator

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

- Define localStorage storage plugin w/ tests
- Define localStorage storage plugin w/ tests
…rors in preparation for moving providers to new auth package as authenticators
- Migrated `lit-auth-client` providers and relayer module to auth package
- Collapsed `auth-browser` into `auth` package as an authenticator - `MetamaskAuthenticator`
…e-client` into a single package in preparation for introduction of `lit-client`
@MaximusHaximus MaximusHaximus changed the title LIT-421 - V8 auth and lit client refactor LIT-4211 - V8 auth and lit client refactor Feb 18, 2025
Ansonhkg and others added 17 commits March 12, 2025 19:40
…ons are extensible on machine construction and referenceable in machine definition
…e using both `Jest` and `Bun` as they are automatically imported in the global scope. However, a Jest polyfill is required in the `jest.setup.js` because the global `Request` API (part of the Fetch API) is not available (or not properly configured?)
@Ansonhkg Ansonhkg changed the title LIT-4211 - V8 auth and lit client refactor ⭐️ LIT-4211 - V8 auth and lit client refactor Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants