0.7.0 • Published 4 years ago
@liquality/kiba-provider v0.7.0
Chain Abstraction Layer
:warning: This project is under heavy development. Expect bugs & breaking changes.
:pencil: Introductory Blog Post: The Missing Tool to Cross-Chain Development
Query different blockchains with account management using a single and simple interface.
Packages
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
0.7.0
4 years ago
0.6.9
4 years ago
0.6.8
4 years ago
0.6.7
4 years ago
0.6.6
4 years ago
0.6.5
4 years ago
0.6.4
4 years ago
0.6.3
4 years ago
0.6.2
4 years ago
0.6.1
4 years ago
0.6.0
4 years ago
0.5.0
4 years ago
0.5.0-alpha.2
4 years ago
0.5.0-alpha.1
4 years ago
0.5.0-alpha.0
4 years ago
0.4.32
4 years ago
0.4.35
4 years ago
0.4.33
4 years ago
0.4.34
4 years ago
0.4.31
4 years ago
0.4.30
4 years ago
0.4.29
4 years ago