score:0

import * as web3 from '@solana/web3.js';

// Create new connection
const connection = new web3.Connection(
   web3.clusterApiUrl('devnet'),
   'confirmed',
);

// Generate a new random public key
const somePublicKey = new web3.PublicKey("someBase58AddressXxxXXXx2323")

// etc

score:0

import * as anchor from '@project-serum/anchor';
import { clusterApiUrl } from '@solana/web3.js';

const rpcHost =https://api.devnet.solana.com

const connection = new anchor.web3.Connection(rpcHost
  ? rpcHost
  : anchor.web3.clusterApiUrl('devnet'));

score:0

from web3 import Web3  <- Small and Capital 'W'

Related Query

More Query from same tag