class Faker::Blockchain::Tezos
def account
-
(String)
-
def account encode_tz(:tz1, 20) end
def block
-
(String)
-
def block encode_tz(:B, 32) end
def contract
-
(String)
-
def contract encode_tz(:KT1, 20) end
def encode_tz(prefix, payload_size)
-
(String)
-
Parameters:
-
payload_size
(Integer
) -- The size of the payload -
prefix
(Symbol
) --
def encode_tz(prefix, payload_size) prefix = PREFIXES.fetch(prefix) packed = prefix.map(&:chr).join + Faker::Config.random.bytes(payload_size) checksum = OpenSSL::Digest::SHA256.digest(OpenSSL::Digest::SHA256.digest(packed))[0..3] Faker::Base58.encode(packed + checksum) end
def operation
-
(String)
-
def operation encode_tz(:o, 32) end
def public_key
-
(String)
-
def public_key encode_tz(:edpk, 32) end
def secret_key
-
(String)
-
def secret_key encode_tz(:edsk, 32) end
def signature
-
(String)
-
def signature encode_tz(:edsig, 64) end