@macalinao/clients-quarry
Version:
TypeScript client for Quarry protocol programs
35 lines (31 loc) • 924 B
text/typescript
/**
* 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 RewarderSeeds {
base: Address;
}
export async function findRewarderPda(
seeds: RewarderSeeds,
config: { programAddress?: Address | undefined } = {},
): Promise<ProgramDerivedAddress> {
const {
programAddress = "QMNeHCGYnLVDn1icRAfQZpjPLBNkfGbSKRB83G5d8KB" as Address<"QMNeHCGYnLVDn1icRAfQZpjPLBNkfGbSKRB83G5d8KB">,
} = config;
return await getProgramDerivedAddress({
programAddress,
seeds: [
getUtf8Encoder().encode("Rewarder"),
getAddressEncoder().encode(seeds.base),
],
});
}