diff --git a/docs/source/api-contract-constraints.rst b/docs/source/api-contract-constraints.rst index 840adb4560..b53d1605cc 100644 --- a/docs/source/api-contract-constraints.rst +++ b/docs/source/api-contract-constraints.rst @@ -191,7 +191,8 @@ The signing capability of :ref:`corda-gradle-plugins signers = this.getServiceHub().getAttachments().openAttachment(attachment).getSignerKeys(); // Create the key that will have to pass for all future versions. - // Could be as simple as: PublicKey ownersKey = signers.get(0) . - PublicKey ownersKey = new CompositeKey.Builder().addKeys(signers).build(null); + PublicKey ownersKey = signers.get(0); - PublicKey ownerPublicKey = fetchPublicKey() // Read the public key from TransactionBuilder txBuilder = new TransactionBuilder(notary) // Set the Signature constraint on the new state to migrate away from the WhitelistConstraint. .addOutputState(outputState, myContract, new SignatureAttachmentConstraint(ownersKey))