This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
/
didexchange.go
40 lines (27 loc) · 1.62 KB
/
didexchange.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package api
import "github.com/hyperledger/aries-framework-go/cmd/aries-agent-mobile/pkg/wrappers/models"
// DIDExchangeController defines methods for the DIDExchange protocol controller.
type DIDExchangeController interface {
// CreateInvitation creates a new connection invitation.
CreateInvitation(request *models.RequestEnvelope) *models.ResponseEnvelope
// ReceiveInvitation receives a new connection invitation.
ReceiveInvitation(request *models.RequestEnvelope) *models.ResponseEnvelope
// AcceptInvitation accepts a stored connection invitation.
AcceptInvitation(request *models.RequestEnvelope) *models.ResponseEnvelope
// CreateImplicitInvitation creates implicit invitation using inviter DID.
CreateImplicitInvitation(request *models.RequestEnvelope) *models.ResponseEnvelope
// AcceptExchangeRequest accepts a stored connection request.
AcceptExchangeRequest(request *models.RequestEnvelope) *models.ResponseEnvelope
// QueryConnections queries agent to agent connections.
QueryConnections(request *models.RequestEnvelope) *models.ResponseEnvelope
// QueryConnectionByID fetches a single connection record by connection ID.
QueryConnectionByID(request *models.RequestEnvelope) *models.ResponseEnvelope
// CreateConnection creates a new connection record in completed state and returns the generated connectionID.
CreateConnection(request *models.RequestEnvelope) *models.ResponseEnvelope
// RemoveConnection removes given connection record.
RemoveConnection(request *models.RequestEnvelope) *models.ResponseEnvelope
}