Module: TezosClient::RpcInterface::Operations
- Included in:
- TezosClient::RpcInterface
- Defined in:
- lib/tezos_client/rpc_interface/operations.rb
Instance Method Summary collapse
- #broadcast_operation(data) ⇒ Object
- #forge_operations(operations:, **options) ⇒ Object
- #preapply_operations(operations:, **options) ⇒ Object
- #run_operations(operations:, **options) ⇒ Object
Instance Method Details
#broadcast_operation(data) ⇒ Object
39 40 41 |
# File 'lib/tezos_client/rpc_interface/operations.rb', line 39 def broadcast_operation(data) post("injection/operation?chain=main", data) end |
#forge_operations(operations:, **options) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/tezos_client/rpc_interface/operations.rb', line 31 def forge_operations(operations:, **) content = { branch: .fetch(:branch), contents: operations } post("chains/main/blocks/head/helpers/forge/operations", content) end |
#preapply_operations(operations:, **options) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/tezos_client/rpc_interface/operations.rb', line 8 def preapply_operations(operations:, **) content = { protocol: .fetch(:protocol), branch: .fetch(:branch), contents: operations, signature: .fetch(:signature) } res = post("chains/main/blocks/head/helpers/preapply/operations", [content]) res[0]["contents"] end |
#run_operations(operations:, **options) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/tezos_client/rpc_interface/operations.rb', line 21 def run_operations(operations:, **) content = { branch: .fetch(:branch), contents: operations, signature: .fetch(:signature) } res = post("chains/main/blocks/head/helpers/scripts/run_operation", content) res["contents"] end |