Show / Hide Table of Contents

Class Signatory

Represents a keyholder or group of keyholders that can sign a transaction for crypto transfer to support file creation, contract creation and execution or pay for consensus services among other network tasks.

Inheritance
Object
Signatory
Implements
IEquatable<Signatory>
Inherited Members
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Hashgraph
Assembly: Hashgraph.dll
Syntax
public sealed class Signatory : ISignatory, IEquatable<Signatory>
Remarks

A

Signatory
is presently created with a pre-existing Ed25519 private key or a callback action having the information necessary to sucessfully sign the transaction as described by its matching Endorsement requrements. RSA-3072, ECDSA and
Contract
signatures are not natively supported thru the
Signatory
at this time but can be achieved thru the callback functionality.

Constructors

| Improve this Doc View Source

Signatory(PendingParams)

Creates a signatory that indicates the transaction should be scheduled and not immediately executed. The params include optional details on how to schedule the transaction.

Declaration
public Signatory(PendingParams pendingParams)
Parameters
Type Name Description
PendingParams pendingParams

The scheduling details of the pending transaction.

| Improve this Doc View Source

Signatory(Signatory[])

Create a signatory that is a combination of a number of other signatories. When this signatory is called to sign a transaction it will in turn ask all the child signatories in turn to sign the given transaction.

Declaration
public Signatory(params Signatory[] signatories)
Parameters
Type Name Description
Signatory[] signatories
| Improve this Doc View Source

Signatory(Func<IInvoice, Task>)

Create a Signatory invoking the given async callback function when asked to sign a transaction. The

Signatory
will pass an instance of an IInvoice containing details of the transaction to sign when needed. The callback function may add as many signatures as necessary to properly sign the transaction.

Declaration
public Signatory(Func<IInvoice, Task> signingCallback)
Parameters
Type Name Description
Func<IInvoice, Task> signingCallback

An async callback method that is invoked when the library asks this Signatory to sign a transaction.

Remarks

Note: For a single transaction this method MAY BE CALLED TWICE in the event the library is being asked to retrieve a record as a part of the request. This is because retrieving a record of a transaction requires a separate payment. So, if this Signatory is directly attached to the root IContext it will be used to sign the request to retrieve the record (since this will typically represent the Payer's signature for the transaction).

| Improve this Doc View Source

Signatory(ReadOnlyMemory<Byte>)

Create a signatory with a private Ed25519 key. When transactions are signed, this signatory will automatically sign the transaction with this private key.

Declaration
public Signatory(ReadOnlyMemory<byte> privateKey)
Parameters
Type Name Description
ReadOnlyMemory<Byte> privateKey

Bytes representing an Ed25519 private key signing transactions.
It is expected to be 48 bytes in length, prefixed with

0x302e020100300506032b6570
.

Methods

| Improve this Doc View Source

Equals(Signatory)

Equality implementation.

Declaration
public bool Equals(Signatory other)
Parameters
Type Name Description
Signatory other

The other

Signatory
object to compare.

Returns
Type Description
Boolean

True if public key layout and requirements are equivalent to the other

Signatory
object.

| Improve this Doc View Source

Equals(Object)

Equality implementation.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj

The other

Signatory
object to compare (if it is an
Signatory
).

Returns
Type Description
Boolean

If the other object is an Signatory, then

True
if key requirements are identical to the other

Signatories
object, otherwise
False
.
Overrides
Object.Equals(Object)
| Improve this Doc View Source

GetHashCode()

Equality implementation.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

A unique hash of the contents of this

Signatory
object. Only consistent within the current instance of the application process.

Overrides
Object.GetHashCode()

Operators

| Improve this Doc View Source

Equality(Signatory, Signatory)

Equals implementation.

Declaration
public static bool operator ==(Signatory left, Signatory right)
Parameters
Type Name Description
Signatory left

Left hand

Signatory
argument.

Signatory right

Right hand

Signatory
argument.

Returns
Type Description
Boolean

True if Key requirements are identical within each

Signatory
objects.

| Improve this Doc View Source

Implicit(PendingParams to Signatory)

Convenience implicit cast for creating a

Signatory
directly from a PendingParams object.

Declaration
public static implicit operator Signatory(PendingParams pendingParams)
Parameters
Type Name Description
PendingParams pendingParams

The scheduling details of the pending transaction.

Returns
Type Description
Signatory
| Improve this Doc View Source

Implicit(Func<IInvoice, Task> to Signatory)

Convenience implicit cast for creating a

Signatory
directly from a
Func<IInvoice, Task> signingCallback
callback method.

Declaration
public static implicit operator Signatory(Func<IInvoice, Task> signingCallback)
Parameters
Type Name Description
Func<IInvoice, Task> signingCallback

An async callback method that is invoked when the library asks this Signatory to sign a transaction.

Returns
Type Description
Signatory
| Improve this Doc View Source

Implicit(ReadOnlyMemory<Byte> to Signatory)

Convenience implict cast for creating a

Signatory
directly from an Ed25519 private key.

Declaration
public static implicit operator Signatory(ReadOnlyMemory<byte> privateKey)
Parameters
Type Name Description
ReadOnlyMemory<Byte> privateKey

Bytes representing an Ed25519 private key signing transactions.
It is expected to be 48 bytes in length, prefixed with

0x302e020100300506032b6570
.
Returns
Type Description
Signatory
| Improve this Doc View Source

Inequality(Signatory, Signatory)

Not equals implementation.

Declaration
public static bool operator !=(Signatory left, Signatory right)
Parameters
Type Name Description
Signatory left

Left hand

Signatory
argument.

Signatory right

Right hand

Signatory
argument.

Returns
Type Description
Boolean
False
if the Key requirements are identical

within each

Signatory
object.

True
if they are not identical.

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top .NET Client Library for Hedera Hashgraph