Utility.Registry.Holding.V0.Holding
Templates
template Holding
Implementation of a transferable and fungible holding.
Signatory: registrar, owner, getLockers this
Field
Type
Description
operator
Operator of the holding.
provider
Provider of the holding.
registrar
Registrar of the holding.
owner
Owner of the holding.
instrument
Instrument of the holding.
label
Label of the holding.
amount
Number of units of the holding.
lock
Optional lock for the holding.
Choice Archive
Controller: registrar, owner, getLockers this
Returns: ()
(no fields)
Choice Holding_Lock
Locks this holding, restricting further actions.
Controller: registrar, owner, lockers
Returns: Holding_Lock_Result
Field
Type
Description
lockers
Parties that restrict actions.
context
Context for the lock.
Choice Holding_Merge
Merges this holding with multiple other holdings into a single consolidated holding.
Controller: registrar
Returns: Holding_Merge_Result
Field
Type
Description
holdingCids
The holdings to merge.
Choice Holding_Split
Splits this holding into smaller holdings based on specified amounts.
Controller: registrar
Returns: Holding_Split_Result
Field
Type
Description
amounts
[Decimal]
The quantities to split the holding by.
Choice Holding_Transfer
Transfers ownership of the this holding to a new owner within the same registrar.
Controller: registrar, owner, newOwner
Returns: Holding_Transfer_Result
Field
Type
Description
newOwner
The new owner.
newLabel
The new label for the holding.
Choice Holding_Unlock
Unlocks this holding.
Controller: getLockers this
Returns: Holding_Unlock_Result
(no fields)
Data Types
data Holding_Lock_Result
Result of
Holding_Lock
.
Field
Type
Description
holdingCid
Locked holding.
data Holding_Merge_Result
Result of a call to
Holding_Merge
.
Field
Type
Description
holdingCid
The merged holding.
data Holding_Split_Result
Result of a call to
Holding_Split
.
Field
Type
Description
splitCids
The split holdings.
remaining
The remaining holding (if any).
Result of
Holding_Transfer
.
Field
Type
Description
holdingCid
Transferred holding.
Result of
Holding_Unlock
.
Field
Type
Description
holdingCid
Unlocked holding.
data Lock
Functions
- isValidLock
-
Validates a lock.
- getLockers
-
Retrieves the lockers of a holding.
- mustBeUnlocked
: CanAssert m => Holding -> m ()
Asserts that the holding is unlocked.
- mustBeLocked
: CanAssert m => Holding -> m ()
Asserts that the holding is locked.