Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Right

Rights are baking rights on the Tezos blockchain. Some rights (ex. baking rights, endorsing rights, etc.) are calculated based on the total balance that an account has been delegated to. For more information see the Rights API documentation on tzKT.

Hierarchy

  • Right

Index

Constructors

constructor

  • new Right(type: null | string, cycle: number, level: number, timestamp: Date, priority: null | number, slots: null | number, baker: any, status: null | BakingRightStatusParameter): Right
  • internal

    Parameters

    • type: null | string
    • cycle: number
    • level: number
    • timestamp: Date
    • priority: null | number
    • slots: null | number
    • baker: any
    • status: null | BakingRightStatusParameter

    Returns Right

Properties

Readonly baker

baker: any

Readonly cycle

cycle: number

Readonly level

level: number

Readonly priority

priority: null | number

Readonly slots

slots: null | number

Readonly status

Readonly timestamp

timestamp: Date

Readonly type

type: null | string

Methods

Static count

  • Fetches total number of stored rights from tzKT.

    see

    get rights count.

    example

    Usage

    let type: string = 'baking';
    let status: string = 'realized'
    let parameters: GetRightsParameters = {'type': type, 'status': status};
    let rightCount: number = await Right.count(parameters);
    

    Parameters

    Returns Promise<number>

    Returns the total number of stored rights.

Static fromAPI

  • fromAPI(data: any): Right

Static get

  • Fetches baking rights from tzKT.

    see

    get rights.

    example

    Usage

    let type: string = 'baking';
    let status: string = 'realized'
    let parameters: GetRightsParameters = {'type': type, 'status': status};
    let rights: Right[] = await Right.get(parameters);
    

    Parameters

    Returns Promise<Right[]>

    Returns a list of rights.

Generated using TypeDoc