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

@solana-wallets/solid-1.0

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana-wallets/solid-1.0

Example hello world package in the solana-wallets repository.

  • 0.11.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

your-repository-name Hello

Solid-1.0

Solid.js adapter for the core-1.0 package

Installation

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

How to use it

import { WalletProvider } from "@your-repository-name/solid-1.0"
import { CoinbaseWalletAdapter } from "@solana/wallet-adapter-coinbase"
import { TrezorWalletAdapter } from "@solana/wallet-adapter-trezor"
import { LedgerWalletAdapter } from "@solana/wallet-adapter-ledger"

// App.tsx
<WalletProvider
  autoConnect={true}
  disconnectOnAccountChange={true}
  localStorageKey="unified:wallet-storage-key"
  env={"devnet"}
  // NOTE: only wallet adapters that use
  // @solana/web3.js v1.x.x should be added
  additionalWallets={[
    new CoinbaseWalletAdapter(),
    new TrezorWalletAdapter({ connectUrl: "https://connect.trezor.io/9/" }),
    new LedgerWalletAdapter(),
  ]}
>
  {props.children}
</WalletProvider>

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

const Example: Component = () => {
  const { connectedAccount, signMessage, sendTransaction } = useWallet()
  const publicKey = createMemo<PublicKey | undefined>(() => {
    const accInfo = connectedAccount()
    if (!accInfo || !accInfo.info) {
      return
    }
    return accInfo.type === "standard"
      ? new PublicKey(accInfo.info.account.publicKey)
      : (accInfo.info.publicKey ?? undefined)
  })
  return (
    <>
      ...
    </>
  )
}

Changelog

See CHANGELOG.md.

Keywords

FAQs

Package last updated on 06 Dec 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc