{"_id":"@atlaschain/compat","name":"@atlaschain/compat","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@atlaschain/compat","version":"3.0.0","description":"Helpers for converting from legacy web3js classes","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","atlas","web3"],"author":{"name":"Atlas Chain Foundation"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anza-xyz/kit.git"},"bugs":{"url":"https://github.com/anza-xyz/kit/issues"},"browserslist":["supports bigint and not dead","maintained node versions"],"dependencies":{"@atlaschain/addresses":"3.0.0","@atlaschain/errors":"3.0.0","@atlaschain/transactions":"3.0.0","@atlaschain/instructions":"3.0.0","@atlaschain/codecs-core":"3.0.0","@atlaschain/keys":"3.0.0"},"peerDependencies":{"typescript":">=5.3.3"},"engines":{"node":">=20.18.0"},"scripts":{"compile:docs":"typedoc","compile:js":"tsup --config build-scripts/tsup.config.package.ts","compile:typedefs":"tsc -p ./tsconfig.declarations.json","dev":"jest -c ../../node_modules/@atlaschain/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 && (([ -n \"${GITHUB_OUTPUT:-}\" ] && echo 'published=true' >> \"$GITHUB_OUTPUT\") || true) && (([ \"$PUBLISH_TAG\" != \"canary\" ] && ../build-scripts/maybe-tag-latest.ts $npm_package_name@$npm_package_version) || 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/@atlaschain/test-config/jest-lint.config.ts --rootDir . --silent","test:prettier":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@atlaschain/test-config/jest-prettier.config.ts --rootDir . --silent","test:treeshakability:browser":"agadoo dist/index.browser.mjs","test:treeshakability:native":"agadoo dist/index.node.mjs","test:treeshakability:node":"agadoo dist/index.native.mjs","test:typecheck":"tsc --noEmit","test:unit:browser":"TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@atlaschain/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/@atlaschain/test-config/jest-unit.config.node.ts --rootDir . --silent"},"_id":"@atlaschain/compat@3.0.0","homepage":"https://github.com/anza-xyz/kit#readme","_integrity":"sha512-ewvoFJ2BA1w3OxwKLGf2Dt82gsjtlbdIoRi7qEvOaWw6bmX+DrFKN57EOTYxZ1PR5lSgOVVK7JHqfZ+H/VCrKA==","_resolved":"/private/var/folders/q8/nr55p0wd491c6fjmbky17kd00000gn/T/835ffe7a6a45bfcb35f4487075f8230b/atlaschain-compat-3.0.0.tgz","_from":"file:atlaschain-compat-3.0.0.tgz","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-ewvoFJ2BA1w3OxwKLGf2Dt82gsjtlbdIoRi7qEvOaWw6bmX+DrFKN57EOTYxZ1PR5lSgOVVK7JHqfZ+H/VCrKA==","shasum":"0a3841a33205bcdd6e78b69a19dcea2ddda5a8dd","tarball":"https://registry.npmjs.org/@atlaschain/compat/-/compat-3.0.0.tgz","fileCount":5,"unpackedSize":10057,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD0Tm3hVIqqACA6kGyCKtsI3oW+i3GItMS0FI0yPYOUhgIgXq/JHPX2byqw+AREQtugF/Lz/q3dr8I1lI/ZgMWGS5I="}]},"_npmUser":{"name":"atlaschain","email":"jq@atlaschain.org"},"directories":{},"maintainers":[{"name":"atlaschain","email":"jq@atlaschain.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/compat_3.0.0_1764611552366_0.7123436621174406"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-01T17:52:32.293Z","3.0.0":"2025-12-01T17:52:32.573Z","modified":"2025-12-01T17:52:32.839Z"},"maintainers":[{"name":"atlaschain","email":"jq@atlaschain.org"}],"description":"Helpers for converting from legacy web3js classes","homepage":"https://github.com/anza-xyz/kit#readme","keywords":["blockchain","atlas","web3"],"repository":{"type":"git","url":"git+https://github.com/anza-xyz/kit.git"},"author":{"name":"Atlas Chain Foundation"},"bugs":{"url":"https://github.com/anza-xyz/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/@atlas/compat?style=flat\n[npm-image]: https://img.shields.io/npm/v/@atlas/compat?style=flat\n[npm-url]: https://www.npmjs.com/package/@atlas/compat\n\n# @atlas/compat\n\nThis package contains utilities for converting from legacy web3js classes to the new data structures in Kit. It can be used standalone, but it is also exported as part of Kit [`@atlas/kit`](https://github.com/anza-xyz/kit/tree/main/packages/kit).\n\n## Functions\n\n### `fromLegacyPublicKey()`\n\nThis can be used to convert a legacy `PublicKey` object to an `Address` type\n\n```ts\nimport { fromLegacyPublicKey } from '@atlas/compat';\nconst address = fromLegacyPublicKey(new PublicKey('49XBVQsvSW44ULKL9qufS9YqQPbdcps1TQRijx4FQ9sH'));\n```\n\n### `fromLegacyKeypair()`\n\nThis can be used to convert a legacy `Keypair` object to a native Ed25519 `CryptoKeyPair` object\n\n```ts\nimport { fromLegacyKeypair } from '@atlas/compat';\nconst { privateKey, publicKey } = await fromLegacyKeypair(Keypair.generate());\n```\n\n### `fromVersionedTransaction()`\n\nThis can be used to convert a legacy `VersionedTransaction` object to a `Transaction` object.\n\n```ts\nimport { fromVersionedTransaction } from '@atlas/compat';\n\n// imagine a function that returns a legacy `VersionedTransaction`\nconst legacyVersionedTransaction = getMyLegacyVersionedTransaction();\nconst transaction = fromVersionedTransaction(legacyVersionedTransaction);\n```\n\n### `fromLegacyTransactionInstruction()`\n\nThis can be used to convert a legacy `TransactionInstruction` object to a `Instruction` object.\n\n```ts\nimport { fromLegacyTransactionInstruction } from '@atlas/compat';\n\n// imagine a function that returns a legacy `TransactionInstruction`\nconst legacyInstruction = getMyLegacyInstruction();\nconst instruction = fromLegacyTransactionInstruction(legacyInstruction);\n```\n","readmeFilename":"README.md","_rev":"1-82171a9aa2225b679c54f46214592b76"}