lib/zold/signature.rb
# The transaction is valid? Returns true if it is.
# +pub+:: Public key of the wallet
# +id+:: Paying wallet ID
# +txn+: Transaction to validate
The transaction is valid. Returns true if it is.
The transaction is valid . Returns true if it is .
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?
The transaction is valid?
pub
<not_specific>
id
<not_specific>
txn
<not_specific>