class Faker::Blockchain::Aeternity
Public Class Methods
Source
# File lib/faker/blockchain/aeternity.rb, line 16 def address "ak_#{rand_strings}" end
Produces a random Aeternity
wallet address
@return [String]
@example
Faker::Blockchain::Aeternity.address #=> "ak_zvU8YQLagjcfng7Tg8yCdiZ1rpiWNp1PBn3vtUs44utSvbJVR"
Source
# File lib/faker/blockchain/aeternity.rb, line 42 def contract "ct_#{rand_strings}" end
Produces a random Aeternity
contract
@return [String]
@example
Faker::Blockchain::Aeternity.contract #=> "ct_Hk2JsNeWGEYQEHHQCfcBeGrwbhtYSwFTPdDhW2SvjFYVojyhW"
Source
# File lib/faker/blockchain/aeternity.rb, line 55 def oracle "ok_#{rand_strings(51)}" end
Produces a random Aeternity
oracle
@return [String]
@example
Faker::Blockchain::Aeternity.oracle #=> "ok_28QDg7fkF5qiKueSdUvUBtCYPJdmMEoS73CztzXCRAwMGKHKZh"
Source
# File lib/faker/blockchain/aeternity.rb, line 29 def transaction "th_#{rand_strings(51)}" end
Produces a random Aeternity
transaction
@return [String]
@example
Faker::Blockchain::Aeternity.transaction #=> "th_147nDP22h3pHrLt2qykTH4txUwQh1ccaXp"
Protected Class Methods
Source
# File lib/faker/blockchain/aeternity.rb, line 61 def rand_strings(length = 50) hex_alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' var = +'' length.times { var << sample(shuffle(hex_alphabet.chars)) } var end