Class: IOTA::API::Commands
- Inherits:
-
Object
- Object
- IOTA::API::Commands
- Defined in:
- lib/iota/api/commands.rb
Instance Method Summary collapse
- #addNeighbors(uris) ⇒ Object
- #attachToTangle(trunkTransaction, branchTransaction, minWeightMagnitude, trytes) ⇒ Object
- #broadcastTransactions(trytes) ⇒ Object
- #checkConsistency(tails) ⇒ Object
- #findTransactions(searchValues) ⇒ Object
- #getBalances(addresses, threshold) ⇒ Object
- #getInclusionStates(transactions, tips) ⇒ Object
- #getMissingTransactions ⇒ Object
- #getNeighbors ⇒ Object
- #getNodeAPIConfiguration ⇒ Object
- #getNodeInfo ⇒ Object
- #getTips ⇒ Object
- #getTransactionsToApprove(depth, reference = nil) ⇒ Object
- #getTrytes(hashes) ⇒ Object
- #interruptAttachingToTangle ⇒ Object
- #removeNeighbors(uris) ⇒ Object
- #storeTransactions(trytes) ⇒ Object
- #wereAddressesSpentFrom(addresses) ⇒ Object
Instance Method Details
#addNeighbors(uris) ⇒ Object
45 46 47 48 49 50 |
# File 'lib/iota/api/commands.rb', line 45 def addNeighbors(uris) { command: 'addNeighbors', uris: uris } end |
#attachToTangle(trunkTransaction, branchTransaction, minWeightMagnitude, trytes) ⇒ Object
70 71 72 73 74 75 76 77 78 |
# File 'lib/iota/api/commands.rb', line 70 def attachToTangle(trunkTransaction, branchTransaction, minWeightMagnitude, trytes) { command: 'attachToTangle', trunkTransaction: trunkTransaction, branchTransaction: branchTransaction, minWeightMagnitude: minWeightMagnitude, trytes: trytes } end |
#broadcastTransactions(trytes) ⇒ Object
84 85 86 87 88 89 |
# File 'lib/iota/api/commands.rb', line 84 def broadcastTransactions(trytes) { command: 'broadcastTransactions', trytes: trytes } end |
#checkConsistency(tails) ⇒ Object
98 99 100 101 102 103 |
# File 'lib/iota/api/commands.rb', line 98 def checkConsistency(tails) { command: 'checkConsistency', tails: tails } end |
#findTransactions(searchValues) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/iota/api/commands.rb', line 4 def findTransactions(searchValues) command = { command: 'findTransactions' } searchValues.each { |k, v| command[k.to_sym] = v } command end |
#getBalances(addresses, threshold) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/iota/api/commands.rb', line 14 def getBalances(addresses, threshold) { command: 'getBalances', addresses: addresses, threshold: threshold } end |
#getInclusionStates(transactions, tips) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/iota/api/commands.rb', line 29 def getInclusionStates(transactions, tips) { command: 'getInclusionStates', transactions: transactions, tips: tips } end |
#getMissingTransactions ⇒ Object
116 117 118 |
# File 'lib/iota/api/commands.rb', line 116 def getMissingTransactions { command: 'getMissingTransactions' } end |
#getNeighbors ⇒ Object
41 42 43 |
# File 'lib/iota/api/commands.rb', line 41 def getNeighbors { command: 'getNeighbors' } end |
#getNodeAPIConfiguration ⇒ Object
112 113 114 |
# File 'lib/iota/api/commands.rb', line 112 def getNodeAPIConfiguration { command: 'getNodeAPIConfiguration' } end |
#getNodeInfo ⇒ Object
37 38 39 |
# File 'lib/iota/api/commands.rb', line 37 def getNodeInfo { command: 'getNodeInfo'} end |
#getTips ⇒ Object
59 60 61 |
# File 'lib/iota/api/commands.rb', line 59 def getTips { command: 'getTips' } end |
#getTransactionsToApprove(depth, reference = nil) ⇒ Object
63 64 65 66 67 68 |
# File 'lib/iota/api/commands.rb', line 63 def getTransactionsToApprove(depth, reference = nil) { command: 'getTransactionsToApprove', depth: depth }.merge(reference.nil? ? {} : { reference: reference }) end |
#getTrytes(hashes) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/iota/api/commands.rb', line 22 def getTrytes(hashes) { command: 'getTrytes', hashes: hashes } end |
#interruptAttachingToTangle ⇒ Object
80 81 82 |
# File 'lib/iota/api/commands.rb', line 80 def interruptAttachingToTangle { command: 'interruptAttachingToTangle' } end |
#removeNeighbors(uris) ⇒ Object
52 53 54 55 56 57 |
# File 'lib/iota/api/commands.rb', line 52 def removeNeighbors(uris) { command: 'removeNeighbors', uris: uris } end |
#storeTransactions(trytes) ⇒ Object
91 92 93 94 95 96 |
# File 'lib/iota/api/commands.rb', line 91 def storeTransactions(trytes) { command: 'storeTransactions', trytes: trytes } end |
#wereAddressesSpentFrom(addresses) ⇒ Object
105 106 107 108 109 110 |
# File 'lib/iota/api/commands.rb', line 105 def wereAddressesSpentFrom(addresses) { command: 'wereAddressesSpentFrom', addresses: addresses } end |