Documentation ¶
Overview ¶
DONTCOVER nolint
DONTCOVER nolint
Index ¶
Constants ¶
View Source
const (
ModuleName = "docs"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { UUID string `json:"uuid"` Metadata DocumentMetadata `json:"metadata"` ContentURI string `json:"content_uri"` // Optional Checksum *DocumentChecksum `json:"checksum"` // Optional EncryptionData *DocumentEncryptionData `json:"encryption_data"` // Optional }
type DocumentChecksum ¶
type DocumentEncryptionData ¶
type DocumentEncryptionData struct { Keys []DocumentEncryptionKey `json:"keys"` // contains the keys used to encrypt the data EncryptedData []string `json:"encrypted_data"` // contains the list of data that have been encrypted }
type DocumentEncryptionKey ¶
type DocumentEncryptionKey struct { Recipient sdk.AccAddress `json:"recipient"` // Recipient that should use this data Value string `json:"value"` // Value of the key that should be used. This is encrypted with the recipient's public key }
type DocumentMetadata ¶
type DocumentMetadata struct { ContentURI string `json:"content_uri"` SchemaType string `json:"schema_type"` // Optional - Either this or schema must be defined Schema *DocumentMetadataSchema `json:"schema"` // Optional - Either this or schema_type must be defined }
type DocumentMetadataSchema ¶
type DocumentReceipt ¶
type DocumentReceipt struct { Sender sdk.AccAddress `json:"sender"` Recipient sdk.AccAddress `json:"recipient"` TxHash string `json:"tx_hash"` DocumentUUID string `json:"document_uuid"` Proof string `json:"proof"` }
type GenesisState ¶
type GenesisState struct { UsersData []UserDocumentsData `json:"users_data"` SupportedMetadataSchemes []MetadataSchema `json:"supported_metadata_schemes"` TrustedMetadataSchemaProposers []sdk.AccAddress `json:"trusted_metadata_schema_proposers"` }
v1.2.0 docs genesis state
func Migrate ¶
func Migrate(oldGenState v110docs.GenesisState) GenesisState
Migrate accepts exported genesis state from v1.1.0 and migrates it to v1.2.0 genesis state. This migration changes the data that are saved for each document removing the metadata proof
type MetadataSchema ¶ added in v1.3.0
type UserDocumentsData ¶
type UserDocumentsData struct { User sdk.AccAddress `json:"user"` SentDocuments []Document `json:"sent_documents"` ReceivedDocuments []Document `json:"received_documents"` SentReceipts []DocumentReceipt `json:"sent_receipts"` ReceivedReceipts []DocumentReceipt `json:"received_receipts"` }
Click to show internal directories.
Click to hide internal directories.