Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Operation

Operations are actions that can/have been taken on the Tezos blockchain. Operations can include transactions, activations, originations, accusations, and delegations and more. For more information on the endpoints see the Operations API documentation on tzKT.

Hierarchy

  • Operation

Index

Constructors

constructor

  • new Operation(type: null | string, id: number, level: number, timestamp: Date, block: null | string, hash: null | string, delegate: null | string, slots: number, deposit: number, rewards: number, quote: null | BalanceShort): Operation
  • internal

    Parameters

    • type: null | string
    • id: number
    • level: number
    • timestamp: Date
    • block: null | string
    • hash: null | string
    • delegate: null | string
    • slots: number
    • deposit: number
    • rewards: number
    • quote: null | BalanceShort

    Returns Operation

Properties

Readonly block

block: null | string

Readonly delegate

delegate: null | string

Readonly deposit

deposit: number

Readonly hash

hash: null | string

Readonly id

id: number

Readonly level

level: number

Readonly quote

quote: null | BalanceShort

Readonly rewards

rewards: number

Readonly slots

slots: number

Readonly timestamp

timestamp: Date

Readonly type

type: null | string

Methods

Static ByHashCounter

  • ByHashCounter(hash: string, counter: number, quote?: string, domain?: string): Promise<Operation[]>
  • Fetches an operation with the specified hash and counter from tzKT.

    see

    get operations by hash and counter.

    Parameters

    • hash: string
    • counter: number
    • quote: string = "None"
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns an operation with the specified hash and counter.

Static activationsByHash

  • activationsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches activation operations with the specified hash from tzKT.

    see

    get activation by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns activation operations with the specified hash.

Static activationsCount

  • activationsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches activation operations count with the specified operation type from tzKT.

    see

    get activations count

    example

    Fetch Activation Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.activationsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of activation operations.

Static bakingByHash

  • bakingByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches baking operations with the specified hash from tzKT.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns baking operations with the specified hash.

Static bakingCount

  • bakingCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches baking operations count with the specified operation type from tzKT.

    see

    get baking count

    example

    Fetch Baking Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.bakingCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of baking operations.

Static ballotsByHash

  • ballotsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches ballot operations with the specified hash from tzKT.

    see

    get ballot by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns ballot operations with the specified hash.

Static ballotsCount

  • ballotsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches an ballot operation count with the specified operation type from tzKT.

    see

    get ballots count

    example

    Fetch Ballot Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.ballotsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of ballot operations.

Static byAccount

  • Returns a list of operations created by (or related to) the specified account from tzKT.

    remarks

    For better flexibility this endpoint accumulates query parameters (filters) of each /operations/{type} endpoint, so a particular filter may affect several operation types containing this filter. For example, if you specify an initiator it will affect all transactions, delegations and originations, because all these types have an initiator field.

    see

    get account operations.

    example

    Fetch Operations related to an Account

    Usage

    let address: string = 'tz1WEHHVMWxQUtkWAgrJBFGXjJ5YqZVgfPVE';
    let op: Operation = await Operation.byAccount(address);
    

    Parameters

    Returns Promise<Operation[]>

    Returns a list of operations related to the specified account.

Static byHash

  • byHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches an operation with the specified hash from tzKT.

    see

    get operations by hash.

    example

    Fetch Operation by Hash

    Usage

    let hash: string = 'ooQf6zZhvkydbx48hJeZzG8uW1VGL6aR354F5asvcrJZ1XcLGQm';
    let op: Operation = await Operation.byHash(hash);
    

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns an operation with the specified hash.

Static delegationsByHash

  • delegationsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches delegations operations with the specified hash from tzKT.

    see

    get delegations by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns delegations operations with the specified hash.

Static delegationsCount

  • delegationsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches delegation operations count with the specified operation type from tzKT.

    see

    get delegations count

    example

    Fetch Delegation Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.delegationsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of delegation operations.

Static doubleBakingByHash

  • doubleBakingByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches double baking operations with the specified hash from tzKT.

    see

    get double baking by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns double baking operations with the specified hash.

Static doubleBakingCount

  • doubleBakingCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches double baking operations count with the specified operation type from tzKT.

    see

    get double baking count

    example

    Fetch Double Baking Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.doubleBakingCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of double baking operations.

Static doubleEndorsingByHash

  • doubleEndorsingByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches double endorsing operations with the specified hash from tzKT.

    see

    get double endorsing by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns double endorsing operations with the specified hash.

