-
Notifications
You must be signed in to change notification settings - Fork 4
feat(binding): expose more intent types #518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
| 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)?)) | ||
| } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()`. |
There was a problem hiding this comment.
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
Closes #439