# Stellar RWA

### /settrustline

Implement a trustline between issuer and distributor.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/rwa/settrustline`

#### Request Body

| Name                                        | Type   | Description                                                                          |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------------------ |
| rpc                                         | String | Remote procedural call URL.                                                          |
| chainId<mark style="color:red;">\*</mark>   | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| chainSymbol                                 | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| from<mark style="color:red;">\*</mark>      | String | Public address of the distributor of asset.                                          |
| amount<mark style="color:red;">\*</mark>    | String | The amount of asset to set trustline for.                                            |
| issuer<mark style="color:red;">\*</mark>    | String | Public address of the issuer of the asset.                                           |
| assetCode<mark style="color:red;">\*</mark> | String | The code of asset to set trustline for.                                              |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "chainId": "1500",
    "from": "GAJ4BSGJE6UQHZAZ5U5IUOABPDCYPKPS3RFS2NVNGFGFXGVQDLBQJW2P",
    "amount": "100",
    "issuer": "GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M",
    "assetCode": "VELO"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1500",
        "from": "GAJ4BSGJE6UQHZAZ5U5IUOABPDCYPKPS3RFS2NVNGFGFXGVQDLBQJW2P",
        "gas": "100",
        "data": "AAAAAgAAAAATwMjJJ6kD5BntOoo4AXjFh6ny3EstNq0xTFuasBrDBAAAAGQB5rJlAAH24AAAAAEAAAAAAAAAAAAAAABmD8FoAAAAAAAAAAEAAAAAAAAABgAAAAFWRUxPAAAAANnIwpCFKyVAH5eIz9w5fsojH5D4l+mAMPh0EiekiCLNAAAAADuaygAAAAAAAAAAAA=="
    }
}
```

{% endtab %}
{% endtabs %}

### /issue

Executes a payment operation to create (or mint) an asset on the Stellar network.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/rwa/issue`

#### Request Body

| Name                                        | Type   | Description                                                                          |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------------------ |
| rpc                                         | String | Remote procedural call URL.                                                          |
| chainId<mark style="color:red;">\*</mark>   | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| chainSymbol                                 | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| issuer<mark style="color:red;">\*</mark>    | String | Public address of the issuer of the asset.                                           |
| assetCode<mark style="color:red;">\*</mark> | String | The code of asset to be issued.                                                      |
| amount<mark style="color:red;">\*</mark>    | String | The amount at asset to be issued.                                                    |
| to<mark style="color:red;">\*</mark>        | String | The public address of the distributor.                                               |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "chainId": "1500",
    "issuer": "GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M",
    "assetCode": "ExpandDollar",
    "amount": "54",
    "to": "GAJ4BSGJE6UQHZAZ5U5IUOABPDCYPKPS3RFS2NVNGFGFXGVQDLBQJW2P"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1500",
        "from": "GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M",
        "gas": "100",
        "data": "AAAAAgAAAADZyMKQhSslQB+XiM/cOX7KIx+Q+JfpgDD4dBInpIgizQAAAGQB5a+YAAAAAwAAAAEAAAAAAAAAAAAAAABmD77nAAAAAAAAAAEAAAAAAAAAAQAAAAATwMjJJ6kD5BntOoo4AXjFh6ny3EstNq0xTFuasBrDBAAAAAJFeHBhbmREb2xsYXIAAAAA2cjCkIUrJUAfl4jP3Dl+yiMfkPiX6YAw+HQSJ6SIIs0AAAAAIC+/AAAAAAAAAAAA"
    }
}
```

{% endtab %}
{% endtabs %}

### /transfer

