CAFECA-IO / BAIFA

https://baifa.vercel.app
GNU General Public License v3.0
0 stars 0 forks source link

整理 API 需求 (1/2) #330

Closed Julian0701 closed 10 months ago

Julian0701 commented 10 months ago

331

整理出 API 編號、Method、參數以及回傳的 json 格式

Julian0701 commented 10 months ago
{
  "chains": 5,
  "cryptoCurrencies": 5,
  "blackList": 7,
}
Julian0701 commented 10 months ago
[
    {
      "chainId": "eth",
      "chainName": "Ethereum",
      "icon": "/currencies/eth.svg",
      "blocks": 56789,
      "transactions": 123456
    },
    {
      "chainId": "bit",
      "chainName": "Bitcoin",
      "icon": "/currencies/bit.svg",
      "blocks": 67890,
      "transactions": 987654
    },
    {
      "chainId": "isun",
      "chainName": "iSunCloud",
      "icon": "/currencies/isun.svg",
      "blocks": 17313,
      "transactions": 917361
    },
    {
      "chainId": "usdt",
      "chainName": "Tether",
      "icon": "/currencies/usdt.svg",
      "blocks": 34567,
      "transactions": 567890
    },
    {
      "chainId": "bnb",
      "chainName": "Binance",
      "icon": "/currencies/bnb.svg",
      "blocks": 45678,
      "transactions": 789012
    }
    // ... other chains
  ]
Julian0701 commented 10 months ago
Julian0701 commented 10 months ago
{
  "chainId": "isun",
  "chainName": "iSunCloud",
  "blockData": [
    {
      "id": "230020",
      "chainId": "isun",
      "createdTimestamp": 1673940795,
      "stability": "MEDIUM",
    },
    {
      "id": "230021",
      "chainId": "isun",
      "createdTimestamp": 1679978900,
      "stability": "HIGH",
    },
    {
      "id": "230022",
      "chainId": "isun",
      "createdTimestamp": 1680176231,
      "stability": "LOW",
    },
    //...
  ],
  "transactionData": [
    {
      "id": "930071",
      "chainId": "isun",
      "createdTimestamp": 1607957394,
      "type": "Crypto Currency", 
      "status": "SUCCESS", 
    },
    {
      "id": "930072",
      "chainId": "isun",
      "createdTimestamp": 1679978900,
      "type": "Evidence",
      "status": "FAILED",
    },
    {
      "id": "930073",
      "chainId": "usdt",
      "createdTimestamp": 1680176231,
      "type": "NFT",
      "status": "PENDING",
    },
    //...
  ],
}
Julian0701 commented 10 months ago

