OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / api / main_transact.go
diff --git a/api/main_transact.go b/api/main_transact.go
deleted file mode 100644 (file)
index fdce0b0..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-package api
-
-import (
-       "github.com/vapor/claim/rpc"
-       maintx "github.com/vapor/claim/rpc/bytom"
-       chainjson "github.com/vapor/encoding/json"
-)
-
-type mainTxResp struct {
-       Tx chainjson.HexBytes `json:"tx"`
-}
-
-func (a *API) buildMainChainTxForContract(ins rpc.MainTxParam) Response {
-       main := &maintx.BytomMainTx{
-               MainTxParam: ins,
-       }
-
-       resp, err := main.BuildMainChainTxForContract()
-       if err != nil {
-               return NewErrorResponse(err)
-       }
-
-       return NewSuccessResponse(&mainTxResp{Tx: resp})
-}
-
-func (a *API) buildMainChainTx(ins rpc.MainTxParam) Response {
-       main := &maintx.BytomMainTx{
-               MainTxParam: ins,
-       }
-
-       resp, err := main.BuildMainChainTx()
-       if err != nil {
-               return NewErrorResponse(err)
-       }
-
-       return NewSuccessResponse(&mainTxResp{Tx: resp})
-}
-
-func (a *API) signWithKey(ins rpc.MainTxSignParam) Response {
-       sign := maintx.BytomMainSign{
-               MainTxSignParam: ins,
-       }
-
-       resp, err := sign.SignWithKey()
-       if err != nil {
-               return NewErrorResponse(err)
-       }
-       return NewSuccessResponse(resp)
-}