lib/universa/client.rb in universa-0.1.9 vs lib/universa/client.rb in universa-0.2.1

- old
+ new

@@ -170,13 +170,13 @@ end # Register a single contract (on private network or if you have white key allowing free operations) # on a single node. # - # @param [Contract] contract, muts be sealed ({Contract#seal}) + # @param [Contract] contract must be sealed ({Contract#seal}) # @return [ContractState] of the result. Could contain errors. - def register_single contract + def register_single(contract) retry_with_timeout(15, 3) { result = ContractState.new(execute "approve", packedItem: contract.packed) while result.is_pending sleep(0.1) result = get_state contract @@ -203,11 +203,12 @@ # Execute Universa Node client protocol command with optional keyword arguments that will be passed # to the node. # # @param [String|Symbol] name of the command + # @param kwargs arguments to call # @return [SmartHash] with the command result - def execute name, **kwargs + def execute(name, **kwargs) connection.command name.to_s, *kwargs.to_a.flatten end def to_s "Conn<#{@node_info.url}>"