Class: Bitcoin::Node::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/bitcoin/node/cli.rb

Instance Method Summary collapse

Instance Method Details

#createwallet(wallet_id) ⇒ Object



51
52
53
# File 'lib/bitcoin/node/cli.rb', line 51

def createwallet(wallet_id)
  request('createwallet', wallet_id)
end

#decoderawtransaction(hexstring) ⇒ Object



34
35
36
# File 'lib/bitcoin/node/cli.rb', line 34

def decoderawtransaction(hexstring)
  request('decoderawtransaction', hexstring)
end

#decodescript(hexstring) ⇒ Object



39
40
41
# File 'lib/bitcoin/node/cli.rb', line 39

def decodescript(hexstring)
  request('decodescript', hexstring)
end

#encryptwallet(passhphrase) ⇒ Object



71
72
73
# File 'lib/bitcoin/node/cli.rb', line 71

def encryptwallet(passhphrase)
  request('encryptwallet', passhphrase)
end

#getblockchaininfoObject



13
14
15
# File 'lib/bitcoin/node/cli.rb', line 13

def getblockchaininfo
  request('getblockchaininfo')
end

#getblockheader(hash, verbose = true) ⇒ Object



23
24
25
26
# File 'lib/bitcoin/node/cli.rb', line 23

def getblockheader(hash, verbose = true)
  verbose = verbose.is_a?(String) ? (verbose == 'true') : verbose
  request('getblockheader', hash, verbose)
end

#getnewaddress(account) ⇒ Object



76
77
78
# File 'lib/bitcoin/node/cli.rb', line 76

def getnewaddress()
  request('getnewaddress', )
end

#getpeerinfoObject



29
30
31
# File 'lib/bitcoin/node/cli.rb', line 29

def getpeerinfo
  request('getpeerinfo')
end

#getwalletinfoObject



61
62
63
# File 'lib/bitcoin/node/cli.rb', line 61

def getwalletinfo
  request('getwalletinfo')
end

#listaccountsObject



66
67
68
# File 'lib/bitcoin/node/cli.rb', line 66

def listaccounts
  request('listaccounts')
end

#listwalletsObject



56
57
58
# File 'lib/bitcoin/node/cli.rb', line 56

def listwallets
  request('listwallets')
end

#sendrawtransaction(hex_tx) ⇒ Object



46
47
48
# File 'lib/bitcoin/node/cli.rb', line 46

def sendrawtransaction(hex_tx)
  request('sendrawtransaction', hex_tx)
end

#stopObject



18
19
20
# File 'lib/bitcoin/node/cli.rb', line 18

def stop
  request('stop')
end