{"_id":"@axiasolar/signer-cli","_rev":"2-04a7f4f3f7adc583638ae654c9946c0b","name":"@axiasolar/signer-cli","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@axiasolar/signer-cli","version":"1.0.0","description":"A commandline signer for offline signature generataion","main":"index.cjs","sideEffects":false,"bin":{"AxiaSolar-Js-signer":"index.cjs"},"author":{"name":"Sankar boro","email":"sankar.boro@zeeve.io"},"maintainers":[{"name":"sankar-boro-zeeve","email":"sankar.boro@zeeve.io"},{"name":"abhishek-zeeve","email":"abhishek.rana@zeeve.io"}],"contributors":[],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/AxiaSolar-Js/tools.git"},"bugs":{"url":"https://github.com/AxiaSolar-Js/tools/issues"},"homepage":"https://github.com/AxiaSolar-Js/tools/tree/master/packages/signer-cli#readme","dependencies":{"@babel/core":"^7.15.5","@babel/register":"^7.15.3","@babel/runtime":"^7.15.4","@axiasolar/api":"1.0.0","@axiasolar/api-cli":"1.0.0","@axiasolar/keyring":"1.0.0","@axiasolar/types":"1.0.0","@axiasolar/util":"1.0.0","@axiasolar/util-crypto":"1.0.0","yargs":"^17.1.1"},"devDependencies":{"@types/node":"^16.9.1","@types/yargs":"^17.0.2"},"_id":"@axiasolar/signer-cli@1.0.0","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-viDnMfEcM2b5IxIXGEsGBvXbd9md2W9k6NlSqHmd9sbLP+qWHx+Q/ey6ht1p6o71w6abAiGcXx8TN9qAYCVmvA==","shasum":"d4164d42bc689c080c7c24c4dfa62a87e0edf257","tarball":"https://registry.npmjs.org/@axiasolar/signer-cli/-/signer-cli-1.0.0.tgz","fileCount":11,"unpackedSize":27084,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzG9ECRA9TVsSAnZWagAAkUEP/in0CDlGzNQIg43jiUJy\n4fWR2dYolRJeaM1LyXJH2h2i8ODxNv87rNnpMUkZg1vxmeWjN3kP523un9Ti\nNOLMVQlfyFUWeGmTAiWla8ElF8SE9HJqGSxSudBvWCjSlxad9pNBvlbNRQGv\nCztsnFsC6IVlGaTombuxhffT5LoF8yH2AK1HBU4i2X/ozlyMyE4imkO6TOBt\nEgV7++QxIjv8sy2jwGPESM3hw7wc/jbV6W5qK+kA9TdYDgVZ/1KfiGvamT8z\nQPFx6opX/WpGGJBz8P9FBBeALhbztsW8kZjidSZX2HbzqMxnl+1hgh+trFxP\n25QhFzVuiYBdMbFQGff0LybbZPHIoYY/xYS1qcnl6s251bhcu7UK7fJWOHBO\nKX5ntv8o5VVpBOZb4+VpfPwjifqxcAV/tHx1krQxjFfJoatIQozvYDXSePEK\ns1AuMWXYFah1WVo1KH97OzuE+KbWykSOXdFboLYZ0AKIcObU2227sMwtuaBV\nGRfx1RcZad0GY2df97axs7ZrZcJfTfY7WaUgjLT7hsivlkWmd3az+9J2JhsC\nfA6qVlT37PGexYFSr1jK9Zox8x7JfMtUCm8UKk7M5O6hC6Xof2GPyROaOQCa\ndowCHdSGdq4ofLuVRDgagmhXMrbsvaNMHF+UZw4nKgzUs0lNLXZtGG8NNxdb\nw00c\r\n=i/7A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAh8JW3N3c78joct/Ol4+RHq7PwfPDlfDO6PD/1VU7GOAiEA83+W4RM54RXAltBZQeadIMV3QNUzct8w+AwNHYP+p3c="}]},"_npmUser":{"name":"sankar-boro-zeeve","email":"sankar.boro@zeeve.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/signer-cli_1.0.0_1632021561322_0.33877108807385015"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-19T03:19:21.269Z","1.0.0":"2021-09-19T03:19:21.527Z","modified":"2022-04-04T17:11:20.959Z"},"maintainers":[{"name":"sankar-boro-zeeve","email":"sankar.boro@zeeve.io"},{"name":"abhishek-zeeve","email":"abhishek.rana@zeeve.io"}],"description":"A commandline signer for offline signature generataion","homepage":"https://github.com/AxiaSolar-Js/tools/tree/master/packages/signer-cli#readme","repository":{"type":"git","url":"git+https://github.com/AxiaSolar-Js/tools.git"},"contributors":[],"author":{"name":"Sankar boro","email":"sankar.boro@zeeve.io"},"bugs":{"url":"https://github.com/AxiaSolar-Js/tools/issues"},"license":"Apache-2.0","readme":"# @axiasolar/signer-cli\n\nA simple CLI interface for offline signing. This can also be executed via the [docker image](../../README.md#docker).\n\n## Create a transaction\n\nTo create a transaction, you need to use the API to connect to a chain, enabling the creation of a transaction using the chain's metadata. In a terminal, run the `submit` command with the following form:\n\n`yarn run:signer submit --account <ss58> --ws <endpoint> <module.method> [param1] [...] [paramX]`\n\nFor instance, to make a transfer, we run the following command:\n\n`yarn run:signer submit --account 5HNHXTw65dTNVGRdYkxFUpKcvmUYQMZHcDHmSKpuC8pvVEaN --ws wss://poc3-rpc.axiasolar.io/ balances.transfer 5DkQbYAExs3M2sZgT1Ec3mKfZnAQCL4Dt9beTCknkCUn5jzo 123`\n\nOn execution, it will prompt us with:\n\n```\nPayload: 0x040300ff4a83f1...a8239139ff3ff7c3f6\nSignature>\n```\n\nThe `Payload` is the hex that needs to be signed. Pasting the hex signature (followed by `Enter`) submits it to the chain.\n\nYou can also use this command to submit pre-signed transactions, e.g. generated using the `sendOffline` command (see below).\n\nThe syntax is as follows:\n\n`yarn run:signer submit --tx <signedTransaction> --ws <endpoint>`\n\n## Sign a transaction\n\nTo sign, you do not need a network connection at all and this command does not use the API to make connections to a chain. In a terminal, run the `sign` command with the following form:\n\n`yarn run:signer sign --account <ss58> --seed <suri> --type <ed25519|sr25519> <hex payload>`\n\nFor instance, to sign the transfer made above, we run:\n\n`yarn run:signer sign --account 5HNHXTw65dTNVGRdYkxFUpKcvmUYQMZHcDHmSKpuC8pvVEaN --seed \"leaf ... rude\" --type sr25519 0x040300ff4a83f1...a8239139ff3ff7c3f6`\n\nOn execution, it will respond with:\n\n```\nSignature: 0xe6facf194a8e...413ce3155c2d1240b\n```\n\nPaste this signature into the submission in the first terminal, and off we go.\n\nBy default, `submit` will create a mortal extrinsic with a lifetime of 50 blocks. Assuming a six-second block time, you will have five minutes to go offline, sign the transaction, paste the signature, and submit the signed transaction.\n\n## Send offline\n\nThis functionality lets you generate signed transactions for execution at a later time, on a different device or using other tools. It is intended to resemble MyEtherWallet's [`Send offline`](https://kb.myetherwallet.com/en/offline/offline_transaction/) feature.\n\nThe flow is similar to the `submit` command. First, run the `sendOffline` command on a computer with a network connection:\n\n`yarn run:signer sendOffline --account 5HNHXTw65dTNVGRdYkxFUpKcvmUYQMZHcDHmSKpuC8pvVEaN --ws wss://poc3-rpc.axiasolar.io/ balances.transfer 5DkQbYAExs3M2sZgT1Ec3mKfZnAQCL4Dt9beTCknkCUn5jzo 123`\n\nThis will give you a payload to sign. Use the `sign` command as per instructions above.\n\nOnce you've pasted the signature into the `sendOffline` terminal (and hit `Enter`), it will print the signed transaction that can be stored and submitted later (e.g. using the `submit` command).\n\nRun `yarn run:signer --help` to learn about optional parameters.\n","readmeFilename":"README.md"}