{"_id":"@metaplex-foundation/cusper","_rev":"21-2e81f18009780b47fced399408e6e8df","name":"@metaplex-foundation/cusper","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@metaplex-foundation/cusper","version":"0.0.1","keywords":["solana","blockchain","errors","custom program error","utilities"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de"},"license":"Apache-2.0","_id":"@metaplex-foundation/cusper@0.0.1","maintainers":[{"name":"aaron","email":"aaron.heckmann+github@gmail.com"},{"name":"thlorenz","email":"thlorenz10@gmail.com"},{"name":"austbotm","email":"security@austbot.com"}],"homepage":"https://github.com/metaplex-foundation/cusper#readme","bugs":{"url":"https://github.com/metaplex-foundation/cusper/issues"},"dist":{"shasum":"70cb4f7b32158798c9f30a6ae8bc7cf60e8fedd3","tarball":"https://registry.npmjs.org/@metaplex-foundation/cusper/-/cusper-0.0.1.tgz","fileCount":21,"integrity":"sha512-MUyzcwAwIdQtiG09O1C/DtPfhDXIP5Ng/g8cX9HOyR/SDcVc204Ay/iI97tTpd9aRx4RDRcb4m9e9aXdSdXbEA==","signatures":[{"sig":"MEUCIQDOpD4TGBuz1WQsTFB2BYGA6rwK1D+ukIpgo7QAqpDlCQIgYsLCilM9UoSY+WxI11jriJD6cCMBJV3JhqS0DFiu4a0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhy4cuCRA9TVsSAnZWagAAB7QP/A3JFcIErmqT2KLUIWAm\nTutB2KkKOEuV4CId15SMoMPxFTqL4kFKcJocLRgV84QJ121IiOZMlWExzXIS\nmkTFEeWN+s1X7hlYrNpxTqcOLKxDbzk+kgNVRrm8zWvCdRIMsfJbRKHCAAMo\njKt7CtNv8xoImcZt47FxuSza84AdLg+lhNo3hQ8E8cD0oMGcfwq5B1Nh84Aw\nVyiB9uB0xjlIbrNXXXODzfxPIU4vhewxMQJQX2WQm/97gSdh3kapAdl6ABFK\nal0eNAvkahie1vPrdiwoQOkRlx+53RMaA/g6W67/Z9Bf6JO2GU3TYK4jA7W5\n0Ek/knIpm80hYm0kHxAiwlWUL/bkYTuU55nk/jN4TkzruMtURNQeN1UzKPB5\nFc28MsO8+y+EMLi5F30/vgnTQ4ccfU+tiJGvMRDKiDFZTswa6PMcJeUTLNur\nb4LxxNH2oodD/O2eXVLfDQSRKnqCiFZfIxtE2mtx4cwbErizJoCduPY57zw4\nkFHmtGBt04D0JQp2Ke2Uu4R07z0NOtQm+YfoEljAP4RO6sylMV5eg5GcJHPo\naNyV6CXV+puykCpfsTX40JIBqJRHtFxKIQRcc6Py+Ff5wUPwMuB/mvl9yGUG\nt4rr1OlhY542sYDMfUTWfS0RJlMy6I7Br9gCNkNWJY8JHIgzZQyJ2LrnuTCO\nODiW\r\n=HfVz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/cusper.js","types":"dist/src/cusper.d.ts","gitHead":"5b1c43d527869cd370c0af95c6f9982315b18981","private":false,"scripts":{"doc":"rimraf ./docs && typedoc","lint":"prettier -c ./src/","test":"tape dist/test/*.js","build":"rimraf dist && tsc -p tsconfig.json","pretest":"yarn build","lint:fix":"prettier --write ./src","doc:update":"./sh/update-docs","preversion":"yarn check:publish-ready","postpublish":"git push origin && git push origin --tags","prepublishOnly":"yarn check:publish-ready","check:publish-ready":"yarn build"},"_npmUser":{"name":"thlorenz","email":"thlorenz10@gmail.com"},"repository":{"url":"git+ssh://git@github.com/metaplex-foundation/cusper.git","type":"git"},"_npmVersion":"6.14.4","description":"Resolves Custom Program Errors from Solana program logs or error codes.","directories":{"dist":"./dist/"},"_nodeVersion":"14.17.6","dependencies":{},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^5.4.0","axios":"^0.24.0","rimraf":"^3.0.2","esbuild":"^0.14.8","typedoc":"^0.22.10","prettier":"^2.5.1","typescript":"^4.5.2","@types/node":"^16.11.12","@types/tape":"^4.13.2","esbuild-runner":"^2.2.1","@types/prettier":"^2.4.2"},"_npmOperationalInternal":{"tmp":"tmp/cusper_0.0.1_1640728366531_0.7587355703891379","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@metaplex-foundation/cusper","version":"0.0.2","keywords":["solana","blockchain","errors","custom program error","utilities"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de"},"license":"Apache-2.0","_id":"@metaplex-foundation/cusper@0.0.2","maintainers":[{"name":"aaron","email":"aaron.heckmann+github@gmail.com"},{"name":"thlorenz","email":"thlorenz10@gmail.com"},{"name":"austbotm","email":"security@austbot.com"}],"homepage":"https://github.com/metaplex-foundation/cusper#readme","bugs":{"url":"https://github.com/metaplex-foundation/cusper/issues"},"dist":{"shasum":"dc2032a452d6c269e25f016aa4dd63600e2af975","tarball":"https://registry.npmjs.org/@metaplex-foundation/cusper/-/cusper-0.0.2.tgz","fileCount":21,"integrity":"sha512-S9RulC2fFCFOQraz61bij+5YCHhSO9llJegK8c8Y6731fSi6snUSQJdCUqYS8AIgR0TKbQvdvgSyIIdbDFZbBA==","signatures":[{"sig":"MEYCIQDAPbaiQU6z//BXVaS8rX3dCP/WdO69NkDbAfcYbwXYMQIhAMpMwU0vtnT+D5q2ekD20hjG0rarx0WeKwgwJx/6Hli8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhy4rFCRA9TVsSAnZWagAAh+AQAIafSUEbvx/ds6Z7qrO2\nLsqjGoNALwKFZ9ULlHrArqwBTNlw8SZDOixXyGmOsnVCfA2ldiWOvLE7cnDh\n1sckbufCYhNSdFMf9s62e4i1D0PvDS8v9SX1Ou4wJSiyssfPvRAgNxiagzrb\nAUoTkU2crimzy8DTOP1uiEHS5EcdeD5iqksVnoo61+h6e+4kObHwnfUOapxB\ntpwcuZL0Xp+S4k7l6vRFX9RYt3mLDSnHeLcJe5EAXqUzrh0Ds/43SQJr68V6\nNc7SwWJyu9td+lAuX0cKnYl2H4URaVAXKDkfYCyyCYThYJygSr3qGf+Cd7mi\ngbRywk86FvzoOyRrdH889w2k39vB85zs28fnDyNqAb7L8G+zZu/q6+uvsUdj\nhs6QTpLbWGisBQRHizlpba+I4MPvJvYMubLwilvSAnWWZ6fgq49Um3atiNtk\nOm8rWtozRcLC8+woiALb6FDIbaYlrPFyxIfgXj4s6HbJ8ZjjkBI0DVA2vXNu\nPzRrrbGaMLsaUOm+N3g5h3MRjBYYc1ks8AEonGkccPGXvQWJ5FWZGZzmFknb\nzB5weu56ftvxy4+3w1lYyARMm/WIMKHPQ5A7meBAx8mWbtmJ8BHlzjhU16bR\nrZxA+crn64LwSlqCxBn5w4yipk+sXCy8U2YZK7eXR+/jzg5fWTlmPVjGMABa\nqnRo\r\n=HOCK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/cusper.js","types":"dist/src/cusper.d.ts","gitHead":"f5f28523b2c642d9f9f44627a7acbfe342440773","private":false,"scripts":{"doc":"rimraf ./docs && typedoc","lint":"prettier -c ./src/","test":"tape dist/test/*.js","build":"rimraf dist && tsc -p tsconfig.json","pretest":"yarn build","lint:fix":"prettier --write ./src","doc:update":"./sh/update-docs","preversion":"yarn check:publish-ready","postpublish":"git push origin && git push origin --tags","prepublishOnly":"yarn check:publish-ready","check:publish-ready":"yarn build"},"_npmUser":{"name":"thlorenz","email":"thlorenz10@gmail.com"},"repository":{"url":"git+ssh://git@github.com/metaplex-foundation/cusper.git","type":"git"},"_npmVersion":"6.14.4","description":"Resolves Custom Program Errors from Solana program logs or error codes.","directories":{"dist":"./dist/"},"_nodeVersion":"14.17.6","dependencies":{},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^5.4.0","axios":"^0.24.0","rimraf":"^3.0.2","esbuild":"^0.14.8","typedoc":"^0.22.10","prettier":"^2.5.1","typescript":"^4.5.2","@types/node":"^16.11.12","@types/tape":"^4.13.2","esbuild-runner":"^2.2.1","@types/prettier":"^2.4.2"},"_npmOperationalInternal":{"tmp":"tmp/cusper_0.0.2_1640729284874_0.24999633328531878","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-12-28T21:52:46.491Z","modified":"2025-10-28T23:58:13.381Z","0.0.1":"2021-12-28T21:52:46.719Z","0.0.2":"2021-12-28T22:08:05.073Z"},"bugs":{"url":"https://github.com/metaplex-foundation/cusper/issues"},"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de"},"license":"Apache-2.0","homepage":"https://github.com/metaplex-foundation/cusper#readme","keywords":["solana","blockchain","errors","custom program error","utilities"],"repository":{"url":"git+ssh://git@github.com/metaplex-foundation/cusper.git","type":"git"},"description":"Resolves Custom Program Errors from Solana program logs or error codes.","maintainers":[{"email":"michael@metaplex.foundation","name":"danenbm1"},{"email":"nhan.phan@gmail.com","name":"nhanphan"},{"email":"tulsi.brandon@gmail.com","name":"brandontulsi"},{"email":"svc01@metaplex.com","name":"svc01-metaplex"},{"email":"michael@metaplex.com","name":"danenbm"},{"email":"keith@metaplex.foundation","name":"blockiosaurus"}],"readme":"# Cusper [![Build Lint and Test Cusper](https://github.com/metaplex-foundation/cusper/actions/workflows/build-lint-test.yml/badge.svg)](https://github.com/metaplex-foundation/cusper/actions/workflows/build-lint-test.yml)\n\nResolves Custom Program Errors from Solana program logs or error codes.\n\n## Example\n\n```ts\nimport { initCusper } from '@metaplex-foundation/cusper'\n\nconst cusper = initCusper(/* optionally provide custom error resolver here */)\n\nconst logs = [\n  'Program CwrqeMj2U8tFr1Rhkgwc84tpAsqbt9pTt2a4taoTADPr invoke [1]',\n  'Program log: Custom program error: 0x07D0',\n]\nfunction showError() {\n  try {\n    const error = { ...new Error('Test error'), logs }\n    cusper.throwError(error)\n  } catch (err) {\n    console.error(err)\n  }\n}\n\nshowError()\n```\n\n```\nAnchorError#ConstraintMut: A mut constraint was violated\n    at showError (/cusper/test/test/ex.ts:13:12)\n    [ .. ]\n```\n\n## API\n\nPlease find the [API docs here](https://metaplex-foundation.github.io/cusper/docs/)\n\n## LICENSE\n\nApache-2.0\n","readmeFilename":"README.md"}