(client: &Client, id: String)
| 50 | } |
| 51 | |
| 52 | pub fn delete(client: &Client, id: String) -> Result<(), CliError> { |
| 53 | let thread_pubkey = Thread::pubkey(client.payer_pubkey(), id.into_bytes()); |
| 54 | let ix = Instruction { |
| 55 | program_id: clockwork_thread_program::ID, |
| 56 | accounts: clockwork_thread_program::accounts::ThreadDelete { |
| 57 | authority: client.payer_pubkey(), |
| 58 | close_to: client.payer_pubkey(), |
| 59 | thread: thread_pubkey, |
| 60 | }.to_account_metas(Some(false)), |
| 61 | data: clockwork_thread_program::instruction::ThreadDelete {}.data(), |
| 62 | }; |
| 63 | client.send_and_confirm(&[ix], &[client.payer()]).unwrap(); |
| 64 | Ok(()) |
| 65 | } |
| 66 | |
| 67 | pub fn get(client: &Client, address: Pubkey) -> Result<(), CliError> { |
| 68 | let data = client.get_account_data(&address).unwrap(); |
no test coverage detected