add declare_proof instruction builder

This commit is contained in:
Kriptikz
2024-07-24 22:21:08 -05:00
parent 0308bb9268
commit ef675df3ea

View File

@@ -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,