Struct MultisigSig
Implements
Namespace: Algorand.Unity
Assembly: cs.temp.dll.dll
Syntax
public struct MultisigSig : ISignature, IEquatable<MultisigSig>
Constructors
MultisigSig(Byte, Byte, Address[])
Create a new multisig
Declaration
public MultisigSig(byte version, byte threshold, Address[] addresses)
Parameters
Type | Name | Description |
---|---|---|
Byte | version | The version of the msig protocol. The latest version is version 1. |
Byte | threshold | The number of signatures required for this msig to be valid. |
Address[] | addresses | The addresses or public keys composing this msig. Order matters! |
Fields
AddressPrefix
Declaration
public static readonly byte[] AddressPrefix
Field Value
Type | Description |
---|---|
Byte[] |
Subsigs
Subsignatures representing this multisig.
Declaration
public MultisigSig.Subsig[] Subsigs
Field Value
Type | Description |
---|---|
MultisigSig.Subsig[] |
Threshold
Number of signatures required for the multisig to be valid.
Declaration
public byte Threshold
Field Value
Type | Description |
---|---|
Byte |
Version
Version of the multisig.
Declaration
public byte Version
Field Value
Type | Description |
---|---|
Byte |
Methods
Equals(MultisigSig)
Declaration
public bool Equals(MultisigSig other)
Parameters
Type | Name | Description |
---|---|---|
MultisigSig | other |
Returns
Type | Description |
---|---|
Boolean |
GetAddress()
Generate the address for this MultisigSig.
Declaration
public Address GetAddress()
Returns
Type | Description |
---|---|
Address | An Address made from hashing the addresses in this subsig. |
Verify<TMessage>(TMessage)
Verify this msig against the message.
Declaration
public bool Verify<TMessage>(TMessage message)
where TMessage : IByteArray
Parameters
Type | Name | Description |
---|---|---|
TMessage | message | The message that was signed. |
Returns
Type | Description |
---|---|
Boolean | true if a threshold of signatures were valid, false otherwise |
Type Parameters
Name | Description |
---|---|
TMessage | The type of the bytearray the message is contained in. |