lib/pochette/base_trezor_transaction_builder.rb
def address_from_bip32(array)
    if array.first.is_a?(String)
      array.first
    else
      public_keys = array.first.collect do |x|
        MoneyTree::Node.from_bip32(x).node_for_path(array[1].join('/')).public_key.key
      end
      address, _ = Bitcoin.pubkeys_to_p2sh_multisig_address(array.last, *public_keys)
      self.class.force_bip143 ? Cashaddress.from_legacy(address) : address
    end
  end
# Bip32 addresses may look like an address with a bip32 path, or
# an array of xpubs, bip32 path and M (as in M of N) for multisig p2sh addresses.
Bip32 addresses may look like an address with a bip32 path, or
an array of xpubs, bip32 path and M (as in M of N) for multisig p2sh addresses.
Bip32 addresses may look like an address with a bip32 path or an array of xpubs bip32 path and M ( as in M of N ) for multisig p2sh addresses .
def address_from_bip32(array)
    if array.first.is_a?(String)
      array.first
    else
      public_keys = array.first.collect do |x|
        MoneyTree::Node.from_bip32(x).node_for_path(array[1].join('/')).public_key.key
      end
      address, _ = Bitcoin.pubkeys_to_p2sh_multisig_address(array.last, *public_keys)
      self.class.force_bip143 ? Cashaddress.from_legacy(address) : address
    end
  end
def address_from_bip32 ( array ) if array . first . is_a? ( String ) array . first else public_keys = array . first . collect do | x | MoneyTree :: Node . from_bip32 ( x ) . node_for_path ( array [ 1 ] . join ( '/' ) ) . public_key . key end address , _ = Bitcoin . pubkeys_to_p2sh_multisig_address ( array . last , * public_keys ) self . class . force_bip143 ? Cashaddress . from_legacy ( address ) : address end end
Bip32 addresses may look like an address with a bip32 path, or
an array of xpubs, bip32 path and M (as in M of N) for multisig p2sh addresses.
Bip32 addresses may look like an address with a bip32 path or an array of xpubs bip32 path and M ( as in M of N ) for multisig p2sh addresses .
array