import * as anchor from "@project-serum/anchor"; import { OPTION_STATE_SEED, STRIKR_PROGRAM_ID, STRIKR_AUTHORITY_SEED, COLLECTION_IDENTIFIER_SEED } from "../constants"; export const getFloorOptionState = async (optionKey: anchor.web3.PublicKey) => { const [optionState] = await anchor.web3.PublicKey.findProgramAddress( [optionKey.toBuffer(), OPTION_STATE_SEED], STRIKR_PROGRAM_ID ); return optionState; }; export const getOptionState = async (assetNftMint: anchor.web3.PublicKey) => { const [optionState] = await anchor.web3.PublicKey.findProgramAddress( [assetNftMint.toBuffer(), OPTION_STATE_SEED], STRIKR_PROGRAM_ID ); return optionState; }; export const getCollectionIdentifier = async (collectionIdentifierKey: anchor.web3.PublicKey) => { const [collectionIdentifier] = await anchor.web3.PublicKey.findProgramAddress( [collectionIdentifierKey.toBuffer(), COLLECTION_IDENTIFIER_SEED], STRIKR_PROGRAM_ID ); return collectionIdentifier; }; export const getStrikrAuthority = async () => { const [strikrAuthority] = await anchor.web3.PublicKey.findProgramAddress( [STRIKR_AUTHORITY_SEED], STRIKR_PROGRAM_ID ); return strikrAuthority; };