Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEntityName ¶
GetEntityName extracts the entity name from a template ID. Template IDs are in the format "#packageID:moduleName:entityName" or "moduleName:entityName".
func MarshalTemplateToRecord ¶
func MarshalTemplateToRecord(v model.CreateCommander) *apiv2.Record
func UnmarshalActiveContract ¶
func UnmarshalActiveContract[T any](ac *apiv2.GetActiveContractsResponse_ActiveContract) (*T, error)
UnmarshalActiveContract unmarshalls a Canton ActiveContract response into a typed DAML binding struct. This provides type-safe access to contract fields instead of manual string-based field parsing.
Example usage:
mcmsContract, err := UnmarshalActiveContract[mcms.MCMS](activeContract)
if err != nil {
return err
}
// Now use type-safe fields: mcmsContract.McmsId, mcmsContract.Config.Signers, etc.
func UnmarshalCreatedEvent ¶
func UnmarshalCreatedEvent[T any](event *apiv2.CreatedEvent) (*T, error)
UnmarshalCreatedEvent unmarshalls a CreatedEvent into a typed DAML binding struct. This is useful when you have a CreatedEvent directly (e.g., from transaction events).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.