-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(1.0) New based models for AP + Concerto 1.0 switch
Signed-off-by: Jerome Simeon <[email protected]>
- Loading branch information
1 parent
b56718a
commit 93d0831
Showing
11 changed files
with
215 additions
and
381 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
Large diffs are not rendered by default.
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,38 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// requires: concerto-core:>= 1.0.0-alpha.3 | ||
|
||
namespace org.accordproject.contract | ||
|
||
/** | ||
* Contract Data | ||
* -- Describes the structure of contracts and clauses | ||
*/ | ||
|
||
/* A party to a contract */ | ||
participant Party identified by partyId { | ||
o String partyId | ||
} | ||
|
||
/* A contract is a asset -- This contains the contract data */ | ||
abstract asset ContractData identified by contractId { | ||
o String contractId | ||
--> Party[] parties optional | ||
} | ||
|
||
/* A clause is an asset -- This contains the clause data */ | ||
abstract asset ClauseData identified by clauseId { | ||
o String clauseId | ||
} |
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,35 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// requires: concerto-core:>= 1.0.0-alpha.3 | ||
|
||
namespace org.accordproject.obligation | ||
|
||
import org.accordproject.runtime.Obligation from https://concerto-1-0--accordproject-models.netlify.com/accordproject/runtime.cto | ||
import org.accordproject.money.MonetaryAmount from https://concerto-1-0--accordproject-models.netlify.com/[email protected] | ||
|
||
/** | ||
* Useful Obligations | ||
* -- Predefined obligations for general use in Accord Project templates | ||
*/ | ||
|
||
event PaymentObligation extends Obligation { | ||
o MonetaryAmount amount | ||
o String description | ||
} | ||
|
||
event NotificationObligation extends Obligation { | ||
o String title | ||
o String message | ||
} |
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,57 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// requires: concerto-core:>= 1.0.0-alpha.3 | ||
|
||
namespace org.accordproject.runtime | ||
|
||
import org.accordproject.contract.Party from https://concerto-1-0--accordproject-models.netlify.com/accordproject/contract.cto | ||
import org.accordproject.contract.ContractData from https://concerto-1-0--accordproject-models.netlify.com/accordproject/contract.cto | ||
|
||
/** | ||
* Runtime API | ||
* -- Describes input and output of calls to a contract's clause | ||
*/ | ||
|
||
/* A request is a transaction */ | ||
transaction Request { | ||
} | ||
|
||
/* A response is a transaction */ | ||
transaction Response { | ||
} | ||
|
||
/* An Error is a concept */ | ||
abstract concept ErrorResponse { | ||
} | ||
|
||
/* An event that represents an obligation that needs to be fulfilled */ | ||
abstract event Obligation { | ||
/* A back reference to the governing contract that emitted this obligation */ | ||
--> ContractData contractData | ||
|
||
/* The party that is obligated */ | ||
--> Party promisor | ||
|
||
/* The party that receives the performance */ | ||
--> Party promisee | ||
|
||
/* The time before which the obligation is fulfilled */ | ||
o DateTime deadline optional | ||
} | ||
|
||
/* A contract state is an asset -- The runtime state of the contract */ | ||
asset ContractState { | ||
--> Obligation[] obligations // Should we allow for a standard way to store obligations on the contract in the state? | ||
} |
This file was deleted.
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 |
---|---|---|
|
@@ -11,11 +11,10 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
// requires: concerto-core:>= 1.0.0-20210215133932 | ||
// requires: concerto-core:>= 1.0.0-alpha.3 | ||
namespace org.accordproject.payment | ||
|
||
import org.accordproject.cicero.runtime.Request from https://models.accordproject.org/cicero/[email protected] | ||
import org.accordproject.cicero.contract.AccordContract from https://models.accordproject.org/cicero/contract.cto | ||
import org.accordproject.runtime.Request from https://concerto-1-0--accordproject-models.netlify.com/accordproject/runtime.cto | ||
|
||
/** | ||
* A request that indicates that a payment has been received | ||
|
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,28 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// requires: concerto-core:>= 1.0.0-alpha.3 | ||
namespace org.accordproject.signature.block | ||
|
||
import org.accordproject.contract.ClauseData from https://concerto-1-0--accordproject-models.netlify.com/accordproject/contract.cto | ||
import org.accordproject.contract.Party from https://concerto-1-0--accordproject-models.netlify.com/accordproject/contract.cto | ||
|
||
/** | ||
* An abstract clause for a party scoped signature block | ||
*/ | ||
abstract asset SignatureClause extends ClauseData { | ||
@Pdf("style", "background") | ||
@ContractEditor("readOnly", true, "opacity", 0) | ||
--> Party signatory | ||
} |
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 |
---|---|---|
|
@@ -11,17 +11,15 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
// requires: concerto-core:>= 1.0.0-20210215133932 | ||
// requires: concerto-core:>= 1.0.0-alpha.3 | ||
namespace org.accordproject.signature | ||
|
||
import org.accordproject.cicero.runtime.Request from https://models.accordproject.org/cicero/[email protected] | ||
import org.accordproject.cicero.contract.AccordContract from https://models.accordproject.org/cicero/contract.cto | ||
import org.accordproject.cicero.contract.AccordClause from https://models.accordproject.org/cicero/contract.cto | ||
import org.accordproject.cicero.contract.AccordParty from https://models.accordproject.org/cicero/contract.cto | ||
import org.accordproject.runtime.Request from https://concerto-1-0--accordproject-models.netlify.com/accordproject/runtime.cto | ||
import org.accordproject.contract.ContractData from https://concerto-1-0--accordproject-models.netlify.com/accordproject/contract.cto | ||
|
||
/** | ||
* A request that indicates that a contract has been signed by all parties | ||
*/ | ||
transaction ContractSigned extends Request { | ||
--> AccordContract contract | ||
} | ||
--> ContractData contract | ||
} |