Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CryptoNoteUtils

Provides CryptoNote based utilities for block manipulation using a native Node.js c++ addon. The methods in this class are provided as async primitives that wrap the synchronous versions for those that wish to use Typescript

Hierarchy

  • CryptoNoteUtils

Index

Methods

Static address_decode

  • address_decode(address: Buffer): Promise<number>
  • Calculates the address prefix in decimal form from the given address

    Parameters

    • address: Buffer

      the public wallet address to decode

    Returns Promise<number>

Static construct_block_blob

  • construct_block_blob(block: Buffer, nonce: Buffer | number): Promise<Buffer>
  • Constructs a new "final" block that can be submitted to the network from the original block in the block template and the nonce value found by the miner(s)

    Parameters

    • block: Buffer

      the block blob

    • nonce: Buffer | number

    Returns Promise<Buffer>

Static convert_blob

  • convert_blob(template: Buffer): Promise<Buffer>
  • Converts a block into a v1 hashing block typically used by miners during mining operations. This method actually creates a merged mining block that merge mines itself

    Parameters

    • template: Buffer

      the block template blob

    Returns Promise<Buffer>

Static convert_blob_bb

  • convert_blob_bb(template: Buffer): Promise<Buffer>
  • Legacy convert block (prior to merged mining) that parses and validates a block blob from a block template

    Parameters

    • template: Buffer

      the block template blob

    Returns Promise<Buffer>

Static get_block_id

  • get_block_id(blob: Buffer): Promise<Buffer>
  • Calculates the block id (hash) of the given blob

    Parameters

    • blob: Buffer

      the block blob

    Returns Promise<Buffer>

Generated using TypeDoc