View

View Api

Deprecated

Execute view function (v1)

post

Execute the Move function with the given parameters and return its execution result.

Example

{
  "function": "0x1::timestamp::now_microseconds",
  "type_arguments": [],
  "arguments": []
}
Body

View request for the Move View Function API.

functionobjectRequired
type_argumentsobjectRequired

Type arguments of the function

argumentsobjectRequired

Arguments of the function

Responses
200
Result of view function
application/json
Responseone of
nullOptional
or
post
POST /rpc/v1/view HTTP/1.1
Host: rpc-mainnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 50

{
  "function": {},
  "type_arguments": {},
  "arguments": {}
}
200

Result of view function

No content

Execute view function (v2)

post

Example

{
  "function": "0x1::timestamp::now_microseconds",
  "type_arguments": [],
  "arguments": []
}
Body

View request for the Move View Function API.

functionobjectRequired
type_argumentsobjectRequired

Type arguments of the function

argumentsobjectRequired

Arguments of the function

Responses
200
Result of view function
application/json
post
POST /rpc/v2/view HTTP/1.1
Host: rpc-mainnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 50

{
  "function": {},
  "type_arguments": {},
  "arguments": {}
}
200

Result of view function

{
  "result": [
    {
      "U8": 1
    }
  ]
}

Execute view function (v3)

post

Example

{
  "function": "0x1::timestamp::now_microseconds",
  "type_arguments": [],
  "arguments": []
}
Body

View request for the Move View Function API.

functionobjectRequired
type_argumentsobjectRequired

Type arguments of the function

argumentsobjectRequired

Arguments of the function

Responses
200
Result of view function
application/json
post
POST /rpc/v3/view HTTP/1.1
Host: rpc-mainnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 50

{
  "function": {},
  "type_arguments": {},
  "arguments": {}
}
200

Result of view function

{
  "result": [
    {
      "U8": 1
    }
  ]
}