{"_id":"@axlabs/neofs-sdk-ts-core","_rev":"2-517f2dcd871a5f9a679f805493aa7453","name":"@axlabs/neofs-sdk-ts-core","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@axlabs/neofs-sdk-ts-core","version":"0.0.1","keywords":["neofs","blockchain","storage","typescript","sdk","core"],"author":{"name":"NeoFS Team"},"license":"Apache-2.0","_id":"@axlabs/neofs-sdk-ts-core@0.0.1","maintainers":[{"name":"merl123","email":"mathias@axlabs.com"},{"name":"axlabs-bot","email":"tech@axlabs.com"},{"name":"mialbu","email":"bucher_michael@hotmail.com"},{"name":"gsperbmachado","email":"guil@axlabs.com"},{"name":"thedanielmark","email":"danielmark.uc@gmail.com"}],"homepage":"https://github.com/AxLabs/neofs-sdk-ts-core#readme","bugs":{"url":"https://github.com/AxLabs/neofs-sdk-ts-core/issues"},"dist":{"shasum":"c0b0aa17d7517023e0bbb1d45e8194e4455e2d62","tarball":"https://registry.npmjs.org/@axlabs/neofs-sdk-ts-core/-/neofs-sdk-ts-core-0.0.1.tgz","fileCount":41,"integrity":"sha512-+K/ZeD+v6wLFopny78aZmlB+BrJ3c9rlitjAjZC53vZh4Mozf0rCiJSonQB/qGzh37hE3p/1XKHg/iMZObUfNA==","signatures":[{"sig":"MEUCIE/+TXCupmaTYrwceGlefj4egYmvuTrsH0Y5Y8jYXIqQAiEAzjufOOZ54R3yBV1ZBTQ6ekRnB/5B3gPGbA0pdpgc3hA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74616},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./user":{"types":"./dist/user/index.d.ts","import":"./dist/user/index.js","require":"./dist/user/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.js","require":"./dist/types/index.js"},"./utils":{"types":"./dist/utils/index.d.ts","import":"./dist/utils/index.js","require":"./dist/utils/index.js"},"./crypto":{"types":"./dist/crypto/index.d.ts","import":"./dist/crypto/index.js","require":"./dist/crypto/index.js"}},"gitHead":"b53d2c1811bbbc61ce2fb2507464e3f9e40f7881","scripts":{"test":"echo 'No tests in core package'","build":"tsc && cp src/utils/closure-polyfill.js dist/utils/ 2>/dev/null || true","clean":"rm -rf dist","prebuild":"npm run clean","build:plugin":"cd protoc-gen-grpc-ts && make build","prepublishOnly":"npm run build","publish:public":"npm publish --access public","publish:dry-run":"npm publish --dry-run"},"_npmUser":{"name":"merl123","email":"mathias@axlabs.com"},"repository":{"url":"git+https://github.com/AxLabs/neofs-sdk-ts-core.git","type":"git","directory":"neofs-sdk-ts-core"},"_npmVersion":"10.9.3","description":"Shared core code for NeoFS TypeScript SDK","directories":{},"_nodeVersion":"22.20.0","dependencies":{"elliptic":"^6.5.7","crypto-js":"^4.2.0"},"typesVersions":{"*":{"user":["./dist/user/index.d.ts"],"types":["./dist/types/index.d.ts"],"utils":["./dist/utils/index.d.ts"],"crypto":["./dist/crypto/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","prettier":"^3.2.5","typescript":"^5.3.3","@types/elliptic":"^6.4.18","@typescript-eslint/parser":"^7.1.1","@typescript-eslint/eslint-plugin":"^7.1.1"},"_npmOperationalInternal":{"tmp":"tmp/neofs-sdk-ts-core_0.0.1_1773259676853_0.5058458713121088","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@axlabs/neofs-sdk-ts-core","version":"0.0.2","description":"Shared core code for NeoFS TypeScript SDK","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.js","types":"./dist/index.d.ts"},"./crypto":{"require":"./dist/crypto/index.js","import":"./dist/crypto/index.js","types":"./dist/crypto/index.d.ts"},"./user":{"require":"./dist/user/index.js","import":"./dist/user/index.js","types":"./dist/user/index.d.ts"},"./types":{"require":"./dist/types/index.js","import":"./dist/types/index.js","types":"./dist/types/index.d.ts"},"./utils":{"require":"./dist/utils/index.js","import":"./dist/utils/index.js","types":"./dist/utils/index.d.ts"}},"scripts":{"build":"tsc && cp src/utils/closure-polyfill.js dist/utils/ 2>/dev/null || true","build:plugin":"cd protoc-gen-grpc-ts && make build","clean":"rm -rf dist","prebuild":"npm run clean","prepublishOnly":"npm run build","test":"echo 'No tests in core package'","publish:dry-run":"npm publish --dry-run","publish:public":"npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/AxLabs/neofs-sdk-ts-core.git","directory":"neofs-sdk-ts-core"},"bugs":{"url":"https://github.com/AxLabs/neofs-sdk-ts-core/issues"},"homepage":"https://github.com/AxLabs/neofs-sdk-ts-core#readme","keywords":["neofs","blockchain","storage","typescript","sdk","core"],"author":{"name":"NeoFS Team"},"license":"Apache-2.0","devDependencies":{"@types/elliptic":"^6.4.18","@typescript-eslint/eslint-plugin":"^7.1.1","@typescript-eslint/parser":"^7.1.1","eslint":"^8.57.0","prettier":"^3.2.5","typescript":"^5.3.3"},"dependencies":{"crypto-js":"^4.2.0","elliptic":"^6.5.7"},"typesVersions":{"*":{"crypto":["./dist/crypto/index.d.ts"],"user":["./dist/user/index.d.ts"],"types":["./dist/types/index.d.ts"],"utils":["./dist/utils/index.d.ts"]}},"gitHead":"89d3174957863b439213bb04a59e391c1678c384","_id":"@axlabs/neofs-sdk-ts-core@0.0.2","_nodeVersion":"24.14.0","_npmVersion":"11.11.1","dist":{"integrity":"sha512-28A7M/mg/4uXSXPW/kwxRG2EbIbTxZr2YREpzk900aBy1lv3ORkw3HX55rVyYGybKPK2p4lHqo8MTe0eGJePNQ==","shasum":"47562a6fb06c0163c4e6798e8bb217e6b5279537","tarball":"https://registry.npmjs.org/@axlabs/neofs-sdk-ts-core/-/neofs-sdk-ts-core-0.0.2.tgz","fileCount":51,"unpackedSize":88155,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@axlabs%2fneofs-sdk-ts-core@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDf1/jJx+ewX7Q+jar64kfbzXS4TbNr4hO0cbBbla9bTgIhAKbsif/ngd9PtM4HYeoeCvrGmUvCbqJORS6af361p9vL"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:738af2f3-171e-49e1-9be8-07210c4a8118"}},"directories":{},"maintainers":[{"name":"merl123","email":"mathias@axlabs.com"},{"name":"axlabs-bot","email":"tech@axlabs.com"},{"name":"mialbu","email":"bucher_michael@hotmail.com"},{"name":"gsperbmachado","email":"guil@axlabs.com"},{"name":"thedanielmark","email":"danielmark.uc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/neofs-sdk-ts-core_0.0.2_1773302048924_0.2290289380203292"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-11T20:07:56.737Z","modified":"2026-03-12T07:54:09.402Z","0.0.1":"2026-03-11T20:07:57.025Z","0.0.2":"2026-03-12T07:54:09.060Z"},"bugs":{"url":"https://github.com/AxLabs/neofs-sdk-ts-core/issues"},"author":{"name":"NeoFS Team"},"license":"Apache-2.0","homepage":"https://github.com/AxLabs/neofs-sdk-ts-core#readme","keywords":["neofs","blockchain","storage","typescript","sdk","core"],"repository":{"type":"git","url":"git+https://github.com/AxLabs/neofs-sdk-ts-core.git","directory":"neofs-sdk-ts-core"},"description":"Shared core code for NeoFS TypeScript SDK","maintainers":[{"name":"merl123","email":"mathias@axlabs.com"},{"name":"axlabs-bot","email":"tech@axlabs.com"},{"name":"mialbu","email":"bucher_michael@hotmail.com"},{"name":"gsperbmachado","email":"guil@axlabs.com"},{"name":"thedanielmark","email":"danielmark.uc@gmail.com"}],"readme":"# neofs-sdk-ts-core\n\nShared core package for the [NeoFS](https://fs.neo.org/) TypeScript SDK. Provides cryptographic primitives, user identity utilities, type definitions, and helper functions used by platform-specific SDK packages.\n\n- **neofs-sdk-ts-react-native** — uses `grpc-react-native` with custom protobuf serialization\n- **neofs-sdk-ts-node** — uses `@grpc/grpc-js` with standard protobuf\n\n## Installation\n\n```bash\nnpm install neofs-sdk-ts-core\n```\n\n## Modules\n\nThe package exposes four modules, each available as a subpath export:\n\n### Crypto (`neofs-sdk-ts-core/crypto`)\n\nECDSA signing and verification with multiple signature schemes supported by NeoFS:\n\n| Scheme | Description |\n|--------|-------------|\n| `ECDSA_SHA512` | ECDSA with SHA-512 hashing (FIPS 186-3) |\n| `ECDSA_DETERMINISTIC_SHA256` | Deterministic ECDSA with SHA-256 (RFC 6979) |\n| `ECDSA_WALLETCONNECT` | WalletConnect signature scheme |\n| `N3` | Neo N3 witness |\n\nKey exports:\n\n- `Signer` / `SignerV2` — interfaces for signing operations\n- `PublicKey` — interface for public key encoding, decoding, and verification\n- `ECDSASigner` / `ECDSASignerRFC6979` — concrete ECDSA signer implementations\n- `NeoFSSignature` — signature wrapper with scheme-aware verification\n- `Scheme` — enum of supported signature schemes\n- `registerScheme()` — register custom public key constructors per scheme\n- Tillich–Zémor homomorphic hash (`tz` submodule)\n\n```typescript\nimport { ECDSASigner, Scheme } from 'neofs-sdk-ts-core/crypto';\n\nconst signer = new ECDSASigner(privateKeyHex);\nconst signature = signer.sign(data);\nconst pubKey = signer.getPublicKey();\n```\n\n### User (`neofs-sdk-ts-core/user`)\n\nNeoFS Owner ID (User ID) derivation and validation. An owner ID is a 25-byte value derived from a Neo N3 public key (address version prefix + script hash + checksum).\n\n```typescript\nimport { ownerIdFromPublicKey, validateOwnerId } from 'neofs-sdk-ts-core/user';\n\nconst ownerId = ownerIdFromPublicKey(compressedPublicKey);\nconst isValid = validateOwnerId(ownerId);\n```\n\n### Types (`neofs-sdk-ts-core/types`)\n\n- `Decimal` — arbitrary-precision decimal arithmetic for monetary computations (avoids floating-point issues). Supports protobuf serialization, add/subtract/multiply/divide, and comparison.\n\n```typescript\nimport { Decimal } from 'neofs-sdk-ts-core/types';\n\nconst balance = new Decimal(1000000n, 12);\nconsole.log(balance.toString()); // \"0.000001000000\"\n```\n\n### Utils (`neofs-sdk-ts-core/utils`)\n\nBuffer and cryptographic helper functions:\n\n- `hexToBytes()` / `bytesToHex()` — hex string conversion\n- `fromBase64()` / `toBase64()` — Base64 encoding/decoding\n- `randomBytes()` — secure random byte generation\n- `sha256()` / `sha512()` / `ripemd160()` / `doubleSha256()` — hash functions\n\n```typescript\nimport { hexToBytes, sha256 } from 'neofs-sdk-ts-core/utils';\n\nconst data = hexToBytes('deadbeef');\nconst hash = sha256(data);\n```\n\n## Building\n\n```bash\n# Install dependencies\nnpm install\n\n# Build (compiles TypeScript to dist/)\nnpm run build\n\n# Clean build artifacts\nnpm run clean\n```\n\n## protoc-gen-grpc-ts\n\nThis repository also contains `protoc-gen-grpc-ts`, a Go-based protoc plugin that generates TypeScript code from `.proto` files. It produces:\n\n- Binary protobuf serialization (`BinaryWriter` / `BinaryReader`)\n- gRPC service clients for React Native (`grpc-react-native`) and Node.js (`@grpc/grpc-js`)\n- Support for unary, server-streaming, client-streaming, and bidirectional streaming RPCs\n\n```bash\n# Build the plugin\ncd protoc-gen-grpc-ts\nmake build\n\n# Install to PATH\nmake install\n\n# Run tests\nmake test\n```\n\nSee [`protoc-gen-grpc-ts/README.md`](protoc-gen-grpc-ts/README.md) for full usage documentation.\n\n## License\n\n[Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)\n","readmeFilename":"README.md"}