![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
get-starknet-core
Advanced tools
[![npm](https://img.shields.io/npm/v/get-starknet.svg)](https://www.npmjs.com/package/get-starknet)
Readme
# using npm
npm install get-starknet starknet@next
# using yarn
yarn add get-starknet starknet@next
# using pnpm
pnpm add get-starknet starknet@next
You can use the built-in UI to connect to any Starknet wallet as fast as possible like this:
import { connect, disconnect } from "get-starknet"
return <button onClick={() => connect()}>Connect wallet</button>
You can also choose to customize the UI by overwriting the CSS classes, or by
implementing your very own UI. This is possible due to a split into a core
and
ui
package. As a library author or dapp developer who wants to implement a
custom UI, you can use the core
package.
import {
disconnect,
enable,
getAvailableWallets,
getDiscoveryWallets,
getLastConnectedWallet,
getPreAuthorizedWallets,
} from "get-starknet-core"
interface GetStarknetResult {
// Returns all wallets available in the window object
getAvailableWallets: (
options?: GetWalletOptions,
) => Promise<StarknetWindowObject[]>
// Returns only preauthorized wallets available in the window object
getPreAuthorizedWallets: (
options?: GetWalletOptions,
) => Promise<StarknetWindowObject[]>
// Returns all wallets in existence (from discovery file)
getDiscoveryWallets: (options?: GetWalletOptions) => Promise<WalletProvider[]>
// Returns the last wallet connected when it's still connected
getLastConnectedWallet: () => Promise<StarknetWindowObject | null>
// Connects to a wallet
enable: (
wallet: StarknetWindowObject,
options?: {
starknetVersion?: "v4" | "v5"
},
) => Promise<ConnectedStarknetWindowObject>
// Disconnects from a wallet
disconnect: (options?: { clearLastWallet?: boolean }) => Promise<void>
}
You need Node and pnpm installed. Make sure to clone this repo and run:
pnpm install
pnpm build
To start watching for changes, run:
pnpm dev
and open http://localhost:5173/
For running tests:
pnpm test
FAQs
[![npm](https://img.shields.io/npm/v/get-starknet.svg)](https://www.npmjs.com/package/get-starknet)
The npm package get-starknet-core receives a total of 6,830 weekly downloads. As such, get-starknet-core popularity was classified as popular.
We found that get-starknet-core demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.