mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-06 05:45:48 +00:00
26 lines
607 B
Plaintext
26 lines
607 B
Plaintext
## getFee
|
|
|
|
`getFee(): Promise<string>`
|
|
|
|
Returns the estimated transaction fee for the rippled server the RippleAPI instance is connected to.
|
|
|
|
This will use the [feeCushion parameter](#parameters) provided to the RippleAPI constructor, or the default value of `1.2`.
|
|
|
|
### Parameters
|
|
|
|
<%- renderSchema('input/get-fee.json') %>
|
|
|
|
### Return Value
|
|
|
|
This method returns a promise that resolves with a string-encoded floating point value representing the estimated fee to submit a transaction, expressed in XRP.
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
return api.getFee().then(fee => {/* ... */});
|
|
```
|
|
|
|
```json
|
|
"0.000012"
|
|
```
|