Centrifuge Configuration
No appsettings.json section — networks are compiled-in, and here's how registration works
appsettings.json section for this node. Unlike some other chain nodes, Centrifuge's RPC endpoints and SS58 prefixes are compiled-in constants in CentrifugeNetworks — there is nothing to set in application configuration, and no DefaultNetwork fallback. See Networks for the fixed list.
Registration
CentrifugeDependency.RegisterDefaults(services) registers everything the node needs:
- Stateless helpers, as singletons:
SS58AddressHelper,UnitConversionHelper,InterestRateHelper - The Substrate JSON-RPC client (
ISubstrateRpcClient→SubstrateRpcClient), registered viaAddHttpClientwith a 30-second timeout - Per-resource services, scoped:
ICentrifugeUtilityService,ICentrifugeAccountService - The executor itself, scoped (
CentrifugeNodeExecutor) - The
ExecutorRegistryentry forcentrifuge
services.AddDependencies_Centrifuge();
services.RegisterNodeExecutor<CentrifugeNodeExecutor>();
new CentrifugeDependency().RegisterDefaults(services); to your
node-plugin bootstrap (Plugins_RegisterAllNodes(...) in
ServiceCollectionExtensionsForAI.cs). An assembly that is only
ProjectReference'd but never force-loaded is not guaranteed to appear in
AppDomain.CurrentDomain.GetAssemblies() when executor auto-discovery runs — without
both the reference and this line, the node type won't appear in the workflow designer.
Project Layout
The node ships as three .NET 9 projects:
| Project | Responsibility |
|---|---|
BizFirst.Integration.Centrifuge.Domain |
Result records, error codes, network and currency descriptors. Zero project references, zero NuGet packages. |
BizFirst.Integration.Centrifuge.Services |
The Substrate JSON-RPC client, storage-key derivation, and the account/utility service implementations. |
BizFirst.Ai.ExecutionNodes.Centrifuge |
The executor: operation routing, config parsing, operation-info DTOs, one feature file per {resource}/{operation}. |
Dependencies
The Services project takes exactly one third-party package: Portable.BouncyCastle, used for the
Blake2b-512 digest that SS58 checksums require (not available in the .NET BCL). Everything else — Base58 encoding,
SCALE decoding, xxHash64/twox128 storage-key derivation — is implemented in-repo rather than pulled from a package,
since each is small enough that a dependency would cost more in verification than it saves.
Testing
48 unit tests cover the Domain and Services layers: SS58 address encoding/decoding (including the well-known "Alice" test vector), unit conversion (including the 1012 magnitude guard), interest-rate conversion, and SCALE codec parsing. Executor-level (ExecutionNode project) tests have not been written yet — see Roadmap.