Skip to main content

MultisigAggregatedSignature

type MultisigAggregatedSignature

Aggregated signature from members of a multisig committee.

BCS

The BCS serialized form for this type is defined by the following ABNF:

```text multisig-aggregated-signature = (vector multisig-member-signature) u16 ; bitmap multisig-committee ```

There is also a legacy encoding for this type defined as:

```text legacy-multisig-aggregated-signature = (vector multisig-member-signature) roaring-bitmap ; bitmap legacy-multisig-committee roaring-bitmap = bytes ; where the contents of the bytes are valid ; according to the serialized spec for ; roaring bitmaps ```

See <https://github.com/RoaringBitmap/RoaringFormatSpec\> for the specification for the serialized format of RoaringBitmaps.

type MultisigAggregatedSignature struct {
// contains filtered or unexported fields
}

func LiftFromExternalMultisigAggregatedSignature

func LiftFromExternalMultisigAggregatedSignature(handle uint64) *MultisigAggregatedSignature

func MultisigAggregatedSignatureFromBcs

func MultisigAggregatedSignatureFromBcs(bcs []byte) (*MultisigAggregatedSignature, error)

Create this type from BCS encoded bytes.

func MultisigAggregatedSignatureFromJson

func MultisigAggregatedSignatureFromJson(json string) (*MultisigAggregatedSignature, error)

Create this type from JSON encoded string.

func NewMultisigAggregatedSignature

func NewMultisigAggregatedSignature(signatures []*UserSignature, committee *MultisigCommittee) (*MultisigAggregatedSignature, error)

Construct a `MultisigAggregatedSignature` from a list of `UserSignature`s and a `MultisigCommittee`.

This: - validates `committee` via `MultisigCommittee::validate`; - converts each `UserSignature` into a `MultisigMemberSignature`; - derives the `bitmap` by locating each signature's public key in the committee, rejecting duplicates and signatures from non-members; - rejects empty signature lists and lists longer than the committee.

The caller must provide `signatures` in the same order as their corresponding members in `committee`: for committee `[pk1, pk2, pk3, pk4, pk5]`, `[sig1, sig2, sig5]` is valid but `[sig2, sig1, sig5]` is not.

func (*MultisigAggregatedSignature) Bitmap

func (_self *MultisigAggregatedSignature) Bitmap() uint16

The bitmap that indicates which committee members provided their signature.

func (*MultisigAggregatedSignature) Committee

func (_self *MultisigAggregatedSignature) Committee() *MultisigCommittee

func (*MultisigAggregatedSignature) DebugString

func (_self *MultisigAggregatedSignature) DebugString() string

func (*MultisigAggregatedSignature) Destroy

func (object *MultisigAggregatedSignature) Destroy()

func (*MultisigAggregatedSignature) Eq

func (_self *MultisigAggregatedSignature) Eq(other *MultisigAggregatedSignature) bool

func (*MultisigAggregatedSignature) Ne

func (_self *MultisigAggregatedSignature) Ne(other *MultisigAggregatedSignature) bool

func (*MultisigAggregatedSignature) Signatures

func (_self *MultisigAggregatedSignature) Signatures() []*MultisigMemberSignature

The list of signatures from committee members