{"_id":"@callchain/call-core-lib","name":"@callchain/call-core-lib","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@callchain/call-core-lib","version":"1.0.0","description":"TypeScript/JavaScript client library for Call-Core blockchain","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/types/index.d.ts","browser":"dist/browser/call-core-lib.min.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js","types":"./dist/types/index.d.ts"}},"scripts":{"build":"npm run clean && npm run build:types && npm run build:cjs && npm run build:esm && npm run build:browser","build:types":"tsc --emitDeclarationOnly --outDir dist/types","build:cjs":"tsc --module commonjs --outDir dist/cjs","build:esm":"tsc --module esnext --outDir dist/esm","build:browser":"webpack --mode production","clean":"rm -rf dist","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","typecheck":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"keywords":["call-core","blockchain","cryptocurrency","rpc","websocket","api","client","typescript"],"author":{"name":"Call-Core Team"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/call-core/call-core-lib.git"},"bugs":{"url":"https://github.com/call-core/call-core-lib/issues"},"homepage":"https://github.com/call-core/call-core-lib#readme","devDependencies":{"@types/elliptic":"^6.4.18","@types/jest":"^29.5.11","@types/node":"^20.10.5","@types/ws":"^8.18.1","@typescript-eslint/eslint-plugin":"^6.15.0","@typescript-eslint/parser":"^6.15.0","eslint":"^8.56.0","jest":"^29.7.0","ts-jest":"^29.1.1","ts-loader":"^9.5.1","typescript":"^5.3.3","webpack":"^5.89.0","webpack-cli":"^5.1.4"},"dependencies":{"bignumber.js":"^9.1.2","bn.js":"^5.2.1","elliptic":"^6.5.4","hash.js":"^1.1.7","isomorphic-ws":"^5.0.0","ws":"^8.16.0"},"engines":{"node":">=16.0.0"},"_id":"@callchain/call-core-lib@1.0.0","gitHead":"8a46dcded30dbaac00e01cd67757b57a3c3c9bc0","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-rcAwdXHr9JEOe9LMq85ghkliquG3SvKIWIt9AY8WVhgQ8F0MgwBE7Zlfx2i2P+iKMITKlHmXwQCKBVS/IJvLIQ==","shasum":"4a6810e7568b59b60e8d461d00fb23df12e6e7b8","tarball":"https://registry.npmjs.org/@callchain/call-core-lib/-/call-core-lib-1.0.0.tgz","fileCount":243,"unpackedSize":1207141,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD5NAoUaTuriikCXBL3ELWrKM29PJNDBgfwLcgCNFPaIgIhAIn4gekMkvINbJdstzs9eEXl1PhPVwvszVCjXcIfletr"}]},"_npmUser":{"name":"landoyjx","email":"landoyjx@163.com"},"directories":{},"maintainers":[{"name":"landoyjx","email":"landoyjx@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/call-core-lib_1.0.0_1773372022305_0.024489517044594455"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-13T03:20:22.186Z","1.0.0":"2026-03-13T03:20:22.561Z","modified":"2026-03-13T03:20:22.828Z"},"maintainers":[{"name":"landoyjx","email":"landoyjx@163.com"}],"description":"TypeScript/JavaScript client library for Call-Core blockchain","homepage":"https://github.com/call-core/call-core-lib#readme","keywords":["call-core","blockchain","cryptocurrency","rpc","websocket","api","client","typescript"],"repository":{"type":"git","url":"git+https://github.com/call-core/call-core-lib.git"},"author":{"name":"Call-Core Team"},"bugs":{"url":"https://github.com/call-core/call-core-lib/issues"},"license":"MIT","readme":"# Call-Core JavaScript/TypeScript Library\n\nA comprehensive TypeScript/JavaScript client library for interacting with the Call-Core blockchain. Supports both JSON-RPC and WebSocket APIs, works in Node.js and browsers.\n\n## Features\n\n- 🔌 **JSON-RPC Client** - Complete implementation of all 80+ Call-Core RPC methods\n- 🌐 **WebSocket Client** - Real-time subscriptions with auto-reconnection\n- 💰 **Crypto Utilities** - Native address codec, keypair generation, signing (secp256k1)\n- 🏗️ **Transaction Builder** - Type-safe transaction construction with fluent API\n- 📦 **No External Dependencies** - Uses standard npm crypto libraries (elliptic, hash.js)\n- 🌐 **Universal** - Works in Node.js and browsers\n- 📘 **TypeScript** - Full TypeScript support with comprehensive types\n\n## Installation\n\n```bash\nnpm install call-core-lib\n```\n\n## Quick Start\n\n### RPC Client\n\n```typescript\nimport { RpcClient } from 'call-core-lib';\n\nconst client = new RpcClient({ server: 'http://localhost:5005' });\nconst info = await client.serverInfo();\nconsole.log('Server state:', info.info.server_state);\n```\n\n### WebSocket Client\n\n```typescript\nimport { WebSocketClient } from 'call-core-lib';\n\nconst ws = new WebSocketClient({ url: 'ws://localhost:6005' });\nawait ws.connect();\n\nws.onLedger((ledger) => {\n  console.log('New ledger:', ledger.ledger_index);\n});\n```\n\n## Documentation\n\n| Guide | Description |\n|-------|-------------|\n| [Getting Started](./docs/getting-started.md) | Installation, quick start, and basic concepts |\n| [RPC Client](./docs/rpc-client.md) | All 80+ RPC methods with examples |\n| [WebSocket Client](./docs/websocket-client.md) | Real-time subscriptions and events |\n| [Transactions](./docs/transactions.md) | Building and signing transactions |\n| [Crypto](./docs/crypto.md) | Wallets, keys, signing, validation |\n| [API Reference](./docs/api-reference.md) | Complete API reference |\n\n## Browser Usage\n\n```html\n<script src=\"https://unpkg.com/call-core-lib/dist/browser/call-core-lib.min.js\"></script>\n<script>\n  const { RpcClient, generateWallet } = CallCore;\n  const wallet = generateWallet();\n  console.log('Address:', wallet.address);\n</script>\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Run tests\nnpm test\n\n# Run tests with coverage\nnpm run test:coverage\n\n# Lint\nnpm run lint\n\n# Type check\nnpm run typecheck\n```\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please submit issues and pull requests on GitHub.\n\n## Support\n\nFor support, please open an issue on GitHub or contact the Call-Core team.\n","readmeFilename":"README.md","_rev":"1-58d718a859268977de4844de54c41230"}