Skip to main content
Welcome to the Cultura SDK! This toolkit enables developers to interact with Cultura, a Layer 2 Ethereum blockchain serving as the global registry for human creativity and intellectual property. This guide covers installation, initialization, configuration, and a basic usage example. Prerequisites:
  • Node.js and npm/yarn/pnpm installed.
  • Familiarity with TypeScript/JavaScript.
  • (Optional but Recommended) You have already set up your wallet and bridged funds using the main Quick Start Guide.

1. Installation

Install the SDK package into your project:

2. Initialization Methods

The Cultura SDK offers different initialization methods depending on your use case:

Read-Only Access: create()

Use this when you only need to query data or don’t have a connected wallet.

Wallet-Connected Access: createWithWallet()

Use this for frontend dApps where the user connects their browser wallet (like MetaMask).

Account-Specific Access: createWithAccount()

Use this for backend scripts, testing, or when you have direct access to an account address or private key.

3. Configuration Options

When creating an SDK instance, you can provide a configuration object:

Environments

The chain property determines which contract addresses and RPC endpoints to use:
  • local: Local development (e.g., Hardhat node at http://127.0.0.1:8545, Chain ID 31337).
  • devnet: Cultura Devnet (experimental, RPC: https://rpc-yelling-tomato-whale-2ib9sndb39.t.conduit.xyz, Chain ID 26156).
  • testnet (default): Cultura Testnet (stable, RPC: https://sepolia.cultura.xyz, Chain ID 61892).

4. Basic Usage Example (Verify Setup)

After initializing the SDK, you can perform basic operations. Here’s how to check the balance of the connected account (requires a wallet-connected SDK):

5. Core Features Overview

The SDK provides access to various modules:
  • sdk.culturaDigitalAsset: Mint and manage original and licensed assets.
  • sdk.attestationService: Create and verify attestations (Levels 0-2).
  • sdk.schemaRegistry: Register and manage attestation schemas.
  • sdk.bondToken: Interact with the ERC20 token used for bonding/payments (approve, check balance).
  • sdk.royalty: Manage royalty reporting and payments (using the reference module).
  • sdk.rightsBoundAccount: Interact directly with an asset’s RBA for claims (requires setRightsBoundAccount).
  • sdk.verifierModule: Manage verifier rewards.
  • sdk.query: Efficiently read indexed data from the Subgraph (assets, verified rights).
  • sdk.mockLicensingProtocol: (Testnets only) Simulate licensing flows.

6. Next Steps

Appendix: Usage with Frontend Frameworks (React Example)