Commandline scripts

Generate account from seed

Get the seed from stdin to generate account info.
1
$ vendor/bin/lto-seed <<< "manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add"
2
3
address: 3JmCa4jLVv7Yn2XkCnBUGsa7WNFVEMxAfWe
4
sign:
5
secretkey: 4zsR9xoFpxfnNwLcY4hdRUarwf5xWtLj6FpKGDFBgscPxecPj2qgRNx4kJsFCpe9YDxBRNoeBWTh2SDAdwTySomS
6
publickey: GjSacB6a5DFNEHjDSmn724QsrRStKYzkahPH67wyrhAY
7
encrypt:
8
secretkey: 4q7HKMbwbLcG58iFV3pz4vkRnPTwbrY9Q5JrwnwLEZCC
9
publickey: 6fDod1xcVj4Zezwyy3tdPGHkuDyMq8bDHQouyp5BjXsX
Copied!
By default a mainnet (L) address is generated. Pass T as argument to create a testnet address.
1
$ vendor/bin/lto-seed T <<< "manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add"
Copied!

Account info

Show account info from the secret key. The secret key should be base58 encoded.
1
$ vendor/bin/lto-account 4zsR9xoFpxfnNwLcY4hdRUarwf5xWtLj6FpKGDFBgscPxecPj2qgRNx4kJsFCpe9YDxBRNoeBWTh2SDAdwTySomS
2
3
address: 3JmCa4jLVv7Yn2XkCnBUGsa7WNFVEMxAfWe
4
sign:
5
secretkey: 4zsR9xoFpxfnNwLcY4hdRUarwf5xWtLj6FpKGDFBgscPxecPj2qgRNx4kJsFCpe9YDxBRNoeBWTh2SDAdwTySomS
6
publickey: GjSacB6a5DFNEHjDSmn724QsrRStKYzkahPH67wyrhAY
7
encrypt:
8
secretkey: 4q7HKMbwbLcG58iFV3pz4vkRnPTwbrY9Q5JrwnwLEZCC
9
publickey: 6fDod1xcVj4Zezwyy3tdPGHkuDyMq8bDHQouyp5BjXsX
Copied!
By default a mainnet (L) address is generated. Pass T as third argument to create a testnet address.
1
$ vendor/bin/lto-seed 4zsR9xoFpxfnNwLcY4hdRUarwf5xWtLj6FpKGDFBgscPxecPj2qgRNx4kJsFCpe9YDxBRNoeBWTh2SDAdwTySomS T
Copied!

Sign message

Sign a message (from stdin). The secret key should be base58 encoded. Outputs the signature and hash (base58 encoded).
1
$ cat message.json | vendor/bin/lto-sign 4zsR9xoFpxfnNwLcY4hdRUarwf5xWtLj6FpKGDFBgscPxecPj2qgRNx4kJsFCpe9YDxBRNoeBWTh2SDAdwTySomS
2
3
signature: 5i9gBaHwg9UFPuwU63LBdBR29yZdRDstWM9z7oo8GzevWhBdAAWwCSRUQbPLaCT3nFgjbQuuWxVQckzCd3CoFig4
4
hash: 42TEXg1vFAbcJ65y7qdYG9iCPvYfy3NDdVLd75akX2P5
Copied!
Last modified 6mo ago