> ## 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.

# Splice.Testing.TokenStandard.RegistryApi

> Documentation for Splice.Testing.TokenStandard.RegistryApi

Support for using a token compliant registry API in tests.

These simulate the OpenAPI endpoints that would be served by the backend of the registry implementation.

## Typeclasses

<div id="class-splice-testing-tokenstandard-registryapi-registryapi-36771">
  **class** RegistryApi app **where**
</div>

> Type-class for simulating calls to the off-ledger API of a registry.
>
> The function names match the names of the handlers defined in the OpenAPI specification.
>
> <div id="function-splice-testing-tokenstandard-registryapi-gettransferfactory-16733">
>   getTransferFactory
>   : app -> TransferFactory\_Transfer -> Script (EnrichedFactoryChoice TransferFactory TransferFactory\_Transfer)
> </div>
>
> <div id="function-splice-testing-tokenstandard-registryapi-getallocationfactory-44546">
>   getAllocationFactory
>   : app -> AllocationFactory\_Allocate -> Script (EnrichedFactoryChoice AllocationFactory AllocationFactory\_Allocate)
> </div>
>
> <div id="function-splice-testing-tokenstandard-registryapi-getallocationtransfercontext-86176">
>   getAllocation\_TransferContext
>   : app -> [ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Allocation -> Metadata -> Script OpenApiChoiceContext
> </div>
>
> <div id="function-splice-testing-tokenstandard-registryapi-getallocationwithdrawcontext-92853">
>   getAllocation\_WithdrawContext
>   : app -> [ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Allocation -> Metadata -> Script OpenApiChoiceContext
> </div>
>
> <div id="function-splice-testing-tokenstandard-registryapi-getallocationcancelcontext-26663">
>   getAllocation\_CancelContext
>   : app -> [ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) Allocation -> Metadata -> Script OpenApiChoiceContext
> </div>
>
> <div id="function-splice-testing-tokenstandard-registryapi-gettransferinstructionacceptcontext-72301">
>   getTransferInstruction\_AcceptContext
>   : app -> [ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) TransferInstruction -> Metadata -> Script OpenApiChoiceContext
> </div>
>
> <div id="function-splice-testing-tokenstandard-registryapi-gettransferinstructionrejectcontext-89866">
>   getTransferInstruction\_RejectContext
>   : app -> [ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) TransferInstruction -> Metadata -> Script OpenApiChoiceContext
> </div>
>
> <div id="function-splice-testing-tokenstandard-registryapi-gettransferinstructionwithdrawcontext-233">
>   getTransferInstruction\_WithdrawContext
>   : app -> [ContractId](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-contractid-95282) TransferInstruction -> Metadata -> Script OpenApiChoiceContext
> </div>
>
> **instance** RegistryApi AmuletRegistry
