NextAddressAsync() public method

public NextAddressAsync ( global request, CallOptions options ) : AsyncUnaryCall
request global
options CallOptions
return AsyncUnaryCall
Beispiel #1
0
 public async Task<string> NextInternalAddressAsync(Account account)
 {
     var client = new WalletService.WalletServiceClient(_channel);
     var request = new NextAddressRequest
     {
         Account = account.AccountNumber,
         Kind = NextAddressRequest.Types.Kind.Bip0044Internal,
     };
     var resp = await client.NextAddressAsync(request, cancellationToken: _tokenSource.Token);
     return resp.Address;
 }
Beispiel #2
0
 /// <summary>
 /// Queries the RPC server for the next external BIP0044 address for an account
 /// </summary>
 /// <param name="account">Account to create address for</param>
 /// <returns>Tuple containing the address and pubkey address strings</returns>
 public async Task<TupleValue<string, string>> NextExternalAddressAsync(Account account)
 {
     var client = new WalletService.WalletServiceClient(_channel);
     var request = new NextAddressRequest
     {
         Account = account.AccountNumber,
         Kind = NextAddressRequest.Types.Kind.Bip0044External,
     };
     var resp = await client.NextAddressAsync(request, cancellationToken: _tokenSource.Token);
     return TupleValue.Create(resp.Address, resp.PublicKey);
 }