On-chain party identity for Sui.
partyos provides a reusable identity primitive for protocols that need to
represent people, groups, and organizations:
Party— a named, capability-authorized identity that can represent an individual or a group of parties. Parties are extensible (other packages can attach data via dynamic fields) and own their lifecycle through aPartyAdminCap.
let (party, cap) = party::new(party::new_individual_kind(), b"Ada".to_string(), ctx);
party.share(&cap); // make it a shared object- Creation and sharing complete in one transaction.
new()is silent;share()emits onePartyCreatedEventfrom the final pre-share state. - Individual or group (
new_individual_kind()/new_group_kind()); groups hold member party IDs. - All mutations, including naming and consent-based group membership, require the appropriate
PartyAdminCap. Setting the name to its current value is a silent no-op. - Extensible: holders of the cap can reach the party's
&mut UID(uid_mut) to attach domain data.
Events carry only what an indexer cannot derive from the event type, the transaction envelope, or earlier Party events:
| Event | Fields |
|---|---|
PartyCreatedEvent |
party_id, name, is_group |
PartyNameSetEvent |
party_id, name |
PartyGroupInviteCreatedEvent, …InviteDeclinedEvent, …InviteRevokedEvent |
group_id, member_id |
PartyGroupMembershipAcceptedEvent, …MembershipLeftEvent, …MembershipRemovedEvent |
group_id, member_id |
The admin cap's id is derived from the party id under PartyAdminCapKey; the
sender, epoch and creation time come from the transaction. Members that join before share()
appear as PartyGroupMembershipAcceptedEvents in the same transaction, so a
party's name, kind, member set and pending invites are all replayable from
events alone.
[dependencies]
partyos = { git = "https://github.com/misofm/partyos.git", rev = "<commit-sha>" }Pin rev to the exact commit reviewed by your application. Party profile and
presentation slices live in
misofm/partyos-extensions.
Party bindings, reads, and composable transaction builders are included in
@misofm/protocol and are exposed through
client.miso.party. This repository no longer publishes a separate TypeScript
package.
sui move build
sui move testIssues and pull requests are welcome. By contributing you agree that your contributions are licensed under the project's Apache 2.0 license.
Apache 2.0 © Miso Labs, Inc.