> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# Splice.Api.Token.AllocationRequestV2

> Reference documentation for Daml module Splice.Api.Token.AllocationRequestV2.

Daml module

# Splice.Api.Token.AllocationRequestV2

V2 of the AllocationRequest interface, which is used by applications

Daml

Module
Splice.Api.Token.AllocationRequestV2

Latest release
0.10.4

## 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`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010)

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`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)

Arguments:

**actors** `[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 that

can create an allocation matching this request.

**extraArgs** `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`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)

Arguments:

**actors** `[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 that

can create an allocation matching this request.

**extraArgs** `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`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)

Arguments:

**actors** `[Party]`

Set of parties executing the withdrawal.

Implementations MUST check these parties to avoid unauthorized withdrawal.

Implementations SHOULD allow the `settlement.executors` to jointly

call this choice.

**extraArgs** `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`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) -> \[`Party`]

#### Method `allocationRequest_acceptImpl`

Type: `ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Accept`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) -> `Update` [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)

#### Method `allocationRequest_rejectExtraObservers`

Type: [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) -> \[`Party`]

#### Method `allocationRequest_rejectImpl`

Type: `ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) -> `Update` [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)

#### Method `allocationRequest_withdrawExtraObservers`

Type: [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) -> \[`Party`]

#### Method `allocationRequest_withdrawImpl`

Type: `ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) -> `Update` [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)

## Data Types

### `data AllocationRequestAction`

Actions available on an allocation request.

Constructors:

* `ARA_Accept`

- `ARA_Reject`

* `ARA_Custom`

**id** `Text`

Identifier of the action. Namespaced analogously to metadata keys.

Used to represent app-specific actions on allocation requests.

Instances:

* instance `Eq` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189)
* instance `Ord` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189)
* instance `Show` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189)
* instance `GetField` `availableActions` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) (`Map` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189) \[\[`Party`]])
* instance `GetField` `id` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189) `Text`
* instance `SetField` `availableActions` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) (`Map` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189) \[\[`Party`]])
* instance `SetField` `id` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189) `Text`

### `data AllocationRequestView`

View of an `AllocationRequest`.

Constructors:

* `AllocationRequestView`

**originalRequestCid** `Optional (ContractId AllocationRequest)`

The contract id of the original allocation request contract, which is `None`

for the original allocation request itself.

This SHOULD be used by wallets to correlate the same allocation request across

updates to its state. It should not be used to correlate different allocation

requests for the same settlement. That can be done using the `settlement` field.

**settlement** `SettlementInfo`

Settlement for which allocations are requested to be created.

**allocations** `[AllocationSpecification]`

The allocations that are requested to be authorized for execution as

part of the settlement.

Wallets SHOULD check their `authorizer` to see whether this request

requires action from their users or merely serves informational

purposes.

**requestedAt** `Time`

Timestamp at which the request was created.

**settleAt** `Optional Time`

Timestamp at which the settlement is expected to be executed. The authorizer

SHOULD create their allocations before this time.

For iterated settlements, this is the expected time of the first iteration.

**availableActions** `Map AllocationRequestAction [[Party]]`

What actions are available to which groups of parties. The list of lists

is interpreted as a set of sets and represents a disjunction of

conjunctions of parties, i.e., each inner list represents a group of

parties 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 combinations

of action actors that could call a choice SHOULD be included.

**meta** `Metadata`

Additional metadata specific to the allocation request, used for extensibility.

Instances:

* instance `Eq` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010)
* instance `Show` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010)
* instance `HasFromAnyView` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010)
* instance `HasInterfaceView` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010)
* instance `GetField` `allocations` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) \[`AllocationSpecification`]
* instance `GetField` `availableActions` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) (`Map` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189) \[\[`Party`]])
* instance `GetField` `meta` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) `Metadata`
* instance `GetField` `originalRequestCid` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) (`Optional` (`ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785)))
* instance `GetField` `requestedAt` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) `Time`
* instance `GetField` `settleAt` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) (`Optional` `Time`)
* instance `GetField` `settlement` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) `SettlementInfo`
* instance `SetField` `allocations` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) \[`AllocationSpecification`]
* instance `SetField` `availableActions` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) (`Map` [`AllocationRequestAction`](#type-splice-api-token-allocationrequestv2-allocationrequestaction-94189) \[\[`Party`]])
* instance `SetField` `meta` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) `Metadata`
* instance `SetField` `originalRequestCid` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) (`Optional` (`ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785)))
* instance `SetField` `requestedAt` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) `Time`
* instance `SetField` `settleAt` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) (`Optional` `Time`)
* instance `SetField` `settlement` [`AllocationRequestView`](#type-splice-api-token-allocationrequestv2-allocationrequestview-55010) `SettlementInfo`

### `data AllocationRequest_AcceptResult`

The result of the `AllocationRequest_Accept` choice.

Constructors:

* `AllocationRequest_AcceptResult`

**meta** `Metadata`

Additional metadata specific to the result of accepting the allocation request, used for extensibility.

Instances:

* instance `Eq` [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)
* instance `Show` [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)
* instance `HasMethod` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) `allocationRequest_acceptImpl` (`ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Accept`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) -> `Update` [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636))
* instance `GetField` `meta` [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636) `Metadata`
* instance `SetField` `meta` [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636) `Metadata`
* instance `HasExercise` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Accept`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)
* instance `HasExerciseGuarded` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Accept`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)
* instance `HasFromAnyChoice` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Accept`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)
* instance `HasToAnyChoice` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Accept`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)

### `data AllocationRequest_RejectResult`

The result of the `AllocationRequest_Reject` choice.

Constructors:

* `AllocationRequest_RejectResult`

**meta** `Metadata`

Additional metadata specific to the result of rejecting the allocation request, used for extensibility.

Instances:

* instance `Eq` [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)
* instance `Show` [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)
* instance `HasMethod` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) `allocationRequest_rejectImpl` (`ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) -> `Update` [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801))
* instance `GetField` `meta` [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801) `Metadata`
* instance `SetField` `meta` [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801) `Metadata`
* instance `HasExercise` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)
* instance `HasExerciseGuarded` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)
* instance `HasFromAnyChoice` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)
* instance `HasToAnyChoice` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)

