modify some msg-struct and table-struct
This commit is contained in:
@@ -57,40 +57,65 @@ type WithdrawMsg_resp struct {
|
||||
}
|
||||
|
||||
// =============================== type2 ===============================
|
||||
|
||||
type PayMsg_req struct {
|
||||
QueueId string `json:"queue_id"`
|
||||
Chain string `json:"chain"`
|
||||
Symbol string `json:"symbol"`
|
||||
FromAddress string `json:"from_address"`
|
||||
TotalAmount float64 `json:"total_amount"`
|
||||
TotalFee float64 `json:"total_fee"`
|
||||
Timestamp uint64 `json:"timestamp"`
|
||||
Sign string `json:"sign"`
|
||||
Transactions map[string]PayData `json:"transactions"` // {"to_address": PayData_req{}, ...}
|
||||
Status int `json:"status,omitempty"`
|
||||
QueueId string `json:"queue_id"`
|
||||
Chain string `json:"chain"` // 链名称
|
||||
Symbol string `json:"symbol"` // 币种
|
||||
FromAddress string `json:"from_address"` // 我们提供的地址
|
||||
ToAddress string `json:"to_address"` // 用户要提现到的地址
|
||||
Amount float64 `json:"amount"`
|
||||
Fee float64 `json:"fee"`
|
||||
Timestamp uint64 `json:"timestamp"`
|
||||
Sign string `json:"sign"`
|
||||
Status int `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type PayMsg_resp struct {
|
||||
QueueId string `json:"queue_id"`
|
||||
Chain string `json:"chain"`
|
||||
Symbol string `json:"symbol"`
|
||||
FromAddress string `json:"from_address"`
|
||||
PayStatus int `json:"pay_status"` // 1至少有一笔转账成功,3sign校验失败,4钱包余额不足
|
||||
Transactions map[string]PayData `json:"transactions"` // {"to_address": PayData_resp{}, ...}
|
||||
QueueId string `json:"queue_id"`
|
||||
Chain string `json:"chain"` // 链名称
|
||||
Symbol string `json:"symbol"` // 币种
|
||||
FromAddress string `json:"from_address"` // 来源地址
|
||||
ToAddress string `json:"to_address"` // 目标地址
|
||||
TxHash string `json:"tx_hash,omitempty"`
|
||||
Amount float64 `json:"amount,omitempty"`
|
||||
Fee float64 `json:"fee,omitempty"`
|
||||
BlockHeight uint64 `json:"block_height,omitempty"` // 区块高度
|
||||
Status int `json:"status"` // 0失败,1成功,3sign校验失败
|
||||
}
|
||||
|
||||
type PayData struct {
|
||||
QueueId string `json:"queue_id,omitempty"`
|
||||
Chain string `json:"chain,omitempty"`
|
||||
Symbol string `json:"symbol,omitempty"`
|
||||
TxHash string `json:"tx_hash,omitempty"`
|
||||
ToAddress string `json:"to_address"`
|
||||
Amount float64 `json:"amount"`
|
||||
Fee float64 `json:"fee"`
|
||||
BlockHeight uint64 `json:"block_height,omitempty"`
|
||||
Status int `json:"status,omitempty"` // 0失败,1成功, 2待确认
|
||||
}
|
||||
// type PayMsg_req struct {
|
||||
// QueueId string `json:"queue_id"`
|
||||
// Chain string `json:"chain"`
|
||||
// Symbol string `json:"symbol"`
|
||||
// FromAddress string `json:"from_address"`
|
||||
// TotalAmount float64 `json:"total_amount"`
|
||||
// TotalFee float64 `json:"total_fee"`
|
||||
// Timestamp uint64 `json:"timestamp"`
|
||||
// Sign string `json:"sign"`
|
||||
// Transactions map[string]PayData `json:"transactions"` // {"to_address": PayData_req{}, ...}
|
||||
// Status int `json:"status,omitempty"`
|
||||
// }
|
||||
|
||||
// type PayMsg_resp struct {
|
||||
// QueueId string `json:"queue_id"`
|
||||
// Chain string `json:"chain"`
|
||||
// Symbol string `json:"symbol"`
|
||||
// FromAddress string `json:"from_address"`
|
||||
// PayStatus int `json:"pay_status"` // 1至少有一笔转账成功,3sign校验失败,4钱包余额不足
|
||||
// Transactions map[string]PayData `json:"transactions"` // {"to_address": PayData_resp{}, ...}
|
||||
// }
|
||||
|
||||
// type PayData struct {
|
||||
// QueueId string `json:"queue_id,omitempty"`
|
||||
// Chain string `json:"chain,omitempty"`
|
||||
// Symbol string `json:"symbol,omitempty"`
|
||||
// TxHash string `json:"tx_hash,omitempty"`
|
||||
// ToAddress string `json:"to_address"`
|
||||
// Amount float64 `json:"amount"`
|
||||
// Fee float64 `json:"fee"`
|
||||
// BlockHeight uint64 `json:"block_height,omitempty"`
|
||||
// Status int `json:"status,omitempty"` // 0失败,1成功, 2待确认
|
||||
// }
|
||||
|
||||
// =============================== type3 ===============================
|
||||
// 接收到的删除监听地址消息
|
||||
@@ -155,3 +180,9 @@ type TransferResult struct {
|
||||
Amount float64
|
||||
Status int
|
||||
}
|
||||
|
||||
type UpdateReqState struct {
|
||||
QueueId string
|
||||
MsgType int
|
||||
Status int
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user