api

package
v0.0.0-...-346157b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageName = "mcms-api"
	PackageID   = "674d8f60de56afd32698ae19516260217c73dd9ed082680fa840ede4b7665240"
	SDKVersion  = "3.4.11"
)
View Source
const (
	ZeroHash      = types.TEXT("0000000000000000000000000000000000000000000000000000000000000000")
	NumGroups     = types.INT64(32)
	MaxNumSigners = types.INT64(200)
)

Variables

This section is empty.

Functions

func IMCMSReceiverInterfaceID

func IMCMSReceiverInterfaceID() string

IMCMSReceiverInterfaceID returns the interface ID for the IMCMSReceiver interface using the package name

func IMCMSReceiverInterfaceIDWithPackageID

func IMCMSReceiverInterfaceIDWithPackageID(packageID string) string

IMCMSReceiverInterfaceIDWithPackageID returns the interface ID using the provided package ID instead of package name

Types

type APSetConfig

type APSetConfig struct {
	ApSigners      []SignerInfo  `json:"apSigners"`
	ApGroupQuorums []types.INT64 `json:"apGroupQuorums" hex:"[]uint32"`
	ApGroupParents []types.INT64 `json:"apGroupParents" hex:"[]uint32"`
	ApClearRoot    types.BOOL    `json:"apClearRoot"`
}

APSetConfig is a Record type

func (APSetConfig) MarshalHex

func (t APSetConfig) MarshalHex() (string, error)

MarshalHex encodes APSetConfig to hex string (Canton MCMS format)

func (APSetConfig) MarshalJSON

func (t APSetConfig) MarshalJSON() ([]byte, error)

func (APSetConfig) ToMap

func (t APSetConfig) ToMap() map[string]any

ToMap converts APSetConfig to a map for DAML arguments

func (*APSetConfig) UnmarshalHex

func (t *APSetConfig) UnmarshalHex(data string) error

UnmarshalHex decodes APSetConfig from hex string (Canton MCMS format)

func (*APSetConfig) UnmarshalJSON

func (t *APSetConfig) UnmarshalJSON(data []byte) error

type AdminParams

type AdminParams struct {
	APSetConfig *APSetConfig `json:"AP_SetConfig,omitempty"`
	APClearRoot *types.UNIT  `json:"AP_ClearRoot,omitempty"`
}

AdminParams is a variant/union type

func (AdminParams) GetVariantTag

func (v AdminParams) GetVariantTag() string

GetVariantTag implements types.VARIANT interface

func (AdminParams) GetVariantValue

func (v AdminParams) GetVariantValue() any

GetVariantValue implements types.VARIANT interface

func (AdminParams) MarshalHex

func (v AdminParams) MarshalHex() (string, error)

MarshalHex encodes AdminParams to hex string (Canton MCMS format)

func (AdminParams) MarshalJSON

func (v AdminParams) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshaling for AdminParams

func (*AdminParams) UnmarshalHex

func (v *AdminParams) UnmarshalHex(data string) error

UnmarshalHex decodes AdminParams from hex string (Canton MCMS format)

func (*AdminParams) UnmarshalJSON

func (v *AdminParams) UnmarshalJSON(data []byte) error

UnmarshalJSON implements custom JSON unmarshalling for AdminParams

type ArgValue

type ArgValue struct {
	AVText  *types.TEXT      `json:"AV_Text,omitempty"`
	AVInt   *types.INT64     `json:"AV_Int,omitempty"`
	AVBool  *types.BOOL      `json:"AV_Bool,omitempty"`
	AVParty *types.PARTY     `json:"AV_Party,omitempty"`
	AVTime  *types.TIMESTAMP `json:"AV_Time,omitempty"`
}

ArgValue is a variant/union type

func (ArgValue) GetVariantTag

func (v ArgValue) GetVariantTag() string

GetVariantTag implements types.VARIANT interface

func (ArgValue) GetVariantValue

func (v ArgValue) GetVariantValue() any

