Solana documentatieLiteSVMTypeScriptAPI-referentie

API-referentie

Volledige API-documentatie voor het gebruik van LiteSVM met @solana/kit en het bijbehorende plugin-ecosysteem.

API-secties

Snelle referentie

Plugin-instelling

import { createClient, generateKeyPairSigner } from "@solana/kit";
import { litesvm } from "@solana/kit-plugin-litesvm";
import { signer } from "@solana/kit-plugin-signer";
const mySigner = await generateKeyPairSigner();
const client = createClient().use(signer(mySigner)).use(litesvm());
// client.svm: LiteSVM instance
// client.rpc: RPC compatibility layer

Accountbeheer (client.svm)

MethodeBeschrijving
setAccount(account)Accountstatus rechtstreeks instellen
getAccount(address)Accountgegevens ophalen
getBalance(address)SOL-saldo ophalen
airdrop(address, lamports)Een account financieren
minimumBalanceForRentExemption(size)Minimum voor huurvrijstelling berekenen

Programmamanagement (client.svm)

MethodeBeschrijving
addProgram(programId, bytes)Programma laden vanuit bytes
addProgramFromFile(programId, path)Programma laden vanuit .so-bestand

Transacties (client.svm)

MethodeBeschrijving
sendTransaction(tx)Een transactie uitvoeren
simulateTransaction(tx)Simuleren zonder statuswijzigingen
latestBlockhash()Huidige blockhash ophalen
expireBlockhash()Naar nieuwe blockhash overgaan

Configuratie (client.svm)

MethodeBeschrijving
withSigverify(bool)Handtekeningverificatie in-/uitschakelen
withBlockhashCheck(bool)Blockhash-validatie in-/uitschakelen
withSysvars()Sysvar-accounts inschakelen
withBuiltins()Ingebouwde programma's inschakelen
withPrecompiles()Vooraf gecompileerde programma's inschakelen
withTransactionHistory(n)Laatste n transacties opslaan
withComputeBudget(budget)Rekenlimieten instellen
withLamports(amount)Standaard lamport instellen
withLogBytesLimit(n)Limiet voor loguitvoer instellen

Tijd & Sysvars (client.svm)

MethodeBeschrijving
warpToSlot(slot)Spring naar specifieke slot
getClock()Haal clock sysvar op
getRent()Haal rent sysvar op
getEpochSchedule()Haal epoch schema op
getLastRestartSlot()Haal laatste herstart slot op
setLastRestartSlot(slot)Stel laatste herstart slot in

RPC (client.rpc)

MethodeBeschrijving
getAccountInfo(address)Haal enkel account op (alleen base64)
getMultipleAccounts(addresses)Haal meerdere accounts op
getLatestBlockhash()Haal huidige blokhash op

Is this page helpful?

Inhoudsopgave

Pagina Bewerken
© 2026 Solana Foundation. Alle rechten voorbehouden.