# Sample code of curl

# <Inputs> corresponding to the value of Inputs Tag of each API
curl http://<ip>:<port>/rpc/v0 -X POST -H "Content-Type: application/json"  -H "Authorization: Bearer <token>"  -d '{"method": "Gateway.<method>", "params": <Inputs>, "id": 0}'

# Groups

# Gateway

# Version

Version provides information about API provider

Perms: read

Inputs: []

Response:

{
  "Version": "string value",
  "APIVersion": 131840
}

# MarketClient

# IsUnsealed

Perms: admin

Inputs:

[
  "f01234",
  {
    "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
  },
  {
    "ID": {
      "Miner": 1000,
      "Number": 9
    },
    "ProofType": 8
  },
  10,
  1032
]

Response: true

# ListMarketConnectionsState

Perms: admin

Inputs: []

Response:

[
  {
    "Addr": "f01234",
    "Conn": {
      "Connections": [
        {
          "Addrs": [
            "f01234"
          ],
          "ChannelId": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
          "Ip": "string value",
          "RequestCount": 123,
          "CreateTime": "0001-01-01T00:00:00Z"
        }
      ],
      "ConnectionCount": 123
    }
  }
]

# SectorsUnsealPiece

Perms: admin

Inputs:

[
  "f01234",
  {
    "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
  },
  {
    "ID": {
      "Miner": 1000,
      "Number": 9
    },
    "ProofType": 8
  },
  10,
  1032,
  "string value"
]

Response: {}

# MarketServiceProvider

# ListenMarketEvent

Perms: read

Inputs:

[
  {
    "Miner": "f01234"
  }
]

Response:

{
  "Id": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
  "Method": "string value",
  "Payload": "Ynl0ZSBhcnJheQ=="
}

# ResponseMarketEvent

Perms: read

Inputs:

[
  {
    "Id": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
    "Payload": "Ynl0ZSBhcnJheQ==",
    "Error": "string value"
  }
]

Response: {}

# ProofClient

# ComputeProof

Perms: admin

Inputs:

[
  "f01234",
  [
    {
      "SealProof": 8,
      "SectorNumber": 9,
      "SealedCID": {
        "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
      }
    }
  ],
  "Bw=="
]

Response:

[
  {
    "PoStProof": 8,
    "ProofBytes": "Ynl0ZSBhcnJheQ=="
  }
]

# ListConnectedMiners

Perms: admin

Inputs: []

Response:

[
  "f01234"
]

# ListMinerConnection

Perms: admin

Inputs:

[
  "f01234"
]

Response:

{
  "Connections": [
    {
      "Addrs": [
        "f01234"
      ],
      "ChannelId": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
      "Ip": "string value",
      "RequestCount": 123,
      "CreateTime": "0001-01-01T00:00:00Z"
    }
  ],
  "ConnectionCount": 123
}

# ProofServiceProvider

# ListenProofEvent

Perms: read

Inputs:

[
  {
    "MinerAddress": "f01234"
  }
]

Response:

{
  "Id": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
  "Method": "string value",
  "Payload": "Ynl0ZSBhcnJheQ=="
}

# ResponseProofEvent

Perms: read

Inputs:

[
  {
    "Id": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
    "Payload": "Ynl0ZSBhcnJheQ==",
    "Error": "string value"
  }
]

Response: {}

# WalletClient

# ListWalletInfo

Perms: admin

Inputs: []

Response:

[
  {
    "Account": "string value",
    "SupportAccounts": [
      "string value"
    ],
    "ConnectStates": [
      {
        "Addrs": [
          "f01234"
        ],
        "ChannelId": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
        "Ip": "string value",
        "RequestCount": 123,
        "CreateTime": "0001-01-01T00:00:00Z"
      }
    ]
  }
]

# ListWalletInfoByWallet

Perms: admin

Inputs:

[
  "string value"
]

Response:

{
  "Account": "string value",
  "SupportAccounts": [
    "string value"
  ],
  "ConnectStates": [
    {
      "Addrs": [
        "f01234"
      ],
      "ChannelId": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
      "Ip": "string value",
      "RequestCount": 123,
      "CreateTime": "0001-01-01T00:00:00Z"
    }
  ]
}

# WalletHas

Perms: admin

Inputs:

[
  "string value",
  "f01234"
]

Response: true

# WalletSign

Perms: admin

Inputs:

[
  "string value",
  "f01234",
  "Ynl0ZSBhcnJheQ==",
  {
    "Type": "message",
    "Extra": "Ynl0ZSBhcnJheQ=="
  }
]

Response:

{
  "Type": 2,
  "Data": "Ynl0ZSBhcnJheQ=="
}

# WalletServiceProvider

# AddNewAddress

Perms: read

Inputs:

[
  "e26f1e5c-47f7-4561-a11d-18fab6e748af",
  [
    "f01234"
  ]
]

Response: {}

# ListenWalletEvent

Perms: read

Inputs:

[
  {
    "SupportAccounts": [
      "string value"
    ],
    "SignBytes": "Ynl0ZSBhcnJheQ=="
  }
]

Response:

{
  "Id": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
  "Method": "string value",
  "Payload": "Ynl0ZSBhcnJheQ=="
}

# RemoveAddress

Perms: read

Inputs:

[
  "e26f1e5c-47f7-4561-a11d-18fab6e748af",
  [
    "f01234"
  ]
]

Response: {}

# ResponseWalletEvent

Perms: read

Inputs:

[
  {
    "Id": "e26f1e5c-47f7-4561-a11d-18fab6e748af",
    "Payload": "Ynl0ZSBhcnJheQ==",
    "Error": "string value"
  }
]

Response: {}

# SupportNewAccount

Perms: read

Inputs:

[
  "e26f1e5c-47f7-4561-a11d-18fab6e748af",
  "string value"
]

Response: {}