🌐Network

Gets the networks of our app.

get

This route returns all the blockchain networks of our app.The route first queries the database for all the networks present.The route then returns the networks found.

Responses
200
Successful
application/json
get
GET /api/v1/networks HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
  "ok": true,
  "result": {
    "networks": [
      {
        "id": "11839fbd-0b72-4704-86cb-04db0ca40a13",
        "network": "ethereum"
      }
    ]
  }
}

Adds network to a wallet.

post

This route adds networks to a given wallet in our database.The route first queries the database for the wallet by address.The route then adds the given networks to the wallet.

Body
networkIdsstring[]OptionalExample: 11839fbd-0b72-4704-86cb-04db0ca40a13
Responses
200
Successful
application/json
post
POST /api/v1/networks/wallet HTTP/1.1
Host: www.dyorbackend.tk
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "networkIds": [
    "11839fbd-0b72-4704-86cb-04db0ca40a13"
  ]
}
{
  "ok": true,
  "result": {}
}

Gets the balance of the wallet on different network.

get

This route returns the balance of the wallet on blockchain networks.The route first queries the database for all the networks related to the wallet.The route then returns balances of the wallet on those networks.

Responses
200
Successful
application/json
get
GET /api/v1/networks/wallet/balance HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
  "ok": true,
  "result": {
    "networksBalance": [
      {
        "network": "ethereum",
        "balance": 768
      }
    ]
  }
}

Last updated