Splice.ExternalPartyAmuletRules

Templates

template ExternalPartyAmuletRules

Rules contract that can be used in transactions that require signatures from an external party. This is intended to get archived and recreated as rarely as possible to support long delays between preparing and signing a transaction.

Signatory: dso

Field

Type

Description

dso

Party

template TransferCommand

One-time delegation to execute a transfer to the given receiver for the given amount.

We externally sign this instead of the transfer itself to support a longer delay between prepare/execute which would be prevented by signing the transfer directly as that one pins down the mining rounds that are relatively short lived and relies on getTime which means it would fail due to the max allowed skew between ledger effective time and record time.

Signatory: sender, dso

Field

Type

Description

dso

Party

sender

Party

receiver

Party

delegate

Party

The delegate that actually executes the transfer

amount

Decimal

expiresAt

Time

Expiry of the command until when TransferCommand_Send must be called

nonce

Int

Expected nonce value to order and deduplicate concurrent transfers. Starts at 0 and the next value to use can then be read from TransferCommandCounter and the in-flight TransferCommand contracts.

template TransferCommandCounter

A contract tracking the number of completed TransferCommands per sender, which is used to determine the nonces used in TransferCommands for deduplication.

Signatory: dso

Field

Type

Description

dso

Party

sender

Party

nextNonce

Int

  • Choice Archive

    Controller: dso

    Returns: ()

    (no fields)

Data Types

data ExternalPartyAmuletRules_CreateTransferCommandResult

ExternalPartyAmuletRules_CreateTransferCommandResult

Field

Type

Description

transferCommandCid

ContractId TransferCommand

instance Eq ExternalPartyAmuletRules_CreateTransferCommandResult

instance Show ExternalPartyAmuletRules_CreateTransferCommandResult

instance GetField "transferCommandCid" ExternalPartyAmuletRules_CreateTransferCommandResult (ContractId TransferCommand)

instance SetField "transferCommandCid" ExternalPartyAmuletRules_CreateTransferCommandResult (ContractId TransferCommand)

instance HasExercise ExternalPartyAmuletRules ExternalPartyAmuletRules_CreateTransferCommand ExternalPartyAmuletRules_CreateTransferCommandResult

instance HasFromAnyChoice ExternalPartyAmuletRules ExternalPartyAmuletRules_CreateTransferCommand ExternalPartyAmuletRules_CreateTransferCommandResult

instance HasToAnyChoice ExternalPartyAmuletRules ExternalPartyAmuletRules_CreateTransferCommand ExternalPartyAmuletRules_CreateTransferCommandResult

data TransferCommandResult

data TransferCommand_ExpireResult

data TransferCommand_SendResult

TransferCommand_SendResult

Field

Type

Description

result

TransferCommandResult

sender

Party

nonce

Int

instance Eq TransferCommand_SendResult

instance Show TransferCommand_SendResult

instance GetField "nonce" TransferCommand_SendResult Int

instance GetField "result" TransferCommand_SendResult TransferCommandResult

instance GetField "sender" TransferCommand_SendResult Party

instance SetField "nonce" TransferCommand_SendResult Int

instance SetField "result" TransferCommand_SendResult TransferCommandResult

instance SetField "sender" TransferCommand_SendResult Party

instance HasExercise TransferCommand TransferCommand_Send TransferCommand_SendResult

instance HasFromAnyChoice TransferCommand TransferCommand_Send TransferCommand_SendResult

instance HasToAnyChoice TransferCommand TransferCommand_Send TransferCommand_SendResult

data TransferCommand_WithdrawResult