@eyettea/bridge-widget
v0.0.1-rc.6
Published
Alephium Bridge Widget is a React component library for cross-chain asset transfers to and from the Alephium blockchain.
Readme
Alephium Bridge Widget 
Alephium Bridge Widget is a React component library for cross-chain asset transfers to and from the Alephium blockchain.
Getting Started
Installation
npm i @alephium/bridge-widgetYou should also install the peer dependencies:
npm i @alephium/web3 @alephium/web3-reactUsage
import AlephiumBridgeWidget, { WalletProviders } from '@alephium/bridge-widget';
function App() {
return (
<WalletProviders>
<AlephiumBridgeWidget />
</WalletProviders>
);
}WalletProviders supplies the necessary wallet contexts for the bridge widget to work. It excludes Alephium by
default since it assumes that your React dApp will already provide one, to avoid conflicts. If your dApp does not
provide one, you can enable it with:
<WalletProviders includeAlephium>
<AlephiumBridgeWidget />
</WalletProviders>Development
npm iYou can start a development server on devnet with a testing React app that uses the bridge widget with:
npm startFor mainnet or testnet you can use:
npm start:mainnet
npm start:testnetPublishing
To publish to a local registry, you can use Verdaccio:
npx verdaccioThen, you can build and publish the package:
npm run build
npm publish --registry http://localhost:4873