Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scrypt-inc/smartcontract-btc


https://github.com/scrypt-inc/smartcontract-btc

Last synced: 19 days ago
JSON representation

Awesome Lists containing this project

README

        

Read [article]() for more details.

## Requirements:

Run:

```sh
npm i && pip3 install bitcoin-utils
```

## Deployment:

Produce redeem script:

```sh
npx ts-node src/contracts/demo.ts
```

Next, adjust values (marked with "TODO") in deployment scripts under `deployment/`. After that you can construct the serialized transactions which may be broadcast.

This will construct that pays the redeem script using a P2WSH output:

```sh
python3 deployment/p2wpkh_p2wsh_mainnet.py
```

And this will construct a transaction to spend it:

```sh
python3 deployment/p2wsh_p2wpkh_mainnet.py
```