Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions keep-mobile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
Expand Down
2 changes: 1 addition & 1 deletion keep-mobile/src/nip55.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down