Record Class SignedGroupAdvertisement

java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.peering.node.SignedGroupAdvertisement
Record Components:
advertisement - the founding advertisement
founderPublicKey - the founder's raw 32-byte Ed25519 public key
signature - 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 Details

    • SignedGroupAdvertisement

      public SignedGroupAdvertisement(GroupAdvertisement advertisement, byte[] founderPublicKey, byte[] signature)
      Creates an instance of a SignedGroupAdvertisement record class.
      Parameters:
      advertisement - the value for the advertisement record component
      founderPublicKey - the value for the founderPublicKey record component
      signature - the value for the signature record component
  • Method Details

    • equals

      public boolean equals(Object other)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      other - the object with which to compare
      Returns:
      true if this object is the same as the other argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • advertisement

      public GroupAdvertisement advertisement()
      Returns the value of the advertisement record component.
      Returns:
      the value of the advertisement record component
    • founderPublicKey

      public byte[] founderPublicKey()
      Returns the value of the founderPublicKey record component.
      Returns:
      the value of the founderPublicKey record component
    • signature

      public byte[] signature()
      Returns the value of the signature record component.
      Returns:
      the value of the signature record component