Trigger a payment operation to send an amount in a specific asset (XLM or non-XLM) to a destination account.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/rwa/transfer`

#### Request Body

| Name                                        | Type   | Description                                                                          |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------------------ |
| rpc                                         | String | Remote procedural call URL.                                                          |
| chainId<mark style="color:red;">\*</mark>   | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| chainSymbol                                 | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| from<mark style="color:red;">\*</mark>      | String | Public address of sender of asset.                                                   |
| to<mark style="color:red;">\*</mark>        | String | Public address of the receiver   of the asset.                                       |
| amount<mark style="color:red;">\*</mark>    | String | Amount of asset to transfer.                                                         |
| issuer<mark style="color:red;">\*</mark>    | String | Public address of the issuer of the asset.                                           |
| assetCode<mark style="color:red;">\*</mark> | String | The code of the asset to transfer.                                                   |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "chainId": "1500",
    "from": "GAJ4BSGJE6UQHZAZ5U5IUOABPDCYPKPS3RFS2NVNGFGFXGVQDLBQJW2P",
    "to": "GDUY7J7A33TQWOSOQGDO776GGLM3UQERL4J3SPT56F6YS4ID7MLDERI4",
    "amount": "100",
    "issuer": "GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M",
    "assetCode": "VELO"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1500",
        "from": "GAJ4BSGJE6UQHZAZ5U5IUOABPDCYPKPS3RFS2NVNGFGFXGVQDLBQJW2P",
        "to": "GDUY7J7A33TQWOSOQGDO776GGLM3UQERL4J3SPT56F6YS4ID7MLDERI4",
        "gas": "100",
        "data": "AAAAAgAAAAATwMjJJ6kD5BntOoo4AXjFh6ny3EstNq0xTFuasBrDBAAAAGQB5rJlAAH24AAAAAEAAAAAAAAAAAAAAABmD8BMAAAAAAAAAAEAAAAAAAAAAQAAAADpj6fg3ucLOk6Bhu//xjLZukCRXxO5Pn3xfYlxA/sWMgAAAAFWRUxPAAAAANnIwpCFKyVAH5eIz9w5fsojH5D4l+mAMPh0EiekiCLNAAAAADuaygAAAAAAAAAAAA=="
    }
}
```

{% endtab %}
{% endtabs %}

### /burn

Executes a transaction to burn or delete an asset.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/rwa/burn`

#### Request Body

| Name                                        | Type   | Description                                                                          |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------------------ |
| rpc                                         | String | Remote procedural call URL.                                                          |
| chainId<mark style="color:red;">\*</mark>   | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| chainSymbol                                 | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| from<mark style="color:red;">\*</mark>      | String | Public address of the distributor of asset.                                          |
| amount<mark style="color:red;">\*</mark>    | String | The amount of asset to burn                                                          |
| issuer<mark style="color:red;">\*</mark>    | String | Public address of the issuer of the asset.                                           |
| assetCode<mark style="color:red;">\*</mark> | String | The code of asset to burn                                                            |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
  "chainId": "1500",
  "from": "GAJ4BSGJE6UQHZAZ5U5IUOABPDCYPKPS3RFS2NVNGFGFXGVQDLBQJW2P",
  "amount": "100",
  "issuer": "GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M",
  "assetCode": "VELO"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1500",
        "from": "GAJ4BSGJE6UQHZAZ5U5IUOABPDCYPKPS3RFS2NVNGFGFXGVQDLBQJW2P",
        "gas": "100",
        "data": "AAAAAgAAAAATwMjJJ6kD5BntOoo4AXjFh6ny3EstNq0xTFuasBrDBAAAAGQB5rJlAAH24AAAAAEAAAAAAAAAAAAAAABmD8C0AAAAAAAAAAEAAAAAAAAAAQAAAADZyMKQhSslQB+XiM/cOX7KIx+Q+JfpgDD4dBInpIgizQAAAAFWRUxPAAAAANnIwpCFKyVAH5eIz9w5fsojH5D4l+mAMPh0EiekiCLNAAAAADuaygAAAAAAAAAAAA=="
    }
}
```

{% endtab %}
{% endtabs %}

### /freeze

Executes a transaction to revoke an existing trustline’s authorization, thereby freezing the asset held by an account.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/rwa/freeze`

#### Request Body

| Name                                        | Type   | Description                                                                          |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------------------ |
| rpc                                         | String | Remote procedural call URL.                                                          |
| chainId<mark style="color:red;">\*</mark>   | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| chainSymbol                                 | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| user<mark style="color:red;">\*</mark>      | String | Public address of user to be freezed.                                                |
| issuer<mark style="color:red;">\*</mark>    | String | Public address of the issuer of the asset.                                           |
| assetCode<mark style="color:red;">\*</mark> | String | The code of the asset to freeze                                                      |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "chainId": "1500",
    "user": "GAJ4BSGJE6UQHZAZ5U5IUOABPDCYPKPS3RFS2NVNGFGFXGVQDLBQJW2P",
    "issuer": "GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M",
    "assetCode": "VELO"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1500",
        "from": "GDM4RQUQQUVSKQA7S6EM7XBZP3FCGH4Q7CL6TABQ7B2BEJ5ERARM2M5M",
        "gas": "100",
        "data": "AAAAAgAAAADZyMKQhSslQB+XiM/cOX7KIx+Q+JfpgDD4dBInpIgizQAAAMgB5a+YAAAAAwAAAAEAAAAAAAAAAAAAAABmD8EjAAAAAAAAAAIAAAAAAAAABQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAATwMjJJ6kD5BntOoo4AXjFh6ny3EstNq0xTFuasBrDBAAAAAFWRUxPAAAAAAAAAAAAAAAA"
    }
}
```

{% endtab %}
{% endtabs %}
