import {
PublicKey,
Connection,
Keypair,
Commitment,
} from "@solana/web3.js";
import { AnchorProvider, Wallet, BN, Address } from "@project-serum/anchor";
import { Context, PropertyClient,
PROPEASY_PROGRAM, PROP
} from "@renec-foundation/propeasy-sdk";
...
// yourKey = Keypair.fromSecretKey(Uint8Array.from([124, 149, 222, 31, 236, 142, 29, 95...]));
const commitment: Commitment = "confirmed";
const connection = new Connection(RPC_ENDPOINT_URL, { commitment });
const wallet = new Wallet(yourKey);
const provider = new AnchorProvider(connection, wallet, { commitment });
const ctx = Context.withProvider(provider, PROPEASY_PROGRAM);
const propertyMintAccount = new PublicKey('');
let propertyClient = await PropertyClient.getProperty(ctx, propertyMintAccount);
console.log("property", propertyClient)
const purchaseTx = await propertyClient.purchasePropertyToken(new BigNumber(10));
const purchaseTxSig = await purchaseTx.buildAndExecute();
propertyClient = await propertyClient.refresh();
const locker = await propertyClient.getLocker();
console.log("locker", locker);
const individualCommission = propertyClient.getCommissionAmount(new BigNumber(10))