depo_api/
lib.rs

1mod error;
2use error::{Error, Result};
3
4pub mod receipt;
5pub use receipt::Receipt;
6
7pub mod request;
8use bc_envelope::prelude::*;
9pub use request::*;
10
11// Functions
12
13pub const DELETE_ACCOUNT_FUNCTION_NAME: &str = "deleteAccount";
14pub const DELETE_ACCOUNT_FUNCTION: Function =
15    Function::new_static_named(DELETE_ACCOUNT_FUNCTION_NAME);
16
17pub const DELETE_SHARES_FUNCTION_NAME: &str = "deleteShares";
18pub const DELETE_SHARES_FUNCTION: Function =
19    Function::new_static_named(DELETE_SHARES_FUNCTION_NAME);
20
21pub const FINISH_RECOVERY_FUNCTION_NAME: &str = "finishRecovery";
22pub const FINISH_RECOVERY_FUNCTION: Function =
23    Function::new_static_named(FINISH_RECOVERY_FUNCTION_NAME);
24
25pub const GET_RECOVERY_FUNCTION_NAME: &str = "getRecovery";
26pub const GET_RECOVERY_FUNCTION: Function =
27    Function::new_static_named(GET_RECOVERY_FUNCTION_NAME);
28
29pub const GET_SHARES_FUNCTION_NAME: &str = "getShares";
30pub const GET_SHARES_FUNCTION: Function =
31    Function::new_static_named(GET_SHARES_FUNCTION_NAME);
32
33pub const START_RECOVERY_FUNCTION_NAME: &str = "startRecovery";
34pub const START_RECOVERY_FUNCTION: Function =
35    Function::new_static_named(START_RECOVERY_FUNCTION_NAME);
36
37pub const STORE_SHARE_FUNCTION_NAME: &str = "storeShare";
38pub const STORE_SHARE_FUNCTION: Function =
39    Function::new_static_named(STORE_SHARE_FUNCTION_NAME);
40
41pub const UPDATE_XID_DOCUMENT_FUNCTION_NAME: &str = "updateXIDDocument";
42pub const UPDATE_XID_DOCUMENT_FUNCTION: Function =
43    Function::new_static_named(UPDATE_XID_DOCUMENT_FUNCTION_NAME);
44
45pub const UPDATE_RECOVERY_FUNCTION_NAME: &str = "updateRecovery";
46pub const UPDATE_RECOVERY_FUNCTION: Function =
47    Function::new_static_named(UPDATE_RECOVERY_FUNCTION_NAME);
48
49// Parameters
50
51pub const DATA_PARAM_NAME: &str = "data";
52pub const DATA_PARAM: Parameter = Parameter::new_static_named(DATA_PARAM_NAME);
53
54pub const NEW_XID_DOCUMENT_PARAM_NAME: &str = "newXIDDocument";
55pub const NEW_XID_DOCUMENT_PARAM: Parameter =
56    Parameter::new_static_named(NEW_XID_DOCUMENT_PARAM_NAME);
57
58pub const RECEIPT_PARAM_NAME: &str = "receipt";
59pub const RECEIPT_PARAM: Parameter =
60    Parameter::new_static_named(RECEIPT_PARAM_NAME);
61
62pub const RECOVERY_CONTINUATION_PARAM_NAME: &str = "recoveryContinuation";
63
64pub const RECOVERY_METHOD_PARAM_NAME: &str = "recoveryMethod";
65pub const RECOVERY_METHOD_PARAM: Parameter =
66    Parameter::new_static_named(RECOVERY_METHOD_PARAM_NAME);