Beispiel #1
0
        public void ReplaceStart(IdentitySeed seed = null)
        {
            // LibIndy doesnt follow rules of json.  an empty seed value is
            // communicated by "{}".  TODO:  override ToJson for IdentitySeed
            string seedJson = (null != seed ? seed.ToJson() : "{}");

            TempVerKey = DidAsync.ReplaceKeysStartAsync(_wallet, Did, seedJson).Result;
        }
Beispiel #2
0
        /// <summary>
        /// Creates my did.
        /// </summary>
        /// <returns>The my did.</returns>
        /// <param name="pool">Pool.</param>
        /// <param name="wallet">Wallet.</param>
        /// <param name="seed">instance of IdentitySeed. If null then LibIndy will use default seed data</param>
        public static IDid CreateMyDid(IPool pool, IWallet wallet, IdentitySeed seed)
        {
            // LibIndy doesnt follow rules of json.  an empty seed value is
            // communicated by "{}".  TODO:  override ToJson for IdentitySeed
            string seedJson = (null != seed ? seed.ToJson() : "{}");
            CreateAndStoreMyDidResult result = DidAsync.CreateAndStoreMyDidAsync(wallet, seedJson).Result;

            return(new DidInstance(pool, wallet, result.Did, result.VerKey, string.Empty));
        }