cleaning doc directory
This commit is contained in:
parent
da3155022b
commit
92aef05369
File diff suppressed because one or more lines are too long
@ -7,14 +7,15 @@
|
|||||||
* 6. [Fonctionnalité de récupération de mot de passe](#Fonctionnalitdercuprationdemotdepasse)
|
* 6. [Fonctionnalité de récupération de mot de passe](#Fonctionnalitdercuprationdemotdepasse)
|
||||||
* 7. [Gestion de session basée sur un cache](#Gestiondesessionbasesuruncache)
|
* 7. [Gestion de session basée sur un cache](#Gestiondesessionbasesuruncache)
|
||||||
* 8. [Wallet](#Wallet)
|
* 8. [Wallet](#Wallet)
|
||||||
* 8.1. [Descripteurs de wallet](#Descripteursdewallet)
|
* 8.1. [Descripteurs de wallet](#Descripteursdewallet)
|
||||||
* 8.2. [Récupération des jetons de faucet](#Rcuprationdesjetonsdefaucet)
|
* 8.2. [Récupération des jetons de faucet](#Rcuprationdesjetonsdefaucet)
|
||||||
* 9. [Gestion des clés de l'identité (aussi les clés des transactions SP)](#GestiondesclsdelidentitaussilesclsdestransactionsSP)
|
* 9. [Gestion des clés de l'identité (aussi les clés des transactions SP)](#GestiondesclsdelidentitaussilesclsdestransactionsSP)
|
||||||
* 9.1. [Génération des clés privées (création des identités numériques)](#Gnrationdesclsprivescrationdesidentitsnumriques)
|
* 9.1. [Génération des clés privées (création des identités numériques)](#Gnrationdesclsprivescrationdesidentitsnumriques)
|
||||||
* 9.1.1. [Gestion de la clé servant à l'ID `spend_recover`](#GestiondelaclservantlIDspend_recover)
|
* 9.1.1. [Gestion de la clé servant à l'ID `spend_recover`](#GestiondelaclservantlIDspend_recover)
|
||||||
* 9.1.2. [Backup de `Part2Enc`](#BackupdePart2Enc)
|
* 9.1.2. [Backup de `Part2Enc`](#BackupdePart2Enc)
|
||||||
* 9.1.3. [Connexions avec une identité crée (`recover`)](#Connexionsavecuneidentitcrerecover)
|
* 9.1.3. [Connexions avec une identité crée (`recover`)](#Connexionsavecuneidentitcrerecover)
|
||||||
* 10. [Exemples de Code](#ExemplesdeCode)
|
* 10. [Exemples de Code](#ExemplesdeCode)
|
||||||
|
* 11. [Todo](#Todo)
|
||||||
|
|
||||||
<!-- vscode-markdown-toc-config
|
<!-- vscode-markdown-toc-config
|
||||||
numbering=true
|
numbering=true
|
||||||
@ -267,4 +268,7 @@ Demande d'update de la liste des membres (PCD) d'un process :
|
|||||||
|
|
||||||
## 10. <a name='ExemplesdeCode'></a>Exemples de Code
|
## 10. <a name='ExemplesdeCode'></a>Exemples de Code
|
||||||
|
|
||||||
Extraits de code illustrant l'utilisation des PCD et PRD dans des scénarios réels.
|
## 11. <a name='Todo'></a>Todo
|
||||||
|
|
||||||
|
* [ ] Extraits de code illustrant l'utilisation des PCD et PRD dans des scénarios réels.
|
||||||
|
* [ ] Diagrammes de séquences
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,575 +0,0 @@
|
|||||||
pub struct CommitmentMethod {
|
|
||||||
pub method: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ConditionCap {
|
|
||||||
pub role_deposit: String,
|
|
||||||
pub role_transaction: TransactionMode,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ConditionCommitment {
|
|
||||||
pub role_artefact: String,
|
|
||||||
pub role_transaction: TransactionMode,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ConditionDeposit {
|
|
||||||
pub role_deposit: String,
|
|
||||||
pub role_transaction: TransactionMode,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ConditionOrchestration {
|
|
||||||
pub role_ok: String,
|
|
||||||
pub role_ko: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ConditionPayment {
|
|
||||||
pub role_payment: String,
|
|
||||||
pub role_transaction: TransactionMode,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ConditionPrdAddressSet {
|
|
||||||
pub from_role: String,
|
|
||||||
pub prd_sp_address_list: Vec<String>,
|
|
||||||
pub prd_sp_address_required_list: Vec<String>,
|
|
||||||
pub prd_sp_address_quota: i32,
|
|
||||||
pub prd_prd_value_ok_list: Vec<String>,
|
|
||||||
pub prd_value_ko_list: Vec<String>,
|
|
||||||
pub prd_value_none_list: Vec<String>,
|
|
||||||
pub prd_sp_address_value_min: i64,
|
|
||||||
pub prd_sp_address_value_min_per: i64,
|
|
||||||
pub prd_sp_address_value_min_ok: bool,
|
|
||||||
pub prd_sp_adddress_value_ok_min_per: i64,
|
|
||||||
pub prd_sp_address_value_ok_max: i64,
|
|
||||||
pub prd_sp_adderss_value_ko_max_per: i64,
|
|
||||||
pub prd_sp_address_value_none_max: i64,
|
|
||||||
pub prd_sp_adderss_value_none_max_per: i64,
|
|
||||||
pub prd_sp_address_score_min: i32,
|
|
||||||
pub prd_sp_address_score_min_min_required: i32,
|
|
||||||
pub prd_sp_address_score_min_min_ok: bool,
|
|
||||||
pub prd_sp_address_score_min_min_per: i64,
|
|
||||||
pub prd_value_auto_ok: bool,
|
|
||||||
pub prd_value_auto_ko: bool,
|
|
||||||
pub prd_value_auto_none: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ConditionPublish {
|
|
||||||
pub pcd_data_size_max_unit: String,
|
|
||||||
pub pcd_data_size_max_total: i64,
|
|
||||||
pub pcd_number_min: i32,
|
|
||||||
pub pcd_number_max: i32,
|
|
||||||
pub pcd_amount_max_total: Amount,
|
|
||||||
pub prd_waiting_timeout: u64,
|
|
||||||
pub pcd_waiting_timeout: u64,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct DepositMethod {
|
|
||||||
pub method: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemArtefact {
|
|
||||||
pub item: Item,
|
|
||||||
pub public_attribute_group: Vec<String>, // Assuming list of attributes
|
|
||||||
pub role_confidential_attribute_group: Vec<String>,
|
|
||||||
pub private_attribute_group: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemCommitmentPublicAttributeGroup {
|
|
||||||
pub for_sp_address_list: Vec<String>,
|
|
||||||
pub goal_list: Vec<String>,
|
|
||||||
pub provider_type: String,
|
|
||||||
pub commitment_pcd_hash_list: Vec<String>,
|
|
||||||
pub ref_item_hash_list: Vec<String>,
|
|
||||||
pub ref_pcd_hash_list: Vec<String>,
|
|
||||||
pub payload_public_list: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemMemberPublicAttributeGroup {
|
|
||||||
pub sp_address_public: String,
|
|
||||||
pub sp_address_public_sig: String,
|
|
||||||
pub sp_address_revoke_public: String,
|
|
||||||
pub sp_address_revoke_public_sig: String,
|
|
||||||
pub third_sp_address_list_public: Vec<String>,
|
|
||||||
pub data_size_max: i64,
|
|
||||||
pub payment_method_list_public: Vec<String>,
|
|
||||||
pub succession_process_hash: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemCommitmentPublicAttributeGroup {
|
|
||||||
pub for_sp_address_list: Vec<String>,
|
|
||||||
pub goal_list: Vec<String>,
|
|
||||||
pub provider_type: String,
|
|
||||||
pub commitment_pcd_hash_list: Vec<String>,
|
|
||||||
pub ref_item_hash_list: Vec<String>,
|
|
||||||
pub ref_pcd_hash_list: Vec<String>,
|
|
||||||
pub payload_public_list: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemDepositPublicAttributeGroup {
|
|
||||||
pub for_sp_address_list: Vec<String>,
|
|
||||||
pub for_address_list: Vec<String>,
|
|
||||||
pub goal_list: Vec<String>,
|
|
||||||
pub provider_type: String,
|
|
||||||
pub ref_item_hash_list: Vec<String>,
|
|
||||||
pub ref_pcd_hash_list: Vec<String>,
|
|
||||||
pub payload_list_public: Vec<String>,
|
|
||||||
pub audit_code_list_public: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemCommitmentRoleConfidentialAttributeGroup {
|
|
||||||
pub payload_list_confidential: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemCommitmentPrivateAttributeGroup {
|
|
||||||
pub payload_list_private: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemCommitment {
|
|
||||||
pub item: Item,
|
|
||||||
pub public_attribute_group: ItemCommitmentPublicAttributeGroup,
|
|
||||||
pub role_confidential_attribute_group: ItemCommitmentRoleConfidentialAttributeGroup,
|
|
||||||
pub private_attribute_group: ItemCommitmentPrivateAttributeGroup,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemDepositRoleConfidentialAttributeGroup {
|
|
||||||
pub payload_list_confidential: Vec<String>,
|
|
||||||
pub audit_code_list_confidential: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemDepositPrivateAttributeGroup {
|
|
||||||
pub payload_list_private: Vec<String>,
|
|
||||||
pub audit_code_private: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemDeposit {
|
|
||||||
pub item: Item,
|
|
||||||
pub public_attribute_group: ItemDepositPublicAttributeGroup,
|
|
||||||
pub role_confidential_attribute_group: ItemDepositRoleConfidentialAttributeGroup,
|
|
||||||
pub private_attribute_group: ItemDepositPrivateAttributeGroup,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub enum ItemEnum {
|
|
||||||
Process(ItemProcess),
|
|
||||||
Peer(ItemPeer),
|
|
||||||
Member(ItemMember),
|
|
||||||
Payment(ItemPayment),
|
|
||||||
Deposit(ItemDeposit),
|
|
||||||
Artefact(ItemArtefact),
|
|
||||||
Commitment(ItemCommitment),
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemPaymentPublicAttributeGroup {
|
|
||||||
pub for_sp_address_list: Vec<String>,
|
|
||||||
pub goal_list: Vec<String>,
|
|
||||||
pub provider_type: String,
|
|
||||||
pub commitment_pcd_hash_list: Vec<String>,
|
|
||||||
pub order_pcd_hash_list: Vec<String>,
|
|
||||||
pub invoice_pcd_hash_list: Vec<String>,
|
|
||||||
pub pay_pcd_hash_list: Vec<String>,
|
|
||||||
pub ref_item_hash_list: Vec<String>,
|
|
||||||
pub ref_pcd_hash_list: Vec<String>,
|
|
||||||
pub payload_list_public: Vec<String>,
|
|
||||||
pub audit_code_list_public: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemPaymentRoleConfidentialAttributeGroup {
|
|
||||||
pub payload_list_confidential: Vec<String>,
|
|
||||||
pub audit_code_list_confidential: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemPaymentPrivateAttributeGroup {
|
|
||||||
pub payload_list_private: Vec<String>,
|
|
||||||
pub audit_code_private: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemPayment {
|
|
||||||
pub item: Item,
|
|
||||||
pub public_attribute_group: ItemPaymentPublicAttributeGroup,
|
|
||||||
pub role_confidential_attribute_group: ItemPaymentRoleConfidentialAttributeGroup,
|
|
||||||
pub private_attribute_group: ItemPaymentPrivateAttributeGroup,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemPeerPublicAttributeGroup {
|
|
||||||
pub sp_address: String,
|
|
||||||
pub domain: String,
|
|
||||||
pub ip_address: String,
|
|
||||||
pub pow_difficulty: u32,
|
|
||||||
pub pow_pattern: String,
|
|
||||||
pub pow_prefix: String,
|
|
||||||
pub data_size_max: i64,
|
|
||||||
pub timestamp_delay_max: u64,
|
|
||||||
pub daily_hash_list: Vec<String>,
|
|
||||||
pub daily_sp_tx_mine_list: Vec<String>,
|
|
||||||
pub daily_sp_tx_mine_reward_list: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemPeerPrivateAttributeGroup {
|
|
||||||
pub config: String, // Assuming it's a simple string for now
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemPeer {
|
|
||||||
pub item: Item,
|
|
||||||
pub layer_list: Vec<String>,
|
|
||||||
pub public_attribute_group: ItemPeerPublicAttributeGroup,
|
|
||||||
pub private_attribute_group: ItemPeerPrivateAttributeGroup,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemProcess {
|
|
||||||
pub item: Item,
|
|
||||||
pub item_process_public_attribute_group: ItemProcessPublicAttributeGroup,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ItemProcessPublicAttributeGroup {
|
|
||||||
// Fields for public attributes
|
|
||||||
// Example field
|
|
||||||
pub roles_group: RolesGroup,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Item {
|
|
||||||
pub uuid: String,
|
|
||||||
pub version: i64,
|
|
||||||
pub hash: Option<String>,
|
|
||||||
pub item_type: String, // `type` is a reserved keyword in Rust, renamed to `item_type`
|
|
||||||
pub name: String,
|
|
||||||
pub pagination_number_per_pcd: u32,
|
|
||||||
pub metadata_contract_public: MetadataContractPublic,
|
|
||||||
pub metadata_role_confidential: MetadataRoleConfidential,
|
|
||||||
pub metadata_private: MetadataPrivate,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct KeyEncryption {
|
|
||||||
pub attribute_name: Option<String>,
|
|
||||||
pub key: Option<String>,
|
|
||||||
pub algorithm: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Aes256GcmIv96Bit {
|
|
||||||
pub key: GenericArray<u8, U32>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct MessageClient {
|
|
||||||
pub message: Message, // Assuming Message is a predefined struct
|
|
||||||
pub request_enc: String,
|
|
||||||
pub request_hash: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct MessageConnect {
|
|
||||||
pub message: Message, // Assuming Message is a predefined struct
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Message {
|
|
||||||
pub shared_peer_list: Vec<SharedPeer>,
|
|
||||||
pub shared_process_list: Vec<SharedProcess>,
|
|
||||||
pub faucet_sp_address: String,
|
|
||||||
pub pow: Pow, // Assuming Pow is a predefined struct
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Pow {
|
|
||||||
pub data_hash: String,
|
|
||||||
timestamp: Option<u64>,
|
|
||||||
pub nonce: Option<u64>,
|
|
||||||
pub pathern: String,
|
|
||||||
pub difficulty: usize,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct MetadataContractPublic {
|
|
||||||
pub meta_data: MetaData,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct MetadataPrivate {
|
|
||||||
pub meta_data: MetaData,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct MetadataRoleConfidential {
|
|
||||||
pub meta_data: MetaData,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct MetaData {
|
|
||||||
pub tag_list: Vec<String>,
|
|
||||||
pub zone_list: Vec<String>,
|
|
||||||
pub label_list: Vec<String>,
|
|
||||||
pub ref_list: Vec<String>,
|
|
||||||
pub data_list: Vec<String>,
|
|
||||||
pub amount: Amount,
|
|
||||||
pub number: Number,
|
|
||||||
pub render_template_list: Vec<String>,
|
|
||||||
pub legal_text_list: Vec<String>,
|
|
||||||
pub key_list: Vec<KeyEncryption>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Amount {
|
|
||||||
pub timestamp: u64,
|
|
||||||
pub change_source_list: Vec<String>,
|
|
||||||
pub amount_cent: i64,
|
|
||||||
pub amount_unit: String,
|
|
||||||
pub amount_unit_ref: String, // This can be a reference to an external unit system.
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Number {
|
|
||||||
pub fixed_state: bool,
|
|
||||||
pub number: i32,
|
|
||||||
pub number_unit: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Pagination {
|
|
||||||
pub start: usize,
|
|
||||||
pub number: usize,
|
|
||||||
pub page_index: usize,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct PaymentMethod {
|
|
||||||
pub method: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct PcdItemEncAttributePrivate {
|
|
||||||
pub attribute_name: String,
|
|
||||||
pub data_enc: String, // Assuming the encrypted data is represented as a String
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct PcdItemEncAttributePublic {
|
|
||||||
pub attribute_name: String,
|
|
||||||
pub data_enc: String, // Assuming the encrypted data is represented as a String
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct PcdItemEncAttributeRoleConfidential {
|
|
||||||
pub attribute_name: String,
|
|
||||||
pub data_enc: String, // Assuming the encrypted data is represented as a String
|
|
||||||
pub key: KeyEncryption, // Assuming the encrypted data is represented as a String
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct PcdItemGenericEnc {
|
|
||||||
pub item_enc: PcdItemEnc,
|
|
||||||
pub pcd_item_enc_attribute_public_list: Option<Vec<PcdItemEncAttributePublic>>,
|
|
||||||
pub pcd_item_enc_attribute_role_confidential_list:
|
|
||||||
Option<Vec<PcdItemEncAttributeRoleConfidential>>,
|
|
||||||
pub pcd_item_enc_attribute_private_list: Option<Vec<PcdItemEncAttributePrivate>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct PcdItemEnc {
|
|
||||||
pub version: i64,
|
|
||||||
pub item_type: String,
|
|
||||||
pub name: String,
|
|
||||||
pub pagination_number_per_pcd: u32,
|
|
||||||
pub pcd_item_enc_attribute_public_list: Vec<PcdItemEncAttributePublic>,
|
|
||||||
pub pcd_item_enc_attribute_role_confidential_list: Vec<PcdItemEncAttributeRoleConfidential>,
|
|
||||||
pub pcd_item_enc_attribute_private_list: Vec<PcdItemEncAttributePrivate>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPcd {
|
|
||||||
pub request: Request,
|
|
||||||
pub item_list: Vec<PcdItemGenericEnc>,
|
|
||||||
pub pagination: Pagination,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPrdConfirm {
|
|
||||||
pub prd: RequestPrd,
|
|
||||||
pub code_confirm_enc_by_shared_secret: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPrdKeyBackup {
|
|
||||||
pub prd: RequestPrd,
|
|
||||||
pub device_footprint_enc_by_sp_shared_secret: String,
|
|
||||||
pub part_1_enc_hash_enc_by_sp_shared_secret: String,
|
|
||||||
pub shard_enc_by_sp_shared_secret: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPrdKeyHello {
|
|
||||||
pub prd: RequestPrd,
|
|
||||||
pub part_1_enc_hash_enc_by_sp_shared_secret: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPrdList {
|
|
||||||
pub prd: RequestPrd,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPrdMessage {
|
|
||||||
pub prd: RequestPrd,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPrdResponse {
|
|
||||||
pub prd: RequestPrd,
|
|
||||||
pub sig_value: String,
|
|
||||||
pub pcd_origin_hash: Option<String>,
|
|
||||||
pub payment_method_enc_by_shared_secret: Option<String>,
|
|
||||||
pub deposit_method_enc_by_shared_secret: Option<String>,
|
|
||||||
pub commitment_method_enc_by_shared_secret: Option<String>,
|
|
||||||
pub certif_key_enc_by_shared_secret: Option<String>,
|
|
||||||
pub shared_secret_key: Option<KeyEncryption>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPrdUpdate {
|
|
||||||
pub prd: RequestPrd,
|
|
||||||
pub pcd_new_version_hash: String,
|
|
||||||
pub payment_pcd_hash_list: Vec<String>,
|
|
||||||
pub cap_pcd_hash_list: Vec<String>,
|
|
||||||
pub deposit_pcd_hash_list: Vec<String>,
|
|
||||||
pub commitment_pcd_hash_list: Vec<String>,
|
|
||||||
pub ask_payment_method: String,
|
|
||||||
pub ask_deposit_method: String,
|
|
||||||
pub ask_commitment_method: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct KeyRoleConfidential {
|
|
||||||
pub attribute_name: String,
|
|
||||||
pub key: KeyEncryption,
|
|
||||||
pub algorithm_name: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RequestPrd {
|
|
||||||
pub request: Request, // Assuming Request is a predefined struct
|
|
||||||
pub pcd_keys_role_confidential_list_enc_by_shared_secret: String,
|
|
||||||
pub message_public: Option<String>,
|
|
||||||
pub message_confidential: Option<String>,
|
|
||||||
pub message_private: Option<String>,
|
|
||||||
pub sp_address_to: String,
|
|
||||||
pub sp_address_from: String,
|
|
||||||
pub sp_address_reply: String,
|
|
||||||
pub timestamp_declared: u64, // Assuming a Unix timestamp
|
|
||||||
pub role_name_from: String,
|
|
||||||
pub role_name_to: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RoleArtefact {
|
|
||||||
pub item_name: String,
|
|
||||||
pub role: Role,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Request {
|
|
||||||
pub item_name: Option<String>,
|
|
||||||
pub request_type: String, // `type` is a reserved keyword in Rust, renamed to `request_type`
|
|
||||||
pub version: i64,
|
|
||||||
pub process_hash: String,
|
|
||||||
pub pcd_reference_hash: Option<String>,
|
|
||||||
pub item_reference_hash: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RoleDeposit {
|
|
||||||
pub item_name: String,
|
|
||||||
pub role: Role,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RoleCommitment {
|
|
||||||
pub item_name: String,
|
|
||||||
pub role: Role,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RoleMember {
|
|
||||||
pub item_name: String,
|
|
||||||
pub role: Role,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RolePayment {
|
|
||||||
pub item_name: String,
|
|
||||||
pub role: Role,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RoleProcess {
|
|
||||||
pub item_name: String,
|
|
||||||
pub role: Role,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Role {
|
|
||||||
pub item: Item,
|
|
||||||
pub required_2fa: bool,
|
|
||||||
pub validation_timeout: u64,
|
|
||||||
pub condition_prd_address_set_list: Vec<ConditionPrdAddressSet>, // Assuming ConditionPrdAddressSet is a predefined struct
|
|
||||||
pub condition_publish: ConditionPublish, // Assuming ConditionPublish is a predefined struct
|
|
||||||
pub condition_cap_list: Vec<ConditionCap>, // Assuming ConditionCap is a predefined struct
|
|
||||||
pub condition_payment_list: Vec<ConditionPayment>, // Assuming ConditionPayment is a predefined struct
|
|
||||||
pub condition_commitment_list: Vec<ConditionCommitment>, // Assuming ConditionCommitment is a predefined struct
|
|
||||||
pub condition_attribute_encryption_list: Vec<String>,
|
|
||||||
pub condition_orchestration: ConditionOrchestration, // Assuming ConditionOrchestration is a predefined struct
|
|
||||||
pub role_succession: Option<String>,
|
|
||||||
pub role_resolve: Option<String>,
|
|
||||||
pub role_renew: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct TransactionModeDistribution {
|
|
||||||
pub from_prd_update_from: String,
|
|
||||||
pub from_role_list: Vec<String>,
|
|
||||||
pub to_role_list: Vec<String>,
|
|
||||||
pub from_prd_address_list: Vec<String>,
|
|
||||||
pub to_prd_address_list: Vec<String>,
|
|
||||||
pub method: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct TransactionModeDirect {
|
|
||||||
pub from_prd_update_from: String,
|
|
||||||
pub to_role_owner: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct TransactionMode {
|
|
||||||
pub amount: Amount,
|
|
||||||
pub role_transaction_distribution: TransactionModeDistribution,
|
|
||||||
pub role_transaction_direct: TransactionModeDirect,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RolesGroup {
|
|
||||||
pub role_peer: RolePeer,
|
|
||||||
pub role_member: RoleMember,
|
|
||||||
pub role_process: RoleProcess,
|
|
||||||
pub role_artefact_list: Vec<RoleArtefact>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct SharedProcess {
|
|
||||||
pub hash: String,
|
|
||||||
pub key: KeyEncryption,
|
|
||||||
pub role_process_sp_address_list: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct SharedPeer {
|
|
||||||
pub domain: String,
|
|
||||||
pub address_ip: String,
|
|
||||||
pub relay: Relay,
|
|
||||||
pub l1_node: L1Node,
|
|
||||||
pub l1_miner: L1Miner,
|
|
||||||
pub l2_node: L2Node,
|
|
||||||
pub l2_certif: L2Certif,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Relay {
|
|
||||||
pub address_port: u16,
|
|
||||||
pub data_max_size: usize,
|
|
||||||
pub pow_difficulty: u32,
|
|
||||||
pub pow_pattern: String,
|
|
||||||
pub pow_prefix: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct L1Node {
|
|
||||||
pub address_port: u16,
|
|
||||||
pub explorer_base_url: String,
|
|
||||||
pub sp_address_anchorage: String,
|
|
||||||
pub sp_address_reward: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct L1Miner {
|
|
||||||
pub sp_address_rewarder: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct L2Node {
|
|
||||||
pub address_port: u16,
|
|
||||||
pub explorer_base_url: String,
|
|
||||||
pub sp_address_anchorage: String,
|
|
||||||
pub sp_address_reward: String,
|
|
||||||
pub nbits: u32,
|
|
||||||
pub magic_number: u32,
|
|
||||||
pub challenge: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct L2Certif {
|
|
||||||
pub sp_address_certif: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct SharedPeer {
|
|
||||||
pub domain: String,
|
|
||||||
pub address_ip: String,
|
|
||||||
pub relay: Relay,
|
|
||||||
pub l1_node: L1Node,
|
|
||||||
pub l1_miner: L1Miner,
|
|
||||||
pub l2_node: L2Node,
|
|
||||||
pub l2_certif: L2Certif,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct RolePeer {
|
|
||||||
pub item_name: String,
|
|
||||||
pub role: Role,
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user