The configuration object containing wallet client and optional storage settings
A Vana SDK instance configured for Node.js use
// With storage - all methods available
const vana = Vana({
walletClient,
storage: { providers: { ipfs: new IPFSStorage() }, defaultProvider: 'ipfs' }
});
await vana.data.uploadFile(file); // ✅ Works - TypeScript knows storage is available
// Without storage - storage methods unavailable at compile time
const vanaNoStorage = Vana({ walletClient });
// await vanaNoStorage.data.uploadFile(file); // ❌ TypeScript error
// Runtime check still available
if (vanaNoStorage.isStorageEnabled()) {
// TypeScript now knows storage methods are safe to use
await vanaNoStorage.data.uploadFile(file); // ✅ Works
}
Creates a new Vana SDK instance configured for Node.js environments.
This function automatically provides the correct TypeScript types based on your configuration:
The configuration object containing wallet client and optional storage settings
A Vana SDK instance configured for Node.js use
// With storage - all methods available
const vana = Vana({
walletClient,
storage: { providers: { ipfs: new IPFSStorage() }, defaultProvider: 'ipfs' }
});
await vana.data.uploadFile(file); // ✅ Works - TypeScript knows storage is available
// Without storage - storage methods unavailable at compile time
const vanaNoStorage = Vana({ walletClient });
// await vanaNoStorage.data.uploadFile(file); // ❌ TypeScript error
// Runtime check still available
if (vanaNoStorage.isStorageEnabled()) {
// TypeScript now knows storage methods are safe to use
await vanaNoStorage.data.uploadFile(file); // ✅ Works
}
Creates a new Vana SDK instance configured for Node.js environments.
This function automatically provides the correct TypeScript types based on your configuration: