Interface for registering and managing uniques

Functions

uniqueRegister

Registers a new unique token
function uniqueRegister(address code, bytes32 data, TokenStandard std, uint8 decimals, string memory symbol)
    external
    returns (uint64 id, Descriptor memory desc);
Parameters
NameTypeDescription
codeaddressAddress of the token contract
databytes32Hash of the associated matter
stdTokenStandardToken standard (e.g. ERC721)
decimalsuint8Number of decimals
symbolstringDisplay symbol (max 30 characters)
Returns
NameTypeDescription
iduint64ID of the new unique
descDescriptorDescriptor after registration

uniqueUpdate

Updates the data hash of a unique
function uniqueUpdate(uint64 id, bytes32 data) external returns (Descriptor memory desc);
Parameters
NameTypeDescription
iduint64Unique ID
databytes32New data hash
Returns
NameTypeDescription
descDescriptorUpdated descriptor

uniqueUpdate

Updates the data hash and symbol of a unique
function uniqueUpdate(uint64 id, bytes32 data, string memory symbol) external returns (Descriptor memory desc);
Parameters
NameTypeDescription
iduint64Unique ID
databytes32New data hash
symbolstringNew display symbol (max 30 characters)
Returns
NameTypeDescription
descDescriptorUpdated descriptor

uniqueUpgrade

Upgrades the kind and/or set revision of a unique
function uniqueUpgrade(uint64 id, uint32 kindRev, uint32 setRev) external returns (Descriptor memory desc);
Parameters
NameTypeDescription
iduint64Unique ID
kindRevuint32New kind revision (0 = no change)
setRevuint32New set revision (0 = no change)
Returns
NameTypeDescription
descDescriptorDescriptor after upgrade

uniqueTouch

Bumps the revision of a unique with no content change
function uniqueTouch(uint64 id) external returns (Descriptor memory desc);
Parameters
NameTypeDescription
iduint64Unique ID
Returns
NameTypeDescription
descDescriptorDescriptor after touch

uniqueTransfer

Transfers ownership of a unique token
function uniqueTransfer(uint64 id, address to) external returns (address from);
Parameters
NameTypeDescription
iduint64Unique ID
toaddressAddress of the new owner
Returns
NameTypeDescription
fromaddressAddress of the previous owner

uniqueRevision

Resolves and validates a revision
function uniqueRevision(uint64 id, uint32 rev0) external view returns (uint32 rev);
Parameters
NameTypeDescription
iduint64Unique ID
rev0uint32Requested revision (0 = latest)
Returns
NameTypeDescription
revuint32Resolved revision (0 = not found)

uniqueDescriptor

Returns the descriptor at a given revision
function uniqueDescriptor(uint64 id, uint32 rev0) external view returns (Descriptor memory desc);
Parameters
NameTypeDescription
iduint64Unique ID
rev0uint32Revision to query (0 = latest)
Returns
NameTypeDescription
descDescriptorDescriptor at the specified revision

uniqueSnapshot

Returns descriptor and elements at a specific revision
function uniqueSnapshot(uint64 id, uint32 rev0)
    external
    view
    returns (Descriptor memory desc, bytes32[] memory elems);
Parameters
NameTypeDescription
iduint64Unique ID
rev0uint32Revision to query (0 = latest)
Returns
NameTypeDescription
descDescriptorDescriptor at the revision
elemsbytes32[]Elements at the revision

uniqueOwner

Returns the current owner of a unique
function uniqueOwner(uint64 id) external view returns (address owner);
Parameters
NameTypeDescription
iduint64Unique ID
Returns
NameTypeDescription
owneraddressAddress of the current owner

uniqueSota

Returns the latest descriptor and current owner
function uniqueSota(uint64 id) external view returns (Descriptor memory desc, address owner);
Parameters
NameTypeDescription
iduint64Unique ID
Returns
NameTypeDescription
descDescriptorLatest descriptor
owneraddressAddress of the current owner

uniqueStatus

Checks whether all given uniques are active (revision > 0)
function uniqueStatus(uint64[] memory ids) external view returns (bool active);
Parameters
NameTypeDescription
idsuint64[]List of unique IDs
Returns
NameTypeDescription
activeboolTrue if all exist and are active

Events

UniqueRegistered

Emitted when a new unique is registered
event UniqueRegistered(uint64 id, Descriptor desc, address code, bytes32 data, TokenSpec spec, address owner);
Parameters
NameTypeDescription
iduint64Unique ID
descDescriptorDescriptor of the unique
codeaddressToken contract address
databytes32Hash of the underlying asset (e.g., image, model, metadata)
specTokenSpecToken specification (standard, decimals, and symbol)
owneraddressAddress of the initial owner

UniqueUpdated

Emitted when a unique is updated
event UniqueUpdated(uint64 id, Descriptor desc, bytes32 data, TokenSpec spec);
Parameters
NameTypeDescription
iduint64Unique ID
descDescriptorUpdated descriptor (same ID, new revision)
databytes32New data hash representing the updated asset
specTokenSpecUpdated or unchanged token specification

UniqueUpgraded

Emitted when a unique is upgraded to a new revision
event UniqueUpgraded(uint64 id, Descriptor desc);
Parameters
NameTypeDescription
iduint64Unique ID
descDescriptorDescriptor after the upgrade (revised kind/set refs)

UniqueTouched

Emitted when a unique is touched (revision bumped with no content change)
event UniqueTouched(uint64 id, Descriptor desc);
Parameters
NameTypeDescription
iduint64Unique ID
descDescriptorDescriptor after touch (updated revision only)

UniqueTransferred

Emitted when ownership of a unique is transferred
event UniqueTransferred(uint64 id, address from, address to);
Parameters
NameTypeDescription
iduint64Unique ID
fromaddressPrevious owner’s address
toaddressNew owner’s address