/v1/view

Executes a Move view function with the provided arguments and returns the result. The function must be marked as a view function in the Move module. If a ledger_version is specified and has been pruned, the server will respond with a 410 error.

Query Parameters

ledger_versionstringOptionalformat: "uint64"

The ledger version to use when executing the view. If not provided, the latest version is used. This is a string representing a uint64 to ensure compatibility with JavaScript.

Request

This endpoint expects an object.
functionstringRequired

Fully qualified Move function to execute, in the format {address}::{module name}::{function name}. Both module name and function name are case-sensitive.

type_argumentslist of stringsRequired
Type arguments passed to the function.
argumentslist of stringsRequired
Arguments passed to the function.

Response

Successful execution of view function
string
OR
integer
OR
boolean
OR
list of any
OR
map from strings to any