跳至主要内容

用戶充幣

1、分配充幣地址

HTTP 請求:

http://wallet.unn.com:8080/v2/user/create

請求方式:POST

Header

參數類型必選說明
tokenstringtrueAccess Token

請求參數

參數類型必選說明
user_idstringtrue商家系統內的用戶 ID
namestringfalse暱稱

請求示例

curl --location 'http://wallet.unn.com:8080/v2/user/create' \
--header 'token: service.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMHg1QjgzYTI2N2I2QjhCZTRiRTZEOWFmMWMxZGQxOUMzNEZCMjY0MUIwIiwiZW50ZXJwcmlzZV9saXN0IjpbeyJjaGFpbiI6IkVSQzIwIiwiY29udHJhY3RfYWRkciI6IjB4RTU4MzExYjIxMGY0RUI1N2QzQmU2MTk0NkNlRTMzZUNhODc5M2NGMCIsImVudGVycHJpc2UiOiI2NGNlMGNiMjFiOWIwNDE5Y2VlMWRkNTgiLCJpc19vd25lciI6dHJ1ZSwicGVybWlzc2lvbiI6WzAsMSwyLDNdfSx7ImNoYWluIjoiVFJDMjAiLCJjb250cmFjdF9hZGRyIjoiVEVWUktYb05xcWk3UkJEYkY0TXplVDNwUHVpc1hCaXpBdSIsImVudGVycHJpc2UiOiI2NGNlMGNiMjFiOWIwNDE5Y2VlMWRkNTgiLCJpc19vd25lciI6dHJ1ZSwicGVybWlzc2lvbiI6WzAsMSwyLDNdfV0sImNyZWF0ZVRpbWUiOjE2OTIzNDE4ODIsImV4cCI6MTY5NDkzMzg4MiwiYWNjb3VudF9uYW1lIjoiIn0.ix213o6Azf2rGTmTiLX98BYEn-Ngme9P4LYrO3-zNQs' \
--header 'Content-Type: application/json' \
--data '{
"body": {
"user_id": "T1692343087",
"name": "Arthur02"
}
}'

返回參數

參數類型必選說明
merchant_idstringtrue商戶ID
user_idstringtrue用戶ID
namestringtrue用戶暱稱
descstringtrue用戶描述
addressstringtrue用戶充幣地址

返回示例

{
"code": 200,
"message": "success",
"data": {
"entity": {
"merchant_id": "64f2974b8dd894bc6115e260",
"user_id": "T1692343087",
"name": "Arthur02",
"desc": "",
"address": {
"ERC20": "0xdd07371E0930ac4B60d103A3ce7B6D9509F39Dad",
"TRC20": "TYTUmbXev4qBpM2JeNkwAwkL3HE8h29Rvr"
},
"index": 6,
"in_used": true,
"create_time": 1695621744,
"update_time": 1695621744,
"id": "65112270467ce9af683bd8c7"
}
}
}

2、查詢充幣地址

請求 URL:

http://wallet.unn.com:8080/v2/order/deposit/{UserId}

UserId 為調用方系統的用戶 ID

請求方式:GET

Header

參數類型必選說明
tokenstringtrueAccess Token

請求範例

curl --location 'http://43.198.64.79:30105/v2/order/deposit/test0011' \
--header 'token: service.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMHg1MkM1NDBFZDdBMTk4ZTQ4QjU3RjYwYTc5MWFhRTgzYTVBMmIwNjNFIiwiZW50ZXJwcmlzZV9saXN0IjpbeyJjaGFpbiI6IkVSQzIwIiwiY29udHJhY3RfYWRkciI6IjB4NDU3ODU3MDEzQTkyMEQ3QzM3OWZjRTkwMjhmRmM2NzhDZUM4MUQ2OCIsImVudGVycHJpc2UiOiI2NGM3NGI2OTgwYTU4NjIwOThhZTIzMDEiLCJpc19vd25lciI6dHJ1ZSwicGVybWlzc2lvbiI6WzAsMSwyLDNdfV0sImNyZWF0ZVRpbWUiOjE2OTA3ODUyNzAsImV4cCI6MTY5MzM3NzI3MCwiYWNjb3VudF9uYW1lIjoiIn0.GSM0vsDjrgW1ZQzG2AQUWVQKA0UmtJynrG6sDePxbQo'

返回參數

參數類型必選說明
addressdicttrue地址
—ERC20stringtrueEth 地址
—TRC20stringtrueTron 地址

返回示例

{
"code": 200,
"message": "success",
"data": {
"entity": {
"address": {
"ERC20": "0x9E572A5e1012359365ab07A70Ff94aCdf9a2460c",
"TRC20": "TFwgcKZPn3WfmAHb6vtaL261DNFKCrU7Vf"
}
}
}
}