LIT-Protocol / js-sdk

The Lit Protocol SDK provides developers with a framework for implementing Lit functionality into their own applications.
https://developer.litprotocol.com
MIT License
99 stars 59 forks source link

Feature/lit 3269 js sdknode fix custom auth issue #472

Closed Ansonhkg closed 4 months ago

Ansonhkg commented 4 months ago

Description

This PR addresses a few issues:

  1. Unable to mint pkp with custom auth using mintWithAuth because the function is throwing an error when getting authId from Lit supported auth methods.
  2. Not passing the whole set of params back to authNeededCallback when resign is required
  3. jsParams type not accepting any other keys

New feature:

Related PRs:

Type of change

How Has This Been Tested?

Test Command:

DEBUG=true NETWORK=localchain yarn test:local --filter=testUseCustomAuthSessionSigsToPkpSign
✅ res: {
  r: '4605d1450c67301575e0306b89b1ce6a68548b720e785820cc7ca6f835c858ab',
  s: '2e8558d89f69a2b37296a510721698c8989a0b5c1df58eb74a0b960f9683860e',
  recid: 0,
  signature: '0x4605d1450c67301575e0306b89b1ce6a68548b720e785820cc7ca6f835c858ab2e8558d89f69a2b37296a510721698c8989a0b5c1df58eb74a0b960f9683860e1b',
  publicKey: '04F7CD6AA4977DB70C87D615F9E9F6660A30FB979AD7E4858AED7D9EBECF8A39D66C23916286990A121A406FF534DD1A5087B3AFD6E8BD35A31EB858387C0C2389',
  dataSigned: '7D87C5EA75F7378BB701E404C50639161AF3EFF66293E9F375B5F17EB50476F4'
}

Checklist: