SDO: Web 7.0 DID Method Open Multiple Inheritance (OMI) Model 0.12

Copyright © 2026 Michael Herman (Bindloss, Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public LicenseWeb 7.0™, TDW AgenticOS™ and Hyperonomy™ are trademarks of the Web 7.0 Foundation. All Rights Reserved.

Purpose

The goal of this model is enable a developer, on the spot, while coding his/her app, to model and immediately put to use any DID Ecosystem, DID Namespace, and/or DID Method they need (and as many as they want to) …and make the task as easy as defining a new database table or an object class for a new data store.

The Model

Pseudocode Example

Scroll down (or use Find) to locate the declaration and first use of MegaMethod()

using System;
using System.Collections.Generic;
using DIDID = System.String;
using DIDMETHODNAME = System.String;
namespace DIDMethodOpenInheritanceModel1
{
public class DIDDocument
{
DIDID? id { get; set; }
//
// Other properties of a DID Document would go here, such as public keys, authentication methods, service endpoints, etc.
//
}
public interface IDIDDocumentRegistry
{
Dictionary<DIDID, DIDDocument> DidDocuments { get; set; }
public bool RegIdWIthPublicKey(DIDID didobjectid, byte[] publicKey);
public DIDDocument GetDIDDocument(DIDID didobjectid);
public bool AddKey(DIDID didobjectid, byte[] newPublicKey, byte[] sender);
public bool RemoveKey(DIDID didobjectid, byte[] oldPublicKey, byte[] sender);
}
public interface IDIDMethod
{
DIDMETHODNAME? MethodName { get; set; }
IDIDDocumentRegistry? DidDocumentRegistry { get; set; }
void Initialize()
{
DefaultInitialize();
Console.WriteLine($"IDIDMethod Initialize function called. MethodName {MethodName}.");
}
void DefaultInitialize()
{
Console.WriteLine($"IDIDMethod (base class) DefaultInitialize function called. MethodName {MethodName}.");
}
}
public class DIDMethod : IDIDMethod
{
public string? MethodName { get; set; }
public IDIDDocumentRegistry? DidDocumentRegistry { get; set; }
public DIDMethod(DIDMETHODNAME didmethodname, IDIDDocumentRegistry diddocumentregistry)
{
MethodName = didmethodname;
DidDocumentRegistry = diddocumentregistry;
Console.WriteLine($"DIDMethod constructor called. Registry opened. MethodName {MethodName}");
}
public void Initialize()
{
// ((IDIDMethod)this).Initialize(); // endless recursion
((IDIDMethod)this).DefaultInitialize();
Console.WriteLine($"DIDMethod Initialize function called. MethodName {MethodName}.");
}
}
// DIDMethod Base Classes for key-based, DNS-based, fully decentralized DIDDocunentCollections
public class KeyBasedDIDMethod : DIDMethod
{
public KeyBasedDIDMethod(DIDMETHODNAME didmethodname, IDIDDocumentRegistry diddocumentregistry) : base(didmethodname, diddocumentregistry)
{
Console.WriteLine($"KeyBasedDIDMethod constructor called. Registry opened. MethodName {MethodName}");
}
public void Initialize()
{
base.Initialize();
Console.WriteLine($"KeyBasedDIDMethod Initialize function called. MethodName {MethodName}.");
}
}
public class DNSBasedDIDMethod : DIDMethod
{
public DNSBasedDIDMethod(DIDMETHODNAME didmethodname, IDIDDocumentRegistry diddocumentregistry) : base(didmethodname, diddocumentregistry)
{
Console.WriteLine($"DNSBasedDIDMethod constructor called. Registry opened. MethodName {MethodName}.");
}
virtual public void Initialize()
{
base.Initialize();
Console.WriteLine($"DNSBasedDIDMethod Initialize function called. MethodName {MethodName}.");
}
}
public class FullyDecentralizedDIDMethod : DIDMethod
{
public FullyDecentralizedDIDMethod(DIDMETHODNAME didmethodname, IDIDDocumentRegistry diddocumentregistry) : base(didmethodname, diddocumentregistry)
{
MethodName = didmethodname;
DidDocumentRegistry = diddocumentregistry;
Console.WriteLine($"FullyDecentralizedDIDMethod constructor called. Registry opened. MethodName {MethodName}.");
}
public virtual void Initialize()
{
base.Initialize();
Console.WriteLine($"FullyDecentralizedDIDMethod Initialize function called. MethodName {MethodName}.");
}
}
public class MegaDIDMethod : FullyDecentralizedDIDMethod, IDIDKeyRotation, IDIDRevocationList, IDIDEventHistoryLog, IDIDCelStuff
{
public MegaDIDMethod(DIDMETHODNAME didmethodname, IDIDDocumentRegistry diddocumentregistry) : base(didmethodname, diddocumentregistry)
{
Console.WriteLine($"MegaDIDMethod constructor called. Registry opened. MethodName {MethodName}");
}
public void Initialize()
{
Console.WriteLine($"MegaDIDMethod Initialize function called. MethodName {MethodName}.");
base.Initialize();
}
public bool DummyDIDCelFunction(string dobjectid)
{
throw new NotImplementedException();
}
public bool DummyRevokeDIDDocumentFunction(string didobjectid)
{
throw new NotImplementedException();
}
public bool DummyRotateKeysFunction(string didobjectid, string eventDescription)
{
throw new NotImplementedException();
}
public bool DummyUpdateEventHistoryLogFunction(string didobjectid, string eventDescription)
{
throw new NotImplementedException();
}
}
}

Sample Program

Sample Output

Leave a comment

Filed under Uncategorized

Leave a comment