UNPKG

opnet

Version:

The perfect library for building Bitcoin-based applications.

30 lines (26 loc) 1.02 kB
export enum TransactionInputFlags { /** * Indicates that the input has a coinbase transaction. * @description This flag is used to mark inputs that are part of a coinbase transaction. */ hasCoinbase = 0b00000001, } export enum TransactionOutputFlags { /** * Indicates that the output has a recipient address. * @description This flag is used to mark outputs that have a recipient address. */ hasTo = 0b00000001, /** * Indicates that the output has a scriptPubKey. For example P2PK / OP_RETURN * @description This flag is used to mark outputs that have a scriptPubKey. */ hasScriptPubKey = 0b00000010, /** * Indicates that the output is an OP_RETURN output. This flag must also include the hasScriptPubKey flag. * @description This flag is used to mark outputs that are OP_RETURN type. * @example * const flags = TransactionOutputFlags.hasScriptPubKey | TransactionOutputFlags.OP_RETURN; */ OP_RETURN = 0b00000100, }