Home

gRPC — added methods

Endpoint:

Endpoint:

Copied!
iota-grpc.nownodes.io

Authentication:

Copied!
api-key: YOUR_API_KEY

Official proto sources:

Copied!
https://github.com/iotaledger/iota
https://github.com/iotaledger/iota-rust-sdk

iota.grpc.v1.transaction_execution_service.TransactionExecutionService

ViewFunctionCalls

Description: Calls one or more Move functions annotated with #[view] through the iota.grpc.v1.transaction_execution_service.TransactionExecutionService gRPC service and returns their values without producing on-chain effects and without gas. Each call runs in its own dev-inspect transaction, in request order, so one call aborting or being rejected does not affect the others. A call is given by its fully qualified name <package>::<module>::<function>, optional typeArgs for a generic function, and inputs in declaration order; each input is either BCS bytes (bcs) or JSON (json) that the node encodes against the parameter's Move type (pass numbers as strings). Each result is one of: callOutputs.returnValues (the call returned), callOutputs.executionError (the call aborted), or error (the server rejected the call: not a #[view] function, unknown package/module/function, or an argument that could not be resolved). By default at most 20 calls are accepted per request (max_view_function_call_batch_size), and a call larger than max_tx_size_bytes is rejected with InvalidArgument. The default read_mask is execution_result. On Mainnet, #[view] functions are available from protocol version 36 (no earlier than epoch 507, September 24, 2026). Full method:

Copied!
iota.grpc.v1.transaction_execution_service.TransactionExecutionService/ViewFunctionCalls

Request:

Copied!
{
  "viewFunctionCalls": [
    {
      "fqFunctionName": "PACKAGE_ID::counter::value",
      "inputs": [
        {
          "json": "COUNTER_OBJECT_ID"
        }
      ]
    }
  ]
}

Example:

Copied!
grpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -d '{"viewFunctionCalls":[{"fqFunctionName":"PACKAGE_ID::counter::value","inputs":[{"json":"COUNTER_OBJECT_ID"}]}]}' \
  'iota-grpc.nownodes.io' \
  iota.grpc.v1.transaction_execution_service.TransactionExecutionService/ViewFunctionCalls

Replace PACKAGE_ID and COUNTER_OBJECT_ID with a published package that declares a #[view] function and the object it reads.