You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/sign?txid=<transaction hash>&tx=<serialized partially signed transaction>
/generate
Someone wanting to pay into a sidechain will hit this endpoint on each MDF with a payee address and a nonce. The MDFs will then record the payee address and nonce and calculate the P2SH address and redeemScript (using Contracthashtool#generate) the user will be paying to.
It returns the P2SH address to pay into on success. Each MDF should return the same result.
/peg
The user will hit this endpoint with the transaction hash of a transaction they made on the blockchain paying to the P2SH address from the previous step after the confirmation period has lapsed. The MDF contacted will create a transaction on the sidechain paying to the payee address with an appropriate output value in accordance with the predefined peg ratio wrt the output amount in the referenced blockchain transaction.
It returns the partially signed sidechain transaction.
/sign
The user will then hit this endpoint of M-1 MDFs to gather the required number of signatures for the sidechain transaction. The txid parameter is the hash of the transaction on the initial blockchain. The tx parameter is the serialized partially signed sidechain transaction. It is assumed that the MDFs can quickly retrieve the payee address and nonce from their database given the P2SH address seen in the output of the txid transaction and feed them into Contracthashtool#claim in order to derive a private key for signing.
It returns the partially (or potentially completely) signed transaction on success.
The text was updated successfully, but these errors were encountered:
aalness
changed the title
Build a Rack app for the out-of-band communication required
Build a Rack app for the MDFs
Nov 30, 2014
aalness
changed the title
Build a Rack app for the MDFs
Build an MDF
Nov 30, 2014
Hand-wavy design
MDFs (mutually distrusting functionaries) will each run a node on each blockchain as well as an API service which will require endpoints like:
/generate?address=<payee address>&nonce=<random nonce>
/peg?txid=<transaction hash>
/sign?txid=<transaction hash>&tx=<serialized partially signed transaction>
/generate
Someone wanting to pay into a sidechain will hit this endpoint on each MDF with a payee address and a nonce. The MDFs will then record the payee address and nonce and calculate the P2SH address and
redeemScript
(usingContracthashtool#generate
) the user will be paying to.It returns the P2SH address to pay into on success. Each MDF should return the same result.
/peg
The user will hit this endpoint with the transaction hash of a transaction they made on the blockchain paying to the P2SH address from the previous step after the confirmation period has lapsed. The MDF contacted will create a transaction on the sidechain paying to the payee address with an appropriate output value in accordance with the predefined peg ratio wrt the output amount in the referenced blockchain transaction.
It returns the partially signed sidechain transaction.
/sign
The user will then hit this endpoint of M-1 MDFs to gather the required number of signatures for the sidechain transaction. The
txid
parameter is the hash of the transaction on the initial blockchain. Thetx
parameter is the serialized partially signed sidechain transaction. It is assumed that the MDFs can quickly retrieve the payee address and nonce from their database given the P2SH address seen in the output of thetxid
transaction and feed them intoContracthashtool#claim
in order to derive a private key for signing.It returns the partially (or potentially completely) signed transaction on success.
The text was updated successfully, but these errors were encountered: