Skip to content
Decentralized Bitcoin Backed Loan Protocol - Bitcoin Scripts
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
examples/collateral
packages
test
webpack
.gitignore
.travis.yml
LICENSE.md
README.md
babel.config.js
babel.test.js
greenkeeper.json
lerna.json
liquality-logo.png
package-lock.json
package.json

README.md

Chain Abstraction Layer Loans

Build Status Coverage Status Standard Code Style MIT License Telegram Greenkeeper badge|

⚠️ This project is under heavy development. Expect bugs & breaking changes.

Query different blockchains with account management using a single and simple interface.

Dependencies

This repository was built as an extension to the ChainAbstractionLayer maintained by the core contributors of Liquality. It is necessary to include the Client and providers from the @liquality npm packages in order to use providers such as the BitcoinCollateralProvider.

Packages

Package Version
@atomicloans/bitcoin-collateral-provider ChainAbstractionLayer-Loans
@atomicloans/bitcoin-collateral-swap-provider ChainAbstractionLayer-Loans
@atomicloans/loan-bundle ChainAbstractionLayer-Loans
@atomicloans/loan-client ChainAbstractionLayer-Loans
@atomicloans/provider ChainAbstractionLayer-Loans

Usage

import { Client, Provider, providers, crypto } from '@liquality/bundle'
import { LoanClient, providers as lproviders } from '@atomicloans/bundle'

const bitcoinNetworks = providers.bitcoin.networks
const bitcoin = new Client()
const bitcoinLoanWithLedger = new LoanClient(bitcoin)
bitcoin.loan = bitcoinLoanWithLedger
bitcoin.addProvider(new providers.bitcoin.BitcoinBitcoreRpcProvider('https://liquality.io/bitcointestnetrpc/', 'bitcoin', 'local321'))
bitcoin.addProvider(new providers.bitcoin.BitcoinLedgerProvider({ network: bitcoinNetworks['bitcoin_testnet'], segwit: false }))
bitcoin.loan.addProvider(new lproviders.bitcoin.BitcoinCollateralProvider({ network: bitcoinNetworks[config.bitcoin.network] }, { script: 'p2sh', address: 'p2wpkh'}))

bitcoin.loan.collateral.lock(values, pubKeys, secretHashes, expirations)

Development

npm install
npm run bootstrap
npm run watch

Production

npm run build

License

MIT

You can’t perform that action at this time.