Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions kin/blockchain/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ def __init__(self, name, horizon_endpoint_uri, network_passphrase, friendbot_url

# Calculate the hash of the passphrase, can be used to calculate tx hash.
self.passphrase_hash = sha256(network_passphrase.encode()).digest()

def __str__(self):
string_representation = '<Kin Environment>: Name: {}, ' \
'Horizon: {}, ' \
'Passphrase: {}'.format(self.name, self.horizon_uri, NETWORKS[self.name.upper()])
return string_representation
4 changes: 4 additions & 0 deletions kin/blockchain/keypair.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,7 @@ def generate_hd_seed(base_seed, salt):
# Create a new raw seed from this hash
raw_seed = sha256((base_seed + salt).encode()).digest()
return BaseKeypair.from_raw_seed(raw_seed).seed().decode()

def __str__(self):
string_representation = '<Kin Keypair>: Address: {}, Seed: {}'.format(self.public_address, self.secret_seed)
return string_representation
2 changes: 1 addition & 1 deletion kin/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.3.0"
__version__ = "2.3.1"