示例#1
0
        public void SetAndGetEndpointSuccessfully()
        {
            IdentitySeed seed = new IdentitySeed()
            {
                Seed = "00000000000000000000000000000My1"
            };

            IDid did = IndyDotNet.Did.Factory.CreateMyDid(_pool, _wallet, seed);

            IEndPoint endPoint = IndyDotNet.Did.Factory.GetEndPoint(_pool, _wallet, did);

            endPoint.Save("192.168.1.1:9000", "CnEDk9HrMnmiHXEV1WFgbVCRteYnPqsJwrTdcZaNhFVW");

            IEndPoint resultEndPoint = IndyDotNet.Did.Factory.GetEndPoint(_pool, _wallet, did);

            resultEndPoint.Open();

            Assert.AreEqual(endPoint.Address, resultEndPoint.Address);
            Assert.AreEqual(endPoint.TransportKey, resultEndPoint.TransportKey);
        }