Represents a Bitcoin transaction hash (or transaction ID) as an un-prefixed hex string. This hash is supposed to have the same byte order as used by the Bitcoin block explorers which is the opposite of the byte order used by the Bitcoin protocol internally. That means the hash must be reversed in the use cases that expect the Bitcoin internal byte order.
-
↳
BitcoinTxHash
• new BitcoinTxHash(value
): BitcoinTxHash
Name | Type |
---|---|
value |
string | Buffer |
• Protected
Readonly
_hex: Buffer
▸ equals(otherValue
): boolean
Checks if other value equals the current value.
Name | Type | Description |
---|---|---|
otherValue |
Hex |
Other value that will be compared to this value. |
boolean
True if both values are equal, false otherwise.
▸ reverse(): Hex
Reversed hexadecimal value.
▸ toBuffer(): Buffer
Buffer
Hexadecimal value as a Buffer.
▸ toPrefixedString(): string
string
Hexadecimal string prefixed with '0x'.
▸ toString(): string
string
Unprefixed hexadecimal string.
▸ from(value
): Hex
Name | Type |
---|---|
value |
string | Buffer |