REST APIStakeStaking Request

POST

Accepts a KYC PDF document, uploads it to the XinFin MasterNode IPFS API, and returns the authoritative IPFS hash assigned by the network. Only supported for XDC and TXDC coins.

The returned hash must be included in the subsequent XDC stake request as kycHash. It is submitted to the validator contract in the AUTHORIZE (uploadKYC) transaction.

Path Params

  • coin string enum required
    Must be xdc or txdc.
    xdctxdc
  • walletId string required
    The wallet ID of the wallet used for staking.

Body Params

object

  • file string binary required
    The KYC PDF document to upload (max 5MB).

Responses

200
IPFS hash computed successfully.

Response Body

object

Response containing the IPFS CIDv0 hash of the uploaded KYC document.
  • hash string required
    IPFS CIDv0 hash of the uploaded KYC document. Must be included as kycHash in the subsequent XDC stake request.

    matches ^Qm[1-9A-HJ-NP-Za-km-z]{44}$

400
Bad Request

Response Body

object

  • error string
  • errorName string
  • reqId string
  • context object
401
Unauthorized

Response Body

object

  • error string
  • errorName string
  • reqId string
  • context object
403
Forbidden

Response Body

object

  • error string
  • errorName string
  • reqId string
  • context object
500
Server Error - Transient error please try again

Response Body

object

  • error string
  • errorName string
  • reqId string
  • context object