Skip to content

Conversation

@Alex6323
Copy link
Contributor

Closes #439

@Alex6323 Alex6323 marked this pull request as ready for review January 13, 2026 12:52
@Alex6323 Alex6323 requested a review from a team as a code owner January 13, 2026 12:52
@Thoralf-M
Copy link
Member

CI not happy :(

/// Returns the intent prefix length, i.e. the number of bytes prepended to the
/// data before being signed.
#[uniffi::export]
pub fn intent_prefix_length() -> u64 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's also public for the Rust part of the SDK.

Comment on lines 202 to 210
pub fn intent_from_bytes(bytes: &[u8]) -> Result<Intent, IntentError> {
Ok(Intent(iota_sdk::types::crypto::Intent::from_bytes(bytes)?))
}

/// Create a signing intent from a hex string.
#[uniffi::export]
pub fn intent_from_hex_string(hex: &str) -> Result<Intent, IntentError> {
Ok(Intent(iota_sdk::types::crypto::Intent::from_str(hex)?))
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these not constructors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, that's weird

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

/// A 1-byte domain separator for hashing Object ID in IOTA. It starts from
/// 0xf0 to ensure no hashing collision for any ObjectID vs IotaAddress which is
/// derived as the hash of `flag || pubkey`. See
/// `iota_types::crypto::SignatureScheme::flag()`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no rust ref in FFI docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose intent.rs content to bindings?

5 participants