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
7 changes: 7 additions & 0 deletions suifrens/accessories/sources/accessories.move
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ module accessories::accessories {

// === Reads ===

/// Accessor to allow third-party apps to query if a `SuiFren` has an accessory
/// with the given `type`.
public fun has_type<T> (sf: &SuiFren<T>, type: String): bool {
let uid = suifrens::uid(sf);
dof::exists_(uid, AccessoryKey { type })
}

/// Accessor for the `name` field of the `Accessory`.
public fun name(accessory: &Accessory): String {
accessory.name
Expand Down