{"_id":"@lfdt-lineth/sdk-core","name":"@lfdt-lineth/sdk-core","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@lfdt-lineth/sdk-core","version":"1.0.0","description":"Core utilities for the Linea bridge SDK — Merkle tree, message types, chain and contract helpers","author":{"name":"Consensys Software Inc."},"license":"(MIT OR Apache-2.0)","repository":{"type":"git","url":"git+https://github.com/LFDT-Lineth/lineth-monorepo.git","directory":"ts-libs/sdk/sdk-core"},"homepage":"https://github.com/LFDT-Lineth/lineth-monorepo/tree/main/ts-libs/sdk/sdk-core#readme","bugs":{"url":"https://github.com/LFDT-Lineth/lineth-monorepo/issues"},"keywords":["linea","bridge","sdk","merkle-tree","messaging","ethereum","layer2","zk-rollup"],"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js"}},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"30.0.0","jest":"30.4.2","jest-environment-node":"30.4.1","ts-jest":"29.4.9","tsup":"8.5.1","viem":"2.47.5","@lfdt-lineth/eslint-config":"1.0.0"},"dependencies":{"abitype":"1.2.4"},"scripts":{"build":"tsup --tsconfig tsconfig.build.json","test":"jest --bail --detectOpenHandles","lint":"eslint .","lint:fix":"eslint --fix .","clean":"rimraf dist node_modules coverage"},"_id":"@lfdt-lineth/sdk-core@1.0.0","_integrity":"sha512-hWrBZFNlEsKmySDCoAO4346vf5FrGsv84PBA7aZkrGpe8UvOyc71CkJXPJxq7sgqFQQswcAZXQ2oxoSZ6GNVvg==","_resolved":"/tmp/f7d19ce6c14288e0e5caf481e4220dd1/lfdt-lineth-sdk-core-1.0.0.tgz","_from":"file:lfdt-lineth-sdk-core-1.0.0.tgz","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-hWrBZFNlEsKmySDCoAO4346vf5FrGsv84PBA7aZkrGpe8UvOyc71CkJXPJxq7sgqFQQswcAZXQ2oxoSZ6GNVvg==","shasum":"955ae6d41ac3ab4be9f887c1afd7c9cfd69c8f44","tarball":"https://registry.npmjs.org/@lfdt-lineth/sdk-core/-/sdk-core-1.0.0.tgz","fileCount":10,"unpackedSize":84617,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDILvPFEYbg9s4zUoVfBteOYN4hH6g692Qf3hoaptdqcgIhAPNX08E+QgX9V8b8cxrOXI2lMhcZEr5tVfayhUEEG8wJ"}]},"_npmUser":{"name":"victorien-gauch","email":"victorien.gauch@consensys.net"},"directories":{},"maintainers":[{"name":"julien-marchand","email":"julien.marchand4@gmail.com"},{"name":"eloi_lineth","email":"eloi.manuel@consensys.net"},{"name":"victorien-gauch","email":"victorien.gauch@consensys.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk-core_1.0.0_1781097023384_0.8063527999113376"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T13:10:23.194Z","1.0.0":"2026-06-10T13:10:23.546Z","modified":"2026-06-10T13:10:23.750Z"},"maintainers":[{"name":"julien-marchand","email":"julien.marchand4@gmail.com"},{"name":"eloi_lineth","email":"eloi.manuel@consensys.net"},{"name":"victorien-gauch","email":"victorien.gauch@consensys.net"}],"description":"Core utilities for the Linea bridge SDK — Merkle tree, message types, chain and contract helpers","homepage":"https://github.com/LFDT-Lineth/lineth-monorepo/tree/main/ts-libs/sdk/sdk-core#readme","keywords":["linea","bridge","sdk","merkle-tree","messaging","ethereum","layer2","zk-rollup"],"repository":{"type":"git","url":"git+https://github.com/LFDT-Lineth/lineth-monorepo.git","directory":"ts-libs/sdk/sdk-core"},"author":{"name":"Consensys Software Inc."},"bugs":{"url":"https://github.com/LFDT-Lineth/lineth-monorepo/issues"},"license":"(MIT OR Apache-2.0)","readme":"# @lfdt-lineth/sdk-core\n\nCore utilities for the [Linea](https://linea.build) bridge SDK — Merkle tree, message types, chain and contract helpers.\n\nThis package is framework-agnostic and serves as the foundation for higher-level SDKs like [`@lfdt-lineth/sdk-viem`](../sdk-viem/).\n\n## Installation\n\n```bash\nnpm install @lfdt-lineth/sdk-core\n# or\npnpm add @lfdt-lineth/sdk-core\n```\n\n## Usage\n\n```ts\nimport {\n  SparseMerkleTree,\n  parseBlockExtraData,\n  formatMessageStatus,\n  getContractsAddressesByChainId,\n  OnChainMessageStatus,\n} from \"@lfdt-lineth/sdk-core\";\n```\n\n### Sparse Merkle Tree\n\n```ts\nimport { SparseMerkleTree } from \"@lfdt-lineth/sdk-core\";\n\nconst tree = new SparseMerkleTree();\n// Build and verify Merkle proofs for L2 → L1 message claiming\n```\n\n### Chain and Contract Utilities\n\n```ts\nimport {\n  getContractsAddressesByChainId,\n  isMainnet,\n  isLineaMainnet,\n  isSepolia,\n  isLineaSepolia,\n} from \"@lfdt-lineth/sdk-core\";\n\nconst addresses = getContractsAddressesByChainId(1); // Ethereum Mainnet\n```\n\n### Message Utilities\n\n```ts\nimport { formatMessageStatus, OnChainMessageStatus } from \"@lfdt-lineth/sdk-core\";\n\nconst status = formatMessageStatus(OnChainMessageStatus.CLAIMED);\n```\n\n## API\n\n| Export | Description |\n|--------|-------------|\n| `SparseMerkleTree` | Sparse Merkle tree for proof generation and verification |\n| `parseBlockExtraData` | Parse Linea-specific block extra data |\n| `formatMessageStatus` | Format on-chain message status to human-readable form |\n| `getContractsAddressesByChainId` | Resolve contract addresses for a given chain ID |\n| `isMainnet` / `isLineaMainnet` / `isSepolia` / `isLineaSepolia` | Chain identification helpers |\n| `OnChainMessageStatus` | Enum of on-chain message statuses |\n\n### Types\n\n| Type | Description |\n|------|-------------|\n| `L1PublicClient` / `L2PublicClient` | Public client type constraints |\n| `L1WalletClient` / `L2WalletClient` | Wallet client type constraints |\n| `Message` / `ExtendedMessage` / `MessageProof` | Message-related types |\n\n## License\n\n[Apache-2.0](../../../LICENSE-APACHE)\n","readmeFilename":"README.md","_rev":"1-ff18e83d85c701f67e208e7fa5afcce3"}