> ## 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.Testing.Registries.AmuletRegistry

> Documentation for Splice.Testing.Registries.AmuletRegistry

Daml script functions for initializing and using an amulet registry via the token standard and the amulet specific functions.

## Data Types

**data** AmuletRegistry

> A reference to a mock amulet registry. Use it via the the token standard functions provided by the "Splice.Testing.RegistryApi" module and type-class; or via the amulet specific functions exported from this module.
>
> AmuletRegistry
>
> > | Field | Type | Description |
> > | - | - | - |
> > | dso | [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) | |
> > | instrumentId | InstrumentId | |
>
> **instance** RegistryApi AmuletRegistry
>
> **instance** [Eq](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-eq-22713) AmuletRegistry
>
> **instance** [Ord](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-ord-6395) AmuletRegistry
>
> **instance** [Show](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-show-show-65360) AmuletRegistry
>
> **instance** GetField "dso" AmuletRegistry [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932)
>
> **instance** GetField "instrumentId" AmuletRegistry InstrumentId
>
> **instance** GetField "registry" AllocatedOTCTrade AmuletRegistry
>
> **instance** GetField "registry" TestSetup AmuletRegistry
>
> **instance** SetField "dso" AmuletRegistry [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932)
>
> **instance** SetField "instrumentId" AmuletRegistry InstrumentId
>
> **instance** SetField "registry" AllocatedOTCTrade AmuletRegistry
>
> **instance** SetField "registry" TestSetup AmuletRegistry

**data** AmuletRegistryConfig

> AmuletRegistryConfig
>
> > | Field | Type | Description |
> > | - | - | - |
> > | initialAmuletPrice | [Decimal](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-decimal-18135) | |
> > | demoTime | [Time](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-time-63886) | |
> > | dsoPartyName | [Text](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-text-51952) | |
>
> **instance** [Eq](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-classes-eq-22713) AmuletRegistryConfig
>
> **instance** [Show](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#class-ghc-show-show-65360) AmuletRegistryConfig
>
> **instance** GetField "demoTime" AmuletRegistryConfig [Time](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-time-63886)
>
> **instance** GetField "dsoPartyName" AmuletRegistryConfig [Text](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-text-51952)
>
> **instance** GetField "initialAmuletPrice" AmuletRegistryConfig [Decimal](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-decimal-18135)
>
> **instance** SetField "demoTime" AmuletRegistryConfig [Time](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-time-63886)
>
> **instance** SetField "dsoPartyName" AmuletRegistryConfig [Text](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-text-51952)
>
> **instance** SetField "initialAmuletPrice" AmuletRegistryConfig [Decimal](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-decimal-18135)

## Functions

defaultAmuletRegistryConfig
: AmuletRegistryConfig

Recommended default configuration for setting up the mock amulet registry.

initialize
: AmuletRegistryConfig -> Script AmuletRegistry

Initialize the mock amulet registry.

tapFaucet
: AmuletRegistry -> [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> [Decimal](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-decimal-18135) -> Script ([ContractId](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-contractid-95282) Holding)

Tap the faucet on DevNet to get a specified amount of Amulet.

createLockedAmulet
: AmuletRegistry -> [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> [Decimal](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-decimal-18135) -> TimeLock -> Script ([ContractId](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-contractid-95282) Holding)

Direct-create locked amulet -- used for testing purposes only.

createTransferPreapproval
: AmuletRegistry -> [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> [Time](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-time-63886) -> Script ([ContractId](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-contractid-95282) TransferPreapproval)

Simulate that a validator operator created a transfer pre-approval for a party for the purpose of that party being able to receive Amulet from any other party.

featureApp
: AmuletRegistry -> [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> Script ([ContractId](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-contractid-95282) FeaturedAppRight)

Mark a particular registry provider part as featured.

beneficiariesToMetadata
: \[([Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932), [Decimal](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-decimal-18135))] -> Metadata

Encode a list of beneficiaries as metadata to pass in via token standard choices. Currently only supported for allocation execution.

expireLockAsOwner
: AmuletRegistry -> [ContractId](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-contractid-95282) Holding -> Script ([ContractId](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-contractid-95282) Holding)

tapLockedAndUnlockedFunds
: AmuletRegistry -> [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> [Decimal](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-decimal-18135) -> Script \[[ContractId](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-contractid-95282) Holding]

Get funds in equal splits as locked and unlocked holdings to test using expired locked holdings as transfer inputs.

advanceToNextRoundChange
: [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> Script ()

Advance time to next round change

getActiveOpenRoundsSorted
: [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> Script \[([ContractId](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-contractid-95282) OpenMiningRound, OpenMiningRound)]

convertAllFeaturedAppActivityMarkers
: [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> Script ()

runNextIssuance
: [Party](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-da-internal-lf-party-57932) -> [Decimal](https://docs.canton.network/appdev/reference/daml-standard-library/prelude.md#type-ghc-types-decimal-18135) -> Script ()
