lib/stellar/key_pair.rb in stellar-base-0.2.0 vs lib/stellar/key_pair.rb in stellar-base-0.3.0

- old
+ new

@@ -25,11 +25,16 @@ secret_key = RbNaCl::SigningKey.generate public_key = secret_key.verify_key new(public_key, secret_key) end + def self.from_network_passphrase(passphrase) + network_id = Digest::SHA256.digest(passphrase) + from_raw_seed network_id + end + def self.master - from_raw_seed("allmylifemyhearthasbeensearching") + from_raw_seed(Stellar.current_network_id) end def initialize(public_key, secret_key=nil) @public_key = public_key @secret_key = secret_key