Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/scan-result-blob' into unified-f…
Browse files Browse the repository at this point in the history
…t-blobs
  • Loading branch information
dmitrylavrenov committed Jun 12, 2024
2 parents 77ded5c + 4b3fa11 commit efb4c9d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/bioauth-flow-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ use tracing::*;
pub mod error_data;
mod errors;

/// The current bioauth flow RPC version.
const VERSION: u8 = 1;

/// Signer provides signatures for the data.
#[async_trait::async_trait]
pub trait Signer<S> {
Expand Down Expand Up @@ -115,6 +118,10 @@ impl<T> From<bioauth_flow_api::BioauthStatus<T>> for BioauthStatus<T> {
/// The API exposed via JSON-RPC.
#[rpc(server)]
pub trait Bioauth<Timestamp, TxHash> {
/// Get the current bioauth version.
#[method(name = "bioauth_getVersion")]
async fn get_version(&self) -> RpcResult<u8>;

/// Get the configuration required for the Device SDK.
#[method(name = "bioauth_getFacetecDeviceSdkParams")]
async fn get_facetec_device_sdk_params(&self) -> RpcResult<FacetecDeviceSdkParams>;
Expand Down Expand Up @@ -290,6 +297,10 @@ where
Timestamp: Encode + Decode,
TransactionPool: TransactionPoolT<Block = Block>,
{
async fn get_version(&self) -> RpcResult<u8> {
Ok(VERSION)
}

async fn get_facetec_device_sdk_params(&self) -> RpcResult<FacetecDeviceSdkParams> {
let res = self
.robonode_client
Expand Down

0 comments on commit efb4c9d

Please sign in to comment.