← Protocols
Story Protocol
01Description

Layer 1 IP blockchain that registers creative works as on-chain IP Assets (ERC-721) with programmable licensing, royalty, and dispute modules. Designed for the AI/creator economy where agents own and license IP.

02Best for
  • 01on-chain IP registration
  • 02programmable licensing for AI training data
  • 03royalty splits to derivative works
  • 04AI agent-owned IP
  • 05creator economy primitives
03Install
  • pnpm add @story-protocol/core-sdk viem
04Environment variables
VariableScopeDescription
STORY_RPC_PROVIDER_URLServerStory Protocol RPC URL (mainnet or Aeneid testnet).
STORY_PRIVATE_KEYServerPrivate key for the signer that registers IP and attaches license terms.
05Prompt snippet
Use Story Protocol to register IP and license it programmatically. Initialize with `StoryClient.newClient({ account, transport: http(rpc), chainId: 'story' })`. Register with `client.ipAsset.mintAndRegisterIpAssetWithPilTerms({ spgNftContract, licenseTermsData, ipMetadata })`. Attach PIL (Programmable IP License) terms via `client.license.attachLicenseTerms(...)`, mint a license token with `client.license.mintLicenseTokens(...)`, and register a derivative through `client.ipAsset.registerDerivative({ childIpId, parentIpIds, licenseTermsIds })`. Royalties auto-flow via the Royalty Module.
06Gotchas
  • License terms are immutable once attached — pick PIL flavor (Non-Commercial, Commercial Use, Commercial Remix) carefully; you cannot edit them, only attach new ones.
  • IP licensing semantics are legal as well as technical — on-chain terms must match the off-chain license document hash you register, or disputes can invalidate the IP Asset.
  • Royalty distribution requires the derivative to mint a license token; raw `registerDerivative` without a license token will revert.
  • Story is its own L1 — gas is paid in $IP, not ETH; bridge or faucet test tokens before any tx and watch for chain-id mismatches with viem.
  • AI training data licensing requires both metadata registration and explicit AI/training rights flags in PIL terms; default Non-Commercial terms forbid model training.
07Alternatives