コード例 #1
0
        private bool AddAddress(WalletAddress address)
        {
            if (address.Address == null)
            {
                throw new ArgumentException("Address should not be null", "address.Address");
            }

            return(WalletAddressesTable
                   .GetChild(address.WalletName)
                   .Create(address.Address.ToString(), address, false));
        }
コード例 #2
0
        public WalletRuleEntry AddAddress(string walletName, WalletAddress address, Dictionary <string, JObject> properties)
        {
            if (address.Address == null)
            {
                throw new ArgumentException("Address should not be null", "address.Address");
            }


            var rule = new ScriptRule
            {
                CustomData   = address.AdditionalInformation.ToString(),
                ScriptPubKey = address.ScriptPubKey,
                RedeemScript = address.RedeemScript
            };

            if (!WalletAddressesTable
                .GetChild(walletName)
                .Create(address.Address.ToString(), address, false))
            {
                return(null);
            }
            return(Indexer.AddWalletRule(walletName, rule));
        }
コード例 #3
0
 public WalletAddress[] GetAddresses(string walletName)
 {
     return(WalletAddressesTable.GetChild(walletName).Read());
 }