constants.ts 666 B

123456789101112131415
  1. import * as anchor from "@coral-xyz/anchor";
  2. import { CnftVault } from "../../target/types/cnft_vault";
  3. import { loadWalletKey } from "../utils";
  4. import { IDL } from "../../target/types/cnft_vault";
  5. export const connection = new anchor.web3.Connection(
  6. "https://api.devnet.solana.com"
  7. );
  8. export const keypair = loadWalletKey("~/.config/solana/id.json");
  9. export const wallet = new anchor.Wallet(keypair);
  10. export const provider = new anchor.AnchorProvider(connection, wallet, {});
  11. export const programID = new anchor.web3.PublicKey(
  12. "CNftyK7T8udPwYRzZUMWzbh79rKrz9a5GwV2wv7iEHpk"
  13. );
  14. export const program = new anchor.Program<CnftVault>(IDL, programID, provider);