Wallet
The Wallet
class provides methods to interact with user wallets in the HandCash Connect SDK.
Methods
getSpendableBalance(currencyCode?)
Checks the user’s spendable balance. The user authorizes the amount an app can spend daily; by default, this value is $10 per day. Users can adjust this limit in the HandCash Market.
Parameters:
currencyCode
Returns: A promise that resolves with the spendable balance.
Example:
Response Type:
getTotalBalance()
Get the user’s total satoshi & fiat balance.
Returns: A promise that resolves with the user balance.
Example:
Response Type:
pay(paymentParameters)
Make a payment for your user.
Parameters:
paymentParameters
: The payment parameters.
Returns: A promise that resolves with the payment result.
Example:
PaymentParameters Type:
PaymentResult Type:
getPayment(transactionId)
Fetch information about one of your payments using the transaction id as reference.
Parameters:
transactionId
: The transaction id.
Returns: A promise that resolves with the payment result.
Example:
getExchangeRate(currencyCode)
Fetch the exchange rate for a given currency.
Parameters:
currencyCode
: The currency code. See the list of supported currencies.
Returns: A promise that resolves with the exchange rate.
Example:
Response Type:
Types
CurrencyCode
The SDK supports the following currency codes: