{"_id":"@cardanotech/sdk","name":"@cardanotech/sdk","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@cardanotech/sdk","version":"1.0.0","private":false,"description":"Typed, transport-neutral clients for cardano.tech gateway products.","main":"dist_ts/index.js","typings":"dist_ts/index.d.ts","type":"module","exports":{".":{"types":"./dist_ts/index.d.ts","import":"./dist_ts/index.js"}},"author":"Task Venture Capital GmbH","license":"MIT","dependencies":{"@api.global/typedrequest":"^3.4.0","@cardanotech/interfaces":"^1.0.0"},"devDependencies":{"@cardanotech/walletproof":"^1.0.0","@git.zone/tsbuild":"^4.4.2","@git.zone/tsrun":"^2.0.5","@git.zone/tstest":"^3.6.7","@types/node":"^26.1.1"},"repository":{"type":"git","url":"git+ssh://git@code.foss.global:29419/cardano.tech/sdk.git"},"bugs":{"url":"https://code.foss.global/cardano.tech/sdk/issues"},"homepage":"https://code.foss.global/cardano.tech/sdk#readme","keywords":["cardano","sdk","typedrequest","wallet-proof","typescript"],"browserslist":["last 1 chrome versions"],"scripts":{"test":"tstest test/ --verbose","build":"tsbuild"},"_nodeVersion":"25.2.1","_id":"@cardanotech/sdk@1.0.0","dist":{"integrity":"sha512-8HwxQdTA6aI9iWpIU6PULNPeUqwfuw3b4ghQq+FJn4Q/4xvgarVvBQH54o1WnOuxnrhbsD1sEwrnNl+wSPsZ7Q==","shasum":"9bf7b53f0d20080b0fb3a7bf6c5362b51452900a","tarball":"https://registry.npmjs.org/@cardanotech/sdk/-/sdk-1.0.0.tgz","fileCount":16,"unpackedSize":19007,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHIPtE+RLQI6T8YQCJPyApiJ6FKP0NUhGb+9ACI9JKafAiEAoL1YVANgR5ywVgnUbjPRWLpjhUuJBcNV7sdiBDxrKYI="}]},"_npmUser":{"name":"lossless","email":"hello@lossless.com"},"directories":{},"maintainers":[{"name":"lossless","email":"hello@lossless.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.0.0_1785183200615_0.7359249565843011"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-27T20:13:20.485Z","1.0.0":"2026-07-27T20:13:20.751Z","modified":"2026-07-27T20:13:20.949Z"},"maintainers":[{"name":"lossless","email":"hello@lossless.com"}],"description":"Typed, transport-neutral clients for cardano.tech gateway products.","homepage":"https://code.foss.global/cardano.tech/sdk#readme","keywords":["cardano","sdk","typedrequest","wallet-proof","typescript"],"repository":{"type":"git","url":"git+ssh://git@code.foss.global:29419/cardano.tech/sdk.git"},"author":"Task Venture Capital GmbH","bugs":{"url":"https://code.foss.global/cardano.tech/sdk/issues"},"license":"MIT","readme":"# @cardanotech/sdk\n\n`@cardanotech/sdk` provides typed, transport-neutral clients for cardano.tech\ngateway products. Version 1 exposes the hosted Wallet Proof create, complete, and\nreceipt methods without inventing a workload credential format or taking custody\nof wallet keys.\n\n## Issue Reporting and Security\n\nFor reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.\n\n## Install\n\n```sh\npnpm add @cardanotech/sdk @api.global/typedrequest\n```\n\nBrowser wallet signing is provided separately by the non-custodial Wallet Proof\nlibrary:\n\n```sh\npnpm add @cardanotech/walletproof\n```\n\n## Gateway client\n\nThe client accepts a `TypedTarget`, the supported custom transport boundary from\n`@api.global/typedrequest`. The target receives and returns complete TypedRequest\nenvelopes and owns endpoint selection, workload authentication, retries, and any\nconnection lifecycle.\n\nThe target owns transport-level retries. `TypedRequest` 3.4 also honors\nprotocol-level retry envelopes; those retries currently have no caller-provided\nattempt limit or cancellation control.\n\n```ts\nimport {\n  TypedTarget,\n  type IPostMethod,\n} from '@api.global/typedrequest';\nimport {\n  CardanoGatewayClient,\n  cardanoInterfaces,\n} from '@cardanotech/sdk';\n\ndeclare const sendAuthenticatedEnvelope: IPostMethod;\n\nconst target = new TypedTarget({\n  postMethod: sendAuthenticatedEnvelope,\n});\nconst gateway = new CardanoGatewayClient({ target });\n\nconst response = await gateway.createWalletProofChallenge({\n  subjectRef: 'subject-internal-0001',\n  origin: 'https://app.example',\n  network: 'testnet',\n  purpose: 'link-wallet',\n  idempotencyKey: 'wallet-link-create-0001',\n});\n\nconst challenge: cardanoInterfaces.data.IWalletProofChallenge = response.challenge;\n```\n\nThe SDK deliberately has no unauthenticated URL constructor, token field,\nauthorization header, or Cardano-specific TypedSocket tag. The gateway's workload\nauthentication contract must be explicit before a built-in network transport is\nadded. Tenant, workload, permissions, issuer, and audience remain trusted\nserver-side context and are never accepted from the Wallet Proof request DTOs.\n\n## Wallet signing flow\n\nThe consumer backend creates a challenge through `CardanoGatewayClient` and sends\nthat challenge to its browser. The browser uses the released non-custodial proof\nclient; wallet discovery and user consent remain application responsibilities.\n\n```ts\nimport { WalletProofBrowserClient } from '@cardanotech/walletproof/browser';\nimport type { IWalletProofChallenge } from '@cardanotech/walletproof';\n\ndeclare const challenge: IWalletProofChallenge;\ndeclare const walletApi: Parameters<WalletProofBrowserClient['createSubmission']>[0];\n\nconst proofClient = new WalletProofBrowserClient();\nconst submission = await proofClient.createSubmission(walletApi, challenge);\n```\n\nThe browser returns the submission to its trusted consumer backend. That backend\nuses `completeWalletProofChallenge()` with a new idempotency key. Neither package\ngenerates, receives, stores, or logs a wallet seed phrase or private key.\n\n## Public methods\n\n| Client method | Hosted contract |\n| --- | --- |\n| `createWalletProofChallenge({ subjectRef, origin, network, purpose, idempotencyKey })` | `{ challenge }` |\n| `completeWalletProofChallenge({ submission, idempotencyKey })` | `{ receipt }` |\n| `getWalletProofReceipt({ receiptId })` | `{ receipt }` |\n\nThe client uses the method constants exported by `@cardanotech/interfaces` and\ndoes not expose an arbitrary-method escape hatch. It also suppresses\n`TypedRequest` global payload hooks for these methods so proof submissions are\nnot exposed to process-wide observability callbacks.\n\n`ICardanoGatewayClientOptions` exposes only the required `target`.\n`cardanoInterfaces` re-exports the published `data` and `request` namespaces for\nconsumer annotations. Gateway failures reject with\n`TypedResponseError`; its `errorData` matches\n`ICardanoGatewayErrorData` (`code`, `requestId`, `retryable`, and optional\n`retryAfterMs`).\n\n## License and Legal Information\n\nThis repository contains open-source code licensed under the MIT License. A copy of the license can be found in the repository license file.\n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.\n\nUse of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.\n\n### Company Information\n\nTask Venture Capital GmbH<br>\nRegistered at District Court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n","readmeFilename":"","_rev":"1-15c4568a23aa7f0f9fb03856b3ba1dcd"}