1.0.2 • Published 1 day ago

@omnity/widget v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 day ago

Omnity Widget

The Omnity Widget is a simple way to embed Omnity into your website. It is a simple JavaScript file that you can include in your website to display Omnity content.

Usage

To use the Omnity Widget, you need to include the following script tag in your website:

npm install @omnity/widget

Then, you can use the following code to display Omnity content:

import { OmnityWidget, ChainID } from "@omnity/widget";

export default function MyComponent() {
  return (
    <OmnityWidget
      sourceChain={ChainID.Bitcoin}
      targetChain={ChainID.ICP}
      tokenIds={["Bitcoin-runes-PURPLE•MONKE•DISHWASHER"]}
      reversible
    />
  );
}

Configuration

The Omnity Widget accepts the following props:

PropsDescriptionType
SourceChainSource chainChainID, optional
targetChainTarget chainChainID, optional
tokenIdstoken ids to bridgestring[], optional
reversiblebridge from target chain to source chainbool, default false
colorModeinterface color modesystem, light or dark
widthwidget widthnumber, optional, default 464
enum ChainID {
  ICP = "eICP",
  Bitcoin = "Bitcoin",
}