在智能合约中获取交易创建者的身份?

Getting identity of the transaction creator in smart contract?

如何获取智能合约中交易创建者的身份? (例如,如果 state1 具有 status = "ISSUE",并且只允许特定身份从 state1 移动到 state2,其中 state1.status = "ISSUE"。)

在 corda 中设计这种需求的理想方式是什么?

提前致谢

您无法在合约中获取交易提议者的身份。

相反,您应该将提议交易所需的身份列为必需的签名者,方法是将其列在交易的命令之一中。那么没有那个身份的认可就不能发布状态。