@liquality/chainabstractionlayer
@liquality/chainabstractionlayer
npm i @liquality/chainabstractionlayer
Deprecated!
ChainAbstractionLayer has migrated to modules. Visit https://github.com/liquality/chainabstractionlayer for instructions.
@liquality/chainabstractionlayer

@liquality/chainabstractionlayer

Blockchain abstraction layer

by liquality

0.1.23-next.2 (see all)License:MITTypeScript:Not Found
npm i @liquality/chainabstractionlayer
Readme

Chain Abstraction Layer

Test Status Coverage Status Standard Code Style MIT License Gitter Telegram Greenkeeper badge

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

📝 Introductory Blog Post: The Missing Tool to Cross-Chain Development

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

Packages

PackageVersion
@liquality/bitcoin-js-wallet-providerChainAbstractionLayer
@liquality/bitcoin-ledger-providerChainAbstractionLayer
@liquality/bitcoin-networksChainAbstractionLayer
@liquality/bitcoin-rpc-providerChainAbstractionLayer
@liquality/bitcoin-wallet-node-providerChainAbstractionLayer
@liquality/bitcoin-swap-providerChainAbstractionLayer
@liquality/bitcoin-esplora-api-providerChainAbstractionLayer
@liquality/bitcoin-esplora-swap-find-providerChainAbstractionLayer
@liquality/bitcoin-utilsChainAbstractionLayer
@liquality/clientChainAbstractionLayer
@liquality/cryptoChainAbstractionLayer
@liquality/debugChainAbstractionLayer
@liquality/errorsChainAbstractionLayer
@liquality/ethereum-erc20-providerChainAbstractionLayer
@liquality/ethereum-erc20-swap-providerChainAbstractionLayer
@liquality/ethereum-ledger-providerChainAbstractionLayer
@liquality/ethereum-wallet-api-providerChainAbstractionLayer
@liquality/ethereum-networksChainAbstractionLayer
@liquality/ethereum-rpc-providerChainAbstractionLayer
@liquality/ethereum-js-wallet-providerChainAbstractionLayer
@liquality/ethereum-swap-providerChainAbstractionLayer
@liquality/ethereum-scraper-swap-find-providerChainAbstractionLayer
@liquality/ethereum-utilsChainAbstractionLayer
@liquality/jsonrpc-providerChainAbstractionLayer
@liquality/ledger-providerChainAbstractionLayer
@liquality/providerChainAbstractionLayer
@liquality/schemaChainAbstractionLayer
@liquality/utilsChainAbstractionLayer
@liquality/wallet-providerChainAbstractionLayer

Usage

import { Client } from '@liquality/client'
import { BitcoinRpcProvider } from '@liquality/bitcoin-rpc-provider'
import { EthereumRpcProvider } from '@liquality/ethereum-rpc-provider'

import { BitcoinLedgerProvider } from '@liquality/bitcoin-ledger-provider'
import { EthereumLedgerProvider } from '@liquality/ethereum-ledger-provider'

import { BitcoinNetworks } from '@liquality/bitcoin-networks'
import { EthereumNetworks } from '@liquality/ethereum-networks'

const bitcoin = new Client()
const ethereum = new Client()

bitcoin.addProvider(new BitcoinRpcProvider(
  'https://liquality.io/bitcointestnetrpc/', 'bitcoin', 'local321'
))
ethereum.addProvider(new EthereumRpcProvider(
  'https://rinkeby.infura.io/v3/xxx'
))

bitcoin.addProvider(new BitcoinLedgerProvider(
  { network: BitcoinNetworks.bitcoin_testnet }
))
ethereum.addProvider(new EthereumLedgerProvider(
  { network: EthereumNetworks.rinkeby }
))

// Fetch addresses from Ledger wallet using a single-unified API
const [ bitcoinAddress ] = await bitcoin.wallet.getAddresses(0, 1)
const [ ethereumAddress ] = await ethereum.wallet.getAddresses(0, 1)

// Sign a message
const signedMessageBitcoin = await bitcoin.wallet.signMessage(
  'The Times 3 January 2009 Chancellor on brink of second bailout for banks', bitcoinAddress
)
const signedMessageEthereum = await ethereum.wallet.signMessage(
  'The Times 3 January 2009 Chancellor on brink of second bailout for banks', ethereumAddress
)

// Send a transaction
await bitcoin.chain.sendTransaction(<to>, 1000)
await ethereum.chain.sendTransaction(<to>, 1000)

Development

npm install
npm run bootstrap
npm run watch

Production

npm run build

Publish

npm run new:version # prepare
npm run publish:all # publish

License

MIT

VersionTagPublished
0.1.23-next.2
latest
4yrs ago
0.1.23-next.12
next
4yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate