{ "$schema":              "https://json-schema.org/draft/2020-12/schema",
  "$id":                  "https://schemas.mpai.community/MMM4/V2.2/data/Wallet.json",
  "title":                "Wallet V2.2", 
  "type":                 "object", 
  "additionalProperties": false, 
  "properties":           {

    "Header":             { "type": "string", "pattern": "^MMM-WAL-V[0-9]{1,2}[.][0-9]{1,2}$" },
    "MInstanceID":        { "type": "string" },
    "MEnvironmentID":     { "type": "string" },
    "WalletID":           { "type": "string" },
    "WalletTime":         { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/Time.json" },
    "AccountID":          { "type": "string" },

    "Assets":             { "type": "array", "items": { "oneOf": [
                          { "type": "object", "additionalProperties": false, "required": [ "Asset" ], "properties": { 
      "Asset":            { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Asset.json" } } },
                          { "type": "object", "additionalProperties": false, "required": [ "AssetID" ], "properties": { 
      "AssetID":          { "type": "string" } } } ] } },

    "Licences":           { "type": "array", "items": { "oneOf": [
                          { "type": "object", "additionalProperties": false, "required": [ "Licence" ], "properties": { 
      "Licence":          { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Licence.json" } } },
                          { "type": "object", "additionalProperties": false, "required": [ "LicenceID" ], "properties": { 
      "LicenceID":        { "type": "string" } } } ] } },

    "Rights":             { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Right.json#/properties/Rights" },

    "Transactions":       { "type": "array", "items": { "oneOf": [
                          { "type": "object", "additionalProperties": false, "required": [ "Transaction" ], "properties": { 
      "Transaction": { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Transaction.json" } } },
                          { "type": "object", "additionalProperties": false, "required": [ "TransactionID" ], "properties": { 
      "TransactionID": { "type": "string" } } } ] } },

    "Value":              { "type": "array", "items": { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Value.json" } },

    "CryptographicKeys":  { "type": "array", "items": { "type": "object", "additionalProperties": false,
                            "required": [ "KeyID", "Type", "PublicKey" ], "properties": {
      "KeyID":            { "type": "string" },
      "Type":             { "type": "string" },
      "PublicKey":        { "type": "string" } } } },

    "DataXMData":         { "$ref": "https://schemas.mpai.community/PTF/V1.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":      { "type": "string", "maxLength": 2048 } } }