diff --git a/lns.go b/lns.go index 2309cfc..1f91e3d 100644 --- a/lns.go +++ b/lns.go @@ -559,6 +559,18 @@ type NameStateStats = primitives.NameStateStats // NameStateStatus mirrors the name phase enum from pkg/primitives. type NameStateStatus = primitives.NameStateStatus +// ReservedName mirrors the reserved-name catalog entry type from pkg/covenant. +type ReservedName = covenant.ReservedName + +// LockedName mirrors the locked-name catalog entry type from pkg/covenant. +type LockedName = covenant.LockedName + +// ReservedEntry mirrors the reserved-name catalog entry pair from pkg/covenant. +type ReservedEntry = covenant.ReservedEntry + +// LockedEntry mirrors the locked-name catalog entry pair from pkg/covenant. +type LockedEntry = covenant.LockedEntry + // Name state constants mirror pkg/primitives so callers can keep using the // top-level lns package for common domain objects. const ( diff --git a/lns_package_test.go b/lns_package_test.go index df76d48..9f1f433 100644 --- a/lns_package_test.go +++ b/lns_package_test.go @@ -359,6 +359,21 @@ func TestPackageNameStateAliases(t *testing.T) { } } +func TestPackageCatalogTypeAliases(t *testing.T) { + var reserved ReservedName + var locked LockedName + var reservedEntry ReservedEntry + var lockedEntry LockedEntry + + if reserved.Name != "" || locked.Name != "" { + t.Fatal("catalog name aliases should expose the covenant catalog entry types") + } + + if reservedEntry.Value.Name != "" || lockedEntry.Value.Name != "" { + t.Fatal("catalog entry aliases should expose the covenant catalog entry pair types") + } +} + func TestPackageNameSetHelpers(t *testing.T) { hash, err := HashString("example-name") if err != nil {