Expose governance-only JS API in ccf-app package
The new JS governance makes use of some new native functions exposed in the ccf global that are only available in the constitution, not in app endpoints:
ccf.network.getLatestLedgerSecretSeqnoccf.node.triggerLedgerRekeyccf.node.transitionServiceToOpenccf.node.triggerRecoverySharesRefreshccf.setJwtPublicSigningKeys,ccf.removeJwtPublicSigningKeys(those are currently also available in endpoints but are effectively useless there since endpoints don't have permission to write to gov tables)
I propose that such functions are added to the global module of ccf-app with notes that they are not available in endpoints. This has two purposes: documentation and allowing them to be used in npm-based TypeScript constitutions. The latter is possible with the same workflow used when writing apps with the difference that rollup must be configured to bundle everything in a single JS file (since JS governance does not support storing/importing separate modules).
EDIT: The only minor concern I have is that ccf-app was meant for apps only, but maybe the scope could be widened to any JavaScript that runs inside CCF.
Sounds good to me!
@letmaik another possibility would be to start ccf-gov, adding this functionality to ccf-app and perhaps also including some of the unit testing code for constitutions we've discussed a couple of times already.