{"_id":"@b3dotfun/hypeduel-sdk","_rev":"11-3c4e47f29e2dde6c5b102e3a710d7227","name":"@b3dotfun/hypeduel-sdk","dist-tags":{"latest":"1.2.5"},"versions":{"0.0.1":{"name":"@b3dotfun/hypeduel-sdk","version":"0.0.1","keywords":["hypeduel","sdk","api","websocket","typescript"],"author":"","license":"MIT","_id":"@b3dotfun/hypeduel-sdk@0.0.1","maintainers":[{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"dist":{"shasum":"64b66e7fe186c8b2fd9034d98ff23e8f1150dfd1","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-0.0.1.tgz","fileCount":10,"integrity":"sha512-7qPI5IqkoXjgkc4khXPTv3dvtEzRZboXqw7eBAOAN99oVsDrJcHG86O7uRJFL2TVTFS7ONG1YcyetmQHJJ5PRw==","signatures":[{"sig":"MEUCIQCSe2VpevA9CEdBHlCWb0hoQAqkYusXixIfkbdpC+ne9AIgZlgF5l8HxT8Sf6wzeCC0wuV+4QYDVOfheGKOuF5YyiM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8718},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"_npmVersion":"10.9.2","description":"TypeScript SDK for Hypeduel API","directories":{},"_nodeVersion":"23.11.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_0.0.1_1759655480763_0.678848946349049","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@b3dotfun/hypeduel-sdk","version":"1.0.0","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"author":{"name":"B3.fun"},"license":"MIT","_id":"@b3dotfun/hypeduel-sdk@1.0.0","maintainers":[{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"dist":{"shasum":"51f910abe0b704d6b817e69d764c15c3010749ad","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-1.0.0.tgz","fileCount":27,"integrity":"sha512-GUZvy9/5Pz5lmkn0ygX1yyCTVvJAEVhf0JkPLJQxVV8dWJ/DNdAwohCIeaPROPYyl+f2yoz8frTAPyGFjzsC2g==","signatures":[{"sig":"MEUCIBxHSmCAKlwq3lh7hE2EbArGavCelBEyV+btdNjNGDqUAiEAoWrhqBrwb8osSdYjVbICNHfQPJbnSkNmKyWDUfHAYeA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61522},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"6cfaa595406d63792f7896ac7f47aa8a358648ce","scripts":{"dev":"tsc --watch","build":"tsc","example":"tsx examples/express-example.ts","test:webhook":"tsx examples/test-webhook.ts","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","directories":{},"_nodeVersion":"20.19.2","dependencies":{"ws":"^8.16.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.1","devDependencies":{"tsx":"^4.7.0","express":"^4.18.2","@types/ws":"^8.5.10","typescript":"^5.3.0","@types/node":"^20.10.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_1.0.0_1761069588727_0.9587150591423304","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@b3dotfun/hypeduel-sdk","version":"1.1.0","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"author":{"name":"B3.fun"},"license":"MIT","_id":"@b3dotfun/hypeduel-sdk@1.1.0","maintainers":[{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"dist":{"shasum":"3f7727da4bfebf43f049892e3e94ab0e4807b7ab","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-1.1.0.tgz","fileCount":27,"integrity":"sha512-KY5p/mGPaMhRQu37INFhnRf3ZeJnOaAtH34ME2x1HXJlrNwGTzfIAj8VMQRJizr5RtDyOvrpfstYGEiUXrtUMg==","signatures":[{"sig":"MEUCIC2fY3r3WPvednsquKoP1R/uefI3eljPRumJxHf5kGaxAiEA6CMgQ3ned0F8i+blp4oTIh7DL54mkM3njhrBNSSj6IQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61696},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"17df91cd621ad865042e0985c17beaa87fddaf87","scripts":{"dev":"tsc --watch","build":"tsc","example":"tsx examples/express-example.ts","test:webhook":"tsx examples/test-webhook.ts","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","directories":{},"_nodeVersion":"20.19.2","dependencies":{"ws":"^8.16.0","jsonwebtoken":"^9.0.2","@types/jsonwebtoken":"^9.0.10"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.1","devDependencies":{"tsx":"^4.7.0","express":"^4.18.2","@types/ws":"^8.5.10","typescript":"^5.3.0","@types/node":"^20.10.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_1.1.0_1761071075191_0.9020420124417359","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@b3dotfun/hypeduel-sdk","version":"1.2.0","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"author":{"name":"B3.fun"},"license":"MIT","_id":"@b3dotfun/hypeduel-sdk@1.2.0","maintainers":[{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"dist":{"shasum":"ad9f9ab432f84c0d172be99b82dfdfe230c42651","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-1.2.0.tgz","fileCount":27,"integrity":"sha512-/4geJ2vxz0m1MmwqPVd/qPw7AYz+7UR3idNp0zqa4KVxes5Y7g+v6lchUNVxBJRNAnrcbhgkMvM1aqOKpb9bFA==","signatures":[{"sig":"MEUCIE6+jB7W7nPdJtAI5oTPpjN/sxt15pgf/iTjPr77d+f3AiEAru526k7stWegRZ7WD/ci7a6+OuHT2FwGNFNqNKyozDw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63629},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"f7764c3859368a4eff97024407e7607173138eb0","scripts":{"dev":"tsc --watch","build":"tsc","example":"tsx examples/express-example.ts","test:webhook":"tsx examples/test-webhook.ts","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","directories":{},"_nodeVersion":"20.19.2","dependencies":{"ws":"^8.16.0","jsonwebtoken":"^9.0.2","@types/jsonwebtoken":"^9.0.10"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.1","devDependencies":{"tsx":"^4.7.0","express":"^4.18.2","@types/ws":"^8.5.10","typescript":"^5.3.0","@types/node":"^20.10.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_1.2.0_1761160341242_0.9419681573860064","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@b3dotfun/hypeduel-sdk","version":"1.2.1","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"author":{"name":"B3.fun"},"license":"MIT","_id":"@b3dotfun/hypeduel-sdk@1.2.1","maintainers":[{"name":"max-b3","email":"max@npclabs.org"},{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"dist":{"shasum":"285c6942e26ceab0a43347a21faa0616eee2e383","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-1.2.1.tgz","fileCount":27,"integrity":"sha512-d5/X1CCOZGpIs71aGfyVhDPGc0H1pB6lsXGrY17R2iuFisqG62MxBdFIHb2lLYnDEs4sDYdPfh+QZT1zkvr7/Q==","signatures":[{"sig":"MEUCIQC1vOuqnnVwLZmMWJE1vCfRoSXRJst6U66mbwrchgV3WAIgGTJM+xEFiYKxMpH8Ky85JK76AmVp52wBBjT/DpgL9vk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68328},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"5fc59aaa84d1fca0851e19517ec6087d7c921e87","scripts":{"dev":"tsc --watch","build":"tsc","example":"tsx examples/express-example.ts","test:webhook":"tsx examples/test-webhook.ts","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","directories":{},"_nodeVersion":"20.19.2","dependencies":{"ws":"^8.16.0","jsonwebtoken":"^9.0.2","@types/jsonwebtoken":"^9.0.10"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.1","devDependencies":{"tsx":"^4.7.0","express":"^4.18.2","@types/ws":"^8.5.10","typescript":"^5.3.0","@types/node":"^20.10.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_1.2.1_1761580017255_0.14089273741933495","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@b3dotfun/hypeduel-sdk","version":"1.2.2","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"author":{"name":"B3.fun"},"license":"MIT","_id":"@b3dotfun/hypeduel-sdk@1.2.2","maintainers":[{"name":"max-b3","email":"max@npclabs.org"},{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"dist":{"shasum":"77a182d04f23aa4b0f671ebbacdbc5eaf3761ad5","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-1.2.2.tgz","fileCount":27,"integrity":"sha512-kBiNaplIBjSYAJWmNr4tI+G7n5uOHJJKOQm0h1hEDka4M0SLdwUEuyLN2RU6oXyYqcNFeruJEPqpV8wdYjUSUA==","signatures":[{"sig":"MEUCIHn/vknfcXB5TgLZxepm+XdrsnOM0JlW4MRq2ETTCfCYAiEA3ejp9Mslv2Fu1YUPBSNJ74SdTzEkouJleDbm9TR9Whw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68904},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"5fc59aaa84d1fca0851e19517ec6087d7c921e87","scripts":{"dev":"tsc --watch","build":"tsc","example":"tsx examples/express-example.ts","test:webhook":"tsx examples/test-webhook.ts","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","directories":{},"_nodeVersion":"20.19.2","dependencies":{"ws":"^8.16.0","jsonwebtoken":"^9.0.2","@types/jsonwebtoken":"^9.0.10"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.1","devDependencies":{"tsx":"^4.7.0","express":"^4.18.2","@types/ws":"^8.5.10","typescript":"^5.3.0","@types/node":"^20.10.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_1.2.2_1761583578608_0.8119721070675905","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"@b3dotfun/hypeduel-sdk","version":"1.2.3","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"author":{"name":"B3.fun"},"license":"MIT","_id":"@b3dotfun/hypeduel-sdk@1.2.3","maintainers":[{"name":"max-b3","email":"max@npclabs.org"},{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"dist":{"shasum":"f66e9fb77fbcd0266cc972b2fc7ee20f38f560ef","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-1.2.3.tgz","fileCount":27,"integrity":"sha512-FflpyI+baTTBbN9oo8ZmPKuhUWQ0/vHbsQVGpRlnVuVIBIjZiDerboFg4ly01bjk5PKEGR7/RfRh2nhf8TKB0Q==","signatures":[{"sig":"MEUCICN8DhOxxP2ZQJYtIoB+XVU7IoK7RCq3LicRchAnxJbfAiEAkw901QzvI/EyOE+8I7UfowBAsGYmwWdEZqgsYyGoHdc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68289},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"5fc59aaa84d1fca0851e19517ec6087d7c921e87","scripts":{"dev":"tsc --watch","build":"tsc","example":"tsx examples/express-example.ts","test:webhook":"tsx examples/test-webhook.ts","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","directories":{},"_nodeVersion":"20.19.2","dependencies":{"ws":"^8.16.0","jsonwebtoken":"^9.0.2","@types/jsonwebtoken":"^9.0.10"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.1","devDependencies":{"tsx":"^4.7.0","express":"^4.18.2","@types/ws":"^8.5.10","typescript":"^5.3.0","@types/node":"^20.10.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_1.2.3_1761584269797_0.18117565085894682","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"@b3dotfun/hypeduel-sdk","version":"1.2.4","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"author":{"name":"B3.fun"},"license":"MIT","_id":"@b3dotfun/hypeduel-sdk@1.2.4","maintainers":[{"name":"max-b3","email":"max@npclabs.org"},{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"dist":{"shasum":"b70e1a871c93be805b8bbba9ba7fcd541f3d5165","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-1.2.4.tgz","fileCount":27,"integrity":"sha512-vx9sh2Pj0IpTmUbFLiOBTN6PqfWpIVfSVRTX0Hyvwgj857JO3C979kWYIYQ/w4RI2NOwLdIhbnSBz6R8Isarng==","signatures":[{"sig":"MEUCIEejZevo4aRRr/6PDp41btf3pbvfcXIcfGrRurrHFv6kAiEAprOXbf/nrvF2XuDnuHc9foytDl6e6dL+HObj/uf2FY0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68329},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"335ae12c32b1d82ff6de126010f63786a20235cf","scripts":{"dev":"tsc --watch","build":"tsc","example":"tsx examples/express-example.ts","test:webhook":"tsx examples/test-webhook.ts","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","directories":{},"_nodeVersion":"20.19.2","dependencies":{"ws":"^8.16.0","jsonwebtoken":"^9.0.2","@types/jsonwebtoken":"^9.0.10"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.1","devDependencies":{"tsx":"^4.7.0","express":"^4.18.2","@types/ws":"^8.5.10","typescript":"^5.3.0","@types/node":"^20.10.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_1.2.4_1762270508892_0.29450990052820814","host":"s3://npm-registry-packages-npm-production"}},"1.2.5":{"name":"@b3dotfun/hypeduel-sdk","version":"1.2.5","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"author":{"name":"B3.fun"},"license":"MIT","_id":"@b3dotfun/hypeduel-sdk@1.2.5","maintainers":[{"name":"max-b3","email":"max@npclabs.org"},{"name":"npclabs","email":"sean@npclabs.org"},{"name":"gionpclabs","email":"gio@npclabs.org"},{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},{"name":"b3_david","email":"davidnguyen@npclabs.org"},{"name":"anqt-dev","email":"anqtran36@gmail.com"},{"name":"wojb3","email":"wojtek@npclabs.org"},{"name":"mitchmyburgh","email":"mitchmyburgh@gmail.com"},{"name":"trung.npclabs","email":"trung@npclabs.org"},{"name":"mikedutuandu","email":"mike@npclabs.org"}],"homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"dist":{"shasum":"53633b33457f5d8386218c0a6a4382f5b059c0cc","tarball":"https://registry.npmjs.org/@b3dotfun/hypeduel-sdk/-/hypeduel-sdk-1.2.5.tgz","fileCount":27,"integrity":"sha512-YejMMpLORh4rg9nVBfr1D4Sm2KIsBL6CI7ktEoQlcF8Wb1608aTDripVQpV0AIXbWS/PaRIdu6IIuosW4lQ+VA==","signatures":[{"sig":"MEYCIQC9Sm/TFngZz2yVsCI6tGV6PzXfZKf+UR8gdtv3Wh8SVgIhALxycG9N3LPBc494mhyEx5NhBsH0GbPkoCvBeeAJO/eD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68367},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"335ae12c32b1d82ff6de126010f63786a20235cf","scripts":{"dev":"tsc --watch","build":"tsc","example":"tsx examples/express-example.ts","test:webhook":"tsx examples/test-webhook.ts","prepublishOnly":"pnpm build"},"_npmUser":{"name":"alex-kaffetzakis","email":"alex@kaffetzakis.com"},"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","directories":{},"_nodeVersion":"20.19.2","dependencies":{"ws":"^8.16.0","jsonwebtoken":"^9.0.2","@types/jsonwebtoken":"^9.0.10"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.15.1","devDependencies":{"tsx":"^4.7.0","express":"^4.18.2","@types/ws":"^8.5.10","typescript":"^5.3.0","@types/node":"^20.10.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/hypeduel-sdk_1.2.5_1762296669932_0.6397413609612266","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-10-05T09:11:20.637Z","modified":"2026-02-02T15:42:53.688Z","0.0.1":"2025-10-05T09:11:20.963Z","1.0.0":"2025-10-21T17:59:48.924Z","1.1.0":"2025-10-21T18:24:35.448Z","1.2.0":"2025-10-22T19:12:21.438Z","1.2.1":"2025-10-27T15:46:57.476Z","1.2.2":"2025-10-27T16:46:18.782Z","1.2.3":"2025-10-27T16:57:49.975Z","1.2.4":"2025-11-04T15:35:09.163Z","1.2.5":"2025-11-04T22:51:10.118Z"},"bugs":{"url":"https://github.com/b3-fun/hypeduel-sdk/issues"},"author":{"name":"B3.fun"},"license":"MIT","homepage":"https://github.com/b3-fun/hypeduel-sdk/issues","keywords":["hypeduel","sdk","api","websocket","typescript","match","game","gaming","realtime"],"repository":{"url":"git+https://github.com/b3-fun/hypeduel-sdk.git","type":"git"},"description":"TypeScript SDK for integrating HypeDuel match services into your Node.js application","maintainers":[{"email":"max@npclabs.org","name":"max-b3"},{"email":"sean@npclabs.org","name":"npclabs"},{"email":"gio@npclabs.org","name":"gionpclabs"},{"email":"davidnguyen@npclabs.org","name":"b3_david"},{"email":"anqtran36@gmail.com","name":"anqt-dev"},{"email":"mitchmyburgh@gmail.com","name":"mitchmyburgh"},{"email":"trung@npclabs.org","name":"trung.npclabs"},{"email":"mike@npclabs.org","name":"mikedutuandu"}],"readme":"# HypeDuel SDK\n\nA TypeScript SDK for integrating HypeDuel match services into your Node.js application. This SDK handles webhook endpoints and automatically establishes WebSocket connections to the HypeDuel match server.\n\n## Features\n\n✨ **Framework Agnostic** - Works with Express, Fastify, Next.js, Koa, Hono, and more  \n🔌 **WebSocket Auto-Connect** - Automatically connects to match server when webhook received  \n📦 **TypeScript First** - Full type safety with comprehensive type definitions  \n🎯 **Event-Driven** - Listen to match events with a simple event emitter API  \n🛠️ **Easy Integration** - Drop-in handlers for popular frameworks  \n🎮 **Match Lifecycle** - Simple methods to begin, update, and end matches  \n🤝 **Team Configuration** - Define team compositions via callback when requested  \n\n## Installation\n\n```bash\nnpm install @b3dotfun/hypeduel-sdk\n# or\npnpm add @b3dotfun/hypeduel-sdk\n# or\nyarn add @b3dotfun/hypeduel-sdk\n```\n\n## Quick Start\n\n### Express.js Example\n\n```typescript\nimport express from 'express';\nimport { HypeDuelSDK, createExpressHandler } from '@b3dotfun/hypeduel-sdk';\n\nconst app = express();\napp.use(express.json());\n\n// Initialize SDK\nconst sdk = new HypeDuelSDK({\n    gameSecret: 'your-game-secret', // Required for webhook verification\n    debug: true,\n    // Called when HypeDuel requests team configurations\n    onRequestTeams: async () => {\n        return [\n            {\n                id: 'team1',\n                name: 'Team 1',\n                agents: [{ id: 'player', count: 1 }]\n            },\n            {\n                id: 'team2',\n                name: 'Team 2',\n                agents: [{ id: 'opponent', count: 1 }]\n            }\n        ];\n    },\n    // Called when a match starts\n    onMatchStart: async (matchClient) => {\n        console.log(`Match started: ${matchClient.matchId}`);\n        \n        matchClient.beginMatch();\n        \n        matchClient.sendStateUpdate([{\n            transforms: [],\n            state: { scores: { player1: 0, player2: 0 } },\n            timeSinceLastFrame: 0\n        }]);\n        \n        // End the match when done\n        // matchClient.endMatch();\n    }\n});\n\n// Mount webhook handler\napp.post('/webhook/hypeduel', createExpressHandler(sdk));\n\napp.listen(3067, () => console.log('Server running on port 3067'));\n```\n\n### Next.js API Route\n\n```typescript\n// pages/api/webhook/hypeduel.ts\nimport { HypeDuelSDK, createNextHandler } from '@b3dotfun/hypeduel-sdk';\n\nconst sdk = new HypeDuelSDK({\n    debug: true,\n    onMatchStart: async (matchClient) => {\n        // Your match handling logic\n    }\n});\n\nexport default createNextHandler(sdk);\n```\n\n### Fastify Example\n\n```typescript\nimport Fastify from 'fastify';\nimport { HypeDuelSDK, createFastifyHandler } from '@b3dotfun/hypeduel-sdk';\n\nconst fastify = Fastify();\nconst sdk = new HypeDuelSDK({ debug: true });\n\nfastify.post('/webhook/hypeduel', createFastifyHandler(sdk));\n\nfastify.listen({ port: 3067 });\n```\n\n## Core Concepts\n\n### 1. SDK Initialization\n\nCreate an SDK instance with configuration:\n\n```typescript\nimport { HypeDuelSDK } from '@b3dotfun/hypeduel-sdk';\n\nconst sdk = new HypeDuelSDK({\n    gameSecret: process.env.HYPEDUEL_GAME_SECRET, // Required for webhook verification\n    debug: true, // Enable debug logging\n    // Called when HypeDuel requests team configurations\n    onRequestTeams: async () => {\n        // Return array of teams with their agent compositions\n        return [\n            {\n                id: 'team1',\n                name: 'Team 1',\n                agents: [{ id: 'player', count: 1 }],\n                metadata: { color: 'blue' } // Optional\n            },\n            {\n                id: 'team2',\n                name: 'Team 2',\n                agents: [{ id: 'opponent', count: 1 }],\n                metadata: { color: 'red' } // Optional\n            }\n        ];\n    },\n    // Called when a match starts and WebSocket connects\n    onMatchStart: async (matchClient) => {\n        // Your match handling logic\n    },\n    // Global error handler\n    onError: (error) => {\n        console.error('SDK Error:', error);\n    }\n});\n```\n\n### 2. Webhook Handling\n\nThe SDK handles two types of webhooks from HypeDuel:\n\n1. **Team Request** (`request_teams`) - Called when HypeDuel needs team configurations\n2. **Match Start** (`start_match`) - Called when a match begins\n\nThe SDK provides framework-specific adapters:\n\n- `createExpressHandler(sdk)` - Express.js\n- `createFastifyHandler(sdk)` - Fastify\n- `createKoaHandler(sdk)` - Koa\n- `createNextHandler(sdk)` - Next.js\n- `createHttpHandler(sdk)` - Node.js HTTP\n- `createHonoHandler(sdk)` - Hono\n\n**Team Request Webhook:**\n1. Receives webhook from HypeDuel requesting team configurations\n2. Calls your `onRequestTeams` callback\n3. Returns team structure to HypeDuel\n\n**Match Start Webhook:**\n1. Receives webhook payload with match information\n2. Creates a `MatchClient` instance\n3. Connects to HypeDuel server via WebSocket\n4. Authenticates using the match token\n5. Calls your `onMatchStart` callback\n\n### 3. Team Configuration\n\nDefine team structures via the `onRequestTeams` callback:\n\n```typescript\nconst sdk = new HypeDuelSDK({\n    gameSecret: 'your-game-secret',\n    onRequestTeams: async () => {\n        return [\n            {\n                id: 'attackers',\n                name: 'Attackers',\n                agents: [\n                    { id: 'warrior', count: 2 },\n                    { id: 'archer', count: 1 }\n                ],\n                metadata: { color: 'red' }\n            },\n            {\n                id: 'defenders',\n                name: 'Defenders',\n                agents: [\n                    { id: 'shield', count: 2 },\n                    { id: 'healer', count: 1 }\n                ],\n                metadata: { color: 'blue' }\n            }\n        ];\n    }\n});\n```\n\nEach team can have:\n- Multiple agent types with specified counts\n- Optional metadata for custom properties\n- Unique IDs and display names\n\n### 4. Match Client\n\nThe `MatchClient` handles WebSocket communication and provides convenient methods for match lifecycle:\n\n```typescript\n// Begin a match\nmatchClient.beginMatch();\n\n// Send state updates\nmatchClient.sendStateUpdate([{\n    transforms: [{\n        id: 1,\n        position: { x: 0, y: 0, z: 0 },\n        rotation: { x: 0, y: 0, z: 0, w: 1 }\n    }],\n    state: {\n        scores: { player1: 10, player2: 8 },\n        time: 60\n    },\n    timeSinceLastFrame: 16.67 // milliseconds\n}]);\n\n// End a match\nmatchClient.endMatch();\n\n// Listen for events\nmatchClient.on('connect', () => {\n    console.log('Connected to match server');\n});\n\nmatchClient.on('error', (error) => {\n    console.error('WebSocket error:', error);\n});\n\nmatchClient.on('close', () => {\n    console.log('Connection closed');\n});\n\n// Check connection status\nif (matchClient.isConnected()) {\n    console.log('Connected!');\n}\n\n// Manually disconnect\nmatchClient.disconnect();\n```\n\n#### Automatic State Tracking\n\nFor games that need to send regular state updates, you can use `trackState()`:\n\n```typescript\nconst gameState = {\n    transforms: [],\n    state: { scores: { player1: 0, player2: 0 } },\n    timeSinceLastFrame: 0\n};\n\n// Automatically send state every 100ms\nmatchClient.trackState(gameState, 100);\n\n// Update the state object directly - changes will be sent automatically\ngameState.state.scores.player1 = 10;\n```\n\n### 5. Managing Active Matches\n\nTrack and manage multiple active matches:\n\n```typescript\n// Get a specific match\nconst match = sdk.getMatch('match-123');\nif (match) {\n    console.log(`Match ${match.matchId} is active`);\n}\n\n// Get all active matches\nconst activeMatches = sdk.getActiveMatches();\nconsole.log(`${activeMatches.length} matches currently active`);\n\n// Disconnect a specific match\nsdk.disconnectMatch('match-123');\n\n// Disconnect all matches (useful for cleanup)\nsdk.disconnectAll();\n```\n\n## Complete Example\n\nHere's a complete example showing a simple game implementation:\n\n```typescript\nimport express from 'express';\nimport { HypeDuelSDK, createExpressHandler } from '@b3dotfun/hypeduel-sdk';\n\nconst app = express();\napp.use(express.json());\n\nconst sdk = new HypeDuelSDK({\n    gameSecret: process.env.HYPEDUEL_GAME_SECRET || 'your-game-secret',\n    debug: true,\n    // Define team configurations\n    onRequestTeams: async () => {\n        return [\n            {\n                id: 'team_red',\n                name: 'Red Team',\n                agents: [{ id: 'player', count: 1 }],\n                metadata: { color: 'red' }\n            },\n            {\n                id: 'team_blue',\n                name: 'Blue Team',\n                agents: [{ id: 'player', count: 1 }],\n                metadata: { color: 'blue' }\n            }\n        ];\n    },\n    // Handle match start\n    onMatchStart: async (matchClient) => {\n        console.log(`Match started: ${matchClient.matchId}`);\n        \n        // Begin the match\n        matchClient.beginMatch();\n        \n        // Initialize game state\n        const gameState = {\n            transforms: [],\n            state: {\n                scores: { team_red: 0, team_blue: 0 },\n                time: 0\n            },\n            timeSinceLastFrame: 0\n        };\n        \n        // Track state updates every 100ms\n        matchClient.trackState(gameState, 100);\n        \n        // Simulate a game loop\n        let gameTime = 0;\n        const gameLoop = setInterval(() => {\n            gameTime++;\n            gameState.state.time = gameTime;\n            \n            // Random score updates\n            if (Math.random() > 0.7) {\n                gameState.state.scores.team_red++;\n            }\n            \n            // End game after 30 seconds\n            if (gameTime >= 30) {\n                clearInterval(gameLoop);\n                matchClient.endMatch();\n                matchClient.disconnect();\n            }\n        }, 1000);\n        \n        // Handle disconnection\n        matchClient.on('close', () => {\n            clearInterval(gameLoop);\n            console.log('Match disconnected');\n        });\n    },\n    onError: (error) => {\n        console.error('SDK Error:', error);\n    }\n});\n\napp.post('/webhook/hypeduel', createExpressHandler(sdk));\n\napp.listen(3067, () => {\n    console.log('Server running on port 3067');\n});\n```\n\n## Data Types\n\n### SimFrame\n\nThe core data structure for sending game state:\n\n```typescript\ninterface SimFrame {\n    // Array of object transforms\n    transforms: Array<{\n        id: number;\n        position: { x: number; y: number; z: number };\n        rotation: { x: number; y: number; z: number; w: number };\n    }>;\n    \n    // Game state (scores, time, custom data)\n    state?: {\n        scores?: Record<string, number>;\n        announcedEvents?: string[];\n        time?: number;\n        [key: string]: any; // Custom properties\n    };\n    \n    // Time elapsed since last frame (ms)\n    timeSinceLastFrame: number;\n}\n```\n\n### Webhook Payload\n\nYour webhook endpoint receives this structure:\n\n```typescript\ninterface WebhookPayload {\n    callType: 'start_match' | 'request_teams';  // Type of webhook\n    jwtData: string;          // JWT for verification\n    \n    // For start_match:\n    matchId?: string;         // Unique match identifier\n    authToken?: string;       // Authentication token for WebSocket\n    wsUrl?: string;           // WebSocket server URL\n}\n```\n\n### Team Configuration Types\n\n```typescript\ninterface GameMatchTeam {\n    id: string;                          // Unique team identifier\n    name: string;                        // Display name\n    agents: GameMatchTeamAgent[];        // Array of agents in team\n    metadata?: Record<string, any>;      // Optional custom properties\n}\n\ninterface GameMatchTeamAgent {\n    id: string;                          // Agent type identifier\n    count: number;                       // Number of this agent type\n    metadata?: Record<string, any>;      // Optional custom properties\n}\n```\n\n## Examples\n\nThe `examples/` directory contains working examples:\n\n- `express-example.ts` - Complete Express.js integration with a demo game\n\nTo run the example:\n\n```bash\npnpm example\n```\n\n## API Reference\n\n### HypeDuelSDK\n\n#### Constructor Options\n\n```typescript\ninterface SDKConfig {\n    gameSecret: string;                         // Required: Game secret for webhook verification\n    onMatchStart?: (matchClient: MatchClient) => void | Promise<void>;  // Called when match starts\n    onRequestTeams?: () => Promise<GameMatchTeam[]>;  // Called when teams are requested\n    onError?: (error: Error) => void;          // Global error handler\n    debug?: boolean;                           // Enable debug logging\n}\n```\n\n#### Methods\n\n- `handleWebhook(payload: WebhookPayload): Promise<MatchClient | GameMatchTeam[]>` - Process webhook (returns MatchClient for start_match, teams array for request_teams)\n- `getMatch(matchId: string): MatchClient | undefined` - Get active match by ID\n- `getActiveMatches(): MatchClient[]` - Get all active matches\n- `disconnectMatch(matchId: string): void` - Disconnect specific match\n- `disconnectAll(): void` - Disconnect all matches\n\n### MatchClient\n\n#### Properties\n\n- `authToken: string` - Match authentication token\n- `matchId: string` - Match identifier\n- `wsUrl: string` - WebSocket server URL\n\n#### Methods\n\n- `connect(): Promise<void>` - Connect to WebSocket server\n- `send(message: OutgoingMessage): void` - Send message to server\n- `on(event: string, handler: Function): void` - Register event listener\n- `disconnect(): void` - Close WebSocket connection\n- `isConnected(): boolean` - Check connection status\n\n## Development\n\n### Build\n\n```bash\npnpm build\n```\n\n### Watch Mode\n\n```bash\npnpm dev\n```\n\n## License\n\nMIT\n\n## Support\n\nFor issues and questions, please open an issue on GitHub.\n\n\n","readmeFilename":"README.md"}