コード例 #1
0
        public static ICryptoCurrencyAdvocacy GetClientCurrencyAdvocacy(long aCurrencyId, ChainParams aChainParams, Func <string> aGetRootSeed)
        {
            if (aChainParams == null)
            {
                throw new ArgumentNullException(nameof(aChainParams), "Chain Parameters can not be null");
            }
            var lControl = GetCurrencyControl();
            ICryptoCurrencyAdvocacy lResult = null;

            foreach (var lEvent in lControl.FEvents)
            {
                lResult = lEvent(aCurrencyId, aChainParams, aGetRootSeed);
                if (lResult != null)
                {
                    break;
                }
            }
            if (lResult == null)
            {
                lResult = new CryptoCurrencyAdvocacy(aCurrencyId, aChainParams, aGetRootSeed);
            }
            return(lResult);
        }
コード例 #2
0
        public ICryptoCurrencyAdvocacy GetCurrencyAdvocacy(long aCurrencyId, ChainParams aChainParams)
        {
            ICryptoCurrencyAdvocacy lAdvocacy = CurrencyControl.GetClientCurrencyAdvocacy(aCurrencyId, aChainParams, GetStringRootSeed);

            return(lAdvocacy);
        }
コード例 #3
0
 protected virtual string SignTransactionData(string aTxData, CurrencyTransaction aCurrencyTransaction, ICryptoCurrencyAdvocacy aCurrencyAdvocacy)
 {
     //TODO: this is done because the object needs the address create.
     //So we should fix this somehow so its a bit more logical.
     aCurrencyAdvocacy.GetAddress(0);
     aCurrencyAdvocacy.GetAddress(1);
     return(aCurrencyAdvocacy.SignTransaction(aTxData, aCurrencyTransaction));
 }