-
Notifications
You must be signed in to change notification settings - Fork 11
Description
A couple of minor changes that will help our MPC Core Kit Integration:
-
Can we expose
Point&secp256k1from MPC Core Kit directly instead of fetching it from@tkey/common-types? It feels like an unnecessary addition just for using deleteShare function. -
Currently the
WEB3AUTH_NETWORKobject is like thisexport declare const WEB3AUTH_NETWORK: { readonly MAINNET: "sapphire_mainnet"; readonly DEVNET: "sapphire_devnet"; };This is inconsistent with our other SDKs and causes confusion. This was done earlier when sapphire was new in order to make sure people understand MPC only works with Sapphire networks. However it is quite well documented and the dashboard flow makes sure people make sapphire projects. In order to be consistent can we change it to:
export declare const WEB3AUTH_NETWORK: { readonly SAPPHIRE_MAINNET: "sapphire_mainnet"; readonly SAPPHIRE_DEVNET: "sapphire_devnet"; }; -
The deleteShare function currently has a lot of extra steps currently
let factorPub: string | undefined; for (const [key, value] of Object.entries(coreKitInstance.getKeyDetails().shareDescriptions)) { if (value.length > 0) { const parsedData = JSON.parse(value[0]); if (parsedData.module === FactorKeyTypeShareDescription.SocialShare) { factorPub = key; } } } const pub = Point.fromSEC1(secp256k1, factorPub); await coreKitInstance.deleteFactor(pub);
Can we make the process of grabbing a particular share with share description easy? Can getting a point be shifting directly within the deleteFactor function of the SDK? I'm thinking of something like:
const factorPub = findFactorByShareDescription(FactorKeyTypeShareDescription.SocialShare) // should return an array of matching shares await coreKitInstance.deleteFactor(pub[0]);
-
Additionally, can we have a
listFactorsfunction that grabs all the factors from share description and returns an object containing all the available shares?