Prizm Space
  • Prizm GitBook
  • Whitepaper
    • Introduction
    • Review
    • Core Technologies
    • POS in Prizm
    • Comparsion with Peercoin
    • Tokens
    • Network node
    • Blocks
    • Forging
    • Forging Algorithm
    • Paramining
    • Paramining options
    • Prizm Accounts
    • WALLET.DAT
    • Basics of Prizm Cryptography
    • Key Features
    • Problems
    • Application
    • Prizm Solutions
  • Prizm API
    • Description
    • General Notes
    • Create Transaction
    • Account Operations
    • Arbitrary Message System Operations
    • Block Operations
    • Forging Operations
    • Hallmark Operations
    • Networking Operations
    • Server Information Operations
    • Token Operations
    • Transaction Operations
    • Utilities
    • Debug Operations
    • Prizm API Examples
  • Roadmap
  • Prizm Devs
  • Latest News
  • Community
  • Downloads
  • Guidelines
    • Video
    • Articles
      • How can I connect to my node from another device?
      • How to create Prizm Wallet
      • How to install Prizm Core
      • Prizm Integration
  • F.A.Q
Powered by GitBook
On this page
  • Start / Stop / Get Forging
  • Get Forging
  • Start Forging
  • Stop Forging
  • Get Next Block Generators

Was this helpful?

  1. Prizm API

Forging Operations

PreviousBlock OperationsNextHallmark Operations

Last updated 4 years ago

Was this helpful?

Start / Stop / Get Forging

Start or stop forging with an account, or check to see if an account is forging. POST only.

Request:

  • requestType is either startForging, stopForging or getForging

  • secretPhrase is the secret passphrase of the account (optional for stopForging and getForging if password protected like the )

Response:

  • deadline (N) is the estimated time (in seconds since the last block) until the account will forge a block (startForging and getForging only)

  • hitTime (N) is the estimated time (in seconds since the genesis block) when the account will forge a block (startForging and getForging only)

  • remaining (N) is the deadline less the elapsed time since the last block (getForging only)

  • foundAndStopped (B) is true if forging was stopped, false if forging was already stopped (stopForging only)

  • account (S) is the account number (getForging only)

  • accountRS (S) is the Reed-Solomon address of the account (getForging only)

  • requestProcessingTime (N) is the API request processing time (in millisec)

Note: A getForging request returns errorCode 5 if the account is not forging. If the account has a zero effectiveBalance, forging can be started but deadline, remainingTime and hitTime will be set to zero.

Example: Refer to example.

Get Forging

Start Forging

Stop Forging

Get Next Block Generators

Returns the next block generators ordered by hit time. The list of currently active forgers is first initialized using the block generators with at least 2 blocks generated within the previous 10,000 blocks, excluding accounts without a public key. The list is updated as new blocks are processed. The results are not 100% correct since previously active generators may no longer be running and new generators won't be known until they generate a block.

Request:

  • requestType is getNextBlockGenerators

  • limit (N) is the number of next block generators to display.

Response:

  • activeCount (N) is the number of active forging accounts

  • lastBlock (S) is the last block ID on the blockchain

  • generators (A) is an array containing the number of next block generators requested

    • effectiveBalancePrizm (N) is the balance (in PRIZM) of the account available for forging: the unleased guaranteedBalance of this account plus the leased guaranteedBalance of all lessors to this account

    • accountRS (S) is the Reed-Solomon address of the account

    • deadline (N) is the estimated time (in seconds since the last block) until the account will forge a block

    • account (S) is the account number

    • hitTime (N) is the estimated time (in seconds since the genesis block) when the account will forge a block

  • requestProcessingTime (N) is the API request processing time (in millisec)

  • timestamp (N) is the timestamp (in seconds since the genesis block) when the request was executed

  • height (N) is the height of the blockchain

Refer to .

Refer to .

Refer to .

Example: Refer to example.

Debug Operations
Start / Stop / Get Forging
Start / Stop / Get Forging
Start / Stop / Get Forging
Start / Stop / Get Forging
Get Next Block Generators