Numen Mainnet

EVM address

Contract
0xae0333b5e126dbfdeee80d40029680be229997b8
Mapped substrate accountnu6aQPVNMKhh1vvC6ZZi9iQfpKSyR2VJpH6R9w7Yeh124a6ntboth ways, balances live there
Status
Exact match
Compiler
solc 0.8.24+commit.e11b9ed9
Optimizer
200 runs
EVM version
istanbul
Contract
contracts/assets/object/NumenObjectRegistry.sol:NumenObjectRegistry
Verified
2d ago | 2026-11-29 18:32:37 (UTC)
Verifier
Creation tx
Creation code
contracts/assets/object/NumenObjectRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "../libraries/NumenAssetTypes.sol";

/**
 * @title NumenObjectRegistry
 * @notice Registry for digital / physical object references,
 *         3D models and optional spectral fingerprints used by
 *         the Numen Asset Protocol.
 *
 * @dev
 * IMPORTANT SEMANTIC BOUNDARY
 * -------------------------------------------------------------
 *
 * A Numen Object record is a technical record associated with
 * an object representation.
 *
 * Registration does NOT mean:
 *
 * - Numen verified that a physical object exists,
 * - Numen verified legal ownership,
 * - Numen verified authenticity,
 * - Numen verified manufacturer origin,
 * - Numen verified that a 3D model corresponds to a physical item.
 *
 * Those claims require separate attestation / document /
 * provenance mechanisms.
 *
 * SPECTRAL FINGERPRINT BOUNDARY
 * -------------------------------------------------------------
 *
 * spectralFingerprint in this registry is asset/object metadata.
 *
 * It is NOT:
 *
 * - a PoScan mining work hash,
 * - consensus state used to validate PoScan work,
 * - proof of physical authenticity.
 *
 * PoScan consensus and Asset/Object identity remain separate
 * protocol namespaces.
 */