GetVariantValue implements types.VARIANT interface

func (ArgValue) MarshalHex

func (v ArgValue) MarshalHex() (string, error)

MarshalHex encodes ArgValue to hex string (Canton MCMS format)

func (ArgValue) MarshalJSON

func (v ArgValue) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshaling for ArgValue

func (*ArgValue) UnmarshalHex

func (v *ArgValue) UnmarshalHex(data string) error

UnmarshalHex decodes ArgValue from hex string (Canton MCMS format)

func (*ArgValue) UnmarshalJSON

func (v *ArgValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements custom JSON unmarshalling for ArgValue

type BlockedFunction

type BlockedFunction struct {
	TargetInstanceAddress types.TEXT `json:"targetInstanceAddress"`
	FunctionName          types.TEXT `json:"functionName"`
}

BlockedFunction is a Record type

func (BlockedFunction) MarshalHex

func (t BlockedFunction) MarshalHex() (string, error)

MarshalHex encodes BlockedFunction to hex string (Canton MCMS format)

func (BlockedFunction) MarshalJSON

func (t BlockedFunction) MarshalJSON() ([]byte, error)

func (BlockedFunction) ToMap

func (t BlockedFunction) ToMap() map[string]any

ToMap converts BlockedFunction to a map for DAML arguments

func (*BlockedFunction) UnmarshalHex

func (t *BlockedFunction) UnmarshalHex(data string) error

UnmarshalHex decodes BlockedFunction from hex string (Canton MCMS format)

func (*BlockedFunction) UnmarshalJSON

func (t *BlockedFunction) UnmarshalJSON(data []byte) error

type BypasserExecuteBatchParams

type BypasserExecuteBatchParams struct {
	Calls []TimelockCall `json:"calls"`
}

BypasserExecuteBatchParams is a Record type

func (BypasserExecuteBatchParams) MarshalHex

func (t BypasserExecuteBatchParams) MarshalHex() (string, error)

MarshalHex encodes BypasserExecuteBatchParams to hex string (Canton MCMS format)

func (BypasserExecuteBatchParams) MarshalJSON

func (t BypasserExecuteBatchParams) MarshalJSON() ([]byte, error)

func (BypasserExecuteBatchParams) ToMap

func (t BypasserExecuteBatchParams) ToMap() map[string]any

ToMap converts BypasserExecuteBatchParams to a map for DAML arguments

func (*BypasserExecuteBatchParams) UnmarshalHex

func (t *BypasserExecuteBatchParams) UnmarshalHex(data string) error

UnmarshalHex decodes BypasserExecuteBatchParams from hex string (Canton MCMS format)

func (*BypasserExecuteBatchParams) UnmarshalJSON

func (t *BypasserExecuteBatchParams) UnmarshalJSON(data []byte) error

type CancelBatchParams

type CancelBatchParams struct {
	OpId types.TEXT `json:"opId"`
}

CancelBatchParams is a Record type

func (CancelBatchParams) MarshalHex

func (t CancelBatchParams) MarshalHex() (string, error)

MarshalHex encodes CancelBatchParams to hex string (Canton MCMS format)

func (CancelBatchParams) MarshalJSON

func (t CancelBatchParams) MarshalJSON() ([]byte, error)

func (CancelBatchParams) ToMap

func (t CancelBatchParams) ToMap() map[string]any

ToMap converts CancelBatchParams to a map for DAML arguments

func (*CancelBatchParams) UnmarshalHex

func (t *CancelBatchParams) UnmarshalHex(data string) error

UnmarshalHex decodes CancelBatchParams from hex string (Canton MCMS format)

func (*CancelBatchParams) UnmarshalJSON

func (t *CancelBatchParams) UnmarshalJSON(data []byte) error

type Contract

type Contract struct {
	// contains filtered or unexported fields
}

Contract wraps template operations with Sui-style API access. Use NewContract to create instances, then call Encoder() for encoding methods.

func NewContract

func NewContract(packageID, moduleName, templateName string) *Contract

NewContract creates a Contract with encoder for the given template. This provides Sui-style API: contract.Encoder().Method(args)

func (*Contract) Encoder

func (c *Contract) Encoder() MCMSEncoder

Encoder returns the encoder for Sui-style contract.Encoder().Method() usage.

type ExpiringRoot

type ExpiringRoot struct {
	Root       types.TEXT      `json:"root" hex:"bytes"`
	ValidUntil types.TIMESTAMP `json:"validUntil"`
	OpCount    types.INT64     `json:"opCount"`
}

ExpiringRoot is a Record type

func (ExpiringRoot) MarshalHex

func (t ExpiringRoot) MarshalHex() (string, error)

MarshalHex encodes ExpiringRoot to hex string (Canton MCMS format)

func (ExpiringRoot) MarshalJSON

func (t ExpiringRoot) MarshalJSON() ([]byte, error)

func (ExpiringRoot) ToMap

func (t ExpiringRoot) ToMap() map[string]any

ToMap converts ExpiringRoot to a map for DAML arguments

func (*ExpiringRoot) UnmarshalHex

func (t *ExpiringRoot) UnmarshalHex(data string) error

UnmarshalHex decodes ExpiringRoot from hex string (Canton MCMS format)

func (*ExpiringRoot) UnmarshalJSON

func (t *ExpiringRoot) UnmarshalJSON(data []byte) error

type IMCMSReceiver

type IMCMSReceiver interface {

	// Archive executes the Archive choice
	Archive(contractID string) *model.ExerciseCommand

	// MCMSReceiverEntrypoint executes the MCMSReceiver_Entrypoint choice
	MCMSReceiverEntrypoint(contractID string, args MCMSReceiverEntrypoint) *model.ExerciseCommand
}

IMCMSReceiver is a DAML interface

type MCMSEncoder

type MCMSEncoder interface {
	BypasserExecuteBatch(args BypasserExecuteBatchParams) (*bind.EncodedChoice, error)
	CancelBatch(args CancelBatchParams) (*bind.EncodedChoice, error)
	ScheduleBatch(args ScheduleBatchParams) (*bind.EncodedChoice, error)
}

MCMSEncoder interface for typed encoding methods. Implemented by Encoder for method-based encoding.

type MCMSReceiverEntrypoint

type MCMSReceiverEntrypoint struct {
	FunctionName  types.TEXT                       `json:"functionName"`
	OperationData types.TEXT                       `json:"operationData" hex:"bytes16"`
	ContractIds   map[types.TEXT]types.CONTRACT_ID `json:"contractIds"`
}

MCMSReceiverEntrypoint is a Record type

func (MCMSReceiverEntrypoint) MarshalHex

func (t MCMSReceiverEntrypoint) MarshalHex() (string, error)

MarshalHex encodes MCMSReceiverEntrypoint to hex string (Canton MCMS format)

func (MCMSReceiverEntrypoint) MarshalJSON

func (t MCMSReceiverEntrypoint) MarshalJSON() ([]byte, error)

func (MCMSReceiverEntrypoint) ToMap

func (t MCMSReceiverEntrypoint) ToMap() map[string]any

ToMap converts MCMSReceiverEntrypoint to a map for DAML arguments

func (*MCMSReceiverEntrypoint) UnmarshalHex

func (t *MCMSReceiverEntrypoint) UnmarshalHex(data string) error

UnmarshalHex decodes MCMSReceiverEntrypoint from hex string (Canton MCMS format)

func (*MCMSReceiverEntrypoint) UnmarshalJSON

func (t *MCMSReceiverEntrypoint) UnmarshalJSON(data []byte) error

type MCMSReceiverView

type MCMSReceiverView struct {
	McmsController types.PARTY `json:"mcmsController"`
	InstanceId     types.TEXT  `json:"instanceId"`
}

MCMSReceiverView is a Record type

func (MCMSReceiverView) MarshalHex

func (t MCMSReceiverView) MarshalHex() (string, error)

MarshalHex encodes MCMSReceiverView to hex string (Canton MCMS format)

func (MCMSReceiverView) MarshalJSON

func (t MCMSReceiverView) MarshalJSON() ([]byte, error)

func (MCMSReceiverView) ToMap

func (t MCMSReceiverView) ToMap() map[string]any

ToMap converts MCMSReceiverView to a map for DAML arguments

func (*MCMSReceiverView) UnmarshalHex

func (t *MCMSReceiverView) UnmarshalHex(data string) error

UnmarshalHex decodes MCMSReceiverView from hex string (Canton MCMS format)

func (*MCMSReceiverView) UnmarshalJSON

func (t *MCMSReceiverView) UnmarshalJSON(data []byte) error

type MultisigConfig

type MultisigConfig struct {
	Signers      []SignerInfo  `json:"signers"`
	GroupQuorums []types.INT64 `json:"groupQuorums" hex:"[]uint32"`
	GroupParents []types.INT64 `json:"groupParents" hex:"[]uint32"`
}

MultisigConfig is a Record type

func (MultisigConfig) MarshalHex

func (t MultisigConfig) MarshalHex() (string, error)

MarshalHex encodes MultisigConfig to hex string (Canton MCMS format)

func (MultisigConfig) MarshalJSON

func (t MultisigConfig) MarshalJSON() ([]byte, error)

func (MultisigConfig) ToMap

func (t MultisigConfig) ToMap() map[string]any

ToMap converts MultisigConfig to a map for DAML arguments

func (*MultisigConfig) UnmarshalHex

func (t *MultisigConfig) UnmarshalHex(data string) error

UnmarshalHex decodes MultisigConfig from hex string (Canton MCMS format)

func (*MultisigConfig) UnmarshalJSON

func (t *MultisigConfig) UnmarshalJSON(data []byte) error

type Op

type Op struct {
	ChainId               types.INT64 `json:"chainId"`
	MultisigId            types.TEXT  `json:"multisigId"`
	Nonce                 types.INT64 `json:"nonce"`
	TargetInstanceAddress types.TEXT  `json:"targetInstanceAddress"`
	FunctionName          types.TEXT  `json:"functionName"`
	OperationData         types.TEXT  `json:"operationData" hex:"bytes16"`
}

Op is a Record type

func (Op) MarshalHex

func (t Op) MarshalHex() (string, error)

MarshalHex encodes Op to hex string (Canton MCMS format)

func (Op) MarshalJSON

func (t Op) MarshalJSON() ([]byte, error)

func (Op) ToMap

func (t Op) ToMap() map[string]any

ToMap converts Op to a map for DAML arguments

func (*Op) UnmarshalHex

func (t *Op) UnmarshalHex(data string) error

UnmarshalHex decodes Op from hex string (Canton MCMS format)

func (*Op) UnmarshalJSON

func (t *Op) UnmarshalJSON(data []byte) error

type RawSignature

type RawSignature struct {
	PublicKey types.TEXT `json:"publicKey"`
	R         types.TEXT `json:"r"`
	S         types.TEXT `json:"s"`
}

RawSignature is a Record type

func (RawSignature) MarshalHex

func (t RawSignature) MarshalHex() (string, error)

MarshalHex encodes RawSignature to hex string (Canton MCMS format)

func (RawSignature) MarshalJSON

func (t RawSignature) MarshalJSON() ([]byte, error)

func (RawSignature) ToMap

func (t RawSignature) ToMap() map[string]any

ToMap converts RawSignature to a map for DAML arguments

func (*RawSignature) UnmarshalHex

func (t *RawSignature) UnmarshalHex(data string) error

UnmarshalHex decodes RawSignature from hex string (Canton MCMS format)

func (*RawSignature) UnmarshalJSON

func (t *RawSignature) UnmarshalJSON(data []byte) error

type Role

type Role string

Role is an enum type

const (
	RoleBypasser Role = "Bypasser"

	RoleCanceller Role = "Canceller"

	RoleProposer Role = "Proposer"
)

func (Role) GetEnumConstructor

func (e Role) GetEnumConstructor() string

func (Role) GetEnumTypeID

func (e Role) GetEnumTypeID() string

func (Role) GetEnumTypeIDWithPackageID

func (e Role) GetEnumTypeIDWithPackageID(packageID string) string

GetEnumTypeIDWithPackageID returns the enum type ID using the provided package ID instead of package name

func (Role) MarshalHex

func (e Role) MarshalHex() (string, error)

MarshalHex encodes Role to hex string (Canton MCMS format)

func (Role) MarshalJSON

func (e Role) MarshalJSON() ([]byte, error)

func (*Role) UnmarshalHex

func (e *Role) UnmarshalHex(data string) error

UnmarshalHex decodes Role from hex string (Canton MCMS format)

func (*Role) UnmarshalJSON

func (e *Role) UnmarshalJSON(data []byte) error

type RoleState

type RoleState struct {
	Config       MultisigConfig                 `json:"config"`
	SeenHashes   map[types.TEXT]types.TIMESTAMP `json:"seenHashes"`
	ExpiringRoot ExpiringRoot                   `json:"expiringRoot"`
	RootMetadata RootMetadata                   `json:"rootMetadata"`
}

RoleState is a Record type

func (RoleState) MarshalHex

func (t RoleState) MarshalHex() (string, error)

MarshalHex encodes RoleState to hex string (Canton MCMS format)

func (RoleState) MarshalJSON

func (t RoleState) MarshalJSON() ([]byte, error)

func (RoleState) ToMap

func (t RoleState) ToMap() map[string]any

ToMap converts RoleState to a map for DAML arguments

func (*RoleState) UnmarshalHex

func (t *RoleState) UnmarshalHex(data string) error

UnmarshalHex decodes RoleState from hex string (Canton MCMS format)

func (*RoleState) UnmarshalJSON

func (t *RoleState) UnmarshalJSON(data []byte) error

type RootMetadata

type RootMetadata struct {
	ChainId              types.INT64 `json:"chainId"`
	MultisigId           types.TEXT  `json:"multisigId"`
	PreOpCount           types.INT64 `json:"preOpCount"`
	PostOpCount          types.INT64 `json:"postOpCount"`
	OverridePreviousRoot types.BOOL  `json:"overridePreviousRoot"`
}

RootMetadata is a Record type

func (RootMetadata) MarshalHex

func (t RootMetadata) MarshalHex() (string, error)

MarshalHex encodes RootMetadata to hex string (Canton MCMS format)

func (RootMetadata) MarshalJSON

func (t RootMetadata) MarshalJSON() ([]byte, error)

func (RootMetadata) ToMap

func (t RootMetadata) ToMap() map[string]any

ToMap converts RootMetadata to a map for DAML arguments

func (*RootMetadata) UnmarshalHex

func (t *RootMetadata) UnmarshalHex(data string) error

UnmarshalHex decodes RootMetadata from hex string (Canton MCMS format)

func (*RootMetadata) UnmarshalJSON

func (t *RootMetadata) UnmarshalJSON(data []byte) error

type ScheduleBatchParams

type ScheduleBatchParams struct {
	Calls       []TimelockCall `json:"calls"`
	Predecessor types.TEXT     `json:"predecessor" hex:"bytes16"`
	Salt        types.TEXT     `json:"salt" hex:"bytes16"`
	DelaySecs   types.INT64    `json:"delaySecs"`
}

ScheduleBatchParams is a Record type

func (ScheduleBatchParams) MarshalHex

func (t ScheduleBatchParams) MarshalHex() (string, error)

MarshalHex encodes ScheduleBatchParams to hex string (Canton MCMS format)

func (ScheduleBatchParams) MarshalJSON

func (t ScheduleBatchParams) MarshalJSON() ([]byte, error)

func (ScheduleBatchParams) ToMap

func (t ScheduleBatchParams) ToMap() map[string]any

ToMap converts ScheduleBatchParams to a map for DAML arguments

func (*ScheduleBatchParams) UnmarshalHex

func (t *ScheduleBatchParams) UnmarshalHex(data string) error

UnmarshalHex decodes ScheduleBatchParams from hex string (Canton MCMS format)

func (*ScheduleBatchParams) UnmarshalJSON

func (t *ScheduleBatchParams) UnmarshalJSON(data []byte) error

type SetConfigParams

type SetConfigParams struct {
	Signers      []SignerInfo  `json:"signers"`
	GroupQuorums []types.INT64 `json:"groupQuorums" hex:"[]uint32"`
	GroupParents []types.INT64 `json:"groupParents" hex:"[]uint32"`
	ClearRoot    types.BOOL    `json:"clearRoot"`
}

SetConfigParams is a Record type

func (SetConfigParams) MarshalHex

func (t SetConfigParams) MarshalHex() (string, error)

MarshalHex encodes SetConfigParams to hex string (Canton MCMS format)

func (SetConfigParams) MarshalJSON

func (t SetConfigParams) MarshalJSON() ([]byte, error)

func (SetConfigParams) ToMap

func (t SetConfigParams) ToMap() map[string]any

ToMap converts SetConfigParams to a map for DAML arguments

func (*SetConfigParams) UnmarshalHex

func (t *SetConfigParams) UnmarshalHex(data string) error

UnmarshalHex decodes SetConfigParams from hex string (Canton MCMS format)

func (*SetConfigParams) UnmarshalJSON

func (t *SetConfigParams) UnmarshalJSON(data []byte) error

type SignerInfo

type SignerInfo struct {
	SignerAddress types.TEXT  `json:"signerAddress" hex:"bytes"`
	SignerIndex   types.INT64 `json:"signerIndex" hex:"uint32"`
	SignerGroup   types.INT64 `json:"signerGroup" hex:"uint32"`
}

SignerInfo is a Record type

func (SignerInfo) MarshalHex

func (t SignerInfo) MarshalHex() (string, error)

MarshalHex encodes SignerInfo to hex string (Canton MCMS format)

func (SignerInfo) MarshalJSON

func (t SignerInfo) MarshalJSON() ([]byte, error)

func (SignerInfo) ToMap

func (t SignerInfo) ToMap() map[string]any

ToMap converts SignerInfo to a map for DAML arguments

func (*SignerInfo) UnmarshalHex

func (t *SignerInfo) UnmarshalHex(data string) error

UnmarshalHex decodes SignerInfo from hex string (Canton MCMS format)

func (*SignerInfo) UnmarshalJSON

func (t *SignerInfo) UnmarshalJSON(data []byte) error

type Template

type Template interface {
	CreateCommand() *model.CreateCommand
	GetTemplateID() string
}

type TimelockCall

type TimelockCall struct {
	TargetInstanceAddress types.TEXT `json:"targetInstanceAddress"`
	FunctionName          types.TEXT `json:"functionName"`
	OperationData         types.TEXT `json:"operationData" hex:"bytes16"`
}

TimelockCall is a Record type

func (TimelockCall) MarshalHex

func (t TimelockCall) MarshalHex() (string, error)

MarshalHex encodes TimelockCall to hex string (Canton MCMS format)

func (TimelockCall) MarshalJSON

func (t TimelockCall) MarshalJSON() ([]byte, error)

func (TimelockCall) ToMap

func (t TimelockCall) ToMap() map[string]any

ToMap converts TimelockCall to a map for DAML arguments

func (*TimelockCall) UnmarshalHex

func (t *TimelockCall) UnmarshalHex(data string) error

UnmarshalHex decodes TimelockCall from hex string (Canton MCMS format)

func (*TimelockCall) UnmarshalJSON

func (t *TimelockCall) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL