Module utils/peers

Index

Variables

Variables

Const _exports

_exports: { length: number; [Symbol.iterator]: any; [Symbol.unscopables]: any; concat: any; copyWithin: any; entries: any; every: any; fill: any; filter: any; find: any; findIndex: any; flat: any; flatMap: any; forEach: any; includes: any; indexOf: any; join: any; keys: any; lastIndexOf: any; map: any; pop: any; push: any; reduce: any; reduceRight: any; reverse: any; shift: any; slice: any; some: any; sort: any; splice: any; toLocaleString: any; toString: any; unshift: any; values: any }

Type declaration

  • [n: number]: { id: string; privKey: string; pubKey: string }
    • id: string
    • privKey: string
    • pubKey: string
  • length: number
  • [Symbol.iterator]: function
    • [Symbol.iterator](): IterableIterator<{ id: string; privKey: string; pubKey: string }>
    • Returns IterableIterator<{ id: string; privKey: string; pubKey: string }>

  • [Symbol.unscopables]: function
    • [Symbol.unscopables](): { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean }
    • Returns { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean }

      • copyWithin: boolean
      • entries: boolean
      • fill: boolean
      • find: boolean
      • findIndex: boolean
      • keys: boolean
      • values: boolean
  • concat: function
    • concat(...items: ConcatArray<{ id: string; privKey: string; pubKey: string }>[]): { id: string; privKey: string; pubKey: string }[]
    • concat(...items: ({ id: string; privKey: string; pubKey: string } | ConcatArray<{ id: string; privKey: string; pubKey: string }>)[]): { id: string; privKey: string; pubKey: string }[]
    • Parameters

      • Rest ...items: ConcatArray<{ id: string; privKey: string; pubKey: string }>[]

      Returns { id: string; privKey: string; pubKey: string }[]

    • Parameters

      • Rest ...items: ({ id: string; privKey: string; pubKey: string } | ConcatArray<{ id: string; privKey: string; pubKey: string }>)[]

      Returns { id: string; privKey: string; pubKey: string }[]

  • copyWithin: function
    • copyWithin(target: number, start: number, end?: number | undefined): { id: string; privKey: string; pubKey: string }[]
    • Parameters

      • target: number
      • start: number
      • Optional end: number | undefined

      Returns { id: string; privKey: string; pubKey: string }[]

  • entries: function
    • entries(): IterableIterator<[number, { id: string; privKey: string; pubKey: string }]>
    • Returns IterableIterator<[number, { id: string; privKey: string; pubKey: string }]>

  • every: function
    • every<S>(predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => value is S, thisArg?: any): this is S[]
    • every(predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => unknown, thisArg?: any): boolean
    • Type parameters

      • S: { id: string; privKey: string; pubKey: string }

      Parameters

      • predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => value is S
          • (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]): value is S
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns value is S

      • Optional thisArg: any

      Returns this is S[]

    • Parameters

      • predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => unknown
          • (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]): unknown
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns unknown

      • Optional thisArg: any

      Returns boolean

  • fill: function
    • fill(value: { id: string; privKey: string; pubKey: string }, start?: number | undefined, end?: number | undefined): { id: string; privKey: string; pubKey: string }[]
    • Parameters

      • value: { id: string; privKey: string; pubKey: string }
        • id: string
        • privKey: string
        • pubKey: string
      • Optional start: number | undefined
      • Optional end: number | undefined

      Returns { id: string; privKey: string; pubKey: string }[]

  • filter: function
    • filter<S_1>(predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => value is S_1, thisArg?: any): S_1[]
    • filter(predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => unknown, thisArg?: any): { id: string; privKey: string; pubKey: string }[]
    • Type parameters

      • S_1: { id: string; privKey: string; pubKey: string }

      Parameters

      • predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => value is S_1
          • (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]): value is S_1
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns value is S_1

      • Optional thisArg: any

      Returns S_1[]

    • Parameters

      • predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => unknown
          • (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]): unknown
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns unknown

      • Optional thisArg: any

      Returns { id: string; privKey: string; pubKey: string }[]

  • find: function
    • find<S_2>(predicate: (this: void, value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]) => value is S_2, thisArg?: any): S_2 | undefined
    • find(predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]) => unknown, thisArg?: any): { id: string; privKey: string; pubKey: string } | undefined
    • Type parameters

      • S_2: { id: string; privKey: string; pubKey: string }

      Parameters

      • predicate: (this: void, value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]) => value is S_2
          • (this: void, value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]): value is S_2
          • Parameters

            • this: void
            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • obj: { id: string; privKey: string; pubKey: string }[]

            Returns value is S_2

      • Optional thisArg: any

      Returns S_2 | undefined

    • Parameters

      • predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]) => unknown
          • (value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]): unknown
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • obj: { id: string; privKey: string; pubKey: string }[]

            Returns unknown

      • Optional thisArg: any

      Returns { id: string; privKey: string; pubKey: string } | undefined

  • findIndex: function
    • findIndex(predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]) => unknown, thisArg?: any): number
    • Parameters

      • predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]) => unknown
          • (value: { id: string; privKey: string; pubKey: string }, index: number, obj: { id: string; privKey: string; pubKey: string }[]): unknown
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • obj: { id: string; privKey: string; pubKey: string }[]

            Returns unknown

      • Optional thisArg: any

      Returns number

  • flat: function
    • flat<A, D>(this: A, depth?: D | undefined): FlatArray<A, D>[]
    • Type parameters

      • A

      • D: number = 1

      Parameters

      • this: A
      • Optional depth: D | undefined

      Returns FlatArray<A, D>[]

  • flatMap: function
    • flatMap<U_3, This>(callback: (this: This, value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[]
    • Type parameters

      • U_3

      • This = undefined

      Parameters

      • callback: (this: This, value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => U_3 | readonly U_3[]
          • (this: This, value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]): U_3 | readonly U_3[]
          • Parameters

            • this: This
            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns U_3 | readonly U_3[]

      • Optional thisArg: This | undefined

      Returns U_3[]

  • forEach: function
    • forEach(callbackfn: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => void, thisArg?: any): void
    • Parameters

      • callbackfn: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => void
          • (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]): void
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns void

      • Optional thisArg: any

      Returns void

  • includes: function
    • includes(searchElement: { id: string; privKey: string; pubKey: string }, fromIndex?: number | undefined): boolean
    • Parameters

      • searchElement: { id: string; privKey: string; pubKey: string }
        • id: string
        • privKey: string
        • pubKey: string
      • Optional fromIndex: number | undefined

      Returns boolean

  • indexOf: function
    • indexOf(searchElement: { id: string; privKey: string; pubKey: string }, fromIndex?: number | undefined): number
    • Parameters

      • searchElement: { id: string; privKey: string; pubKey: string }
        • id: string
        • privKey: string
        • pubKey: string
      • Optional fromIndex: number | undefined

      Returns number

  • join: function
    • join(separator?: string | undefined): string
    • Parameters

      • Optional separator: string | undefined

      Returns string

  • keys: function
    • keys(): IterableIterator<number>
    • Returns IterableIterator<number>

  • lastIndexOf: function
    • lastIndexOf(searchElement: { id: string; privKey: string; pubKey: string }, fromIndex?: number | undefined): number
    • Parameters

      • searchElement: { id: string; privKey: string; pubKey: string }
        • id: string
        • privKey: string
        • pubKey: string
      • Optional fromIndex: number | undefined

      Returns number

  • map: function
    • map<U>(callbackfn: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => U, thisArg?: any): U[]
    • Type parameters

      • U

      Parameters

      • callbackfn: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => U
          • (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]): U
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns U

      • Optional thisArg: any

      Returns U[]

  • pop: function
    • pop(): { id: string; privKey: string; pubKey: string } | undefined
    • Returns { id: string; privKey: string; pubKey: string } | undefined

  • push: function
    • push(...items: { id: string; privKey: string; pubKey: string }[]): number
    • Parameters

      • Rest ...items: { id: string; privKey: string; pubKey: string }[]

      Returns number

  • reduce: function
    • reduce(callbackfn: (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => { id: string; privKey: string; pubKey: string }): { id: string; privKey: string; pubKey: string }
    • reduce(callbackfn: (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => { id: string; privKey: string; pubKey: string }, initialValue: { id: string; privKey: string; pubKey: string }): { id: string; privKey: string; pubKey: string }
    • reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => U_1, initialValue: U_1): U_1
    • Parameters

      • callbackfn: (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => { id: string; privKey: string; pubKey: string }
          • (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]): { id: string; privKey: string; pubKey: string }
          • Parameters

            • previousValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentIndex: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns { id: string; privKey: string; pubKey: string }

            • id: string
            • privKey: string
            • pubKey: string

      Returns { id: string; privKey: string; pubKey: string }

      • id: string
      • privKey: string
      • pubKey: string
    • Parameters

      • callbackfn: (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => { id: string; privKey: string; pubKey: string }
          • (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]): { id: string; privKey: string; pubKey: string }
          • Parameters

            • previousValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentIndex: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns { id: string; privKey: string; pubKey: string }

            • id: string
            • privKey: string
            • pubKey: string
      • initialValue: { id: string; privKey: string; pubKey: string }
        • id: string
        • privKey: string
        • pubKey: string

      Returns { id: string; privKey: string; pubKey: string }

      • id: string
      • privKey: string
      • pubKey: string
    • Type parameters

      • U_1

      Parameters

      • callbackfn: (previousValue: U_1, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => U_1
          • (previousValue: U_1, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]): U_1
          • Parameters

            • previousValue: U_1
            • currentValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentIndex: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns U_1

      • initialValue: U_1

      Returns U_1

  • reduceRight: function
    • reduceRight(callbackfn: (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => { id: string; privKey: string; pubKey: string }): { id: string; privKey: string; pubKey: string }
    • reduceRight(callbackfn: (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => { id: string; privKey: string; pubKey: string }, initialValue: { id: string; privKey: string; pubKey: string }): { id: string; privKey: string; pubKey: string }
    • reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => U_2, initialValue: U_2): U_2
    • Parameters

      • callbackfn: (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => { id: string; privKey: string; pubKey: string }
          • (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]): { id: string; privKey: string; pubKey: string }
          • Parameters

            • previousValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentIndex: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns { id: string; privKey: string; pubKey: string }

            • id: string
            • privKey: string
            • pubKey: string

      Returns { id: string; privKey: string; pubKey: string }

      • id: string
      • privKey: string
      • pubKey: string
    • Parameters

      • callbackfn: (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => { id: string; privKey: string; pubKey: string }
          • (previousValue: { id: string; privKey: string; pubKey: string }, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]): { id: string; privKey: string; pubKey: string }
          • Parameters

            • previousValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentIndex: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns { id: string; privKey: string; pubKey: string }

            • id: string
            • privKey: string
            • pubKey: string
      • initialValue: { id: string; privKey: string; pubKey: string }
        • id: string
        • privKey: string
        • pubKey: string

      Returns { id: string; privKey: string; pubKey: string }

      • id: string
      • privKey: string
      • pubKey: string
    • Type parameters

      • U_2

      Parameters

      • callbackfn: (previousValue: U_2, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]) => U_2
          • (previousValue: U_2, currentValue: { id: string; privKey: string; pubKey: string }, currentIndex: number, array: { id: string; privKey: string; pubKey: string }[]): U_2
          • Parameters

            • previousValue: U_2
            • currentValue: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • currentIndex: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns U_2

      • initialValue: U_2

      Returns U_2

  • reverse: function
    • reverse(): { id: string; privKey: string; pubKey: string }[]
    • Returns { id: string; privKey: string; pubKey: string }[]

  • shift: function
    • shift(): { id: string; privKey: string; pubKey: string } | undefined
    • Returns { id: string; privKey: string; pubKey: string } | undefined

  • slice: function
    • slice(start?: number | undefined, end?: number | undefined): { id: string; privKey: string; pubKey: string }[]
    • Parameters

      • Optional start: number | undefined
      • Optional end: number | undefined

      Returns { id: string; privKey: string; pubKey: string }[]

  • some: function
    • some(predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => unknown, thisArg?: any): boolean
    • Parameters

      • predicate: (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]) => unknown
          • (value: { id: string; privKey: string; pubKey: string }, index: number, array: { id: string; privKey: string; pubKey: string }[]): unknown
          • Parameters

            • value: { id: string; privKey: string; pubKey: string }
              • id: string
              • privKey: string
              • pubKey: string
            • index: number
            • array: { id: string; privKey: string; pubKey: string }[]

            Returns unknown

      • Optional thisArg: any

      Returns boolean

  • sort: function
    • sort(compareFn?: ((a: { id: string; privKey: string; pubKey: string }, b: { id: string; privKey: string; pubKey: string }) => number) | undefined): { id: string; privKey: string; pubKey: string }[]
    • Parameters

      • Optional compareFn: ((a: { id: string; privKey: string; pubKey: string }, b: { id: string; privKey: string; pubKey: string }) => number) | undefined

      Returns { id: string; privKey: string; pubKey: string }[]

  • splice: function
    • splice(start: number, deleteCount?: number | undefined): { id: string; privKey: string; pubKey: string }[]
    • splice(start: number, deleteCount: number, ...items: { id: string; privKey: string; pubKey: string }[]): { id: string; privKey: string; pubKey: string }[]
    • Parameters

      • start: number
      • Optional deleteCount: number | undefined

      Returns { id: string; privKey: string; pubKey: string }[]

    • Parameters

      • start: number
      • deleteCount: number
      • Rest ...items: { id: string; privKey: string; pubKey: string }[]

      Returns { id: string; privKey: string; pubKey: string }[]

  • toLocaleString: function
    • toLocaleString(): string
    • Returns string

  • toString: function
    • toString(): string
    • Returns string

  • unshift: function
    • unshift(...items: { id: string; privKey: string; pubKey: string }[]): number
    • Parameters

      • Rest ...items: { id: string; privKey: string; pubKey: string }[]

      Returns number

  • values: function
    • values(): IterableIterator<{ id: string; privKey: string; pubKey: string }>
    • Returns IterableIterator<{ id: string; privKey: string; pubKey: string }>