SDK reference
Installation
npm install @sadclaw/sdkQuick Start
import { SadClawClient } from '@sadclaw/sdk';
import { Keypair } from '@solana/web3.js';
// Initialize client
const client = new SadClawClient({
rpcUrl: 'https://api.mainnet-beta.solana.com',
keypair: myKeypair,
});
// Purchase a VM
const vm = await client.purchaseVm({
tier: 'STANDARD',
durationHours: 24,
});
// Get SSH credentials
const ssh = await client.getSshCredentials(vm.nftMint);
console.log(`ssh ${ssh.username}@${ssh.host}`);SadClawClient
Constructor
Property
Type
Description
Default
Properties
wallet
walletMethods
getTiers()
listVms()
getVm()
Parameter
Type
Description
purchaseVm()
Property
Type
Description
Default
getSshCredentials()
Parameter
Type
Description
extendVm()
Parameter
Type
Description
destroyVm()
Parameter
Type
Description
Error Handling
TypeScript Support
Examples
Auto-scaling Agent
SSH Connection Helper
Last updated