Newbie
This document is for the Newbie backend server API. Version: v1
state ¶
brc20 airdrop state ¶
brc20 airdrop stateGET/api/v1/state/brc20Airdrop
get brc20 airdrop state
Example URI
GET https://api-pre.newbie.digital/api/v1/state/brc20Airdrop
Request
Headers
Content-Type: application/jsonResponse
200Body
{
"remainingAmount": "122233"
}Schema
{
"type": "object",
"properties": {
"remainingAmount": {
"type": "string"
}
},
"required": [
"remainingAmount"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}Response
500Headers
Content-Type: application/jsonBody
{
"message": "server err"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}user ¶
User check brc20 ¶
User check brc20GET/api/v1/user/{address}/check/brc20
check brc20 airdrop
Example URI
GET https://api-pre.newbie.digital/api/v1/user/bc1qqd72vtqlw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3/check/brc20
URI Parameters
- address
string(required) Example: bc1qqd72vtqlw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3user address
Request
Headers
Content-Type: application/jsonResponse
200Headers
Content-Type: application/jsonBody
{
"address": "bc1qqd72vtqlw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3",
"statsBalance": "1231231",
"ordiBalance": "12321312",
"ratsBalance": "12123123",
"blockNumber": 22222,
"airdropAmount": "21231",
"createTime": "2024"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"address": {
"type": "string"
},
"statsBalance": {
"type": "string"
},
"ordiBalance": {
"type": "string"
},
"ratsBalance": {
"type": "string"
},
"blockNumber": {
"type": "number"
},
"airdropAmount": {
"type": "string"
},
"createTime": {
"type": "string",
"description": "01-29T12:21:19Z(string, required)"
}
},
"required": [
"address",
"statsBalance",
"ordiBalance",
"ratsBalance",
"blockNumber",
"airdropAmount"
]
}Response
400Headers
Content-Type: application/jsonBody
{
"message": "error message"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Response
500Headers
Content-Type: application/jsonBody
{
"message": "server err"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}User check referral ¶
User check referralGET/api/v1/user/{address}/check/referral{?invitationCode}
user check referral & get sign message
Example URI
GET https://api-pre.newbie.digital/api/v1/user/bc1qqd72vw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3/check/referral?invitationCode=5zL2EksplEoAVxTizL8mqk0oUY
URI Parameters
- address
string(required) Example: bc1qqd72vw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3user btc/evm address
- invitationCode
string(required) Example: 5zL2EksplEoAVxTizL8mqk0oUYinvitation code
Request
Headers
Content-Type: application/jsonResponse
200Headers
Content-Type: application/jsonBody
{
"msgId": "db4fe3a1",
"message": "xxxxxx"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"msgId": {
"type": "string",
"description": "7d6b-435f-98d7-94bc9ce35952 (string, required)"
},
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Response
400Headers
Content-Type: application/jsonBody
{
"message": "error message"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Response
208Headers
Content-Type: application/jsonBody
{
"message": "error message"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Response
500Headers
Content-Type: application/jsonBody
{
"message": "server err"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}bind user invitation relationship ¶
bind user invitation relationshipPUT/api/v1/user/{address}/verify/referral{?pubKey}
verify referral signature & bind referral relationship
Example URI
PUT https://api-pre.newbie.digital/api/v1/user/bc1qqd72vw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3/verify/referral?pubKey=0363c46bc67a5e831b8bab302f9c81160086c97ec6802647c128e5209af52331b6
URI Parameters
- address
string(required) Example: bc1qqd72vw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3user btc/evm address
- pubKey
string(optional) Example: 0363c46bc67a5e831b8bab302f9c81160086c97ec6802647c128e5209af52331b6btc should upload pubKey
Request
Headers
Content-Type: application/json
Msgid: db4fe3a1-7d6b-435f-98d7-94bc9ce35952Body
{
"signature": "0xxxxxx"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "btc use base64 / evm use hex"
}
},
"required": [
"signature"
]
}Response
201Response
401Body
{
"message": "error message"
}Schema
{
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}Response
400Headers
Content-Type: application/jsonBody
{
"message": "error message"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Response
500Headers
Content-Type: application/jsonBody
{
"message": "server err"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}User Nbie info ¶
User Nbie infoGET/api/v1/user/{address}/reward/info
Get address mining info
Example URI
GET https://api-pre.newbie.digital/api/v1/user/0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0/reward/info
URI Parameters
- address
string(required) Example: 0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0user address
Request
Headers
Content-Type: application/jsonResponse
200Headers
Content-Type: application/jsonBody
{
"miningReward": {
"totalReward": 493234,
"claimed": 23455
},
"referralReward": {
"totalReward": 493234,
"claimed": 23455
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"miningReward": {
"type": "object",
"properties": {
"totalReward": {
"type": "number"
},
"claimed": {
"type": "number"
}
},
"required": [
"totalReward",
"claimed"
]
},
"referralReward": {
"type": "object",
"properties": {
"totalReward": {
"type": "number"
},
"claimed": {
"type": "number"
}
},
"required": [
"totalReward",
"claimed"
]
}
},
"required": [
"miningReward",
"referralReward"
]
}Get verify Message ¶
Get verify MessageGET/api/v1/user/{address}/verify/message{?pubKey}
get sign message
Example URI
GET https://api-pre.newbie.digital/api/v1/user/bc1pyy43yt0qa5cclsehnjumfe200838lrpekpdtdqwx3rqpnp0tke7qes0y78/verify/message?pubKey=0x03971a63d553ad3c09a5860e4b8bca568c046065b78ad86e25191057ef0f10828a
URI Parameters
- address
string(required) Example: bc1pyy43yt0qa5cclsehnjumfe200838lrpekpdtdqwx3rqpnp0tke7qes0y78user address
- pubKey
string(optional) Example: 0x03971a63d553ad3c09a5860e4b8bca568c046065b78ad86e25191057ef0f10828auser pubKey, need on btc
Request
Headers
Content-Type: application/jsonResponse
200Headers
Content-Type: application/jsonBody
{
"message": "verify xxxx address is xxx message id: 10e67d69",
"messageId": "10e67d69"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"messageId": {
"type": "string"
}
},
"required": [
"message",
"messageId"
]
}Response
400Headers
Content-Type: application/jsonBody
{
"message": "error message"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Claim newbie ¶
Claim newbiePUT/api/v1/user/{address}/claim/{claimType}
verify the address
Example URI
PUT https://api-pre.newbie.digital/api/v1/user/0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0/claim/fairmint
URI Parameters
- claimType
enum(required) Example: fairmintclaim type
Choices:
referralfairmintairDropxDrop- address
string(required) Example: 0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0user address
Request
Headers
Message-Id: 7c3e5a15
Content-Type: application/jsonBody
{
"signature": "0xAE127BD12"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"signature": {
"type": "string"
}
}
}Response
200Headers
Message-Id: 7c3e5a15
Content-Type: application/jsonBody
{
"totalAmount": "10000",
"signature": "0xaxxxxxxx"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalAmount": {
"type": "string"
},
"signature": {
"type": "string"
}
},
"required": [
"totalAmount",
"signature"
]
}Response
400Headers
Message-Id: 7c3e5a15
Content-Type: application/jsonBody
{
"message": "error message"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Response
500Headers
Message-Id: 7c3e5a15
Content-Type: application/jsonBody
{
"message": "server err"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Check address available ¶
Check address availableGET/api/v1/user/{address}/check/qualification{?verifyType}
verify if the address meets the qualifications
Example URI
GET https://api-pre.newbie.digital/api/v1/user/0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0/check/qualification?verifyType=lanchEvent
URI Parameters
- verifyType
enum(required) Example: lanchEventcheck type
Choices:
lanchEvent- address
string(required) Example: 0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0user address
Request
Headers
Content-Type: application/jsonResponse
200Headers
Content-Type: application/jsonResponse
400Headers
Content-Type: application/jsonBody
{
"message": "error message"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}Fairmint ¶
mining info ¶
mining infoGET/api/v1/fairmint/mining/info{?page,limit}
Get onchain mining information
Example URI
GET https://api-pre.newbie.digital/api/v1/fairmint/mining/info?page=0&limit=10
URI Parameters
- page
number(optional) Example: 0- limit
number(optional) Example: 10
Request
Headers
Content-Type: application/jsonResponse
200Headers
Content-Type: application/jsonBody
[
{
"totalNewbieUser": 34555,
"epicStartTime": 1704305728,
"epicStartBlock": 85643,
"epicEndBlock": 95643,
"mineRate": 18.12,
"participantsNum": 2000,
"currentEpicReward": 10000,
"nextEpicReward": 8000,
"stakeRewardPool": 9999978677
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Response
500Headers
Content-Type: application/jsonBody
{
"message": "server err"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}