{"_id":"@xrplf/isomorphic","_rev":"26-1da2d8c6563ad9734fe014203f80095f","name":"@xrplf/isomorphic","dist-tags":{"beta":"1.0.0-beta.1","latest":"1.0.2"},"versions":{"1.0.0-beta.0":{"name":"@xrplf/isomorphic","version":"1.0.0-beta.0","keywords":["crypto","isomorphic","xrpl"],"license":"ISC","_id":"@xrplf/isomorphic@1.0.0-beta.0","maintainers":[{"name":"ckniffen","email":"ckniffen@ripple.com"},{"name":"mvadari","email":"mvadari@ripple.com"},{"name":"ledhed2222","email":"greg.weisbrod@gmail.com"}],"homepage":"https://github.com/XRPLF/xrpl.js#readme","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"dist":{"shasum":"becd96ad41fa52059199e3088d3e3e616a8dfc5e","tarball":"https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.0-beta.0.tgz","fileCount":83,"integrity":"sha512-8aQKsMlbt3ZurG9eCVMV6MBqOxyvyKpsAjOhvKMyYhiJlseVPuN4SoPQYxekTkZHoqrSoP42EKlahQTch2a8Dg==","signatures":[{"sig":"MEUCIAW0tbPrdUEthPETIMr5GqTU9nOALFEV9uBNI+jPgtZCAiEA01YLPU1ywcW7Rk94GYnQiIglBbVqeR2p+rH36lStcnk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44131},"engines":{"node":">=16.0.0"},"gitHead":"9e30f1892c20a915c47593ffb8c336595804e4e7","scripts":{"lint":"eslint . --ext .ts","test":"npm run build && jest --verbose false --silent=false ./test/*.test.ts","build":"tsc --build ./tsconfig.build.json","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","prepublish":"npm run lint && npm test","test:browser":"npm run build && karma start ./karma.config.js"},"_npmUser":{"name":"ckniffen","email":"ckniffen@ripple.com"},"prettier":"@xrplf/prettier-config","repository":{"url":"git+ssh://git@github.com/XRPLF/xrpl.js.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.16.0+arm64 (darwin)","description":"A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js","directories":{"test":"test"},"_nodeVersion":"18.16.0","dependencies":{"ws":"^8.13.0","@noble/hashes":"^1.0.0","eventemitter3":"5.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.5.6","@types/node":"^16.18.38"},"_npmOperationalInternal":{"tmp":"tmp/isomorphic_1.0.0-beta.0_1697816952942_0.9273359906273084","host":"s3://npm-registry-packages"}},"1.0.0-beta.1":{"name":"@xrplf/isomorphic","version":"1.0.0-beta.1","keywords":["crypto","isomorphic","xrpl"],"license":"ISC","_id":"@xrplf/isomorphic@1.0.0-beta.1","maintainers":[{"name":"intelliot","email":"github.public@intelliot.com"},{"name":"khancode_","email":"khancodegt@gmail.com"},{"name":"justinr1234","email":"justinr1234@gmail.com"},{"name":"ckniffen","email":"ckniffen@ripple.com"},{"name":"mvadari","email":"mvadari@ripple.com"},{"name":"ledhed2222","email":"greg.weisbrod@gmail.com"}],"homepage":"https://github.com/XRPLF/xrpl.js#readme","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"dist":{"shasum":"e5a4f4bca5813ce0a9b1aad6859c461fc07bcc6d","tarball":"https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.0-beta.1.tgz","fileCount":88,"integrity":"sha512-aAfMuzlsOePQzPYbr+Qz6ffNqfXaYwRytmP2VBvm33VIFxB4vvSaj+q3bP/sYXemAncTDVJjtgFAXLXSTTck+g==","signatures":[{"sig":"MEUCIQDM0WNCDWKn+6hPdE9Y7zKHq9XmDYgHUqPpzjGsF9rFEQIgIW79xgtIEz0BFELlcdmrA+J7Upmu4V3VEPbe8see+aM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54024},"engines":{"node":">=16.0.0"},"gitHead":"279bc1d15c522cfad0bffddcae24053fa609f7fe","scripts":{"lint":"eslint . --ext .ts","test":"npm run build && jest --verbose false --silent=false ./test/*.test.ts","build":"tsc --build ./tsconfig.build.json","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","prepublish":"npm run lint && npm test","test:browser":"npm run build && karma start ./karma.config.js"},"_npmUser":{"name":"ckniffen","email":"ckniffen@ripple.com"},"prettier":"@xrplf/prettier-config","repository":{"url":"git+ssh://git@github.com/XRPLF/xrpl.js.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.16.0+arm64 (darwin)","description":"A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js","directories":{"test":"test"},"_nodeVersion":"18.16.0","dependencies":{"ws":"^8.13.0","@noble/hashes":"^1.0.0","eventemitter3":"5.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.5.6","@types/node":"^16.18.38"},"_npmOperationalInternal":{"tmp":"tmp/isomorphic_1.0.0-beta.1_1701385394898_0.5085776706243379","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@xrplf/isomorphic","version":"1.0.0","keywords":["crypto","isomorphic","xrpl"],"license":"ISC","_id":"@xrplf/isomorphic@1.0.0","maintainers":[{"name":"intelliot","email":"github.public@intelliot.com"},{"name":"khancode_","email":"khancodegt@gmail.com"},{"name":"justinr1234","email":"justinr1234@gmail.com"},{"name":"ckniffen","email":"ckniffen@ripple.com"},{"name":"mvadari","email":"mvadari@ripple.com"},{"name":"ledhed2222","email":"greg.weisbrod@gmail.com"}],"homepage":"https://github.com/XRPLF/xrpl.js#readme","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"dist":{"shasum":"b9ca265225660c44a7b15bce4a1d9fb717ed3fc1","tarball":"https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.0.tgz","fileCount":88,"integrity":"sha512-IyMsxyjkJK8YWq566KyuFuh/PUiLzQ02RbUO5qa+vEQb6zIAR9MzFwN7wBmBy7wmKkjligcdNDMG5EaBRH8FxQ==","signatures":[{"sig":"MEUCIQD9Gz71722SB1AEbvjNDkptIcjUh9fXnNxuiW6WZxkt3AIgChczXXhBoqk6PmdSTurt/Y4DlM1/1wWuFbFo2PGEMWs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54063},"engines":{"node":">=16.0.0"},"gitHead":"a09084289b2ba61eff2363773379573584e084d1","scripts":{"lint":"eslint . --ext .ts","test":"npm run build && jest --verbose false --silent=false ./test/*.test.ts","build":"tsc --build ./tsconfig.build.json","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","prepublish":"npm run lint && npm test","test:browser":"npm run build && karma start ./karma.config.js"},"_npmUser":{"name":"ckniffen","email":"ckniffen@ripple.com"},"prettier":"@xrplf/prettier-config","repository":{"url":"git+ssh://git@github.com/XRPLF/xrpl.js.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.16.0+arm64 (darwin)","description":"A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js","directories":{"test":"test"},"_nodeVersion":"18.16.0","dependencies":{"ws":"^8.13.0","@noble/hashes":"^1.0.0","eventemitter3":"5.0.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.5.6","@types/node":"^16.18.38"},"_npmOperationalInternal":{"tmp":"tmp/isomorphic_1.0.0_1706824368784_0.5456919497708903","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@xrplf/isomorphic","version":"1.0.1","keywords":["crypto","isomorphic","xrpl"],"license":"ISC","_id":"@xrplf/isomorphic@1.0.1","maintainers":[{"name":"anissa-ripple","email":"anissaw@ripple.com"},{"name":"intelliot","email":"github.public@intelliot.com"},{"name":"khancode_","email":"khancodegt@gmail.com"},{"name":"justinr1234","email":"justinr1234@gmail.com"},{"name":"ckniffen","email":"ckniffen@ripple.com"},{"name":"mvadari","email":"mvadari@ripple.com"},{"name":"ledhed2222","email":"greg.weisbrod@gmail.com"}],"homepage":"https://github.com/XRPLF/xrpl.js#readme","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"dist":{"shasum":"d7676e0ec0e55a39f37ddc1f3cc30eeab52e0739","tarball":"https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.1.tgz","fileCount":88,"integrity":"sha512-0bIpgx8PDjYdrLFeC3csF305QQ1L7sxaWnL5y71mCvhenZzJgku9QsA+9QCXBC1eNYtxWO/xR91zrXJy2T/ixg==","signatures":[{"sig":"MEUCIAYDWcwR1SYqBE656ks5ZOowwCDZPBnz8/m/csY5/OgtAiEAuTM2DdevFBuvV9vPHt84S/u632l11gubkr84GiZLVvo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55254},"engines":{"node":">=16.0.0"},"gitHead":"92849e57cef5fdd3744af347f2ad051a7735f16e","scripts":{"lint":"eslint . --ext .ts","test":"npm run build && jest --verbose false --silent=false ./test/*.test.ts","build":"tsc --build ./tsconfig.build.json","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","prepublish":"npm run lint && npm test","test:browser":"npm run build && karma start ./karma.config.js"},"_npmUser":{"name":"khancode_","email":"khancodegt@gmail.com"},"prettier":"@xrplf/prettier-config","repository":{"url":"git+ssh://git@github.com/XRPLF/xrpl.js.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+arm64 (darwin)","description":"A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js","directories":{"test":"test"},"_nodeVersion":"16.17.0","dependencies":{"ws":"^8.13.0","@noble/hashes":"^1.0.0","eventemitter3":"5.0.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.5.6","@types/node":"^16.18.38"},"_npmOperationalInternal":{"tmp":"tmp/isomorphic_1.0.1_1717446876547_0.9242910630557177","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@xrplf/isomorphic","version":"1.0.2","description":"A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js","keywords":["crypto","isomorphic","xrpl"],"scripts":{"build":"tsc --build ./tsconfig.build.json","test":"npm run build && jest --verbose false --silent=false ./test/*.test.ts","test:browser":"npm run build && karma start ./karma.config.js","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","lint":"eslint . --max-warnings 0","prepublish":"npm run lint && npm test"},"directories":{"test":"test"},"dependencies":{"@noble/hashes":"^2.0.1","eventemitter3":"5.0.1","ws":"^8.20.0"},"devDependencies":{"@types/node":"^18.18.38","@types/ws":"^8.18.1"},"repository":{"type":"git","url":"git+ssh://git@github.com/XRPLF/xrpl.js.git"},"license":"ISC","prettier":"@xrplf/prettier-config","engines":{"node":">=18.0.0"},"_id":"@xrplf/isomorphic@1.0.2","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"homepage":"https://github.com/XRPLF/xrpl.js#readme","_integrity":"sha512-ncZUdMXr6VlSXtdoiDi0jTH+gBrgGxwVeEidhoegII3PmyErbQsyj6e+j7acmR4LW/lvBkPkzb9QzRfJH0n3rA==","_resolved":"/home/runner/work/xrpl.js/xrpl.js/dist/xrplf-isomorphic-1.0.2.tgz","_from":"file:xrplf-isomorphic-1.0.2.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.6.0","dist":{"integrity":"sha512-ncZUdMXr6VlSXtdoiDi0jTH+gBrgGxwVeEidhoegII3PmyErbQsyj6e+j7acmR4LW/lvBkPkzb9QzRfJH0n3rA==","shasum":"15e6f1e9dba25690f0e7585568554a7a1cb01cdd","tarball":"https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.2.tgz","fileCount":88,"unpackedSize":55656,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@xrplf%2fisomorphic@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCyS22FkG4nMo8nsptdaClo6cBtdMf9aphZweSipW7B8gIgLFuCdJSgGL4vhnyp+UPb6A9kCI25j5KjeLJMF6/PyJM="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:50065203-ac6b-4f9c-b20c-ce391ec81699"}},"maintainers":[{"name":"bmollin","email":"brett@xrpl.foundation"},{"name":"transia","email":"dangell@transia.co"},{"name":"shichengripple001","email":"cshi@ripple.com"},{"name":"vjkhannaripple","email":"vraviraj@ripple.com"},{"name":"ripplex-automation","email":"ripplegithub@ripple.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/isomorphic_1.0.2_1780596709063_0.8830652471777785"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-20T15:49:12.844Z","modified":"2026-06-04T18:11:49.644Z","1.0.0-beta.0":"2023-10-20T15:49:13.130Z","1.0.0-beta.1":"2023-11-30T23:03:15.127Z","1.0.0":"2024-02-01T21:52:48.947Z","1.0.1":"2024-06-03T20:34:36.749Z","1.0.2":"2026-06-04T18:11:49.204Z"},"bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"license":"ISC","homepage":"https://github.com/XRPLF/xrpl.js#readme","keywords":["crypto","isomorphic","xrpl"],"repository":{"type":"git","url":"git+ssh://git@github.com/XRPLF/xrpl.js.git"},"description":"A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js","maintainers":[{"name":"bmollin","email":"brett@xrpl.foundation"},{"name":"transia","email":"dangell@transia.co"},{"name":"shichengripple001","email":"cshi@ripple.com"},{"name":"vjkhannaripple","email":"vraviraj@ripple.com"},{"name":"ripplex-automation","email":"ripplegithub@ripple.com"}],"readme":"# @xrplf/isomorphic\n\nA collection of isomorphic implementations of crypto and utility functions.\n\nBrowser implementations of cryptographic functions use `@noble/hashes` and `crypto` for node .\n\n### Hashes\n\nAll hash functions operate similarly to `@noble/hashes` and have the following properties:\n\n- They can be called directly by providing a Uint8Array or string which will be converted into a UInt8Array via UTF-8 encoding (not hex).\n- They all return a UInt8Array.\n\n```\nfunction hash(message: Uint8Array | string): Uint8Array;\nhash(new Uint8Array([1, 3]));\nhash('string') == hash(new TextEncoder().encode('string'));\n```\n\nAll hash functions can be constructed via `hash.create()` method:\n\n- The result is `Hash` subclass instance, which has `update()` and `digest()` methods.\n- `digest()` finalizes the hash and makes it no longer usable\n\n```typescript\nhash\n  .create()\n  .update(new Uint8Array([1, 3]))\n  .digest();\n```\n\n### `@xrplf/isomorphic/ripemd160`\n```typescript\nimport { ripemd160 } from '@xrplf/isomorphic/ripemd160';\nconst hashA = ripemd160('abc');\nconst hashB = ripemd160\n  .create()\n  .update(Uint8Array.from([1, 2, 3]))\n  .digest();\n```\n\n### `@xrplf/isomorphic/sha256`\n\n```typescript\nimport { sha256 } from '@xrplf/isomorphic/sha256';\nconst hashA = sha256('abc');\nconst hashB = sha256\n  .create()\n  .update(Uint8Array.from([1, 2, 3]))\n  .digest();\n```\n\n### `@xrplf/isomorphic/sha512`\n\n```typescript\nimport { sha512 } from '@xrplf/isomorphic/sha512';\nconst hashA = sha512('abc');\nconst hashB = sha512\n  .create()\n  .update(Uint8Array.from([1, 2, 3]))\n  .digest();\n```\n\n## Utilities\n\n### `@xrplf/isomorphic/utils`\n\n#### randomBytes\n\nCreate an UInt8Array of the supplied size\n\n```typescript\nimport { randomBytes } from @xrplf/isomorphic/utils\n\nconsole.log(randomBytes(12)) // Uint8Array(12) [95, 236, 188,  55, 208, 128, 161, 249, 171, 57, 141, 7]\n```\n\n#### bytesToHex\n\nConvert an UInt8Array to hex.\n\n```typescript\nimport { bytesToHex } from @xrplf/isomorphic/utils\n\nconsole.log(bytesToHex([222, 173, 190, 239])) // \"DEADBEEF\"\n```\n\n#### hexToBytes\n\nConvert hex to an UInt8Array.\n\n```typescript\nimport { hexToBytes } from @xrplf/isomorphic/utils\n\nconsole.log(hexToBytes('DEADBEEF')) // [222, 173, 190, 239]\n```\n\n#### hexToString\n\nConverts hex to its string equivalent. Useful to read the Domain field and some Memos.\n\n```typescript\nimport { hexToString } from @xrplf/isomorphic/utils\n\nconsole.log(hexToString('6465616462656566D68D')) // \"deadbeef֍\"\n```\n\n#### stringToHex\n\nConverts a utf-8 to its hex equivalent. Useful for Memos.\n\n```typescript\nimport { stringToHex } from @xrplf/isomorphic/utils\n\nconsole.log(stringToHex('deadbeef֍')) // \"6465616462656566D68D\"\n```\n\n### `@xrplf/isomorphic/ws`\n\n```typescript\nimport WebSocket from '@xrplf/isomorphic/ws'\n\nconst socket = new WebSocket('wss://localhost:8080')\n```\n","readmeFilename":"README.md"}