Splice.Testing.TokenStandard.RegistryApi
A representation of the V1 off-ledger registry API of a token standard V1 compatible asset registry.
Typeclasses
class RegistryApi app where
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.
- getTransferFactory
: app -> TransferFactory_Transfer -> Script (EnrichedFactoryChoice TransferFactory TransferFactory_Transfer)
- getAllocationFactory
: app -> AllocationFactory_Allocate -> Script (EnrichedFactoryChoice AllocationFactory AllocationFactory_Allocate)
- getAllocation_TransferContext
: app -> ContractId Allocation -> Metadata -> Script OpenApiChoiceContext
- getAllocation_WithdrawContext
: app -> ContractId Allocation -> Metadata -> Script OpenApiChoiceContext
- getAllocationInstruction_WithdrawContext
: app -> ContractId AllocationInstruction -> Metadata -> Script OpenApiChoiceContext
- getAllocation_CancelContext
: app -> ContractId Allocation -> Metadata -> Script OpenApiChoiceContext
- getTransferInstruction_AcceptContext
: app -> ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext
- getTransferInstruction_RejectContext
: app -> ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext
- getTransferInstruction_WithdrawContext
: app -> ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext
instance RegistryApi AmuletRegistry
instance RegistryApi TestTokenV1Registry
instance RegistryApi GenericRegistry
Data Types
data GenericRegistry
Generic type to hold any registry implementation, used for testing multi-registry scenarios.
List all functiions explicitly instead of capturing the type-class dictionary, as Daml does not support existential types.
TODO(tech-debt): define registries directly as an instance of this type.
Field
Type
Description
ggetTransferFactory
TransferFactory_Transfer -> Script (EnrichedFactoryChoice TransferFactory TransferFactory_Transfer)
ggetAllocationFactory
AllocationFactory_Allocate -> Script (EnrichedFactoryChoice AllocationFactory AllocationFactory_Allocate)
ggetAllocation_TransferContext
ContractId Allocation -> Metadata -> Script OpenApiChoiceContext
ggetAllocation_WithdrawContext
ContractId Allocation -> Metadata -> Script OpenApiChoiceContext
ggetAllocationInstruction_WithdrawContext
ContractId AllocationInstruction -> Metadata -> Script OpenApiChoiceContext
ggetAllocation_CancelContext
ContractId Allocation -> Metadata -> Script OpenApiChoiceContext
ggetTransferInstruction_AcceptContext
ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext
ggetTransferInstruction_RejectContext
ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext
ggetTransferInstruction_WithdrawContext
ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext
instance RegistryApi GenericRegistry
instance GetField "ggetAllocationFactory" GenericRegistry (AllocationFactory_Allocate -> Script (EnrichedFactoryChoice AllocationFactory AllocationFactory_Allocate))
instance GetField "ggetAllocationInstruction_WithdrawContext" GenericRegistry (ContractId AllocationInstruction -> Metadata -> Script OpenApiChoiceContext)
instance GetField "ggetAllocation_CancelContext" GenericRegistry (ContractId Allocation -> Metadata -> Script OpenApiChoiceContext)
instance GetField "ggetAllocation_TransferContext" GenericRegistry (ContractId Allocation -> Metadata -> Script OpenApiChoiceContext)
instance GetField "ggetAllocation_WithdrawContext" GenericRegistry (ContractId Allocation -> Metadata -> Script OpenApiChoiceContext)
instance GetField "ggetTransferFactory" GenericRegistry (TransferFactory_Transfer -> Script (EnrichedFactoryChoice TransferFactory TransferFactory_Transfer))
instance GetField "ggetTransferInstruction_AcceptContext" GenericRegistry (ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext)
instance GetField "ggetTransferInstruction_RejectContext" GenericRegistry (ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext)
instance GetField "ggetTransferInstruction_WithdrawContext" GenericRegistry (ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext)
instance SetField "ggetAllocationFactory" GenericRegistry (AllocationFactory_Allocate -> Script (EnrichedFactoryChoice AllocationFactory AllocationFactory_Allocate))
instance SetField "ggetAllocationInstruction_WithdrawContext" GenericRegistry (ContractId AllocationInstruction -> Metadata -> Script OpenApiChoiceContext)
instance SetField "ggetAllocation_CancelContext" GenericRegistry (ContractId Allocation -> Metadata -> Script OpenApiChoiceContext)
instance SetField "ggetAllocation_TransferContext" GenericRegistry (ContractId Allocation -> Metadata -> Script OpenApiChoiceContext)
instance SetField "ggetAllocation_WithdrawContext" GenericRegistry (ContractId Allocation -> Metadata -> Script OpenApiChoiceContext)
instance SetField "ggetTransferFactory" GenericRegistry (TransferFactory_Transfer -> Script (EnrichedFactoryChoice TransferFactory TransferFactory_Transfer))
instance SetField "ggetTransferInstruction_AcceptContext" GenericRegistry (ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext)
instance SetField "ggetTransferInstruction_RejectContext" GenericRegistry (ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext)
instance SetField "ggetTransferInstruction_WithdrawContext" GenericRegistry (ContractId TransferInstruction -> Metadata -> Script OpenApiChoiceContext)
Functions
- mkGenericRegistry
: RegistryApi app => app -> GenericRegistry
Create a ‘GenericRegistry’ from any specific registry implementation.
Comments