UNPKG

@crateprotocol/yi

Version:

The TypeScript SDK for Yi Token by Crate Protocol.

10 lines 374 B
import { utils } from "@project-serum/anchor"; import { PublicKey } from "@solana/web3.js"; import { YI_ADDRESSES } from "."; /** * Finds the address of a YiToken. */ export const findYiTokenAddress = async (mint) => { return await PublicKey.findProgramAddress([utils.bytes.utf8.encode("YiToken"), mint.toBuffer()], YI_ADDRESSES.Yi); }; //# sourceMappingURL=pda.js.map