Skip to content

❗️❗️[NAGA] Develop Branch #776

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

Open
wants to merge 138 commits into
base: feature/lit-3748-naga
Choose a base branch
from

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Jan 23, 2025

WHAT

  • Refactor bls.rs to use lit-bls-wasm as a dependency instead & added unit tests
  • Removed bls variant as it's handled automatically already by the lit-bls-wasm package.
  • Added threshold calculation, as consensus (minNodeCount) != threshold

Compatability

Test

Command

E2E

NETWORK=custom DEBUG=true yarn test:local --filter=testUseEoaSessionSigsToPkpSign,testUseEoaSessionSigsToExecuteJsSigning,testUseEoaSessionSigsToEncryptDecryptString,testUsePkpSessionSigsToPkpSign --exclude=Parallel
image

BLS unit test

node 'node_modules/.bin/jest' './packages/wasm/src/lib/bls.spec.ts' -c './packages/wasm/jest.config.ts'
image

❗️NOTE

  • Everyone else/InternalDev will be on this 👉🏻 60318791258d273df8209b912b386680d25d0df3 👈

  • ❌ It's NOT compatible with the latest commit in the develop branch

  • ❌ This dose not work against naga-dev - we need to update lit-contracts to re-deploy naga-dev abis

  • ❌ authSig (ETH, SOL, Cosmos) encryption/decryption does not work.

Ansonhkg and others added 30 commits January 11, 2025 01:37
… usage

- Also send `nodeSet` to `sign_session_key` endpoint as it is required
- Fixed typo on name of wasm method for `ecdsaCombineAndVerify` (was previously unused)
…a-dev-support-with-rust-toolchain

add rust-toolchain.toml so we autoinstall some necessary rust stuff
…a-add-naga-dev-support

feat: add naga dev support
- **Added**: New file  defining:
  -  union type for cryptographic signature types.
  -  interface for standardized HTTP responses.
  - Partial  interface for raw ECDSA message data.
- **Updated**:  now exports all types from .

**Implications**:
- Enables consistent usage of HTTP response and signature types across the application.
- Improves maintainability and type safety for API client implementations.
…les and internal documentation (#1234)<details><summary>Difference analysis</summary>Changes made:- Removed the import of `PKPSignShare`- Removed the export of `SuccessNodePromises` from types- Removed commented example output blocks- Removed an internal console.log statementThe changes are primarily cleanup and do not alter functionality.</details>
- **Added**: Optional fields  and  to the  interface.
- **Updated**: Moved  to a new position and made it optional ().
- **Removed**: The original  line was refactored for better structure.

**Implications**:
- Provides flexibility by allowing certain fields to be undefined or null.
- Improves structure for handling edge cases or incomplete data in
Ansonhkg and others added 25 commits February 4, 2025 19:56
…essControlConditions`, and `validateAccessControlConditions` to `access-control-conditions` from `LitNodeClient`
…Chain` to `constants` package from `types` package to prevent circular dependency. (constants > schema > types)
removed:
- setCustomBootstrapUrls()

privatised:
- _handshakeWithNode
- _getRandomHexString
- _sendCommandToNode
- _getNodePromises
- _getSessionSigByUrl
- _handleNodePromises
- _throwNodeError

feature:
- Added `EPOCH_READY_FOR_LOCAL_DEV` as constant with JsDoc
relocated:
- generateSessionCapabilityObjectWithWildcards
- validateAccessControlConditions
- getHashedAccessControlConditions

privatised:
- _getWalletSig
- _checkNeedToResignSessionKey
- _getSessionSigByUrl
- _sendCommandToNode
- _signSessionKey
…a-housekeeping

Feature/lit 4185 js sdk naga housekeeping
- Removed unused imports
- Sorted imports
…ce-feed-info-manager` module

- Only 1 fetch promise can be run at a time; concurrent requests chain on pending promises
- Only fetches new data if it has been > 3 seconds since last fetch
- Updated static method `getPriceFeedInfo()` on LitContracts class to use the manager so all consumers get this behaviour
- Export the raw helper functions for consumption by other classes
…om LitCore/LitNodeClient; use price-feed-info-manager instead

- Removed `nodePrices` array from `LitCore` config state; this would be redundant since we cache price feed info in the manager module now
- Update `getMaxPricesForNodeProduct()` on `LitNodeClient` to be an async method, since it will sometimes fetch new prices
- CHORE: Removed unused access control method imports from `lit-node-client-nodejs.ts`
- CHORE: Removed duplicate `export * from...` in constants/index.ts
- Added private `_getNodePrices()` method to LitNodeClient that calls the new `price-feed-info-manager` method w/ args from the current client config
LIT-4207 - Implement node price re-fetching when running lit node commands
@Ansonhkg Ansonhkg mentioned this pull request Feb 13, 2025
FedericoAmura and others added 4 commits February 19, 2025 21:39
… to also use zod and be integrated into the sdk instead of an external package using ajv
…o derive constants, types and params where applicable. This makes any lit supported chain update single source of truth
…-minimal-zod

feat: add new schemas package using zod, bring acc validation package…
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.

4 participants