UNPKG

@macalinao/clients-quarry

Version:

TypeScript client for Quarry protocol programs

37 lines (33 loc) 989 B
/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import type { Address, ProgramDerivedAddress } from "@solana/kit"; import { getAddressEncoder, getProgramDerivedAddress, getUtf8Encoder, } from "@solana/kit"; export interface MinerSeeds { quarry: Address; authority: Address; } export async function findMinerPda( seeds: MinerSeeds, config: { programAddress?: Address | undefined } = {}, ): Promise<ProgramDerivedAddress> { const { programAddress = "QMNeHCGYnLVDn1icRAfQZpjPLBNkfGbSKRB83G5d8KB" as Address<"QMNeHCGYnLVDn1icRAfQZpjPLBNkfGbSKRB83G5d8KB">, } = config; return await getProgramDerivedAddress({ programAddress, seeds: [ getUtf8Encoder().encode("Miner"), getAddressEncoder().encode(seeds.quarry), getAddressEncoder().encode(seeds.authority), ], }); }