Skip to content
Open
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
20 changes: 20 additions & 0 deletions identity_iota_core/packages/iota_identity/sources/controller.move
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,26 @@ module iota_identity::controller {
} = token;
object::delete(id);
}

#[test_only]
/// Create a DelegationToken for testing purposes - links to a given Identity ID
public fun create_delegation_token_for_testing(
controller_of: ID,
ctx: &mut TxContext,
): DelegationToken {
new_delegation_token(
object::id_from_address(@0xFACE),
controller_of,
permissions::all(),
ctx,
)
}

#[test_only]
/// Destroy a DelegationToken in tests
public fun destroy_delegation_token_for_testing(token: DelegationToken) {
delete_delegation_token(token);
}
}

#[test_only]
Expand Down