Declared Types

Dependencies

Source

namespace org.accordproject.payment.endorsement
import org.accordproject.money.CryptoMonetaryAmount from https://models.accordproject.org/money.cto
/** This smart-contract model describes a routine that would transfer a cryptocurrency payment to be made by a separate smart contract (a “payment smart contract”) on a specified date to a payee to a transferee authorized by the payee. This can be thought of as equivalent to flipping a check or note over and writing “Pay to the order of” on the back, hence it is referred to as an “endorsement smart contract”.
*/
/**
* http://schema.org/endorsement
*
* paymentAmount - includes value and cryptocurrency code that define the
* output transmitted from payorAddress to be transferred.
* payeeAddress - Beginning on the Due Date/Block No., the endorsement smart
* contract would look for outputs sent to the payee’s Ethereum address.
* smartContractAddress - The endorsement smart contract would check whether
* outputs to the payeeAddress originated from the payment smart contract’s
* Ethereum address. If so, the endorsement smart contract would check
* whether the output matches the paymentAmount field value
* transfereeAddress - If an output to the payeeAddress sent from the
* smartContractAddress matches the paymentAmount field value, the
* endorsement smart contract would generate a transaction transferring the
* paymentAmount to the transferee’s Ethereum address using the output
* received by the payeeAddress as the input for the transaction
*/
transaction Endorsement {
o CryptoMonetaryAmount paymentAmount
o DateTime dueDate
o Double dueBlockNumber optional
o String payeeAddress
o String smartContractAddress
o String transfereeAddress
}