sui_getNormalizedMoveModule

Move Utils

Return a structured representation of Move module

Parameters

KeyRequiredType
packageObjectID
module_nameString
"params": [
  "0x0000000000000000000000000000000000000000000000000000000000000002",
  "bag"
]

Result

SuiMoveNormalizedModule : <SuiMoveNormalizedModule>

  • address : <string>
  • exposedFunctions : <object>
  • fileFormatVersion : <uint32>
  • friends : <[SuiMoveModuleId]>
  • name : <string>
  • structs : <object>

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sui_getNormalizedMoveModule",
  "params": [
    "0x0000000000000000000000000000000000000000000000000000000000000002",
    "bag"
  ]
}
'

Response

{
    "jsonrpc": "2.0",
    "result": {
        "fileFormatVersion": 6,
        "address": "0x2",
        "name": "bag",
        "friends": [],
        "structs": {
            "Bag": {
                "abilities": {
                    "abilities": [
                        "Store",
                        "Key"
                    ]
                },
                "typeParameters": [],
                "fields": [
                    {
                        "name": "id",
                        "type": {
                            "Struct": {
                                "address": "0x2",
                                "module": "object",
                                "name": "UID",
                                "typeArguments": []
                            }
                        }
                    },
                    {
                        "name": "size",
                        "type": "U64"
                    }
                ]
            }
        },
        "exposedFunctions": {
            "add": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [
                    {
                        "abilities": [
                            "Copy",
                            "Drop",
                            "Store"
                        ]
                    },
                    {
                        "abilities": [
                            "Store"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "MutableReference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "bag",
                                "name": "Bag",
                                "typeArguments": []
                            }
                        }
                    },
                    {
                        "TypeParameter": 0
                    },
                    {
                        "TypeParameter": 1
                    }
                ],
                "return": []
            },
            "borrow": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [
                    {
                        "abilities": [
                            "Copy",
                            "Drop",
                            "Store"
                        ]
                    },
                    {
                        "abilities": [
                            "Store"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "Reference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "bag",
                                "name": "Bag",
                                "typeArguments": []
                            }
                        }
                    },
                    {
                        "TypeParameter": 0
                    }
                ],
                "return": [
                    {
                        "Reference": {
                            "TypeParameter": 1
                        }
                    }
                ]
            },
            "borrow_mut": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [
                    {
                        "abilities": [
                            "Copy",
                            "Drop",
                            "Store"
                        ]
                    },
                    {
                        "abilities": [
                            "Store"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "MutableReference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "bag",
                                "name": "Bag",
                                "typeArguments": []
                            }
                        }
                    },
                    {
                        "TypeParameter": 0
                    }
                ],
                "return": [
                    {
                        "MutableReference": {
                            "TypeParameter": 1
                        }
                    }
                ]
            },
            "contains": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [
                    {
                        "abilities": [
                            "Copy",
                            "Drop",
                            "Store"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "Reference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "bag",
                                "name": "Bag",
                                "typeArguments": []
                            }
                        }
                    },
                    {
                        "TypeParameter": 0
                    }
                ],
                "return": [
                    "Bool"
                ]
            },
            "contains_with_type": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [
                    {
                        "abilities": [
                            "Copy",
                            "Drop",
                            "Store"
                        ]
                    },
                    {
                        "abilities": [
                            "Store"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "Reference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "bag",
                                "name": "Bag",
                                "typeArguments": []
                            }
                        }
                    },
                    {
                        "TypeParameter": 0
                    }
                ],
                "return": [
                    "Bool"
                ]
            },
            "destroy_empty": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [],
                "parameters": [
                    {
                        "Struct": {
                            "address": "0x2",
                            "module": "bag",
                            "name": "Bag",
                            "typeArguments": []
                        }
                    }
                ],
                "return": []
            },
            "is_empty": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [],
                "parameters": [
                    {
                        "Reference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "bag",
                                "name": "Bag",
                                "typeArguments": []
                            }
                        }
                    }
                ],
                "return": [
                    "Bool"
                ]
            },
            "length": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [],
                "parameters": [
                    {
                        "Reference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "bag",
                                "name": "Bag",
                                "typeArguments": []
                            }
                        }
                    }
                ],
                "return": [
                    "U64"
                ]
            },
            "new": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [],
                "parameters": [
                    {
                        "MutableReference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "tx_context",
                                "name": "TxContext",
                                "typeArguments": []
                            }
                        }
                    }
                ],
                "return": [
                    {
                        "Struct": {
                            "address": "0x2",
                            "module": "bag",
                            "name": "Bag",
                            "typeArguments": []
                        }
                    }
                ]
            },
            "remove": {
                "visibility": "Public",
                "isEntry": false,
                "typeParameters": [
                    {
                        "abilities": [
                            "Copy",
                            "Drop",
                            "Store"
                        ]
                    },
                    {
                        "abilities": [
                            "Store"
                        ]
                    }
                ],
                "parameters": [
                    {
                        "MutableReference": {
                            "Struct": {
                                "address": "0x2",
                                "module": "bag",
                                "name": "Bag",
                                "typeArguments": []
                            }
                        }
                    },
                    {
                        "TypeParameter": 0
                    }
                ],
                "return": [
                    {
                        "TypeParameter": 1
                    }
                ]
            }
        }
    },
    "id": 1
}
Language
Click Try It! to start a request and see the response here!