/bch-wallet-locker

Simple CashScript to lock the Wallet usage

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

bch-wallet-locker

This is a simple smart-contract experiment with CashScript . The purpose of this experiment is to create a Vault that locks your funds without the need of a third party custody. The funds are locked until a PGP(HASH(secret code)) is available on the P2P Network for this Wallet. The Vault can be extended with the usage of multisig and a timeout that release the funds.

WARNING: The security is not the purpose of this project. This idea is a pretext to use CDS coupled with a custom PGP Oracle Provider

Sequence for Vault usage

image

Sequence for Vault creation

image

Installation

npm install -g ts-node
git clone https://github.com/evaletolab/bch-wallet-locker
cd  bch-wallet-locker
npm install

Usage

ts-node locker-vault.ts
node locker-vault.js

BCH Faucet on Testnet

First time you will get the error:

contract address: bchtest:pzd3jvwuqjwyrzm8xqks4k3l6wkyeygl5uthw875lp
contract balance: 0
--- ERR Error: Insufficient balance: available (0) < needed (1078).