I'm working with Solana addresses in a TypeScript project and need to ensure consistency in their representation, similar to Ethereum's toChecksumAddress (https://docs.web3js.org/api/web3-utils/function/toChecksumAddress/).
An example is:
import { PublicKey } from '@solana/web3.js';
const key = new PublicKey("2wicZ7QPvUn1RNUHVUsdf8xAH22RBkiXEkGS43RDboJ4");
const key2 = new PublicKey("2wicz7qpvun1rnuhvusdf8xah22rbkixekgs43rdboj4"); // lowercase
const keyInfo = await this.connection.getAccountInfo(key); // returns data
const keyInfo2 = await this.connection.getAccountInfo(key2); // returns null
Is there a recommended approach or library for achieving this in JavaScript/TypeScript? Any insights or code examples would be appreciated. Thanks!