Skip to main content
Interfaces to enable wallets to instruct the registry to create allocations.

Interfaces

interface AllocationFactory
Contracts implementing AllocationFactory are retrieved from the registry app and are used by the wallet to create allocation instructions (or allocations directly). viewtype AllocationFactoryView
  • Choice AllocationFactory_Allocate
    Generic choice for the sender’s wallet to request the allocation of assets to a specific leg of a settlement. It depends on the registry whether this results in the allocation being created directly or in an allocation instruction being created instead. Controller: (DA.Internal.Record.getField @“sender” (DA.Internal.Record.getField @“transferLeg” allocation)) Returns: AllocationInstructionResult
  • Choice AllocationFactory_PublicFetch
    Controller: actor Returns: AllocationFactoryView
  • Choice Archive Controller: Signatories of implementing template Returns: () (no fields)
  • Method allocationFactory_allocateImpl : ContractId AllocationFactory -> AllocationFactory_Allocate -> Update AllocationInstructionResult
  • Method allocationFactory_publicFetchImpl : ContractId AllocationFactory -> AllocationFactory_PublicFetch -> Update AllocationFactoryView
interface AllocationInstruction
An interface for tracking the status of an allocation instruction, i.e., a request to a registry app to create an allocation. Registries MAY evolve the allocation instruction in multiple steps. They SHOULD do so using only the choices on this interface, so that wallets can reliably parse the transaction history and determine whether the creation of the allocation ultimately succeeded or failed. viewtype AllocationInstructionView
  • Choice AllocationInstruction_Update
    Update the state of the allocation instruction. Used by the registry to execute registry internal workflow steps that advance the state of the allocation instruction. A reason may be communicated via the metadata. Controller: (DA.Internal.Record.getField @“admin” (DA.Internal.Record.getField @“instrumentId” (DA.Internal.Record.getField @“transferLeg” (DA.Internal.Record.getField @“allocation” (view this))))), extraActors Returns: AllocationInstructionResult
  • Choice AllocationInstruction_Withdraw
    Withdraw the allocation instruction as the sender. Controller: (DA.Internal.Record.getField @“sender” (DA.Internal.Record.getField @“transferLeg” (DA.Internal.Record.getField @“allocation” (view this)))) Returns: AllocationInstructionResult
  • Choice Archive Controller: Signatories of implementing template Returns: () (no fields)
  • Method allocationInstruction_updateImpl : ContractId AllocationInstruction -> AllocationInstruction_Update -> Update AllocationInstructionResult
  • Method allocationInstruction_withdrawImpl : ContractId AllocationInstruction -> AllocationInstruction_Withdraw -> Update AllocationInstructionResult

Data Types

data AllocationFactoryView
View for AllocationFactory.
AllocationFactoryView
instance Eq AllocationFactoryView instance Show AllocationFactoryView instance HasMethod AllocationFactory “allocationFactory_publicFetchImpl” (ContractId AllocationFactory -> AllocationFactory_PublicFetch -> Update AllocationFactoryView) instance HasFromAnyView AllocationFactory AllocationFactoryView instance HasInterfaceView AllocationFactory AllocationFactoryView instance GetField “admin” AllocationFactoryView Party instance GetField “meta” AllocationFactoryView Metadata instance SetField “admin” AllocationFactoryView Party instance SetField “meta” AllocationFactoryView Metadata instance HasExercise AllocationFactory AllocationFactory_PublicFetch AllocationFactoryView instance HasExerciseGuarded AllocationFactory AllocationFactory_PublicFetch AllocationFactoryView instance HasFromAnyChoice AllocationFactory AllocationFactory_PublicFetch AllocationFactoryView instance HasToAnyChoice AllocationFactory AllocationFactory_PublicFetch AllocationFactoryView
data AllocationInstructionResult
The result of instructing an allocation or advancing the state of an allocation instruction.
AllocationInstructionResult
instance Eq AllocationInstructionResult instance Show AllocationInstructionResult instance HasMethod AllocationFactory “allocationFactory_allocateImpl” (ContractId AllocationFactory -> AllocationFactory_Allocate -> Update AllocationInstructionResult) instance HasMethod AllocationInstruction “allocationInstruction_updateImpl” (ContractId AllocationInstruction -> AllocationInstruction_Update -> Update AllocationInstructionResult) instance HasMethod AllocationInstruction “allocationInstruction_withdrawImpl” (ContractId AllocationInstruction -> AllocationInstruction_Withdraw -> Update AllocationInstructionResult) instance GetField “meta” AllocationInstructionResult Metadata instance GetField “output” AllocationInstructionResult AllocationInstructionResult_Output instance GetField “senderChangeCids” AllocationInstructionResult [ContractId Holding] instance SetField “meta” AllocationInstructionResult Metadata instance SetField “output” AllocationInstructionResult AllocationInstructionResult_Output instance SetField “senderChangeCids” AllocationInstructionResult [ContractId Holding] instance HasExercise AllocationFactory AllocationFactory_Allocate AllocationInstructionResult instance HasExercise AllocationInstruction AllocationInstruction_Update AllocationInstructionResult instance HasExercise AllocationInstruction AllocationInstruction_Withdraw AllocationInstructionResult instance HasExerciseGuarded AllocationFactory AllocationFactory_Allocate AllocationInstructionResult instance HasExerciseGuarded AllocationInstruction AllocationInstruction_Update AllocationInstructionResult instance HasExerciseGuarded AllocationInstruction AllocationInstruction_Withdraw AllocationInstructionResult instance HasFromAnyChoice AllocationFactory AllocationFactory_Allocate AllocationInstructionResult instance HasFromAnyChoice AllocationInstruction AllocationInstruction_Update AllocationInstructionResult instance HasFromAnyChoice AllocationInstruction AllocationInstruction_Withdraw AllocationInstructionResult instance HasToAnyChoice AllocationFactory AllocationFactory_Allocate AllocationInstructionResult instance HasToAnyChoice AllocationInstruction AllocationInstruction_Update AllocationInstructionResult instance HasToAnyChoice AllocationInstruction AllocationInstruction_Withdraw AllocationInstructionResult
data AllocationInstructionResult_Output
The output of instructing an allocation or advancing the state of an allocation instruction.
AllocationInstructionResult_Pending
Use this result to communicate that the creation of the allocation is pending further steps.
AllocationInstructionResult_Completed
Use this result to communicate that the allocation was created.
AllocationInstructionResult_Failed
Use this result to communicate that the creation of the allocation did not succeed and all holdings reserved for funding the allocation have been released.
instance Eq AllocationInstructionResult_Output instance Show AllocationInstructionResult_Output instance GetField “allocationCid” AllocationInstructionResult_Output (ContractId Allocation) instance GetField “allocationInstructionCid” AllocationInstructionResult_Output (ContractId AllocationInstruction) instance GetField “output” AllocationInstructionResult AllocationInstructionResult_Output instance SetField “allocationCid” AllocationInstructionResult_Output (ContractId Allocation) instance SetField “allocationInstructionCid” AllocationInstructionResult_Output (ContractId AllocationInstruction) instance SetField “output” AllocationInstructionResult AllocationInstructionResult_Output
data AllocationInstructionView
View for AllocationInstruction.
AllocationInstructionView
instance Eq AllocationInstructionView instance Show AllocationInstructionView instance HasFromAnyView AllocationInstruction AllocationInstructionView instance HasInterfaceView AllocationInstruction AllocationInstructionView instance GetField “allocation” AllocationInstructionView AllocationSpecification instance GetField “inputHoldingCids” AllocationInstructionView [ContractId Holding] instance GetField “meta” AllocationInstructionView Metadata instance GetField “originalInstructionCid” AllocationInstructionView (Optional (ContractId AllocationInstruction)) instance GetField “pendingActions” AllocationInstructionView (Map Party Text) instance GetField “requestedAt” AllocationInstructionView Time instance SetField “allocation” AllocationInstructionView AllocationSpecification instance SetField “inputHoldingCids” AllocationInstructionView [ContractId Holding] instance SetField “meta” AllocationInstructionView Metadata instance SetField “originalInstructionCid” AllocationInstructionView (Optional (ContractId AllocationInstruction)) instance SetField “pendingActions” AllocationInstructionView (Map Party Text) instance SetField “requestedAt” AllocationInstructionView Time

Functions

allocationInstruction_withdrawImpl : AllocationInstruction -> ContractId AllocationInstruction -> AllocationInstruction_Withdraw -> Update AllocationInstructionResult
allocationInstruction_updateImpl : AllocationInstruction -> ContractId AllocationInstruction -> AllocationInstruction_Update -> Update AllocationInstructionResult
allocationFactory_allocateImpl : AllocationFactory -> ContractId AllocationFactory -> AllocationFactory_Allocate -> Update AllocationInstructionResult
allocationFactory_publicFetchImpl : AllocationFactory -> ContractId AllocationFactory -> AllocationFactory_PublicFetch -> Update AllocationFactoryView