CommitResult
Holds the outcome of applying an MLS commit message via Session:processCommit.
A commit can succeed (the group epoch advanced), be ignored (the commit was redundant
or out-of-order), or fail hard (the commit was malformed). Always inspect isFailed
and isIgnored after calling Session:processCommit.
After inspecting the result, call destroy to free the underlying handle.
Summary
Properties
Section titled “Properties”handle
Section titled “handle”Opaque handle to the underlying libdave commit result object.
Methods
Section titled “Methods”isFailed
Section titled “isFailed”CommitResult : isFailed ( ) -> boolean
Returns true if the commit was hard-rejected by the library. A failed commit
indicates a protocol violation; the session should be reset.
Returns
| boolean |
isIgnored
Section titled “isIgnored”CommitResult : isIgnored ( ) -> boolean
Returns true if the commit was soft-rejected (ignored). This typically means the
commit was a duplicate or arrived out of order. No epoch transition occurred and the
session state is unchanged.
Returns
| boolean |
getRosterMemberIds
Section titled “getRosterMemberIds”CommitResult : getRosterMemberIds ( ) -> { string }
Returns the user IDs of every member in the group roster after the commit was applied, as a list of decimal snowflake strings. An empty list means no members remain (the group was torn down).
Returns
| { string } |
getRosterMemberSignature
Section titled “getRosterMemberSignature”CommitResult : getRosterMemberSignature ( rosterId ) -> buffer
Returns the MLS credential signature for the roster member identified by rosterId
(a decimal snowflake string). The signature bytes can be used to verify that the
member’s key package was signed by a trusted identity key.
Parameters
| rosterId: string |
Returns
| buffer |
destroy
Section titled “destroy”CommitResult : destroy ( ) -> ()
Destroys the commit result and frees all associated libdave resources. Must be called after the result has been fully inspected.
Functions
Section titled “Functions”CommitResult . new ( handle ) -> CommitResult
Constructs a CommitResult wrapper around an existing libdave handle. Called internally
by Session:processCommit.
Parameters
| handle: CommitResultHandle |
Returns
| CommitResult |