Class: OBC::Connection
- Inherits:
-
Object
- Object
- OBC::Connection
- Defined in:
- lib/openblockchain-ruby.rb
Instance Method Summary collapse
-
#deploy(path, *init_args) ⇒ Object
“github.com/openblockchain/obc-peer/openchain/example/chaincode/chaincode_example02”, “a”, “1000”, “b”, “2000”.
- #invoke(chaincode_name, *args) ⇒ Object
- #post_registrar ⇒ Object
- #query(chaincode_name, *args) ⇒ Object
Instance Method Details
#deploy(path, *init_args) ⇒ Object
“github.com/openblockchain/obc-peer/openchain/example/chaincode/chaincode_example02”, “a”, “1000”, “b”, “2000”
10 11 12 |
# File 'lib/openblockchain-ruby.rb', line 10 def deploy(path, *init_args) # "github.com/openblockchain/obc-peer/openchain/example/chaincode/chaincode_example02", "a", "1000", "b", "2000" post('/devops/deploy', deploy_payload(path, *init_args)) end |
#invoke(chaincode_name, *args) ⇒ Object
14 15 16 |
# File 'lib/openblockchain-ruby.rb', line 14 def invoke(chaincode_name, *args) post('/devops/invoke', invoke_payload(chaincode_name, *args)) end |
#post_registrar ⇒ Object
6 7 8 |
# File 'lib/openblockchain-ruby.rb', line 6 def post_registrar post('/registrar', registrar_payload) end |
#query(chaincode_name, *args) ⇒ Object
18 19 20 |
# File 'lib/openblockchain-ruby.rb', line 18 def query(chaincode_name, *args) post('/devops/query', query_payload(chaincode_name, *args)) end |