BuildapireferenceITangleBlueprints

ITangleBlueprints

Source: https://github.com/tangle-network/tnt-core/blob/main/src/interfaces/ITangleBlueprints.sol

ITangleBlueprints

Blueprint management interface

Functions

createBlueprint

function createBlueprint(struct Types.BlueprintDefinition definition) external returns (uint64 blueprintId)

Create a blueprint from an encoded definition that includes schemas and job metadata

Parameters
NameTypeDescription
definitionstruct Types.BlueprintDefinitionFully populated blueprint definition struct
Return Values
NameTypeDescription
blueprintIduint64The new blueprint ID

updateBlueprint

function updateBlueprint(uint64 blueprintId, string metadataUri) external

Update blueprint metadata

transferBlueprint

function transferBlueprint(uint64 blueprintId, address newOwner) external

Transfer blueprint ownership

deactivateBlueprint

function deactivateBlueprint(uint64 blueprintId) external

Deactivate a blueprint

getBlueprint

function getBlueprint(uint64 blueprintId) external view returns (struct Types.Blueprint)

Get blueprint info

getBlueprintConfig

function getBlueprintConfig(uint64 blueprintId) external view returns (struct Types.BlueprintConfig)

Get blueprint configuration

blueprintOperatorCount

function blueprintOperatorCount(uint64 blueprintId) external view returns (uint256)

Get number of operators for a blueprint

blueprintCount

function blueprintCount() external view returns (uint64)

Get current blueprint count

getBlueprintDefinition

function getBlueprintDefinition(uint64 blueprintId) external view returns (struct Types.BlueprintDefinition definition)

Get the original blueprint definition

blueprintMetadata

function blueprintMetadata(uint64 blueprintId) external view returns (struct Types.BlueprintMetadata metadata, string metadataUri)

Get blueprint metadata and URI

blueprintSources

function blueprintSources(uint64 blueprintId) external view returns (struct Types.BlueprintSource[] sources)

Get blueprint sources

blueprintSupportedMemberships

function blueprintSupportedMemberships(uint64 blueprintId) external view returns (enum Types.MembershipModel[] memberships)

Get blueprint supported membership models

blueprintMasterRevision

function blueprintMasterRevision(uint64 blueprintId) external view returns (uint32)

Get master blueprint revision

Events

BlueprintCreated

event BlueprintCreated(uint64 blueprintId, address owner, address manager, string metadataUri)

BlueprintUpdated

event BlueprintUpdated(uint64 blueprintId, string metadataUri)

BlueprintTransferred

event BlueprintTransferred(uint64 blueprintId, address from, address to)

BlueprintDeactivated

event BlueprintDeactivated(uint64 blueprintId)