- SDK Version: tkey (^9.0.1)
- Platform:
- Browser Console Screenshots:
- If the issue is related to Custom Authentication, please include the following information (optional):
- Verifier Name: zbyte-aqua-prod
- JWKS Endpoint: https://dplat.zbyte.io/zbyte-sso/oidc/community/metadata/jwks.json
- Sample idToken (JWT):
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);
}
}