Skip to content
This repository has been archived by the owner on Jun 4, 2018. It is now read-only.

Commit

Permalink
Add client method to fetch BIP0044 internal address.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Feb 24, 2016
1 parent ae6d110 commit 9c1841e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Paymetheus.Rpc/WalletClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,23 @@ public async Task<TransactionSet> GetTransactionsAsync(int minRecentTransactions
public async Task<string> NextExternalAddressAsync(Account account)
{
var client = WalletService.NewClient(_channel);
var request = new NextAddressRequest { Account = account.AccountNumber };
var request = new NextAddressRequest
{
Account = account.AccountNumber,
Kind = NextAddressRequest.Types.Kind.BIP0044_EXTERNAL,
};
var resp = await client.NextAddressAsync(request, cancellationToken: _tokenSource.Token);
return resp.Address;
}

public async Task<string> NextInternalAddressAsync(Account account)
{
var client = WalletService.NewClient(_channel);
var request = new NextAddressRequest
{
Account = account.AccountNumber,
Kind = NextAddressRequest.Types.Kind.BIP0044_INTERNAL,
};
var resp = await client.NextAddressAsync(request, cancellationToken: _tokenSource.Token);
return resp.Address;
}
Expand Down

0 comments on commit 9c1841e

Please sign in to comment.