Sha256: acde0f29809ece42cb5c78b3c5c4fb609b246f86a1f20b59d006792650f13a44

Contents?: true

Size: 453 Bytes

Versions: 6

Compression:

Stored size: 453 Bytes

Contents

# A struct that represents an account address.
# Currently Public Key is used.

module Libra
  class AccountAddress
	ADDRESS_LENGTH = 32;

	SHORT_STRING_LENGTH = 4;

	LIBRA_NETWORK_ID_SHORT = "lb";

	attr_accessor :addr
	attr_accessor :hex

	def initialize(hex_literal)
		@hex = hex_literal
		@addr = [hex_literal].pack('H*')
  	end

	def self.hex_to_bytes(hex_literal)
		[hex_literal].pack('H*')
	end

	def self.from_public_key
		#TODO
	end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
libra_client-0.2.1 lib/libra/account_address.rb
libra_client-0.1.7 lib/libra/account_address.rb
libra_client-0.1.6 lib/libra/account_address.rb
libra_client-0.1.5 lib/libra/account_address.rb
libra_client-0.1.3 lib/libra/account_address.rb
libra_client-0.1.2 lib/libra/account_address.rb