Ethereum Private Key Provider initialization failed for some users

Below code is throwing exception only for few user:
Users Details:

  • VerifierId: 4a76422d-aec2-4337-b571-f81bbd4be41a
  • PublicAddress from Node: 0x8eF3fab49a427D05d85A1b32c571BC15Ad12486F
async getKeyProvider(networkConfig: NetworkConfig) {
		try {
			console.log("using rpc-url:", networkConfig.networkRpcUrl);
			const ethereumPrivateKeyProvider = new EthereumPrivateKeyProvider({
				config: {
					chainConfig: convertToCustomChainConfig(networkConfig),
				},
			});
			const reconstructedKey = (await this.tKey.reconstructKey()).privKey;
			let privKey = reconstructedKey.toString("hex");
			if (reconstructedKey.byteLength() !== 32) {
				console.error("Key size is not 32 bytes : ", privKey);
				throw new WalletError(ErrorCode.INVALID_PRIVATE_KEY);
			}
			if (privKey.length < 64) {
				privKey = privKey.padStart(64, "0");
			}
			return await ethereumPrivateKeyProvider.setupProvider(privKey);
		} catch (error) {
			throw new WalletError(ErrorCode.GET_KEY_PROVIDER_FAILED, error as Error);
		}
	}

@kshitij.dean.sam Thanks for your recent post.

Your issue has been forwarded to our Dev team and we will get back with further updates.

@kshitij.dean.sam If you are using Tkey JS SDK, can you upgrade to the latest version 12.0.0 and share the result?

1 Like

@kshitij.dean.sam Are you able to resolve the issue after upgrading?

Not yet, we have not upgraded the SDK because it’s will break the existing code, planning to do so later, this month.