Show / Hide Table of Contents

Class SignatureMapExtensions

Extension methods for working with protobuf signature maps.

Inheritance
object
SignatureMapExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public static class SignatureMapExtensions

Methods

| Edit this page View Source

AddSignatureAsync(SignatureMap, ReadOnlyMemory<byte>, Signatory)

Adds one or more signatures from the given Signatory to the existing Proto.SignatureMap instance.

Declaration
public static Task AddSignatureAsync(this SignatureMap signatureMap, ReadOnlyMemory<byte> data, Signatory signatory)
Parameters
Type Name Description
SignatureMap signatureMap

The signature map which may or may not contain pre-existing signatures.

ReadOnlyMemory<byte> data
The message data to sign, does not necessarily need to be a transaction,
and as a result, the TransactionId property will always be 
None

and the message will be an empty string.

Signatory signatory

The signatory that is asked to sign the message.

Returns
Type Description
Task
Remarks

This method does not examine the message being signed nor provide any validation of the results or de-duplication of identical signatures. It is meant to support edge cases outside the normal usage patterns of this SDK, therefore use sparingly and with care.

| Edit this page View Source

Satisfies(SignatureMap, ReadOnlyMemory<byte>, Endorsement)

Returns 
True

if the given signature map contains enough correct signatures to satisfy the key signing requirements of the given Endorsement.

Declaration
public static bool Satisfies(this SignatureMap signatureMap, ReadOnlyMemory<byte> data, Endorsement endorsement)
Parameters
Type Name Description
SignatureMap signatureMap

A signature map containing one or more signatures.

ReadOnlyMemory<byte> data

The message that was signed.

Endorsement endorsement

The key signing requirements that must be met.

Returns
Type Description
bool
True

if the signature map contains enough valid signatures for the data to satisfy the Endorsement key signing requirements.

Remarks
Note: this method does not return errors when it discovers invalid
signatures.  It may still return 
true

if sufficient correct signatures exist in the signature map to satisfy the requirements described in the target Endorsement.

  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph