Carbon Instance
Backend
import {AnchorProvider, Wallet} from "@coral-xyz/anchor";
import {Connection, Keypair} from "@solana/web3.js";
import {Carbon} from "@raresloth/carbon-sdk";
const marketplaceAuthorityKey = Keypair.fromSecretKey(Buffer.from(
JSON.parse(fs.readFileSync(MARKETPLACE_AUTH_KEYPATH, 'utf8'))
));
const connection = new Connection(RPC_URL, { commitment: 'confirmed' })
const provider = new AnchorProvider(
connection,
new Wallet(marketplaceAuthorityKey),
{
preflightCommitment: 'confirmed',
}
)
const carbon = new Carbon(provider, marketplaceAuthorityKey.publicKey)Frontend
Last updated