{"_id":"@0xbigboss/pocketjs-monorepo","_rev":"3-03b02eb878a2996b2b119c7df9fa028f","name":"@0xbigboss/pocketjs-monorepo","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.3":{"name":"@0xbigboss/pocketjs-monorepo","version":"0.0.3","_id":"@0xbigboss/pocketjs-monorepo@0.0.3","maintainers":[{"name":"0xbigboss","email":"0xbigboss@proton.me"}],"dist":{"shasum":"b870c3cb84ea746c1c885acbe6c6a77affbf88b2","tarball":"https://registry.npmjs.org/@0xbigboss/pocketjs-monorepo/-/pocketjs-monorepo-0.0.3.tgz","fileCount":190,"integrity":"sha512-tAtIA9cLrRXPzBSbLoc2s1T8Azn5oce+r/kshNnyvgQz6Fdo5kq+Uk+TokJ7XONiBf8JVpaekw9PUQm2OLq8MQ==","signatures":[{"sig":"MEQCIF0MYdwBhxD2ZDYo6NphetbFBZrGGz+5jsKTXbK5zST/AiBq2mGSS6dkAkOFRqSC6LxdQuSsikru2tQQFdCO9Iykpw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4566970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjORLLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqw5g//eyixiDnMw7p2emHWSYm2NVFQmBS1r+vEhEDnFsPJqF4DVvFe\r\np1FfhpMZcS0/5cJ0MSC5EtuwInFr8nkcIjfeyGrODRGNS4u5B9gsXpU+ZkHT\r\nNlo+uKjBFT5D6keGxflfruW6CMJrScIjmlFyTV+zTgcDZ2XbuTfqkGvYpfx1\r\nRB4BnCewYXLs97DkjQAO1rAnso5Lu8I4miukWu8ZtVqwxwAM4iCxGYl2q57e\r\n+uxAcB/k4xa4vJcGx7rvjdem1uavj7iBTLsSYngJRFE9r3ljlLlOqDgTpgCB\r\nFzDIMkpcU1oh7tHu0XnkAWkVkPeqVp/g6NDQnA/41P8D0EddABvNHWhb8Bw2\r\nfsusFs5SKa8UcDtpZGHFQMHh1Ne+vS9zL4gm2JoM6Y9lpCleaX0slRxhhX/H\r\nqE+Wyg0MH2THA/k4tkmjKtR5SbGhxYj/ifHVzZyGdLWwVOikDnN5+YOEkDLT\r\nSQHNERX1lmLAPKnBRoeKyUGI4jnwS1OgMejf2Nd0VehKACmuM8qxDIM5AOtA\r\ngBVFY0tuQ067fQ/YEV28vVfe/4+D3HqLUmzsFjqVDxFn2q226cAO27+lozha\r\nxRy1ip2SqZvLBuqpM4xxRgZOrimMVSdO/HZhxS2QNNN9srkbKcSMZm6IKvHp\r\nnDbqjUffFuSAp3uyLpDtkNBOQ/7yWREkNUA=\r\n=3Grw\r\n-----END PGP SIGNATURE-----\r\n"},"_from":"file:0xbigboss-pocketjs-monorepo-0.0.3.tgz","authors":["BigBoss <0xbigboss@proton.me>"],"scripts":{"dev":"turbo run dev --parallel","lint":"turbo run lint","test":"turbo run test","build":"turbo run build","format":"prettier --write \"**/*.{ts,tsx,md}\"","dev:all":"turbo run dev --parallel --no-cache","dev:txs":"turbo run dev --scope=*transaction* --no-deps","release":"RELEASE_MODE=true pnpm publish","build:txs":"turbo run build --scope=*transaction* --no-deps","dev:types":"turbo run dev --scope=*types* --no-cache --no-deps","dev:utils":"turbo run dev --scope=*utils* --no-cache --no-deps","dev:pocket":"turbo run dev --scope=@0xbigboss/pocketjs --no-cache --no-deps","dev:signer":"turbo run dev --scope=*signer* --no-cache --no-deps","build:types":"turbo run build --scope=*types* --no-deps","build:utils":"turbo run build --scope=*utils* --no-deps","build:pocket":"turbo run build --scope=@0xbigboss/pocketjs --no-deps","build:signer":"turbo run build --scope=*signer* --no-deps","dev:provider":"turbo run dev --scope=*provider* --no-cache --no-deps","build:relayer":"turbo run build --scope=@0xbigboss/relayer --no-deps","build:provider":"turbo run build --scope=*provider* --no-deps","dev:abstract-provider":"turbo run dev --scope=*abstract-provider* --no-cache --no-deps","build:abstract-provider":"turbo run build --scope=*abstract-provider* --no-deps"},"_npmUser":{"name":"0xbigboss","email":"0xbigboss@proton.me"},"_resolved":"/private/var/folders/9b/khhz0hwd07z_p9n1wh5mqg_80000gn/T/9c5ee8311acc53b0f23a28f7006ef91e/0xbigboss-pocketjs-monorepo-0.0.3.tgz","_integrity":"sha512-tAtIA9cLrRXPzBSbLoc2s1T8Azn5oce+r/kshNnyvgQz6Fdo5kq+Uk+TokJ7XONiBf8JVpaekw9PUQm2OLq8MQ==","workspaces":["apps/*","packages/*"],"_npmVersion":"8.15.0","description":"![Build](https://github.com/pokt-foundation/pocket-js-slim/actions/workflows/node.js.yml/badge.svg)","directories":{},"_nodeVersion":"16.17.0","_hasShrinkwrap":false,"packageManager":"pnpm@6.22.2","devDependencies":{"turbo":"latest","prettier":"^2.5.1","typescript":"^4.5.5"},"_npmOperationalInternal":{"tmp":"tmp/pocketjs-monorepo_0.0.3_1664684746975_0.17101478105341195","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@0xbigboss/pocketjs-monorepo","version":"0.0.4","_id":"@0xbigboss/pocketjs-monorepo@0.0.4","maintainers":[{"name":"0xbigboss","email":"0xbigboss@proton.me"}],"dist":{"shasum":"75d9def047fe0f857b0c7dfcf8a872fbaf7f22af","tarball":"https://registry.npmjs.org/@0xbigboss/pocketjs-monorepo/-/pocketjs-monorepo-0.0.4.tgz","fileCount":190,"integrity":"sha512-aGGvTPLYdV5yaeQTl1OY1PHrSlcCVvFSuPrm2yWM8iGfKNWinItn+zue1S8jdm3w0uBCAExHGVuGy9rNEjqsmA==","signatures":[{"sig":"MEUCIHM81lmwV0UopiCgeiN+YwdqfW7IMo5GACmmOuQ5w2h0AiEAvfdoigJ2Zy06QjD7hnVYeHEyCvTcWqSU42MD88Z7RK0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4566961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXwWEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSVQ//SpOEK5QVYgfALXnIYan+SveXW9eO4vHf9/SPMIjnpf51qQux\r\nnfxWQCO0m10OCxfa7xIygQxZ9pngO3dTS1gW7PsL4VjGaLzfHnJuV5nKaBSf\r\n1Rl0iLs4CXT/IR9+ZZjnIJus6F+4ifLoakZwddgz3CVwCBhsF50+H/RFwWxG\r\nRUlyTfTKemsezwUPM/HO+8QT8n/A/ZihWh1H2LfxKdUyl/snFy5FZAWkviwZ\r\neR7kiMOvKfkJ/fXb7VyZjdEODOFevvwEGFK8LhGYHU1vY8dM8+R4JVNmzdb5\r\nYY16d4XHhKqdeZpqsSt0FtkP7+R1jD4r0B8/vDYs+JTQKztgS64FHIRJPxWu\r\ntSgpaTiFgHUldQLbN09hWnm1AnIOu7yQvws2WKMBCv18vLu/eYybaj2i03cx\r\nFYXwTiXD2rNsUUUTfElaGUCiuO+461iZDGV/Ea6jM4xC9UW7HwxlhT2rZOt0\r\nq4t/emJonJAtRKv57CvgPRa+2x6IwoOjMKb+y0J49vmLX+K3aspE5ah6bItj\r\nWBmIMuxqwVmB395nehJp4EPTllJjhFeDat52Zohduc7RU+dnmWxj+20gaOHO\r\nNVj/jjSE3+5n7Gfiai+LTSIqll637iyuTQFLvjhyeBUE6eGUaXPJ7x+fs+i+\r\nV9t2QP4TR1OtvR9dnroaqsFJO3Odi6WjPks=\r\n=OLBO\r\n-----END PGP SIGNATURE-----\r\n"},"_from":"file:0xbigboss-pocketjs-monorepo-0.0.4.tgz","scripts":{"dev":"turbo run dev --parallel","lint":"turbo run lint","test":"turbo run test","build":"turbo run build","format":"prettier --write \"**/*.{ts,tsx,md}\"","dev:all":"turbo run dev --parallel --no-cache","dev:txs":"turbo run dev --scope=*transaction* --no-deps","release":"RELEASE_MODE=true pnpm publish","build:txs":"turbo run build --scope=*transaction* --no-deps","dev:types":"turbo run dev --scope=*types* --no-cache --no-deps","dev:utils":"turbo run dev --scope=*utils* --no-cache --no-deps","dev:pocket":"turbo run dev --scope=@pokt-foundation/pocketjs --no-cache --no-deps","dev:signer":"turbo run dev --scope=*signer* --no-cache --no-deps","build:types":"turbo run build --scope=*types* --no-deps","build:utils":"turbo run build --scope=*utils* --no-deps","build:pocket":"turbo run build --scope=@pokt-foundation/pocketjs --no-deps","build:signer":"turbo run build --scope=*signer* --no-deps","dev:provider":"turbo run dev --scope=*provider* --no-cache --no-deps","build:relayer":"turbo run build --scope=@pokt-foundation/relayer --no-deps","build:provider":"turbo run build --scope=*provider* --no-deps","dev:abstract-provider":"turbo run dev --scope=*abstract-provider* --no-cache --no-deps","build:abstract-provider":"turbo run build --scope=*abstract-provider* --no-deps"},"_npmUser":{"name":"0xbigboss","email":"0xbigboss@proton.me"},"_resolved":"/private/var/folders/9b/khhz0hwd07z_p9n1wh5mqg_80000gn/T/c9cba1836216099c817f47a15361fb34/0xbigboss-pocketjs-monorepo-0.0.4.tgz","_integrity":"sha512-aGGvTPLYdV5yaeQTl1OY1PHrSlcCVvFSuPrm2yWM8iGfKNWinItn+zue1S8jdm3w0uBCAExHGVuGy9rNEjqsmA==","workspaces":["apps/*","packages/*"],"_npmVersion":"8.19.2","description":"![Build](https://github.com/pokt-foundation/pocket-js-slim/actions/workflows/node.js.yml/badge.svg)","directories":{},"_nodeVersion":"18.12.0","_hasShrinkwrap":false,"packageManager":"pnpm@6.22.2","devDependencies":{"turbo":"latest","prettier":"^2.5.1","typescript":"^4.5.5"},"_npmOperationalInternal":{"tmp":"tmp/pocketjs-monorepo_0.0.4_1667171716620_0.9535240866582335","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-10-02T04:25:46.886Z","modified":"2026-06-24T17:39:14.730Z","0.0.3":"2022-10-02T04:25:47.214Z","0.0.4":"2022-10-30T23:15:16.908Z"},"description":"![Build](https://github.com/pokt-foundation/pocket-js-slim/actions/workflows/node.js.yml/badge.svg)","maintainers":[{"email":"0xbigboss@proton.me","name":"alleneubank"}],"readme":"# PocketJS\n\n![Build](https://github.com/pokt-foundation/pocket-js-slim/actions/workflows/node.js.yml/badge.svg)\n\nA complete, fast and slim SDK to interact with the Pocket Network.\n\n## Usage\n\nAdd the packages for each part to your project:\n\n```console\nyarn add @pokt-foundation/pocketjs-provider @pokt-foundation/pocketjs-signer @pokt-foundation/pocketjs-transaction-builder @pokt-foundation/pocketjs-relayer @pokt-foundation/pocketjs-utils\n```\n\nAnd use each piece as you see fit:\n\n```javascript\nimport { JsonRpcProvider } from \"@0xbigboss/pocketjs-provider\";\nimport { KeyManager } from \"@0xbigboss/pocketjs-signer\";\nimport { TransactionBuilder } from \"@0xbigboss/pocketjs-transaction-builder\";\nimport { Relayer } from \"@0xbigboss/pocketjs-relayer\";\nimport {\n  MAINNET_RPC_URL,\n  DISPATCHERS,\n  RELAY_DATA,\n  POCKET_AAT,\n} from \"./config.js\";\n\n// Instantiate a provider for querying information on the chain!\nexport const provider = new JsonRpcProvider({\n  rpcUrl: MAINNET_RPC_URL,\n  // If you'll Instantiate a relayer, you need to add dispatchers as well\n  dispatchers: DISPATCHERS,\n});\n\nconst balance = await provider.getBalance(\n  \"07a6fca4dea9f01e4c19f301df0d0afac128561b\"\n);\n\n// Instantiate a signer for importing an account and signing messages!\nexport const signer = await KeyManager.fromPrivateKey(process.env.PRIVATE_KEY);\n\nconst address = signer.getAddress();\nconst publicKey = signer.getPublicKey();\nconst signedMessage = signer.sign(\"deadbeef\");\n\n// Instantiate a new TransactionBuilder for creating transaction messages and\n// and sending them over the network!\nexport const transactionBuilder = new TransactionBuilder({\n  provider,\n  signer,\n});\n\n// Create a new `Send` Message which is used to send funds over the network.\nconst sendMsg = transactionBuilder.send(\n  signer.getAddress(),\n  \"07a6fca4dea9f01e4c19f301df0d0afac128561b\",\n  // Amount in uPOKT (1 POKT = 1*10^6 uPOKT)\n  \"1000000\"\n);\n// Send it over the network!\nconst txresponse = await transactionBuilder.submit({\n  memo: \"POKT Payment\",\n  txMsg: sendMsg,\n});\n\n// Create a new relayer to send relays over the network!\nexport const relayer = new Relayer({\n  keyManager: signer,\n  provider,\n  dispatchers: DISPATCHERS,\n});\n\nconst session = await relayer.getNewSession({\n  chain: process.env.APP_CHAIN,\n  applicationPubKey: process.env.APP_PUBLIC_KEY,\n});\n\nconst relay = await relayer.relay({\n  data: process.env.RELAY_DATA,\n  blockchain: process.env.APP_CHAIN,\n  pocketAAT: POCKET_AAT,\n  session: session,\n});\n```\n\n## Contributing\n\n## Setting up\n\nDownload the repo from Github, and just run `pnpm i` at the root folder. This will install all of the individual packages in the necessary order. If you'd like to build all packages manually, you'll need follow the order in which they're referenced:\n- Install `packages/utils`\n- Install `packages/types`\n- Install `packages/abstract-provider`\n- Install `packages/provider`\n- Install `packages/signer`\n- Install `packages/relayer`\n- Install `packages/transaction-builder`\n\nThe best way to develop locally is to link the local packages from your clone to the project you're working on; this will let you either run the dev server or build the packages to see the changes in real time.\n\nWe use Turborepo to manage build caches and our general build/test pipeline. This means that only the packages that have changed will get built again, saving you time. At the root `package.json` we've also defined a collection of scripts you can use to run individual packages on their dev server.\n\n### Running tests\n\nFor running tests, either run `pnpm jest` on the corresponding repo or run `pnpm turbo run test` on the root folder to run all tests.\n\n#### 👋 Get started contributing with a [good first issue](https://github.com/pokt-foundation/pocket-js-slim/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).\n\nDon't be shy to contribute even the smallest tweak. 🐲 There are still some dragons to be aware of, but we'll be here to help you get started!\n\n## Issues\n\nIf you ever come across an issue with PocketJS, do a search in the issues tab of this repo and make sure it hasn't been reported before. Follow these steps to help us prevent unnecessary notifications to the many people following this repo.\n\n- If the issue you found has been reported and is still open, and the details match your issue, give a \"thumbs up\" to the relevant posts in the issue thread to signal that you have the same issue. No further action is required on your part.\n- If the issue you found has been reported and is still open, but the issue is missing some details, you can add a comment to the issue thread describing the additional details.\n- If the issue you found has been reported but has been closed, you can comment on the closed issue thread and ask to have the issue reopened because you are still experiencing the issue. Alternatively, you can open a new issue, reference the closed issue by number or link, and state that you are still experiencing the issue. Provide any additional details in your post so we can better understand the issue and how to fix it.\n","readmeFilename":"README.md"}