Documentation
¶
Index ¶
- Constants
- Variables
- func CanonicalGroupApplicationPlaintextV2(value V2GroupApplicationPlaintext) ([]byte, error)
- func EnsureP6V2PublicReleaseReady() error
- func GetKeyPackageRequestV2(meta V2ServiceMetadata, body V2GetKeyPackageBody) (map[string]any, error)
- func GroupAddRequestV2(meta V2GroupControlMetadata, body V2GroupAddBody, auth V2OriginAuth) (map[string]any, error)
- func GroupAddSubmissionBindingV2(meta V2GroupControlMetadata, body V2GroupAddBody) ([]byte, error)
- func GroupCreateRequestV2(meta V2ServiceMetadata, body V2GroupCreateBody, auth V2OriginAuth) (map[string]any, error)
- func GroupIncomingNotificationV2(meta V2GroupIncomingMetadata, body V2GroupIncomingBody, auth V2OriginAuth) (map[string]any, error)
- func GroupNoticeNotificationV2(meta V2GroupNoticeMetadata, body V2E2EENotice) (map[string]any, error)
- func GroupRemoveRequestV2(meta V2GroupControlMetadata, body V2GroupRemoveBody, auth V2OriginAuth) (map[string]any, error)
- func GroupRemoveSubmissionBindingV2(meta V2GroupControlMetadata, body V2GroupRemoveBody) ([]byte, error)
- func GroupSendAuthenticatedDataV2(meta V2GroupSendMetadata, body V2GroupCipherObject) ([]byte, error)
- func GroupSendRequestV2(meta V2GroupSendMetadata, body V2GroupCipherObject, auth V2OriginAuth) (map[string]any, error)
- func ParseGetKeyPackageRequestV2(value any) (V2ServiceMetadata, V2GetKeyPackageBody, error)
- func ParseGroupAddRequestV2(value any) (V2GroupControlMetadata, V2GroupAddBody, V2OriginAuth, error)
- func ParseGroupCreateRequestV2(value any) (V2ServiceMetadata, V2GroupCreateBody, V2OriginAuth, error)
- func ParseGroupIncomingNotificationV2(value any) (V2GroupIncomingMetadata, V2GroupIncomingBody, V2OriginAuth, error)
- func ParseGroupNoticeNotificationV2(value any) (V2GroupNoticeMetadata, V2E2EENotice, error)
- func ParseGroupRemoveRequestV2(value any) (V2GroupControlMetadata, V2GroupRemoveBody, V2OriginAuth, error)
- func ParseGroupSendRequestV2(value any) (V2GroupSendMetadata, V2GroupCipherObject, V2OriginAuth, error)
- func ParsePublishKeyPackageRequestV2(value any) (V2ServiceMetadata, V2PublishKeyPackageBody, error)
- func PublishKeyPackageRequestV2(meta V2ServiceMetadata, body V2PublishKeyPackageBody) (map[string]any, error)
- func ValidateGroupKeyPackageBindingV2(packageValue V2GroupKeyPackage, issuerDocument map[string]any, ...) error
- func ValidateGroupRequiredCapabilitiesV2(extensions []uint16) error
- func ValidateLeafIdentitySetV2(leaves []V2LeafIdentity) error
- func VerifyDIDWBABindingV2(binding V2DIDWBABinding, issuerDocument map[string]any, ...) error
- type ApplicationPlaintext
- type CommandRunner
- type EnvelopeMeta
- type ErrorObject
- type ExecProvider
- type GroupCipherObject
- type GroupKeyPackage
- type GroupLeaveRequestObject
- type GroupLeaveRequestProcessObject
- type GroupStateRef
- type OSCommandRunner
- type RecoverMemberAbortRequestObject
- type RecoverMemberFinalizeRequestObject
- type RecoverMemberRequestObject
- type RecoverMemberTarget
- type Request
- type Response
- type TargetRef
- type UpdateMemberAbortRequestObject
- type UpdateMemberFinalizeRequestObject
- type UpdateMemberRequestObject
- type UpdateMemberTarget
- type V2DIDWBABinding
- type V2DIDWBABindingUnsigned
- type V2E2EENotice
- type V2Error
- type V2GetKeyPackageBody
- type V2GetKeyPackageResult
- type V2GroupAddBody
- type V2GroupApplicationPlaintext
- type V2GroupCipherObject
- type V2GroupControlMetadata
- type V2GroupCreateBody
- type V2GroupCreateResult
- type V2GroupIncomingBody
- type V2GroupIncomingMetadata
- type V2GroupKeyPackage
- type V2GroupMembershipResult
- type V2GroupNoticeMetadata
- type V2GroupRemoveBody
- type V2GroupSendMetadata
- type V2GroupSendResult
- type V2GroupStateRef
- type V2KeyPackageBindingEvidence
- type V2LeafBindingEvidence
- type V2LeafExtension
- type V2LeafIdentity
- type V2ObjectProof
- type V2OriginAuth
- type V2OriginProof
- type V2ProtocolError
- type V2PublishKeyPackageBody
- type V2PublishKeyPackageResult
- type V2ServiceMetadata
- type V2Target
Constants ¶
View Source
const ( Profile = "anp.group.e2ee.v1" SecurityProfile = "group-e2ee" TransportSecurityProfile = "transport-protected" ContractArtifactMode = "contract-test" MTISuite = "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519" MethodLeaveRequest = "group.e2ee.leave_request" MethodLeaveRequestProcess = "group.e2ee.process_leave_request" MethodRecoverMember = "group.e2ee.recover_member" MethodUpdate = "group.e2ee.update" )
View Source
const ( ProfileV2 = "anp.group.e2ee.v2" SecurityProfileV2 = "group-e2ee" TransportSecurityProfileV2 = "transport-protected" GroupCipherContentTypeV2 = "application/anp-group-cipher+json" MTISuiteV2 = "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519" DIDWBADeviceBindingExtensionDraftV2 uint16 = 0xF0A1 DIDWBADeviceBindingExtensionRegisteredV2 = false RFC9421OriginProofSchemeV2 = "anp-rfc9421-origin-proof-v1" MethodPublishKeyPackageV2 = "group.e2ee.publish_key_package" MethodGetKeyPackageV2 = "group.e2ee.get_key_package" MethodGroupCreateV2 = "group.e2ee.create" MethodGroupAddV2 = "group.e2ee.add" MethodGroupRemoveV2 = "group.e2ee.remove" MethodGroupSendV2 = "group.e2ee.send" MethodGroupNoticeV2 = "group.e2ee.notice" MethodGroupIncomingV2 = "group.incoming" )
Variables ¶
View Source
var ErrP6V2PublicReleaseBlocked = fmt.Errorf(
"P6 v2 public release is blocked until the draft MLS extension has a stable registered codepoint",
)
View Source
var V2ProtocolErrors = []V2ProtocolError{
{5000, "group.e2ee.key_package_not_found"},
{5001, "group.e2ee.invalid_key_package"},
{5002, "group.e2ee.did_binding_invalid"},
{5003, "group.e2ee.controller_required"},
{5004, "group.e2ee.state_not_ready"},
{5005, "group.e2ee.epoch_conflict"},
{5006, "group.e2ee.crypto_group_mismatch"},
{5007, "group.e2ee.private_message_invalid"},
{5008, "group.e2ee.commit_invalid"},
{5009, "group.e2ee.welcome_invalid"},
{5010, "group.e2ee.fork_suspected"},
{5011, "group.e2ee.notice_type_unsupported"},
{5012, "group.e2ee.key_package_consumed"},
}
Functions ¶
func CanonicalGroupApplicationPlaintextV2 ¶ added in v0.9.0
func CanonicalGroupApplicationPlaintextV2(value V2GroupApplicationPlaintext) ([]byte, error)
func EnsureP6V2PublicReleaseReady ¶ added in v0.9.0
func EnsureP6V2PublicReleaseReady() error
func GetKeyPackageRequestV2 ¶ added in v0.9.0
func GetKeyPackageRequestV2(meta V2ServiceMetadata, body V2GetKeyPackageBody) (map[string]any, error)
func GroupAddRequestV2 ¶ added in v0.9.0
func GroupAddRequestV2(meta V2GroupControlMetadata, body V2GroupAddBody, auth V2OriginAuth) (map[string]any, error)
func GroupAddSubmissionBindingV2 ¶ added in v0.9.0
func GroupAddSubmissionBindingV2(meta V2GroupControlMetadata, body V2GroupAddBody) ([]byte, error)
func GroupCreateRequestV2 ¶ added in v0.9.0
func GroupCreateRequestV2(meta V2ServiceMetadata, body V2GroupCreateBody, auth V2OriginAuth) (map[string]any, error)
func GroupIncomingNotificationV2 ¶ added in v0.9.0
func GroupIncomingNotificationV2(meta V2GroupIncomingMetadata, body V2GroupIncomingBody, auth V2OriginAuth) (map[string]any, error)
func GroupNoticeNotificationV2 ¶ added in v0.9.0
func GroupNoticeNotificationV2(meta V2GroupNoticeMetadata, body V2E2EENotice) (map[string]any, error)
func GroupRemoveRequestV2 ¶ added in v0.9.0
func GroupRemoveRequestV2(meta V2GroupControlMetadata, body V2GroupRemoveBody, auth V2OriginAuth) (map[string]any, error)
func GroupRemoveSubmissionBindingV2 ¶ added in v0.9.0
func GroupRemoveSubmissionBindingV2(meta V2GroupControlMetadata, body V2GroupRemoveBody) ([]byte, error)
func GroupSendAuthenticatedDataV2 ¶ added in v0.9.0
func GroupSendAuthenticatedDataV2(meta V2GroupSendMetadata, body V2GroupCipherObject) ([]byte, error)
func GroupSendRequestV2 ¶ added in v0.9.0
func GroupSendRequestV2(meta V2GroupSendMetadata, body V2GroupCipherObject, auth V2OriginAuth) (map[string]any, error)
func ParseGetKeyPackageRequestV2 ¶ added in v0.9.0
func ParseGetKeyPackageRequestV2(value any) (V2ServiceMetadata, V2GetKeyPackageBody, error)
func ParseGroupAddRequestV2 ¶ added in v0.9.0
func ParseGroupAddRequestV2(value any) (V2GroupControlMetadata, V2GroupAddBody, V2OriginAuth, error)
func ParseGroupCreateRequestV2 ¶ added in v0.9.0
func ParseGroupCreateRequestV2(value any) (V2ServiceMetadata, V2GroupCreateBody, V2OriginAuth, error)
func ParseGroupIncomingNotificationV2 ¶ added in v0.9.0
func ParseGroupIncomingNotificationV2(value any) (V2GroupIncomingMetadata, V2GroupIncomingBody, V2OriginAuth, error)
func ParseGroupNoticeNotificationV2 ¶ added in v0.9.0
func ParseGroupNoticeNotificationV2(value any) (V2GroupNoticeMetadata, V2E2EENotice, error)
func ParseGroupRemoveRequestV2 ¶ added in v0.9.0
func ParseGroupRemoveRequestV2(value any) (V2GroupControlMetadata, V2GroupRemoveBody, V2OriginAuth, error)
func ParseGroupSendRequestV2 ¶ added in v0.9.0
func ParseGroupSendRequestV2(value any) (V2GroupSendMetadata, V2GroupCipherObject, V2OriginAuth, error)
func ParsePublishKeyPackageRequestV2 ¶ added in v0.9.0
func ParsePublishKeyPackageRequestV2(value any) (V2ServiceMetadata, V2PublishKeyPackageBody, error)
func PublishKeyPackageRequestV2 ¶ added in v0.9.0
func PublishKeyPackageRequestV2(meta V2ServiceMetadata, body V2PublishKeyPackageBody) (map[string]any, error)
func ValidateGroupKeyPackageBindingV2 ¶ added in v0.9.0
func ValidateGroupKeyPackageBindingV2(packageValue V2GroupKeyPackage, issuerDocument map[string]any, evidence V2KeyPackageBindingEvidence, groupRequiredExtensions []uint16, now string, p6ProfileNegotiated bool) error
func ValidateGroupRequiredCapabilitiesV2 ¶ added in v0.9.0
func ValidateLeafIdentitySetV2 ¶ added in v0.9.0
func ValidateLeafIdentitySetV2(leaves []V2LeafIdentity) error
func VerifyDIDWBABindingV2 ¶ added in v0.9.0
func VerifyDIDWBABindingV2(binding V2DIDWBABinding, issuerDocument map[string]any, evidence V2LeafBindingEvidence, groupRequiredExtensions []uint16, now string, p6ProfileNegotiated bool) error
Types ¶
type ApplicationPlaintext ¶
type ApplicationPlaintext struct {
ApplicationContentType string `json:"application_content_type"`
ThreadID string `json:"thread_id,omitempty"`
ReplyToMessageID string `json:"reply_to_message_id,omitempty"`
Annotations map[string]any `json:"annotations,omitempty"`
Text string `json:"text,omitempty"`
Payload map[string]any `json:"payload,omitempty"`
PayloadB64U string `json:"payload_b64u,omitempty"`
}
type CommandRunner ¶
type EnvelopeMeta ¶
type EnvelopeMeta struct {
ANPVersion string `json:"anp_version"`
Profile string `json:"profile"`
SecurityProfile string `json:"security_profile"`
SenderDID string `json:"sender_did,omitempty"`
Target *TargetRef `json:"target,omitempty"`
OperationID string `json:"operation_id,omitempty"`
MessageID string `json:"message_id,omitempty"`
ContentType string `json:"content_type,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
}
type ErrorObject ¶
type ExecProvider ¶
type ExecProvider struct {
BinaryPath string
DataDir string
Timeout time.Duration
Runner CommandRunner
}
type GroupCipherObject ¶
type GroupCipherObject struct {
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
PrivateMessageB64U string `json:"private_message_b64u"`
GroupStateRef GroupStateRef `json:"group_state_ref"`
EpochAuthenticator string `json:"epoch_authenticator,omitempty"`
NonCryptographic bool `json:"non_cryptographic,omitempty"`
ArtifactMode string `json:"artifact_mode,omitempty"`
}
type GroupKeyPackage ¶
type GroupKeyPackage struct {
KeyPackageID string `json:"key_package_id"`
OwnerDID string `json:"owner_did"`
DeviceID string `json:"device_id,omitempty"`
Purpose string `json:"purpose,omitempty"`
GroupDID string `json:"group_did,omitempty"`
Suite string `json:"suite"`
MLSKeyPackageB64U string `json:"mls_key_package_b64u"`
DIDWBABinding map[string]any `json:"did_wba_binding"`
ExpiresAt string `json:"expires_at,omitempty"`
NonCryptographic bool `json:"non_cryptographic,omitempty"`
ArtifactMode string `json:"artifact_mode,omitempty"`
}
type GroupLeaveRequestObject ¶
type GroupLeaveRequestObject struct {
LeaveRequestID string `json:"leave_request_id"`
GroupDID string `json:"group_did"`
RequesterDID string `json:"requester_did"`
GroupStateRef GroupStateRef `json:"group_state_ref"`
ReasonText string `json:"reason_text,omitempty"`
RequestedAt string `json:"requested_at,omitempty"`
NonCryptographic bool `json:"non_cryptographic,omitempty"`
ArtifactMode string `json:"artifact_mode,omitempty"`
}
type GroupLeaveRequestProcessObject ¶
type GroupLeaveRequestProcessObject struct {
LeaveRequestID string `json:"leave_request_id"`
GroupDID string `json:"group_did"`
RequesterDID string `json:"requester_did"`
ProcessorDID string `json:"processor_did"`
GroupStateRef GroupStateRef `json:"group_state_ref"`
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
CommitB64U string `json:"commit_b64u"`
EpochAuthenticator string `json:"epoch_authenticator,omitempty"`
ReasonText string `json:"reason_text,omitempty"`
NonCryptographic bool `json:"non_cryptographic,omitempty"`
ArtifactMode string `json:"artifact_mode,omitempty"`
}
type GroupStateRef ¶
type OSCommandRunner ¶
type OSCommandRunner struct{}
type RecoverMemberRequestObject ¶
type RecoverMemberRequestObject struct {
OperationID string `json:"operation_id"`
GroupDID string `json:"group_did"`
ActorDID string `json:"actor_did"`
Target RecoverMemberTarget `json:"target"`
GroupStateRef GroupStateRef `json:"group_state_ref"`
RecoveryKeyPackageID string `json:"recovery_key_package_id,omitempty"`
GroupKeyPackage *GroupKeyPackage `json:"group_key_package,omitempty"`
CommitB64U string `json:"commit_b64u"`
WelcomeB64U string `json:"welcome_b64u"`
RatchetTreeB64U string `json:"ratchet_tree_b64u,omitempty"`
Epoch string `json:"epoch"`
EpochAuthenticator string `json:"epoch_authenticator,omitempty"`
NonCryptographic bool `json:"non_cryptographic,omitempty"`
ArtifactMode string `json:"artifact_mode,omitempty"`
}
type RecoverMemberTarget ¶
type UpdateMemberRequestObject ¶
type UpdateMemberRequestObject struct {
OperationID string `json:"operation_id"`
GroupDID string `json:"group_did"`
ActorDID string `json:"actor_did"`
Target UpdateMemberTarget `json:"target"`
GroupStateRef GroupStateRef `json:"group_state_ref"`
UpdateKeyPackageID string `json:"update_key_package_id"`
GroupKeyPackage GroupKeyPackage `json:"group_key_package"`
CommitB64U string `json:"commit_b64u"`
WelcomeB64U string `json:"welcome_b64u"`
RatchetTreeB64U string `json:"ratchet_tree_b64u,omitempty"`
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
EpochAuthenticator string `json:"epoch_authenticator,omitempty"`
NonCryptographic bool `json:"non_cryptographic,omitempty"`
ArtifactMode string `json:"artifact_mode,omitempty"`
}
type UpdateMemberTarget ¶
type V2DIDWBABinding ¶ added in v0.9.0
type V2DIDWBABinding struct {
AgentDID string `json:"agent_did"`
DeviceID string `json:"device_id"`
VerificationMethod string `json:"verification_method"`
LeafSignatureKeyB64U string `json:"leaf_signature_key_b64u"`
IssuedAt string `json:"issued_at"`
ExpiresAt string `json:"expires_at"`
Proof V2ObjectProof `json:"proof"`
}
func GenerateDIDWBABindingV2 ¶ added in v0.9.0
func GenerateDIDWBABindingV2(unsigned V2DIDWBABindingUnsigned, privateKey anp.PrivateKeyMaterial, created string) (V2DIDWBABinding, error)
func (V2DIDWBABinding) ValidateStructure ¶ added in v0.9.0
func (value V2DIDWBABinding) ValidateStructure() error
type V2DIDWBABindingUnsigned ¶ added in v0.9.0
type V2E2EENotice ¶ added in v0.9.0
type V2E2EENotice struct {
NoticeID *string `json:"notice_id,omitempty"`
NoticeType string `json:"notice_type"`
GroupDID string `json:"group_did"`
GroupStateRef V2GroupStateRef `json:"group_state_ref"`
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
SubjectDID string `json:"subject_did"`
SubjectDeviceID string `json:"subject_device_id"`
SubjectStatus string `json:"subject_status"`
CommitB64U *string `json:"commit_b64u,omitempty"`
WelcomeB64U *string `json:"welcome_b64u,omitempty"`
RatchetTreeB64U *string `json:"ratchet_tree_b64u,omitempty"`
EpochAuthenticator *string `json:"epoch_authenticator,omitempty"`
GroupReceipt any `json:"group_receipt,omitempty"`
}
func (V2E2EENotice) Validate ¶ added in v0.9.0
func (value V2E2EENotice) Validate() error
type V2GetKeyPackageBody ¶ added in v0.9.0
type V2GetKeyPackageBody struct {
TargetDID string `json:"target_did"`
TargetDeviceID string `json:"target_device_id"`
PreferredSuite *string `json:"preferred_suite,omitempty"`
RequireFresh *bool `json:"require_fresh,omitempty"`
}
func (V2GetKeyPackageBody) Validate ¶ added in v0.9.0
func (value V2GetKeyPackageBody) Validate() error
type V2GetKeyPackageResult ¶ added in v0.9.0
type V2GetKeyPackageResult struct {
TargetDID string `json:"target_did"`
TargetDeviceID string `json:"target_device_id"`
GroupKeyPackage V2GroupKeyPackage `json:"group_key_package"`
}
func ParseGetKeyPackageResultV2 ¶ added in v0.9.0
func ParseGetKeyPackageResultV2(value any) (V2GetKeyPackageResult, error)
func (V2GetKeyPackageResult) Validate ¶ added in v0.9.0
func (value V2GetKeyPackageResult) Validate() error
type V2GroupAddBody ¶ added in v0.9.0
type V2GroupAddBody struct {
MemberDID string `json:"member_did"`
MemberDeviceID string `json:"member_device_id"`
GroupStateRef V2GroupStateRef `json:"group_state_ref"`
GroupKeyPackage V2GroupKeyPackage `json:"group_key_package"`
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
CommitB64U string `json:"commit_b64u"`
WelcomeB64U string `json:"welcome_b64u"`
RatchetTreeB64U string `json:"ratchet_tree_b64u"`
}
func (V2GroupAddBody) Validate ¶ added in v0.9.0
func (value V2GroupAddBody) Validate() error
type V2GroupApplicationPlaintext ¶ added in v0.9.0
type V2GroupApplicationPlaintext struct {
ApplicationContentType string `json:"application_content_type"`
ThreadID *string `json:"thread_id,omitempty"`
ReplyToMessageID *string `json:"reply_to_message_id,omitempty"`
Annotations *map[string]any `json:"annotations,omitempty"`
Text *string `json:"text,omitempty"`
Payload *map[string]any `json:"payload,omitempty"`
PayloadB64U *string `json:"payload_b64u,omitempty"`
}
func ParseGroupApplicationPlaintextV2 ¶ added in v0.9.0
func ParseGroupApplicationPlaintextV2(value any) (V2GroupApplicationPlaintext, error)
func (V2GroupApplicationPlaintext) Validate ¶ added in v0.9.0
func (value V2GroupApplicationPlaintext) Validate() error
type V2GroupCipherObject ¶ added in v0.9.0
type V2GroupCipherObject struct {
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
PrivateMessageB64U string `json:"private_message_b64u"`
GroupStateRef V2GroupStateRef `json:"group_state_ref"`
EpochAuthenticator *string `json:"epoch_authenticator,omitempty"`
}
func (V2GroupCipherObject) Validate ¶ added in v0.9.0
func (value V2GroupCipherObject) Validate() error
type V2GroupControlMetadata ¶ added in v0.9.0
type V2GroupControlMetadata struct {
ANPVersion *string `json:"anp_version,omitempty"`
Profile string `json:"profile"`
SecurityProfile string `json:"security_profile"`
SenderDID string `json:"sender_did"`
SenderDeviceID string `json:"sender_device_id"`
Target V2Target `json:"target"`
OperationID string `json:"operation_id"`
CreatedAt *string `json:"created_at,omitempty"`
}
func (V2GroupControlMetadata) Validate ¶ added in v0.9.0
func (value V2GroupControlMetadata) Validate() error
type V2GroupCreateBody ¶ added in v0.9.0
type V2GroupCreateBody struct {
GroupDID string `json:"group_did"`
GroupStateRef V2GroupStateRef `json:"group_state_ref"`
Suite string `json:"suite"`
CreatorKeyPackage V2GroupKeyPackage `json:"creator_key_package"`
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
}
func (V2GroupCreateBody) Validate ¶ added in v0.9.0
func (value V2GroupCreateBody) Validate() error
type V2GroupCreateResult ¶ added in v0.9.0
type V2GroupCreateResult struct {
Created bool `json:"created"`
GroupDID string `json:"group_did"`
GroupStateRef V2GroupStateRef `json:"group_state_ref"`
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
AcceptedAt string `json:"accepted_at"`
}
func ParseGroupCreateResultV2 ¶ added in v0.9.0
func ParseGroupCreateResultV2(value any) (V2GroupCreateResult, error)
func (V2GroupCreateResult) Validate ¶ added in v0.9.0
func (value V2GroupCreateResult) Validate() error
type V2GroupIncomingBody ¶ added in v0.9.0
type V2GroupIncomingBody struct {
GroupDID string `json:"group_did"`
GroupStateVersion string `json:"group_state_version"`
GroupEventSeq string `json:"group_event_seq"`
AcceptedAt string `json:"accepted_at"`
GroupReceipt any `json:"group_receipt"`
GroupCipherObject V2GroupCipherObject `json:"group_cipher_object"`
}
func (V2GroupIncomingBody) Validate ¶ added in v0.9.0
func (value V2GroupIncomingBody) Validate() error
type V2GroupIncomingMetadata ¶ added in v0.9.0
type V2GroupIncomingMetadata struct {
ANPVersion *string `json:"anp_version,omitempty"`
Profile string `json:"profile"`
SecurityProfile string `json:"security_profile"`
SenderDID string `json:"sender_did"`
SenderDeviceID string `json:"sender_device_id"`
Target V2Target `json:"target"`
RecipientDeviceID string `json:"recipient_device_id"`
OperationID string `json:"operation_id"`
MessageID string `json:"message_id"`
ContentType string `json:"content_type"`
CreatedAt *string `json:"created_at,omitempty"`
}
func (V2GroupIncomingMetadata) Validate ¶ added in v0.9.0
func (value V2GroupIncomingMetadata) Validate() error
type V2GroupKeyPackage ¶ added in v0.9.0
type V2GroupKeyPackage struct {
KeyPackageID string `json:"key_package_id"`
OwnerDID string `json:"owner_did"`
OwnerDeviceID string `json:"owner_device_id"`
Suite string `json:"suite"`
MLSKeyPackageB64U string `json:"mls_key_package_b64u"`
DIDWBABinding V2DIDWBABinding `json:"did_wba_binding"`
ExpiresAt *string `json:"expires_at,omitempty"`
}
func (V2GroupKeyPackage) ValidateStructure ¶ added in v0.9.0
func (value V2GroupKeyPackage) ValidateStructure() error
type V2GroupMembershipResult ¶ added in v0.9.0
type V2GroupMembershipResult struct {
Accepted bool `json:"accepted"`
GroupDID string `json:"group_did"`
MemberDID string `json:"member_did"`
MemberDeviceID string `json:"member_device_id"`
GroupStateRef V2GroupStateRef `json:"group_state_ref"`
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
AcceptedAt string `json:"accepted_at"`
}
func ParseGroupMembershipResultV2 ¶ added in v0.9.0
func ParseGroupMembershipResultV2(value any) (V2GroupMembershipResult, error)
func (V2GroupMembershipResult) Validate ¶ added in v0.9.0
func (value V2GroupMembershipResult) Validate() error
type V2GroupNoticeMetadata ¶ added in v0.9.0
type V2GroupNoticeMetadata struct {
ANPVersion *string `json:"anp_version,omitempty"`
Profile string `json:"profile"`
SecurityProfile string `json:"security_profile"`
SenderDID string `json:"sender_did"`
Target V2Target `json:"target"`
RecipientDeviceID string `json:"recipient_device_id"`
OperationID string `json:"operation_id"`
CreatedAt *string `json:"created_at,omitempty"`
}
func (V2GroupNoticeMetadata) Validate ¶ added in v0.9.0
func (value V2GroupNoticeMetadata) Validate() error
type V2GroupRemoveBody ¶ added in v0.9.0
type V2GroupRemoveBody struct {
MemberDID string `json:"member_did"`
MemberDeviceID string `json:"member_device_id"`
GroupStateRef V2GroupStateRef `json:"group_state_ref"`
CryptoGroupIDB64U string `json:"crypto_group_id_b64u"`
Epoch string `json:"epoch"`
CommitB64U string `json:"commit_b64u"`
}
func (V2GroupRemoveBody) Validate ¶ added in v0.9.0
func (value V2GroupRemoveBody) Validate() error
type V2GroupSendMetadata ¶ added in v0.9.0
type V2GroupSendMetadata struct {
ANPVersion *string `json:"anp_version,omitempty"`
Profile string `json:"profile"`
SecurityProfile string `json:"security_profile"`
SenderDID string `json:"sender_did"`
SenderDeviceID string `json:"sender_device_id"`
Target V2Target `json:"target"`
OperationID string `json:"operation_id"`
MessageID string `json:"message_id"`
ContentType string `json:"content_type"`
CreatedAt *string `json:"created_at,omitempty"`
}
func (V2GroupSendMetadata) Validate ¶ added in v0.9.0
func (value V2GroupSendMetadata) Validate() error
type V2GroupSendResult ¶ added in v0.9.0
type V2GroupSendResult struct {
Accepted bool `json:"accepted"`
GroupDID string `json:"group_did"`
MessageID string `json:"message_id"`
OperationID string `json:"operation_id"`
GroupEventSeq string `json:"group_event_seq"`
GroupStateVersion string `json:"group_state_version"`
AcceptedAt string `json:"accepted_at"`
Epoch string `json:"epoch"`
GroupReceipt any `json:"group_receipt"`
}
func ParseGroupSendResultV2 ¶ added in v0.9.0
func ParseGroupSendResultV2(value any) (V2GroupSendResult, error)
func (V2GroupSendResult) Validate ¶ added in v0.9.0
func (value V2GroupSendResult) Validate() error
type V2GroupStateRef ¶ added in v0.9.0
type V2GroupStateRef struct {
GroupDID string `json:"group_did"`
GroupStateVersion string `json:"group_state_version"`
PolicyHash *string `json:"policy_hash,omitempty"`
RosterHash *string `json:"roster_hash,omitempty"`
}
func (V2GroupStateRef) Validate ¶ added in v0.9.0
func (value V2GroupStateRef) Validate() error
type V2KeyPackageBindingEvidence ¶ added in v0.9.0
type V2KeyPackageBindingEvidence struct {
TLSSerializedKeyPackage []byte
Leaf V2LeafBindingEvidence
}
V2KeyPackageBindingEvidence is produced by a cryptographically verified MLS parser.
type V2LeafBindingEvidence ¶ added in v0.9.0
type V2LeafBindingEvidence struct {
CredentialIdentity []byte
LeafSignatureKeyB64U string
Extensions []V2LeafExtension
LeafCapabilityExtensions []uint16
}
V2LeafBindingEvidence is an MLS-parser projection. It does not let the JSON convenience object substitute for decoding and verifying a TLS KeyPackage.
type V2LeafExtension ¶ added in v0.9.0
type V2LeafIdentity ¶ added in v0.9.0
type V2ObjectProof ¶ added in v0.9.0
type V2ObjectProof struct {
Type string `json:"type"`
Cryptosuite string `json:"cryptosuite"`
Created string `json:"created"`
ProofPurpose string `json:"proofPurpose"`
VerificationMethod string `json:"verificationMethod"`
ProofValue string `json:"proofValue"`
}
func (V2ObjectProof) Validate ¶ added in v0.9.0
func (value V2ObjectProof) Validate() error
type V2OriginAuth ¶ added in v0.9.0
type V2OriginAuth struct {
Scheme string `json:"scheme"`
OriginProof V2OriginProof `json:"origin_proof"`
}
func (V2OriginAuth) Validate ¶ added in v0.9.0
func (value V2OriginAuth) Validate() error
type V2OriginProof ¶ added in v0.9.0
type V2ProtocolError ¶ added in v0.9.0
func LookupV2ProtocolError ¶ added in v0.9.0
func LookupV2ProtocolError(code int) (V2ProtocolError, bool)
type V2PublishKeyPackageBody ¶ added in v0.9.0
type V2PublishKeyPackageBody struct {
GroupKeyPackage V2GroupKeyPackage `json:"group_key_package"`
}
type V2PublishKeyPackageResult ¶ added in v0.9.0
type V2PublishKeyPackageResult struct {
Published bool `json:"published"`
OwnerDID string `json:"owner_did"`
OwnerDeviceID string `json:"owner_device_id"`
KeyPackageID string `json:"key_package_id"`
PublishedAt string `json:"published_at"`
}
func ParsePublishKeyPackageResultV2 ¶ added in v0.9.0
func ParsePublishKeyPackageResultV2(value any) (V2PublishKeyPackageResult, error)
func (V2PublishKeyPackageResult) Validate ¶ added in v0.9.0
func (value V2PublishKeyPackageResult) Validate() error
type V2ServiceMetadata ¶ added in v0.9.0
type V2ServiceMetadata struct {
ANPVersion *string `json:"anp_version,omitempty"`
Profile string `json:"profile"`
SecurityProfile string `json:"security_profile"`
SenderDID string `json:"sender_did"`
SenderDeviceID string `json:"sender_device_id"`
Target V2Target `json:"target"`
OperationID string `json:"operation_id"`
CreatedAt *string `json:"created_at,omitempty"`
}
func (V2ServiceMetadata) Validate ¶ added in v0.9.0
func (value V2ServiceMetadata) Validate(securityProfile string) error
Click to show internal directories.
Click to hide internal directories.