informalsystems/themis-contract

Document how ot use --useimages flag for signing

Opened this issue · 0 comments

I can't figure out how actually use this flag to sign with an image. When I try to sign a contract with, I am prompted for the counterparty, then the identity, signatory, then prompted for an identity but given no options to select. And pressing return results in a uncaught exception:

[sf@comp example]$ themis-contract sign --useimages
? On behalf of which counterparty will you be signing the contract? Angela Davis
? As which signatory will you be signing on behalf of the counterparty? Angela Davis
? Which identity do you want to use to sign? 
(node:344007) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'value' of undefined
    at ListPrompt.getCurrentValue (/home/sf/Sync/informal-systems/contracts/themis-contract/node_modules/inquirer/lib/prompts/list.js:121:53)
    at MapSubscriber._next (/home/sf/Sync/informal-systems/contracts/themis-contract/node_modules/rxjs/src/internal/operators/map.ts:84:29)
    at MapSubscriber.Subscriber.next (/home/sf/Sync/informal-systems/contracts/themis-contract/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at TakeSubscriber._next (/home/sf/Sync/informal-systems/contracts/themis-contract/node_modules/rxjs/src/internal/operators/take.ts:92:24)
    at TakeSubscriber.Subscriber.next (/home/sf/Sync/informal-systems/contracts/themis-contract/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at Interface.handler (/home/sf/Sync/informal-systems/contracts/themis-contract/node_modules/rxjs/src/internal/observable/fromEvent.ts:201:20)
    at Interface.emit (events.js:327:22)
    at Interface._onLine (readline.js:337:10)
    at Interface._line (readline.js:666:8)
    at Interface._ttyWrite (readline.js:1006:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:344007) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:344007) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.