Ejemplo n.º 1
0
 public BitGoClient(
     string accessTokenMainnet, string apiRootUrlMainnet,
     string accessTokenTestnet, string apiRootUrlTestnet)
 {
     _main = new BitGoApi(accessTokenMainnet, apiRootUrlMainnet);
     _test = new BitGoApi(accessTokenTestnet, apiRootUrlTestnet);
 }
Ejemplo n.º 2
0
 public BitGoClient(string accessTokenMainnet, string accessTokenTestnet)
 {
     _main = new BitGoApi(accessTokenMainnet, BitGoNetwork.Main);
     _test = new BitGoApi(accessTokenTestnet, BitGoNetwork.Test);
 }
Ejemplo n.º 3
0
        static async Task Main(string[] args)
        {
            var accessToken = Environment.GetEnvironmentVariable("AccessToken");
            var apiUrl      = Environment.GetEnvironmentVariable("ApiUrl");

            _walletPassphrase1 = Environment.GetEnvironmentVariable("WalletPassphrase_1");

            if (string.IsNullOrEmpty(accessToken))
            {
                Console.WriteLine("AccessToken is empty. Please setup env variable");
                return;
            }

            if (string.IsNullOrEmpty(apiUrl))
            {
                Console.WriteLine("ApiUrl is empty. Please setup env variable");
                return;
            }

            if (string.IsNullOrEmpty(_walletPassphrase1))
            {
                Console.WriteLine("WalletPassphrase_1 is empty. Please setup env variable");
                return;
            }

            IBitGoApi api = new BitGoApi(accessToken, apiUrl);

            try
            {
                //await TestAddresses(client, "txlm", "601176c94b46f40446749cb183f843c0");
                //await TestAddresses(client, "txlm", "6048c3e46fd304026642e95b6a28f976");

                //await TestAddresses(client, "talgo", "604f7e965095850076f7d697fcea9995", "jetwallet|-|alex|-|SP-alex");

                //await TestAddresses(client, "tbtc", "6054ba9ca9cc0e0024a867a7d8b401b2", "jetwallet|-|alex|-|SP-alex");
                //await TestAddresses(client, "tbtc", "6054ba9ca9cc0e0024a867a7d8b401b2");

                //await TestAddresses(client, "txrp", "60584aaded0090000628ce59c01f3a5e");

                //await TestAddresses(client, "xlm", "6059baa1db5c7e02866ab97d17e557b6");

                //await TestGetTransferById(client, "teos", "60584dcc6f5d31001d5a59371aeeb60a", "605b162bc6cfd60006c880f8f140e5f9");

                // await TestGetTransfer(client, "teos", "60584dcc6f5d31001d5a59371aeeb60a");
                // await ApplyWebhook(client);
                // await TestEnterpise(client, "teth", "605d56ec87a7fd0006730d335d16b81b");
                // await TestPendingApproval(client);
                await TestSpendingLimits(api);

                //await TestGetTransfer(client, "txlm", "601176c94b46f40446749cb183f843c0");
                //await TestGetTransfer(client, "txlm", "6048c3e46fd304026642e95b6a28f976");

                //await TestGetTransfer(client, "txrp", "60584aaded0090000628ce59c01f3a5e");

                //await TestGetTransfer(client, "talgo", "604f7e965095850076f7d697fcea9995");
                //await TestGetTransfer(client, "txrp", "604f8990e32c2f000600f5411c68dacd");



                //await TestExpress(client, "txlm", "601176c94b46f40446749cb183f843c0", "6048c3e46fd304026642e95b6a28f976", "jetwallet|-|alex|-|SP-alex", "100000000");

                //await TestExpress(client, "tbtc", "6013e7b3d11c3704c6b47cf6191e74a8", "604f5afa9ca16d000682de35465fc6e8", "jetwallet|-|alex|-|SP-alex", "10000");

                //await TestExpress(client, "txrp", "60584aaded0090000628ce59c01f3a5e", "60584aaded0090000628ce59c01f3a5e", "jetwallet|-|alex|-|SP-alex", "11000000");


                //transfer":"605b162bc6cfd60006c880f8f140e5f9","coin":"teos","type":"transfer","state":"confirmed","wallet":"60584dcc6f5d31001d5a59371aeeb60a"
            }
            catch (BitGoErrorException ex)
            {
                Console.WriteLine("BitGoErrorException");
                Console.WriteLine(JsonSerializer.Serialize(ex.Error));
                Console.WriteLine(ex);
            }
        }