List of server identities

### Hierarchy

- Message<Roster>
  - Roster

## Index

### Constructors

- constructor

### Properties

- $type
- _agg
- aggregate
- id
- list
- $type

### Accessors

- length

### Methods

- getPublics
- getServicePublics
- slice
- toBytes
- toJSON
- toTOML
- create
- decode
- decodeDelimited
- encode
- encodeDelimited
- fromBytes
- fromObject
- fromTOML
- register
- toObject
- verify

## Constructors

### constructor

- new Roster(properties?: Properties<Roster>): Roster

- Overrides Message.__constructor

  - Defined in src/network/proto.ts:85

  #### Parameters

  - ##### Optional properties: Properties<Roster>

  #### Returns Roster

## Properties

### $type

$type: Type

Inherited from Message.$type

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

Reference to the reflected type.

### Private _agg

_agg: Point

- Defined in src/network/proto.ts:85

### aggregate

aggregate: Buffer

- Defined in src/network/proto.ts:84

### id

id: Buffer

- Defined in src/network/proto.ts:82

### list

list: ServerIdentity[]

- Defined in src/network/proto.ts:83

### Static $type

$type: Type

Inherited from Message.$type

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

Reference to the reflected type.

## Accessors

### length

- get length(): number

- - Defined in src/network/proto.ts:23

  Get the length of the roster

  #### Returns number

  the length as a number

## Methods

### getPublics

- getPublics(): Point[]

- - Defined in src/network/proto.ts:135

  Returns the list of public keys of the conodes in the roster.

  #### Returns Point[]

### getServicePublics

- getServicePublics(name: string): Point[]

- - Defined in src/network/proto.ts:124

  Get the public keys for a given service

  #### Parameters

  - ##### name: string

    The name of the service

  #### Returns Point[]

  the list of points

### slice

- slice(start: number, end?: number): Roster

- - Defined in src/network/proto.ts:146

  Get a subset of the roster

  #### Parameters

  - ##### start: number

    Index of the first identity

  - ##### Optional end: number

    Index of the last identity, not inclusive

  #### Returns Roster

  the new roster

### toBytes

- toBytes(): Buffer

- - Defined in src/network/proto.ts:154

  Helper to encode the Roster using protobuf

  #### Returns Buffer

  the bytes

### 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

### toTOML

- toTOML(): string

- - Defined in src/network/proto.ts:162

  Returns a toml representation of the roster, not including the service public keys.

  #### Returns string

  string of toml representation

### 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<Roster>

  #### 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<Roster>

  #### 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<Roster>

  #### 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<Roster>

  #### 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<Roster>

  #### Parameters

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

  - ##### message: T | object

    Message to encode

  - ##### Optional writer: Writer

  #### Returns Writer

  Writer

### Static fromBytes

- fromBytes(b: Buffer): Roster

- - Defined in src/network/proto.ts:34

  #### Parameters

  - ##### b: Buffer

  #### Returns Roster

### 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<Roster>

  #### Parameters

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

  - ##### object: object

    Plain object

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

  #### Returns T

  Message instance

### Static fromTOML

- fromTOML(data: string): Roster

- - Defined in src/network/proto.ts:56

  Parse cothority roster toml string into a Roster object.

  example

    // Toml needs to adhere to the following format // where public has to be a hex-encoded string.

    [[servers]] Address = "tcp://127.0.0.1:7001" Public = "4e3008c1a2b6e022fb60b76b834f174911653e9c9b4156cc8845bfb334075655" Description = "conode1" [[servers]] Address = "tcp://127.0.0.1:7003" Public = "e5e23e58539a09d3211d8fa0fb3475d48655e0c06d83e93c8e6e7d16aa87c106" Description = "conode2"

  #### Parameters

  - ##### data: string

    toml with the above format

  #### Returns Roster

  the parsed roster

### Static register

- register(): void

- - Defined in src/network/proto.ts:30
  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<Roster>

  #### 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