Get running in 5 minutes.
The SDK authenticates through API keys scoped to specific domains.
{% hint style="info" %} Testnet access: Contact the KOR team for a Base Sepolia API key. {% endhint %}
Your key looks like:
kor_sk_test_a1b2c3d4e5f6...
Don't commit it to version control.
{% tabs %} {% tab title="npm" %}
npm install @kor-protocol/sdk ethers{% endtab %}
{% tab title="yarn" %}
yarn add @kor-protocol/sdk ethers{% endtab %}
{% tab title="pnpm" %}
pnpm add @kor-protocol/sdk ethers{% endtab %} {% endtabs %}
import { KorClient } from '@kor-protocol/sdk';
import { createWalletClient, http } from 'viem';
import { baseSepolia } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';
const kor = new KorClient({
apiKey: process.env.KOR_API_KEY,
network: 'base-sepolia'
});
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const walletClient = createWalletClient({
account,
chain: baseSepolia,
transport: http()
});| Field | Value |
|---|---|
| Network Name | Base Sepolia |
| RPC URL | https://sepolia.base.org |
| Chain ID | 84532 |
| Currency | ETH |
| Explorer | https://sepolia.basescan.org |
- Grab Sepolia ETH from sepoliafaucet.com
- Bridge to Base Sepolia at bridge.base.org
Take an NFT you own and register it as an IP Asset.
async function registerMyIP() {
const kor = new KorClient({
apiKey: process.env.KOR_API_KEY,
network: 'base-sepolia'
});
// Get signed tx from backend
const { request } = await kor.ip.registerIp({
nftContract: '0xYourNftContract...',
tokenId: '1',
licensors: [
{
licensorAddress: '0xYourWallet...',
licensorPercentage: 100
}
]
});
// Submit through wallet
const txHash = await walletClient.writeContract(request);
console.log('Submitted:', txHash);
// Wait for confirmation
const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
console.log('Registered at block:', receipt.blockNumber);
}What happened:
- Backend validated your API key and signed the transaction
- Your wallet signed and submitted (gas cost: ~$0.001 on Base)
- NFT is now a registered IP Asset
- ERC-6551 token-bound account deployed for that IP
const ipAccount = await kor.ip.getIpAccount({
nftContract: '0xYourNftContract...',
tokenId: '1'
});
console.log('IP Account:', ipAccount);
// 0x... (your IP's smart contract wallet)Check it on Base Sepolia Explorer.
Collections where every mint auto-registers as IP:
const { request } = await kor.nft.createIpCollection({
name: 'My Catalog',
symbol: 'CAT',
maxSupply: 10000,
mintPrice: '0',
licensors: [
{ licensorAddress: '0x...', licensorPercentage: 100 }
]
});const { request } = await kor.nft.mintFromIpCollection({
collectionAddress: '0xYourCollection...',
recipient: '0xRecipient...',
tokenUri: 'ipfs://...'
});Link derivative work to parent IP:
const { request } = await kor.ip.registerDerivative({
nftContract: '0xDerivativeNft...',
tokenId: '1',
parentIpIds: ['0xParentIpAccount...'],
licensors: [
{ licensorAddress: '0x...', licensorPercentage: 80 },
{ licensorAddress: '0x...', licensorPercentage: 20 }
]
});| What you want | Where to go |
|---|---|
| Understand the architecture | How KOR Protocol Works |
| Full API reference | SDK Reference |
| Integration patterns | Key Business Flows |
| Contract addresses | Smart Contract Reference |
- Discord: Join
- GitHub: github.com/kor-protocol
- Email: developers@kor.xyz