github.com/hyperledger/aries-framework-go@v0.3.2/pkg/client/introduce/doc.go (about) 1 /* 2 Copyright SecureKey Technologies Inc. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 // Package introduce is responsible for the introduction between agents. 8 // The protocol involves at least two participants. A maximum of three participants is currently supported. 9 // The example below shows how to use the client. 10 // introduce := client.New(...) 11 // introduce.RegisterActionEvent(actions) 12 // for { 13 // select { 14 // case event := <-actions: 15 // if event.Message.Type() == introduce.RequestMsgType { 16 // // if you want to accept request and you do not have a public out-of-band message 17 // event.Continue(WithRecipients(...)) 18 // // or you have a public out-of-band message (eg. request) 19 // event.Continue(WithPublicOOBInvitation(...)) 20 // } else { 21 // // to share your out-of-band message (eg. request) 22 // event.Continue(WithOOBInvitation(...)) 23 // // or if you do not want to share your out-of-band message 24 // event.Continue(nil) 25 // } 26 // } 27 // } 28 // 29 // Possible use cases: 30 // 1) The introducer wants to commit an introduction. To do that SendProposal or SendProposalWithOOBInvitation 31 // functions should be used. SendProposalWithOOBInvitation is used in case if introducer has a public 32 // out-of-band invitation. 33 // Otherwise, SendProposal function is used. A request, in that case, should be provided by one of the introducees. 34 // 2) Introducee asks the introducer about the agent. SendRequest function is used to do that. 35 // 36 // Basic Flow: 37 // 1) Prepare client context 38 // 2) Create client 39 // 3) Register for action events 40 // 4) Handle actions 41 // 5) Send proposal 42 // 43 package introduce