# sui_getMoveFunctionArgTypes{deprecated} - Sui

> Example code for the sui_getMoveFunctionArgTypes JSON-RPC method. Complete guide on how to use sui_getMoveFunctionArgTypes JSON-RPC in GetBlock Web3 documentation.

This method returns the argument types of a Move function on the SUI network. This is useful for understanding function signatures, building transaction calls, and validating inputs before execution.

> **Warning:** This method is deprecated

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| package | ObjectID | Yes | Package object ID |
| module | string | Yes | Module name |
| function | string | Yes | Function name |

## Request Example

#### cURL

#### cURL

```bash
curl -X POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "sui_getMoveFunctionArgTypes",
  "params": [
    "0xa0a7b108f5023b7356f2c6a4be6f058e267aae38e08260c7d519d8641897490c",
    "suifrens",
    "mint"
  ]
}'
```

#### JavaScript (Axios)

#### request.js

```javascript
const axios = require('axios');

const payload = {
  jsonrpc: '2.0',
  id: 'getblock.io',
  method: 'sui_getMoveFunctionArgTypes',
  params: [
    '0xa0a7b108f5023b7356f2c6a4be6f058e267aae38e08260c7d519d8641897490c',
    'suifrens',
    'mint'
  ]
};

axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));
```

#### Python

#### request.py

```python
import requests

payload = {
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "method": "sui_getMoveFunctionArgTypes",
    "params": [
        "0xa0a7b108f5023b7356f2c6a4be6f058e267aae38e08260c7d519d8641897490c",
        "suifrens",
        "mint"
    ]
}

response = requests.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())
```

#### Rust

#### request.rs

```rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let payload = json!({
        "jsonrpc": "2.0",
        "id": "getblock.io",
        "method": "sui_getMoveFunctionArgTypes",
        "params": [
            "0xa0a7b108f5023b7356f2c6a4be6f058e267aae38e08260c7d519d8641897490c",
            "suifrens",
            "mint"
        ]
    });
    let response = client.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
        .json(&payload).send().await?;
    println!("{}", response.text().await?);
    Ok(())
}
```

## Response Example

#### response.json

```json
{
  "jsonrpc": "2.0",
  "result": [
    "Pure",
    { "Object": "ByMutableReference" },
    { "Object": "ByValue" }
  ],
  "id": "getblock.io"
}
```

## Response Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| result | array | Array of argument type descriptors |

### Argument Types

* `Pure` - Primitive type (u8, u64, bool, address, vector, etc.)
* `Object: ByValue` - Object passed by value (consumed)
* `Object: ByImmutableReference` - Immutable object reference
* `Object: ByMutableReference` - Mutable object reference

## Use Cases

* Build transaction calls programmatically
* Validate function parameters
* Generate type-safe SDK code
* Document smart contract interfaces

## Error Handling

| Error Code | Description |
| --- | --- |
| -32602 | Invalid params - invalid package/module/function |
| -32603 | Internal error - node issues |
| FunctionNotFound | Function does not exist |

## SDK Integration

#### Sui TypeScript SDK

#### sdk.ts

```typescript
import { SuiClient } from '@mysten/sui/client';

const client = new SuiClient({ url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' });
const argTypes = await client.getMoveFunctionArgTypes({
  package: '0xa0a7b108f5023b7356f2c6a4be6f058e267aae38e08260c7d519d8641897490c',
  module: 'suifrens',
  function: 'mint'
});
console.log(argTypes);
```

#### Sui Rust SDK

#### sdk.rs

```rust
use sui_sdk::SuiClientBuilder;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
    let sui = SuiClientBuilder::default().build("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/").await?;
    let arg_types = sui.read_api().get_move_function_arg_types(
        "0xa0a7b108f5023b7356f2c6a4be6f058e267aae38e08260c7d519d8641897490c".parse()?,
        "suifrens",
        "mint"
    ).await?;
    println!("{:?}", arg_types);
    Ok(())
}
```