contract NumenObjectRegistry {
    // =============================================================
    //                            ERRORS
    // =============================================================

    error ZeroAddress();

    error EmptyModelURI();

    error EmptyModelHash();

    error ObjectNotFound(
        bytes32 objectId
    );

    error ObjectAlreadyActive(
        bytes32 objectId
    );

    error ObjectAlreadyInactive(
        bytes32 objectId
    );

    error Unauthorized(
        address caller,
        bytes32 objectId
    );

    error SameController();

    error InvalidIndex();

    // =============================================================
    //                            EVENTS
    // =============================================================

    event ObjectRegistered(
        bytes32 indexed objectId,
        address indexed creator,
        address indexed controller,
        bytes32 modelHash,
        string modelURI,
        string modelFormat
    );

    event ObjectModelUpdated(
        bytes32 indexed objectId,
        bytes32 modelHash,
        string modelURI,
        string modelFormat,
        address indexed updatedBy
    );

    event ObjectSpectralFingerprintUpdated(
        bytes32 indexed objectId,
        bytes32 spectralFingerprint,
        string spectralAlgorithm,
        string spectralVersion,
        address indexed updatedBy
    );

    event ObjectMetadataUpdated(
        bytes32 indexed objectId,
        string metadataURI,
        bytes32 metadataHash,
        address indexed updatedBy
    );

    event ObjectControllerTransferred(
        bytes32 indexed objectId,
        address indexed previousController,
        address indexed newController
    );

    event ObjectDeactivated(
        bytes32 indexed objectId,
        address indexed updatedBy
    );

    event ObjectReactivated(
        bytes32 indexed objectId,
        address indexed updatedBy
    );

    // =============================================================
    //                            STRUCTS
    // =============================================================

    /**
     * @notice Request used when registering a new object.
     *
     * @dev
     * creator must equal msg.sender.
     *
     * controller may be a different address such as:
     *
     * - multisig,
     * - DAO,
     * - operational wallet.
     */
    struct RegisterObjectRequest {
        address creator;
        address controller;

        string modelURI;
        bytes32 modelHash;
        string modelFormat;

        bytes32 spectralFingerprint;
        string spectralAlgorithm;
        string spectralVersion;

        string metadataURI;
        bytes32 metadataHash;
    }

    /**
     * @notice Canonical object record.
     *
     * @dev
     * modelHash identifies the referenced model bytes.
     *
     * spectralFingerprint is optional. bytes32(0) means no
     * fingerprint is currently attached.
     *
     * Neither value constitutes physical authenticity proof.
     */
    struct ObjectRecord {
        bytes32 objectId;

        address creator;
        address controller;

        string modelURI;
        bytes32 modelHash;
        string modelFormat;

        bytes32 spectralFingerprint;
        string spectralAlgorithm;
        string spectralVersion;

        string metadataURI;
        bytes32 metadataHash;

        uint64 createdAt;
        uint64 updatedAt;

        bool active;
    }

    // =============================================================
    //                          CONSTANTS
    // =============================================================

    bytes32 private constant
        _OBJECT_REGISTRY_VERSION =
        keccak256(
            "NUMEN_OBJECT_REGISTRY_V1"
        );

    // =============================================================
    //                           STORAGE
    // =============================================================

    uint256 private _registrationNonce;

    mapping(
        bytes32 =>
            ObjectRecord
    )
        private _objects;

    mapping(
        bytes32 =>
            bool
    )
        private _objectExists;

    bytes32[]
        private _allObjectIds;

    mapping(
        address =>
            bytes32[]
    )
        private _creatorObjectIds;

    mapping(
        address =>
            bytes32[]
    )
        private _controllerObjectIds;

    mapping(
        bytes32 =>
            uint256
    )
        private _controllerObjectIndex;

    // =============================================================
    //                           VERSION
    // =============================================================

    function objectRegistryVersion()
        external
        pure
        returns (bytes32)
    {
        return
            _OBJECT_REGISTRY_VERSION;
    }

    // =============================================================
    //                      OBJECT REGISTRATION
    // =============================================================

    /**
     * @notice Registers a new object representation.
     *
     * @dev
     * Creator attribution is protected by requiring:
     *
     *     request.creator == msg.sender
     *
     * This proves only that the creator address initiated the
     * registration transaction.
     *
     * It does NOT prove the real-world identity of the caller or
     * authenticity of any physical object.
     */
    function registerObject(
        RegisterObjectRequest calldata request
    )
        external
        returns (
            bytes32 objectId
        )
    {
        if (
            request.creator ==
            address(0) ||
            request.controller ==
            address(0)
        ) {
            revert ZeroAddress();
        }

        if (
            request.creator !=
            msg.sender
        ) {
            revert Unauthorized(
                msg.sender,
                bytes32(0)
            );
        }

        if (
            bytes(
                request.modelURI
            ).length ==
            0
        ) {
            revert EmptyModelURI();
        }

        if (
            request.modelHash ==
            bytes32(0)
        ) {
            revert EmptyModelHash();
        }

        unchecked {
            ++_registrationNonce;
        }

        objectId =
            keccak256(
                abi.encode(
                    block.chainid,
                    address(this),
                    request.creator,
                    request.modelHash,
                    _registrationNonce
                )
            );

        uint64 timestamp =
            uint64(
                block.timestamp
            );

        _objects[
            objectId
        ] =
            ObjectRecord({
                objectId:
                    objectId,

                creator:
                    request.creator,

                controller:
                    request.controller,

                modelURI:
                    request.modelURI,

                modelHash:
                    request.modelHash,

                modelFormat:
                    request.modelFormat,

                spectralFingerprint:
                    request
                        .spectralFingerprint,

                spectralAlgorithm:
                    request
                        .spectralAlgorithm,

                spectralVersion:
                    request
                        .spectralVersion,

                metadataURI:
                    request.metadataURI,

                metadataHash:
                    request.metadataHash,

                createdAt:
                    timestamp,

                updatedAt:
                    timestamp,

                active:
                    true
            });

        _objectExists[
            objectId
        ] =
            true;

        _allObjectIds.push(
            objectId
        );

        _creatorObjectIds[
            request.creator
        ].push(
            objectId
        );

        _controllerObjectIndex[
            objectId
        ] =
            _controllerObjectIds[
                request.controller
            ].length;

        _controllerObjectIds[
            request.controller
        ].push(
            objectId
        );

        emit ObjectRegistered(
            objectId,
            request.creator,
            request.controller,
            request.modelHash,
            request.modelURI,
            request.modelFormat
        );
    }

    // =============================================================
    //                         MODEL UPDATE
    // =============================================================

    /**
     * @notice Updates the referenced 3D/digital model.
     *
     * @dev
     * Updating the model does not automatically update or clear
     * the spectral fingerprint.
     *
     * The controller must explicitly update the spectral
     * fingerprint when appropriate.
     *
     * This prevents the registry from pretending that it can
     * derive or verify spectral information on-chain.
     */
    function updateModel(
        bytes32 objectId,
        string calldata modelURI,
        bytes32 modelHash,
        string calldata modelFormat
    )
        external
    {
        _requireController(
            objectId
        );

        if (
            bytes(
                modelURI
            ).length ==
            0
        ) {
            revert EmptyModelURI();
        }

        if (
            modelHash ==
            bytes32(0)
        ) {
            revert EmptyModelHash();
        }

        ObjectRecord
            storage record =
            _objects[
                objectId
            ];

        record.modelURI =
            modelURI;

        record.modelHash =
            modelHash;

        record.modelFormat =
            modelFormat;

        record.updatedAt =
            uint64(
                block.timestamp
            );

        emit ObjectModelUpdated(
            objectId,
            modelHash,
            modelURI,
            modelFormat,
            msg.sender
        );
    }

    // =============================================================
    //                    SPECTRAL FINGERPRINT
    // =============================================================

    /**
     * @notice Sets or replaces the optional object spectral
     *         fingerprint.
     *
     * @dev
     * bytes32(0) may be used to clear the current fingerprint.
     *
     * spectralAlgorithm and spectralVersion describe how the
     * off-chain fingerprint was generated.
     *
     * Example:
     *
     * algorithm = "spectral3d"
     * version   = "asset-v1"
     *
     * This value MUST NOT be interpreted as the PoScan mining
     * work hash.
     */
    function updateSpectralFingerprint(
        bytes32 objectId,
        bytes32 spectralFingerprint,
        string calldata spectralAlgorithm,
        string calldata spectralVersion
    )
        external
    {
        _requireController(
            objectId
        );

        ObjectRecord
            storage record =
            _objects[
                objectId
            ];

        record.spectralFingerprint =
            spectralFingerprint;

        record.spectralAlgorithm =
            spectralAlgorithm;

        record.spectralVersion =
            spectralVersion;

        record.updatedAt =
            uint64(
                block.timestamp
            );

        emit ObjectSpectralFingerprintUpdated(
            objectId,
            spectralFingerprint,
            spectralAlgorithm,
            spectralVersion,
            msg.sender
        );
    }

    // =============================================================
    //                       METADATA UPDATE
    // =============================================================

    /**
     * @notice Updates optional object-level metadata.
     *
     * @dev
     * Metadata represents descriptive information or claims.
     * It is not automatically verified by the Numen network.
     */
    function updateMetadata(
        bytes32 objectId,
        string calldata metadataURI,
        bytes32 metadataHash
    )
        external
    {
        _requireController(
            objectId
        );

        ObjectRecord
            storage record =
            _objects[
                objectId
            ];

        record.metadataURI =
            metadataURI;

        record.metadataHash =
            metadataHash;

        record.updatedAt =
            uint64(
                block.timestamp
            );

        emit ObjectMetadataUpdated(
            objectId,
            metadataURI,
            metadataHash,
            msg.sender
        );
    }

    // =============================================================
    //                    CONTROLLER TRANSFER
    // =============================================================

    /**
     * @notice Transfers control of an object record.
     *
     * @dev
     * This changes protocol-level control of the object record.
     *
     * It does NOT itself prove or transfer legal ownership of a
     * physical object.
     */
    function transferObjectController(
        bytes32 objectId,
        address newController
    )
        external
    {
        _requireController(
            objectId
        );

        if (
            newController ==
            address(0)
        ) {
            revert ZeroAddress();
        }

        ObjectRecord
            storage record =
            _objects[
                objectId
            ];

        address previousController =
            record.controller;

        if (
            previousController ==
            newController
        ) {
            revert SameController();
        }

        _removeControllerObject(
            previousController,
            objectId
        );

        record.controller =
            newController;

        record.updatedAt =
            uint64(
                block.timestamp
            );

        _controllerObjectIndex[
            objectId
        ] =
            _controllerObjectIds[
                newController
            ].length;

        _controllerObjectIds[
            newController
        ].push(
            objectId
        );

        emit ObjectControllerTransferred(
            objectId,
            previousController,
            newController
        );
    }

    // =============================================================
    //                     ACTIVE / INACTIVE
    // =============================================================

    /**
     * @notice Deactivates an object record without deleting history.
     */
    function deactivateObject(
        bytes32 objectId
    )
        external
    {
        _requireController(
            objectId
        );

        ObjectRecord
            storage record =
            _objects[
                objectId
            ];

        if (
            !record.active
        ) {
            revert ObjectAlreadyInactive(
                objectId
            );
        }

        record.active =
            false;

        record.updatedAt =
            uint64(
                block.timestamp
            );

        emit ObjectDeactivated(
            objectId,
            msg.sender
        );
    }

    /**
     * @notice Reactivates a previously deactivated object.
     *
     * @dev
     * Reactivation must perform authorization separately because
     * _requireController() intentionally rejects inactive records.
     */
    function reactivateObject(
        bytes32 objectId
    )
        external
    {
        if (
            !_objectExists[
                objectId
            ]
        ) {
            revert ObjectNotFound(
                objectId
            );
        }

        ObjectRecord
            storage record =
            _objects[
                objectId
            ];

        if (
            record.controller !=
            msg.sender
        ) {
            revert Unauthorized(
                msg.sender,
                objectId
            );
        }

        if (
            record.active
        ) {
            revert ObjectAlreadyActive(
                objectId
            );
        }

        record.active =
            true;

        record.updatedAt =
            uint64(
                block.timestamp
            );

        emit ObjectReactivated(
            objectId,
            msg.sender
        );
    }

    // =============================================================
    //                           READS
    // =============================================================

    function objectExists(
        bytes32 objectId
    )
        external
        view
        returns (bool)
    {
        return
            _objectExists[
                objectId
            ];
    }

    function isObjectActive(
        bytes32 objectId
    )
        external
        view
        returns (bool)
    {
        if (
            !_objectExists[
                objectId
            ]
        ) {
            return false;
        }

        return
            _objects[
                objectId
            ].active;
    }

    function getObject(
        bytes32 objectId
    )
        external
        view
        returns (
            ObjectRecord memory
        )
    {
        if (
            !_objectExists[
                objectId
            ]
        ) {
            revert ObjectNotFound(
                objectId
            );
        }

        return
            _objects[
                objectId
            ];
    }

    // =============================================================
    //                      GLOBAL ENUMERATION
    // =============================================================

    function totalObjects()
        external
        view
        returns (uint256)
    {
        return
            _allObjectIds.length;
    }

    function objectIdAt(
        uint256 index
    )
        external
        view
        returns (bytes32)
    {
        if (
            index >=
            _allObjectIds.length
        ) {
            revert InvalidIndex();
        }

        return
            _allObjectIds[
                index
            ];
    }

    // =============================================================
    //                      CREATOR ENUMERATION
    // =============================================================

    function creatorObjectCount(
        address creator
    )
        external
        view
        returns (uint256)
    {
        return
            _creatorObjectIds[
                creator
            ].length;
    }

    function creatorObjectIdAt(
        address creator,
        uint256 index
    )
        external
        view
        returns (bytes32)
    {
        if (
            index >=
            _creatorObjectIds[
                creator
            ].length
        ) {
            revert InvalidIndex();
        }

        return
            _creatorObjectIds[
                creator
            ][
                index
            ];
    }

    // =============================================================
    //                     CONTROLLER ENUMERATION
    // =============================================================

    function controllerObjectCount(
        address controller
    )
        external
        view
        returns (uint256)
    {
        return
            _controllerObjectIds[
                controller
            ].length;
    }

    function controllerObjectIdAt(
        address controller,
        uint256 index
    )
        external
        view
        returns (bytes32)
    {
        if (
            index >=
            _controllerObjectIds[
                controller
            ].length
        ) {
            revert InvalidIndex();
        }

        return
            _controllerObjectIds[
                controller
            ][
                index
            ];
    }

    // =============================================================
    //                     INTERNAL AUTHORIZATION
    // =============================================================

    function _requireController(
        bytes32 objectId
    )
        internal
        view
    {
        if (
            !_objectExists[
                objectId
            ]
        ) {
            revert ObjectNotFound(
                objectId
            );
        }

        ObjectRecord
            storage record =
            _objects[
                objectId
            ];

        if (
            !record.active
        ) {
            revert ObjectAlreadyInactive(
                objectId
            );
        }

        if (
            record.controller !=
            msg.sender
        ) {
            revert Unauthorized(
                msg.sender,
                objectId
            );
        }
    }

    // =============================================================
    //                  INTERNAL ENUMERATION
    // =============================================================

    /**
     * @dev Removes an object from a controller-specific list using
     * swap-and-pop.
     *
     * Global and creator history are intentionally never removed.
     */
    function _removeControllerObject(
        address controller,
        bytes32 objectId
    )
        internal
    {
        uint256 index =
            _controllerObjectIndex[
                objectId
            ];

        uint256 lastIndex =
            _controllerObjectIds[
                controller
            ].length - 1;

        if (
            index !=
            lastIndex
        ) {
            bytes32 lastObjectId =
                _controllerObjectIds[
                    controller
                ][
                    lastIndex
                ];

            _controllerObjectIds[
                controller
            ][
                index
            ] =
                lastObjectId;

            _controllerObjectIndex[
                lastObjectId
            ] =
                index;
        }

        _controllerObjectIds[
            controller
        ].pop();

        delete
            _controllerObjectIndex[
                objectId
            ];
    }
}
contracts/assets/libraries/NumenAssetTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

