/// Adds explorer API endpoints to the corresponding scope.
Adds explorer API endpoints to the corresponding scope.
Adds explorer API endpoints to the corresponding scope .
pub fn wire_rest(&self, api_scope: &mut ServiceApiScope) -> &Self {
        api_scope
            .endpoint("v1/blocks", |state, query| {
                Self::blocks(state.data().for_core(), query)
            })
            .endpoint("v1/block", |state, query| {
                Self::block(state.data().for_core(), query)
            })
            .endpoint("v1/call_status/transaction", |state, query| {
                Self::transaction_status(state.data().for_core(), query)
            })
            .endpoint("v1/call_status/after_transactions", |state, query| {
                Self::after_transactions_status(state.data().for_core(), query)
            })
            .endpoint("v1/call_status/before_transactions", |state, query| {
                Self::before_transactions_status(state.data().for_core(), query)
            })
            .endpoint("v1/transactions", |state, query| {
                Self::transaction_info(state.data().for_core(), query)
            });
        let tx_sender = self.blockchain.sender().to_owned();
        api_scope.endpoint_mut("v1/transactions", move |state, query| {
            Self::add_transaction(state.snapshot(), &tx_sender, query)
        });
        self
    }
pub fn wire_rest ( & self , api_scope : & mut ServiceApiScope ) -> & Self { api_scope . endpoint ( " " , | state , query | { Self :: blocks ( state . data ( ) . for_core ( ) , query ) } ) . endpoint ( " " , | state , query | { Self :: block ( state . data ( ) . for_core ( ) , query ) } ) . endpoint ( " " , | state , query | { Self :: transaction_status ( state . data ( ) . for_core ( ) , query ) } ) . endpoint ( " " , | state , query | { Self :: after_transactions_status ( state . data ( ) . for_core ( ) , query ) } ) . endpoint ( " " , | state , query | { Self :: before_transactions_status ( state . data ( ) . for_core ( ) , query ) } ) . endpoint ( " " , | state , query | { Self :: transaction_info ( state . data ( ) . for_core ( ) , query ) } ) ; let tx_sender = self . blockchain . sender ( ) . to_owned ( ) ; api_scope . endpoint_mut ( " " , move | state , query | { Self :: add_transaction ( state . snapshot ( ) , & tx_sender , query ) } ) ; self }
Adds explorer API endpoints to the corresponding scope.
Adds explorer API endpoints to the corresponding scope .
&self
api_scope
&mut ServiceApiScope