Ejemplo n.º 1
0
        /// <summary>
        /// Creates their did.
        /// </summary>
        /// <returns>The their did.</returns>
        /// <param name="pool">Pool.</param>
        /// <param name="wallet">Wallet.</param>
        /// <param name="did">Did.</param>
        public static IDid CreateTheirDid(IPool pool, IWallet wallet, string did, string verkey = "")
        {
            var identityJson = new JObject();

            identityJson["did"] = did;
            if (!string.IsNullOrEmpty(verkey))
            {
                identityJson["verkey"] = verkey;
            }

            DidAsync.StoreTheirDidAsync(wallet, identityJson.ToString()).Wait();

            return(Factory.GetTheirDid(pool, wallet, did));
        }