mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
31 lines
852 B
Plaintext
31 lines
852 B
Plaintext
## prepareTrustline
|
|
|
|
`prepareTrustline(address: string, trustline: Object, instructions: Object): Promise<Object>`
|
|
|
|
Prepare a trustline transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
|
|
|
### Parameters
|
|
|
|
<%- renderSchema("input/prepare-trustline.json") %>
|
|
|
|
### Return Value
|
|
|
|
This method returns a promise that resolves with an object with the following structure:
|
|
|
|
<aside class="notice">
|
|
All "prepare*" methods have the same return type.
|
|
</aside>
|
|
|
|
<%- renderSchema("output/prepare.json") %>
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
const address = 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59';
|
|
const trustline = <%- importFile('test/fixtures/requests/prepare-trustline.json') %>;
|
|
return api.prepareTrustline(address, trustline).then(prepared =>
|
|
{/* ... */});
|
|
```
|
|
|
|
<%- renderFixture("responses/prepare-trustline.json") %>
|