Show / Hide Table of Contents

Class WalletSugar

Inheritance
object
WalletSugar
Namespace: Xrpl.Wallet
Assembly: Xrpl.dll
Syntax
public static class WalletSugar

Methods

| Edit this page View Source

FundWallet(IXrplClient, XrplWallet?, string?)

Funds a wallet from the network's faucet, giving up when cancellationToken is cancelled. The wait for the faucet payment to be validated is tens of seconds, which is the reason this overload exists: a cancelled call reports cancellation rather than a faucet failure.

Declaration
public static Task<WalletSugar.Funded> FundWallet(this IXrplClient client, XrplWallet? wallet = null, string? faucetHost = null)
Parameters
Type Name Description
IXrplClient client
XrplWallet wallet
string faucetHost
Returns
Type Description
Task<WalletSugar.Funded>
Remarks

A wallet of null means one is generated here, and it is handed back only on success - the returned WalletSugar.Funded is the only reference to it. The faucet may already have created and paid that account by the time the call fails or is cancelled, and the seed goes with the stack frame: the funds are then unreachable and a retry strands another account. Pass a wallet whenever the answer has to survive a failure, which is every case where the account is meant to be used again.

| Edit this page View Source

FundWallet(IXrplClient, XrplWallet?, string?, CancellationToken)

Funds a wallet from the network's faucet, giving up when cancellationToken is cancelled. The wait for the faucet payment to be validated is tens of seconds, which is the reason this overload exists: a cancelled call reports cancellation rather than a faucet failure.

Declaration
public static Task<WalletSugar.Funded> FundWallet(this IXrplClient client, XrplWallet? wallet, string? faucetHost, CancellationToken cancellationToken)
Parameters
Type Name Description
IXrplClient client
XrplWallet wallet
string faucetHost
CancellationToken cancellationToken
Returns
Type Description
Task<WalletSugar.Funded>
Remarks

A wallet of null means one is generated here, and it is handed back only on success - the returned WalletSugar.Funded is the only reference to it. The faucet may already have created and paid that account by the time the call fails or is cancelled, and the seed goes with the stack frame: the funds are then unreachable and a retry strands another account. Pass a wallet whenever the answer has to survive a failure, which is every case where the account is meant to be used again.

| Edit this page View Source

GetFaucetHost(IXrplClient)

Declaration
public static string GetFaucetHost(IXrplClient client)
Parameters
Type Name Description
IXrplClient client
Returns
Type Description
string
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX