### Hierarchy

- IdentityEd25519
  - SignerEd25519

### Implements

- IIdentity
- ISigner

## Index

### Constructors

- constructor

### Properties

- $type
- point
- priv
- $type

### Accessors

- public
- secret

### Methods

- sign
- toBytes
- toJSON
- toString
- verify
- create
- decode
- decodeDelimited
- encode
- encodeDelimited
- fromBytes
- fromObject
- fromPoint
- random
- register
- toObject
- verify

## Constructors

### constructor

- new SignerEd25519(pub: Point, priv: Scalar): SignerEd25519

- Overrides IdentityEd25519.constructor

  - Defined in src/darc/signer-ed25519.ts:34

  #### Parameters

  - ##### pub: Point

  - ##### priv: Scalar

  #### Returns SignerEd25519

## Properties

### $type

$type: Type

Inherited from Message.$type

- Defined in node_modules/protobufjs/index.d.ts:524

Reference to the reflected type.

### point

point: Buffer

Inherited from IdentityEd25519.point

- Defined in src/darc/identity-ed25519.ts:39

### Private priv

priv: Scalar

- Defined in src/darc/signer-ed25519.ts:34

### Static $type

$type: Type

Inherited from Message.$type

- Defined in node_modules/protobufjs/index.d.ts:521

Reference to the reflected type.

## Accessors

### public

- get public(): Point

- Inherited from IdentityEd25519.public

  - Defined in src/darc/identity-ed25519.ts:17

  Get the public key as a point

  #### Returns Point

### secret

- get secret(): Scalar

- - Defined in src/darc/signer-ed25519.ts:13

  #### Returns Scalar

## Methods

### sign

- sign(msg: Buffer): Buffer

- Implementation of ISigner.sign

  - Defined in src/darc/signer-ed25519.ts:42

  Signs the sha256 hash of the message. It must return an array of bytes that can be verified by the corresponding identity-implementation.

  #### Parameters

  - ##### msg: Buffer

  #### Returns Buffer

  the signature

### toBytes

- toBytes(): Buffer

- Implementation of ISigner.toBytes

  Inherited from IdentityEd25519.toBytes

  - Defined in src/darc/identity-ed25519.ts:53

  Get the byte array representation of the public key of the identity

  #### Returns Buffer

  the public key as buffer

### toJSON

- toJSON(): object

- Inherited from Message.toJSON

  - Defined in node_modules/protobufjs/index.d.ts:589

  Converts this message to JSON.

  #### Returns object

  JSON object

  - ##### [k: string]: any

### toString

- toString(): string

- Implementation of ISigner.toString

  Inherited from IdentityEd25519.toString

  - Defined in src/darc/identity-ed25519.ts:58

  Get the string representation of the identity

  #### Returns string

  a string representation

### verify

- verify(msg: Buffer, signature: Buffer): boolean

- Implementation of ISigner.verify

  Inherited from IdentityEd25519.verify

  - Defined in src/darc/identity-ed25519.ts:48

  Returns true if the verification of signature on the sha-256 of msg is successful or false if not.

  #### Parameters

  - ##### msg: Buffer

  - ##### signature: Buffer

  #### Returns boolean

  true when the signature matches the message, false otherwise

### Static create

- create<T>(this: Constructor<T>, properties?: object): Message<T>

- Inherited from Message.create

  - Defined in node_modules/protobufjs/index.d.ts:531

  Creates a new message of this type using the specified properties.

  #### Type parameters

  - #### T: Message<IdentityEd25519>

  #### Parameters

  - ##### this: Constructor<T>

  - ##### Optional properties: object

    - ##### [k: string]: any

  #### Returns Message<T>

  Message instance

### Static decode

- decode<T>(this: Constructor<T>, reader: Reader | Uint8Array): T

- Inherited from Message.decode

  - Defined in node_modules/protobufjs/index.d.ts:554

  Decodes a message of this type.

  #### Type parameters

  - #### T: Message<IdentityEd25519>

  #### Parameters

  - ##### this: Constructor<T>

  - ##### reader: Reader | Uint8Array

    Reader or buffer to decode

  #### Returns T

  Decoded message

