πŸ₯‚Social Growth Protocols

A unified on-chain points mechanism for Dapp growth.

POST /interfa/v2/x2earn

Returns a JSON object providing result of recording.

Query parameters

Param
Type
Required?
Description

Authorization

String

Required

address

String

Required

Wallet Address

orderId

String

Required

Order ID (business number, trade number, etc. should not duplicate)

amount

float64

Required

Amount of reward

tx

String

Optional

Transaction

chainType

String

Required when "tx" existed

Chain type. enum(EVM, Non-EVM)

chainId

string

Required when "tx" existed

EVM Chain ID

chainName

String

Required when "tx" existed

Chain name, specially for Non-EVM chain. enum(x1, eth, sol, arb, base, polygon, scroll, zksync)

orderTime

int64

Required

Order creation timestamp (s)

orderDesc

String

Optional

Order description maxLength: 255

Example:

curl -X POST 'https://exdapps.uxlink.io/interfa/v2/x2earn' \
-H 'Authorization: <Basic Auth>' \
-H 'Content-Type: application/json' \
-d '{
  "address": "0xADDRESS",
  "orderId": "NO22344556678888",
  "amount": 100,
  "tx": "0xtransaction",
  "chainType": "EVM",
  "chainId": "8453",
  "chainName": "base",
  "orderTime": 1717171200,
  "orderDesc": "wonderful deal"
}'
// Success Response Example:
{
    "success": true,
    "msg": "ok",
    "code": 200,
    "data": {}
}
// DuplicateOrderId error Response Example:
{
    "success": false,
    "code": 10101062,
    "msg": "duplicate order id"
}
// TotalAmountOverLimit error Response Example:
{
    "success": false,
    "code": 10101001,
    "msg": "total amount over limit"
}

POST /interfa/v2/x2earn/summary

Returns a JSON object providing total reward amount and limit.

Query parameters

Param
Type
Required?
Description

Authorization

String

Required

Response fields

Param
Type
Description

totalAmount

Decimal

Return the dapp rewards that have been recorded

totalAmountMax

Decimal

Returns the maximum amount of rewards that the dapp can distribute

Example:

curl -X POST 'https://exdapps.uxlink.io/interfa/v2/x2earn/summary' \
-H 'Authorization: <Basic Auth>' \
-H 'Content-Type: application/json' \
// Success Response Example:
{
    "success": true,
    "msg": "ok",
    "code": 200,
    "data": {
        "totalAmount": 567000,
        "totalAmountMax": 1000000
    }
}

POST /interfa/v2/x2earn/subtotal

Returns a JSON object providing subtotal reward amount by address and orderId prefix.

Query parameters

Param
Type
Required?
Description

Authorization

String

Required

address

String

Required

Wallet Address

orderIdPrefix

String

Optional

Order ID prefix

Response fields

Param
Type
Description

subtotalAmount

Decimal

Return address reward amount based on query params

Example:

curl -X POST 'https://exdapps.uxlink.io/interfa/v2/x2earn/subtotal' \
-H 'Authorization: <Basic Auth>' \
-H 'Content-Type: application/json' \
-d '{
  "address": "0xADDRESS",
  "orderIdPrefix": "NO11223445566"
}'
// Success Response Example:
{
    "success": true,
    "msg": "ok",
    "code": 200,
    "data": {
        "subtotalAmount": 567000
    }
}

Code

Code
Desc
Remarks

200

success

the flag for a successful request

5001002

false

Last updated