{
  "id": "230021", 
  "chainId": "isun",
  "stability": "HIGH", //"MEDIUM" | "HIGH" | "LOW"
  "createdTimestamp": 1679978900,
  "managementTeam": ["Alice", "Bob", "Charlie"],
  "transactionCount": 25,
  "miner": "0x1234567890",
  "reward": 2.5, 
  "size": 3523 //bytes
  "previousBlockId": "230020",
  "nextBlockId": "230022"
}
Julian0701 commented 10 months ago
{
  "id": "930071",
  "hash": "0xE47Dcf8aF9829AD3c4E31409eB6ECfecd046d1BD",
  "type": "NFT",
  "status": "PROCESSING",
  "chainId": "isun",
  "blockId": "230021",
  "createdTimestamp": 1688342795,
  "fromAddressId": "130008",
  "toAddressId": "310029",
  "evidenceId": "530029",
  "value": 0.01,
  "fee": 0.01,
  "flaggingType": "RED_FLAG_DETAIL_PAGE.FLAG_TYPE_MULTIPLE_RECEIVES"
}
Julian0701 commented 10 months ago
{
  "id": "110132",
  "type": "address",
  "addressHash": "0x2775D3190693fEc256d156f9f74Cd8843A79",
  "chainId": "btc",
  "createdTimestamp": 1680827461,
  "lastestActiveTime": 1682935384,
  "relatedAddressIds": ["110029", "112840", "114007"],
  "interactedAddressCount": 3,
  "interactedContactCount": 2,
  "reviewData": [
    {
      "id": "T93015400001",
      "transactionId": "930154",
      "chainId": "btc",
      "createdTimestamp": 1689352795,
      "authorAddressId": "324801",
      "content": "This is a review",
      "stars": 3,
    },
    {
      "id": "T93015400002",
      "transactionId": "930154",
      "chainId": "btc",
      "createdTimestamp": 1689752690,
      "authorAddressId": "327923",
      "content": "This is a review",
      "stars": 3,
    },
   //...
  ],
  "transactionHistoryData": [
    {
      "id": "930154",
      "createdTimestamp": 1679978987,
      "type": "Crypto Currency",
      "status": "SUCCESS",
    },
    {
      "id": "930785",
      "createdTimestamp": 1687909392,
      "type": "Evidence",
      "status": "FAILED",
    },
   //...
  ],
  "blockProducedData": [
    {
      "id": "230976",
      "createdTimestamp": 1678940724,
      "stability": "MEDIUM",
    },
    {
      "id": "234680",
      "createdTimestamp": 1684176283,
      "stability": "LOW",
    },
   //...
  ],
  "flaggingCount": 23,
  "riskLevel": "MEDIUM_RISK",
  "publicTag": ["PUBLIC_TAG.UNKNOWN_USER"],
}
Julian0701 commented 10 months ago
{
  "score": 2.8,
  "reviewData": [
    {
      "id": "T99283100001",
      "transactionId": "992831",
      "chainId": "eth",
      "createdTimestamp": 1675289690,
      "authorAddressId": "392801",
      "content": "This is a review",
      "stars": 3,
    },
    {
      "id": "T99283100002",
      "transactionId": "992831",
      "chainId": "eth",
      "createdTimestamp": 1675351393,
      "authorAddressId": "331824",
      "content": "This is a review",
      "stars": 2,
    },
    {
      "id": "T93823000002",
      "transactionId": "938230",
      "chainId": "eth",
      "createdTimestamp": 1679589352,
      "authorAddressId": "327923",
      "content": "This is a review",
      "stars": 5,
    },
    {
      "id": "T98139400002",
      "transactionId": "981394",
      "chainId": "eth",
      "createdTimestamp": 1684378204,
      "authorAddressId": "322372",
      "content": "This is a review",
      "stars": 1,
    },
   //...
  ],
}
Julian0701 commented 10 months ago
[
  {
    "id": "1300200001",
    "chainId": "isun",
    "addressId": "130020",
    "redFlagType": "RED_FLAG_DETAIL_PAGE.FLAG_TYPE_MULTIPLE_WITHDRAW",
    "createdTimestamp": 1679978900,
  },
  {
    "id": "1300200002",
    "chainId": "isun",
    "addressId": "130020",
    "redFlagType": "RED_FLAG_DETAIL_PAGE.FLAG_TYPE_MULTIPLE_RECEIVES",
    "createdTimestamp": 1680183194,
  },
  {
    "id": "1300200003",
    "chainId": "isun",
    "addressId": "130020",
    "redFlagType": "RED_FLAG_DETAIL_PAGE.FLAG_TYPE_LARGE_WITHDRAW",
    "createdTimestamp": 1682194724,
  },
  {
    "id": "1300200004",
    "chainId": "isun",
    "addressId": "130020",
    "redFlagType": "RED_FLAG_DETAIL_PAGE.FLAG_TYPE_LARGE_WITHDRAW",
    "createdTimestamp": 1682729103,
  },
 // ... other red flag
]
Julian0701 commented 10 months ago
[
  {
    "id": "122134",
    "type": "address",
    "chainId": "eth",
    "createdTimestamp": 167823123,
    "transactionCount": 2,
  },
  {
    "id": "129381",
    "type": "address",
    "chainId": "eth",
    "createdTimestamp": 167538231,
    "transactionCount": 3,
  },
  {
    "id": "322738",
    "type": "contract",
    "chainId": "eth",
    "createdTimestamp": 1678273194,
    "transactionCount": 2,
  },
  {
    "id": "324472",
    "type": "contract",
    "chainId": "eth",
    "createdTimestamp": 1681310427,
    "transactionCount": 1,
  },
 //...
]
Julian0701 commented 10 months ago