Skip to content

AtomicLoans/chainabstractionlayer-loans

Repository files navigation

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

About

Decentralized Bitcoin Backed Loan Protocol - Bitcoin Scripts

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •