{"_id":"@dokimon/rpc-spec-types","name":"@dokimon/rpc-spec-types","dist-tags":{"canary":"2.1.0","latest":"2.1.0"},"versions":{"2.1.0":{"name":"@dokimon/rpc-spec-types","version":"2.1.0","description":"Shared generic JSON RPC specifications","exports":{"edge-light":{"import":"./dist/index.node.mjs","require":"./dist/index.node.cjs"},"workerd":{"import":"./dist/index.node.mjs","require":"./dist/index.node.cjs"},"browser":{"import":"./dist/index.browser.mjs","require":"./dist/index.browser.cjs"},"node":{"import":"./dist/index.node.mjs","require":"./dist/index.node.cjs"},"react-native":"./dist/index.native.mjs","types":"./dist/types/index.d.ts"},"browser":{"./dist/index.node.cjs":"./dist/index.browser.cjs","./dist/index.node.mjs":"./dist/index.browser.mjs"},"main":"./dist/index.node.cjs","module":"./dist/index.node.mjs","react-native":"./dist/index.native.mjs","types":"./dist/types/index.d.ts","type":"commonjs","sideEffects":false,"keywords":["blockchain","dokimon","web3"],"author":{"name":"Dokimon Labs Maintainers","email":"maintainers@dokimonlabs.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dokimon-labs/kit.git"},"bugs":{"url":"https://github.com/dokimon-labs/kit/issues"},"browserslist":["supports bigint and not dead","maintained node versions"],"peerDependencies":{"typescript":">=5"},"engines":{"node":">=20.18.0"},"scripts":{"compile:js":"tsup --config build-scripts/tsup.config.package.ts","compile:typedefs":"tsc -p ./tsconfig.declarations.json","dev":"jest -c ../../node_modules/@dokimon/test-config/jest-dev.config.ts --rootDir . --watch","publish-impl":"npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || (pnpm publish --tag ${PUBLISH_TAG:-canary} --access public --no-git-checks && (([ \"$PUBLISH_TAG\" != \"canary\" ] && pnpm dist-tag add $npm_package_name@$npm_package_version latest) || true))","publish-packages":"pnpm prepublishOnly && pnpm publish-impl","style:fix":"pnpm eslint --fix src && pnpm prettier --log-level warn --ignore-unknown --write ./*","test:lint":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@dokimon/test-config/jest-lint.config.ts --rootDir . --silent","test:prettier":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@dokimon/test-config/jest-prettier.config.ts --rootDir . --silent","test:treeshakability:browser":"agadoo dist/index.browser.mjs","test:treeshakability:native":"agadoo dist/index.native.mjs","test:treeshakability:node":"agadoo dist/index.node.mjs","test:typecheck":"tsc --noEmit","test:unit:browser":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@dokimon/test-config/jest-unit.config.browser.ts --rootDir . --silent","test:unit:node":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@dokimon/test-config/jest-unit.config.node.ts --rootDir . --silent"},"_id":"@dokimon/rpc-spec-types@2.1.0","homepage":"https://github.com/dokimon-labs/kit#readme","_integrity":"sha512-nwE58EGG5rq1+9lB6UVqH2D2xXW2sAM1vNPq9bIXRBoL8qrsA+K6qVTjuqxmGfMWIjxB04OHBqX+Wq6v8V5Oaw==","_resolved":"/tmp/c901d7fe0251e1fa7f3065cf71f7eef5/dokimon-rpc-spec-types-2.1.0.tgz","_from":"file:dokimon-rpc-spec-types-2.1.0.tgz","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-nwE58EGG5rq1+9lB6UVqH2D2xXW2sAM1vNPq9bIXRBoL8qrsA+K6qVTjuqxmGfMWIjxB04OHBqX+Wq6v8V5Oaw==","shasum":"6dc7951aaa0471d14ae4706054716ffaaa187210","tarball":"https://registry.npmjs.org/@dokimon/rpc-spec-types/-/rpc-spec-types-2.1.0.tgz","fileCount":29,"unpackedSize":109963,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC6CEDHf71SclhEOZviXck/bJuJB+naxFTy+dIFxLpvKAiBdQbTDXMgjFIXGljZinm97NZruXmam7eEqYGCY0/NVFg=="}]},"_npmUser":{"name":"m67846088848","email":"m67846088848@gmail.com"},"directories":{},"maintainers":[{"name":"m67846088848","email":"m67846088848@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rpc-spec-types_2.1.0_1747646488903_0.5956082412782024"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-19T09:21:28.829Z","2.1.0":"2025-05-19T09:21:29.102Z","modified":"2025-05-19T09:21:29.366Z"},"maintainers":[{"name":"m67846088848","email":"m67846088848@gmail.com"}],"description":"Shared generic JSON RPC specifications","homepage":"https://github.com/dokimon-labs/kit#readme","keywords":["blockchain","dokimon","web3"],"repository":{"type":"git","url":"git+https://github.com/dokimon-labs/kit.git"},"author":{"name":"Dokimon Labs Maintainers","email":"maintainers@dokimonlabs.com"},"bugs":{"url":"https://github.com/dokimon-labs/kit/issues"},"license":"MIT","readme":"[![npm][npm-image]][npm-url]\n[![npm-downloads][npm-downloads-image]][npm-url]\n<br />\n[![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]\n\n[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\n[code-style-prettier-url]: https://github.com/prettier/prettier\n[npm-downloads-image]: https://img.shields.io/npm/dm/@dokimon/rpc-spec-types?style=flat\n[npm-image]: https://img.shields.io/npm/v/@dokimon/rpc-spec-types?style=flat\n[npm-url]: https://www.npmjs.com/package/@dokimon/rpc-spec-types\n\n# @dokimon/rpc-spec-types\n\nThis package contains core types that can be used on both RPC and RPC Subscriptions specifications. It can be used standalone, but it is also exported as part of Kit [`@dokimon/kit`](https://github.com/dokimon-labs/kit/tree/main/packages/kit).\n\n## Types\n\n### `RpcRequest`\n\nAn object that describes the elements of an RPC or RPC Subscriptions request. It consists of the following properties:\n\n- `methodName`: The name of the RPC method or subscription requested.\n- `params`: The parameters to be passed to the RPC server.\n\n### `RpcRequestTransformer`\n\nA function that accepts an `RpcRequest` and returns another `RpcRequest`. This allows the `RpcApi` to transform the request before it is sent to the RPC server.\n\n### `RpcResponse`\n\nA type that represents the response from an RPC server. This could be any sort of data which is why `RpcResponse` defaults to `unknown`. You may use a type parameter to specify the shape of the response — e.g. `RpcResponse<{ result: number }>`.\n\n### `RpcResponseTransformer`\n\nA function that accepts an `RpcResponse` and returns another `RpcResponse`. This allows the `RpcApi` to transform the response before it is returned to the caller.\n","readmeFilename":"README.md","_rev":"1-96d23b4013556121495489bed00d37c4"}