mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-14 01:25:48 +00:00
26 lines
595 B
Plaintext
26 lines
595 B
Plaintext
## getPaths
|
|
|
|
`getPaths(pathfind: object): Promise<Array<object>>`
|
|
|
|
Finds paths to send a payment. Paths are options for how to route a payment.
|
|
|
|
### Parameters
|
|
|
|
<%- renderSchema("input/get-paths.json") %>
|
|
|
|
### Return Value
|
|
|
|
This method returns a promise that resolves with an array of objects with the following structure:
|
|
|
|
<%- renderSchema("output/get-paths.json") %>
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
const pathfind = <%- importFile('test/fixtures/requests/getpaths/normal.json') %>;
|
|
return api.getPaths(pathfind)
|
|
.then(paths => {/* ... */});
|
|
```
|
|
|
|
<%- renderFixture("responses/get-paths.json") %>
|