chainabstractionlayer-loans

所属分类:区块链开发
开发工具:JavaScript
文件大小:1379KB
下载次数:0
上传日期:2023-01-07 08:29:07
上 传 者sh-1993
说明:  去中心化的比特币贷款协议-比特币脚本
(Decentralized Bitcoin Backed Loan Protocol - Bitcoin Scripts)

文件列表:
.travis.yml (252, 2020-05-05)
LICENSE.md (1069, 2020-05-05)
babel.config.js (171, 2020-05-05)
babel.test.js (74, 2020-05-05)
examples (0, 2020-05-05)
examples\collateral (0, 2020-05-05)
examples\collateral\collateral.html (15394, 2020-05-05)
examples\collateral\collateralAgent.html (16623, 2020-05-05)
examples\collateral\collateralSwap.html (16900, 2020-05-05)
examples\collateral\liquality.bundle.min.js (1295794, 2020-05-05)
greenkeeper.json (422, 2020-05-05)
lerna.json (85, 2020-05-05)
liquality-logo.png (6671, 2020-05-05)
package-lock.json (826127, 2020-05-05)
package.json (3724, 2020-05-05)
packages (0, 2020-05-05)
packages\bitcoin-collateral-provider (0, 2020-05-05)
packages\bitcoin-collateral-provider\lib (0, 2020-05-05)
packages\bitcoin-collateral-provider\lib\BitcoinCollateralProvider.js (35676, 2020-05-05)
packages\bitcoin-collateral-provider\lib\index.js (110, 2020-05-05)
packages\bitcoin-collateral-provider\package-lock.json (73266, 2020-05-05)
packages\bitcoin-collateral-provider\package.json (1376, 2020-05-05)
packages\bitcoin-collateral-provider\test (0, 2020-05-05)
packages\bitcoin-collateral-provider\test\unit (0, 2020-05-05)
packages\bitcoin-collateral-provider\test\unit\BitcoinCollateralProvider.test.js (3129, 2020-05-05)
packages\bitcoin-collateral-swap-provider (0, 2020-05-05)
packages\bitcoin-collateral-swap-provider\lib (0, 2020-05-05)
packages\bitcoin-collateral-swap-provider\lib\BitcoinCollateralSwapProvider.js (22138, 2020-05-05)
packages\bitcoin-collateral-swap-provider\lib\index.js (122, 2020-05-05)
packages\bitcoin-collateral-swap-provider\package-lock.json (13704, 2020-05-05)
packages\bitcoin-collateral-swap-provider\package.json (1329, 2020-05-05)
... ...

# Chain Abstraction Layer Loans [![Build Status](https://travis-ci.org/AtomicLoans/chainabstractionlayer-loans.svg?branch=master)](https://travis-ci.org/AtomicLoans/chainabstractionlayer-loans) [![Coverage Status](https://coveralls.io/repos/github/AtomicLoans/chainabstractionlayer-loans/badge.svg?branch=add-travis)](https://coveralls.io/github/AtomicLoans/chainabstractionlayer-loans?branch=add-travis) [![Standard Code Style](https://img.shields.io/badge/codestyle-standard-brightgreen.svg)](https://github.com/standard/standard) [![MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](./LICENSE.md) [![Telegram](https://img.shields.io/badge/chat-on%20telegram-blue.svg)](https://t.me/Atomic_Loans) [![Greenkeeper badge](https://badges.greenkeeper.io/AtomicLoans/chainabstractionlayer-loans.svg)](https://greenkeeper.io/)| > :warning: 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](https://github.com/liquality/chainabstractionlayer) maintained by the core contributors of [Liquality](https://liquality.io). 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](./packages/bitcoin-collateral-provider)|[![ChainAbstractionLayer-Loans](https://img.shields.io/npm/v/@atomicloans/bitcoin-collateral-provider.svg)](https://npmjs.com/package/@atomicloans/bitcoin-collateral-provider)| |[@atomicloans/bitcoin-collateral-swap-provider](./packages/bitcoin-collateral-swap-provider)|[![ChainAbstractionLayer-Loans](https://img.shields.io/npm/v/@atomicloans/bitcoin-collateral-swap-provider.svg)](https://npmjs.com/package/@atomicloans/bitcoin-collateral-swap-provider)| |[@atomicloans/loan-bundle](./packages/loan-bundle)|[![ChainAbstractionLayer-Loans](https://img.shields.io/npm/v/@atomicloans/loan-bundle.svg)](https://npmjs.com/package/@atomicloans/loan-bundle)| |[@atomicloans/loan-client](./packages/loan-client)|[![ChainAbstractionLayer-Loans](https://img.shields.io/npm/v/@atomicloans/loan-client.svg)](https://npmjs.com/package/@atomicloans/loan-client)| |[@atomicloans/provider](./packages/provider)|[![ChainAbstractionLayer-Loans](https://img.shields.io/npm/v/@atomicloans/provider.svg)](https://npmjs.com/package/@atomicloans/provider) ## Usage ```javascript 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 ```bash npm install npm run bootstrap npm run watch ``` ## Production ```bash npm run build ``` ## License [MIT](./LICENSE.md)

近期下载者

相关文件


收藏者