Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(*): state management for contract instances #1

Open
wants to merge 50 commits into
base: new-slc-signing
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
fe89b74
feat(*): state management for contract instances
Sep 22, 2021
0a4d5ed
feat(*): state management for contract instances
Sep 22, 2021
f548deb
refactor(core): new utility function to add state
Sep 23, 2021
97523ba
refactor(core): new utility function to add state
Sep 23, 2021
fdc24dc
feat(cli): readline module imported for input
Sep 24, 2021
18784ad
feat(*): cli interactive signing
Sep 24, 2021
2c885a0
test(core): update test of contract instances for state management
Sep 24, 2021
00b4658
test(core): updated cta files with state management
Sep 24, 2021
6ea8253
test(*): test correction of cli and new test for utils
Sep 27, 2021
abd7988
chore(deps): bump tar from 4.4.13 to 4.4.19
dependabot[bot] Sep 2, 2021
3fbbd49
chore(deps): bump path-parse from 1.0.6 to 1.0.7
dependabot[bot] Sep 27, 2021
daf21a5
chore(deps): bump axios from 0.21.1 to 0.21.2 in /packages/cicero-core
dependabot[bot] Sep 27, 2021
04964b3
test(cli): change test data slc file
Sep 28, 2021
da397ce
feat(cli): trigger invoke initialize added
Sep 30, 2021
fea21d6
feat(cicero-server): endpoint creation for instantiating and signing …
sanketshevkar Oct 13, 2021
cac375c
refactor(cicero-server): access keystore from local storage of the sever
sanketshevkar Oct 14, 2021
8799651
chore(dep) Build cleanup and upgrade to dependencies
jeromesimeon Oct 26, 2021
719594c
chore(actions): publish v0.22.2 to npm
jeromesimeon Oct 26, 2021
e32bd6b
refactor(*) states property changed to history, new timestamp format …
sanketshevkar Oct 27, 2021
7bf6dae
chore(dep) Upgrade to latest dev version with CiceroMark 0.4
jeromesimeon Oct 27, 2021
5412758
refactor(core) Clearer separation between contract template and contr…
jeromesimeon Jun 15, 2021
f7c3dcf
refactor(core) Rename instance classes
jeromesimeon Jun 16, 2021
81fa7f5
feature(instance) Adjust API, passing metadata to the instance
jeromesimeon Jun 19, 2021
4e250d0
feature(slc) Initial support for creating a smart legal contract archive
jeromesimeon Jun 19, 2021
14378e9
fix(slc) Add contract data to .slc archive
jeromesimeon Jun 19, 2021
330252e
feature(core) Distinguish between template and instance metadata
jeromesimeon Jun 20, 2021
f426bb3
chore(slc) Some basic testing for slc archives creation
jeromesimeon Jun 22, 2021
60e6748
feature(slc) Allow triggers on smart legal contracts
jeromesimeon Jun 22, 2021
cc5984b
feature(slc) Add invoke and initialization support for smart legal co…
jeromesimeon Jun 22, 2021
dab36c9
feature(slc) Export capability for smart legal contracts
jeromesimeon Jun 30, 2021
24fd02e
chore(build) Remove lib from gitignore for new package
jeromesimeon Jun 30, 2021
bafc232
feat(*): contract instance signing and verification
sanketshevkar Aug 16, 2021
622ffba
test(cli): test for signing contract
sanketshevkar Aug 17, 2021
b4805f6
test(cli): contract signatures verification
sanketshevkar Aug 18, 2021
e88b61d
refactor(*): signed slc name and contract instance error
sanketshevkar Aug 18, 2021
554ee04
test(core): failing test cases for contract signature verification
sanketshevkar Aug 19, 2021
e31e2fa
refactor(*): removal of commented code and logger message correction …
sanketshevkar Aug 23, 2021
c1d9dc1
fix(test) Fixes failing negative tests for verify signature
jeromesimeon Aug 24, 2021
4919999
test(cicero-cli): failing tests corrected
Sep 20, 2021
59b9865
refactor(cli): removal of duplicate verify command
Sep 22, 2021
72ee296
fix(build) Add longer timeout for tests
jeromesimeon Oct 27, 2021
de62bc8
chore(dep) Upgrade Concerto/MdTransform/Ergo to latest dev versions
jeromesimeon Oct 27, 2021
c9e2c9e
test(server): addition of new tests for all new apis
sanketshevkar Nov 1, 2021
2fd9eee
test(*): updating tests after code refactor
sanketshevkar Nov 2, 2021
28dca9f
refactor(server): adding cicero-transform dependency
sanketshevkar Nov 12, 2021
b5fae6f
refactor(core): resolve merge conflicts
sanketshevkar Dec 8, 2021
72f29f9
conflict(*): resolved
sanketshevkar Dec 9, 2021
7cf4233
test(server): coverage corection
sanketshevkar Dec 11, 2021
18c2d6a
refactor(server): test corrections
sanketshevkar Dec 11, 2021
3c76826
refactor(*): bug and typo fixes
sanketshevkar Dec 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"packages": [
"packages/*"
],
"version": "0.22.1",
"version": "0.22.2",
"hoist": true
}
11,794 changes: 7,176 additions & 4,618 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
"devDependencies": {
"colors": "1.4.0",
"concurrently": "4.1.1",
"coveralls": "3.0.4",
"dayjs": "1.10.2",
"eslint": "6.0.1",
"istanbul-combine": "0.3.0",
"istanbul-merge": "1.1.1",
"jsdoc": "3.6.3",
"jsdoc-sphinx": "0.0.6",
"lerna": "^3.22.1",
"eslint": "8.1.0",
"jsdoc": "^3.6.7",
"lerna": "^4.0.0",
"license-check-and-add": "2.3.6",
"semver": "6.3.0",
"sleep-promise": "8.0.1",
Expand All @@ -21,14 +17,13 @@
},
"name": "cicero",
"description": "You must install [Lerna](https://lernajs.io) to build this multi-package repository.",
"version": "0.22.1",
"version": "0.22.2",
"private": true,
"scripts": {
"doc": "jsdoc -t ./node_modules/jsdoc-sphinx/template/ -c jsdoc.json -r -d ../cicero-docs/docs/api --verbose",
"coverage": "istanbul-combine -d coverage -r lcov packages/cicero-cli/coverage/*.json packages/cicero-core/coverage/*.json packages/cicero-engine/coverage/*.json packages/generator-cicero-template/coverage/*.json packages/cicero-server/coverage/*.json && cat ./coverage/lcov.info",
"coverage": "node ./scripts/coverage.js \"packages/cicero-*\" && nyc report -t coverage --cwd . --report-dir coverage --reporter=lcov && cat ./coverage/lcov.info",
"postinstall": "npm run bootstrap",
"bootstrap": "lerna bootstrap",
"pretest": "npm run doc && npm run licchk",
"pretest": "npm run licchk",
"test": "lerna exec -- npm run test:cov",
"repoclean": "lerna clean",
"licchk": "license-check-and-add"
Expand Down
35 changes: 27 additions & 8 deletions packages/cicero-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ require('yargs')
describe: 'path to the JSON state',
type: 'string'
});
yargs.option('party', {
describe: 'party which triggers the contract',
type: 'string'
});
yargs.option('currentTime', {
describe: 'set current time',
type: 'string',
Expand Down Expand Up @@ -314,7 +318,7 @@ require('yargs')
offline: argv.offline,
warnings: argv.warnings,
};
return Commands.trigger(argv.template, argv.contract, argv.sample, argv.data, argv.request, argv.state, argv.currentTime, argv.utcOffset, options)
return Commands.trigger(argv.template, argv.contract, argv.sample, argv.data, argv.request, argv.state, argv.party, argv.currentTime, argv.utcOffset, options)
.then((result) => {
if(result) {Logger.info(JSON.stringify(result));}
})
Expand Down Expand Up @@ -356,6 +360,10 @@ require('yargs')
describe: 'path to the JSON state',
type: 'string'
});
yargs.option('party', {
describe: 'party which invokes the contract',
type: 'string'
});
yargs.option('currentTime', {
describe: 'set current time',
type: 'string',
Expand Down Expand Up @@ -383,7 +391,7 @@ require('yargs')
offline: argv.offline,
warnings: argv.warnings,
};
return Commands.invoke(argv.template, argv.contract, argv.sample, argv.data, argv.clauseName, argv.params, argv.state, argv.currentTime, argv.utcOffset, options)
return Commands.invoke(argv.template, argv.contract, argv.sample, argv.data, argv.clauseName, argv.params, argv.state, argv.party, argv.currentTime, argv.utcOffset, options)
.then((result) => {
if(result) {Logger.info(JSON.stringify(result));}
})
Expand Down Expand Up @@ -417,6 +425,10 @@ require('yargs')
describe: 'path to the parameters',
type: 'string'
});
yargs.option('party', {
describe: 'party which initializes the contract',
type: 'string'
});
yargs.option('currentTime', {
describe: 'initialize with this current time',
type: 'string',
Expand Down Expand Up @@ -445,7 +457,7 @@ require('yargs')
offline: argv.offline,
warnings: argv.warnings,
};
return Commands.initialize(argv.template, argv.contract, argv.sample, argv.data, argv.params, argv.currentTime, argv.utcOffset, options)
return Commands.initialize(argv.template, argv.contract, argv.sample, argv.data, argv.params, argv.party, argv.currentTime, argv.utcOffset, options)
.then((result) => {
if(result) {Logger.info(JSON.stringify(result));}
})
Expand Down Expand Up @@ -531,6 +543,10 @@ require('yargs')
type: 'string',
default: 'ergo'
});
yargs.option('instantiator', {
describe: 'name of the instantiator',
type: 'string'
});
yargs.option('output', {
describe: 'file name for new archive',
type: 'string',
Expand All @@ -551,7 +567,7 @@ require('yargs')
const options = {
warnings: argv.warnings,
};
return Commands.instantiate(argv.template, argv.data, argv.target, argv.output, options)
return Commands.instantiate(argv.template, argv.data, argv.target, argv.output, argv.instantiator, options)
.catch((err) => {
Logger.error(err.message);
});
Expand Down Expand Up @@ -618,9 +634,8 @@ require('yargs')
default: null
});
yargs.option('signatory', {
describe: 'name of the signatory',
type: 'string',
default: null
describe: 'name of the party/signatory signing the contract',
type: 'string'
});
yargs.option('output', {
describe: 'file name for new archive',
Expand Down Expand Up @@ -686,6 +701,10 @@ require('yargs')
describe: 'path to a smart legal contract',
type: 'string'
});
yargs.option('party', {
describe: 'party which exports the contract',
type: 'string'
});
yargs.option('output', {
describe: 'path to the output file',
type: 'string'
Expand Down Expand Up @@ -723,7 +742,7 @@ require('yargs')
warnings: argv.warnings,
format: argv.format,
};
return Commands.export(argv.contract, argv.output, argv.currentTime, argv.utcOffset, options)
return Commands.export(argv.contract, argv.party, argv.output, argv.currentTime, argv.utcOffset, options)
.then((result) => {
})
.catch((err) => {
Expand Down
Loading