{"_id":"@apecover/common","_rev":"2-5e4da3be1d697e81760e67a60bb587fc","name":"@apecover/common","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@apecover/common","version":"0.1.0","keywords":["solana","anchor","defi","insurance","degen"],"license":"MIT","_id":"@apecover/common@0.1.0","maintainers":[{"name":"rider-0825","email":"khishchenkomykola@gmail.com"}],"homepage":"https://github.com/Vetted-Pro/degen-trade-insurance#readme","bugs":{"url":"https://github.com/Vetted-Pro/degen-trade-insurance/issues"},"dist":{"shasum":"9954b9f7b05eb791dcc0962697cbf5dd345ad91a","tarball":"https://registry.npmjs.org/@apecover/common/-/common-0.1.0.tgz","fileCount":35,"integrity":"sha512-RpomW5zy5uYJm07ZpQN0aRDZXS1ji/dNVTQR0KwElqXg43YFGjJjYK1dduj/cTdoa3tUm5RcfCXyM1JBSP31gA==","signatures":[{"sig":"MEQCIEO69MeBAag4yOjx+Q2vpfQPOULldt4fv1Fh6s0ERy1SAiARrl1M8l0fE4x4iKLDHtxNuADeeyXQ2H6/H98AqQDwsA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":335227},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"5f090d4e1787c6d0b48ebc7b206cd174e64cd4fe","scripts":{"build":"tsc --build","clean":"rm -rf dist *.tsbuildinfo","prepack":"npm run clean && npm run build"},"_npmUser":{"name":"rider-0825","email":"khishchenkomykola@gmail.com"},"repository":{"url":"git+https://github.com/Vetted-Pro/degen-trade-insurance.git","type":"git","directory":"packages/common"},"_npmVersion":"11.6.2","description":"Shared domain types, constants and premium/payout math mirroring the Degen Trade Insurance on-chain program","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","dependencies":{"zod":"^3.24.1","bs58":"^6.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/common_0.1.0_1786922916194_0.2398603296355546","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@apecover/common","version":"0.3.0","description":"Shared domain types, the chain registry and premium/payout math mirroring the ApeCover on-chain programs on Solana and Robinhood Chain","keywords":["solana","anchor","evm","robinhood","defi","insurance","degen"],"license":"MIT","homepage":"https://github.com/Vetted-Pro/degen-trade-insurance#readme","repository":{"type":"git","url":"git+https://github.com/Vetted-Pro/degen-trade-insurance.git","directory":"packages/common"},"bugs":{"url":"https://github.com/Vetted-Pro/degen-trade-insurance/issues"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"sideEffects":false,"engines":{"node":">=20"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc --build","clean":"rm -rf dist *.tsbuildinfo","prepack":"npm run clean && npm run build"},"dependencies":{"bs58":"^6.0.0","zod":"^3.24.1"},"gitHead":"35b422cba29d2dce62b69624c212b3fff979e168","_id":"@apecover/common@0.3.0","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-JxtwAyTMkSXdHucOqY6ol6H7xqxFM+TVRfI5vCoRAdDsN4FTomT2kbTI18xWCGpL6b+h2Bouce4YWorZwdUXSw==","shasum":"4ef25a6bea3727818b4d6757e90dc9a79b6e2f75","tarball":"https://registry.npmjs.org/@apecover/common/-/common-0.3.0.tgz","fileCount":55,"unpackedSize":463022,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCRJTuNMwqOQvvPFMW/9Mt//fWGoe1A7LJMumnBbnxIegIgbe/l/568n41fFdCokH2ikn+rLW5u/xPWmawG/rfkiGs="}]},"_npmUser":{"name":"rider-0825","email":"khishchenkomykola@gmail.com"},"directories":{},"maintainers":[{"name":"rider-0825","email":"khishchenkomykola@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/common_0.3.0_1787748630927_0.42388501140869717"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T23:28:35.985Z","modified":"2026-08-26T12:50:31.237Z","0.1.0":"2026-08-16T23:28:36.338Z","0.3.0":"2026-08-26T12:50:31.044Z"},"bugs":{"url":"https://github.com/Vetted-Pro/degen-trade-insurance/issues"},"license":"MIT","homepage":"https://github.com/Vetted-Pro/degen-trade-insurance#readme","keywords":["solana","anchor","evm","robinhood","defi","insurance","degen"],"repository":{"type":"git","url":"git+https://github.com/Vetted-Pro/degen-trade-insurance.git","directory":"packages/common"},"description":"Shared domain types, the chain registry and premium/payout math mirroring the ApeCover on-chain programs on Solana and Robinhood Chain","maintainers":[{"name":"rider-0825","email":"khishchenkomykola@gmail.com"}],"readme":"# @apecover/common\n\nShared domain types, constants and arithmetic for\n[ApeCover](https://github.com/Vetted-Pro/degen-trade-insurance).\n\nThis package exists to be the **one** TypeScript mirror of the on-chain program. Coverage tiers,\nPDA seeds, basis-point denominators and the premium/payout maths all appear twice in this\nproject — once in `programs/degen_insurance/src/` and once here — and the two are tested against\nthe same worked examples so a number shown to a user is the number the program will compute.\n\nMost people want [`@apecover/core`](https://www.npmjs.com/package/@apecover/core)\ninstead, which depends on this and adds PDA derivation and account decoding. Install this directly\nonly if you need the constants or the maths without a Solana connection.\n\n```bash\nnpm install @apecover/common\n```\n\n## What is in it\n\n**Coverage tiers.** `CoverageTier` and `TIER_DEFAULTS` — the three tiers from the product spec,\nwith their premium rates, payout ratios and coverage windows.\n\n**Constants that must not drift.** PDA seeds, `BPS_DENOM`, `LAMPORTS_PER_SOL`, the tier table —\neach mirroring a `const` in `constants.rs`.\n\n**Money arithmetic.** `bigint` throughout, matching the program's checked `u128` intermediates,\nincluding its rounding. Premium splits sum to the premium exactly; no lamport is created or\ndestroyed.\n\n**Zod schemas** for the off-chain records the watcher, keeper and API exchange — rug proofs,\nprice quotes, claim documents.\n\n## Why the amounts are strings and bigints, never numbers\n\nA lamport total above 2^53 does not survive `Number()`. Every monetary value crossing a boundary\nhere is a decimal string; every value being _computed_ is a `bigint`. A float anywhere in this\nchain would eventually disagree with the program about whether a pool is solvent.\n\n## Licence\n\nMIT\n","readmeFilename":"README.md"}