> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magicblock.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# World Program Overview

>  

The World Program is the entrypoint for creating world instances, entities, attaching components, and executing systems within a unified framework.

## Client Development

Ongoing development efforts are focused on delivering multiple client SDKs and integrations.

The [World Program](https://explorer.solana.com/address/WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n/anchor-program?cluster=devnet), a standard Anchor program, expose its Interface Definition Language (IDL) published on-chain for seamless interaction.

## TypeScript SDK Installation

To install the Bolt SDK, execute the following command:

```bash theme={null}
npm install @magicblock-labs/bolt-sdk
```

Initiating a project with bolt init automatically generates a simple usage example of the bolt-sdk.

## Creating a New World Instance

Create a new world instance as demonstrated below:

```typescript theme={null}
const initializeNewWorld = await InitializeNewWorld({
  payer: provider.wallet.publicKey,
  connection: provider.connection,
});
const signature = await provider.sendAndConfirm(initializeNewWorld.transaction);
const worldPda = initializeNewWorld.worldPda; // we can use this later
```

## Adding a New Entity

To add a new entity:

```typescript theme={null}
const addEntity = await AddEntity({
  payer: provider.wallet.publicKey,
  world: worldPda,
  connection: provider.connection,
});
const signature = await provider.sendAndConfirm(addEntity.transaction);
const entityPda = addEntity.entityPda; // we can use this later
```

## Attaching Components to an Entity

For attaching components:

```typescript theme={null}
const initializeComponent = await InitializeComponent({
  payer: provider.wallet.publicKey,
  entity: entityPda,
  componentId: positionComponent.programId,
});
const signature = await provider.sendAndConfirm(
  initializeComponent.transaction
);
const componentPda = initializeComponent.componentPda; // We can use this to fetch the state
```

## Applying Systems

To apply a system:

```typescript theme={null}
const applySystem = await ApplySystem({
  authority: provider.wallet.publicKey,
  systemId: systemMovement.programId,
  entities: [
    {
      entity: entityPda,
      components: [{ componentId: positionComponent.programId }],
    },
  ],
});
const signature = await provider.sendAndConfirm(applySystem.transaction);
```
