mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
26 lines
739 B
Plaintext
26 lines
739 B
Plaintext
## sign
|
|
|
|
`sign(txJSON: string, secret: string, options: Object): {signedTransaction: string, id: string}`
|
|
|
|
Sign a prepared transaction. The signed transaction must subsequently be [submitted](#submit).
|
|
|
|
### Parameters
|
|
|
|
<%- renderSchema("input/sign.json") %>
|
|
|
|
### Return Value
|
|
|
|
This method returns an object with the following structure:
|
|
|
|
<%- renderSchema("output/sign.json") %>
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
const txJSON = '{"Flags":2147483648,"TransactionType":"AccountSet","Account":"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59","Domain":"726970706C652E636F6D","LastLedgerSequence":8820051,"Fee":"12","Sequence":23}';
|
|
const secret = 'shsWGZcmZz6YsWWmcnpfr6fLTdtFV';
|
|
return api.sign(txJSON, secret);
|
|
```
|
|
|
|
<%- renderFixture("responses/sign.json") %>
|