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],
  B:     [1, 52],
  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


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

def 
  encode_tz(:tz1, 20)
end

.blockObject


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

def block
  encode_tz(:B, 32)
end

.contractObject


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

def contract
  encode_tz(:KT1, 20)
end

.operationObject


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

def operation
  encode_tz(:o, 32)
end

.signatureObject


36
37
38
# File 'lib/faker/blockchain/tezos.rb', line 36

def signature
  encode_tz(:edsig, 64)
end