constants.ts 663 B

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