Skip to content

Commit

Permalink
Merge pull request #13 from lombard-finance/dev
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
hashxtree authored Sep 13, 2024
2 parents e42e742 + 198c5fe commit ef000df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ LBTC is liquid Bitcoin; it's yield-bearing, cross-chain, and 1:1 backed by BTC.
```mermaid
graph TD
users1(Users) -- mint(data,proofSignature) --> lbtc1{{LBTC}}
lbtc1 -- isValidSignature(hash,signature) --> consortium1{{LombardConsortium}}
lbtc1 -- isValidSignature(hash,signature) --> consortium1{{consortium}}
lbtc1 -- validateWithdrawal(depositID,withdrawalAmount) --> bascule{{bascule}}
users2(Users) -- redeem(scriptPubkey,amount) --> lbtc2{{LBTC}}
users3(Users) -- depositToBridge(toChain,toAddress,amount) -->lbtc3A{{LBTC, chain A}}
users3 -- withdrawFromBridge(data,proofSignature) --> lbtc3B{{LBTC, chain B}}
lbtc3B -- isValidSignature(hash,signature) --> consortium3{{LombardConsortium}}
lbtc3B -- isValidSignature(hash,signature) --> consortium3{{consortium}}
```

### Addresses
Expand Down
8 changes: 6 additions & 2 deletions docs/unstake.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Unstake LBTC

## Prepare output script
LBTC currently supports only `p2wpkh` and `p2tr` scripts
LBTC currently supports only `p2wpkh`, `p2wsh` and `p2tr` scripts

```js
import bitcoin, {initEccLib} from "bitcoinjs-lib";
Expand All @@ -28,7 +28,11 @@ const example = () => {

## Make transaction

Call the function `burn(bytes calldata scriptPubkey, uint256 amount)`
## Validate unstake

Call the function `calcUnstakeRequestAmount(bytes calldata scriptPubkey, uint256 amount) public view returns (uint256 amountAfterFee, bool isAboveDust)` to validate unstake amount and payment script.

Call the function `redeem(bytes calldata scriptPubkey, uint256 amount)`

**Params**

Expand Down

0 comments on commit ef000df

Please sign in to comment.