rskip | title | description | status | purpose | author | layer | complexity | created |
---|---|---|---|---|---|---|---|---|
40 |
Basic Bridge for two-way-peg to Bitcoin |
Adopted |
Usa |
SDL (@sergiodemianlerner) |
Core |
2 |
2017-04-25 |
RSKIP | 40 |
---|---|
Title | Basic Bridge for two-way-peg to Bitcoin |
Created | 25-APR-2017 |
Author | SDL |
Purpose | Usa |
Layer | Core |
Complexity | 2 |
Status | Adopted |
This RSKIP specifies the methods the two-ya-peg Bridge exposes and the semantics of each method.
Parameters: none
Iterates over the getRskTxsWaitingForConfirmations map of Sha3 hashes to transaction values and updates the RskTxsWaitingForSignatures map of Sha3 keys to Bitcoin transaction values including Bitcoin transactions for which there are enough confirmations in the RSK blockchain.
Parameters: array of bitcoin blocks serialized in Bitcoin wire protocol format
Receives an array of serialized Bitcoin block headers and adds them to the internal BlockChain structure.
Parameters: Serialized Bitcoin transaction, block number where the transaction is present, serialized partial merkle tree
Receives a serialized Bitcoin transaction, its height and a serialized partial merkle tree. Verifies the transaction hash is part of the merkle tree.
Parameters: none, the invoking RSK transaction is the input itself
Calculates a destination Bitcoin address from the address of the RSK transaction sender. Converts the amount in Weis of the RSK transaction to Satoshis for the Bitcoin transaction. If the amount is greater than the minimum non-dust value, the Bitcoin transaction with a single output is added to the map of RSK transaction waiting for confirmations using the Sha3 hash of the RSK transaction hash as key and the Bitcoin transaction as value.
Parameters: public key of federation member, array of signatures, RSK transaction hash
The RSK transaction hash is used as key to retrieve the Bitcoin transaction from the internal map.
Each federator must sign all the inputs belonging to the transaction that must release the BTC.
When more than N of M signatures have been collected for the unsigned transaction id, the contract will emit a BtcRelease event.
Returns transactions waiting to be signed and transactions waiting to be broadcasted.
Returns:
RSK Transactions waiting to be broadcasted
RSK Transactions waiting for confirmations
RSK Transactions waiting for signatures.
The Bitcoin blockchain best chain height
Returns the Bitcoin blockchain best chain height known by the Bridge contract.
Returns hashes of Bitcoin blockchain blocks. Federators can use these hashes to find what is the latest block in the chain the Bridge has and synchronize.
Returns the list of Bitcoin transaction hashes the Bridge already knows about.
Returns the current address of the federation.
Returns a constant value, the minimum amount of BTC allowed to be locked, in satoshis.
Copyright and related rights waived via CC0.