Skip to main content

Splice.Api.Token.AllocationRequestV2

V2 of the AllocationRequest interface, which is used by applications to inform their users that they should create allocations for a specific settlement. Users may view and react to these requests using for example a token standard wallet or custom automation that uses the Ledger API directly.

Interfaces

Interface AllocationRequest

A request by an app for allocations to be created to enable the execution of a settlement. Apps MAY use one or more requests per settlement, depending on their needs and confidentiality requirements. Apps SHOULD have as contract observers both the owners and providers of all authorizer accounts that need to create requested allocations. View Type: AllocationRequestView Choices:

Choice AllocationRequest_Accept

Signal to settlement.executors that the requested allocations were or will be created. Wallets MAY call this choice in the same transaction as the creation of the requested allocations to protect from creating the same allocations multiple times. Apps MUST cleanup allocation requests independently of whether this choice is called, as there is no guarantee that the choice will be called. IMPORTANT: implementations MUST ensure that the allocation request is consumed by the body of this choice. Controllers: actors Returns: AllocationRequest_AcceptResult Arguments:
[Party]
Set of parties executing the acceptance.Implementations MUST check these parties to avoid unauthorized acceptance.Implementations SHOULD allow calling this choice for all parties thatcan create an allocation matching this request.
ExtraArgs
Additional context required in order to exercise the choice.

Choice AllocationRequest_Reject

Reject an allocation request to signal that no allocation will be created for it. The choice is nonconsuming to support alternative consumption patterns, e.g., by calling the consuming V1.AllocationRequest_Reject choice for transaction parsing compatibility. IMPORTANT: implementations MUST ensure that the allocation request is consumed by the body of this choice. Controllers: actors Returns: AllocationRequest_RejectResult Arguments:
[Party]
Set of parties executing the rejection.Implementations MUST check these parties to avoid unauthorized rejection.Implementations SHOULD allow calling this choice for all parties thatcan create an allocation matching this request.
ExtraArgs
Additional context required in order to exercise the choice.

Choice AllocationRequest_Withdraw

Withdraw an allocation request as the executors. The choice is nonconsuming to support alternative consumption patterns, e.g., by calling the consuming V1.AllocationRequest_Withdraw choice for transaction parsing compatibility. IMPORTANT: implementations MUST ensure that the allocation request is consumed by the body of this choice. Controllers: actors Returns: AllocationRequest_WithdrawResult Arguments:
[Party]
Set of parties executing the withdrawal.Implementations MUST check these parties to avoid unauthorized withdrawal.Implementations SHOULD allow the settlement.executors to jointlycall this choice.
ExtraArgs
Additional context required in order to exercise the choice.

Choice Archive

Controllers: Signatories of implementing template Returns: () Methods:

Method allocationRequest_acceptExtraObservers

Type: AllocationRequest_Accept -> [Party]

Method allocationRequest_acceptImpl

Type: ContractId AllocationRequest -> AllocationRequest_Accept -> Update AllocationRequest_AcceptResult

Method allocationRequest_rejectExtraObservers

Type: AllocationRequest_Reject -> [Party]

Method allocationRequest_rejectImpl

Type: ContractId AllocationRequest -> AllocationRequest_Reject -> Update AllocationRequest_RejectResult

Method allocationRequest_withdrawExtraObservers

Type: AllocationRequest_Withdraw -> [Party]

Method allocationRequest_withdrawImpl

Type: ContractId AllocationRequest -> AllocationRequest_Withdraw -> Update AllocationRequest_WithdrawResult

Data Types

data AllocationRequestAction

Actions available on an allocation request. Constructors:
  • ARA_Accept
  • ARA_Reject
  • ARA_Custom
Text
Identifier of the action. Namespaced analogously to metadata keys.
Used to represent app-specific actions on allocation requests. Instances:

data AllocationRequestView

View of an AllocationRequest. Constructors:
  • AllocationRequestView
Optional (ContractId AllocationRequest)
The contract id of the original allocation request contract, which is Nonefor the original allocation request itself.This SHOULD be used by wallets to correlate the same allocation request acrossupdates to its state. It should not be used to correlate different allocationrequests for the same settlement. That can be done using the settlement field.
SettlementInfo
Settlement for which allocations are requested to be created.
[AllocationSpecification]
The allocations that are requested to be authorized for execution aspart of the settlement.Wallets SHOULD check their authorizer to see whether this requestrequires action from their users or merely serves informationalpurposes.
Time
Timestamp at which the request was created.
Optional Time
Timestamp at which the settlement is expected to be executed. The authorizerSHOULD create their allocations before this time.For iterated settlements, this is the expected time of the first iteration.
Map AllocationRequestAction [[Party]]
What actions are available to which groups of parties. The list of listsis interpreted as a set of sets and represents a disjunction ofconjunctions of parties, i.e., each inner list represents a group ofparties that can act jointly to execute the action.This field can be used to inform wallet users whether they can take an action or not;and which other parties they might be waiting on to take their action.Supports multiple parties for actions that require joint authorization. All possible combinationsof action actors that could call a choice SHOULD be included.
Metadata
Additional metadata specific to the allocation request, used for extensibility.
Instances:

data AllocationRequest_AcceptResult

The result of the AllocationRequest_Accept choice. Constructors:
  • AllocationRequest_AcceptResult
Metadata
Additional metadata specific to the result of accepting the allocation request, used for extensibility.
Instances:

data AllocationRequest_RejectResult

The result of the AllocationRequest_Reject choice. Constructors:
  • AllocationRequest_RejectResult
Metadata
Additional metadata specific to the result of rejecting the allocation request, used for extensibility.
Instances:

data AllocationRequest_WithdrawResult

The result of the AllocationRequest_Withdraw choice. Constructors:
  • AllocationRequest_WithdrawResult
Metadata
Additional metadata specific to the result of withdrawing the allocation request, used for extensibility.
Instances:

Functions

allocationRequest_acceptImpl

allocationRequest_acceptImpl : AllocationRequest -> ContractId AllocationRequest -> AllocationRequest_Accept -> Update AllocationRequest_AcceptResult

allocationRequest_rejectImpl

allocationRequest_rejectImpl : AllocationRequest -> ContractId AllocationRequest -> AllocationRequest_Reject -> Update AllocationRequest_RejectResult

allocationRequest_withdrawImpl

allocationRequest_withdrawImpl : AllocationRequest -> ContractId AllocationRequest -> AllocationRequest_Withdraw -> Update AllocationRequest_WithdrawResult

allocationRequest_acceptExtraObservers

allocationRequest_acceptExtraObservers : AllocationRequest -> AllocationRequest_Accept -> [Party]

allocationRequest_rejectExtraObservers

allocationRequest_rejectExtraObservers : AllocationRequest -> AllocationRequest_Reject -> [Party]

allocationRequest_withdrawExtraObservers

allocationRequest_withdrawExtraObservers : AllocationRequest -> AllocationRequest_Withdraw -> [Party]