js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

Feature/lit 3744 js sdk from slack use getg active unkicked validator struct and counts 2

Open Ansonhkg opened this issue 6 months ago • 0 comments

Description

Merge multiple connection to a RPC call

  • feat(contracts-sdk): introduce getConnectionInfo public static function, that calls the getActiveUnkickedValidatorStructsAndCounts smart contract function to get epoch, minNodeCount and activeUnkickedValidatorStructs
  • feat(lit-core): refactor _getValidatorData to use getConnectionInfo from the contracts-sdk, which will be used in the initial _connect function, to set the stakingContract (to be re-used in other code), minNodeCount, and bootstrapUrls.
  • in the initial connection, fetchCurrentEpochState is now non-async (need confirmation that it's ok. See here)

Test

  • Running local nodes from this PR https://github.com/LIT-Protocol/lit-assets/pull/1372 and ran
NETWORK=localchain yarn test:local --filter=testUseEoaSessionSigsToExecuteJsSigning --exclude=Parallel

Ansonhkg avatar Aug 07 '24 14:08 Ansonhkg