{"_id":"@axiasolar-js/signer-cli","_rev":"3-a7758144665e051691482b7fb28e08e0","name":"@axiasolar-js/signer-cli","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@axiasolar-js/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-js/api":"1.0.0","@axiasolar-js/api-cli":"1.0.0","@axiasolar-js/keyring":"1.0.0","@axiasolar-js/types":"1.0.0","@axiasolar-js/util":"1.0.0","@axiasolar-js/util-crypto":"1.0.0","yargs":"^17.1.1"},"devDependencies":{"@types/node":"^16.9.1","@types/yargs":"^17.0.2"},"_id":"@axiasolar-js/signer-cli@1.0.0","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-P7pHhhABx8pQawFlknulxTwAj2lZd3g5F/glhTScMvQjLz2Lr3FpDPeq6CJt6ai+3lvybk/GLA6C/Wrw4EF3hA==","shasum":"ce038f3cd80cff18d184d17ab448a493bd07519d","tarball":"https://registry.npmjs.org/@axiasolar-js/signer-cli/-/signer-cli-1.0.0.tgz","fileCount":11,"unpackedSize":27189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQujzCRA9TVsSAnZWagAAinwP/0oViTrfPxe9YfYSaD4+\nUSh4Ke7GbkQ4uTTiLVfpUHX5BJsJu/xsPrfOrumHts+Sg146DamRvgSMavbR\nl9JURw97lH2VVxaoxe4fsAiShZHse5ALIem4vcNISGh6Cyb66sjU+3uV2nhe\nS8gyRH8FcOdEjqXigXlkJYryEWW5GvyMVsiMmyrdcO6LEcxiNVF55lUBKh2n\nuNxnsVeJ1VpQ0NGfoCCxhZBtM/NqxScSd1xSyQ+ey7hQCXXY5Fi/zrrhCDQB\naNIZpmwqY63PLtBFRgy0XF2nTuXvHL2wyu1EKtC+t4XwEGZuFosMm7+tccqq\nkcOaN8ns4mArB1ir7LefxvH4RWdljlkNoYIQHKwnf66A1jXFxJxmk+OiKLXE\nGFqmPH/yuHGIFUpm+xzL6uAoUICPtXz6xRU72VJwM3nTUmjEksEaDfoVZTUn\nQX2EjZODRuUB+w6tIA4G0XUcHzQT5xOqxXiKkxLHWfyhCFec9laeywI+iPu5\nezWh2fRE/Y5HeS9z2vvDbuOHLQdWpc6GKGCfwl8zmhAHNnKja6cnVIh10L9W\n2GS0V8d5Nr3a8BiOLiVGu5sDnM+5q9UzW5gbnZPCCBnbnb+Cg+UN99qFubwE\nqYZdM4QwBjkBKwzVepzKPVaZULayCq+0MOQ0gXzN4wu3t/gkrzvxv4qfUoPT\nl281\r\n=SBSe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5a8mflNaUK5W4zn/W/0UYPK5i4ynHsltADPL00qT8LAiEAyaNj6Wa+t2t34G6Dj16k7i1s5a649+396oo8CaVMcy4="}]},"_npmUser":{"name":"sankar-boro-zeeve","email":"sankar.boro@zeeve.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/signer-cli_1.0.0_1631774963089_0.28560106523113094"},"_hasShrinkwrap":false},"1.1.0":{"name":"@axiasolar-js/signer-cli","version":"1.1.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":"abhishek-zeeve","email":"abhishek.rana@zeeve.io"},{"name":"sankar-boro-zeeve","email":"sankar.boro@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":{"@axiasolar-js/api":"1.1.0","@axiasolar-js/api-cli":"1.1.0","@axiasolar-js/keyring":"1.1.0","@axiasolar-js/types":"1.1.0","@axiasolar-js/util":"1.1.0","@axiasolar-js/util-crypto":"1.1.0","@babel/core":"^7.15.5","@babel/register":"^7.15.3","@babel/runtime":"^7.15.4","yargs":"^17.1.1"},"devDependencies":{"@types/node":"^16.9.1","@types/yargs":"^17.0.2"},"exports":{".":{"require":"./index.cjs","default":"./index.js"},"./cmdSendOffline":{"require":"./cmdSendOffline.cjs","default":"./cmdSendOffline.js"},"./cmdSign":{"require":"./cmdSign.cjs","default":"./cmdSign.js"},"./cmdSubmit":{"require":"./cmdSubmit.cjs","default":"./cmdSubmit.js"},"./package.json":"./package.json","./packageInfo":{"require":"./packageInfo.cjs","default":"./packageInfo.js"},"./RawSigner":{"require":"./RawSigner.cjs","default":"./RawSigner.js"},"./README.md":"./README.md","./signer":{"require":"./signer.cjs","default":"./signer.js"}},"type":"module","_id":"@axiasolar-js/signer-cli@1.1.0","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-D43JvZOLzWh4G3vdiHIfyp34xYTumOuz6nyUh2ulYxN4mf3YjRRVQrerMGbPbpGILv391jxvT/eLBhU598ZgwQ==","shasum":"0cf61e1c11322af003a62c04610edfd5d5fe8c76","tarball":"https://registry.npmjs.org/@axiasolar-js/signer-cli/-/signer-cli-1.1.0.tgz","fileCount":16,"unpackedSize":28389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh12NJCRA9TVsSAnZWagAAzesP/jh7Cy+M1wpgdFufw3SY\n7C+UK7m3Th+kfGNA+qfz172Ipm2rfVw8YdhDXiGtruF3f6gjIyGlyt+3fSAv\nY5Jx3UyNXTNcWxOLjQwVElIssau7/m2nHr/tHz1O7l6MEO0sxWLdWEsDjJS6\nbZSjkkPeNmlIQyvk9C2q0zhkVvm7wsn/IlEvZSVQuomh7n9ZwhaxYXF5sSdJ\n+rGd6ce3wN548lRpQVd5irhQ9s9bfzKSktUki2eQkkA3aAVwi0VvfK8A/m2x\ncynWAwH6X0hEjS4Z+2c6cDdolUS7g8TOu9LNzdwbkTLimDQqJzkUZg8pMJJE\neonQuVbKLbN1YTP1s2LVk365uyfe1v8wUqcAM/A+dLIrZrDbaHgAM5MywU2E\nKln+4l1L2nexonWBfycp5ofFj0WxisOsdS3H4J4Osjub94Q45LexFTam1pCh\nkIi67YOYDyyapZP0WK/MXIfXZ2wywlsBkRAl6eoPy7GSQmeTtNzfldchr2PW\n/BkV4iDhOJuFjyq7ZAXwt5KM0oT6p2B+yy49A575rIW9p/q+KGJCv0REi1Z5\nfdW61Wtc79BLHxxWR0yuT0mppbus5xbtH32rXuE2JaaMJvMCZbOPDe9LRQ03\nSJ8jp9YAPS5DNNa7RaHYG7hDYrkOjsAT2bXPItaDp8Ri/EG/5duGHvdjNMA6\nilE4\r\n=Nb6V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoUmqa5GcER4j0C1/EpxCmtfhP5gTxvN60Y9HRYj0vVAiEAlzd3mjjRzl6K/YzfLUJBS8WYblqmoncOtmpmho++v5Y="}]},"_npmUser":{"name":"sankar-boro-zeeve","email":"sankar.boro@zeeve.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/signer-cli_1.1.0_1632403581940_0.5479954601680364"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-16T06:49:23.048Z","1.0.0":"2021-09-16T06:49:23.248Z","modified":"2022-04-04T17:11:06.007Z","1.1.0":"2021-09-23T13:26:22.077Z"},"maintainers":[{"name":"abhishek-zeeve","email":"abhishek.rana@zeeve.io"},{"name":"sankar-boro-zeeve","email":"sankar.boro@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-js/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"}