### Static decodeDelimited

- decodeDelimited<T>(this: Constructor<T>, reader: Reader | Uint8Array): T

- Inherited from Message.decodeDelimited

  - Defined in node_modules/protobufjs/index.d.ts:561

  Decodes a message of this type preceeded by its length as a varint.

  #### Type parameters

  - #### T: Message<IdentityEd25519>

  #### Parameters

  - ##### this: Constructor<T>

  - ##### reader: Reader | Uint8Array

    Reader or buffer to decode

  #### Returns T

  Decoded message

### Static encode

- encode<T>(this: Constructor<T>, message: T | object, writer?: Writer): Writer

- Inherited from Message.encode

  - Defined in node_modules/protobufjs/index.d.ts:539

  Encodes a message of this type.

  #### Type parameters

  - #### T: Message<IdentityEd25519>

  #### Parameters

  - ##### this: Constructor<T>

  - ##### message: T | object

    Message to encode

  - ##### Optional writer: Writer

  #### Returns Writer

  Writer

### Static encodeDelimited

- encodeDelimited<T>(this: Constructor<T>, message: T | object, writer?: Writer): Writer

- Inherited from Message.encodeDelimited

  - Defined in node_modules/protobufjs/index.d.ts:547

  Encodes a message of this type preceeded by its length as a varint.

  #### Type parameters

  - #### T: Message<IdentityEd25519>

  #### Parameters

  - ##### this: Constructor<T>

  - ##### message: T | object

    Message to encode

  - ##### Optional writer: Writer

  #### Returns Writer

  Writer

### Static fromBytes

- fromBytes(bytes: Buffer): SignerEd25519

- - Defined in src/darc/signer-ed25519.ts:22

  Create a Ed25519 signer from the private given as a buffer

  #### Parameters

  - ##### bytes: Buffer

    the private key

  #### Returns SignerEd25519

  the new signer

### Static fromObject

- fromObject<T>(this: Constructor<T>, object: object): T

- Inherited from Message.fromObject

  - Defined in node_modules/protobufjs/index.d.ts:575

  Creates a new message of this type from a plain object. Also converts values to their respective internal types.

  #### Type parameters

  - #### T: Message<IdentityEd25519>

  #### Parameters

  - ##### this: Constructor<T>

  - ##### object: object

    Plain object

    - ##### [k: string]: any

  #### Returns T

  Message instance

### Static fromPoint

- fromPoint(p: Point): IdentityEd25519

- Inherited from IdentityEd25519.fromPoint

  - Defined in src/darc/identity-ed25519.ts:34

  Initialize an IdentityEd25519 from a point.

  #### Parameters

  - ##### p: Point

  #### Returns IdentityEd25519

### Static random

- random(): SignerEd25519

- - Defined in src/darc/signer-ed25519.ts:28

  #### Returns SignerEd25519

### Static register

- register(): void

- Inherited from IdentityEd25519.register

  - Defined in src/darc/identity-ed25519.ts:27
  see

    README#Message classes

  #### Returns void

### Static toObject

- toObject<T>(this: Constructor<T>, message: T, options?: IConversionOptions): object

- Inherited from Message.toObject

  - Defined in node_modules/protobufjs/index.d.ts:583

  Creates a plain object from a message of this type. Also converts values to other types if specified.

  #### Type parameters

  - #### T: Message<IdentityEd25519>

  #### Parameters

  - ##### this: Constructor<T>

  - ##### message: T

    Message instance

  - ##### Optional options: IConversionOptions

  #### Returns object

  Plain object

  - ##### [k: string]: any

### Static verify

- verify(message: object): string

- Inherited from Message.verify

  - Defined in node_modules/protobufjs/index.d.ts:568

  Verifies a message of this type.

  #### Parameters

  - ##### message: object

    Plain object to verify

    - ##### [k: string]: any

  #### Returns string

  `null` if valid, otherwise the reason why it is not

Generated using TypeDoc