{"_id":"@algoosh/order-protocol","_rev":"4-43493550618146d8364c59b1e0c42fb4","name":"@algoosh/order-protocol","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@algoosh/order-protocol","version":"0.1.0","license":"AGPL-3.0-or-later","_id":"@algoosh/order-protocol@0.1.0","maintainers":[{"name":"foxzard","email":"q@qrxrq.com"}],"homepage":"https://github.com/landofcash/algoosh/tree/main/algoosh-order-protocol#readme","bugs":{"url":"https://github.com/landofcash/algoosh/issues"},"dist":{"shasum":"3d41bf97f37b94402b8dacece563d7ea6201d2ab","tarball":"https://registry.npmjs.org/@algoosh/order-protocol/-/order-protocol-0.1.0.tgz","fileCount":17,"integrity":"sha512-0Ggb6WbsvGubCQ4Fa6Nl+AEzsGDsj7B317xLfN1h97FZpC1ksSeZffwVQqs6SbcGO67J1PeVNKA9O9i61VYTeg==","signatures":[{"sig":"MEYCIQDZurR4zbEiC54WgH5sH+2fSrWs+GOXpsunDeX+KGc0YQIhAInX/eHUZ5bcKych5MbqvxqOFzG+kKxRWrBdW7naenkU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":851585},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./http":{"types":"./dist/http.d.ts","import":"./dist/http.js"}},"gitHead":"323371da10dab7e509cedaf5cf716093c070b8d1","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","prepack":"npm run build","postbuild":"esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs","prepublishOnly":"npm test"},"_npmUser":{"name":"foxzard","email":"q@qrxrq.com"},"repository":{"url":"git+https://github.com/landofcash/algoosh.git","type":"git","directory":"algoosh-order-protocol"},"_npmVersion":"11.17.0","description":"Shared two-stage Algoosh order and x402 v2 protocol","directories":{},"_nodeVersion":"24.11.0","dependencies":{"zod":"^4.3.6","jose":"^6.1.3","@x402/core":"^2.3.1","canonicalize":"^2.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","esbuild":"^0.27.0","typescript":"^5.9.3","@types/node":"^22.19.15"},"_npmOperationalInternal":{"tmp":"tmp/order-protocol_0.1.0_1788221489245_0.2743008967634961","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@algoosh/order-protocol","version":"0.1.1","license":"AGPL-3.0-or-later","_id":"@algoosh/order-protocol@0.1.1","maintainers":[{"name":"foxzard","email":"q@qrxrq.com"}],"homepage":"https://github.com/landofcash/algoosh/tree/main/algoosh-order-protocol#readme","bugs":{"url":"https://github.com/landofcash/algoosh/issues"},"dist":{"shasum":"b3416ee46e47cbc1db039bbf18c5fb90c03aaffd","tarball":"https://registry.npmjs.org/@algoosh/order-protocol/-/order-protocol-0.1.1.tgz","fileCount":17,"integrity":"sha512-fbeiQz+PMxWt06kckIW88KQfYjL8DTm2Bs75iQcKNNyNqgbWujqSRW4RDazORBHpgVZcH7UerTQt48JIPY+Maw==","signatures":[{"sig":"MEUCIQDKbJj04dnWoeOU/umfjw6sbTMBUuZb52GlE3Ko20+JfwIgCFty6qO5dcIz931hyeU/Xcun8w1X+cewcuoUY+TMV+0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":851727},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./http":{"types":"./dist/http.d.ts","import":"./dist/http.js"}},"gitHead":"9bbc25fd5c47b89030236cd79b1945dc51b8dac1","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","prepack":"npm run build","postbuild":"esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs","prepublishOnly":"npm test"},"_npmUser":{"name":"foxzard","email":"q@qrxrq.com"},"repository":{"url":"git+https://github.com/landofcash/algoosh.git","type":"git","directory":"algoosh-order-protocol"},"_npmVersion":"11.17.0","description":"Shared two-stage Algoosh order and x402 v2 protocol","directories":{},"_nodeVersion":"24.11.0","dependencies":{"zod":"^4.3.6","jose":"^6.1.3","@x402/core":"^2.3.1","canonicalize":"^2.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","esbuild":"^0.27.0","typescript":"^5.9.3","@types/node":"^22.19.15"},"_npmOperationalInternal":{"tmp":"tmp/order-protocol_0.1.1_1788350942518_0.2685891598111776","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@algoosh/order-protocol","version":"0.1.2","license":"AGPL-3.0-or-later","_id":"@algoosh/order-protocol@0.1.2","maintainers":[{"name":"foxzard","email":"q@qrxrq.com"}],"homepage":"https://github.com/landofcash/algoosh/tree/main/algoosh-order-protocol#readme","bugs":{"url":"https://github.com/landofcash/algoosh/issues"},"dist":{"shasum":"63d4f7fe25b43cd1683eac362d0eb96c58e5e7bb","tarball":"https://registry.npmjs.org/@algoosh/order-protocol/-/order-protocol-0.1.2.tgz","fileCount":19,"integrity":"sha512-Sdjp6+JyzC0XXp7Vd1ETxNZXxZHuxWoHtLaAUbQ8ZtSzxVl8/ovf1CqzNIBCgYHB9k2DmNZ/qkyIEsewCTLDYg==","signatures":[{"sig":"MEUCIGS3kwYDgAF0yxoKTdvhGwjxH7j7oR3sFbkeS01So6/EAiEAu1jxEWIMh6omTf3Brm+gEkuiM75EZHRVabUJyNUqsy8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":856648},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./http":{"types":"./dist/http.d.ts","import":"./dist/http.js"}},"gitHead":"dd3665f464af3c75eb9aeb1549c15179cdc3630d","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","prepack":"npm run build","postbuild":"esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs","prepublishOnly":"npm test"},"_npmUser":{"name":"foxzard","email":"q@qrxrq.com"},"repository":{"url":"git+https://github.com/landofcash/algoosh.git","type":"git","directory":"algoosh-order-protocol"},"_npmVersion":"11.17.0","description":"Shared two-stage Algoosh order and x402 v2 protocol","directories":{},"_nodeVersion":"24.11.0","dependencies":{"zod":"^4.3.6","jose":"^6.1.3","@x402/core":"^2.3.1","canonicalize":"^2.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","esbuild":"^0.27.0","typescript":"^5.9.3","@types/node":"^22.19.15"},"_npmOperationalInternal":{"tmp":"tmp/order-protocol_0.1.2_1788384591232_0.11995044212234118","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@algoosh/order-protocol","version":"0.1.3","description":"Shared two-stage Algoosh order and x402 v2 protocol","license":"AGPL-3.0-or-later","repository":{"type":"git","url":"git+https://github.com/landofcash/algoosh.git","directory":"algoosh-order-protocol"},"bugs":{"url":"https://github.com/landofcash/algoosh/issues"},"homepage":"https://github.com/landofcash/algoosh/tree/main/algoosh-order-protocol#readme","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./http":{"types":"./dist/http.d.ts","import":"./dist/http.js"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc -p tsconfig.json","postbuild":"esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs","test":"vitest run","prepublishOnly":"npm test","prepack":"npm run build"},"engines":{"node":">=22.0.0"},"dependencies":{"@x402/core":"^2.3.1","canonicalize":"^2.1.0","jose":"^6.1.3","zod":"^4.3.6"},"devDependencies":{"@types/node":"^22.19.15","esbuild":"^0.27.0","typescript":"^5.9.3","vitest":"^4.1.0"},"gitHead":"a84a994c31637eefe23ae02433e8ee629a82408c","_id":"@algoosh/order-protocol@0.1.3","_nodeVersion":"24.11.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-nu9fR4L/ojK81MtMtz41QGyW4IHE7m+1ZZ361Dfx8JoCmHus2Q/IGjPuLGWAlQ7afN3Ha+nBpA6z7fBG1wvomA==","shasum":"7df420636784ea2a8fc016af4f00efdd3b16712f","tarball":"https://registry.npmjs.org/@algoosh/order-protocol/-/order-protocol-0.1.3.tgz","fileCount":19,"unpackedSize":856865,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCcO3wk2flOX5kJ+0bfOmrq0iHyJ+HwNWIj5n09aXTRJwIgVl4XniQ3XEsxYiknPZizhVR81t+LAVhQ2g78hQJezr4="}]},"_npmUser":{"name":"foxzard","email":"q@qrxrq.com"},"directories":{},"maintainers":[{"name":"foxzard","email":"q@qrxrq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/order-protocol_0.1.3_1788431511209_0.7903598697757501"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-01T00:11:28.955Z","modified":"2026-09-03T10:31:51.522Z","0.1.0":"2026-09-01T00:11:29.385Z","0.1.1":"2026-09-02T12:09:02.717Z","0.1.2":"2026-09-02T21:29:51.382Z","0.1.3":"2026-09-03T10:31:51.344Z"},"bugs":{"url":"https://github.com/landofcash/algoosh/issues"},"license":"AGPL-3.0-or-later","homepage":"https://github.com/landofcash/algoosh/tree/main/algoosh-order-protocol#readme","repository":{"type":"git","url":"git+https://github.com/landofcash/algoosh.git","directory":"algoosh-order-protocol"},"description":"Shared two-stage Algoosh order and x402 v2 protocol","maintainers":[{"name":"foxzard","email":"q@qrxrq.com"}],"readme":"# @algoosh/order-protocol\r\n\r\nShared schemas, canonical hashing, detached quote signatures, and official x402\r\nv2 HTTP header codecs for Algoosh agentic ordering.\r\n\r\nThe protocol is intentionally two-stage:\r\n\r\n1. An agent creates a non-payable preliminary intent using stable product IDs.\r\n2. `app.algoosh.com` collects fulfillment and delivery details, encrypts the\r\n   order locally, and finalizes the intent using ciphertext and public\r\n   commitments only.\r\n3. Finalization produces the signed quote and `PAYMENT-REQUIRED`.\r\n4. Confirmation validates a strict public settlement-evidence schema and\r\n   returns only the minimal durable intent status and `PAYMENT-RESPONSE`.\r\n\r\n`AlgooshOnchainOrderSnapshotV1Schema` is the privacy-safe order view shared by\r\nSync, x402, and the buyer app. `onchainOrderMatchesQuote` and\r\n`settlementEvidenceMatchesQuote` keep buyer-facing success and agent-facing\r\nsettlement bound to the same payment, identities, and commitment hashes.\r\n\r\nEvery durable status includes its authoritative `catalogueSeed`, allowing a\r\npage-local Promo tool to reject an intent belonging to another shop while\r\nretaining the same opaque `intentId` recovery flow.\r\n\r\nThe package contains no wallet access and no plaintext delivery schema. The\r\ncustom `algoosh-order` scheme is used because confirmation must validate both\r\nthe Algorand transfer and the adjacent Algoosh `createOrderPaid` application\r\ncall. Generic Algorand `exact` transfer evidence is not sufficient.\r\n\r\nThe protocol also pins the smart-contract payload limits used by\r\n`createOrderPaid`: 129-byte encrypted symmetric keys and a maximum 4,000-byte\r\nUTF-8 encrypted payload string.\r\n\r\nThe build emits an ESM `dist/index.js` entry for the frontend and x402 service\r\nand a bundled CommonJS `dist/index.cjs` entry for the existing Algoosh Sync\r\nruntime. Node selects the correct root entry through the package's conditional\r\n`import` and `require` exports. The `./http` codec entry remains ESM-only.\r\n\r\n## Installation\r\n\r\n```shell\r\nnpm install @algoosh/order-protocol\r\n```\r\n\r\n## Development\r\n\r\n```shell\r\nnpm test\r\nnpm run build\r\n```\r\n","readmeFilename":"README.md"}