public async Task <IActionResult> CreateInvitation(string agentId) { var context = await _agentLoader.LoadAgentForWallet(agentId); //var context = await agentPr1ovider.GetContextAsync(); var(invitation, connection) = await connectionService.CreateInvitationAsync(context, new InviteConfiguration { AutoAcceptConnection = true, MyAlias = new ConnectionAlias { ImageUrl = "myimage", Name = agentId, }, //TheirAlias = new ConnectionAlias //{ // ImageUrl = "theirimage", // Name = "Their name", //} }); return(Json(new { Invitation = invitation, Encoded = EncodeInvitation(invitation), })); }
public async Task <IActionResult> FetchInboxAsync(string agentId) { var context = await _agentLoader.LoadAgentForWallet(agentId); var inbox1 = await edgeClientService.FetchInboxAsync(context); foreach (var inboxItem in inbox1.unprocessedItems) { var packedMessage = new PackedMessageContext(inboxItem.Data); var unpacked = await CryptoUtils.UnpackAsync(context.Wallet, packedMessage.Payload); } return(Ok(inbox1.unprocessedItems)); }
public async Task <IActionResult> SendMessageAsync(string agentId) { var context = await agentLoader.LoadAgentForWallet(agentId); return(View()); }