-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify marlowe-object-flow to use Blueprint
- Loading branch information
Showing
9 changed files
with
99 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Marlowe Blueprint | ||
|
||
TODO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1 @@ | ||
interface ContractParameter { | ||
name: string; | ||
description?: string; | ||
} | ||
|
||
interface AddressParameter extends ContractParameter { | ||
type: "address"; | ||
} | ||
|
||
interface DateParameter extends ContractParameter { | ||
type: "date"; | ||
} | ||
|
||
interface ValueParameter extends ContractParameter { | ||
type: "value"; | ||
} | ||
|
||
type BlueprintParameter = AddressParameter | DateParameter | ValueParameter; | ||
|
||
type Blueprint = BlueprintParameter[]; | ||
|
||
const delayPaymentBlueprint: Blueprint = [ | ||
{ | ||
name: "payFrom", | ||
description: "Who is making the delayed payment", | ||
type: "address", | ||
}, | ||
{ | ||
name: "payTo", | ||
description: "Who is receiving the payment", | ||
type: "address", | ||
}, | ||
{ | ||
name: "amount", | ||
description: "The amount of lovelaces to be paid", | ||
type: "value", | ||
}, | ||
{ | ||
name: "depositDeadline", | ||
description: | ||
"The deadline for the payment to be made. If the payment is not made by this date, the contract can be closed", | ||
type: "date", | ||
}, | ||
{ | ||
name: "releaseDeadline", | ||
description: | ||
"A date after the payment can be released to the receiver. NOTE: An empty transaction must be done to close the contract", | ||
type: "date", | ||
}, | ||
]; | ||
export { Blueprint, mkBlueprint, MkBlueprint, BlueprintOf } from "./typed.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.