0.1.5 • Published 1 year ago

delegatecash-button v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

delegatecash-button · NPM npm (tag) npm bundle size Twitter URL

This library is a web component that, when given a connected wallet and an rpc network, will generate a pre-made UI component that allows you to select your delegated vaults from the delegate.cash Relegation Registry.

Usage Examples

Javascript | React | Svelte

<html>
  <head>
    <script
      src="https://cdn.jsdelivr.net/npm/delegatecash-button@latest/delegate-cash-button.js"
      type="module"
    ></script>
  </head>
  <body>
    <delegate-cash-button
      label="Mint"
      connected-wallet="0x0000000000000000000000000000000000000001"
      rpc-url="https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
      rounded="true"
    />
  </body>
</html>

Properties

PropertyDescriptionTypeDefault
rpc-url (required)The rpc url of the network you want to usestringundefined
connected-walletThe current connected walletstringundefined
labelThe main label (eg. "Mint", "Purchase")stringundefined
disabledWhether the main button is disabled or notbooleanfalse
contractFilter delegations by contract approvalstringundefined
token-idFilter delegations by tokenId approvalstringundefined
default-wallet-selectionAuto-select a vault instead of connected walletstringundefined
default-no-wallet-labelDefault label when a connected wallet is not selectedstring'Connect Wallet'
force-dropdownForce dropdown to be openbooleanfalse
roundedIf you want rounded cornersbooleanfalse
themeLight or Dark themestring'light'

Events

EventDescriptionType
buttonClickWhen the main button is clickedCustomEvent<string>
walletSelectWhen a wallet is selected from the dropdownCustomEvent<string>
0.1.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.5

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago