{"_id":"pi-stream-sdk","_rev":"31-87abf1a6514592701d7498c61e47d183","name":"pi-stream-sdk","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.14":{"name":"pi-stream-sdk","version":"1.0.14","keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"license":"ISC","_id":"pi-stream-sdk@1.0.14","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"dist":{"shasum":"7a2a86c6ccba86c069b4c70167acef5c7bb7f1b0","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.0.14.tgz","fileCount":4,"integrity":"sha512-ze65huVWJlL4oq7HpUvwI/RGP+G+G1gf+S8wVqFLSJK3d/D3DuJ4i08VSTMw3YvG6MroW6B5SRZy3K3a0RMmEA==","signatures":[{"sig":"MEYCIQDhpYs6kUluwtm+NjucY+dE4EuEbrowrncE+JDg43eKIgIhAKXej9mE4Xv+ZpRZN5zhfiNDZTVt8op6HuKiwNqNbRqV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":782052},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"nodemon src/index.ts","build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js"},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"_npmVersion":"10.5.0","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.10.0","dotenv":"^17.2.0","mongoose":"^8.16.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","nodemon":"^3.1.10","typescript":"^5.8.3","@types/node":"^24.0.14","stellar-sdk":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-stream-sdk_1.0.14_1752686595115_0.8259477574954657","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"pi-stream-sdk","version":"1.1.1","keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"license":"ISC","_id":"pi-stream-sdk@1.1.1","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"dist":{"shasum":"8f60204e0ee6f9d5fb3948e30abdafd0ae5de6d8","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.1.1.tgz","fileCount":4,"integrity":"sha512-HyBuYxFo6bdKM7PMQhm6pgrxnNiLfQWr6qMmM8nVZkhw+JOPh5kxctG7VRFoPbqN699kvZmiQFGYx9ggfDjmLw==","signatures":[{"sig":"MEUCIQCFEETcq2KGHUmU2oT61MiLrbT0DwKjaPCcwXLfK/zeDAIgdlu4Zdobwre+isLsPcDjSQ5J0Q4s3gUtQ1bo41btIMc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":784035},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"1480124e01d9932deed8c4da74468074dfd3c67c","scripts":{"dev":"nodemon src/index.ts","build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js"},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"_npmVersion":"10.5.0","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.10.0","dotenv":"^17.2.0","ethers":"^6.15.0","tronweb":"^6.0.3","mongoose":"^8.16.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.0.14","stellar-sdk":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-stream-sdk_1.1.1_1752751388551_0.7796719289837928","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"pi-stream-sdk","version":"1.1.2","keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"license":"ISC","_id":"pi-stream-sdk@1.1.2","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"dist":{"shasum":"552c846a4588a95c6ee917661ee4e498b186d66a","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.1.2.tgz","fileCount":6,"integrity":"sha512-vkVPghy2qF3oyN57IFKUuZs3mwmBCivLQhCi9K/ERTQTM54os7sxI6mMEnM9AT4ogqs4PH0LOoFxnxoW92xSoA==","signatures":[{"sig":"MEUCIAgnjY5vRprEhndJm60g5O7TY2ANAps+XoSsv+D+dh+JAiEAxSTo7q43FBldC68IfgzNBrV3coCd9aWBhUOCtYx2Ls4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1564144},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1480124e01d9932deed8c4da74468074dfd3c67c","scripts":{"dev":"nodemon src/index.ts","build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js"},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"_npmVersion":"10.5.0","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.10.0","dotenv":"^17.2.0","ethers":"^6.15.0","tronweb":"^6.0.3","mongoose":"^8.16.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.0.14","stellar-sdk":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-stream-sdk_1.1.2_1752755153179_0.6903296169917157","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"pi-stream-sdk","version":"1.1.4","keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"license":"ISC","_id":"pi-stream-sdk@1.1.4","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"dist":{"shasum":"5f59b7edd08ebe3e17b6c8801a6ca3568c680f80","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.1.4.tgz","fileCount":6,"integrity":"sha512-bGENzb2toErQa4t8e+cxABu+8lvJZDuDLJoyI3SVwaigSIIfO8PSgEo8pF/PGqxJTEDqKvdsCQ9ujb4zvgjppg==","signatures":[{"sig":"MEYCIQCH+UudRGQWDWA4+dT+PucFV7a/n2rrnWOphJuiLUUaUgIhAN0yKIJmJfIigCjkLUHQsrATmll7cJDX7XL5BjVI0FO3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1564150},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1480124e01d9932deed8c4da74468074dfd3c67c","scripts":{"dev":"nodemon src/index.ts","build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js"},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"_npmVersion":"10.5.0","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.10.0","dotenv":"^17.2.0","ethers":"^6.15.0","tronweb":"^6.0.3","mongoose":"^8.16.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.0.14","stellar-sdk":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-stream-sdk_1.1.4_1752760929192_0.4952292427017553","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"pi-stream-sdk","version":"1.1.5","keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"license":"ISC","_id":"pi-stream-sdk@1.1.5","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"dist":{"shasum":"34957aca501be6d3758f690e631067646090c48b","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.1.5.tgz","fileCount":6,"integrity":"sha512-I4l36ozmvsLqiH1NKkQEv4zeN5F6GIh3dO+E1bqj4ZZHAghDMJB/pcixUprnMIKpvWm3tP91tXWIhg/p/PxMlg==","signatures":[{"sig":"MEUCIQCMIg+zBlc/Ewxh51ZPDsNJaHjsnLYvqR2nLuLTDVzc5AIgXgPOFG0EF/4m9MJG2WdZTjqKLnf9vXvFTye/xLZ8fXk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1564173},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1480124e01d9932deed8c4da74468074dfd3c67c","scripts":{"dev":"nodemon src/index.ts","build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js"},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"_npmVersion":"10.5.0","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.10.0","dotenv":"^17.2.0","ethers":"^6.15.0","tronweb":"^6.0.3","mongoose":"^8.16.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.0.14","stellar-sdk":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-stream-sdk_1.1.5_1752761274817_0.7241050232525568","host":"s3://npm-registry-packages-npm-production"}},"1.1.6":{"name":"pi-stream-sdk","version":"1.1.6","keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"license":"ISC","_id":"pi-stream-sdk@1.1.6","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"dist":{"shasum":"eaa25c521f7e93c3b7c14d6af565bbd44a2fa02e","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.1.6.tgz","fileCount":6,"integrity":"sha512-FzUWlW/JB2bUG4yeXryTeJrCGpL/CxtJcIkZsSnevdTj7ojLNg+FTSIYTw+6m7A6f7zMY84Kh0RiDblsF3MxqA==","signatures":[{"sig":"MEQCIBFlDtxx67B3Fe1xiAbzW3HSrzYhB7lwRegHwOTQHZ8fAiB70wAlLdLh3x4fVrQVQ/5qUMSqPCQD2+AKhwrNfyiK1A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1565693},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1480124e01d9932deed8c4da74468074dfd3c67c","scripts":{"dev":"nodemon src/index.ts","build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js"},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"_npmVersion":"10.5.0","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.10.0","dotenv":"^17.2.0","ethers":"^6.15.0","tronweb":"^6.0.3","mongoose":"^8.16.3","bs58check":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.0.14","stellar-sdk":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-stream-sdk_1.1.6_1752766606158_0.011727086592069114","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"pi-stream-sdk","version":"1.2.0","keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"license":"ISC","_id":"pi-stream-sdk@1.2.0","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"dist":{"shasum":"a771a87bb10e6852268fa7f13116afa6690cb948","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.2.0.tgz","fileCount":4,"integrity":"sha512-nXJhivbefhilpxUoLPc7leWI1yj/cUmpYVGKbkjfWB9L6qHqydySn0Owp+1qIU5e2oMWgly42mfn46lBvNffJg==","signatures":[{"sig":"MEUCIQCKpBCH8eqeR8oOxMC+Zsz5nGd3j/XHH0j7Uw1DGljvGwIgXPNpl+CcIUX2cQpXZIONT7GQfCNp/74J7ugWL182ino=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":786445},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1480124e01d9932deed8c4da74468074dfd3c67c","scripts":{"dev":"nodemon src/index.ts","build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js"},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"_npmVersion":"10.5.0","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.10.0","dotenv":"^17.2.0","ethers":"^6.15.0","tronweb":"^6.0.3","mongoose":"^8.16.3","bs58check":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.0.14","stellar-sdk":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-stream-sdk_1.2.0_1753446754283_0.4110714814156786","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"pi-stream-sdk","version":"1.2.1","keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"license":"ISC","_id":"pi-stream-sdk@1.2.1","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"dist":{"shasum":"97f976815caed3e622671f759811d8fcf1d79779","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.2.1.tgz","fileCount":4,"integrity":"sha512-LdQhOpu5SW09p3Jh9COC5FG0XL8YYuKUDjk9f7CnG7vSTsdilvYemI8XcXWVTzL2SD7ZoSGZ41ev4mKqprXp1A==","signatures":[{"sig":"MEUCICCP996rGCPpQEAx28AxIF0aHjg2L6zsO7kAkiF19dEkAiEAy1xiQtijAozHZxIkd1zbvLwJwYSFeJwKijEacqCjRKw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":786437},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1480124e01d9932deed8c4da74468074dfd3c67c","scripts":{"dev":"nodemon src/index.ts","build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js"},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"_npmVersion":"10.5.0","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.10.0","dotenv":"^17.2.0","ethers":"^6.15.0","tronweb":"^6.0.3","mongoose":"^8.16.3","bs58check":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","nodemon":"^3.1.10","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.0.14","stellar-sdk":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-stream-sdk_1.2.1_1753446885622_0.323570945890973","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"pi-stream-sdk","version":"1.2.2","description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","main":"dist/index.js","scripts":{"build":"tsup index.ts --minify --format cjs --dts --out-dir dist","start":"node dist/index.js","dev":"nodemon src/index.ts"},"keywords":["stellar","muxed","pi","sdk","blockchain"],"author":{"name":"Soleil00"},"types":"dist/index.d.ts","license":"ISC","devDependencies":{"@types/node":"^24.0.14","nodemon":"^3.1.10","stellar-sdk":"^13.1.0","ts-node":"^10.9.2","tsup":"^8.5.0","typescript":"^5.8.3"},"dependencies":{"axios":"^1.10.0","bs58check":"^4.0.0","dotenv":"^17.2.0","ethers":"^6.15.0","tronweb":"^6.0.3"},"_id":"pi-stream-sdk@1.2.2","gitHead":"1480124e01d9932deed8c4da74468074dfd3c67c","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-oMJn/x+IJadnHFQMiV001HeLMaGqXX7c+NSOPQp2dx2R65zAsLJiR1NiXJ2Dz3YiYnhpJZB4ZytY6o8MfkBHHQ==","shasum":"b785792334319f5998297c4356fc95968153342c","tarball":"https://registry.npmjs.org/pi-stream-sdk/-/pi-stream-sdk-1.2.2.tgz","fileCount":4,"unpackedSize":786410,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDTGZQCQ8s/HhYWHXKiLRUslSyAdtaBCDbogTCF9jnetwIhAOdLkRKXE5B3KNwvqob5lMd9EweEyV0p6yRJdoysoXW7"}]},"_npmUser":{"name":"soleil00","email":"srukundo02@gmail.com"},"directories":{},"maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-stream-sdk_1.2.2_1753448366987_0.2408564643730302"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-16T14:26:37.058Z","modified":"2025-07-25T12:59:27.439Z","1.0.3":"2025-07-16T14:26:37.277Z","1.0.4":"2025-07-16T14:28:51.674Z","1.0.5":"2025-07-16T14:29:31.864Z","1.0.6":"2025-07-16T15:22:45.107Z","1.0.8":"2025-07-16T15:36:30.356Z","1.0.9":"2025-07-16T16:40:20.835Z","1.0.10":"2025-07-16T16:42:12.954Z","1.0.11":"2025-07-16T16:46:48.346Z","1.0.12":"2025-07-16T16:51:01.810Z","1.0.13":"2025-07-16T17:20:32.615Z","1.0.14":"2025-07-16T17:23:15.354Z","1.1.0":"2025-07-17T10:53:55.923Z","1.1.1":"2025-07-17T11:23:08.779Z","1.1.2":"2025-07-17T12:25:53.344Z","1.1.4":"2025-07-17T14:02:09.468Z","1.1.5":"2025-07-17T14:07:55.053Z","1.1.6":"2025-07-17T15:36:46.358Z","1.2.0":"2025-07-25T12:32:34.482Z","1.2.1":"2025-07-25T12:34:45.876Z","1.2.2":"2025-07-25T12:59:27.209Z"},"author":{"name":"Soleil00"},"license":"ISC","keywords":["stellar","muxed","pi","sdk","blockchain"],"description":"A Node.js SDK to create and monitor Stellar muxed accounts on the Pi Network.","maintainers":[{"name":"soleil00","email":"srukundo02@gmail.com"}],"readme":"## 🌟 About the Pi Devkit SDK\n\nThis SDK is built for **Pi Network developers** who want to manage **child wallet addresses** derived from a single parent wallet. It helps you create unique deposit addresses for each user—just like exchanges such as **OKX**,... do when supporting Pi deposits.\n\n\nNow, with just one base wallet, you can:\n- ✅ Create individual child wallets for users or sessions\n- 🔁 Listen to incoming payments on each one\n- 🔗 Map deposits back to users instantly\n\nNo need for multiple wallets—create, track, and manage **child addresses** seamlessly.\n\n## 💡 Limitations\n\nFor now, using this SDK you can create up to **50 child wallet addresses** per base wallet.  \nIf you need more, please contact the development team to request an increased limit.\n\n---\n\n## 📚 SDK Reference\n\n\n\nInitializes the SDK with your main Pi wallet address.\n\n### 🔧 `new PiDevkit({ baseWallet: string })`\n\n- **baseWallet**: A mainnet pi wallet addres(public key) (e.g., `G...`)\n\n---\n\n### 🛠 `createChildWallet(id: string): Promise<{ child_address, child_id }>`\n\nReturns a **child wallet address** for the given `id`.\n\n- **id**: A unique identifier (alphanumeric, ≤ 8 UTF-8 bytes) used to generate the sub-address.\n\n#### ✅ Returns\n\n- `child_address`: A child wallet address (e.g., `MBKVMNHHA...ABC1234`)\n- `child_id`: A numeric identifier used to generate that child address\n\n> 💡 **Use this to assign a unique deposit address to each user.**  \n> Store both `child_address` and `child_id` in your database to associate incoming Pi with the correct user.\n\n---\n\n### 📡 `listen(callback: (payment, childId) => void): void`\n\nBegins a **live Horizon payment stream** to monitor deposits.\n\n- The callback is triggered when **any child address** receives Pi.\n- Use the returned `childId` to find the corresponding user or session.\n\n> 🔔 **Example**: If `childId = 0034` receives 15 Pi, you can immediately credit User #0034 in your app.\n\n---\n\n\n\n\n## 🧠 Best Practices\n\n- 🔐 **Persist** both `child_id` and `child_address` per user in your backend.\n- 🧩 Match `childId` from the `listen()` stream to your users to track payments.\n- 🪪 Keep IDs unique and short (e.g., `john123`, `piUser01`, etc.).\n\n## ⚙️ `Installation`\n\n```js\nnpm i pi-stream-sdk\n```\n\n\n\n## 🧪 Usage\n\n\n```js\nimport { PiDevkit } from 'pi-stream-sdk';\n\nconst sdk = new PiDevkit({\n  baseWallet: 'GBKVMNHHAH7YYLCP...' // Replace with your actual Pii network wallet address(public key)[mainnet]\n});\n\nasync function run() {\n  try {\n    // 👤 Step 1: Create a Child Wallet for a User\n    const wallet = await sdk.createChildWallet('piUser01');\n\n    console.log('🎉 Child Wallet Created Successfully!');\n    console.log('Address:', wallet.child_address);\n    console.log('Child ID:', wallet.child_id);\n\n    /**\n     * 📌 Developer Note:\n     * When a user signs up or registers on your platform,\n     * generate a unique child wallet for them (as above),\n     * then store both the `child_address` and `child_id` in your database.\n     * \n     * This allows you to:\n     * - Track incoming deposits uniquely per user\n     * - Match future payments to the correct user using the child_id\n     */\n\n    // 🔄 Step 2: Start Listening for Payments to the Parent Wallet\n    sdk.listen((payment, childId) => {\n      console.log('\\n💰 Payment Received!');\n      console.log('Amount:', payment.amount);\n      console.log('Asset:', payment.asset_code || 'XLM');\n      console.log('From:', payment.from);\n      console.log('Child ID:', childId);\n      console.log('Tx Hash:', payment.transaction_hash);\n\n      /**\n       * 📌 Developer To-Do:\n       * 1. Find the user in your database where stored child_id === childId\n       * 2. Credit the user's account balance\n       * 3. Optionally emit a socket event or trigger a webhook\n       *    to notify your frontend or system in real time.\n       * \n       * Example:\n       * await creditUserBalance(childId, payment.amount);\n       * emitToClient(childId, 'new-payment', payment);\n       */\n    });\n\n  } catch (error) {\n    console.error('❌ Error:', error.message || error);\n  }\n}\n\nrun();\n\n\n```\n\n## 👨‍💻 Author & Contact\n\nBuilt with 💛 by **Soleil**  \nIf you're planning to use this SDK in production or need integration support, feel free to reach out directly.\n\n- 🔗 **LinkedIn**: [linkedin.com/in/soleil00](https://linkedin.com/in/soleil00)\n- 💬 **Telegram**: [@soleil6](https://t.me/soleil6)\n- 📧 **Email**: srukundo02@gmail.com\n- 🐙 **GitHub**: [github.com/soleil00](https://github.com/soleil00)\n- 📱 **WhatsApp**: [+250 782 443 651](https://wa.me/250782443651)\n","readmeFilename":"README.md"}