diff --git a/keep-mobile/src/lib.rs b/keep-mobile/src/lib.rs index 1e1b58f1..dbf95d97 100644 --- a/keep-mobile/src/lib.rs +++ b/keep-mobile/src/lib.rs @@ -144,6 +144,11 @@ pub fn backup_min_passphrase_length() -> u32 { keep_core::backup::MIN_PASSPHRASE_LEN as u32 } +#[uniffi::export] +pub fn nip55_max_batch_size() -> u32 { + nip55::MAX_BATCH_SIZE as u32 +} + #[uniffi::export] pub fn recover_nsec( share_data: Vec, diff --git a/keep-mobile/src/nip55.rs b/keep-mobile/src/nip55.rs index 02deb295..4ec9e328 100644 --- a/keep-mobile/src/nip55.rs +++ b/keep-mobile/src/nip55.rs @@ -30,7 +30,7 @@ const RATE_LIMIT_WINDOW: Duration = Duration::from_secs(60); // alone is not a sufficient DoS guard. const MAX_REQUESTS_PER_WINDOW: u32 = 60; const MAX_BACKOFF: Duration = Duration::from_secs(300); -const MAX_BATCH_SIZE: usize = 20; +pub(crate) const MAX_BATCH_SIZE: usize = 20; const MAX_RATE_LIMIT_ENTRIES: usize = 1000; const MAX_PERMISSIONS_COUNT: usize = 32; const MAX_PERMISSIONS_JSON_BYTES: usize = 8 * 1024;