def get_doc_with_keys(public_keys: Iterable[RegisterPublicKey] = None, auth_keys: Iterable[RegisterAuthenticationPublicKey] = None, deleg_control: Iterable[RegisterDelegationProof] = None, deleg_auth: Iterable[RegisterDelegationProof] = None, controller: str = None, did: str = None) -> RegisterDocument: builder = RegisterDocumentBuilder() _ = [builder.add_public_key_obj(k) for k in (public_keys or ())] _ = [builder.add_authentication_key_obj(k) for k in (auth_keys or ())] _ = [builder.add_control_delegation_obj(k) for k in (deleg_control or ())] _ = [builder.add_authentication_delegation_obj(k) for k in (deleg_auth or ())] return builder.build(did=did or 'did:iotics:iotHHHHKpPGWyEC4FFo4d6oyzVVk6MXLmEgY', purpose=DIDType.TWIN, proof='a proof', revoked=True, controller=controller)
def add_key_to_builder(self, builder: RegisterDocumentBuilder, key: RegisterPublicKey): # type: ignore builder.add_public_key_obj(key)