### Clone Solana Jetpack Compose Scaffold Repository Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/android-native/quickstart.md This command clones the Solana Jetpack Compose Scaffold repository from GitHub. This repository serves as a starting implementation and example reference for using core Solana Kotlin SDKs like web3-core, rpc-core, and Mobile Wallet Adapter. ```Shell git clone https://github.com/solana-mobile/solana-kotlin-compose-scaffold.git ``` -------------------------------- ### Install Dependencies and Start React Native Application Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/hello_world_tutorial.md Commands to navigate into the starter project directory, install necessary dependencies using Yarn, and launch the React Native application with the Metro bundler. This prepares the development environment for the tutorial. ```Shell cd SolanaReactNativeTutorialStarter && yarn install && npx react-native start ``` -------------------------------- ### Mobile Wallet Adapter: transact function Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md Reference for the `transact` function from `@solana-mobile/mobile-wallet-adapter-protocol-web3js`, which starts a session with a wallet app. ```APIDOC transact(callback: (wallet: Wallet) => Promise): Promise callback: An async function that receives a wallet object to send requests. Returns: A Promise that resolves with the result of the callback. ``` -------------------------------- ### Initialize Project and Solana Mobile dapp-store CLI Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/dapp-publishing/setup.md Provides a sequence of shell commands to set up a new `publishing` directory, initialize pnpm, install the `@solana-mobile/dapp-store-cli` package, and then initialize and display help for the `dapp-store` CLI. ```shell mkdir publishing cd publishing pnpm init pnpm install --save-dev @solana-mobile/dapp-store-cli npx dapp-store init npx dapp-store --help ``` -------------------------------- ### Install Solana Mobile dApp Dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/setup.md Installs essential Solana and React Native related libraries. These dependencies enable interaction with Solana, mobile wallet adapters, and provide necessary polyfills for React Native. ```shell yarn add \ @solana/web3.js \ @solana-mobile/mobile-wallet-adapter-protocol-web3js \ @solana-mobile/mobile-wallet-adapter-protocol \ react-native-get-random-values \ buffer ``` ```shell npm install \ @solana/web3.js \ @solana-mobile/mobile-wallet-adapter-protocol-web3js \ @solana-mobile/mobile-wallet-adapter-protocol \ react-native-get-random-values \ buffer ``` -------------------------------- ### Prepare pnpm Manually with Corepack Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/dapp-publishing/setup.md Prepares a specific, manually provided version of pnpm using Corepack. This is an alternative method for environments where `jq` is not installed or when a fixed pnpm version is preferred. ```shell corepack prepare pnpm@7.13.4 --activate ``` -------------------------------- ### Build Legacy Solana Transaction Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md Provides an example of constructing a legacy `Transaction` for backwards compatibility using `@solana/web3.js`. This method allows dApps to interact with older Solana programs or maintain compatibility with existing infrastructure. It demonstrates adding instructions like `SystemProgram.transfer` to the transaction. ```tsx import { Connection, PublicKey, Transaction, SystemProgram, } from "@solana/web3.js"; const latestBlockhash = await connection.getLatestBlockhash(); const randomTransferTransaction = new Transaction({ ...latestBlockhash, feePayer: fromPublicKey, }).add( SystemProgram.transfer({ fromPubkey: fromPublicKey, toPubkey: toPublicKey, lamports: 1_000, }) ); ``` -------------------------------- ### Connect to a wallet using transact Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md Demonstrates how to initiate a session with a locally installed MWA-compatible wallet app using the `transact` function from `@solana-mobile/mobile-wallet-adapter-protocol-web3js`. The callback provides a `wallet` object for sending requests. ```TypeScript import { transact } from "@solana-mobile/mobile-wallet-adapter-protocol-web3js"; await transact(async (wallet) => { /* ... */ }); ``` -------------------------------- ### Install Solana web3.js library Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/polyfill-guides/web3-js.md Add the core Solana web3.js library to your project using either yarn or npm. ```shell yarn add @solana/web3.js ``` ```shell npm install @solana/web3.js ``` -------------------------------- ### Initialize Expo dApp with Solana Mobile Template Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/expo.md This command initializes a new Expo application using the Solana Mobile Expo dApp Template, which comes with pre-installed Solana libraries and UI components, providing a quick start for dApp development. ```bash yarn create expo-app --template @solana-mobile/solana-mobile-expo-template ``` -------------------------------- ### Install Core Project Dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/mobile_nft_minter_tutorial.md Installs the initial project dependencies for the React Native dApp. This step handles core packages after scaffold initialization. ```shell rm package-lock.json yarn install ``` ```shell npm install ``` -------------------------------- ### Instantiate Solana RPC Client (Kotlin) Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/android-native/rpc-requests.md This example shows how to create an instance of `SolanaRpcClient` in Kotlin. It configures the client to connect to the Solana devnet API using `KtorNetworkDriver` for HTTP requests. ```kotlin import com.solana.rpc.SolanaRpcClient import com.solana.networking.KtorNetworkDriver val rpcClient = SolanaRpcClient("https://api.devnet.solana.com", KtorNetworkDriver()) ``` -------------------------------- ### Install Mobile Wallet Adapter Dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/reference/typescript/mobile-wallet-adapter.md Instructions to install the required Mobile Wallet Adapter protocol and web3.js wrapper libraries using popular package managers like Yarn or npm. ```shell yarn add \ @solana-mobile/mobile-wallet-adapter-protocol-web3js \ @solana-mobile/mobile-wallet-adapter-protocol \ ``` ```shell npm install \ @solana-mobile/mobile-wallet-adapter-protocol-web3js \ @solana-mobile/mobile-wallet-adapter-protocol \ ``` -------------------------------- ### Install Mobile Wallet Standard Package (npm) Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/mobile-wallet-adapter/web-installation.md Installs the `@solana-mobile/wallet-standard-mobile` package using npm, adding the Mobile Wallet Adapter library to your web application's dependencies. ```shell npm install @solana-mobile/wallet-standard-mobile ``` -------------------------------- ### Install project dependencies with Yarn Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/README.md This command installs all necessary project dependencies using Yarn, preparing the environment for development. ```Shell $ yarn ``` -------------------------------- ### Install Additional Libraries for NFT Minter Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/mobile_nft_minter_tutorial.md Installs specific React Native libraries required for the NFT minter dApp, including file system access, image picking, configuration management, and IPFS CID computation. ```shell yarn install \ rn-fetch-blob \ react-native-image-picker \ react-native-config \ multiformats ``` ```shell npm install \ rn-fetch-blob \ react-native-image-picker \ react-native-config \ multiformats ``` -------------------------------- ### Install Mobile Wallet Adapter React Native dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/using_mobile_wallet_adapter.md Instructions for installing the `@solana-mobile/mobile-wallet-adapter-protocol-web3js` and `@solana-mobile/mobile-wallet-adapter-protocol` libraries using yarn or npm. ```bash yarn install @solana-mobile/mobile-wallet-adapter-protocol-web3js \ @solana-mobile/mobile-wallet-adapter-protocol ``` ```bash npm install @solana-mobile/mobile-wallet-adapter-protocol-web3js \ @solana-mobile/mobile-wallet-adapter-protocol \ ``` -------------------------------- ### JSON Example: Web3MobileWallet.getCapabilities Result Structure Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/reference/typescript/mobile-wallet-methods/_walletGetCapabilities.mdx Provides a sample JSON output illustrating the structure and typical values returned by the `Web3MobileWallet.getCapabilities` method. ```json { "max_transactions_per_request": 10, "max_messages_per_request": 10, "supported_transaction_versions": ["legacy", 0], "features": [""] } ``` -------------------------------- ### Install Anchor Javascript SDK Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/polyfill-guides/anchor.md Add the Anchor library to your project using yarn or npm for React Native/Expo applications. ```shell yarn add @coral-xyz/anchor ``` ```shell npm install @coral-xyz/anchor ``` -------------------------------- ### General dApp Store Deep-Link URI Scheme Examples Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/dapp-publishing/link-to-dapp-listing-page.md Illustrates the basic URI scheme for deep-linking to a dApp's listing page in the Solana dApp Store, showing both the generic format with a placeholder for the package name and a concrete example with 'com.solanamobile.mintyfresh'. ```URI Scheme solanadappstore://details?id= ``` ```URI Scheme solanadappstore://details?id=com.solanamobile.mintyfresh ``` -------------------------------- ### Start local development server with Yarn Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/README.md This command initiates a local development server and automatically opens a browser window. Most code changes are reflected live without requiring a server restart. ```Shell $ yarn start ``` -------------------------------- ### Install Solana Mobile SDK Dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/expo.md Installs core Solana and Solana Mobile Wallet Adapter SDKs, along with necessary polyfills for `web3.js` compatibility in React Native Expo environments. This step is crucial for enabling interaction with the Solana network and wallets. ```yarn yarn add \ @solana/web3.js \ @solana-mobile/mobile-wallet-adapter-protocol-web3js \ @solana-mobile/mobile-wallet-adapter-protocol \ react-native-get-random-values \ buffer ``` ```npm npm install \ @solana/web3.js \ @solana-mobile/mobile-wallet-adapter-protocol-web3js \ @solana-mobile/mobile-wallet-adapter-protocol \ react-native-get-random-values \ buffer ``` -------------------------------- ### Build Versioned Solana Transaction Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md Illustrates the creation of a `VersionedTransaction` using `@solana/web3.js`, which is the new standard format for Solana transactions. The example includes compiling a transaction message with instructions like `SystemProgram.transfer` and obtaining a recent blockhash from a `Connection` object. This approach is recommended for new Solana dApp development. ```tsx import { Connection, PublicKey, TransactionInstruction, VersionedTransaction, TransactionMessage, SystemProgram, } from "@solana/web3.js"; // Create a list of Program instructions to execute. const instructions = [ SystemProgram.transfer({ fromPubkey: fromPublicKey, toPubkey: toPublicKey, lamports: 1_000, }), ]; // Connect to an RPC endpoint and get the latest blockhash, to include in // the transaction. const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); const latestBlockhash = await connection.getLatestBlockhash(); // Create the "message" of a transaction and compile to `V0Message` format. const txMessage = new TransactionMessage({ payerKey: fromPublicKey, recentBlockhash: latestBlockhash.blockhash, instructions, }).compileToV0Message(); // Construct the Versioned Transaction passing in the message. const versionedTransaction = new VersionedTransaction(txMessage); ``` -------------------------------- ### Sign Legacy Solana Transactions with Mobile Wallet Adapter Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md This example illustrates how to sign a legacy `Transaction` object using the mobile wallet adapter. It covers authorizing the wallet, fetching the latest blockhash, constructing a `SystemProgram` transfer, and then signing the transaction via the wallet adapter. ```tsx import {transact} from '@solana-mobile/mobile-wallet-adapter-protocol-web3js'; import { Keypair, clusterApiUrl, Connection, SystemProgram, Transaction, } from '@solana/web3.js'; const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const signedTx = await transact(async (wallet) => { // Authorize the wallet session const authorizationResult = wallet.authorize({ cluster: 'devnet', identity: APP_IDENTITY, }); // Convert base64 address to web3.js PublicKey class const authorizedPubkey = new PublicKey(toByteArray(authorizationResult.accounts[0].address)); // Connect to an RPC endpoint and get the latest blockhash, to include in // the transaction. const latestBlockhash = await connection.getLatestBlockhash(); // Construct a transaction. This transaction uses web3.js `SystemProgram` // to create a transfer that sends lamports to randomly generated address. const keypair = Keypair.generate(); const randomTransferTransaction = new Transaction({ ...latestBlockhash, feePayer: authorizedPubkey, }).add( SystemProgram.transfer({ fromPubkey: authorizedPubkey, toPubkey: keypair.publicKey, lamports: 1_000, }), ); // Sign and return the transactions. const signedTransactions: await wallet.signTransactions({ transactions: [randomTransferTransaction], }); return signedTransactions[0]; }); ``` -------------------------------- ### Install Solana Web3.js dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/reference/typescript/web3js.md Instructions for installing the necessary packages for Solana Web3.js development using yarn or npm, including core web3.js, random values, URL polyfill, and buffer. ```shell yarn add \ @solana/web3.js \ react-native-get-random-values \ react-native-url-polyfill \ @craftzdog/react-native-buffer ``` ```shell npm install \ @solana/web3.js \ react-native-get-random-values \ react-native-url-polyfill \ @craftzdog/react-native-buffer ``` -------------------------------- ### Install Solana Web3.js and React Native Dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/making_rpc_requests.md Install the core `@solana/web3.js` library along with `react-native-get-random-values` and `buffer` which are necessary polyfills for React Native environments to ensure compatibility with the web/node-centric `web3.js` library. ```bash yarn install @solana/web3.js@1 \ react-native-get-random-values \ buffer ``` ```bash npm install @solana/web3.js@1 \ react-native-get-random-values \ buffer ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/_snippets/react-native-scaffold-snippet.mdx Command to install all required dependencies for the newly initialized React Native dApp project. This step ensures all necessary packages are available for development. ```Shell yarn install ``` -------------------------------- ### Launch React Native Application on Android Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/mobile_nft_minter_tutorial.md Builds, installs, and launches the React Native application on an Android device or emulator for testing and development. ```shell npx react-native run-android ``` -------------------------------- ### Install Project Dependencies (Yarn/NPM) Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/first_app_tutorial.md After navigating into the project directory, these commands install all required Node.js dependencies for the React Native dApp. Users can choose between Yarn or npm package managers based on their preference. ```shell cd FirstDappTutorial && yarn install ``` ```shell cd FirstDappTutorial && npm install ``` -------------------------------- ### Send Transaction using Solana RPC Client (Kotlin) Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/android-native/rpc-requests.md This example illustrates how to submit a transaction to the Solana network using the `sendTransaction` method of `SolanaRpcClient` in Kotlin. It includes placeholders for transaction creation and signing, and shows how to handle the response for success or error. ```kotlin import com.solana.rpc.SolanaRpcClient import com.solana.networking.KtorNetworkDriver val rpcClient = SolanaRpcClient("https://api.devnet.solana.com", KtorNetworkDriver()) val transaction = Transaction(/* ... */) /* ...sign the transaction... */ val response = rpc.sendTransaction(transaction) if (response.result) { println("Transaction signature: ${response.result}") } else if (response.error) { println("Failed to send transaction: ${response.error.message}") } ``` -------------------------------- ### Install Android APK for Testing Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/dapp-publishing/publishing-a-pwa.md This command installs the generated 'app-release-signed.apk' onto a connected emulator or testing device, allowing for local testing before submission to the dApp Store. ```bash bubblewrap install app-release-signed.apk ``` -------------------------------- ### TypeScript Example: Calling Web3MobileWallet.getCapabilities Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/reference/typescript/mobile-wallet-methods/_walletGetCapabilities.mdx Demonstrates how to invoke the `getCapabilities` method on a `Web3MobileWallet` instance within a `transact` block in TypeScript. ```typescript const result = await transact(async (wallet: Web3MobileWallet) => { return await wallet.getCapabilities(); }); ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/react-native-scaffold.md After initializing the React Native project, execute this command to install all required dependencies listed in the project's package.json file using Yarn. ```Shell yarn install ``` -------------------------------- ### Manually Sign Solana Transactions with Mobile Wallet Adapter (TypeScript) Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/anchor_integration.md This example illustrates the process of manually signing a Solana transaction using the Mobile Wallet Adapter. It covers generating program instructions, constructing a `Transaction` object, authorizing with the wallet, and signing the transaction within a Mobile Wallet Adapter session. ```tsx const {counterProgram, counterPDA} = useCounterProgram(); const signIncrementTransaction = async () => { return await transact(async (wallet: Web3MobileWallet) => { const authorizationResult = wallet.authorize({ cluster: RPC_ENDPOINT, identity: APP_IDENTITY, })); const latestBlockhash = await connection.getLatestBlockhash(); // Generate the increment ix from the Anchor program const incrementInstruction = await counterProgram.methods .increment(new anchor.BN(amount)) .accounts({ counter: counterPDA, }) .instruction(); // Build a transaction containing the instruction const incrementTransaction = new Transaction({ ...latestBlockhash, feePayer: authorizationResult.publicKey, }).add(incrementInstruction); // Sign a transaction and receive const signedTransactions = await wallet.signTransactions({ transactions: [incrementTransaction], }); return signedTransactions[0]; }); } ``` -------------------------------- ### Install @solana/web3.js Dependency Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/building_transactions.md Instructions to install the @solana/web3.js library, which provides convenient classes and Solana primitive types for building transactions. This library is crucial for interacting with the Solana network. ```bash yarn install @solana/web3.js ``` ```bash npm install @solana/web3.js ``` -------------------------------- ### TypeScript Example: Signing Messages with Web3MobileWallet Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/reference/typescript/mobile-wallet-methods/_walletSignMessages.mdx Illustrates the end-to-end process of using `Web3MobileWallet.signMessages` in a TypeScript application. The example covers obtaining authorization, constructing a message payload, invoking the `signMessages` method with the authorized address, and handling the returned signed messages. ```tsx const result = return await transact(async (wallet: Web3MobileWallet) => { // First, request for authorization from the wallet. const authorizationResult = await authorizeSession(wallet); // Construct a message byte array const message = 'Hello world!'; const messageBuffer = new Uint8Array( message.split('').map(c => c.charCodeAt(0)), ); // Sign the payload with the provided address from authorization. const signedMessages = await wallet.signMessages({ addresses: [authorizationResult.address], payloads: [messageBuffer], }); return signedMessages; }); ``` ```json [, ...], ``` -------------------------------- ### API Reference: web3mobilewallet.signMessages Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md Reference for the `signMessages` method of the `web3mobilewallet` object, used to request a wallet to sign one or more arbitrary byte payloads. ```APIDOC web3mobilewallet.signMessages(params: { addresses: Array, payloads: Array }): Promise> addresses: An array of public keys (addresses) associated with the payloads to be signed. payloads: An array of `Uint8Array` representing the messages to be signed. Returns: A Promise that resolves to an array of signed messages. ``` -------------------------------- ### Mobile Wallet Adapter: authorize function Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md Reference for the `authorize` function used to request authorization for an app from a connected wallet. It requires an App Identity. ```APIDOC wallet.authorize(params: { cluster: string, identity: AppIdentity }): Promise params: cluster: string - The Solana cluster to connect to (e.g., 'devnet'). identity: AppIdentity - An object describing the app for user recognition. name: string - The name of your app. uri: string - The web URL associated with your app. icon: string - A path to your app icon relative to the app uri. Returns: A Promise that resolves with an AuthorizationResult. ``` -------------------------------- ### Mobile Wallet Adapter: AuthorizationResult interface Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md Describes the structure of the `AuthorizationResult` returned after successful wallet authorization. ```APIDOC AuthorizationResult: accounts: Account[] - An array of authorized accounts (label and public key). authToken: string - An authorization token for reauthorization. ``` -------------------------------- ### API Reference: web3mobilewallet.signTransactions Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/quickstart_legacy.md Reference for the `signTransactions` method of the `web3mobilewallet` object, used to request a wallet to sign one or more Solana transactions (Versioned or Legacy). ```APIDOC web3mobilewallet.signTransactions(params: { transactions: Array }): Promise> transactions: An array of `VersionedTransaction` or `Transaction` objects to be signed. Returns: A Promise that resolves to an array of signed transactions. ``` -------------------------------- ### Instantiate Mobile Wallet Adapter client Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/android-native/sending-sol.md In your app, instantiate a `MobileWalletAdapter` client instance, that will be used to establish a session with the user's mobile wallet app. ```kotlin import com.solana.mobilewalletadapter.clientlib.* // Define dApp's identity metadata val solanaUri = Uri.parse("https://yourdapp.com") val iconUri = Uri.parse("favicon.ico") // resolves to https://yourdapp.com/favicon.ico val identityName = "Solana Kotlin Transfer Example" // Construct the client val walletAdapter = MobileWalletAdapter(connectionIdentity = ConnectionIdentity( identityUri = solanaUri, iconUri = iconUri, identityName = identityName )) ``` -------------------------------- ### Install Metaplex JS SDK Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/metaplex_integration.md Installs the Metaplex JS SDK package using either Yarn or npm. ```shell yarn add @metaplex-foundation/js ``` ```shell npm install @metaplex-foundation/js ``` -------------------------------- ### Install expo-crypto for Polyfills in Expo SDK 49+ with Expo Router Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/react-native/expo.md Installs the `expo-crypto` package, an official Expo SDK, which provides the necessary polyfill functionality for libraries like `@solana/web3.js` when using Expo SDK Version 49+ and Expo Router. This replaces `react-native-get-random-values` in newer setups. ```shell npx expo install expo-crypto ``` -------------------------------- ### Enable Corepack and Prepare pnpm with jq Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/dapp-publishing/setup.md Enables Corepack and prepares pnpm using the latest version fetched via `npm info` and `jq`. This command ensures the correct pnpm version is activated for project use, leveraging `jq` for dynamic version retrieval. ```shell corepack enable corepack prepare pnpm@`npm info pnpm --json | jq -r .version` --activate ``` -------------------------------- ### Example JSON Response for Wallet Authorization Source: https://github.com/solana-mobile/solana-mobile-doc-site/blob/main/docs/reference/typescript/mobile-wallet-methods/_walletAuthorize.mdx An illustrative JSON object demonstrating the typical structure and placeholder values for a successful authorization response from a mobile wallet. This example includes the `auth_token`, an array of `accounts` with their details, an optional `wallet_uri_base`, and a `sign_in_result` object if a sign-in payload was part of the request. ```json { "auth_token": "", "accounts": [ { "address": "
", "display_address": "", "display_address_format": "", "label": "