### `data AllocationRequest_WithdrawResult`

The result of the `AllocationRequest_Withdraw` choice.

Constructors:

* `AllocationRequest_WithdrawResult`

**meta** `Metadata`

Additional metadata specific to the result of withdrawing the allocation request, used for extensibility.

Instances:

* instance `Eq` [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)
* instance `Show` [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)
* instance `HasMethod` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) `allocationRequest_withdrawImpl` (`ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) -> `Update` [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796))
* instance `GetField` `meta` [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796) `Metadata`
* instance `SetField` `meta` [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796) `Metadata`
* instance `HasExercise` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)
* instance `HasExerciseGuarded` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)
* instance `HasFromAnyChoice` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)
* instance `HasToAnyChoice` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)

## Functions

### `allocationRequest_acceptImpl`

`allocationRequest_acceptImpl` : [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> `ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Accept`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) -> `Update` [`AllocationRequest_AcceptResult`](#type-splice-api-token-allocationrequestv2-allocationrequestacceptresult-50636)

### `allocationRequest_rejectImpl`

`allocationRequest_rejectImpl` : [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> `ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) -> `Update` [`AllocationRequest_RejectResult`](#type-splice-api-token-allocationrequestv2-allocationrequestrejectresult-42801)

### `allocationRequest_withdrawImpl`

`allocationRequest_withdrawImpl` : [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> `ContractId` [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) -> `Update` [`AllocationRequest_WithdrawResult`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdrawresult-84796)

### `allocationRequest_acceptExtraObservers`

`allocationRequest_acceptExtraObservers` : [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Accept`](#type-splice-api-token-allocationrequestv2-allocationrequestaccept-64401) -> \[`Party`]

### `allocationRequest_rejectExtraObservers`

`allocationRequest_rejectExtraObservers` : [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Reject`](#type-splice-api-token-allocationrequestv2-allocationrequestreject-6716) -> \[`Party`]

### `allocationRequest_withdrawExtraObservers`

`allocationRequest_withdrawExtraObservers` : [`AllocationRequest`](#type-splice-api-token-allocationrequestv2-allocationrequest-94785) -> [`AllocationRequest_Withdraw`](#type-splice-api-token-allocationrequestv2-allocationrequestwithdraw-15869) -> \[`Party`]
