Method: Stellar::SignerKey#to_s

Defined in:
lib/stellar/signer_key.rb

#to_sObject



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/stellar/signer_key.rb', line 22

def to_s
  case switch
  when SignerKeyType.signer_key_type_ed25519
    address = Stellar::Convert.pk_to_address(self)
    "ed25519: #{address}"
  when SignerKeyType.signer_key_type_pre_auth_tx
    tx = Stellar::Convert.to_hex(pre_auth_tx!)
    "pre_auth_tx: #{tx}"
  when SignerKeyType.signer_key_type_hash_x
    hx = Stellar::Convert.to_hex(hash_x!)
    "hash_x: #{hx}"
  end
end