{"_id":"@amadeus-protocol/wallet-sdk","_rev":"3-a116638f032086b69cf9582e6d5c3990","name":"@amadeus-protocol/wallet-sdk","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@amadeus-protocol/wallet-sdk","version":"0.1.0","keywords":["amadeus","protocol","wallet","dapp","connect","bls12-381","sdk"],"author":{"name":"Amadeus Protocol"},"license":"MIT","_id":"@amadeus-protocol/wallet-sdk@0.1.0","maintainers":[{"name":"type_error86","email":"type.error.86@gmail.com"}],"homepage":"https://github.com/amadeusprotocol/amadeus-wallet-sdk#readme","bugs":{"url":"https://github.com/amadeusprotocol/amadeus-wallet-sdk/issues"},"dist":{"shasum":"ac159821aaa22faf6e9ea0235ca3b26bca0fee39","tarball":"https://registry.npmjs.org/@amadeus-protocol/wallet-sdk/-/wallet-sdk-0.1.0.tgz","fileCount":76,"integrity":"sha512-C8NkC2CC38zy4DcZ9H5vm/WIt1uXi/q1/SypWthB13hDIq0blTneTlaNlhxmBkF6ogV1h8fZDB06AztnQqbozA==","signatures":[{"sig":"MEUCIQDjHoQHdu/cNyR1zsHQbrCK0jwhP06QT5TYn1DPnoF8RQIgcuOLJrMNMn152ABEO0FaSw/gEiZRgKTwUGdx6j0G3dY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":211419},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./react":{"types":"./dist/react/index.d.ts","import":"./dist/react/index.js"}},"gitHead":"cb548201838b953035d904bc955518bb1ea08fa8","scripts":{"dev":"tsdown --watch","lint":"eslint src","test":"vitest run","build":"tsdown","prepack":"npm run build","lint:fix":"eslint src --fix","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build && npm run test && npm run lint","prettier:check":"prettier --check .","prettier:format":"prettier --write ."},"_npmUser":{"name":"type_error86","email":"type.error.86@gmail.com"},"repository":{"url":"git+https://github.com/amadeusprotocol/amadeus-wallet-sdk.git","type":"git"},"_npmVersion":"11.12.1","description":"Shared dApp <-> wallet connection layer for Amadeus Protocol: BLS API-key tokens, transaction signing, message/connect signing, and the typed provider contract. One audited implementation for the wallet, the extension, and every dApp.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"zod":"^3.24.0","@noble/curves":"^1.9.1","@noble/hashes":"^1.8.0","@noble/ciphers":"^2.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","eslint":"^9.21.0","tsdown":"^0.22.0","vitest":"^2.1.0","prettier":"^3.7.2","@eslint/js":"^9.21.0","typescript":"^5.7.2","@types/node":"^22.14.0","@types/react":"^19.0.0","typescript-eslint":"^8.24.1","@vitest/coverage-v8":"^2.1.0","@amadeus-protocol/sdk":"^1.1.2"},"peerDependencies":{"react":">=18.0.0","@amadeus-protocol/sdk":"^1.1.2"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/wallet-sdk_0.1.0_1786378456944_0.6191512822473333","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@amadeus-protocol/wallet-sdk","version":"0.1.1","keywords":["amadeus","protocol","wallet","dapp","connect","bls12-381","sdk"],"author":{"name":"Amadeus Protocol"},"license":"MIT","_id":"@amadeus-protocol/wallet-sdk@0.1.1","maintainers":[{"name":"type_error86","email":"type.error.86@gmail.com"}],"homepage":"https://github.com/amadeusprotocol/amadeus-wallet-sdk#readme","bugs":{"url":"https://github.com/amadeusprotocol/amadeus-wallet-sdk/issues"},"dist":{"shasum":"2c776b53faeefabbceb633f2928f5d323183a926","tarball":"https://registry.npmjs.org/@amadeus-protocol/wallet-sdk/-/wallet-sdk-0.1.1.tgz","fileCount":76,"integrity":"sha512-J9RpvLfW2mVKlMUYGNlPAO9tXXAuFfEp2CTT96LB6fndcmj/fOiJUqHu2hzECh7qbnvD5jKUi+wgEk1iT9Zptw==","signatures":[{"sig":"MEUCIQDTfUQo27Sydva0eDJcV8MLmXtDv1J1nh2IDHfZfxj1dQIgEmJvpWTQ303jgqKmer8mwKTiILBE8MOWNP5q5GINHAo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":212669},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./react":{"types":"./dist/react/index.d.ts","import":"./dist/react/index.js"}},"gitHead":"acb5bbd35405756836cddb180e505addef36929a","scripts":{"dev":"tsdown --watch","lint":"eslint src","test":"vitest run","build":"tsdown","prepack":"npm run build","lint:fix":"eslint src --fix","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build && npm run test && npm run lint","prettier:check":"prettier --check .","prettier:format":"prettier --write ."},"_npmUser":{"name":"type_error86","email":"type.error.86@gmail.com"},"repository":{"url":"git+https://github.com/amadeusprotocol/amadeus-wallet-sdk.git","type":"git"},"_npmVersion":"11.12.1","description":"Shared dApp <-> wallet connection layer for Amadeus Protocol: BLS API-key tokens, transaction signing, message/connect signing, and the typed provider contract. One audited implementation for the wallet, the extension, and every dApp.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"zod":"^3.24.0","@noble/curves":"^1.9.1","@noble/hashes":"^1.8.0","@noble/ciphers":"^2.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","eslint":"^9.21.0","tsdown":"^0.22.0","vitest":"^2.1.0","prettier":"^3.7.2","@eslint/js":"^9.21.0","typescript":"^5.7.2","@types/node":"^22.14.0","@types/react":"^19.0.0","typescript-eslint":"^8.24.1","@vitest/coverage-v8":"^2.1.0","@amadeus-protocol/sdk":"^1.1.2"},"peerDependencies":{"react":">=18.0.0","@amadeus-protocol/sdk":"^1.1.2"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/wallet-sdk_0.1.1_1786430536171_0.8963704173835667","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@amadeus-protocol/wallet-sdk","version":"0.1.4","description":"Shared dApp <-> wallet connection layer for Amadeus Protocol: BLS API-key tokens, transaction signing, message/connect signing, and the typed provider contract. One audited implementation for the wallet, the extension, and every dApp.","type":"module","sideEffects":false,"engines":{"node":">=20.0.0"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./react":{"import":"./dist/react/index.js","types":"./dist/react/index.d.ts"}},"scripts":{"build":"tsdown","dev":"tsdown --watch","lint":"eslint src","lint:fix":"eslint src --fix","prettier:check":"prettier --check .","prettier:format":"prettier --write .","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build && npm run test && npm run lint","prepack":"npm run build"},"keywords":["amadeus","protocol","wallet","dapp","connect","bls12-381","sdk"],"author":{"name":"Amadeus Protocol"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/amadeusprotocol/amadeus-wallet-sdk.git"},"homepage":"https://github.com/amadeusprotocol/amadeus-wallet-sdk#readme","bugs":{"url":"https://github.com/amadeusprotocol/amadeus-wallet-sdk/issues"},"publishConfig":{"access":"public"},"dependencies":{"@noble/ciphers":"^2.1.1","@noble/curves":"^1.9.1","@noble/hashes":"^1.8.0","zod":"^3.24.0"},"peerDependencies":{"@amadeus-protocol/sdk":"^1.1.2","react":">=18.0.0"},"peerDependenciesMeta":{"react":{"optional":true}},"devDependencies":{"@amadeus-protocol/sdk":"^1.1.2","@eslint/js":"^9.21.0","@types/node":"^22.14.0","@types/react":"^19.0.0","@vitest/coverage-v8":"^2.1.0","eslint":"^9.21.0","react":"^19.0.0","prettier":"^3.7.2","tsdown":"^0.22.0","typescript":"^5.7.2","typescript-eslint":"^8.24.1","vitest":"^2.1.0"},"gitHead":"6ecad18d2077a9af0b906fcc2ed0ac2e5175a563","_id":"@amadeus-protocol/wallet-sdk@0.1.4","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-r+fHnpH7vEfwSvnEb+qKcVlypVeiXPMh5HE8JmOJ3H4iTJKlpSSt4fRAe1nX6yq4N6TI3yzGNCiMqffqqmSKfA==","shasum":"2fd3ddc29cb0b8975a7e31d613bc38aba01a60d4","tarball":"https://registry.npmjs.org/@amadeus-protocol/wallet-sdk/-/wallet-sdk-0.1.4.tgz","fileCount":80,"unpackedSize":227327,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFe/L0+qJ7CiONVXaQlBC4dhraWn16qVj3Brnfitx4sNAiAeSibje3pMxIOO3t1snn03sQJn4thz9PP9v4Uhff8iHg=="}]},"_npmUser":{"name":"type_error86","email":"type.error.86@gmail.com"},"directories":{},"maintainers":[{"name":"type_error86","email":"type.error.86@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wallet-sdk_0.1.4_1787163378814_0.7454874344104003"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-10T16:14:16.793Z","modified":"2026-08-19T18:16:19.224Z","0.1.0":"2026-08-10T16:14:17.135Z","0.1.1":"2026-08-11T06:42:16.343Z","0.1.4":"2026-08-19T18:16:18.976Z"},"bugs":{"url":"https://github.com/amadeusprotocol/amadeus-wallet-sdk/issues"},"author":{"name":"Amadeus Protocol"},"license":"MIT","homepage":"https://github.com/amadeusprotocol/amadeus-wallet-sdk#readme","keywords":["amadeus","protocol","wallet","dapp","connect","bls12-381","sdk"],"repository":{"type":"git","url":"git+https://github.com/amadeusprotocol/amadeus-wallet-sdk.git"},"description":"Shared dApp <-> wallet connection layer for Amadeus Protocol: BLS API-key tokens, transaction signing, message/connect signing, and the typed provider contract. One audited implementation for the wallet, the extension, and every dApp.","maintainers":[{"name":"type_error86","email":"type.error.86@gmail.com"}],"readme":"# @amadeus-protocol/wallet-sdk\n\nOne audited home for the Amadeus dApp ↔ wallet connection layer. The wallet\n(mobile + extension) and every dApp import the **same** crypto and protocol code,\nso the two sides can never drift — which is the entire point.\n\nBuilt on top of [`@amadeus-protocol/sdk`](https://www.npmjs.com/package/@amadeus-protocol/sdk)\n(key derivation, encoding, `TransactionBuilder`). This package adds only the\nconnection layer.\n\n> **Status: v0.1 — crypto + protocol core.** Transports (deep link / QR / bridge)\n> and React hooks are not in this release. See \"Roadmap\" below.\n\n## What's in this release\n\n| Area                   | Exports                                                                                                                                |\n| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| **API-key tokens**     | `generateApiKey`, `verifyApiKey`, `decodeApiKey`                                                                                       |\n| **Transactions**       | `signTransaction`, `submitTransaction`                                                                                                 |\n| **Connection auth**    | `signConnect`, `verifyConnect`, `buildConnectTranscript`                                                                               |\n| **Session encryption** | `generateSessionKeypair`, `deriveSharedKey`, `seal`, `open`                                                                            |\n| **Provider contract**  | `AmadeusProvider`, `getAmadeusProvider`, `isProviderAvailable`, event/response types                                                   |\n| **Wire validation**    | zod schemas: `signTransactionRequestSchema`, `generateApiKeyRequestSchema`, `connectTranscriptSchema`, `addressSchema`, `originSchema` |\n| **Binary args**        | `encodeBinaryValues`, `decodeBinaryValues`, `describeBinaryValues`                                                                     |\n| **Constants**          | all DSTs, byte lengths, event names, `PROTOCOL_VERSION`                                                                                |\n\n## Why unify the API-key token first\n\nIt was hand-rolled in **three** places (the extension, `hub`, and `prime-hub`),\nall of which must stay byte-identical to the `kbs.ama.one` backend. `generateApiKey`\nhere reproduces that exact token — `base58( json{aud,exp} ‖ pubkey48 ‖ sig96 )`\nsigned over `sha256(json ‖ pubkey)` under the `_APIKEY_` DST — and a test asserts\nbyte-for-byte equality with the original recipe. Consumers can now delete their copies.\n\n```ts\nimport { generateApiKey, verifyApiKey } from '@amadeus-protocol/wallet-sdk'\n\nconst { apiKey } = generateApiKey({ seed, aud: 'amadeus', expIn: 7 * 24 * 3600 })\n// ... later, on any verifier:\nconst result = verifyApiKey(apiKey, { aud: 'amadeus' })\nif (result.valid) console.log(result.address)\n```\n\n## Security notes\n\n- **Distinct DSTs** (`_TX_`, `_APIKEY_`, `_CONNECT_`) make a signature from one\n  context cryptographically unusable in another.\n- **Connect auth signs the full transcript** — origin + both session keys +\n  challenge + request id — not just the nonce, which closes the key-substitution\n  MITM.\n- **No arbitrary message-signing oracle**: connection proof only ever signs a\n  structured, length-prefixed transcript.\n- **Session box** uses x25519 + XChaCha20-Poly1305 via `@noble` (Hermes-safe; no\n  `tweetnacl` \"no PRNG\" issue) and fails closed on any tamper.\n\n## Develop\n\n```sh\nbun install\nbun run test        # vitest\nbun run typecheck\nbun run build       # tsdown -> dist/\n```\n\n## Roadmap\n\n1. **Transports** — deep link / Universal Link ingress, QR pairing, and a\n   self-hosted encrypted bridge, all speaking one envelope.\n2. **`/react`** — `WalletProvider` + `useWallet()` so dApps stop copy-pasting\n   provider glue (and the `amadeus#initialized` vs `amadeus-wallet#initialized`\n   bug gets fixed once).\n3. **Adoption** — migrate the extension, `hub`, and `prime-hub` off their\n   hand-rolled crypto onto this package.\n","readmeFilename":"README.md"}