{"_id":"@boltz.one/contracts","_rev":"4-f145a877db7c41ba4d27464b0faf1373","name":"@boltz.one/contracts","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@boltz.one/contracts","version":"0.1.0","_id":"@boltz.one/contracts@0.1.0","maintainers":[{"name":"dknguyen","email":"dknguyen2304@gmail.com"}],"homepage":"https://github.com/boltz-one/core#readme","bugs":{"url":"https://github.com/boltz-one/core/issues"},"dist":{"shasum":"159852eb958a6b7af831be97572a7f66e38b1553","tarball":"https://registry.npmjs.org/@boltz.one/contracts/-/contracts-0.1.0.tgz","fileCount":39,"integrity":"sha512-wMEbf6ZJHM6Bs9P5472bGd66p52EosrxEouSSmnUBF3RRk+oktbrDPbCNrQjnYyftbEMPAcQaamL6fAyoLZs+A==","signatures":[{"sig":"MEUCIQDEiFs2V3Ngh07TR/RmQtz/Wh/6AX8l1ewP72Sv4qljUwIgS9PpElNXTTUM8ddyZG5Ca765v90Tq97cS7xsGJr4+8M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109478},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./iam":{"types":"./dist/iam/index.d.ts","import":"./dist/iam/index.js"},"./common":{"types":"./dist/common/index.d.ts","import":"./dist/common/index.js"},"./errors":{"types":"./dist/errors/index.d.ts","import":"./dist/errors/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./wallet":{"types":"./dist/wallet/index.d.ts","import":"./dist/wallet/index.js"},"./actions":{"types":"./dist/actions/index.d.ts","import":"./dist/actions/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./resources":{"types":"./dist/resources/index.d.ts","import":"./dist/resources/index.js"}},"gitHead":"c4e313018e549263d7c772ff6238f47df7d7de97","scripts":{"dev":"tsc -p tsconfig.json --watch","lint":"eslint . --max-warnings 0","build":"tsc -p tsconfig.json","clean":"rm -rf dist .turbo","check-types":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"dknguyen","email":"dknguyen2304@gmail.com"},"repository":{"url":"git+https://github.com/boltz-one/core.git","type":"git","directory":"packages/contracts"},"_npmVersion":"10.9.8","description":"Shared Zod schemas — single source of truth, gom theo domain (common, iam, registry, wallet, events, resources, actions, errors)","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^3.23.8"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","typescript":"5.9.2","@types/node":"^22.15.3","@boltz.one/eslint-config":"*","@boltz.one/typescript-config":"*"},"_npmOperationalInternal":{"tmp":"tmp/contracts_0.1.0_1782014412745_0.056418065958723895","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@boltz.one/contracts","version":"0.1.1","_id":"@boltz.one/contracts@0.1.1","maintainers":[{"name":"dknguyen","email":"dknguyen2304@gmail.com"}],"homepage":"https://github.com/boltz-one/core#readme","bugs":{"url":"https://github.com/boltz-one/core/issues"},"dist":{"shasum":"4b004ae8a8b6b06848908809d14815ca5688f663","tarball":"https://registry.npmjs.org/@boltz.one/contracts/-/contracts-0.1.1.tgz","fileCount":40,"integrity":"sha512-OGR+f1acWcRT0bpLYD8lWX0ZGC+d2pmo9hxGNarhlPThtFvP0qFxlCUD4yoGAra/iDaMvgMAhL+WwFdx5Rkj0A==","signatures":[{"sig":"MEQCIG/mhyPHV5SovC5sZ1KOFk5Uc+m8gV7KGR+Dnvtc2Z/7AiB9DA6O4rVpDRUa1Qov5cDyPw0MOq70vZS6YP9DMHOp+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":111088},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./iam":{"types":"./dist/iam/index.d.ts","import":"./dist/iam/index.js"},"./common":{"types":"./dist/common/index.d.ts","import":"./dist/common/index.js"},"./errors":{"types":"./dist/errors/index.d.ts","import":"./dist/errors/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./wallet":{"types":"./dist/wallet/index.d.ts","import":"./dist/wallet/index.js"},"./actions":{"types":"./dist/actions/index.d.ts","import":"./dist/actions/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./resources":{"types":"./dist/resources/index.d.ts","import":"./dist/resources/index.js"}},"gitHead":"9ef15b365727e2d0e059e6eee794f755e0f6af54","scripts":{"dev":"tsc -p tsconfig.json --watch","lint":"eslint . --max-warnings 0","build":"tsc -p tsconfig.json","clean":"rm -rf dist .turbo","check-types":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"dknguyen","email":"dknguyen2304@gmail.com"},"repository":{"url":"git+https://github.com/boltz-one/core.git","type":"git","directory":"packages/contracts"},"_npmVersion":"10.9.8","description":"Shared Zod schemas — single source of truth, gom theo domain (common, iam, registry, wallet, events, resources, actions, errors)","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^3.23.8"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","typescript":"5.9.2","@types/node":"^22.15.3","@boltz.one/eslint-config":"*","@boltz.one/typescript-config":"*"},"_npmOperationalInternal":{"tmp":"tmp/contracts_0.1.1_1782014748770_0.14983478466325328","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@boltz.one/contracts","version":"0.1.2","_id":"@boltz.one/contracts@0.1.2","maintainers":[{"name":"dknguyen","email":"dknguyen2304@gmail.com"}],"homepage":"https://github.com/boltz-one/core#readme","bugs":{"url":"https://github.com/boltz-one/core/issues"},"dist":{"shasum":"874a21b801edd8c126b2dbc16cf16dd46d6ffebd","tarball":"https://registry.npmjs.org/@boltz.one/contracts/-/contracts-0.1.2.tgz","fileCount":40,"integrity":"sha512-ucc0d5LWfv4IjD5YkHBwePKxEhjHWvLjLZeZBacTHVbMn7C4QpyosI89+kgAa9e4HIvoSQn6qQ9UfoQI56jGjg==","signatures":[{"sig":"MEYCIQDqaDzJIPwVY1JNAryogxiXRzoaYKJZCrnpjZS8KCOS7wIhAOg8WK905j6xsF/4YyuHDhvzfy8uV1ge0YIwQvQYawIj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114817},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./iam":{"types":"./dist/iam/index.d.ts","import":"./dist/iam/index.js"},"./common":{"types":"./dist/common/index.d.ts","import":"./dist/common/index.js"},"./errors":{"types":"./dist/errors/index.d.ts","import":"./dist/errors/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./wallet":{"types":"./dist/wallet/index.d.ts","import":"./dist/wallet/index.js"},"./actions":{"types":"./dist/actions/index.d.ts","import":"./dist/actions/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./resources":{"types":"./dist/resources/index.d.ts","import":"./dist/resources/index.js"}},"gitHead":"1fd9f17c6662bcf0d1009b0df252f56b261bf4b0","scripts":{"dev":"tsc -p tsconfig.json --watch","lint":"eslint . --max-warnings 0","build":"tsc -p tsconfig.json","clean":"rm -rf dist .turbo","check-types":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"dknguyen","email":"dknguyen2304@gmail.com"},"repository":{"url":"git+https://github.com/boltz-one/core.git","type":"git","directory":"packages/contracts"},"_npmVersion":"10.9.8","description":"Shared Zod schemas — single source of truth, gom theo domain (common, iam, registry, wallet, events, resources, actions, errors)","directories":{},"_nodeVersion":"22.23.0","dependencies":{"zod":"^3.23.8"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","typescript":"5.9.2","@types/node":"^22.15.3","@boltz.one/eslint-config":"*","@boltz.one/typescript-config":"*"},"_npmOperationalInternal":{"tmp":"tmp/contracts_0.1.2_1782551429045_0.9665995820104132","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@boltz.one/contracts","version":"0.1.3","description":"Shared Zod schemas — single source of truth, gom theo domain (common, iam, registry, wallet, events, resources, actions, errors)","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./common":{"types":"./dist/common/index.d.ts","import":"./dist/common/index.js"},"./iam":{"types":"./dist/iam/index.d.ts","import":"./dist/iam/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./wallet":{"types":"./dist/wallet/index.d.ts","import":"./dist/wallet/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./resources":{"types":"./dist/resources/index.d.ts","import":"./dist/resources/index.js"},"./actions":{"types":"./dist/actions/index.d.ts","import":"./dist/actions/index.js"},"./errors":{"types":"./dist/errors/index.d.ts","import":"./dist/errors/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","dev":"tsc -p tsconfig.json --watch","lint":"eslint . --max-warnings 0","check-types":"tsc -p tsconfig.json --noEmit","clean":"rm -rf dist .turbo"},"dependencies":{"zod":"^3.23.8"},"devDependencies":{"@boltz.one/eslint-config":"*","@boltz.one/typescript-config":"*","@types/node":"^22.15.3","eslint":"^9.39.1","typescript":"5.9.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"git+https://github.com/boltz-one/core.git","directory":"packages/contracts"},"_id":"@boltz.one/contracts@0.1.3","gitHead":"f6ae5f203338af826c7db968f8377ce477d48421","bugs":{"url":"https://github.com/boltz-one/core/issues"},"homepage":"https://github.com/boltz-one/core#readme","_nodeVersion":"22.23.0","_npmVersion":"10.9.8","dist":{"integrity":"sha512-VecmI0zWGpk8okkM7hMC4M8wBuY1TAh2S8yRmHIV4CF3Kk9tC3Vi4N6V3uZzGs2/P6SSVaov/y2A91z8Gr7qtw==","shasum":"dcdf3217076734605941656f45fbdb7c240f250b","tarball":"https://registry.npmjs.org/@boltz.one/contracts/-/contracts-0.1.3.tgz","fileCount":40,"unpackedSize":115040,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDADI1qqgDLkXEuIHZUR3O5L5VeyazCD/npqDYQN+rAaQIgVCU0y4njSHMdlTpk7jswX0H1EKv/V1bQxcs+NcfIaKc="}]},"_npmUser":{"name":"dknguyen","email":"dknguyen2304@gmail.com"},"directories":{},"maintainers":[{"name":"dknguyen","email":"dknguyen2304@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/contracts_0.1.3_1782572575591_0.7044515999156769"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T04:00:12.609Z","modified":"2026-06-27T15:02:55.890Z","0.1.0":"2026-06-21T04:00:12.890Z","0.1.1":"2026-06-21T04:05:48.913Z","0.1.2":"2026-06-27T09:10:29.166Z","0.1.3":"2026-06-27T15:02:55.761Z"},"bugs":{"url":"https://github.com/boltz-one/core/issues"},"homepage":"https://github.com/boltz-one/core#readme","repository":{"type":"git","url":"git+https://github.com/boltz-one/core.git","directory":"packages/contracts"},"description":"Shared Zod schemas — single source of truth, gom theo domain (common, iam, registry, wallet, events, resources, actions, errors)","maintainers":[{"name":"dknguyen","email":"dknguyen2304@gmail.com"}],"readme":"# @boltz.one/contracts\n\nSingle source of truth cho dữ liệu của nền tảng Boltz One: bộ **Zod schema** dùng\nchung, tổ chức theo domain. Isomorphic (chạy cả server lẫn browser), chỉ phụ thuộc `zod`.\n\n## Cài đặt\n\n```sh\nbun add @boltz.one/contracts zod\n```\n\n## Entry points\n\n| Import | Nội dung |\n| --- | --- |\n| `@boltz.one/contracts` | Tất cả (re-export mọi domain bên dưới) |\n| `@boltz.one/contracts/common` | Primitives dùng chung (id, pagination, timestamp…) |\n| `@boltz.one/contracts/iam` | Authorize (PARC), token exchange, simulation, ReBAC, control-plane CRUD, **policy document schema** |\n| `@boltz.one/contracts/registry` | App registry |\n| `@boltz.one/contracts/wallet` | Order, refund, ví |\n| `@boltz.one/contracts/events` | Domain/integration events |\n| `@boltz.one/contracts/resources` | Resource (SRN) |\n| `@boltz.one/contracts/actions` | Action catalog |\n| `@boltz.one/contracts/errors` | Domain error base |\n\n## Sử dụng\n\n```ts\nimport { authorizeRequestSchema, type AuthorizeRequest } from '@boltz.one/contracts/iam';\n\nconst req: AuthorizeRequest = authorizeRequestSchema.parse(input); // validate + infer type\n```\n\nPolicy document schema (nền cho engine ở [`@boltz.one/sdk-core/iam-policy`](https://www.npmjs.com/package/@boltz.one/sdk-core)) cũng nằm tại đây:\n\n```ts\nimport { policyDocumentSchema, type PolicyDocument } from '@boltz.one/contracts/iam';\n```\n\n> Mọi schema vừa validate runtime (`.parse`/`.safeParse`) vừa suy ra type qua\n> `z.infer`, nên dùng làm contract chung giữa backend và frontend.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}