{"_id":"@xrplf/secret-numbers","_rev":"26-e43c02367ff0826542bcf63117631f61","name":"@xrplf/secret-numbers","dist-tags":{"beta":"1.0.0-beta.1","latest":"3.0.0"},"versions":{"1.0.0-beta.0":{"name":"@xrplf/secret-numbers","version":"1.0.0-beta.0","keywords":["xrp","xrpl-ledger","multi sign","sign"],"license":"ISC","_id":"@xrplf/secret-numbers@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":"74cc52d7348fe151fa37ad7b781ae829d7f9d338","tarball":"https://registry.npmjs.org/@xrplf/secret-numbers/-/secret-numbers-1.0.0-beta.0.tgz","fileCount":20,"integrity":"sha512-iUdY8ANNp4L9pSeTqgncKNYy0KmnYxMJBZKklJRF50IRwbeZ6P5c2vbNuJscOW2giykjVaRVYj0SZyHvFsrZgg==","signatures":[{"sig":"MEUCIGxBlju2PLncOnG8yi7FurUnxhEk6aNa2jvysmlSPIw4AiEA0pgUnC5iu5O+KlG/HEHRF6Awp7ZAmiWVQc/lDkOQB58=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1462573},"main":"dist/index.js","types":"dist/index.d.ts","unpkg":"build/xrplf-secret-numbers-latest-min.js","gitHead":"9e30f1892c20a915c47593ffb8c336595804e4e7","scripts":{"lint":"eslint . --ext .ts --ext .test.ts --fix","test":"jest --verbose","build":"run-s build:lib build:web","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","analyze":"webpack --analyze","build:lib":"tsc --build tsconfig.build.json","build:web":"webpack","prepublish":"npm run clean && npm run lint && npm run test && npm run test:browser && npm run build","test:browser":"npm run build && npm run build:browserTests && karma start ./karma.config.js","build:browserTests":"webpack --config ./test/webpack.config.js"},"_npmUser":{"name":"ckniffen","email":"ckniffen@ripple.com"},"jsdelivr":"build/xrplf-secret-numbers-latest-min.js","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":"Generate XRPL Accounts with a number-based secret: 8 chunks of 6 digits","directories":{"test":"test"},"_nodeVersion":"18.16.0","dependencies":{"ripple-keypairs":"^2.0.0-beta.0","@xrplf/isomorphic":"^1.0.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/secret-numbers_1.0.0-beta.0_1697816960367_0.42243176033173513","host":"s3://npm-registry-packages"}},"1.0.0-beta.1":{"name":"@xrplf/secret-numbers","version":"1.0.0-beta.1","keywords":["xrp","xrpl-ledger","multi sign","sign"],"license":"ISC","_id":"@xrplf/secret-numbers@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":"25d9d5416b2c09f63e42b4bafc69f1ef6a4193d3","tarball":"https://registry.npmjs.org/@xrplf/secret-numbers/-/secret-numbers-1.0.0-beta.1.tgz","fileCount":21,"integrity":"sha512-hAvkEGRkDruuops2g9rdJ0kQoPaPDwOrTEneJc3xR4lQUJIembXULPeixXYjl5mX93cWiskL+kIQig4iZQO6dA==","signatures":[{"sig":"MEUCIQD8sptdv55pJb80G7UgsmcZAyj7mH+MFwBUHJRYstfj5AIgUc1Y0f8Rm3fB+CJN8gzki9aKauCP5kMfHlCRzQADCeE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1527941},"main":"dist/index.js","types":"dist/index.d.ts","unpkg":"build/xrplf-secret-numbers-latest-min.js","gitHead":"279bc1d15c522cfad0bffddcae24053fa609f7fe","scripts":{"lint":"eslint . --ext .ts --ext .test.ts --fix","test":"jest --verbose","build":"run-s build:lib build:web","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","analyze":"webpack --analyze","build:lib":"tsc --build tsconfig.build.json","build:web":"webpack","prepublish":"npm run clean && npm run lint && npm run test && npm run test:browser && npm run build","test:browser":"npm run build && npm run build:browserTests && karma start ./karma.config.js","build:browserTests":"webpack --config ./test/webpack.config.js"},"_npmUser":{"name":"ckniffen","email":"ckniffen@ripple.com"},"jsdelivr":"build/xrplf-secret-numbers-latest-min.js","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":"Generate XRPL Accounts with a number-based secret: 8 chunks of 6 digits","directories":{"test":"test"},"_nodeVersion":"18.16.0","dependencies":{"ripple-keypairs":"^2.0.0-beta.1","@xrplf/isomorphic":"^1.0.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/secret-numbers_1.0.0-beta.1_1701385400881_0.527776737576862","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@xrplf/secret-numbers","version":"1.0.0","keywords":["xrp","xrpl-ledger","multi sign","sign"],"license":"ISC","_id":"@xrplf/secret-numbers@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":"cc19ff84236cc2737b38f2e42a29924f2b8ffc0e","tarball":"https://registry.npmjs.org/@xrplf/secret-numbers/-/secret-numbers-1.0.0.tgz","fileCount":21,"integrity":"sha512-qsCLGyqe1zaq9j7PZJopK+iGTGRbk6akkg6iZXJJgxKwck0C5x5Gnwlb1HKYGOwPKyrXWpV6a2YmcpNpUFctGg==","signatures":[{"sig":"MEUCIQCpupuTurQbh2BtQsA0kbrjeZB8wce1YfNoKE2/8X2z9wIgMWr7a5RlEkKxAbO389iYc8x6x8K7eBfuaQmEgEKpeZI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1527871},"main":"dist/index.js","types":"dist/index.d.ts","unpkg":"build/xrplf-secret-numbers-latest-min.js","gitHead":"a09084289b2ba61eff2363773379573584e084d1","scripts":{"lint":"eslint . --ext .ts --ext .test.ts --fix","test":"jest --verbose","build":"run-s build:lib build:web","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","analyze":"webpack --analyze","build:lib":"tsc --build tsconfig.build.json","build:web":"webpack","prepublish":"npm run clean && npm run lint && npm run test && npm run test:browser && npm run build","test:browser":"npm run build && npm run build:browserTests && karma start ./karma.config.js","build:browserTests":"webpack --config ./test/webpack.config.js"},"_npmUser":{"name":"ckniffen","email":"ckniffen@ripple.com"},"jsdelivr":"build/xrplf-secret-numbers-latest-min.js","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":"Generate XRPL Accounts with a number-based secret: 8 chunks of 6 digits","directories":{"test":"test"},"_nodeVersion":"18.16.0","dependencies":{"ripple-keypairs":"^2.0.0","@xrplf/isomorphic":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/secret-numbers_1.0.0_1706824381837_0.13287280145861202","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@xrplf/secret-numbers","version":"2.0.0","keywords":["xrp","xrpl-ledger","multi sign","sign"],"license":"ISC","_id":"@xrplf/secret-numbers@2.0.0","maintainers":[{"name":"mvadari","email":"mvadari@ripple.com"},{"name":"ckniffen","email":"ckniffen@ripple.com"},{"name":"khancode_","email":"khancodegt@gmail.com"},{"name":"ckeshavabs","email":"ckeshavabs@ripple.com"},{"name":"mankins","email":"mankins@gmail.com"},{"name":"shichengripple001","email":"cshi@ripple.com"}],"homepage":"https://github.com/XRPLF/xrpl.js#readme","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"dist":{"shasum":"36ffa45c41e78efc6179ca4fe9d950260103dbce","tarball":"https://registry.npmjs.org/@xrplf/secret-numbers/-/secret-numbers-2.0.0.tgz","fileCount":20,"integrity":"sha512-z3AOibRTE9E8MbjgzxqMpG1RNaBhQ1jnfhNCa1cGf2reZUJzPMYs4TggQTc7j8+0WyV3cr7y/U8Oz99SXIkN5Q==","signatures":[{"sig":"MEUCIDmc4kz13MFZUzp0ggIMjBam/2NzN0ZM3R419q/mccVuAiEAjZRicDdEW3Dj3JyedP8i+vKkxdHrIwQwpo40UxZliu8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1662209},"main":"dist/index.js","types":"dist/index.d.ts","unpkg":"build/xrplf-secret-numbers-latest-min.js","gitHead":"e95870560312321e7f0e5c5e806a7f44cd8458c8","scripts":{"lint":"eslint . --ext .ts --ext .test.ts --fix","test":"jest --verbose","build":"run-s build:lib build:web","clean":"rm -rf ./build ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","analyze":"webpack --analyze","build:lib":"tsc --build tsconfig.build.json","build:web":"webpack","prepublish":"npm run clean && npm run lint && npm run test && npm run test:browser && npm run build","test:browser":"npm run build && npm run build:browserTests && karma start ./karma.config.js","build:browserTests":"webpack --config ./test/webpack.config.js"},"_npmUser":{"name":"ckeshavabs","email":"ckeshavabs@ripple.com"},"jsdelivr":"build/xrplf-secret-numbers-latest-min.js","prettier":"@xrplf/prettier-config","repository":{"url":"git+ssh://git@github.com/XRPLF/xrpl.js.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.20.4+arm64 (darwin)","description":"Generate XRPL Accounts with a number-based secret: 8 chunks of 6 digits","directories":{"test":"test"},"_nodeVersion":"18.20.4","dependencies":{"ripple-keypairs":"^2.0.0","@xrplf/isomorphic":"^1.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/secret-numbers_2.0.0_1753827883045_0.22977693689631962","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@xrplf/secret-numbers","version":"3.0.0","description":"Generate XRPL Accounts with a number-based secret: 8 chunks of 6 digits","main":"dist/index.js","unpkg":"build/xrplf-secret-numbers-latest-min.js","jsdelivr":"build/xrplf-secret-numbers-latest-min.js","types":"dist/index.d.ts","scripts":{"prepublish":"npm run clean && npm run lint && npm run test && npm run test:browser && npm run build","clean":"rm -rf ./build ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","test":"jest --verbose","test:browser":"npm run build && npm run build:browserTests && karma start ./karma.config.js","build":"run-s build:lib build:web","build:lib":"tsc --build tsconfig.build.json","build:web":"webpack","build:browserTests":"webpack --config ./test/webpack.config.js","lint":"eslint . --max-warnings 0","analyze":"webpack --analyze"},"directories":{"test":"test"},"dependencies":{"@xrplf/isomorphic":"^1.0.2","ripple-keypairs":"^3.0.0"},"prettier":"@xrplf/prettier-config","repository":{"type":"git","url":"git+ssh://git@github.com/XRPLF/xrpl.js.git"},"license":"ISC","keywords":["xrp","xrpl-ledger","multi sign","sign"],"_id":"@xrplf/secret-numbers@3.0.0","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"homepage":"https://github.com/XRPLF/xrpl.js#readme","_integrity":"sha512-qpGhAZXv5noMDjCtfzq5NK0y5rrdwTVjKhhPcAYSE+a/gogBOgqdpCKyieprVVPCnmVmJnGeRoZKBAqpCGegsA==","_resolved":"/home/runner/work/xrpl.js/xrpl.js/dist/xrplf-secret-numbers-3.0.0.tgz","_from":"file:xrplf-secret-numbers-3.0.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.6.0","dist":{"integrity":"sha512-qpGhAZXv5noMDjCtfzq5NK0y5rrdwTVjKhhPcAYSE+a/gogBOgqdpCKyieprVVPCnmVmJnGeRoZKBAqpCGegsA==","shasum":"ef8f81d1d4b1efef97d9700021deeced94e522d4","tarball":"https://registry.npmjs.org/@xrplf/secret-numbers/-/secret-numbers-3.0.0.tgz","fileCount":20,"unpackedSize":1617967,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@xrplf%2fsecret-numbers@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDQfQBe+tyrdeYb39a+9ke+iMxLTm+iWlhN+iiKxCGKNQIhALHmoZSvDB76q1SKN7yrqtx9sSlIN5gIWUlum8BPoiuv"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4d69bd0f-1857-45c2-8f5f-96cf0bc7b5c8"}},"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/secret-numbers_3.0.0_1780675522508_0.46150703172913543"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-20T15:49:20.279Z","modified":"2026-06-05T16:05:23.053Z","1.0.0-beta.0":"2023-10-20T15:49:20.665Z","1.0.0-beta.1":"2023-11-30T23:03:21.196Z","1.0.0":"2024-02-01T21:53:02.150Z","2.0.0":"2025-07-29T22:24:43.277Z","3.0.0":"2026-06-05T16:05:22.723Z"},"bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"license":"ISC","homepage":"https://github.com/XRPLF/xrpl.js#readme","keywords":["xrp","xrpl-ledger","multi sign","sign"],"repository":{"type":"git","url":"git+ssh://git@github.com/XRPLF/xrpl.js.git"},"description":"Generate XRPL Accounts with a number-based secret: 8 chunks of 6 digits","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":"# XRPL Secret Numbers [![npm version](https://badge.fury.io/js/@xrplf%2Fsecret-numbers.svg)](https://www.npmjs.com/@xrplf/secret-numbers)\n\nFor more background information, please read the [proposed Standard](https://github.com/xrp-community/standards-drafts/issues/15).\n\nA tool to convert Secret Numbers to the widely used Family Seed `s...` format is [available here](https://github.com/WietseWind/secret-numbers-to-family-seed/releases)\n\nA bundled version of this lib is available at NPM (`build/xrplf-secret-numbers-latest.js`), CDN: https://cdn.jsdelivr.net/npm/@xrplf/secret-numbers. You can access the library as `xrplf_secret_numbers`. Sample:\nhttps://jsfiddle.net/WietseWind/uo1zy0q7/\n\n#### Generate XRPL Accounts with a number-based secret: 8 chunks of 6 digits.\n\nThe common formats for XRPL account secrets are (at the time of writing this, July 2019):\n\n- Family Seed, eg. `sh1HiK7SwjS1VxFdXi7qeMHRedrYX`\n- Mnemonic, eg. `car banana apple road ...`\n\nThese formats are prone to typo's and not that user friendly. Using numbers means it's language (spoken, written) agnostic as well. They may be especially intimidating for the public that's relatively new to cryptocurrencies / blockchain technology.\n\nThis library encodes the entropy to generate accounts into 8 chunks of 6 digits, of which 5 digits are 1/8th of the entropy, and a 6th digit contains a checksum allowing realtime typo detection.\n\n##### A secret now looks like:\n\n```\n554872 394230 209376 323698\n140250 387423 652803 258676\n```\n\nFor compatibility with existing clients, this library supports exporting the family seed for a generated / entered \"Secret Number\"-set as well.\n\n## API\n\nThe typescript code to use resides in `./src/` and the compiled js in `./dist/` of the package. See the `./samples/` folder for some simple JS samples.\n\n##### Generating a new account:\n\n```\nconst {Account} = require('@xrplf/secret-numbers')\nconst account = new Account()\n```\n\n##### Importing an existing account:\n\n```\nconst {Account} = require('@xrplf/secret-numbers')\nconst secret = '399150 474506 009147 088773 432160 282843 253738 605430'\nconst account = new Account(secret)\n```\n\nOr importing with custom entropy (buffer, 16):\n\n```\nconst {Account} = require('@xrplf/secret-numbers')\nconst entropy = Buffer.from('0123456789ABCDEF0123456789ABCDEF', 'hex')\nconst account = new Account(entropy)\n```\n\n##### After generating / importing:\n\nYou can fetch the account details (address, secret, etc.) using these methods:\n\n```\nconsole.log(account.getAddress())\nconsole.log(account.getSecret())\n```\n\n##### Available methods:\n\n- `getSecret()`: Array<string>[8]\n- `getSecretString()`: string `012345 456789 ...`\n- `getAddress()`: string `rXXXXXXXX...`\n- `getFamilySeed()`: string `sXXXXXXXX...`\n- `getKeypair()`: `Keypair({privateKey, publicKey}`\n\n##### To split/check/encode/decode some more:\n\nThere's a `Utils` export as well:\n\n```\nconst {Account, Utils} = require('@xrplf/secret-numbers')\n```\n\nSome Utils methods (that you may want to use in your UI / ... before using the Account constructor):\n\n - To calculate the 6th decimal for a group of 5 digits:  \n   `calculateChecksum(position: number, value: number)`: number\n - To check a checksum (either sliced or the 6th char of a string containing numbers:  \n   `checkChecksum(position: number, value: number | string, checksum?: number)`: Boolean\n\n## Development\n\nRun `npm run prepublish` to clean, lint, test and build. Or just run `npm run build`, `npm run test` or `npm run lint`. \n\nTests are in `./test/`\n\n## Credits\n\nThis concept is based on an idea by [@nbougalis](https://github.com/nbougalis).\n","readmeFilename":"README.md"}