Protocol Specification
How OCF records, the API, contracts, and poller fit.
System model
| Layer | Source | Responsibility |
|---|---|---|
| OCF records | ocf/schema and MongoDB | Offchain issuer, stakeholder, stock class, transaction, and support-record shapes. |
| API server | server/routes | Reads, metadata registration (/register-onchain), and optional server-signed /create automation. Product day-to-day writes are wallet-first. |
| Contracts | chain/src | Stores issuer, stock class, stakeholder, active position, and transaction state onchain. |
| Event poller | server/chain-operations/transactionPoller.ts | Syncs contract events back into MongoDB history records. |
Contract structs live in Structs Library; stock lifecycle behavior lives in Stock Functions.
Last updated on