{"_id":"@cuonghx.ngen/sol-unity-sdk","_rev":"6-f6fa108e70ecc89a17f54a16fe9e2158","name":"@cuonghx.ngen/sol-unity-sdk","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.1":{"name":"@cuonghx.ngen/sol-unity-sdk","version":"0.0.1","keywords":[],"author":{"name":"0xcuonghx"},"license":"ISC","_id":"@cuonghx.ngen/sol-unity-sdk@0.0.1","maintainers":[{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"}],"dist":{"shasum":"3f082a83bde8c29c80bd8840a7902ec083fce5e3","tarball":"https://registry.npmjs.org/@cuonghx.ngen/sol-unity-sdk/-/sol-unity-sdk-0.0.1.tgz","fileCount":4,"integrity":"sha512-qN5oyj+L5Cz6ojud4NUBSYmydBH9UCHbsSoSiRy0hIftWzBZcaamjVFlM4USPrYLmyPDXi8thudrM9BzQ0uKjg==","signatures":[{"sig":"MEUCIQDWwtlkXNScO2O4ABt1Xae/plcblqbBqZxJbdU8nih0ZAIgONlJRihJ5sNCOvwjdQb6W+5txKAIqgcBOf2zkOFUKSM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":272174},"main":"dist/index.js","gitHead":"ffc04e055b53e47908bdbb6330f50eb6eb61487a","scripts":{"build":"webpack"},"_npmUser":{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"},"_npmVersion":"10.7.0","description":"## Features","directories":{"example":"examples"},"_nodeVersion":"18.20.3","dependencies":{"bs58":"^6.0.0","@solana/web3.js":"^1.95.8"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.92.1","ts-loader":"^9.5.1","typescript":"^5.5.2","webpack-cli":"^5.1.4"},"_npmOperationalInternal":{"tmp":"tmp/sol-unity-sdk_0.0.1_1733717529005_0.6909296753389846","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@cuonghx.ngen/sol-unity-sdk","version":"0.0.2","keywords":[],"author":{"name":"0xcuonghx"},"license":"ISC","_id":"@cuonghx.ngen/sol-unity-sdk@0.0.2","maintainers":[{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"}],"dist":{"shasum":"2a4a3a22d940191892cf96fb408eb146360391a9","tarball":"https://registry.npmjs.org/@cuonghx.ngen/sol-unity-sdk/-/sol-unity-sdk-0.0.2.tgz","fileCount":4,"integrity":"sha512-a8LjzDqFDIumK6QZuOcE93W8kZ/y3ZTJfAJQMXXzcSJ82UWTFFI3G1rtp4euqj3V3XkzvBxwRQ0AVyzs+RRf0A==","signatures":[{"sig":"MEQCIFNCQsXpvq8+K9trqDglfazg1hds7HL8lQYOtayeJx6/AiBhm9euYHa2J4FvPhE1nX9OIn3MOosm1OUOL9MAXMnKcQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271567},"main":"dist/index.js","gitHead":"b4ceae721a49b46cb8e6c923971d37a4d9b33e3e","scripts":{"build":"webpack"},"_npmUser":{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"},"_npmVersion":"10.7.0","description":"SDK for seamless integration with the solana network (sending sol, purchasing item, get balance) in pure JavaScript, making it easy to embed within Unity. (JS, Unity)","directories":{"example":"examples"},"_nodeVersion":"18.20.3","dependencies":{"bs58":"^6.0.0","@solana/web3.js":"^1.95.8"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.92.1","ts-loader":"^9.5.1","typescript":"^5.5.2","webpack-cli":"^5.1.4"},"_npmOperationalInternal":{"tmp":"tmp/sol-unity-sdk_0.0.2_1733824218170_0.9010307503726491","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@cuonghx.ngen/sol-unity-sdk","version":"0.0.3","keywords":[],"author":{"name":"0xcuonghx"},"license":"ISC","_id":"@cuonghx.ngen/sol-unity-sdk@0.0.3","maintainers":[{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"}],"dist":{"shasum":"8c5ef9b64582906a84ad7705c1ed4d21c63ca2ac","tarball":"https://registry.npmjs.org/@cuonghx.ngen/sol-unity-sdk/-/sol-unity-sdk-0.0.3.tgz","fileCount":4,"integrity":"sha512-Rnl03h/4THIem5nSI914kwNxJIaoXuIFioO67h99Y6hSsQKKpQT23PRUXRGoK9Xhu7zOsppCgKdzyzYSWTWkxw==","signatures":[{"sig":"MEYCIQDVzXLYjDyys/7ByrGUMZBCxvKhS2JPSBsaO7dyxVOYgQIhALjorVJWHzldWZB2QdcDhf6+SCEPPLFJ0GyHm2qQqYhp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271624},"main":"dist/index.js","gitHead":"9e4a33b88d0c5f1babb2c612266ac88a12e66c77","scripts":{"build":"webpack"},"_npmUser":{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"},"_npmVersion":"10.7.0","description":"SDK for seamless integration with the solana network (sending sol, purchasing item, get balance) in pure JavaScript, making it easy to embed within Unity. (JS, Unity)","directories":{"example":"examples"},"_nodeVersion":"18.20.3","dependencies":{"bs58":"^6.0.0","@solana/web3.js":"^1.95.8"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.92.1","ts-loader":"^9.5.1","typescript":"^5.5.2","webpack-cli":"^5.1.4"},"_npmOperationalInternal":{"tmp":"tmp/sol-unity-sdk_0.0.3_1733882666753_0.15718672402999223","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@cuonghx.ngen/sol-unity-sdk","version":"0.0.4","keywords":[],"author":{"name":"0xcuonghx"},"license":"ISC","_id":"@cuonghx.ngen/sol-unity-sdk@0.0.4","maintainers":[{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"}],"dist":{"shasum":"ace59ede85b83ed70feb2b0451ffdfdc1c2c2fc3","tarball":"https://registry.npmjs.org/@cuonghx.ngen/sol-unity-sdk/-/sol-unity-sdk-0.0.4.tgz","fileCount":4,"integrity":"sha512-nS6Ze+ZdM4g/o7APbbvVw06sFQb3LtGHBCh0/UEmICopfJOUkPxHy6S4QqShiwDkvZDzguovQLemcR7w/dC9Uw==","signatures":[{"sig":"MEUCIQDvLWIImRGildNdYlS5y4xQGfJDFIj37jPaVOBNVemL8wIgICc1IEV51FpDTVpYBPmVRChifjDjlKZnnNkDsAh6U9c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271896},"main":"dist/index.js","gitHead":"1a17784ee975dc157a275a26baca7e9a5daf2e0c","scripts":{"build":"webpack"},"_npmUser":{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"},"_npmVersion":"10.7.0","description":"SDK for seamless integration with the solana network (sending sol, purchasing item, get balance) in pure JavaScript, making it easy to embed within Unity. (JS, Unity)","directories":{"example":"examples"},"_nodeVersion":"18.20.3","dependencies":{"bs58":"^6.0.0","@solana/web3.js":"^1.95.8"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.92.1","ts-loader":"^9.5.1","typescript":"^5.5.2","webpack-cli":"^5.1.4"},"_npmOperationalInternal":{"tmp":"tmp/sol-unity-sdk_0.0.4_1733908210824_0.8709965181716406","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@cuonghx.ngen/sol-unity-sdk","version":"0.0.5","keywords":[],"author":{"name":"0xcuonghx"},"license":"ISC","_id":"@cuonghx.ngen/sol-unity-sdk@0.0.5","maintainers":[{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"}],"dist":{"shasum":"19dce7092aa90e6943c212f2a43295c630851506","tarball":"https://registry.npmjs.org/@cuonghx.ngen/sol-unity-sdk/-/sol-unity-sdk-0.0.5.tgz","fileCount":4,"integrity":"sha512-+6MNS/WrNjqAUPZTaQh8ff2cTSwjfObvEUsnzjEKB1XlMh6mKLVxOELmr7rK68oJcP4/WDxPyaSbo1y2eZlmjg==","signatures":[{"sig":"MEUCIQCs275OQVXYwpkBB9NSusfTsN3iJzn9X41ljtTF3zLAdAIgGpTsdEMkOp7mnITryJxY+MEuWsT0p+WjpjeDDK0vr/4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271921},"main":"dist/index.js","gitHead":"f979d32b40753470d551073eda81d60677b28ca3","scripts":{"build":"webpack"},"_npmUser":{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"},"_npmVersion":"10.7.0","description":"SDK for seamless integration with the solana network (sending sol, purchasing item, get balance) in pure JavaScript, making it easy to embed within Unity. (JS, Unity)","directories":{"example":"examples"},"_nodeVersion":"18.20.3","dependencies":{"bs58":"^6.0.0","@solana/web3.js":"^1.95.8"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.92.1","ts-loader":"^9.5.1","typescript":"^5.5.2","webpack-cli":"^5.1.4"},"_npmOperationalInternal":{"tmp":"tmp/sol-unity-sdk_0.0.5_1733972496605_0.8591043247115548","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@cuonghx.ngen/sol-unity-sdk","version":"0.0.6","keywords":[],"author":{"name":"0xcuonghx"},"license":"ISC","_id":"@cuonghx.ngen/sol-unity-sdk@0.0.6","maintainers":[{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"}],"dist":{"shasum":"6acd1ade5b5059493f4b99a3dd0e510325a2cf00","tarball":"https://registry.npmjs.org/@cuonghx.ngen/sol-unity-sdk/-/sol-unity-sdk-0.0.6.tgz","fileCount":4,"integrity":"sha512-lhfQr56I6BmShcbtJkDtvhq+EWy0tx0nFKDh2/qgchQ8LEcZnghm5cwrr+uVNWoZLEqyrCepduv9N4psizYX7A==","signatures":[{"sig":"MEUCIQCCZPnY8sFQyefkXvynj38yyMMQhDKDyBmxyANSm3SbgQIgTrpuhya8zgh6dCqSSaSipJl221Op+7TvJip47+akwx0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271921},"main":"dist/index.js","gitHead":"f979d32b40753470d551073eda81d60677b28ca3","scripts":{"build":"webpack"},"_npmUser":{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"},"_npmVersion":"10.7.0","description":"SDK for seamless integration with the solana network (sending sol, purchasing item, get balance) in pure JavaScript, making it easy to embed within Unity. (JS, Unity)","directories":{"example":"examples"},"_nodeVersion":"18.20.3","dependencies":{"bs58":"^6.0.0","@solana/web3.js":"^1.95.8"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.92.1","ts-loader":"^9.5.1","typescript":"^5.5.2","webpack-cli":"^5.1.4"},"_npmOperationalInternal":{"tmp":"tmp/sol-unity-sdk_0.0.6_1733972681526_0.19058549038761075","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@cuonghx.ngen/sol-unity-sdk","version":"0.0.7","main":"dist/index.js","directories":{"example":"examples"},"scripts":{"build":"webpack"},"keywords":[],"author":{"name":"0xcuonghx"},"license":"ISC","description":"SDK for seamless integration with the solana network (sending sol, purchasing item, get balance) in pure JavaScript, making it easy to embed within Unity. (JS, Unity)","devDependencies":{"ts-loader":"^9.5.1","typescript":"^5.5.2","webpack":"^5.92.1","webpack-cli":"^5.1.4"},"dependencies":{"@solana/web3.js":"^1.95.8","bs58":"^6.0.0"},"_id":"@cuonghx.ngen/sol-unity-sdk@0.0.7","gitHead":"f979d32b40753470d551073eda81d60677b28ca3","_nodeVersion":"18.20.3","_npmVersion":"10.7.0","dist":{"integrity":"sha512-F16ZfOsHgCgi6iIuydFLjhkgHT+W6q+kmqrGSv+ncMQjL/f3p4abIzCAtMr2j4kt3vtV3XDjPsCIUbeyvix9Nw==","shasum":"4cf820f5e6762a363e2ede0f85b268e3a7f34101","tarball":"https://registry.npmjs.org/@cuonghx.ngen/sol-unity-sdk/-/sol-unity-sdk-0.0.7.tgz","fileCount":4,"unpackedSize":271987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDltXivq5yld0uLBNirsYk8hZ4++eVfrnPksLZzXPuggAiAGcELSuk9mDgyDHHA7oGaz2u4paaoBADvj5q1jG4cF8Q=="}]},"_npmUser":{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"},"maintainers":[{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sol-unity-sdk_0.0.7_1733973055369_0.25393130126855556"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-09T04:12:08.921Z","modified":"2024-12-12T03:10:55.844Z","0.0.1":"2024-12-09T04:12:09.236Z","0.0.2":"2024-12-10T09:50:18.319Z","0.0.3":"2024-12-11T02:04:26.949Z","0.0.4":"2024-12-11T09:10:11.009Z","0.0.5":"2024-12-12T03:01:36.790Z","0.0.6":"2024-12-12T03:04:41.755Z","0.0.7":"2024-12-12T03:10:55.691Z"},"author":{"name":"0xcuonghx"},"license":"ISC","keywords":[],"description":"SDK for seamless integration with the solana network (sending sol, purchasing item, get balance) in pure JavaScript, making it easy to embed within Unity. (JS, Unity)","maintainers":[{"name":"cuonghx.ngen","email":"cuonghx.ngen@gmail.com"}],"readme":"# Unity SDK\n\nSDK for seamless integration with the solana network (sending sol, purchasing item, get balance) in pure JavaScript, making it easy to embed within Unity. (JS, Unity)\n\n## Features\n\n- Interact with SOL wallet\n- Purchasing item by sending SOL transactions\n\n## Technique\n\n- @solana/web3js: a JavaScript library that provides tools for interacting with the Solana blockchain\n- webpack: a powerful JavaScript bundler that compiles and packages modules, assets, and dependencies into optimized bundles for use in Unity HTML5.\n\n# Getting Started\n\n## Install with CDN\n\n- Add the script to your HTML file:\n\n```html\n<script src=\"https://unpkg.com/@cuonghx.ngen/sol-unity-sdk@latest\"></script>\n```\n\n- ℹ️ If you don't want auto-update the library, pass concrete version instead of latest, e.g.\n\n```html\n<script src=\"https://unpkg.com/@cuonghx.ngen/sol-unity-sdk@0.0.1\"></script>\n```\n\n- Add `load-sdk.js` scripts\n\n```html\n<script src=\"./load-sdk.js\"></script>\n```\n\n- Prepare `load-sdk.js` file\n\n```js\nconst plugin = new SolUnitySDK.default({\n  privateKey: \"xxx\",\n  purchaseItemAddress: \"xxx\",\n});\n```\n\n## Install with npm\n\n```shell\nnpm i @cuonghx.ngen/sol-unity-sdk\n```\n\n# Usage\n\n- Using with Unity throw `jslib` plugin\n\n```jslib\nmergeInto(LibraryManager.library, {\n  GetPublicAddress: function () {\n    var returnStr = plugin.getPublicAddress();\n    var bufferSize = lengthBytesUTF8(returnStr) + 1;\n    var buffer = _malloc(bufferSize);\n    stringToUTF8(returnStr, buffer, bufferSize);\n    return buffer;\n  },\n  PurchaseItem: async function (args) {\n    var returnStr = await plugin.purchaseItem(UTF8ToString(args));\n    var bufferSize = lengthBytesUTF8(returnStr) + 1;\n    var buffer = _malloc(bufferSize);\n    stringToUTF8(returnStr, buffer, bufferSize);\n    return buffer;\n  },\n});\n```\n\n| Function              | Description                           |\n| --------------------- | ------------------------------------- |\n| plugin.getPublicKey() | Return account connected address      |\n| plugin.purchaseItem() | Send transaction form purchasing item |\n| plugin.getBalance()   | Get balance of connected address      |\n\n## Examples\n\n- Complete example via [Examples](./examples/)\n\n## Authors and acknowledgment\n\nPlayshub Team\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Project status\n\nWe are still developing this project following the roadmap in here: https://playshub.io/\n","readmeFilename":"README.md"}