New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@solana-wallets/solid-2.0

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana-wallets/solid-2.0

Example hello world package in the solana-wallets repository.

0.11.3
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

your-repository-name Hello

Solid-2.0

Solid.js adapter for the core-2.0 package

Installation

npm install @your-repository-name/solid-2.0
# or
yarn add @your-repository-name/solid-2.0
# or
pnpm add @your-repository-name/solid-2.0

How to use it

import { WalletProvider } from "@your-repository-name/solid-2.0"

// App.tsx
<WalletProvider
  autoConnect={true}
  disconnectOnAccountChange={true}
  localStorageKey="unified:wallet-storage-key"
  env={"devnet"}
  // NOTE: only wallet adapters that use
  // @solana/web3.js v2.x.x should be added
  additionalWallets={[]}
>
  {props.children}
</WalletProvider>

// Example.tsx
import { useWallet } from "@your-repository-name/solid-2.0"

const Example: Component = () => {
  const { connectedAccount, signMessage, getTransactionSendingSigner } = useWallet()
  const publicKey = createMemo<string | undefined>(() => {
    const accInfo = connectedAccount()
    if (!accInfo) {
      return
    }
    return accInfo.type === "standard"
      ? accInfo.info?.pubKey
      : (accInfo.info.publicKey?.toString() ?? undefined)
  })
  return (
    <>
      ...
    </>
  )
}

Changelog

See CHANGELOG.md.

Keywords

solid

FAQs

Package last updated on 20 Nov 2024

Did you know?

Socket

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.

Install

Related posts