Interface BlockProcessingEnv

Hierarchy

  • BlockProcessingEnv

Properties

cleanup: ((config: Options) => void)

Type declaration

    • (config: Options): void
    • Parameters

      • config: Options

      Returns void

createBlock: ((transactions?: Transaction[], timestamp?: number) => Promise<Block>)

Type declaration

    • (transactions?: Transaction[], timestamp?: number): Promise<Block>
    • Parameters

      • Optional transactions: Transaction[]
      • Optional timestamp: number

      Returns Promise<Block>

getBlockchainDB: (() => Database)

Type declaration

    • (): Database
    • Returns Database

getChain: (() => Chain)

Type declaration

    • (): Chain
    • Returns Chain

getChainID: (() => Buffer)

Type declaration

    • (): Buffer
    • Returns Buffer

getConsensus: (() => Consensus)

Type declaration

    • (): Consensus
    • Returns Consensus

getConsensusStore: (() => StateStore)

Type declaration

    • (): StateStore
    • Returns StateStore

getDataAccess: (() => DataAccess)

Type declaration

    • (): DataAccess
    • Returns DataAccess

getEvents: ((height: number, module?: string, name?: string) => Promise<DecodedEventJSON[]>)

Type declaration

    • (height: number, module?: string, name?: string): Promise<DecodedEventJSON[]>
    • Parameters

      • height: number
      • Optional module: string
      • Optional name: string

      Returns Promise<DecodedEventJSON[]>

getGenerator: (() => Generator)

Type declaration

    • (): Generator
    • Returns Generator

getGenesisBlock: (() => Block)

Type declaration

getLastBlock: (() => Block)

Type declaration

getMethodContext: (() => MethodContext)

Type declaration

getNextValidatorKeys: ((blockHeader: BlockHeader, distance?: number) => Promise<{
    address: string;
    encrypted: {};
    keyPath: string;
    plain: {
        blsKey: string;
        blsKeyPath: string;
        blsPrivateKey: string;
        blsProofOfPossession: string;
        generatorKey: string;
        generatorKeyPath: string;
        generatorPrivateKey: string;
    };
    privateKey: string;
    publicKey: string;
}>)

Type declaration

    • (blockHeader: BlockHeader, distance?: number): Promise<{
          address: string;
          encrypted: {};
          keyPath: string;
          plain: {
              blsKey: string;
              blsKeyPath: string;
              blsPrivateKey: string;
              blsProofOfPossession: string;
              generatorKey: string;
              generatorKeyPath: string;
              generatorPrivateKey: string;
          };
          privateKey: string;
          publicKey: string;
      }>
    • Parameters

      Returns Promise<{
          address: string;
          encrypted: {};
          keyPath: string;
          plain: {
              blsKey: string;
              blsKeyPath: string;
              blsPrivateKey: string;
              blsProofOfPossession: string;
              generatorKey: string;
              generatorKeyPath: string;
              generatorPrivateKey: string;
          };
          privateKey: string;
          publicKey: string;
      }>

invoke: (<T>(path: string, params?: Record<string, unknown>) => Promise<T>)

Type declaration

    • <T>(path: string, params?: Record<string, unknown>): Promise<T>
    • Type Parameters

      • T = void

      Parameters

      • path: string
      • Optional params: Record<string, unknown>

      Returns Promise<T>

process: ((block: Block) => Promise<void>)

Type declaration

    • (block: Block): Promise<void>
    • Parameters

      Returns Promise<void>

processUntilHeight: ((height: number) => Promise<void>)

Type declaration

    • (height: number): Promise<void>
    • Parameters

      • height: number

      Returns Promise<void>

Generated using TypeDoc