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.
Implements
Inherited Members
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 SourceSignatory(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. |
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 |
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).
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. .
|
Methods
| Improve this Doc View SourceEquals(Signatory)
Equality implementation.
Declaration
public bool Equals(Signatory other)
Parameters
Type | Name | Description |
---|---|---|
Signatory | other | The other object to compare.
|
Returns
Type | Description |
---|---|
Boolean | True if public key layout and requirements are equivalent to the other object.
|
Equals(Object)
Equality implementation.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The other object to compare (if it is
an ).
|
Returns
Type | Description |
---|---|
Boolean | If the other object is an Signatory, then
if key requirements are identical to the other
object, otherwise
.
|
Overrides
| Improve this Doc View SourceGetHashCode()
Equality implementation.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A unique hash of the contents of this
object. Only consistent within the current instance of
the application process.
|
Overrides
Operators
| Improve this Doc View SourceEquality(Signatory, Signatory)
Equals implementation.
Declaration
public static bool operator ==(Signatory left, Signatory right)
Parameters
Type | Name | Description |
---|---|---|
Signatory | left | Left hand argument.
|
Signatory | right | Right hand argument.
|
Returns
Type | Description |
---|---|
Boolean | True if Key requirements are identical within each objects.
|
Implicit(PendingParams to Signatory)
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 |
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 |
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. .
|
Returns
Type | Description |
---|---|
Signatory |
Inequality(Signatory, Signatory)
Not equals implementation.
Declaration
public static bool operator !=(Signatory left, Signatory right)
Parameters
Type | Name | Description |
---|---|---|
Signatory | left | Left hand argument.
|
Signatory | right | Right hand argument.
|
Returns
Type | Description |
---|---|
Boolean | if the Key requirements are identical
within each object.
if they are not identical.
|