ITangleOperators
Source: https://github.com/tangle-network/tnt-core/blob/main/src/interfaces/ITangleOperators.sol
ITangleOperators
Operator registration and management interface
Operator liveness is tracked via OperatorStatusRegistry heartbeats, not a setOperatorOnline call. Use submitHeartbeat/isOnline/getOperatorStatus on the registry for liveness signals.
Functions
preRegister
function preRegister(uint64 blueprintId) externalSignal intent to register for a blueprint
registerOperator
function registerOperator(uint64 blueprintId, bytes ecdsaPublicKey, string rpcAddress) externalRegister as operator for a blueprint
Parameters
| Name | Type | Description |
|---|---|---|
| blueprintId | uint64 | The blueprint to register for |
| ecdsaPublicKey | bytes | The ECDSA public key for gossip network identity This key is used for signing/verifying messages in the P2P gossip network and may differ from the wallet key (msg.sender) |
| rpcAddress | string | The operator’s RPC endpoint URL |
registerOperator
function registerOperator(uint64 blueprintId, bytes ecdsaPublicKey, string rpcAddress, bytes registrationInputs) externalRegister as operator providing blueprint-specific registration inputs
Parameters
| Name | Type | Description |
|---|---|---|
| blueprintId | uint64 | |
| ecdsaPublicKey | bytes | |
| rpcAddress | string | |
| registrationInputs | bytes | Encoded payload validated by blueprint’s schema |
unregisterOperator
function unregisterOperator(uint64 blueprintId) externalUnregister from a blueprint
updateOperatorPreferences
function updateOperatorPreferences(uint64 blueprintId, bytes ecdsaPublicKey, string rpcAddress) externalUpdate operator preferences for a blueprint
Parameters
| Name | Type | Description |
|---|---|---|
| blueprintId | uint64 | The blueprint to update preferences for |
| ecdsaPublicKey | bytes | New ECDSA public key (pass empty bytes to keep unchanged) |
| rpcAddress | string | New RPC endpoint (pass empty string to keep unchanged) |
getOperatorRegistration
function getOperatorRegistration(uint64 blueprintId, address operator) external view returns (struct Types.OperatorRegistration)Get operator registration for a blueprint
getOperatorPreferences
function getOperatorPreferences(uint64 blueprintId, address operator) external view returns (struct Types.OperatorPreferences)Get operator preferences for a blueprint (includes ECDSA public key)
getOperatorPublicKey
function getOperatorPublicKey(uint64 blueprintId, address operator) external view returns (bytes)Get operator’s ECDSA public key for gossip network identity
Returns the key used for signing/verifying gossip messages
isOperatorRegistered
function isOperatorRegistered(uint64 blueprintId, address operator) external view returns (bool)Check if operator is registered for a blueprint
Events
OperatorRegistered
event OperatorRegistered(uint64 blueprintId, address operator, bytes ecdsaPublicKey, string rpcAddress)Emitted when an operator registers for a blueprint
Parameters
| Name | Type | Description |
|---|---|---|
| blueprintId | uint64 | The blueprint ID |
| operator | address | The operator address (wallet) |
| ecdsaPublicKey | bytes | The ECDSA public key for gossip network identity |
| rpcAddress | string | The operator’s RPC endpoint |
OperatorUnregistered
event OperatorUnregistered(uint64 blueprintId, address operator)OperatorPreferencesUpdated
event OperatorPreferencesUpdated(uint64 blueprintId, address operator, bytes ecdsaPublicKey, string rpcAddress)Emitted when an operator updates their preferences
Parameters
| Name | Type | Description |
|---|---|---|
| blueprintId | uint64 | The blueprint ID |
| operator | address | The operator address |
| ecdsaPublicKey | bytes | The updated ECDSA public key (may be empty if unchanged) |
| rpcAddress | string | The updated RPC endpoint (may be empty if unchanged) |