Sha256: 8f8bb175bb0ef68a88dc18a33d199a2dae6c7c854663cb4cc2655d587bba7782

Contents?: true

Size: 355 Bytes

Versions: 1

Compression:

Stored size: 355 Bytes

Contents

module BitShares
	class Rpc < Hash

		def initialize *args, name, params
			id, api_id = *args
			if api_id.nil?
				api_id = id
				id = 1
			end
			self[:method] = 'call'
			self[:id] = id
			self[:jsonrpc] = '2.0'
			self[:params] = [api_id || API.get_id_by_name(name), name, params]
		end

		def send
			WSocket.send self
		end

	end

	RPC = Rpc

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bitsharesws-0.0.4 lib/bitshares/rpc.rb