Ongoing development efforts are focused on delivering multiple client SDKs and integrations.The World Program, a standard Anchor program, expose its Interface Definition Language (IDL) published on-chain for seamless interaction.
Create a new world instance as demonstrated below:
Copy
Ask AI
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
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
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