Utility.Registry.Holding.V0.Holding

Templates

template Holding

Implementation of a transferable and fungible holding.

Signatory: registrar, owner, getLockers this

Field

Type

Description

operator

Party

Operator of the holding.

provider

Party

Provider of the holding.

registrar

Party

Registrar of the holding.

owner

Party

Owner of the holding.

instrument

InstrumentIdentifier

Instrument of the holding.

label

Text

Label of the holding.

amount

Decimal

Number of units of the holding.

lock

Optional 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

    Parties that restrict actions.

    context

    Text

    Context for the lock.

    observers

    Optional Parties

    Observers of the locked holding.

  • 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

    Party

    The new owner.

    newLabel

    Text

    The new label for the holding.

Data Types

data Holding\_Lock\_Result

Result of Holding_Lock.

Holding\_Lock\_Result

Field

Type

Description

holdingCid

ContractId Holding

Locked holding.

data Holding\_Merge\_Result

Result of a call to Holding_Merge.

Holding\_Merge\_Result

Field

Type

Description

holdingCid

ContractId Holding

The merged holding.

meta

Optional Metadata

Choice output metadata.

data Holding\_Split\_Result

Result of a call to Holding_Split.

Holding\_Split\_Result

Field

Type

Description

splitCids

[ContractId Holding]

The split holdings.

remaining

Optional (ContractId Holding)

The remaining holding (if any).

meta

Optional Metadata

Choice output metadata.

data Holding\_Transfer\_Result

Result of Holding_Transfer.

Holding\_Transfer\_Result

Field

Type

Description

holdingCid

ContractId Holding

Transferred holding.

data Holding\_Unlock\_Result

Result of Holding_Unlock.

Holding\_Unlock\_Result

Field

Type

Description

holdingCid

ContractId Holding

Unlocked holding.

meta

Optional Metadata

Choice output metadata.

data Lock

Locking details, representing parties that lock the contract and the context of the lock.

Lock

Field

Type

Description

lockers

Parties

Parties locking the contract.

context

Text

Reason for the lock held by the locking parties.

observers

Optional Parties

Observers of the locked holding.

Functions

isValidLock

: Optional Lock -> Bool

Validates a lock.

getLockers

: Holding -> Parties

Retrieves the lockers of a holding.

getLockObservers

mustBeUnlocked

: CanAssert m => Holding -> m ()

Asserts that the holding is unlocked.

mustBeLocked

: CanAssert m => Holding -> m ()

Asserts that the holding is locked.