示例#1
0
        public IEnumerable <string> GetPublicAddresses(int vaultIndex = 0)
        {
            WalletResponseDataWrapper <List <string> > ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <List <string> > >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Get,
                    Constants.GetAddressesByVaultIndex.FormatKnownParameter("vaultIndex", vaultIndex)
                    .FormatKnownParameter("coinSymbol", CoinSymbol),
                    null);


            return(ret.WrappedData);
        }
示例#2
0
        public bool UpdateWatchedTXs()
        {
            WalletResponseDataWrapper <bool> ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <bool> >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Get,
                    Constants.UpdateWatchedTXs
                    .FormatKnownParameter("coinSymbol", CoinSymbol),
                    null);


            return(ret.WrappedData);
        }
示例#3
0
        public long GetBlockchainHeight()
        {
            WalletResponseDataWrapper <long> ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <long> >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Get,
                    Constants.GetBlockchainHeight
                    .FormatKnownParameter("coinSymbol", CoinSymbol),
                    null);


            return(ret.WrappedData);
        }
示例#4
0
        public IEnumerable <Deposit> GetAllDepositsForAddress(string publicAddress, int vaultIndex = 0)
        {
            var ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <IEnumerable <Deposit> > >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Get,
                    Constants.GetAllDepositsForAddress.FormatKnownParameter("publicAddress", publicAddress)
                    .FormatKnownParameter("coinSymbol", CoinSymbol)
                    .FormatKnownParameter("vaultIndex", vaultIndex),
                    null);

            return(ret.WrappedData);
        }
示例#5
0
        public long GetTXConfirmationsCount(string txHash, int vaultIndex)
        {
            WalletResponseDataWrapper <long> ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <long> >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Post,
                    Constants.GetTXConfirmationsCount.FormatKnownParameter("txHash", txHash)
                    .FormatKnownParameter("coinSymbol", CoinSymbol)
                    .FormatKnownParameter("vaultIndex", vaultIndex),
                    null);


            return(ret.WrappedData);
        }
示例#6
0
        public IEnumerable <OutgoingTransferOrder> ExecuteTransfersPackage(IEnumerable <OutgoingTransferOrder> orders, int moveAll, int vaultIndex)
        {
            WalletResponseDataWrapper <IEnumerable <OutgoingTransferOrder> > ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <IEnumerable <OutgoingTransferOrder> > >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Post,
                    Constants.ExecuteTransfersPackage.FormatKnownParameter("moveAll", moveAll)
                    .FormatKnownParameter("coinSymbol", CoinSymbol)
                    .FormatKnownParameter("vaultIndex", vaultIndex),
                    orders);


            return(ret.WrappedData);
        }
示例#7
0
        private decimal RawGetAvailableBalance(int vaultIndex, int index)
        {
            WalletResponseDataWrapper <decimal> ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <decimal> >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Get,
                    Constants.GetAvailableBalance.FormatKnownParameter("vaultIndex", vaultIndex)
                    .FormatKnownParameter("coinSymbol", CoinSymbol)
                    .FormatKnownParameter("index", index),
                    null);


            return(ret.WrappedData);
        }
示例#8
0
        public bool UpdateWatchedAddresses(string addr, int vaultIndex)
        {
            WalletResponseDataWrapper <bool> ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <bool> >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Get,
                    Constants.UpdateWatchedAddresses
                    .FormatKnownParameter("coinSymbol", CoinSymbol)
                    .FormatKnownParameter("addr", addr)
                    .FormatKnownParameter("vaultIndex", vaultIndex),
                    null);


            return(ret.WrappedData);
        }
示例#9
0
        public decimal GetFeeForTX(string tx, int vaultIndex, DateTime when)
        {
            WalletResponseDataWrapper <decimal> ret =
                BasicWalletAPI.ExecuteRequest <WalletResponseDataWrapper <decimal> >(
                    ServerURL,
                    System.Net.Http.HttpMethod.Get,
                    Constants.GetFeeForTX.FormatKnownParameter("vaultIndex", vaultIndex)
                    .FormatKnownParameter("coinSymbol", CoinSymbol)
                    .FormatKnownParameter("when", when)
                    .FormatKnownParameter("tx", tx),
                    null);


            return(ret.WrappedData);
        }