Back to top

Newbie

This document is for the Newbie backend server API. Version: v1

state

brc20 airdrop state

brc20 airdrop state
GET/api/v1/state/brc20Airdrop

get brc20 airdrop state

Example URI

GET https://api-pre.newbie.digital/api/v1/state/brc20Airdrop
Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Body
{
  "remainingAmount": "122233"
}
Schema
{
  "type": "object",
  "properties": {
    "remainingAmount": {
      "type": "string"
    }
  },
  "required": [
    "remainingAmount"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "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 brc20
GET/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
HideShow
address
string (required) Example: bc1qqd72vtqlw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3

user address

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "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  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "error message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "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 referral
GET/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
HideShow
address
string (required) Example: bc1qqd72vw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3

user btc/evm address

invitationCode
string (required) Example: 5zL2EksplEoAVxTizL8mqk0oUY

invitation code

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "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  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "error message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
Response  208
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "error message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "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 relationship
PUT/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
HideShow
address
string (required) Example: bc1qqd72vw0nugqmzrx398x8gj03z8aqr79aexrncezqaw74dtu4qxjydq3

user btc/evm address

pubKey
string (optional) Example: 0363c46bc67a5e831b8bab302f9c81160086c97ec6802647c128e5209af52331b6

btc should upload pubKey

Request
HideShow
Headers
Content-Type: application/json
Msgid: db4fe3a1-7d6b-435f-98d7-94bc9ce35952
Body
{
  "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  201
Response  401
HideShow
Body
{
  "message": "error message"
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "error message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "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 info
GET/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
HideShow
address
string (required) Example: 0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0

user address

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "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 Message
GET/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
HideShow
address
string (required) Example: bc1pyy43yt0qa5cclsehnjumfe200838lrpekpdtdqwx3rqpnp0tke7qes0y78

user address

pubKey
string (optional) Example: 0x03971a63d553ad3c09a5860e4b8bca568c046065b78ad86e25191057ef0f10828a

user pubKey, need on btc

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "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  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "error message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}

Claim newbie

Claim newbie
PUT/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
HideShow
claimType
enum (required) Example: fairmint

claim type

Choices: referral fairmint airDrop xDrop

address
string (required) Example: 0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0

user address

Request
HideShow
Headers
Message-Id: 7c3e5a15
Content-Type: application/json
Body
{
  "signature": "0xAE127BD12"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "signature": {
      "type": "string"
    }
  }
}
Response  200
HideShow
Headers
Message-Id: 7c3e5a15
Content-Type: application/json
Body
{
  "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  400
HideShow
Headers
Message-Id: 7c3e5a15
Content-Type: application/json
Body
{
  "message": "error message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
Response  500
HideShow
Headers
Message-Id: 7c3e5a15
Content-Type: application/json
Body
{
  "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 available
GET/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
HideShow
verifyType
enum (required) Example: lanchEvent

check type

Choices: lanchEvent

address
string (required) Example: 0x8F18d6260b13B77FEddba9Ac5fe367d4a8c8cEC0

user address

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "error message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}

Fairmint

mining info

mining info
GET/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
HideShow
page
number (optional) Example: 0
limit
number (optional) Example: 10
Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "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  500
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "server err"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}

Generated by aglio on 27 Feb 2024