UNPKG

@lit-protocol/vincent-scaffold-sdk

Version:

Shared build configuration and utilities for Vincent abilities and policies

13 lines (11 loc) 353 B
/** * Converts a PKP string to a checksummed Ethereum address * @param pkpPublicKey - The PKP string to convert * @returns A checksummed Ethereum address */ export function toEthAddress(pkpPublicKey: string) { if (!pkpPublicKey.startsWith("0x")) { pkpPublicKey = `0x${pkpPublicKey}`; } return ethers.utils.computeAddress(pkpPublicKey); }