A complete, interactive data structure that includes all necessary information to display and interact with a Blink.
Blink
contains the complete, interactive data structure. It includes all necessary information to display and interact with a Blink
, including its current state, possible actions, and related data.
@dialectlabs/blinks/react
useBlink
- This is the overall hook, it fetches the BlinkInstance
, initializes a security registry, and refreshes it every 10 minutes.useBlinksRegistryInterval
- This fetches the security registry and refreshes it.useBlinkSolanaWalletAdapter
- This sets up an adapter for Blink
using a wallet provider.Blink
, BlinksRegistry
, and BlinkConfig/BlinkAdapter
classes and interfaces.
useBlinkSolanaWalletAdapter
hook, then be sure to have<WalletProvider />
and<WalletModalProvider />
above in the component tree.blinkApiUrl
must be direct Blink provider URLs and not interstitials or website urls with actions.jsonuseBlink
hook and BlinkAdapter
type from @dialectlabs/blinks
Blink
component from @dialectlabs/blinks-react-native
getWalletAdapter
function has to be defined to generate an BlinkAdapter
for interactions with user wallets, like wallet connect and signing transactions through the React Native dApp.
After that, the <Blink />
component can be used in the React Native dApp to render the Blink. It takes the following props:
theme
- has the styling for the blink to be rendered;blink
- object returned from useBlink
function (which requires the adapter from getWalletAdapter
and Blink Provider URL);websiteUrl
- the complete URL of the Blink;websiteText
- the domain name of the Blink URL;