{"_id":"@alloralabs/game-allora-plugin","_rev":"6-4a9947ee01aa14f15e43e05ab6a2a77d","name":"@alloralabs/game-allora-plugin","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@alloralabs/game-allora-plugin","version":"0.1.1","author":"","license":"MIT","_id":"@alloralabs/game-allora-plugin@0.1.1","maintainers":[{"name":"kpeluso","email":"kenny@upshot.xyz"},{"name":"upshot-andi","email":"andi@upshot.xyz"},{"name":"conache","email":"cristian@upshot.xyz"},{"name":"spooktheducks","email":"spook@alloralabs.xyz"},{"name":"madisonjw","email":"madisonjw@gmail.com"},{"name":"gabers","email":"gabrielskwilliams@gmail.com"},{"name":"gh_allora","email":"gregory@alloralabs.xyz"},{"name":"brad_allora","email":"brad@alloralabs.xyz"}],"homepage":"https://github.com/game-by-virtuals/game-node#readme","bugs":{"url":"https://github.com/game-by-virtuals/game-node/issues"},"dist":{"shasum":"5274e45938b87160d317ce593d4b5a4797ac08a7","tarball":"https://registry.npmjs.org/@alloralabs/game-allora-plugin/-/game-allora-plugin-0.1.1.tgz","fileCount":6,"integrity":"sha512-4r2Y+ugsw++CVLrydIM/DouzArEDoEcTlkLMgayJcqMlZefWvh4dzn/xXJTzqWDT27uT/e5R583aH6t7eg4D/A==","signatures":[{"sig":"MEUCIQCp3qNL8rRdAEMaH9Mxy1FunPK2ITw4TySt59r59A+0eAIgbb9/7XaRdwZemc/LdFuwLoY8xaO6YcXV9BZtfhYL1Zw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21493},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"ee28ee3d1266c30fdbd1bb0287d8b66e6f375455","scripts":{"test":"echo \"Error: no test specified\" && exit 1","tsup":"tsup src/index.ts --dts --format cjs,esm --out-dir dist"},"_npmUser":{"name":"conache","email":"cristian@upshot.xyz"},"repository":{"url":"git+https://github.com/game-by-virtuals/game-node.git","type":"git"},"_npmVersion":"10.5.0","description":"The [Allora Network](https://allora.network) plugin seamlessly empowers G.A.M.E agents with real-time, advanced, self-improving AI inferences, delivering high-performance insights without introducing any additional complexity.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"tsup":"^8.3.5","@alloralabs/allora-sdk":"^0.1.0","@virtuals-protocol/game":"^0.1.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","ts-node-dev":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/game-allora-plugin_0.1.1_1739206841334_0.8204935461017981","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@alloralabs/game-allora-plugin","version":"0.1.2","author":{"name":"Allora Labs"},"license":"MIT","_id":"@alloralabs/game-allora-plugin@0.1.2","maintainers":[{"name":"kpeluso","email":"kenny@upshot.xyz"},{"name":"upshot-andi","email":"andi@upshot.xyz"},{"name":"conache","email":"cristian@upshot.xyz"},{"name":"spooktheducks","email":"spook@alloralabs.xyz"},{"name":"madisonjw","email":"madisonjw@gmail.com"},{"name":"gabers","email":"gabrielskwilliams@gmail.com"},{"name":"gh_allora","email":"gregory@alloralabs.xyz"},{"name":"brad_allora","email":"brad@alloralabs.xyz"}],"homepage":"https://github.com/game-by-virtuals/game-node#readme","bugs":{"url":"https://github.com/game-by-virtuals/game-node/issues"},"dist":{"shasum":"a560ca466476f59527bc4719b7434cd7f1f42a4f","tarball":"https://registry.npmjs.org/@alloralabs/game-allora-plugin/-/game-allora-plugin-0.1.2.tgz","fileCount":6,"integrity":"sha512-DS90X6glZftdW2HMcrTyvxC2eC+RDQQqx+r859nSnZ/GkRk5CUkGEPvXJCH7DOKeHX+mMHIE1WrQR7UAi6RkiQ==","signatures":[{"sig":"MEUCIQCDbqANpFRvD961MRtcJe2w5uQdzyYCB9K/QWv7BWrR4wIgR8fjo6IbDl/vtKTKcAxJ/n7frzCi/5CTLD2I2Ot5H7Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21497},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","gitHead":"ee28ee3d1266c30fdbd1bb0287d8b66e6f375455","scripts":{"test":"echo \"Error: no test specified\" && exit 1","tsup":"tsup src/index.ts --dts --format cjs,esm --out-dir dist"},"_npmUser":{"name":"conache","email":"cristian@upshot.xyz"},"repository":{"url":"git+https://github.com/game-by-virtuals/game-node.git","type":"git"},"_npmVersion":"10.5.0","description":"The [Allora Network](https://allora.network) plugin seamlessly empowers G.A.M.E agents with real-time, advanced, self-improving AI inferences, delivering high-performance insights without introducing any additional complexity.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"tsup":"^8.3.5","@alloralabs/allora-sdk":"^0.1.0","@virtuals-protocol/game":"^0.1.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","ts-node-dev":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/game-allora-plugin_0.1.2_1739206967920_0.4192278962009175","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-02-10T17:00:41.166Z","modified":"2026-02-16T21:43:53.747Z","0.1.1":"2025-02-10T17:00:41.517Z","0.1.2":"2025-02-10T17:02:48.144Z"},"bugs":{"url":"https://github.com/game-by-virtuals/game-node/issues"},"author":{"name":"Allora Labs"},"license":"MIT","homepage":"https://github.com/game-by-virtuals/game-node#readme","repository":{"url":"git+https://github.com/game-by-virtuals/game-node.git","type":"git"},"description":"The [Allora Network](https://allora.network) plugin seamlessly empowers G.A.M.E agents with real-time, advanced, self-improving AI inferences, delivering high-performance insights without introducing any additional complexity.","maintainers":[{"email":"andi@upshot.xyz","name":"upshot-andi"},{"email":"spook@alloralabs.xyz","name":"spooktheducks"}],"readme":"# Allora Plugin for Virtuals Game\n\nThe [Allora Network](https://allora.network) plugin seamlessly empowers G.A.M.E agents with real-time, advanced, self-improving AI inferences, delivering high-performance insights without introducing any additional complexity.\n\n### Features\n- Get price inferences for various assets and timeframes\n- Get all available topics on Allora Network\n- Fetch inferences by topic ID\n\n### Available Functions\n1. `getPriceInference`: Fetches the price inference for the specified asset and a timeframe\n2. `getAllTopics`: Retrieves all available topics on Allora Network\n3. `getInferenceByTopicId`: Fetches the latest inference for a specific topic\n\n\n## Installation\n\nTo install the plugin, use npm or yarn:\n\n```bash\nnpm install @alloralabs/game-allora-plugin\n```\n\nor\n\n```bash\nyarn add @virtuals-protocol/game-allora-plugin\n```\n\n## Usage\n\n### Importing the Plugin\n\nFirst, import the `AlloraPlugin` class from the plugin:\n\n```typescript\nimport AlloraPlugin from \"@virtuals-protocol/game-allora-plugin\";\n```\n\n### Setup environment variables\n\nSet the following environment variables:\n  - `ALLORA_API_KEY`: Create an API key by [creating an account](https://developer.upshot.xyz/signup).\n  - `ALLORA_CHAIN_SLUG` (Optional): Must be one of: `mainnet`, `testnet`. Default value: `testnet`\n\n### Creating a Worker\n\nCreate a worker with the necessary Allora API client config:\n\n```typescript\nconst alloraPlugin = new AlloraPlugin({\n  apiClientConfig: {\n    chainSlug: process.env.ALLORA_CHAIN_SLUG as ChainSlug, // Should be one of \"testnet\" or \"mainnet\". Default: \"testnet\"\n    apiKey: process.env.ALLORA_API_KEY, // Default key: UP-17f415babba7482cb4b446a1\n  },\n});\n```\n\n### Creating an Agent\n\nCreate an agent and add the worker to it:\n\n```typescript\nimport { GameAgent } from \"@virtuals-protocol/game\";\n\nconst agent = new GameAgent(\"GAME_API_KEY\", {\n  name: \"Allora Worker\",\n  goal: \"Retrieve the price of ETH in 5 minutes.\",\n  description: \"You are an AI agent able to fetch price inferences and topic inferences from Allora Network.\",\n  workers: [alloraPlugin.getWorker({})],\n});\n```\n\n### Running the Agent\n\nInitialize and run the agent:\n\n```typescript\n(async () => {\n  await agent.init();\n\n  while (true) {\n    await agent.step({\n      verbose: true,\n    });\n  }\n})();\n```\n","readmeFilename":"README.md"}