Static doubleEndorsingCount

  • doubleEndorsingCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches double endorsing operations count with the specified operation type from tzKT.

    see

    get double endorsing count

    example

    Fetch Double Endorsing Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.doubleEndorsingCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of double endorsing operations.

Static endorsementsByHash

  • endorsementsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches endorsement operations with the specified hash from tzKT.

    see

    get endorsements by hash.

    example

    Fetch Endorsements Operations by Hash

    Usage

    let address: string = 'tz1WEHHVMWxQUtkWAgrJBFGXjJ5YqZVgfPVE';
    let op: Operation = await Operation.byAccount(address);
    

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns endorsement operations with the specified hash.

Static endorsementsCount

  • endorsementsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches an endorsement operation count with the specified operation type from tzKT.

    see

    get endorsements count

    example

    Fetch Endorsement Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.endorsementsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of endorsement operations.

Static fromAPI

Static getActivations

  • Fetches activation operations with the specified criteria from tzKT.

    see

    get activations

    example

    Fetch Activation Operations

    Usage

    let level: number = 1500000;
    let parameters: GetActivationParameters = { 'level': level };
    let op: Operation[] = await Operation.getActivations(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Activation operations

Static getBakings

  • Fetches baking operations with the specified criteria from tzKT.

    see

    get baking

    example

    Fetch Baking Operations

    Usage

    let level: number = 1500000;
    let parameters: getBakingParameters = { 'level': level };
    let op: Operation[] = await Operation.getBakings(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Baking operations

Static getBallots

  • Fetches ballot operations with the specified criteria from tzKT.

    see

    get ballots

    example

    Fetch Ballot Operations

    Usage

    let level: number = 1500000;
    let parameters: GetBallotsParameters = { 'level': level };
    let op: Operation[] = await Operation.getBallots(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Ballot operations

Static getDelegations

  • Fetches delegation operations with the specified criteria from tzKT.

    see

    get delegation

    example

    Fetch Delegation Operations

    Usage

    let level: number = 1500000;
    let parameters: getDelegationParameters = { 'level': level };
    let op: Operation[] = await Operation.getDelegations(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Delegation operations

Static getDoubleBakings

  • Fetches double baking operations with the specified criteria from tzKT.

    see

    get double baking

    example

    Fetch Double Baking Operations

    Usage

    let level: number = 1500000;
    let parameters: GetDoubleBakingParameters = { 'level': level };
    let op: Operation[] = await Operation.getDoubleBakings(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Double Baking operations

Static getDoubleEndorsings

  • Fetches double endorsing operations with the specified criteria from tzKT.

    see

    get double endorsing

    example

    Fetch Double Endorsing Operations

    Usage

    let level: number = 1500000;
    let parameters: GetDoubleBakingParameters = { 'level': level };
    let op: Operation[] = await Operation.getDoubleEndorsings(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Double Endorsing operations

Static getEndorsements

  • Fetches endorsement operations with the specified criteria from tzKT.

    see

    get endorsements

    example

    Fetch Endorsements Operations

    Usage

    let level: number = 1500000;
    let parameters: GetEndorsementsParameters = { 'level': level };
    let op: Operation[] = await Operation.getEndorsements(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Endorsement operations

Static getMigrations

  • Fetches migration operations with the specified criteria from tzKT.

    see

    get migrations

    example

    Fetch Migration Operations

    Usage

    let level: number = 1500000;
    let parameters: getMigrationParameters = { 'level': level };
    let op: Operation[] = await Operation.getMigrations(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Migration operations

Static getNonceRevelations

  • Fetches nonce revelation operations with the specified criteria from tzKT.

    see

    get nonce revelations

    example

    Fetch Nonce Revelation Operations

    Usage

    let level: number = 1500000;
    let parameters: getNonceRevelationsParameters = { 'level': level };
    let op: Operation[] = await Operation.getNonceRevelations(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Nonce Revelation operations

Static getOriginations

  • Fetches origination operations with the specified criteria from tzKT.

    see

    get originations

    example

    Fetch Origination Operations

    Usage

    let level: number = 1500000;
    let parameters: getOriginationParameters = { 'level': level };
    let op: Operation[] = await Operation.getOriginations(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Origination operations

Static getProposals

  • Fetches proposal operations with the specified criteria from tzKT.

    see

    get proposals

    example

    Fetch Proposal Operations

    Usage

    let level: number = 1500000;
    let parameters: GetProposalParameters = { 'level': level };
    let op: Operation[] = await Operation.getProposals(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Proposal operations

Static getReveals

  • Fetches reveal operations with the specified criteria from tzKT.

    see

    get reveals

    example

    Fetch Reveal Operations

    Usage

    let level: number = 1500000;
    let parameters: getRevealParameters = { 'level': level };
    let op: Operation[] = await Operation.getReveals(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Reveal operations

Static getRevelationPenalties

  • Fetches revelation penalties operations with the specified criteria from tzKT.

    see

    get revelation penalties

    example

    Fetch RevelationPenalty Operations

    Usage

    let level: number = 1500000;
    let parameters: getRevelationPenaltyParameters = { 'level': level };
    let op: Operation[] = await Operation.getRevelationPenalties(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Migration operations

Static getTransactions

  • Fetches transaction operations with the specified criteria from tzKT.

    see

    get transactions

    example

    Fetch Transaction Operations

    Usage

    let level: number = 1500000;
    let parameters: getTransactionParameters = { 'level': level };
    let op: Operation[] = await Operation.getTransactions(parameters);
    

    Parameters

    Returns Promise<Operation[]>

    Returns matching Transaction operations

Static migrationsByHash

  • migrationsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches migration operations with the specified hash from tzKT.

    see

    get reveal by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns migration operations with the specified hash.

Static migrationsCount

  • migrationsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches migration operations count with the specified operation type from tzKT.

    see

    get migrations count

    example

    Fetch Migration Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.migrationsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of migration operations.

Static nonceRevelationsByHash

  • nonceRevelationsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches nonce revelations operations with the specified hash from tzKT.

    see

    get double baking by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns nonce revelations operations with the specified hash.

Static nonceRevelationsCount

  • nonceRevelationsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches nonce revelation operations count with the specified operation type from tzKT.

    see

    get nonce revelations count

    example

    Fetch Nonce Revelation Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.nonceRevelationsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of nonce revelation operations.

Static originationsByHash

  • originationsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches origination operations with the specified hash from tzKT.

    see

    get originations by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns originations operations with the specified hash.

Static originationsCount

  • originationsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches origination operations count with the specified operation type from tzKT.

    see

    get originations count

    example

    Fetch Origination Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.originationsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of origination operations.

Static proposalsByHash

  • proposalsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches proposal operations with the specified hash from tzKT.

    see

    get proposal by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns proposal operations with the specified hash.

Static proposalsCount

  • proposalsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches proposal operations count with the specified operation type from tzKT.

    see

    get proposal count

    example

    Fetch Proposal Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.proposalsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of proposal operations.

Static revealsByHash

  • revealsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches reveal operations with the specified hash from tzKT.

    see

    get reveal by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns reveal operations with the specified hash.

Static revealsCount

  • revealsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches reveal operations count with the specified operation type from tzKT.

    see

    get reveals count

    example

    Fetch Reveal Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.revealsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of reveal operations.

Static revelationPenaltiesByHash

  • revelationPenaltiesByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches revelation penalties operations with the specified hash from tzKT.

    see

    get reveal by hash.

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns revelation penalties operations with the specified hash.

Static revelationPenaltiesCount

  • revelationPenaltiesCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches revelation penalty operations count with the specified operation type from tzKT.

    see

    get revelation penalties count

    example

    Fetch Revelation Penalty Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.revelationPenaltiesCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of revelation penalty operations.

Static transactionsByHash

  • transactionsByHash(hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches transaction operations with the specified hash from tzKT.

    see

    get transaction by hash.

    example

    Fetch Transaction Operation by Hash

    Usage

    let hash: string = 'ooQf6zZhvkydbx48hJeZzG8uW1VGL6aR354F5asvcrJZ1XcLGQm';
    let op: Operation = await Operation.transactionsByHash(hash);
    

    Parameters

    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns transaction operations with the specified hash.

Static transactionsCount

  • transactionsCount(level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches transaction operations count with the specified operation type from tzKT.

    see

    get transactions count

    example

    Fetch Transaction Operations Count

    Usage

    let level: number = 1500000;
    let op: Operation = await Operation.transactionsCount(level);
    

    Parameters

    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns the total number of transaction operations.

Static typeByHash

  • typeByHash(type: string, hash: string, quote: null | string, domain?: string): Promise<Operation[]>
  • Fetches an operation with the specified operation type and hash from tzKT.

    internal

    Parameters

    • type: string
    • hash: string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Operation[]>

    Returns an operation with the specified operation type and hash.

Static typeCount

  • typeCount(type: string, level: null | number, timestamp: null | Date, domain?: string): Promise<number>
  • Fetches an operation count with the specified operation type from tzKT.

    internal

    Parameters

    • type: string
    • level: null | number
    • timestamp: null | Date
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<number>

    Returns an operation count with the specified operation type.

Generated using TypeDoc