Class: Faker::Blockchain::Aeternity

Inherits:
Faker::Base show all
Defined in:
lib/faker/blockchain/aeternity.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, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale

Class Method Details

.addressString

Produces a random Aeternity wallet address

Examples:

Faker::Blockchain::Aeternity.address
  #=> "ak_zvU8YQLagjcfng7Tg8yCdiZ1rpiWNp1PBn3vtUs44utSvbJVR"

Returns:

  • (String)


16
17
18
# File 'lib/faker/blockchain/aeternity.rb', line 16

def address
  "ak_#{rand_strings}"
end

.contractString

Produces a random Aeternity contract

Examples:

Faker::Blockchain::Aeternity.contract
  #=> "ct_Hk2JsNeWGEYQEHHQCfcBeGrwbhtYSwFTPdDhW2SvjFYVojyhW"

Returns:

  • (String)


42
43
44
# File 'lib/faker/blockchain/aeternity.rb', line 42

def contract
  "ct_#{rand_strings}"
end

.oracleString

Produces a random Aeternity oracle

Examples:

Faker::Blockchain::Aeternity.oracle
  #=> "ok_28QDg7fkF5qiKueSdUvUBtCYPJdmMEoS73CztzXCRAwMGKHKZh"

Returns:

  • (String)


55
56
57
# File 'lib/faker/blockchain/aeternity.rb', line 55

def oracle
  "ok_#{rand_strings(51)}"
end

.transactionString

Produces a random Aeternity transaction

Examples:

Faker::Blockchain::Aeternity.transaction
  #=> "th_147nDP22h3pHrLt2qykTH4txUwQh1ccaXp"

Returns:

  • (String)


29
30
31
# File 'lib/faker/blockchain/aeternity.rb', line 29

def transaction
  "th_#{rand_strings(51)}"
end