public async Task CanPerformProofProtocol() { (var issuerConnection, var holderConnection) = await AgentScenarios.EstablishConnectionAsync(_issuerAgent, _holderAgent); await AgentScenarios.IssueCredentialAsync(_issuerAgent, _holderAgent, issuerConnection, holderConnection, new List <CredentialPreviewAttribute> { new CredentialPreviewAttribute("first_name", "Test"), new CredentialPreviewAttribute("last_name", "Holder") }); (var holderRequestorConnection, var requestorConnection) = await AgentScenarios.EstablishConnectionAsync(_holderAgent, _requestorAgent); await AgentScenarios.ProofProtocolAsync(_requestorAgent, _holderAgent, requestorConnection, holderRequestorConnection, new ProofRequest() { Name = "ProofReq", Version = "1.0", Nonce = $"0{Guid.NewGuid().ToString("N")}", RequestedAttributes = new Dictionary <string, ProofAttributeInfo> { { "first-name-requirement", new ProofAttributeInfo { Name = "first_name" } } } }); }
public async Task CanIssueCredential() { (var issuerConnection, var holderConnection) = await AgentScenarios.EstablishConnectionAsync(_issuerAgent, _holderAgent); await AgentScenarios.IssueCredentialAsync(_issuerAgent, _holderAgent, issuerConnection, holderConnection, new List <CredentialPreviewAttribute> { new CredentialPreviewAttribute("first_name", "Test"), new CredentialPreviewAttribute("last_name", "Holder") }); }
public async Task CanPerformProofProtocolConnectionless(bool useDidKeyFormat) { (var issuerConnection, var holderConnection) = await AgentScenarios.EstablishConnectionAsync(_issuerAgent, _holderAgent); await AgentScenarios.IssueCredentialAsync(_issuerAgent, _holderAgent, issuerConnection, holderConnection, new List <CredentialPreviewAttribute> { new CredentialPreviewAttribute("first_name", "Test"), new CredentialPreviewAttribute("last_name", "Holder") }); await AgentScenarios.ProofProtocolConnectionlessAsync(_requestorAgent, _holderAgent, new ProofRequest() { Name = "ProofReq", Version = "1.0", Nonce = await AnonCreds.GenerateNonceAsync(), RequestedAttributes = new Dictionary <string, ProofAttributeInfo> { { "first-name-requirement", new ProofAttributeInfo { Name = "first_name" } } } }, useDidKeyFormat); }
public async Task CanDiscoverProtocols() { var(agent1Con, agent2Con) = await AgentScenarios.EstablishConnectionAsync(_agent1, _agent2); await AgentScenarios.DiscoveryProtocolWithReturnRoutingAsync(_agent1, _agent2, agent1Con, agent2Con); }
public async Task CanConnect() { await AgentScenarios.EstablishConnectionAsync(_agent1, _agent2); }
public async Task CanConnect(bool useDidKeyFormat) { await AgentScenarios.EstablishConnectionAsync(_agent1, _agent2, useDidKeyFormat); }