{"_id":"@cardano-mercury/medusajs","_rev":"2-99d4c10c8c3ffb4ee4792af77df5ce37","name":"@cardano-mercury/medusajs","dist-tags":{"latest":"0.0.2-alpha"},"versions":{"0.0.1-alpha":{"name":"@cardano-mercury/medusajs","version":"0.0.1-alpha","keywords":["medusa","plugin","medusa-plugin-other","medusa-plugin","medusa-v2"],"author":{"name":"Adam K. Dean","email":"adam@crypto2099.io"},"license":"Apache-2.0","_id":"@cardano-mercury/medusajs@0.0.1-alpha","maintainers":[{"name":"therealadamdean","email":"adam@crypto2099.io"}],"dist":{"shasum":"0d7947f88fac9233cf837e78a84d89df1d7a2359","tarball":"https://registry.npmjs.org/@cardano-mercury/medusajs/-/medusajs-0.0.1-alpha.tgz","fileCount":23,"integrity":"sha512-3cgMM6ybcYTIAG7cA7JYy/ylN3CeegOalsyFD7mmHUJB25NYw56Klhozdn9Zxo9aNFZNZH/1dP5FaS/lG04EKw==","signatures":[{"sig":"MEYCIQC86KBgA7TM67/iKI1Ktk7zPJ6QnOzD8EnxZR0N2/2LHgIhAKa9tFopG06A27W26CFgLOGhuAMSXd2NGJKEMYY/dcAN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96242},"engines":{"node":">=20"},"exports":{"./*":"./.medusa/server/src/*.js","./workflows":"./.medusa/server/src/workflows/index.js","./providers/*":"./.medusa/server/src/providers/*/index.js","./package.json":"./package.json","./.medusa/server/src/modules/*":"./.medusa/server/src/modules/*/index.js"},"gitHead":"e23eccac3fdad2875896b38bafae45d43d4a3435","scripts":{"dev":"medusa plugin:develop","build":"medusa plugin:build","prepublishOnly":"medusa plugin:build"},"_npmUser":{"name":"therealadamdean","email":"adam@crypto2099.io"},"_npmVersion":"10.8.2","description":"Cardano Mercury Payments for Medusa JS","directories":{},"_nodeVersion":"20.18.1","dependencies":{"cors":"^2.8.5","@medusajs/types":"^2.6.1","@medusajs/js-sdk":"^2.6.1","@emurgo/cardano-serialization-lib-nodejs":"^14.0.0"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.13.0","vite":"^5.2.11","yalc":"^1.0.0-pre.53","react":"^18.2.0","awilix":"^8.0.1","ts-node":"^10.9.2","@swc/core":"1.5.7","react-dom":"^18.2.0","prop-types":"^15.8.1","typescript":"^5.6.2","@types/node":"^20.0.0","@medusajs/ui":"4.0.3","@types/react":"^18.3.2","@medusajs/cli":"2.4.0","@mikro-orm/cli":"6.4.3","@medusajs/icons":"2.4.0","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@medusajs/medusa":"2.4.0","@types/react-dom":"^18.2.25","@medusajs/admin-sdk":"2.4.0","@medusajs/framework":"2.4.0","@medusajs/test-utils":"2.4.0","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3"},"peerDependencies":{"pg":"^8.13.0","awilix":"^8.0.1","@medusajs/ui":"4.0.3","@medusajs/cli":"2.4.0","@mikro-orm/cli":"6.4.3","@medusajs/icons":"2.4.0","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@medusajs/medusa":"2.4.0","@medusajs/admin-sdk":"2.4.0","@medusajs/framework":"2.4.0","@medusajs/test-utils":"2.4.0","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3"},"_npmOperationalInternal":{"tmp":"tmp/medusajs_0.0.1-alpha_1749077703916_0.9272883880693235","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha":{"name":"@cardano-mercury/medusajs","version":"0.0.2-alpha","description":"Cardano Mercury Payments for Medusa JS","author":{"name":"Adam K. Dean","email":"adam@crypto2099.io"},"license":"Apache-2.0","exports":{"./package.json":"./package.json","./workflows":"./.medusa/server/src/workflows/index.js","./.medusa/server/src/modules/*":"./.medusa/server/src/modules/*/index.js","./providers/*":"./.medusa/server/src/providers/*/index.js","./*":"./.medusa/server/src/*.js"},"keywords":["medusa","plugin","medusa-plugin-other","medusa-plugin","medusa-v2"],"scripts":{"build":"medusa plugin:build","dev":"medusa plugin:develop","prepublishOnly":"medusa plugin:build"},"devDependencies":{"@medusajs/admin-sdk":"2.4.0","@medusajs/cli":"2.4.0","@medusajs/framework":"2.4.0","@medusajs/icons":"2.4.0","@medusajs/medusa":"2.4.0","@medusajs/test-utils":"2.4.0","@medusajs/ui":"4.0.3","@mikro-orm/cli":"6.4.3","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3","@swc/core":"1.5.7","@types/node":"^20.0.0","@types/react":"^18.3.2","@types/react-dom":"^18.2.25","awilix":"^8.0.1","pg":"^8.13.0","prop-types":"^15.8.1","react":"^18.2.0","react-dom":"^18.2.0","ts-node":"^10.9.2","typescript":"^5.6.2","vite":"^5.2.11","yalc":"^1.0.0-pre.53"},"peerDependencies":{"@medusajs/admin-sdk":"2.4.0","@medusajs/cli":"2.4.0","@medusajs/framework":"2.4.0","@medusajs/icons":"2.4.0","@medusajs/medusa":"2.4.0","@medusajs/test-utils":"2.4.0","@medusajs/ui":"4.0.3","@mikro-orm/cli":"6.4.3","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3","awilix":"^8.0.1","pg":"^8.13.0"},"engines":{"node":">=20"},"dependencies":{"@emurgo/cardano-serialization-lib-nodejs":"^14.0.0","@medusajs/js-sdk":"^2.6.1","@medusajs/types":"^2.6.1","cors":"^2.8.5"},"_id":"@cardano-mercury/medusajs@0.0.2-alpha","gitHead":"36e0f8ff7390aa3a556931083baaef522733c97b","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-+cuLhy6RO2pF6FVhI83CdmyiEC7Q0HlmUUvvtvaGhXR5rPG7wBdpC5ZpnPh6F5oOsUmjyletRUr0gL+STASXOQ==","shasum":"25f0275cff079f0c7e7af575497550e2910eb3de","tarball":"https://registry.npmjs.org/@cardano-mercury/medusajs/-/medusajs-0.0.2-alpha.tgz","fileCount":23,"unpackedSize":95822,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDRCwjBTqVzzNt2qWdCLT4KdAN0TU3GeAPJSHWFcrXd3gIgPfF8eSsCxR6Smr5OTIdlP94zTEwb7Do13Zf/WAGAR0w="}]},"_npmUser":{"name":"therealadamdean","email":"adam@crypto2099.io"},"directories":{},"maintainers":[{"name":"therealadamdean","email":"adam@crypto2099.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/medusajs_0.0.2-alpha_1749102476869_0.5610175401459765"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-04T22:55:03.852Z","modified":"2025-06-05T05:47:57.276Z","0.0.1-alpha":"2025-06-04T22:55:04.168Z","0.0.2-alpha":"2025-06-05T05:47:57.060Z"},"author":{"name":"Adam K. Dean","email":"adam@crypto2099.io"},"license":"Apache-2.0","keywords":["medusa","plugin","medusa-plugin-other","medusa-plugin","medusa-v2"],"description":"Cardano Mercury Payments for Medusa JS","maintainers":[{"name":"therealadamdean","email":"adam@crypto2099.io"}],"readme":"# Cardano Mercury for Medusa JS\n\n> **IMPORTANT**: This software is still in an `alpha` developmental stage,\n> please do not use it in production unless you're sure of what you're doing.\n\n## Installation Instructions\n\n1. Include the package in your project: `npm i @cardano-mercury/medusajs`\n2. Update your `medusa-config.json` file to add the following values:\n   ```typescript\n   module.exports = defineConfig({\n    projectConfig: {},\n    plugins: [\n        {\n            resolve: \"@cardano-mercury/medusajs\",\n            options: {\n                fixerApiKey: \"d311e...aae3\",\n                currencyFreaksApiKey: \"87b3...d5a6\",\n                oxrAppId: \"24e5...6ecb\",\n                xPubKey: \"xpub1pc20...6ald\",\n            },\n        },\n    ],\n    modules: [\n        {\n            resolve: \"@medusajs/medusa/payment\",\n            options: {\n                providers: [\n                    {\n                        resolve: \"@cardano-mercury/medusajs/providers/mercury\",\n                        options: {\n                            fixerApiKey: \"d311...aae3\",\n                            xPubKey: \"xpub1pc20...6ald\",\n                            network: \"preprod\",\n                            apiKey: \"...\"\n                        }\n                    }\n                ]\n            }\n        }\n    ]})\n   ```\n   The most important of the variables for the plugin are the `network`,\n   `xPubKey` (should be exported from your Eternl Wallet), and `oxrAppId` which\n   can be acquired from Open Exchange Rates\n   here: [https://docs.openexchangerates.org/reference/api-introduction](https://docs.openexchangerates.org/reference/api-introduction).\n3. Modify your `.env` environment variables to include the following:\n   ```dotenv\n   WALLET_EXTENDED_PUBLIC_KEY=xpub1pc20...6ald\n   WALLET_NETWORK=preprod\n   KOIOS_API_URL=https://preprod.koios.rest\n   KOIOS_API_KEY=eyJh...VCJ9.eyJh...0oPw\n   UPDATE_ADA_PRICE_PERIOD=15\n   CHECK_ADA_PRICE_SCHEDULE=\"* * * * *\"\n   UPDATE_UNPAID_SESSIONS=\"*/2 * * * *\"\n   STALE_THRESHOLD_MINUTES=15\n   UPDATE_UNPAID_SESSIONS=\"*/5 * * * *\"\n   ```\n   All of these are required and should match the environment you are using.\n4. You will need to customize your frontend structure to correctly connect a \n   Cardano light wallet from the user and craft and submit the transaction.\n\n## Known Issues\n\n- At the moment, the logic for updating currency conversion rates results in a \n  large number of derived, child addresses being generated but never used when\n  an order is left unpaid for a long time. This should be addressed to keep a\n  single address attached to a single shopping cart in the future and allow for\n  address reuse if never used while the order fully expires.","readmeFilename":"README.md"}