-
Notifications
You must be signed in to change notification settings - Fork 55
feat(iota-framework): Add create_auth_info_v1 native function #8477
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
Merged
TheMrAI
merged 10 commits into
vm-lang/aa-auth/8116-feature-branch
from
vm-lang/aa-auth/8117-create_auth_info
Sep 11, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5fc552c
refactor(iota-types): AuthenticatorInfoV1 now follows expected type c…
TheMrAI 336dd74
feat(iota-verifier): Add account `authenticate` verifier
TheMrAI 8baa24c
feat(iota-framework): Add `create_auth_info_v1` native function
TheMrAI 9fb710b
fix(iota-execution): Make CreateAuthInfoV1ImplCostParams with Optiona…
TheMrAI 3b36b75
fix(iota-json-rpc-tests): Add new framework module names to the test
TheMrAI 59f6f35
fix(iota-swarm-config): Update populated_genesis_snapshot_matches tes…
TheMrAI 0ad82a7
Fix typos and remove confusing doc section in create_auth_info_v1
TheMrAI 8b57209
Add copy, drop to AuthenticatorInfoV1
TheMrAI 82eda5b
Rename the authenticateor info constant to include the version number
TheMrAI 458aa71
Fix CI pipeline
TheMrAI File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+364 Bytes
(100%)
...t/bytecode_snapshot/12/0x0000000000000000000000000000000000000000000000000000000000000002
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
crates/iota-framework/packages/iota-framework/sources/account.move
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // Copyright (c) 2025 IOTA Stiftung | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| module iota::account; | ||
|
|
||
| use std::ascii; | ||
|
|
||
| /// Dynamic field key, where the system will look for a potential | ||
| /// authenticate function. | ||
| #[allow(unused_const)] | ||
| const AUTHENTICATOR_ID: vector<u8> = b"IOTA_AUTHENTICATION"; | ||
|
|
||
| #[allow(unused_field)] | ||
| public struct AuthenticatorInfoV1 has copy, drop, store { | ||
| package: ID, | ||
| module_name: ascii::String, | ||
| function_name: ascii::String, | ||
| } | ||
|
|
||
| /// Create an "AuthenticatorInfoV1" using an `authenticate` function defined outside of this version of the package | ||
| /// | ||
| /// The referred `package`, `module_name`, `function_name` can refer to any valid `authenticate` function, | ||
| /// regardless of package dependencies or versions. | ||
| /// For example package A has two versions V1 and V2. V2 of package A may refer to an `authenticate` | ||
| /// function defined in V1. Or it can refer to any package B with an appropriate `authenticate` function | ||
| /// even if package A does not have a dependency on package B. | ||
| /// In fact package A may have a dependency on package B version 1, but can still refer to an `authenticate` | ||
| /// function defined in package B version 2. | ||
| /// Refiring to an `authenticate` function with `create_auth_info_v1` is a strictly runtime dependency and | ||
| /// it does not collide with any compile time restrictions. | ||
| public fun create_auth_info_v1( | ||
| package: address, | ||
| module_name: ascii::String, | ||
| function_name: ascii::String, | ||
| ): AuthenticatorInfoV1 { | ||
| create_auth_info_v1_impl(package, module_name.as_bytes(), function_name.as_bytes()) | ||
| } | ||
|
|
||
| native fun create_auth_info_v1_impl( | ||
| package: address, | ||
| module_name: &vector<u8>, | ||
| function_name: &vector<u8>, | ||
| ): AuthenticatorInfoV1; | ||
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.