mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
Use example.com instead of ripple.com Co-authored-by: Elliot Lee <github.public@intelliot.com>
26 lines
603 B
Plaintext
26 lines
603 B
Plaintext
## getFee
|
|
|
|
`getFee(): Promise<string>`
|
|
|
|
Returns the estimated transaction fee for the rippled server the RippleAPI instance is connected to.
|
|
|
|
This uses 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"
|
|
```
|