Seascape Nft

Seascape Nft related API.

get
Get Seascape NFT Image

https://url/nft/img/:id
This endpoint allows you to get image of NFT.
Request
Response
Request
Path Parameters
id
required
integer
NFT Id
Response
200: OK
.gif image (content type: "image/gif")
403: Forbidden
Too many image options, which indicates an internal error. 0.00000001% chance you would have it.
{"error": "403 multiple result", "err_code": 403}
404: Not Found
Could not find an image for sprite. Might be nft is not minted yet.
{ "error": "404 not found", "err_code": 404}

get
Get Seascape NFT data

https://url/nft/data/:id
This endpoint returns NFT parameters, such as generation, quality etc...
Request
Response
Request
Path Parameters
id
required
integer
NFT id
Response
200: OK
Returns the following parameters: * generation a seascape NFT generation. id NFT id img_id Img id, some images are repetitive quality Seascape quality id wallet_address Owner of token
{"generation":0,"id":58,"img_id":3,"quality":1,"wallet_address":"0xC6EF8A96F20d50E347eD9a1C84142D02b1EFedc0"}
404: Not Found
Probably NFT was not minted yet.
{"error": "404 not found", "err_code": 404}
500: Internal Server Error
Any internal server error returns anything, except JSON. So, the following message will be seen:
{"error": "505 json to string convert error", "err_code": 500}

get
Get Seascape NFT data in OPENSEA format

https://url/nft/meta/:id
The parameters of Token, but for online Token sale platform https://opensea.io
Request
Response
Request
Path Parameters
id
required
integer
NFT id
Response
200: OK
The format of successful response solely defined on opensea. So checkout the https://docs.opensea.io/docs/metadata-standards
{
"attributes":[
{
"max_value":5,
"trait_type":"Quality",
"value":1
},
{
"display_type":"date",
"trait_type":"Birthdate",
"value":1607276794
},
{
"trait_type":"Generation",
"value":0
}
],
"description":"a simple Seascape NFT.",
"external_url":"http://api-test.blocklords.io:81/nft/meta/58",
"image":"http://api-test.blocklords.io:81/nft/img/58",
"name":"Seascape NFT #58"
}
404: Not Found
Probably NFT is not yet minted
{
"error":"404 not found",
"err_code":404
}
500: Internal Server Error
Any internal server error will return anything, except JSON. So following message will be seen:
{
"error":"500 json to string convert error",
"err_code":500
}

get
Get batch of nfts by the owner's wallet address

https://url/owned-by/:wallet-address
Request
Response
Request
Path Parameters
wallet_address
required
string
A wallet address of the user starting with the 0x prefix.
Response
200: OK
List of the nft metadata in a way, as it was returned by /nft/data/:id
[
{
"generation":0,
"id":44,
"img_id":4,
"quality":1,
"wallet_address":"0xe7186c0c4e6b249a269bd7fa3c3e1da54250c18b"
},
{
"generation":0,
"id":325,
"img_id":7,
"quality":2,
"wallet_address":"0xe7186c0c4e6b249a269bd7fa3c3e1da54250c18b"
},
]

get

https://url/owned-by/:wallet-address
Request
Response
Request
Path Parameters
optional
string
Response
200: OK
nft

get
Get Seasacpe Points (SP)

https://url/nft/sp-points/:id
Returns the calculated Seascape Points. Seascape Points is a weight of NFT in the Seascape platform. The higher the value, the bold nft it is. Seascape Points are calculated in format of generation multiplied by quality. The older the generation, and higher the quality, the seascape points will be high too. Addiontally, this endpoint returns a signature of hash of seascape points. Any smartcontract of Seascape Platform that requires Seascape Points, will also require the signature of seascape points. By that signature, smartcontract verifies that our backend generated it itself.
Request
Response
Request
Path Parameters
id
required
integer
NFT id
Response
200: OK
Example of successfule response for Nft ID 58 on rinkeby testnet.
{
"id":"58",
"scape_points":600,
"signature":"0xa23a3101d845bfa2ee533afd5c755a3f3855dbc362490ab5f4c972e411be6f63622b5571d6b86a0390b528a8bbdd341ed526989c67ff986f8da99859edd3992301"
}
403: Forbidden
It is not allowed to have too many signatures for one NFT.
{
"error":"403 too many signatures",
"err_code":403
}
404: Not Found
If Nft was not minted yet, then seascpe points will be 0. And signature will be empty string.
{
"id":"3",
"scape_points":0,
"signature":""
}
500: Internal Server Error
An internal server error retuns anything, except JSON. So the following message will be back:
{
"error":"500 json to string convert error",
"err_code":500
}