UniqueIdentifier

constructor(externalId: String? = null, id: UUID = UUID.randomUUID())

Parameters

externalId

Any existing weak identifier such as trade reference ID. This should be set here the first time a UniqueIdentifier is created as part of state issuance, or ledger on-boarding activity. This ensure that the human readable identity is paired with the strong ID.

id

Should never be set by user code and left as default initialised. So that the first time a state is issued this should be given a new UUID. Subsequent copies and evolutions of a state should just copy the externalId and id fields unmodified.