static async Task Main(string[] args) { var httpClient = new HttpClient(); httpClient.BaseAddress = new Uri("https://public-api.sandbox.bunq.com/v1/"); var(publicKeyPem, privateKeyPem) = PublicPrivateKeys.Initialize(); Console.WriteLine(publicKeyPem); Console.WriteLine(privateKeyPem); var apiKey = await GetSandboxApiKey(httpClient); var(installationToken, serverPublicKey) = await DoInstallation(httpClient, publicKeyPem); await SetupDevice(httpClient, apiKey, privateKeyPem, serverPublicKey, installationToken); var bunqApi = await SetupSession(httpClient, apiKey, privateKeyPem, serverPublicKey, installationToken); var account = await ListMonetaryAccountBanks(bunqApi); await GetSomeMoney(bunqApi, account.id); account = await ListMonetaryAccountBanks(bunqApi); await ListPayments(bunqApi, account.id); await SendSomeMoney(bunqApi, account.id, "30.25", "NL16BUNQ2025445040", "Veronika Mason"); await ListPayments(bunqApi, account.id); await SendSomeMoney(bunqApi, account.id, "69.69", "GB33BUKB20201555555555", "A Bank"); await SendSomeMoney(bunqApi, account.id, "123.45", "NL02ABNA0123456789", "A Bank NL"); await SendSomeMoney(bunqApi, account.id, "200.00", "NL02ABNA0123456789", "A Bank NL"); await GetSomeMoney(bunqApi, account.id); await SendSomeMoney(bunqApi, account.id, "500.00", "GB33BUKB20201555555555", "A Bank"); await GetSomeMoney(bunqApi, account.id); // daily limit reached ... await SendSomeMoney(bunqApi, account.id, "500.00", "NL02ABNA0123456789", "A Bank"); await ListPayments(bunqApi, account.id); account = await ListMonetaryAccountBanks(bunqApi); }
public SignSignature(string privatePem, string publicPem) { rsaPrivate = PublicPrivateKeys.CreateRSAFromPrivateKey(privatePem); rsaPublic = PublicPrivateKeys.CreateRSAFromPublicKey(publicPem); }