<?php

namespace BitWasp\Bitcoin\Transaction;

use BitWasp\Bitcoin\Script\ScriptInterface;

interface TransactionInputInterface extends \ArrayAccess
{
    /**
     * The default sequence.
     */
    const SEQUENCE_FINAL = 0xffffffff;

    /**
     * Check whether the transaction is the Coinbase, ie, it has
     * one input which spends the `null` outpoint
     *
     * @return bool
     */
    public function isCoinBase();

    /**
     * @return bool
     */
    public function isFinal();

    /**
     * Return the txid for the transaction being spent
     * @return string
     */
    public function getTransactionId();

    /**
     * Return the nPrevOut for the transaction being spent
     *
     * @return int
     */
    public function getVout();

    /**
     * Get the script in this transaction
     *
     * @return ScriptInterface
     */
    public function getScript();

    /**
     * Set the sequence number for this transaction.
     *
     * @return int
     */
    public function getSequence();
}

<?php

namespace BitWasp\Bitcoin\Transaction;

use BitWasp\Bitcoin\Script\ScriptInterface;

interface TransactionInputInterface extends \ArrayAccess
{
    /**
     * The default sequence.
     */
    const SEQUENCE_FINAL = 0xffffffff;

    /* If this flag set, CTxIn::nSequence is NOT interpreted as a
     * relative lock-time. */
    const SEQUENCE_LOCKTIME_DISABLE_FLAG = 2147483648; // 1 << 31

    /* If CTxIn::nSequence encodes a relative lock-time and this flag
     * is set, the relative lock-time has units of 512 seconds,
     * otherwise it specifies blocks with a granularity of 1. */
    const SEQUENCE_LOCKTIME_TYPE_FLAG = 4194304; // 1 << 22;

    /* If CTxIn::nSequence encodes a relative lock-time, this mask is
     * applied to extract that lock-time from the sequence field. */
    const SEQUENCE_LOCKTIME_MASK = 0x0000ffff;

    /**
     * Check whether the transaction is the Coinbase, ie, it has
     * one input which spends the `null` outpoint
     *
     * @return bool
     */
    public function isCoinBase();

    /**
     * @return bool
     */
    public function isFinal();

    /**
     * Return the txid for the transaction being spent
     * @return string
     */
    public function getTransactionId();

    /**
     * Return the nPrevOut for the transaction being spent
     *
     * @return int
     */
    public function getVout();

    /**
     * Get the script in this transaction
     *
     * @return ScriptInterface
     */
    public function getScript();

    /**
     * Set the sequence number for this transaction.
     *
     * @return int
     */
    public function getSequence();
}

Add constants for CHECKSEQUENCEVERIFY flags
Add constants for CHECKSEQUENCEVERIFY flags
