Class: Faker::Blockchain::Bitcoin

Inherits:
Faker::Base show all
Defined in:
lib/faker/blockchain/bitcoin.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, translate, unique, with_locale

Class Method Details

.addressString

Produces a Bitcoin wallet address

Examples:

Faker::Blockchain::Bitcoin.address
  #=> "147nDP22h3pHrLt2qykTH4txUwQh1ccaXp"

Returns:

  • (String)

Available since:

  • 1.9.2



26
27
28
# File 'lib/faker/blockchain/bitcoin.rb', line 26

def address
  address_for(:main)
end

.testnet_addressString

Produces a Bitcoin testnet address

Examples:

Faker::Blockchain::Bitcoin.testnet_address
  #=> "n4YjRyYD6V6zREpk6opqESDqD3KYnMdVEB"

Returns:

  • (String)

Available since:

  • 1.9.2



40
41
42
# File 'lib/faker/blockchain/bitcoin.rb', line 40

def testnet_address
  address_for(:testnet)
end