1010 lines
84 KiB
Markdown
1010 lines
84 KiB
Markdown
<!-- vscode-markdown-toc -->
|
||
* 1. [Documents de référence](#Documentsderfrence)
|
||
* 2. [Conditions](#Conditions)
|
||
* 2.1. [ConditionCap](#ConditionCap)
|
||
* 2.2. [ConditionCommitment](#ConditionCommitment)
|
||
* 2.3. [ConditionDeposit](#ConditionDeposit)
|
||
* 2.4. [ConditionOrchestration](#ConditionOrchestration)
|
||
* 2.5. [ConditionPayment](#ConditionPayment)
|
||
* 2.6. [ConditionPrdAddressSet](#ConditionPrdAddressSet)
|
||
* 2.7. [ConditionPublish](#ConditionPublish)
|
||
* 3. [Methods](#Methods)
|
||
* 3.1. [DepositMethod](#DepositMethod)
|
||
* 3.2. [CommitmentMethod](#CommitmentMethod)
|
||
* 3.3. [PaymentMethod](#PaymentMethod)
|
||
* 4. [Items](#Items)
|
||
* 4.1. [ItemArtefact](#ItemArtefact)
|
||
* 4.2. [ItemCommitmentPublicAttributeGroup](#ItemCommitmentPublicAttributeGroup)
|
||
* 4.3. [ItemMemberPublicAttributeGroup](#ItemMemberPublicAttributeGroup)
|
||
* 4.4. [ItemDepositPublicAttributeGroup](#ItemDepositPublicAttributeGroup)
|
||
* 4.5. [ItemCommitmentRoleConfidentialAttributeGroup](#ItemCommitmentRoleConfidentialAttributeGroup)
|
||
* 4.6. [ItemCommitmentPrivateAttributeGroup](#ItemCommitmentPrivateAttributeGroup)
|
||
* 4.7. [ItemCommitment](#ItemCommitment)
|
||
* 4.8. [ItemDepositRoleConfidentialAttributeGroup](#ItemDepositRoleConfidentialAttributeGroup)
|
||
* 4.9. [ItemDepositPrivateAttributeGroup](#ItemDepositPrivateAttributeGroup)
|
||
* 4.10. [ItemDeposit](#ItemDeposit)
|
||
* 4.11. [ItemEnum](#ItemEnum)
|
||
* 4.12. [ItemPaymentPublicAttributeGroup](#ItemPaymentPublicAttributeGroup)
|
||
* 4.13. [ItemPaymentRoleConfidentialAttributeGroup](#ItemPaymentRoleConfidentialAttributeGroup)
|
||
* 4.14. [ItemPaymentPrivateAttributeGroup](#ItemPaymentPrivateAttributeGroup)
|
||
* 4.15. [ItemPayment](#ItemPayment)
|
||
* 4.16. [ItemPeerPublicAttributeGroup](#ItemPeerPublicAttributeGroup)
|
||
* 4.17. [ItemPeerPrivateAttributeGroup](#ItemPeerPrivateAttributeGroup)
|
||
* 4.18. [ItemPeer](#ItemPeer)
|
||
* 4.19. [ItemProcess](#ItemProcess)
|
||
* 4.20. [ItemProcessPublicAttributeGroup](#ItemProcessPublicAttributeGroup)
|
||
* 4.21. [Item](#Item)
|
||
* 5. [Encryption](#Encryption)
|
||
* 5.1. [KeyEncryption](#KeyEncryption)
|
||
* 5.2. [Aes256GcmIv96Bit](#Aes256GcmIv96Bit)
|
||
* 6. [Messages](#Messages)
|
||
* 6.1. [Message](#Message)
|
||
* 6.2. [MessageConnect](#MessageConnect)
|
||
* 6.3. [MessageGeneric](#MessageGeneric)
|
||
* 6.4. [Pow](#Pow)
|
||
* 6.5. [SharedProcess](#SharedProcess)
|
||
* 6.6. [SharedPeer](#SharedPeer)
|
||
* 7. [Relay](#Relay)
|
||
* 7.1. [L1Node](#L1Node)
|
||
* 7.2. [L1Miner](#L1Miner)
|
||
* 7.3. [L2Node](#L2Node)
|
||
* 7.4. [L2Certif](#L2Certif)
|
||
* 8. [Metadata](#Metadata)
|
||
* 8.1. [MetadataContractPublic](#MetadataContractPublic)
|
||
* 8.2. [MetadataPrivate](#MetadataPrivate)
|
||
* 8.3. [MetadataRoleConfidential](#MetadataRoleConfidential)
|
||
* 8.4. [Amount](#Amount)
|
||
* 8.5. [Number](#Number)
|
||
* 9. [Request](#Request)
|
||
* 10. [PCD](#PCD)
|
||
* 10.1. [Pagination](#Pagination)
|
||
* 10.2. [PcdItemEncAttributePublic](#PcdItemEncAttributePublic)
|
||
* 10.3. [PcdItemEncAttributeRoleConfidential](#PcdItemEncAttributeRoleConfidential)
|
||
* 10.4. [PcdItemEncAttributePrivate](#PcdItemEncAttributePrivate)
|
||
* 10.5. [PcdItemGenericEnc](#PcdItemGenericEnc)
|
||
* 10.6. [PcdItemEnc](#PcdItemEnc)
|
||
* 11. [RequestPrd](#RequestPrd)
|
||
* 11.1. [RequestPrdResponse](#RequestPrdResponse)
|
||
* 11.2. [RequestPrdConfirm](#RequestPrdConfirm)
|
||
* 11.3. [RequestPrdKeyBackup](#RequestPrdKeyBackup)
|
||
* 11.4. [RequestPrdKeyHello](#RequestPrdKeyHello)
|
||
* 11.5. [RequestPrdList](#RequestPrdList)
|
||
* 11.6. [RequestPrdMessage](#RequestPrdMessage)
|
||
* 11.7. [RequestPrdResponse](#RequestPrdResponse-1)
|
||
* 11.8. [RequestPrdUpdate](#RequestPrdUpdate)
|
||
* 12. [Roles](#Roles)
|
||
* 12.1. [RolesGroup](#RolesGroup)
|
||
* 12.2. [RoleArtefact](#RoleArtefact)
|
||
* 12.3. [RoleDeposit](#RoleDeposit)
|
||
* 12.4. [RoleCommitment](#RoleCommitment)
|
||
* 12.5. [RoleMember](#RoleMember)
|
||
* 12.6. [RolePayment](#RolePayment)
|
||
* 12.7. [RoleProcess](#RoleProcess)
|
||
* 12.8. [Role](#Role)
|
||
* 12.9. [TransactionMode](#TransactionMode)
|
||
* 12.10. [RolePeer](#RolePeer)
|
||
* 13. [12. Rust considerations](#Rustconsiderations)
|
||
* 13.1. [General Implications for Project Objects](#GeneralImplicationsforProjectObjects)
|
||
* 13.2. [Debug](#Debug)
|
||
* 13.3. [Default](#Default)
|
||
* 13.4. [PartialEq, Eq](#PartialEqEq)
|
||
* 13.5. [Hash](#Hash)
|
||
* 13.6. [PartialOrd, Ord](#PartialOrdOrd)
|
||
|
||
<!-- vscode-markdown-toc-config
|
||
numbering=true
|
||
autoSave=true
|
||
/vscode-markdown-toc-config -->
|
||
<!-- /vscode-markdown-toc --># Specs - Datas
|
||
|
||
## 1. <a name='Documentsderfrence'></a>Documents de référence
|
||
|
||
Voir [Doc_references.md](Doc_references.md).
|
||
|
||
## 2. <a name='Conditions'></a>Conditions
|
||
|
||
### 2.1. <a name='ConditionCap'></a>ConditionCap
|
||
|
||
The ConditionCap struct represents a condition related to a deposit role and its associated transaction mode, indicating the requirements for transactions within this context.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------|-----------------|--------|-----------------------------------------------------------|
|
||
| role_deposit | String | | Represents the deposit role in the condition. |
|
||
| role_transaction | TransactionMode | | Specifies the transaction mode associated with this role. |
|
||
|
||
### 2.2. <a name='ConditionCommitment'></a>ConditionCommitment
|
||
|
||
The ConditionCommitment struct specifies a condition involving an artefact role and transaction mode, defining how commitments are handled and verified.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------|-----------------|--------|-----------------------------------------------------------|
|
||
| role_artefact | String | | Represents the artefact role in the condition. |
|
||
| role_transaction | TransactionMode | | Specifies the transaction mode associated with this role. |
|
||
|
||
### 2.3. <a name='ConditionDeposit'></a>ConditionDeposit
|
||
|
||
ConditionDeposit is similar to ConditionCap but specifically focuses on deposit-related transactions, establishing the criteria for deposit actions.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------|-----------------|--------|-----------------------------------------------------------|
|
||
| role_deposit | String | | Represents the deposit role in the condition. |
|
||
| role_transaction | TransactionMode | | Specifies the transaction mode associated with this role. |
|
||
|
||
### 2.4. <a name='ConditionOrchestration'></a>ConditionOrchestration
|
||
|
||
ConditionOrchestration defines success and failure roles for orchestration conditions, guiding the flow of processes based on outcomes.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|----------------------------------------------------------|
|
||
| role_ok | String | | Represents the successful outcome role in the condition. |
|
||
| role_ko | String | | Represents the failed outcome role in the condition. |
|
||
|
||
### 2.5. <a name='ConditionPayment'></a>ConditionPayment
|
||
|
||
This struct outlines the conditions for payments, including the amount, payment method, and transaction mode, setting the parameters for financial transactions.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------|-----------------|--------|-----------------------------------------------------------|
|
||
| payment_amount | String | | Represents the amount to be paid in the condition. |
|
||
| payment_method | PaymentMode | | Specifies the payment method to be used. |
|
||
| role_transaction | TransactionMode | | Specifies the transaction mode associated with this role. |
|
||
|
||
### 2.6. <a name='ConditionPrdAddressSet'></a>ConditionPrdAddressSet
|
||
|
||
ConditionPrdAddressSet involves complex conditions based on PRD addresses, including quotas, values, and scores, to determine condition fulfillment.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|---------------------------------------|-------------|--------|------------------------------------------------------------|
|
||
| from_role | String | | Identifies the originating role in the condition. |
|
||
| prd_sp_address_list | Vec<String> | | Lists addresses involved in the condition. |
|
||
| prd_sp_address_required_list | Vec<String> | | Lists required addresses for the condition to be met. |
|
||
| prd_sp_address_quota | i32 | | Specifies the quota of addresses for the condition. |
|
||
| prd_prd_value_ok_list | Vec<String> | | Lists the values that are considered acceptable. |
|
||
| prd_value_ko_list | Vec<String> | | Lists the values that are considered failures. |
|
||
| prd_value_none_list | Vec<String> | | Lists the values that are considered neutral or no-op. |
|
||
| prd_sp_address_value_min | i64 | | The minimum value for an address to be considered. |
|
||
| prd_sp_address_value_min_per | i64 | | The minimum percentage for the minimum address value. |
|
||
| prd_sp_address_value_min_ok | bool | | Indicates if the minimum address value is considered OK. |
|
||
| prd_sp_adddress_value_ok_min_per | i64 | | The minimum percentage for an address value to be OK. |
|
||
| prd_sp_address_value_ok_max | i64 | | The maximum value for an address to be considered OK. |
|
||
| prd_sp_adderss_value_ko_max_per | i64 | | The maximum percentage for an address value to be KO. |
|
||
| prd_sp_address_value_none_max | i64 | | The maximum value for an address to be considered neutral. |
|
||
| prd_sp_adderss_value_none_max_per | i64 | | The maximum percentage for a neutral address value. |
|
||
| prd_sp_address_score_min | i32 | | The minimum score for an address to be considered. |
|
||
| prd_sp_address_score_min_min_required | i32 | | The minimum required score for an address. |
|
||
| prd_sp_address_score_min_min_ok | bool | | Indicates if the minimum score is considered OK. |
|
||
| prd_sp_address_score_min_min_per | i64 | | The minimum percentage for the minimum score. |
|
||
| prd_value_auto_ok | bool | | Automatically consider values as OK. |
|
||
| prd_value_auto_ko | bool | | Automatically consider values as KO. |
|
||
| prd_value_auto_none | bool | | Automatically consider values as neutral or no-op. |
|
||
|
||
### 2.7. <a name='ConditionPublish'></a>ConditionPublish
|
||
|
||
ConditionPublish sets the criteria for publishing actions, including data size limits, publication counts, and timeouts, to regulate content distribution.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-------------------------|--------|--------|---------------------------------------------------------------|
|
||
| pcd_data_size_max_unit | String | | Specifies the maximum unit size for published data. |
|
||
| pcd_data_size_max_total | i64 | | Specifies the total maximum data size allowed. |
|
||
| pcd_number_min | i32 | | The minimum number of publications required. |
|
||
| pcd_number_max | i32 | | The maximum number of publications allowed. |
|
||
| pcd_amount_max_total | Amount | | The maximum total amount for publications. |
|
||
| prd_waiting_timeout | u64 | | The waiting timeout for a publication to be considered valid. |
|
||
| pcd_waiting_timeout | u64 | | The waiting timeout for the condition to be considered met. |
|
||
|
||
## 3. <a name='Methods'></a>Methods
|
||
|
||
### 3.1. <a name='DepositMethod'></a>DepositMethod
|
||
|
||
The DepositMethod struct identifies a specific deposit method, encapsulating the approach or mechanism for deposits within the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|------------------------------|
|
||
| method | String | | Represents a deposit method. |
|
||
|
||
### 3.2. <a name='CommitmentMethod'></a>CommitmentMethod
|
||
|
||
CommitmentMethod represents a particular method of commitment, defining how commitments are made or managed in the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|---------------------------------|
|
||
| method | String | | Represents a commitment method. |
|
||
|
||
### 3.3. <a name='PaymentMethod'></a>PaymentMethod
|
||
|
||
PaymentMethod specifies a payment mechanism, detailing the method used for financial transactions.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|------------------------------------------------------|
|
||
| method | String | | La méthode de paiement représentée par cette struct. |
|
||
|
||
## 4. <a name='Items'></a>Items
|
||
|
||
### 4.1. <a name='ItemArtefact'></a>ItemArtefact
|
||
|
||
ItemArtefact associates an item with artefact-specific attributes, including public, confidential, and private attribute groups, to represent artefacts within the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------|-------------|--------|-------------------------------------------------------------------|
|
||
| item | Item | | Represents the item associated with this artefact. |
|
||
| public_attribute_group | Vec<String> | | A list of public attributes associated with the artefact. |
|
||
| role_confidential_attribute_group | Vec<String> | | A list of role-specific confidential attributes for the artefact. |
|
||
| private_attribute_group | Vec<String> | | A list of private attributes associated with the artefact. |
|
||
|
||
### 4.2. <a name='ItemCommitmentPublicAttributeGroup'></a>ItemCommitmentPublicAttributeGroup
|
||
|
||
This struct groups public attributes related to commitments, such as goals and provider types, to publicly share commitment details.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|--------------------------|-------------|--------|--------------------------------------------------------------------------|
|
||
| for_sp_address_list | Vec<String> | | A list of service provider addresses related to this commitment. |
|
||
| goal_list | Vec<String> | | A list of goals associated with this commitment. |
|
||
| provider_type | String | | The type of provider making the commitment. |
|
||
| commitment_pcd_hash_list | Vec<String> | | A list of hashes for the commitment's PCD documents. |
|
||
| ref_item_hash_list | Vec<String> | | A list of reference hashes for items related to this commitment. |
|
||
| ref_pcd_hash_list | Vec<String> | | A list of reference hashes for PCD documents related to this commitment. |
|
||
| payload_public_list | Vec<String> | | A list of public payloads associated with this commitment. |
|
||
|
||
### 4.3. <a name='ItemMemberPublicAttributeGroup'></a>ItemMemberPublicAttributeGroup
|
||
|
||
ItemMemberPublicAttributeGroup outlines public attributes for members, including service provider addresses and payment methods, for transparency in member-related information.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------------------|-------------|--------|---------------------------------------------------------------|
|
||
| sp_address_public | String | | The public service provider address. |
|
||
| sp_address_public_sig | String | | The signature for the public service provider address. |
|
||
| sp_address_revoke_public | String | | The public address for revoking service provider access. |
|
||
| sp_address_revoke_public_sig | String | | The signature for the public address for revoking access. |
|
||
| third_sp_address_list_public | Vec<String> | | A list of public addresses for third-party service providers. |
|
||
| data_size_max | i64 | | The maximum size of data allowed. |
|
||
| payment_method_list_public | Vec<String> | | A list of public payment methods available. |
|
||
| succession_process_hash | String | | The hash of the succession process associated with this item. |
|
||
|
||
### 4.4. <a name='ItemDepositPublicAttributeGroup'></a>ItemDepositPublicAttributeGroup
|
||
|
||
It details public attributes for deposits, including target addresses and goals, facilitating the understanding of deposit objectives.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------------|-------------|--------|----------------------------------------------------------------|
|
||
| for_sp_address_list | Vec<String> | | A list of service provider addresses targeted by this deposit. |
|
||
| for_address_list | Vec<String> | | A list of addresses targeted by this deposit. |
|
||
| goal_list | Vec<String> | | A list of goals associated with this deposit. |
|
||
| provider_type | String | | The type of provider making the deposit. |
|
||
| ref_item_hash_list | Vec<String> | | A list of item hashes referenced by this deposit. |
|
||
| ref_pcd_hash_list | Vec<String> | | A list of PCD document hashes referenced by this deposit. |
|
||
| payload_list_public | Vec<String> | | A list of public payloads associated with this deposit. |
|
||
| audit_code_list_public | Vec<String> | | A list of public audit codes associated with this deposit. |
|
||
|
||
### 4.5. <a name='ItemCommitmentRoleConfidentialAttributeGroup'></a>ItemCommitmentRoleConfidentialAttributeGroup
|
||
|
||
This struct encompasses role-specific confidential attributes for commitments, securing sensitive commitment information.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|---------------------------|-------------|--------|------------------------------------------------------------------|
|
||
| payload_list_confidential | Vec<String> | | A list of confidential payloads associated with this commitment. |
|
||
|
||
### 4.6. <a name='ItemCommitmentPrivateAttributeGroup'></a>ItemCommitmentPrivateAttributeGroup
|
||
|
||
ItemCommitmentPrivateAttributeGroup contains private attributes for commitments, ensuring privacy for the most sensitive commitment details.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------------|-------------|--------|-------------------------------------------------------------|
|
||
| payload_list_private | Vec<String> | | A list of private payloads associated with this commitment. |
|
||
|
||
### 4.7. <a name='ItemCommitment'></a>ItemCommitment
|
||
|
||
ItemCommitment links an item with commitment-specific attributes across public, confidential, and private spheres, fully representing a commitment.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------|----------------------------------------------|--------|---------------------------------------------------------------------|
|
||
| item | Item | | Represents the item associated with this commitment. |
|
||
| public_attribute_group | ItemCommitmentPublicAttributeGroup | | The public attribute group associated with this commitment. |
|
||
| role_confidential_attribute_group | ItemCommitmentRoleConfidentialAttributeGroup | | The role-specific confidential attribute group for this commitment. |
|
||
| private_attribute_group | ItemCommitmentPrivateAttributeGroup | | The private attribute group associated with this commitment. |
|
||
|
||
### 4.8. <a name='ItemDepositRoleConfidentialAttributeGroup'></a>ItemDepositRoleConfidentialAttributeGroup
|
||
|
||
Similar to its commitment counterpart, this struct holds confidential attributes specific to deposits, protecting sensitive deposit information.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------------------|-------------|--------|------------------------------------------------------------------|
|
||
| payload_list_confidential | Vec<String> | | A list of confidential payloads associated with this deposit. |
|
||
| audit_code_list_confidential | Vec<String> | | A list of confidential audit codes associated with this deposit. |
|
||
|
||
### 4.9. <a name='ItemDepositPrivateAttributeGroup'></a>ItemDepositPrivateAttributeGroup
|
||
|
||
ItemDepositPrivateAttributeGroup secures private deposit attributes, safeguarding the most sensitive aspects of deposits.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------------|-------------|--------|----------------------------------------------------------|
|
||
| payload_list_private | Vec<String> | | A list of private payloads associated with this deposit. |
|
||
| audit_code_private | String | | A private audit code associated with this deposit. |
|
||
|
||
### 4.10. <a name='ItemDeposit'></a>ItemDeposit
|
||
|
||
It combines an item with deposit-specific attributes, including public, confidential, and private groups, to comprehensively represent a deposit.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------|-------------------------------------------|--------|------------------------------------------------------------------|
|
||
| item | Item | | Represents the item associated with this deposit. |
|
||
| public_attribute_group | ItemDepositPublicAttributeGroup | | The public attribute group associated with this deposit. |
|
||
| role_confidential_attribute_group | ItemDepositRoleConfidentialAttributeGroup | | The role-specific confidential attribute group for this deposit. |
|
||
| private_attribute_group | ItemDepositPrivateAttributeGroup | | The private attribute group associated with this deposit. |
|
||
|
||
### 4.11. <a name='ItemEnum'></a>ItemEnum
|
||
|
||
This enumeration represents different types of items within a system, where each variant encapsulates a specific struct for a type of item:
|
||
|
||
Process(ItemProcess): Contains an item of type ItemProcess, representing a process.
|
||
Peer(ItemPeer): Contains an item of type ItemPeer, representing a peer.
|
||
Member(ItemMember): Contains an item of type ItemMember, representing a member.
|
||
Payment(ItemPayment): Contains an item of type ItemPayment, representing a payment.
|
||
Deposit(ItemDeposit): Contains an item of type ItemDeposit, representing a deposit.
|
||
Artefact(ItemArtefact): Contains an item of type ItemArtefact, representing an artefact.
|
||
Commitment(ItemCommitment): Contains an item of type ItemCommitment, representing a commitment.
|
||
|
||
### 4.12. <a name='ItemPaymentPublicAttributeGroup'></a>ItemPaymentPublicAttributeGroup
|
||
|
||
This struct organizes public payment attributes, detailing aspects like service provider addresses and payment goals, for public knowledge.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|--------------------------|-------------|--------|-----------------------------------------------------------------------|
|
||
| for_sp_address_list | Vec<String> | | A list of service provider addresses related to this payment. |
|
||
| goal_list | Vec<String> | | A list of goals associated with this payment. |
|
||
| provider_type | String | | The type of provider making the payment. |
|
||
| commitment_pcd_hash_list | Vec<String> | | A list of hashes for the payment's commitment precondition documents. |
|
||
| order_pcd_hash_list | Vec<String> | | A list of hashes for the payment's order precondition documents. |
|
||
| invoice_pcd_hash_list | Vec<String> | | A list of hashes for the payment's invoice precondition documents. |
|
||
| pay_pcd_hash_list | Vec<String> | | A list of hashes for the payment precondition documents. |
|
||
| ref_item_hash_list | Vec<String> | | A list of item hashes referenced by this payment. |
|
||
| ref_pcd_hash_list | Vec<String> | | A list of precondition document hashes referenced by this payment. |
|
||
| payload_list_public | Vec<String> | | A list of public payloads associated with this payment. |
|
||
| audit_code_list_public | Vec<String> | | A list of public audit codes associated with this payment. |
|
||
|
||
### 4.13. <a name='ItemPaymentRoleConfidentialAttributeGroup'></a>ItemPaymentRoleConfidentialAttributeGroup
|
||
|
||
It holds confidential payment attributes, maintaining the confidentiality of critical payment information.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------------------|-------------|--------|------------------------------------------------------------------|
|
||
| payload_list_confidential | Vec<String> | | A list of confidential payloads associated with this payment. |
|
||
| audit_code_list_confidential | Vec<String> | | A list of confidential audit codes associated with this payment. |
|
||
|
||
### 4.14. <a name='ItemPaymentPrivateAttributeGroup'></a>ItemPaymentPrivateAttributeGroup
|
||
|
||
ItemPaymentPrivateAttributeGroup protects private payment attributes, ensuring the highest level of privacy for payment details.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------------|-------------|--------|----------------------------------------------------------|
|
||
| payload_list_private | Vec<String> | | A list of private payloads associated with this payment. |
|
||
| audit_code_private | String | | A private audit code associated with this payment. |
|
||
|
||
### 4.15. <a name='ItemPayment'></a>ItemPayment
|
||
|
||
ItemPayment links an item with payment-specific attributes across public, confidential, and private groups, offering a full view of a payment.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------|-------------------------------------------|--------|------------------------------------------------------------------|
|
||
| item | Item | | Represents the item associated with this payment. |
|
||
| public_attribute_group | ItemPaymentPublicAttributeGroup | | The public attribute group associated with this payment. |
|
||
| role_confidential_attribute_group | ItemPaymentRoleConfidentialAttributeGroup | | The role-specific confidential attribute group for this payment. |
|
||
| private_attribute_group | ItemPaymentPrivateAttributeGroup | | The private attribute group associated with this payment. |
|
||
|
||
### 4.16. <a name='ItemPeerPublicAttributeGroup'></a>ItemPeerPublicAttributeGroup
|
||
|
||
It outlines public peer attributes, such as service provider addresses and PoW details, for transparency in peer-related information.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------------------|-------------|--------|-------------------------------------------------------------------------------|
|
||
| sp_address | String | | The service provider's address associated with this peer. |
|
||
| domain | String | | The domain associated with this peer. |
|
||
| ip_address | String | | The IP address associated with this peer. |
|
||
| pow_difficulty | u32 | | The Proof of Work (PoW) difficulty level required by this peer. |
|
||
| pow_pattern | String | | The PoW pattern used by this peer. |
|
||
| pow_prefix | String | | The PoW prefix used by this peer. |
|
||
| data_size_max | i64 | | The maximum data size allowed by this peer. |
|
||
| timestamp_delay_max | u64 | | The maximum delay (in timestamps) allowed by this peer. |
|
||
| daily_hash_list | Vec<String> | | A daily list of hashes associated with this peer. |
|
||
| daily_sp_tx_mine_list | Vec<String> | | A daily list of service provider transactions mined by this peer. |
|
||
| daily_sp_tx_mine_reward_list | Vec<String> | | A daily list of rewards for service provider transactions mined by this peer. |
|
||
|
||
### 4.17. <a name='ItemPeerPrivateAttributeGroup'></a>ItemPeerPrivateAttributeGroup
|
||
|
||
ItemPeerPrivateAttributeGroup contains a private configuration string for a peer, keeping certain peer configurations confidential.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|-----------------------------------------------------------|
|
||
| config | String | | A private configuration string associated with this peer. |
|
||
|
||
### 4.18. <a name='ItemPeer'></a>ItemPeer
|
||
|
||
ItemPeer combines basic item information with layers, public, and private attributes, fully detailing a peer within the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-------------------------|-------------------------------|--------|---------------------------------------------------------------|
|
||
| item | Item | | Représente les informations de base de l'item. |
|
||
| layer_list | Vec<String> | | Une liste des couches (layers) auxquelles ce pair appartient. |
|
||
| public_attribute_group | ItemPeerPublicAttributeGroup | | Groupe d'attributs publics associés à ce pair. |
|
||
| private_attribute_group | ItemPeerPrivateAttributeGroup | | Groupe d'attributs privés associés à ce pair. |
|
||
|
||
### 4.19. <a name='ItemProcess'></a>ItemProcess
|
||
|
||
ItemProcess associates an item with a process, including public attribute groups, to represent processes within the system comprehensively.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-------------------------------------|---------------------------------|--------|----------------------------------------------------------|
|
||
| item | Item | | Represents the item associated with this process. |
|
||
| item_process_public_attribute_group | ItemProcessPublicAttributeGroup | | The public attribute group associated with this process. |
|
||
|
||
### 4.20. <a name='ItemProcessPublicAttributeGroup'></a>ItemProcessPublicAttributeGroup
|
||
|
||
This struct details public attributes related to processes, like roles groups, to facilitate understanding of process organization.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|------------|--------|-----------------------------------------------------------|
|
||
| roles_group | RolesGroup | | Represents a group of roles associated with this process. |
|
||
|
||
### 4.21. <a name='Item'></a>Item
|
||
|
||
The Item struct serves as a foundational element, detailing the basic structure of an item with attributes like UUID, version, and type, central to item management in the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------------------|--------------------------|--------|---------------------------------------------------------------------------|
|
||
| uuid | String | | A unique identifier for the item. |
|
||
| version | i64 | | The version of the item. |
|
||
| item_type | String | | The type of the item. `type` is a reserved keyword in Rust, renamed here. |
|
||
| name | String | | The name of the item. |
|
||
| pagination_number_per_pcd | u32 | | The pagination number per Portable Contract Document (PCD). |
|
||
| metadata_contract_public | MetadataContractPublic | | Public metadata contract associated with the item. |
|
||
| metadata_role_confidential | MetadataRoleConfidential | | Role-specific confidential metadata associated with the item. |
|
||
| metadata_private | MetadataPrivate | | Private metadata associated with the item. |
|
||
|
||
## 5. <a name='Encryption'></a>Encryption
|
||
|
||
### 5.1. <a name='KeyEncryption'></a>KeyEncryption
|
||
|
||
The KeyEncryption struct provides details about encryption keys, including the attribute it's for, the key itself, and the algorithm used, crucial for securing data within the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|----------------|--------|---------------------------------------------------------------|
|
||
| attribute_name | Option<String> | Yes | An optional name of the attribute this encryption key is for. |
|
||
| key | Option<String> | Yes | An optional encryption key. |
|
||
| algorithm | Option<String> | Yes | An optional encryption algorithm used with this key. |
|
||
|
||
### 5.2. <a name='Aes256GcmIv96Bit'></a>Aes256GcmIv96Bit
|
||
|
||
This struct represents an encryption scheme using AES-256-GCM with a 96-bit initialization vector (IV), specifying the key details for robust data encryption.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|-----------------------|--------|------------------------------------------------------------------------------|
|
||
| key | GenericArray<u8, U32> | | Represents an encryption key for the AES-256-GCM algorithm with a 96-bit IV. |
|
||
|
||
## 6. <a name='Messages'></a>Messages
|
||
|
||
### 6.1. <a name='Message'></a>Message
|
||
|
||
Message encapsulates a client message, including an encrypted request and its hash, essential for secure and verifiable client-server communication.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|---------|--------|------------------------------------------------------------------|
|
||
| message | Message | | Represents a message, assuming `Message` is a predefined struct. |
|
||
| request_enc | String | | The encrypted request content. |
|
||
|
||
### 6.2. <a name='MessageConnect'></a>MessageConnect
|
||
|
||
The MessageConnect struct is designed to handle connection-related messages, facilitating the establishment of connections within the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|---------|--------|------------------------------------------------------------------|
|
||
| message | Message | | Represents a message, assuming `Message` is a predefined struct. |
|
||
|
||
### 6.3. <a name='MessageGeneric'></a>MessageGeneric
|
||
|
||
Message provides a general structure for messages, including shared peers and processes, and details like PoW challenges, supporting diverse communication needs
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------------|--------------------|--------|------------------------------------------------------------------------------------|
|
||
| shared_peer_list | Vec<SharedPeer> | | A list of shared peers, assuming `SharedPeer` is a predefined struct. |
|
||
| shared_process_list | Vec<SharedProcess> | | A list of shared processes, assuming `SharedProcess` is a predefined struct. |
|
||
| faucet_sp_address | String | | The service provider address for a faucet. |
|
||
| pow | Pow | | Represents a Proof of Work (PoW) challenge, assuming `Pow` is a predefined struct. |
|
||
| raw_transaction_list | Vec<String > | | Transaction to broadcast |
|
||
|
||
### 6.4. <a name='Pow'></a>Pow
|
||
|
||
The Pow struct outlines a Proof of Work challenge, including data hash, timestamp, and nonce, to ensure computational effort for security purposes.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|-------------|--------|---------------------------------------------------------|
|
||
| data_hash | String | | The hash of the data for which the PoW is being solved. |
|
||
| timestamp | Option<u64> | Yes | An optional timestamp associated with the PoW solution. |
|
||
| nonce | Option<u64> | Yes | An optional nonce value used in the PoW calculation. |
|
||
| pattern | String | | The pattern that the PoW solution must match. |
|
||
| difficulty | usize | | The difficulty level of the PoW challenge. |
|
||
|
||
### 6.5. <a name='SharedProcess'></a>SharedProcess
|
||
|
||
SharedProcess identifies a shared process within the system, aiding in the management and coordination of collaborative processes.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|-------------------------------------------------------------------------------------------------------------------------|
|
||
| process_id | String | | The identifier for the shared process, facilitating collaboration and management of shared resources within the system. |
|
||
|
||
### 6.6. <a name='SharedPeer'></a>SharedPeer
|
||
|
||
SharedPeer specifies a peer within the network, playing a key role in distributed information sharing and communication.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|----------|--------|-------------------------------------------------------------------------------|
|
||
| domain | String | | The domain associated with the shared peer. |
|
||
| address_ip | String | | The IP address of the shared peer. |
|
||
| relay | Relay | | Represents a relay node in the network. |
|
||
| l1_node | L1Node | | Represents a level 1 (L1) node in the network. |
|
||
| l1_miner | L1Miner | | Represents a level 1 (L1) miner in the network. |
|
||
| l2_node | L2Node | | Represents a level 2 (L2) node in the network. |
|
||
| l2_certif | L2Certif | | Represents a level 2 (L2) certification authority or function in the network. |
|
||
|
||
## 7. <a name='Relay'></a>Relay
|
||
|
||
Represents a relay in the network, specifying its address and port, data handling capacity, and Proof of Work (PoW) requirements.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-------------------|--------|--------|-------------------------------------------------------------------|
|
||
| address_port | u16 | | The port address of the relay. |
|
||
| data_max_size | usize | | Maximum size of data the relay can handle. |
|
||
| pow_difficulty | u32 | | The difficulty level for the Proof of Work required by the relay. |
|
||
| pow_pattern | String | | The pattern used for the Proof of Work. |
|
||
| pow_prefix | String | | The prefix used for the Proof of Work. |
|
||
| pow_timeout | u32 | | Timeout for pow |
|
||
| faucet_sp_address | u32 | | Faucet address |
|
||
|
||
### 7.1. <a name='L1Node'></a>L1Node
|
||
|
||
The L1Node struct details a Level 1 blockchain node, including its network, IP address, and status, integral to blockchain operations and interactions.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|---------------|--------|--------------------------------------------------------------|
|
||
| id | u32 | | Unique identifier for the L1 node. |
|
||
| network | String | | The blockchain network the L1 node is part of. |
|
||
| ip_address | String | | IP address of the L1 node. |
|
||
| port | u16 | | Port number the L1 node listens on. |
|
||
| status | String | | Current status of the L1 node (e.g., active, inactive). |
|
||
| last_checked | DateTime<Utc> | | Timestamp of the last health check performed on the L1 node. |
|
||
|
||
### 7.2. <a name='L1Miner'></a>L1Miner
|
||
|
||
L1Miner describes a miner on a Level 1 blockchain, detailing its network, mining power, and status, crucial for understanding blockchain mining dynamics.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|----------------------------------------------------------|
|
||
| id | u32 | | Unique identifier for the L1 miner. |
|
||
| network | String | | The blockchain network the L1 miner is part of. |
|
||
| ip_address | String | | IP address of the L1 miner. |
|
||
| port | u16 | | Port number the L1 miner listens on. |
|
||
| status | String | | Current status of the L1 miner (e.g., active, inactive). |
|
||
| mining_power | f32 | | The mining power of the L1 miner in hashes per second. |
|
||
|
||
### 7.3. <a name='L2Node'></a>L2Node
|
||
|
||
This struct represents a Level 2 (Layer 2) blockchain node, focusing on scalability solutions and includes details such as its network and operation layer.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|---------------------------------------------------------|
|
||
| id | u32 | | Unique identifier for the L2 node. |
|
||
| network | String | | The blockchain network the L2 node is part of. |
|
||
| ip_address | String | | IP address of the L2 node. |
|
||
| port | u16 | | Port number the L2 node listens on. |
|
||
| status | String | | Current status of the L2 node (e.g., active, inactive). |
|
||
| layer | String | | Indicates the layer (L2) the node operates at. |
|
||
|
||
### 7.4. <a name='L2Certif'></a>L2Certif
|
||
|
||
L2Certif specifies a Layer 2 certification authority, including its network and certification type, vital for managing certifications on Layer 2 solutions.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|----------------------------------------------------------------------------|
|
||
| id | u32 | | Unique identifier for the L2 certification authority. |
|
||
| network | String | | The blockchain network the L2 certif is part of. |
|
||
| ip_address | String | | IP address of the L2 certification authority. |
|
||
| port | u16 | | Port number the L2 certification authority listens on. |
|
||
| status | String | | Current status of the L2 certification authority (e.g., active, inactive). |
|
||
| certif_type | String | | Type of certification or service provided by the L2 certif. |
|
||
|
||
## 8. <a name='Metadata'></a>Metadata
|
||
|
||
MetaDataa aggregates various metadata types, including tags, zones, and key lists, offering a comprehensive view of metadata for diverse applications.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------------|--------------------|--------|----------------------------------------------------------------|
|
||
| tag_list | Vec<String> | | A list of tags associated with the metadata. |
|
||
| zone_list | Vec<String> | | A list of zones associated with the metadata. |
|
||
| label_list | Vec<String> | | A list of labels associated with the metadata. |
|
||
| ref_list | Vec<String> | | A list of references associated with the metadata. |
|
||
| data_list | Vec<String> | | A list of data entries associated with the metadata. |
|
||
| amount | Amount | | An amount associated with the metadata. |
|
||
| number | Number | | A number associated with the metadata. |
|
||
| render_template_list | Vec<String> | | A list of render templates associated with the metadata. |
|
||
| legal_text_list | Vec<String> | | A list of legal texts associated with the metadata. |
|
||
| key_list | Vec<KeyEncryption> | | A list of key encryption methods associated with the metadata. |
|
||
|
||
### 8.1. <a name='MetadataContractPublic'></a>MetadataContractPublic
|
||
|
||
The MetadataContractPublic struct encapsulates public metadata for contracts, providing transparency and accessibility of contract-related information.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|----------|--------|------------------------------------------------------------|
|
||
| meta_data | MetaData | | Represents the public metadata associated with a contract. |
|
||
|
||
### 8.2. <a name='MetadataPrivate'></a>MetadataPrivate
|
||
|
||
MetadataPrivate holds private metadata, ensuring the confidentiality of sensitive information associated with entities or contracts.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|----------|--------|------------------------------------------------------------|
|
||
| meta_data | MetaData | | Represents the private metadata associated with an entity. |
|
||
|
||
### 8.3. <a name='MetadataRoleConfidential'></a>MetadataRoleConfidential
|
||
|
||
This struct contains role-specific confidential metadata, balancing the need for privacy with role-based access and transparency.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|----------|--------|-------------------------------------------------------------------------------|
|
||
| meta_data | MetaData | | Represents the role-specific confidential metadata associated with an entity. |
|
||
|
||
### 8.4. <a name='Amount'></a>Amount
|
||
|
||
The Amount struct details financial amounts, including its timestamp, unit, and changes, facilitating precise financial transactions and records.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|--------------------|-------------|--------|----------------------------------------------------------------------------------|
|
||
| timestamp | u64 | | A timestamp associated with the amount. |
|
||
| change_source_list | Vec<String> | | A list of sources for changes to the amount. |
|
||
| amount_cent | i64 | | The amount in cents, allowing for precise financial transactions. |
|
||
| amount_unit | String | | The unit of the amount, such as "USD", "EUR", etc. |
|
||
| amount_unit_ref | String | | A reference to an external unit system, providing context for the `amount_unit`. |
|
||
|
||
### 8.5. <a name='Number'></a>Number
|
||
|
||
Number provides a numeric value and its unit, supporting a wide range of quantitative representations in system operations.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|-----------------------------------------------------------------|
|
||
| fixed_state | bool | | Indicates whether the number is in a fixed state or can change. |
|
||
| number | i32 | | The numeric value. |
|
||
| number_unit | String | | The unit of measurement for the number, if applicable. |
|
||
|
||
## 9. <a name='Request'></a>Request
|
||
|
||
Defines a general request structure within the system, encapsulating details about the requested item, its type, version, and associated process and document references.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|---------------------|----------------|--------|--------------------------------------------------------------------------------------------|
|
||
| item_name | Option<String> | Yes | Optionally specifies the name of the item being requested. |
|
||
| request_type | String | | Specifies the type of request. `type` is a reserved keyword in Rust, hence `request_type`. |
|
||
| version | i64 | | Specifies the version of the item or process being requested. |
|
||
| process_hash | String | | The hash of the process associated with the request. |
|
||
| pcd_reference_hash | Option<String> | Yes | Optionally specifies the hash of PCD related to the request. |
|
||
| pcd_origin_hash | Option<String> | Yes | Optional hash of the originating PCD. |
|
||
| prd_reference_hash | Option<String> | Yes | Optionally specifies the hash of PRD related to the request. |
|
||
| prd_origin_hash | Option<String> | Yes | Optional hash of the originating PRD. |
|
||
| item_reference_hash | Option<String> | Yes | Optionally specifies the hash of the item related to the request. |
|
||
|
||
## 10. <a name='PCD'></a>PCD
|
||
|
||
The RequestPcd struct integrates a request with a list of generic encrypted items and pagination details, facilitating the handling of encrypted PCD requests within the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|------------------------|--------|-------------------------------------------------------------------|
|
||
| request | Request | | The request, assuming `Request` is a predefined struct. |
|
||
| item_list | Vec<PcdItemGenericEnc> | | List of generic encrypted items. |
|
||
| pagination | Pagination | Yes | Pagination details, assuming `Pagination` is a predefined struct. |
|
||
|
||
### 10.1. <a name='Pagination'></a>Pagination
|
||
|
||
The Pagination struct is essential for managing large datasets, detailing the pagination strategy with start index, number of items, and page index.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|-------|--------|--------------------------------------------------|
|
||
| start | usize | | L'indice de départ pour la pagination. |
|
||
| number | usize | | Le nombre d'éléments par page. |
|
||
| page_index | usize | | L'indice de la page actuelle pour la pagination. |
|
||
|
||
### 10.2. <a name='PcdItemEncAttributePublic'></a>PcdItemEncAttributePublic
|
||
|
||
This struct outlines public encrypted attributes for PCD items, ensuring the secure transmission of public attribute data.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|---------------------------------------------------|
|
||
| attribute_name | String | | The name of the attribute. |
|
||
| data_enc | String | | The encrypted data associated with the attribute. |
|
||
|
||
### 10.3. <a name='PcdItemEncAttributeRoleConfidential'></a>PcdItemEncAttributeRoleConfidential
|
||
|
||
PcdItemEncAttributeRoleConfidential deals with role-specific confidential encrypted attributes, securing sensitive data while allowing role-based access.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|---------------|--------|---------------------------------------------------|
|
||
| attribute_name | String | | The name of the attribute. |
|
||
| data_enc | String | Yes | The encrypted data associated with the attribute. |
|
||
| key | KeyEncryption | Yes | The key used for encrypting the data. |
|
||
|
||
### 10.4. <a name='PcdItemEncAttributePrivate'></a>PcdItemEncAttributePrivate
|
||
|
||
It specifies private encrypted attributes for PCD items, protecting the most sensitive information with encryption.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|---------------------------------------------------------|
|
||
| attribute_name | String | | The name of the attribute. |
|
||
| data_enc | String | Yes | The encrypted data associated with this attribute name. |
|
||
|
||
### 10.5. <a name='PcdItemGenericEnc'></a>PcdItemGenericEnc
|
||
|
||
PcdItemGenericEnc encompasses encrypted items with optional lists of public, role-confidential, and private encrypted attributes, offering a flexible encryption model for diverse data types.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------------------|--------------------------------------------------|--------|----------------------------------------------------------|
|
||
| item_enc | PcdItemEnc | | The encrypted item. |
|
||
| pcd_item_enc_attribute_public_list | Option<Vec<PcdItemEncAttributePublic>> | Yes | Optional list of public encrypted attributes. |
|
||
| pcd_item_enc_attribute_role_confidential_list | Option<Vec<PcdItemEncAttributeRoleConfidential>> | Yes | Optional list of role-confidential encrypted attributes. |
|
||
| pcd_item_enc_attribute_private_list | Option<Vec<PcdItemEncAttributePrivate>> | Yes | Optional list of private encrypted attributes. |
|
||
|
||
### 10.6. <a name='PcdItemEnc'></a>PcdItemEnc
|
||
|
||
The PcdItemEnc struct encapsulates encrypted PCD items, detailing the version, type, and name of the item, alongside encrypted attributes segregated into public, role-confidential, and private categories, ensuring comprehensive encryption coverage.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------------------|------------------------------------------|--------|-------------------------------------------------|
|
||
| version | i64 | | The version of the item. |
|
||
| item_type | String | | The type of the item. |
|
||
| name | String | | The name of the item. |
|
||
| pagination_number_per_pcd | u32 | | The pagination number per PCD. |
|
||
| pcd_item_enc_attribute_public_list | Vec<PcdItemEncAttributePublic> | | List of public encrypted attributes. |
|
||
| pcd_item_enc_attribute_role_confidential_list | Vec<PcdItemEncAttributeRoleConfidential> | | List of role-confidential encrypted attributes. |
|
||
| pcd_item_enc_attribute_private_list | Vec<PcdItemEncAttributePrivate> | | List of private encrypted attributes. |
|
||
|
||
## 11. <a name='RequestPrd'></a>RequestPrd
|
||
|
||
Encapsulates a detailed request within the system, focusing on the interaction with Portable Request Documents (PRD) and specifying various levels of message confidentiality and intended service provider (SP) communication details.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|------------------------------------------------------|---------------------|--------|----------------------------------------------------------------------------------------|
|
||
| request | Request | | A predefined struct representing the basic request information. |
|
||
| sig_value | String | | Valeur associée à la signature |
|
||
| pcd_keys_role_confidential_list_enc_by_shared_secret | String | | Encrypted list of PCD keys for role-confidential data, encrypted with a shared secret. |
|
||
| message_public | Option<String> | Yes | Optionally specifies a public message associated with the request. |
|
||
| message_confidential | Option<String> | Yes | Optionally specifies a confidential message associated with the request. |
|
||
| message_private | Option<String> | Yes | Optionally specifies a private message associated with the request. |
|
||
| sp_address_to | String | | The service provider address to which the request is directed. |
|
||
| sp_address_from | String | | The service provider address from which the request originates. |
|
||
| sp_address_reply | String | | The service provider address for replies to the request. |
|
||
| timestamp_declared | u64 | | A Unix timestamp indicating when the request was declared. |
|
||
| role_name_from | String | | The name of the role from which the request originates. |
|
||
| role_name_to | String | | The name of the role to which the request is directed. |
|
||
| payment_method_enc_by_shared_secret | Option<String> | Yes | Encrypted payment method, encrypted with a shared secret. |
|
||
| deposit_method_enc_by_shared_secret | Option<String> | Yes | Encrypted deposit method, encrypted with a shared secret. |
|
||
| commitment_method_enc_by_shared_secret | Option<String> | Yes | Encrypted commitment method, encrypted with a shared secret. |
|
||
| payment_pcd_hash_list_enc_by_shared_secret | Option<Vec<String>> | Yes | A list of hashes for payment-related PCDs. |
|
||
| cap_pcd_hash_list_enc_by_shared_secret | Option<Vec<String>> | Yes | A list of hashes for capability-related PCDs. |
|
||
| deposit_pcd_hash_list_enc_by_shared_secret | Option<Vec<String>> | Yes | A list of hashes for deposit-related PCDs. |
|
||
| commitment_pcd_hash_list_enc_by_shared_secret | Option<Vec<String>> | Yes | A list of hashes for commitment-related PCDs. |
|
||
| ask_payment_method_enc_by_shared_secret | Option<String> | Yes | The requested payment method. |
|
||
| ask_deposit_method_enc_by_shared_secret | Option<String> | Yes | The requested deposit method. |
|
||
| ask_commitment_method_enc_by_shared_secret | Option<String> | Yes | The requested commitment method. |
|
||
| certif_key_enc_by_shared_secret | Option<String> | Yes | Encrypted certification key, encrypted with a shared secret. |
|
||
| device_footprint_enc_by_sp_shared_secret | String | | The device footprint encrypted by a service provider's shared secret. |
|
||
|
||
### 11.1. <a name='RequestPrdResponse'></a>RequestPrdResponse
|
||
|
||
RequestPrd and its variations (Confirm, KeyBackup, KeyHello, List, Message, Response, Update) represent different aspects and actions related to Portable Request Documents (PRD), covering everything from confirmation to updates, key management, and messaging, essential for managing and processing PRDs securely and efficiently.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------------|-----------------------|--------|-----------------------------------------------------------------------------|
|
||
| requestPrd | RequestRD | | Represents a Request. |
|
||
| sig_value | String | | The signature value for the response. |
|
||
| pcd_origin_hash | Option<String> | Yes | Optional hash of the originating PCD. |
|
||
| shared_secret_key | Option<KeyEncryption> | Yes | Optional encryption key used for shared secrets. |
|
||
| pcd_new_version_hash | String | | The hash of the new version of the PCD. |
|
||
| part_1_enc_hash_enc_by_sp_shared_secret | String | Yes | The first part of the hash encrypted by a service provider's shared secret. |
|
||
| shard_enc_by_sp_shared_secret | String | Yes | The shard encrypted by a service provider's shared secret. |
|
||
|
||
### 11.2. <a name='RequestPrdConfirm'></a>RequestPrdConfirm
|
||
|
||
The RequestPrdConfirm struct is designed for confirming actions or requests within the system, utilizing a Portable Request Document (PRD) alongside an encrypted confirmation code, ensuring secure acknowledgment of operations.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------|------------|--------|-----------------------------------------------------|
|
||
| prd | RequestPrd | | The PRD (Portable Request Document) request. |
|
||
| code_confirm_enc_by_shared_secret | String | Yes | The confirmation code encrypted by a shared secret. |
|
||
|
||
### 11.3. <a name='RequestPrdKeyBackup'></a>RequestPrdKeyBackup
|
||
|
||
RequestPrdKeyBackup focuses on backup functionalities for PRD keys, incorporating device footprint and shard information, encrypted for security, facilitating the safe backup and recovery of crucial cryptographic keys.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------------|------------|--------|-----------------------------------------------------------------------------|
|
||
| prd | RequestPrd | | The PRD (Portable Request Document) request. |
|
||
| part_1_enc_hash_enc_by_sp_shared_secret | String | | The first part of the hash encrypted by a service provider's shared secret. |
|
||
| shard_enc_by_sp_shared_secret | String | | The shard encrypted by a service provider's shared secret. |
|
||
|
||
### 11.4. <a name='RequestPrdKeyHello'></a>RequestPrdKeyHello
|
||
|
||
The RequestPrdKeyHello struct is employed for initiating cryptographic communications, specifically for sharing initial key information or for cryptographic introductions between entities, enhancing secure connections.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|-----------------------------------------|------------|--------|----------------------------------------------------------------------------------|
|
||
| prd | RequestPrd | | Represents a Portable Request Document (PRD). |
|
||
| part_1_enc_hash_enc_by_sp_shared_secret | String | | The encrypted hash of part 1, encrypted by the service provider's shared secret. |
|
||
|
||
### 11.5. <a name='RequestPrdList'></a>RequestPrdList
|
||
|
||
RequestPrdList struct is utilized for listing or querying PRDs, aiding in the retrieval or enumeration of Portable Request Documents within the system, streamlining the management and access of PRDs.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|------------|--------|-----------------------------------------|
|
||
| prd | RequestPrd | | Represents a Portable Request Document. |
|
||
|
||
### 11.6. <a name='RequestPrdMessage'></a>RequestPrdMessage
|
||
|
||
The RequestPrdMessage struct serves the purpose of encapsulating messages within PRDs, allowing for secure and structured communication of information wrapped in a Portable Request Document.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|------------|--------|-----------------------------------------|
|
||
| prd | RequestPrd | | Represents a Portable Request Document. |
|
||
|
||
### 11.7. <a name='RequestPrdResponse-1'></a>RequestPrdResponse
|
||
|
||
RequestPrdResponse is designed for responding to PRD requests, including the original PRD, signature for verification, and optional encrypted methods, ensuring a secure and verifiable response mechanism.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|------------|--------|-----------------------------------------|
|
||
| prd | RequestPrd | | Represents a Portable Request Document. |
|
||
| sig_value | String | | The signature value for the response. |
|
||
|
||
### 11.8. <a name='RequestPrdUpdate'></a>RequestPrdUpdate
|
||
|
||
RequestPrdUpdate struct facilitates the updating of PRDs, incorporating new version hashes and lists of related PCD hashes, alongside requested methods for payments, deposits, and commitments, ensuring PRDs remain current and relevant.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|------------|--------|-----------------------------------------|
|
||
| prd | RequestPrd | | Represents a Portable Request Document. |
|
||
|
||
## 12. <a name='Roles'></a>Roles
|
||
|
||
The Roles struct defines the various roles within the system, specifying responsibilities, required security measures such as two-factor authentication, validation timeouts, and conditions for action validation, crucial for role-based access control and process flow.
|
||
|
||
### 12.1. <a name='RolesGroup'></a>RolesGroup
|
||
|
||
RolesGroup outlines a collection of roles.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|--------------------|-------------|--------|---------------------------------------------------------------------------------------------------------------------------|
|
||
| role_peer | String | | Defines the role of peers in the network, responsible for facilitating communications and transactions. |
|
||
| role_member | String | | Specifies the role of members, or users, who actively participate in processes and interactions. |
|
||
| role_process | String | | Represents the entities charged with defining and managing processes within the system. |
|
||
| role_artefact_list | Vec<String> | | A list of artefact roles, allowing customization and extension of functionalities and interactions beyond standard roles. |
|
||
|
||
### 12.2. <a name='RoleArtefact'></a>RoleArtefact
|
||
|
||
The RoleArtefact struct is utilized to define the role associated with artefacts within the system. It specifies the responsibilities and permissions tied to the handling, management, or interaction with artefacts, ensuring clarity in role-based actions and access controls related to artefact-related operations.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------|
|
||
| item_name | String | | Identifies the specific artefact or obligation undertaken by a party. |
|
||
| role | String | | Defines the permissions, conditions, and criteria associated with this artefact, ensuring execution and validation according to expectations. |
|
||
|
||
### 12.3. <a name='RoleDeposit'></a>RoleDeposit
|
||
|
||
RoleDeposit outlines the role and responsibilities concerning deposits in the system. It identifies the specific obligations and permissions granted to entities managing or engaging with deposit transactions, providing a structured approach to deposit management and execution.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
||
| item_name | String | | Identifies the specific deposit or obligation undertaken by a party. |
|
||
| role | String | | Defines the permissions, conditions, and criteria associated with this deposit, ensuring execution and validation according to expectations. |
|
||
|
||
### 12.4. <a name='RoleCommitment'></a>RoleCommitment
|
||
|
||
The RoleCommitment struct details the role associated with commitments, delineating the duties and authorities of entities tasked with creating, managing, or fulfilling commitments. This struct ensures that commitment-related activities are clearly defined and regulated within the system.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------|
|
||
| item_name | String | | Identifies the specific commitment or obligation undertaken by a party. |
|
||
| role | String | | Defines the permissions, conditions, and criteria associated with this commitment, ensuring execution and validation according to expectations. |
|
||
|
||
### 12.5. <a name='RoleMember'></a>RoleMember
|
||
|
||
RoleMember defines the role of members within the system, specifying the rights and responsibilities of membership. This includes access to resources, participation in processes, and contributions to decision-making, highlighting the importance of members in the system's ecosystem.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|---------------------------------------------------------------------------------------------------------------------------------------------|
|
||
| item_name | String | | Identifies the specific member or obligation undertaken by a party. |
|
||
| role | String | | Defines the permissions, conditions, and criteria associated with this member, ensuring execution and validation according to expectations. |
|
||
|
||
### 12.6. <a name='RolePayment'></a>RolePayment
|
||
|
||
The RolePayment struct is dedicated to defining the role related to payments, outlining the specific tasks, permissions, and responsibilities assigned to entities handling or involved in payment transactions, ensuring secure and orderly payment processes.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
||
| item_name | String | | Identifies the specific payment or obligation undertaken by a party. |
|
||
| role | String | | Defines the permissions, conditions, and criteria associated with this payment, ensuring execution and validation according to expectations. |
|
||
|
||
### 12.7. <a name='RoleProcess'></a>RoleProcess
|
||
|
||
RoleProcess describes the role associated with processes within the system. It specifies the expectations, duties, and permissions of entities that initiate, manage, or participate in various system processes, facilitating smooth and regulated process flow.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
||
| item_name | String | | Identifies the specific process or obligation undertaken by a party. |
|
||
| role | String | | Defines the permissions, conditions, and criteria associated with this process, ensuring execution and validation according to expectations. |
|
||
|
||
### 12.8. <a name='Role'></a>Role
|
||
|
||
The Role struct broadly defines a role within the system, encapsulating the general responsibilities, required security measures like two-factor authentication, validation timeouts, and conditions for action validation. This serves as a foundation for more specific role definitions, ensuring a flexible yet secure role-based access and action framework.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|--------------------|---------|--------|------------------------------------------------------------------------------------------------------------------------------------------|
|
||
| item | String | | The entity or object to which the role is associated, providing context for permissions and actions. |
|
||
| required_2fa | Boolean | | Indicates whether two-factor authentication is required for this role, enhancing security for critical actions. |
|
||
| validation_timeout | Integer | | Defines a deadline for the validation of actions or requests associated with this role, ensuring timeliness and efficiency of processes. |
|
||
| condition | String | | Set of criteria and rules defining how actions are validated, executed, or denied based on the context. |
|
||
|
||
### 12.9. <a name='TransactionMode'></a>TransactionMode
|
||
|
||
TransactionMode and its specific types (Distribution, Direct) describe how transactions are handled within the system, whether through direct communication or distributed across multiple entities, influencing the flow and security of transactions.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|-------------|--------|------------------------------------------------------------------------------------------|
|
||
| from_list | Vec<String> | | Adresse silent payment ou role qui doit opérer le paiement |
|
||
| from_type | String | | Soit "addresses" soit "roles" |
|
||
| from_method | String | | Méthode de distribution de la somme des prélèvements : "Amount divided" ou "Same Amount" |
|
||
| to_list | Vec<String> | | Adresse silent payment ou role qui doit recevoir le Versement |
|
||
| to_type | String | | Soit "addresses" soit "roles" |
|
||
| to_method | String | | Méthode de distribution de la somme des versements : "Amount divided" ou "Same Amount" |
|
||
|
||
### 12.10. <a name='RolePeer'></a>RolePeer
|
||
|
||
The RolePeer struct identifies peers associated with specific roles, detailing their identifiers, associated peers, and metadata, essential for defining peer responsibilities and permissions within the networked environment.
|
||
|
||
| Attribute Name | Type | Option | Description |
|
||
|----------------|--------|--------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
||
| item_name | String | | Identifies the specific deposit or obligation undertaken by a party. |
|
||
| role | String | | Defines the permissions, conditions, and criteria associated with this deposit, ensuring execution and validation according to expectations. |
|
||
|
||
## 13. <a name='Rustconsiderations'></a>12. Rust considerations
|
||
|
||
### 13.1. <a name='GeneralImplicationsforProjectObjects'></a> General Implications for Project Objects
|
||
|
||
Incorporating these traits into a struct's definition enhances its utility across various aspects of a project. For instance:
|
||
|
||
* **Serialization traits (Serialize, Deserialize)**: facilitate the easy exchange of data with external services or storage systems.
|
||
* **Traits like Clone, Debug, and Default**: improve the development experience by providing essential functionalities for debugging, testing, and initializing objects.
|
||
* **Comparison and ordering traits (PartialEq, Eq, PartialOrd, Ord)**: are crucial for logic checks, sorting, and storing objects in data structures that require ordering or uniqueness.
|
||
* **The Hash trait**: expands the struct's utility in hash-based collections, enabling efficient data retrieval and storage.
|
||
|
||
### 13.2. <a name='Debug'></a> Debug
|
||
|
||
The Debug trait allows instances of the struct to be formatted using the {:?} formatter. This is essential for debugging purposes, as it provides a way to output the contents of the struct to the console or logs, aiding in the development and troubleshooting process.
|
||
Serialize, Deserialize (serde crate)
|
||
|
||
Serialize and Deserialize traits from the serde crate enable the struct to be easily converted to and from data formats such as JSON, YAML, or TOML. This is particularly useful for web applications or services that need to send or receive data in a structured format over the network.
|
||
|
||
### 13.3. <a name='Default'></a> Default
|
||
|
||
Implementing the Default trait allows for the creation of a struct with default values. This is useful for initializing structs with a set of predetermined values or when a struct needs to be created without specifying every field explicitly.
|
||
Clone
|
||
|
||
The Clone trait allows for the creation of an exact copy of a struct instance. This is crucial for cases where a mutable copy of a struct is needed, while keeping the original instance unchanged.
|
||
|
||
### 13.4. <a name='PartialEqEq'></a> PartialEq, Eq
|
||
|
||
PartialEq and Eq traits enable comparison operations for instances of the struct. While PartialEq allows for partial equality checks (where some of the comparisons might be indeterminate), Eq denotes that every comparison will either be true or false, ensuring a stricter equality condition that is necessary for certain collections or logic checks.
|
||
|
||
### 13.5. <a name='Hash'></a> Hash
|
||
|
||
The Hash trait is used to compute a hash value for instances of the struct. This is essential for structs that need to be stored in collections such as HashMap or HashSet, where a unique identifier is required to efficiently retrieve or store items.
|
||
|
||
### 13.6. <a name='PartialOrdOrd'></a> PartialOrd, Ord
|
||
|
||
PartialOrd and Ord traits allow for ordering comparisons between instances of the struct. PartialOrd provides functionality for partial ordering, where some comparisons might not produce a clear order, whereas Ord requires a total ordering, ensuring that any two instances can be reliably ordered. This is critical for sorting operations or when structs are stored in ordered collections.
|
||
FromForm (rocket crate)
|