Extract encrypt+upload+create-record logic from CLI upload.rs into opake-core/src/documents/upload.rs. Same pattern as download.
Core function signature (roughly):
pub async fn encrypt_and_upload( client: &XrpcClient<impl Transport>, plaintext: &[u8], filename: &str, mime_type: &str, owner_did: &str, owner_pubkey: &[u8; 32], tags: Vec<String>, rng: &mut (impl CryptoRng + RngCore), ) -> Result<String, Error> // returns AT-URI
What moves to core:
What stays in CLI:
Tests to write in core:
Extract encrypt+upload+create-record logic from CLI upload.rs into opake-core/src/documents/upload.rs. Same pattern as download.
Core function signature (roughly):
What moves to core:
What stays in CLI:
Tests to write in core: