@dashevo/dashcore-lib
Version:
A pure and powerful JavaScript Dash library.
98 lines (57 loc) • 2.52 kB
Markdown
**Usage**: `new Transaction.Output(params)`
**Description**: Instantiate an Output from an Object
| parameters | type | required | Description |
| ---------- | ------ | -------- | ----------- |
| **params** | Object | yes | |
**Returns**: {Output} A new instance of an Output
**Description**: Instantiate a new Output from a plain JavaScript object
**Parameters**:
| parameters | type | required | Description |
| ---------- | ------ | -------- | --------------------------------- |
| **obj** | Object | yes | The output from output.toObject() |
**Returns**: {Output} A instance of an Output
**Description**: Will create an Output from a bufferReader
**Parameters**:
| parameters | type | required | Description |
| ---------- | ------ | -------- | ----------- |
| **br** | Buffer | yes | |
**Returns**: {Output}
**Description**: Set a script from a Buffer. Replace any previously set script
**Parameters**:
| parameters | type | required | Description |
| ---------- | ------------ | -------- | ----------- |
| **bw** | BufferWriter | no | |
**Returns**: {BufferWriter}
**Description**: Set a script from a Buffer. Replace any previously set script
**Parameters**:
| parameters | type | required | Description |
| ---------- | -------------------- | -------- | ----------- |
| **script** | Script/Buffer/String | yes | |
**Returns**: {Output}
**Description**: Set a script from a Buffer. Replace any previously set script
**Parameters**:
| parameters | type | required | Description |
| ---------- | ------ | -------- | ----------- |
| **buffer** | Buffer | yes | |
**Returns**: {Output}
**Description**: Tests if the satoshis amount is invalid
**Parameters**: None.
**Returns**: {String|Boolean} - return reason as string if invalid, or false.
**Description**: Will return an object representation of the input
**Parameters**: None.
**Returns**: {Object} A plain object with the input informations
**Description**: Will return a string formatted for the console
**Parameters**: None.
**Returns**: {string} Output representation
```js
const output = new Output(...);
output.toInspect() // <Output: 041ff0fe0f7b15ffaa....>
```