Skip to content

CddServiceProviders


Calls


abdicate_membership

Allows the calling member to unilaterally quit without this being subject to a GC vote.

# Arguments * origin - Member of committee who wants to quit.

# Error

  • Only primary key can abdicate.
  • Last member of a group cannot abdicate.

Attributes

No attributes

Python

call = substrate.compose_call(
    'CddServiceProviders', 'abdicate_membership', {}
)

add_member

Adds a member who to the group. May only be called from AddOrigin or root.

# Arguments * origin - Origin representing AddOrigin or root * who - IdentityId to be added to the group.

Attributes

Name Type
who IdentityId

Python

call = substrate.compose_call(
    'CddServiceProviders', 'add_member', {'who': '[u8; 32]'}
)

disable_member

Disables a member at specific moment.

Please note that if member is already revoked (a "valid member"), its revocation time-stamp will be updated.

Any disabled member should NOT allow to act like an active member of the group. For instance, a disabled CDD member should NOT be able to generate a CDD claim. However any generated claim issued before at would be considered as a valid one.

If you want to invalidate any generated claim, you should use Self::remove_member.

# Arguments * at - Revocation time-stamp. * who - Target member of the group. * expiry - Time-stamp when who is removed from CDD. As soon as it is expired, the generated claims will be "invalid" as who is not considered a member of the group.

Attributes

Name Type
who IdentityId
expiry Option<T::Moment>
at Option<T::Moment>

Python

call = substrate.compose_call(
    'CddServiceProviders', 'disable_member', {
    'at': (None, 'u64'),
    'expiry': (None, 'u64'),
    'who': '[u8; 32]',
}
)

remove_member

Removes a member who from the set. May only be called from RemoveOrigin or root.

Any claim previously generated by this member is not valid as a group claim. For instance, if a CDD member group generated a claim for a target identity and then it is removed, that claim will be invalid. In case you want to keep the validity of generated claims, you have to use Self::disable_member function

# Arguments * origin - Origin representing RemoveOrigin or root * who - IdentityId to be removed from the group.

Attributes

Name Type
who IdentityId

Python

call = substrate.compose_call(
    'CddServiceProviders', 'remove_member', {'who': '[u8; 32]'}
)

reset_members

Changes the membership to a new set, disregarding the existing membership. May only be called from ResetOrigin or root.

# Arguments * origin - Origin representing ResetOrigin or root * members - New set of identities

Attributes

Name Type
members Vec<IdentityId>

Python

call = substrate.compose_call(
    'CddServiceProviders', 'reset_members', {'members': ['[u8; 32]']}
)

set_active_members_limit

Change this group&#x27;s limit for how many concurrent active members they may be.

# Arguments * limit - the number of active members there may be concurrently.

Attributes

Name Type
limit MemberCount

Python

call = substrate.compose_call(
    'CddServiceProviders', 'set_active_members_limit', {'limit': 'u32'}
)

swap_member

Swaps out one member remove for another member add.

May only be called from SwapOrigin or root.

# Arguments * origin - Origin representing SwapOrigin or root * remove - IdentityId to be removed from the group. * add - IdentityId to be added in place of remove.

Attributes

Name Type
remove IdentityId
add IdentityId

Python

call = substrate.compose_call(
    'CddServiceProviders', 'swap_member', {
    'add': '[u8; 32]',
    'remove': '[u8; 32]',
}
)

Events


ActiveLimitChanged

The limit of how many active members there can be concurrently was changed.

Attributes

Name Type Composition
None IdentityId [u8; 32]
None MemberCount u32
None MemberCount u32

Dummy

Phantom member, never used.

Attributes

No attributes


MemberAdded

The given member was added; see the transaction for who. caller DID, New member DID.

Attributes

Name Type Composition
None IdentityId [u8; 32]
None IdentityId [u8; 32]

MemberRemoved

The given member was removed; see the transaction for who. caller DID, member DID that get removed.

Attributes

Name Type Composition
None IdentityId [u8; 32]
None IdentityId [u8; 32]

MemberRevoked

The given member has been revoked at specific time-stamp. caller DID, member DID that get revoked.

Attributes

Name Type Composition
None IdentityId [u8; 32]
None IdentityId [u8; 32]

MembersReset

The membership was reset; see the transaction for who the new set is. caller DID, List of new members.

Attributes

Name Type Composition
None IdentityId [u8; 32]
None Vec<IdentityId> ['[u8; 32]']

MembersSwapped

Two members were swapped; see the transaction for who. caller DID, Removed DID, New add DID.

Attributes

Name Type Composition
None IdentityId [u8; 32]
None IdentityId [u8; 32]
None IdentityId [u8; 32]

Storage functions


ActiveMembers

The current "active" membership, stored as an ordered Vec.

Python

result = substrate.query(
    'CddServiceProviders', 'ActiveMembers', []
)

Return value

['[u8; 32]']

ActiveMembersLimit

Limit of how many "active" members there can be.

Python

result = substrate.query(
    'CddServiceProviders', 'ActiveMembersLimit', []
)

Return value

'u32'

InactiveMembers

The current "inactive" membership, stored as an ordered Vec.

Python

result = substrate.query(
    'CddServiceProviders', 'InactiveMembers', []
)

Return value

[{'deactivated_at': 'u64', 'expiry': (None, 'u64'), 'id': '[u8; 32]'}]

Errors


ActiveMembersLimitExceeded

The limit for the number of concurrent active members for this group has been exceeded.


ActiveMembersLimitOverflow

Active member limit was greater than maximum committee members limit.


DuplicateMember

Group member was added already.


LastMemberCannotQuit

Last member of the committee can not quit.


MissingCurrentIdentity

Missing current DID


NoSuchMember

Can&#x27;t remove a member that doesn&#x27;t exist.


OnlyPrimaryKeyAllowed

Only primary key of the identity is allowed.