Ejemplo n.º 1
0
        public void Main2Test()
        {
            WalletExtension.WalletExtensionClient walletExtension = GetMainNetWalletExtensionClient;


            var keyTriple = new KeyTriple("B7E85CA5910922C49DCCB92EE48DFEC13A60674845CB7152C86B88F31DA6DC67");
            AccountPaginated accountPaginated = new AccountPaginated();

            Account account = new Account();

            account.Address          = ByteString.CopyFrom(keyTriple.GetAddressWallet(TypeNet.Main).SubArray(0, 21));
            accountPaginated.Account = account;
            accountPaginated.Offset  = 0;
            accountPaginated.Limit   = 10;
            TransactionList transactionList = walletExtension.GetTransactionsFromThisAsync(accountPaginated).GetAwaiter().GetResult();
        }
Ejemplo n.º 2
0
        //    [DataRow("TMy3cNNSZHY5d6F39BUbwUExJR93QDpGeh", StringType.Base58, TypeNet.Main)]
        public void SolidityDockerConnectTest(string addressBase58, StringType stringType, TypeNet typeNet)
        {
            //  ProtocolConfiguration protocolConfiguration = new ProtocolConfiguration(typeNet, "172.17.0.2", 50051);
            // ProtocolConfiguration protocolConfiguration = new ProtocolConfiguration(typeNet);
            //  ProtocolConfiguration protocolConfiguration = new ProtocolConfiguration(typeNet, "10.0.75.1", 50041);
            ProtocolConfiguration protocolConfiguration = new ProtocolConfiguration(typeNet, "10.0.75.1", 50052);
            //  ProtocolConfiguration protocolConfiguration = new ProtocolConfiguration(typeNet, "18.184.238.21", 50051);


            var walletClient = new Latoken.CurrencyProvider.Protocol.Tron.Grpc.Api.WalletSolidity.WalletSolidityClient(protocolConfiguration.Channel);
            var sol          = new Latoken.CurrencyProvider.Protocol.Tron.Grpc.Api.WalletSolidity.WalletSolidityClient(protocolConfiguration.Channel);

            byte[] addressBytes = StringHelper.GetBytesAdressFromString(addressBase58);

            Account account = new Account();

            account.Address = ByteString.CopyFrom(addressBytes.SubArray(0, 21));

            var dddd = sol.GetAccount(account);
            //       NodeList listNodes = walletClient.GetPaginatedAssetIssueList ListNodes(new EmptyMessage());

            var we = new Latoken.CurrencyProvider.Protocol.Tron.Grpc.Api.WalletExtension.WalletExtensionClient(protocolConfiguration.Channel);



            var ap = new AccountPaginated();

            ap.Account = account;
            ap.Offset  = 0;
            ap.Limit   = 100;

            var t = we.GetTransactionsFromThis2(ap);


            CurrencyProvider.Protocol.Tron.CurrencyProvider currencyProvider = new CurrencyProvider.Protocol.Tron.CurrencyProvider(protocolConfiguration);

            var rr = BitConverter.GetBytes(1502948);

            BytesMessage numberMessa = new BytesMessage();

            numberMessa.Value = Google.Protobuf.ByteString.CopyFrom(rr);
        }
Ejemplo n.º 3
0
        public async Task <TransactionList> GetTransactionsToThisAsync(AccountPaginated accountPagination, CancellationToken token = default)
        {
            var walletExtension = GetWalletExtension();

            return(await walletExtension.GetTransactionsToThisAsync(accountPagination, _configuration.GetCallOptions(token)));
        }
 public async Task <TransactionListExtention> GetTransactionsToThisAsync(AccountPaginated accountPagination)
 {
     return(await _grpcClient.GetTransactionsToThis2Async(accountPagination));
 }