CreateParticipant

Attributes

ObjectId

See ‘object-id’ in object-type: participant.

Optional

Username
See ‘username’ in object-type: participant.
FirmId

See ‘firm-id’ in object-type: participant.

Optional

JSON Example

{
    "UpdateType": "CreateParticipant",
    "ObjectId": "OBJECT_ID",
    "Username": "tjsmith",
    "FirmId": "OBJECT_ID"
}

check_valid()

The following checks are performed:

  • Check that all required attributes have been provided.
  • Check that all provided unique attributes do not exist in the store.
  • Check that FirmId, if specified, is a valid organization in the store.

Anyone is allowed to create participants, so no checks are done for authorization (other than the uniqueness of the key-id as specified above).

apply()

Create a new object in the store of object-type of ‘participant’.

The ‘key-id’ field must be initialized to the identifier associated with the key used to sign the transaction message. The ‘creator-id’ should be set to the same as ‘object-id’ (this is a special case for participant, which is always self-created).

For the FirmId, if specified, update the ref-count of the corresponding organization.