Home

Get function

POST
https://sui-grpc.nownodes.io/sui.rpc.v2.MovePackageService/GetFunction

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns a function descriptor from a Move package module.

gRPC method: sui.rpc.v2.MovePackageService.GetFunction (unary).

This is a gRPC method (HTTP/2, Protocol Buffers), not a REST endpoint. The request and response bodies below are shown in the proto3 JSON form that tools such as grpcurl and Postman accept and print. Pass your NOWNodes API key as the api-key gRPC metadata header. Proto files: sui/rpc/v2/move_package_service.proto.

Example grpcurl request:

Copied!
grpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -emit-defaults \
  -proto './sui-apis-grpc/proto/sui/rpc/v2/move_package_service.proto' \
  -import-path './sui-apis-grpc/proto' \
  -d '{"packageId": "0xPACKAGE_ID", "moduleName": "module_name", "name": "function_name"}' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.MovePackageService.GetFunction

Body

application/json
packageIdstring

Required. The storage_id of the requested package.

moduleNamestring

Required. The name of the requested module.

namestring

Required. The name of the requested function.

Response

200OK

Successful response.

default

gRPC error. The status code (e.g. UNAUTHENTICATED, INVALID_ARGUMENT, NOT_FOUND) is returned in the grpc-status trailer, details in grpc-message.