Skip to main content
This page summarizes the supported third-party integration API for @deloraprotocol/widget and the optional @deloraprotocol/widget-wallet-management adapter package. Most integrations center on the trading widget surface:
  • TradeWidget
  • TradeWidgetWalletProvider
  • useTradeWidgetWalletManagement
The core package also exports a smaller MyWidget demo component and shared theming props.

@deloraprotocol/widget exports

Components and hooks:
  • MyWidget
  • TradeWidget
  • TradeWidgetWalletProvider
  • useTradeWidgetWalletManagement
Shared widget props and theme types:
  • MyWidgetProps
  • MyWidgetTheme
  • MyWidgetVars
Trade widget types:
  • TradeWidgetProps
  • TradeWidgetConfig
  • TradeWidgetRpcUrlsByChainId
  • TradeWidgetWalletConfig
  • TradeWidgetWalletId
  • TradeWidgetPoweredByPosition
  • WalletNamespace
  • TradeWidgetStatus
  • TradeWidgetFilters
  • TradeWidgetSideFilters
  • TradeWidgetTokenSelection
  • TradeWidgetQuotePayload
  • TradeWidgetActionPayload
  • TradeWidgetConnectPayload
  • TradeWidgetTransactionPayload
  • TradeWidgetErrorPayload
  • Token
  • Network
Wallet-management and provider types:
  • TradeWidgetManagedWallet
  • TradeWidgetManagedWalletConnectParams
  • TradeWidgetWalletManagement
  • TradeWidgetWalletProviderProps
  • Eip1193Provider
  • KnownWalletOptionId
  • SolanaInjectedProvider
  • SolanaProvider
  • WalletConnectionStatus
  • WalletOptionDescriptor
  • WalletOptionId
  • WalletOptionType
  • WalletVisualId
  • WalletStandardSolanaAccount
  • WalletStandardSolanaProvider

MyWidget and MyWidgetProps

MyWidget is a minimal example export that shares the same root theming surface as TradeWidget. If you are embedding the production trade experience, use TradeWidget. If you need the lightweight demo component that ships with the package, use MyWidget. MyWidgetProps extends normal root div props. Common MyWidgetVars fields include:
  • radius for shared surface radius
  • actionButtonRadius for the main CTA radius
  • fontFamily, fontSize, lineHeight, and letterSpacing for typography
  • color and surface tokens such as bg, fg, border, surface, and surfaceAlt
See Customize Widget for the full theme-token surface and examples.

TradeWidgetProps

TradeWidgetProps extends normal root div props, except the DOM onError prop is replaced by the widget error callback.

TradeWidgetConfig

For browser-rendered widgets, prefer not to pass apiKey directly from the client. Keep it on your backend and proxy /v1/chains, /v1/tokens, /v1/tools, and /v1/quotes through config.apiUrl. If your proxy does not serve Delora-relative image assets, set assetBaseUrl explicitly or proxy those asset paths as well. If termsUrl or privacyPolicyUrl is omitted, the connect modal falls back to:
  • ${window.location.origin}/documentation/termsofuse
  • ${window.location.origin}/documentation/privacypolicy
For third-party embeds, it is usually better to set both links explicitly. When requireWalletConsent is false, the consent checkbox and both legal links are hidden, and wallet rows can be selected immediately.

Wallet and branding configuration types

include, exclude, and order are independent. include is an allowlist, exclude is a denylist with precedence over include, and order only moves enabled wallets to the front without hiding unlisted wallets. These controls apply to widget-managed wallets, not host-provided walletOptions.

Filters

TradeWidgetStatus

Event payloads

Wallet management types

If you pass an origin or destination object into TradeWidgetWalletProvider, that side is treated as externally managed. To keep the built-in wallet flow for a side, omit that side from the provider value entirely. useTradeWidgetWalletManagement is a thin helper hook for reading the same wallet-management context that powers TradeWidgetWalletProvider.

@deloraprotocol/widget-wallet-management exports

This package is optional. Install it when you want Delora to reuse wallet state from common host wallet libraries instead of writing a TradeWidgetManagedWallet object by hand. Subpath exports: The root package also re-exports every adapter and shared type. Prefer subpath imports when your app only installs one optional peer wallet stack. Shared types exported from the root package:
  • DeloraOpenConnectModal
  • DeloraOpenConnectModalParams
  • ManagedWallet

DeloraWalletManagementProvider

DeloraWalletManagementProvider is a convenience wrapper around TradeWidgetWalletProvider.
If origin or destination is omitted, that side receives wallet. Pass explicit origin and destination when sell-side and receiver-side wallet ownership should differ.

DeloraAutoWalletManagementProvider

DeloraAutoWalletManagementProvider detects host Wagmi and Solana Wallet Adapter contexts and wires them into the widget.
Defaults:
  • usePartialWalletManagement: true
  • forceInternalWalletManagement: false
Set evm={false} or solana={false} to opt out of one namespace. Set forceInternalWalletManagement to ignore all detected host contexts.

useWagmiManagedWallet

The hook returns TradeWidgetManagedWallet for the EVM namespace. It reads account state from Wagmi, resolves an EIP-1193 provider from the active connector, and delegates connect and disconnect actions to Wagmi.

useSolanaWalletAdapterManagedWallet

The hook returns TradeWidgetManagedWallet for the SVM namespace. It reads account state from Solana Wallet Adapter and exposes a Solana provider wrapper for transaction signing.

useCompositeManagedWallet

The hook combines separate EVM and Solana managed wallets into one TradeWidgetManagedWallet. It sets managedNamespaces, fills walletsByNamespace, merges wallet options, and routes connect/provider calls to the namespace-specific adapter.

Shared connect modal types

Use openConnectModal when the Delora connect button should open a host wallet modal, such as RainbowKit or Solana Wallet Adapter UI.