def valid?(pub, id, txn)
      raise 'pub must be of type Key' unless pub.is_a?(Key)
      raise 'id must be of type Id' unless id.is_a?(Id)
      raise 'txn must be of type Txn' unless txn.is_a?(Txn)
      pub.verify(txn.sign, body(id, txn)) && (@network != Wallet::MAINET || !id.root? || pub.root?)
    end
def valid?(pub, id, txn)
      raise 'pub must be of type Key' unless pub.is_a?(Key)
      raise 'id must be of type Id' unless id.is_a?(Id)
      raise 'txn must be of type Txn' unless txn.is_a?(Txn)
      pub.verify(txn.sign, body(id, txn)) && (@network != Wallet::MAINET || !id.root? || pub.root?)
    end
The transaction is valid? Returns true if it is.
 +pub+:: Public key of the wallet
 +id+:: Paying wallet ID
 +txn+: Transaction to validate