sdk_common/doc/Specs-Datas.md
2024-02-12 12:07:05 +01:00

684 lines
50 KiB
Markdown

<!-- vscode-markdown-toc -->
* 1. [Conditions](#Conditions)
* 1.1. [ConditionCap](#ConditionCap)
* 1.2. [ConditionCommitment](#ConditionCommitment)
* 1.3. [ConditionDeposit](#ConditionDeposit)
* 1.4. [ConditionOrchestration](#ConditionOrchestration)
* 1.5. [ConditionPayment](#ConditionPayment)
* 1.6. [ConditionPrdAddressSet](#ConditionPrdAddressSet)
* 1.7. [ConditionPublish](#ConditionPublish)
* 2. [Methods](#Methods)
* 2.1. [DepositMethod](#DepositMethod)
* 2.2. [CommitmentMethod](#CommitmentMethod)
* 2.3. [PaymentMethod](#PaymentMethod)
* 3. [Items](#Items)
* 3.1. [ItemArtefact](#ItemArtefact)
* 3.2. [ItemCommitmentPublicAttributeGroup](#ItemCommitmentPublicAttributeGroup)
* 3.3. [ItemMemberPublicAttributeGroup](#ItemMemberPublicAttributeGroup)
* 3.4. [ItemDepositPublicAttributeGroup](#ItemDepositPublicAttributeGroup)
* 3.5. [ItemCommitmentRoleConfidentialAttributeGroup](#ItemCommitmentRoleConfidentialAttributeGroup)
* 3.6. [ItemCommitmentPrivateAttributeGroup](#ItemCommitmentPrivateAttributeGroup)
* 3.7. [ItemCommitment](#ItemCommitment)
* 3.8. [ItemDepositRoleConfidentialAttributeGroup](#ItemDepositRoleConfidentialAttributeGroup)
* 3.9. [ItemDepositPrivateAttributeGroup](#ItemDepositPrivateAttributeGroup)
* 3.10. [ItemDeposit](#ItemDeposit)
* 3.11. [ItemEnum](#ItemEnum)
* 3.12. [ItemPaymentPublicAttributeGroup](#ItemPaymentPublicAttributeGroup)
* 3.13. [ItemPaymentRoleConfidentialAttributeGroup](#ItemPaymentRoleConfidentialAttributeGroup)
* 3.14. [ItemPaymentPrivateAttributeGroup](#ItemPaymentPrivateAttributeGroup)
* 3.15. [ItemPayment](#ItemPayment)
* 3.16. [ItemPeerPublicAttributeGroup](#ItemPeerPublicAttributeGroup)
* 3.17. [ItemPeerPrivateAttributeGroup](#ItemPeerPrivateAttributeGroup)
* 3.18. [ItemPeer](#ItemPeer)
* 3.19. [ItemProcess](#ItemProcess)
* 3.20. [ItemProcessPublicAttributeGroup](#ItemProcessPublicAttributeGroup)
* 3.21. [Item](#Item)
* 4. [Encryption](#Encryption)
* 4.1. [KeyEncryption](#KeyEncryption)
* 4.2. [Aes256GcmIv96Bit](#Aes256GcmIv96Bit)
* 5. [Messages](#Messages)
* 5.1. [MessageClient](#MessageClient)
* 5.2. [MessageConnect](#MessageConnect)
* 5.3. [Message](#Message)
* 5.4. [Pow](#Pow)
* 6. [Metadata](#Metadata)
* 6.1. [MetadataContractPublic](#MetadataContractPublic)
* 6.2. [MetadataPrivate](#MetadataPrivate)
* 6.3. [MetadataPrivate](#MetadataPrivate-1)
* 6.4. [MetadataRoleConfidential](#MetadataRoleConfidential)
* 6.5. [MetaData](#MetaData)
* 6.6. [Amount](#Amount)
* 6.7. [Number](#Number)
* 7. [PCD](#PCD)
* 7.1. [Pagination](#Pagination)
* 7.2. [PcdItemEncAttributePublic](#PcdItemEncAttributePublic)
* 7.3. [PcdItemEncAttributeRoleConfidential](#PcdItemEncAttributeRoleConfidential)
* 7.4. [PcdItemEncAttributePrivate](#PcdItemEncAttributePrivate)
* 7.5. [PcdItemGenericEnc](#PcdItemGenericEnc)
* 7.6. [PcdItemEnc](#PcdItemEnc)
* 7.7. [RequestPcd](#RequestPcd)
* 8. [PRD](#PRD)
* 8.1. [RequestPrdConfirm](#RequestPrdConfirm)
* 8.2. [RequestPrdKeyBackup](#RequestPrdKeyBackup)
* 8.3. [RequestPrdKeyHello](#RequestPrdKeyHello)
* 8.4. [RequestPrdList](#RequestPrdList)
* 8.5. [RequestPrdMessage](#RequestPrdMessage)
* 8.6. [RequestPrdList](#RequestPrdList-1)
* 8.7. [RequestPrdResponse](#RequestPrdResponse)
* 8.8. [RequestPrdUpdate](#RequestPrdUpdate)
* 8.9. [KeyRoleConfidential](#KeyRoleConfidential)
* 8.10. [RequestPrd](#RequestPrd)
* 8.11. [RoleArtefact](#RoleArtefact)
* 8.12. [Request](#Request)
* 8.13. [RoleDeposit](#RoleDeposit)
* 8.14. [RoleCommitment](#RoleCommitment)
* 8.15. [RoleMember](#RoleMember)
* 8.16. [RolePayment](#RolePayment)
* 8.17. [RoleProcess](#RoleProcess)
* 8.18. [Role](#Role)
* 8.19. [TransactionModeDistribution](#TransactionModeDistribution)
* 8.20. [TransactionModeDirect](#TransactionModeDirect)
* 8.21. [TransactionMode](#TransactionMode)
* 8.22. [RolesGroup](#RolesGroup)
* 8.23. [SharedProcess](#SharedProcess)
* 8.24. [SharedPeer](#SharedPeer)
* 8.25. [Relay](#Relay)
* 8.26. [L1Node](#L1Node)
* 8.27. [L1Miner](#L1Miner)
* 8.28. [L2Node](#L2Node)
* 8.29. [L2Certif](#L2Certif)
* 8.30. [SharedPeer](#SharedPeer-1)
* 8.31. [RolePeer](#RolePeer)
<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc --># Specs - Datas
## 1. <a name='Conditions'></a>Conditions
### 1.1. <a name='ConditionCap'></a>ConditionCap
| 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. |
### 1.2. <a name='ConditionCommitment'></a>ConditionCommitment
| 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. |
### 1.3. <a name='ConditionDeposit'></a>ConditionDeposit
| 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. |
### 1.4. <a name='ConditionOrchestration'></a>ConditionOrchestration
| 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. |
### 1.5. <a name='ConditionPayment'></a>ConditionPayment
| 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. |
### 1.6. <a name='ConditionPrdAddressSet'></a>ConditionPrdAddressSet
| 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. |
### 1.7. <a name='ConditionPublish'></a>ConditionPublish
| 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. |
## 2. <a name='Methods'></a>Methods
### 2.1. <a name='DepositMethod'></a>DepositMethod
| Attribute Name | Type | Option | Description |
|----------------|--------|--------|------------------------------|
| method | String | | Represents a deposit method. |
### 2.2. <a name='CommitmentMethod'></a>CommitmentMethod
| Attribute Name | Type | Option | Description |
|----------------|--------|--------|---------------------------------|
| method | String | | Represents a commitment method. |
### 2.3. <a name='PaymentMethod'></a>PaymentMethod
| Attribute Name | Type | Option | Description |
|----------------|--------|--------|------------------------------------------------------|
| method | String | | La méthode de paiement représentée par cette struct. |
## 3. <a name='Items'></a>Items
### 3.1. <a name='ItemArtefact'></a>ItemArtefact
| 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. |
### 3.2. <a name='ItemCommitmentPublicAttributeGroup'></a>ItemCommitmentPublicAttributeGroup
| 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. |
### 3.3. <a name='ItemMemberPublicAttributeGroup'></a>ItemMemberPublicAttributeGroup
| 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. |
### 3.4. <a name='ItemDepositPublicAttributeGroup'></a>ItemDepositPublicAttributeGroup
| 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. |
### 3.5. <a name='ItemCommitmentRoleConfidentialAttributeGroup'></a>ItemCommitmentRoleConfidentialAttributeGroup
| Attribute Name | Type | Option | Description |
|---------------------------|-------------|--------|------------------------------------------------------------------|
| payload_list_confidential | Vec<String> | | A list of confidential payloads associated with this commitment. |
### 3.6. <a name='ItemCommitmentPrivateAttributeGroup'></a>ItemCommitmentPrivateAttributeGroup
| Attribute Name | Type | Option | Description |
|----------------------|-------------|--------|-------------------------------------------------------------|
| payload_list_private | Vec<String> | | A list of private payloads associated with this commitment. |
### 3.7. <a name='ItemCommitment'></a>ItemCommitment
| 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. |
### 3.8. <a name='ItemDepositRoleConfidentialAttributeGroup'></a>ItemDepositRoleConfidentialAttributeGroup
| 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. |
### 3.9. <a name='ItemDepositPrivateAttributeGroup'></a>ItemDepositPrivateAttributeGroup
| 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. |
### 3.10. <a name='ItemDeposit'></a>ItemDeposit
| 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. |
### 3.11. <a name='ItemEnum'></a>ItemEnum
Cette énumération représente différents types d'items au sein d'un système, où chaque variante encapsule une struct spécifique à un type d'item :
* `Process(ItemProcess)`: Contient un item de type `ItemProcess`, représentant un processus.
* `Peer(ItemPeer)`: Contient un item de type `ItemPeer`, représentant un pair.
* `Member(ItemMember)`: Contient un item de type `ItemMember`, représentant un membre.
* `Payment(ItemPayment)`: Contient un item de type `ItemPayment`, représentant un paiement.
* `Deposit(ItemDeposit)`: Contient un item de type `ItemDeposit`, représentant un dépôt.
* `Artefact(ItemArtefact)`: Contient un item de type `ItemArtefact`, représentant un artefact.
* `Commitment(ItemCommitment)`: Contient un item de type `ItemCommitment`, représentant un engagement.
### 3.12. <a name='ItemPaymentPublicAttributeGroup'></a>ItemPaymentPublicAttributeGroup
| 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. |
### 3.13. <a name='ItemPaymentRoleConfidentialAttributeGroup'></a>ItemPaymentRoleConfidentialAttributeGroup
| 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. |
### 3.14. <a name='ItemPaymentPrivateAttributeGroup'></a>ItemPaymentPrivateAttributeGroup
| 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. |
### 3.15. <a name='ItemPayment'></a>ItemPayment
| 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. |
### 3.16. <a name='ItemPeerPublicAttributeGroup'></a>ItemPeerPublicAttributeGroup
| 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. |
### 3.17. <a name='ItemPeerPrivateAttributeGroup'></a>ItemPeerPrivateAttributeGroup
| Attribute Name | Type | Option | Description |
|----------------|--------|--------|-----------------------------------------------------------|
| config | String | | A private configuration string associated with this peer. |
### 3.18. <a name='ItemPeer'></a>ItemPeer
| 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. |
### 3.19. <a name='ItemProcess'></a>ItemProcess
| 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. |
### 3.20. <a name='ItemProcessPublicAttributeGroup'></a>ItemProcessPublicAttributeGroup
| Attribute Name | Type | Option | Description |
|----------------|------------|--------|-----------------------------------------------------------|
| roles_group | RolesGroup | | Represents a group of roles associated with this process. |
### 3.21. <a name='Item'></a>Item
| Attribute Name | Type | Option | Description |
|----------------------------|--------------------------|--------|---------------------------------------------------------------------------|
| uuid | String | | A unique identifier for the item. |
| version | i64 | | The version of the item. |
| hash | Option<String> | | An optional hash for 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. |
## 4. <a name='Encryption'></a>Encryption
### 4.1. <a name='KeyEncryption'></a>KeyEncryption
| 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. |
### 4.2. <a name='Aes256GcmIv96Bit'></a>Aes256GcmIv96Bit
| Attribute Name | Type | Option | Description |
|----------------|-----------------------|--------|------------------------------------------------------------------------------|
| key | GenericArray<u8, U32> | | Represents an encryption key for the AES-256-GCM algorithm with a 96-bit IV. |
## 5. <a name='Messages'></a>Messages
### 5.1. <a name='MessageClient'></a>MessageClient
| Attribute Name | Type | Option | Description |
|----------------|---------|--------|------------------------------------------------------------------|
| message | Message | | Represents a message, assuming `Message` is a predefined struct. |
| request_enc | String | | The encrypted request content. |
| request_hash | String | | The hash of the request content. |
### 5.2. <a name='MessageConnect'></a>MessageConnect
| Attribute Name | Type | Option | Description |
|----------------|---------|--------|------------------------------------------------------------------|
| message | Message | | Represents a message, assuming `Message` is a predefined struct. |
### 5.3. <a name='Message'></a>Message
| 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. |
### 5.4. <a name='Pow'></a>Pow
| 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. <a name='Metadata'></a>Metadata
### 6.1. <a name='MetadataContractPublic'></a>MetadataContractPublic
| Attribute Name | Type | Option | Description |
|----------------|----------|--------|------------------------------------------------------------|
| meta_data | MetaData | | Represents the public metadata associated with a contract. |
### 6.2. <a name='MetadataPrivate'></a>MetadataPrivate
| Attribute Name | Type | Option | Description |
|----------------|----------|--------|------------------------------------------------------------|
| meta_data | MetaData | | Represents the private metadata associated with an entity. |
### 6.3. <a name='MetadataPrivate-1'></a>MetadataPrivate
| Attribute Name | Type | Option | Description |
|----------------|----------|--------|------------------------------------------------------------|
| meta_data | MetaData | | Represents the private metadata associated with an entity. |
### 6.4. <a name='MetadataRoleConfidential'></a>MetadataRoleConfidential
| Attribute Name | Type | Option | Description |
|----------------|----------|--------|-------------------------------------------------------------------------------|
| meta_data | MetaData | | Represents the role-specific confidential metadata associated with an entity. |
### 6.5. <a name='MetaData'></a>MetaDataa
| 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. |
### 6.6. <a name='Amount'></a>Amount
| 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`. |
### 6.7. <a name='Number'></a>Number
| 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. |
## 7. <a name='PCD'></a>PCD
### 7.1. <a name='Pagination'></a>Pagination
| 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. |
### 7.2. <a name='PcdItemEncAttributePublic'></a>PcdItemEncAttributePublic
| Attribute Name | Type | Option | Description |
|----------------|--------|--------|---------------------------------------------------|
| attribute_name | String | | The name of the attribute. |
| data_enc | String | | The encrypted data associated with the attribute. |
### 7.3. <a name='PcdItemEncAttributeRoleConfidential'></a>PcdItemEncAttributeRoleConfidential
| Attribute Name | Type | Option | Description |
|----------------|---------------|--------|---------------------------------------------------|
| attribute_name | String | | The name of the attribute. |
| data_enc | String | | The encrypted data associated with the attribute. |
| key | KeyEncryption | | The key used for encrypting the data. |
### 7.4. <a name='PcdItemEncAttributePrivate'></a>PcdItemEncAttributePrivate
| Attribute Name | Type | Option | Description |
|----------------|--------|--------|---------------------------------------------------------|
| attribute_name | String | | The name of the attribute. |
| data_enc | String | | The encrypted data associated with this attribute name. |
### 7.5. <a name='PcdItemGenericEnc'></a>PcdItemGenericEnc
| 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. |
### 7.6. <a name='PcdItemEnc'></a>PcdItemEnc
| 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. |
### 7.7. <a name='RequestPcd'></a>RequestPcd
| 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 | | Pagination details, assuming `Pagination` is a predefined struct. |
## 8. <a name='PRD'></a>PRD
### 8.1. <a name='RequestPrdConfirm'></a>RequestPrdConfirm
| Attribute Name | Type | Option | Description |
|-----------------------------------|------------|--------|-----------------------------------------------------|
| prd | RequestPrd | | The PRD (Portable Request Document) request. |
| code_confirm_enc_by_shared_secret | String | | The confirmation code encrypted by a shared secret. |
### 8.2. <a name='RequestPrdKeyBackup'></a>RequestPrdKeyBackup
| Attribute Name | Type | Option | Description |
|------------------------------------------|------------|--------|-----------------------------------------------------------------------------|
| prd | RequestPrd | | The PRD (Portable Request Document) request. |
| device_footprint_enc_by_sp_shared_secret | String | | The device footprint encrypted by a service provider's shared secret. |
| 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. |
### 8.3. <a name='RequestPrdKeyHello'></a>RequestPrdKeyHello
pub struct RequestPrdKeyHello {
pub prd: RequestPrd,
pub part_1_enc_hash_enc_by_sp_shared_secret: String,
}
### 8.4. <a name='RequestPrdList'></a>RequestPrdList
| Attribute Name | Type | Option | Description |
|----------------|------------|--------|-----------------------------------------|
| prd | RequestPrd | | Represents a Portable Request Document. |
### 8.5. <a name='RequestPrdMessage'></a>RequestPrdMessage
| Attribute Name | Type | Option | Description |
|----------------|------------|--------|-----------------------------------------|
| prd | RequestPrd | | Represents a Portable Request Document. |
### 8.6. <a name='RequestPrdList-1'></a>RequestPrdList
| Attribute Name | Type | Option | Description |
|----------------|------------|--------|-----------------------------------------|
| prd | RequestPrd | | Represents a Portable Request Document. |
### 8.7. <a name='RequestPrdResponse'></a>RequestPrdResponse
| Attribute Name | Type | Option | Description |
|----------------------------------------|-----------------------|--------|--------------------------------------------------------------|
| prd | RequestPrd | | Represents a Portable Request Document. |
| sig_value | String | | The signature value for the response. |
| pcd_origin_hash | Option<String> | Yes | Optional hash of the originating PCD. |
| 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. |
| certif_key_enc_by_shared_secret | Option<String> | Yes | Encrypted certification key, encrypted with a shared secret. |
| shared_secret_key | Option<KeyEncryption> | Yes | Optional encryption key used for shared secrets. |
### 8.8. <a name='RequestPrdUpdate'></a>RequestPrdUpdate
| Attribute Name | Type | Option | Description |
|--------------------------|-------------|--------|-----------------------------------------------|
| prd | RequestPrd | | Represents a Portable Request Document. |
| pcd_new_version_hash | String | | The hash of the new version of the PCD. |
| payment_pcd_hash_list | Vec<String> | | A list of hashes for payment-related PCDs. |
| cap_pcd_hash_list | Vec<String> | | A list of hashes for capability-related PCDs. |
| deposit_pcd_hash_list | Vec<String> | | A list of hashes for deposit-related PCDs. |
| commitment_pcd_hash_list | Vec<String> | | A list of hashes for commitment-related PCDs. |
| ask_payment_method | String | | The requested payment method. |
| ask_deposit_method | String | | The requested deposit method. |
| ask_commitment_method | String | | The requested commitment method. |
### 8.9. <a name='KeyRoleConfidential'></a>KeyRoleConfidential
### 8.10. <a name='RequestPrd'></a>RequestPrd
### 8.11. <a name='RoleArtefact'></a>RoleArtefact
### 8.12. <a name='Request'></a>Request
### 8.13. <a name='RoleDeposit'></a>RoleDeposit
### 8.14. <a name='RoleCommitment'></a>RoleCommitment
### 8.15. <a name='RoleMember'></a>RoleMember
### 8.16. <a name='RolePayment'></a>RolePayment
### 8.17. <a name='RoleProcess'></a>RoleProcess
### 8.18. <a name='Role'></a>Role
### 8.19. <a name='TransactionModeDistribution'></a>TransactionModeDistribution
### 8.20. <a name='TransactionModeDirect'></a>TransactionModeDirect
### 8.21. <a name='TransactionMode'></a>TransactionMode
### 8.22. <a name='RolesGroup'></a>RolesGroup
### 8.23. <a name='SharedProcess'></a>SharedProcess
### 8.24. <a name='SharedPeer'></a>SharedPeer
### 8.25. <a name='Relay'></a>Relay
### 8.26. <a name='L1Node'></a>L1Node
### 8.27. <a name='L1Miner'></a>L1Miner
### 8.28. <a name='L2Node'></a>L2Node
### 8.29. <a name='L2Certif'></a>L2Certif
### 8.30. <a name='SharedPeer-1'></a>SharedPeer
### 8.31. <a name='RolePeer'></a>RolePeer