Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
This library aims to provide a component to be integrated into any DApp to let users chat with each other. The chat is fully themeable, thanks to ChakraUI.
You can find examples of integrations in the following:
Install @nft/chat
npm i @nft/chat
ChatProvider
Wrap your app with the ChatProvider
component, passing your ethers
signer to it.
import { ChatProvider } from '@nft/chat'
function App() {
const signer = useSigner()
return <ChatProvider signer={signer}>{children}</ChatProvider>
}
name | type | description |
---|---|---|
signer | Signer (@ethersproject/abstract-signer) | An ethers signer representing the currently connected wallet |
lookupAddress | (address: string) => Promise<{ name?: string, avatar?: string }> | Optional: Function to resolve an Ethereum address (think about ENS, Lens protocol...) |
onUserClick | (address: string) => void | Optional: Function called every time an address/avatar is clicked within the chat |
theme | Dict (@chakra-ui/utils) | Optional: Theme to customize the look and feel of the chat https://chakra-ui.com/docs/styled-system/customize-theme |
Chat
Now that your application is set up with the provider, you can place the chat component anywhere. This component will have a dynamic size depending on the size of your container.
import { Chat } from '@nft/chat'
function Page() {
return <Chat />
}
name | type | description |
---|---|---|
recipient | string | Optional: Address of the recipient to chat to |
You're good to go! Enjoy chatting in web3.
FAQs
Wallet to wallet chat widget
The npm package @nft/chat receives a total of 0 weekly downloads. As such, @nft/chat popularity was classified as not popular.
We found that @nft/chat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.