Sha256: 14780ffdbcebb0df29518d317de31e91c66c01301bd490cd7b213ec0ec1704d6

Contents?: true

Size: 307 Bytes

Versions: 8

Compression:

Stored size: 307 Bytes

Contents

module Stellar
  class MuxedAccount
    def to_keypair
      case arm
      when :ed25519 then KeyPair.from_public_key(value)
      when :med25519 then KeyPair.from_public_key(value.ed25519)
      else
        raise "impossible"
      end
    end

    def address
      to_keypair.address
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stellar-base-0.32.0 lib/stellar/muxed_account.rb
stellar-base-0.31.0 lib/stellar/muxed_account.rb
stellar-base-0.30.0 lib/stellar/muxed_account.rb
stellar-base-0.29.0 lib/stellar/muxed_account.rb
stellar-base-0.28.0 lib/stellar/muxed_account.rb
stellar-base-0.27.0 lib/stellar/muxed_account.rb
stellar-base-0.26.0 lib/stellar/muxed_account.rb
stellar-base-0.25.0 lib/stellar/muxed_account.rb