{"_id":"@elimu-ai/sponsors","_rev":"2-f85dc153611fea92150644c466857d36","name":"@elimu-ai/sponsors","dist-tags":{"latest":"0.9.7"},"versions":{"0.9.6":{"name":"@elimu-ai/sponsors","version":"0.9.6","keywords":["education","edtech","web3","ethereum","dao","sponsor","sponsorship","impact","social impact","impact staking"],"author":{"name":"Ξlimu DAO"},"license":"MIT","_id":"@elimu-ai/sponsors@0.9.6","maintainers":[{"name":"nya-elimu","email":"info@elimu.ai"},{"name":"jo-elimu","email":"jo@elimu.ai"}],"homepage":"https://sponsors.elimu.ai","bugs":{"url":"https://github.com/elimu-ai/web3-sponsors/issues"},"dist":{"shasum":"4f977b654c5e86ede063899d09ecf010a6ed05e7","tarball":"https://registry.npmjs.org/@elimu-ai/sponsors/-/sponsors-0.9.6.tgz","fileCount":4,"integrity":"sha512-2457+PzjVXTxf329PuQj4KJ4WvDEO9y5c1b8tU2MTKpqLDJqFESj8rriDZ3PqQWOzs1sN6DiUUj31k39zrd/zg==","signatures":[{"sig":"MEYCIQDsZ0u3DMUaNgpUQm6qXgqKuM9X0rG78ksOrLw/hrFJfQIhAO8uoTrFQtzjjla70C6QK+ed4OJLGc2jVBn/DCOtwntp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2891},"gitHead":"412c180714fcd9b6998ca6ef2d5d56c78b7aea52","_npmUser":{"name":"nya-elimu","email":"info@elimu.ai"},"repository":{"url":"git+https://github.com/elimu-ai/web3-sponsors.git","type":"git"},"_npmVersion":"11.6.2","description":"Interfaces for interacting with the Ξlimu DAO's education sponsorship program","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sponsors_0.9.6_1766426219360_0.4597174101867336","host":"s3://npm-registry-packages-npm-production"}},"0.9.7":{"name":"@elimu-ai/sponsors","version":"0.9.7","description":"Interfaces for interacting with the Ξlimu DAO's education sponsorship program","repository":{"type":"git","url":"git+https://github.com/elimu-ai/web3-sponsors.git"},"license":"MIT","author":{"name":"Ξlimu DAO"},"homepage":"https://sponsors.elimu.ai","keywords":["education","edtech","web3","ethereum","dao","sponsor","sponsorship","impact","social impact","impact staking"],"gitHead":"2895cd9692b7057881e465f4ffd396be52ee43d0","_id":"@elimu-ai/sponsors@0.9.7","bugs":{"url":"https://github.com/elimu-ai/web3-sponsors/issues"},"_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-Lw4pGP90ORv9dLob1pPFQp3Ywpr55IIVIvoDx1SqjJal6ZiaJLqDYYwi87i5kHDo3ZX+BRK7KrSYb3f1oMn5Sg==","shasum":"20bee4af6e0bc2aa0dcce0e9ba6ec69d35e337e1","tarball":"https://registry.npmjs.org/@elimu-ai/sponsors/-/sponsors-0.9.7.tgz","fileCount":5,"unpackedSize":4027,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAVNiXkOtFz50yA3IDXdpSg1kRQUGgg5ZrM4EsnYBVG3AiAIEg86VVQ/VOI/TmjGHlno0CJhUyzE7Ux+3pnx0tDQoA=="}]},"_npmUser":{"name":"nya-elimu","email":"info@elimu.ai"},"directories":{},"maintainers":[{"name":"nya-elimu","email":"info@elimu.ai"},{"name":"jo-elimu","email":"jo@elimu.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sponsors_0.9.7_1766613029915_0.6616597017763466"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-22T17:56:59.261Z","modified":"2025-12-24T21:50:30.293Z","0.9.6":"2025-12-22T17:56:59.521Z","0.9.7":"2025-12-24T21:50:30.067Z"},"bugs":{"url":"https://github.com/elimu-ai/web3-sponsors/issues"},"author":{"name":"Ξlimu DAO"},"license":"MIT","homepage":"https://sponsors.elimu.ai","keywords":["education","edtech","web3","ethereum","dao","sponsor","sponsorship","impact","social impact","impact staking"],"repository":{"type":"git","url":"git+https://github.com/elimu-ai/web3-sponsors.git"},"description":"Interfaces for interacting with the Ξlimu DAO's education sponsorship program","maintainers":[{"name":"nya-elimu","email":"info@elimu.ai"},{"name":"jo-elimu","email":"jo@elimu.ai"}],"readme":"# Web3 Sponsors 🫶🏽\r\n\r\nInterfaces for interacting with the Ξlimu DAO's education sponsorship program (https://sponsors.elimu.ai)\r\n\r\nIf you want to integrate your own smart contracts with Ξlimu DAO's education sponsorship program, install this library:\r\n\r\n```shell\r\nnpm install @elimu-ai/sponsors\r\n```\r\n\r\n## Add Sponsorship 💜\r\n\r\nIf you want your smart contract to *add a new sponsorship* to our queue of sponsorships, start by importing its interface. Then, instantiate the smart contract address you want to interact with.\r\n\r\n```solidity\r\nimport { ISponsorshipQueue } from \"@elimu-ai/sponsors/ISponsorshipQueue.sol\";\r\n\r\ncontract MyContract {\r\n    ISponsorshipQueue public immutable sponsorshipQueue;\r\n\r\n    constructor(address sponsorshipQueue_) {\r\n        sponsorshipQueue = ISponsorshipQueue(sponsorshipQueue_);\r\n    }\r\n\r\n    function myFunction() {\r\n        uint256 cost = sponsorshipQueue.estimatedCost();\r\n        sponsorshipQueue.addSponsorship{value: cost}();\r\n    }\r\n}\r\n```\r\n\r\nNext, add logic to your smart contract for checking if it holds enough ETH to pay for one sponsorship:\r\n\r\n```diff\r\nfunction myFunction() {\r\n    uint256 cost = sponsorshipQueue.estimatedCost();\r\n+    require(address(this).balance >= cost, \"Not enough ETH\");\r\n    sponsorshipQueue.addSponsorship{value: cost}();\r\n}\r\n```\r\n\r\nFor a sample implementation, see [`CommunityFund.sol`](https://github.com/elimu-ai/web3-sponsors/tree/main/backend/contracts/sample/CommunityFund.sol).\r\n\r\n> [!WARNING]\r\n> The `estimatedCost` parameter set in the SponsorshipQueue smart contract can be adjusted by the Ξlimu DAO, so make sure to implement your code in a way that can handle this.\r\n\r\n## Add Distribution 🛵💨\r\n\r\nIf you want your smart contract to *add a new distribution* to our queue of distributions, add the following:\r\n\r\n```solidity\r\nimport { IDistributionQueue } from \"@elimu-ai/sponsors/IDistributionQueue.sol\";\r\n\r\ncontract MyContract {\r\n    IDistributionQueue public immutable distributionQueue;\r\n\r\n    constructor(address distributionQueue_) {\r\n        distributionQueue = IDistributionQueue(distributionQueue_);\r\n    }\r\n\r\n    function myFunction(string calldata languageCode, string calldata androidId) public {\r\n        distributionQueue.addDistribution(languageCode, androidId);\r\n    }\r\n}\r\n```\r\n\r\n---\r\n\r\nThe mission of elimu.ai is to build innovative learning software that empowers out-of-school children to teach themselves basic reading📖, writing✍🏽 and math🔢 **within 6 months**.\r\n\r\nTo learn more about the Ξlimu DAO, see https://github.com/elimu-ai/web3-wiki\r\n","readmeFilename":"README.md"}