Install the SDK
bun add @sonicsvm/northstar-sdk @solana/web3.js
# or
npm install @sonicsvm/northstar-sdk @solana/web3.jsRequirements
Verify the install
import { NorthStarSDK } from "@sonicsvm/northstar-sdk";
import { Connection, Keypair } from "@solana/web3.js";
const sdk = new NorthStarSDK({
portalProgramId: "74iiMCqFw1afWyp3tdh9pUqfRfCRq7gfdC2YZoNGpovt",
customEndpoints: {
solana: new Connection("https://api.devnet.sonic.game"),
ephemeralRollup: new Connection("https://ephemeral.devnet.sonic.game"),
},
});
const owner = Keypair.generate();
console.log(`Owner: ${owner.publicKey.toBase58()}`);Next steps
Last updated
