new TransactionParser()
- Description:
Transaction Parser class
- Source:
Methods
(static) fromBuffer(buffer) → {Object}
- Description:
Parse transaction from buffer
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
buffer |
Buffer | Raw transaction bytes |
Returns:
Parsed transaction object
- Type
- Object
(static) fromHex(hex) → {Object}
- Description:
Parse transaction from hex string
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
hex |
string | Raw transaction hex |
Returns:
Parsed transaction object
- Type
- Object
(static) getTxid(hex) → {string}
- Description:
Get transaction ID from raw hex
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
hex |
string | Raw transaction hex |
Returns:
Transaction ID
- Type
- string
(static) serializeWithoutWitness(tx) → {Buffer}
- Description:
Serialize transaction without witness (for txid)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
tx |
Object | Parsed transaction |
Returns:
Serialized bytes
- Type
- Buffer