Dapp on Starknet

Starknet dApp You will learn how to use get-starknet and starknet-react to build a simple dApp for minting NFTs on Starknet.

A demo:

https://starknetfinal.kongtaoxing.repl.co/

get-starknet get-starknet provides a JavaScript library that provides a set of APIs for interacting with the Starknet network. Developers can install the get-starknet library using npm, and then use it in their JavaScript code to deploy and manage contracts on the network, as well as call functions and query data from existing contracts. The library provides a set of functions and classes for tasks such as compiling contracts, deploying contracts, and interacting with the network.

  1. Install To install the get-starknet library, you will need to have Node.js installed on your system, then follow these steps:

To initialize an npm project:

Open a terminal window or command prompt. Navigate to an empty directory where you want to initialize an npm project. run the following command: npm init -y This will start a command-line interface that will guide you through the process of creating a package.json file. You will be prompted to enter various settings for your project, such as its name, version, description, and entry point.

To install get-starknet:

Navigate to the project directory where you want to install the library. Run the following command to install the get-starknet library:

using npm

npm install get-starknet starknet@next

(alternative) using yarn

yarn add get-starknet starknet@next

(alternative) using pnpm

pnpm add get-starknet starknet@next

That's it! You should now be able to use the get-starknet library in your project.

  1. Basic Usage 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