/**
 * @title NumenAssetTypes
 * @notice Shared data types for the Numen Asset Protocol.
 *
 * @dev
 * This library defines the common vocabulary used by:
 *
 * - Fungible assets
 * - Non-fungible assets
 * - Real-world assets (RWA)
 * - Digital twins
 * - Physical / 3D-linked assets
 * - Product passports
 * - Certificates
 * - Collections
 * - Future Numen Object Registry integrations
 *
 * IMPORTANT:
 *
 * A physical or 3D association does NOT by itself prove authenticity,
 * legal ownership, provenance, or physical-world identity.
 *
 * Verification and attestation states must be represented separately.
 */
library NumenAssetTypes {
    // =============================================================
    //                           ASSET CLASS
    // =============================================================

    /**
     * @notice Fundamental economic class of an asset.
     */
    enum AssetClass {
        FUNGIBLE,
        NON_FUNGIBLE
    }

    // =============================================================
    //                         ASSET STANDARD
    // =============================================================

    /**
     * @notice Technical representation used by an asset.
     *
     * NONE is useful for registry records that are not themselves
     * represented by a token contract.
     */
    enum AssetStandard {
        NONE,
        ERC20,
        ERC721,
        ERC1155
    }

    // =============================================================
    //                          ASSET SCOPE
    // =============================================================

    /**
     * @notice Defines whether a registry record represents an entire
     * token contract / collection or one individual token ID.
     *
     * CONTRACT:
     * - ERC20 assets
     * - ERC721 collection-level records
     * - ERC1155 collection-level records
     *
     * TOKEN:
     * - Individual ERC721 tokens
     * - Individual ERC1155 token types
     *
     * Scope is part of canonical Numen asset identity.
     *
     * This makes the following two identities distinct:
     *
     * contract = 0xABC...
     * scope    = CONTRACT
     * tokenId  = 0
     *
     * and:
     *
     * contract = 0xABC...
     * scope    = TOKEN
     * tokenId  = 0
     *
     * This distinction is required because NFT token ID 0 is valid.
     */
    enum AssetScope {
        CONTRACT,
        TOKEN
    }

    // =============================================================
    //                        ASSET CATEGORY
    // =============================================================

    /**
     * @notice High-level semantic category of an asset.
     *
     * CUSTOM allows applications to provide a human-readable
     * category through metadata without requiring a protocol upgrade.
     */
    enum AssetCategory {
        UNSPECIFIED,
        CURRENCY,
        PAYMENT,
        UTILITY,
        GOVERNANCE,
        COMMUNITY,
        GAMING,
        COMMODITY,
        REAL_ESTATE,
        PRECIOUS_METAL,
        PRECIOUS_STONE,
        COLLECTIBLE,
        ARTWORK,
        CULTURAL_HERITAGE,
        PRODUCT,
        VEHICLE,
        MACHINERY,
        INTELLECTUAL_PROPERTY,
        MEDIA,
        CERTIFICATE,
        IDENTITY,
        FINANCIAL_ASSET,
        CUSTOM
    }

    // =============================================================
    //                      REPRESENTATION TYPE
    // =============================================================

    /**
     * @notice Describes what the on-chain asset represents.
     *
     * This is deliberately separate from AssetCategory.
     *
     * Example:
     *
     * category       = REAL_ESTATE
     * representation = FRACTIONAL_INTEREST
     */
    enum RepresentationType {
        UNSPECIFIED,
        DIGITAL_ASSET,
        PHYSICAL_REFERENCE,
        DIGITAL_TWIN,
        FRACTIONAL_INTEREST,
        OWNERSHIP_CLAIM,
        USAGE_RIGHT,
        REVENUE_RIGHT,
        CERTIFICATE,
        PRODUCT_PASSPORT,
        MEMBERSHIP,
        LICENSE,
        CUSTOM
    }

    // =============================================================
    //                         SUPPLY MODEL
    // =============================================================

    /**
     * @notice Supply policy for fungible or multi-token assets.
     */
    enum SupplyModel {
        NOT_APPLICABLE,
        FIXED,
        CAPPED,
        UNCAPPED
    }

    // =============================================================
    //                       PROPERTY VALUE TYPE
    // =============================================================

    /**
     * @notice Supported value types for extensible asset properties.
     *
     * Properties are intended for data such as:
     *
     * Weight      -> DECIMAL
     * Serial No.  -> TEXT
     * Certified   -> BOOLEAN
     * Manufacture -> DATE
     * Document    -> URI / HASH
     */
    enum PropertyValueType {
        TEXT,
        INTEGER,
        DECIMAL,
        BOOLEAN,
        DATE,
        URI,
        HASH,
        ADDRESS,
        BYTES
    }

    // =============================================================
    //                       ATTESTATION TYPE
    // =============================================================

    /**
     * @notice Semantic purpose of an attestation.
     *
     * An attestation means that an identifiable party made a claim.
     * It does not automatically make that claim true.
     */
    enum AttestationType {
        CUSTOM,
        ISSUER,
        MANUFACTURER,
        OWNERSHIP,
        ORIGIN,
        INSPECTION,
        APPRAISAL,
        CUSTODY,
        AUDIT,
        LEGAL,
        DOCUMENT,
        MODEL,
        SCAN
    }

    // =============================================================
    //                     VERIFICATION STATUS
    // =============================================================

    /**
     * @notice Generic lifecycle for an independently verifiable claim.
     */
    enum VerificationStatus {
        NONE,
        PENDING,
        VERIFIED,
        REJECTED,
        REVOKED,
        EXPIRED
    }

    // =============================================================
    //                       OBJECT LINK TYPE
    // =============================================================

    /**
     * @notice Relationship between an asset and an object record.
     *
     * Multiple assets may reference the same object.
     *
     * Example:
     *
     * Object
     *   ├── DIGITAL_TWIN       -> ERC721
     *   ├── FRACTIONALIZATION -> ERC20
     *   └── CERTIFICATE       -> ERC721
     */
    enum ObjectLinkType {
        UNSPECIFIED,
        PRIMARY,
        DIGITAL_TWIN,
        FRACTIONALIZATION,
        CERTIFICATE,
        OWNERSHIP,
        USAGE_RIGHT,
        PROVENANCE,
        CUSTOM
    }

    // =============================================================
    //                        ASSET IDENTITY
    // =============================================================

    /**
     * @notice Core registry identity for an asset.
     *
     * assetId:
     * Protocol-generated identifier.
     *
     * assetContract:
     * ERC20 / ERC721 / ERC1155 contract address when applicable.
     *
     * scope:
     * CONTRACT when the record represents the whole token contract
     * or collection.
     *
     * TOKEN when the record represents one specific ERC721 or
     * ERC1155 token ID.
     *
     * tokenId:
     * Must be 0 for CONTRACT-scoped records.
     *
     * For TOKEN-scoped ERC721 / ERC1155 records, this is the
     * corresponding token ID. Token ID 0 is valid and is distinct
     * from a CONTRACT-scoped record because scope is part of the
     * canonical identity.
     */
    struct AssetIdentity {
        bytes32 assetId;
        AssetClass assetClass;
        AssetStandard standard;
        AssetScope scope;
        AssetCategory category;
        RepresentationType representation;
        address assetContract;
        uint256 tokenId;
        address creator;
        uint64 createdAt;
    }

    // =============================================================
    //                         ASSET METADATA
    // =============================================================

    /**
     * @notice Human-readable and external metadata references.
     *
     * Large files and metadata should generally remain off-chain.
     * Hashes can be committed on-chain independently.
     */
    struct AssetMetadata {
        string name;
        string symbol;
        string description;
        string metadataURI;
        bytes32 metadataHash;
    }

    // =============================================================
    //                       CUSTOM PROPERTY
    // =============================================================

    /**
     * @notice Extensible property attached to an asset.
     *
     * The value is encoded as bytes so the registry can support
     * additional property semantics without redeploying every asset.
     *
     * Example:
     *
     * key       = keccak256("weight")
     * name      = "Weight"
     * valueType = DECIMAL
     * value     = abi.encode("1.75388")
     * unit      = "kg"
     */
    struct AssetProperty {
        bytes32 key;
        string name;
        PropertyValueType valueType;
        bytes value;
        string unit;
        address addedBy;
        uint64 createdAt;
        uint64 updatedAt;
    }

    // =============================================================
    //                         3D MODEL DATA
    // =============================================================

    /**
     * @notice Information about a digital 3D model associated
     * with an asset or object.
     *
     * modelHash commits to the exact model bytes.
     *
     * spectralFingerprint may reference a separately generated
     * asset-oriented geometric fingerprint.
     *
     * This MUST NOT be interpreted as the PoScan mining work hash
     * and MUST NOT by itself be represented as proof of physical
     * authenticity.
     */
    struct ModelData {
        string modelURI;
        bytes32 modelHash;
        bytes32 spectralFingerprint;
        string spectralVersion;
        address submittedBy;
        uint64 createdAt;
    }

    // =============================================================
    //                         OBJECT RECORD
    // =============================================================

    /**
     * @notice Registry record for an object that may later be
     * associated with one or more digital assets.
     *
     * objectId is a protocol-level identifier.
     *
     * The existence of an ObjectRecord means that an object record
     * exists on-chain. It does NOT automatically mean the physical
     * object has been independently authenticated.
     */
    struct ObjectRecord {
        bytes32 objectId;
        address creator;
        bytes32 primaryModelHash;
        bytes32 spectralFingerprint;
        string metadataURI;
        uint64 createdAt;
        bool active;
    }

    // =============================================================
    //                         OBJECT BINDING
    // =============================================================

    /**
     * @notice Relationship between an object and an asset.
     */
    struct ObjectBinding {
        bytes32 objectId;
        bytes32 assetId;
        ObjectLinkType linkType;
        address createdBy;
        uint64 createdAt;
        bool active;
    }

    // =============================================================
    //                          ATTESTATION
    // =============================================================

    /**
     * @notice Signed/registered claim made about an asset or object.
     *
     * subjectId may be an assetId or objectId depending on the
     * registry context.
     *
     * evidenceHash can commit to a report, certificate, scan,
     * inspection, legal document, or other evidence.
     */
    struct Attestation {
        bytes32 attestationId;
        bytes32 subjectId;
        AttestationType attestationType;
        address attester;
        bytes32 evidenceHash;
        string evidenceURI;
        VerificationStatus status;
        uint64 issuedAt;
        uint64 expiresAt;
    }

    // =============================================================
    //                           DOCUMENT
    // =============================================================

    /**
     * @notice Document reference associated with an asset or object.
     *
     * Sensitive documents do not need to expose their contents.
     * documentHash can be recorded without publishing documentURI.
     */
    struct DocumentReference {
        bytes32 documentId;
        bytes32 subjectId;
        string documentType;
        string documentURI;
        bytes32 documentHash;
        address submittedBy;
        uint64 createdAt;
    }

    // =============================================================
    //                         PROVENANCE
    // =============================================================

    /**
     * @notice Generic historical event for an asset or object.
     *
     * eventType is intentionally bytes32 so applications can define
     * additional event types without modifying this library.
     */
    struct ProvenanceEvent {
        bytes32 eventId;
        bytes32 subjectId;
        bytes32 eventType;
        address actor;
        bytes32 dataHash;
        string dataURI;
        uint64 timestamp;
    }

    // =============================================================
    //                     FUNGIBLE CONFIGURATION
    // =============================================================

    /**
     * @notice Configuration recorded for fungible assets.
     *
     * Feature flags describe the deployed asset's capabilities.
     * They do not themselves grant permissions.
     */
    struct FungibleConfig {
        SupplyModel supplyModel;
        uint8 decimals;
        uint256 initialSupply;
        uint256 maxSupply;
        bool mintable;
        bool burnable;
        bool pausable;
        bool permitEnabled;
        bool votesEnabled;
    }

    // =============================================================
    //                  NON-FUNGIBLE CONFIGURATION
    // =============================================================

    /**
     * @notice Configuration recorded for NFT / multi-token assets.
     */
    struct NonFungibleConfig {
        bool multiToken;
        bool burnable;
        bool pausable;
        bool enumerable;
        bool royaltyEnabled;
        uint96 royaltyBps;
        address royaltyReceiver;
    }
}
ABI
[
  {
    "name": "EmptyModelHash",
    "type": "error",
    "inputs": []
  },
  {
    "name": "EmptyModelURI",
    "type": "error",
    "inputs": []
  },
  {
    "name": "InvalidIndex",
    "type": "error",
    "inputs": []
  },
  {
    "name": "ObjectAlreadyActive",
    "type": "error",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "ObjectAlreadyInactive",
    "type": "error",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "ObjectNotFound",
    "type": "error",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "SameController",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Unauthorized",
    "type": "error",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "ZeroAddress",
    "type": "error",
    "inputs": []
  },
  {
    "name": "ObjectControllerTransferred",
    "type": "event",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "previousController",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "newController",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ObjectDeactivated",
    "type": "event",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ObjectMetadataUpdated",
    "type": "event",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "metadataURI",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "metadataHash",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ObjectModelUpdated",
    "type": "event",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "modelHash",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "modelURI",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "modelFormat",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ObjectReactivated",
    "type": "event",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ObjectRegistered",
    "type": "event",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "creator",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "controller",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "modelHash",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "modelURI",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "modelFormat",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ObjectSpectralFingerprintUpdated",
    "type": "event",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "spectralFingerprint",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      },
      {
        "name": "spectralAlgorithm",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "spectralVersion",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "controllerObjectCount",
    "type": "function",
    "inputs": [
      {
        "name": "controller",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "controllerObjectIdAt",
    "type": "function",
    "inputs": [
      {
        "name": "controller",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "index",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "creatorObjectCount",
    "type": "function",
    "inputs": [
      {
        "name": "creator",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "creatorObjectIdAt",
    "type": "function",
    "inputs": [
      {
        "name": "creator",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "index",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "deactivateObject",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "getObject",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "components": [
          {
            "name": "objectId",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "creator",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "controller",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "modelURI",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "modelHash",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "modelFormat",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "spectralFingerprint",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "spectralAlgorithm",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "spectralVersion",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "metadataURI",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "metadataHash",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "createdAt",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "updatedAt",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "active",
            "type": "bool",
            "internalType": "bool"
          }
        ],
        "internalType": "struct NumenObjectRegistry.ObjectRecord"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "isObjectActive",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "objectExists",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "objectIdAt",
    "type": "function",
    "inputs": [
      {
        "name": "index",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "objectRegistryVersion",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "name": "reactivateObject",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "registerObject",
    "type": "function",
    "inputs": [
      {
        "name": "request",
        "type": "tuple",
        "components": [
          {
            "name": "creator",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "controller",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "modelURI",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "modelHash",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "modelFormat",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "spectralFingerprint",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "spectralAlgorithm",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "spectralVersion",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "metadataURI",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "metadataHash",
            "type": "bytes32",
            "internalType": "bytes32"
          }
        ],
        "internalType": "struct NumenObjectRegistry.RegisterObjectRequest"
      }
    ],
    "outputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "totalObjects",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "transferObjectController",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "newController",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "updateMetadata",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "metadataURI",
        "type": "string",
        "internalType": "string"
      },
      {
        "name": "metadataHash",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "updateModel",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "modelURI",
        "type": "string",
        "internalType": "string"
      },
      {
        "name": "modelHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "modelFormat",
        "type": "string",
        "internalType": "string"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "updateSpectralFingerprint",
    "type": "function",
    "inputs": [
      {
        "name": "objectId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "spectralFingerprint",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "spectralAlgorithm",
        "type": "string",
        "internalType": "string"
      },
      {
        "name": "spectralVersion",
        "type": "string",
        "internalType": "string"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  }
]