Class: Faker::Blockchain::Tezos

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

Constant Summary

Constants inherited from Faker::Base

Faker::Base::LLetters, Faker::Base::Letters, Faker::Base::NOT_GIVEN, 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

.accountString

Produces a random Tezos account address

Examples:

Faker::Blockchain::Tezos.
  #=> "tz1eUsgK6aj752Fbxwk5sAoEFvSDnPjZ4qvk"

Returns:

  • (String)

Available since:

  • 1.9.2


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

def 
  encode_tz(:tz1, 20)
end

.blockString

Produces a random Tezos block

Examples:

Faker::Blockchain::Tezos.block
  #=> "BMbhs2rkY1dvAkAyRytvPsjFQ2RiPrBhYkxvWpY65dzkdSuw58a"

Returns:

  • (String)

Available since:

  • 1.9.4


73
74
75
# File 'lib/faker/blockchain/tezos.rb', line 73

def block
  encode_tz(:B, 32)
end

.contractString

Produces a random Tezos contract

Examples:

Faker::Blockchain::Tezos.contract
  #=> "KT1MroqeP15nnitB4CnNfkqHYa2NErhPPLWF"

Returns:

  • (String)

Available since:

  • 1.9.2


45
46
47
# File 'lib/faker/blockchain/tezos.rb', line 45

def contract
  encode_tz(:KT1, 20)
end

.operationString

Produces a random Tezos operation

Examples:

Faker::Blockchain::Tezos.operation
  #=> "onygWYXJX3xNstFLv9PcCrhQdCkENC795xwSinmTEc1jsDN4VDa"

Returns:

  • (String)

Available since:

  • 1.9.2


59
60
61
# File 'lib/faker/blockchain/tezos.rb', line 59

def operation
  encode_tz(:o, 32)
end

.signatureString

Produces a random Tezos signature

Examples:

Faker::Blockchain::Tezos.signature
  #=> "edsigu165B7VFf3Dpw2QABVzEtCxJY2gsNBNcE3Ti7rRxtDUjqTFRpg67EdAQmY6YWPE5tKJDMnSTJDFu65gic8uLjbW2YwGvAZ"

Returns:

  • (String)

Available since:

  • 1.9.2


87
88
89
# File 'lib/faker/blockchain/tezos.rb', line 87

def signature
  encode_tz(:edsig, 64)
end