Trait snarkos_rpc::rpc_trait::ProtectedRpcFunctions[][src]

pub trait ProtectedRpcFunctions {
    fn create_account<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<RpcAccount, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn create_raw_transaction<'life0, 'async_trait>(
        &'life0 self,
        transaction_input: TransactionInputs
    ) -> Pin<Box<dyn Future<Output = Result<CreateRawTransactionOuput, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn create_transaction_kernel<'life0, 'async_trait>(
        &'life0 self,
        transaction_input: TransactionInputs
    ) -> Pin<Box<dyn Future<Output = Result<String, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn create_transaction<'life0, 'async_trait>(
        &'life0 self,
        private_keys: [String; 2],
        transaction_kernel: String
    ) -> Pin<Box<dyn Future<Output = Result<CreateRawTransactionOuput, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn get_record_commitments<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn get_record_commitment_count<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<usize, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn get_raw_record<'life0, 'async_trait>(
        &'life0 self,
        record_commitment: String
    ) -> Pin<Box<dyn Future<Output = Result<String, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn decode_record<'life0, 'async_trait>(
        &'life0 self,
        record_bytes: String
    ) -> Pin<Box<dyn Future<Output = Result<RecordInfo, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn decrypt_record<'life0, 'async_trait>(
        &'life0 self,
        decryption_input: DecryptRecordInput
    ) -> Pin<Box<dyn Future<Output = Result<String, RpcError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn disconnect<'life0, 'async_trait>(
        &'life0 self,
        address: SocketAddr
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn connect<'life0, 'async_trait>(
        &'life0 self,
        addresses: Vec<SocketAddr>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Definition of private RPC endpoints that require authentication.

Required methods

Implementors

Functions that are sensitive and need to be protected with authentication. The authentication logic is defined in validate_auth