0.0.33 • Published 4 months ago

@layerzerolabs/stargate-ui v0.0.33

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

Stargate Transfer Widget

This widget allows you to embed the Stargate Transfer module in any application created with React/NextJS, giving users instant ability to swap native assets cross-chain, accessing Stargate’s unified liquidity pools.

Instalation

yarn add @layerzerolabs/stargate-ui
npm i @layerzerolabs/stargate-ui
pnpm i @layerzerolabs/stargate-ui

Usage

This package exports a custom HTML element. To use it, import the widget file like any other javascript file in your HTML (either from your own static file serving service or from npm through unpkg), which will add an element named stargate-widget to the local custom elements registry. This way the widget dependencies will remain in the local scope of the widget and will not affect the rest of the application.

The size and position of the stargate-widget can be modified by setting its parent's attributes.

<script src="https://unpkg.com/@layerzerolabs/stargate-ui@latest/element.js" defer async></script>
<div style="width: 320px; height: 640px;">
  <stargate-widget theme="dark" />
</div>

Attributes

NameTypeDescriptionDefault value
themestring\|objectTheme preset name (light, dark) or JSON-stringified MUI Themedark
partnerIdnumberNumeric ID of a Stargate partner (decimal base)
feeCollectorstringAddress of the fee collector contract / wallet
tenthBpsnumber

The scripts checksum can be find in the element.js.sha384 file.

Example configurations

<!-- Default - dark theme -->
<stargate-widget />

<!-- Light theme with partner configuration -->
<stargate-widget
  theme="light"
  partnerId="105"
  feeCollector="0xc13b65f7c53Cd6db2EA205a4b574b4a0858720A6"
  tenthBps="10"
/>

<!-- Custom theme -->
<stargate-widget theme="{ ...your MUI theme options }" />
0.0.33

4 months ago

0.0.30

9 months ago

0.0.31

9 months ago

0.0.32

7 months ago

0.0.27

10 months ago

0.0.28

10 months ago

0.0.29

10 months ago

0.0.26

12 months ago

0.0.25

1 year ago

0.0.25-mainnet.9

2 years ago

0.0.25-mainnet.8

2 years ago

0.0.25-testnet.0

2 years ago

0.0.25-testnet.9

2 years ago

0.0.25-testnet.8

2 years ago

0.0.25-testnet.5

2 years ago

0.0.25-testnet.6

2 years ago

0.0.25-testnet.3

2 years ago

0.0.25-testnet.4

2 years ago

0.0.25-testnet.1

2 years ago

0.0.25-testnet.2

2 years ago

0.0.25-mainnet.6

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

1.0.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago