Function cryptoapis::apis::create_subscriptions_for_api::new_block[][src]

pub async fn new_block(
    configuration: &Configuration,
    blockchain: &str,
    network: &str,
    context: Option<&str>,
    new_block_rb: Option<NewBlockRb>
) -> Result<NewBlockR, Error<NewBlockError>>
Expand description

Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a new block is mined in the specific blockchain. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address. A new block is mined when it is added to the chain once a consensus is reached by the majority of the miners, which is when the block gets validated and added to the blockchain. {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks here.{/note} {warning}Crypto APIs will notify the user only when the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification will not be sent if the event does not or cannot occur, or will take long time to occur.{/warning}