OSDN Git Service

fix bug and add address for contract
[bytom/vapor.git] / api / api.go
index d3a5790..b8cbcfb 100644 (file)
@@ -248,12 +248,12 @@ func (a *API) buildHandler() {
                m.Handle("/recovery-wallet", jsonHandler(a.recoveryFromRootXPubs))
 
                m.Handle("/get-pegin-address", jsonHandler(a.getPeginAddress))
                m.Handle("/recovery-wallet", jsonHandler(a.recoveryFromRootXPubs))
 
                m.Handle("/get-pegin-address", jsonHandler(a.getPeginAddress))
-               m.Handle("/get-pegin-contract", jsonHandler(a.getPeginContract))
-               m.Handle("/claim-pegin-transaction", jsonHandler(a.claimPeginTx))
+               m.Handle("/get-pegin-contract-address", jsonHandler(a.getPeginContractAddress))
+               m.Handle("/claim-pegin-transaction", jsonHandler(a.claimContractPeginTx))
                m.Handle("/create-key-pair", jsonHandler(a.createXKeys))
                m.Handle("/get-utxo-from-transaction", jsonHandler(a.getUnspentOutputs))
                m.Handle("/get-side-raw-transaction", jsonHandler(a.getSideRawTransaction))
                m.Handle("/create-key-pair", jsonHandler(a.createXKeys))
                m.Handle("/get-utxo-from-transaction", jsonHandler(a.getUnspentOutputs))
                m.Handle("/get-side-raw-transaction", jsonHandler(a.getSideRawTransaction))
-               m.Handle("/build-mainchain-tx", jsonHandler(a.buildMainChainTx))
+               m.Handle("/build-mainchain-tx", jsonHandler(a.buildMainChainTxForContract))
                m.Handle("/sign-with-key", jsonHandler(a.signWithKey))
        } else {
                log.Warn("Please enable wallet")
                m.Handle("/sign-with-key", jsonHandler(a.signWithKey))
        } else {
                log.Warn("Please enable wallet")