Skip to content

Feature/lit 4185 js sdk naga housekeeping #790

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

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Feb 4, 2025

WHAT

🔹 General Changes

  • Removed unused code.
  • Removed @deprecated code.
  • Removed Cosmos and Solana AuthSigs and migrated to custom auth session sigs.
  • Removed DatilDev and DatilTest as default arguments.
    Note: NagaTest and Naga need to be added to NETWORKS_REQUIRING_SEV when available.

🧠 LitNodeClient should now only expose the following methods:

🔹 Core Methods

  • connect()

🔹 Helper Methods

  • setDefaultMaxPrice()
  • getPkpAuthContext()
  • getMaxPricesForNodeProduct()
  • createCapacityDelegationAuthSig()
  • encrypt()

🔹 Endpoint Methods

  • pkpSign()
  • executeJs()
  • decrypt()
  • claimKeyId()

🔁 Relocations

➡ From LitNodeClient to access-control-conditions

  • getFormattedAccessControlConditions
  • getHashedAccessControlConditions
  • validateAccessControlConditions

➡ From LitNodeClient to auth-helpers

  • generateSessionCapabilityObjectWithWildcards

➡ From types to constants (to prevent circular dependency)

  • LITChain
  • LITCosmosChain
  • LITEVMChain
  • LITSVMChain
    (New dependency order: constantsschematypes)

📦 lit-core

🔻 Removed:

  • setCustomBootstrapUrls()

🔒 Privatised:

  • _handshakeWithNode
  • _getRandomHexString
  • _sendCommandToNode
  • _getNodePromises
  • _getSessionSigByUrl
  • _handleNodePromises
  • _throwNodeError

✨ Feature:

  • Added EPOCH_READY_FOR_LOCAL_DEV as a constant with JSDoc.

📦 lit-node-client-nodejs

🔁 Relocated:

  • generateSessionCapabilityObjectWithWildcards
  • validateAccessControlConditions
  • getHashedAccessControlConditions

🔒 Privatised:

  • _getWalletSig
  • _checkNeedToResignSessionKey
  • _getSessionSigByUrl
  • _sendCommandToNode
  • _signSessionKey

📦 tinny

🔻 Removed:

  • public bareEthAuthSig
  • public bareSolAuthSig
  • this.setupBareEthAuthSig

📦 auth-browser

🔻 Removed:

  • encodeCallData
  • decodeCallResult

📦 constants

🔻 Removed:

  • ABI_LIT

📑 ILitNodeClient

@Ansonhkg Ansonhkg changed the base branch from master to feat/naga-fix-bls-wasm-cleanup February 4, 2025 19:15
…ove-all-things-marked-as-deprecated-in-jsdoc

chore: remove @deprecated code
@Ansonhkg Ansonhkg marked this pull request as draft February 4, 2025 19:17
@Ansonhkg Ansonhkg marked this pull request as ready for review February 4, 2025 19:57
…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
@Ansonhkg Ansonhkg merged commit fbf0ccd into feat/naga-fix-bls-wasm-cleanup Feb 6, 2025
3 of 4 checks passed
@Ansonhkg Ansonhkg deleted the feature/lit-4185-js-sdk-naga-housekeeping branch February 6, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant