Class: Faker::Blockchain::Tezos

Inherits:
Faker::Base show all
Defined in:
lib/faker/blockchain/tezos.rb

Constant Summary collapse

PREFIXES =
{
  tz1:    [6, 161, 159],
  KT1:    [2, 90, 121],
  edpk:   [13, 15, 37, 217],
  edsk:  [13, 15, 58, 7],
  edsig:  [9, 245, 205, 134, 18],
  o:      [5, 116]
}.freeze

Constants inherited from Faker::Base

Faker::Base::Letters, Faker::Base::Numbers, Faker::Base::ULetters

Class Method Summary collapse

Methods inherited from Faker::Base

bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale

Class Method Details

.accountObject



19
20
21
# File 'lib/faker/blockchain/tezos.rb', line 19

def 
  encode_tz(:tz1, 20)
end

.contractObject



23
24
25
# File 'lib/faker/blockchain/tezos.rb', line 23

def contract
  encode_tz(:KT1, 20)
end

.operationObject



27
28
29
# File 'lib/faker/blockchain/tezos.rb', line 27

def operation
  encode_tz(:o, 32)
end

.signatureObject



31
32
33
# File 'lib/faker/blockchain/tezos.rb', line 31

def signature
  encode_tz(:edsig, 64)
end