link

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageName = "link"
	PackageID   = "aa19509051d526bf61558354b47e7e19bb160ebe3c860865ace77efd56634c92"
	SDKVersion  = "3.4.11"
)
View Source
const (
	TransferPreapprovalContextKey = types.TEXT("transfer-preapproval")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cancel

type Cancel struct {
	Actor types.PARTY `json:"actor"`
}

Cancel is a Record type

func (Cancel) MarshalHex

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

MarshalHex encodes Cancel to hex string (Canton MCMS format)

func (Cancel) MarshalJSON

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

func (Cancel) ToMap

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

ToMap converts Cancel to a map for DAML arguments

func (*Cancel) UnmarshalHex

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

UnmarshalHex decodes Cancel from hex string (Canton MCMS format)

func (*Cancel) UnmarshalJSON

func (t *Cancel) 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 LinkHolding

type LinkHolding struct {
	HoldingOwner        types.PARTY                              `json:"holdingOwner"`
	HoldingAdmin        types.PARTY                              `json:"holdingAdmin"`
	HoldingInstrumentId splice_api_token_holding_v1.InstrumentId `json:"holdingInstrumentId"`
	HoldingAmount       types.NUMERIC                            `json:"holdingAmount"`
	Meta                splice_api_token_metadata_v1.Metadata    `json:"meta"`
}

LinkHolding is a Template type

func (LinkHolding) Archive

func (t LinkHolding) Archive(contractID string) *model.ExerciseCommand

Archive exercises the Archive choice on this LinkHolding contract via the IHolding interface This method uses the package name in the template ID

func (LinkHolding) ArchiveWithPackageID

func (t LinkHolding) ArchiveWithPackageID(contractID string, packageID string) *model.ExerciseCommand

ArchiveWithPackageID exercises the Archive choice using the provided package ID instead of package name

func (LinkHolding) CreateCommand

func (t LinkHolding) CreateCommand() *model.CreateCommand

CreateCommand returns a CreateCommand for this template using the package name

func (LinkHolding) CreateCommandWithPackageID

func (t LinkHolding) CreateCommandWithPackageID(packageID string) *model.CreateCommand

CreateCommandWithPackageID returns a CreateCommand using the provided package ID instead of package name

func (LinkHolding) GetTemplateID

func (t LinkHolding) GetTemplateID() string

GetTemplateID returns the template ID for this template using the package name

func (LinkHolding) GetTemplateIDWithPackageID

func (t LinkHolding) GetTemplateIDWithPackageID(packageID string) string

GetTemplateIDWithPackageID returns the template ID using the provided package ID instead of package name

func (LinkHolding) MarshalHex

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

MarshalHex encodes LinkHolding to hex string (Canton MCMS format)

func (LinkHolding) MarshalJSON

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

func (*LinkHolding) UnmarshalHex

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

UnmarshalHex decodes LinkHolding from hex string (Canton MCMS format)

func (*LinkHolding) UnmarshalJSON

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

type LinkRegistry

type LinkRegistry struct {
	RegistryAdmin        types.PARTY                              `json:"registryAdmin"`
	RegistryInstrumentId splice_api_token_holding_v1.InstrumentId `json:"registryInstrumentId"`
	InstanceId           types.TEXT                               `json:"instanceId"`
	RegistryMeta         splice_api_token_metadata_v1.Metadata    `json:"registryMeta"`
	TransferPreapprovals map[types.PARTY]types.CONTRACT_ID        `json:"transferPreapprovals"`
}

LinkRegistry is a Template type

func (LinkRegistry) Archive

func (t LinkRegistry) Archive(contractID string) *model.ExerciseCommand

Archive exercises the Archive choice on this LinkRegistry contract via the ITransferFactory interface This method uses the package name in the template ID

func (LinkRegistry) ArchiveWithPackageID

func (t LinkRegistry) ArchiveWithPackageID(contractID string, packageID string) *model.ExerciseCommand

ArchiveWithPackageID exercises the Archive choice using the provided package ID instead of package name

func (LinkRegistry) BurnMintFactoryBurnMint

BurnMintFactoryBurnMint exercises the BurnMintFactory_BurnMint choice on this LinkRegistry contract via the IBurnMintFactory interface This method uses the package name in the template ID

func (LinkRegistry) BurnMintFactoryBurnMintWithPackageID

func (t LinkRegistry) BurnMintFactoryBurnMintWithPackageID(contractID string, packageID string, args splice_api_token_burn_mint_v1.BurnMintFactoryBurnMint) *model.ExerciseCommand

BurnMintFactoryBurnMintWithPackageID exercises the BurnMintFactory_BurnMint choice using the provided package ID instead of package name

func (LinkRegistry) BurnMintFactoryPublicFetch

func (t LinkRegistry) BurnMintFactoryPublicFetch(contractID string, args splice_api_token_burn_mint_v1.BurnMintFactoryPublicFetch) *model.ExerciseCommand

BurnMintFactoryPublicFetch exercises the BurnMintFactory_PublicFetch choice on this LinkRegistry contract via the IBurnMintFactory interface This method uses the package name in the template ID

func (LinkRegistry) BurnMintFactoryPublicFetchWithPackageID

func (t LinkRegistry) BurnMintFactoryPublicFetchWithPackageID(contractID string, packageID string, args splice_api_token_burn_mint_v1.BurnMintFactoryPublicFetch) *model.ExerciseCommand

BurnMintFactoryPublicFetchWithPackageID exercises the BurnMintFactory_PublicFetch choice using the provided package ID instead of package name

func (LinkRegistry) CreateCommand

func (t LinkRegistry) CreateCommand() *model.CreateCommand

CreateCommand returns a CreateCommand for this template using the package name

func (LinkRegistry) CreateCommandWithPackageID

func (t LinkRegistry) CreateCommandWithPackageID(packageID string) *model.CreateCommand

CreateCommandWithPackageID returns a CreateCommand using the provided package ID instead of package name

func (LinkRegistry) GetTemplateID

func (t LinkRegistry) GetTemplateID() string

GetTemplateID returns the template ID for this template using the package name

func (LinkRegistry) GetTemplateIDWithPackageID

func (t LinkRegistry) GetTemplateIDWithPackageID(packageID string) string

GetTemplateIDWithPackageID returns the template ID using the provided package ID instead of package name

func (LinkRegistry) MarshalHex

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

MarshalHex encodes LinkRegistry to hex string (Canton MCMS format)

func (LinkRegistry) MarshalJSON

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

func (LinkRegistry) SetTransferPreapproval

func (t LinkRegistry) SetTransferPreapproval(contractID string, args SetTransferPreapproval) *model.ExerciseCommand

SetTransferPreapproval exercises the SetTransferPreapproval choice on this LinkRegistry contract This method uses the package name in the template ID

func (LinkRegistry) SetTransferPreapprovalWithPackageID

func (t LinkRegistry) SetTransferPreapprovalWithPackageID(contractID string, packageID string, args SetTransferPreapproval) *model.ExerciseCommand

SetTransferPreapprovalWithPackageID exercises the SetTransferPreapproval choice using the provided package ID instead of package name

func (LinkRegistry) TransferFactoryPublicFetch

TransferFactoryPublicFetch exercises the TransferFactory_PublicFetch choice on this LinkRegistry contract via the ITransferFactory interface This method uses the package name in the template ID

func (LinkRegistry) TransferFactoryPublicFetchWithPackageID

func (t LinkRegistry) TransferFactoryPublicFetchWithPackageID(contractID string, packageID string, args splice_api_token_transfer_instruction_v1.TransferFactoryPublicFetch) *model.ExerciseCommand

TransferFactoryPublicFetchWithPackageID exercises the TransferFactory_PublicFetch choice using the provided package ID instead of package name

func (LinkRegistry) TransferFactoryTransfer

TransferFactoryTransfer exercises the TransferFactory_Transfer choice on this LinkRegistry contract via the ITransferFactory interface This method uses the package name in the template ID

func (LinkRegistry) TransferFactoryTransferWithPackageID

func (t LinkRegistry) TransferFactoryTransferWithPackageID(contractID string, packageID string, args splice_api_token_transfer_instruction_v1.TransferFactoryTransfer) *model.ExerciseCommand

TransferFactoryTransferWithPackageID exercises the TransferFactory_Transfer choice using the provided package ID instead of package name

func (*LinkRegistry) UnmarshalHex

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

UnmarshalHex decodes LinkRegistry from hex string (Canton MCMS format)

func (*LinkRegistry) UnmarshalJSON

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

type LinkTransferInstruction

type LinkTransferInstruction struct {
	InstructionAdmin            types.PARTY                                       `json:"instructionAdmin"`
	InstructionTransfer         splice_api_token_transfer_instruction_v1.Transfer `json:"instructionTransfer"`
	InstructionLockedHoldingCid types.CONTRACT_ID                                 `json:"instructionLockedHoldingCid"`
}

LinkTransferInstruction is a Template type

func (LinkTransferInstruction) Archive

func (t LinkTransferInstruction) Archive(contractID string) *model.ExerciseCommand

Archive exercises the Archive choice on this LinkTransferInstruction contract via the ITransferInstruction interface This method uses the package name in the template ID

func (LinkTransferInstruction) ArchiveWithPackageID

func (t LinkTransferInstruction) ArchiveWithPackageID(contractID string, packageID string) *model.ExerciseCommand

ArchiveWithPackageID exercises the Archive choice using the provided package ID instead of package name

func (LinkTransferInstruction) CreateCommand

func (t LinkTransferInstruction) CreateCommand() *model.CreateCommand

CreateCommand returns a CreateCommand for this template using the package name

func (LinkTransferInstruction) CreateCommandWithPackageID

func (t LinkTransferInstruction) CreateCommandWithPackageID(packageID string) *model.CreateCommand

CreateCommandWithPackageID returns a CreateCommand using the provided package ID instead of package name

func (LinkTransferInstruction) GetTemplateID

func (t LinkTransferInstruction) GetTemplateID() string

GetTemplateID returns the template ID for this template using the package name

func (LinkTransferInstruction) GetTemplateIDWithPackageID

func (t LinkTransferInstruction) GetTemplateIDWithPackageID(packageID string) string

GetTemplateIDWithPackageID returns the template ID using the provided package ID instead of package name

func (LinkTransferInstruction) MarshalHex

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

MarshalHex encodes LinkTransferInstruction to hex string (Canton MCMS format)

func (LinkTransferInstruction) MarshalJSON

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

func (LinkTransferInstruction) TransferInstructionAccept

TransferInstructionAccept exercises the TransferInstruction_Accept choice on this LinkTransferInstruction contract via the ITransferInstruction interface This method uses the package name in the template ID

func (LinkTransferInstruction) TransferInstructionAcceptWithPackageID

func (t LinkTransferInstruction) TransferInstructionAcceptWithPackageID(contractID string, packageID string, args splice_api_token_transfer_instruction_v1.TransferInstructionAccept) *model.ExerciseCommand

TransferInstructionAcceptWithPackageID exercises the TransferInstruction_Accept choice using the provided package ID instead of package name

func (LinkTransferInstruction) TransferInstructionReject

TransferInstructionReject exercises the TransferInstruction_Reject choice on this LinkTransferInstruction contract via the ITransferInstruction interface This method uses the package name in the template ID

func (LinkTransferInstruction) TransferInstructionRejectWithPackageID

func (t LinkTransferInstruction) TransferInstructionRejectWithPackageID(contractID string, packageID string, args splice_api_token_transfer_instruction_v1.TransferInstructionReject) *model.ExerciseCommand

TransferInstructionRejectWithPackageID exercises the TransferInstruction_Reject choice using the provided package ID instead of package name

func (LinkTransferInstruction) TransferInstructionUpdate

TransferInstructionUpdate exercises the TransferInstruction_Update choice on this LinkTransferInstruction contract via the ITransferInstruction interface This method uses the package name in the template ID

func (LinkTransferInstruction) TransferInstructionUpdateWithPackageID

func (t LinkTransferInstruction) TransferInstructionUpdateWithPackageID(contractID string, packageID string, args splice_api_token_transfer_instruction_v1.TransferInstructionUpdate) *model.ExerciseCommand

TransferInstructionUpdateWithPackageID exercises the TransferInstruction_Update choice using the provided package ID instead of package name

func (LinkTransferInstruction) TransferInstructionWithdraw

TransferInstructionWithdraw exercises the TransferInstruction_Withdraw choice on this LinkTransferInstruction contract via the ITransferInstruction interface This method uses the package name in the template ID

func (LinkTransferInstruction) TransferInstructionWithdrawWithPackageID

func (t LinkTransferInstruction) TransferInstructionWithdrawWithPackageID(contractID string, packageID string, args splice_api_token_transfer_instruction_v1.TransferInstructionWithdraw) *model.ExerciseCommand

TransferInstructionWithdrawWithPackageID exercises the TransferInstruction_Withdraw choice using the provided package ID instead of package name

func (*LinkTransferInstruction) UnmarshalHex

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

UnmarshalHex decodes LinkTransferInstruction from hex string (Canton MCMS format)

func (*LinkTransferInstruction) UnmarshalJSON

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

type LinkTransferPreapproval

type LinkTransferPreapproval struct {
	PreapprovalAdmin    types.PARTY `json:"preapprovalAdmin"`
	PreapprovalReceiver types.PARTY `json:"preapprovalReceiver"`
}

LinkTransferPreapproval is a Template type

func (LinkTransferPreapproval) Archive

func (t LinkTransferPreapproval) Archive(contractID string) *model.ExerciseCommand

Archive exercises the Archive choice on this LinkTransferPreapproval contract This method uses the package name in the template ID

func (LinkTransferPreapproval) ArchiveWithPackageID

func (t LinkTransferPreapproval) ArchiveWithPackageID(contractID string, packageID string) *model.ExerciseCommand

ArchiveWithPackageID exercises the Archive choice using the provided package ID instead of package name

func (LinkTransferPreapproval) Cancel

func (t LinkTransferPreapproval) Cancel(contractID string, args Cancel) *model.ExerciseCommand

Cancel exercises the Cancel choice on this LinkTransferPreapproval contract This method uses the package name in the template ID

func (LinkTransferPreapproval) CancelWithPackageID

func (t LinkTransferPreapproval) CancelWithPackageID(contractID string, packageID string, args Cancel) *model.ExerciseCommand

CancelWithPackageID exercises the Cancel choice using the provided package ID instead of package name

func (LinkTransferPreapproval) CreateCommand

func (t LinkTransferPreapproval) CreateCommand() *model.CreateCommand

CreateCommand returns a CreateCommand for this template using the package name

func (LinkTransferPreapproval) CreateCommandWithPackageID

func (t LinkTransferPreapproval) CreateCommandWithPackageID(packageID string) *model.CreateCommand

CreateCommandWithPackageID returns a CreateCommand using the provided package ID instead of package name

func (LinkTransferPreapproval) GetTemplateID

func (t LinkTransferPreapproval) GetTemplateID() string

GetTemplateID returns the template ID for this template using the package name

func (LinkTransferPreapproval) GetTemplateIDWithPackageID

func (t LinkTransferPreapproval) GetTemplateIDWithPackageID(packageID string) string

GetTemplateIDWithPackageID returns the template ID using the provided package ID instead of package name

func (LinkTransferPreapproval) MarshalHex

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

MarshalHex encodes LinkTransferPreapproval to hex string (Canton MCMS format)

func (LinkTransferPreapproval) MarshalJSON

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

func (LinkTransferPreapproval) Send

func (t LinkTransferPreapproval) Send(contractID string, args Send) *model.ExerciseCommand

Send exercises the Send choice on this LinkTransferPreapproval contract This method uses the package name in the template ID

func (LinkTransferPreapproval) SendWithPackageID

func (t LinkTransferPreapproval) SendWithPackageID(contractID string, packageID string, args Send) *model.ExerciseCommand

SendWithPackageID exercises the Send choice using the provided package ID instead of package name

func (*LinkTransferPreapproval) UnmarshalHex

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

UnmarshalHex decodes LinkTransferPreapproval from hex string (Canton MCMS format)

func (*LinkTransferPreapproval) UnmarshalJSON

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

type LockedLinkHolding

type LockedLinkHolding struct {
	LockedAdmin        types.PARTY                              `json:"lockedAdmin"`
	LockedSender       types.PARTY                              `json:"lockedSender"`
	LockedReceiver     types.PARTY                              `json:"lockedReceiver"`
	LockedInstrumentId splice_api_token_holding_v1.InstrumentId `json:"lockedInstrumentId"`
	LockedAmount       types.NUMERIC                            `json:"lockedAmount"`
	Meta               splice_api_token_metadata_v1.Metadata    `json:"meta"`
}

LockedLinkHolding is a Template type

func (LockedLinkHolding) Archive

func (t LockedLinkHolding) Archive(contractID string) *model.ExerciseCommand

Archive exercises the Archive choice on this LockedLinkHolding contract This method uses the package name in the template ID

func (LockedLinkHolding) ArchiveWithPackageID

func (t LockedLinkHolding) ArchiveWithPackageID(contractID string, packageID string) *model.ExerciseCommand

ArchiveWithPackageID exercises the Archive choice using the provided package ID instead of package name

func (LockedLinkHolding) CreateCommand

func (t LockedLinkHolding) CreateCommand() *model.CreateCommand

CreateCommand returns a CreateCommand for this template using the package name

func (LockedLinkHolding) CreateCommandWithPackageID

func (t LockedLinkHolding) CreateCommandWithPackageID(packageID string) *model.CreateCommand

CreateCommandWithPackageID returns a CreateCommand using the provided package ID instead of package name

func (LockedLinkHolding) GetTemplateID

func (t LockedLinkHolding) GetTemplateID() string

GetTemplateID returns the template ID for this template using the package name

func (LockedLinkHolding) GetTemplateIDWithPackageID

func (t LockedLinkHolding) GetTemplateIDWithPackageID(packageID string) string

GetTemplateIDWithPackageID returns the template ID using the provided package ID instead of package name

func (LockedLinkHolding) MarshalHex

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

MarshalHex encodes LockedLinkHolding to hex string (Canton MCMS format)

func (LockedLinkHolding) MarshalJSON

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

func (*LockedLinkHolding) UnmarshalHex

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

UnmarshalHex decodes LockedLinkHolding from hex string (Canton MCMS format)

func (*LockedLinkHolding) UnmarshalJSON

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

type MCMSEncoder

type MCMSEncoder interface {
	Cancel(args Cancel) (*bind.EncodedChoice, error)
	Send(args Send) (*bind.EncodedChoice, error)
	SetTransferPreapproval(args SetTransferPreapproval) (*bind.EncodedChoice, error)
}

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

type Send

type Send struct {
	Sender           types.PARTY                              `json:"sender"`
	Amount           types.NUMERIC                            `json:"amount"`
	InstrumentId     splice_api_token_holding_v1.InstrumentId `json:"instrumentId"`
	InputHoldingCids []types.CONTRACT_ID                      `json:"inputHoldingCids"`
	Meta             splice_api_token_metadata_v1.Metadata    `json:"meta"`
}

Send is a Record type

func (Send) MarshalHex

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

MarshalHex encodes Send to hex string (Canton MCMS format)

func (Send) MarshalJSON

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

func (Send) ToMap

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

ToMap converts Send to a map for DAML arguments

func (*Send) UnmarshalHex

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

UnmarshalHex decodes Send from hex string (Canton MCMS format)

func (*Send) UnmarshalJSON

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

type SetTransferPreapproval

type SetTransferPreapproval struct {
	Receiver          types.PARTY        `json:"receiver"`
	NewPreapprovalCid *types.CONTRACT_ID `json:"newPreapprovalCid" hex:"optional"`
}

SetTransferPreapproval is a Record type

func (SetTransferPreapproval) MarshalHex

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

MarshalHex encodes SetTransferPreapproval to hex string (Canton MCMS format)

func (SetTransferPreapproval) MarshalJSON

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

func (SetTransferPreapproval) ToMap

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

ToMap converts SetTransferPreapproval to a map for DAML arguments

func (*SetTransferPreapproval) UnmarshalHex

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

UnmarshalHex decodes SetTransferPreapproval from hex string (Canton MCMS format)

func (*SetTransferPreapproval) UnmarshalJSON

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

type Template

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

Jump to

Keyboard shortcuts

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