A JavaScript/TypeScript SDK for licensing user-generated content. Streamlines digital asset licensing with smart license templates, automated agreement creation, and seamless
royalty management.
The SDK supports the same networks as Cultura SDK: local, devnet, and testnet. You can initialize the client using either the network name or chain ID:
Copy
Ask AI
import { SpaceportSDK, Network, createChainConfig } from "@spaceport/sdk";import { privateKeyToAccount } from "viem/accounts";// Initialize SDK for local development (read-only)const client = SpaceportSDK.create({ chain: Network.LOCAL, // or use chain ID: 31337});// Initialize with wallet for local developmentconst account = privateKeyToAccount(`0x${process.env.YOUR_PRIVATE_KEY}`);const client = SpaceportSDK.createWithAccount(account, { chain: Network.LOCAL,});// Initialize with API key for backend service authenticationconst client = SpaceportSDK.create({ chain: Network.DEVNET, apiKey: process.env.SDK_API_KEY, // Load from environment variable});// Initialize for Cultura Devnet with API key from environmentconst account = privateKeyToAccount(`0x${process.env.YOUR_PRIVATE_KEY}`);const client = SpaceportSDK.createWithAccount(account, { chain: Network.DEVNET, // or use chain ID: 26156 apiKey: process.env.SDK_API_KEY, // Add API key for authenticated requests});