Javascript - CreateBlock
It is a JavaScript library created to generate and send blocks to the NxtFi blockchain according to the network specifications.
Last updated
It is a JavaScript library created to generate and send blocks to the NxtFi blockchain according to the network specifications.
Last updated
Define the blockchain endpoint to use as an ENV variable:
This function is used to obtain the signed block that will be sent to the blockchain in the submitBlock
function.
SIGNER (Entity, name of authorized pubKey)
SCOPE (Signer, Child scope, or SC hash)
BLOCK CONTENT
PATH TO PRIVATE KEY
Return => signedBlock.
This function is used to send the signed block and register it on the blockchain.
SIGNED BLOCK
Return => result.data
This function is used to confirm submitted blocks and check whether they have been propagated successfully or not. It continuously checks for a maximum of 10 seconds or until finalization time is achieved.
HASH (submitted block hash)
i (Optional. Seconds to reduce tolerance from default 10sec)
Return => result.data