sui_types::derived_object

Function derive_object_id

Source
pub fn derive_object_id<T>(
    parent: T,
    key_type_tag: &TypeTag,
    key_bytes: &[u8],
) -> Result<ObjectID, Error>
where T: Into<SuiAddress>,
Expand description

Using a parent object, a type tag and the bcs bytes of the key, compute the derived object address.

Note: Namespace is hidden so struct T should be passed in as is.