Esempio n. 1
0
        public async Task PrepareForConnection(string endpoint)
        {
            var myDidResult = await Signus.CreateAndStoreMyDidAsync(wallet, "{}");

            _myDid = myDidResult.Did;

            var identityJson = string.Format(AGENT_IDENTITY_JSON_TEMPLATE, _myDid, myDidResult.Pk, myDidResult.VerKey, endpoint);
            await Signus.StoreTheirDidAsync(wallet, identityJson);

            _activeListener = await AgentListener.ListenAsync(endpoint);

            await _activeListener.AddIdentityAsync(pool, wallet, _myDid);
        }
        public async Task PrepareForConnection()
        {
            var endpoint = "127.0.0.1:9603";

            myDid = await Signus.CreateAndStoreMyDidAsync(_wallet, "{}");

            var identityJson = string.Format("{{\"did\":\"{0}\", \"pk\":\"{1}\", \"verkey\":\"{2}\", \"endpoint\":\"{3}\"}}",
                                             myDid.Did, myDid.Pk, myDid.VerKey, endpoint);

            await Signus.StoreTheirDidAsync(_wallet, identityJson);

            activeListener = await AgentListener.ListenAsync(endpoint);

            await activeListener.AddIdentityAsync(_pool, _wallet, myDid.Did);
        }