Record Class SignedGroupAdvertisement
java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.peering.node.SignedGroupAdvertisement
- Record Components:
advertisement- the founding advertisementfounderPublicKey- the founder's raw 32-byte Ed25519 public keysignature- the founder's signature over the founding fields
public record SignedGroupAdvertisement(GroupAdvertisement advertisement, byte[] founderPublicKey, byte[] signature)
extends Record
A self-certifying group's founding advertisement as it circulates (spec §4.4,
§5.1): the
GroupAdvertisement, the founder's raw Ed25519 public key,
and the founder's signature over the canonical bytes of the advertisement's
founding fields (GroupFounding.FoundingFields). The advertisement's
GroupID is the hash of those fields plus this signature
(GroupFounding.derive(GroupFounding.FoundingFields, byte[])), so any receiver holding only the GroupID can
check that this document is the founding document of that group and
that nobody swapped its policy: GroupFounding.verify(SignedGroupAdvertisement).-
Constructor Summary
ConstructorsConstructorDescriptionSignedGroupAdvertisement(GroupAdvertisement advertisement, byte[] founderPublicKey, byte[] signature) Creates an instance of aSignedGroupAdvertisementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvertisementrecord component.booleanIndicates whether some other object is "equal to" this one.byte[]Returns the value of thefounderPublicKeyrecord component.inthashCode()Returns a hash code value for this object.byte[]Returns the value of thesignaturerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
SignedGroupAdvertisement
public SignedGroupAdvertisement(GroupAdvertisement advertisement, byte[] founderPublicKey, byte[] signature) Creates an instance of aSignedGroupAdvertisementrecord class.- Parameters:
advertisement- the value for theadvertisementrecord componentfounderPublicKey- the value for thefounderPublicKeyrecord componentsignature- the value for thesignaturerecord component
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
-
toString
-
advertisement
Returns the value of theadvertisementrecord component.- Returns:
- the value of the
advertisementrecord component
-
founderPublicKey
public byte[] founderPublicKey()Returns the value of thefounderPublicKeyrecord component.- Returns:
- the value of the
founderPublicKeyrecord component
-
signature
-