Step 1 — Create the Project

Create a new .NET class library targeting the same framework as your ONODE:

terminal
dotnet new classlib -n MyNetworkOASIS
cd MyNetworkOASIS
dotnet add reference ../NextGenSoftware.OASIS.API.Core/NextGenSoftware.OASIS.API.Core.csproj

Step 2 — Implement OASISStorageProviderBase

Extend OASISStorageProviderBase (which implements the boilerplate of IOASISProvider) and override the methods your backend supports:

csharp
public class MyNetworkOASIS : OASISStorageProviderBase, IOASISStorageProvider
{
    public override EnumProviderType ProviderType =>
        EnumProviderType.Custom;

    public override string ProviderName => "MyNetworkOASIS";

    public override async Task<OASISResult<IAvatar>> SaveAvatarAsync(IAvatar avatar)
    {
        // write to your network / storage here
        var result = new OASISResult<IAvatar>();
        try {
            var saved = await _myClient.WriteAsync(avatar);
            result.Result = saved;
        } catch (Exception ex) {
            OASISErrorHandling.HandleError(ref result, ex.Message);
        }
        return result;
    }

    // implement LoadAvatarAsync, DeleteAvatarAsync, SaveHolonAsync, etc.
}

Step 3 — Register with the ONODE

In your ONODE's startup, register the provider before the kernel initialises:

csharp
OASISBootLoader.RegisterProvider(new MyNetworkOASIS(config));

Optional Capability Interfaces

InterfaceAdds capability
INFTOASISProviderNFT minting, transfer, query
IGeoSpatialOASISProviderGeoNFT and geospatial hotspot storage
IOASISNETProviderONET P2P network participation
IOASISBlockchainStorageProviderOn-chain data storage primitives
IOASISSmartContractProviderSmart contract deployment and interaction

The kernel checks for these interfaces at runtime — you only need to implement what your backend supports.

💡
Use an existing provider as a template

NextGenSoftware.OASIS.API.Providers.SQLiteOASIS is the simplest complete provider implementation in the repo — a good starting point for a new custom provider.