{"_id":"@cardano-slips/core","_rev":"6-4d009992cd575346badb4691f3444229","name":"@cardano-slips/core","dist-tags":{"placeholder":"0.0.0","latest":"0.3.0"},"versions":{"0.0.0":{"name":"@cardano-slips/core","version":"0.0.0","keywords":["cardano","cardano-slips","cip-30","blinks","transaction"],"license":"MIT","_id":"@cardano-slips/core@0.0.0","maintainers":[{"name":"emmanuel-musau","email":"emmanuelmutisya254@gmail.com"}],"homepage":"https://github.com/emmanuel-musau/cardano-slips/tree/main/packages/core#readme","bugs":{"url":"https://github.com/emmanuel-musau/cardano-slips/issues"},"dist":{"shasum":"eea611ff2a75127e050f5699da121cfebb067852","tarball":"https://registry.npmjs.org/@cardano-slips/core/-/core-0.0.0.tgz","fileCount":8,"integrity":"sha512-Qjs4eRvndMrmaymYNfc0AUSzjiEe3meTh/u9vDW0ai/hv1Gl4fn7w0ASnHGYuIbBChCD2E1IeghWjSEWATW27g==","signatures":[{"sig":"MEUCIQC4XJ9aHwn/JtY/YTxQcOKb6Dkeq4sMzQS5rcx8VoMTlwIgJ2yzKcGrI+qfRuZEpThiYkxveYhTgK0rKH7n4FhqZ1I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4898},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"05f3c79a891efc5df60aaf8ecd624e53174c0980","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -b tsconfig.build.json","clean":"rm -rf dist build coverage .tsbuildinfo .turbo","typecheck":"tsc -b tsconfig.src.json && tsc -p tsconfig.test.json"},"_npmUser":{"name":"emmanuel-musau","email":"emmanuelmutisya254@gmail.com"},"repository":{"url":"git+https://github.com/emmanuel-musau/cardano-slips.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.4","description":"The shared contract for Cardano Slips: payload schemas, URL resolution rules, and the error taxonomy","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.0.0_1787332395720_0.14393627024027822","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@cardano-slips/core","version":"0.0.1","keywords":["cardano","cardano-slips","cip-30","blinks","transaction"],"license":"MIT","_id":"@cardano-slips/core@0.0.1","maintainers":[{"name":"emmanuel-musau","email":"emmanuelmutisya254@gmail.com"}],"homepage":"https://github.com/emmanuel-musau/cardano-slips/tree/main/packages/core#readme","bugs":"https://github.com/emmanuel-musau/cardano-slips/issues","dist":{"shasum":"bb16407e068d279c53000441cc0ccd08f0cf2cec","tarball":"https://registry.npmjs.org/@cardano-slips/core/-/core-0.0.1.tgz","fileCount":8,"integrity":"sha512-5XN19x0QWGJ/BJqLH/rec440q+L/NfLizQDEahY97fKzuOKsTsal3XliJeRWBTAligb6s5ZCK4OynSDaOkP6jQ==","signatures":[{"sig":"MEUCIAONmUx18md/4Pu/yVdXEzxzsKszYQ51vqTNNmScPKwkAiEA4aj6bf9FHMXhQXYlkpaylRk2ztrG/w7TUXFpJlKGS0U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cardano-slips%2fcore@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4897},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -b tsconfig.build.json","clean":"rm -rf dist build coverage .tsbuildinfo .turbo","typecheck":"tsc -b tsconfig.src.json && tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6fb8a069-e80d-4cef-8632-d6682dd6bf91"}},"repository":{"url":"git+https://github.com/emmanuel-musau/cardano-slips.git","type":"git","directory":"packages/core"},"description":"The shared contract for Cardano Slips: payload schemas, URL resolution rules, and the error taxonomy","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.0.1_1787333617366_0.03656859684183189","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@cardano-slips/core","version":"0.0.2","keywords":["cardano","cardano-slips","cip-30","blinks","transaction"],"license":"MIT","_id":"@cardano-slips/core@0.0.2","maintainers":[{"name":"emmanuel-musau","email":"emmanuelmutisya254@gmail.com"}],"homepage":"https://github.com/emmanuel-musau/cardano-slips/tree/main/packages/core#readme","bugs":"https://github.com/emmanuel-musau/cardano-slips/issues","dist":{"shasum":"60ba5fd271f2110f73f7e75c9a32e26dd53d0134","tarball":"https://registry.npmjs.org/@cardano-slips/core/-/core-0.0.2.tgz","fileCount":8,"integrity":"sha512-S2lB3LKQNjnY7WfwAe8TrXLTGklcnA5LfzZlWz3GjwbEfcmgWhXI38xIN+s03c0sPTcE1AldAMfCTAxq39in7w==","signatures":[{"sig":"MEYCIQDYY3HqFrMGSTx6H2ANPi+QVhnU44OMmRK4y3imObsJYwIhAKr+vTuhzKFgIbQPlfttVTloJtIztQgplPZZY9KEeFeZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cardano-slips%2fcore@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4882},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -b tsconfig.build.json","clean":"rm -rf dist build coverage .tsbuildinfo .turbo","typecheck":"tsc -b tsconfig.src.json && tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6fb8a069-e80d-4cef-8632-d6682dd6bf91"}},"repository":{"url":"git+https://github.com/emmanuel-musau/cardano-slips.git","type":"git","directory":"packages/core"},"description":"The shared contract for Cardano Slips: payload schemas, URL resolution rules, and the error codes","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.0.2_1787506367965_0.7791416529334056","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@cardano-slips/core","version":"0.1.0","keywords":["cardano","cardano-slips","cip-30","blinks","transaction"],"license":"MIT","_id":"@cardano-slips/core@0.1.0","maintainers":[{"name":"emmanuel-musau","email":"emmanuelmutisya254@gmail.com"}],"homepage":"https://github.com/emmanuel-musau/cardano-slips/tree/main/packages/core#readme","bugs":"https://github.com/emmanuel-musau/cardano-slips/issues","dist":{"shasum":"fa8dc85f489c096b00250be002486e2d7ab299f1","tarball":"https://registry.npmjs.org/@cardano-slips/core/-/core-0.1.0.tgz","fileCount":28,"integrity":"sha512-pLeQ3OyoEP71P9feq5jEiAuu7568rCpqb5OVzf8kHkK/4CEBJ1NMO3YXbV6SvSsmXrMbLNEGWI9UIWU9UygHog==","signatures":[{"sig":"MEUCICe46Q/DvUDK3UJkTtkWNA9tpH1DcSf6qhRg1W/9dfmSAiEA7XvK6lu/9S9dJgjd/8qCg3RUW9RW6hwjWDVTxciiNJA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cardano-slips%2fcore@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":119850},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -b tsconfig.build.json","clean":"rm -rf dist build coverage .tsbuildinfo .turbo","typecheck":"tsc -b tsconfig.src.json && tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6fb8a069-e80d-4cef-8632-d6682dd6bf91"}},"repository":{"url":"git+https://github.com/emmanuel-musau/cardano-slips.git","type":"git","directory":"packages/core"},"description":"The shared contract for Cardano Slips: payload schemas, URL resolution rules, and the error codes","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"effect":"^3.22.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1787700592125_0.505714257082674","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@cardano-slips/core","version":"0.2.0","keywords":["cardano","cardano-slips","cip-30","blinks","transaction"],"license":"MIT","_id":"@cardano-slips/core@0.2.0","maintainers":[{"name":"emmanuel-musau","email":"emmanuelmutisya254@gmail.com"}],"homepage":"https://github.com/emmanuel-musau/cardano-slips/tree/main/packages/core#readme","bugs":"https://github.com/emmanuel-musau/cardano-slips/issues","dist":{"shasum":"5c8932d13a1519ce6daabe936db7e7617de7bd24","tarball":"https://registry.npmjs.org/@cardano-slips/core/-/core-0.2.0.tgz","fileCount":38,"integrity":"sha512-+YYLee80sVpWFVbTy3+ujWWfGJO2HtvHQCcrhNOHqJyAvFd3G30NapUImvIytL9frzIqmADKxbmUpinAiLOEng==","signatures":[{"sig":"MEQCIGucvmGvD8YSisEyP+tGmWZm7P+oMPPLB6dXCA4nqhkHAiBPSZ1vMOqLIrCj06nP2/VwIHbPFzrLgMssFbk7qLkn+w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cardano-slips%2fcore@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":149966},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -b tsconfig.build.json","clean":"rm -rf dist build coverage .tsbuildinfo .turbo","typecheck":"tsc -b tsconfig.src.json && tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6fb8a069-e80d-4cef-8632-d6682dd6bf91"}},"repository":{"url":"git+https://github.com/emmanuel-musau/cardano-slips.git","type":"git","directory":"packages/core"},"description":"The shared contract for Cardano Slips: payload schemas, URL resolution rules, and the error codes","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"effect":"^3.22.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.2.0_1787903840152_0.688334026681338","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"_id":"@cardano-slips/core@0.3.0","bugs":"https://github.com/emmanuel-musau/cardano-slips/issues","dist":{"shasum":"5c2f0f58895ad5e492a8a2a254a7e981a557d440","tarball":"https://registry.npmjs.org/@cardano-slips/core/-/core-0.3.0.tgz","fileCount":43,"integrity":"sha512-OIUJuCK8VVRAHJKvZWzTQxharNilQ6u0h3Dxicd21URw6dv/cCovO7fJEuMX777NphR/3JLNdfmdhh3WFjGQnQ==","signatures":[{"sig":"MEUCIF+Z0m5gQ0frXV7i848bKoNSp97ggElLTPrNa3Tu63zBAiEAq3ITr93eeAQYQqx6IZk5UC6mMfOnNxcKXUZKgbwMQKk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEp4NnVhh6OdCFt3AFkGaG/XYAXu1Y/cPcGFnhft673mAiEAtXBu/Td/mtulA8s6T+rND4/sxDwPwgA66JQsgZS0cJo="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cardano-slips%2fcore@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":152752},"name":"@cardano-slips/core","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"license":"MIT","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -b tsconfig.build.json","clean":"rm -rf dist build coverage .tsbuildinfo .turbo","typecheck":"tsc -b tsconfig.src.json && tsc -p tsconfig.test.json"},"version":"0.3.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"6fb8a069-e80d-4cef-8632-d6682dd6bf91"}},"homepage":"https://github.com/emmanuel-musau/cardano-slips/tree/main/packages/core#readme","keywords":["cardano","cardano-slips","cip-30","blinks","transaction"],"repository":{"url":"git+https://github.com/emmanuel-musau/cardano-slips.git","type":"git","directory":"packages/core"},"description":"The shared contract for Cardano Slips: payload schemas, URL resolution rules, and the error codes","directories":{},"maintainers":[{"name":"emmanuel-musau","email":"emmanuelmutisya254@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"effect":"^3.22.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.3.0_1790762249683_0.02396952063333302"}}},"time":{"created":"2026-08-21T17:13:15.560Z","modified":"2026-09-30T09:57:30.108Z","0.0.0":"2026-08-21T17:13:15.860Z","0.0.1":"2026-08-21T17:33:37.608Z","0.0.2":"2026-08-23T17:32:48.108Z","0.1.0":"2026-08-25T23:29:52.278Z","0.2.0":"2026-08-28T07:57:20.303Z","0.3.0":"2026-09-30T09:57:29.773Z"},"bugs":"https://github.com/emmanuel-musau/cardano-slips/issues","license":"MIT","homepage":"https://github.com/emmanuel-musau/cardano-slips/tree/main/packages/core#readme","keywords":["cardano","cardano-slips","cip-30","blinks","transaction"],"repository":{"url":"git+https://github.com/emmanuel-musau/cardano-slips.git","type":"git","directory":"packages/core"},"description":"The shared contract for Cardano Slips: payload schemas, URL resolution rules, and the error codes","maintainers":[{"name":"emmanuel-musau","email":"emmanuelmutisya254@gmail.com"}],"readme":"# @cardano-slips/core\n\nThe shared contract every other Cardano Slips package is written against: the payload schemas, the URL resolution rules, and the error codes.\n\n`server` validates against these schemas before a response leaves the endpoint; `flow` validates against the same ones before it renders anything. That is what makes the schema the executable form of the [spec](../../spec/CIP-XXXX/README.md) rather than a second description of it that can drift.\n\n```\npnpm add @cardano-slips/core\n```\n\n## What it owns\n\n| Concern | Covers |\n| --- | --- |\n| Types | `Slip`, `Parameter`, `PartialIntent`, `DerivedEffects` |\n| URLs | parse, resolve and validate Slip URLs |\n| Requests | the `POST` body an endpoint receives — one change address, one network, and nothing else |\n| `slips.json` | the domain mapping rules, so `linktap.example/pay/corner-store` resolves to `/api/slips/pay` |\n| Errors | the typed error codes — every failure a client has to render has a code here |\n\nIt depends on no other workspace package and holds no wallet, network or React code. A tool that only needs to read a Slip endpoint can take this package alone.\n\n## Entry point\n\nOne export, the package root. Deep imports into `dist/` are not a supported surface, so moving a file is never a breaking change:\n\n```ts\nimport { ... } from \"@cardano-slips/core\"\n```\n\n## Reading a discovery response\n\n`decodeSlip` returns an `Either` rather than throwing: it runs on whatever an endpoint chose to send, which makes failure an ordinary outcome. A member the protocol does not declare is rejected wherever it appears — a member silently ignored is a claim about the transaction that nothing checked, and it is why the protocol has major versions and no minor ones.\n\n```ts\nimport { Either } from \"effect\"\nimport { classifyErrorCode, decodeSlip, decodeSlipError, PROTOCOL_VERSION } from \"@cardano-slips/core\"\n\nconst body = await (await fetch(url)).json()\nconst slip = decodeSlip(body)\n\nif (Either.isRight(slip) && slip.right.version === PROTOCOL_VERSION) {\n  render(slip.right)\n}\n```\n\nA failed request carries its own shape. `decodeSlipError` constrains `code` to the shape of a code rather than to the list, so a publisher's `message` survives a code this version does not define; `classifyErrorCode` says what to do next — act, stop, or retry — and calls anything undefined terminal.\n\nSome rules no schema can check, because they need context no payload carries: an `href` on another origin, a `max` below its `min`, a `{placeholder}` naming no parameter. Those arrive with URL resolution and parameter interpolation. Decoding is the first line of defence, not the whole of it.\n\nMIT licensed. Issues and contribution guide: [cardano-slips](https://github.com/emmanuel-musau/cardano-slips).\n","readmeFilename":""}