wallet/pkg/rest/eth_v1.go

34 lines
930 B
Go
Raw Permalink Normal View History

2024-08-31 14:46:20 +00:00
package rest
import (
eth "custodial/pkg/eth"
store "custodial/pkg/store"
gin "github.com/gin-gonic/gin"
)
func EthRestV1(r *gin.RouterGroup) {
eth.InitMasterFromPrivateSettings()
store.Init()
var node eth.EthNode
_, err := node.Init()
if err != nil {
panic(err)
}
r.POST("/create-account", EthCreateAccountV1)
r.POST("/address-balance", EthAddressBalanceV1)
r.POST("/account-balance", EthAccountBalanceV1)
r.POST("/withdraw-usdt", EthWithdrawUsdtV1)
r.POST("/withdraw-eth", EthWithdrawEthV1)
r.POST("/approve-usdt-spender", EthApproveUsdtSpenderV1)
r.POST("/approve-usdt-contract", EthApproveUsdtContractV1)
r.POST("/withdraw-usdt-by-spender", EthWithdrawUsdtBySpenderV1)
r.POST("/withdraw-usdt-by-contract", EthWithdrawUsdtByContractV1)
r.POST("/recharge-eth-by-spender", EthRechargeEthBySpenderV1)
r.POST("/approve-usdt-custody", EthApproveUsdtCustodyV1)
r.POST("/tx-info", EthTransactionInfoV1)
}