From ef675df3ea74fdedb7b2bb3ed0624ef498197f43 Mon Sep 17 00:00:00 2001 From: Kriptikz Date: Wed, 24 Jul 2024 22:21:08 -0500 Subject: [PATCH] add declare_proof instruction builder --- api/src/instruction.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/src/instruction.rs b/api/src/instruction.rs index 7d46f32..f461785 100644 --- a/api/src/instruction.rs +++ b/api/src/instruction.rs @@ -228,6 +228,19 @@ pub fn close(signer: Pubkey) -> Instruction { } } +/// Builds a declare proof instruction. +pub fn declare_proof( + proof: Pubkey, +) -> Instruction { + Instruction { + program_id: crate::id(), + accounts: vec![ + AccountMeta::new_readonly(proof, false), + ], + data: OreInstruction::DeclareProof.to_vec(), + } +} + /// Builds a mine instruction. pub fn mine( signer: Pubkey,